@xenosystem/agent-sdk 0.10.32 → 0.10.33

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 (42) hide show
  1. package/README.md +1 -1
  2. package/dist/artifacts/index.cjs +1 -1
  3. package/dist/artifacts/index.js +1 -1
  4. package/dist/automation/index.cjs +1 -1
  5. package/dist/automation/index.d.cts +14 -0
  6. package/dist/automation/index.d.ts +14 -0
  7. package/dist/automation/index.js +1 -1
  8. package/dist/control-plane/index.cjs +1 -1
  9. package/dist/control-plane/index.js +1 -1
  10. package/dist/electron/index.cjs +168 -168
  11. package/dist/electron/index.d.cts +59 -5
  12. package/dist/electron/index.d.ts +59 -5
  13. package/dist/electron/index.js +168 -168
  14. package/dist/electron/metafile-cjs.json +1 -1
  15. package/dist/electron/metafile-esm.json +1 -1
  16. package/dist/governance/index.cjs +24 -24
  17. package/dist/governance/index.js +24 -24
  18. package/dist/governance/metafile-cjs.json +1 -1
  19. package/dist/governance/metafile-esm.json +1 -1
  20. package/dist/hosted/index.cjs +1 -1
  21. package/dist/hosted/index.js +1 -1
  22. package/dist/hosted/metafile-cjs.json +1 -1
  23. package/dist/hosted/metafile-esm.json +1 -1
  24. package/dist/index.cjs +343 -338
  25. package/dist/index.d.cts +108 -6
  26. package/dist/index.d.ts +108 -6
  27. package/dist/index.js +336 -331
  28. package/dist/mcp/index.cjs +14 -14
  29. package/dist/mcp/index.d.cts +198 -182
  30. package/dist/mcp/index.d.ts +198 -182
  31. package/dist/mcp/index.js +13 -13
  32. package/dist/mcp/metafile-cjs.json +1 -1
  33. package/dist/mcp/metafile-esm.json +1 -1
  34. package/dist/metafile-cjs.json +1 -1
  35. package/dist/metafile-esm.json +1 -1
  36. package/dist/session/index.cjs +15 -15
  37. package/dist/session/index.js +12 -12
  38. package/dist/session/metafile-cjs.json +1 -1
  39. package/dist/session/metafile-esm.json +1 -1
  40. package/dist/skills/index.d.cts +14 -0
  41. package/dist/skills/index.d.ts +14 -0
  42. package/package.json +1 -1
@@ -38,6 +38,202 @@ interface PermissionProfile {
38
38
  startProcesses: PermissionProfileDecision;
39
39
  };
40
40
  }
