@plurnk/plurnk-agui 1.16.5 → 1.18.0

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/.env.defaults CHANGED
@@ -1,20 +1,9 @@
1
- # @plurnk/plurnk-agui — the daemon's AG-UI+ client-interface module.
2
- # Owned prefix: PLURNK_AGUI_* (ecosystem standard: every package ships its knobs;
3
- # the daemon assembles all installed members' files into one floor at boot).
4
- # The listener's ADDRESS is the daemon's surface (PLURNK_HOST/PLURNK_PORT — owned
5
- # by plurnk-service); the module owns the semantics on that surface.
1
+ # @plurnk/plurnk-agui — client protocol. Listener address: Core's PLURNK_HOST/PLURNK_PORT.
6
2
 
7
- # Bearer for the module's edge authz. Empty = no module-level bearer requirement;
8
- # set a value and every non-preflight request must carry
9
- # `authorization: Bearer <it>` ({§agui-http-authorization}).
3
+ # Bearer required on non-preflight requests; empty = no module-level authentication.
10
4
  PLURNK_AGUI_TOKEN=
11
-
12
- # Per-run turn cap handed to the engine when a run doesn't carry its own maxTurns.
13
- # Empty = no module-level default; otherwise -1 or a non-negative safe integer
14
- # (the engine's own operator ceiling still applies).
5
+ # Default run turn cap: empty = no module default; -1 = unlimited; otherwise nonnegative integer.
6
+ # Core's operator ceiling still applies.
15
7
  PLURNK_AGUI_MAX_TURNS=
16
-
17
- # Required SSE heartbeat cadence in milliseconds, from 0 through 2147483647.
18
- # A long model generation emits no events, so a comment frame at this cadence keeps
19
- # consumers fed. 0 disables.
8
+ # SSE comment heartbeat, ms (0..2147483647); 0 = off. Independent of model output.
20
9
  PLURNK_AGUI_HEARTBEAT_MS=15000
package/README.md CHANGED
@@ -14,6 +14,32 @@ and approval requests. Additional execution metadata uses namespaced
14
14
  Workspace selection and PLURNK-specific management actions use namespaced
15
15
  fields under `forwardedProps.plurnk`. `SPEC.md` defines those extensions.
16
16
 
17
+ ## Conversation projection
18
+
19
+ Each Run observes its bound Worker and, once known, its exact Loop. Sibling
20
+ events do not become chat messages; child activity arrives only when Core
21
+ delivers it into the parent's log ({§agui-topology-scope}).
22
+
23
+ | Daemon evidence | Client projection |
24
+ | --- | --- |
25
+ | TASK | Replaceable `ACTIVITY_SNAPSHOT` with an ACP Plan; not reasoning. |
26
+ | Live provider reasoning | Standard `REASONING_*` deltas, immediately. Retries have separate identities. |
27
+ | SEND | Assistant text; already-streamed reasoning is not repeated. |
28
+ | Other model operations | Standard tool calls and results. |
29
+ | Log rows | `CUSTOM plurnk.row` for richer clients; not a second chat stream to render alongside standard messages. |
30
+ | Harness activity | `CUSTOM plurnk.ambient`, without invented model speech. |
31
+ | Packet and terminal usage | State updates and `plurnk.terminated`; daemon quantities pass through unchanged. |
32
+
33
+ READ of `reasoning://<worker>/…` is an operation receipt, not another reasoning stream.
34
+ On reattach, the durable conversation snapshot restores accepted reasoning,
35
+ SENDs, and the latest PLAN. `forwardedProps.plurnk.mode="sync"` obtains that
36
+ state without a prompt or model inference ({§agui-conversation-sync}).
37
+
38
+ Pending proposals and user interactions use standard AG-UI interrupts and
39
+ resume Runs. Core decides their owner and disposition, including delegated
40
+ gates; clients do not infer approval policy from tool names. The exact mappings,
41
+ event schemas, and settlement rules live in [SPEC.md](./SPEC.md).
42
+
17
43
  ## Integration
18
44
 
19
45
  The daemon loads the module in process:
package/SPEC.md CHANGED
@@ -28,13 +28,25 @@ does not recompute them.
28
28
  BOTH levels: `threadId` == the workspace name binds the workspace's model worker (the default
29
29
  conversation, `ensureModelWorker` — its durable default-conversation role identifies it,
30
30
  never a name parse or root ordering); a DISTINCT
31
- `threadId` names its own conversation worker — found by name if it exists (forks and prior
32
- conversations are addressable as threads), minted via `createConversationWorker`
31
+ `threadId` names its own conversation worker — found by name among model-origin workers if
32
+ it exists (forks and prior conversations are addressable as threads; a client connection's
33
+ worker or the runtime actor `_plurnk` is never a conversation, and a thread named after one
34
+ fails at minting rather than binding), minted via `createConversationWorker`
33
35
  if it doesn't. The core workspace envelope carries only the workspace and selected client
34
36
  actor ({§methods-rebind}); AG-UI owns the separate per-thread conversation binding.
35
37
  Process-local bindings use the complete `(workspace, threadId)` identity; equal thread names
36
38
  in different workspaces never share an envelope, Worker, replay, state, or active Run.
39
+ Concurrent first requests acquire one envelope and conversation binding. Workspace
40
+ acquisition is serialized across threads, retaining each request's create/attach contract;
41
+ the creating request supplies settings, and other threads acquire their own
42
+ client actors in that world. Failed acquisitions retain their cause and leave no failed
43
+ cache entry preventing a later retry. Explicit Core creation retains its name-conflict
44
+ semantics; protocol binding is not a second creation request.
37
45
  `loop.inject`, `loop.cancel`, and `run.fork` operate on the THREAD's conversation.
