@plurnk/plurnk-agui 1.7.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 +132 -65
- package/dist/AguiPlus.d.ts +2 -1
- package/dist/AguiPlus.d.ts.map +1 -1
- package/dist/AguiPlus.js +6 -6
- package/dist/AguiPlus.js.map +1 -1
- package/dist/AguiSurface.d.ts +56 -0
- package/dist/AguiSurface.d.ts.map +1 -0
- package/dist/AguiSurface.js +233 -0
- package/dist/AguiSurface.js.map +1 -0
- package/dist/EventRouter.d.ts.map +1 -1
- package/dist/EventRouter.js +8 -0
- package/dist/EventRouter.js.map +1 -1
- package/dist/Module.d.ts +3 -3
- package/dist/Module.d.ts.map +1 -1
- package/dist/Module.js +228 -128
- package/dist/Module.js.map +1 -1
- package/dist/Portal.d.ts +4 -6
- package/dist/Portal.d.ts.map +1 -1
- package/dist/Portal.js +9 -8
- package/dist/Portal.js.map +1 -1
- package/dist/ProposalHitl.d.ts +3 -3
- package/dist/ProposalHitl.d.ts.map +1 -1
- package/dist/ProposalHitl.js +2 -2
- package/dist/ProposalHitl.js.map +1 -1
- package/dist/Translator.d.ts +2 -1
- package/dist/Translator.d.ts.map +1 -1
- package/dist/Translator.js +171 -34
- package/dist/Translator.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +14 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/DaemonSeam.d.ts +0 -174
- package/dist/DaemonSeam.d.ts.map +0 -1
- package/dist/DaemonSeam.js +0 -7
- package/dist/DaemonSeam.js.map +0 -1
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
|
|
4
|
-
|
|
5
|
-
HTTP/SSE. Core's numbers and semantics pass through; the module
|
|
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
|
|
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
|
|
@@ -43,26 +43,48 @@ One accepted Run or daemon notification produces zero-or-more AG-UI events:
|
|
|
43
43
|
| schema-valid `RunAgentInput` | `RUN_STARTED` + initial `STATE_SNAPSHOT` |
|
|
44
44
|
| `log/entry` turn boundary | `STEP_FINISHED` + `STEP_STARTED` (`turn-<id>`) |
|
|
45
45
|
| `log/entry` op=PLAN (model) | `ACTIVITY_SNAPSHOT` {§agui-plan-activity} |
|
|
46
|
-
| `log/entry` op=SEND (model) | `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
|
|
46
|
+
| `log/entry` op=SEND (model) | Optional readable-reasoning sequence {§agui-readable-reasoning}, then `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
|
|
47
47
|
| `log/entry` other op (model) | `TOOL_CALL_START/ARGS/END` (+ `TOOL_CALL_RESULT` when rx exists) |
|
|
48
|
-
| `log/entry` actionless `kind=
|
|
48
|
+
| `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. |
|
|
49
49
|
| `log/entry` origin≠model | `CUSTOM plurnk.ambient` (foists, deltas, narrations) |
|
|
50
50
|
| client-owned `loop/proposal` | `TOOL_CALL_START/ARGS/END`, then `RUN_FINISHED` with an interrupt outcome |
|
|
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
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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:
|
|
65
|
-
| reattach | `ActivityMessage { id:
|
|
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` |
|
|
71
|
+
|
|
72
|
+
§agui-readable-reasoning **Readable provider reasoning uses AG-UI's standard
|
|
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.
|
|
66
88
|
|
|
67
89
|
- **An op row IS a tool call** — its `coordinate` is the `toolCallId`, its tx the args (one
|
|
68
90
|
delta: a dispatched plurnk op is atomic), its rx the result. The log-shaped richness the
|
|
@@ -70,7 +92,7 @@ same log identity and verbatim goals:
|
|
|
70
92
|
`plurnk.ambient`/`TOOL_CALL_RESULT` payloads.
|
|
71
93
|
- §agui-encrypted-reasoning **Encrypted reasoning projects only onto an entity
|
|
72
94
|
AG-UI actually created.** Core supplies the exact normalized provider-detail
|
|
73
|
-
list on
|
|
95
|
+
list on an actionless model source row's `attrs.reasoning`.
|
|
74
96
|
No synthetic operation is introduced. The provider detail `id` is
|
|
75
97
|
forensic identity, not an AG-UI entity ID ({§provider-encrypted-reasoning}).
|
|
76
98
|
|
|
@@ -116,10 +138,10 @@ ignore the extension; PLURNK clients consume the same contracts-owned shape as
|
|
|
116
138
|
every other daemon surface.
|
|
117
139
|
|
|
118
140
|
- §agui-row-channel **The row channel** — every log row ALSO rides `CUSTOM plurnk.row`
|
|
119
|
-
carrying the
|
|
120
|
-
core projection.
|
|
121
|
-
|
|
122
|
-
|
|
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.
|
|
123
145
|
- **The gauge starts true** — `RUN_STARTED` is followed by a `STATE_SNAPSHOT` carrying the
|
|
124
146
|
daemon's `providers.list` truth (the effective input capacity, the active model), then
|
|
125
147
|
`STATE_DELTA`s. A dropped SSE stream cancels the loop (`loop.cancel`) — the frontend hanging
|
|
@@ -127,7 +149,7 @@ every other daemon surface.
|
|
|
127
149
|
|
|
128
150
|
- §agui-replay **Reattach replays** — a rediscovered thread (the module restarted, a second
|
|
129
151
|
frontend arrived) attaches to its existing workspace by name→id and opens ORIENTED: the model
|
|
130
|
-
worker's PLAN
|
|
152
|
+
worker's current PLAN activity and SEND speech replay as `MESSAGES_SNAPSHOT`; everything else stays
|
|
131
153
|
reachable via live `plurnk.row`. Pending proposals and client interactions remain durable while
|
|
132
154
|
their operation owners are live and are presented as interrupts when the owning conversation is
|
|
133
155
|
resumed; a days-old question is discoverable, never converted into a mystery hang.
|
|
@@ -150,7 +172,7 @@ interrupt carries its optional `message` and `responseSchema`. A resolved resume
|
|
|
150
172
|
the generic resolved payload, while AG-UI cancellation becomes interaction cancellation. AG-UI
|
|
151
173
|
never sees or reconstructs an upstream protocol's continuation state.
|
|
152
174
|
|
|
153
|
-
§agui-proposal-disposition **AG-UI consumes disposition; it does not infer policy.** Both the live `loop/proposal` payload and `
|
|
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:
|
|
154
176
|
|
|
155
177
|
| Disposition owner | AG-UI behavior |
|
|
156
178
|
| ----------------- | ----------------------------------------------------------------------------- |
|
|
@@ -159,10 +181,11 @@ never sees or reconstructs an upstream protocol's continuation state.
|
|
|
159
181
|
|
|
160
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.
|
|
161
183
|
|
|
162
|
-
§agui-provider-policy-forwarding A textual Run forwards `
|
|
163
|
-
`
|
|
164
|
-
|
|
165
|
-
an omitted service-default
|
|
184
|
+
§agui-provider-policy-forwarding A textual Run forwards `selector` and
|
|
185
|
+
`childSelector` from `forwardedProps.plurnk` unchanged to `ApplicationPort.runLoop`.
|
|
186
|
+
Each string is one declared alias or exact provider/model route; an explicit
|
|
187
|
+
`childSelector: null` remains distinguishable from an omitted service-default
|
|
188
|
+
selection.
|
|
166
189
|
|
|
167
190
|
## §agui-management-plane The action surface
|
|
168
191
|
|
|
@@ -174,11 +197,11 @@ and a standard interrupt resume are not management actions and have no invented
|
|
|
174
197
|
flowchart LR
|
|
175
198
|
client["AG-UI client"] --> run["POST RunAgentInput"]
|
|
176
199
|
run --> classify{"Input form"}
|
|
177
|
-
classify -->|"textual user message"| loop["
|
|
178
|
-
classify -->|"RunAgentInput.resume"| resume["
|
|
200
|
+
classify -->|"textual user message"| loop["ApplicationPort.runLoop"]
|
|
201
|
+
classify -->|"RunAgentInput.resume"| resume["ApplicationPort proposal / interaction resolution"]
|
|
179
202
|
classify -->|"forwardedProps.plurnk.action"| actions{"AG-UI action registry"}
|
|
180
|
-
actions --> builtIn["
|
|
181
|
-
actions --> extension["Scoped
|
|
203
|
+
actions --> builtIn["Advertised schema admission<br/>and typed ApplicationPort call"]
|
|
204
|
+
actions --> extension["Scoped ApplicationPort.invokeModuleAction"]
|
|
182
205
|
loop --> events["Core event source"]
|
|
183
206
|
resume --> events
|
|
184
207
|
builtIn --> events
|
|
@@ -202,37 +225,67 @@ successfully transported management Run; it does not turn the Run into
|
|
|
202
225
|
|--------------------------|-----------|------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
|
|
203
226
|
| `ping` | Worldless | none | AG-UI-local liveness; returns `{}`. |
|
|
204
227
|
| `discover` | Worldless | none | AG-UI-local public membership manifest ({§discovery}). |
|
|
205
|
-
| `providers.list` | Worldless | none | `
|
|
206
|
-
| `
|
|
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`. |
|
|
207
231
|
| `workspace.create` | Worldless | `name?`, `projectRoot?`, `settings?`, `constraints?` | Creates or attaches the exact named world, or asks core to create an automatically named world. |
|
|
208
|
-
| `workspace.attach` | Worldless | `id`, `workerId?` | `
|
|
209
|
-
| `workspace.workers` | Workspace | `id?` | `
|
|
210
|
-
| `log.read` | Workspace | `workerId?`, log-coordinate filters | `
|
|
211
|
-
| `loop.inject` | Workspace | `prompt` | `
|
|
212
|
-
| `loop.cancel` | Workspace |
|
|
213
|
-
| `workspace.prompts` | Workspace | `limit?` | `
|
|
214
|
-
| `workspace.rename` | Workspace | `name` | `
|
|
215
|
-
| `workspace.constrain` | Workspace | `effect`, `glob` | `
|
|
216
|
-
| `workspace.unconstrain` | Workspace | `effect`, `glob` | `
|
|
217
|
-
| `workspace.constraints` | Workspace | none | `
|
|
218
|
-
| `workspace.derivation` | Workspace | none | `
|
|
219
|
-
| `entry.read` | Workspace | `target`, `workerId?`, `channel?`, `offset?` | Calls `
|
|
220
|
-
| `op.exec` | Workspace | `command` | Constructs one EXEC statement and calls `
|
|
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. |
|
|
221
245
|
| `op.parse` | Workspace | `text` | Parses and projects PLURNK text under {§agui-op-parse}. |
|
|
222
|
-
| `workspace.members` | Workspace | none | `
|
|
246
|
+
| `workspace.members` | Workspace | none | `ApplicationPort.listMembers`. |
|
|
223
247
|
| `op.look` | Workspace | `text` | Admits one LOOK under {§agui-op-look}, rewrites it to READ, and calls core's no-log `look` projection. |
|
|
224
|
-
| `run.fork` | Workspace | `name?` | `
|
|
225
|
-
|
|
|
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}).
|
|
259
|
+
|
|
260
|
+
§agui-worker-model-actions **Worker model selection is server-backed.**
|
|
261
|
+
`worker.model.get`, `worker.model.set`, and `worker.child.set` operate on the
|
|
262
|
+
thread's bound conversation worker under {§worker-model-selection}. They are
|
|
263
|
+
the client's durable `/model` and `/child`; a client must not reassert a
|
|
264
|
+
model on every loop. The get action returns the worker's resolved durable
|
|
265
|
+
model and spawn override (`null` for an unset worker or inherit); the set
|
|
266
|
+
actions accept one alias-or-exact-route selector, resolve and persist before returning, failing with the owning
|
|
267
|
+
problem when the selector is unresolvable or the daemon is deliberately
|
|
268
|
+
modelless.
|
|
269
|
+
|
|
270
|
+
§agui-worker-reasoning-actions **Reasoning policy has its own worker action.**
|
|
271
|
+
`worker.reasoning.get` returns the durable policy and the supported-policy
|
|
272
|
+
intersection of the selected model and optional spawn model. `worker.reasoning.set` accepts one policy from
|
|
273
|
+
{§reasoning-policy-wire}; core owns its durable {§worker-reasoning-policy}
|
|
274
|
+
validation and refuses mutation while a
|
|
275
|
+
loop is active or parked.
|
|
226
276
|
|
|
227
277
|
§agui-module-action-scope **An extension action uses the same management plane,
|
|
228
|
-
not a private endpoint.** `
|
|
229
|
-
`{ name, scope }` descriptors
|
|
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
|
|
230
281
|
cannot establish a workspace. A workspace action follows ordinary thread
|
|
231
282
|
binding, resolves the client envelope first, and invokes core with
|
|
232
283
|
`{ scope: "workspace", workspaceId: envelope.workspaceId }`; an `id`,
|
|
233
284
|
`workspaceId`, or similarly named owner parameter cannot override that
|
|
234
|
-
identity.
|
|
235
|
-
|
|
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.
|
|
236
289
|
|
|
237
290
|
### §agui-op-parse Parsed-operation projection
|
|
238
291
|
|
|
@@ -241,7 +294,7 @@ preserves the parser's source order in its `results` array:
|
|
|
241
294
|
|
|
242
295
|
| Parser output | AG-UI result |
|
|
243
296
|
|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
244
|
-
| Statement before the tail boundary | Its corresponding `
|
|
297
|
+
| Statement before the tail boundary | Its corresponding `ApplicationPort.dispatchClientAction` result in the statement's position |
|
|
245
298
|
| Bounded hard error | A 400 `agui/action/parse-failed` result in the error's position, preserving parser detail, line, column, source, and severity |
|
|
246
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 |
|
|
247
300
|
| Text item | No result; text is not dispatchable |
|
|
@@ -261,7 +314,7 @@ a parser fact.
|
|
|
261
314
|
| First positioned diagnostic | 400 `agui/action/parse-failed`, preserving parser detail, line, column, source, and severity |
|
|
262
315
|
| No diagnostic, with `unparsedTail` | 400 `agui/action/parse-failed`, preserving its reason and position with `source: "grammar"` and `severity: "error"` |
|
|
263
316
|
| Text item, zero or multiple statements, or non-LOOK | 400 `agui/action/invalid-action-parameters` naming the observed admission fact |
|
|
264
|
-
| Exactly one LOOK and no other parser fact | Change only `op` to READ and call `
|
|
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 |
|
|
265
318
|
|
|
266
319
|
Parser failures use `stage: "parsing"`; action-shape failures use
|
|
267
320
|
`stage: "action-validation"`. Both are non-retryable.
|
|
@@ -269,19 +322,26 @@ Parser failures use `stage: "parsing"`; action-shape failures use
|
|
|
269
322
|
§agui-module-actions **One public action namespace.** Core rejects empty and
|
|
270
323
|
duplicate extension registrations ({§module-action-registration}). At module
|
|
271
324
|
startup AG-UI rejects any extension name colliding with a built-in before it
|
|
272
|
-
opens the listener.
|
|
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
|
|
273
328
|
boundary unchanged; an unexpected handler exception becomes the generic
|
|
274
329
|
`action-failed` Problem without exposing private exception text.
|
|
275
330
|
|
|
276
|
-
### §discovery Discovery
|
|
331
|
+
### §discovery Discovery contract
|
|
277
332
|
|
|
278
|
-
The `discover` action returns
|
|
279
|
-
|
|
333
|
+
The `discover` action returns the complete schema-bearing
|
|
334
|
+
{§agui-discovery-contract} projection of the executable registry:
|
|
280
335
|
|
|
281
336
|
```ts
|
|
282
337
|
type Discovery = {
|
|
283
|
-
|
|
284
|
-
|
|
338
|
+
schemaVersion: 1;
|
|
339
|
+
actions: Record<string, {
|
|
340
|
+
scope: "worldless" | "workspace";
|
|
341
|
+
inputSchema: JsonSchema;
|
|
342
|
+
outputSchema: JsonSchema;
|
|
343
|
+
}>;
|
|
344
|
+
notifications: Record<string, { payloadSchema: JsonSchema }>;
|
|
285
345
|
display: ClientDisplayCapabilities;
|
|
286
346
|
};
|
|
287
347
|
```
|
|
@@ -290,7 +350,7 @@ type Discovery = {
|
|
|
290
350
|
({§client-display-capabilities}). AG-UI adds no fallback, font, theme, or packet
|
|
291
351
|
policy.
|
|
292
352
|
|
|
293
|
-
`
|
|
353
|
+
`actions` contains the 30 built-ins in the table plus every registered module
|
|
294
354
|
action. `notifications` contains exactly these externally projected daemon
|
|
295
355
|
event families:
|
|
296
356
|
|
|
@@ -299,13 +359,18 @@ event families:
|
|
|
299
359
|
| `log/entry` |
|
|
300
360
|
| `loop/terminated` |
|
|
301
361
|
| `loop/proposal` |
|
|
362
|
+
| `loop/interaction` |
|
|
302
363
|
| `notice/event` |
|
|
364
|
+
| `reasoning/event` |
|
|
303
365
|
| `stream/event` |
|
|
304
366
|
| `stream/concluded` |
|
|
305
367
|
| `workspace/branch-batch` |
|
|
306
368
|
|
|
307
|
-
|
|
308
|
-
|
|
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.
|
|
309
374
|
|
|
310
375
|
`loop.inject`'s steered effect streams on the original worker's open SSE.
|
|
311
376
|
`loop.cancel` is its counterpart: the addressable spelling of the SSE-hangup
|
|
@@ -327,14 +392,16 @@ into the conversation a generic frontend renders.
|
|
|
327
392
|
Workspace information fans to every open AG-UI Run: ambient rows and stream activity
|
|
328
393
|
remain visible across the workspace, with each SSE
|
|
329
394
|
using its own render router. Terminal control does not fan. A message AG-UI Run binds
|
|
330
|
-
to the exact `loopId` returned by `
|
|
395
|
+
to the exact `loopId` returned by `ApplicationPort.runLoop`; an interrupt-resume AG-UI Run binds to the
|
|
331
396
|
pending item's persisted `loopId` before resolving it. Only that loop's
|
|
332
397
|
`loop/terminated` event may emit `plurnk.terminated` and close the SSE.
|
|
333
398
|
The custom event preserves the daemon's exact universal `result`; failures use
|
|
334
399
|
the Problem `type` as the AG-UI error code and `detail` as its message. The
|
|
335
400
|
module never reconstructs a failure from a status, summary, or exception text.
|
|
336
|
-
Stopped-world tool calls and interrupt outcomes route
|
|
337
|
-
|
|
401
|
+
Stopped-world tool calls and interrupt outcomes first route to open Runs bound to
|
|
402
|
+
their persisted loop. When no Run owns that loop, they route to their owning
|
|
403
|
+
worker's Runs so an action-produced interrupt can settle its initiating Run. They
|
|
404
|
+
never interrupt a concurrent Run while an exact loop owner is live. Terminations
|
|
338
405
|
that race ahead of the `runLoop` acknowledgement are held until
|
|
339
406
|
the loop identity is known. A sibling, child, or concurrent loop can therefore
|
|
340
407
|
remain visible as topology without ending or relabelling this AG-UI Run.
|
|
@@ -367,7 +434,7 @@ values for direct in-process composition. The listener address remains service-o
|
|
|
367
434
|
|
|
368
435
|
`POST /` (or `/agui`) accepts a schema-valid AG-UI `RunAgentInput`: the last textual
|
|
369
436
|
`user` message becomes the
|
|
370
|
-
`
|
|
437
|
+
`ApplicationPort.runLoop` prompt (`maxTurns`/`flags.auto` from the forwarded PLURNK
|
|
371
438
|
properties or module defaults); the response is `text/event-stream`,
|
|
372
439
|
one `data:` line per event, ending after `RUN_FINISHED`/`RUN_ERROR`. Multimodal user content
|
|
373
440
|
is rejected until the model-loop seam supports it deliberately. Loop auto never answers
|
package/dist/AguiPlus.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Interrupt, ResumeEntry } from "@ag-ui/core";
|
|
|
3
3
|
import type { ClientInteractionProjection, ClientInteractionResolution, ProblemDetails } from "@plurnk/plurnk-contracts";
|
|
4
4
|
export declare const proposalToolCallId: (logEntryId: number) => string;
|
|
5
5
|
export declare const logEntryIdFromToolCallId: (toolCallId: string) => number | null;
|
|
6
|
-
export declare const proposalToolName: (
|
|
6
|
+
export declare const proposalToolName: (_op: string) => string;
|
|
7
7
|
export declare const proposalToolCall: (p: ProposalNotification) => AguiEvent[];
|
|
8
8
|
export declare const proposalInterrupt: (logEntryId: number) => Interrupt;
|
|
9
9
|
export interface Resolution {
|
|
@@ -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 {
|
package/dist/AguiPlus.d.ts.map
CHANGED
|
@@ -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,gBAAgB,
|
|
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,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,QA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GAAG,QAAQ,CAAA;KAAE,CAAC,CAAC;CACxF;AACD,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AASD,eAAO,MAAM,aAAa,MAAO,aAAa,KAAG,SAG/C,CAAC;AACH,eAAO,MAAM,UAAU,YAAa,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,KAAG,SAA8D,CAAC;AAS1J,MAAM,WAAW,aAAa;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE;AAChF,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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// engine state → AG-UI events, and the inverse resume-mapping. No transport, no I/O
|
|
4
4
|
// — so it ports into the in-process module unchanged when the seam lands.
|
|
5
5
|
//
|
|
6
|
-
// §1 proposals
|
|
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
9
|
// ── §1 — stop-the-world → tool-call ──────────────────────────────────
|
|
@@ -16,17 +16,17 @@ export const logEntryIdFromToolCallId = (toolCallId) => {
|
|
|
16
16
|
};
|
|
17
17
|
// Tool-call NAME — AG-UI terminology all the way up to the seam: the client-facing
|
|
18
18
|
// name is AG-UI-conventional, not plurnk-namespaced.
|
|
19
|
-
// A side-effecting proposal is an approval request
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
export const proposalToolName = (
|
|
19
|
+
// A side-effecting proposal is an approval request. The plurnk correlation rides
|
|
20
|
+
// the opaque toolCallId (`prop:<logEntryId>`), so the generic name carries no
|
|
21
|
+
// plurnk vocabulary upward.
|
|
22
|
+
export const proposalToolName = (_op) => "request_approval";
|
|
23
23
|
// The worker's tail when it hits a pause: the tool-call, then the CALLER emits
|
|
24
24
|
// RUN_FINISHED to terminate. The loop stays paused in-engine — untouched.
|
|
25
25
|
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,
|
|
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
|
};
|
package/dist/AguiPlus.js.map
CHANGED
|
@@ -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,
|
|
1
|
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;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAA6D,EAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAU1J,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,cAAuB,EAAwB,EAAE;IACzE,MAAM,MAAM,GAAI,cAAgE,EAAE,MAAM,EAAE,MAAM,CAAC;IACjG,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,IAAI,GAAI,MAA6B,CAAC,IAAI,CAAC;IACjD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,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"}
|
|
@@ -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"}
|