Commit ba31c575 authored by Kourser's avatar Kourser
Browse files

Licence : AGPL-3.0, et la clause réseau réellement servie

Le texte intégral en LICENSE, la notice d'usage en AVIS.md, le champ « license »
dans les quatre manifestes, l'avis aux deux points d'entrée.

La section 13 est la seule raison de préférer l'AGPL à la GPL
  Sous GPL, l'obligation de publier ses modifications ne se déclenche qu'à la
  distribution d'un binaire. Un éditeur peut donc prendre le code, le modifier,
  l'exploiter en service hébergé, et ne rien rendre. Pour un produit dont
  l'usage principal *est* le service hébergé, la GPL ne protège rien.

  Mais une clause réseau qui repose sur la bonne volonté de l'exploitant ne
  protège pas davantage. Le produit la sert donc lui-même :

  KASTELL_SOURCE_URL porte l'adresse du code de l'instance. Elle s'affiche en
  pied des écrans publics — connexion, inscription, pages d'atterrissage des
  liens — et non dans le cockpit : une crise n'est pas le moment de lire une
  mention légale. Elle vient du serveur et non d'une constante compilée, pour
  qu'un exploitant qui modifie Kastell puisse pointer vers son dépôt sans
  reconstruire l'interface.

  KASTELL_REVISION inscrit la révision exacte dans l'artefact au moment de sa
  construction. La section 13 parle du code de « la » version qui tourne :
  après coup, plus rien ne permet de la retrouver.

  La sonde publique /api/etat publie les deux, lisibles sans compte.

  La console root rappelle l'obligation tant qu'elle n'est pas satisfaite. Nous
  ne pouvons pas savoir si un exploitant a modifié le code — rien, dans un
  artefact en cours d'exécution, ne le dit de façon fiable. Nous pouvons lui
  énoncer ce que la licence attend de lui, plutôt que de le laisser en
  infraction sans le savoir. Même parti que « aucune sauvegarde intégrée ».

Le vérificateur reste hors AGPL
  outils/verifier-journal.mjs passe sous CC0-1.0. Il existe pour qu'un tiers —
  auditeur, assureur, partie adverse — contrôle un journal exporté sans
  exécuter notre code ni nous demander la permission. Le placer sous AGPL
  ferait dépendre la vérification de nos conditions : la garantie
  d'inaltérabilité ne vaudrait plus rien, puisque c'est nous qu'elle engage.

  CC0 plutôt que la mention « domaine public » qui y figurait : en droit
  français l'auteur ne peut pas renoncer à son droit moral, et une
  renonciation informelle n'a pas d'effet certain. CC0 prévoit ce cas.

Ce que la licence ne couvre pas, dit explicitement
  L'AGPL porte sur le code, jamais sur ce qui est consigné. Le journal, les
  documents, l'annuaire et les enregistrements appartiennent à l'organisation.
  L'ambiguïté sur ce point est le premier obstacle commercial d'un logiciel
  libre en gestion de crise : AVIS.md la lève en un tableau.

Éprouvé comme le reste — 446 → 454 contrôles
  Un LICENSE tronqué n'est pas l'AGPL, et l'obligation de la joindre au
  programme (section 4) n'est alors pas tenue : le texte est contrôlé par son
  empreinte SHA-256, celle publiée par la FSF. Les huit contrôles couvrent
  aussi l'offre de code servie sans compte, le rappel en console, et les deux
  cas où il doit s'éteindre ou changer.

Deux corrections au passage
  « pnpm up » était un alias du « pnpm update » intégré : le script n'était
  jamais atteint, et l'invoquer mettait à jour les dépendances au lieu de
  démarrer la pile. Renommé en « pnpm demarrer » / « pnpm arreter » — même
  piège que « pnpm root » plus tôt.

  Les écrans d'authentification centraient leur panneau en ligne : le pied de
  licence s'est posé à côté de la carte au lieu de dessous. Colonne.

Co-Authored-By: default avatarClaude Opus 5 <noreply@anthropic.com>
parent edfc1385
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4,6 +4,11 @@

# Identité de l'instance
KASTELL_URL_PUBLIQUE=http://localhost:8080

# Où trouver le code source de cette instance (AGPL-3.0, section 13). Si vous
# avez modifié Kastell, faites pointer cette adresse vers votre dépôt : elle
# s'affiche dans l'interface et la licence le demande.
KASTELL_SOURCE_URL=https://github.com/kourser/kastell
KASTELL_PORT=8080
KASTELL_ENV=developpement

AVIS.md

0 → 100644
+111 −0
Original line number Diff line number Diff line
# Avis de licence

Kastell — cockpit de gestion de crise
Copyright (C) 2026 Kourser

Ce programme est un logiciel libre : vous pouvez le redistribuer et/ou le
modifier selon les termes de la **GNU Affero General Public License**, version 3,
telle que publiée par la Free Software Foundation.

