@aiwayds/dsh-tui-pi 0.1.1 → 0.3.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 +468 -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 +8 -0
- package/lib/footer.js +8 -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 +301 -29
- package/lib/index.js.map +1 -1
- package/lib/keymap.d.ts +177 -0
- package/lib/keymap.js +189 -0
- package/lib/keymap.js.map +1 -0
- package/lib/live-widgets.d.ts +29 -24
- package/lib/live-widgets.js +78 -45
- 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 +137 -10
- package/lib/session.js.map +1 -1
- package/lib/settings.d.ts +1 -2
- package/lib/subagent-policy.d.ts +58 -0
- package/lib/subagent-policy.js +137 -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 +39 -4
- package/lib/theme-settings.js +69 -12
- package/lib/theme-settings.js.map +1 -1
- package/lib/tui.d.ts +23 -9
- package/lib/tui.js +99 -8
- 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/lib/session.js
CHANGED
|
@@ -14,6 +14,49 @@ 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
16
|
import { isAgentEnd, isAgentStart, isLlmRetry, isSubagentDescriptor } from "./dsh-events.js";
|
|
17
|
+
/**
|
|
18
|
+
* Per-child transcript buffer cap. 2000 events covers a long delegated task's
|
|
19
|
+
* assistant/tool/user rows (~a few hundred KB at worst) while bounding a
|
|
20
|
+
* runaway child; the viewer flags truncation instead of dropping silently.
|
|
21
|
+
*/
|
|
22
|
+
const CHILD_LOG_CAP = 2000;
|
|
23
|
+
/** Tail marker for `llm/retry` events (no text content — the row shows it is re-working). */
|
|
24
|
+
const RETRY_MARKER = '↻ retry';
|
|
25
|
+
/** Strip ANSI SGR escape sequences (the only escapes collected into assistant text). */
|
|
26
|
+
function stripAnsi(text) {
|
|
27
|
+
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Last visible text line of an `assistant/message` event's content, or
|
|
31
|
+
* undefined when it carries no text block. Defensive: reads through an
|
|
32
|
+
* `unknown` shape (the declaring package's content model is not imported
|
|
33
|
+
* here) and never throws — a missing/unexpected field simply yields nothing.
|
|
34
|
+
*/
|
|
35
|
+
function lastTextLine(data) {
|
|
36
|
+
const content = data?.message?.content;
|
|
37
|
+
if (!Array.isArray(content))
|
|
38
|
+
return undefined;
|
|
39
|
+
let blockText;
|
|
40
|
+
for (const block of content) {
|
|
41
|
+
const b = block;
|
|
42
|
+
if (b?.type === 'text' && typeof b.text === 'string' && b.text !== '') {
|
|
43
|
+
blockText = b.text;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (blockText === undefined)
|
|
47
|
+
return undefined;
|
|
48
|
+
// Last non-blank line of the text body, whitespace-folded so a wrapped/
|
|
49
|
+
// CRLF stream collapses onto one row.
|
|
50
|
+
const body = stripAnsi(blockText).replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
51
|
+
const lines = body.split('\n');
|
|
52
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
53
|
+
const line = lines[i].trim();
|
|
54
|
+
if (line === '')
|
|
55
|
+
continue;
|
|
56
|
+
return line.replace(/\s+/g, ' ');
|
|
57
|
+
}
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
17
60
|
export class DshSessionBridge {
|
|
18
61
|
ctx;
|
|
19
62
|
callbacks;
|
|
@@ -39,6 +82,15 @@ export class DshSessionBridge {
|
|
|
39
82
|
agentViews = new Map();
|
|
40
83
|
/** Child session ids whose own events we fold into the agent views. */
|
|
41
84
|
childSessions = new Set();
|
|
85
|
+
/**
|
|
86
|
+
* Per-child event ring buffer — the raw transcript the subagent viewer
|
|
87
|
+
* renders. Capped so a runaway child cannot grow the process unboundedly;
|
|
88
|
+
* the oldest events drop off (the viewer shows a "history truncated" hint
|
|
89
|
+
* when the cap is hit).
|
|
90
|
+
*/
|
|
91
|
+
childLogs = new Map();
|
|
92
|
+
/** Per-child completed turn count — the "rounds" the policy caps. */
|
|
93
|
+
turnCounts = new Map();
|
|
42
94
|
/**
|
|
43
95
|
* Session ids that can own tracked children (this session first, then every
|
|
44
96
|
* tracked child — delegation nests). Used to match `parentSession` headers
|
|
@@ -74,6 +126,7 @@ export class DshSessionBridge {
|
|
|
74
126
|
&& !this.agentViews.has(sessionKey)) {
|
|
75
127
|
this.agentViews.set(sessionKey, {
|
|
76
128
|
childId: sessionKey,
|
|
129
|
+
parentSession: String(header.parentSession),
|
|
77
130
|
label: `subagent ${sessionKey.slice(0, 8)}`,
|
|
78
131
|
startedAt: event.time,
|
|
79
132
|
tokens: 0,
|
|
@@ -87,6 +140,12 @@ export class DshSessionBridge {
|
|
|
87
140
|
if (this.trackedSessions.has(sessionKey)) {
|
|
88
141
|
this.foldTracked(sessionKey, event);
|
|
89
142
|
}
|
|
143
|
+
// Buffer the child's OWN log for the viewer (not the parent's workflow
|
|
144
|
+
// rows, which carry no child transcript). The buffer is capped; the
|
|
145
|
+
// viewer reports truncation when the head dropped off.
|
|
146
|
+
if (this.childSessions.has(sessionKey)) {
|
|
147
|
+
this.appendChildLog(sessionKey, event);
|
|
148
|
+
}
|
|
90
149
|
if (this.sessionId !== undefined && session.id === this.sessionId) {
|
|
91
150
|
this.applyEvent(event);
|
|
92
151
|
this.callbacks.onEvent(event);
|
|
@@ -107,6 +166,30 @@ export class DshSessionBridge {
|
|
|
107
166
|
getSessionId() {
|
|
108
167
|
return this.sessionId;
|
|
109
168
|
}
|
|
169
|
+
/** Sorted snapshot of every tracked child (running and settled). */
|
|
170
|
+
getAgentViews() {
|
|
171
|
+
return [...this.agentViews.values()].sort((a, b) => a.startedAt - b.startedAt || a.childId.localeCompare(b.childId));
|
|
172
|
+
}
|
|
173
|
+
/** Children still running (`outcome` unset) — the live count the guard caps. */
|
|
174
|
+
getLiveChildren() {
|
|
175
|
+
return this.getAgentViews().filter(view => view.outcome === undefined);
|
|
176
|
+
}
|
|
177
|
+
/** The buffered transcript of one child, in log order (capped, maybe truncated). */
|
|
178
|
+
getChildLog(childId) {
|
|
179
|
+
return this.childLogs.get(childId) ?? [];
|
|
180
|
+
}
|
|
181
|
+
/** Completed turn count of one child ("rounds"). */
|
|
182
|
+
getTurnCount(childId) {
|
|
183
|
+
return this.turnCounts.get(childId) ?? 0;
|
|
184
|
+
}
|
|
185
|
+
/** Whether one child settled (a continuable child may resume later). */
|
|
186
|
+
isChildSettled(childId) {
|
|
187
|
+
return this.agentViews.get(childId)?.outcome !== undefined;
|
|
188
|
+
}
|
|
189
|
+
/** True when the child's buffered transcript dropped its oldest events. */
|
|
190
|
+
isChildLogTruncated(childId) {
|
|
191
|
+
return (this.childLogs.get(childId)?.length ?? 0) >= CHILD_LOG_CAP;
|
|
192
|
+
}
|
|
110
193
|
/** Queue one user prompt, creating the session lazily on first use. */
|
|
111
194
|
async prompt(text) {
|
|
112
195
|
const handle = await this.ensureSession();
|
|
@@ -169,6 +252,8 @@ export class DshSessionBridge {
|
|
|
169
252
|
this.running = false;
|
|
170
253
|
this.agentViews.clear();
|
|
171
254
|
this.childSessions.clear();
|
|
255
|
+
this.childLogs.clear();
|
|
256
|
+
this.turnCounts.clear();
|
|
172
257
|
this.trackedSessions.clear();
|
|
173
258
|
this.runSeqToChild.clear();
|
|
174
259
|
if (handle !== undefined)
|
|
@@ -197,6 +282,8 @@ export class DshSessionBridge {
|
|
|
197
282
|
this.stats.cacheHitRate = undefined;
|
|
198
283
|
this.agentViews.clear();
|
|
199
284
|
this.childSessions.clear();
|
|
285
|
+
this.childLogs.clear();
|
|
286
|
+
this.turnCounts.clear();
|
|
200
287
|
this.trackedSessions.clear();
|
|
201
288
|
this.runSeqToChild.clear();
|
|
202
289
|
this.emitLive();
|
|
@@ -351,14 +438,23 @@ export class DshSessionBridge {
|
|
|
351
438
|
}
|
|
352
439
|
}
|
|
353
440
|
if (this.childSessions.has(sessionId)) {
|
|
441
|
+
// Round counting is view-independent: every completed turn of the child
|
|
442
|
+
// is one round, even once the view settled (continuable children resume).
|
|
443
|
+
if (event.type === 'turn/end') {
|
|
444
|
+
const count = (this.turnCounts.get(sessionId) ?? 0) + 1;
|
|
445
|
+
this.turnCounts.set(sessionId, count);
|
|
446
|
+
this.callbacks.onTurnCount?.(sessionId, count);
|
|
447
|
+
}
|
|
354
448
|
const view = this.agentViews.get(sessionId);
|
|
355
449
|
if (view !== undefined) {
|
|
356
450
|
if (isSubagentDescriptor(event)) {
|
|
357
451
|
if (view.provider !== event.data.provider
|
|
452
|
+
|| view.mode !== event.data.mode
|
|
358
453
|
|| (event.data.label !== undefined && view.label !== event.data.label)) {
|
|
359
454
|
this.agentViews.set(sessionId, {
|
|
360
455
|
...view,
|
|
361
456
|
provider: event.data.provider,
|
|
457
|
+
mode: event.data.mode,
|
|
362
458
|
...(event.data.label === undefined ? {} : { label: event.data.label }),
|
|
363
459
|
});
|
|
364
460
|
changed = true;
|
|
@@ -366,21 +462,36 @@ export class DshSessionBridge {
|
|
|
366
462
|
}
|
|
367
463
|
else if (event.type === 'assistant/message') {
|
|
368
464
|
const usage = event.data.usage;
|
|
369
|
-
|
|
370
|
-
|
|
465
|
+
const delta = usage === undefined
|
|
466
|
+
? 0
|
|
467
|
+
: usage.inputTokens + usage.outputTokens
|
|
371
468
|
+ (usage.cacheReadTokens ?? 0) + (usage.cacheWriteTokens ?? 0);
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
469
|
+
const lastLine = lastTextLine(event.data);
|
|
470
|
+
const tokensChanged = delta > 0;
|
|
471
|
+
const lineChanged = lastLine !== undefined && lastLine !== view.lastLine;
|
|
472
|
+
if (tokensChanged || lineChanged) {
|
|
473
|
+
// One set: neither delta nor lastLine may clobber the other.
|
|
474
|
+
this.agentViews.set(sessionId, {
|
|
475
|
+
...view,
|
|
476
|
+
...(tokensChanged ? { tokens: view.tokens + delta } : {}),
|
|
477
|
+
...(lineChanged ? { lastLine } : {}),
|
|
478
|
+
});
|
|
479
|
+
changed = true;
|
|
376
480
|
}
|
|
377
481
|
}
|
|
378
482
|
else if (isLlmRetry(event)) {
|
|
379
|
-
|
|
483
|
+
// No text content — surface a fixed marker so the row shows the
|
|
484
|
+
// child is (re)working. Merged into one set so the retry counters
|
|
485
|
+
// and the marker can't clobber each other.
|
|
486
|
+
const retryChanged = view.retries !== event.data.retry || view.maxRetries !== event.data.maxRetries;
|
|
487
|
+
const lineChanged = view.lastLine !== RETRY_MARKER;
|
|
488
|
+
if (retryChanged || lineChanged) {
|
|
380
489
|
this.agentViews.set(sessionId, {
|
|
381
490
|
...view,
|
|
382
|
-
|
|
383
|
-
|
|
491
|
+
...(retryChanged
|
|
492
|
+
? { retries: event.data.retry, maxRetries: event.data.maxRetries }
|
|
493
|
+
: {}),
|
|
494
|
+
...(lineChanged ? { lastLine: RETRY_MARKER } : {}),
|
|
384
495
|
});
|
|
385
496
|
changed = true;
|
|
386
497
|
}
|
|
@@ -390,6 +501,11 @@ export class DshSessionBridge {
|
|
|
390
501
|
this.agentViews.set(sessionId, { ...view, lastTool: event.data.name });
|
|
391
502
|
changed = true;
|
|
392
503
|
}
|
|
504
|
+
const toolLine = `⚙ ${event.data.name}`;
|
|
505
|
+
if (toolLine !== view.lastLine) {
|
|
506
|
+
this.agentViews.set(sessionId, { ...view, lastLine: toolLine });
|
|
507
|
+
changed = true;
|
|
508
|
+
}
|
|
393
509
|
}
|
|
394
510
|
else if (event.type === 'request/context') {
|
|
395
511
|
const contextWindow = event.data.contextWindow;
|
|
@@ -417,7 +533,18 @@ export class DshSessionBridge {
|
|
|
417
533
|
}
|
|
418
534
|
/** Push the current agent views (stable order) to the renderer. */
|
|
419
535
|
emitLive() {
|
|
420
|
-
this.callbacks.onLive(
|
|
536
|
+
this.callbacks.onLive(this.getAgentViews());
|
|
537
|
+
}
|
|
538
|
+
/** Append one child-session event to its transcript buffer, dropping the oldest at the cap. */
|
|
539
|
+
appendChildLog(childId, event) {
|
|
540
|
+
let log = this.childLogs.get(childId);
|
|
541
|
+
if (log === undefined) {
|
|
542
|
+
log = [];
|
|
543
|
+
this.childLogs.set(childId, log);
|
|
544
|
+
}
|
|
545
|
+
if (log.length >= CHILD_LOG_CAP)
|
|
546
|
+
log.shift();
|
|
547
|
+
log.push(event);
|
|
421
548
|
}
|
|
422
549
|
async ensureSession() {
|
|
423
550
|
// A resume in flight would otherwise race this check: the handle is only
|
package/lib/session.js.map
CHANGED
|
@@ -1 +1 @@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AK,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,CAAA;IACzC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,KAAK,GAAG,UAAqC,CAAA;IACnD,MAAM,GAAG,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,OAAO,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACjC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC7D,CAAC"}
|
package/lib/settings.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export interface CommitResult {
|
|
|
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,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subagent concurrency and round-limit policy for the TUI.
|
|
3
|
+
*
|
|
4
|
+
* Two knobs, both 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
|
+
* - `maxRounds` caps a child's completed turns: on the bridge's `onTurnCount`
|
|
15
|
+
* the policy injects one plugin-sourced user message telling the child to
|
|
16
|
+
* wrap up. Queued as the child's next turn, it never interrupts work
|
|
17
|
+
* already underway.
|
|
18
|
+
*/
|
|
19
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
20
|
+
/**
|
|
21
|
+
* Tool names the maxAgents guard intercepts: the native subagent tool, the
|
|
22
|
+
* one-shot fork variant, the workflow fan-out entrypoint, its ralph-loop
|
|
23
|
+
* sibling, and registry plugins' `use_agent`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SPAWN_TOOLS: readonly string[];
|
|
26
|
+
/** Injected into a child that reached `maxRounds` — wrap up and report back. */
|
|
27
|
+
export declare const SUMMARY_MESSAGE: string;
|
|
28
|
+
/** The policy's live backstop — the bridge's per-child accessors. */
|
|
29
|
+
export interface SubagentPolicyState {
|
|
30
|
+
/** Current live (not settled) children — the count the `maxAgents` guard caps. */
|
|
31
|
+
getLive(): readonly {
|
|
32
|
+
childId: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}[];
|
|
35
|
+
/** Completed turn count of one child (the "rounds" `maxRounds` caps). */
|
|
36
|
+
getTurnCount(childId: string): number;
|
|
37
|
+
/** Whether one child already settled — a settled child is never re-awakened. */
|
|
38
|
+
isSettled(childId: string): boolean;
|
|
39
|
+
}
|
|
40
|
+
/** The running policy: the bridge's `onTurnCount` sink plus the teardown. */
|
|
41
|
+
export interface SubagentPolicy {
|
|
42
|
+
/** Called by the bridge whenever one child completed a turn. */
|
|
43
|
+
onTurnCount(childId: string, count: number): void;
|
|
44
|
+
/** Unwind the guard and event listeners. */
|
|
45
|
+
dispose(): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Install the subagent policy on the plugin root ctx.
|
|
49
|
+
*
|
|
50
|
+
* @param ctx - plugin context. The settings-service lookup inside the helpers
|
|
51
|
+
* is defensive: a settings-less deployment resolves the defaults, so the
|
|
52
|
+
* policy still enforces its documented caps.
|
|
53
|
+
* @param state - the host's live view (bridge.getLiveChildren /
|
|
54
|
+
* bridge.getTurnCount). The guard and the round injection read it at every
|
|
55
|
+
* decision — no snapshot, no watch.
|
|
56
|
+
* @returns the policy handle wired to the bridge's `onTurnCount`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function applySubagentPolicy(ctx: Context, state: SubagentPolicyState): SubagentPolicy;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subagent concurrency and round-limit policy for the TUI.
|
|
3
|
+
*
|
|
4
|
+
* Two knobs, both 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
|
+
* - `maxRounds` caps a child's completed turns: on the bridge's `onTurnCount`
|
|
15
|
+
* the policy injects one plugin-sourced user message telling the child to
|
|
16
|
+
* wrap up. Queued as the child's next turn, it never interrupts work
|
|
17
|
+
* already underway.
|
|
18
|
+
*/
|
|
19
|
+
import { createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
20
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
21
|
+
import { readSubagentLimits } from "./theme-settings.js";
|
|
22
|
+
/**
|
|
23
|
+
* Tool names the maxAgents guard intercepts: the native subagent tool, the
|
|
24
|
+
* one-shot fork variant, the workflow fan-out entrypoint, its ralph-loop
|
|
25
|
+
* sibling, and registry plugins' `use_agent`.
|
|
26
|
+
*/
|
|
27
|
+
export const SPAWN_TOOLS = [
|
|
28
|
+
'subagent',
|
|
29
|
+
'subagent_fork',
|
|
30
|
+
'workflow',
|
|
31
|
+
'ralph',
|
|
32
|
+
'use_agent',
|
|
33
|
+
];
|
|
34
|
+
/** Injected into a child that reached `maxRounds` — wrap up and report back. */
|
|
35
|
+
export const SUMMARY_MESSAGE = '总结和结束这个任务,汇报情况。';
|
|
36
|
+
/**
|
|
37
|
+
* Install the subagent policy on the plugin root ctx.
|
|
38
|
+
*
|
|
39
|
+
* @param ctx - plugin context. The settings-service lookup inside the helpers
|
|
40
|
+
* is defensive: a settings-less deployment resolves the defaults, so the
|
|
41
|
+
* policy still enforces its documented caps.
|
|
42
|
+
* @param state - the host's live view (bridge.getLiveChildren /
|
|
43
|
+
* bridge.getTurnCount). The guard and the round injection read it at every
|
|
44
|
+
* decision — no snapshot, no watch.
|
|
45
|
+
* @returns the policy handle wired to the bridge's `onTurnCount`.
|
|
46
|
+
*/
|
|
47
|
+
export function applySubagentPolicy(ctx, state) {
|
|
48
|
+
const disposers = [];
|
|
49
|
+
const injected = new Set();
|
|
50
|
+
// maxAgents guard: global (plugin root ctx), every spawn-tool call is
|
|
51
|
+
// denied while live children are at the cap. Zero disables the guard.
|
|
52
|
+
// The cap is approximate, not a hard admission lock: a burst of parallel
|
|
53
|
+
// spawn calls can briefly overshoot before the bridge's firehose discovery
|
|
54
|
+
// counts the newcomers — the subagent/start backstop below prunes the
|
|
55
|
+
// overshoot, and the next spawn's guard reads the caught-up count.
|
|
56
|
+
const tools = ctx.get('tools');
|
|
57
|
+
if (tools?.guard !== undefined) {
|
|
58
|
+
disposers.push(tools.guard((exec) => {
|
|
59
|
+
if (!SPAWN_TOOLS.includes(exec.name))
|
|
60
|
+
return undefined;
|
|
61
|
+
const maxAgents = readSubagentLimits(ctx).maxAgents;
|
|
62
|
+
if (maxAgents <= 0)
|
|
63
|
+
return undefined;
|
|
64
|
+
const live = state.getLive();
|
|
65
|
+
if (live.length < maxAgents)
|
|
66
|
+
return undefined;
|
|
67
|
+
const running = live.map((agent) => agent.label).join(', ');
|
|
68
|
+
return `Agent limit reached (${live.length}/${maxAgents}): ${running} still running — wait for one to finish or use list_agents before spawning more.`;
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
// Workflow/ralph backstop: the worker thread fans children out through the
|
|
72
|
+
// subagent provider, never through the tool pipeline — the only leak past
|
|
73
|
+
// the guard. Prune a newcomer whose start overshoots the cap. The event is
|
|
74
|
+
// foreign to this bundle's type environment (`@deepseek-ai/dsh-subagent` is
|
|
75
|
+
// not installed), so the subscription rides the base event bus rather than
|
|
76
|
+
// the typed `ctx.on`.
|
|
77
|
+
const eventDisposer = ctx.events.on('subagent/start', (info) => {
|
|
78
|
+
if (info?.id === undefined)
|
|
79
|
+
return;
|
|
80
|
+
const maxAgents = readSubagentLimits(ctx).maxAgents;
|
|
81
|
+
if (maxAgents <= 0)
|
|
82
|
+
return;
|
|
83
|
+
// Exclude the newcomer itself: whether or not its own session events
|
|
84
|
+
// have reached the bridge's count yet (the subagent/start notification
|
|
85
|
+
// and the child's first firehose event race), the child is pruned only
|
|
86
|
+
// when the OTHER live children already fill the cap — a legitimate
|
|
87
|
+
// Nth-at-cap child is never cancelled on either ordering.
|
|
88
|
+
const live = state.getLive().filter(view => view.childId !== String(info.id));
|
|
89
|
+
if (live.length < maxAgents)
|
|
90
|
+
return;
|
|
91
|
+
ctx.agents.get(info.id)?.cancel({
|
|
92
|
+
kind: 'hook',
|
|
93
|
+
reason: 'over the dsh-tui maxAgents policy cap — prune a fan-out child',
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
disposers.push(eventDisposer);
|
|
97
|
+
/**
|
|
98
|
+
* Bridge turn-count sink: inject the summary message exactly once per
|
|
99
|
+
* child, at the first turn that reaches a positive `maxRounds`. A missing
|
|
100
|
+
* agent (cold, or transiently unregistered) is skipped silently; a settled
|
|
101
|
+
* child is skipped too — injecting into a finished one would wake it for a
|
|
102
|
+
* pointless wrap-up round (continuable children that resume later get their
|
|
103
|
+
* chance on the next counted turn). Repeated injections are impossible by
|
|
104
|
+
* construction (the set is only written on success).
|
|
105
|
+
*/
|
|
106
|
+
function onTurnCount(childId, count) {
|
|
107
|
+
if (injected.has(childId))
|
|
108
|
+
return;
|
|
109
|
+
const maxRounds = readSubagentLimits(ctx).maxRounds;
|
|
110
|
+
if (maxRounds <= 0)
|
|
111
|
+
return;
|
|
112
|
+
if (count < maxRounds)
|
|
113
|
+
return;
|
|
114
|
+
if (state.isSettled(childId))
|
|
115
|
+
return;
|
|
116
|
+
const agent = ctx.agents.get(SessionId(childId));
|
|
117
|
+
if (agent === undefined)
|
|
118
|
+
return;
|
|
119
|
+
injected.add(childId);
|
|
120
|
+
agent.followup(createUserMessage({
|
|
121
|
+
content: [{ type: 'text', text: SUMMARY_MESSAGE }],
|
|
122
|
+
source: { kind: 'plugin', plugin: 'dsh-tui-pi' },
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
onTurnCount,
|
|
127
|
+
dispose() {
|
|
128
|
+
for (const dispose of disposers.splice(0)) {
|
|
129
|
+
try {
|
|
130
|
+
dispose();
|
|
131
|
+
}
|
|
132
|
+
catch { /* contained */ }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=subagent-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subagent-policy.js","sourceRoot":"","sources":["../src/subagent-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,C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M,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;QAChD,IAAI,KAAK,KAAK,SAAS;YAAE,OAAM;QAC/B,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QACrB,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAC/B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;YAClD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE;SACjD,CAAC,CAAC,CAAA;IACL,CAAC;IAED,OAAO;QACL,WAAW;QACX,OAAO;YACL,KAAK,MAAM,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1C,IAAI,CAAC;oBAAC,OAAO,EAAE,CAAA;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The subagent viewer — the Ctrl+G surface. Two levels, both on the shared
|
|
3
|
+
* PanelHost overlay (80%): a SelectList picker over the bridge's child views,
|
|
4
|
+
* then a live transcript panel for one child's buffered event log.
|
|
5
|
+
*
|
|
6
|
+
* Picker rows (running first, then the five most recent settled) carry the
|
|
7
|
+
* full picture of a delegation: status icon, label, delegation mode, rounds
|
|
8
|
+
* against the policy cap (`maxRounds` from `readSubagentLimits`, only shown
|
|
9
|
+
* when > 0), token spend (k) and elapsed time. Settled rows read as faded
|
|
10
|
+
* because their status icon and the muted description column mark the outcome.
|
|
11
|
+
*
|
|
12
|
+
* Transcript panel: one human-readable line per buffered SessionEvent
|
|
13
|
+
* (user/assistant messages, tool calls + truncated results, turns, descriptor,
|
|
14
|
+
* todos). The log is a capped per-child ring buffer (2000 events); a dropped
|
|
15
|
+
* head is reported at the top. While the panel is open a ~300ms timer rebuilds
|
|
16
|
+
* the lines from the bridge and re-renders, and the view follows the tail like
|
|
17
|
+
* a ScrollView follow:'end' (an explicit scroll-up detaches; reaching the
|
|
18
|
+
* bottom re-attaches). Esc closes, or a deliberate double-`x` within
|
|
19
|
+
* `DOUBLE_PRESS_MS`.
|
|
20
|
+
*/
|
|
21
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
22
|
+
import { type SelectItem, type TUI } from '@earendil-works/pi-tui';
|
|
23
|
+
import type { AgentView } from './dsh-events.ts';
|
|
24
|
+
import type { DshSessionBridge } from './session.ts';
|
|
25
|
+
import { type TuiTheme } from './theme/index.ts';
|
|
26
|
+
/**
|
|
27
|
+
* The picker rows: running children first (the live items the key is for),
|
|
28
|
+
* then the five most recent settled ones (newest settle first). Each row
|
|
29
|
+
* reads `⠋ label [mode] · rounds N[/max]` with the token spend and elapsed
|
|
30
|
+
* seconds in the muted description column.
|
|
31
|
+
*/
|
|
32
|
+
export declare function pickerItems(views: readonly AgentView[], getTurnCount: (childId: string) => number, maxRounds: number): SelectItem[];
|
|
33
|
+
/**
|
|
34
|
+
* The next selected index after a picker items swap, preserving the selection
|
|
35
|
+
* by item value. `previous === undefined` (no selection yet) starts at 0; a
|
|
36
|
+
* value that dropped off the new list (e.g. a settled child fell out of the
|
|
37
|
+
* recent-settled cap) clamps to the last row rather than resetting the user
|
|
38
|
+
* to the top. Pure and exported for the regression test.
|
|
39
|
+
*/
|
|
40
|
+
export declare function nextSelectedIndex(items: readonly SelectItem[], previous: string | undefined): number;
|
|
41
|
+
/**
|
|
42
|
+
* Open the subagent picker / viewer. A SelectList of the bridge's child views
|
|
43
|
+
* (running first, then the five recent settled) opens; Enter opens a
|
|
44
|
+
* live-refreshing transcript panel for that child. An empty list (no running,
|
|
45
|
+
* no settled) closes immediately. Focus returns to `restoreFocus` on close;
|
|
46
|
+
* the promise settles when the viewer closes (value is meaningless — index.ts
|
|
47
|
+
* never branches on it).
|
|
48
|
+
*/
|
|
49
|
+
export declare function openSubagentViewer(ctx: Context, tui: TUI, theme: TuiTheme, bridge: DshSessionBridge, restoreFocus: () => void): Promise<void>;
|