@plurnk/plurnk-agui 1.8.0 → 1.9.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/SPEC.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @plurnk/plurnk-agui — the projection contract
2
2
 
3
- The module is the daemon's external client interface. It consumes core's
4
- in-process module seam and emits the Agent-User Interaction Protocol over
5
- HTTP/SSE. Core's numbers and semantics pass through; the module does not
6
- recompute them.
3
+ The module is the daemon's AG-UI client interface. It consumes the
4
+ contracts-owned {§application-port} and emits the Agent-User Interaction
5
+ Protocol over HTTP/SSE. Core's numbers and semantics pass through; the module
6
+ does not recompute them.
7
7
 
8
8
  ## Architecture
9
9
 
10
10
  - §agui-daemon-client **The module is an in-process plugin of the daemon** — activated
11
- at boot (`registerModule` → the core seam handle); it opens the AG-UI+ listener and owns
11
+ at boot (`registerModule` → the application port); it opens the AG-UI+ listener and owns
12
12
  the client interface. No WebSocket, no separate process.
13
13
  - §agui-thread-binding **A PLURNK workspace is the world; an AG-UI thread is a conversation over it**
14
14
  — the lifecycle vocabulary is defined by service {§lifecycle-terms}. PLURNK's machine model ({§machine-processes}) splits the world (a workspace: one
@@ -51,32 +51,40 @@ One accepted Run or daemon notification produces zero-or-more AG-UI events:
51
51
  | `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) |
52
52
  | transport failure after SSE opens | `CUSTOM plurnk.problem` (exact Problem Details) + `RUN_ERROR` (`code` = Problem `type`, `message` = Problem `detail`) |
53
53
  | `notice/event` | `CUSTOM plurnk.notice` |
54
+ | `reasoning/event` | Standard live `REASONING_START` → `REASONING_MESSAGE_START` → one or more `REASONING_MESSAGE_CONTENT` → `REASONING_MESSAGE_END` → `REASONING_END` {§agui-readable-reasoning} |
54
55
  | `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. |
55
56
  | `workspace/branch-batch` | `CUSTOM plurnk.branch_batch` with the daemon's full queued/running/completed/failed/recovery-required lifecycle payload |
56
57
 
57
- §agui-plan-activity **PLAN is activity, not reasoning.** PLAN is the model's public,
58
- durable statement of intended goals. Provider reasoning is a separate channel, so PLAN
59
- never projects into AG-UI `REASONING_*` events. Live delivery and reattach preserve the
60
- same log identity and verbatim goals:
58
+ §agui-plan-activity **PLAN is replaceable activity, not reasoning.** PLAN is the
59
+ ACP projection of the model's complete current {§plan-value}, produced only at
60
+ this standards boundary under {§plan-acp-projection}. Provider reasoning is a
61
+ separate channel, so PLAN never projects into AG-UI `REASONING_*` events. The thread-stable
62
+ `<threadId>/plan` identity makes every live update replace the prior activity;
63
+ reattach includes only the newest model PLAN. The same ACP projection replaces
64
+ `tx.body` on every client-facing PLAN `CUSTOM plurnk.row` and
65
+ `CUSTOM plurnk.ambient`; all other row and transaction fields remain intact:
61
66
 
62
67
  | Projection | Standard representation |
63
68
  | ---------- | ----------------------- |
64
- | live | `ACTIVITY_SNAPSHOT { messageId: coordinate ?? id, activityType: "PLAN", content: { goals: body }, replace: true }` |
65
- | reattach | `ActivityMessage { id: coordinate ?? id, role: "activity", activityType: "PLAN", content: { goals: body } }` inside `MESSAGES_SNAPSHOT` |
69
+ | live | `ACTIVITY_SNAPSHOT { messageId: "<threadId>/plan", activityType: "PLAN", content: AcpPlan, replace: true }` |
70
+ | reattach | The newest `ActivityMessage { id: "<threadId>/plan", role: "activity", activityType: "PLAN", content: AcpPlan }` at its chronological position inside `MESSAGES_SNAPSHOT` |
66
71
 