Ce programme est distribué dans l'espoir qu'il sera utile, mais **SANS AUCUNE
GARANTIE** ; sans même la garantie implicite de VALEUR MARCHANDE ou
d'ADÉQUATION À UN USAGE PARTICULIER. Voyez la GNU Affero General Public
License pour plus de détails.

Vous devriez avoir reçu une copie de la GNU Affero General Public License avec
ce programme — voir le fichier [`LICENSE`](LICENSE). Sinon, elle est disponible
sur <https://www.gnu.org/licenses/>.

*Seule la version anglaise de la licence, reproduite intégralement et sans
modification dans `LICENSE`, fait foi. Ce qui précède en est la notice d'usage,
pas une traduction.*

---

## Ce que l'AGPL change, en pratique

L'AGPL est la GPL plus une clause : la **section 13**, dite clause réseau.

Sous GPL, l'obligation de publier ses modifications ne se déclenche qu'à la
*distribution* du logiciel. Un éditeur peut donc prendre un logiciel GPL, le
modifier, l'exploiter en service hébergé — et ne rien rendre, puisqu'il ne
distribue aucun binaire. Pour un produit dont l'usage principal *est* le service
hébergé, la GPL ne protège rien.

Sous AGPL, **faire fonctionner une version modifiée sur un réseau vaut
distribution**. Quiconque s'en sert à distance doit se voir offrir le code
correspondant.

### Ce que cela veut dire pour vous

| Vous | Vos obligations |
|---|---|
| Vous auto-hébergez Kastell **sans le modifier** | Aucune. Utilisez-le, sauvegardez-le, exploitez-le. Rien à publier. |
| Vous **modifiez** Kastell pour votre usage interne, et vos collaborateurs s'en servent via le réseau | Ils sont vos utilisateurs distants : offrez-leur le code modifié. En pratique, un dépôt interne accessible suffit. |
| Vous exploitez Kastell modifié **comme service pour des tiers** | Publiez vos modifications sous AGPL-3.0. C'est le cas que la licence vise. |
| Vous voulez intégrer Kastell à un produit propriétaire | L'AGPL ne le permet pas. Écrivez-nous. |

**Vos données de crise ne sont pas concernées.** La licence porte sur le code,
jamais sur ce que vous y consignez. Le journal, les documents, l'annuaire, les
enregistrements sont à vous — l'AGPL n'y donne à personne le moindre droit, et
c'est aussi vrai pour nous.

## Comment Kastell tient sa part de la section 13

Une clause réseau qui repose sur la bonne volonté de l'exploitant ne vaut rien.
Kastell l'outille :

- **`KASTELL_SOURCE_URL`** — l'adresse du code de *cette* instance. Elle est
  affichée dans l'interface, sur les écrans que traverse tout le monde, et
  publiée par la sonde d'état `/api/etat`. Si vous modifiez le code, pointez-la
  vers votre dépôt : vous êtes en règle.
- **`KASTELL_REVISION`** — la révision exacte de l'artefact en cours
  d'exécution, inscrite au moment de la construction. La section 13 exige le
  code correspondant à *la version qui tourne*, pas à une version voisine.
- La console root **le rappelle à l'exploitant** dès lors qu'il tourne une
  révision qu'elle ne reconnaît pas, plutôt que de le laisser en infraction
  sans le savoir.

## Le vérificateur d'intégrité fait exception

[`outils/verifier-journal.mjs`](outils/verifier-journal.mjs) est versé au
domaine public sous **CC0 1.0** — voir [`LICENSE-VERIFICATEUR`](LICENSE-VERIFICATEUR).

C'est délibéré, et c'est le contraire d'une inattention. Ce fichier existe pour
qu'un tiers — un auditeur, un assureur, un juge, une partie adverse — puisse
contrôler un journal exporté **sans exécuter notre code et sans nous demander la
permission**. Le placer sous AGPL reviendrait à faire dépendre la vérification
de nos conditions : la garantie d'inaltérabilité ne vaudrait plus rien, puisque
c'est nous qu'elle engage.

CC0 plutôt qu'une simple mention « domaine public » : en droit français, l'auteur
ne peut pas renoncer à son droit moral, et une renonciation informelle n'a pas
d'effet certain. CC0 prévoit ce cas — à défaut de renonciation valable, il
accorde une licence inconditionnelle et irrévocable. Le résultat voulu tient
dans les deux cas.

## Composants tiers

Kastell s'appuie sur deux briques structurelles, choisies aussi pour leur
licence — toutes deux permissives, donc compatibles avec l'AGPL et sans
contamination croisée :

