943acbc573
Durcit la convention de nommage des projets (dérive constatée : 'Sliding Automation', 'code_versioning'... au lieu des formes canoniques). - trilium_api.py : projets_canoniques() lit le référentiel = valeurs du label projet sur les notes de type=projet (source unique, pas de constante en dur). Note-projet CodeVersioning créée (manquait). - mcp_server.py : _valider_projet() branché dans les 6 tools de création (add_decision/history/backlog, new_conversation, create_entite, add_skill). Refuse un projet non canonique (suggestion si faute) ou inconnu (renvoi au processus de création de projet). Ne verrouille pas si référentiel illisible. - lint_audit.py : VAL-nommage aligné sur le référentiel (attrape casse, espace ET snake_case ; l'ancien 'contient un espace' ratait code_versioning). - Données : 79 notes ré-étiquetées vers les 3 formes canoniques. Quality by design : l'erreur de nommage devient impossible à l'écriture, le Lint n'est plus que le filet de sécurité.
63 lines
1.5 KiB
Python
63 lines
1.5 KiB
Python
# A highish-level implementation of the HTTP/1.1 wire protocol (RFC 7230),
|
|
# containing no networking code at all, loosely modelled on hyper-h2's generic
|
|
# implementation of HTTP/2 (and in particular the h2.connection.H2Connection
|
|
# class). There's still a bunch of subtle details you need to get right if you
|
|
# want to make this actually useful, because it doesn't implement all the
|
|
# semantics to check that what you're asking to write to the wire is sensible,
|
|
# but at least it gets you out of dealing with the wire itself.
|
|
|
|
from h11._connection import Connection, NEED_DATA, PAUSED
|
|
from h11._events import (
|
|
ConnectionClosed,
|
|
Data,
|
|
EndOfMessage,
|
|
Event,
|
|
InformationalResponse,
|
|
Request,
|
|
Response,
|
|
)
|
|
from h11._state import (
|
|
CLIENT,
|
|
CLOSED,
|
|
DONE,
|
|
ERROR,
|
|
IDLE,
|
|
MIGHT_SWITCH_PROTOCOL,
|
|
MUST_CLOSE,
|
|
SEND_BODY,
|
|
SEND_RESPONSE,
|
|
SERVER,
|
|
SWITCHED_PROTOCOL,
|
|
)
|
|
from h11._util import LocalProtocolError, ProtocolError, RemoteProtocolError
|
|
from h11._version import __version__
|
|
|
|
PRODUCT_ID = "python-h11/" + __version__
|
|
|
|
|
|
__all__ = (
|
|
"Connection",
|
|
"NEED_DATA",
|
|
"PAUSED",
|
|
"ConnectionClosed",
|
|
"Data",
|
|
"EndOfMessage",
|
|
"Event",
|
|
"InformationalResponse",
|
|
"Request",
|
|
"Response",
|
|
"CLIENT",
|
|
"CLOSED",
|
|
"DONE",
|
|
"ERROR",
|
|
"IDLE",
|
|
"MUST_CLOSE",
|
|
"SEND_BODY",
|
|
"SEND_RESPONSE",
|
|
"SERVER",
|
|
"SWITCHED_PROTOCOL",
|
|
"ProtocolError",
|
|
"LocalProtocolError",
|
|
"RemoteProtocolError",
|
|
)
|