67
72
  §agui-readable-reasoning **Readable provider reasoning uses AG-UI's standard
68
- reasoning channel.** Core derives the optional SEND `reasoning` field from the
69
- owning admitted packet without duplicating storage ({§methods-readable-reasoning}).
70
- For nonempty text, live projection emits
71
- `REASONING_START` → `REASONING_MESSAGE_START` →
72
- `REASONING_MESSAGE_CONTENT` → `REASONING_MESSAGE_END` → `REASONING_END`
73
- immediately before that SEND's text events. Every event uses the stable
74
- `<SEND identity>/reasoning` message ID and preserves the text verbatim. Reattach
75
- places the equivalent `ReasoningMessage` immediately before its SEND
76
- `AssistantMessage` in `MESSAGES_SNAPSHOT`. An absent or empty value emits no
77
- reasoning entity; PLAN never substitutes for it ({§agui-plan-activity}). The
78
- SEND's `plurnk.row` mirror follows this reasoning sequence and precedes the text
79
- sequence, so family and generic clients preserve the same presentation order.
73
+ reasoning channel.** A core `{§notifications-reasoning-event}` for the thread's
74
+ model worker projects each exact delta immediately through one balanced standard
75
+ reasoning lifecycle identified by its durable model-call id. Foreign-worker and
76
+ BARE reasoning never enter the thread. Failed or rejected calls may therefore
77
+ leave honest transient reasoning that is not replayed.
78
+
79
+ Core also derives the admitted SEND's optional complete `reasoning` from its
80
+ durable packet ({§methods-readable-reasoning}). When that value was not already
81
+ delivered by the completed live stream, projection emits it atomically before
82
+ the SEND speech under `<SEND identity>/reasoning`; otherwise it emits no
83
+ duplicate. Reattach replaces transient attempt presentation with the durable
84
+ accepted `ReasoningMessage` immediately before its SEND `AssistantMessage` in
85
+ `MESSAGES_SNAPSHOT`. Empty evidence emits nothing, PLAN never substitutes for
86
+ reasoning ({§agui-plan-activity}), and the SEND row still precedes its text
87
+ sequence.
80
88
 
81
89
  - **An op row IS a tool call** — its `coordinate` is the `toolCallId`, its tx the args (one
82
90
  delta: a dispatched plurnk op is atomic), its rx the result. The log-shaped richness the
@@ -130,10 +138,10 @@ ignore the extension; PLURNK clients consume the same contracts-owned shape as
130
138
  every other daemon surface.
131
139
 
132
140
  - §agui-row-channel **The row channel** — every log row ALSO rides `CUSTOM plurnk.row`
133
- carrying the full wire entry (fold state, durable tags, curation weight, coordinate) alongside its
134
- core projection. Rich clients (TUI/nvim) render plurnk-native fidelity from `plurnk.row`;
135
- generic clients never see the difference. This is the metadata channel the exclusive-portal
136
- migration stands on.
141
+ carrying the complete client-facing row (fold state, durable tags, curation weight, coordinate)
142
+ alongside its core projection. PLAN `tx.body` follows {§agui-plan-activity}; rich clients
143
+ (TUI/nvim) never receive the internal Plan extension. Generic clients ignore this metadata
144
+ channel.
137
145
  - **The gauge starts true** — `RUN_STARTED` is followed by a `STATE_SNAPSHOT` carrying the
138
146
  daemon's `providers.list` truth (the effective input capacity, the active model), then
139
147
  `STATE_DELTA`s. A dropped SSE stream cancels the loop (`loop.cancel`) — the frontend hanging
@@ -141,7 +149,7 @@ every other daemon surface.
141
149
 
142
150
  - §agui-replay **Reattach replays** — a rediscovered thread (the module restarted, a second
143
151
  frontend arrived) attaches to its existing workspace by name→id and opens ORIENTED: the model
