@north-light/cli 0.3.715 → 0.3.717
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtin-memory/internal/nodes-and-canvas.md +2 -2
- package/dist/clients/attach/viewer.js +118 -118
- package/dist/core/import/load/rewrite.js +14 -14
- package/dist/core/llm/breaker.d.ts +9 -0
- package/dist/core/llm/breaker.js +1 -0
- package/dist/core/runtime/broker/fault-retry.d.ts +4 -1
- package/dist/core/runtime/broker/fault-retry.js +1 -1
- package/dist/core/runtime/broker/model-adapter.d.ts +9 -0
- package/dist/core/runtime/broker/model-adapter.js +3 -3
- package/dist/core/runtime/broker.js +1 -1
- package/dist/core/runtime/connectivity.d.ts +1 -2
- package/dist/core/runtime/fault-recovery.d.ts +0 -3
- package/dist/core/runtime/fault-recovery.js +1 -1
- package/dist/daemon/api/handlers/health.js +3 -3
- package/dist/daemon/api/handlers/llm.js +3 -3
- package/dist/daemon/reconcilers/fault-retry-backstop.d.ts +2 -4
- package/dist/daemon/reconcilers/fault-retry-backstop.js +1 -1
- package/package.json +3 -3
- package/packages/crouter-api/dist/clients/attach/viewer.js +10 -0
- package/packages/crouter-api/dist/core/import/load/rewrite.js +8 -4
- package/packages/crouter-api/dist/core/runtime/broker/model-adapter.js +12 -3
- package/packages/crouter-api/dist/core/runtime/fault-recovery.js +11 -22
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +14 -14
|
@@ -13,7 +13,7 @@ Every agent is a **node**, one kind of **object** on the **canvas** — the sing
|
|
|
13
13
|
|
|
14
14
|
The node-to-node **spine** is the subscription edge: a subscriber receives its publisher's pushes (`node subscription add|remove`, stored as a watch the subscriber holds on the publisher), and that edge decides who-wakes-whom. It sits beside the general watch mechanism below, which lets any object's events reach any node.
|
|
15
15
|
|
|
16
|
-
The **daemon** (`crtrd`) is the sole owner of canvas persistent state: it is the only process that opens the canvas database, launches brokers, and writes runtime/model-auth, all behind the `/v1` HTTP+WS API (dockerd model). Every `crtr` command and viewer is a pure client of that API — they never open the store. A local interactive viewer still streams a node's broker socket (`view.sock`) directly, because that is broker IPC, not canvas state.
|
|
16
|
+
The **daemon** (`crtrd`) is the sole owner of canvas persistent state: it is the only kind of process that opens the canvas database (the cloud `api` and `reconcile` roles share one Postgres; an imported Mac's `machine` role opens none), launches brokers (a node's broker runs in its own Blaxel sandbox or on an imported Mac), and writes runtime/model-auth, all behind the `/v1` HTTP+WS API (dockerd model). Every `crtr` command and viewer is a pure client of that API — they never open the store. A local interactive viewer still streams a node's broker socket (`view.sock`) directly, because that is broker IPC, not canvas state.
|
|
17
17
|
|
|
18
18
|
crtrd runs in one of four roles:
|
|
19
19
|
|
|
@@ -72,4 +72,4 @@ Tear-down: `node lifecycle close` cascade-cancels a node + its exclusive subtree
|
|
|
72
72
|
|
|
73
73
|
Use `node lifecycle revive <id>` to reopen one dormant or terminal node. It resumes an existing saved conversation by default; `--fresh` starts a new cycle on its existing session file, or a truly fresh session if no file exists. A finalized node requires `--reopen` before it can take a new mandate. Mass-reconnecting every eligible disconnected node after a reboot or outage is `canvas revive --all` instead. `reviveNode()` is the **only** sanctioned launcher of a node's broker engine — it builds the pi invocation, sets `CRTR_NODE_ID` + canvas extensions, runs `transition('revive')`, and starts the headless broker host, keeping the db row and broker process in lockstep. Never spawn `pi --session` raw, and never open a node by spawning pi directly — UIs go through `surface node focus` / `node lifecycle revive`.
|
|
74
74
|
|
|
75
|
-
The daemon (`crtrd`, managed on a Mac via `sys daemon start/stop/status`) supervises live broker exits. It releases an unattended broker after 15 minutes: residents with no live obligation become `done` and pruning-eligible, while terminal nodes and residents awaiting a live child, controller, human, deadline, or structured output become `idle` and remain wakeable. It applies a bounded respawn policy to interrupted nonterminal nodes: an interrupted saved turn resumes in the same conversation with a continuation, whether the broker persisted a clean abort or died abruptly. A pending refresh or pending cycle still starts a fresh cycle from the saved session. Repeated short-lived exits and boot failures terminalize the node as `dead`; no automatic recovery occurs after terminalization, so use an explicit lifecycle revive or an inbox wake. It does not host agents or open viewers. When activating source changes, build, run `npm run install-runtime`, then restart the daemon because new daemon/brokers select the atomically switched, immutable generation while live brokers retain their own.
|
|
75
|
+
The daemon (`crtrd`, managed on a Mac via `sys daemon start/stop/status`) supervises live broker exits. It releases an unattended broker after 15 minutes: residents with no live obligation become `done` and pruning-eligible, while terminal nodes and residents awaiting a live child, controller, human, deadline, or structured output become `idle` and remain wakeable. It applies a bounded respawn policy to interrupted nonterminal nodes: an interrupted saved turn resumes in the same conversation with a continuation, whether the broker persisted a clean abort or died abruptly. A pending refresh or pending cycle still starts a fresh cycle from the saved session. Repeated short-lived exits and boot failures terminalize the node as `dead`; no automatic recovery occurs after terminalization, so use an explicit lifecycle revive or an inbox wake. It does not host agents or open viewers. When activating source changes, build, run `npm run install-runtime`, then restart the daemon because new daemon/brokers select the atomically switched, immutable generation while live brokers retain their own. `sys daemon restart` acknowledges immediately, then after a short grace tears down every broker, including the caller, handing foreground bash commands to background jobs that keep running and report completion by urgent inbox message. The successor starts on the selected runtime generation and restores interrupted nodes through ordinary supervision. The cloud roles are never restarted this way; their orchestrator replaces them on release.
|