@alook/daemon 0.1.65 → 0.1.66

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.
Files changed (4) hide show
  1. package/README.md +16 -22
  2. package/dist/cli/index.js +40185 -40556
  3. package/dist/index.js +5001 -5400
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -151,8 +151,8 @@ src/
151
151
  index.ts # daemon exports; re-exports the driver public API
152
152
  drivers/index.ts # daemon runtime lookup/probe facade only
153
153
  logger.ts # structured daemon logging
154
- runtime/ # manager liveness, notification, error helpers
155
- inbox/ # unread projection and freshness policy
154
+ runtime/ # retained published runtime state and error helpers
155
+ inbox/ # retained published projection/freshness APIs
156
156
  manager/
157
157
  agentDriverHost.ts # host resource/env/CLI preparation
158
158
  managerPolicy.ts # pure scheduling reducer
@@ -250,25 +250,19 @@ understanding what `hostApiKey` should be:
250
250
  3. **`vch_` voucher** — minted by `CredentialBroker` per launch, written to a 0600
251
251
  file, and the only credential the agent process ever sees.
252
252
 
253
- ## Inbox layer (freshness)
254
-
255
- Two pieces govern how messages reach the agent and how outgoing actions are
256
- gated:
257
-
258
- - **`inbox/projection.ts`** — `projectAgentInboxSnapshot` buckets pending
259
- messages by target (channel / DM / thread) and projects each into the
260
- metadata-only summary surfaced as an `[inbox notice: …]` (count, first,
261
- latest, sender, flags). No bodies — the agent pulls those with
262
- `alook inbox pull`.
263
- - **`inbox/stateMachine.ts`** — `planAgentInboxSideEffect` is the "don't reply on
264
- stale context" guard. Before an outward action (`send` / `task_claim` /
265
- `task_update`) it compares the model's seen `seq` boundary against pending
266
- messages and returns **forward** (let it through), **held** (hold the action,
267
- surface the latest few unseen messages as held context to reconcile first —
268
- this is the "Freshness hold → saved as a draft" you can hit when messaging a
269
- busy agent), or **bypass** (explicit `continueAnyway`). It is a pure function
270
- producing a stable `producerFactId`; clause ids `SMR-002` (consume) and
271
- `SMR-006` (held envelope) are preserved.
253
+ ## Wake and inbox ownership
254
+
255
+ Server/D1 owns durable messages and read watermarks. The wake coordinator keeps
256
+ unread coverage through reconnects, active work, failed admission and session
257
+ replacement. Manager policy and runtime own logical-session admission and exact
258
+ root settlement; agent-driver owns physical sessions and process cleanup.
259
+ An acknowledgement or transport receipt is not proof that the model saw work.
260
+
261
+ The credential proxy applies current operation capabilities, local PII filters
262
+ and send alignment. CLI inbox pull reads and acknowledges through the current
263
+ server contract. Published inbox projection/freshness helpers, progressState,
264
+ notificationState and WsControlServer remain available for external package
265
+ consumers; they are not the current wake or send orchestration path.
272
266
 
273
267
  ## Build & run
274
268
 
@@ -276,7 +270,7 @@ This project uses **pnpm** (see the `packageManager` field).
276
270
 
277
271
  ```bash
278
272
  pnpm install
279
- pnpm run typecheck # tsc --noEmit (passes clean)
273
+ pnpm run typecheck # tsc --noEmit
280
274
  pnpm test # Vitest package suite, including its packed/runtime categories
281
275
  pnpm run test:integration # real infra: requires wrangler dev + ws-do dev + queue-worker dev (see below)
282
276
  ```