@plurnk/plurnk-agui 1.0.4 → 1.0.6
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/README.md +13 -13
- package/SPEC.md +23 -23
- package/dist/AguiPlus.d.ts +3 -3
- package/dist/AguiPlus.d.ts.map +1 -1
- package/dist/AguiPlus.js +2 -2
- package/dist/AguiPlus.js.map +1 -1
- package/dist/DaemonSeam.d.ts +45 -43
- package/dist/DaemonSeam.d.ts.map +1 -1
- package/dist/DaemonSeam.js +1 -1
- package/dist/DaemonSeam.js.map +1 -1
- package/dist/EventRouter.d.ts +2 -2
- package/dist/EventRouter.d.ts.map +1 -1
- package/dist/EventRouter.js +24 -3
- package/dist/EventRouter.js.map +1 -1
- package/dist/Module.d.ts.map +1 -1
- package/dist/Module.js +173 -149
- package/dist/Module.js.map +1 -1
- package/dist/Portal.d.ts +8 -8
- package/dist/Portal.d.ts.map +1 -1
- package/dist/Portal.js +29 -29
- package/dist/Portal.js.map +1 -1
- package/dist/ProposalHitl.d.ts +2 -2
- package/dist/ProposalHitl.d.ts.map +1 -1
- package/dist/ProposalHitl.js +12 -12
- package/dist/ProposalHitl.js.map +1 -1
- package/dist/Translator.d.ts +2 -2
- package/dist/Translator.d.ts.map +1 -1
- package/dist/Translator.js +36 -27
- package/dist/Translator.js.map +1 -1
- package/dist/types.d.ts +33 -10
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -11,14 +11,14 @@ Vendor-agnostic, MIT.
|
|
|
11
11
|
An **in-process module** of the daemon, not an external service: the daemon activates it
|
|
12
12
|
at boot (`daemon.registerModule(Module.init(opts))`), handing it the curated core seam
|
|
13
13
|
(event source, loop-control, op dispatch, journal/metadata reads, proposal HITL,
|
|
14
|
-
|
|
15
|
-
owns the transport+security line at that edge: bearer auth, per-
|
|
14
|
+
workspace lifecycle — plurnk-service#355). The module opens its own HTTP/SSE listener and
|
|
15
|
+
owns the transport+security line at that edge: bearer auth, per-workspace authorization,
|
|
16
16
|
input validation. Below the seam: plurnk terms (loop/turn/proposal). Above: AG-UI terms
|
|
17
17
|
(run/message/tool-call/state). This module is the translation.
|
|
18
18
|
|
|
19
19
|
## The interface (AG-UI+)
|
|
20
20
|
|
|
21
|
-
One endpoint: `POST /` with `RunAgentInput` (`threadId`, `
|
|
21
|
+
One endpoint: `POST /` with `RunAgentInput` (`threadId`, `workerId`, `messages`,
|
|
22
22
|
`forwardedProps`) → `text/event-stream` of AG-UI events.
|
|
23
23
|
|
|
24
24
|
- **Runs**: turns are `STEP_*`; PLAN is `THINKING_TEXT_MESSAGE_*`; SEND bodies are
|
|
@@ -26,19 +26,19 @@ One endpoint: `POST /` with `RunAgentInput` (`threadId`, `runId`, `messages`,
|
|
|
26
26
|
Numbers pass through verbatim (`contextSize` = the daemon's effective prompt budget).
|
|
27
27
|
- **HITL, terminate-resume**: a stopped-world proposal (file edit, exec, MCP auth) emits
|
|
28
28
|
a `request_approval` tool-call — a `SEND[300]` operator question emits
|
|
29
|
-
`request_user_input` — and the
|
|
30
|
-
The next
|
|
29
|
+
`request_user_input` — and the worker **finishes** while the loop stays paused in-engine.
|
|
30
|
+
The next worker's tool-result message (`toolCallId: "prop:<id>"`, content
|
|
31
31
|
`{decision: accept|reject|cancel, body?}`) resolves it; the continued loop streams there.
|
|
32
32
|
Pending proposals re-surface on (re)connect — a days-old question is discoverable.
|
|
33
|
-
- **Reads ride STATE**: providers/aliases/budget/
|
|
33
|
+
- **Reads ride STATE**: providers/aliases/budget/workspace arrive as `STATE_SNAPSHOT` on
|
|
34
34
|
`RUN_STARTED` and `STATE_DELTA` on change — observed, not polled.
|
|
35
|
-
- **The
|
|
36
|
-
name, verbatim (attach-or-create). It is REQUIRED — a
|
|
37
|
-
so its absence is rejected (500), never forged from the `threadId`.
|
|
38
|
-
`forwardedProps.plurnk` (`projectRoot`, `constraints`, `settings`); per-
|
|
39
|
-
(`maxTurns`, `flags`, `alias`/`model`) every
|
|
40
|
-
- **The thread is the CONVERSATION**: a `threadId` binds a
|
|
41
|
-
today the
|
|
35
|
+
- **The workspace is the WORLD**: `forwardedProps.plurnk.workspace` selects the workspace by
|
|
36
|
+
name, verbatim (attach-or-create). It is REQUIRED — a worker has no existence without a world,
|
|
37
|
+
so its absence is rejected (500), never forged from the `threadId`. Workspace options ride the workspace's first run:
|
|
38
|
+
`forwardedProps.plurnk` (`projectRoot`, `constraints`, `settings`); per-worker knobs
|
|
39
|
+
(`maxTurns`, `flags`, `alias`/`model`) every worker.
|
|
40
|
+
- **The thread is the CONVERSATION**: a `threadId` binds a worker over the selected world —
|
|
41
|
+
today the workspace's model worker (`ensureModelWorker`), so extended context persists across runs;
|
|
42
42
|
history replays as `MESSAGES_SNAPSHOT` on reattach. Distinct second conversations over one
|
|
43
43
|
world gate on plurnk-service#366. (Machine model: service SPEC §machine-processes.)
|
|
44
44
|
- **Cancel**: dropping the SSE aborts a live loop (hangup is the abort); a
|
package/SPEC.md
CHANGED
|
@@ -11,20 +11,20 @@ through, never recomputed. Every `{§}` anchor below is cited by a `[§]` test.
|
|
|
11
11
|
at boot (`registerModule` → the core seam handle); it opens the AG-UI+ listener and owns
|
|
12
12
|
the client interface. No WebSocket, no separate process.
|
|
13
13
|
- **A plurnk SESSION is the world; an AG-UI THREAD is a conversation over it** {§agui-thread-is-run}
|
|
14
|
-
— plurnk's machine model (service SPEC §machine-processes) splits the WORLD (a
|
|
15
|
-
curated workspace) from the CONVERSATION (a
|
|
16
|
-
concept is the workspace, selected by name, VERBATIM, via `forwardedProps.plurnk.
|
|
14
|
+
— plurnk's machine model (service SPEC §machine-processes) splits the WORLD (a workspace: one
|
|
15
|
+
curated workspace) from the CONVERSATION (a worker: a history over that world). AG-UI's workspace
|
|
16
|
+
concept is the workspace, selected by name, VERBATIM, via `forwardedProps.plurnk.workspace`
|
|
17
17
|
(attach if it exists, create with exactly that name otherwise — no prefix, no forging). The
|
|
18
|
-
|
|
18
|
+
workspace is REQUIRED: a worker has no existence without a world, so its absence is a contract
|
|
19
19
|
violation the module rejects (500) — never a workspace forged from the `threadId`. The
|
|
20
20
|
`threadId` is the conversation — a RUN over that world, and the name is the identity at
|
|
21
|
-
BOTH levels: `threadId` == the
|
|
22
|
-
conversation, `
|
|
23
|
-
`threadId` names its own conversation
|
|
24
|
-
conversations are addressable as threads), minted via `
|
|
21
|
+
BOTH levels: `threadId` == the workspace name binds the workspace's MODEL run (the default
|
|
22
|
+
conversation, `ensureModelWorker` — origin identifies it, never a name parse); a DISTINCT
|
|
23
|
+
`threadId` names its own conversation worker — found by name if it exists (forks and prior
|
|
24
|
+
conversations are addressable as threads), minted via `createConversationWorker` (svc#366)
|
|
25
25
|
if it doesn't. World-scoped actions (`loop.inject`, `loop.cancel`, `log.read` default,
|
|
26
|
-
`run.fork`) operate on the THREAD's conversation, never blindly on the model
|
|
27
|
-
Extended context persists across AG-UI runs because the
|
|
26
|
+
`run.fork`) operate on the THREAD's conversation, never blindly on the model worker.
|
|
27
|
+
Extended context persists across AG-UI runs because the worker's log does.
|
|
28
28
|
- **Family-internal runtime deps only** {§agui-zero-dep} — `@plurnk/*` packages (the grammar,
|
|
29
29
|
for edge parsing) are welcome, exact-pinned; third-party runtime deps (e.g. `@ag-ui/core`
|
|
30
30
|
with its Zod) stay out. Event shapes remain hand-defined plain JSON.
|
|
@@ -40,15 +40,15 @@ One daemon notification in, zero-or-more AG-UI events out (`Translator`, pure):
|
|
|
40
40
|
|---|---|
|
|
41
41
|
| `loop.run` accepted | `RUN_STARTED` |
|
|
42
42
|
| `log/entry` turn boundary | `STEP_FINISHED` + `STEP_STARTED` (`turn-<id>`) |
|
|
43
|
-
| `log/entry` op=PLAN (model) | `
|
|
43
|
+
| `log/entry` op=PLAN (model) | `REASONING_START` + `REASONING_MESSAGE_START/CONTENT/END` + `REASONING_END` (§475: current AG-UI reasoning; the deprecated THINKING_* is retired) |
|
|
44
44
|
| `log/entry` op=SEND (model) | `TEXT_MESSAGE_START/CONTENT/END` + `CUSTOM plurnk.send` (signal/status) |
|
|
45
45
|
| `log/entry` other op (model) | `TOOL_CALL_START/ARGS/END` (+ `TOOL_CALL_RESULT` when rx exists) |
|
|
46
46
|
| `log/entry` op=model (mirror) | nothing — forensic, not speech |
|
|
47
47
|
| `log/entry` origin≠model | `CUSTOM plurnk.ambient` (foists, deltas, narrations) |
|
|
48
48
|
| `loop/proposal` | `CUSTOM plurnk.proposal` |
|
|
49
|
-
| `loop/terminated` | `STATE_DELTA` (budget) + `CUSTOM plurnk.terminated` (
|
|
49
|
+
| `loop/terminated` | `STATE_DELTA` (budget) + `CUSTOM plurnk.terminated` + `RAW` (the provider's native completion frame, `source: provider`, §475) + `RUN_FINISHED` (200) or `RUN_ERROR` (else) |
|
|
50
50
|
| `telemetry/event` | `CUSTOM plurnk.telemetry` |
|
|
51
|
-
| `stream/event` + `stream/concluded` | `CUSTOM plurnk.stream` (
|
|
51
|
+
| `stream/event` + `stream/concluded` | `CUSTOM plurnk.stream` + `ACTIVITY_SNAPSHOT` (the standard background-activity channel: `activityType` = the scheme, replace-snapshot, §475) |
|
|
52
52
|
| `loop/quiesced` | `CUSTOM plurnk.quiesced` |
|
|
53
53
|
|
|
54
54
|
- **An op row IS a tool call** — its `coordinate` is the `toolCallId`, its tx the args (one
|
|
@@ -73,11 +73,11 @@ One daemon notification in, zero-or-more AG-UI events out (`Translator`, pure):
|
|
|
73
73
|
- **The gauge starts true** — `RUN_STARTED` is followed by a `STATE_SNAPSHOT` carrying the
|
|
74
74
|
daemon's `providers.list` truth (the effective prompt budget, the active model), then
|
|
75
75
|
`STATE_DELTA`s. A dropped SSE stream cancels the loop (`loop.cancel`) — the frontend hanging
|
|
76
|
-
up IS the abort signal; no
|
|
76
|
+
up IS the abort signal; no worker is orphaned unwatched.
|
|
77
77
|
|
|
78
78
|
- **Reattach replays** {§agui-replay} — a rediscovered thread (the bridge restarted, a second
|
|
79
|
-
frontend arrived) attaches to its existing
|
|
80
|
-
|
|
79
|
+
frontend arrived) attaches to its existing workspace by name→id and opens ORIENTED: the model
|
|
80
|
+
worker's SENDs replay as `MESSAGES_SNAPSHOT` (the conversation spine; everything else stays
|
|
81
81
|
reachable via live `plurnk.row`), and every pending stop-the-world proposal re-surfaces
|
|
82
82
|
immediately via the daemon's `proposal.list` — the indefinite-wait ruling's client half: a
|
|
83
83
|
days-old question is discoverable, never a mystery hang.
|
|
@@ -90,26 +90,26 @@ surfaces as `CUSTOM plurnk.proposal` carrying `{logEntryId, op, target, body, at
|
|
|
90
90
|
`POST /resolve {threadId, logEntryId, decision, body?}` — a passthrough to the daemon's
|
|
91
91
|
`loop.resolve`, where an accept `body` is the answer. The SSE stream stays open while the
|
|
92
92
|
world is stopped — **indefinitely by default** (service ruling: a stopped world waits for its
|
|
93
|
-
human; the timeout is operator opt-in) — and the
|
|
93
|
+
human; the timeout is operator opt-in) — and the worker resumes on resolution.
|
|
94
94
|
|
|
95
95
|
## The action surface {§agui-management-plane}
|
|
96
96
|
|
|
97
97
|
A verb is a §3 action run: `forwardedProps.plurnk.action = {kind, …params}` in, one
|
|
98
98
|
`CUSTOM plurnk.action.result` (`{kind, ok, result|error}`) out, `RUN_FINISHED`. There is
|
|
99
|
-
no side-channel RPC endpoint; the
|
|
99
|
+
no side-channel RPC endpoint; the worker envelope is the whole interface. Unknown kinds
|
|
100
100
|
error honestly (`ok:false`). `loop.inject` rides this surface; its steered effect
|
|
101
|
-
streams on the original
|
|
102
|
-
the model
|
|
101
|
+
streams on the original worker's open SSE. `loop.cancel` is its counterpart — it aborts
|
|
102
|
+
the model worker's active drain (the addressable spelling of the SSE-hangup abort; both
|
|
103
103
|
clients' stop controls ride it).
|
|
104
104
|
|
|
105
105
|
## Topology scope {§agui-topology-scope}
|
|
106
106
|
|
|
107
|
-
The
|
|
108
|
-
only the thread's model
|
|
107
|
+
The workspace broadcast carries EVERY worker's rows (workers, the plurnk worker, siblings);
|
|
108
|
+
only the thread's model worker projects onto the core vocabulary. Foreign-run rows ride
|
|
109
109
|
`plurnk.row`/`plurnk.ambient` — visible to rich clients as topology, never interleaved
|
|
110
110
|
into the conversation a generic frontend renders.
|
|
111
111
|
|
|
112
|
-
## The
|
|
112
|
+
## The worker endpoint {§agui-run-endpoint}
|
|
113
113
|
|
|
114
114
|
`POST /` (or `/agui`) with an AG-UI `RunAgentInput` body: the last `user` message becomes the
|
|
115
115
|
`loop.run` prompt (`maxTurns`/`flags.yolo` from env); the response is `text/event-stream`,
|
package/dist/AguiPlus.d.ts
CHANGED
|
@@ -19,15 +19,15 @@ export interface AguiPlusState {
|
|
|
19
19
|
alias: string;
|
|
20
20
|
model: string;
|
|
21
21
|
active: boolean;
|
|
22
|
-
|
|
22
|
+
promptBudget: number | null;
|
|
23
23
|
}>;
|
|
24
|
-
|
|
24
|
+
workspace?: {
|
|
25
25
|
id: number;
|
|
26
26
|
name: string;
|
|
27
27
|
projectRoot?: string | null;
|
|
28
28
|
budget?: number | null;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
workspaces?: Array<{
|
|
31
31
|
id: number;
|
|
32
32
|
name: string;
|
|
33
33
|
}>;
|
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,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAKlE,eAAO,MAAM,kBAAkB,eAAgB,MAAM,KAAG,MAA8B,CAAC;AACvF,eAAO,MAAM,wBAAwB,eAAgB,MAAM,KAAG,MAAM,GAAG,IAGtE,CAAC;AAOF,eAAO,MAAM,gBAAgB,OAAQ,MAAM,KAAG,MAAqE,CAAC;AAIpH,eAAO,MAAM,gBAAgB,MAAO,oBAAoB,KAAG,SAAS,EAOnE,CAAC;AAKF,MAAM,WAAW,iBAAiB;IAAG,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,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C;AAC1F,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,aAAa,KAAG,SACe,CAAC"}
|
package/dist/AguiPlus.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// §1 proposals/[300] questions → tool-calls (terminate-resume HITL); §2 reads →
|
|
7
7
|
// shared STATE. This is the flagship choreography de-risked as logic before code.
|
|
8
8
|
// ── §1 — stop-the-world → tool-call ──────────────────────────────────
|
|
9
|
-
// toolCallId correlates the TERMINATING
|
|
9
|
+
// toolCallId correlates the TERMINATING worker's TOOL_CALL with the RESUME worker's
|
|
10
10
|
// tool-result → the exact pending proposal. Encodes the logEntryId: `prop:<id>`.
|
|
11
11
|
export const proposalToolCallId = (logEntryId) => `prop:${logEntryId}`;
|
|
12
12
|
export const logEntryIdFromToolCallId = (toolCallId) => {
|
|
@@ -19,7 +19,7 @@ export const logEntryIdFromToolCallId = (toolCallId) => {
|
|
|
19
19
|
// The plurnk correlation rides the opaque toolCallId (`prop:<logEntryId>`), so the
|
|
20
20
|
// generic names carry no plurnk vocabulary upward.
|
|
21
21
|
export const proposalToolName = (op) => (op === "SEND" ? "request_user_input" : "request_approval");
|
|
22
|
-
// The
|
|
22
|
+
// The worker's tail when it hits a pause: the tool-call, then the CALLER emits
|
|
23
23
|
// RUN_FINISHED to terminate. The loop stays paused in-engine — untouched.
|
|
24
24
|
export const proposalToolCall = (p) => {
|
|
25
25
|
const toolCallId = proposalToolCallId(p.logEntryId);
|
package/dist/AguiPlus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AguiPlus.js","sourceRoot":"","sources":["../src/AguiPlus.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,mFAAmF;AACnF,oFAAoF;AACpF,0EAA0E;AAC1E,EAAE;AACF,gFAAgF;AAChF,kFAAkF;AAIlF,wEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"AguiPlus.js","sourceRoot":"","sources":["../src/AguiPlus.ts"],"names":[],"mapp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C,CAAgB,EAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACpH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAA6D,EAAa,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AAUlJ,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,QAAQ,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC"}
|
package/dist/DaemonSeam.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface ProposalResolution {
|
|
|
6
6
|
}
|
|
7
7
|
export interface PendingProposal {
|
|
8
8
|
logEntryId: number;
|
|
9
|
-
|
|
9
|
+
workerId: number;
|
|
10
10
|
loopId: number;
|
|
11
11
|
turnId: number;
|
|
12
12
|
op: string;
|
|
@@ -20,36 +20,38 @@ import type { PlurnkStatement } from "@plurnk/plurnk-grammar";
|
|
|
20
20
|
export type { PlurnkStatement };
|
|
21
21
|
export type LogEntryWire = Record<string, unknown>;
|
|
22
22
|
export interface DaemonSeam {
|
|
23
|
-
subscribeToEvents(handler: (
|
|
24
|
-
pendingProposals(
|
|
23
|
+
subscribeToEvents(handler: (workspaceId: number | null, method: string, params: unknown) => void): () => void;
|
|
24
|
+
pendingProposals(workspaceId: number): Promise<PendingProposal[]>;
|
|
25
25
|
resolveProposal(logEntryId: number, resolution: ProposalResolution): void;
|
|
26
|
-
|
|
26
|
+
ensureModelWorker(workspaceId: number): Promise<number>;
|
|
27
27
|
runLoop(args: {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
workspaceId: number;
|
|
29
|
+
workerId: number;
|
|
30
30
|
prompt: string;
|
|
31
31
|
maxTurns?: number;
|
|
32
32
|
flags?: {
|
|
33
33
|
yolo?: boolean;
|
|
34
34
|
};
|
|
35
35
|
openPaths?: string[];
|
|
36
|
+
alias?: string;
|
|
37
|
+
model?: string;
|
|
36
38
|
}): Promise<{
|
|
37
39
|
action: "injected_next_turn" | "enqueued_new_loop";
|
|
38
40
|
loopId: number;
|
|
39
41
|
turnSeq?: number;
|
|
40
42
|
}>;
|
|
41
|
-
cancelDrain(
|
|
43
|
+
cancelDrain(workerId: number, reason?: string): boolean;
|
|
42
44
|
dispatchAsClient(args: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
workspaceId: number;
|
|
46
|
+
workerId: number;
|
|
45
47
|
statement: PlurnkStatement;
|
|
46
48
|
}): Promise<{
|
|
47
49
|
status: number;
|
|
48
50
|
[key: string]: unknown;
|
|
49
51
|
}>;
|
|
50
52
|
readLog(args: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
workspaceId: number;
|
|
54
|
+
workerId: number;
|
|
53
55
|
loopId?: number;
|
|
54
56
|
turnId?: number;
|
|
55
57
|
sinceId?: number;
|
|
@@ -64,10 +66,10 @@ export interface DaemonSeam {
|
|
|
64
66
|
provider: string;
|
|
65
67
|
model: string;
|
|
66
68
|
active: boolean;
|
|
67
|
-
|
|
69
|
+
promptBudget: number | null;
|
|
68
70
|
}>;
|
|
69
71
|
};
|
|
70
|
-
|
|
72
|
+
createWorkspace(args: {
|
|
71
73
|
name?: string;
|
|
72
74
|
projectRoot?: string | null;
|
|
73
75
|
settings?: string;
|
|
@@ -76,40 +78,40 @@ export interface DaemonSeam {
|
|
|
76
78
|
glob: string;
|
|
77
79
|
}>;
|
|
78
80
|
}): Promise<ClientEnvelope>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
attachWorkspace(args: {
|
|
82
|
+
workspaceId: number;
|
|
83
|
+
workerId?: number;
|
|
84
|
+
workerName?: string;
|
|
83
85
|
}): Promise<ClientEnvelope>;
|
|
84
|
-
|
|
86
|
+
listWorkspaces(): Promise<Array<{
|
|
85
87
|
id: number;
|
|
86
88
|
name: string;
|
|
87
89
|
}>>;
|
|
88
|
-
|
|
90
|
+
listWorkers(workspaceId: number): Promise<Array<{
|
|
89
91
|
id: number;
|
|
90
92
|
name: string;
|
|
91
93
|
}>>;
|
|
92
|
-
listPrompts(
|
|
93
|
-
|
|
94
|
+
listPrompts(workspaceId: number, limit?: number): Promise<string[]>;
|
|
95
|
+
renameWorkspace(workspaceId: number, name: string): Promise<{
|
|
94
96
|
id: number;
|
|
95
97
|
name: string;
|
|
96
98
|
}>;
|
|
97
|
-
constrain(
|
|
99
|
+
constrain(workspaceId: number, effect: string, glob: string): Promise<{
|
|
98
100
|
effect: string;
|
|
99
101
|
glob: string;
|
|
100
102
|
}>;
|
|
101
|
-
unconstrain(
|
|
103
|
+
unconstrain(workspaceId: number, effect: string, glob: string): Promise<{
|
|
102
104
|
effect: string;
|
|
103
105
|
glob: string;
|
|
104
106
|
}>;
|
|
105
|
-
listConstraints(
|
|
107
|
+
listConstraints(workspaceId: number): Promise<Array<{
|
|
106
108
|
effect: string;
|
|
107
109
|
glob: string;
|
|
108
110
|
}>> | Array<{
|
|
109
111
|
effect: string;
|
|
110
112
|
glob: string;
|
|
111
113
|
}>;
|
|
112
|
-
listMembers(
|
|
114
|
+
listMembers(workspaceId: number): Promise<{
|
|
113
115
|
members: Array<{
|
|
114
116
|
path: string;
|
|
115
117
|
effect: string;
|
|
@@ -117,15 +119,15 @@ export interface DaemonSeam {
|
|
|
117
119
|
hidden: string[];
|
|
118
120
|
}>;
|
|
119
121
|
look(args: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
workspaceId: number;
|
|
123
|
+
workerId: number;
|
|
122
124
|
statement: PlurnkStatement;
|
|
123
125
|
}): Promise<{
|
|
124
126
|
status: number;
|
|
125
127
|
[key: string]: unknown;
|
|
126
128
|
}>;
|
|
127
129
|
readEntry(args: {
|
|
128
|
-
|
|
130
|
+
workspaceId: number;
|
|
129
131
|
target: string;
|
|
130
132
|
channel?: string;
|
|
131
133
|
offset?: number;
|
|
@@ -133,30 +135,30 @@ export interface DaemonSeam {
|
|
|
133
135
|
status: number;
|
|
134
136
|
entry: unknown;
|
|
135
137
|
}>;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
forkWorker(args: {
|
|
139
|
+
workspaceId: number;
|
|
140
|
+
workerId: number;
|
|
139
141
|
name?: string;
|
|
140
142
|
}): Promise<{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
workerId: number;
|
|
144
|
+
workerName: string | null;
|
|
145
|
+
parentWorkerId: number;
|
|
144
146
|
}>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
createConversationWorker(args: {
|
|
148
|
+
workspaceId: number;
|
|
147
149
|
name?: string;
|
|
148
150
|
}): Promise<{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
workerId: number;
|
|
152
|
+
workerName: string;
|
|
151
153
|
}>;
|
|
152
154
|
}
|
|
153
155
|
export interface ClientEnvelope {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
workspaceId: number;
|
|
157
|
+
workspaceName: string;
|
|
156
158
|
projectRoot: string | null;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
workerId: number;
|
|
160
|
+
workerName: string;
|
|
161
|
+
modelWorkerId: number | null;
|
|
160
162
|
clientLoopId: number | null;
|
|
161
163
|
}
|
|
162
164
|
//# sourceMappingURL=DaemonSeam.d.ts.map
|
package/dist/DaemonSeam.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaemonSeam.d.ts","sourceRoot":"","sources":["../src/DaemonSeam.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"DaemonSeam.d.ts","sourceRoot":"","sources":["../src/DaemonSeam.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GA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AQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7H;AAGD,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
package/dist/DaemonSeam.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// My coupling to the daemon's in-process client-interface seam (service#355). The
|
|
2
2
|
// module depends on THIS interface — the committed, tested contract — never the
|
|
3
3
|
// Daemon class's guts. It grows as the service lands hooks (loop-control,
|
|
4
|
-
//
|
|
4
|
+
// workspace/envelope, reads, fork, execs/auth, the boot plug-point); today it carries
|
|
5
5
|
// what's published: the event source (B) and proposal read + resolve (C + A-resolve).
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=DaemonSeam.js.map
|
package/dist/DaemonSeam.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaemonSeam.js","sourceRoot":"","sources":["../src/DaemonSeam.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,0EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"DaemonSeam.js","sourceRoot":"","sources":["../src/DaemonSeam.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,0EAA0E;AAC1E,sFAAsF;AACtF,sFAAsF"}
|
package/dist/EventRouter.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export default class EventRouter {
|
|
|
4
4
|
constructor(args: {
|
|
5
5
|
threadId: string;
|
|
6
6
|
runId: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
modelWorkerId?: number | null;
|
|
8
|
+
workspaceId?: number | null;
|
|
9
9
|
});
|
|
10
10
|
runStarted(snapshot?: unknown): AguiEvent[];
|
|
11
11
|
replay(entries: Array<Record<string, unknown>>): AguiEvent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventRouter.d.ts","sourceRoot":"","sources":["../src/EventRouter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,YAAY,CAAC;AAE1F,MAAM,CAAC,OAAO,OAAO,WAAW;;IAG5B,YAAY,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,
|
|
1
|
+
{"version":3,"file":"EventRouter.d.ts","sourceRoot":"","sources":["../src/EventRouter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,YAAY,CAAC;AAE1F,MAAM,CAAC,OAAO,OAAO,WAAW;;IAG5B,YAAY,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAEhH;IAED,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,CAAyC;IACpF,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EAAE,CAAoC;IAEhG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,CAiBlD;CAgBJ"}
|
package/dist/EventRouter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The module's per-
|
|
1
|
+
// The module's per-worker render core (plurnk-agui#2). Routes a daemon event
|
|
2
2
|
// (method, params) from the seam's event source → AG-UI events, composing the proven
|
|
3
3
|
// projections: log/entry → core vocab, loop/terminated → RUN_FINISHED + budget STATE,
|
|
4
4
|
// telemetry/stream → CUSTOM. Per-run state (turn tracking, model-run binding) lives in
|
|
@@ -18,10 +18,31 @@ export default class EventRouter {
|
|
|
18
18
|
case "loop/terminated": return this.#t.terminated(params);
|
|
19
19
|
case "telemetry/event": return this.#t.telemetry(params.event ?? params);
|
|
20
20
|
case "stream/event":
|
|
21
|
-
case "stream/concluded": return [
|
|
21
|
+
case "stream/concluded": return [
|
|
22
|
+
// Family channel (rich, full payload) AND the standard ACTIVITY channel (§475):
|
|
23
|
+
// an exec/search stream is 'in-progress activity between chat messages'. A
|
|
24
|
+
// replace-snapshot per event is the stateless conformant form — each carries the
|
|
25
|
+
// full current view; activityType is the stream's scheme (SEARCH/EXEC/…).
|
|
26
|
+
{ type: "CUSTOM", name: "plurnk.stream", value: params },
|
|
27
|
+
EventRouter.#activity(params),
|
|
28
|
+
];
|
|
22
29
|
case "loop/proposal": return []; // ProposalHitl owns HITL (terminate-resume tool-call)
|
|
23
|
-
default: return []; //
|
|
30
|
+
default: return []; // workspace/created + anything unmodeled: the module handles out-of-band
|
|
24
31
|
}
|
|
25
32
|
}
|
|
33
|
+
// A stream event → the standard ACTIVITY snapshot. messageId = the stream's entry id
|
|
34
|
+
// (so a frontend keys deltas/updates to one activity); activityType = the scheme,
|
|
35
|
+
// uppercased (SEARCH, EXEC, …), the protocol's discriminator; content = the full
|
|
36
|
+
// payload; replace = true (each is the complete current view — stateless, conformant).
|
|
37
|
+
static #activity(params) {
|
|
38
|
+
const p = (params ?? {});
|
|
39
|
+
return {
|
|
40
|
+
type: "ACTIVITY_SNAPSHOT",
|
|
41
|
+
messageId: `stream-${p.entryId ?? 0}`,
|
|
42
|
+
activityType: typeof p.scheme === "string" && p.scheme.length > 0 ? p.scheme.toUpperCase() : "STREAM",
|
|
43
|
+
content: params,
|
|
44
|
+
replace: true,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
26
47
|
}
|
|
27
48
|
//# sourceMappingURL=EventRouter.js.map
|
package/dist/EventRouter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventRouter.js","sourceRoot":"","sources":["../src/EventRouter.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"EventRouter.js","sourceRoot":"","sources":["../src/EventRouter.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,qFAAqF;AACrF,sFAAsF;AACtF,uFAAuF;AACvF,wFAAwF;AACxF,kFAAkF;AAElF,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,EAAE,CAAa;IAEf,YAAY,IAAqG;QAC7G,IAAI,CAAC,EAAE,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,QAAkB,IAAiB,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpF,MAAM,CAAC,OAAuC,IAAiB,OAAO,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAEhG,KAAK,CAAC,MAAc,EAAE,MAAe;QACjC,QAAQ,MAAM,EAAE,CAAC;YACb,KAAK,WAAW,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAA8B,CAAC,CAAC;YAC1E,KAAK,iBAAiB,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAgC,CAAC,CAAC;YACpF,KAAK,iBAAiB,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC,SAAS,CAAE,MAA8B,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC;YAClG,KAAK,cAAc,CAAC;YACpB,KAAK,kBAAkB,EAAE,OAAO;gBAC5B,gFAAgF;gBAChF,2EAA2E;gBAC3E,iFAAiF;gBACjF,0EAA0E;gBAC1E,EA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