@steerable/agent-runtime 0.9.1 → 0.10.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/dist/methods.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * has) fails CI instead of drifting silently.
10
10
  */
11
11
  /** Every host→sidecar request method the sidecar registers. */
12
- export declare const SIDECAR_METHODS: readonly ["system.ping", "system.shutdown", "system.shutdown_now", "agent.session.create", "agent.session.resume", "agent.session.list", "agent.session.fork", "agent.session.branches", "agent.session.messages", "agent.chat.stream", "agent.chat.cancel", "agent.chat.steer", "agent.chat.fork", "agent.chat.compact", "agent.session.tree", "tool.list", "tool.invoke", "workspace.apply_edits", "skills.list", "trace.fetch", "trace.export", "metrics.export", "config.get", "config.set", "compat.describe", "sandbox.describe", "harness.describe", "models.list", "presets.describe", "presets.resolve", "catalog.describe", "plugin.list", "plugin.enable", "plugin.disable", "plugin.reload", "plugin.tools.describe"];
12
+ export declare const SIDECAR_METHODS: readonly ["system.ping", "system.shutdown", "system.shutdown_now", "agent.session.create", "agent.session.resume", "agent.session.list", "agent.session.fork", "agent.session.branches", "agent.session.messages", "agent.chat.stream", "agent.chat.cancel", "agent.chat.steer", "agent.chat.fork", "agent.chat.compact", "agent.session.tree", "agent.children.list", "agent.children.interrupt", "tool.list", "tool.invoke", "workspace.apply_edits", "skills.list", "trace.fetch", "trace.export", "metrics.export", "config.get", "config.set", "compat.describe", "sandbox.describe", "harness.describe", "models.list", "presets.describe", "presets.resolve", "catalog.describe", "plugin.list", "plugin.enable", "plugin.disable", "plugin.reload", "plugin.tools.describe"];
13
13
  export type SidecarMethod = (typeof SIDECAR_METHODS)[number];
14
14
  /** Notification methods the sidecar pushes (no id, no response). */
15
15
  export declare const SIDECAR_NOTIFICATIONS: readonly ["lifecycle.ready", "lifecycle.shutdown", "stream.chunk", "stream.done", "stream.error", "agent.child"];
package/dist/methods.js CHANGED
@@ -25,6 +25,8 @@ export const SIDECAR_METHODS = [
25
25
  'agent.chat.fork',
26
26
  'agent.chat.compact',
27
27
  'agent.session.tree',
28
+ 'agent.children.list',
29
+ 'agent.children.interrupt',
28
30
  'tool.list',
29
31
  'tool.invoke',
30
32
  'workspace.apply_edits',
package/dist/runtime.d.ts CHANGED
@@ -29,6 +29,35 @@ export interface SessionMessages {
29
29
  content: string;
30
30
  }[];
31
31
  }
