@xneog/dsh-subagent 0.1.0 → 0.1.3-alpha.1

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.
Files changed (41) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +108 -76
  3. package/README.zh.md +112 -80
  4. package/lib/index.js +1258 -718
  5. package/lib/typert.host.d.ts +3 -0
  6. package/lib/typert.host.js +923 -0
  7. package/lib/typert.remote-client.d.ts +27 -0
  8. package/lib/typert.remote-client.js +159 -0
  9. package/lib/types/assistant-output.d.ts +3 -3
  10. package/lib/types/assistant-output.js +8 -4
  11. package/lib/types/child-agent.d.ts +16 -5
  12. package/lib/types/child-agent.js +51 -13
  13. package/lib/types/client.d.ts +2 -1
  14. package/lib/types/client.js +1 -1
  15. package/lib/types/continuation.d.ts +100 -72
  16. package/lib/types/continuation.js +439 -169
  17. package/lib/types/control-types.d.ts +144 -0
  18. package/lib/types/control-types.js +9 -0
  19. package/lib/types/control.d.ts +67 -0
  20. package/lib/types/control.js +115 -0
  21. package/lib/types/descriptor-seed.d.ts +1 -1
  22. package/lib/types/descriptor-seed.js +1 -1
  23. package/lib/types/descriptor.d.ts +6 -1
  24. package/lib/types/descriptor.js +6 -2
  25. package/lib/types/index.d.ts +103 -69
  26. package/lib/types/index.js +436 -287
  27. package/lib/types/internal.d.ts +59 -0
  28. package/lib/types/internal.js +58 -0
  29. package/lib/types/lifecycle.js +4 -3
  30. package/lib/types/list-children.d.ts +12 -59
  31. package/lib/types/list-children.js +166 -101
  32. package/lib/types/out-of-process.d.ts +5 -2
  33. package/lib/types/out-of-process.js +42 -4
  34. package/lib/types/projection-types.d.ts +4 -3
  35. package/lib/types/projection.d.ts +55 -8
  36. package/lib/types/projection.js +33 -17
  37. package/lib/types/run-settlement.js +17 -6
  38. package/lib/types/types.d.ts +25 -0
  39. package/package.json +67 -37
  40. package/lib/types/activation-setup-registry.d.ts +0 -57
  41. package/lib/types/activation-setup-registry.js +0 -148
@@ -12,13 +12,42 @@
12
12
  */
13
13
  import { accessSync, constants, statSync } from 'node:fs';
14
14
  import { isAbsolute, resolve } from 'node:path';
15
+ /** Maximum UTF-8 size of {@link SubagentResult.diagnostic}. */
16
+ const MAX_SUBAGENT_DIAGNOSTIC_BYTES = 4_096;
17
+ const DIAGNOSTIC_TRUNCATION_SUFFIX = '\n[diagnostic truncated]';
18
+ const utf8Encoder = new TextEncoder();
19
+ const utf8Decoder = new TextDecoder();
20
+ /**
21
+ * Limit provider-authored failure detail without splitting a UTF-8 sequence.
22
+ * @param diagnostic - safe diagnostic text produced by the provider.
23
+ * @returns the original text, or a visibly truncated value within the limit.
24
+ */
25
+ function limitSubagentDiagnostic(diagnostic) {
26
+ const bytes = utf8Encoder.encode(diagnostic);
27
+ if (bytes.byteLength <= MAX_SUBAGENT_DIAGNOSTIC_BYTES)
28
+ return diagnostic;
29
+ const suffixBytes = utf8Encoder.encode(DIAGNOSTIC_TRUNCATION_SUFFIX).byteLength;
30
+ let prefixBytes = MAX_SUBAGENT_DIAGNOSTIC_BYTES - suffixBytes;
31
+ while ((bytes[prefixBytes] & 0b1100_0000) === 0b1000_0000) {
32
+ prefixBytes -= 1;
33
+ }
34
+ return utf8Decoder.decode(bytes.subarray(0, prefixBytes))
35
+ + DIAGNOSTIC_TRUNCATION_SUFFIX;
36
+ }
37
+ /** Enforce the byte limit on a provider-returned diagnostic. */
38
+ function normalizeSubagentDiagnostic(result) {
39
+ return result.diagnostic === undefined
40
+ ? result
41
+ : { ...result, diagnostic: limitSubagentDiagnostic(result.diagnostic) };
42
+ }
15
43
  /**
16
44
  * The capability advertisement of an out-of-process backend: NONE. A child in
17
45
  * another process cannot honor parent-enforced start features
18
- * (`outputSchema`/`maxDepth`/`toolFilter`/`persona`), so the service rejects a
46
+ * (`agentOptions`/`outputSchema`/`maxDepth`/`toolFilter`/`persona`), so the service rejects a
19
47
  * request needing any of them before `start` runs — never accepted-then-ignored.
20
48
  */