46
+ `loop.inject` and `loop.cancel` steer a loop already running in a world, so they attach only:
47
+ a workspace name that does not exist is the client's error, answered 404
48
+ `workspace-not-found` with nothing created — never a second world minted after the name
49
+ and answered there. Every other request may bring the world into being.
38
50
  `log.read` and `entry.read` default there and may explicitly select another workspace worker.
39
51
  Extended context persists across AG-UI Runs because the worker's log does.
40
52
  - §agui-run-authority **AG-UI owns the client lifecycle** — `threadId`, `runId`,
@@ -51,29 +63,30 @@ One accepted Run or daemon notification produces zero-or-more AG-UI events:
51
63
  | ------------------------------------------ | ------------ |
52
64
  | schema-valid `RunAgentInput` | `RUN_STARTED` + initial `STATE_SNAPSHOT` |
53
65
  | `forwardedProps.plurnk.mode = "sync"` | Durable conversation `MESSAGES_SNAPSHOT`, then pending interrupt, live observation, or `RUN_FINISHED` {§agui-conversation-sync} |
54
- | `log/entry` turn boundary | `STEP_FINISHED` + `STEP_STARTED` (`turn-<id>`) |
55
- | `log/entry` op=PLAN (model) | `ACTIVITY_SNAPSHOT` {§agui-plan-activity} |
56
- | `log/entry` op=SEND (model) | Optional readable-reasoning sequence {§agui-readable-reasoning}, then `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
66
+ | `log/entry` advancing to a newer turn | `STEP_FINISHED` + `STEP_STARTED` (`turn-<id>`); late updates to earlier receipts retain their row identity without rewinding the step or clearing delivered reasoning. |
67
+ | `log/entry` op=TASK (model) | `ACTIVITY_SNAPSHOT` {§agui-plan-activity} + `CUSTOM plurnk.send`; no assistant speech |
68
+ | Successful targetless model SEND | Optional readable-reasoning sequence {§agui-readable-reasoning}, then `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
69
+ | Directed or unsuccessful SEND | Ordinary tool-call operation events; never assistant speech |
57
70
  | `log/entry` other op (model) | `TOOL_CALL_START/ARGS/END` (+ `TOOL_CALL_RESULT` when rx exists) |
58
- | `log/entry` actionless `kind=turnOps` or `kind=emissionAttempt` | At most one `REASONING_ENCRYPTED_VALUE`, attached to the same turn's actual SEND assistant message when {§agui-encrypted-reasoning} is satisfied; otherwise nothing beyond the forensic row. |
71
+ | `log/entry` actionless `kind=emissionAttempt` | Forensic row only; no assistant speech or reasoning replay. |
72
+ | `log/entry` READ of `reasoning:///…` or `ops:///…` | An ordinary operation receipt, not a reasoning stream. Standard reasoning delivery and replay retain original provider evidence under {§agui-readable-reasoning}. |
59
73
  | `log/entry` origin≠model | `CUSTOM plurnk.ambient` (foists, deltas, narrations) |
60
74
  | client-owned `loop/proposal` | `TOOL_CALL_START/ARGS/END`, `STEP_FINISHED` when a turn step is active, then `RUN_FINISHED` with an interrupt outcome; its resume Run reopens the continued turn with `STEP_STARTED` after `RUN_STARTED` and initial state |
61
75
  | `loop/packet` | `STATE_DELTA` replacing the bound thread's loop id, lifecycle, and exact packet count |