32
+ /**
33
+ * One child agent as the durable index reports it.
34
+ *
35
+ * `status` is composed, never stored raw: a terminal row reports its own
36
+ * status, a non-terminal row with a live handle reports `running`, and one
37
+ * with no handle reports `interrupted` (the spawning turn ended or the
38
+ * process died — `resumable` says whether a send can continue it).
39
+ */
40
+ export interface ChildAgentStatus {
41
+ recordId: string;
42
+ parentRecordId: string;
43
+ childId: string;
44
+ depth: number;
45
+ profile: string | null;
46
+ engine: string;
47
+ status: string;
48
+ resumable: boolean;
49
+ live: boolean;
50
+ promptTokens: number | null;
51
+ completionTokens: number | null;
52
+ usageKnown: boolean;
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ answerPreview?: string;
56
+ }
57
+ export interface ChildrenList {
58
+ parentRecordId: string | null;
59
+ children: ChildAgentStatus[];
60
+ }
32
61
  export interface ToolDescriptor {
33
62
  name: string;
34
63
  description?: string;
@@ -321,6 +350,31 @@ export declare class AgentRuntime {
321
350
  * model would see on resume. Fails loud on unknown records.
322
351
  */
323
352
  sessionMessages(recordId: string): Promise<SessionMessages>;
353
+ /**
354
+ * Every child agent recorded for one parent session — the durable answer
355
+ * to "what did this session spawn", which the live pool cannot give once
356
+ * the spawning turn ended.
357
+ */
358
+ childrenList(params?: {
359
+ parentRecordId?: string;
360
+ prefix?: string;
361
+ includeFinished?: boolean;
362
+ answerPreviewChars?: number;
363
+ }): Promise<ChildrenList>;
364
+ /**
365
+ * Cooperatively interrupt one running child of a chat's live turn.
366
+ *
367
+ * The panel's stop control, not a model-driven tool call: it must not wait
368
+ * for a turn of its own. `interrupted: false` means the child is not running
369
+ * in this process (already settled, or a restarted sidecar).
370
+ *
371
+ * @param chatId The chat whose turn owns the child.
372
+ * @param childId The child's lineage id (`0.2`).
373
+ */
374
+ childrenInterrupt(chatId: string, childId: string): Promise<{
375
+ interrupted: boolean;
376
+ reason?: string;
377
+ }>;
324
378
  /**
325
379
  * Start one CoreLoop turn. Resolves with a handle as soon as the sidecar
326
380
  * assigns a stream id; consume `handle.events` for the turn and await
package/dist/runtime.js CHANGED
@@ -157,6 +157,27 @@ export class AgentRuntime {
157
157
  sessionMessages(recordId) {
158
158
  return this.process.request('agent.session.messages', { recordId });
159
159
  }
160
+ /**
161
+ * Every child agent recorded for one parent session — the durable answer
162
+ * to "what did this session spawn", which the live pool cannot give once
163
+ * the spawning turn ended.
164
+ */
165
+ childrenList(params = {}) {
166
+ return this.process.request('agent.children.list', params);
167
+ }
168
+ /**
169
+ * Cooperatively interrupt one running child of a chat's live turn.
170
+ *
171
+ * The panel's stop control, not a model-driven tool call: it must not wait
172
+ * for a turn of its own. `interrupted: false` means the child is not running
173
+ * in this process (already settled, or a restarted sidecar).
174
+ *
175
+ * @param chatId The chat whose turn owns the child.
176
+ * @param childId The child's lineage id (`0.2`).
177
+ */
178
+ childrenInterrupt(chatId, childId) {
179
+ return this.process.request('agent.children.interrupt', { chatId, childId });
180
+ }
160
181
  // ---- chat ------------------------------------------------------------
161
182
  /**
162
183
  * Start one CoreLoop turn. Resolves with a handle as soon as the sidecar
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steerable/agent-runtime",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Steerable framework — official TypeScript production runtime. Owns the embedded Python sidecar lifecycle (spawn / ready handshake / health / bounded auto-restart / graceful drain) and exposes the CoreLoop-level API over the sidecar JSON-RPC surface. There is no TS CoreLoop; this package drives the same Rust CoreLoop the server uses (via the Python sidecar facade), so cross-language conformance holds by construction.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://steerableframework.com/",
@@ -35,20 +35,20 @@
35
35
  "node": ">=22.19.0"
36
36
  },
37
37
  "dependencies": {
38
- "@steerable/agent-protocol": "0.9.1"
38
+ "@steerable/agent-protocol": "0.10.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^22.10.5",
42
42
  "typescript": "^5.8.3",
43
43
  "vitest": "^3.2.4",
44
- "@steerable/agent-ui": "0.9.1"
44
+ "@steerable/agent-ui": "0.10.0"
45
45
  },
46
46
  "optionalDependencies": {
47
- "@steerable/runtime-darwin-arm64": "0.9.1",
48
- "@steerable/runtime-darwin-x64": "0.9.1",
49
- "@steerable/runtime-linux-arm64": "0.9.1",
50
- "@steerable/runtime-linux-x64": "0.9.1",
51
- "@steerable/runtime-win32-x64": "0.9.1"
47
+ "@steerable/runtime-darwin-arm64": "0.10.0",
48
+ "@steerable/runtime-darwin-x64": "0.10.0",
49
+ "@steerable/runtime-linux-arm64": "0.10.0",
50
+ "@steerable/runtime-linux-x64": "0.10.0",
51
+ "@steerable/runtime-win32-x64": "0.10.0"
52
52
  },
53
53
  "scripts": {
54
54
  "gen": "echo agent-runtime-ts",