21
49
  export const NO_START_CAPABILITIES = Object.freeze({
50
+ agentOptions: false,
22
51
  outputSchema: false,
23
52
  depthLimit: false,
24
53
  toolFilter: false,
@@ -126,7 +155,8 @@ function toError(value) {
126
155
  * rejects after publication. A normally completed or rejected attempt resolves
127
156
  * as `aborted` when cancellation already settled locally; another rejection is
128
157
  * flattened to `stopReason: 'error'` through the contained diagnostic sink.
129
- * The abort listener is removed on every path.
158
+ * Provider-returned diagnostics use the same byte limit. The abort listener is
159
+ * removed on every path.
130
160
  * @param parts - the attempt, output snapshot, cancellation state, sink, and signal wiring.
131
161
  * @returns the terminal result (never a rejection).
132
162
  */
@@ -135,7 +165,7 @@ export async function settleRunResult(parts) {
135
165
  const result = await parts.attempt();
136
166
  return parts.cancelled()
137
167
  ? { output: parts.collectOutput(), stopReason: 'aborted' }
138
- : result;
168
+ : normalizeSubagentDiagnostic(result);
139
169
  }
140
170
  catch (error) {
141
171
  // Cover a rejection already queued when cancellation arrives.
@@ -148,7 +178,15 @@ export async function settleRunResult(parts) {
148
178
  catch {
149
179
  // The diagnostic sink cannot reject the run result.
150
180
  }
151
- return { output: parts.collectOutput(), stopReason: 'error' };
181
+ const collected = parts.collectDiagnostic?.();
182
+ const diagnostic = collected === undefined
183
+ ? undefined
184
+ : limitSubagentDiagnostic(collected);
185
+ return {
186
+ output: parts.collectOutput(),
187
+ ...diagnostic === undefined ? {} : { diagnostic },
188
+ stopReason: 'error',
189
+ };
152
190
  }
153
191
  finally {
154
192
  parts.signal.removeEventListener('abort', parts.onAbort);
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @module @xneog/dsh-subagent/projection-types
5
5
  */
6
+ import type { SessionSeq } from '@xneog/dsh-session/types';
6
7
  /** Durable active-turn timing for one descriptor-backed child session. */
7
8
  export interface SubagentTimingProjection {
8
9
  /** Milliseconds accumulated across completed turns after the child's own descriptor. */
@@ -28,18 +29,18 @@ export type SubagentIdentityProjection = {
28
29
  label?: string;
29
30
  /**
30
31
  * Seq of the `subagent/descriptor` event this identity was folded from.
31
- * `seq >= header.seedLength` proves the identity comes from the child's
32
+ * `session.isOwnSeq(seq)` proves the identity comes from the child's
32
33
  * OWN log suffix — where a descriptor is immutable once appended — and
33
34
  * not from a fork seed's replayed ancestor descriptor.
34
35
  */
35
- seq: number;
36
+ seq: SessionSeq;
36
37
  } | {
37
38
  /** A resumable conversation. */
38
39
  mode: 'continuable';
39
40
  /** Durable creation label from the child's descriptor. */
40
41
  label: string;
41
42
  /** Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof. */
42
- seq: number;
43
+ seq: SessionSeq;
43
44
  };
44
45
  declare module '@xneog/dsh-session-projection/types' {
45
46
  interface SessionProjectionMap {
@@ -4,21 +4,29 @@
4
4
  *
5
5
  * @module @xneog/dsh-subagent/projection
6
6
  */
7
- import type { ProjectionDefinition } from '@xneog/dsh-session-projection';
8
- import type { SubagentIdentityProjection } from './projection-types.ts';
9
- interface TimingState {
7
+ import { z } from 'zod';
8
+ import type { SessionEvent } from '@xneog/dsh-session';
9
+ import type { SubagentIdentityProjection, SubagentTimingProjection } from './projection-types.ts';
10
+ /** Fold state for a subagent's latest timing snapshot. */
11
+ export interface TimingState {
10
12
  /** Milliseconds accumulated across completed post-descriptor turns. */
11
13
  settledMs: number;
12
14
  /** Current open interval kept paired inside the fold. */
13
15
  active?: {
14
16
  since: number;
15
17
  through: number;
16
- };
18
+ } | undefined;
17
19
  /** Latest pre-descriptor turn start, promoted when the child's own descriptor arrives. */
18
- pendingTurnStart?: number;
20
+ pendingTurnStart?: number | undefined;
19
21
  /** Whether the fold has crossed a descriptor in this logical log. */
20
22
  descriptorSeen: boolean;
21
23
  }
24
+ declare module '@xneog/dsh-session-projection/types' {
25
+ interface SessionProjectionStateMap {
26
+ subagentTiming: TimingState;
27
+ subagent: IdentityState;
28
+ }
29
+ }
22
30
  /**
23
31
  * Fold turn boundaries around the child's own durable descriptor.
24
32
  *
@@ -27,10 +35,39 @@ interface TimingState {
27
35
  * admits only a child with exactly one descriptor in its own suffix, making
28
36
  * the final reset the child's authoritative timing origin.
29
37
  */
30
- export declare const subagentTimingProjectionDefinition: ProjectionDefinition<'subagentTiming', TimingState>;
38
+ export declare const subagentTimingProjectionDefinition: {
39
+ key: "subagentTiming";
40
+ stateSchema: z.ZodType<TimingState, unknown, z.core.$ZodTypeInternals<TimingState, unknown>>;
41
+ init: () => {
42
+ descriptorSeen: false;
43
+ settledMs: number;
44
+ };
45
+ apply: (state: NoInfer<TimingState>, event: SessionEvent) => {
46
+ /** Milliseconds accumulated across completed post-descriptor turns. */
47
+ settledMs: number;
48
+ /** Current open interval kept paired inside the fold. */
49
+ active?: {
50
+ since: number;
51
+ through: number;
52
+ } | undefined;
53
+ /** Whether the fold has crossed a descriptor in this logical log. */
54
+ descriptorSeen: boolean;
55
+ };
56
+ wire: {
57
+ viewSchema: z.ZodType<SubagentTimingProjection, unknown, z.core.$ZodTypeInternals<SubagentTimingProjection, unknown>>;
58
+ view: (state: NoInfer<TimingState>) => {
59
+ active?: {
60
+ since: number;
61
+ through: number;
62
+ };
63
+ settledMs: number;
64
+ };
65
+ };
66
+ stateVersion: number;
67
+ };
31
68
  interface IdentityState {
32
69
  /** Identity from the last valid descriptor; absent before one, and after an invalid one. */
33
- identity?: SubagentIdentityProjection;
70
+ identity?: SubagentIdentityProjection | undefined;
34
71
  }
35
72
  /**
36
73
  * Fold the durable mode/label identity from `subagent/descriptor` events,
@@ -43,6 +80,16 @@ interface IdentityState {
43
80
  * holding the earlier identity replaces it instead of keeping it stale;
44
81
  * `null` ⟺ no valid descriptor, with the causes deliberately undistinguished.
45
82
  */
46
- export declare const subagentIdentityProjectionDefinition: ProjectionDefinition<'subagent', IdentityState>;
83
+ export declare const subagentIdentityProjectionDefinition: {
84
+ key: "subagent";
85
+ stateSchema: z.ZodType<IdentityState, unknown, z.core.$ZodTypeInternals<IdentityState, unknown>>;
86
+ init: () => {};
87
+ apply: (state: NoInfer<IdentityState>, event: SessionEvent) => IdentityState;
88
+ wire: {
89
+ viewSchema: z.ZodNullable<z.ZodType<SubagentIdentityProjection, unknown, z.core.$ZodTypeInternals<SubagentIdentityProjection, unknown>>>;
90
+ view: (state: NoInfer<IdentityState>) => SubagentIdentityProjection | null;
91
+ };
92
+ stateVersion: number;
93
+ };
47
94
  export {};
48
95
  //# sourceMappingURL=projection.d.ts.map
@@ -5,15 +5,24 @@
5
5
  * @module @xneog/dsh-subagent/projection
6
6
  */
7
7
  import { z } from 'zod';
8
+ import { SessionSeq } from '@xneog/dsh-session';
8
9
  import { foldSubagentDescriptor } from "./descriptor.js";
9
- // Zod's optional output includes explicit `undefined`; with
10
- // exactOptionalPropertyTypes the public interface permits omission only.
10
+ const activeIntervalSchema = z.object({
11
+ since: z.number().int().nonnegative(),
12
+ through: z.number().int().nonnegative(),
13
+ }).strict();
11
14
  const projectionSchema = z.object({
12
15
  settledMs: z.number().int().nonnegative(),
13
- active: z.object({
14
- since: z.number().int().nonnegative(),
15
- through: z.number().int().nonnegative(),
16
- }).strict().optional(),
16
+ active: activeIntervalSchema.optional(),
17
+ }).strict().transform(({ settledMs, active }) => ({
18
+ settledMs,
19
+ ...active === undefined ? {} : { active },
20
+ }));
21
+ const timingStateSchema = z.object({
22
+ settledMs: z.number().int().nonnegative(),
23
+ active: activeIntervalSchema.optional(),
24
+ pendingTurnStart: z.number().int().nonnegative().optional(),
25
+ descriptorSeen: z.boolean(),
17
26
  }).strict();
18
27
  /**
19
28
  * Fold turn boundaries around the child's own durable descriptor.
@@ -25,7 +34,7 @@ const projectionSchema = z.object({
25
34
  */
26
35
  export const subagentTimingProjectionDefinition = {
27
36
  key: 'subagentTiming',
28
- schema: projectionSchema,
37
+ stateSchema: timingStateSchema,
29
38
  init: () => ({ descriptorSeen: false, settledMs: 0 }),
30
39
  apply: (state, event) => {
31
40
  if (event.type === 'turn/start') {
@@ -62,10 +71,13 @@ export const subagentTimingProjectionDefinition = {
62
71
  return state;
63
72
  return { ...state, active: { ...state.active, through: event.time } };
64
73
  },
65
- view: state => ({
66
- settledMs: state.settledMs,
67
- ...(state.active === undefined ? {} : { active: state.active }),
68
- }),
74
+ wire: {
75
+ viewSchema: projectionSchema,
76
+ view: state => ({
77
+ settledMs: state.settledMs,
78
+ ...(state.active === undefined ? {} : { active: state.active }),
79
+ }),
80
+ },
69
81
  stateVersion: 2,
70
82
  };
71
83
  // The cast bridges only the optional-label arm: Zod's optional output
@@ -73,18 +85,22 @@ export const subagentTimingProjectionDefinition = {
73
85
  // from the public interface. The no-value state itself is the serializable
74
86
  // `null` arm — never `undefined` — so every registry read and push frame
75
87
  // survives JSON.stringify losslessly.
76
- const identitySchema = z.discriminatedUnion('mode', [
88
+ const identityValueSchema = z.discriminatedUnion('mode', [
77
89
  z.object({
78
90
  mode: z.literal('one-shot'),
79
91
  label: z.string().optional(),
80
- seq: z.number().int().nonnegative(),
92
+ seq: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).transform(SessionSeq),
81
93
  }).strict(),
82
94
  z.object({
83
95
  mode: z.literal('continuable'),
84
96
  label: z.string(),
85
- seq: z.number().int().nonnegative(),
97
+ seq: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).transform(SessionSeq),
86
98
  }).strict(),
87
- ]).nullable();
99
+ ]);
100
+ const identitySchema = identityValueSchema.nullable();
101
+ const identityStateSchema = z.object({
102
+ identity: identityValueSchema.optional(),
103
+ }).strict();
88
104
  /** Interpret one `subagent/descriptor` event's identity; no value when the payload cannot be trusted. */
89
105
  function descriptorIdentity(event) {
90
106
  let descriptor;
@@ -119,7 +135,7 @@ function descriptorIdentity(event) {
119
135
  */
120
136
  export const subagentIdentityProjectionDefinition = {
121
137
  key: 'subagent',
122
- schema: identitySchema,
138
+ stateSchema: identityStateSchema,
123
139
  init: () => ({}),
124
140
  apply: (state, event) => {
125
141
  if (event.type !== 'subagent/descriptor')
@@ -127,7 +143,7 @@ export const subagentIdentityProjectionDefinition = {
127
143
  const identity = descriptorIdentity(event);
128
144
  return identity === undefined ? {} : { identity };
129
145
  },
130
- view: state => state.identity ?? null,
146
+ wire: { viewSchema: identitySchema, view: state => state.identity ?? null },
131
147
  // Bumped when the identity gained its `seq` field: an older checkpoint row
132
148
  // would replay into a value the schema rejects, so it must refold instead.
133
149
  stateVersion: 2,
@@ -12,9 +12,18 @@ function finalText(blocks) {
12
12
  .map(block => block.text)
13
13
  .join('');
14
14
  }
15
+ /** Render a failed stop reason with optional provider-authored detail. */
16
+ function failureDetail(result) {
17
+ const stopReason = result.stopReason;
18
+ return result.diagnostic === undefined
19
+ ? stopReason
20
+ : `${stopReason}; diagnostic: ${result.diagnostic}`;
21
+ }
15
22
  /**
16
- * Map a child result to the task outcome: completed carries final text,
17
- * aborted is killed, and every other reason is failed without partial output.
23
+ * Map a child result to the task outcome: completed carries final text, local
24
+ * cancellation (`aborted` without a diagnostic) is killed, and provider-
25
+ * diagnosed remote aborts plus every other reason are failed without partial
26
+ * output.
18
27
  * @param result - child terminal result.
19
28
  * @returns outcome for the `ctx.jobs` registration.
20
29
  */
@@ -23,14 +32,16 @@ function runOutcome(result) {
23
32
  case 'completed':
24
33
  return { status: 'completed', output: finalText(result.output) };
25
34
  case 'aborted':
26
- return { status: 'killed' };
35
+ return result.diagnostic === undefined
36
+ ? { status: 'killed' }
37
+ : { status: 'failed', detail: failureDetail(result) };
27
38
  case 'error':
28
39
  case 'max-tokens':
29
40
  case 'refusal':
30
- return { status: 'failed', detail: result.stopReason };
31
- // Merge-extensible reasons remain failures with their raw detail.
41
+ return { status: 'failed', detail: failureDetail(result) };
42
+ // Merge-extensible reasons remain failures with provider-authored detail.
32
43
  default:
33
- return { status: 'failed', detail: String(result.stopReason) };
44
+ return { status: 'failed', detail: failureDetail(result) };
34
45
  }
35
46
  }
36
47
  /**
@@ -76,6 +76,7 @@ export interface SubagentRunEndInfo {
76
76
  * to `maxDepth`; the other names match.
77
77
  */
78
78
  export interface SubagentCapabilities {
79
+ readonly agentOptions: boolean;
79
80
  readonly outputSchema: boolean;
80
81
  readonly depthLimit: boolean;
81
82
  readonly toolFilter: boolean;
@@ -107,6 +108,13 @@ export interface SubagentStartRequest {
107
108
  * remaining turn work when it fires afterward.
108
109
  */
109
110
  readonly signal: AbortSignal;
111
+ /**
112
+ * Optional host-Agent provider, model, reasoning-effort, and output-token
113
+ * overrides. Requires {@link SubagentCapabilities.agentOptions}; in-process
114
+ * providers merge them over the parent Agent's options when they create the
115
+ * child, while the DSH SDK provider merges them over its instance defaults
116
+ * before initializing the separate child runtime.
117
+ */
110
118
  readonly agentOptions?: AgentOptions;
111
119
  /**
112
120
  * Object-rooted JSON Schema within `assertObjectJsonSchema`'s enforced subset. Start rejects
@@ -218,6 +226,13 @@ export interface SubagentResult {
218
226
  * schema-agnostic.
219
227
  */
220
228
  readonly structured?: unknown;
229
+ /**
230
+ * Provider-authored, non-assistant failure detail for a non-`completed`
231
+ * result. Providers keep this text free of tool inputs, file contents,
232
+ * environment values, credentials, and raw protocol payloads, and limit it
233
+ * to 4096 UTF-8 bytes. Consumers present it separately from {@link output}.
234
+ */
235
+ readonly diagnostic?: string;
221
236
  /** Why the run ended. A non-`completed` reason means `output` may be partial. */
222
237
  readonly stopReason: SubagentStopReason;
223
238
  }
@@ -276,6 +291,16 @@ export interface SubagentProvider {
276
291
  * It says nothing about tool registration, injected services, or authority inheritance.
277
292
  */
278
293
  readonly inheritsParentContext: boolean;
294
+ /**
295
+ * Optional static provider-owned provider/model route for one-shot Agent
296
+ * options. Consumers merge tool/model overrides over these values before
297
+ * preflight; providers whose route derives from the parent omit it. The value
298
+ * is detached immutable data and requires `agentOptions` support.
299
+ */
300
+ readonly agentRouteDefaults?: Readonly<{
301
+ provider: string;
302
+ model: string;
303
+ }>;
279
304
  /**
280
305
  * Establish a ONE-SHOT child and return its handle after publication.
281
306
  * The service has already validated that every requested start-time
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xneog/dsh-subagent",
3
3
  "description": "Abstract subagent seam (ctx.subagents): named-provider registry for delegating to child agents",
4
- "version": "0.1.0",
4
+ "version": "0.1.3-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -18,6 +18,10 @@
18
18
  "types": "./lib/types/index.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
+ "./internal": {
22
+ "types": "./lib/types/internal.d.ts",
23
+ "default": "./lib/types/internal.js"
24
+ },
21
25
  "./invariant": {
22
26
  "types": "./lib/types/invariant.d.ts",
23
27
  "default": "./lib/invariant.js"
@@ -26,6 +30,14 @@
26
30
  "types": "./lib/types/client.d.ts",
27
31
  "default": "./lib/types/client.js"
28
32
  },
33
+ "./typert": {
34
+ "types": "./lib/typert.host.d.ts",
35
+ "default": "./lib/typert.host.js"
36
+ },
37
+ "./remote": {
38
+ "types": "./lib/typert.remote-client.d.ts",
39
+ "default": "./lib/typert.remote-client.js"
40
+ },
29
41
  "./src/*": "./src/*",
30
42
  "./package.json": "./package.json"
31
43
  },
@@ -33,29 +45,39 @@
33
45
  "lib/index.js",
34
46
  "lib/invariant.js",
35
47
  "lib/types/**/*.js",
36
- "lib/types/**/*.d.ts"
48
+ "lib/types/**/*.d.ts",
49
+ "lib/typert.host.js",
50
+ "lib/typert.host.d.ts",
51
+ "lib/typert.remote-client.js",
52
+ "lib/typert.remote-client.d.ts"
37
53
  ],
38
54
  "license": "MIT",
39
55
  "dependencies": {
40
- "zod": "^4.4.3"
56
+ "zod": "^4.4.3",
57
+ "@xneog/dsh-brand": "^0.1.3-alpha.1",
58
+ "@xneog/dsh-util-values": "^0.1.3-alpha.1"
41
59
  },
42
60
  "peerDependencies": {
43
- "@xneog/dsh-agent": "0.1.0",
44
- "@xneog/dsh-agent-presets": "0.1.0",
45
- "@xneog/dsh-brand": "0.1.0",
46
- "@xneog/dsh-invariants": "0.1.0",
47
- "@xneog/dsh-llm": "0.1.0",
48
- "@xneog/dsh-sandbox": "0.1.0",
49
- "@xneog/dsh-sandbox-policy": "0.1.0",
50
- "@xneog/dsh-scope": "0.1.0",
51
- "@xneog/dsh-session": "0.1.0",
52
- "@xneog/dsh-session-persistence": "0.1.0",
53
- "@xneog/dsh-session-projection": "0.1.0",
54
- "@xneog/dsh-session-projection-cache": "0.1.0",
55
- "@xneog/dsh-jobs": "0.1.0",
56
- "@xneog/dsh-tools": "0.1.0",
57
- "@xneog/dsh-user-approval": "0.1.0",
58
- "@xneog/cordis": "0.1.0"
61
+ "@xneog/cordis": "^4.0.2",
62
+ "@xneog/dsh-agent-presets": "^0.1.3-alpha.1",
63
+ "@xneog/dsh-invariants": "^0.1.3-alpha.1",
64
+ "@xneog/dsh-llm": "^0.1.3-alpha.1",
65
+ "@xneog/dsh-sandbox-policy": "^0.1.3-alpha.1",
66
+ "@xneog/dsh-scope": "^0.1.3-alpha.1",
67
+ "@xneog/dsh-session": "^0.1.3-alpha.1",
68
+ "@xneog/dsh-jobs": "^0.1.3-alpha.1",
69
+ "@xneog/dsh-agent": "^0.1.3-alpha.1",
70
+ "@xneog/dsh-attachment": "^0.1.3-alpha.1",
71
+ "@xneog/dsh-sandbox": "^0.1.3-alpha.1",
72
+ "@xneog/dsh-session-persistence": "^0.1.3-alpha.1",
73
+ "@xneog/dsh-session-projection": "^0.1.3-alpha.1",
74
+ "@xneog/dsh-tools": "^0.1.3-alpha.1",
75
+ "@xneog/dsh-session-query": "^0.1.3-alpha.1",
76
+ "@xneog/dsh-system-prompt": "^0.1.3-alpha.1",
77
+ "@xneog/dsh-user-approval": "^0.1.3-alpha.1",
78
+ "@xneog/dsh-session-projection-cache": "^0.1.3-alpha.1",
79
+ "@xneog/dsh-typert-protocol": "^0.1.3-alpha.1",
80
+ "@xneog/dsh-util-time": "^0.1.3-alpha.1"
59
81
  },
60
82
  "peerDependenciesMeta": {
61
83
  "@xneog/dsh-agent-presets": {
@@ -76,6 +98,9 @@
76
98
  "@xneog/dsh-session-projection-cache": {
77
99
  "optional": true
78
100
  },
101
+ "@xneog/dsh-session-query": {
102
+ "optional": true
103
+ },
79
104
  "@xneog/dsh-jobs": {
80
105
  "optional": true
81
106
  },
@@ -84,23 +109,28 @@
84
109
  }
85
110
  },
86
111
  "devDependencies": {
87
- "@xneog/dsh-agent": "0.1.0",
88
- "@xneog/dsh-agent-presets": "0.1.0",
89
- "@xneog/dsh-brand": "0.1.0",
90
- "@xneog/dsh-invariants": "0.1.0",
91
- "@xneog/dsh-llm": "0.1.0",
92
- "@xneog/dsh-sandbox": "0.1.0",
93
- "@xneog/dsh-sandbox-policy": "0.1.0",
94
- "@xneog/dsh-scope": "0.1.0",
95
- "@xneog/dsh-session": "0.1.0",
96
- "@xneog/dsh-session-persistence": "0.1.0",
97
- "@xneog/dsh-session-projection": "0.1.0",
98
- "@xneog/dsh-session-projection-cache": "0.1.0",
99
- "@xneog/dsh-storage": "0.1.0",
100
- "@xneog/dsh-storage-domain": "0.1.0",
101
- "@xneog/dsh-jobs": "0.1.0",
102
- "@xneog/dsh-tools": "0.1.0",
103
- "@xneog/dsh-user-approval": "0.1.0",
104
- "@xneog/cordis": "0.1.0"
112
+ "@xneog/cordis": "^4.0.2",
113
+ "@xneog/dsh-agent": "^0.1.3-alpha.1",
114
+ "@xneog/dsh-attachment": "^0.1.3-alpha.1",
115
+ "@xneog/dsh-agent-presets": "^0.1.3-alpha.1",
116
+ "@xneog/dsh-llm": "^0.1.3-alpha.1",
117
+ "@xneog/dsh-jobs": "^0.1.3-alpha.1",
118
+ "@xneog/dsh-sandbox": "^0.1.3-alpha.1",
119
+ "@xneog/dsh-sandbox-policy": "^0.1.3-alpha.1",
120
+ "@xneog/dsh-session": "^0.1.3-alpha.1",
121
+ "@xneog/dsh-session-persistence": "^0.1.3-alpha.1",
122
+ "@xneog/dsh-session-projection": "^0.1.3-alpha.1",
123
+ "@xneog/dsh-session-projection-cache": "^0.1.3-alpha.1",
124
+ "@xneog/dsh-session-query": "^0.1.3-alpha.1",
125
+ "@xneog/dsh-scope": "^0.1.3-alpha.1",
126
+ "@xneog/dsh-storage": "^0.1.3-alpha.1",
127
+ "@xneog/dsh-invariants": "^0.1.3-alpha.1",
128
+ "@xneog/dsh-system-prompt": "^0.1.3-alpha.1",
129
+ "@xneog/dsh-tools": "^0.1.3-alpha.1",
130
+ "@xneog/dsh-typert-protocol": "^0.1.3-alpha.1",
131
+ "@xneog/dsh-storage-json": "^0.1.3-alpha.1",
132
+ "@xneog/dsh-util-time": "^0.1.3-alpha.1",
133
+ "@xneog/dsh-user-approval": "^0.1.3-alpha.1",
134
+ "@xneog/dsh-storage-domain": "^0.1.3-alpha.1"
105
135
  }
106
136
  }
@@ -1,57 +0,0 @@
1
- /**
2
- * Internal registry of deployment capabilities composed into every continuable
3
- * child's unpublished creation context.
4
- *
5
- * A contribution grants a child-scoped capability without teaching the
6
- * continuation manager which capabilities exist. The manager owns residency;
7
- * this registry owns the join between plugin lifetime, unpublished setup, and
8
- * Activation disposal, so no installation outlives either owner and no removed
9
- * contribution can be installed after revocation reports completion.
10
- *
11
- * @module @xneog/dsh-subagent/activation-setup-registry
12
- */
13
- import type { Context } from '@xneog/cordis';
14
- import type { AgentSetupCommit } from '@xneog/dsh-agent';
15
- /**
16
- * One deployment capability installed into a continuable child's unpublished
17
- * creation context. It composes synchronously before publication and returns
18
- * the disposer for exactly that installation.
19
- * @param childCtx - the child's unpublished scoped context.
20
- * @returns the disposer revoking this installation.
21
- */
22
- export type ContinuableSetupContribution = (childCtx: Context) => () => void;
23
- /**
24
- * Owns continuable-child setup registrations, installations, rollback, child
25
- * cleanup, and immediate live revocation.
26
- */
27
- export declare class SubagentActivationSetupRegistry {
28
- /** Live contributions in installation order. */
29
- private readonly registrations;
30
- /** Child context to its live installations. */
31
- private readonly byChild;
32
- /**
33
- * Register one contribution.
34
- * @param contribution - synchronous child-scope installer.
35
- * @returns an idempotent registration undo.
36
- * @throws after attempting every installation when any disposer fails.
37
- */
38
- register(contribution: ContinuableSetupContribution): () => void;
39
- /**
40
- * Install every live contribution into one unpublished child context.
41
- * @param childCtx - the child's unpublished scoped context.
42
- * @returns the provisioning commit consumed at Agent publication.
43
- */
44
- apply(childCtx: Context): AgentSetupCommit;
45
- /** Release every remaining installation owned by one disposed child scope. */
46
- private releaseChild;
47
- /**
48
- * Release a batch completely before reporting disposer failures.
49
- * @param installations - records to release.
50
- * @param during - operation name for diagnostics.
51
- */
52
- private releaseAll;
53
- /** Drop one installation from both indices and dispose it exactly once. */
54
- private release;
55
- }
56
- export default SubagentActivationSetupRegistry;
57
- //# sourceMappingURL=activation-setup-registry.d.ts.map