144
- worker's PLAN activities and SEND speech replay as `MESSAGES_SNAPSHOT`; everything else stays
152
+ worker's current PLAN activity and SEND speech replay as `MESSAGES_SNAPSHOT`; everything else stays
145
153
  reachable via live `plurnk.row`. Pending proposals and client interactions remain durable while
146
154
  their operation owners are live and are presented as interrupts when the owning conversation is
147
155
  resumed; a days-old question is discoverable, never converted into a mystery hang.
@@ -164,7 +172,7 @@ interrupt carries its optional `message` and `responseSchema`. A resolved resume
164
172
  the generic resolved payload, while AG-UI cancellation becomes interaction cancellation. AG-UI
165
173
  never sees or reconstructs an upstream protocol's continuation state.
166
174
 
167
- §agui-proposal-disposition **AG-UI consumes disposition; it does not infer policy.** Both the live `loop/proposal` payload and `CoreSeam.pendingProposals()` return the contracts-owned `ProposalProjection`. `disposition.owner` is the sole presentation branch:
175
+ §agui-proposal-disposition **AG-UI consumes disposition; it does not infer policy.** Both the live `loop/proposal` payload and `ApplicationPort.pendingProposals()` return the contracts-owned `ProposalProjection`. `disposition.owner` is the sole presentation branch:
168
176
 
169
177
  | Disposition owner | AG-UI behavior |
170
178
  | ----------------- | ----------------------------------------------------------------------------- |
@@ -174,7 +182,7 @@ never sees or reconstructs an upstream protocol's continuation state.
174
182
  Raw `auto`, `noProposals`, operation, attrs, and stale-target facts remain visible evidence but are not re-evaluated here. Reconnect filters by the same disposition, so an internal policy failure cannot silently turn client presentation into an accidental fallback.
175
183
 
176
184
  §agui-provider-policy-forwarding A textual Run forwards `selector` and
177
- `childSelector` from `forwardedProps.plurnk` unchanged to `CoreSeam.runLoop`.
185
+ `childSelector` from `forwardedProps.plurnk` unchanged to `ApplicationPort.runLoop`.
178
186
  Each string is one declared alias or exact provider/model route; an explicit
179
187
  `childSelector: null` remains distinguishable from an omitted service-default
180
188
  selection.
@@ -189,11 +197,11 @@ and a standard interrupt resume are not management actions and have no invented
189
197
  flowchart LR
190
198
  client["AG-UI client"] --> run["POST RunAgentInput"]
191
199
  run --> classify{"Input form"}
192
- classify -->|"textual user message"| loop["CoreSeam.runLoop"]
193
- classify -->|"RunAgentInput.resume"| resume["CoreSeam proposal / interaction resolution"]
200
+ classify -->|"textual user message"| loop["ApplicationPort.runLoop"]
201
+ classify -->|"RunAgentInput.resume"| resume["ApplicationPort proposal / interaction resolution"]
194
202
  classify -->|"forwardedProps.plurnk.action"| actions{"AG-UI action registry"}
195
- actions --> builtIn["Built-in validation<br/>and typed CoreSeam call"]
196
- actions --> extension["Scoped CoreSeam.invokeModuleAction"]
203
+ actions --> builtIn["Advertised schema admission<br/>and typed ApplicationPort call"]
204
+ actions --> extension["Scoped ApplicationPort.invokeModuleAction"]
197
205
  loop --> events["Core event source"]
198
206
  resume --> events
199
207
  builtIn --> events
@@ -217,35 +225,37 @@ successfully transported management Run; it does not turn the Run into
217
225
  |--------------------------|-----------|------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
218
226
  | `ping` | Worldless | none | AG-UI-local liveness; returns `{}`. |
219
227
  | `discover` | Worldless | none | AG-UI-local public membership manifest ({§discovery}). |
