@xenosystem/agent-sdk 0.9.24 → 0.9.26
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/artifacts/index.cjs +1 -1
- package/dist/artifacts/index.js +1 -1
- package/dist/automation/index.cjs +9 -9
- package/dist/automation/index.d.cts +69 -3
- package/dist/automation/index.d.ts +69 -3
- package/dist/automation/index.js +9 -9
- package/dist/automation/metafile-cjs.json +1 -1
- package/dist/automation/metafile-esm.json +1 -1
- package/dist/control-plane/index.cjs +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/coordination/index.cjs +2 -2
- package/dist/coordination/index.d.cts +15 -3
- package/dist/coordination/index.d.ts +15 -3
- package/dist/coordination/index.js +2 -2
- package/dist/coordination/metafile-cjs.json +1 -1
- package/dist/coordination/metafile-esm.json +1 -1
- package/dist/electron/index.cjs +157 -153
- package/dist/electron/index.d.cts +22 -3
- package/dist/electron/index.d.ts +22 -3
- package/dist/electron/index.js +157 -153
- package/dist/electron/metafile-cjs.json +1 -1
- package/dist/electron/metafile-esm.json +1 -1
- package/dist/governance/index.d.cts +2 -0
- package/dist/governance/index.d.ts +2 -0
- package/dist/hosted/index.cjs +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/hosted/metafile-cjs.json +1 -1
- package/dist/hosted/metafile-esm.json +1 -1
- package/dist/index.cjs +473 -343
- package/dist/index.d.cts +314 -31
- package/dist/index.d.ts +314 -31
- package/dist/index.js +473 -343
- package/dist/mcp/index.d.cts +3 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/index.cjs +10 -10
- package/dist/providers/index.d.cts +92 -17
- package/dist/providers/index.d.ts +92 -17
- package/dist/providers/index.js +10 -10
- package/dist/providers/metafile-cjs.json +1 -1
- package/dist/providers/metafile-esm.json +1 -1
- package/dist/session/index.cjs +1 -1
- package/dist/session/index.d.cts +2 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/session/index.js +1 -1
- package/dist/session/metafile-cjs.json +1 -1
- package/dist/session/metafile-esm.json +1 -1
- package/dist/skills/index.d.cts +3 -0
- package/dist/skills/index.d.ts +3 -0
- package/dist/ui/index.d.cts +2 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +10 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { WebJobProgress } from "@xenosystem/web-context-client/progress";
|
|
2
|
+
import { DatabaseSync } from "node:sqlite";
|
|
1
3
|
declare const XENO_ARTIFACT_SCHEMA_VERSION: 1;
|
|
2
4
|
type XenoJsonPrimitive = string | number | boolean | null;
|
|
3
5
|
type XenoJsonValue = XenoJsonPrimitive | XenoJsonObject | XenoJsonValue[];
|
|
@@ -532,6 +534,7 @@ interface WebContextToolResult {
|
|
|
532
534
|
mediaType: string;
|
|
533
535
|
bytes: number;
|
|
534
536
|
};
|
|
537
|
+
jobProgress?: WebJobProgress;
|
|
535
538
|
}
|
|
536
539
|
interface ToolDefinition {
|
|
537
540
|
name: string;
|
|
@@ -613,6 +616,7 @@ interface ToolProgressUpdate {
|
|
|
613
616
|
bytes?: number;
|
|
614
617
|
outputBytes?: number;
|
|
615
618
|
nextOffset?: number;
|
|
619
|
+
webContextProgress?: WebJobProgress;
|
|
616
620
|
}
|
|
617
621
|
interface ToolAuthorizationReceipt {
|
|
618
622
|
turnId: string;
|
|
@@ -971,6 +975,7 @@ interface XenoAutomationExecutionGrant {
|
|
|
971
975
|
capabilityUse: XenoCapabilityUse;
|
|
972
976
|
}
|
|
973
977
|
interface XenoAutomationAdapterExecutionResult {
|
|
978
|
+
operationId?: string;
|
|
974
979
|
status: "ok" | "denied" | "cancelled" | "error";
|
|
975
980
|
startedAt: string;
|
|
976
981
|
completedAt: string;
|
|
@@ -993,6 +998,7 @@ interface XenoAutomationLeaseAuthority {
|
|
|
993
998
|
consume(leaseId: string, expectedVersion: number, use: XenoCapabilityUse): Promise<XenoCapabilityLease> | XenoCapabilityLease;
|
|
994
999
|
}
|
|
995
1000
|
interface XenoAutomationExecutionResult {
|
|
1001
|
+
replayed?: boolean;
|
|
996
1002
|
operationId: string;
|
|
997
1003
|
status: "ok" | "denied" | "cancelled" | "error" | "evidence-incomplete";
|
|
998
1004
|
effect: XenoAutomationEffect;
|
|
@@ -1035,7 +1041,7 @@ interface XenoAutomationOperationDescriptor {
|
|
|
1035
1041
|
declare const XENO_AUTOMATION_OPERATIONS: readonly XenoAutomationOperation[];
|
|
1036
1042
|
declare function describeXenoAutomationOperation(operation: XenoAutomationOperation): XenoAutomationOperationDescriptor;
|
|
1037
1043
|
declare function isXenoAutomationOperation(value: string): value is XenoAutomationOperation;
|
|
1038
|
-
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";
|
|
1044
|
+
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" | "AUTOMATION_OUTCOME_PENDING";
|
|
1039
1045
|
declare class XenoAutomationError extends Error {
|
|
1040
1046
|
readonly code: XenoAutomationErrorCode;
|
|
1041
1047
|
readonly detail?: Record<string, string | number | boolean | null> | undefined;
|
|
@@ -1084,15 +1090,75 @@ interface MaterializeXenoAutomationEvidenceOptions {
|
|
|
1084
1090
|
declare function materializeXenoAutomationEvidence(options: MaterializeXenoAutomationEvidenceOptions): XenoArtifactEnvelope[];
|
|
1085
1091
|
declare function persistXenoAutomationEvidence(repository: XenoArtifactRepository | undefined, artifacts: readonly XenoArtifactEnvelope[]): Promise<XenoArtifactEnvelope[]>;
|
|
1086
1092
|
declare function assertRequiredXenoAutomationEvidence(evidence: readonly XenoAutomationEvidenceInput[], policy: XenoAutomationEvidencePolicy, phase: "before" | "after" | "recording"): void;
|
|
1093
|
+
interface XenoAutomationJournalIdentity {
|
|
1094
|
+
operationId: string;
|
|
1095
|
+
fingerprint: string;
|
|
1096
|
+
ownerToken: string;
|
|
1097
|
+
}
|
|
1098
|
+
interface XenoAutomationJournalRecord extends XenoAutomationJournalIdentity {
|
|
1099
|
+
schemaVersion: 1;
|
|
1100
|
+
outcome: {
|
|
1101
|
+
kind: "pending";
|
|
1102
|
+
} | {
|
|
1103
|
+
kind: "result";
|
|
1104
|
+
artifactId: string;
|
|
1105
|
+
sha256: string;
|
|
1106
|
+
} | {
|
|
1107
|
+
kind: "failed";
|
|
1108
|
+
code: string;
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
interface XenoAutomationExecutionJournal {
|
|
1112
|
+
get(operationId: string): Promise<XenoAutomationJournalRecord | undefined>;
|
|
1113
|
+
begin(identity: XenoAutomationJournalIdentity): Promise<{
|
|
1114
|
+
claimed: boolean;
|
|
1115
|
+
record: XenoAutomationJournalRecord;
|
|
1116
|
+
}>;
|
|
1117
|
+
finish(identity: XenoAutomationJournalIdentity, outcome: Exclude<XenoAutomationJournalRecord["outcome"], {
|
|
1118
|
+
kind: "pending";
|
|
1119
|
+
}>): Promise<void>;
|
|
1120
|
+
}
|
|
1121
|
+
declare function openSqliteAutomationExecutionJournal(path: string): Promise<SqliteAutomationExecutionJournal>;
|
|
1122
|
+
declare class SqliteAutomationExecutionJournal implements XenoAutomationExecutionJournal {
|
|
1123
|
+
private readonly database;
|
|
1124
|
+
private closed;
|
|
1125
|
+
constructor(database: DatabaseSync);
|
|
1126
|
+
begin(identity: XenoAutomationJournalIdentity): Promise<{
|
|
1127
|
+
claimed: boolean;
|
|
1128
|
+
record: XenoAutomationJournalRecord;
|
|
1129
|
+
}>;
|
|
1130
|
+
get(operationId: string): Promise<XenoAutomationJournalRecord | undefined>;
|
|
1131
|
+
finish(identity: XenoAutomationJournalIdentity, outcome: Exclude<XenoAutomationJournalRecord["outcome"], {
|
|
1132
|
+
kind: "pending";
|
|
1133
|
+
}>): Promise<void>;
|
|
1134
|
+
close(): void;
|
|
1135
|
+
private read;
|
|
1136
|
+
private transaction;
|
|
1137
|
+
}
|
|
1138
|
+
interface CapabilityMutationAck {
|
|
1139
|
+
lease: XenoCapabilityLease;
|
|
1140
|
+
replayed: boolean;
|
|
1141
|
+
executionDisposition: "dispatch-once" | "receipt-only";
|
|
1142
|
+
}
|
|
1143
|
+
interface XenoDurableAutomationOptions {
|
|
1144
|
+
journal: XenoAutomationExecutionJournal;
|
|
1145
|
+
artifactRepository: XenoArtifactRepository;
|
|
1146
|
+
assertCurrent(request: Readonly<XenoAutomationRequest>): Promise<void>;
|
|
1147
|
+
consume(commandId: string, leaseId: string, expectedVersion: number, use: XenoCapabilityUse): Promise<CapabilityMutationAck>;
|
|
1148
|
+
}
|
|
1149
|
+
declare function runDurableAutomation(options: XenoDurableAutomationOptions, request: XenoAutomationRequest, fingerprint: string, run: (consumeCommandId: string) => Promise<XenoAutomationExecutionResult>): Promise<XenoAutomationExecutionResult>;
|
|
1150
|
+
declare function pending(): XenoAutomationError;
|
|
1087
1151
|
interface XenoGovernedAutomationExecutorOptions {
|
|
1088
1152
|
adapter: XenoAutomationAdapter;
|
|
1089
|
-
leaseAuthority
|
|
1153
|
+
leaseAuthority?: XenoAutomationLeaseAuthority;
|
|
1154
|
+
durable?: XenoDurableAutomationOptions;
|
|
1090
1155
|
artifactRepository?: XenoArtifactRepository;
|
|
1091
1156
|
now?: () => string;
|
|
1092
1157
|
}
|
|
1093
1158
|
declare class XenoGovernedAutomationExecutor {
|
|
1094
1159
|
private readonly adapter;
|
|
1095
1160
|
private readonly leaseAuthority;
|
|
1161
|
+
private readonly durable;
|
|
1096
1162
|
private readonly artifactRepository?;
|
|
1097
1163
|
private readonly now;
|
|
1098
1164
|
private readonly executions;
|
|
@@ -1332,4 +1398,4 @@ type XenoHostAutomationEnvironment = CliAutomationEnvironment;
|
|
|
1332
1398
|
type XenoHostAutomationSurfaceStatus = CliAutomationSurfaceStatus;
|
|
1333
1399
|
type XenoHostAutomationStatusReport = CliAutomationStatusReport;
|
|
1334
1400
|
type CreateXenoHostGovernedAutomationRuntimeOptions = CreateCliGovernedAutomationRuntimeOptions;
|
|
1335
|
-
export { type CliAutomationAuditEvent, type CliAutomationAuditLoggerPort, type CliAutomationEnvironment, type CliAutomationStatusReport, type CliAutomationSurfaceStatus, CliGovernedAutomationRuntime, type CreateCliGovernedAutomationRuntimeOptions, type CreateXenoGovernedAutomationToolsOptions, type CreateXenoHostGovernedAutomationRuntimeOptions, type MaterializeXenoAutomationEvidenceOptions, XENO_AUTOMATION_OPERATIONS, XENO_AUTOMATION_PROTOCOL_VERSION, XENO_BROWSER_CONTROL_PLANE_OPERATIONS, 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, XenoBrowserControlPlaneAdapter, type XenoBrowserControlPlaneAdapterOptions, type XenoComputerAutomationOperation, XenoGovernedAutomationExecutor, type XenoGovernedAutomationExecutorOptions, type XenoGovernedAutomationToolExecution, type XenoGovernedAutomationToolRuntime, type XenoHostAutomationAuditEvent, type XenoHostAutomationAuditLoggerPort, type XenoHostAutomationEnvironment, type XenoHostAutomationStatusReport, type XenoHostAutomationSurfaceStatus, CliGovernedAutomationRuntime as XenoHostGovernedAutomationRuntime, XenoLoopbackAutomationAdapter, type XenoLoopbackAutomationAdapterOptions, assertRequiredXenoAutomationEvidence, assertValidXenoAutomationAdapterManifest, assertValidXenoAutomationRequest, assertXenoAutomationAdapterConformant, assertXenoAutomationAuthority, buildXenoAutomationCapabilityUse, createCliAutomationAuditSink, createCliGovernedAutomationRuntime, createXenoAutomationConformanceReport, createXenoGovernedAutomationTools, createCliAutomationAuditSink as createXenoHostAutomationAuditSink, createCliGovernedAutomationRuntime as createXenoHostGovernedAutomationRuntime, describeXenoAutomationOperation, inspectCliAutomationStatus, inspectCliAutomationStatus as inspectXenoHostAutomationStatus, isXenoAutomationOperation, materializeXenoAutomationEvidence, persistXenoAutomationEvidence, readCliAutomationEnvironment, readCliAutomationEnvironment as readXenoHostAutomationEnvironment, renderCliAutomationStatus, renderCliAutomationStatus as renderXenoHostAutomationStatus, resolveXenoAutomationEvidencePolicy };
|
|
1401
|
+
export { type CliAutomationAuditEvent, type CliAutomationAuditLoggerPort, type CliAutomationEnvironment, type CliAutomationStatusReport, type CliAutomationSurfaceStatus, CliGovernedAutomationRuntime, type CreateCliGovernedAutomationRuntimeOptions, type CreateXenoGovernedAutomationToolsOptions, type CreateXenoHostGovernedAutomationRuntimeOptions, type MaterializeXenoAutomationEvidenceOptions, SqliteAutomationExecutionJournal, XENO_AUTOMATION_OPERATIONS, XENO_AUTOMATION_PROTOCOL_VERSION, XENO_BROWSER_CONTROL_PLANE_OPERATIONS, 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 XenoAutomationExecutionJournal, type XenoAutomationExecutionResult, type XenoAutomationIdentity, type XenoAutomationJournalIdentity, type XenoAutomationJournalRecord, type XenoAutomationLeaseAuthority, type XenoAutomationOperation, type XenoAutomationOperationDescriptor, type XenoAutomationPreflight, type XenoAutomationRequest, type XenoAutomationSurface, type XenoAutomationTarget, type XenoBrowserAutomationOperation, XenoBrowserControlPlaneAdapter, type XenoBrowserControlPlaneAdapterOptions, type XenoComputerAutomationOperation, type XenoDurableAutomationOptions, XenoGovernedAutomationExecutor, type XenoGovernedAutomationExecutorOptions, type XenoGovernedAutomationToolExecution, type XenoGovernedAutomationToolRuntime, type XenoHostAutomationAuditEvent, type XenoHostAutomationAuditLoggerPort, type XenoHostAutomationEnvironment, type XenoHostAutomationStatusReport, type XenoHostAutomationSurfaceStatus, CliGovernedAutomationRuntime as XenoHostGovernedAutomationRuntime, XenoLoopbackAutomationAdapter, type XenoLoopbackAutomationAdapterOptions, assertRequiredXenoAutomationEvidence, assertValidXenoAutomationAdapterManifest, assertValidXenoAutomationRequest, assertXenoAutomationAdapterConformant, assertXenoAutomationAuthority, buildXenoAutomationCapabilityUse, createCliAutomationAuditSink, createCliGovernedAutomationRuntime, createXenoAutomationConformanceReport, createXenoGovernedAutomationTools, createCliAutomationAuditSink as createXenoHostAutomationAuditSink, createCliGovernedAutomationRuntime as createXenoHostGovernedAutomationRuntime, describeXenoAutomationOperation, inspectCliAutomationStatus, inspectCliAutomationStatus as inspectXenoHostAutomationStatus, isXenoAutomationOperation, materializeXenoAutomationEvidence, openSqliteAutomationExecutionJournal, pending, persistXenoAutomationEvidence, readCliAutomationEnvironment, readCliAutomationEnvironment as readXenoHostAutomationEnvironment, renderCliAutomationStatus, renderCliAutomationStatus as renderXenoHostAutomationStatus, resolveXenoAutomationEvidencePolicy, runDurableAutomation };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { WebJobProgress } from "@xenosystem/web-context-client/progress";
|
|
2
|
+
import { DatabaseSync } from "node:sqlite";
|
|
1
3
|
declare const XENO_ARTIFACT_SCHEMA_VERSION: 1;
|
|
2
4
|
type XenoJsonPrimitive = string | number | boolean | null;
|
|
3
5
|
type XenoJsonValue = XenoJsonPrimitive | XenoJsonObject | XenoJsonValue[];
|
|
@@ -532,6 +534,7 @@ interface WebContextToolResult {
|
|
|
532
534
|
mediaType: string;
|
|
533
535
|
bytes: number;
|
|
534
536
|
};
|
|
537
|
+
jobProgress?: WebJobProgress;
|
|
535
538
|
}
|
|
536
539
|
interface ToolDefinition {
|
|
537
540
|
name: string;
|
|
@@ -613,6 +616,7 @@ interface ToolProgressUpdate {
|
|
|
613
616
|
bytes?: number;
|
|
614
617
|
outputBytes?: number;
|
|
615
618
|
nextOffset?: number;
|
|
619
|
+
webContextProgress?: WebJobProgress;
|
|
616
620
|
}
|
|
617
621
|
interface ToolAuthorizationReceipt {
|
|
618
622
|
turnId: string;
|
|
@@ -971,6 +975,7 @@ interface XenoAutomationExecutionGrant {
|
|
|
971
975
|
capabilityUse: XenoCapabilityUse;
|
|
972
976
|
}
|
|
973
977
|
interface XenoAutomationAdapterExecutionResult {
|
|
978
|
+
operationId?: string;
|
|
974
979
|
status: "ok" | "denied" | "cancelled" | "error";
|
|
975
980
|
startedAt: string;
|
|
976
981
|
completedAt: string;
|
|
@@ -993,6 +998,7 @@ interface XenoAutomationLeaseAuthority {
|
|
|
993
998
|
consume(leaseId: string, expectedVersion: number, use: XenoCapabilityUse): Promise<XenoCapabilityLease> | XenoCapabilityLease;
|
|
994
999
|
}
|
|
995
1000
|
interface XenoAutomationExecutionResult {
|
|
1001
|
+
replayed?: boolean;
|
|
996
1002
|
operationId: string;
|
|
997
1003
|
status: "ok" | "denied" | "cancelled" | "error" | "evidence-incomplete";
|
|
998
1004
|
effect: XenoAutomationEffect;
|
|
@@ -1035,7 +1041,7 @@ interface XenoAutomationOperationDescriptor {
|
|
|
1035
1041
|
declare const XENO_AUTOMATION_OPERATIONS: readonly XenoAutomationOperation[];
|
|
1036
1042
|
declare function describeXenoAutomationOperation(operation: XenoAutomationOperation): XenoAutomationOperationDescriptor;
|
|
1037
1043
|
declare function isXenoAutomationOperation(value: string): value is XenoAutomationOperation;
|
|
1038
|
-
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";
|
|
1044
|
+
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" | "AUTOMATION_OUTCOME_PENDING";
|
|
1039
1045
|
declare class XenoAutomationError extends Error {
|
|
1040
1046
|
readonly code: XenoAutomationErrorCode;
|
|
1041
1047
|
readonly detail?: Record<string, string | number | boolean | null> | undefined;
|
|
@@ -1084,15 +1090,75 @@ interface MaterializeXenoAutomationEvidenceOptions {
|
|
|
1084
1090
|
declare function materializeXenoAutomationEvidence(options: MaterializeXenoAutomationEvidenceOptions): XenoArtifactEnvelope[];
|
|
1085
1091
|
declare function persistXenoAutomationEvidence(repository: XenoArtifactRepository | undefined, artifacts: readonly XenoArtifactEnvelope[]): Promise<XenoArtifactEnvelope[]>;
|
|
1086
1092
|
declare function assertRequiredXenoAutomationEvidence(evidence: readonly XenoAutomationEvidenceInput[], policy: XenoAutomationEvidencePolicy, phase: "before" | "after" | "recording"): void;
|
|
1093
|
+
interface XenoAutomationJournalIdentity {
|
|
1094
|
+
operationId: string;
|
|
1095
|
+
fingerprint: string;
|
|
1096
|
+
ownerToken: string;
|
|
1097
|
+
}
|
|
1098
|
+
interface XenoAutomationJournalRecord extends XenoAutomationJournalIdentity {
|
|
1099
|
+
schemaVersion: 1;
|
|
1100
|
+
outcome: {
|
|
1101
|
+
kind: "pending";
|
|
1102
|
+
} | {
|
|
1103
|
+
kind: "result";
|
|
1104
|
+
artifactId: string;
|
|
1105
|
+
sha256: string;
|
|
1106
|
+
} | {
|
|
1107
|
+
kind: "failed";
|
|
1108
|
+
code: string;
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
interface XenoAutomationExecutionJournal {
|
|
1112
|
+
get(operationId: string): Promise<XenoAutomationJournalRecord | undefined>;
|
|
1113
|
+
begin(identity: XenoAutomationJournalIdentity): Promise<{
|
|
1114
|
+
claimed: boolean;
|
|
1115
|
+
record: XenoAutomationJournalRecord;
|
|
1116
|
+
}>;
|
|
1117
|
+
finish(identity: XenoAutomationJournalIdentity, outcome: Exclude<XenoAutomationJournalRecord["outcome"], {
|
|
1118
|
+
kind: "pending";
|
|
1119
|
+
}>): Promise<void>;
|
|
1120
|
+
}
|
|
1121
|
+
declare function openSqliteAutomationExecutionJournal(path: string): Promise<SqliteAutomationExecutionJournal>;
|
|
1122
|
+
declare class SqliteAutomationExecutionJournal implements XenoAutomationExecutionJournal {
|
|
1123
|
+
private readonly database;
|
|
1124
|
+
private closed;
|
|
1125
|
+
constructor(database: DatabaseSync);
|
|
1126
|
+
begin(identity: XenoAutomationJournalIdentity): Promise<{
|
|
1127
|
+
claimed: boolean;
|
|
1128
|
+
record: XenoAutomationJournalRecord;
|
|
1129
|
+
}>;
|
|
1130
|
+
get(operationId: string): Promise<XenoAutomationJournalRecord | undefined>;
|
|
1131
|
+
finish(identity: XenoAutomationJournalIdentity, outcome: Exclude<XenoAutomationJournalRecord["outcome"], {
|
|
1132
|
+
kind: "pending";
|
|
1133
|
+
}>): Promise<void>;
|
|
1134
|
+
close(): void;
|
|
1135
|
+
private read;
|
|
1136
|
+
private transaction;
|
|
1137
|
+
}
|
|
1138
|
+
interface CapabilityMutationAck {
|
|
1139
|
+
lease: XenoCapabilityLease;
|
|
1140
|
+
replayed: boolean;
|
|
1141
|
+
executionDisposition: "dispatch-once" | "receipt-only";
|
|
1142
|
+
}
|
|
1143
|
+
interface XenoDurableAutomationOptions {
|
|
1144
|
+
journal: XenoAutomationExecutionJournal;
|
|
1145
|
+
artifactRepository: XenoArtifactRepository;
|
|
1146
|
+
assertCurrent(request: Readonly<XenoAutomationRequest>): Promise<void>;
|
|
1147
|
+
consume(commandId: string, leaseId: string, expectedVersion: number, use: XenoCapabilityUse): Promise<CapabilityMutationAck>;
|
|
1148
|
+
}
|
|
1149
|
+
declare function runDurableAutomation(options: XenoDurableAutomationOptions, request: XenoAutomationRequest, fingerprint: string, run: (consumeCommandId: string) => Promise<XenoAutomationExecutionResult>): Promise<XenoAutomationExecutionResult>;
|
|
1150
|
+
declare function pending(): XenoAutomationError;
|
|
1087
1151
|
interface XenoGovernedAutomationExecutorOptions {
|
|
1088
1152
|
adapter: XenoAutomationAdapter;
|
|
1089
|
-
leaseAuthority
|
|
1153
|
+
leaseAuthority?: XenoAutomationLeaseAuthority;
|
|
1154
|
+
durable?: XenoDurableAutomationOptions;
|
|
1090
1155
|
artifactRepository?: XenoArtifactRepository;
|
|
1091
1156
|
now?: () => string;
|
|
1092
1157
|
}
|
|
1093
1158
|
declare class XenoGovernedAutomationExecutor {
|
|
1094
1159
|
private readonly adapter;
|
|
1095
1160
|
private readonly leaseAuthority;
|
|
1161
|
+
private readonly durable;
|
|
1096
1162
|
private readonly artifactRepository?;
|
|
1097
1163
|
private readonly now;
|
|
1098
1164
|
private readonly executions;
|
|
@@ -1332,4 +1398,4 @@ type XenoHostAutomationEnvironment = CliAutomationEnvironment;
|
|
|
1332
1398
|
type XenoHostAutomationSurfaceStatus = CliAutomationSurfaceStatus;
|
|
1333
1399
|
type XenoHostAutomationStatusReport = CliAutomationStatusReport;
|
|
1334
1400
|
type CreateXenoHostGovernedAutomationRuntimeOptions = CreateCliGovernedAutomationRuntimeOptions;
|
|
1335
|
-
export { type CliAutomationAuditEvent, type CliAutomationAuditLoggerPort, type CliAutomationEnvironment, type CliAutomationStatusReport, type CliAutomationSurfaceStatus, CliGovernedAutomationRuntime, type CreateCliGovernedAutomationRuntimeOptions, type CreateXenoGovernedAutomationToolsOptions, type CreateXenoHostGovernedAutomationRuntimeOptions, type MaterializeXenoAutomationEvidenceOptions, XENO_AUTOMATION_OPERATIONS, XENO_AUTOMATION_PROTOCOL_VERSION, XENO_BROWSER_CONTROL_PLANE_OPERATIONS, 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, XenoBrowserControlPlaneAdapter, type XenoBrowserControlPlaneAdapterOptions, type XenoComputerAutomationOperation, XenoGovernedAutomationExecutor, type XenoGovernedAutomationExecutorOptions, type XenoGovernedAutomationToolExecution, type XenoGovernedAutomationToolRuntime, type XenoHostAutomationAuditEvent, type XenoHostAutomationAuditLoggerPort, type XenoHostAutomationEnvironment, type XenoHostAutomationStatusReport, type XenoHostAutomationSurfaceStatus, CliGovernedAutomationRuntime as XenoHostGovernedAutomationRuntime, XenoLoopbackAutomationAdapter, type XenoLoopbackAutomationAdapterOptions, assertRequiredXenoAutomationEvidence, assertValidXenoAutomationAdapterManifest, assertValidXenoAutomationRequest, assertXenoAutomationAdapterConformant, assertXenoAutomationAuthority, buildXenoAutomationCapabilityUse, createCliAutomationAuditSink, createCliGovernedAutomationRuntime, createXenoAutomationConformanceReport, createXenoGovernedAutomationTools, createCliAutomationAuditSink as createXenoHostAutomationAuditSink, createCliGovernedAutomationRuntime as createXenoHostGovernedAutomationRuntime, describeXenoAutomationOperation, inspectCliAutomationStatus, inspectCliAutomationStatus as inspectXenoHostAutomationStatus, isXenoAutomationOperation, materializeXenoAutomationEvidence, persistXenoAutomationEvidence, readCliAutomationEnvironment, readCliAutomationEnvironment as readXenoHostAutomationEnvironment, renderCliAutomationStatus, renderCliAutomationStatus as renderXenoHostAutomationStatus, resolveXenoAutomationEvidencePolicy };
|
|
1401
|
+
export { type CliAutomationAuditEvent, type CliAutomationAuditLoggerPort, type CliAutomationEnvironment, type CliAutomationStatusReport, type CliAutomationSurfaceStatus, CliGovernedAutomationRuntime, type CreateCliGovernedAutomationRuntimeOptions, type CreateXenoGovernedAutomationToolsOptions, type CreateXenoHostGovernedAutomationRuntimeOptions, type MaterializeXenoAutomationEvidenceOptions, SqliteAutomationExecutionJournal, XENO_AUTOMATION_OPERATIONS, XENO_AUTOMATION_PROTOCOL_VERSION, XENO_BROWSER_CONTROL_PLANE_OPERATIONS, 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 XenoAutomationExecutionJournal, type XenoAutomationExecutionResult, type XenoAutomationIdentity, type XenoAutomationJournalIdentity, type XenoAutomationJournalRecord, type XenoAutomationLeaseAuthority, type XenoAutomationOperation, type XenoAutomationOperationDescriptor, type XenoAutomationPreflight, type XenoAutomationRequest, type XenoAutomationSurface, type XenoAutomationTarget, type XenoBrowserAutomationOperation, XenoBrowserControlPlaneAdapter, type XenoBrowserControlPlaneAdapterOptions, type XenoComputerAutomationOperation, type XenoDurableAutomationOptions, XenoGovernedAutomationExecutor, type XenoGovernedAutomationExecutorOptions, type XenoGovernedAutomationToolExecution, type XenoGovernedAutomationToolRuntime, type XenoHostAutomationAuditEvent, type XenoHostAutomationAuditLoggerPort, type XenoHostAutomationEnvironment, type XenoHostAutomationStatusReport, type XenoHostAutomationSurfaceStatus, CliGovernedAutomationRuntime as XenoHostGovernedAutomationRuntime, XenoLoopbackAutomationAdapter, type XenoLoopbackAutomationAdapterOptions, assertRequiredXenoAutomationEvidence, assertValidXenoAutomationAdapterManifest, assertValidXenoAutomationRequest, assertXenoAutomationAdapterConformant, assertXenoAutomationAuthority, buildXenoAutomationCapabilityUse, createCliAutomationAuditSink, createCliGovernedAutomationRuntime, createXenoAutomationConformanceReport, createXenoGovernedAutomationTools, createCliAutomationAuditSink as createXenoHostAutomationAuditSink, createCliGovernedAutomationRuntime as createXenoHostGovernedAutomationRuntime, describeXenoAutomationOperation, inspectCliAutomationStatus, inspectCliAutomationStatus as inspectXenoHostAutomationStatus, isXenoAutomationOperation, materializeXenoAutomationEvidence, openSqliteAutomationExecutionJournal, pending, persistXenoAutomationEvidence, readCliAutomationEnvironment, readCliAutomationEnvironment as readXenoHostAutomationEnvironment, renderCliAutomationStatus, renderCliAutomationStatus as renderXenoHostAutomationStatus, resolveXenoAutomationEvidencePolicy, runDurableAutomation };
|