@xenosystem/agent-sdk 0.10.29 → 0.10.31

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 (65) hide show
  1. package/dist/artifacts/index.cjs +6 -6
  2. package/dist/artifacts/index.js +7 -7
  3. package/dist/artifacts/metafile-cjs.json +1 -1
  4. package/dist/artifacts/metafile-esm.json +1 -1
  5. package/dist/automation/index.cjs +1 -1
  6. package/dist/automation/index.d.cts +6 -2
  7. package/dist/automation/index.d.ts +6 -2
  8. package/dist/automation/index.js +1 -1
  9. package/dist/automation/metafile-cjs.json +1 -1
  10. package/dist/automation/metafile-esm.json +1 -1
  11. package/dist/control-plane/index.cjs +1 -1
  12. package/dist/control-plane/index.js +1 -1
  13. package/dist/coordination/index.cjs +2 -2
  14. package/dist/coordination/index.d.cts +9 -3
  15. package/dist/coordination/index.d.ts +9 -3
  16. package/dist/coordination/index.js +2 -2
  17. package/dist/coordination/metafile-cjs.json +1 -1
  18. package/dist/coordination/metafile-esm.json +1 -1
  19. package/dist/electron/index.cjs +199 -178
  20. package/dist/electron/index.d.cts +20 -2
  21. package/dist/electron/index.d.ts +20 -2
  22. package/dist/electron/index.js +199 -178
  23. package/dist/electron/metafile-cjs.json +1 -1
  24. package/dist/electron/metafile-esm.json +1 -1
  25. package/dist/hosted/index.cjs +1 -1
  26. package/dist/hosted/index.js +1 -1
  27. package/dist/hosted/metafile-cjs.json +1 -1
  28. package/dist/hosted/metafile-esm.json +1 -1
  29. package/dist/index.cjs +374 -353
  30. package/dist/index.d.cts +93 -13
  31. package/dist/index.d.ts +93 -13
  32. package/dist/index.js +375 -354
  33. package/dist/intelligence/index.cjs +5 -5
  34. package/dist/intelligence/index.js +6 -6
  35. package/dist/intelligence/metafile-cjs.json +1 -1
  36. package/dist/intelligence/metafile-esm.json +1 -1
  37. package/dist/mcp/index.d.cts +6 -2
  38. package/dist/mcp/index.d.ts +6 -2
  39. package/dist/metafile-cjs.json +1 -1
  40. package/dist/metafile-esm.json +1 -1
  41. package/dist/providers/metafile-cjs.json +1 -1
  42. package/dist/providers/metafile-esm.json +1 -1
  43. package/dist/recipes/metafile-cjs.json +1 -1
  44. package/dist/recipes/metafile-esm.json +1 -1
  45. package/dist/research/metafile-cjs.json +1 -1
  46. package/dist/research/metafile-esm.json +1 -1
  47. package/dist/session/index.cjs +22 -22
  48. package/dist/session/index.d.cts +15 -0
  49. package/dist/session/index.d.ts +15 -0
  50. package/dist/session/index.js +22 -22
  51. package/dist/session/metafile-cjs.json +1 -1
  52. package/dist/session/metafile-esm.json +1 -1
  53. package/dist/sharing/index.cjs +2 -2
  54. package/dist/sharing/index.js +3 -3
  55. package/dist/sharing/metafile-cjs.json +1 -1
  56. package/dist/sharing/metafile-esm.json +1 -1
  57. package/dist/skills/index.d.cts +5 -1
  58. package/dist/skills/index.d.ts +5 -1
  59. package/dist/utils/index.cjs +19 -18
  60. package/dist/utils/index.d.cts +5 -2
  61. package/dist/utils/index.d.ts +5 -2
  62. package/dist/utils/index.js +19 -18
  63. package/dist/utils/metafile-cjs.json +1 -1
  64. package/dist/utils/metafile-esm.json +1 -1
  65. package/package.json +1 -1
@@ -286,6 +286,10 @@ interface ToolExecutionContext {
286
286
  operationId?: string;
287
287
  reportProgress?: (event: ToolProgressUpdate) => void;
288
288
  authorization?: ToolAuthorizationReceipt;
289
+ ownerSessionId?: string;
290
+ }
291
+ interface ToolPolicyProjectionContext {
292
+ ownerSessionId?: string;
289
293
  }
290
294
  type ToolExecutor = (input: Record<string, unknown>, context?: ToolExecutionContext) => Promise<ToolResult>;
