Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
docs: explain crate architecture and flows with diagrams
leepokai04c1e1762164
diff --git a/host/crates/memory/README.md b/host/crates/memory/README.mdindex 458fd06a..5e32e4b6 100644--- a/host/crates/memory/README.md+++ b/host/crates/memory/README.md@@ -7,7 +7,7 @@**Memory that stays with your agents.**<br>Layered Markdown memory, clear write rules, and a record of every change.-[Quick start](#use) · [API reference](https://docs.rs/codync-mem) · [Codync](https://github.com/leepokai/Codync) · [Contributing](#status)+[Quick start](#use) · [Architecture](#architecture) · [API reference](https://docs.rs/codync-mem) · [Codync](https://github.com/leepokai/Codync) · [Contributing](#status)[](https://crates.io/crates/codync-mem) [](https://github.com/leepokai/codync-mem/actions/workflows/ci.yml) [](https://docs.rs/codync-mem) [](LICENSE)@@ -35,6 +35,29 @@ The crate decides; the caller acts. It starts no processes, opens no network conspawns no threads. It keeps its own tables on the caller's SQLite connection and writes inside the caller'stransaction, so a memory change commits together with whatever the caller records alongside it.+## Architecture++The caller owns execution: file reads and writes, model calls, scheduling, and the SQLite connection+and transaction. `codync-mem` validates changes, records their history, and prepares memory context.++++Markdown files are the live copy on disk. SQLite records versions, authorship and forgotten facts;+it is also where `opening` reads the recorded memory for a session. The caller keeps disk changes+and recorded versions in step. The SQLite transaction covers database records, not filesystem writes.++### From session context to a memory change++++A session receives its bot's `MEMORY.md` and, when enabled, the shared “yours” layer. Topic notes+are read as needed. Dreaming follows the same ownership boundary: the crate builds a prompt and+audits the answer; the caller runs the model, checks the files still match the snapshot, applies+accepted edits and records the run. The crate does not run a background model or write files itself.++Diagram sources: [architecture](assets/architecture.mmd) · [memory flow](assets/memory-flow.mmd).+Render the Mermaid sources with the shared [theme](assets/diagram-theme.json) and a white background.+## Status0.x, developed inside Codync and mirrored here read-only. The API changes with Codync. Report issues here;diff --git a/host/crates/memory/assets/architecture.mmd b/host/crates/memory/assets/architecture.mmdnew file mode 100644index 00000000..f54d0f87--- /dev/null+++ b/host/crates/memory/assets/architecture.mmd@@ -0,0 +1,22 @@+flowchart LR+ subgraph HOST["Caller · application or host"]+ AG["Agent tools / user edits"] --> IO["Caller · file I/O and transactions"]+ MODEL["Caller runs the model"]+ DISK["Markdown on disk · shared + per-bot folders"]+ IO <-->|"read / write"| DISK+ end+ subgraph MEM["codync-mem · decisions and records"]+ RULES["files + check + evidence · validate proposed changes"]+ DB["SQLite · versions, fact authorship, forgotten facts, dream logs"]+ OPEN["opening + index · session context and note references"]+ DREAM["dream · prompt, audit, proposed file edits"]+ RULES --> DB+ DB --> OPEN+ DB --> DREAM+ end+ IO <-->|"proposed content / admission result"| RULES+ IO <-->|"call with caller-owned SQLite connection"| DB+ OPEN --> CTX["Caller supplies context to the agent"]+ DREAM -->|"prompt"| MODEL+ MODEL -->|"model response for audit"| DREAM+ DREAM -->|"approved proposals; caller applies"| IOdiff --git a/host/crates/memory/assets/architecture.svg b/host/crates/memory/assets/architecture.svgnew file mode 100644index 00000000..434d891d--- /dev/null+++ b/host/crates/memory/assets/architecture.svg@@ -0,0 +1 @@+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 1881.04px; background-color: white;" viewBox="4 4 1881.0390625 498.77032470703125" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:Arial,sans-serif;font-size:16px;fill:#252525;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#ffffff;}#my-svg .error-text{fill:#000000;stroke:#000000;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#77746c;stroke:#77746c;}#my-svg .marker.cross{stroke:#77746c;}#my-svg svg{font-family:Arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:Arial,sans-serif;color:#252525;}#my-svg .cluster-label text{fill:#000000;}#my-svg .cluster-label span{color:#000000;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#252525;color:#252525;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#f5f3ed;stroke:#88857d;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#77746c!important;stroke-width:0;stroke:#77746c;}#my-svg .arrowheadPath{fill:#0b0b0b;}#my-svg .edgePaths .path{stroke:#77746c;stroke-width:1px;}#my-svg .flowchart-link{stroke:#77746c;fill:none;}#my-svg .edgeLabel{background-color:#efeee9;text-align:center;}#my-svg .edgeLabel p{background-color:#efeee9;}#my-svg .edgeLabel rect{opacity:0.5;background-color:#efeee9;fill:#efeee9;}#my-svg .labelBkg{background-color:rgba(239, 238, 233, 0.5);}#my-svg .cluster rect{fill:#ffffff;stroke:hsl(0, 0%, 90%);stroke-width:1px;}#my-svg .cluster text{fill:#000000;}#my-svg .cluster span{color:#000000;}#my-svg .node .collapsed-indicator{fill:hsl(0, 0%, 90%);stroke:none;opacity:0.6;}#my-svg .node .collapsed-separator{stroke:hsl(0, 0%, 90%);stroke-width:0.75px;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:Arial,sans-serif;font-size:12px;background:#ffffff;border:1px solid hsl(0, 0%, 90%);border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#252525;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:#efeee9;text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:#efeee9;padding:2px;}#my-svg .icon-shape .label rect,#my-svg .image-shape .label rect{opacity:0.5;background-color:#efeee9;fill:#efeee9;}#my-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#my-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#my-svg .node .neo-node{stroke:#88857d;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].swimlane.cluster rect{filter:none;}#my-svg [data-look="neo"].node path{stroke:url(#my-svg-gradient);stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#88857d;filter:none;}#my-svg [data-look="neo"].node circle{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .node rect,#my-svg .cluster rect,#my-svg .labelBox,#my-svg .note{filter:none!important;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker id="my-svg_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="my-svg_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"><g class="cluster" id="my-svg-MEM" data-look="neo"><rect style="" x="1051.0390625" y="12" width="624" height="374.6"/><g class="cluster-label" transform="translate(1232.3125, 12)"><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">codync-mem</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> decisions</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> and</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> records</tspan></tspan></text></g></g></g><g class="cluster" id="my-svg-HOST" data-look="neo"><rect style="" x="12" y="134.77031478881838" width="707.15625" height="360"/><g class="cluster-label" transform="translate(272.6328125, 134.77031478881838)"><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">Caller</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> application</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> or</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> host</tspan></tspan></text></g></g></g></g><g class="edges edgePaths"><path d="M188,229.27031478881835L208,229.27031478881835" id="my-svg-L_AG_IO_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 16 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_AG_IO_0" data-points="W3sieCI6MTg4LCJ5IjoyMjkuMjcwMzE0Nzg4ODE4MzV9LHsieCI6MjEyLCJ5IjoyMjkuMjcwMzE0Nzg4ODE4MzV9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M368,244.39031478881836L386.9289321881345,244.39031478881836Q394,244.39031478881836 394,251.46138260068383L394,293.6992469769529Q394,300.7703147888184 401.0710678118655,300.7703147888184L539.15625,300.7703147888184" id="my-svg-L_IO_DISK_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 4 214.2079620361328 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_IO_DISK_0" data-points="W3sieCI6MzY0LCJ5IjoyNDQuMzkwMzE0Nzg4ODE4MzZ9LHsieCI6Mzk0LCJ5IjoyNDQuMzkwMzE0Nzg4ODE4MzZ9LHsieCI6Mzk0LCJ5IjozMDAuNzcwMzE0Nzg4ODE4NH0seyJ4Ijo1NDMuMTU2MjUsInkiOjMwMC43NzAzMTQ3ODg4MTg0fV0=" data-look="neo" marker-start="url(#my-svg_flowchart-v2-pointStart-margin)" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1227.0390625,135L1249.9679946881345,135Q1257.0390625,135 1257.0390625,142.07106781186548L1257.0390625,149.52893218813452Q1257.0390625,156.6 1264.1101303118655,156.6L1283.0390625,156.6" id="my-svg-L_RULES_DB_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 68.27169799804688 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_RULES_DB_0" data-points="W3sieCI6MTIyNy4wMzkwNjI1LCJ5IjoxMzV9LHsieCI6MTI1Ny4wMzkwNjI1LCJ5IjoxMzV9LHsieCI6MTI1Ny4wMzkwNjI1LCJ5IjoxNTYuNn0seyJ4IjoxMjg3LjAzOTA2MjUsInkiOjE1Ni42fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1439.0390625,156.6L1495.0390625,156.6" id="my-svg-L_DB_OPEN_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 52 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_DB_OPEN_0" data-points="W3sieCI6MTQzOS4wMzkwNjI1LCJ5IjoxNTYuNn0seyJ4IjoxNDk5LjAzOTA2MjUsInkiOjE1Ni42fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1439.0390625,197.39999999999998L1461.9679946881345,197.39999999999998Q1469.0390625,197.39999999999998 1469.0390625,204.47106781186545L1469.0390625,285.2089321881345Q1469.0390625,292.28 1476.1101303118655,292.28L1495.0390625,292.28" id="my-svg-L_DB_DREAM_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 141.5517578125 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_DB_DREAM_0" data-points="W3sieCI6MTQzOS4wMzkwNjI1LCJ5IjoxOTcuMzk5OTk5OTk5OTk5OTh9LHsieCI6MTQ2OS4wMzkwNjI1LCJ5IjoxOTcuMzk5OTk5OTk5OTk5OTh9LHsieCI6MTQ2OS4wMzkwNjI1LCJ5IjoyOTIuMjh9LHsieCI6MTQ5OS4wMzkwNjI1LCJ5IjoyOTIuMjh9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M368,214.15031478881835L386.9289321881345,214.15031478881835Q394,214.15031478881835 394,207.07924697695287L394,204.84138260068386Q394,197.77031478881838 401.0710678118655,197.77031478881838L729.15625,197.77031478881838L742.0851821881345,197.77031478881838Q749.15625,197.77031478881838 749.15625,190.6992469769529L749.15625,141.29138260068385Q749.15625,134.22031478881837 756.2273178118655,134.22031478881837L1000.6492198944092,134.22031478881837Q1001.0390625,134.22031478881837 1001.0390625,134.61015739440919L1001.0390625,134.61015739440919Q1001.0390625,135 1001.4289051055908,135L1041.0390625,135L1071.0390625,135" id="my-svg-L_IO_RULES_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 4 764.7986450195312 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_IO_RULES_0" data-points="W3sieCI6MzY0LCJ5IjoyMTQuMTUwMzE0Nzg4ODE4MzV9LHsieCI6Mzk0LCJ5IjoyMTQuMTUwMzE0Nzg4ODE4MzV9LHsieCI6Mzk0LCJ5IjoxOTcuNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzI5LjE1NjI1LCJ5IjoxOTcuNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzQ5LjE1NjI1LCJ5IjoxOTcuNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzQ5LjE1NjI1LCJ5IjoxMzQuMjIwMzE0Nzg4ODE4Mzd9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjoxMzQuMjIwMzE0Nzg4ODE4Mzd9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjoxMzV9LHsieCI6MTA0MS4wMzkwNjI1LCJ5IjoxMzV9LHsieCI6MTA3NS4wMzkwNjI1LCJ5IjoxMzV9XQ==" data-look="neo" marker-start="url(#my-svg_flowchart-v2-pointStart-margin)" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M368,224.23031478881836L403.27,224.23031478881836Q406,224.23031478881836 406,221.50031478881837L406,221.50031478881837Q406,218.77031478881838 408.73,218.77031478881838L729.15625,218.77031478881838L762.7812496185303,218.77031478881838Q769.15625,218.77031478881838 769.15625,212.39531440734865L769.15625,212.39531440734865Q769.15625,206.02031402587892 775.5312503814697,206.02031402587892L994.5492195129394,206.02031402587892Q1001.0390625,206.02031402587892 1001.0390625,212.51015701293946L1001.0390625,212.51015701293946Q1001.0390625,219 1007.5289054870606,219L1041.0390625,219.00000000000003L1249.9679946881345,219.00000000000003Q1257.0390625,219.00000000000003 1257.0390625,211.92893218813455L1257.0390625,204.4710678118655Q1257.0390625,197.40000000000003 1264.1101303118655,197.40000000000003L1283.0390625,197.40000000000003" id="my-svg-L_IO_DB_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 4 942.7494506835938 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_IO_DB_0" data-points="W3sieCI6MzY0LCJ5IjoyMjQuMjMwMzE0Nzg4ODE4MzZ9LHsieCI6NDA2LCJ5IjoyMjQuMjMwMzE0Nzg4ODE4MzZ9LHsieCI6NDA2LCJ5IjoyMTguNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzI5LjE1NjI1LCJ5IjoyMTguNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzY5LjE1NjI1LCJ5IjoyMTguNzcwMzE0Nzg4ODE4Mzh9LHsieCI6NzY5LjE1NjI1LCJ5IjoyMDYuMDIwMzE0MDI1ODc4OTJ9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjoyMDYuMDIwMzE0MDI1ODc4OTJ9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjoyMTl9LHsieCI6MTA0MS4wMzkwNjI1LCJ5IjoyMTkuMDAwMDAwMDAwMDAwMDN9LHsieCI6MTI1Ny4wMzkwNjI1LCJ5IjoyMTkuMDAwMDAwMDAwMDAwMDN9LHsieCI6MTI1Ny4wMzkwNjI1LCJ5IjoxOTcuNDAwMDAwMDAwMDAwMDN9LHsieCI6MTI4Ny4wMzkwNjI1LCJ5IjoxOTcuNDAwMDAwMDAwMDAwMDN9XQ==" data-look="neo" marker-start="url(#my-svg_flowchart-v2-pointStart-margin)" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1651.0390625,156.6L1685.0390625,156.6L1721.0390625,156.6" id="my-svg-L_OPEN_CTX_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 66 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_OPEN_CTX_0" data-points="W3sieCI6MTY1MS4wMzkwNjI1LCJ5IjoxNTYuNn0seyJ4IjoxNjg1LjAzOTA2MjUsInkiOjE1Ni42fSx7IngiOjE3MjUuMDM5MDYyNSwieSI6MTU2LjZ9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1499.0390625,322.04L1041.0390625,322.04L1008.1101303118655,322.04Q1001.0390625,322.04 1001.0390625,329.1110678118655L1001.0390625,377.54924468813454Q1001.0390625,384.6203125 993.9679946881345,384.6203125L756.2273178118655,384.6203125Q749.15625,384.6203125 749.15625,391.6913803118655L749.15625,419.2992469769529Q749.15625,426.37031478881835 742.0851821881345,426.37031478881835L729.15625,426.37031478881835L699.15625,426.37031478881835" id="my-svg-L_DREAM_MODEL_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 889.5565795898438 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_DREAM_MODEL_0" data-points="W3sieCI6MTQ5OS4wMzkwNjI1LCJ5IjozMjIuMDR9LHsieCI6MTA0MS4wMzkwNjI1LCJ5IjozMjIuMDR9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjozMjIuMDR9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjozODQuNjIwMzEyNX0seyJ4Ijo3NDkuMTU2MjUsInkiOjM4NC42MjAzMTI1fSx7IngiOjc0OS4xNTYyNSwieSI6NDI2LjM3MDMxNDc4ODgxODM1fSx7IngiOjcyOS4xNTYyNSwieSI6NDI2LjM3MDMxNDc4ODgxODM1fSx7IngiOjY5NS4xNTYyNSwieSI6NDI2LjM3MDMxNDc4ODgxODM1fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M695.15625,443.17031478881836L729.15625,443.17031478881836L762.0851821881345,443.17031478881836Q769.15625,443.17031478881836 769.15625,436.0992469769529L769.15625,433.8710678118655Q769.15625,426.8 776.2273178118655,426.8L1013.9679946881345,426.8Q1021.0390625,426.8 1021.0390625,419.72893218813454L1021.0390625,353.1710678118655Q1021.0390625,346.1 1028.1101303118655,346.1L1041.0390625,346.1L1464.4490625,346.1Q1469.0390625,346.1 1469.0390625,341.51L1469.0390625,341.51Q1469.0390625,336.92 1473.6290625,336.92L1495.0390625,336.92" id="my-svg-L_MODEL_DREAM_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 888.01806640625 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_MODEL_DREAM_0" data-points="W3sieCI6Njk1LjE1NjI1LCJ5Ijo0NDMuMTcwMzE0Nzg4ODE4MzZ9LHsieCI6NzI5LjE1NjI1LCJ5Ijo0NDMuMTcwMzE0Nzg4ODE4MzZ9LHsieCI6NzY5LjE1NjI1LCJ5Ijo0NDMuMTcwMzE0Nzg4ODE4MzZ9LHsieCI6NzY5LjE1NjI1LCJ5Ijo0MjYuOH0seyJ4IjoxMDIxLjAzOTA2MjUsInkiOjQyNi44fSx7IngiOjEwMjEuMDM5MDYyNSwieSI6MzQ2LjF9LHsieCI6MTA0MS4wMzkwNjI1LCJ5IjozNDYuMX0seyJ4IjoxNDY5LjAzOTA2MjUsInkiOjM0Ni4xfSx7IngiOjE0NjkuMDM5MDYyNSwieSI6MzM2LjkyfSx7IngiOjE0OTkuMDM5MDYyNSwieSI6MzM2LjkyfV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1499.0390625,307.16L1470.5690625,307.16Q1469.0390625,307.16 1469.0390625,305.63L1469.0390625,305.63Q1469.0390625,304.1 1467.5090625,304.1L1041.0390625,304.1L1008.1101303118655,304.1Q1001.0390625,304.1 1001.0390625,297.02893218813455L1001.0390625,285.44138107480495Q1001.0390625,278.3703132629395 993.9679946881345,278.3703132629395L756.2273178118655,278.3703132629395Q749.15625,278.3703132629395 749.15625,271.299245451074L749.15625,246.84138260068386Q749.15625,239.77031478881838 742.0851821881345,239.77031478881838L729.15625,239.77031478881838L408.73,239.77031478881838Q406,239.77031478881838 406,237.04031478881836L406,237.04031478881836Q406,234.31031478881835 403.27,234.31031478881835L368,234.31031478881835" id="my-svg-L_DREAM_IO_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 1186.022216796875 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_DREAM_IO_0" data-points="W3sieCI6MTQ5OS4wMzkwNjI1LCJ5IjozMDcuMTZ9LHsieCI6MTQ2OS4wMzkwNjI1LCJ5IjozMDcuMTZ9LHsieCI6MTQ2OS4wMzkwNjI1LCJ5IjozMDQuMX0seyJ4IjoxMDQxLjAzOTA2MjUsInkiOjMwNC4xfSx7IngiOjEwMDEuMDM5MDYyNSwieSI6MzA0LjF9LHsieCI6MTAwMS4wMzkwNjI1LCJ5IjoyNzguMzcwMzEzMjYyOTM5NX0seyJ4Ijo3NDkuMTU2MjUsInkiOjI3OC4zNzAzMTMyNjI5Mzk1fSx7IngiOjc0OS4xNTYyNSwieSI6MjM5Ljc3MDMxNDc4ODgxODM4fSx7IngiOjcyOS4xNTYyNSwieSI6MjM5Ljc3MDMxNDc4ODgxODM4fSx7IngiOjQwNiwieSI6MjM5Ljc3MDMxNDc4ODgxODM4fSx7IngiOjQwNiwieSI6MjM0LjMxMDMxNDc4ODgxODM1fSx7IngiOjM2NCwieSI6MjM0LjMxMDMxNDc4ODgxODM1fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/></g><g class="edgeLabels"><g class="edgeLabel" transform="translate(477.578125, 300.2703147888184)"><g class="label" data-id="L_IO_DISK_0" transform="translate(0, -10.5)"><g><rect class="background" style="" x="-41.578125" y="0" width="83.15625" height="21"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">read</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> /</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> write</tspan></tspan></text></g></g></g><g class="edgeLabel" transform="translate(885.09765625, 133.52031402587892)"><g class="label" data-id="L_IO_RULES_0" transform="translate(0, -19.299999237060547)"><g><rect class="background" style="" x="-68.2734375" y="0" width="136.546875" height="38.599998474121094"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">proposed</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> content</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> /</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">admission</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> result</tspan></tspan></text></g></g></g><g class="edgeLabel" transform="translate(885.09765625, 205.32031326293946)"><g class="label" data-id="L_IO_DB_0" transform="translate(0, -19.299999237060547)"><g><rect class="background" style="" x="-78.0390625" y="0" width="156.078125" height="38.599998474121094"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">call</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> with</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> caller-owned</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">SQLite</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> connection</tspan></tspan></text></g></g></g><g class="edgeLabel" transform="translate(1001.0390625, 322.04)"><g class="label" data-id="L_DREAM_MODEL_0" transform="translate(0, -10.58984375)"><g><rect class="background" style="" x="-26.8984375" y="0" width="53.796875" height="21.1796875"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">prompt</tspan></tspan></text></g></g></g><g class="edgeLabel" transform="translate(885.09765625, 425.88984375)"><g class="label" data-id="L_MODEL_DREAM_0" transform="translate(0, -10.58984375)"><g><rect class="background" style="" x="-90.0546875" y="0" width="180.109375" height="21.1796875"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">model</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> response</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> for</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> audit</tspan></tspan></text></g></g></g><g class="edgeLabel" transform="translate(885.09765625, 277.76015625)"><g class="label" data-id="L_DREAM_IO_0" transform="translate(-0.10546875, -19.389842987060547)"><g><rect class="background" style="" x="-95.8359375" y="0" width="191.8828125" height="38.779685974121094"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">approved</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> proposals;</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> caller</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">applies</tspan></tspan></text></g></g></g></g><g class="nodes"><g class="node default" id="my-svg-flowchart-AG-0" data-look="neo" transform="translate(112, 229.27031478881835)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Agent tools / user edits</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-IO-1" data-look="neo" transform="translate(288, 229.27031478881835)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Caller · file I/O and transactions</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-MODEL-2" data-look="neo" transform="translate(619.15625, 434.7703147888184)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Caller runs the model</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-DISK-3" data-look="neo" transform="translate(619.15625, 300.7703147888184)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Markdown on disk · shared + per-bot folders</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-RULES-6" data-look="neo" transform="translate(1151.0390625, 135)"><rect class="basic label-container" style="" x="-76" y="-72" width="152" height="144"/><g class="label" style="" transform="translate(-60, -60)"><rect/><foreignObject width="120" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>files + check + evidence · validate proposed changes</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-DB-7" data-look="neo" transform="translate(1363.0390625, 177)"><rect class="basic label-container" style="" x="-76" y="-72" width="152" height="144"/><g class="label" style="" transform="translate(-60, -60)"><rect/><foreignObject width="120" height="120"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>SQLite · versions, fact authorship, forgotten facts, dream logs</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-OPEN-8" data-look="neo" transform="translate(1575.0390625, 156.6)"><rect class="basic label-container" style="" x="-76" y="-60" width="152" height="120"/><g class="label" style="" transform="translate(-60, -48)"><rect/><foreignObject width="120" height="96"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>opening + index · session context and note references</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-DREAM-9" data-look="neo" transform="translate(1575.0390625, 314.6)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>dream · prompt, audit, proposed file edits</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-CTX-21" data-look="neo" transform="translate(1801.0390625, 156.6)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Caller supplies context to the agent</p></span></div></foreignObject></g></g></g></g></g><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="my-svg-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><linearGradient id="my-svg-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="#88857d" stop-opacity="1"/><stop offset="100%" stop-color="hsl(50, 0%, 82.5490196078%)" stop-opacity="1"/></linearGradient></svg>\ No newline at end of filediff --git a/host/crates/memory/assets/diagram-theme.json b/host/crates/memory/assets/diagram-theme.jsonnew file mode 100644index 00000000..8c130aba--- /dev/null+++ b/host/crates/memory/assets/diagram-theme.json@@ -0,0 +1 @@+{"theme": "base", "themeVariables": {"primaryColor": "#f5f3ed", "primaryTextColor": "#252525", "primaryBorderColor": "#88857d", "lineColor": "#77746c", "secondaryColor": "#efeee9", "tertiaryColor": "#ffffff", "fontFamily": "Arial, sans-serif", "fontSize": "16px", "noteBkgColor": "#f5f3ed", "noteBorderColor": "#88857d", "noteTextColor": "#252525"}, "flowchart": {"curve": "basis", "htmlLabels": false}, "sequence": {"mirrorActors": false, "useMaxWidth": true}, "themeCSS": ".node rect, .cluster rect, .labelBox, .note { filter: none !important; }"}\ No newline at end of filediff --git a/host/crates/memory/assets/memory-flow.mmd b/host/crates/memory/assets/memory-flow.mmdnew file mode 100644index 00000000..530d8d51--- /dev/null+++ b/host/crates/memory/assets/memory-flow.mmd@@ -0,0 +1,26 @@+sequenceDiagram+ participant C as Caller / host+ participant F as Markdown files+ participant M as codync-mem+ participant D as Caller-owned SQLite+ participant A as Agent / model+ C->>M: Load opening for bot and optional shared layer+ M->>D: Read recorded MEMORY.md versions+ M-->>C: Render memory context and note references+ C->>A: Start session with memory context+ A->>C: Request a topic note when needed+ C->>F: Read topic note+ F-->>C: Note content+ C-->>A: Return requested note+ Note over C,M: For a proposed memory change+ C->>M: Check content, caps and write permissions+ M->>D: Consult fact authorship and forgotten facts+ alt Change admitted+ C->>F: Apply approved content+ C->>M: Record version and reconcile facts+ M->>D: Write within caller's transaction+ else Change refused+ M-->>C: Refusal reason+ end+ Note over C,A: Between turns, caller may run a dream model.+ Note over C,M: dream audits proposals, caller applies accepted edits.diff --git a/host/crates/memory/assets/memory-flow.svg b/host/crates/memory/assets/memory-flow.svgnew file mode 100644index 00000000..96e6e677--- /dev/null+++ b/host/crates/memory/assets/memory-flow.svg@@ -0,0 +1 @@+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="max-width: 1259.5px; background-color: white;" viewBox="-50 -10 1259.5 980" role="graphics-document document" aria-roledescription="sequence"><g><line id="actor4" x1="1084.5" y1="73" x2="1084.5" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="A" data-et="life-line" data-id="A"/><g id="root-4" data-look="neo" data-et="participant" data-type="participant" data-id="A"><rect x="1009.5" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="A" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="1084.5" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="1084.5" dy="0">Agent / model</tspan></text></g></g><g><line id="actor3" x1="877" y1="73" x2="877" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="D" data-et="life-line" data-id="D"/><g id="root-3" data-look="neo" data-et="participant" data-type="participant" data-id="D"><rect x="798.5" y="0" fill="#eaeaea" stroke="#666" width="157" height="73" name="D" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="877" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="877" dy="0">Caller-owned SQLite</tspan></text></g></g><g><line id="actor2" x1="534" y1="73" x2="534" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="M" data-et="life-line" data-id="M"/><g id="root-2" data-look="neo" data-et="participant" data-type="participant" data-id="M"><rect x="459" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="M" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="534" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="534" dy="0">codync-mem</tspan></text></g></g><g><line id="actor1" x1="304.5" y1="73" x2="304.5" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="F" data-et="life-line" data-id="F"/><g id="root-1" data-look="neo" data-et="participant" data-type="participant" data-id="F"><rect x="229.5" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="F" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="304.5" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="304.5" dy="0">Markdown files</tspan></text></g></g><g><line id="actor0" x1="75" y1="73" x2="75" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="C" data-et="life-line" data-id="C"/><g id="root-0" data-look="neo" data-et="participant" data-type="participant" data-id="C"><rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="C" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="75" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="75" dy="0">Caller / host</tspan></text></g></g><style>#my-svg{font-family:Arial,sans-serif;font-size:16px;fill:#252525;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#ffffff;}#my-svg .error-text{fill:#000000;stroke:#000000;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#77746c;stroke:#77746c;}#my-svg .marker.cross{stroke:#77746c;}#my-svg svg{font-family:Arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .actor{stroke:#88857d;fill:#f5f3ed;stroke-width:1;}#my-svg rect.actor.outer-path[data-look="neo"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg rect.note[data-look="neo"]{stroke:#88857d;fill:#f5f3ed;filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg text.actor>tspan{fill:#252525;stroke:none;}#my-svg .actor-line{stroke:#88857d;}#my-svg .innerArc{stroke-width:1.5;stroke-dasharray:none;}#my-svg .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#252525;}#my-svg .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#252525;}#my-svg [id$="-arrowhead"] path{fill:#252525;stroke:#252525;}#my-svg .sequenceNumber{fill:#888b93;}#my-svg [id$="-sequencenumber"]{fill:#252525;}#my-svg [id$="-crosshead"] path{fill:#252525;stroke:#252525;}#my-svg .messageText{fill:#252525;stroke:none;}#my-svg .labelBox{stroke:#88857d;fill:#f5f3ed;filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .labelText,#my-svg .labelText>tspan{fill:#252525;stroke:none;}#my-svg .loopText,#my-svg .loopText>tspan{fill:#252525;stroke:none;}#my-svg .sectionTitle,#my-svg .sectionTitle>tspan{fill:#252525;stroke:none;}#my-svg .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#88857d;fill:#88857d;}#my-svg .note{stroke:#88857d;fill:#f5f3ed;}#my-svg .noteText,#my-svg .noteText>tspan{fill:#252525;stroke:none;}#my-svg .activation0{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .activation1{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .activation2{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .actorPopupMenu{position:absolute;}#my-svg .actorPopupMenuPanel{position:absolute;fill:#f5f3ed;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#my-svg .actor-man circle,#my-svg line{fill:#f5f3ed;stroke-width:2px;}#my-svg g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:#88857d;}#my-svg .node .neo-node{stroke:#88857d;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].swimlane.cluster rect{filter:none;}#my-svg [data-look="neo"].node path{stroke:url(#my-svg-gradient);stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#88857d;filter:none;}#my-svg [data-look="neo"].node circle{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .node rect,#my-svg .cluster rect,#my-svg .labelBox,#my-svg .note{filter:none!important;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g/><defs><symbol id="my-svg-computer" width="24" height="24"><path transform="scale(.5)" d="M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"/></symbol></defs><defs><symbol id="my-svg-database" fill-rule="evenodd" clip-rule="evenodd"><path transform="scale(.5)" d="M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"/></symbol></defs><defs><symbol id="my-svg-clock" width="24" height="24"><path transform="scale(.5)" d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"/></symbol></defs><defs><marker id="my-svg-arrowhead" refX="7.9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M -1 0 L 10 5 L 0 10 z"/></marker></defs><defs><marker id="my-svg-crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="4" refY="4.5"><path fill="none" stroke="#000000" stroke-width="1pt" d="M 1,2 L 6,7 M 6,2 L 1,7" style="stroke-dasharray: 0, 0;"/></marker></defs><defs><marker id="my-svg-filled-head" refX="15.5" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"/></marker></defs><defs><marker id="my-svg-sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"/></marker></defs><defs><marker id="my-svg-solidTopArrowHead" refX="7.9" refY="7.25" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 10 8 L 0 8 z"/></marker></defs><defs><marker id="my-svg-solidBottomArrowHead" refX="7.9" refY="0.75" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 10 0 L 0 8 z"/></marker></defs><defs><marker id="my-svg-stickTopArrowHead" refX="7.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 7 7" stroke="black" stroke-width="1.5" fill="none"/></marker></defs><defs><marker id="my-svg-stickBottomArrowHead" refX="7.5" refY="0" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 7 L 7 0" stroke="black" stroke-width="1.5" fill="none"/></marker></defs><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"/></filter></defs><g data-et="note" data-id="i8"><rect x="50" y="435" fill="#EDF2AE" stroke="#666" width="509" height="37" class="note" data-look="neo"/><text x="305" y="440" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"><tspan x="305">For a proposed memory change</tspan></text></g><g data-et="control-structure" data-id="i17"><line x1="64" y1="570" x2="888" y2="570" class="loopLine"/><line x1="888" y1="570" x2="888" y2="836" class="loopLine"/><line x1="64" y1="836" x2="888" y2="836" class="loopLine"/><line x1="64" y1="570" x2="64" y2="836" class="loopLine"/><line x1="64" y1="752" x2="888" y2="752" class="loopLine" style="stroke-dasharray: 3, 3;"/><polygon points="64,570 114,570 114,598 105.6,605 64,605" class="labelBox"/><text x="89" y="590" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="labelText" style="font-size: 16px; font-weight: 400;">alt</text><text x="501" y="588" text-anchor="middle" class="loopText" style="font-size: 16px; font-weight: 400;"><tspan x="501">[Change admitted]</tspan></text><text x="476" y="770" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[Change refused]</text></g><g data-et="note" data-id="i18"><rect x="50" y="846" fill="#EDF2AE" stroke="#666" width="1059.5" height="37" class="note" data-look="neo"/><text x="580" y="851" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"><tspan x="580">Between turns, caller may run a dream model.</tspan></text></g><g data-et="note" data-id="i19"><rect x="50" y="893" fill="#EDF2AE" stroke="#666" width="509" height="37" class="note" data-look="neo"/><text x="305" y="898" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"><tspan x="305">dream audits proposals, caller applies accepted edits.</tspan></text></g><text x="302" y="88" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Load opening for bot and optional shared layer</text><line x1="76" y1="117" x2="527" y2="117" class="messageLine0" data-et="message" data-id="i0" data-from="C" data-to="M" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="703" y="132" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Read recorded MEMORY.md versions</text><line x1="535" y1="161" x2="870" y2="161" class="messageLine0" data-et="message" data-id="i1" data-from="M" data-to="D" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="308" y="176" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Render memory context and note references</text><line x1="533" y1="205" x2="82" y2="205" class="messageLine1" data-et="message" data-id="i2" data-from="M" data-to="C" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/><text x="577" y="220" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Start session with memory context</text><line x1="76" y1="249" x2="1077.5" y2="249" class="messageLine0" data-et="message" data-id="i3" data-from="C" data-to="A" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="583" y="264" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Request a topic note when needed</text><line x1="1083.5" y1="293" x2="82" y2="293" class="messageLine0" data-et="message" data-id="i4" data-from="A" data-to="C" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="187" y="308" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Read topic note</text><line x1="76" y1="337" x2="297.5" y2="337" class="messageLine0" data-et="message" data-id="i5" data-from="C" data-to="F" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="193" y="352" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Note content</text><line x1="303.5" y1="381" x2="82" y2="381" class="messageLine1" data-et="message" data-id="i6" data-from="F" data-to="C" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/><text x="577" y="396" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Return requested note</text><line x1="76" y1="425" x2="1077.5" y2="425" class="messageLine1" data-et="message" data-id="i7" data-from="C" data-to="A" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/><text x="302" y="487" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Check content, caps and write permissions</text><line x1="76" y1="516" x2="527" y2="516" class="messageLine0" data-et="message" data-id="i9" data-from="C" data-to="M" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="703" y="531" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Consult fact authorship and forgotten facts</text><line x1="535" y1="560" x2="870" y2="560" class="messageLine0" data-et="message" data-id="i10" data-from="M" data-to="D" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="187" y="620" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Apply approved content</text><line x1="76" y1="649" x2="297.5" y2="649" class="messageLine0" data-et="message" data-id="i12" data-from="C" data-to="F" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="302" y="664" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Record version and reconcile facts</text><line x1="76" y1="693" x2="527" y2="693" class="messageLine0" data-et="message" data-id="i13" data-from="C" data-to="M" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="703" y="708" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Write within caller's transaction</text><line x1="535" y1="737" x2="870" y2="737" class="messageLine0" data-et="message" data-id="i14" data-from="M" data-to="D" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="308" y="797" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Refusal reason</text><line x1="533" y1="826" x2="82" y2="826" class="messageLine1" data-et="message" data-id="i16" data-from="M" data-to="C" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/></svg>\ No newline at end of filediff --git a/host/crates/network/README.md b/host/crates/network/README.mdindex e86ab3fc..5ab97ce2 100644--- a/host/crates/network/README.md+++ b/host/crates/network/README.md@@ -7,7 +7,7 @@**A private network for your agents.**<br>Connect agents across computers. Direct, encrypted, peer to peer.-[Install](#install) · [API reference](https://docs.rs/codync-network) · [Codync](https://github.com/leepokai/Codync) · [Contributing](#status)+[Install](#install) · [Architecture](#architecture) · [API reference](https://docs.rs/codync-network) · [Codync](https://github.com/leepokai/Codync) · [Contributing](#status)[](https://crates.io/crates/codync-network) [](https://github.com/leepokai/codync-network/actions/workflows/ci.yml) [](https://docs.rs/codync-network) [](LICENSE)@@ -52,6 +52,29 @@ standalone crate, and it reaches Claude Code and Codex sessions too.- **A computer that moves says so.** When its addresses change (a laptop on another Wi-Fi), it signs where it isnow into the roster and tells the others, so they find it without a restart.+## Architecture++Each computer runs a `Node` with its own key and a copy of the signed roster. Agents use+`agent@computer` addresses; `Reach` determines how the receiving node hands a letter to its target.++++The solid connection is the preferred direct path. The dashed path is the relay fallback when the+configured connector allows it; `private` disables relays. The relay cannot read letters. The+outbox belongs to the sender and waits for an unreachable peer; it is not a central message server.++### How a letter arrives++++The receiver enforces chain, burst and repetition budgets. Delivery IDs prevent a transport retry+from delivering the same letter twice. For Claude Code and Codex, notices wait for a waking+message. `Reach::App` passes both kinds of message to the caller's inbox, where the application+handles wake behavior. Accepted delivery is distinct from an agent's eventual reply.++Diagram sources: [architecture](assets/architecture.mmd) · [message flow](assets/message-flow.mmd).+Render the Mermaid sources with the shared [theme](assets/diagram-theme.json) and a white background.+## LayersNew ways of working together don't change the layers below them:diff --git a/host/crates/network/assets/architecture.mmd b/host/crates/network/assets/architecture.mmdnew file mode 100644index 00000000..97ec69db--- /dev/null+++ b/host/crates/network/assets/architecture.mmd@@ -0,0 +1,16 @@+flowchart LR+ subgraph A["Computer A · sender"]+ AA["Agent or application"] --> NA["Node · identity key + signed roster"]+ NA --> OA["Outbox · retry while peer is away"]+ OA --> NA+ end+ subgraph B["Computer B · receiver"]+ NB["Node · identity key + signed roster"] --> G["Membership + delivery ID + budgets"]+ G --> R["Reach · deliver to the selected agent"]+ R --> APP["App inbox"]+ R --> CL["Claude Code session"]+ R --> CX["Codex thread"]+ end+ NA <-->|"Encrypted QUIC · direct first"| NB+ NA -.-> RELAY["Optional relay · ciphertext only"]+ RELAY -.-> NBdiff --git a/host/crates/network/assets/architecture.svg b/host/crates/network/assets/architecture.svgnew file mode 100644index 00000000..0a88f73f--- /dev/null+++ b/host/crates/network/assets/architecture.svg@@ -0,0 +1 @@+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 1673.86px; background-color: white;" viewBox="4 4 1673.859375 359" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#my-svg{font-family:Arial,sans-serif;font-size:16px;fill:#252525;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#ffffff;}#my-svg .error-text{fill:#000000;stroke:#000000;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#77746c;stroke:#77746c;}#my-svg .marker.cross{stroke:#77746c;}#my-svg svg{font-family:Arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .label{font-family:Arial,sans-serif;color:#252525;}#my-svg .cluster-label text{fill:#000000;}#my-svg .cluster-label span{color:#000000;}#my-svg .cluster-label span p{background-color:transparent;}#my-svg .label text,#my-svg span{fill:#252525;color:#252525;}#my-svg .node rect,#my-svg .node circle,#my-svg .node ellipse,#my-svg .node polygon,#my-svg .node path{fill:#f5f3ed;stroke:#88857d;stroke-width:1px;}#my-svg .rough-node .label text,#my-svg .node .label text,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-anchor:middle;}#my-svg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#my-svg .rough-node .label,#my-svg .node .label,#my-svg .image-shape .label,#my-svg .icon-shape .label{text-align:center;}#my-svg .node.clickable{cursor:pointer;}#my-svg .root .anchor path{fill:#77746c!important;stroke-width:0;stroke:#77746c;}#my-svg .arrowheadPath{fill:#0b0b0b;}#my-svg .edgePaths .path{stroke:#77746c;stroke-width:1px;}#my-svg .flowchart-link{stroke:#77746c;fill:none;}#my-svg .edgeLabel{background-color:#efeee9;text-align:center;}#my-svg .edgeLabel p{background-color:#efeee9;}#my-svg .edgeLabel rect{opacity:0.5;background-color:#efeee9;fill:#efeee9;}#my-svg .labelBkg{background-color:rgba(239, 238, 233, 0.5);}#my-svg .cluster rect{fill:#ffffff;stroke:hsl(0, 0%, 90%);stroke-width:1px;}#my-svg .cluster text{fill:#000000;}#my-svg .cluster span{color:#000000;}#my-svg .node .collapsed-indicator{fill:hsl(0, 0%, 90%);stroke:none;opacity:0.6;}#my-svg .node .collapsed-separator{stroke:hsl(0, 0%, 90%);stroke-width:0.75px;}#my-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:Arial,sans-serif;font-size:12px;background:#ffffff;border:1px solid hsl(0, 0%, 90%);border-radius:2px;pointer-events:none;z-index:100;}#my-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#252525;}#my-svg rect.text{fill:none;stroke-width:0;}#my-svg .icon-shape,#my-svg .image-shape{background-color:#efeee9;text-align:center;}#my-svg .icon-shape p,#my-svg .image-shape p{background-color:#efeee9;padding:2px;}#my-svg .icon-shape .label rect,#my-svg .image-shape .label rect{opacity:0.5;background-color:#efeee9;fill:#efeee9;}#my-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#my-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#my-svg .node .neo-node{stroke:#88857d;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].swimlane.cluster rect{filter:none;}#my-svg [data-look="neo"].node path{stroke:url(#my-svg-gradient);stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#88857d;filter:none;}#my-svg [data-look="neo"].node circle{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .node rect,#my-svg .cluster rect,#my-svg .labelBox,#my-svg .note{filter:none!important;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker id="my-svg_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="my-svg_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="my-svg_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"><g class="cluster" id="my-svg-B" data-look="neo"><rect style="" x="905.859375" y="12" width="764" height="343"/><g class="cluster-label" transform="translate(1209.49609375, 12)"><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">Computer</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> B</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> receiver</tspan></tspan></text></g></g></g><g class="cluster" id="my-svg-A" data-look="neo"><rect style="" x="12" y="61.5" width="600" height="200.96000000000004"/><g class="cluster-label" transform="translate(238.51171875, 61.5)"><g><rect class="background" style="stroke: none"/><text y="-10.1" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">Computer</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> A</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> sender</tspan></tspan></text></g></g></g></g><g class="edges edgePaths"><path d="M188,190.46000000000004L208,190.46000000000004" id="my-svg-L_AA_NA_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 16 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_AA_NA_0" data-points="W3sieCI6MTg4LCJ5IjoxOTAuNDYwMDAwMDAwMDAwMDR9LHsieCI6MjEyLCJ5IjoxOTAuNDYwMDAwMDAwMDAwMDR9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M364,197.90000000000003L432,197.90000000000003" id="my-svg-L_NA_OA_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 64 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_NA_OA_0" data-points="W3sieCI6MzY0LCJ5IjoxOTcuOTAwMDAwMDAwMDAwMDN9LHsieCI6NDM2LCJ5IjoxOTcuOTAwMDAwMDAwMDAwMDN9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M436,173.10000000000002L410.96000000000004,173.10000000000002Q406,173.10000000000002 406,178.06000000000003L406,178.06000000000003Q406,183.02000000000004 401.03999999999996,183.02000000000004L368,183.02000000000004" id="my-svg-L_OA_NA_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 70.18251037597656 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_OA_NA_0" data-points="W3sieCI6NDM2LCJ5IjoxNzMuMTAwMDAwMDAwMDAwMDJ9LHsieCI6NDA2LCJ5IjoxNzMuMTAwMDAwMDAwMDAwMDJ9LHsieCI6NDA2LCJ5IjoxODMuMDIwMDAwMDAwMDAwMDR9LHsieCI6MzY0LCJ5IjoxODMuMDIwMDAwMDAwMDAwMDR9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1081.859375,185L1101.859375,185" id="my-svg-L_NB_G_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 16 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_NB_G_0" data-points="W3sieCI6MTA4MS44NTkzNzUsInkiOjE4NX0seyJ4IjoxMTA1Ljg1OTM3NSwieSI6MTg1fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1257.859375,185L1277.859375,185" id="my-svg-L_G_R_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 16 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_G_R_0" data-points="W3sieCI6MTI1Ny44NTkzNzUsInkiOjE4NX0seyJ4IjoxMjgxLjg1OTM3NSwieSI6MTg1fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1433.859375,185L1489.859375,185" id="my-svg-L_R_APP_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 52 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_R_APP_0" data-points="W3sieCI6MTQzMy44NTkzNzUsInkiOjE4NX0seyJ4IjoxNDkzLjg1OTM3NSwieSI6MTg1fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1433.859375,203.6L1456.7883071881345,203.6Q1463.859375,203.6 1463.859375,210.67106781186547L1463.859375,287.9289321881345Q1463.859375,295 1470.9304428118655,295L1489.859375,295" id="my-svg-L_R_CL_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 138.07171630859375 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_R_CL_0" data-points="W3sieCI6MTQzMy44NTkzNzUsInkiOjIwMy42fSx7IngiOjE0NjMuODU5Mzc1LCJ5IjoyMDMuNn0seyJ4IjoxNDYzLjg1OTM3NSwieSI6Mjk1fSx7IngiOjE0OTMuODU5Mzc1LCJ5IjoyOTV9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M1433.859375,166.4L1456.7883071881345,166.4Q1463.859375,166.4 1463.859375,159.32893218813453L1463.859375,94.07106781186548Q1463.859375,87 1470.9304428118655,87L1489.859375,87" id="my-svg-L_R_CX_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 126.07171630859375 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_R_CX_0" data-points="W3sieCI6MTQzMy44NTkzNzUsInkiOjE2Ni40fSx7IngiOjE0NjMuODU5Mzc1LCJ5IjoxNjYuNH0seyJ4IjoxNDYzLjg1OTM3NSwieSI6ODd9LHsieCI6MTQ5My44NTkzNzUsInkiOjg3fV0=" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M368,168.14000000000001L386.9289321881345,168.14000000000001Q394,168.14000000000001 394,161.06893218813454L394,131.57106781186548Q394,124.50000000000001 401.0710678118655,124.50000000000001L622,124.50000000000001L635.6499996185303,124.50000000000001Q642,124.50000000000001 642,130.85000038146973L642,130.85000038146973Q642,137.20000076293945 648.3500003814697,137.20000076293945L868.7883071881345,137.20000076293945Q875.859375,137.20000076293945 875.859375,144.27106857480493L875.859375,190.32893218813453Q875.859375,197.4 882.9304428118655,197.4L895.859375,197.4L925.859375,197.40000000000003" id="my-svg-L_NA_NB_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 4 650.9578247070312 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_NA_NB_0" data-points="W3sieCI6MzY0LCJ5IjoxNjguMTQwMDAwMDAwMDAwMDF9LHsieCI6Mzk0LCJ5IjoxNjguMTQwMDAwMDAwMDAwMDF9LHsieCI6Mzk0LCJ5IjoxMjQuNTAwMDAwMDAwMDAwMDF9LHsieCI6NjIyLCJ5IjoxMjQuNTAwMDAwMDAwMDAwMDF9LHsieCI6NjQyLCJ5IjoxMjQuNTAwMDAwMDAwMDAwMDF9LHsieCI6NjQyLCJ5IjoxMzcuMjAwMDAwNzYyOTM5NDV9LHsieCI6ODc1Ljg1OTM3NSwieSI6MTM3LjIwMDAwMDc2MjkzOTQ1fSx7IngiOjg3NS44NTkzNzUsInkiOjE5Ny40fSx7IngiOjg5NS44NTkzNzUsInkiOjE5Ny40fSx7IngiOjkyOS44NTkzNzUsInkiOjE5Ny40MDAwMDAwMDAwMDAwM31d" data-look="neo" marker-start="url(#my-svg_flowchart-v2-pointStart-margin)" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M364,212.78000000000003L386.9289321881345,212.78000000000003Q394,212.78000000000003 394,219.8510678118655L394,238.42893218813452Q394,245.5 401.0710678118655,245.5L622,245.5L635.6499996185303,245.5Q642,245.5 642,239.14999961853027L642,239.14999961853027Q642,232.79999923706055 648.3500003814697,232.79999923706055L668.9296875,232.79999923706055" id="my-svg-L_NA_RELAY_0" class="edge-thickness-normal edge-pattern-dotted edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4; stroke-dashoffset: 0;;" data-edge="true" data-et="edge" data-id="L_NA_RELAY_0" data-points="W3sieCI6MzY0LCJ5IjoyMTIuNzgwMDAwMDAwMDAwMDN9LHsieCI6Mzk0LCJ5IjoyMTIuNzgwMDAwMDAwMDAwMDN9LHsieCI6Mzk0LCJ5IjoyNDUuNX0seyJ4Ijo2MjIsInkiOjI0NS41fSx7IngiOjY0MiwieSI6MjQ1LjV9LHsieCI6NjQyLCJ5IjoyMzIuNzk5OTk5MjM3MDYwNTV9LHsieCI6NjcyLjkyOTY4NzUsInkiOjIzMi43OTk5OTkyMzcwNjA1NX1d" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/><path d="M824.93,232.8 L848.788,232.8 Q855.859,232.8 855.859,225.729 L855.859,179.671 Q855.859,172.6 862.93,172.6 L869.859,172.6 A6,6 0 0 1 881.859,172.6 L895.859,172.6 L925.859,172.6" id="my-svg-L_RELAY_NB_0" class="edge-thickness-normal edge-pattern-dotted edge-thickness-normal edge-pattern-solid flowchart-link" style="stroke-dasharray: 0 0 160.65310668945312 2; stroke-dashoffset: 0;" data-edge="true" data-et="edge" data-id="L_RELAY_NB_0" data-points="W3sieCI6ODI0LjkyOTY4NzUsInkiOjIzMi43OTk5OTkyMzcwNjA1NX0seyJ4Ijo4NTUuODU5Mzc1LCJ5IjoyMzIuNzk5OTk5MjM3MDYwNTV9LHsieCI6ODU1Ljg1OTM3NSwieSI6MTcyLjYwMDAwMDAwMDAwMDAyfSx7IngiOjg5NS44NTkzNzUsInkiOjE3Mi42MDAwMDAwMDAwMDAwMn0seyJ4Ijo5MjkuODU5Mzc1LCJ5IjoxNzIuNjAwMDAwMDAwMDAwMDJ9XQ==" data-look="neo" marker-end="url(#my-svg_flowchart-v2-pointEnd-margin)"/></g><g class="edgeLabels"><g class="edgeLabel" transform="translate(748.9296875, 136.5)"><g class="label" data-id="L_NA_NB_0" transform="translate(0, -19.299999237060547)"><g><rect class="background" style="" x="-86.9296875" y="0" width="173.859375" height="38.599998474121094"/><text y="-10.1" text-anchor="middle" style=""><tspan class="text-outer-tspan row" x="0" y="-0.1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">Encrypted</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> QUIC</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> ·</tspan><tspan font-style="normal" class="text-inner-tspan" font-weight="normal"> direct</tspan></tspan><tspan class="text-outer-tspan row" x="0" y="1em" dy="1.1em" text-anchor="middle"><tspan font-style="normal" class="text-inner-tspan" font-weight="normal">first</tspan></tspan></text></g></g></g></g><g class="nodes"><g class="node default" id="my-svg-flowchart-AA-0" data-look="neo" transform="translate(112, 190.46000000000004)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Agent or application</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-NA-1" data-look="neo" transform="translate(288, 190.46000000000004)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Node · identity key + signed roster</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-OA-3" data-look="neo" transform="translate(512, 185.5)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Outbox · retry while peer is away</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-NB-6" data-look="neo" transform="translate(1005.859375, 185)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Node · identity key + signed roster</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-G-7" data-look="neo" transform="translate(1181.859375, 185)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Membership + delivery ID + budgets</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-R-9" data-look="neo" transform="translate(1357.859375, 185)"><rect class="basic label-container" style="" x="-76" y="-48" width="152" height="96"/><g class="label" style="" transform="translate(-60, -36)"><rect/><foreignObject width="120" height="72"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Reach · deliver to the selected agent</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-APP-11" data-look="neo" transform="translate(1569.859375, 185)"><rect class="basic label-container" style="" x="-76" y="-24" width="152" height="48"/><g class="label" style="" transform="translate(-60, -12)"><rect/><foreignObject width="120" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: nowrap; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>App inbox</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-CL-13" data-look="neo" transform="translate(1569.859375, 295)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Claude Code session</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-CX-15" data-look="neo" transform="translate(1569.859375, 87)"><rect class="basic label-container" style="" x="-76" y="-24" width="152" height="48"/><g class="label" style="" transform="translate(-60, -12)"><rect/><foreignObject width="120" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: nowrap; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Codex thread</p></span></div></foreignObject></g></g><g class="node default" id="my-svg-flowchart-RELAY-19" data-look="neo" transform="translate(748.9296875, 232.79999923706055)"><rect class="basic label-container" style="" x="-76" y="-36" width="152" height="72"/><g class="label" style="" transform="translate(-60, -24)"><rect/><foreignObject width="120" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 120px; text-align: center; width: 120px;"><span class="nodeLabel"><p>Optional relay · ciphertext only</p></span></div></foreignObject></g></g></g></g></g><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="my-svg-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><linearGradient id="my-svg-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="#88857d" stop-opacity="1"/><stop offset="100%" stop-color="hsl(50, 0%, 82.5490196078%)" stop-opacity="1"/></linearGradient></svg>\ No newline at end of filediff --git a/host/crates/network/assets/diagram-theme.json b/host/crates/network/assets/diagram-theme.jsonnew file mode 100644index 00000000..8c130aba--- /dev/null+++ b/host/crates/network/assets/diagram-theme.json@@ -0,0 +1 @@+{"theme": "base", "themeVariables": {"primaryColor": "#f5f3ed", "primaryTextColor": "#252525", "primaryBorderColor": "#88857d", "lineColor": "#77746c", "secondaryColor": "#efeee9", "tertiaryColor": "#ffffff", "fontFamily": "Arial, sans-serif", "fontSize": "16px", "noteBkgColor": "#f5f3ed", "noteBorderColor": "#88857d", "noteTextColor": "#252525"}, "flowchart": {"curve": "basis", "htmlLabels": false}, "sequence": {"mirrorActors": false, "useMaxWidth": true}, "themeCSS": ".node rect, .cluster rect, .labelBox, .note { filter: none !important; }"}\ No newline at end of filediff --git a/host/crates/network/assets/message-flow.mmd b/host/crates/network/assets/message-flow.mmdnew file mode 100644index 00000000..ad1ce1a8--- /dev/null+++ b/host/crates/network/assets/message-flow.mmd@@ -0,0 +1,29 @@+sequenceDiagram+ participant A as Sending agent+ participant S as Sender Node+ participant R as Receiver Node+ participant T as Target agent+ A->>S: Letter to agent@computer+ S->>S: Resolve address and check hop limit+ S->>R: Try encrypted delivery+ alt Peer unreachable+ S->>S: Queue in outbox and retry (up to one day)+ else Peer reachable+ R->>R: Check membership, delivery ID and budgets+ alt Already accepted delivery ID+ R-->>S: Acknowledge without delivering again+ else Refused by policy+ R-->>S: Return refusal+ else New accepted letter+ alt App-managed agent+ R->>T: Put message in app inbox (caller handles wake)+ else Claude Code or Codex notice+ R->>R: Keep until the next waking message+ else Claude Code or Codex waking message+ R->>T: Reach: deliver message and pending notices+ end+ R-->>S: Acknowledge acceptance+ end+ end+ Note over S,R: An acknowledgement is not the agent's reply.+ Note over A,T: Replies are new letters with reply_to set.diff --git a/host/crates/network/assets/message-flow.svg b/host/crates/network/assets/message-flow.svgnew file mode 100644index 00000000..e48155d3--- /dev/null+++ b/host/crates/network/assets/message-flow.svg@@ -0,0 +1 @@+<svg id="my-svg" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="max-width: 1182px; background-color: white;" viewBox="-50 -10 1182 1211" role="graphics-document document" aria-roledescription="sequence"><g><line id="actor3" x1="1007" y1="73" x2="1007" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="T" data-et="life-line" data-id="T"/><g id="root-3" data-look="neo" data-et="participant" data-type="participant" data-id="T"><rect x="932" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="T" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="1007" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="1007" dy="0">Target agent</tspan></text></g></g><g><line id="actor2" x1="633" y1="73" x2="633" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="R" data-et="life-line" data-id="R"/><g id="root-2" data-look="neo" data-et="participant" data-type="participant" data-id="R"><rect x="558" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="R" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="633" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="633" dy="0">Receiver Node</tspan></text></g></g><g><line id="actor1" x1="314" y1="73" x2="314" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="S" data-et="life-line" data-id="S"/><g id="root-1" data-look="neo" data-et="participant" data-type="participant" data-id="S"><rect x="239" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="S" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="314" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="314" dy="0">Sender Node</tspan></text></g></g><g><line id="actor0" x1="75" y1="73" x2="75" y2="2000" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="A" data-et="life-line" data-id="A"/><g id="root-0" data-look="neo" data-et="participant" data-type="participant" data-id="A"><rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="73" name="A" rx="6" ry="6" class="actor actor-top" data-look="neo" filter="url(#my-svg-drop-shadow)"/><text x="75" y="36.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"><tspan x="75" dy="0">Sending agent</tspan></text></g></g><style>#my-svg{font-family:Arial,sans-serif;font-size:16px;fill:#252525;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#my-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#my-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#my-svg .error-icon{fill:#ffffff;}#my-svg .error-text{fill:#000000;stroke:#000000;}#my-svg .edge-thickness-normal{stroke-width:1px;}#my-svg .edge-thickness-thick{stroke-width:3.5px;}#my-svg .edge-pattern-solid{stroke-dasharray:0;}#my-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#my-svg .edge-pattern-dashed{stroke-dasharray:3;}#my-svg .edge-pattern-dotted{stroke-dasharray:2;}#my-svg .marker{fill:#77746c;stroke:#77746c;}#my-svg .marker.cross{stroke:#77746c;}#my-svg svg{font-family:Arial,sans-serif;font-size:16px;}#my-svg p{margin:0;}#my-svg .actor{stroke:#88857d;fill:#f5f3ed;stroke-width:1;}#my-svg rect.actor.outer-path[data-look="neo"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg rect.note[data-look="neo"]{stroke:#88857d;fill:#f5f3ed;filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg text.actor>tspan{fill:#252525;stroke:none;}#my-svg .actor-line{stroke:#88857d;}#my-svg .innerArc{stroke-width:1.5;stroke-dasharray:none;}#my-svg .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#252525;}#my-svg .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#252525;}#my-svg [id$="-arrowhead"] path{fill:#252525;stroke:#252525;}#my-svg .sequenceNumber{fill:#888b93;}#my-svg [id$="-sequencenumber"]{fill:#252525;}#my-svg [id$="-crosshead"] path{fill:#252525;stroke:#252525;}#my-svg .messageText{fill:#252525;stroke:none;}#my-svg .labelBox{stroke:#88857d;fill:#f5f3ed;filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .labelText,#my-svg .labelText>tspan{fill:#252525;stroke:none;}#my-svg .loopText,#my-svg .loopText>tspan{fill:#252525;stroke:none;}#my-svg .sectionTitle,#my-svg .sectionTitle>tspan{fill:#252525;stroke:none;}#my-svg .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#88857d;fill:#88857d;}#my-svg .note{stroke:#88857d;fill:#f5f3ed;}#my-svg .noteText,#my-svg .noteText>tspan{fill:#252525;stroke:none;}#my-svg .activation0{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .activation1{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .activation2{fill:#efeee9;stroke:hsl(50, 15.7894736842%, 82.5490196078%);}#my-svg .actorPopupMenu{position:absolute;}#my-svg .actorPopupMenuPanel{position:absolute;fill:#f5f3ed;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#my-svg .actor-man circle,#my-svg line{fill:#f5f3ed;stroke-width:2px;}#my-svg g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:#88857d;}#my-svg .node .neo-node{stroke:#88857d;}#my-svg [data-look="neo"].node rect,#my-svg [data-look="neo"].cluster rect,#my-svg [data-look="neo"].node polygon{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].swimlane.cluster rect{filter:none;}#my-svg [data-look="neo"].node path{stroke:url(#my-svg-gradient);stroke-width:1px;}#my-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node .neo-line path{stroke:#88857d;filter:none;}#my-svg [data-look="neo"].node circle{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].node circle .state-start{fill:#000000;}#my-svg [data-look="neo"].icon-shape .icon{fill:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#my-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#my-svg .node rect,#my-svg .cluster rect,#my-svg .labelBox,#my-svg .note{filter:none!important;}#my-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g/><defs><symbol id="my-svg-computer" width="24" height="24"><path transform="scale(.5)" d="M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"/></symbol></defs><defs><symbol id="my-svg-database" fill-rule="evenodd" clip-rule="evenodd"><path transform="scale(.5)" d="M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"/></symbol></defs><defs><symbol id="my-svg-clock" width="24" height="24"><path transform="scale(.5)" d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"/></symbol></defs><defs><marker id="my-svg-arrowhead" refX="7.9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M -1 0 L 10 5 L 0 10 z"/></marker></defs><defs><marker id="my-svg-crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="4" refY="4.5"><path fill="none" stroke="#000000" stroke-width="1pt" d="M 1,2 L 6,7 M 6,2 L 1,7" style="stroke-dasharray: 0, 0;"/></marker></defs><defs><marker id="my-svg-filled-head" refX="15.5" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"/></marker></defs><defs><marker id="my-svg-sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"/></marker></defs><defs><marker id="my-svg-solidTopArrowHead" refX="7.9" refY="7.25" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 10 8 L 0 8 z"/></marker></defs><defs><marker id="my-svg-solidBottomArrowHead" refX="7.9" refY="0.75" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 10 0 L 0 8 z"/></marker></defs><defs><marker id="my-svg-stickTopArrowHead" refX="7.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 0 L 7 7" stroke="black" stroke-width="1.5" fill="none"/></marker></defs><defs><marker id="my-svg-stickBottomArrowHead" refX="7.5" refY="0" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"><path d="M 0 7 L 7 0" stroke="black" stroke-width="1.5" fill="none"/></marker></defs><defs><filter id="my-svg-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"/></filter></defs><g data-et="control-structure" data-id="i18"><line x1="508" y1="706" x2="1018" y2="706" class="loopLine"/><line x1="1018" y1="706" x2="1018" y2="1003" class="loopLine"/><line x1="508" y1="1003" x2="1018" y2="1003" class="loopLine"/><line x1="508" y1="706" x2="508" y2="1003" class="loopLine"/><line x1="508" y1="800" x2="1018" y2="800" class="loopLine" style="stroke-dasharray: 3, 3;"/><line x1="508" y1="919" x2="1018" y2="919" class="loopLine" style="stroke-dasharray: 3, 3;"/><polygon points="508,706 558,706 558,734 549.6,741 508,741" class="labelBox"/><text x="533" y="726" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="labelText" style="font-size: 16px; font-weight: 400;">alt</text><text x="788" y="724" text-anchor="middle" class="loopText" style="font-size: 16px; font-weight: 400;"><tspan x="788">[App-managed agent]</tspan></text><text x="763" y="818" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[Claude Code or Codex notice]</text><text x="763" y="937" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[Claude Code or Codex waking message]</text></g><g data-et="control-structure" data-id="i20"><line x1="303" y1="483" x2="1028" y2="483" class="loopLine"/><line x1="1028" y1="483" x2="1028" y2="1057" class="loopLine"/><line x1="303" y1="1057" x2="1028" y2="1057" class="loopLine"/><line x1="303" y1="483" x2="303" y2="1057" class="loopLine"/><line x1="303" y1="577" x2="1028" y2="577" class="loopLine" style="stroke-dasharray: 3, 3;"/><line x1="303" y1="666" x2="1028" y2="666" class="loopLine" style="stroke-dasharray: 3, 3;"/><polygon points="303,483 353,483 353,511 344.6,518 303,518" class="labelBox"/><text x="328" y="503" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="labelText" style="font-size: 16px; font-weight: 400;">alt</text><text x="690.5" y="501" text-anchor="middle" class="loopText" style="font-size: 16px; font-weight: 400;"><tspan x="690.5">[Already accepted delivery ID]</tspan></text><text x="665.5" y="595" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[Refused by policy]</text><text x="665.5" y="684" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[New accepted letter]</text></g><g data-et="control-structure" data-id="i21"><line x1="170.5" y1="245" x2="1038" y2="245" class="loopLine"/><line x1="1038" y1="245" x2="1038" y2="1067" class="loopLine"/><line x1="170.5" y1="1067" x2="1038" y2="1067" class="loopLine"/><line x1="170.5" y1="245" x2="170.5" y2="1067" class="loopLine"/><line x1="170.5" y1="369" x2="1038" y2="369" class="loopLine" style="stroke-dasharray: 3, 3;"/><polygon points="170.5,245 220.5,245 220.5,273 212.1,280 170.5,280" class="labelBox"/><text x="196" y="265" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="labelText" style="font-size: 16px; font-weight: 400;">alt</text><text x="629.25" y="263" text-anchor="middle" class="loopText" style="font-size: 16px; font-weight: 400;"><tspan x="629.25">[Peer unreachable]</tspan></text><text x="604.25" y="387" text-anchor="middle" class="sectionTitle" style="font-size: 16px; font-weight: 400;">[Peer reachable]</text></g><g data-et="note" data-id="i22"><rect x="289" y="1077" fill="#EDF2AE" stroke="#666" width="369" height="37" class="note" data-look="neo"/><text x="474" y="1082" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"><tspan x="474">An acknowledgement is not the agent's reply.</tspan></text></g><g data-et="note" data-id="i23"><rect x="50" y="1124" fill="#EDF2AE" stroke="#666" width="982" height="37" class="note" data-look="neo"/><text x="541" y="1129" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"><tspan x="541">Replies are new letters with reply_to set.</tspan></text></g><text x="192" y="88" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Letter to agent@computer</text><line x1="76" y1="117" x2="307" y2="117" class="messageLine0" data-et="message" data-id="i0" data-from="A" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="315" y="132" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Resolve address and check hop limit</text><path d="M 315,161 C 375,151 375,191 315,181" class="messageLine0" data-et="message" data-id="i1" data-from="S" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="471" y="206" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Try encrypted delivery</text><line x1="315" y1="235" x2="626" y2="235" class="messageLine0" data-et="message" data-id="i2" data-from="S" data-to="R" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="315" y="295" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Queue in outbox and retry (up to one day)</text><path d="M 315,324 C 375,314 375,354 315,344" class="messageLine0" data-et="message" data-id="i4" data-from="S" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="634" y="414" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Check membership, delivery ID and budgets</text><path d="M 634,443 C 694,433 694,473 634,463" class="messageLine0" data-et="message" data-id="i6" data-from="R" data-to="R" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="477" y="533" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Acknowledge without delivering again</text><line x1="632" y1="562" x2="321" y2="562" class="messageLine1" data-et="message" data-id="i8" data-from="R" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/><text x="477" y="622" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Return refusal</text><line x1="632" y1="651" x2="321" y2="651" class="messageLine1" data-et="message" data-id="i10" data-from="R" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/><text x="817" y="756" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Put message in app inbox (caller handles wake)</text><line x1="634" y1="785" x2="1000" y2="785" class="messageLine0" data-et="message" data-id="i13" data-from="R" data-to="T" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="634" y="845" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Keep until the next waking message</text><path d="M 634,874 C 694,864 694,904 634,894" class="messageLine0" data-et="message" data-id="i15" data-from="R" data-to="R" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="817" y="964" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Reach: deliver message and pending notices</text><line x1="634" y1="993" x2="1000" y2="993" class="messageLine0" data-et="message" data-id="i17" data-from="R" data-to="T" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="fill: none;"/><text x="477" y="1018" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;">Acknowledge acceptance</text><line x1="632" y1="1047" x2="321" y2="1047" class="messageLine1" data-et="message" data-id="i19" data-from="R" data-to="S" stroke-width="2" stroke="none" marker-end="url(#my-svg-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"/></svg>\ No newline at end of file