62
76
  | `loop/terminated` | `STATE_DELTA` (latest-turn gauge only) + `CUSTOM plurnk.terminated` (the complete daemon terminal, including physical-request accounting and top-level attribution) + `RAW` (the provider's opaque metadata bag, `source: provider`, §475) + `RUN_FINISHED` (`result.status === 200`) or `RUN_ERROR` (otherwise, from the exact RFC 9457 Problem Details) |
63
77
  | transport failure after SSE opens | `CUSTOM plurnk.problem` (exact Problem Details) + `RUN_ERROR` (`code` = Problem `type`, `message` = Problem `detail`) |
64
- | `notice/event` | `CUSTOM plurnk.notice`; derivation lifecycle additionally replaces `STATE /plurnk/status/activity` |
78
+ | `notice/event` | `CUSTOM plurnk.notice`; routine derivation lifecycle uses only `STATE /plurnk/status/activity`, while warnings/errors also retain their diagnostic Notice. |
65
79
  | `reasoning/event` | Standard live `REASONING_START` → `REASONING_MESSAGE_START` → one or more `REASONING_MESSAGE_CONTENT` → `REASONING_MESSAGE_END` → `REASONING_END` {§agui-readable-reasoning} |
66
80
  | `stream/event` + `stream/concluded` | `CUSTOM plurnk.stream` + `ACTIVITY_SNAPSHOT` (the standard background-activity channel: `activityType` = the scheme, replace-snapshot, §475). A conclusion preserves its exact universal `result`, including RFC 9457 Problem Details; AG-UI does not reconstruct failure from a status or summary. |
67
- | `workspace/branch-batch` | `CUSTOM plurnk.branch_batch` with the daemon's full queued/running/completed/failed/recovery-required lifecycle payload |
68
81
 
69
- §agui-plan-activity **PLAN is replaceable activity, not reasoning.** PLAN is the
70
- ACP projection of the model's latest {§plan-value} installment, produced only at
82
+ §agui-plan-activity **Task inventory is replaceable PLAN activity, not reasoning.** PLAN activity is the
83
+ ACP projection of the model's latest TASK {§plan-value} installment, produced only at
71
84
  this standards boundary under {§plan-acp-projection}. Provider reasoning is a
72
85
  separate channel, so PLAN never projects into AG-UI `REASONING_*` events. The thread-stable
73
86
  `<threadId>/plan` identity makes every live update replace the prior activity;
74
- reattach includes only the newest model PLAN. The same ACP projection replaces
75
- `tx.body` on every client-facing PLAN `CUSTOM plurnk.row` and
76
- `CUSTOM plurnk.ambient`; all other row and transaction fields remain intact:
87
+ reattach includes only the newest model inventory. The same ACP projection replaces
88
+ `tx.body` on every client-facing TASK row, whether delivered by `CUSTOM plurnk.row`,
89
+ `CUSTOM plurnk.ambient`, or `log.read`; all other row and transaction fields remain intact:
77
90
 
78
91
  | Projection | Standard representation |
79
92
  | ---------- | ----------------------- |
@@ -89,46 +102,42 @@ the failed request's partial reasoning. Foreign-worker and BARE reasoning never
89
102
  enter the thread. Failed or rejected requests may therefore leave honest
90
103
  transient reasoning that is not replayed.
91
104
 
92
- Core also derives the admitted SEND's optional complete `reasoning` from its
93
- durable packet ({§methods-readable-reasoning}). When that value was not already
94
- delivered by the completed live stream, projection emits it atomically before
95
- the SEND speech under `<SEND identity>/reasoning`; otherwise it emits no
96
- duplicate. A standard interrupt may divide one durable Loop across consecutive
105
+ Core also derives optional complete `reasoning` on admitted SEND and disposition
106
+ rows from their durable packet ({§methods-readable-reasoning}). When that value
107
+ was not already delivered by the completed live stream, projection emits it
108
+ atomically before the turn's first speech or inventory under `<OP identity>/reasoning`.
109
+ Subsequent rows in the same turn do not repeat it. A standard interrupt may divide one durable Loop across consecutive
97
110
  AG-UI Runs; the Run B projection inherits Run A's delivered-reasoning evidence
98
111
  before the stopped operation is released. Reattach replaces transient attempt presentation with the durable
99
- accepted `ReasoningMessage` immediately before its SEND `AssistantMessage` in
112
+ accepted `ReasoningMessage` once per turn, before its speech or inventory in
100
113
  `MESSAGES_SNAPSHOT`. Empty evidence emits nothing, PLAN never substitutes for
101
114
  reasoning ({§agui-plan-activity}), and the SEND row still precedes its text
102
115
  sequence.
103
116
 
104
117
  - **An op row IS a tool call** — its `coordinate` is the `toolCallId`, its tx the args (one
105
118
  delta: a dispatched plurnk op is atomic), its rx the result. The log-shaped richness the
106
- core vocabulary can't hold (fold state, tags, curation weight) stays on the row inside
119
+ core vocabulary can't hold (curation metadata, tags, coordinates) stays on the row inside
107
120
  `plurnk.ambient`/`TOOL_CALL_RESULT` payloads.
108
- - §agui-encrypted-reasoning **Encrypted reasoning projects only onto an entity
109
- AG-UI actually created.** Core supplies the exact normalized provider-detail
110
- list on an actionless model source row's `attrs.reasoning`.
111
- No synthetic operation is introduced. The provider detail `id` is
112
- forensic identity, not an AG-UI entity ID ({§provider-encrypted-reasoning}).
113
-
114
- | Condition | Projection |
115
- | ------------------------------------------- | ---------- |
116
- | Same-turn SEND + one nonempty message value | One `REASONING_ENCRYPTED_VALUE` with `subtype: "message"` and `entityId` equal to that SEND message's coordinate. |
117
- | Null or absent provider detail `id` | No effect on correlation; the actual SEND identity owns the client relation. |
118
- | No SEND or not exactly one message value | No standard encrypted event. Nothing is selected, joined, or overwritten. |
119
- | Provider-only and unprojected evidence | Detail `id`, `format`, ordering, and every value remain lossless on the `plurnk.row` mirror evidence. |
120
- | Reattach | The same singular value occupies `encryptedValue` on the corresponding SEND `AssistantMessage` in `MESSAGES_SNAPSHOT`. |
121
-
122
- AG-UI's single message slot cannot represent multiple provider details without
123
- losing cardinality. The translator therefore emits neither invented reasoning
124
- spans nor repeated events whose last value would silently overwrite its
125
- siblings.
121
+ - §agui-encrypted-reasoning **Opaque provider state is not a client conversation.**
122
+ AG-UI emits no encrypted-reasoning events or message values. Original provider
123
+ evidence retains those fields under {§encrypted-reasoning-carrier}; readable
124
+ reasoning streams and conversation replay remain {§agui-readable-reasoning}.
126
125
  - §agui-custom-namespace **The custom namespace** — plurnk-specific metadata rides
127
126
  `CUSTOM` events named `plurnk.*` (`plurnk.send`, `plurnk.ambient`,
128
- `plurnk.notice`, `plurnk.stream`, `plurnk.branch_batch`, `plurnk.terminated` — the full loop
127
+ `plurnk.notice`, `plurnk.stream`, `plurnk.terminated` — the full loop
129
128
  outcome and {§provider-accounting} the gauge `STATE_DELTA` cannot represent). Generic frontends skip unknown customs; plurnk-aware frontends render
130
129
  them richly. Nothing plurnk-specific ever masquerades as a core event.
131
130
 
131
+ §agui-status-children **Children are counted by the daemon, never inferred.** `status.children`
132
+ is the bound Worker's alive direct children — `queued`, `running`, or `parked` under
133
+ {§loop-lifecycle-vocabulary}; a parked child still owes a result and is exactly the one a user
134
+ hops to. The module computes it from `ApplicationPort.listWorkers({ parentWorkerId })` for every
135
+ snapshot and whole-gauge replacement, and republishes `STATE_DELTA /plurnk/status/children` only
136
+ when the count changes: after another worker's `loop/terminated` or `loop/packet`, or after the
137
+ bound Worker's own `WORK`, `FORK`, or `KILL` row lands. Clients render the number as their child
138
+ indicator and never poll the directory to keep it honest (topology is navigation, not a dashboard:
139
+ the client hops to a child rather than watching it).
140
+
132
141
  §agui-numbers-passthrough **Gauge numbers pass through verbatim.** The module
133
142
  never recomputes the daemon's gauge or promotes accounting into application
134
143
  state paths that could be mistaken for standard AG-UI fields.
@@ -137,9 +146,12 @@ state paths that could be mistaken for standard AG-UI fields.
137
146
  |:--------------------------------------------|:-----------------------------------------|:--------|
138
147
  | `snapshot.plurnk.providers[*].inputCapacity` | `providers.list.aliases[*]` | Each provider alias's derived physical input capacity, or `null` when unknown. |
139
148
  | `snapshot.plurnk.status.model` | `ApplicationPort.readWorkerModel` | The bound Worker's durable resolved model route, including its alias when selected. |
140
- | `snapshot.plurnk.status.loopId` | latest `ApplicationLoopProjection.id` | Latest durable Loop for the bound Worker, or `null` before one exists. |
149
+ | `snapshot.plurnk.status.loopId` | latest `ApplicationLoopProjection.id` | Latest durable work Loop for the bound Worker, or `null` before one exists. Maintenance-only loops are excluded by Core under {§application-loop-observation}. |
141
150
  | `snapshot.plurnk.status.packetCount` | latest `ApplicationLoopProjection.packetCount` | Exact packet-bearing Turn count; packetless Turns and provider retries do not contribute. |
142
- | `STATE_DELTA /plurnk/status/*` | packet, termination, and derivation events | Replaceable lifecycle, packet chronology, and transient activity; clients never reconstruct packet count from row or STEP traffic. |
151
+ | `snapshot.plurnk.status.lifecycle` | latest `ApplicationLoopProjection.status` | Queued `100` is `queued`, not executing or WAITing. Running `102`, parked `202`, and terminal states retain their ordinary lifecycle meanings. |
152
+ | `snapshot.plurnk.status.{scheduledAt,intervalMinutes,recurrenceId}` | {§application-loop-observation} | Scheduled-task timing, initialized to `null` when absent. Packet deltas refresh it and clear an ordinary task's absent timing. |
153
+ | `snapshot.plurnk.status.children` | `ApplicationPort.listWorkers({ parentWorkerId })` | The bound Worker's alive direct children — `queued`, `running`, or `parked` under {§loop-lifecycle-vocabulary}; a parked child still owes a result. Computed by the daemon for every snapshot and whole-gauge replacement, and republished as `STATE_DELTA /plurnk/status/children` only when it changes: after another worker's `loop/terminated` or `loop/packet` (it may be a child), or after the bound Worker's own `WORK`, `FORK`, or `KILL` row lands (it spawned or killed one). Clients render the number and never poll the directory for it ({§agui-status-children}). |
154
+ | `STATE_DELTA /plurnk/status/*` | packet, termination, and derivation events | Replaceable lifecycle, packet chronology, and transient activity. Reattachment snapshots carry current derivation activity through the same projection, without polling or duplicate routine Notices. Clients never reconstruct packet count from row or STEP traffic. |
143
155
  | `snapshot.budget` | Run initialization | Creates all four gauge fields as `null`, so subsequent RFC 6902 `replace` operations always address existing values. |
144
156
  | `STATE_DELTA /budget/curationWeight` | `loop/terminated.usage.curationWeight` | Latest assembled packet's model-independent curation weight, or `null` when no packet exists. |
145
157
  | `STATE_DELTA /budget/curationBudget` | `loop/terminated.usage.curationBudget` | Latest turn's provider-derived curation calibration, or `null` when capacity is unknown. |
@@ -157,8 +169,8 @@ ignore the extension; PLURNK clients consume the same contracts-owned shape as
157
169
  every other daemon surface.
158
170
 
159
171
  - §agui-row-channel **The row channel** — every log row ALSO rides `CUSTOM plurnk.row`
160
- carrying the complete client-facing row (fold state, durable tags, curation weight, coordinate)
161
- alongside its core projection. PLAN `tx.body` follows {§agui-plan-activity}; rich clients
172
+ carrying the complete client-facing row (curation metadata, durable tags, coordinate)
173
+ alongside its core projection. TASK `tx.body` follows {§agui-plan-activity}; rich clients
162
174
  (TUI/nvim) never receive the internal Plan extension. Generic clients ignore this metadata
163
175
  channel.
164
176
  - **The gauge starts true** — `RUN_STARTED` is followed by a `STATE_SNAPSHOT` carrying the
@@ -199,7 +211,7 @@ host owns; decoration and layout are not cross-client protocol facts.
199
211
  | -------------------- | ------------ | -------------------- | ------ | --------------------------------- |
200
212
  | lifecycle, model, packet status | structured output and Unix status trace | mutable prompt status | editor statusline and winbar | process, terminal, and editor lifecycle idioms |
201
213
  | PLAN and reasoning | structured record and trace | streaming waterfall blocks | buffer blocks and folds | host-native persistence and navigation |
202
- | operation receipts and terminal SEND | stdout plus structured operation record | scrollback waterfall | worker waterfall buffer | Unix streams versus durable visual surfaces |
214
+ | operation receipts and turn disposition | stdout plus structured operation record | scrollback waterfall | worker waterfall buffer | Unix streams versus durable visual surfaces |
203
215
  | cancellation, proposals, and interactions | explicit noninteractive policy and exit | terminal review or input | editor review, selection, and input | each host owns human interaction |
204
216
  | Problems and Notices | RFC 9457 JSON or stderr | terminal rows | editor diagnostics | presentation only; exact semantics survive |
205
217
  | MCP, Skills, and A2A Functionality | state commands | slash commands | `:AI` commands | one `worker.{mcp,skills,agents}.*` action contract |
@@ -207,6 +219,9 @@ host owns; decoration and layout are not cross-client protocol facts.
207
219
  One installed-platform journey exercises all three public entry paths against
208
220
  the same packed daemon release. It asserts semantic outcomes rather than exact
209
221
  glyphs or pixels and names any permitted divergence by its owning host.
222
+ Unexpected Problems fail a successful journey, including asynchronous startup
223
+ failures. A deterministic rejected-provider journey asserts the exact cause,
224
+ one provider request, and failed status after subsequent management reads.
210
225
 
211
226
  ## §agui-proposal-resolve Client-owned stop-the-world interactions
212
227
 
@@ -304,19 +319,18 @@ successfully transported management Run; it does not turn the Run into
304
319
  | `loop.cancel` | Workspace | `reason?` | `ApplicationPort.cancelDrain` on the thread's conversation worker. |
305
320
  | `workspace.prompts` | Workspace | `limit?` | `ApplicationPort.listPrompts`. |
306
321
  | `workspace.rename` | Workspace | `name` | `ApplicationPort.renameWorkspace`. |
307
- | `workspace.derivation` | Workspace | none | `ApplicationPort.workspaceDerivationStatus`. |
308
322
  | `entry.read` | Workspace | `target`, `workerId?`, `channel?`, `offset?` | Calls `ApplicationPort.readEntry` from the explicit worker perspective or the thread conversation by default, preserving validated {§entry-read-result}. |
309
- | `op.exec` | Workspace | `command` | Constructs one EXEC statement and calls `ApplicationPort.dispatchClientAction` on the client worker, attached to the conversation Worker (`conversationWorkerId`, else the workspace's model worker) for Functionality. |
323
+ | `op.exec` | Workspace | `command` | Constructs one execution statement on the default `sh` runtime and calls `ApplicationPort.dispatchClientAction` on the client worker, attached to the conversation Worker (`conversationWorkerId`, else the workspace's model worker) for Functionality. |
310
324
  | `op.parse` | Workspace | `text` | Parses and projects PLURNK text under {§agui-op-parse}. |
311
- | `op.look` | Workspace | `text` | Admits one LOOK under {§agui-op-look}, rewrites it to READ, and calls core's no-log `look` projection. |
325
+ | `op.look` | Workspace | `text`, `workerId?` | Admits one LOOK under {§agui-op-look}, rewrites it to READ, and calls core's no-log `look` projection as the conversation worker. |
312
326
  | `run.fork` | Workspace | `name?` | `ApplicationPort.forkWorker` from the thread's conversation worker. |
313
327
  | `worker.model.get` | Workspace | none | `ApplicationPort.readWorkerModel` on the thread's conversation worker; returns `{ model, spawnModel }` as resolved specs or `null`. |
314
328
  | `worker.model.set` | Workspace | `selector` | `ApplicationPort.setWorkerModel` on the thread's conversation worker; persists the resolved selection and returns it. |
315
329
  | `worker.child.set` | Workspace | `selector` | `ApplicationPort.setWorkerSpawnModel` on the thread's conversation worker; persists the override (`null` means inherit) and returns it. |
316
330
  | `worker.reasoning.get` | Workspace | none | `ApplicationPort.readWorkerReasoning` on the thread's conversation worker; returns its durable policy and the policies supported by both its model and optional spawn model. |
317
331
  | `worker.reasoning.set` | Workspace | `policy` | `ApplicationPort.setWorkerReasoning` on the thread's conversation worker; validates and persists the policy between loops. |
318
- | `worker.capabilities.get` | Workspace | none | `ApplicationPort.readWorkerCapabilities` on the thread's conversation worker; returns the complete resolver-owned projection {§capability-policy-projection}. |
319
- | `worker.capabilities.set` | Workspace | `policy` | `ApplicationPort.setWorkerCapabilities` replaces the mutable Worker layer and returns the complete resolver-owned projection {§capability-policy-projection}. |
332
+ | `workspace.capabilities.get` | Workspace | none | `ApplicationPort.readWorkspaceCapabilities` on the bound workspace, without creating a conversation worker; returns the complete resolver-owned projection {§capability-policy-projection}. |
333
+ | `workspace.capabilities.set` | Workspace | `policy` | `ApplicationPort.setWorkspaceCapabilities` replaces the workspace policy and returns the complete resolver-owned projection {§capability-policy-projection}. |
320
334
  | Registered module action | Owner-declared | owner-defined | `ApplicationPort.invokeModuleAction`; AG-UI enforces the owner's input/output schemas and passes a worldless, bound-workspace, or bound-conversation-Worker context outside supplied params. The owner retains semantic validation and the effect. |
321
335
 
322
336
  §agui-worker-model-actions **Worker model selection is server-backed.**
@@ -359,28 +373,34 @@ preserves the parser's source order in its `results` array:
359
373
  | Statement before the tail boundary | Its corresponding `ApplicationPort.dispatchClientAction` result in the statement's position |
360
374
  | Bounded hard error | A 400 `agui/action/parse-failed` result in the error's position, preserving parser detail, line, column, source, and severity |
361
375
  | `unparsedTail` under {§unparsed-tail-boundary} | Exactly one final 400 `agui/action/parse-failed` result with its verbatim reason and position, `source: "grammar"`, and no adapter-authored recovery |
362
- | Text item | No result; text is not dispatchable |
363
376
 
364
377
  No statement at or beyond the tail boundary is dispatched. Every parse failure
365
- uses `stage: "parsing"` and `retryable: false`.
378
+ uses `stage: "parsing"` and `retryable: false`. Outside text is ignored by the
379
+ parser under {§whitespace-contract} and produces no result.
366
380
 
367
381
  ### §agui-op-look Single-statement observation admission
368
382
 
369
383
  `op.look` admits a parser result only when it contains exactly one LOOK
370
- statement, no other item, and no `unparsedTail`. Hidden surrounding whitespace
371
- is not an item. The action never selects a trusted prefix or silently discards
384
+ statement, no other item, and no `unparsedTail`. Outside text and whitespace
385
+ produce no item under {§whitespace-contract}. The action never selects a trusted prefix or silently discards
372
386
  a parser fact.
373
387
 
374
388
  | Parser result | AG-UI outcome |
375
389
  |-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
376
390
  | First positioned diagnostic | 400 `agui/action/parse-failed`, preserving parser detail, line, column, source, and severity |
377
391
  | No diagnostic, with `unparsedTail` | 400 `agui/action/parse-failed`, preserving its reason and position with `source: "grammar"` and `severity: "error"` |
378
- | Text item, zero or multiple statements, or non-LOOK | 400 `agui/action/invalid-action-parameters` naming the observed admission fact |
392
+ | Zero or multiple statements, or non-LOOK | 400 `agui/action/invalid-action-parameters` naming the observed admission fact |
379
393
  | Exactly one LOOK and no other parser fact | Change only `op` to READ and call `ApplicationPort.look` under {§op-look}; return its exact `OperationResult` through the action envelope |
380
394
 
381
395
  Parser failures use `stage: "parsing"`; action-shape failures use
382
396
  `stage: "action-validation"`. Both are non-retryable.
383
397
 
398
+ The observation resolves as the thread's conversation worker, so `log:///`,
399
+ `reasoning:///`, and `ops:///` read as the model sees them; `workerId` pins another workspace worker, the
400
+ way `entry.read` does. The closed observation segment stays on the connection's own
401
+ worker: a look never adds a loop to the conversation, so its lifecycle, packet count, and
402
+ history are unchanged by inspection.
403
+
384
404
  §agui-module-actions **One public action namespace.** Core rejects empty and
385
405
  duplicate extension registrations ({§module-action-registration}). At module
386
406
  startup AG-UI rejects any extension name colliding with a built-in before it
@@ -426,7 +446,6 @@ event families:
426
446
  | `reasoning/event` |
427
447
  | `stream/event` |
428
448
  | `stream/concluded` |
429
- | `workspace/branch-batch` |
430
449
 
431
450
  The schemas are the same executable values used for runtime admission and
432
451
  projection. `plurnk-agui` owns the built-in action and notification registry;
@@ -434,6 +453,11 @@ discovery never reconstructs it from handlers. It does not report plugin
434
453
  catalogs, package versions, or update availability. Object key order is not a
435
454
  contract.
436
455
 
456
+ §agui-stream-producer Stream updates route to `workerId`, the initiating
457
+ Worker. Resource reads use the canonical workspace address, not a separate
458
+ read perspective. Shared resources neither broadcast to unrelated conversations
459
+ nor hide updates from the producer ({§notifications-stream-event-on-channel-change}).
460
+
437
461
  `loop.inject`'s steered effect streams on the original worker's open SSE.
438
462
  `loop.cancel` is its counterpart: the addressable spelling of the SSE-hangup
439
463
  abort. An action that opens a stream remains one live AG-UI Run; its result is
@@ -481,11 +505,17 @@ this Run.
481
505
  | `op.exec` / `op.parse` | Client-operation Worker's log and stream events. A proposal resume retains this scope. | This action result, deferred through its owned streams. |
482
506
  | Every other action | None; the Run carries only its direct state snapshot and action result. | This action result. |
483
507
 
508
+ An operation Run owns an execution from the row that announces it: a started or
509
+ queued execution row carries `attrs.stream`, and that address stays open for the Run
510
+ until its `stream/concluded`, so the action result is deferred even when the
511
+ command writes late or never (a `stream/event` is a race the result must not
512
+ win). A detached execution (`<-1>`) is nobody's obligation and never defers the
513
+ result.
514
+
484
515
  `workerId` (or `entry.worker_id`) is the actor owner; `loopId` (or
485
- `entry.loop_id`) refines it wherever the event is loop-scoped. Branch-batch
486
- events remain workspace status and route only to conversation Runs. Opening a
516
+ `entry.loop_id`) refines it wherever the event is loop-scoped. Opening a
487
517
  read-only management Run can therefore never replay reasoning, operation rows,
488
- or terminal SEND from an active conversation.
518
+ or turn disposition from an active conversation.
489
519
 
490
520
  ## §agui-configuration Module configuration
491
521
 
@@ -1,5 +1,6 @@
1
1
  import { type AguiEvent, type ProposalNotification } from "./types.ts";
2
2
  import type { Interrupt, ResumeEntry } from "@ag-ui/core";
3
+ import { type LoopLifecycle } from "@plurnk/plurnk-contracts";
3
4
  import type { ApplicationLoopProjection, ClientInteractionProjection, ClientInteractionResolution, ModelRoute, ProblemDetails } from "@plurnk/plurnk-contracts";
4
5
  export declare const proposalToolCallId: (logEntryId: number) => string;
5
6
  export declare const logEntryIdFromToolCallId: (toolCallId: string) => number | null;
@@ -45,7 +46,7 @@ export interface AguiPlusState {
45
46
  }>;
46
47
  status?: AguiStatusState;
47
48
  }
48
- export type AguiLifecycle = "idle" | "running" | "parked" | "completed" | "failed";
49
+ export type AguiLifecycle = LoopLifecycle;
49
50
  export interface AguiStatusActivity {
50
51
  readonly kind: "derivation";
51
52
  readonly phase: "preparing" | "indexing" | "failed";
@@ -60,15 +61,17 @@ export interface AguiStatusState {
60
61
  readonly loopId: number | null;
61
62
  readonly packetCount: number;
62
63
  readonly activity: AguiStatusActivity | null;
64
+ readonly scheduledAt: string | null;
65
+ readonly intervalMinutes: number | null;
66
+ readonly recurrenceId: number | null;
67
+ readonly children: number;
63
68
  }
64
- export declare const derivationActivity: (value: {
65
- readonly phase: string;
66
- readonly completed: number;
67
- readonly total: number;
68
- readonly percent: number;
69
- readonly message: string;
70
- } | null) => AguiStatusActivity | null;
71
- export declare const statusState: (model: ModelRoute | null, loop: ApplicationLoopProjection | null, activity?: AguiStatusActivity | null) => AguiStatusState;
69
+ export declare const ALIVE_LIFECYCLES: ReadonlySet<LoopLifecycle>;
70
+ export declare const aliveChildren: (rows: readonly {
71
+ readonly lifecycle: LoopLifecycle;
72
+ }[]) => number;
73
+ export declare const derivationActivity: (value: unknown) => AguiStatusActivity | null;
74
+ export declare const statusState: (model: ModelRoute | null, loop: ApplicationLoopProjection | null, activity?: AguiStatusActivity | null, children?: number) => AguiStatusState;
72
75
  export interface AguiBudgetState {
73
76
  readonly curationWeight: number | null;
74
77
  readonly curationBudget: number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"AguiPlus.d.ts","sourceRoot":"","sources":["../src/AguiPlus.ts"],"names":[],"mappings":"AAQA,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EACR,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,UAAU,EACV,cAAc,EACjB,MAAM,0BAA0B,CAAC;AAKlC,eAAO,MAAM,kBAAkB,eAAgB,MAAM,KAAG,MAA8B,CAAC;AACvF,eAAO,MAAM,wBAAwB,eAAgB,MAAM,KAAG,MAAM,GAAG,IAGtE,CAAC;AAOF,eAAO,MAAM,gBAAgB,QAAS,MAAM,KAAG,MAA4B,CAAC;AAI5E,eAAO,MAAM,gBAAgB,MAAO,oBAAoB,KAAG,SAAS,EAOnE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAAgB,MAAM,KAAG,SAarD,CAAC;AAGH,MAAM,WAAW,UAAU;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE;AAC3G,eAAO,MAAM,oBAAoB,UAAW,WAAW,KAAG,UAAU,GAAG,IAStE,CAAC;AAEF,eAAO,MAAM,qBAAqB,kBAAmB,MAAM,K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ED
@@ -6,6 +6,7 @@
6
6
  // §1 proposals → tool-calls (terminate-resume HITL); §2 reads →
7
7
  // shared STATE. This is the flagship choreography de-risked as logic before code.
8
8
  import { EventType } from "./types.js";
9
+ import { lifecycleOfLoopStatus } from "@plurnk/plurnk-contracts";
9
10
  // ── §1 — stop-the-world → tool-call ──────────────────────────────────
10
11
  // toolCallId correlates the terminating AG-UI Run's TOOL_CALL and interrupt with the next
11
12
  // AG-UI Run's ResumeEntry → the exact pending proposal. Encodes the logEntryId: `prop:<id>`.
@@ -100,34 +101,35 @@ export const interactionResolutionFromResume = (entry) => {
100
101
  },
101
102
  };
102
103
  };
104
+ // {§agui-status-children} — a child that still owes a result is alive; one that concluded is not.
105
+ export const ALIVE_LIFECYCLES = new Set(["queued", "running", "parked"]);
106
+ export const aliveChildren = (rows) => rows.filter(({ lifecycle }) => ALIVE_LIFECYCLES.has(lifecycle)).length;
103
107
  export const derivationActivity = (value) => {
104
- if (value === null || value.phase === "complete")
108
+ if (value === null)
105
109
  return null;
106
- if (value.phase !== "preparing" && value.phase !== "indexing" && value.phase !== "failed")
107
- return null;
108
- return {
109
- kind: "derivation",
110
- phase: value.phase,
111
- completed: value.completed,
112
- total: value.total,
113
- percent: value.percent,
114
- message: value.message,
115
- };
110
+ if (typeof value !== "object")
111
+ throw new TypeError("Invalid derivation activity.");
112
+ const { phase, completed, total, percent, message } = value;
113
+ if (phase !== "preparing" && phase !== "indexing" && phase !== "complete" && phase !== "failed"
114
+ || typeof completed !== "number" || !Number.isSafeInteger(completed) || completed < 0
115
+ || typeof total !== "number" || !Number.isSafeInteger(total) || total < completed
116
+ || typeof percent !== "number" || !Number.isFinite(percent) || percent < 0 || percent > 100
117
+ || typeof message !== "string") {
118
+ throw new TypeError("Invalid derivation activity.");
119
+ }
120
+ return phase === "complete" ? null : { kind: "derivation", phase, completed, total, percent, message };
116
121
  };
117
- export const statusState = (model, loop, activity = null) => ({
118
- lifecycle: loop === null
119
- ? "idle"
120
- : loop.status === 202
121
- ? "parked"
122
- : loop.status === 200
123
- ? "completed"
124
- : loop.status >= 400
125
- ? "failed"
126
- : "running",
122
+ export const statusState = (model, loop, activity = null, children = 0) => ({
123
+ // {§loop-lifecycle-vocabulary} — the one projection the worker directory shares.
124
+ lifecycle: lifecycleOfLoopStatus(loop?.status ?? null),
127
125
  model,
128
126
  loopId: loop?.id ?? null,
129
127
  packetCount: loop?.packetCount ?? 0,
130
128
  activity,
129
+ scheduledAt: loop?.scheduledAt ?? null,
130
+ intervalMinutes: loop?.intervalMinutes ?? null,
131
+ recurrenceId: loop?.recurrenceId ?? null,
132
+ children,
131
133
  });
132
134
  const EMPTY_BUDGET = Object.freeze({
133
135
  curationWeight: null,
@@ -1 +1 @@
1
- {"version":3,"file":"AguiPlus.js","sourceRoot":"","sources":["../src/AguiPlus.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qCAAqC;AACrC,oFAAoF;AACpF,0EAA0E;AAC1E,EAAE;AACF,gEAAgE;AAChE,kFAAkF;AAElF,OAAO,EAAE,SAAS,EAA6C,MAAM,YAAY,CAAC;AAUlF,wEAAwE;AACxE,0FAA0F;AAC1F,6FAA6F;AAC7F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC,QAAQ,UAAU,EAAE,CAAC;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,UAAkB,EAAiB,EAAE;IAC1E,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,mFAAmF;AACnF,qDAAqD;AACrD,iFAAiF;AACjF,8EAA8E;AAC9E,4BAA4B;AAC5B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,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,MAAM,EAAE,GAAG,MAAiC,CAAC;IACrE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,OAAsB,EAAa,EAAE,CAC5E,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC"}
@@ -22,7 +22,6 @@ export declare const AGUI_BUILTIN_ACTIONS: Readonly<{
22
22
  "loop.cancel": AguiActionContract;
23
23
  "workspace.prompts": AguiActionContract;
24
24
  "workspace.rename": AguiActionContract;
25
- "workspace.derivation": AguiActionContract;
26
25
  "entry.read": AguiActionContract;
27
26
  "op.exec": AguiActionContract;
28
27
  "op.parse": AguiActionContract;
@@ -33,8 +32,8 @@ export declare const AGUI_BUILTIN_ACTIONS: Readonly<{
33
32
  "worker.child.set": AguiActionContract;
34
33
  "worker.reasoning.get": AguiActionContract;
35
34
  "worker.reasoning.set": AguiActionContract;
36
- "worker.capabilities.get": AguiActionContract;
37
- "worker.capabilities.set": AguiActionContract;
35
+ "workspace.capabilities.get": AguiActionContract;
36
+ "workspace.capabilities.set": AguiActionContract;
38
37
  }>;
39
38
  export declare const AGUI_NOTIFICATIONS: Readonly<{
40
39
  "log/entry": AguiNotificationContract;
@@ -46,7 +45,6 @@ export declare const AGUI_NOTIFICATIONS: Readonly<{
46
45
  "reasoning/event": AguiNotificationContract;
47
46
  "stream/event": AguiNotificationContract;
48
47
  "stream/concluded": AguiNotificationContract;
49
- "workspace/branch-batch": AguiNotificationContract;
50
48
  }>;
51
49
  export {};
52
50
  //# sourceMappingURL=AguiSurface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AguiSurface.d.ts","sourceRoot":"","sources":["../src/AguiSurface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAM3D,KAAK,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;CACrC;AAED,MAAM,WAAW,wBAAwB;IACrC,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;CACtC;AAiED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFwB,CAAC;AA6B1D,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAoEgC,CAAC"}
1
+ {"version":3,"file":"AguiSurface.d.ts","sourceRoot":"","sources":["../src/AguiSurface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAM3D,KAAK,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;CACrC;AAED,MAAM,WAAW,wBAAwB;IACrC,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;CACtC;AA6DD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFwB,CAAC;AA6B1D,eAAO,MAAM,kBAAkB;;;;;;;;;;EAkEgC,CAAC"}