Thirteen source-backed interactive diagrams in docs/architecture with an index page (thothii-diagrams.html): runtime and deployment architecture, module tree, F1-F8 workflow, session and catalog-sync lifecycles, new-question, gate round-trip, resume and OIDC sequences, session runtime classes, metadata dataflow and Metadata Catalog ERD. Replaces the old thothii-core sequence diagram. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
257 lines
5.5 KiB
JSON
257 lines
5.5 KiB
JSON
{
|
|
"schema_version": 1,
|
|
"diagram_type": "sequence",
|
|
"meta": {
|
|
"title": "ThothII — ripresa di una sessione",
|
|
"locale": "it",
|
|
"output": "docs/architecture/thothii-resume.html",
|
|
"quality_profile": "showcase",
|
|
"repository": {
|
|
"url": "https://git.tylconsulting.it/mptyl/ThothII.git",
|
|
"link_mode": "local-only",
|
|
"revision": "31e6d3a162e9e5ac71fc2d8da4fe44b16c06aae3"
|
|
}
|
|
},
|
|
"participants": [
|
|
{
|
|
"id": "reviewer",
|
|
"type": "external",
|
|
"label": "Reviewer",
|
|
"sublabel": "browser"
|
|
},
|
|
{
|
|
"id": "frontend",
|
|
"type": "frontend",
|
|
"label": "Frontend",
|
|
"sublabel": "React"
|
|
},
|
|
{
|
|
"id": "backend",
|
|
"type": "backend",
|
|
"label": "Backend",
|
|
"sublabel": "Fastify",
|
|
"sources": [
|
|
{
|
|
"path": "backend/src/routes/sessions.ts",
|
|
"line": 685,
|
|
"end_line": 698,
|
|
"label": "409 se in sola lettura"
|
|
},
|
|
{
|
|
"path": "backend/src/routes/sessions.ts",
|
|
"line": 774,
|
|
"end_line": 809,
|
|
"label": "reopen + nuovo runtime"
|
|
},
|
|
{
|
|
"path": "backend/src/routes/sessions.ts",
|
|
"line": 820,
|
|
"end_line": 829,
|
|
"label": "bootstrap senza search pack"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "tht",
|
|
"type": "backend",
|
|
"label": "tht CLI",
|
|
"sublabel": "sessione su disco",
|
|
"sources": [
|
|
{
|
|
"path": "backend/src/tht/tht-runner.ts",
|
|
"line": 569,
|
|
"end_line": 569,
|
|
"label": "session reopen"
|
|
},
|
|
{
|
|
"path": "backend/src/routes/sessions.ts",
|
|
"line": 206,
|
|
"end_line": 216,
|
|
"label": "locateSession"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "pi",
|
|
"type": "backend",
|
|
"label": "Pi",
|
|
"sublabel": "nuovo processo",
|
|
"sources": [
|
|
{
|
|
"path": "backend/src/pi/pi-process-manager.ts",
|
|
"line": 283,
|
|
"end_line": 290,
|
|
"label": "/riprendi-sessione"
|
|
},
|
|
{
|
|
"path": "harness/.pi/skills/tht-sessione/SKILL.md",
|
|
"line": 164,
|
|
"end_line": 185,
|
|
"label": "Phase 0 Resume"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "llm",
|
|
"type": "cloud",
|
|
"label": "Provider LLM",
|
|
"sublabel": "modello salvato"
|
|
}
|
|
],
|
|
"segments": [
|
|
{
|
|
"from": 160,
|
|
"to": 438,
|
|
"label": "Richiesta"
|
|
},
|
|
{
|
|
"from": 448,
|
|
"to": 540,
|
|
"label": "Bootstrap"
|
|
},
|
|
{
|
|
"from": 550,
|
|
"to": 858,
|
|
"label": "Ricostruzione"
|
|
}
|
|
],
|
|
"messages": [
|
|
{
|
|
"from": "reviewer",
|
|
"to": "frontend",
|
|
"y": 170,
|
|
"label": "riprendi sessione"
|
|
},
|
|
{
|
|
"from": "frontend",
|
|
"to": "backend",
|
|
"y": 200,
|
|
"label": "POST /sessions/:id/resume",
|
|
"variant": "emphasis"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "tht",
|
|
"y": 230,
|
|
"label": "session show",
|
|
"note": "409 se finalizzata o archiviata"
|
|
},
|
|
{
|
|
"from": "tht",
|
|
"to": "backend",
|
|
"y": 296,
|
|
"label": "manifest",
|
|
"variant": "return"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "tht",
|
|
"y": 326,
|
|
"label": "session reopen"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "pi",
|
|
"y": 356,
|
|
"label": "spawn",
|
|
"note": "sostituisce il runtime fermo"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "frontend",
|
|
"y": 422,
|
|
"label": "200 { id }",
|
|
"variant": "return"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "pi",
|
|
"y": 458,
|
|
"label": "set_model + thinking",
|
|
"note": "niente search pack: il contesto è su disco"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "pi",
|
|
"y": 524,
|
|
"label": "prompt /riprendi-sessione",
|
|
"variant": "emphasis"
|
|
},
|
|
{
|
|
"from": "pi",
|
|
"to": "llm",
|
|
"y": 560,
|
|
"label": "turno modello",
|
|
"variant": "emphasis"
|
|
},
|
|
{
|
|
"from": "llm",
|
|
"to": "pi",
|
|
"y": 590,
|
|
"label": "tool call",
|
|
"variant": "return"
|
|
},
|
|
{
|
|
"from": "pi",
|
|
"to": "tht",
|
|
"y": 620,
|
|
"label": "tht session show",
|
|
"note": "fase corrente, stato e lingua"
|
|
},
|
|
{
|
|
"from": "pi",
|
|
"to": "tht",
|
|
"y": 686,
|
|
"label": "tht session documents",
|
|
"note": "artefatti già prodotti"
|
|
},
|
|
{
|
|
"from": "tht",
|
|
"to": "pi",
|
|
"y": 752,
|
|
"label": "artefatti + ledger",
|
|
"variant": "return"
|
|
},
|
|
{
|
|
"from": "pi",
|
|
"to": "backend",
|
|
"y": 782,
|
|
"label": "gate della fase N",
|
|
"variant": "dashed"
|
|
},
|
|
{
|
|
"from": "backend",
|
|
"to": "frontend",
|
|
"y": 812,
|
|
"label": "SSE ui_request",
|
|
"variant": "dashed"
|
|
},
|
|
{
|
|
"from": "frontend",
|
|
"to": "reviewer",
|
|
"y": 842,
|
|
"label": "riprende dalla fase N",
|
|
"variant": "return"
|
|
}
|
|
],
|
|
"cards": [
|
|
{
|
|
"dot": "cyan",
|
|
"title": "Stato su disco",
|
|
"items": [
|
|
"Pi riparte senza conversazione: manifest, artefatti e ledger sono l'unico contesto",
|
|
"La fase corrente si ricalcola dal ledger"
|
|
]
|
|
},
|
|
{
|
|
"dot": "amber",
|
|
"title": "Casi particolari",
|
|
"items": [
|
|
"Se il runtime è ancora attivo la risposta è alreadyActive e non si riavvia nulla",
|
|
"La lingua di interazione resta quella salvata; non si può cambiare alla ripresa",
|
|
"Il prompt sbagliato (/nuova-domanda) trasformerebbe la ripresa in una nuova domanda"
|
|
]
|
|
}
|
|
]
|
|
}
|