@plurnk/plurnk-agui 1.16.5 → 1.17.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 +5 -16
- package/README.md +26 -0
- package/SPEC.md +60 -48
- package/dist/AguiPlus.d.ts +12 -9
- package/dist/AguiPlus.d.ts.map +1 -1
- package/dist/AguiPlus.js +23 -21
- package/dist/AguiPlus.js.map +1 -1
- package/dist/AguiSurface.d.ts +2 -3
- package/dist/AguiSurface.d.ts.map +1 -1
- package/dist/AguiSurface.js +13 -15
- package/dist/AguiSurface.js.map +1 -1
- package/dist/BuiltinActions.d.ts.map +1 -1
- package/dist/BuiltinActions.js +13 -26
- package/dist/BuiltinActions.js.map +1 -1
- package/dist/Module.d.ts.map +1 -1
- package/dist/Module.js +23 -8
- package/dist/Module.js.map +1 -1
- package/dist/Portal.d.ts.map +1 -1
- package/dist/Portal.js +28 -0
- package/dist/Portal.js.map +1 -1
- package/dist/RunHandler.d.ts +3 -1
- package/dist/RunHandler.d.ts.map +1 -1
- package/dist/RunHandler.js +11 -4
- package/dist/RunHandler.js.map +1 -1
- package/dist/Translator.d.ts +1 -4
- package/dist/Translator.d.ts.map +1 -1
- package/dist/Translator.js +80 -145
- package/dist/Translator.js.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/.env.defaults
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
# @plurnk/plurnk-agui —
|
|
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
|
|
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
|
-
#
|
|
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
|
@@ -35,6 +35,10 @@ does not recompute them.
|
|
|
35
35
|
Process-local bindings use the complete `(workspace, threadId)` identity; equal thread names
|
|
36
36
|
in different workspaces never share an envelope, Worker, replay, state, or active Run.
|
|
37
37
|
`loop.inject`, `loop.cancel`, and `run.fork` operate on the THREAD's conversation.
|
|
38
|
+
`loop.inject` and `loop.cancel` steer a loop already running in a world, so they attach only:
|
|
39
|
+
a workspace name that does not exist is the client's error, answered 404
|
|
40
|
+
`workspace-not-found` with nothing created — never a second world minted after the name
|
|
41
|
+
and answered there. Every other request may bring the world into being.
|
|
38
42
|
`log.read` and `entry.read` default there and may explicitly select another workspace worker.
|
|
39
43
|
Extended context persists across AG-UI Runs because the worker's log does.
|
|
40
44
|
- §agui-run-authority **AG-UI owns the client lifecycle** — `threadId`, `runId`,
|
|
@@ -51,28 +55,30 @@ One accepted Run or daemon notification produces zero-or-more AG-UI events:
|
|
|
51
55
|
| ------------------------------------------ | ------------ |
|
|
52
56
|
| schema-valid `RunAgentInput` | `RUN_STARTED` + initial `STATE_SNAPSHOT` |
|
|
53
57
|
| `forwardedProps.plurnk.mode = "sync"` | Durable conversation `MESSAGES_SNAPSHOT`, then pending interrupt, live observation, or `RUN_FINISHED` {§agui-conversation-sync} |
|
|
54
|
-
| `log/entry` turn
|
|
55
|
-
| `log/entry` op=
|
|
56
|
-
|
|
|
58
|
+
| `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. |
|
|
59
|
+
| `log/entry` op=TASK (model) | `ACTIVITY_SNAPSHOT` {§agui-plan-activity} + `CUSTOM plurnk.send`; no assistant speech |
|
|
60
|
+
| Successful targetless model SEND | Optional readable-reasoning sequence {§agui-readable-reasoning}, then `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
|
|
61
|
+
| Directed or unsuccessful SEND | Ordinary tool-call operation events; never assistant speech |
|
|
57
62
|
| `log/entry` other op (model) | `TOOL_CALL_START/ARGS/END` (+ `TOOL_CALL_RESULT` when rx exists) |
|
|
58
|
-
| `log/entry` actionless `kind=
|
|
63
|
+
| `log/entry` actionless `kind=emissionAttempt` | Forensic row only; no assistant speech or reasoning replay. |
|
|
64
|
+
| `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
65
|
| `log/entry` origin≠model | `CUSTOM plurnk.ambient` (foists, deltas, narrations) |
|
|
60
66
|
| 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
67
|
| `loop/packet` | `STATE_DELTA` replacing the bound thread's loop id, lifecycle, and exact packet count |
|
|
62
68
|
| `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
69
|
| 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
|
|
70
|
+
| `notice/event` | `CUSTOM plurnk.notice`; routine derivation lifecycle uses only `STATE /plurnk/status/activity`, while warnings/errors also retain their diagnostic Notice. |
|
|
65
71
|
| `reasoning/event` | Standard live `REASONING_START` → `REASONING_MESSAGE_START` → one or more `REASONING_MESSAGE_CONTENT` → `REASONING_MESSAGE_END` → `REASONING_END` {§agui-readable-reasoning} |
|
|
66
72
|
| `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
73
|
| `workspace/branch-batch` | `CUSTOM plurnk.branch_batch` with the daemon's full queued/running/completed/failed/recovery-required lifecycle payload |
|
|
68
74
|
|
|
69
|
-
§agui-plan-activity **
|
|
70
|
-
ACP projection of the model's latest {§plan-value} installment, produced only at
|
|
75
|
+
§agui-plan-activity **Task inventory is replaceable PLAN activity, not reasoning.** PLAN activity is the
|
|
76
|
+
ACP projection of the model's latest TASK {§plan-value} installment, produced only at
|
|
71
77
|
this standards boundary under {§plan-acp-projection}. Provider reasoning is a
|
|
72
78
|
separate channel, so PLAN never projects into AG-UI `REASONING_*` events. The thread-stable
|
|
73
79
|
`<threadId>/plan` identity makes every live update replace the prior activity;
|
|
74
|
-
reattach includes only the newest model
|
|
75
|
-
`tx.body` on every client-facing
|
|
80
|
+
reattach includes only the newest model inventory. The same ACP projection replaces
|
|
81
|
+
`tx.body` on every client-facing TASK `CUSTOM plurnk.row` and
|
|
76
82
|
`CUSTOM plurnk.ambient`; all other row and transaction fields remain intact:
|
|
77
83
|
|
|
78
84
|
| Projection | Standard representation |
|
|
@@ -89,46 +95,42 @@ the failed request's partial reasoning. Foreign-worker and BARE reasoning never
|
|
|
89
95
|
enter the thread. Failed or rejected requests may therefore leave honest
|
|
90
96
|
transient reasoning that is not replayed.
|
|
91
97
|
|
|
92
|
-
Core also derives
|
|
93
|
-
durable packet ({§methods-readable-reasoning}). When that value
|
|
94
|
-
delivered by the completed live stream, projection emits it
|
|
95
|
-
the
|
|
96
|
-
|
|
98
|
+
Core also derives optional complete `reasoning` on admitted SEND and disposition
|
|
99
|
+
rows from their durable packet ({§methods-readable-reasoning}). When that value
|
|
100
|
+
was not already delivered by the completed live stream, projection emits it
|
|
101
|
+
atomically before the turn's first speech or inventory under `<OP identity>/reasoning`.
|
|
102
|
+
Subsequent rows in the same turn do not repeat it. A standard interrupt may divide one durable Loop across consecutive
|
|
97
103
|
AG-UI Runs; the Run B projection inherits Run A's delivered-reasoning evidence
|
|
98
104
|
before the stopped operation is released. Reattach replaces transient attempt presentation with the durable
|
|
99
|
-
accepted `ReasoningMessage`
|
|
105
|
+
accepted `ReasoningMessage` once per turn, before its speech or inventory in
|
|
100
106
|
`MESSAGES_SNAPSHOT`. Empty evidence emits nothing, PLAN never substitutes for
|
|
101
107
|
reasoning ({§agui-plan-activity}), and the SEND row still precedes its text
|
|
102
108
|
sequence.
|
|
103
109
|
|
|
104
110
|
- **An op row IS a tool call** — its `coordinate` is the `toolCallId`, its tx the args (one
|
|
105
111
|
delta: a dispatched plurnk op is atomic), its rx the result. The log-shaped richness the
|
|
106
|
-
core vocabulary can't hold (
|
|
112
|
+
core vocabulary can't hold (curation metadata, tags, coordinates) stays on the row inside
|
|
107
113
|
`plurnk.ambient`/`TOOL_CALL_RESULT` payloads.
|
|
108
|
-
- §agui-encrypted-reasoning **
|
|
109
|
-
AG-UI
|
|
110
|
-
|
|
111
|
-
|
|
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.
|
|
114
|
+
- §agui-encrypted-reasoning **Opaque provider state is not a client conversation.**
|
|
115
|
+
AG-UI emits no encrypted-reasoning events or message values. Original provider
|
|
116
|
+
evidence retains those fields under {§encrypted-reasoning-carrier}; readable
|
|
117
|
+
reasoning streams and conversation replay remain {§agui-readable-reasoning}.
|
|
126
118
|
- §agui-custom-namespace **The custom namespace** — plurnk-specific metadata rides
|
|
127
119
|
`CUSTOM` events named `plurnk.*` (`plurnk.send`, `plurnk.ambient`,
|
|
128
120
|
`plurnk.notice`, `plurnk.stream`, `plurnk.branch_batch`, `plurnk.terminated` — the full loop
|
|
129
121
|
outcome and {§provider-accounting} the gauge `STATE_DELTA` cannot represent). Generic frontends skip unknown customs; plurnk-aware frontends render
|
|
130
122
|
them richly. Nothing plurnk-specific ever masquerades as a core event.
|
|
131
123
|
|
|
124
|
+
§agui-status-children **Children are counted by the daemon, never inferred.** `status.children`
|
|
125
|
+
is the bound Worker's alive direct children — `queued`, `running`, or `parked` under
|
|
126
|
+
{§loop-lifecycle-vocabulary}; a parked child still owes a result and is exactly the one a user
|
|
127
|
+
hops to. The module computes it from `ApplicationPort.listWorkers({ parentWorkerId })` for every
|
|
128
|
+
snapshot and whole-gauge replacement, and republishes `STATE_DELTA /plurnk/status/children` only
|
|
129
|
+
when the count changes: after another worker's `loop/terminated` or `loop/packet`, or after the
|
|
130
|
+
bound Worker's own `WORK`, `FORK`, or `KILL` row lands. Clients render the number as their child
|
|
131
|
+
indicator and never poll the directory to keep it honest (topology is navigation, not a dashboard:
|
|
132
|
+
the client hops to a child rather than watching it).
|
|
133
|
+
|
|
132
134
|
§agui-numbers-passthrough **Gauge numbers pass through verbatim.** The module
|
|
133
135
|
never recomputes the daemon's gauge or promotes accounting into application
|
|
134
136
|
state paths that could be mistaken for standard AG-UI fields.
|
|
@@ -137,9 +139,12 @@ state paths that could be mistaken for standard AG-UI fields.
|
|
|
137
139
|
|:--------------------------------------------|:-----------------------------------------|:--------|
|
|
138
140
|
| `snapshot.plurnk.providers[*].inputCapacity` | `providers.list.aliases[*]` | Each provider alias's derived physical input capacity, or `null` when unknown. |
|
|
139
141
|
| `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. |
|
|
142
|
+
| `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
143
|
| `snapshot.plurnk.status.packetCount` | latest `ApplicationLoopProjection.packetCount` | Exact packet-bearing Turn count; packetless Turns and provider retries do not contribute. |
|
|
142
|
-
| `
|
|
144
|
+
| `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. |
|
|
145
|
+
| `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. |
|
|
146
|
+
| `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}). |
|
|
147
|
+
| `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
148
|
| `snapshot.budget` | Run initialization | Creates all four gauge fields as `null`, so subsequent RFC 6902 `replace` operations always address existing values. |
|
|
144
149
|
| `STATE_DELTA /budget/curationWeight` | `loop/terminated.usage.curationWeight` | Latest assembled packet's model-independent curation weight, or `null` when no packet exists. |
|
|
145
150
|
| `STATE_DELTA /budget/curationBudget` | `loop/terminated.usage.curationBudget` | Latest turn's provider-derived curation calibration, or `null` when capacity is unknown. |
|
|
@@ -157,8 +162,8 @@ ignore the extension; PLURNK clients consume the same contracts-owned shape as
|
|
|
157
162
|
every other daemon surface.
|
|
158
163
|
|
|
159
164
|
- §agui-row-channel **The row channel** — every log row ALSO rides `CUSTOM plurnk.row`
|
|
160
|
-
carrying the complete client-facing row (
|
|
161
|
-
alongside its core projection.
|
|
165
|
+
carrying the complete client-facing row (curation metadata, durable tags, coordinate)
|
|
166
|
+
alongside its core projection. TASK `tx.body` follows {§agui-plan-activity}; rich clients
|
|
162
167
|
(TUI/nvim) never receive the internal Plan extension. Generic clients ignore this metadata
|
|
163
168
|
channel.
|
|
164
169
|
- **The gauge starts true** — `RUN_STARTED` is followed by a `STATE_SNAPSHOT` carrying the
|
|
@@ -199,7 +204,7 @@ host owns; decoration and layout are not cross-client protocol facts.
|
|
|
199
204
|
| -------------------- | ------------ | -------------------- | ------ | --------------------------------- |
|
|
200
205
|
| lifecycle, model, packet status | structured output and Unix status trace | mutable prompt status | editor statusline and winbar | process, terminal, and editor lifecycle idioms |
|
|
201
206
|
| PLAN and reasoning | structured record and trace | streaming waterfall blocks | buffer blocks and folds | host-native persistence and navigation |
|
|
202
|
-
| operation receipts and
|
|
207
|
+
| operation receipts and turn disposition | stdout plus structured operation record | scrollback waterfall | worker waterfall buffer | Unix streams versus durable visual surfaces |
|
|
203
208
|
| cancellation, proposals, and interactions | explicit noninteractive policy and exit | terminal review or input | editor review, selection, and input | each host owns human interaction |
|
|
204
209
|
| Problems and Notices | RFC 9457 JSON or stderr | terminal rows | editor diagnostics | presentation only; exact semantics survive |
|
|
205
210
|
| MCP, Skills, and A2A Functionality | state commands | slash commands | `:AI` commands | one `worker.{mcp,skills,agents}.*` action contract |
|
|
@@ -207,6 +212,9 @@ host owns; decoration and layout are not cross-client protocol facts.
|
|
|
207
212
|
One installed-platform journey exercises all three public entry paths against
|
|
208
213
|
the same packed daemon release. It asserts semantic outcomes rather than exact
|
|
209
214
|
glyphs or pixels and names any permitted divergence by its owning host.
|
|
215
|
+
Unexpected Problems fail a successful journey, including asynchronous startup
|
|
216
|
+
failures. A deterministic rejected-provider journey asserts the exact cause,
|
|
217
|
+
one provider request, and failed status after subsequent management reads.
|
|
210
218
|
|
|
211
219
|
## §agui-proposal-resolve Client-owned stop-the-world interactions
|
|
212
220
|
|
|
@@ -304,7 +312,6 @@ successfully transported management Run; it does not turn the Run into
|
|
|
304
312
|
| `loop.cancel` | Workspace | `reason?` | `ApplicationPort.cancelDrain` on the thread's conversation worker. |
|
|
305
313
|
| `workspace.prompts` | Workspace | `limit?` | `ApplicationPort.listPrompts`. |
|
|
306
314
|
| `workspace.rename` | Workspace | `name` | `ApplicationPort.renameWorkspace`. |
|
|
307
|
-
| `workspace.derivation` | Workspace | none | `ApplicationPort.workspaceDerivationStatus`. |
|
|
308
315
|
| `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
316
|
| `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. |
|
|
310
317
|
| `op.parse` | Workspace | `text` | Parses and projects PLURNK text under {§agui-op-parse}. |
|
|
@@ -315,8 +322,8 @@ successfully transported management Run; it does not turn the Run into
|
|
|
315
322
|
| `worker.child.set` | Workspace | `selector` | `ApplicationPort.setWorkerSpawnModel` on the thread's conversation worker; persists the override (`null` means inherit) and returns it. |
|
|
316
323
|
| `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
324
|
| `worker.reasoning.set` | Workspace | `policy` | `ApplicationPort.setWorkerReasoning` on the thread's conversation worker; validates and persists the policy between loops. |
|
|
318
|
-
| `
|
|
319
|
-
| `
|
|
325
|
+
| `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}. |
|
|
326
|
+
| `workspace.capabilities.set` | Workspace | `policy` | `ApplicationPort.setWorkspaceCapabilities` replaces the workspace policy and returns the complete resolver-owned projection {§capability-policy-projection}. |
|
|
320
327
|
| 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
328
|
|
|
322
329
|
§agui-worker-model-actions **Worker model selection is server-backed.**
|
|
@@ -359,23 +366,23 @@ preserves the parser's source order in its `results` array:
|
|
|
359
366
|
| Statement before the tail boundary | Its corresponding `ApplicationPort.dispatchClientAction` result in the statement's position |
|
|
360
367
|
| Bounded hard error | A 400 `agui/action/parse-failed` result in the error's position, preserving parser detail, line, column, source, and severity |
|
|
361
368
|
| `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
369
|
|
|
364
370
|
No statement at or beyond the tail boundary is dispatched. Every parse failure
|
|
365
|
-
uses `stage: "parsing"` and `retryable: false`.
|
|
371
|
+
uses `stage: "parsing"` and `retryable: false`. Outside text is ignored by the
|
|
372
|
+
parser under {§whitespace-contract} and produces no result.
|
|
366
373
|
|
|
367
374
|
### §agui-op-look Single-statement observation admission
|
|
368
375
|
|
|
369
376
|
`op.look` admits a parser result only when it contains exactly one LOOK
|
|
370
|
-
statement, no other item, and no `unparsedTail`.
|
|
371
|
-
|
|
377
|
+
statement, no other item, and no `unparsedTail`. Outside text and whitespace
|
|
378
|
+
produce no item under {§whitespace-contract}. The action never selects a trusted prefix or silently discards
|
|
372
379
|
a parser fact.
|
|
373
380
|
|
|
374
381
|
| Parser result | AG-UI outcome |
|
|
375
382
|
|-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
|
|
376
383
|
| First positioned diagnostic | 400 `agui/action/parse-failed`, preserving parser detail, line, column, source, and severity |
|
|
377
384
|
| No diagnostic, with `unparsedTail` | 400 `agui/action/parse-failed`, preserving its reason and position with `source: "grammar"` and `severity: "error"` |
|
|
378
|
-
|
|
|
385
|
+
| Zero or multiple statements, or non-LOOK | 400 `agui/action/invalid-action-parameters` naming the observed admission fact |
|
|
379
386
|
| 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
387
|
|
|
381
388
|
Parser failures use `stage: "parsing"`; action-shape failures use
|
|
@@ -434,6 +441,11 @@ discovery never reconstructs it from handlers. It does not report plugin
|
|
|
434
441
|
catalogs, package versions, or update availability. Object key order is not a
|
|
435
442
|
contract.
|
|
436
443
|
|
|
444
|
+
§agui-stream-producer Stream updates route to `workerId`, the initiating
|
|
445
|
+
Worker. Resource reads use the canonical workspace address, not a separate
|
|
446
|
+
read perspective. Shared resources neither broadcast to unrelated conversations
|
|
447
|
+
nor hide updates from the producer ({§notifications-stream-event-on-channel-change}).
|
|
448
|
+
|
|
437
449
|
`loop.inject`'s steered effect streams on the original worker's open SSE.
|
|
438
450
|
`loop.cancel` is its counterpart: the addressable spelling of the SSE-hangup
|
|
439
451
|
abort. An action that opens a stream remains one live AG-UI Run; its result is
|
|
@@ -485,7 +497,7 @@ this Run.
|
|
|
485
497
|
`entry.loop_id`) refines it wherever the event is loop-scoped. Branch-batch
|
|
486
498
|
events remain workspace status and route only to conversation Runs. Opening a
|
|
487
499
|
read-only management Run can therefore never replay reasoning, operation rows,
|
|
488
|
-
or
|
|
500
|
+
or turn disposition from an active conversation.
|
|
489
501
|
|
|
490
502
|
## §agui-configuration Module configuration
|
|
491
503
|
|
package/dist/AguiPlus.d.ts
CHANGED
|
@@ -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 =
|
|
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
|
|
65
|
-
|
|
66
|
-
readonly
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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;
|
package/dist/AguiPlus.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agui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AO,EAAE,cAAc,CAAA;CAAE,CAAC;AACpG,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,aAAa,KAAG,SACuB,CAAC"}
|
package/dist/AguiPlus.js
CHANGED
|
@@ -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
|
|
108
|
+
if (value === null)
|
|
105
109
|
return null;
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
119
|
-
|
|
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,
|
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,gEAAgE;AAChE,kFAAkF;AAElF,OAAO,EAAE,SAAS,EAA6C,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"AguiPlus.js","sourceRoot":"","sources":["../src/AguiPlus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iC,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"}
|
package/dist/AguiSurface.d.ts
CHANGED
|
@@ -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
|
-
"
|
|
37
|
-
"
|
|
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;
|
|
@@ -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;
|
|
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;;;;;;;;;;;EAsEgC,CAAC"}
|
package/dist/AguiSurface.js
CHANGED
|
@@ -28,26 +28,23 @@ const workspace = object({
|
|
|
28
28
|
project_root: nullable(string()),
|
|
29
29
|
created_at: NONEMPTY,
|
|
30
30
|
}, ["id", "name", "project_root", "created_at"]);
|
|
31
|
+
// {§application-worker-observation} — kind and lifecycle ride the directory row (#523).
|
|
31
32
|
const worker = object({
|
|
32
33
|
id: POSITIVE,
|
|
33
34
|
name: NONEMPTY,
|
|
34
35
|
created_at: NONEMPTY,
|
|
35
36
|
origin: { enum: ["model", "client", "_plurnk"] },
|
|
36
37
|
parentWorkerId: nullable(POSITIVE),
|
|
37
|
-
|
|
38
|
+
kind: { enum: ["conversation", "fork", "work"] },
|
|
39
|
+
lifecycle: { enum: ["idle", "queued", "running", "parked", "completed", "failed"] },
|
|
40
|
+
}, ["id", "name", "created_at", "origin", "parentWorkerId", "kind", "lifecycle"]);
|
|
38
41
|
const capabilityProjection = ref("CapabilityProjection");
|
|
42
|
+
// {§worker-reasoning-source} — `source` says whether the policy was chosen or seeded.
|
|
39
43
|
const reasoningResult = object({
|
|
40
44
|
policy: nullable(REASONING_POLICY),
|
|
45
|
+
source: { enum: ["default", "explicit"] },
|
|
41
46
|
supportedPolicies: array(REASONING_POLICY),
|
|
42
|
-
}, ["policy", "supportedPolicies"]);
|
|
43
|
-
const derivationStatus = object({
|
|
44
|
-
phase: { enum: ["preparing", "indexing", "complete", "failed"] },
|
|
45
|
-
completed: NONNEGATIVE,
|
|
46
|
-
total: NONNEGATIVE,
|
|
47
|
-
percent: { type: "number", minimum: 0, maximum: 100 },
|
|
48
|
-
message: string(),
|
|
49
|
-
level: { enum: ["info", "error"] },
|
|
50
|
-
}, ["phase", "completed", "total", "percent", "message", "level"]);
|
|
47
|
+
}, ["policy", "source", "supportedPolicies"]);
|
|
51
48
|
const action = (scope, inputSchema, outputSchema) => Object.freeze({ scope, inputSchema, outputSchema });
|
|
52
49
|
export const AGUI_BUILTIN_ACTIONS = Object.freeze({
|
|
53
50
|
ping: action("worldless", EMPTY, EMPTY),
|
|
@@ -96,7 +93,6 @@ export const AGUI_BUILTIN_ACTIONS = Object.freeze({
|
|
|
96
93
|
"loop.cancel": action("workspace", object({ reason: NONEMPTY }), object({ cancelled: { type: "boolean" } }, ["cancelled"])),
|
|
97
94
|
"workspace.prompts": action("workspace", object({ limit: POSITIVE }), object({ prompts: array(string()) }, ["prompts"])),
|
|
98
95
|
"workspace.rename": action("workspace", object({ name: NONEMPTY }, ["name"]), object({ id: POSITIVE, name: NONEMPTY }, ["id", "name"])),
|
|
99
|
-
"workspace.derivation": action("workspace", EMPTY, object({ status: nullable(derivationStatus) }, ["status"])),
|
|
100
96
|
"entry.read": action("workspace", object({
|
|
101
97
|
target: NONEMPTY,
|
|
102
98
|
workerId: POSITIVE,
|
|
@@ -127,8 +123,8 @@ export const AGUI_BUILTIN_ACTIONS = Object.freeze({
|
|
|
127
123
|
policy: REASONING_POLICY,
|
|
128
124
|
},
|
|
129
125
|
}),
|
|
130
|
-
"
|
|
131
|
-
"
|
|
126
|
+
"workspace.capabilities.get": action("workspace", EMPTY, capabilityProjection),
|
|
127
|
+
"workspace.capabilities.set": action("workspace", object({
|
|
132
128
|
policy: ref("CapabilityPolicy"),
|
|
133
129
|
}, ["policy"]), capabilityProjection),
|
|
134
130
|
});
|
|
@@ -186,6 +182,9 @@ export const AGUI_NOTIFICATIONS = Object.freeze({
|
|
|
186
182
|
workerId: POSITIVE,
|
|
187
183
|
loopId: POSITIVE,
|
|
188
184
|
packetCount: POSITIVE,
|
|
185
|
+
scheduledAt: NONEMPTY,
|
|
186
|
+
intervalMinutes: POSITIVE,
|
|
187
|
+
recurrenceId: POSITIVE,
|
|
189
188
|
}, ["workerId", "loopId", "packetCount"])),
|
|
190
189
|
"loop/proposal": notification(ref("ProposalProjection")),
|
|
191
190
|
"loop/interaction": notification(ref("ClientInteractionProjection")),
|
|
@@ -216,8 +215,7 @@ export const AGUI_NOTIFICATIONS = Object.freeze({
|
|
|
216
215
|
result: OPERATION_RESULT,
|
|
217
216
|
scheme: NONEMPTY,
|
|
218
217
|
summary: string(),
|
|
219
|
-
wakeAction: { enum: ["skipped-aborted", "skipped-cancelled", "
|
|
220
|
-
wakeLoopId: POSITIVE,
|
|
218
|
+
wakeAction: { enum: ["skipped-aborted", "skipped-cancelled", "wake-pending", "no-op-active-loop", "no-loop"] },
|
|
221
219
|
...streamCoordinate,
|
|
222
220
|
}, ["entryId", "workerId", "target", "subscriptionId", "result", "scheme", "summary", "wakeAction"])),
|
|
223
221
|
"workspace/branch-batch": notification(object({
|