| Brique | Licence | Rôle |
|---|---|---|
| [LiveKit](https://livekit.io) | Apache-2.0 | Serveur média (visioconférence, enregistrement) |
| [Excalidraw](https://excalidraw.com) | MIT | Canevas des tableaux blancs |

Les dépendances applicatives (Fastify, React, zod, `postgres`, TanStack Query…)
sont sous MIT ou équivalent. PostgreSQL est sous licence PostgreSQL, Redis sous
licence Redis, MinIO sous **AGPL-3.0** — ce dernier point est sans conséquence
ici : Kastell dialogue avec un stockage objet par l'API S3, derrière un
adaptateur, et n'incorpore aucun code MinIO. Tout déploiement peut lui
substituer un autre fournisseur S3.

## Contribution

Le projet n'accepte pas encore de contributions externes. Quand il le fera, un
accord de contribution sera demandé — non pour reprendre vos droits, mais pour
préserver la possibilité d'une offre hébergée et d'éventuels modules sous
licence distincte, sans avoir à recontacter chaque contributeur. Le cœur, lui,
reste sous AGPL.

LICENSE

0 → 100644
+661 −0

File added.

Preview size limit exceeded, changes collapsed.

LICENSE-VERIFICATEUR

0 → 100644
+121 −0
Original line number Diff line number Diff line
Creative Commons Legal Code

CC0 1.0 Universal

    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
    HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

  i. the right to reproduce, adapt, distribute, perform, display,
     communicate, and translate a Work;
 ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
     likeness depicted in a Work;
 iv. rights protecting against unfair competition in regards to a Work,
     subject to the limitations in paragraph 4(a), below;
  v. rights protecting the extraction, dissemination, use and reuse of data
     in a Work;
 vi. database rights (such as those arising under Directive 96/9/EC of the
     European Parliament and of the Council of 11 March 1996 on the legal
     protection of databases, and under any national implementation
     thereof, including any amended or successor version of such
     directive); and
vii. other similar, equivalent or corresponding rights throughout the
     world based on applicable law or treaty, and any national
     implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

 a. No trademark or patent rights held by Affirmer are waived, abandoned,
    surrendered, licensed or otherwise affected by this document.
 b. Affirmer offers the Work as-is and makes no representations or
    warranties of any kind concerning the Work, express, implied,
    statutory or otherwise, including without limitation warranties of
    title, merchantability, fitness for a particular purpose, non
    infringement, or the absence of latent or other defects, accuracy, or
    the present or absence of errors, whether or not discoverable, all to
    the greatest extent permissible under applicable law.
 c. Affirmer disclaims responsibility for clearing rights of other persons
    that may apply to the Work or any use thereof, including without
    limitation any person's Copyright and Related Rights in the Work.
    Further, Affirmer disclaims responsibility for obtaining any necessary
    consents, permissions or other rights required for any use of the
    Work.
 d. Affirmer understands and acknowledges that Creative Commons is not a
    party to this document and has no duty or obligation with respect to
    this CC0 or use of the Work.
+24 −4
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ Prérequis : Docker, Node ≥ 22, pnpm.
cp .env.example .env
# renseigner les valeurs CHANGEZ-MOI : openssl rand -hex 32
pnpm install
pnpm up          # postgres, redis, minio, application
pnpm demarrer    # postgres, redis, minio, application
```

L'interface et l'API sont servies par le **même artefact, sur le même port** :
@@ -405,6 +405,26 @@ Voir §7 du cahier des charges.

## Licence

À confirmer — **AGPL-3.0** proposée (voir §12 du cahier des charges). Le fichier
`LICENSE` sera ajouté une fois la décision prise ; le dépôt n'est pas encore
public.
**AGPL-3.0-or-later** — texte intégral dans [`LICENSE`](LICENSE), notice d'usage
et cas concrets dans [`AVIS.md`](AVIS.md).

L'AGPL est la GPL plus la **clause réseau** (section 13) : exploiter une version
modifiée en service hébergé vaut distribution, et oblige à en offrir le code.
C'est la seule raison de l'avoir préférée à la GPL — pour un produit dont
l'usage principal *est* le service hébergé, la GPL ne protège rien.

En pratique : **auto-héberger Kastell sans le modifier n'impose rien**. Le modifier
et le servir à d'autres oblige à publier ce qu'on a changé. Vos données de crise
ne sont jamais concernées : la licence porte sur le code.

La clause réseau est outillée plutôt que laissée à la bonne volonté :
`KASTELL_SOURCE_URL` porte l'adresse du code de l'instance et s'affiche sur les
écrans publics, `KASTELL_REVISION` inscrit la révision exacte de l'artefact à la
construction, et la console root rappelle l'obligation à l'exploitant tant qu'il
n'y a pas répondu.

Le vérificateur indépendant [`outils/verifier-journal.mjs`](outils/verifier-journal.mjs)
fait exception : il est versé au domaine public sous **CC0 1.0**
([`LICENSE-VERIFICATEUR`](LICENSE-VERIFICATEUR)). Une garantie d'inaltérabilité
qu'on ne peut contrôler qu'aux conditions de celui qui la revendique ne
garantit rien.
Loading