@qlzt/dsh-subagent 0.2.1-alpha.2 → 0.2.1-rc.2
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.i18n.yaml +8 -2
- package/README.md +11 -0
- package/README.zh.md +11 -0
- package/lib/index.js +50 -51
- package/lib/typert.host.js +176 -33
- package/lib/typert.remote-client.d.ts +6 -2
- package/lib/typert.remote-client.js +82 -28
- package/lib/types/child-agent.d.ts +15 -29
- package/lib/types/child-agent.js +24 -27
- package/lib/types/index.js +6 -3
- package/lib/types/manager.js +29 -7
- package/lib/types/out-of-process.d.ts +1 -1
- package/lib/types/out-of-process.js +2 -3
- package/lib/types/types.d.ts +9 -19
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +56 -54
|
@@ -54,23 +54,22 @@ export declare function resolveChildAgentOptions(parent: Agent, requested: Agent
|
|
|
54
54
|
* survive persistence, the seed boundary that separates inherited parent
|
|
55
55
|
* history from child work, and the composition the child runs under.
|
|
56
56
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* composition and its header still names the older one. Recording it is what
|
|
60
|
-
* makes a child's history reconstructable: without it a cold read of the child
|
|
61
|
-
* resolves the deployment default and rebuilds turns under a tool set the
|
|
62
|
-
* child never had.
|
|
57
|
+
* Omitted selection uses the parent's live composition, including any switch
|
|
58
|
+
* made while the parent was blank.
|
|
63
59
|
* @param parent - the delegating parent agent.
|
|
64
60
|
* @param childDepth - the resolved delegation depth to persist.
|
|
65
61
|
* @param isSeeded - whether this child inherits a parent-log prefix, including an explicitly empty one.
|
|
62
|
+
* @param selectedPreset - independent selection, or omission to inherit the parent.
|
|
66
63
|
* @returns the `meta` for `ctx.agents.create()`.
|
|
67
64
|
*/
|
|
68
|
-
export declare function childSessionMeta(parent: Agent, childDepth: number, isSeeded: boolean): NonNullable<CreateAgentOptions['meta']>;
|
|
65
|
+
export declare function childSessionMeta(parent: Agent, childDepth: number, isSeeded: boolean, selectedPreset?: string): NonNullable<CreateAgentOptions['meta']>;
|
|
69
66
|
/** The scoped composition a child agent's creation window applies. */
|
|
70
67
|
export interface ChildComposition {
|
|
71
|
-
/**
|
|
68
|
+
/** Independently mounted preset; omission shares the parent's standing generation. */
|
|
69
|
+
readonly agentPreset?: string | undefined;
|
|
70
|
+
/** Historical descriptor persona reapplied only during cold resume. */
|
|
72
71
|
readonly persona?: string | undefined;
|
|
73
|
-
/**
|
|
72
|
+
/** Historical descriptor tool restriction reapplied only during cold resume. */
|
|
74
73
|
readonly toolFilter?: ToolRestriction | undefined;
|
|
75
74
|
}
|
|
76
75
|
/**
|
|
@@ -80,28 +79,15 @@ export interface ChildComposition {
|
|
|
80
79
|
*/
|
|
81
80
|
export declare const SUBAGENT_DELEGATION_CONTEXT: string;
|
|
82
81
|
/**
|
|
83
|
-
* Compose
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* scope and therefore invisible to its parent and siblings. Creation and cold
|
|
87
|
-
* resume both pass through here.
|
|
88
|
-
*
|
|
89
|
-
* The join comes first and the child's own registrations second, which is the
|
|
90
|
-
* order the layering already implies — the nearest scope wins a name, and a
|
|
91
|
-
* per-child restriction intersects with everything its chain admits — but
|
|
92
|
-
* stating it here keeps the two steps from being read as independent.
|
|
93
|
-
*
|
|
94
|
-
* The join and the per-child registrations live in ONE call because a child
|
|
95
|
-
* composed without the join is exactly the defect this function exists to
|
|
96
|
-
* prevent: with every model-facing row on the agent plane, a child that joins
|
|
97
|
-
* no preset sees an empty tool registry and none of its parent's prompt
|
|
98
|
-
* sections. Taking the parent as a parameter is what makes that omission
|
|
99
|
-
* unrepresentable at the call sites.
|
|
82
|
+
* Compose a child before publication and restore historical descriptor overrides.
|
|
83
|
+
* Explicit selection mounts the named preset; omission synchronously joins the
|
|
84
|
+
* parent's current generation. Registrations belong to the child's scope.
|
|
100
85
|
* @param childCtx - the child agent's scoped creation context.
|
|
101
|
-
* @param parent - the delegating parent
|
|
102
|
-
* @param composition -
|
|
86
|
+
* @param parent - the delegating parent used when no preset is selected.
|
|
87
|
+
* @param composition - independent preset and any overrides read from a historical descriptor.
|
|
88
|
+
* @returns A promise when mounting an independent preset; otherwise completes synchronously.
|
|
103
89
|
*/
|
|
104
|
-
export declare function applyChildComposition(childCtx: Context, parent: Agent, composition: ChildComposition): void
|
|
90
|
+
export declare function applyChildComposition(childCtx: Context, parent: Agent, composition: ChildComposition): void | Promise<void>;
|
|
105
91
|
/** Policy seeded onto a child session's log at the delegation boundary. */
|
|
106
92
|
export interface DelegatedPolicyOverrides {
|
|
107
93
|
/**
|
package/lib/types/child-agent.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @module @qlzt/dsh-subagent/child-agent
|
|
7
7
|
*/
|
|
8
8
|
import { delegationDepthOf } from "./depth.js";
|
|
9
|
+
import { SubagentError } from "./error.js";
|
|
9
10
|
/** Thrown when starting a child would exceed the requested depth cap. */
|
|
10
11
|
export class SubagentDepthError extends Error {
|
|
11
12
|
attemptedDepth;
|
|
@@ -95,20 +96,17 @@ export function resolveChildAgentOptions(parent, requested, childDepth) {
|
|
|
95
96
|
* survive persistence, the seed boundary that separates inherited parent
|
|
96
97
|
* history from child work, and the composition the child runs under.
|
|
97
98
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* composition and its header still names the older one. Recording it is what
|
|
101
|
-
* makes a child's history reconstructable: without it a cold read of the child
|
|
102
|
-
* resolves the deployment default and rebuilds turns under a tool set the
|
|
103
|
-
* child never had.
|
|
99
|
+
* Omitted selection uses the parent's live composition, including any switch
|
|
100
|
+
* made while the parent was blank.
|
|
104
101
|
* @param parent - the delegating parent agent.
|
|
105
102
|
* @param childDepth - the resolved delegation depth to persist.
|
|
106
103
|
* @param isSeeded - whether this child inherits a parent-log prefix, including an explicitly empty one.
|
|
104
|
+
* @param selectedPreset - independent selection, or omission to inherit the parent.
|
|
107
105
|
* @returns the `meta` for `ctx.agents.create()`.
|
|
108
106
|
*/
|
|
109
|
-
export function childSessionMeta(parent, childDepth, isSeeded) {
|
|
107
|
+
export function childSessionMeta(parent, childDepth, isSeeded, selectedPreset) {
|
|
110
108
|
const parentHeader = parent.session.header;
|
|
111
|
-
const agentPreset = parent.ctx.get('agentPresets')?.composedPreset(parent.ctx);
|
|
109
|
+
const agentPreset = selectedPreset ?? parent.ctx.get('agentPresets')?.composedPreset(parent.ctx);
|
|
112
110
|
return {
|
|
113
111
|
...parentHeader.cwd !== undefined ? { cwd: parentHeader.cwd } : {},
|
|
114
112
|
...agentPreset === undefined ? {} : { agentPreset },
|
|
@@ -131,29 +129,28 @@ export const SUBAGENT_DELEGATION_CONTEXT = 'You are a delegated subagent: your p
|
|
|
131
129
|
+ 'When the task needs access beyond that scope, do not retry the denied operation; state the '
|
|
132
130
|
+ 'limitation in your reply so the delegating agent can handle it.';
|
|
133
131
|
/**
|
|
134
|
-
* Compose
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* scope and therefore invisible to its parent and siblings. Creation and cold
|
|
138
|
-
* resume both pass through here.
|
|
139
|
-
*
|
|
140
|
-
* The join comes first and the child's own registrations second, which is the
|
|
141
|
-
* order the layering already implies — the nearest scope wins a name, and a
|
|
142
|
-
* per-child restriction intersects with everything its chain admits — but
|
|
143
|
-
* stating it here keeps the two steps from being read as independent.
|
|
144
|
-
*
|
|
145
|
-
* The join and the per-child registrations live in ONE call because a child
|
|
146
|
-
* composed without the join is exactly the defect this function exists to
|
|
147
|
-
* prevent: with every model-facing row on the agent plane, a child that joins
|
|
148
|
-
* no preset sees an empty tool registry and none of its parent's prompt
|
|
149
|
-
* sections. Taking the parent as a parameter is what makes that omission
|
|
150
|
-
* unrepresentable at the call sites.
|
|
132
|
+
* Compose a child before publication and restore historical descriptor overrides.
|
|
133
|
+
* Explicit selection mounts the named preset; omission synchronously joins the
|
|
134
|
+
* parent's current generation. Registrations belong to the child's scope.
|
|
151
135
|
* @param childCtx - the child agent's scoped creation context.
|
|
152
|
-
* @param parent - the delegating parent
|
|
153
|
-
* @param composition -
|
|
136
|
+
* @param parent - the delegating parent used when no preset is selected.
|
|
137
|
+
* @param composition - independent preset and any overrides read from a historical descriptor.
|
|
138
|
+
* @returns A promise when mounting an independent preset; otherwise completes synchronously.
|
|
154
139
|
*/
|
|
155
140
|
export function applyChildComposition(childCtx, parent, composition) {
|
|
141
|
+
if (composition.agentPreset !== undefined) {
|
|
142
|
+
const presets = childCtx.get('agentPresets');
|
|
143
|
+
if (presets === undefined) {
|
|
144
|
+
throw new SubagentError('selecting a child agent preset requires the agent-presets service', 'PRESET_UNAVAILABLE');
|
|
145
|
+
}
|
|
146
|
+
return presets.mount(childCtx, composition.agentPreset).then(() => {
|
|
147
|
+
applyChildOverrides(childCtx, composition);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
156
150
|
childCtx.get('agentPresets')?.composeFrom(childCtx, parent.ctx);
|
|
151
|
+
applyChildOverrides(childCtx, composition);
|
|
152
|
+
}
|
|
153
|
+
function applyChildOverrides(childCtx, composition) {
|
|
157
154
|
childCtx.systemPrompt.context({
|
|
158
155
|
name: 'subagent:delegation',
|
|
159
156
|
order: childCtx.systemPrompt.getContextOrder('SUBAGENT_DELEGATION'),
|
package/lib/types/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import z from '@deepseek-ai/schemastery';
|
|
|
36
36
|
import { scopeTarget } from '@qlzt/dsh-scope';
|
|
37
37
|
import { assertObjectJsonSchema } from '@qlzt/dsh-tools';
|
|
38
38
|
import { canonicalClientTimeZone } from '@qlzt/dsh-util-time';
|
|
39
|
-
import { Remote, RemoteError, TypertRemoteService } from '@qlzt/dsh-typert-protocol';
|
|
39
|
+
import { Remote, RemoteError, TypertRemoteService, principalOf } from '@qlzt/dsh-typert-protocol';
|
|
40
40
|
import { rejectPrompt, validateControlRequest, } from "./control.js";
|
|
41
41
|
import { SubagentError } from "./error.js";
|
|
42
42
|
import { assertSubagentMaxDepth } from "./depth.js";
|
|
@@ -306,10 +306,12 @@ let SubagentRuntime = (() => {
|
|
|
306
306
|
if (parent === undefined) {
|
|
307
307
|
throw new RemoteError('subagent/parent-unavailable', `parent session "${parentSessionId}" is not live`, { parentSessionId });
|
|
308
308
|
}
|
|
309
|
+
const principal = principalOf(this.ctx.invocation);
|
|
309
310
|
const source = {
|
|
310
311
|
kind: 'user',
|
|
311
312
|
rpcId: request.requestId,
|
|
312
313
|
...(canonicalTimeZone === undefined ? {} : { clientTimeZone: canonicalTimeZone }),
|
|
314
|
+
...(principal === undefined ? {} : { principal }),
|
|
313
315
|
};
|
|
314
316
|
try {
|
|
315
317
|
// Admission precedes delivery: image parts become durable references
|
|
@@ -435,12 +437,13 @@ let SubagentRuntime = (() => {
|
|
|
435
437
|
}
|
|
436
438
|
/** Reject the first requested capability that the provider lacks. */
|
|
437
439
|
assertCapabilities(provider, request) {
|
|
440
|
+
if (request.agentPreset !== undefined && (!provider.capabilities.agentPreset || provider.inheritsParentContext)) {
|
|
441
|
+
throw new SubagentError(`subagent provider "${provider.name}" does not support independent agent preset selection`, 'UNSUPPORTED_CAPABILITY');
|
|
442
|
+
}
|
|
438
443
|
const needs = [
|
|
439
444
|
{ when: request.agentOptions !== undefined, cap: 'agentOptions' },
|
|
440
445
|
{ when: request.outputSchema !== undefined, cap: 'outputSchema' },
|
|
441
446
|
{ when: request.maxDepth !== undefined, cap: 'depthLimit' },
|
|
442
|
-
{ when: request.toolFilter !== undefined, cap: 'toolFilter' },
|
|
443
|
-
{ when: request.persona !== undefined, cap: 'persona' },
|
|
444
447
|
];
|
|
445
448
|
for (const { when, cap } of needs) {
|
|
446
449
|
if (when && !provider.capabilities[cap]) {
|
package/lib/types/manager.js
CHANGED
|
@@ -335,8 +335,6 @@ export class SubagentManager {
|
|
|
335
335
|
...agentProvider !== undefined ? { agentProvider } : {},
|
|
336
336
|
...agentModel !== undefined ? { agentModel } : {},
|
|
337
337
|
...agentReasoningEffort !== undefined ? { agentReasoningEffort } : {},
|
|
338
|
-
...request.persona !== undefined ? { persona: request.persona } : {},
|
|
339
|
-
...request.toolFilter !== undefined ? { toolFilter: request.toolFilter } : {},
|
|
340
338
|
});
|
|
341
339
|
// Capture before the first await: a later parent switch belongs to the
|
|
342
340
|
// parent's future, not to this child.
|
|
@@ -379,13 +377,13 @@ export class SubagentManager {
|
|
|
379
377
|
create: {
|
|
380
378
|
cwd,
|
|
381
379
|
seed,
|
|
382
|
-
meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined),
|
|
380
|
+
meta: childSessionMeta(parent, childDepth, prepared.seed !== undefined, request.agentPreset),
|
|
383
381
|
inheritedEventCount,
|
|
384
382
|
delegatedPolicies,
|
|
385
383
|
descriptor,
|
|
386
384
|
},
|
|
387
385
|
agentOptions,
|
|
388
|
-
composition: {
|
|
386
|
+
composition: { agentPreset: request.agentPreset },
|
|
389
387
|
signal: spec.signal,
|
|
390
388
|
delivery: spec.delivery,
|
|
391
389
|
outputSchema: spec.request.outputSchema,
|
|
@@ -764,7 +762,13 @@ export class SubagentManager {
|
|
|
764
762
|
const setup = async (childCtx, child) => {
|
|
765
763
|
// Only fresh creation appends the descriptor and delegated policy after
|
|
766
764
|
// the inherited marker; a cold resume replays those persisted events.
|
|
765
|
+
if (inputs.composition.agentPreset !== undefined) {
|
|
766
|
+
await applyChildComposition(childCtx, parent, inputs.composition);
|
|
767
|
+
}
|
|
767
768
|
if (create !== undefined) {
|
|
769
|
+
if (inputs.composition.agentPreset !== undefined) {
|
|
770
|
+
child.session.append('agent-preset/selected', { agentPreset: inputs.composition.agentPreset });
|
|
771
|
+
}
|
|
768
772
|
child.session.append('subagent/descriptor', create.descriptor);
|
|
769
773
|
appendDelegatedPolicyOverrides(child.session, create.delegatedPolicies);
|
|
770
774
|
const workingDirectory = childCtx.get('workingDirectory');
|
|
@@ -772,7 +776,8 @@ export class SubagentManager {
|
|
|
772
776
|
throw new Error('local subagents require the working-directory service');
|
|
773
777
|
await workingDirectory.set(child, create.cwd, inputs.signal);
|
|
774
778
|
}
|
|
775
|
-
|
|
779
|
+
if (inputs.composition.agentPreset === undefined)
|
|
780
|
+
await applyChildComposition(childCtx, parent, inputs.composition);
|
|
776
781
|
if (inputs.outputSchema !== undefined) {
|
|
777
782
|
structured = attachStructuredRuntime(childCtx, inputs.outputSchema, () => this.resident.get(childId)?.ownedChildren.size === 0
|
|
778
783
|
&& child.inbox.nextStep.length === 0
|
|
@@ -1180,12 +1185,18 @@ export class SubagentManager {
|
|
|
1180
1185
|
const source = __addDisposableResource(env_1, observation, false);
|
|
1181
1186
|
this.assertAdmitting(parent);
|
|
1182
1187
|
this.authorizeLineage(parent, childId, source.header.parentSession);
|
|
1183
|
-
const
|
|
1188
|
+
const ownEvents = source.events.slice(source.inheritedEventCount);
|
|
1189
|
+
const descriptor = foldSubagentDescriptor(ownEvents);
|
|
1184
1190
|
if (descriptor === undefined || descriptor.mode !== 'continuable') {
|
|
1185
1191
|
throw new SubagentError(`subagent "${childId}" has no supported continuation state and cannot be resumed; choose a different target`, 'NOT_RESUMABLE');
|
|
1186
1192
|
}
|
|
1187
1193
|
let activation;
|
|
1188
1194
|
try {
|
|
1195
|
+
const independentlySelected = hasIndependentPresetSelection(ownEvents);
|
|
1196
|
+
const agentPreset = independentlySelected ? source.projections?.values.agentPreset : undefined;
|
|
1197
|
+
if (independentlySelected && typeof agentPreset !== 'string') {
|
|
1198
|
+
throw new SubagentError(`subagent "${childId}" has no agent preset projection for restoration`, 'NOT_RESUMABLE');
|
|
1199
|
+
}
|
|
1189
1200
|
activation = await this.materialize({
|
|
1190
1201
|
kind: 'local',
|
|
1191
1202
|
childId,
|
|
@@ -1198,7 +1209,7 @@ export class SubagentManager {
|
|
|
1198
1209
|
? { reasoningEffort: ReasoningEffortId(descriptor.agentReasoningEffort) }
|
|
1199
1210
|
: {},
|
|
1200
1211
|
},
|
|
1201
|
-
composition: { persona: descriptor.persona, toolFilter: descriptor.toolFilter },
|
|
1212
|
+
composition: { agentPreset: agentPreset ?? undefined, persona: descriptor.persona, toolFilter: descriptor.toolFilter },
|
|
1202
1213
|
signal: options.signal,
|
|
1203
1214
|
});
|
|
1204
1215
|
}
|
|
@@ -1291,4 +1302,15 @@ export class SubagentManager {
|
|
|
1291
1302
|
}
|
|
1292
1303
|
}
|
|
1293
1304
|
export default SubagentManager;
|
|
1305
|
+
/** Creation-time selection precedes the own descriptor; historical forks can select after it. */
|
|
1306
|
+
function hasIndependentPresetSelection(events) {
|
|
1307
|
+
for (const event of events) {
|
|
1308
|
+
if (event.type === 'subagent/descriptor')
|
|
1309
|
+
return false;
|
|
1310
|
+
if (event.type === 'agent-preset/selected')
|
|
1311
|
+
return true;
|
|
1312
|
+
}
|
|
1313
|
+
/* v8 ignore next -- coldResume rejects logs without a supported own descriptor before this lookup. */
|
|
1314
|
+
return false;
|
|
1315
|
+
}
|
|
1294
1316
|
//# sourceMappingURL=manager.js.map
|
|
@@ -14,7 +14,7 @@ import type { SubagentCapabilities, SubagentResult, SubagentRun, SubagentStopRea
|
|
|
14
14
|
/**
|
|
15
15
|
* The capability advertisement of an out-of-process backend: NONE. A child in
|
|
16
16
|
* another process cannot honor parent-enforced start features
|
|
17
|
-
* (`agentOptions`/`outputSchema`/`maxDepth
|
|
17
|
+
* (`agentOptions`/`agentPreset`/`outputSchema`/`maxDepth`), so the service rejects a
|
|
18
18
|
* request needing any of them before `start` runs — never accepted-then-ignored.
|
|
19
19
|
*/
|
|
20
20
|
export declare const NO_START_CAPABILITIES: SubagentCapabilities;
|
|
@@ -42,15 +42,14 @@ function normalizeSubagentDiagnostic(result) {
|
|
|
42
42
|
/**
|
|
43
43
|
* The capability advertisement of an out-of-process backend: NONE. A child in
|
|
44
44
|
* another process cannot honor parent-enforced start features
|
|
45
|
-
* (`agentOptions`/`outputSchema`/`maxDepth
|
|
45
|
+
* (`agentOptions`/`agentPreset`/`outputSchema`/`maxDepth`), so the service rejects a
|
|
46
46
|
* request needing any of them before `start` runs — never accepted-then-ignored.
|
|
47
47
|
*/
|
|
48
48
|
export const NO_START_CAPABILITIES = Object.freeze({
|
|
49
49
|
agentOptions: false,
|
|
50
|
+
agentPreset: false,
|
|
50
51
|
outputSchema: false,
|
|
51
52
|
depthLimit: false,
|
|
52
|
-
toolFilter: false,
|
|
53
|
-
persona: false,
|
|
54
53
|
});
|
|
55
54
|
/**
|
|
56
55
|
* Assert a configured timing bound is a positive finite number (it bounds a
|
package/lib/types/types.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { Agent, AgentOptions } from '@qlzt/dsh-agent';
|
|
|
12
12
|
import type { Branded } from '@qlzt/dsh-brand';
|
|
13
13
|
import type { ContentBlock, MessageId } from '@qlzt/dsh-llm';
|
|
14
14
|
import type { SessionEvent, SessionId } from '@qlzt/dsh-session';
|
|
15
|
-
import type { ObjectJsonSchema
|
|
15
|
+
import type { ObjectJsonSchema } from '@qlzt/dsh-tools';
|
|
16
16
|
/** Identifies one accepted subagent run across its lifecycle event pair. */
|
|
17
17
|
export type SubagentRunId = Branded<'SubagentRunId'>;
|
|
18
18
|
/**
|
|
@@ -114,10 +114,10 @@ export interface SubagentRunEndInfo {
|
|
|
114
114
|
*/
|
|
115
115
|
export interface SubagentCapabilities {
|
|
116
116
|
readonly agentOptions: boolean;
|
|
117
|
+
/** Supports selecting a preset independently of the parent's composition. */
|
|
118
|
+
readonly agentPreset: boolean;
|
|
117
119
|
readonly outputSchema: boolean;
|
|
118
120
|
readonly depthLimit: boolean;
|
|
119
|
-
readonly toolFilter: boolean;
|
|
120
|
-
readonly persona: boolean;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* Task and optional capabilities supplied to a backend. startActivation carries
|
|
@@ -127,6 +127,12 @@ export interface SubagentCapabilities {
|
|
|
127
127
|
export interface SubagentStartRequest {
|
|
128
128
|
/** Initial child directory; relative paths resolve against the parent's current directory. Omitted inherits that directory at start. */
|
|
129
129
|
readonly cwd?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Independent preset id; omission joins the parent's current generation.
|
|
132
|
+
* Requires a provider with `capabilities.agentPreset` that does not inherit
|
|
133
|
+
* parent context.
|
|
134
|
+
*/
|
|
135
|
+
readonly agentPreset?: string;
|
|
130
136
|
/** Optional short display label persisted with a session-backed child. */
|
|
131
137
|
readonly label?: string;
|
|
132
138
|
/** Content delivered as the child's user message. */
|
|
@@ -165,22 +171,6 @@ export interface SubagentStartRequest {
|
|
|
165
171
|
* start otherwise.
|
|
166
172
|
*/
|
|
167
173
|
readonly maxDepth?: number;
|
|
168
|
-
/**
|
|
169
|
-
* Optional child tool scoping. Requires {@link SubagentCapabilities.toolFilter};
|
|
170
|
-
* rejected at start otherwise. In-process backends apply it as a scoped
|
|
171
|
-
* `tools.restrict()` in the child's creation window: the named tools vanish
|
|
172
|
-
* from the child's prompt AND refuse to execute (one visibility), with loud
|
|
173
|
-
* unknown-name validation.
|
|
174
|
-
*/
|
|
175
|
-
readonly toolFilter?: ToolRestriction;
|
|
176
|
-
/**
|
|
177
|
-
* Optional per-child persona. Requires {@link SubagentCapabilities.persona};
|
|
178
|
-
* rejected at start otherwise. In-process backends register it as a scoped
|
|
179
|
-
* `deployment:persona-prefix` section on the child, SHADOWING the deployment's
|
|
180
|
-
* persona for this child alone — same template semantics as the deployment
|
|
181
|
-
* persona (strict `{{…}}` interpolation against the registered variables).
|
|
182
|
-
*/
|
|
183
|
-
readonly persona?: string;
|
|
184
174
|
}
|
|
185
175
|
/** Provider-facing request with an absolute directory selected before startup. */
|
|
186
176
|
export interface ResolvedSubagentStartRequest extends SubagentStartRequest {
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qlzt/dsh-subagent",
|
|
3
3
|
"description": "Abstract subagent seam (ctx.subagents): named-provider registry for delegating to child agents",
|
|
4
|
-
"version": "0.2.1-
|
|
4
|
+
"version": "0.2.1-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -35,9 +35,11 @@
|
|
|
35
35
|
"default": "./lib/typert.remote-client.js"
|
|
36
36
|
},
|
|
37
37
|
"./src/*": "./src/*",
|
|
38
|
-
"./package.json": "./package.json"
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./locale/*.json": "./locale/*.json"
|
|
39
40
|
},
|
|
40
41
|
"files": [
|
|
42
|
+
"locale/*.json",
|
|
41
43
|
"lib/index.js",
|
|
42
44
|
"lib/types/**/*.js",
|
|
43
45
|
"lib/types/**/*.d.ts",
|
|
@@ -48,33 +50,33 @@
|
|
|
48
50
|
],
|
|
49
51
|
"license": "MIT",
|
|
50
52
|
"dependencies": {
|
|
51
|
-
"@qlzt/dsh-brand": "0.2.1-
|
|
52
|
-
"@qlzt/dsh-chunked-list": "0.2.1-
|
|
53
|
-
"@qlzt/dsh-util-values": "0.2.1-
|
|
54
|
-
"@deepseek-ai/schemastery": "~3.18.5
|
|
55
|
-
"zod": "
|
|
53
|
+
"@qlzt/dsh-brand": "0.2.1-rc.2",
|
|
54
|
+
"@qlzt/dsh-chunked-list": "0.2.1-rc.2",
|
|
55
|
+
"@qlzt/dsh-util-values": "0.2.1-rc.2",
|
|
56
|
+
"@deepseek-ai/schemastery": "~3.18.5",
|
|
57
|
+
"zod": "4.4.3"
|
|
56
58
|
},
|
|
57
59
|
"peerDependencies": {
|
|
58
|
-
"@deepseek-ai/cordis": "~4.0.5
|
|
59
|
-
"@qlzt/dsh-agent": "0.2.1-
|
|
60
|
-
"@qlzt/dsh-agent-preset-registry": "0.2.1-
|
|
61
|
-
"@qlzt/dsh-attachment": "0.2.1-
|
|
62
|
-
"@qlzt/dsh-llm": "0.2.1-
|
|
63
|
-
"@qlzt/dsh-sandbox": "0.2.1-
|
|
64
|
-
"@qlzt/dsh-sandbox-policy": "0.2.1-
|
|
65
|
-
"@qlzt/dsh-scope": "0.2.1-
|
|
66
|
-
"@qlzt/dsh-session": "0.2.1-
|
|
67
|
-
"@qlzt/dsh-session-persistence": "0.2.1-
|
|
68
|
-
"@qlzt/dsh-session-projection": "0.2.1-
|
|
69
|
-
"@qlzt/dsh-session-query": "0.2.1-
|
|
70
|
-
"@qlzt/dsh-system-prompt": "0.2.1-
|
|
71
|
-
"@qlzt/dsh-tools": "0.2.1-
|
|
72
|
-
"@qlzt/dsh-typert-protocol": "0.2.1-
|
|
73
|
-
"@qlzt/dsh-user-approval": "0.2.1-
|
|
74
|
-
"@qlzt/dsh-util-time": "0.2.1-
|
|
75
|
-
"@qlzt/dsh-permission-presets": "0.2.1-
|
|
76
|
-
"@qlzt/dsh-workspace": "0.2.1-
|
|
77
|
-
"@qlzt/dsh-working-directory": "0.2.1-
|
|
60
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
61
|
+
"@qlzt/dsh-agent": "0.2.1-rc.2",
|
|
62
|
+
"@qlzt/dsh-agent-preset-registry": "0.2.1-rc.2",
|
|
63
|
+
"@qlzt/dsh-attachment": "0.2.1-rc.2",
|
|
64
|
+
"@qlzt/dsh-llm": "0.2.1-rc.2",
|
|
65
|
+
"@qlzt/dsh-sandbox": "0.2.1-rc.2",
|
|
66
|
+
"@qlzt/dsh-sandbox-policy": "0.2.1-rc.2",
|
|
67
|
+
"@qlzt/dsh-scope": "0.2.1-rc.2",
|
|
68
|
+
"@qlzt/dsh-session": "0.2.1-rc.2",
|
|
69
|
+
"@qlzt/dsh-session-persistence": "0.2.1-rc.2",
|
|
70
|
+
"@qlzt/dsh-session-projection": "0.2.1-rc.2",
|
|
71
|
+
"@qlzt/dsh-session-query": "0.2.1-rc.2",
|
|
72
|
+
"@qlzt/dsh-system-prompt": "0.2.1-rc.2",
|
|
73
|
+
"@qlzt/dsh-tools": "0.2.1-rc.2",
|
|
74
|
+
"@qlzt/dsh-typert-protocol": "0.2.1-rc.2",
|
|
75
|
+
"@qlzt/dsh-user-approval": "0.2.1-rc.2",
|
|
76
|
+
"@qlzt/dsh-util-time": "0.2.1-rc.2",
|
|
77
|
+
"@qlzt/dsh-permission-presets": "0.2.1-rc.2",
|
|
78
|
+
"@qlzt/dsh-workspace": "0.2.1-rc.2",
|
|
79
|
+
"@qlzt/dsh-working-directory": "0.2.1-rc.2"
|
|
78
80
|
},
|
|
79
81
|
"peerDependenciesMeta": {
|
|
80
82
|
"@deepseek-ai/dsh-agent-preset-registry": {
|
|
@@ -106,33 +108,33 @@
|
|
|
106
108
|
}
|
|
107
109
|
},
|
|
108
110
|
"devDependencies": {
|
|
109
|
-
"@deepseek-ai/cordis": "~4.0.5
|
|
110
|
-
"@deepseek-ai/dsh-agent": "0.2.1-
|
|
111
|
-
"@deepseek-ai/dsh-agent-preset-registry": "0.2.1-
|
|
112
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-
|
|
113
|
-
"@deepseek-ai/dsh-llm": "0.2.1-
|
|
114
|
-
"@deepseek-ai/dsh-sandbox": "0.2.1-
|
|
115
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-
|
|
116
|
-
"@deepseek-ai/dsh-scope": "0.2.1-
|
|
117
|
-
"@deepseek-ai/dsh-session": "0.2.1-
|
|
118
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.1-
|
|
119
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-
|
|
120
|
-
"@deepseek-ai/dsh-session-query": "0.2.1-
|
|
121
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.1-
|
|
122
|
-
"@deepseek-ai/dsh-tools": "0.2.1-
|
|
123
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.1-
|
|
124
|
-
"@deepseek-ai/dsh-user-approval": "0.2.1-
|
|
125
|
-
"@deepseek-ai/dsh-util-time": "0.2.1-
|
|
126
|
-
"@deepseek-ai/dsh-permission-presets": "0.2.1-
|
|
127
|
-
"@deepseek-ai/dsh-workspace": "0.2.1-
|
|
128
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.10
|
|
129
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.6
|
|
130
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.1-
|
|
131
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-
|
|
132
|
-
"@deepseek-ai/dsh-fs-sandbox": "0.2.1-
|
|
133
|
-
"@deepseek-ai/dsh-tool-fs": "0.2.1-
|
|
134
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-
|
|
135
|
-
"@deepseek-ai/dsh-working-directory": "0.2.1-
|
|
111
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
112
|
+
"@deepseek-ai/dsh-agent": "0.2.1-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.1-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-scope": "0.2.1-rc.2",
|
|
119
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.1-rc.2",
|
|
121
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
|
|
122
|
+
"@deepseek-ai/dsh-session-query": "0.2.1-rc.2",
|
|
123
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
|
|
124
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.2",
|
|
125
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
|
|
126
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-rc.2",
|
|
127
|
+
"@deepseek-ai/dsh-util-time": "0.2.1-rc.2",
|
|
128
|
+
"@deepseek-ai/dsh-permission-presets": "0.2.1-rc.2",
|
|
129
|
+
"@deepseek-ai/dsh-workspace": "0.2.1-rc.2",
|
|
130
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.10",
|
|
131
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6",
|
|
132
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-rc.2",
|
|
133
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-rc.2",
|
|
134
|
+
"@deepseek-ai/dsh-fs-sandbox": "0.2.1-rc.2",
|
|
135
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.1-rc.2",
|
|
136
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-rc.2",
|
|
137
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-rc.2"
|
|
136
138
|
},
|
|
137
139
|
"dsh": {}
|
|
138
140
|
}
|