@fishwithcat/dsh-subagent 0.0.0-stage → 0.2.2-alpha.3
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 +121 -0
- package/README.md +258 -2
- package/README.zh.md +259 -0
- package/lib/index.js +3065 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +1086 -0
- package/lib/typert.remote-client.d.ts +29 -0
- package/lib/typert.remote-client.js +122 -0
- package/lib/types/activation.d.ts +110 -0
- package/lib/types/activation.js +112 -0
- package/lib/types/archive-admission.d.ts +23 -0
- package/lib/types/archive-admission.js +75 -0
- package/lib/types/assistant-output.d.ts +48 -0
- package/lib/types/assistant-output.js +73 -0
- package/lib/types/catalog.d.ts +87 -0
- package/lib/types/catalog.js +113 -0
- package/lib/types/child-agent.d.ts +145 -0
- package/lib/types/child-agent.js +229 -0
- package/lib/types/client.d.ts +8 -0
- package/lib/types/client.js +7 -0
- package/lib/types/continuation-messages.d.ts +66 -0
- package/lib/types/continuation-messages.js +116 -0
- package/lib/types/control-types.d.ts +121 -0
- package/lib/types/control-types.js +8 -0
- package/lib/types/control.d.ts +41 -0
- package/lib/types/control.js +75 -0
- package/lib/types/depth.d.ts +31 -0
- package/lib/types/depth.js +39 -0
- package/lib/types/descriptor.d.ts +105 -0
- package/lib/types/descriptor.js +192 -0
- package/lib/types/error.d.ts +11 -0
- package/lib/types/error.js +14 -0
- package/lib/types/index.d.ts +282 -0
- package/lib/types/index.js +398 -0
- package/lib/types/lifecycle.d.ts +54 -0
- package/lib/types/lifecycle.js +89 -0
- package/lib/types/list-children.d.ts +36 -0
- package/lib/types/list-children.js +166 -0
- package/lib/types/manager.d.ts +215 -0
- package/lib/types/manager.js +1171 -0
- package/lib/types/out-of-process.d.ts +92 -0
- package/lib/types/out-of-process.js +177 -0
- package/lib/types/projection-types.d.ts +93 -0
- package/lib/types/projection-types.js +7 -0
- package/lib/types/projection.d.ts +94 -0
- package/lib/types/projection.js +157 -0
- package/lib/types/structured.d.ts +49 -0
- package/lib/types/structured.js +130 -0
- package/lib/types/types.d.ts +331 -0
- package/lib/types/types.js +17 -0
- package/locale/de.json +6 -0
- package/locale/en.json +5 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +131 -4
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Direct-child and recursive descendant discovery from parent-owned catalogs.
|
|
3
|
+
* Each catalog read releases its Session observation before the next branch.
|
|
4
|
+
* @module @deepseek-ai/dsh-subagent
|
|
5
|
+
*/
|
|
6
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
7
|
+
if (value !== null && value !== void 0) {
|
|
8
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
9
|
+
var dispose, inner;
|
|
10
|
+
if (async) {
|
|
11
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
12
|
+
dispose = value[Symbol.asyncDispose];
|
|
13
|
+
}
|
|
14
|
+
if (dispose === void 0) {
|
|
15
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
16
|
+
dispose = value[Symbol.dispose];
|
|
17
|
+
if (async) inner = dispose;
|
|
18
|
+
}
|
|
19
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
20
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
21
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
22
|
+
}
|
|
23
|
+
else if (async) {
|
|
24
|
+
env.stack.push({ async: true });
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
29
|
+
return function (env) {
|
|
30
|
+
function fail(e) {
|
|
31
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
32
|
+
env.hasError = true;
|
|
33
|
+
}
|
|
34
|
+
var r, s = 0;
|
|
35
|
+
function next() {
|
|
36
|
+
while (r = env.stack.pop()) {
|
|
37
|
+
try {
|
|
38
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
39
|
+
if (r.dispose) {
|
|
40
|
+
var result = r.dispose.call(r.value);
|
|
41
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
42
|
+
}
|
|
43
|
+
else s |= 1;
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
fail(e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
50
|
+
if (env.hasError) throw env.error;
|
|
51
|
+
}
|
|
52
|
+
return next();
|
|
53
|
+
};
|
|
54
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
55
|
+
var e = new Error(message);
|
|
56
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
57
|
+
});
|
|
58
|
+
import { SubagentError } from "./error.js";
|
|
59
|
+
/**
|
|
60
|
+
* Read one parent's durable catalog through a live-preferred Session observation.
|
|
61
|
+
* @param ctx - context carrying the Session query service.
|
|
62
|
+
* @param parentSessionId - parent whose direct children are requested.
|
|
63
|
+
* @param signal - cancellation forwarded to the Session observation.
|
|
64
|
+
* @returns direct-child rows in parent catalog event order.
|
|
65
|
+
* @throws {@link SubagentError} when query or catalog projection is unavailable.
|
|
66
|
+
*/
|
|
67
|
+
export async function listChildren(ctx, parentSessionId, signal) {
|
|
68
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
69
|
+
try {
|
|
70
|
+
const query = ctx.get('sessionQuery');
|
|
71
|
+
if (query === undefined) {
|
|
72
|
+
throw new SubagentError('listing subagents requires the sessionQuery service (load @deepseek-ai/dsh-session-query)', 'SUBAGENT_CONTROL_QUERY_UNAVAILABLE');
|
|
73
|
+
}
|
|
74
|
+
const parent = __addDisposableResource(env_1, await query.observeSession(parentSessionId, {
|
|
75
|
+
...signal === undefined ? {} : { signal },
|
|
76
|
+
}), false);
|
|
77
|
+
const entries = parent.projections?.values.subagentCatalog;
|
|
78
|
+
if (entries === undefined) {
|
|
79
|
+
throw new SubagentError('listing subagents requires the registered subagentCatalog projection', 'SUBAGENT_CONTROL_PROJECTIONS_UNAVAILABLE');
|
|
80
|
+
}
|
|
81
|
+
return entries;
|
|
82
|
+
}
|
|
83
|
+
catch (e_1) {
|
|
84
|
+
env_1.error = e_1;
|
|
85
|
+
env_1.hasError = true;
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
__disposeResources(env_1);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Walk reachable parent catalogs in stable pre-order without loading Agents.
|
|
93
|
+
* @see SubagentRuntime.listDescendants for failure and cancellation semantics.
|
|
94
|
+
* @param ctx - context carrying the Session store and query service.
|
|
95
|
+
* @param rootSessionId - parent whose catalog starts the traversal.
|
|
96
|
+
* @param signal - cancellation checked around each catalog read.
|
|
97
|
+
* @returns children and branch diagnostics with catalog parent and depth.
|
|
98
|
+
*/
|
|
99
|
+
export async function listDescendants(ctx, rootSessionId, signal) {
|
|
100
|
+
const sessions = ctx.get('sessions');
|
|
101
|
+
if (sessions === undefined) {
|
|
102
|
+
throw new SubagentError('listing subagents requires the session store (load @deepseek-ai/dsh-session)', 'SUBAGENT_CONTROL_SESSION_STORE_UNAVAILABLE');
|
|
103
|
+
}
|
|
104
|
+
const readChildren = async (id) => {
|
|
105
|
+
assertListingNotCancelled(signal);
|
|
106
|
+
let children;
|
|
107
|
+
try {
|
|
108
|
+
children = await listChildren(ctx, id, signal);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
assertListingNotCancelled(signal);
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
assertListingNotCancelled(signal);
|
|
115
|
+
return children;
|
|
116
|
+
};
|
|
117
|
+
const stack = (await readChildren(rootSessionId))
|
|
118
|
+
.map(entry => ({ entry, parentId: rootSessionId, depth: 1 }))
|
|
119
|
+
.reverse();
|
|
120
|
+
const visited = new Set([rootSessionId]);
|
|
121
|
+
const result = [];
|
|
122
|
+
for (let position = stack.pop(); position !== undefined; position = stack.pop()) {
|
|
123
|
+
const { entry, parentId, depth } = position;
|
|
124
|
+
if (visited.has(entry.id))
|
|
125
|
+
continue;
|
|
126
|
+
visited.add(entry.id);
|
|
127
|
+
let children;
|
|
128
|
+
try {
|
|
129
|
+
children = entry.mode === 'external' ? [] : await readChildren(entry.id);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error instanceof SubagentError)
|
|
133
|
+
throw error;
|
|
134
|
+
const code = error instanceof Error && 'code' in error ? error.code : undefined;
|
|
135
|
+
result.push({
|
|
136
|
+
kind: 'diagnostic', id: entry.id, parentId, depth,
|
|
137
|
+
reason: code === 'SESSION_QUERY_CORRUPT_SESSION' || code === 'SESSION_QUERY_SOURCE_CONFLICT'
|
|
138
|
+
? 'corrupt' : 'unavailable',
|
|
139
|
+
});
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (entry.mode === 'unknown') {
|
|
143
|
+
result.push({ kind: 'diagnostic', id: entry.id, parentId, depth, reason: 'unsupported' });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
const { createdAt: _createdAt, ...identity } = entry;
|
|
147
|
+
result.push({
|
|
148
|
+
...identity, kind: 'child', parentId, depth,
|
|
149
|
+
activity: sessions.get(entry.id) === undefined ? 'inactive' : 'running',
|
|
150
|
+
hasChildren: children.length > 0,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
// Catalog event order defines siblings; the stack visits the first one next.
|
|
154
|
+
for (const child of [...children].reverse()) {
|
|
155
|
+
stack.push({ entry: child, parentId: entry.id, depth: depth + 1 });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
/** Stop the complete traversal when its caller cancels. */
|
|
161
|
+
function assertListingNotCancelled(signal) {
|
|
162
|
+
if (signal?.aborted) {
|
|
163
|
+
throw new SubagentError('subagent listing was cancelled', 'CANCELLED');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=list-children.js.map
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owns subagent startup, message admission, cold resume, and execution lifetimes.
|
|
3
|
+
* One child lock orders input acceptance and closure; one activation map owns
|
|
4
|
+
* capacity, runtime ownership, and resource release across all providers.
|
|
5
|
+
*
|
|
6
|
+
* @module @deepseek-ai/dsh-subagent/manager
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
10
|
+
import type { ContentBlock, MessageId, MessageSource } from '@deepseek-ai/dsh-llm';
|
|
11
|
+
import type { Session, SessionId } from '@deepseek-ai/dsh-session';
|
|
12
|
+
import type { DelegatedApprovalPolicy } from './child-agent.ts';
|
|
13
|
+
import type { LifecycleEmitter } from './lifecycle.ts';
|
|
14
|
+
import type { SubagentIdentityProjection } from './projection-types.ts';
|
|
15
|
+
import type { ContinuableCreateRequest, ContinuableCreateSpec, SubagentInterruptAuthority, SubagentActivationSpec, SubagentActivation, SubagentRun, SubagentSendMessageOptions, ResolvedSubagentStartRequest } from './types.ts';
|
|
16
|
+
import type { SubagentDelivery } from './control-types.ts';
|
|
17
|
+
/** Inputs shared by model steering and human prompt delivery. */
|
|
18
|
+
type ChildDeliveryOptions = {
|
|
19
|
+
readonly delivery: SubagentDelivery;
|
|
20
|
+
readonly source: MessageSource;
|
|
21
|
+
readonly signal: AbortSignal;
|
|
22
|
+
/** Recheck the original model caller at final inbox admission. */
|
|
23
|
+
readonly authorize?: () => void;
|
|
24
|
+
/** Record successful inbox admission before another asynchronous operation can intervene. */
|
|
25
|
+
readonly onAccepted?: () => void;
|
|
26
|
+
};
|
|
27
|
+
/** Package-private hooks supplied by the owning service. */
|
|
28
|
+
interface SubagentHost {
|
|
29
|
+
/** Read the current descriptor identity through the service-owned projection. */
|
|
30
|
+
identityOf(session: Session): SubagentIdentityProjection | undefined;
|
|
31
|
+
/** Publish lifecycle events through the owning service's scoped dispatcher. */
|
|
32
|
+
readonly emitLifecycle: LifecycleEmitter;
|
|
33
|
+
}
|
|
34
|
+
/** Own subagent requests and the resources of every live activation. */
|
|
35
|
+
export declare class SubagentManager {
|
|
36
|
+
private readonly ctx;
|
|
37
|
+
private readonly host;
|
|
38
|
+
private readonly maxActiveSubagents;
|
|
39
|
+
private readonly delegatedApproval;
|
|
40
|
+
/** Child session id → its live Activation. Process-local, never durable. */
|
|
41
|
+
private readonly resident;
|
|
42
|
+
/** Root identities retain their pool across child settlement without retaining dead roots. */
|
|
43
|
+
private readonly rootPools;
|
|
44
|
+
/** Materializations admitted before drain, tracked through publication or rollback. */
|
|
45
|
+
private readonly materializations;
|
|
46
|
+
/** Per-child serializer shared by delivery, release, and disposal. */
|
|
47
|
+
private readonly locks;
|
|
48
|
+
/** Structural Cordis owner of every Activation handle. */
|
|
49
|
+
private readonly ownerCtx;
|
|
50
|
+
/** Exact subagent tree roots whose host teardown has closed admission. */
|
|
51
|
+
private readonly closingRoots;
|
|
52
|
+
private draining;
|
|
53
|
+
/**
|
|
54
|
+
* Build one manager inside the service's Agent-injected context.
|
|
55
|
+
* @param ctx - context providing Agents, Sessions, and teardown ownership.
|
|
56
|
+
* @param host - descriptor reads and lifecycle publication owned by the service.
|
|
57
|
+
* @param maxActiveSubagents - the current configured child capacity.
|
|
58
|
+
* @param delegatedApproval - the configured approval policy seed for each local child.
|
|
59
|
+
*/
|
|
60
|
+
constructor(ctx: Context, host: SubagentHost, maxActiveSubagents: () => number, delegatedApproval: () => DelegatedApprovalPolicy);
|
|
61
|
+
/**
|
|
62
|
+
* Interrupt one live continuable child's current turn under the supplied authority.
|
|
63
|
+
* @param targetSessionId - the durable child session id to interrupt.
|
|
64
|
+
* @param authority - a trusted user operation or exact live ancestor Agent.
|
|
65
|
+
*/
|
|
66
|
+
interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void;
|
|
67
|
+
/**
|
|
68
|
+
* Close admission, await every already-admitted materialization through
|
|
69
|
+
* publication or rollback, then dispose every agent in the subagent tree.
|
|
70
|
+
*/
|
|
71
|
+
drain(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Join progressing subagent tree work for its root, leaving idle parked inboxes resident.
|
|
74
|
+
* @param root - exact live subagent tree root; ordinary members return false.
|
|
75
|
+
* @returns whether work was joined and the host must recheck root completion.
|
|
76
|
+
*/
|
|
77
|
+
waitForTreeWork(root: Agent): Promise<boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Stop every member of the selected subagent trees; ordinary members do not close a subagent tree.
|
|
80
|
+
* @param parents - exact live subagent tree roots whose instances must stop.
|
|
81
|
+
*/
|
|
82
|
+
drainDescendants(parents: readonly Agent[]): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Start one continuable background child and resolve at initial inbox acceptance.
|
|
85
|
+
* Every earlier failure disposes any created handle and rolls back Activation
|
|
86
|
+
* and its capacity slot without returning either id.
|
|
87
|
+
* @param spec - provider, delegation request, and caller cancellation.
|
|
88
|
+
* @param prepare - creation contribution bound to the checked provider.
|
|
89
|
+
* @returns the durable child id and accepted initial prompt message id.
|
|
90
|
+
*/
|
|
91
|
+
startLocal(spec: SubagentActivationSpec, prepare: (request: ContinuableCreateRequest) => Promise<ContinuableCreateSpec>): Promise<SubagentActivation & {
|
|
92
|
+
messageId: MessageId;
|
|
93
|
+
}>;
|
|
94
|
+
/**
|
|
95
|
+
* Start an external backend under activation ownership.
|
|
96
|
+
* @param spec - task, provider, cancellation, and delivery policy.
|
|
97
|
+
* @param start - execution bound to the checked provider.
|
|
98
|
+
* @returns the accepted activation and its result/disposal capabilities.
|
|
99
|
+
*/
|
|
100
|
+
startExternal(spec: SubagentActivationSpec, start: (request: ResolvedSubagentStartRequest) => Promise<SubagentRun>): Promise<SubagentActivation>;
|
|
101
|
+
/** Capture the explicit or inherited directory while the parent still owns startup. */
|
|
102
|
+
private resolveDirectory;
|
|
103
|
+
/**
|
|
104
|
+
* Resolve the live subagent tree root from runtime ownership, independent of creator residency.
|
|
105
|
+
* @param caller - exact live Agent selecting the subagent tree.
|
|
106
|
+
* @returns the live subagent tree root.
|
|
107
|
+
* @throws when the caller has no active runtime owner.
|
|
108
|
+
*/
|
|
109
|
+
rootOf(caller: Agent): Agent;
|
|
110
|
+
/** Capture creation ancestry separately from the root that owns the new instance. */
|
|
111
|
+
private ancestryForChild;
|
|
112
|
+
/**
|
|
113
|
+
* Deliver to another agent in the subagent tree, restoring only the target when absent.
|
|
114
|
+
* @param sender - exact live root or resident continuable Agent.
|
|
115
|
+
* @param targetId - another member's durable Session id.
|
|
116
|
+
* @param content - model-authored message blocks.
|
|
117
|
+
* @param options - cancellation before inbox acceptance.
|
|
118
|
+
* @returns the accepted inbox message id.
|
|
119
|
+
*/
|
|
120
|
+
sendMessage(sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions): Promise<MessageId>;
|
|
121
|
+
/** Resolve the live owner through verified creation edges without activating ancestors. */
|
|
122
|
+
private resolveCreationAncestry;
|
|
123
|
+
/**
|
|
124
|
+
* Deliver one host-authored prompt through the target's live subagent tree root.
|
|
125
|
+
* Remote callers must be authorized for the target Session before invoking this operation.
|
|
126
|
+
* @param childId - durable continuable subagent session id.
|
|
127
|
+
* @param content - model-visible prompt blocks.
|
|
128
|
+
* @param options - inbox destination, durable attribution, and cancellation before acceptance.
|
|
129
|
+
* @returns the accepted durable message id.
|
|
130
|
+
*/
|
|
131
|
+
deliverPrompt(childId: SessionId, content: ContentBlock[], options: Pick<ChildDeliveryOptions, 'delivery' | 'source' | 'signal'>): Promise<MessageId>;
|
|
132
|
+
/** Admit local input synchronously before any teardown can begin. */
|
|
133
|
+
private deliver;
|
|
134
|
+
/**
|
|
135
|
+
* Reject one child identity already owned by a live Agent or Session.
|
|
136
|
+
* @param childId - proposed durable child session id.
|
|
137
|
+
*/
|
|
138
|
+
private assertChildIdAvailable;
|
|
139
|
+
/**
|
|
140
|
+
* Apply activation admission to a resident parent before delivering input.
|
|
141
|
+
* @param parent - exact live Agent receiving the message.
|
|
142
|
+
* @param message - durable user message to deliver.
|
|
143
|
+
* @param delivery - receiving inbox destination.
|
|
144
|
+
*/
|
|
145
|
+
private sendWaking;
|
|
146
|
+
/**
|
|
147
|
+
* Reject new work from closing members or subagent trees.
|
|
148
|
+
* @param agent - exact live caller whose instance and subagent tree must admit work.
|
|
149
|
+
*/
|
|
150
|
+
private assertAdmitting;
|
|
151
|
+
/**
|
|
152
|
+
* Create or resume one child Agent and publish its Activation.
|
|
153
|
+
* @param inputs - reconstruction and admission inputs for the residency epoch.
|
|
154
|
+
* @returns the published process-local Activation.
|
|
155
|
+
*/
|
|
156
|
+
private materialize;
|
|
157
|
+
/** Keep subagent tree shutdown and host waits joined to preparation, publication, and rollback. */
|
|
158
|
+
private trackStartup;
|
|
159
|
+
/**
|
|
160
|
+
* Stop and release one Activation through its memoized close transaction.
|
|
161
|
+
* @param activation - exact residency epoch to close.
|
|
162
|
+
* @returns the shared close transaction.
|
|
163
|
+
*/
|
|
164
|
+
private dispose;
|
|
165
|
+
/** Close admission synchronously and share one release, including startup rollback. */
|
|
166
|
+
private close;
|
|
167
|
+
/** Dispose independent roots and report every branch failure after all settle. */
|
|
168
|
+
private disposeRoots;
|
|
169
|
+
/** Return the subagent tree teardown that closed admission for this exact Agent. */
|
|
170
|
+
private closingTeardownFor;
|
|
171
|
+
/** Share one capacity pool across every instance in a subagent tree. */
|
|
172
|
+
private rootPool;
|
|
173
|
+
/** Perform one tracked materialization through publication or rollback. */
|
|
174
|
+
private materializeTracked;
|
|
175
|
+
/** Identity shared by one residency epoch's start/end pair, including cold resumes. */
|
|
176
|
+
private runInfo;
|
|
177
|
+
/** Record acceptance and begin settlement observation before returning the receipt. */
|
|
178
|
+
private accept;
|
|
179
|
+
/** Release an Activation whose start edge was not published. */
|
|
180
|
+
private rollbackUnpublished;
|
|
181
|
+
/** Let a settlement watcher re-check residency after relevant state changes. */
|
|
182
|
+
private wake;
|
|
183
|
+
/** Follow one Activation to natural settlement. */
|
|
184
|
+
private watchLocalSettlement;
|
|
185
|
+
/** Report disposal failure once after the natural settlement observer finishes. */
|
|
186
|
+
private reportTeardownFailure;
|
|
187
|
+
/** Check pending input before closing admission. */
|
|
188
|
+
private settlementState;
|
|
189
|
+
/** Stop and release one instance without affecting its creation descendants. */
|
|
190
|
+
private finishDisposal;
|
|
191
|
+
/** Deliver the captured execution result to the durable direct parent after cleanup. */
|
|
192
|
+
private notifySettlement;
|
|
193
|
+
/** Request a best-effort final session flush before closing natural-settlement admission. */
|
|
194
|
+
private flushFinalState;
|
|
195
|
+
/** Return capabilities bound to an exact activation instead of a future same-id instance. */
|
|
196
|
+
private receipt;
|
|
197
|
+
/** Serialize target restoration and inbox admission; closure is awaited outside the lock. */
|
|
198
|
+
private deliverToMember;
|
|
199
|
+
/** Read continuation history, preserving cancellation and reporting unavailable storage. */
|
|
200
|
+
private observeContinuation;
|
|
201
|
+
/** Reconstruct only the target under its subagent tree root; the caller owns acceptance or rollback. */
|
|
202
|
+
private restoreTarget;
|
|
203
|
+
/** Admit a materialized child, commit its creation fact, and release it on failure. */
|
|
204
|
+
private submitMaterialized;
|
|
205
|
+
/** Build and submit one message across the final synchronous admission cutoff. */
|
|
206
|
+
private submitAdmitted;
|
|
207
|
+
/** Refuse image content for a child whose fixed model accepts text only. */
|
|
208
|
+
private assertImageCapable;
|
|
209
|
+
/** Resolve the persistence service continuable children require, or fail loud. */
|
|
210
|
+
private requirePersistence;
|
|
211
|
+
/** Resolve the Session query service used for cold child observations. */
|
|
212
|
+
private requireSessionQuery;
|
|
213
|
+
}
|
|
214
|
+
export default SubagentManager;
|
|
215
|
+
//# sourceMappingURL=manager.d.ts.map
|