@aiwayds/dsh-tui-pi 0.1.1 → 0.4.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/README.md +175 -41
- package/lib/agent-manager.d.ts +125 -0
- package/lib/agent-manager.js +298 -0
- package/lib/agent-manager.js.map +1 -0
- package/lib/agents.d.ts +30 -0
- package/lib/agents.js +489 -0
- package/lib/agents.js.map +1 -0
- package/lib/append-system.d.ts +2 -0
- package/lib/append-system.js +1 -1
- package/lib/append-system.js.map +1 -1
- package/lib/dsh-events.d.ts +12 -0
- package/lib/editor.d.ts +58 -0
- package/lib/editor.js +92 -0
- package/lib/editor.js.map +1 -1
- package/lib/footer.d.ts +46 -0
- package/lib/footer.js +65 -0
- package/lib/footer.js.map +1 -1
- package/lib/hotkeys.d.ts +93 -0
- package/lib/hotkeys.js +305 -0
- package/lib/hotkeys.js.map +1 -0
- package/lib/index.js +342 -61
- package/lib/index.js.map +1 -1
- package/lib/keymap.d.ts +243 -0
- package/lib/keymap.js +245 -0
- package/lib/keymap.js.map +1 -0
- package/lib/live-widgets.d.ts +59 -49
- package/lib/live-widgets.js +174 -117
- package/lib/live-widgets.js.map +1 -1
- package/lib/panels.d.ts +177 -0
- package/lib/panels.js +331 -0
- package/lib/panels.js.map +1 -0
- package/lib/selectors.d.ts +12 -1
- package/lib/selectors.js +1 -1
- package/lib/selectors.js.map +1 -1
- package/lib/session.d.ts +25 -0
- package/lib/session.js +173 -12
- package/lib/session.js.map +1 -1
- package/lib/settings.d.ts +1 -2
- package/lib/subagent-policy.d.ts +88 -0
- package/lib/subagent-policy.js +189 -0
- package/lib/subagent-policy.js.map +1 -0
- package/lib/subagent-viewer.d.ts +49 -0
- package/lib/subagent-viewer.js +523 -0
- package/lib/subagent-viewer.js.map +1 -0
- package/lib/theme/index.js +4 -0
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/palette.d.ts +21 -3
- package/lib/theme/palette.js +27 -6
- package/lib/theme/palette.js.map +1 -1
- package/lib/theme-settings.d.ts +71 -9
- package/lib/theme-settings.js +145 -21
- package/lib/theme-settings.js.map +1 -1
- package/lib/tui.d.ts +23 -9
- package/lib/tui.js +110 -7
- package/lib/tui.js.map +1 -1
- package/package.json +3 -4
- package/patches/@earendil-works__pi-tui.patch +206 -2
- package/scripts/dev-install.mjs +87 -0
- package/scripts/link-dsh-closure.mjs +85 -0
- package/templates/agents/ArtyDuck.md +11 -0
- package/templates/agents/oldfox.md +33 -0
- package/templates/agents/workhorse.md +34 -0
package/lib/session.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export interface BridgeCallbacks {
|
|
|
20
20
|
onStatus(status: 'idle' | 'running'): void;
|
|
21
21
|
/** Live snapshot of tracked subagent (child session) rows, on any change. */
|
|
22
22
|
onLive(agents: readonly AgentView[]): void;
|
|
23
|
+
/** A tracked child completed one more turn (the "rounds" the policy caps). */
|
|
24
|
+
onTurnCount?(childId: string, count: number): void;
|
|
23
25
|
}
|
|
24
26
|
/** Incrementally maintained footer statistics (all O(1) reads). */
|
|
25
27
|
export interface BridgeStats {
|
|
@@ -51,6 +53,15 @@ export declare class DshSessionBridge {
|
|
|
51
53
|
private readonly agentViews;
|
|
52
54
|
/** Child session ids whose own events we fold into the agent views. */
|
|
53
55
|
private readonly childSessions;
|
|
56
|
+
/**
|
|
57
|
+
* Per-child event ring buffer — the raw transcript the subagent viewer
|
|
58
|
+
* renders. Capped so a runaway child cannot grow the process unboundedly;
|
|
59
|
+
* the oldest events drop off (the viewer shows a "history truncated" hint
|
|
60
|
+
* when the cap is hit).
|
|
61
|
+
*/
|
|
62
|
+
private readonly childLogs;
|
|
63
|
+
/** Per-child completed turn count — the "rounds" the policy caps. */
|
|
64
|
+
private readonly turnCounts;
|
|
54
65
|
/**
|
|
55
66
|
* Session ids that can own tracked children (this session first, then every
|
|
56
67
|
* tracked child — delegation nests). Used to match `parentSession` headers
|
|
@@ -64,6 +75,18 @@ export declare class DshSessionBridge {
|
|
|
64
75
|
getStats(): BridgeStats;
|
|
65
76
|
/** Current session id, when one exists. */
|
|
66
77
|
getSessionId(): SessionId | undefined;
|
|
78
|
+
/** Sorted snapshot of every tracked child (running and settled). */
|
|
79
|
+
getAgentViews(): readonly AgentView[];
|
|
80
|
+
/** Children still running (`outcome` unset) — the live count the guard caps. */
|
|
81
|
+
getLiveChildren(): readonly AgentView[];
|
|
82
|
+
/** The buffered transcript of one child, in log order (capped, maybe truncated). */
|
|
83
|
+
getChildLog(childId: string): readonly SessionEvent[];
|
|
84
|
+
/** Completed turn count of one child ("rounds"). */
|
|
85
|
+
getTurnCount(childId: string): number;
|
|
86
|
+
/** Whether one child settled (a continuable child may resume later). */
|
|
87
|
+
isChildSettled(childId: string): boolean;
|
|
88
|
+
/** True when the child's buffered transcript dropped its oldest events. */
|
|
89
|
+
isChildLogTruncated(childId: string): boolean;
|
|
67
90
|
/** Queue one user prompt, creating the session lazily on first use. */
|
|
68
91
|
prompt(text: string): Promise<void>;
|
|
69
92
|
/** The live agent, creating the session lazily when needed. */
|
|
@@ -128,6 +151,8 @@ export declare class DshSessionBridge {
|
|
|
128
151
|
private foldTracked;
|
|
129
152
|
/** Push the current agent views (stable order) to the renderer. */
|
|
130
153
|
private emitLive;
|
|
154
|
+
/** Append one child-session event to its transcript buffer, dropping the oldest at the cap. */
|
|
155
|
+
private appendChildLog;
|
|
131
156
|
private ensureSession;
|
|
132
157
|
/**
|
|
133
158
|
* Seed `selection`/`selectionRef` from the composed default — without
|
package/lib/session.js
CHANGED
|
@@ -13,7 +13,74 @@ import { installModelSelection } from '@deepseek-ai/dsh-agent';
|
|
|
13
13
|
import { createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
14
14
|
import { settingsNamespace, SettingsConflictError } from '@deepseek-ai/dsh-settings';
|
|
15
15
|
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
16
|
+
import { readAppendSystem } from "./append-system.js";
|
|
16
17
|
import { isAgentEnd, isAgentStart, isLlmRetry, isSubagentDescriptor } from "./dsh-events.js";
|
|
18
|
+
import { installSpawnToolFence } from "./subagent-policy.js";
|
|
19
|
+
/**
|
|
20
|
+
* Register the APPEND_SYSTEM.md section on ONE agent's scoped context, so the
|
|
21
|
+
* user's orchestrator identity applies to the TUI's main agent ONLY. A section
|
|
22
|
+
* registered from the TUI plugin's own (unscoped) context lands in the GLOBAL
|
|
23
|
+
* prompt layer, which every assembly merges - including every subagent's -
|
|
24
|
+
* and an "I am an orchestrator, never execute anything yourself" identity
|
|
25
|
+
* riding on child agents defeats its own purpose. Through the agent's scoped
|
|
26
|
+
* ctx (`agentCtx.systemPrompt` is caller-bound via cordis's traceable
|
|
27
|
+
* services) the section lands in that agent's own scope layer, which nothing
|
|
28
|
+
* else merges: subagent scopes are created without a parent binding, so the
|
|
29
|
+
* children never see it. Same mechanism dsh-subagent uses for per-child
|
|
30
|
+
* personas. Disposal is owned by the agent ctx (`ScopedLayers.effect` runs on
|
|
31
|
+
* `ctx.effect`), so the section dies with the agent.
|
|
32
|
+
*/
|
|
33
|
+
function installAppendSystem(agentCtx) {
|
|
34
|
+
const appendSystem = readAppendSystem(); // read once at session startup and cache
|
|
35
|
+
agentCtx.systemPrompt.section({
|
|
36
|
+
name: 'dsh-tui-pi:append-system',
|
|
37
|
+
order: 200,
|
|
38
|
+
text: () => appendSystem,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Per-child transcript buffer cap. 2000 events covers a long delegated task's
|
|
43
|
+
* assistant/tool/user rows (~a few hundred KB at worst) while bounding a
|
|
44
|
+
* runaway child; the viewer flags truncation instead of dropping silently.
|
|
45
|
+
*/
|
|
46
|
+
const CHILD_LOG_CAP = 2000;
|
|
47
|
+
/** Tail marker for `llm/retry` events (no text content — the row shows it is re-working). */
|
|
48
|
+
const RETRY_MARKER = '↻ retry';
|
|
49
|
+
/** Strip ANSI SGR escape sequences (the only escapes collected into assistant text). */
|
|
50
|
+
function stripAnsi(text) {
|
|
51
|
+
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Last visible text line of an `assistant/message` event's content, or
|
|
55
|
+
* undefined when it carries no text block. Defensive: reads through an
|
|
56
|
+
* `unknown` shape (the declaring package's content model is not imported
|
|
57
|
+
* here) and never throws — a missing/unexpected field simply yields nothing.
|
|
58
|
+
*/
|
|
59
|
+
function lastTextLine(data) {
|
|
60
|
+
const content = data?.message?.content;
|
|
61
|
+
if (!Array.isArray(content))
|
|
62
|
+
return undefined;
|
|
63
|
+
let blockText;
|
|
64
|
+
for (const block of content) {
|
|
65
|
+
const b = block;
|
|
66
|
+
if (b?.type === 'text' && typeof b.text === 'string' && b.text !== '') {
|
|
67
|
+
blockText = b.text;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (blockText === undefined)
|
|
71
|
+
return undefined;
|
|
72
|
+
// Last non-blank line of the text body, whitespace-folded so a wrapped/
|
|
73
|
+
// CRLF stream collapses onto one row.
|
|
74
|
+
const body = stripAnsi(blockText).replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
75
|
+
const lines = body.split('\n');
|
|
76
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
77
|
+
const line = lines[i].trim();
|
|
78
|
+
if (line === '')
|
|
79
|
+
continue;
|
|
80
|
+
return line.replace(/\s+/g, ' ');
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
17
84
|
export class DshSessionBridge {
|
|
18
85
|
ctx;
|
|
19
86
|
callbacks;
|
|
@@ -39,6 +106,15 @@ export class DshSessionBridge {
|
|
|
39
106
|
agentViews = new Map();
|
|
40
107
|
/** Child session ids whose own events we fold into the agent views. */
|
|
41
108
|
childSessions = new Set();
|
|
109
|
+
/**
|
|
110
|
+
* Per-child event ring buffer — the raw transcript the subagent viewer
|
|
111
|
+
* renders. Capped so a runaway child cannot grow the process unboundedly;
|
|
112
|
+
* the oldest events drop off (the viewer shows a "history truncated" hint
|
|
113
|
+
* when the cap is hit).
|
|
114
|
+
*/
|
|
115
|
+
childLogs = new Map();
|
|
116
|
+
/** Per-child completed turn count — the "rounds" the policy caps. */
|
|
117
|
+
turnCounts = new Map();
|
|
42
118
|
/**
|
|
43
119
|
* Session ids that can own tracked children (this session first, then every
|
|
44
120
|
* tracked child — delegation nests). Used to match `parentSession` headers
|
|
@@ -74,6 +150,7 @@ export class DshSessionBridge {
|
|
|
74
150
|
&& !this.agentViews.has(sessionKey)) {
|
|
75
151
|
this.agentViews.set(sessionKey, {
|
|
76
152
|
childId: sessionKey,
|
|
153
|
+
parentSession: String(header.parentSession),
|
|
77
154
|
label: `subagent ${sessionKey.slice(0, 8)}`,
|
|
78
155
|
startedAt: event.time,
|
|
79
156
|
tokens: 0,
|
|
@@ -87,6 +164,12 @@ export class DshSessionBridge {
|
|
|
87
164
|
if (this.trackedSessions.has(sessionKey)) {
|
|
88
165
|
this.foldTracked(sessionKey, event);
|
|
89
166
|
}
|
|
167
|
+
// Buffer the child's OWN log for the viewer (not the parent's workflow
|
|
168
|
+
// rows, which carry no child transcript). The buffer is capped; the
|
|
169
|
+
// viewer reports truncation when the head dropped off.
|
|
170
|
+
if (this.childSessions.has(sessionKey)) {
|
|
171
|
+
this.appendChildLog(sessionKey, event);
|
|
172
|
+
}
|
|
90
173
|
if (this.sessionId !== undefined && session.id === this.sessionId) {
|
|
91
174
|
this.applyEvent(event);
|
|
92
175
|
this.callbacks.onEvent(event);
|
|
@@ -107,6 +190,30 @@ export class DshSessionBridge {
|
|
|
107
190
|
getSessionId() {
|
|
108
191
|
return this.sessionId;
|
|
109
192
|
}
|
|
193
|
+
/** Sorted snapshot of every tracked child (running and settled). */
|
|
194
|
+
getAgentViews() {
|
|
195
|
+
return [...this.agentViews.values()].sort((a, b) => a.startedAt - b.startedAt || a.childId.localeCompare(b.childId));
|
|
196
|
+
}
|
|
197
|
+
/** Children still running (`outcome` unset) — the live count the guard caps. */
|
|
198
|
+
getLiveChildren() {
|
|
199
|
+
return this.getAgentViews().filter(view => view.outcome === undefined);
|
|
200
|
+
}
|
|
201
|
+
/** The buffered transcript of one child, in log order (capped, maybe truncated). */
|
|
202
|
+
getChildLog(childId) {
|
|
203
|
+
return this.childLogs.get(childId) ?? [];
|
|
204
|
+
}
|
|
205
|
+
/** Completed turn count of one child ("rounds"). */
|
|
206
|
+
getTurnCount(childId) {
|
|
207
|
+
return this.turnCounts.get(childId) ?? 0;
|
|
208
|
+
}
|
|
209
|
+
/** Whether one child settled (a continuable child may resume later). */
|
|
210
|
+
isChildSettled(childId) {
|
|
211
|
+
return this.agentViews.get(childId)?.outcome !== undefined;
|
|
212
|
+
}
|
|
213
|
+
/** True when the child's buffered transcript dropped its oldest events. */
|
|
214
|
+
isChildLogTruncated(childId) {
|
|
215
|
+
return (this.childLogs.get(childId)?.length ?? 0) >= CHILD_LOG_CAP;
|
|
216
|
+
}
|
|
110
217
|
/** Queue one user prompt, creating the session lazily on first use. */
|
|
111
218
|
async prompt(text) {
|
|
112
219
|
const handle = await this.ensureSession();
|
|
@@ -169,6 +276,8 @@ export class DshSessionBridge {
|
|
|
169
276
|
this.running = false;
|
|
170
277
|
this.agentViews.clear();
|
|
171
278
|
this.childSessions.clear();
|
|
279
|
+
this.childLogs.clear();
|
|
280
|
+
this.turnCounts.clear();
|
|
172
281
|
this.trackedSessions.clear();
|
|
173
282
|
this.runSeqToChild.clear();
|
|
174
283
|
if (handle !== undefined)
|
|
@@ -197,6 +306,8 @@ export class DshSessionBridge {
|
|
|
197
306
|
this.stats.cacheHitRate = undefined;
|
|
198
307
|
this.agentViews.clear();
|
|
199
308
|
this.childSessions.clear();
|
|
309
|
+
this.childLogs.clear();
|
|
310
|
+
this.turnCounts.clear();
|
|
200
311
|
this.trackedSessions.clear();
|
|
201
312
|
this.runSeqToChild.clear();
|
|
202
313
|
this.emitLive();
|
|
@@ -237,9 +348,14 @@ export class DshSessionBridge {
|
|
|
237
348
|
const resumed = await this.ctx.agents.resume({
|
|
238
349
|
resumeSessionId: sessionId,
|
|
239
350
|
agentOptions: this.selection ?? {},
|
|
240
|
-
// Install the mutable selection so `/model` can live-switch the route
|
|
351
|
+
// Install the mutable selection so `/model` can live-switch the route,
|
|
352
|
+
// the APPEND_SYSTEM.md section on this agent ONLY (never its
|
|
353
|
+
// subagents), and the spawn-tool hide so the agent sees a single
|
|
354
|
+
// `use_agent` delegation entry.
|
|
241
355
|
setup: async (agentCtx) => {
|
|
242
356
|
installModelSelection(agentCtx, this.selectionRef);
|
|
357
|
+
installAppendSystem(agentCtx);
|
|
358
|
+
installSpawnToolFence(agentCtx);
|
|
243
359
|
},
|
|
244
360
|
});
|
|
245
361
|
this.handle = resumed;
|
|
@@ -351,14 +467,23 @@ export class DshSessionBridge {
|
|
|
351
467
|
}
|
|
352
468
|
}
|
|
353
469
|
if (this.childSessions.has(sessionId)) {
|
|
470
|
+
// Round counting is view-independent: every completed turn of the child
|
|
471
|
+
// is one round, even once the view settled (continuable children resume).
|
|
472
|
+
if (event.type === 'turn/end') {
|
|
473
|
+
const count = (this.turnCounts.get(sessionId) ?? 0) + 1;
|
|
474
|
+
this.turnCounts.set(sessionId, count);
|
|
475
|
+
this.callbacks.onTurnCount?.(sessionId, count);
|
|
476
|
+
}
|
|
354
477
|
const view = this.agentViews.get(sessionId);
|
|
355
478
|
if (view !== undefined) {
|
|
356
479
|
if (isSubagentDescriptor(event)) {
|
|
357
480
|
if (view.provider !== event.data.provider
|
|
481
|
+
|| view.mode !== event.data.mode
|
|
358
482
|
|| (event.data.label !== undefined && view.label !== event.data.label)) {
|
|
359
483
|
this.agentViews.set(sessionId, {
|
|
360
484
|
...view,
|
|
361
485
|
provider: event.data.provider,
|
|
486
|
+
mode: event.data.mode,
|
|
362
487
|
...(event.data.label === undefined ? {} : { label: event.data.label }),
|
|
363
488
|
});
|
|
364
489
|
changed = true;
|
|
@@ -366,21 +491,36 @@ export class DshSessionBridge {
|
|
|
366
491
|
}
|
|
367
492
|
else if (event.type === 'assistant/message') {
|
|
368
493
|
const usage = event.data.usage;
|
|
369
|
-
|
|
370
|
-
|
|
494
|
+
const delta = usage === undefined
|
|
495
|
+
? 0
|
|
496
|
+
: usage.inputTokens + usage.outputTokens
|
|
371
497
|
+ (usage.cacheReadTokens ?? 0) + (usage.cacheWriteTokens ?? 0);
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
498
|
+
const lastLine = lastTextLine(event.data);
|
|
499
|
+
const tokensChanged = delta > 0;
|
|
500
|
+
const lineChanged = lastLine !== undefined && lastLine !== view.lastLine;
|
|
501
|
+
if (tokensChanged || lineChanged) {
|
|
502
|
+
// One set: neither delta nor lastLine may clobber the other.
|
|
503
|
+
this.agentViews.set(sessionId, {
|
|
504
|
+
...view,
|
|
505
|
+
...(tokensChanged ? { tokens: view.tokens + delta } : {}),
|
|
506
|
+
...(lineChanged ? { lastLine } : {}),
|
|
507
|
+
});
|
|
508
|
+
changed = true;
|
|
376
509
|
}
|
|
377
510
|
}
|
|
378
511
|
else if (isLlmRetry(event)) {
|
|
379
|
-
|
|
512
|
+
// No text content — surface a fixed marker so the row shows the
|
|
513
|
+
// child is (re)working. Merged into one set so the retry counters
|
|
514
|
+
// and the marker can't clobber each other.
|
|
515
|
+
const retryChanged = view.retries !== event.data.retry || view.maxRetries !== event.data.maxRetries;
|
|
516
|
+
const lineChanged = view.lastLine !== RETRY_MARKER;
|
|
517
|
+
if (retryChanged || lineChanged) {
|
|
380
518
|
this.agentViews.set(sessionId, {
|
|
381
519
|
...view,
|
|
382
|
-
|
|
383
|
-
|
|
520
|
+
...(retryChanged
|
|
521
|
+
? { retries: event.data.retry, maxRetries: event.data.maxRetries }
|
|
522
|
+
: {}),
|
|
523
|
+
...(lineChanged ? { lastLine: RETRY_MARKER } : {}),
|
|
384
524
|
});
|
|
385
525
|
changed = true;
|
|
386
526
|
}
|
|
@@ -390,6 +530,11 @@ export class DshSessionBridge {
|
|
|
390
530
|
this.agentViews.set(sessionId, { ...view, lastTool: event.data.name });
|
|
391
531
|
changed = true;
|
|
392
532
|
}
|
|
533
|
+
const toolLine = `⚙ ${event.data.name}`;
|
|
534
|
+
if (toolLine !== view.lastLine) {
|
|
535
|
+
this.agentViews.set(sessionId, { ...view, lastLine: toolLine });
|
|
536
|
+
changed = true;
|
|
537
|
+
}
|
|
393
538
|
}
|
|
394
539
|
else if (event.type === 'request/context') {
|
|
395
540
|
const contextWindow = event.data.contextWindow;
|
|
@@ -417,7 +562,18 @@ export class DshSessionBridge {
|
|
|
417
562
|
}
|
|
418
563
|
/** Push the current agent views (stable order) to the renderer. */
|
|
419
564
|
emitLive() {
|
|
420
|
-
this.callbacks.onLive(
|
|
565
|
+
this.callbacks.onLive(this.getAgentViews());
|
|
566
|
+
}
|
|
567
|
+
/** Append one child-session event to its transcript buffer, dropping the oldest at the cap. */
|
|
568
|
+
appendChildLog(childId, event) {
|
|
569
|
+
let log = this.childLogs.get(childId);
|
|
570
|
+
if (log === undefined) {
|
|
571
|
+
log = [];
|
|
572
|
+
this.childLogs.set(childId, log);
|
|
573
|
+
}
|
|
574
|
+
if (log.length >= CHILD_LOG_CAP)
|
|
575
|
+
log.shift();
|
|
576
|
+
log.push(event);
|
|
421
577
|
}
|
|
422
578
|
async ensureSession() {
|
|
423
579
|
// A resume in flight would otherwise race this check: the handle is only
|
|
@@ -476,9 +632,14 @@ export class DshSessionBridge {
|
|
|
476
632
|
sessionId: SessionId(crypto.randomUUID()),
|
|
477
633
|
meta: { cwd: process.cwd() },
|
|
478
634
|
agentOptions: this.selection ?? {},
|
|
479
|
-
// Install the mutable selection so `/model` can live-switch the route
|
|
635
|
+
// Install the mutable selection so `/model` can live-switch the route,
|
|
636
|
+
// the APPEND_SYSTEM.md section on this agent ONLY (never its
|
|
637
|
+
// subagents), and the spawn-tool hide so the agent sees a single
|
|
638
|
+
// `use_agent` delegation entry.
|
|
480
639
|
setup: async (agentCtx) => {
|
|
481
640
|
installModelSelection(agentCtx, this.selectionRef);
|
|
641
|
+
installAppendSystem(agentCtx);
|
|
642
|
+
installSpawnToolFence(agentCtx);
|
|
482
643
|
},
|
|
483
644
|
});
|
|
484
645
|
}
|
package/lib/session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAmB,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAuB,MAAM,2BAA2B,CAAA;AACzG,OAAO,EAAE,SAAS,EAAmC,MAAM,0BAA0B,CAAA;AAErF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAwB5F,MAAM,OAAO,gBAAgB;IACV,GAAG,CAAS;IACZ,SAAS,CAAiB;IACnC,MAAM,CAAyB;IAC/B,QAAQ,CAAkC;IAC1C,QAAQ,CAAkC;IACjC,SAAS,GAAsB,EAAE,CAAA;IAC1C,SAAS,CAAuB;IAChC,SAAS,CAA4B;IAC7C,mFAAmF;IAClE,YAAY,GAAsB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;IAC/F,sEAAsE;IAC9D,OAAO,GAAG,KAAK,CAAA;IACN,KAAK,GAAgB;QACpC,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,CAAC;QAClB,gBAAgB,EAAE,CAAC;QACnB,QAAQ,EAAE,CAAC;QACX,aAAa,EAAE,CAAC;KACjB,CAAA;IACD,oDAAoD;IACnC,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAA;IAC1D,uEAAuE;IACtD,aAAa,GAAG,IAAI,GAAG,EAAU,CAAA;IAClD;;;;OAIG;IACc,eAAe,GAAG,IAAI,GAAG,EAAU,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{
|
|
|
116
116
|
error?: string;
|
|
117
117
|
notice?: string;
|
|
118
118
|
}
|
|
119
|
-
interface EditOptions {
|
|
119
|
+
export interface EditOptions {
|
|
120
120
|
title: string;
|
|
121
121
|
subtitle: string;
|
|
122
122
|
initial: string;
|
|
@@ -177,4 +177,3 @@ export interface OpenSettingsBrowserOptions {
|
|
|
177
177
|
* committed writes, or -1 when no namespace is registered (nothing to show).
|
|
178
178
|
*/
|
|
179
179
|
export declare function openSettingsBrowser(options: OpenSettingsBrowserOptions): Promise<number>;
|
|
180
|
-
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subagent policy for the TUI.
|
|
3
|
+
*
|
|
4
|
+
* Three knobs, all read live from the `dsh-tui` settings section at every
|
|
5
|
+
* decision point — no watcher needed (the /settings browser hot-applies, so
|
|
6
|
+
* the next guard execution / turn count reads the new value):
|
|
7
|
+
* - `maxAgents` caps concurrent live children. A `tools.guard` registered on
|
|
8
|
+
* the plugin root ctx denies model-facing spawn tools once the bridge's
|
|
9
|
+
* live child count meets the cap. Registered globally, every agent in the
|
|
10
|
+
* process obeys — this TUI's session and any delegation nesting. The
|
|
11
|
+
* workflow/ralph fan-out bypasses the tool pipeline (its worker thread
|
|
12
|
+
* spawns through the subagent provider directly), so a `subagent/start`
|
|
13
|
+
* listener prunes any newcomer that slips past the guard.
|
|
14
|
+
* - `disableSubagent` disables the plain native `subagent` tool: its calls
|
|
15
|
+
* are denied for every agent (and it is hidden from the main agent's
|
|
16
|
+
* catalog), so delegation goes through registered agent definitions
|
|
17
|
+
* (`~/.dsh/agents/*.md` via the registry's `use_agent`). `subagent_fork`,
|
|
18
|
+
* `workflow` and `ralph` stay available.
|
|
19
|
+
* - `maxRounds` caps a child's completed turns: on the bridge's `onTurnCount`
|
|
20
|
+
* the policy injects one plugin-sourced user message telling the child to
|
|
21
|
+
* wrap up. Queued as the child's next turn, it never interrupts work
|
|
22
|
+
* already underway.
|
|
23
|
+
*/
|
|
24
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
25
|
+
/**
|
|
26
|
+
* Tool names the maxAgents guard intercepts: the native subagent tool, the
|
|
27
|
+
* one-shot fork variant, the workflow fan-out entrypoint, its ralph-loop
|
|
28
|
+
* sibling, and registry plugins' `use_agent`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const SPAWN_TOOLS: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* The native plain one-shot spawn tool - the only spawn tool `disableSubagent`
|
|
33
|
+
* fences. Deliberately a single name: the TUI's user delegates through
|
|
34
|
+
* registered agents (`~/.dsh/agents/*.md` via `use_agent`) and wants ONLY the
|
|
35
|
+
* plain `subagent` tool off; `subagent_fork` (fork a running session),
|
|
36
|
+
* `workflow` and `ralph` (fan-out loops) stay available.
|
|
37
|
+
*/
|
|
38
|
+
export declare const NATIVE_SPAWN_TOOLS: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* Hide the plain `subagent` tool from ONE agent's tool catalog (best-effort).
|
|
41
|
+
* The disableSubagent guard DENIES calls at execution; this additionally
|
|
42
|
+
* makes the tool INVISIBLE to the model, so the agent sees the registered
|
|
43
|
+
* `use_agent` as its delegation entry and never attempts the fenced tool.
|
|
44
|
+
*
|
|
45
|
+
* `tools.restrict` requires a scoped context (it throws on a plain plugin
|
|
46
|
+
* ctx) - the agent setup passes its scoped `agentCtx`, exactly the surface
|
|
47
|
+
* dsh-subagent uses for `deep: 0` leaves. Best-effort by design: an absent
|
|
48
|
+
* tools service, or a restrict failure (an unknown tool name in this
|
|
49
|
+
* profile, a transient registration race), degrades silently - the live
|
|
50
|
+
* disableSubagent guard remains the enforcement backstop, so the fence is
|
|
51
|
+
* NEVER weaker for hiding. Restriction is a creation-time snapshot: a
|
|
52
|
+
* disableSubagent toggle takes effect for agents created afterwards (the
|
|
53
|
+
* guard, being live, applies immediately in both directions).
|
|
54
|
+
*/
|
|
55
|
+
export declare function installSpawnToolFence(agentCtx: Context): void;
|
|
56
|
+
/** Injected into a child that reached `maxRounds` — wrap up and report back. */
|
|
57
|
+
export declare const SUMMARY_MESSAGE: string;
|
|
58
|
+
/** The policy's live backstop — the bridge's per-child accessors. */
|
|
59
|
+
export interface SubagentPolicyState {
|
|
60
|
+
/** Current live (not settled) children — the count the `maxAgents` guard caps. */
|
|
61
|
+
getLive(): readonly {
|
|
62
|
+
childId: string;
|
|
63
|
+
label: string;
|
|
64
|
+
}[];
|
|
65
|
+
/** Completed turn count of one child (the "rounds" `maxRounds` caps). */
|
|
66
|
+
getTurnCount(childId: string): number;
|
|
67
|
+
/** Whether one child already settled — a settled child is never re-awakened. */
|
|
68
|
+
isSettled(childId: string): boolean;
|
|
69
|
+
}
|
|
70
|
+
/** The running policy: the bridge's `onTurnCount` sink plus the teardown. */
|
|
71
|
+
export interface SubagentPolicy {
|
|
72
|
+
/** Called by the bridge whenever one child completed a turn. */
|
|
73
|
+
onTurnCount(childId: string, count: number): void;
|
|
74
|
+
/** Unwind the guard and event listeners. */
|
|
75
|
+
dispose(): void;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Install the subagent policy on the plugin root ctx.
|
|
79
|
+
*
|
|
80
|
+
* @param ctx - plugin context. The settings-service lookup inside the helpers
|
|
81
|
+
* is defensive: a settings-less deployment resolves the defaults, so the
|
|
82
|
+
* policy still enforces its documented caps.
|
|
83
|
+
* @param state - the host's live view (bridge.getLiveChildren /
|
|
84
|
+
* bridge.getTurnCount). The guard and the round injection read it at every
|
|
85
|
+
* decision — no snapshot, no watch.
|
|
86
|
+
* @returns the policy handle wired to the bridge's `onTurnCount`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function applySubagentPolicy(ctx: Context, state: SubagentPolicyState): SubagentPolicy;
|