@xenosystem/agent-sdk 0.8.12

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 (175) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +511 -0
  3. package/dist/agents/index.cjs +17 -0
  4. package/dist/agents/index.d.cts +244 -0
  5. package/dist/agents/index.d.ts +244 -0
  6. package/dist/agents/index.js +17 -0
  7. package/dist/agents/metafile-cjs.json +1 -0
  8. package/dist/agents/metafile-esm.json +1 -0
  9. package/dist/artifacts/browser.cjs +1 -0
  10. package/dist/artifacts/browser.d.cts +8 -0
  11. package/dist/artifacts/browser.d.ts +8 -0
  12. package/dist/artifacts/browser.js +1 -0
  13. package/dist/artifacts/diff-artifact-C2tQZWcs.d.cts +354 -0
  14. package/dist/artifacts/diff-artifact-C2tQZWcs.d.ts +354 -0
  15. package/dist/artifacts/index.cjs +10 -0
  16. package/dist/artifacts/index.d.cts +588 -0
  17. package/dist/artifacts/index.d.ts +588 -0
  18. package/dist/artifacts/index.js +10 -0
  19. package/dist/artifacts/metafile-cjs.json +1 -0
  20. package/dist/artifacts/metafile-esm.json +1 -0
  21. package/dist/automation/index.cjs +438 -0
  22. package/dist/automation/index.d.cts +878 -0
  23. package/dist/automation/index.d.ts +878 -0
  24. package/dist/automation/index.js +438 -0
  25. package/dist/automation/metafile-cjs.json +1 -0
  26. package/dist/automation/metafile-esm.json +1 -0
  27. package/dist/control-plane/index.cjs +7 -0
  28. package/dist/control-plane/index.d.cts +403 -0
  29. package/dist/control-plane/index.d.ts +403 -0
  30. package/dist/control-plane/index.js +7 -0
  31. package/dist/control-plane/metafile-cjs.json +1 -0
  32. package/dist/control-plane/metafile-esm.json +1 -0
  33. package/dist/control-room/index.cjs +1 -0
  34. package/dist/control-room/index.d.cts +216 -0
  35. package/dist/control-room/index.d.ts +216 -0
  36. package/dist/control-room/index.js +1 -0
  37. package/dist/control-room/metafile-cjs.json +1 -0
  38. package/dist/control-room/metafile-esm.json +1 -0
  39. package/dist/electron/index.cjs +1476 -0
  40. package/dist/electron/index.d.cts +1583 -0
  41. package/dist/electron/index.d.ts +1583 -0
  42. package/dist/electron/index.js +1476 -0
  43. package/dist/electron/metafile-cjs.json +1 -0
  44. package/dist/electron/metafile-esm.json +1 -0
  45. package/dist/governance/index.cjs +33 -0
  46. package/dist/governance/index.d.cts +397 -0
  47. package/dist/governance/index.d.ts +397 -0
  48. package/dist/governance/index.js +33 -0
  49. package/dist/governance/metafile-cjs.json +1 -0
  50. package/dist/governance/metafile-esm.json +1 -0
  51. package/dist/hooks/index.cjs +9 -0
  52. package/dist/hooks/index.d.cts +198 -0
  53. package/dist/hooks/index.d.ts +198 -0
  54. package/dist/hooks/index.js +9 -0
  55. package/dist/hooks/metafile-cjs.json +1 -0
  56. package/dist/hooks/metafile-esm.json +1 -0
  57. package/dist/hosted/index.cjs +1 -0
  58. package/dist/hosted/index.d.cts +490 -0
  59. package/dist/hosted/index.d.ts +490 -0
  60. package/dist/hosted/index.js +1 -0
  61. package/dist/hosted/metafile-cjs.json +1 -0
  62. package/dist/hosted/metafile-esm.json +1 -0
  63. package/dist/index.cjs +2161 -0
  64. package/dist/index.d.cts +12259 -0
  65. package/dist/index.d.ts +12259 -0
  66. package/dist/index.js +2161 -0
  67. package/dist/intelligence/index.cjs +10 -0
  68. package/dist/intelligence/index.d.cts +220 -0
  69. package/dist/intelligence/index.d.ts +220 -0
  70. package/dist/intelligence/index.js +10 -0
  71. package/dist/intelligence/metafile-cjs.json +1 -0
  72. package/dist/intelligence/metafile-esm.json +1 -0
  73. package/dist/mcp/index.cjs +28 -0
  74. package/dist/mcp/index.d.cts +960 -0
  75. package/dist/mcp/index.d.ts +960 -0
  76. package/dist/mcp/index.js +28 -0
  77. package/dist/mcp/metafile-cjs.json +1 -0
  78. package/dist/mcp/metafile-esm.json +1 -0
  79. package/dist/metafile-cjs.json +1 -0
  80. package/dist/metafile-esm.json +1 -0
  81. package/dist/oracle/index.cjs +1 -0
  82. package/dist/oracle/index.d.cts +310 -0
  83. package/dist/oracle/index.d.ts +310 -0
  84. package/dist/oracle/index.js +1 -0
  85. package/dist/oracle/metafile-cjs.json +1 -0
  86. package/dist/oracle/metafile-esm.json +1 -0
  87. package/dist/providers/index.cjs +11 -0
  88. package/dist/providers/index.d.cts +462 -0
  89. package/dist/providers/index.d.ts +462 -0
  90. package/dist/providers/index.js +11 -0
  91. package/dist/providers/metafile-cjs.json +1 -0
  92. package/dist/providers/metafile-esm.json +1 -0
  93. package/dist/recipes/index.cjs +2 -0
  94. package/dist/recipes/index.d.cts +86 -0
  95. package/dist/recipes/index.d.ts +86 -0
  96. package/dist/recipes/index.js +2 -0
  97. package/dist/recipes/metafile-cjs.json +1 -0
  98. package/dist/recipes/metafile-esm.json +1 -0
  99. package/dist/research/index.cjs +3 -0
  100. package/dist/research/index.d.cts +285 -0
  101. package/dist/research/index.d.ts +285 -0
  102. package/dist/research/index.js +3 -0
  103. package/dist/research/metafile-cjs.json +1 -0
  104. package/dist/research/metafile-esm.json +1 -0
  105. package/dist/session/index.cjs +56 -0
  106. package/dist/session/index.d.cts +523 -0
  107. package/dist/session/index.d.ts +523 -0
  108. package/dist/session/index.js +56 -0
  109. package/dist/session/metafile-cjs.json +1 -0
  110. package/dist/session/metafile-esm.json +1 -0
  111. package/dist/sharing/index.cjs +4 -0
  112. package/dist/sharing/index.d.cts +272 -0
  113. package/dist/sharing/index.d.ts +272 -0
  114. package/dist/sharing/index.js +4 -0
  115. package/dist/sharing/metafile-cjs.json +1 -0
  116. package/dist/sharing/metafile-esm.json +1 -0
  117. package/dist/skills/index.cjs +6 -0
  118. package/dist/skills/index.d.cts +277 -0
  119. package/dist/skills/index.d.ts +277 -0
  120. package/dist/skills/index.js +6 -0
  121. package/dist/skills/metafile-cjs.json +1 -0
  122. package/dist/skills/metafile-esm.json +1 -0
  123. package/dist/soul/index.cjs +32 -0
  124. package/dist/soul/index.d.cts +138 -0
  125. package/dist/soul/index.d.ts +138 -0
  126. package/dist/soul/index.js +32 -0
  127. package/dist/soul/metafile-cjs.json +1 -0
  128. package/dist/soul/metafile-esm.json +1 -0
  129. package/dist/terminal/index.cjs +4 -0
  130. package/dist/terminal/index.d.cts +55 -0
  131. package/dist/terminal/index.d.ts +55 -0
  132. package/dist/terminal/index.js +4 -0
  133. package/dist/terminal/metafile-cjs.json +1 -0
  134. package/dist/terminal/metafile-esm.json +1 -0
  135. package/dist/ui/index.cjs +35 -0
  136. package/dist/ui/index.d.cts +298 -0
  137. package/dist/ui/index.d.ts +298 -0
  138. package/dist/ui/index.js +35 -0
  139. package/dist/ui/metafile-cjs.json +1 -0
  140. package/dist/ui/metafile-esm.json +1 -0
  141. package/dist/utils/index.cjs +23 -0
  142. package/dist/utils/index.d.cts +245 -0
  143. package/dist/utils/index.d.ts +245 -0
  144. package/dist/utils/index.js +23 -0
  145. package/dist/utils/metafile-cjs.json +1 -0
  146. package/dist/utils/metafile-esm.json +1 -0
  147. package/native/mxc/LICENSE.microsoft-mxc-sdk.md +21 -0
  148. package/native/mxc/README.md +25 -0
  149. package/native/mxc/bin/arm64/lxc-exec +0 -0
  150. package/native/mxc/bin/arm64/mxc-exec-mac +0 -0
  151. package/native/mxc/bin/arm64/wxc-exec.exe +0 -0
  152. package/native/mxc/bin/arm64/wxc-host-prep.exe +0 -0
  153. package/native/mxc/bin/x64/lxc-exec +0 -0
  154. package/native/mxc/bin/x64/wxc-exec.exe +0 -0
  155. package/native/mxc/bin/x64/wxc-host-prep.exe +0 -0
  156. package/native/mxc/package.json +58 -0
  157. package/ownership/CLEAN_ROOM_CONTRIBUTOR_GUIDE.md +63 -0
  158. package/ownership/audit.mjs +727 -0
  159. package/ownership/evidence/PROPRIETARY-COMMAND-1/implementation-record.md +77 -0
  160. package/ownership/evidence/PROPRIETARY-COMMAND-1/provenance-review.md +51 -0
  161. package/ownership/evidence/PROPRIETARY-MEDIA-1/implementation-record.md +131 -0
  162. package/ownership/evidence/PROPRIETARY-MEDIA-1/provenance-review.md +50 -0
  163. package/ownership/evidence/PROPRIETARY-PTY-1/implementation-record.md +86 -0
  164. package/ownership/evidence/PROPRIETARY-PTY-1/provenance-review.md +52 -0
  165. package/ownership/evidence/PROPRIETARY-RUNTIME-1/implementation-record.md +68 -0
  166. package/ownership/evidence/PROPRIETARY-RUNTIME-1/provenance-review.md +32 -0
  167. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/implementation-record.md +53 -0
  168. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/provenance-review.md +32 -0
  169. package/ownership/evidence/PROPRIETARY-UI-1/implementation-record.md +96 -0
  170. package/ownership/evidence/PROPRIETARY-UI-1/provenance-review.md +46 -0
  171. package/ownership/ownership-policy.json +232 -0
  172. package/ownership/ownership-policy.schema.json +192 -0
  173. package/ownership/templates/clean-room-implementation-record.md +70 -0
  174. package/ownership/templates/provenance-review.md +51 -0
  175. package/package.json +209 -0
