@alook/daemon 0.0.160 → 0.1.1
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/README.md +12 -10
- package/dist/cli/index.js +20515 -876
- package/dist/index.js +15473 -324
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -57,14 +57,17 @@ When a message arrives, what happens depends on the runtime's lifecycle:
|
|
|
57
57
|
One long-lived process spans many turns. A new message is **written onto the
|
|
58
58
|
still-open input channel** — no restart. This is "steering."
|
|
59
59
|
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
The busy-delivery mode is **derived from `lifecycle`** (`busyDeliveryModeOf` /
|
|
61
|
+
`supportsStdinNotificationOf` in `types.ts`) — `lifecycle.stdin` is the single
|
|
62
|
+
source of truth, so a driver's mode can't drift from it (it used to: a driver
|
|
63
|
+
could declare `lifecycle.stdin: "gated"` yet `busyDeliveryMode: "direct"`).
|
|
64
|
+
`persistent+direct → direct`, `persistent+gated → gated`, `per_turn → none`.
|
|
65
|
+
|
|
66
|
+
- **`direct`** (kimi, pi): write immediately; the runtime tolerates injection
|
|
67
|
+
any time.
|
|
68
|
+
- **`gated`** (claude, codex): a raw write mid-stream could collide with an active
|
|
69
|
+
signed thinking block, so writes are **held until a safe boundary**,
|
|
70
|
+
implemented by:
|
|
68
71
|
- `apmStateMachine` (`src/runtime/apmStateMachine.ts`) — the policy reducers
|
|
69
72
|
that decide *when* to flush queued inbox notices and emit the concrete
|
|
70
73
|
`notify_stdin` / `deliver_stdin` effects (clause `SMR-002`). Flushing is
|
|
@@ -93,7 +96,7 @@ message and terminates the process on turn end.
|
|
|
93
96
|
| Runtime | Lifecycle | Transport / protocol | Steering | Initial input | Output format |
|
|
94
97
|
|---|---|---|---|---|---|
|
|
95
98
|
| **claude** | persistent | child process, stream-json NDJSON | `gated` | `{type:"user",…}` line on stdin | stream-json |
|
|
96
|
-
| **codex** | persistent | child process, JSON-RPC 2.0 (`app-server --listen stdio://`) | `
|
|
99
|
+
| **codex** | persistent | child process, JSON-RPC 2.0 (`app-server --listen stdio://`) | `gated` | `initialize` → `thread/start`/`resume` | JSON-RPC notifications |
|
|
97
100
|
| **kimi** | persistent | child process, JSON-RPC "wire" | `direct` (`steer`) | `initialize` → `prompt` | JSON-RPC events |
|
|
98
101
|
| **pi** | persistent | in-process SDK (`@earendil-works/pi-coding-agent`), multi-provider | `direct` | `session.prompt()` | SDK event callback |
|
|
99
102
|
| **gemini** | per-turn | child process, stream-json | none | prompt on stdin, then close | stream-json |
|
|
@@ -130,7 +133,6 @@ src/
|
|
|
130
133
|
runtime/
|
|
131
134
|
runtimeSession.ts # ChildProcessRuntimeSession + descriptor
|
|
132
135
|
sdkRuntimeSession.ts # SdkRuntimeSession (in-process)
|
|
133
|
-
turnState.ts # instantaneous steering gate
|
|
134
136
|
apmStateMachine.ts # gated-delivery policy reducers (SMR-002)
|
|
135
137
|
progressState.ts # liveness / stall detection
|
|
136
138
|
notificationState.ts # inbox-notice de-dup + batching
|