220
- | `providers.list` | Worldless | none | `CoreSeam.listProviders`. |
221
- | `models.list` | Worldless | `provider?`, `search?`, `availability?`, `offset?`, `limit?` | Returns one bounded {§model-catalog-wire} page from `CoreSeam.listModels` under {§model-catalog}. |
222
- | `workspace.list` | Worldless | none | `CoreSeam.listWorkspaces`. |
228
+ | `providers.list` | Worldless | none | `ApplicationPort.listProviders`. |
229
+ | `models.list` | Worldless | `provider?`, `search?`, `availability?`, `offset?`, `limit?` | Returns one bounded {§model-catalog-wire} page from `ApplicationPort.listModels` under {§model-catalog}. |
230
+ | `workspace.list` | Worldless | none | `ApplicationPort.listWorkspaces`. |
223
231
  | `workspace.create` | Worldless | `name?`, `projectRoot?`, `settings?`, `constraints?` | Creates or attaches the exact named world, or asks core to create an automatically named world. |
224
- | `workspace.attach` | Worldless | `id`, `workerId?` | `CoreSeam.attachWorkspace`; returns the selected envelope. |
225
- | `workspace.workers` | Workspace | `id?` | `CoreSeam.listWorkers`; an explicit id overrides the bound workspace. |
226
- | `log.read` | Workspace | `workerId?`, log-coordinate filters | `CoreSeam.readLog`; defaults to the thread's conversation worker. |
227
- | `loop.inject` | Workspace | `prompt` | `CoreSeam.runLoop` on the thread's conversation worker; folds into live work or enqueues a loop. |
228
- | `loop.cancel` | Workspace | none | `CoreSeam.cancelDrain` on the thread's conversation worker. |
229
- | `workspace.prompts` | Workspace | `limit?` | `CoreSeam.listPrompts`. |
230
- | `workspace.rename` | Workspace | `name` | `CoreSeam.renameWorkspace`. |
231
- | `workspace.constrain` | Workspace | `effect`, `glob` | `CoreSeam.constrain`. |
232
- | `workspace.unconstrain` | Workspace | `effect`, `glob` | `CoreSeam.unconstrain`. |
233
- | `workspace.constraints` | Workspace | none | `CoreSeam.listConstraints`. |
234
- | `workspace.derivation` | Workspace | none | `CoreSeam.workspaceDerivationStatus`. |
235
- | `entry.read` | Workspace | `target`, `workerId?`, `channel?`, `offset?` | Calls `CoreSeam.readEntry` from the explicit worker perspective or the thread conversation by default, preserving validated {§entry-read-result}. |
236
- | `op.exec` | Workspace | `command` | Constructs one EXEC statement and calls `CoreSeam.dispatchClientAction` on the client worker. |
232
+ | `workspace.attach` | Worldless | `id`, `workerId?` | `ApplicationPort.attachWorkspace`; returns the selected envelope. |
233
+ | `workspace.workers` | Workspace | `id?` | `ApplicationPort.listWorkers`; an explicit id overrides the bound workspace. |
234
+ | `log.read` | Workspace | `workerId?`, log-coordinate filters | `ApplicationPort.readLog`; defaults to the thread's conversation worker. |
235
+ | `loop.inject` | Workspace | `prompt` | `ApplicationPort.runLoop` on the thread's conversation worker; folds into live work or enqueues a loop. |
236
+ | `loop.cancel` | Workspace | `reason?` | `ApplicationPort.cancelDrain` on the thread's conversation worker. |
237
+ | `workspace.prompts` | Workspace | `limit?` | `ApplicationPort.listPrompts`. |
238
+ | `workspace.rename` | Workspace | `name` | `ApplicationPort.renameWorkspace`. |
239
+ | `workspace.constrain` | Workspace | `effect`, `glob` | `ApplicationPort.constrain`. |
240
+ | `workspace.unconstrain` | Workspace | `effect`, `glob` | `ApplicationPort.unconstrain`. |
241
+ | `workspace.constraints` | Workspace | none | `ApplicationPort.listConstraints`. |
242
+ | `workspace.derivation` | Workspace | none | `ApplicationPort.workspaceDerivationStatus`. |
243
+ | `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}. |
244
+ | `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. |
237
245
  | `op.parse` | Workspace | `text` | Parses and projects PLURNK text under {§agui-op-parse}. |