@@ -0,0 +1,878 @@
1
+ declare const XENO_ARTIFACT_SCHEMA_VERSION: 1;
2
+ type XenoJsonPrimitive = string | number | boolean | null;
3
+ type XenoJsonValue = XenoJsonPrimitive | XenoJsonObject | XenoJsonValue[];
4
+ interface XenoJsonObject {
5
+ [key: string]: XenoJsonValue;
6
+ }
7
+ type XenoArtifactKind = "plan" | "requirements" | "design" | "task-graph" | "patch" | "diff" | "file" | "document" | "diagram" | "screenshot" | "recording" | "browser-snapshot" | "test-report" | "review-report" | "security-report" | "performance-report" | "release-report" | "sbom" | "provenance" | "attestation" | `custom:${string}`;
8
+ type XenoArtifactState = "draft" | "pending_review" | "approved" | "rejected" | "superseded" | "archived";
9
+ type XenoArtifactSensitivity = "public" | "internal" | "confidential" | "restricted";
10
+ interface XenoContentHash {
11
+ algorithm: "sha256" | `custom:${string}`;
12
+ value: string;
13
+ }
14
+ type XenoArtifactStorageReference = {
15
+ type: "inline";
16
+ text?: string;
17
+ base64?: string;
18
+ } | {
19
+ type: "file";
20
+ path: string;
21
+ } | {
22
+ type: "blob";
23
+ uri: string;
24
+ } | {
25
+ type: "git";
26
+ commit: string;
27
+ path: string;
28
+ repositoryId?: string;
29
+ } | {
30
+ type: "url";
31
+ url: string;
32
+ expiresAt?: string;
33
+ } | {
34
+ type: "external";
35
+ provider: string;
36
+ locator: string;
37
+ };
38
+ interface XenoArtifactContent {
39
+ hash: XenoContentHash;
40
+ sizeBytes: number;
41
+ storage: XenoArtifactStorageReference;
42
+ encoding?: "utf8" | "base64" | "binary" | `custom:${string}`;
43
+ redactedPreview?: string;
44
+ }
45
+ interface XenoArtifactIdentity {
46
+ runId?: string;
47
+ sessionId?: string;
48
+ turnId?: string;
49
+ taskId?: string;
50
+ agentId?: string;
51
+ workspaceId?: string;
52
+ repositoryId?: string;
53
+ }
54
+ type XenoArtifactActorKind = "agent" | "tool" | "user" | "system" | "integration";
55
+ interface XenoArtifactActor {
56
+ kind: XenoArtifactActorKind;
57
+ id: string;
58
+ displayName?: string;
59
+ profileFingerprint?: string;
60
+ }
61
+ interface XenoArtifactProvenance {
62
+ producer: XenoArtifactActor;
63
+ eventId?: string;
64
+ toolCallId?: string;
65
+ operationId?: string;
66
+ executionContractFingerprint?: string;
67
+ capabilityLeaseIds?: string[];
68
+ sourceArtifactIds?: string[];
69
+ attributes?: XenoJsonObject;
70
+ }
71
+ type XenoEvidenceNodeType = "requirement" | "design-decision" | "risk" | "task" | "agent" | "run" | "tool-call" | "edit" | "commit" | "test-case" | "test-run" | "finding" | "approval" | "artifact" | "release" | "claim" | `custom:${string}`;
72
+ type XenoEvidenceEdgeType = "decomposes" | "depends_on" | "implements" | "changes" | "tests" | "verifies" | "finds" | "fixes" | "reviews" | "approves" | "rejects" | "supersedes" | "derived_from" | "produced_by" | "supports_claim" | "contradicts_claim" | "released_as" | `custom:${string}`;
73
+ interface XenoEvidenceReference {
74
+ type: XenoEvidenceNodeType;
75
+ id: string;
76
+ revision?: number;
77
+ }
78
+ interface XenoArtifactRelationship {
79
+ relation: XenoEvidenceEdgeType;
80
+ target: XenoEvidenceReference;
81
+ description?: string;
82
+ attributes?: XenoJsonObject;
83
+ }
84
+ type XenoArtifactAnchor = {
85
+ kind: "file";
86
+ path: string;
87
+ repositoryId?: string;
88
+ commit?: string;
89
+ } | {
90
+ kind: "source-line";
91
+ path: string;
92
+ startLine: number;
93
+ endLine?: number;
94
+ repositoryId?: string;
95
+ commit?: string;
96
+ } | {
97
+ kind: "diff-hunk";
98
+ path: string;
99
+ hunkId: string;
100
+ artifactId?: string;
101
+ revision?: number;
102
+ } | {
103
+ kind: "symbol";
104
+ path: string;
105
+ symbol: string;
106
+ repositoryId?: string;
107
+ commit?: string;
108
+ } | {
109
+ kind: "dom-node";
110
+ pageId: string;
111
+ selector?: string;
112
+ accessibilityId?: string;
113
+ snapshotArtifactId?: string;
114
+ } | {
115
+ kind: "timeline";
116
+ startMs: number;
117
+ endMs?: number;
118
+ recordingArtifactId: string;
119
+ } | {
120
+ kind: "region";
121
+ x: number;
122
+ y: number;
123
+ width: number;
124
+ height: number;
125
+ mediaArtifactId: string;
126
+ } | {
127
+ kind: "artifact";
128
+ artifactId: string;
129
+ revision?: number;
130
+ } | {
131
+ kind: `custom:${string}`;
132
+ data: XenoJsonObject;
133
+ };
134
+ interface XenoArtifactRetention {
135
+ policyId?: string;
136
+ retainUntil?: string;
137
+ legalHold?: boolean;
138
+ }
139
+ interface XenoArtifactEnvelope {
140
+ schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION;
141
+ artifactId: string;
142
+ revision: number;
143
+ kind: XenoArtifactKind;
144
+ title: string;
145
+ description?: string;
146
+ state: XenoArtifactState;
147
+ createdAt: string;
148
+ updatedAt?: string;
149
+ mediaType: string;
150
+ sensitivity: XenoArtifactSensitivity;
151
+ identity?: XenoArtifactIdentity;
152
+ content: XenoArtifactContent;
153
+ provenance: XenoArtifactProvenance;
154
+ relationships?: XenoArtifactRelationship[];
155
+ anchors?: XenoArtifactAnchor[];
156
+ predecessorRevision?: number;
157
+ accessPolicyId?: string;
158
+ retention?: XenoArtifactRetention;
159
+ extensions?: Record<string, XenoJsonValue>;
160
+ }
161
+ interface XenoArtifactLifecycleEvent {
162
+ schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION;
163
+ eventId: string;
164
+ artifactId: string;
165
+ revision: number;
166
+ sequence: number;
167
+ recordedAt: string;
168
+ actor: XenoArtifactActor;
169
+ fromState: XenoArtifactState | null;
170
+ toState: XenoArtifactState;
171
+ reason?: string;
172
+ reviewEventId?: string;
173
+ }
174
+ type XenoArtifactReviewDecision = "approved" | "rejected" | "changes_requested";
175
+ interface XenoArtifactReviewEventBase {
176
+ schemaVersion: typeof XENO_ARTIFACT_SCHEMA_VERSION;
177
+ eventId: string;
178
+ artifactId: string;
179
+ artifactRevision: number;
180
+ artifactHash: XenoContentHash;
181
+ sequence: number;
182
+ recordedAt: string;
183
+ actor: XenoArtifactActor;
184
+ }
185
+ type XenoArtifactReviewEvent = (XenoArtifactReviewEventBase & {
186
+ type: "review-requested";
187
+ reviewerIds?: string[];
188
+ message?: string;
189
+ }) | (XenoArtifactReviewEventBase & {
190
+ type: "comment-added";
191
+ commentId: string;
192
+ body: string;
193
+ anchor?: XenoArtifactAnchor;
194
+ parentCommentId?: string;
195
+ }) | (XenoArtifactReviewEventBase & {
196
+ type: "comment-resolved" | "comment-reopened";
197
+ commentId: string;
198
+ reason?: string;
199
+ }) | (XenoArtifactReviewEventBase & {
200
+ type: "decision-recorded";
201
+ decision: XenoArtifactReviewDecision;
202
+ rationale?: string;
203
+ scope?: XenoArtifactAnchor;
204
+ }) | (XenoArtifactReviewEventBase & {
205
+ type: "review-withdrawn";
206
+ reason?: string;
207
+ });
208
+ type XenoArtifactReviewEventInput = Omit<Extract<XenoArtifactReviewEvent, {
209
+ type: "review-requested";
210
+ }>, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit<Extract<XenoArtifactReviewEvent, {
211
+ type: "comment-added";
212
+ }>, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit<Extract<XenoArtifactReviewEvent, {
213
+ type: "comment-resolved" | "comment-reopened";
214
+ }>, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit<Extract<XenoArtifactReviewEvent, {
215
+ type: "decision-recorded";
216
+ }>, "schemaVersion" | "eventId" | "sequence" | "recordedAt"> | Omit<Extract<XenoArtifactReviewEvent, {
217
+ type: "review-withdrawn";
218
+ }>, "schemaVersion" | "eventId" | "sequence" | "recordedAt">;
219
+ interface XenoArtifactReviewSummary {
220
+ status: "not_requested" | "pending" | "approved" | "rejected" | "changes_requested" | "withdrawn";
221
+ totalComments: number;
222
+ unresolvedComments: number;
223
+ latestDecision?: XenoArtifactReviewDecision;
224
+ latestDecisionEventId?: string;
225
+ scopedDecisionCount?: number;
226
+ lastReviewedAt?: string;
227
+ }
228
+ interface XenoArtifactRecord {
229
+ artifact: XenoArtifactEnvelope;
230
+ recordVersion: number;
231
+ etag: string;
232
+ lifecycleEvents: XenoArtifactLifecycleEvent[];
233
+ reviewEvents: XenoArtifactReviewEvent[];
234
+ reviewSummary: XenoArtifactReviewSummary;
235
+ }
236
+ interface XenoArtifactListQuery {
237
+ artifactIds?: string[];
238
+ kinds?: XenoArtifactKind[];
239
+ states?: XenoArtifactState[];
240
+ runId?: string;
241
+ sessionId?: string;
242
+ turnId?: string;
243
+ taskId?: string;
244
+ workspaceId?: string;
245
+ repositoryId?: string;
246
+ producerId?: string;
247
+ sensitivity?: XenoArtifactSensitivity[];
248
+ includeSuperseded?: boolean;
249
+ }
250
+ type AgentProfileExternalAction = "publish" | "deploy" | "push" | "send" | "purchase" | "sign" | "file-legal" | "change-infrastructure";
251
+ type AgentProfileActionDecision = "allow" | "ask" | "deny";
252
+ declare const XENO_CAPABILITY_LEASE_SCHEMA_VERSION: 1;
253
+ type XenoCapabilityKind = "filesystem-read" | "filesystem-write" | "process-execute" | "network-connect" | "secret-use" | "external-action" | "browser-read" | "browser-act" | "computer-observe" | "computer-act" | "tool-invoke" | `custom:${string}`;
254
+ type XenoCapabilityEffect = "read" | "write" | "execute" | "external";
255
+ type XenoCapabilityLeaseState = "requested" | "active" | "denied" | "revoked" | "expired" | "exhausted";
256
+ interface XenoCapabilitySubject {
257
+ runId: string;
258
+ agentId: string;
259
+ turnId?: string;
260
+ toolName?: string;
261
+ operationId?: string;
262
+ }
263
+ interface XenoCapabilityScope {
264
+ kind: XenoCapabilityKind;
265
+ effect: XenoCapabilityEffect;
266
+ operations: string[];
267
+ resources?: string[];
268
+ destinations?: string[];
269
+ secretIds?: string[];
270
+ externalAction?: AgentProfileExternalAction;
271
+ governingToolName?: string;
272
+ }
273
+ interface XenoCapabilityLeaseApprovalContext {
274
+ turnId?: string;
275
+ surface: "cli" | "hub" | "ide" | "api" | "hosted" | `custom:${string}`;
276
+ promptHash?: string;
277
+ messageId?: string;
278
+ }
279
+ interface XenoCapabilityLease {
280
+ schemaVersion: typeof XENO_CAPABILITY_LEASE_SCHEMA_VERSION;
281
+ leaseId: string;
282
+ version: number;
283
+ state: XenoCapabilityLeaseState;
284
+ subject: XenoCapabilitySubject;
285
+ scope: XenoCapabilityScope;
286
+ reason: string;
287
+ requestedAt: string;
288
+ requestExpiresAt: string;
289
+ durationMs: number;
290
+ activatedAt?: string;
291
+ expiresAt?: string;
292
+ expiredAt?: string;
293
+ deniedAt?: string;
294
+ revokedAt?: string;
295
+ exhaustedAt?: string;
296
+ maxUses: number;
297
+ useCount: number;
298
+ childInheritance: "none" | "explicit";
299
+ approvalRequirement: "principal" | "current-turn";
300
+ requestedBy: XenoArtifactActor;
301
+ approvedBy?: XenoArtifactActor;
302
+ deniedBy?: XenoArtifactActor;
303
+ revokedBy?: XenoArtifactActor;
304
+ approvalContext?: XenoCapabilityLeaseApprovalContext;
305
+ profileFingerprint: string;
306
+ policyFingerprints: string[];
307
+ auditEventIds?: string[];
308
+ evidenceArtifactIds?: string[];
309
+ }
310
+ interface XenoCapabilityUse {
311
+ subject: XenoCapabilitySubject;
312
+ kind: XenoCapabilityKind;
313
+ operation: string;
314
+ resource?: string;
315
+ destination?: string;
316
+ secretId?: string;
317
+ externalAction?: AgentProfileExternalAction;
318
+ }
319
+ interface ToolDefinition {
320
+ name: string;
321
+ description: string;
322
+ input_schema: {
323
+ type: "object";
324
+ properties: Record<string, unknown>;
325
+ required?: string[];
326
+ additionalProperties?: boolean | Record<string, unknown>;
327
+ [keyword: string]: unknown;
328
+ };
329
+ }
330
+ interface ImageUrlBlock {
331
+ type: "image_url";
332
+ image_url: {
333
+ url: string;
334
+ detail?: "auto" | "low" | "high";
335
+ };
336
+ }
337
+ interface ResourceContentBlock {
338
+ type: "resource";
339
+ uri?: string;
340
+ mimeType?: string;
341
+ text?: string;
342
+ data?: string;
343
+ }
344
+ type ToolAssistantContentBlock = TextBlock | ImageUrlBlock | ResourceContentBlock;
345
+ type ToolOperationState = "registered" | "starting" | "running_foreground" | "running_background" | "waiting_for_input" | "stalled" | "verifying" | "completed" | "failed" | "timed_out" | "cancelled" | "orphaned";
346
+ type ToolCompletionPolicy = "await" | "observe" | "detach";
347
+ interface ExpectedOutputContract {
348
+ path: string;
349
+ kind?: "file" | "directory";
350
+ nonEmpty?: boolean;
351
+ }
352
+ interface ToolEvidence {
353
+ id: string;
354
+ kind: "artifact" | "process" | "verification";
355
+ status: "pending" | "verified" | "failed";
356
+ path?: string;
357
+ observedAt: string;
358
+ operationId: string;
359
+ detail?: Record<string, string | number | boolean | null>;
360
+ }
361
+ interface ToolOperationSnapshot {
362
+ schemaVersion: 1;
363
+ operationId: string;
364
+ turnId: string;
365
+ generation: number;
366
+ toolCallId: string;
367
+ toolName: string;
368
+ ownerSessionId?: string;
369
+ state: ToolOperationState;
370
+ terminal: boolean;
371
+ presentation: "foreground" | "background";
372
+ completionPolicy: ToolCompletionPolicy;
373
+ promotable: boolean;
374
+ processId?: string;
375
+ taskId?: string;
376
+ pid?: number;
377
+ commandFingerprint?: string;
378
+ outputPath?: string;
379
+ startedAt: string;
380
+ lastActivityAt: string;
381
+ deadlineAt?: string;
382
+ elapsedMs: number;
383
+ idleMs: number;
384
+ outputBytes: number;
385
+ nextOffset: number;
386
+ exitCode?: number | null;
387
+ completionReason?: string;
388
+ suggestedNextAction?: string;
389
+ expectedOutputs?: ExpectedOutputContract[];
390
+ evidence?: ToolEvidence[];
391
+ }
392
+ interface ToolProgressUpdate {
393
+ activity?: "stdout" | "stderr" | "input" | "waiting_for_input" | "heartbeat" | "state";
394
+ message?: string;
395
+ bytes?: number;
396
+ outputBytes?: number;
397
+ nextOffset?: number;
398
+ }
399
+ interface ToolAuthorizationReceipt {
400
+ turnId: string;
401
+ toolCallId: string;
402
+ toolName: string;
403
+ iteration: number;
404
+ policy: {
405
+ allowed: true;
406
+ reason: string;
407
+ temporaryOverride: boolean;
408
+ };
409
+ permission: {
410
+ allowed: true;
411
+ reason: string;
412
+ };
413
+ }
414
+ interface ToolResult {
415
+ success: boolean;
416
+ output: string;
417
+ error?: string;
418
+ errorCode?: string;
419
+ errorDetails?: Record<string, unknown>;
420
+ assistantContent?: ToolAssistantContentBlock[];
421
+ assistantOnlyContent?: ToolAssistantContentBlock[];
422
+ operation?: ToolOperationSnapshot;
423
+ evidence?: ToolEvidence[];
424
+ retryable?: boolean;
425
+ }
426
+ interface ToolExecutionContext {
427
+ signal?: AbortSignal;
428
+ operationId?: string;
429
+ reportProgress?: (event: ToolProgressUpdate) => void;
430
+ authorization?: ToolAuthorizationReceipt;
431
+ }
432
+ type ToolExecutor = (input: Record<string, unknown>, context?: ToolExecutionContext) => Promise<ToolResult>;
433
+ interface ToolPolicyProjection {
434
+ observabilityInput: Record<string, unknown>;
435
+ permissionInput: Record<string, unknown>;
436
+ permissionPreview?: string;
437
+ approvalKey?: string;
438
+ riskLevel?: "low" | "medium" | "high";
439
+ }
440
+ interface RegisteredTool {
441
+ definition: ToolDefinition;
442
+ execute: ToolExecutor;
443
+ projectPolicyInput?: (input: Record<string, unknown>) => ToolPolicyProjection | {
444
+ error: ToolResult;
445
+ };
446
+ }
447
+ interface TextBlock {
448
+ type: "text";
449
+ text: string;
450
+ }
451
+ type ExecutionSecurityLevel = "policy-only" | "process-hardened" | "contained";
452
+ type ExecutionTrustMode = "trusted-workspace" | "untrusted";
453
+ interface ExecutionSecurityCapabilities {
454
+ policyEnforcement: boolean;
455
+ restrictedIdentity: boolean;
456
+ lowIntegrity: boolean;
457
+ processTreeControl: boolean;
458
+ filesystemIsolation: boolean;
459
+ networkIsolation: boolean;
460
+ inheritedHandleAllowlist: boolean;
461
+ environmentSanitization: boolean;
462
+ }
463
+ declare const XENO_SECURE_EXECUTION_CONTRACT_SCHEMA_VERSION: 1;
464
+ type XenoExecutionEnforcement = "none" | "policy" | "os";
465
+ interface XenoExecutionIdentity {
466
+ runId: string;
467
+ agentId: string;
468
+ sessionId?: string;
469
+ turnId?: string;
470
+ taskId?: string;
471
+ workspaceId?: string;
472
+ }
473
+ interface XenoFilesystemExecutionPolicy {
474
+ enforcement: XenoExecutionEnforcement;
475
+ readRoots: string[];
476
+ writeRoots: string[];
477
+ executeRoots: string[];
478
+ deniedRoots: string[];
479
+ }
480
+ interface XenoNetworkDestination {
481
+ scheme?: "http" | "https" | "ws" | "wss" | "tcp" | `custom:${string}`;
482
+ host: string;
483
+ port?: number;
484
+ }
485
+ interface XenoNetworkExecutionPolicy {
486
+ enforcement: XenoExecutionEnforcement;
487
+ default: "deny" | "allow";
488
+ allowDestinations: XenoNetworkDestination[];
489
+ denyDestinations: XenoNetworkDestination[];
490
+ dns: "disabled" | "system" | "proxy-only";
491
+ proxyUrl?: string;
492
+ downloads: "deny" | "prompt" | "allow";
493
+ acknowledgedUnrestricted: boolean;
494
+ }
495
+ interface XenoProcessExecutionPolicy {
496
+ processTreeControl: boolean;
497
+ cleanup: "kill-tree" | "best-effort";
498
+ inheritedHandleAllowlist: boolean;
499
+ maximumProcesses?: number;
500
+ maximumMemoryBytes?: number;
501
+ maximumCpuTimeMs?: number;
502
+ }
503
+ interface XenoEnvironmentExecutionPolicy {
504
+ inheritance: "none" | "allowlist";
505
+ allowedKeys: string[];
506
+ deniedKeys: string[];
507
+ }
508
+ interface XenoSecretProjection {
509
+ secretId: string;
510
+ target: "environment" | "file" | "stdin" | "broker";
511
+ targetName?: string;
512
+ }
513
+ interface XenoExternalActionExecutionPolicy {
514
+ default: AgentProfileActionDecision;
515
+ overrides: Partial<Record<AgentProfileExternalAction, AgentProfileActionDecision>>;
516
+ requireCurrentTurnApproval: AgentProfileExternalAction[];
517
+ requireCapabilityLease: true;
518
+ }
519
+ interface XenoBrowserExecutionPolicy {
520
+ mode: "none" | "read" | "act";
521
+ profile: "ephemeral" | "isolated-persistent";
522
+ allowedDomains: string[];
523
+ readAllowedDomains: string[];
524
+ actAllowedDomains: string[];
525
+ deniedDomains: string[];
526
+ allowedSchemes: Array<"http" | "https">;
527
+ allowedPorts: number[];
528
+ redirectPolicy: "deny" | "same-origin" | "policy";
529
+ allowLoopbackDevelopment: boolean;
530
+ downloads: "deny" | "prompt" | "allow";
531
+ uploads: "deny" | "prompt" | "allow";
532
+ recording: "disabled" | "bounded";
533
+ }
534
+ interface XenoComputerExecutionPolicy {
535
+ mode: "none" | "observe" | "act";
536
+ allowedApplications: string[];
537
+ sensitiveRegionRedaction: boolean;
538
+ humanStopRequired: boolean;
539
+ }
540
+ interface XenoExecutionAdapterIdentity {
541
+ id: string;
542
+ version: string;
543
+ platform: NodeJS.Platform | string;
544
+ architecture: string;
545
+ certified: boolean;
546
+ certificationArtifactId?: string;
547
+ capabilities: ExecutionSecurityCapabilities;
548
+ limitations: string[];
549
+ }
550
+ interface XenoSecureExecutionContract {
551
+ schemaVersion: typeof XENO_SECURE_EXECUTION_CONTRACT_SCHEMA_VERSION;
552
+ contractId: string;
553
+ fingerprint: string;
554
+ createdAt: string;
555
+ expiresAt?: string;
556
+ identity: XenoExecutionIdentity;
557
+ requestedLevel: ExecutionSecurityLevel;
558
+ effectiveLevel: ExecutionSecurityLevel;
559
+ trustMode: ExecutionTrustMode;
560
+ profile: {
561
+ id: string;
562
+ version: string;
563
+ fingerprint: string;
564
+ permissionProfile: string;
565
+ };
566
+ filesystem: XenoFilesystemExecutionPolicy;
567
+ network: XenoNetworkExecutionPolicy;
568
+ process: XenoProcessExecutionPolicy;
569
+ environment: XenoEnvironmentExecutionPolicy;
570
+ secrets: XenoSecretProjection[];
571
+ externalActions: XenoExternalActionExecutionPolicy;
572
+ browser: XenoBrowserExecutionPolicy;
573
+ computer: XenoComputerExecutionPolicy;
574
+ capabilityLeaseIds: string[];
575
+ adapter: XenoExecutionAdapterIdentity;
576
+ auditEventIds?: string[];
577
+ }
578
+ declare const XENO_AUTOMATION_PROTOCOL_VERSION: 1;
579
+ type XenoAutomationSurface = "browser" | "computer";
580
+ type XenoAutomationEffect = "observe" | "act";
581
+ type XenoBrowserAutomationOperation = "browser.navigate" | "browser.back" | "browser.forward" | "browser.reload" | "browser.wait" | "browser.snapshot" | "browser.screenshot" | "browser.locate" | "browser.click" | "browser.type" | "browser.key" | "browser.select" | "browser.scroll" | "browser.tabs.list" | "browser.tabs.open" | "browser.tabs.close" | "browser.console.read" | "browser.network.read" | "browser.storage.read" | "browser.page-errors.read" | "browser.upload" | "browser.download" | "browser.record.start" | "browser.record.stop";
582
+ type XenoComputerAutomationOperation = "computer.observe" | "computer.screenshot" | "computer.window-state" | "computer.point" | "computer.click" | "computer.double-click" | "computer.right-click" | "computer.drag" | "computer.type" | "computer.key" | "computer.scroll" | "computer.wait" | "computer.launch";
583
+ type XenoAutomationOperation = XenoBrowserAutomationOperation | XenoComputerAutomationOperation;
584
+ interface XenoAutomationIdentity {
585
+ runId: string;
586
+ agentId: string;
587
+ sessionId?: string;
588
+ turnId?: string;
589
+ taskId?: string;
590
+ workspaceId?: string;
591
+ }
592
+ interface XenoAutomationTarget {
593
+ url?: string;
594
+ origin?: string;
595
+ domain?: string;
596
+ port?: number;
597
+ tabId?: string;
598
+ pageId?: string;
599
+ deviceId?: string;
600
+ applicationId?: string;
601
+ displayId?: string;
602
+ resource?: string;
603
+ }
604
+ interface XenoAutomationEvidencePolicy {
605
+ before: "required" | "optional" | "disabled";
606
+ after: "required" | "optional" | "disabled";
607
+ recording: "required" | "optional" | "disabled";
608
+ sensitivity: XenoArtifactSensitivity;
609
+ retainUntil?: string;
610
+ legalHold?: boolean;
611
+ }
612
+ interface XenoAutomationRequest {
613
+ protocolVersion: typeof XENO_AUTOMATION_PROTOCOL_VERSION;
614
+ operationId: string;
615
+ idempotencyKey: string;
616
+ requestedAt: string;
617
+ identity: XenoAutomationIdentity;
618
+ governingToolName: string;
619
+ operation: XenoAutomationOperation;
620
+ parameters: XenoJsonObject;
621
+ declaredTarget?: XenoAutomationTarget;
622
+ executionContract: XenoSecureExecutionContract;
623
+ capabilityLeaseId: string;
624
+ expectedLeaseVersion: number;
625
+ evidencePolicy?: Partial<XenoAutomationEvidencePolicy>;
626
+ }
627
+ interface XenoAutomationAdapterManifest {
628
+ protocolVersion: typeof XENO_AUTOMATION_PROTOCOL_VERSION;
629
+ adapterId: string;
630
+ adapterVersion: string;
631
+ platform: string;
632
+ architecture: string;
633
+ operations: XenoAutomationOperation[];
634
+ targetBinding: "atomic-preflight";
635
+ profileIsolation: "none" | "ephemeral" | "isolated-persistent" | "both";
636
+ supports: {
637
+ accessibilitySnapshots: boolean;
638
+ screenshots: boolean;
639
+ recordings: boolean;
640
+ consoleInspection: boolean;
641
+ networkInspection: boolean;
642
+ storageInspection: boolean;
643
+ pageErrorInspection: boolean;
644
+ visibleCoControl: boolean;
645
+ deterministicHandback: boolean;
646
+ immediateStop: boolean;
647
+ sensitiveRegionRedaction: boolean;
648
+ };
649
+ policyEnforcement: {
650
+ domain: boolean;
651
+ scheme: boolean;
652
+ port: boolean;
653
+ redirect: boolean;
654
+ upload: boolean;
655
+ download: boolean;
656
+ };
657
+ certified: boolean;
658
+ certificationArtifactId?: string;
659
+ limitations: string[];
660
+ }
661
+ type XenoAutomationEvidencePhase = "before" | "action" | "after" | "recording" | "diagnostic";
662
+ type XenoAutomationEvidenceContent = {
663
+ type: "text";
664
+ text: string;
665
+ } | {
666
+ type: "base64";
667
+ base64: string;
668
+ } | {
669
+ type: "reference";
670
+ storage: Exclude<XenoArtifactStorageReference, {
671
+ type: "inline";
672
+ }>;
673
+ hash: XenoArtifactContent["hash"];
674
+ sizeBytes: number;
675
+ encoding?: XenoArtifactContent["encoding"];
676
+ };
677
+ interface XenoAutomationEvidenceInput {
678
+ evidenceId: string;
679
+ phase: XenoAutomationEvidencePhase;
680
+ kind: Extract<XenoArtifactKind, "screenshot" | "recording" | "browser-snapshot" | "security-report" | "attestation"> | `custom:${string}`;
681
+ title: string;
682
+ description?: string;
683
+ mediaType: string;
684
+ content: XenoAutomationEvidenceContent;
685
+ sensitivity?: XenoArtifactSensitivity;
686
+ redactedPreview?: string;
687
+ anchors?: XenoArtifactEnvelope["anchors"];
688
+ extensions?: Record<string, XenoJsonValue>;
689
+ }
690
+ interface XenoAutomationPreflight {
691
+ token: string;
692
+ preparedAt: string;
693
+ expiresAt: string;
694
+ observedTarget: XenoAutomationTarget;
695
+ evidence?: XenoAutomationEvidenceInput[];
696
+ adapterState?: XenoJsonObject;
697
+ }
698
+ interface XenoAutomationExecutionGrant {
699
+ contractFingerprint: string;
700
+ lease: XenoCapabilityLease;
701
+ capabilityUse: XenoCapabilityUse;
702
+ }
703
+ interface XenoAutomationAdapterExecutionResult {
704
+ status: "ok" | "denied" | "cancelled" | "error";
705
+ startedAt: string;
706
+ completedAt: string;
707
+ observedTarget: XenoAutomationTarget;
708
+ data?: XenoJsonValue;
709
+ evidence?: XenoAutomationEvidenceInput[];
710
+ error?: {
711
+ code: string;
712
+ message: string;
713
+ retryable?: boolean;
714
+ };
715
+ }
716
+ interface XenoAutomationAdapter {
717
+ manifest(): Promise<XenoAutomationAdapterManifest> | XenoAutomationAdapterManifest;
718
+ preflight(request: XenoAutomationRequest, signal: AbortSignal): Promise<XenoAutomationPreflight>;
719
+ execute(request: XenoAutomationRequest, preflight: XenoAutomationPreflight, grant: XenoAutomationExecutionGrant, signal: AbortSignal): Promise<XenoAutomationAdapterExecutionResult>;
720
+ stop?(operationId: string, reason: string): Promise<void>;
721
+ }
722
+ interface XenoAutomationLeaseAuthority {
723
+ consume(leaseId: string, expectedVersion: number, use: XenoCapabilityUse): Promise<XenoCapabilityLease> | XenoCapabilityLease;
724
+ }
725
+ interface XenoAutomationExecutionResult {
726
+ operationId: string;
727
+ status: "ok" | "denied" | "cancelled" | "error" | "evidence-incomplete";
728
+ effect: XenoAutomationEffect;
729
+ startedAt: string;
730
+ completedAt: string;
731
+ adapter: Pick<XenoAutomationAdapterManifest, "adapterId" | "adapterVersion" | "platform" | "architecture">;
732
+ target: XenoAutomationTarget;
733
+ data?: XenoJsonValue;
734
+ artifacts: XenoArtifactEnvelope[];
735
+ lease: {
736
+ leaseId: string;
737
+ version: number;
738
+ state: XenoCapabilityLease["state"];
739
+ useCount: number;
740
+ };
741
+ error?: {
742
+ code: string;
743
+ message: string;
744
+ retryable?: boolean;
745
+ };
746
+ }
747
+ interface XenoAutomationConformanceCheck {
748
+ id: string;
749
+ status: "pass" | "fail";
750
+ message: string;
751
+ }
752
+ interface XenoAutomationConformanceReport {
753
+ protocolVersion: typeof XENO_AUTOMATION_PROTOCOL_VERSION;
754
+ adapter: Pick<XenoAutomationAdapterManifest, "adapterId" | "adapterVersion" | "platform" | "architecture">;
755
+ generatedAt: string;
756
+ passed: boolean;
757
+ checks: XenoAutomationConformanceCheck[];
758
+ }
759
+ interface XenoAutomationOperationDescriptor {
760
+ operation: XenoAutomationOperation;
761
+ surface: XenoAutomationSurface;
762
+ effect: XenoAutomationEffect;
763
+ evidence: Pick<XenoAutomationEvidencePolicy, "before" | "after" | "recording">;
764
+ }
765
+ declare const XENO_AUTOMATION_OPERATIONS: readonly XenoAutomationOperation[];
766
+ declare function describeXenoAutomationOperation(operation: XenoAutomationOperation): XenoAutomationOperationDescriptor;
767
+ declare function isXenoAutomationOperation(value: string): value is XenoAutomationOperation;
768
+ type XenoAutomationErrorCode = "AUTOMATION_REQUEST_INVALID" | "AUTOMATION_CONTRACT_INVALID" | "AUTOMATION_CONTRACT_EXPIRED" | "AUTOMATION_IDENTITY_MISMATCH" | "AUTOMATION_OPERATION_UNSUPPORTED" | "AUTOMATION_POLICY_DENIED" | "AUTOMATION_TARGET_CHANGED" | "AUTOMATION_PREFLIGHT_INVALID" | "AUTOMATION_EVIDENCE_REQUIRED" | "AUTOMATION_EVIDENCE_INVALID" | "AUTOMATION_EVIDENCE_PERSISTENCE_FAILED" | "AUTOMATION_CANCELLED" | "AUTOMATION_TRANSPORT_ERROR" | "AUTOMATION_RESPONSE_INVALID" | "AUTOMATION_OPERATION_CONFLICT";
769
+ declare class XenoAutomationError extends Error {
770
+ readonly code: XenoAutomationErrorCode;
771
+ readonly detail?: Record<string, string | number | boolean | null> | undefined;
772
+ constructor(code: XenoAutomationErrorCode, message: string, detail?: Record<string, string | number | boolean | null> | undefined, options?: ErrorOptions);
773
+ }
774
+ declare function assertValidXenoAutomationRequest(request: XenoAutomationRequest): void;
775
+ declare function assertValidXenoAutomationAdapterManifest(manifest: XenoAutomationAdapterManifest): void;
776
+ declare function assertXenoAutomationAuthority(request: XenoAutomationRequest, manifest: XenoAutomationAdapterManifest, observedTarget: XenoAutomationTarget): void;
777
+ declare function buildXenoAutomationCapabilityUse(request: XenoAutomationRequest, target: XenoAutomationTarget): XenoCapabilityUse;
778
+ declare function resolveXenoAutomationEvidencePolicy(request: XenoAutomationRequest): XenoAutomationEvidencePolicy;
779
+ interface XenoArtifactMutationOptions {
780
+ expectedRecordVersion?: number;
781
+ }
782
+ interface XenoArtifactRevisionOptions extends XenoArtifactMutationOptions {
783
+ actor?: XenoArtifactActor;
784
+ reason?: string;
785
+ }
786
+ interface XenoArtifactTransitionRequest extends XenoArtifactMutationOptions {
787
+ artifactId: string;
788
+ revision?: number;
789
+ toState: XenoArtifactState;
790
+ actor: XenoArtifactActor;
791
+ reason?: string;
792
+ reviewEventId?: string;
793
+ }
794
+ interface XenoArtifactAppendReviewRequest extends XenoArtifactMutationOptions {
795
+ event: XenoArtifactReviewEventInput;
796
+ }
797
+ interface XenoArtifactRepository {
798
+ create(artifact: XenoArtifactEnvelope): Promise<XenoArtifactRecord>;
799
+ createRevision(artifact: XenoArtifactEnvelope, options?: XenoArtifactRevisionOptions): Promise<XenoArtifactRecord>;
800
+ get(artifactId: string, revision?: number): Promise<XenoArtifactRecord | undefined>;
801
+ require(artifactId: string, revision?: number): Promise<XenoArtifactRecord>;
802
+ list(query?: XenoArtifactListQuery): Promise<XenoArtifactRecord[]>;
803
+ listRevisions(artifactId: string): Promise<XenoArtifactRecord[]>;
804
+ transition(request: XenoArtifactTransitionRequest): Promise<XenoArtifactRecord>;
805
+ appendReviewEvent(request: XenoArtifactAppendReviewRequest): Promise<XenoArtifactRecord>;
806
+ }
807
+ interface MaterializeXenoAutomationEvidenceOptions {
808
+ request: XenoAutomationRequest;
809
+ manifest: XenoAutomationAdapterManifest;
810
+ policy: XenoAutomationEvidencePolicy;
811
+ evidence: readonly XenoAutomationEvidenceInput[];
812
+ now?: () => string;
813
+ }
814
+ declare function materializeXenoAutomationEvidence(options: MaterializeXenoAutomationEvidenceOptions): XenoArtifactEnvelope[];
815
+ declare function persistXenoAutomationEvidence(repository: XenoArtifactRepository | undefined, artifacts: readonly XenoArtifactEnvelope[]): Promise<XenoArtifactEnvelope[]>;
816
+ declare function assertRequiredXenoAutomationEvidence(evidence: readonly XenoAutomationEvidenceInput[], policy: XenoAutomationEvidencePolicy, phase: "before" | "after" | "recording"): void;
817
+ interface XenoGovernedAutomationExecutorOptions {
818
+ adapter: XenoAutomationAdapter;
819
+ leaseAuthority: XenoAutomationLeaseAuthority;
820
+ artifactRepository?: XenoArtifactRepository;
821
+ now?: () => string;
822
+ }
823
+ declare class XenoGovernedAutomationExecutor {
824
+ private readonly adapter;
825
+ private readonly leaseAuthority;
826
+ private readonly artifactRepository?;
827
+ private readonly now;
828
+ private readonly executions;
829
+ private readonly active;
830
+ constructor(options: XenoGovernedAutomationExecutorOptions);
831
+ execute(request: XenoAutomationRequest, signal?: AbortSignal): Promise<XenoAutomationExecutionResult>;
832
+ stop(operationId: string, reason?: string): Promise<boolean>;
833
+ private executeFresh;
834
+ private trimIdempotencyRecords;
835
+ }
836
+ declare function createXenoAutomationConformanceReport(manifest: XenoAutomationAdapterManifest, now?: () => string): XenoAutomationConformanceReport;
837
+ declare function assertXenoAutomationAdapterConformant(manifest: XenoAutomationAdapterManifest): void;
838
+ interface XenoLoopbackAutomationAdapterOptions {
839
+ baseUrl: string;
840
+ token: string;
841
+ timeoutMs?: number;
842
+ maxResponseBytes?: number;
843
+ fetch?: typeof globalThis.fetch;
844
+ }
845
+ declare class XenoLoopbackAutomationAdapter implements XenoAutomationAdapter {
846
+ private readonly endpoint;
847
+ private readonly token;
848
+ private readonly timeoutMs;
849
+ private readonly maxResponseBytes;
850
+ private readonly fetchImpl;
851
+ constructor(options: XenoLoopbackAutomationAdapterOptions);
852
+ manifest(): Promise<XenoAutomationAdapterManifest>;
853
+ preflight(request: XenoAutomationRequest, signal: AbortSignal): Promise<XenoAutomationPreflight>;
854
+ execute(request: XenoAutomationRequest, preflight: XenoAutomationPreflight, grant: XenoAutomationExecutionGrant, signal: AbortSignal): Promise<XenoAutomationAdapterExecutionResult>;
855
+ stop(operationId: string, reason: string): Promise<void>;
856
+ private request;
857
+ }
858
+ interface XenoGovernedAutomationToolExecution {
859
+ operation: XenoAutomationOperation;
860
+ governingToolName: string;
861
+ operationId: string;
862
+ idempotencyKey: string;
863
+ parameters: Record<string, unknown>;
864
+ declaredTarget?: XenoAutomationTarget;
865
+ authorization: ToolAuthorizationReceipt;
866
+ signal?: AbortSignal;
867
+ reportProgress?: ToolExecutionContext["reportProgress"];
868
+ }
869
+ interface XenoGovernedAutomationToolRuntime {
870
+ execute(input: XenoGovernedAutomationToolExecution): Promise<XenoAutomationExecutionResult>;
871
+ stop?(operationId: string, reason?: string): Promise<boolean> | boolean;
872
+ }
873
+ interface CreateXenoGovernedAutomationToolsOptions {
874
+ runtime: XenoGovernedAutomationToolRuntime;
875
+ operations?: readonly XenoAutomationOperation[];
876
+ }
877
+ declare function createXenoGovernedAutomationTools(options: CreateXenoGovernedAutomationToolsOptions): RegisteredTool[];
878
+ export { type CreateXenoGovernedAutomationToolsOptions, type MaterializeXenoAutomationEvidenceOptions, XENO_AUTOMATION_OPERATIONS, XENO_AUTOMATION_PROTOCOL_VERSION, type XenoAutomationAdapter, type XenoAutomationAdapterExecutionResult, type XenoAutomationAdapterManifest, type XenoAutomationConformanceCheck, type XenoAutomationConformanceReport, type XenoAutomationEffect, XenoAutomationError, type XenoAutomationErrorCode, type XenoAutomationEvidenceContent, type XenoAutomationEvidenceInput, type XenoAutomationEvidencePhase, type XenoAutomationEvidencePolicy, type XenoAutomationExecutionGrant, type XenoAutomationExecutionResult, type XenoAutomationIdentity, type XenoAutomationLeaseAuthority, type XenoAutomationOperation, type XenoAutomationOperationDescriptor, type XenoAutomationPreflight, type XenoAutomationRequest, type XenoAutomationSurface, type XenoAutomationTarget, type XenoBrowserAutomationOperation, type XenoComputerAutomationOperation, XenoGovernedAutomationExecutor, type XenoGovernedAutomationExecutorOptions, type XenoGovernedAutomationToolExecution, type XenoGovernedAutomationToolRuntime, XenoLoopbackAutomationAdapter, type XenoLoopbackAutomationAdapterOptions, assertRequiredXenoAutomationEvidence, assertValidXenoAutomationAdapterManifest, assertValidXenoAutomationRequest, assertXenoAutomationAdapterConformant, assertXenoAutomationAuthority, buildXenoAutomationCapabilityUse, createXenoAutomationConformanceReport, createXenoGovernedAutomationTools, describeXenoAutomationOperation, isXenoAutomationOperation, materializeXenoAutomationEvidence, persistXenoAutomationEvidence, resolveXenoAutomationEvidencePolicy };