41
+ declare const WEB_CONTEXT_TOOL_RESULT_SCHEMA: "xeno.web-context.tool-result.v1";
42
+ interface WebContextEvidenceProjection {
43
+ evidenceId: string;
44
+ requestId: string;
45
+ sourceUrl: string;
46
+ finalUrl?: string;
47
+ citations: Array<{
48
+ url: string;
49
+ title?: string;
50
+ artifactId?: string;
51
+ }>;
52
+ }
53
+ interface WebContextToolResult {
54
+ schemaVersion: typeof WEB_CONTEXT_TOOL_RESULT_SCHEMA;
55
+ operation: "search" | "fetch";
56
+ requestId: string;
57
+ evidence: WebContextEvidenceProjection;
58
+ job?: {
59
+ jobId: string;
60
+ state: string;
61
+ };
62
+ artifact?: {
63
+ artifactId: string;
64
+ mediaType: string;
65
+ bytes: number;
66
+ };
67
+ jobProgress?: WebJobProgress;
68
+ }
69
+ interface ToolDefinition {
70
+ name: string;
71
+ description: string;
72
+ input_schema: {
73
+ type: "object";
74
+ properties: Record<string, unknown>;
75
+ required?: string[];
76
+ additionalProperties?: boolean | Record<string, unknown>;
77
+ [keyword: string]: unknown;
78
+ };
79
+ }
80
+ interface ImageUrlBlock {
81
+ type: "image_url";
82
+ image_url: {
83
+ url: string;
84
+ detail?: "auto" | "low" | "high";
85
+ };
86
+ }
87
+ interface ResourceContentBlock {
88
+ type: "resource";
89
+ uri?: string;
90
+ mimeType?: string;
91
+ text?: string;
92
+ data?: string;
93
+ }
94
+ type ToolAssistantContentBlock = TextBlock | ImageUrlBlock | ResourceContentBlock;
95
+ declare const TOOL_OPERATION_TERMINAL_STATES: readonly [
96
+ "completed",
97
+ "failed",
98
+ "timed_out",
99
+ "cancelled",
100
+ "outcome_unknown",
101
+ "orphaned"
102
+ ];
103
+ type ToolOperationTerminalState = (typeof TOOL_OPERATION_TERMINAL_STATES)[number];
104
+ type ToolOperationState = "registered" | "starting" | "running_foreground" | "running_background" | "waiting_for_input" | "stalled" | "verifying" | ToolOperationTerminalState;
105
+ type ToolCompletionPolicy = "await" | "observe" | "detach";
106
+ interface ExpectedOutputContract {
107
+ path: string;
108
+ kind?: "file" | "directory";
109
+ nonEmpty?: boolean;
110
+ }
111
+ interface ToolEvidence {
112
+ id: string;
113
+ kind: "artifact" | "process" | "verification";
114
+ status: "pending" | "verified" | "failed";
115
+ path?: string;
116
+ observedAt: string;
117
+ operationId: string;
118
+ detail?: Record<string, string | number | boolean | null>;
119
+ }
120
+ interface ToolOperationSnapshot {
121
+ schemaVersion: 1;
122
+ operationId: string;
123
+ turnId: string;
124
+ generation: number;
125
+ toolCallId: string;
126
+ toolName: string;
127
+ ownerSessionId?: string;
128
+ state: ToolOperationState;
129
+ terminal: boolean;
130
+ presentation: "foreground" | "background";
131
+ completionPolicy: ToolCompletionPolicy;
132
+ promotable: boolean;
133
+ processId?: string;
134
+ taskId?: string;
135
+ displayName?: string;
136
+ pid?: number;
137
+ commandFingerprint?: string;
138
+ outputPath?: string;
139
+ startedAt: string;
140
+ lastActivityAt: string;
141
+ deadlineAt?: string;
142
+ elapsedMs: number;
143
+ idleMs: number;
144
+ outputBytes: number;
145
+ nextOffset: number;
146
+ exitCode?: number | null;
147
+ completionReason?: string;
148
+ suggestedNextAction?: string;
149
+ expectedOutputs?: ExpectedOutputContract[];
150
+ evidence?: ToolEvidence[];
151
+ }
152
+ interface ToolProgressUpdate {
153
+ activity?: "stdout" | "stderr" | "input" | "waiting_for_input" | "heartbeat" | "state";
154
+ message?: string;
155
+ bytes?: number;
156
+ outputBytes?: number;
157
+ nextOffset?: number;
158
+ webContextProgress?: WebJobProgress;
159
+ }
160
+ interface ToolAuthorizationReceipt {
161
+ turnId: string;
162
+ toolCallId: string;
163
+ toolName: string;
164
+ iteration: number;
165
+ policy: {
166
+ allowed: true;
167
+ reason: string;
168
+ temporaryOverride: boolean;
169
+ };
170
+ permission: {
171
+ allowed: true;
172
+ reason: string;
173
+ };
174
+ elevation?: {
175
+ network: boolean;
176
+ directories: string[];
177
+ justification: string;
178
+ };
179
+ }
180
+ interface ToolResult {
181
+ success: boolean;
182
+ output: string;
183
+ error?: string;
184
+ errorCode?: string;
185
+ errorDetails?: Record<string, unknown>;
186
+ assistantContent?: ToolAssistantContentBlock[];
187
+ assistantOnlyContent?: ToolAssistantContentBlock[];
188
+ operation?: ToolOperationSnapshot;
189
+ evidence?: ToolEvidence[];
190
+ webContext?: WebContextToolResult;
191
+ retryable?: boolean;
192
+ }
193
+ interface ToolExecutionContext {
194
+ signal?: AbortSignal;
195
+ operationId?: string;
196
+ reportProgress?: (event: ToolProgressUpdate) => void;
197
+ authorization?: ToolAuthorizationReceipt;
198
+ ownerSessionId?: string;
199
+ }
200
+ interface ToolPolicyProjectionContext {
201
+ ownerSessionId?: string;
202
+ }
203
+ type ToolExecutor = (input: Record<string, unknown>, context?: ToolExecutionContext) => Promise<ToolResult>;
204
+ interface ToolPolicyProjection {
205
+ observabilityInput: Record<string, unknown>;
206
+ permissionInput: Record<string, unknown>;
207
+ permissionPreview?: string;
208
+ approvalKey?: string;
209
+ riskLevel?: "low" | "medium" | "high";
210
+ }
211
+ interface ToolAnnotationHints {
212
+ title?: string;
213
+ readOnlyHint?: boolean;
214
+ destructiveHint?: boolean;
215
+ idempotentHint?: boolean;
216
+ openWorldHint?: boolean;
217
+ }
218
+ interface ToolOrigin {
219
+ kind: "mcp";
220
+ server: string;
221
+ tool: string;
222
+ }
223
+ interface RegisteredTool {
224
+ definition: ToolDefinition;
225
+ execute: ToolExecutor;
226
+ readOnly?: boolean;
227
+ annotations?: ToolAnnotationHints;
228
+ origin?: ToolOrigin;
229
+ projectPolicyInput?: (input: Record<string, unknown>, context?: ToolPolicyProjectionContext) => ToolPolicyProjection | {
230
+ error: ToolResult;
231
+ };
232
+ }
233
+ interface TextBlock {
234
+ type: "text";
235
+ text: string;
236
+ }
41
237
  declare const MCP_APPS_EXTENSION_ID: "io.modelcontextprotocol/ui";