238
- | `workspace.members` | Workspace | none | `CoreSeam.listMembers`. |
246
+ | `workspace.members` | Workspace | none | `ApplicationPort.listMembers`. |
239
247
  | `op.look` | Workspace | `text` | Admits one LOOK under {§agui-op-look}, rewrites it to READ, and calls core's no-log `look` projection. |
240
- | `run.fork` | Workspace | `name?` | `CoreSeam.forkWorker` from the thread's conversation worker. |
241
- | `worker.model.get` | Workspace | none | `CoreSeam.readWorkerModel` on the thread's conversation worker; returns `{ model, spawnModel }` as resolved specs or `null`. |
242
- | `worker.model.set` | Workspace | `selector` | `CoreSeam.setWorkerModel` on the thread's conversation worker; persists the resolved selection and returns it. |
243
- | `worker.child.set` | Workspace | `selector` | `CoreSeam.setWorkerSpawnModel` on the thread's conversation worker; persists the override (`null` means inherit) and returns it. |
244
- | `worker.reasoning.get` | Workspace | none | `CoreSeam.readWorkerReasoning` on the thread's conversation worker; returns its durable policy and the policies supported by both its model and optional spawn model. |
245
- | `worker.reasoning.set` | Workspace | `policy` | `CoreSeam.setWorkerReasoning` on the thread's conversation worker; validates and persists the policy between loops. |
246
- | `worker.settings.get` | Workspace | none | `CoreSeam.readWorkerSettings` on the thread's conversation worker; returns the worker's behavioral-rules bag ({§worker-settings}). |
247
- | `worker.settings.set` | Workspace | `settings` | `CoreSeam.setWorkerSettings` on the thread's conversation worker; merges the known keys and returns the normalized bag. |
248
- | Registered module action | Owner-declared | owner-defined | `CoreSeam.invokeModuleAction`; AG-UI passes either a worldless context or the already-bound workspace context outside supplied params. The owner validates params and owns the result. |
248
+ | `run.fork` | Workspace | `name?` | `ApplicationPort.forkWorker` from the thread's conversation worker. |
249
+ | `worker.model.get` | Workspace | none | `ApplicationPort.readWorkerModel` on the thread's conversation worker; returns `{ model, spawnModel }` as resolved specs or `null`. |
250
+ | `worker.model.set` | Workspace | `selector` | `ApplicationPort.setWorkerModel` on the thread's conversation worker; persists the resolved selection and returns it. |
251
+ | `worker.child.set` | Workspace | `selector` | `ApplicationPort.setWorkerSpawnModel` on the thread's conversation worker; persists the override (`null` means inherit) and returns it. |
252
+ | `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. |
253
+ | `worker.reasoning.set` | Workspace | `policy` | `ApplicationPort.setWorkerReasoning` on the thread's conversation worker; validates and persists the policy between loops. |
254
+ | `worker.settings.get` | Workspace | none | `ApplicationPort.readWorkerSettings` on the thread's conversation worker; returns the worker's behavioral-rules bag ({§worker-settings}). |
255
+ | `worker.settings.set` | Workspace | `settings` | `ApplicationPort.setWorkerSettings` on the thread's conversation worker; merges the known keys and returns the normalized bag. |
256
+ | 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. |
257
+
258
+ §agui-constraint-provenance Constraint projections include `source: "explicit" | "create"`. Inputs never accept that field: client-authored constraints persist as `explicit`, while `create` identifies an exact pick generated by the core file-creation transaction. For `create`, `glob` carries the literal canonical path rather than pattern syntax ({§fs-create-incorporation}).
249
259
 
250
260
  §agui-worker-model-actions **Worker model selection is server-backed.**
251
261
  `worker.model.get`, `worker.model.set`, and `worker.child.set` operate on the
@@ -265,14 +275,17 @@ validation and refuses mutation while a
265
275
  loop is active or parked.
266
276
 
267
277
  §agui-module-action-scope **An extension action uses the same management plane,
268
- not a private endpoint.** `CoreSeam.listModuleActions()` returns its exact
269
- `{ name, scope }` descriptors. A worldless action follows the control path and
278
+ not a private endpoint.** `ApplicationPort.listModuleActions()` returns its exact
279
+ `{ name, scope, inputSchema, outputSchema }` descriptors under
280
+ {§agui-discovery-contract}. A worldless action follows the control path and
270
281
  cannot establish a workspace. A workspace action follows ordinary thread
271
282
  binding, resolves the client envelope first, and invokes core with
272
283
  `{ scope: "workspace", workspaceId: envelope.workspaceId }`; an `id`,
273
284
  `workspaceId`, or similarly named owner parameter cannot override that
274
- identity. `discover.methods` advertises both kinds by name without importing
275
- the extension owner.
285
+ identity. A Worker action additionally receives the thread's bound conversation
286
+ Worker as `{ scope: "worker", workspaceId, workerId }`; client parameters cannot
287
+ select either authority coordinate. `discover.actions` advertises all three
288
+ kinds without importing the extension owner.
276
289
 
277
290
  ### §agui-op-parse Parsed-operation projection
278
291
 
@@ -281,7 +294,7 @@ preserves the parser's source order in its `results` array:
281
294
 
282
295
  | Parser output | AG-UI result |
283
296
  |------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
284
- | Statement before the tail boundary | Its corresponding `CoreSeam.dispatchClientAction` result in the statement's position |
297
+ | Statement before the tail boundary | Its corresponding `ApplicationPort.dispatchClientAction` result in the statement's position |
285
298
  | Bounded hard error | A 400 `agui/action/parse-failed` result in the error's position, preserving parser detail, line, column, source, and severity |
286
299
  | `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 |