291
295
  interface ToolPolicyProjection {
@@ -299,7 +303,7 @@ interface RegisteredTool {
299
303
  definition: ToolDefinition;
300
304
  execute: ToolExecutor;
301
305
  readOnly?: boolean;
302
- projectPolicyInput?: (input: Record<string, unknown>) => ToolPolicyProjection | {
306
+ projectPolicyInput?: (input: Record<string, unknown>, context?: ToolPolicyProjectionContext) => ToolPolicyProjection | {
303
307
  error: ToolResult;
304
308
  };
305
309
  }
@@ -435,6 +439,18 @@ interface SessionMeta {
435
439
  hostBinding?: AgentSessionHostBindingV1;
436
440
  pinned?: boolean;
437
441
  pinnedAt?: string;
442
+ fork?: SessionForkRecord;
443
+ }
444
+ interface SessionForkRecord {
445
+ history: "full" | "checkpoint";
446
+ checkpointId?: string;
447
+ workingTree: "shared" | "isolated";
448
+ worktree?: {
449
+ path: string;
450
+ branch: string;
451
+ baseRef: string;
452
+ baseCommit?: string;
453
+ };
438
454
  }
439
455
  type TranscriptEventType = "session_start" | "user_message" | "assistant_message" | "tool_call" | "tool_result" | "delegation_summary" | "checkpoint" | "context_compressed" | "session_end" | "error";
440
456
  interface SessionStartData {
@@ -445,6 +461,7 @@ interface SessionStartData {
445
461
  formatVersion?: number;
446
462
  forkedFrom?: string;
447
463
  checkpointId?: string;
464
+ workingTree?: SessionForkRecord["workingTree"];
448
465
  }
449
466
  interface ToolCallData {
450
467
  toolName: string;
@@ -624,7 +641,7 @@ declare class ToolRegistry {
624
641
  execute(name: string, input: Record<string, unknown>, context?: ToolExecutionContext): Promise<ToolResult>;
625
642
  listNames(): string[];
626
643
  has(name: string): boolean;
627
- projectPolicyInput(name: string, input: Record<string, unknown>): ToolPolicyProjection | {
644
+ projectPolicyInput(name: string, input: Record<string, unknown>, context?: ToolPolicyProjectionContext): ToolPolicyProjection | {
628
645
  error: ToolResult;
629
646
  };
630
647
  get size(): number;
@@ -1699,6 +1716,7 @@ declare class AgentLoop {
1699
1716
  private getApiMessagesForRequest;
1700
1717
  private appendSyntheticUserMessage;
1701
1718
  private appendSyntheticAssistantMessage;
1719
+ private explicitOwnerSessionId;
1702
1720
  private projectAssistantContentForPersistence;
1703
1721
  run(userMessage: string, options?: AgentRunOptions): Promise<string>;
1704
1722
  runStream(prompt: string, options?: RunStreamOptions): AsyncIterable<XenoRuntimeEvent>;
@@ -286,6 +286,10 @@ interface ToolExecutionContext {
286
286
  operationId?: string;
287
287
  reportProgress?: (event: ToolProgressUpdate) => void;
288
288
  authorization?: ToolAuthorizationReceipt;
289
+ ownerSessionId?: string;
290
+ }
291
+ interface ToolPolicyProjectionContext {
292
+ ownerSessionId?: string;
289
293
  }
290
294
  type ToolExecutor = (input: Record<string, unknown>, context?: ToolExecutionContext) => Promise<ToolResult>;
291
295
  interface ToolPolicyProjection {
@@ -299,7 +303,7 @@ interface RegisteredTool {
299
303
  definition: ToolDefinition;
300
304
  execute: ToolExecutor;
301
305
  readOnly?: boolean;
302
- projectPolicyInput?: (input: Record<string, unknown>) => ToolPolicyProjection | {
306
+ projectPolicyInput?: (input: Record<string, unknown>, context?: ToolPolicyProjectionContext) => ToolPolicyProjection | {
303
307
  error: ToolResult;
304
308
  };
305
309
  }
@@ -435,6 +439,18 @@ interface SessionMeta {
435
439
  hostBinding?: AgentSessionHostBindingV1;
436
440
  pinned?: boolean;
437
441
  pinnedAt?: string;
442
+ fork?: SessionForkRecord;
443
+ }
444
+ interface SessionForkRecord {
445
+ history: "full" | "checkpoint";
446
+ checkpointId?: string;
447
+ workingTree: "shared" | "isolated";
448
+ worktree?: {
449
+ path: string;
450
+ branch: string;
451
+ baseRef: string;
452
+ baseCommit?: string;
453
+ };
438
454
  }
439
455
  type TranscriptEventType = "session_start" | "user_message" | "assistant_message" | "tool_call" | "tool_result" | "delegation_summary" | "checkpoint" | "context_compressed" | "session_end" | "error";
440
456
  interface SessionStartData {
@@ -445,6 +461,7 @@ interface SessionStartData {
445
461
  formatVersion?: number;
446
462
  forkedFrom?: string;
447
463
  checkpointId?: string;
464
+ workingTree?: SessionForkRecord["workingTree"];
448
465
  }
449
466
  interface ToolCallData {
450
467
  toolName: string;
@@ -624,7 +641,7 @@ declare class ToolRegistry {
624
641
  execute(name: string, input: Record<string, unknown>, context?: ToolExecutionContext): Promise<ToolResult>;
625
642
  listNames(): string[];
626
643
  has(name: string): boolean;
627
- projectPolicyInput(name: string, input: Record<string, unknown>): ToolPolicyProjection | {
644
+ projectPolicyInput(name: string, input: Record<string, unknown>, context?: ToolPolicyProjectionContext): ToolPolicyProjection | {
628
645
  error: ToolResult;
629
646
  };
630
647
  get size(): number;
@@ -1699,6 +1716,7 @@ declare class AgentLoop {
1699
1716
  private getApiMessagesForRequest;
1700
1717
  private appendSyntheticUserMessage;
1701
1718
  private appendSyntheticAssistantMessage;
1719
+ private explicitOwnerSessionId;
1702
1720
  private projectAssistantContentForPersistence;
1703
1721
  run(userMessage: string, options?: AgentRunOptions): Promise<string>;
1704
1722
  runStream(prompt: string, options?: RunStreamOptions): AsyncIterable<XenoRuntimeEvent>;