42
238
  declare const MCP_APP_RESOURCE_SCHEME: "ui:";
43
239
  declare const MCP_APP_MIME_TYPE: "text/html;profile=mcp-app";
@@ -136,6 +332,7 @@ interface MCPTool {
136
332
  description: string;
137
333
  inputSchema: Record<string, unknown>;
138
334
  server: string;
335
+ annotations?: ToolAnnotationHints;
139
336
  _meta?: MCPAppExtensionMetadata;
140
337
  appResourceUri?: string;
141
338
  visibility: MCPAppVisibility[];
@@ -232,6 +429,7 @@ interface MCPToolsListResult {
232
429
  name: string;
233
430
  description?: string;
234
431
  inputSchema: Record<string, unknown>;
432
+ annotations?: Record<string, unknown>;
235
433
  _meta?: MCPAppExtensionMetadata;
236
434
  }>;
237
435
  }
@@ -497,188 +695,6 @@ declare class MCPManager {
497
695
  private resolveApprovalDecision;
498
696
  private emitServerStateChanged;
499
697
  }
500
- declare const WEB_CONTEXT_TOOL_RESULT_SCHEMA: "xeno.web-context.tool-result.v1";
501
- interface WebContextEvidenceProjection {
502
- evidenceId: string;
503
- requestId: string;
504
- sourceUrl: string;
505
- finalUrl?: string;
506
- citations: Array<{
507
- url: string;
508
- title?: string;
509
- artifactId?: string;
510
- }>;
511
- }
512
- interface WebContextToolResult {
513
- schemaVersion: typeof WEB_CONTEXT_TOOL_RESULT_SCHEMA;
514
- operation: "search" | "fetch";
515
- requestId: string;
516
- evidence: WebContextEvidenceProjection;
517
- job?: {
518
- jobId: string;
519
- state: string;
520
- };
521
- artifact?: {
522
- artifactId: string;
523
- mediaType: string;
524
- bytes: number;
525
- };
526
- jobProgress?: WebJobProgress;
527
- }
528
- interface ToolDefinition {
529
- name: string;
530
- description: string;
531
- input_schema: {
532
- type: "object";
533
- properties: Record<string, unknown>;
534
- required?: string[];
535
- additionalProperties?: boolean | Record<string, unknown>;
536
- [keyword: string]: unknown;
537
- };
538
- }
539
- interface ImageUrlBlock {
540
- type: "image_url";
541
- image_url: {
542
- url: string;
543
- detail?: "auto" | "low" | "high";
544
- };
545
- }
546
- interface ResourceContentBlock {
547
- type: "resource";
548
- uri?: string;
549
- mimeType?: string;
550
- text?: string;
551
- data?: string;
552
- }
553
- type ToolAssistantContentBlock = TextBlock | ImageUrlBlock | ResourceContentBlock;
554
- declare const TOOL_OPERATION_TERMINAL_STATES: readonly [
555
- "completed",
556
- "failed",
557
- "timed_out",
558
- "cancelled",
559
- "outcome_unknown",
560
- "orphaned"
561
- ];
562
- type ToolOperationTerminalState = (typeof TOOL_OPERATION_TERMINAL_STATES)[number];
563
- type ToolOperationState = "registered" | "starting" | "running_foreground" | "running_background" | "waiting_for_input" | "stalled" | "verifying" | ToolOperationTerminalState;
564
- type ToolCompletionPolicy = "await" | "observe" | "detach";
565
- interface ExpectedOutputContract {
566
- path: string;
567
- kind?: "file" | "directory";
568
- nonEmpty?: boolean;
569
- }
570
- interface ToolEvidence {
571
- id: string;
572
- kind: "artifact" | "process" | "verification";
573
- status: "pending" | "verified" | "failed";
574
- path?: string;
575
- observedAt: string;
576
- operationId: string;
577
- detail?: Record<string, string | number | boolean | null>;
578
- }
579
- interface ToolOperationSnapshot {
580
- schemaVersion: 1;
581
- operationId: string;
582
- turnId: string;
583
- generation: number;
584
- toolCallId: string;
585
- toolName: string;
586
- ownerSessionId?: string;
587
- state: ToolOperationState;
588
- terminal: boolean;
589
- presentation: "foreground" | "background";
590
- completionPolicy: ToolCompletionPolicy;
591
- promotable: boolean;
592
- processId?: string;
593
- taskId?: string;
594
- displayName?: string;
595
- pid?: number;
596
- commandFingerprint?: string;
597
- outputPath?: string;
598
- startedAt: string;
599
- lastActivityAt: string;
600
- deadlineAt?: string;
601
- elapsedMs: number;
602
- idleMs: number;
603
- outputBytes: number;
604
- nextOffset: number;
605
- exitCode?: number | null;
606
- completionReason?: string;
607
- suggestedNextAction?: string;
608
- expectedOutputs?: ExpectedOutputContract[];
609
- evidence?: ToolEvidence[];
610
- }
611
- interface ToolProgressUpdate {
612
- activity?: "stdout" | "stderr" | "input" | "waiting_for_input" | "heartbeat" | "state";
613
- message?: string;
614
- bytes?: number;
615
- outputBytes?: number;
616
- nextOffset?: number;
617
- webContextProgress?: WebJobProgress;
618
- }
619
- interface ToolAuthorizationReceipt {
620
- turnId: string;
621
- toolCallId: string;
622
- toolName: string;
623
- iteration: number;
624
- policy: {
625
- allowed: true;
626
- reason: string;
627
- temporaryOverride: boolean;
628
- };
629
- permission: {
630
- allowed: true;
631
- reason: string;
632
- };
633
- elevation?: {
634
- network: boolean;
635
- directories: string[];
636
- justification: string;
637
- };
638
- }
639
- interface ToolResult {
640
- success: boolean;
641
- output: string;
642
- error?: string;
643
- errorCode?: string;
644
- errorDetails?: Record<string, unknown>;
645
- assistantContent?: ToolAssistantContentBlock[];
646
- assistantOnlyContent?: ToolAssistantContentBlock[];
647
- operation?: ToolOperationSnapshot;
648
- evidence?: ToolEvidence[];
649
- webContext?: WebContextToolResult;
650
- retryable?: boolean;
651
- }
652
- interface ToolExecutionContext {
653
- signal?: AbortSignal;
654
- operationId?: string;
655
- reportProgress?: (event: ToolProgressUpdate) => void;
656
- authorization?: ToolAuthorizationReceipt;
657
- ownerSessionId?: string;
658
- }
659
- interface ToolPolicyProjectionContext {
660
- ownerSessionId?: string;
661
- }
662
- type ToolExecutor = (input: Record<string, unknown>, context?: ToolExecutionContext) => Promise<ToolResult>;
663
- interface ToolPolicyProjection {
664
- observabilityInput: Record<string, unknown>;
665
- permissionInput: Record<string, unknown>;
666
- permissionPreview?: string;
667
- approvalKey?: string;
668
- riskLevel?: "low" | "medium" | "high";
669
- }
670
- interface RegisteredTool {
671
- definition: ToolDefinition;
672
- execute: ToolExecutor;
673
- readOnly?: boolean;
674
- projectPolicyInput?: (input: Record<string, unknown>, context?: ToolPolicyProjectionContext) => ToolPolicyProjection | {
675
- error: ToolResult;
676
- };
677
- }
678
- interface TextBlock {
679
- type: "text";
680
- text: string;
681
- }
682
698
  interface ToolRegistryOptions {
683
699
  validateInputs?: boolean;
684
700
  toolSchemaMode?: "all" | "demand";