287
300
  | Text item | No result; text is not dispatchable |
@@ -301,7 +314,7 @@ a parser fact.
301
314
  | First positioned diagnostic | 400 `agui/action/parse-failed`, preserving parser detail, line, column, source, and severity |
302
315
  | No diagnostic, with `unparsedTail` | 400 `agui/action/parse-failed`, preserving its reason and position with `source: "grammar"` and `severity: "error"` |
303
316
  | Text item, zero or multiple statements, or non-LOOK | 400 `agui/action/invalid-action-parameters` naming the observed admission fact |
304
- | Exactly one LOOK and no other parser fact | Change only `op` to READ and call `CoreSeam.look` under {§op-look}; return its exact `OperationResult` through the action envelope |
317
+ | 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 |
305
318
 
306
319
  Parser failures use `stage: "parsing"`; action-shape failures use
307
320
  `stage: "action-validation"`. Both are non-retryable.
@@ -309,19 +322,26 @@ Parser failures use `stage: "parsing"`; action-shape failures use
309
322
  §agui-module-actions **One public action namespace.** Core rejects empty and
310
323
  duplicate extension registrations ({§module-action-registration}). At module
311
324
  startup AG-UI rejects any extension name colliding with a built-in before it
312
- opens the listener. A recognized Problem thrown by an extension crosses the
325
+ opens the listener. The resulting executable registry is the sole source for
326
+ scope classification, input admission, dispatch, output projection, and
327
+ discovery under {§agui-action-schema-enforcement}. A recognized Problem thrown by an extension crosses the
313
328
  boundary unchanged; an unexpected handler exception becomes the generic
314
329
  `action-failed` Problem without exposing private exception text.
315
330
 
316
- ### §discovery Discovery membership
331
+ ### §discovery Discovery contract
317
332
 
318
- The `discover` action returns membership, not a parallel description or schema
319
- system:
333
+ The `discover` action returns the complete schema-bearing
334
+ {§agui-discovery-contract} projection of the executable registry:
320
335
 
321
336
  ```ts
322
337
  type Discovery = {
323
- methods: Record<string, true>;
324
- notifications: Record<string, true>;
338
+ schemaVersion: 1;
339
+ actions: Record<string, {
340
+ scope: "worldless" | "workspace";
341
+ inputSchema: JsonSchema;
342
+ outputSchema: JsonSchema;
343
+ }>;
344
+ notifications: Record<string, { payloadSchema: JsonSchema }>;
325
345
  display: ClientDisplayCapabilities;
326
346
  };
327
347
  ```
@@ -330,7 +350,7 @@ type Discovery = {
330
350
  ({§client-display-capabilities}). AG-UI adds no fallback, font, theme, or packet
331
351
  policy.
332
352
 
333
- `methods` contains the 22 built-ins in the table plus every registered module
353
+ `actions` contains the 30 built-ins in the table plus every registered module
334
354
  action. `notifications` contains exactly these externally projected daemon
335
355
  event families:
336
356
 
@@ -339,13 +359,18 @@ event families:
339
359
  | `log/entry` |
340
360
  | `loop/terminated` |
341
361
  | `loop/proposal` |
362
+ | `loop/interaction` |
342
363
  | `notice/event` |
364
+ | `reasoning/event` |
343
365
  | `stream/event` |
344
366
  | `stream/concluded` |
345
367
  | `workspace/branch-batch` |
346
368
 
347
- Discovery does not report parameter pseudo-schemas, plugin catalogs, package
348
- versions, or update availability. Object key order is not a contract.
369
+ The schemas are the same executable values used for runtime admission and
370
+ projection. `plurnk-agui` owns the built-in action and notification registry;
371
+ discovery never reconstructs it from handlers. It does not report plugin
372
+ catalogs, package versions, or update availability. Object key order is not a
373
+ contract.
349
374
 
350
375
  `loop.inject`'s steered effect streams on the original worker's open SSE.
351
376
  `loop.cancel` is its counterpart: the addressable spelling of the SSE-hangup
@@ -367,7 +392,7 @@ into the conversation a generic frontend renders.
367
392
  Workspace information fans to every open AG-UI Run: ambient rows and stream activity
368
393
  remain visible across the workspace, with each SSE
369
394
  using its own render router. Terminal control does not fan. A message AG-UI Run binds
370
- to the exact `loopId` returned by `CoreSeam.runLoop`; an interrupt-resume AG-UI Run binds to the
395
+ to the exact `loopId` returned by `ApplicationPort.runLoop`; an interrupt-resume AG-UI Run binds to the
371
396
  pending item's persisted `loopId` before resolving it. Only that loop's
372
397
  `loop/terminated` event may emit `plurnk.terminated` and close the SSE.
373
398
  The custom event preserves the daemon's exact universal `result`; failures use
@@ -409,7 +434,7 @@ values for direct in-process composition. The listener address remains service-o
409
434
 
410
435
  `POST /` (or `/agui`) accepts a schema-valid AG-UI `RunAgentInput`: the last textual
411
436
  `user` message becomes the
412
- `CoreSeam.runLoop` prompt (`maxTurns`/`flags.auto` from the forwarded PLURNK
437
+ `ApplicationPort.runLoop` prompt (`maxTurns`/`flags.auto` from the forwarded PLURNK
413
438
  properties or module defaults); the response is `text/event-stream`,
414
439
  one `data:` line per event, ending after `RUN_FINISHED`/`RUN_ERROR`. Multimodal user content
415
440
  is rejected until the model-loop seam supports it deliberately. Loop auto never answers
@@ -41,6 +41,7 @@ export interface AguiPlusState {
41
41
  constraints?: Array<{
42
42
  effect: string;
43
43
  glob: string;
44
+ source: "explicit" | "create";
44
45
  }>;
45
46
  }
46
47
  export interface AguiBudgetState {
@@ -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,2BAA2B,EAC3B,2BAA2B,EAC3B,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,g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AChF,eAAO,MAAM,WAAW,mBAAoB,OAAO,KAAG,aAAa,GAAG,IAOrE,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC;AACpG,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,aAAa,KAAG,SACuB,CAAC"}
package/dist/AguiPlus.js CHANGED
@@ -26,7 +26,7 @@ export const proposalToolCall = (p) => {
26
26
  const toolCallId = proposalToolCallId(p.logEntryId);
27
27
  return [
28
28
  { type: EventType.TOOL_CALL_START, toolCallId, toolCallName: proposalToolName(p.op) },
29
- { type: EventType.TOOL_CALL_ARGS, toolCallId, delta: JSON.stringify({ op: p.op, target: p.target, body: p.body, attrs: p.attrs, staleClobberRisk: p.staleClobberRisk }) },
29
+ { type: EventType.TOOL_CALL_ARGS, toolCallId, delta: JSON.stringify({ op: p.op, target: p.target, body: p.body, attrs: p.attrs, flags: p.flags }) },
30
30
  { type: EventType.TOOL_CALL_END, toolCallId },
31
31
  ];
32
32
  };
@@ -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;AAQlF,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,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AAK,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import type { JsonSchema } from "@plurnk/plurnk-contracts";
2
+ export type AguiActionScope = "worldless" | "workspace" | "worker";
3
+ export interface AguiActionContract {
4
+ readonly scope: AguiActionScope;
5
+ readonly inputSchema: JsonSchema;
6
+ readonly outputSchema: JsonSchema;
7
+ }
8
+ export interface AguiNotificationContract {
9
+ readonly payloadSchema: JsonSchema;
10
+ }
11
+ export declare const AGUI_BUILTIN_ACTIONS: Readonly<{
12
+ ping: AguiActionContract;
13
+ discover: AguiActionContract;
14
+ "providers.list": AguiActionContract;
15
+ "models.list": AguiActionContract;
16
+ "workspace.list": AguiActionContract;
17
+ "workspace.create": AguiActionContract;
18
+ "workspace.attach": AguiActionContract;
19
+ "workspace.workers": AguiActionContract;
20
+ "log.read": AguiActionContract;
21
+ "loop.inject": AguiActionContract;
22
+ "loop.cancel": AguiActionContract;
23
+ "workspace.prompts": AguiActionContract;
24
+ "workspace.rename": AguiActionContract;
25
+ "workspace.constrain": AguiActionContract;
26
+ "workspace.unconstrain": AguiActionContract;
27
+ "workspace.constraints": AguiActionContract;
28
+ "workspace.derivation": AguiActionContract;
29
+ "entry.read": AguiActionContract;
30
+ "op.exec": AguiActionContract;
31
+ "op.parse": AguiActionContract;
32
+ "workspace.members": AguiActionContract;
33
+ "op.look": AguiActionContract;
34
+ "run.fork": AguiActionContract;
35
+ "worker.model.get": AguiActionContract;
36
+ "worker.model.set": AguiActionContract;
37
+ "worker.child.set": AguiActionContract;
38
+ "worker.reasoning.get": AguiActionContract;
39
+ "worker.reasoning.set": AguiActionContract;
40
+ "worker.settings.get": AguiActionContract;
41
+ "worker.settings.set": AguiActionContract;
42
+ }>;
43
+ export declare const AGUI_NOTIFICATIONS: Readonly<{
44
+ "log/entry": AguiNotificationContract;
45
+ "loop/terminated": AguiNotificationContract;
46
+ "loop/proposal": AguiNotificationContract;
47
+ "loop/interaction": AguiNotificationContract;
48
+ "notice/event": AguiNotificationContract;
49
+ "reasoning/event": AguiNotificationContract;
50
+ "stream/event": AguiNotificationContract;
51
+ "stream/concluded": AguiNotificationContract;
52
+ "workspace/branch-batch": AguiNotificationContract;
53
+ }>;
54
+ export type AguiBuiltinActionName = keyof typeof AGUI_BUILTIN_ACTIONS;
55
+ export type AguiNotificationName = keyof typeof AGUI_NOTIFICATIONS;
56
+ //# sourceMappingURL=AguiSurface.d.ts.map
@@ -0,0 +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,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEnE,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;AAuED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FwB,CAAC;AA4B1D,eAAO,MAAM,kBAAkB;;;;;;;;;;EA4DgC,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC"}