@smartergpt/lexrunner 1.4.1 → 1.5.2
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/CHANGELOG.md +113 -0
- package/README.md +4 -2
- package/dist/{autopilot-EBZ44LYS.js → autopilot-62Y2M2ZO.js} +1 -1
- package/dist/{chunk-4R52WTFO.js → chunk-TIMHM7VL.js} +385 -79
- package/dist/cli.cjs +15363 -2535
- package/dist/cli.d.ts +1279 -10
- package/dist/cli.js +14585 -2113
- package/dist/errors/index.cjs +4 -0
- package/dist/frames/index.cjs +20 -3
- package/package.json +2 -2
- package/schemas/gate-execution-receipt.schema.json +161 -0
package/dist/cli.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { AXErrorException } from '@smartergpt/lex/errors';
|
|
4
4
|
import { F as FrameOutcome, a as FrameEmitResult } from './types-CYMIAhy8.js';
|
|
5
5
|
export { m as mcpToolError } from './adapters-r7_TjMwo.js';
|
|
6
|
+
import { Database } from 'better-sqlite3-multiple-ciphers';
|
|
6
7
|
import { Octokit } from '@octokit/rest';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -25,6 +26,7 @@ declare const GateResult: z.ZodObject<{
|
|
|
25
26
|
nonzero_exit: "nonzero_exit";
|
|
26
27
|
spawn_error: "spawn_error";
|
|
27
28
|
timeout: "timeout";
|
|
29
|
+
evidence_error: "evidence_error";
|
|
28
30
|
}>>;
|
|
29
31
|
timeoutCleanup: z.ZodOptional<z.ZodObject<{
|
|
30
32
|
method: z.ZodEnum<{
|
|
@@ -69,6 +71,7 @@ declare const NodeResult: z.ZodObject<{
|
|
|
69
71
|
nonzero_exit: "nonzero_exit";
|
|
70
72
|
spawn_error: "spawn_error";
|
|
71
73
|
timeout: "timeout";
|
|
74
|
+
evidence_error: "evidence_error";
|
|
72
75
|
}>>;
|
|
73
76
|
timeoutCleanup: z.ZodOptional<z.ZodObject<{
|
|
74
77
|
method: z.ZodEnum<{
|
|
@@ -1904,6 +1907,97 @@ interface ControllerLeaseCredential {
|
|
|
1904
1907
|
leaseId: string;
|
|
1905
1908
|
fencingToken: number;
|
|
1906
1909
|
}
|
|
1910
|
+
interface RunCoordinationRecord {
|
|
1911
|
+
runId: string;
|
|
1912
|
+
revision: number;
|
|
1913
|
+
state: JsonValue;
|
|
1914
|
+
updatedAt: string;
|
|
1915
|
+
lease: ControllerLease | null;
|
|
1916
|
+
}
|
|
1917
|
+
interface AcquireControllerLeaseInput {
|
|
1918
|
+
runId: string;
|
|
1919
|
+
controllerId: string;
|
|
1920
|
+
/** Caller-generated ID, making an uncertain acquisition retry idempotent. */
|
|
1921
|
+
leaseId: string;
|
|
1922
|
+
/** Explicit clock input keeps lease behavior deterministic in tests/replay. */
|
|
1923
|
+
now: string;
|
|
1924
|
+
ttlMs: number;
|
|
1925
|
+
/** Used only when this is the first coordination record for the run. */
|
|
1926
|
+
initialState: JsonValue;
|
|
1927
|
+
}
|
|
1928
|
+
interface RenewControllerLeaseInput extends ControllerLeaseCredential {
|
|
1929
|
+
now: string;
|
|
1930
|
+
ttlMs: number;
|
|
1931
|
+
}
|
|
1932
|
+
type ReleaseControllerLeaseInput = ControllerLeaseCredential;
|
|
1933
|
+
interface CompareAndSetRunStateInput extends ControllerLeaseCredential {
|
|
1934
|
+
expectedRevision: number;
|
|
1935
|
+
/** Stable caller-generated key for uncertain mutation retries. */
|
|
1936
|
+
mutationId: string;
|
|
1937
|
+
state: JsonValue;
|
|
1938
|
+
event: RunCoordinationEventInput;
|
|
1939
|
+
now: string;
|
|
1940
|
+
}
|
|
1941
|
+
interface RunCoordinationEventInput {
|
|
1942
|
+
type: string;
|
|
1943
|
+
payload: JsonValue;
|
|
1944
|
+
}
|
|
1945
|
+
/** Authoritative event committed atomically with its resulting run revision. */
|
|
1946
|
+
interface RunCoordinationEvent extends RunCoordinationEventInput {
|
|
1947
|
+
runId: string;
|
|
1948
|
+
mutationId: string;
|
|
1949
|
+
revision: number;
|
|
1950
|
+
expectedRevision: number;
|
|
1951
|
+
controllerId: string;
|
|
1952
|
+
leaseId: string;
|
|
1953
|
+
fencingToken: number;
|
|
1954
|
+
createdAt: string;
|
|
1955
|
+
/** Exact state committed by this mutation, retained for faithful replay. */
|
|
1956
|
+
resultingState: JsonValue;
|
|
1957
|
+
}
|
|
1958
|
+
type LeaseFailureReason = "held_by_other" | "not_found" | "no_active_lease" | "lease_mismatch" | "stale_fence" | "lease_expired";
|
|
1959
|
+
type AcquireControllerLeaseResult = {
|
|
1960
|
+
acquired: true;
|
|
1961
|
+
lease: ControllerLease;
|
|
1962
|
+
record: RunCoordinationRecord;
|
|
1963
|
+
} | {
|
|
1964
|
+
acquired: false;
|
|
1965
|
+
reason: "held_by_other";
|
|
1966
|
+
currentLease: ControllerLease;
|
|
1967
|
+
};
|
|
1968
|
+
type RenewControllerLeaseResult = {
|
|
1969
|
+
renewed: true;
|
|
1970
|
+
lease: ControllerLease;
|
|
1971
|
+
} | {
|
|
1972
|
+
renewed: false;
|
|
1973
|
+
reason: Exclude<LeaseFailureReason, "held_by_other">;
|
|
1974
|
+
};
|
|
1975
|
+
type ReleaseControllerLeaseResult = {
|
|
1976
|
+
released: true;
|
|
1977
|
+
} | {
|
|
1978
|
+
released: false;
|
|
1979
|
+
reason: Exclude<LeaseFailureReason, "held_by_other" | "lease_expired">;
|
|
1980
|
+
};
|
|
1981
|
+
type CompareAndSetRunStateResult = {
|
|
1982
|
+
updated: true;
|
|
1983
|
+
record: RunCoordinationRecord;
|
|
1984
|
+
event: RunCoordinationEvent;
|
|
1985
|
+
idempotentReplay: boolean;
|
|
1986
|
+
} | {
|
|
1987
|
+
updated: false;
|
|
1988
|
+
reason: Exclude<LeaseFailureReason, "held_by_other"> | "stale_revision" | "mutation_conflict";
|
|
1989
|
+
currentRevision?: number;
|
|
1990
|
+
};
|
|
1991
|
+
interface CoordinationStore {
|
|
1992
|
+
acquireControllerLease(input: AcquireControllerLeaseInput): Promise<AcquireControllerLeaseResult>;
|
|
1993
|
+
renewControllerLease(input: RenewControllerLeaseInput): Promise<RenewControllerLeaseResult>;
|
|
1994
|
+
releaseControllerLease(input: ReleaseControllerLeaseInput): Promise<ReleaseControllerLeaseResult>;
|
|
1995
|
+
getControllerLease(runId: string): Promise<ControllerLease | null>;
|
|
1996
|
+
getRunCoordination(runId: string): Promise<RunCoordinationRecord | null>;
|
|
1997
|
+
listRunCoordinationEvents(runId: string): Promise<RunCoordinationEvent[]>;
|
|
1998
|
+
compareAndSetRunState(input: CompareAndSetRunStateInput): Promise<CompareAndSetRunStateResult>;
|
|
1999
|
+
close(): Promise<void>;
|
|
2000
|
+
}
|
|
1907
2001
|
|
|
1908
2002
|
/**
|
|
1909
2003
|
* Agent work protocol contracts.
|
|
@@ -2883,8 +2977,8 @@ declare const WorkspaceAllocation_v1: z.ZodObject<{
|
|
|
2883
2977
|
observed_at: z.ZodString;
|
|
2884
2978
|
}, z.core.$strict>>;
|
|
2885
2979
|
quarantine_reason: z.ZodOptional<z.ZodEnum<{
|
|
2886
|
-
other: "other";
|
|
2887
2980
|
missing: "missing";
|
|
2981
|
+
other: "other";
|
|
2888
2982
|
dirty: "dirty";
|
|
2889
2983
|
expired: "expired";
|
|
2890
2984
|
unregistered: "unregistered";
|
|
@@ -3547,6 +3641,35 @@ declare const AttemptVerificationEventType: z.ZodEnum<{
|
|
|
3547
3641
|
attempt_verification_replayed: "attempt_verification_replayed";
|
|
3548
3642
|
}>;
|
|
3549
3643
|
type AttemptVerificationEventType = z.infer<typeof AttemptVerificationEventType>;
|
|
3644
|
+
declare const WorkerAuthorityDimension: z.ZodEnum<{
|
|
3645
|
+
release: "release";
|
|
3646
|
+
edit: "edit";
|
|
3647
|
+
git_write: "git_write";
|
|
3648
|
+
github_write: "github_write";
|
|
3649
|
+
external_runtime: "external_runtime";
|
|
3650
|
+
secrets: "secrets";
|
|
3651
|
+
signing: "signing";
|
|
3652
|
+
}>;
|
|
3653
|
+
type WorkerAuthorityDimension = z.infer<typeof WorkerAuthorityDimension>;
|
|
3654
|
+
declare const WorkerAuthorityDecision: z.ZodEnum<{
|
|
3655
|
+
allowed: "allowed";
|
|
3656
|
+
denied: "denied";
|
|
3657
|
+
deviation: "deviation";
|
|
3658
|
+
}>;
|
|
3659
|
+
type WorkerAuthorityDecision = z.infer<typeof WorkerAuthorityDecision>;
|
|
3660
|
+
declare const WorkerAuthorityEnforcement: z.ZodEnum<{
|
|
3661
|
+
brokered: "brokered";
|
|
3662
|
+
enforced: "enforced";
|
|
3663
|
+
unenforced: "unenforced";
|
|
3664
|
+
}>;
|
|
3665
|
+
type WorkerAuthorityEnforcement = z.infer<typeof WorkerAuthorityEnforcement>;
|
|
3666
|
+
declare const WorkerAuthorityReason: z.ZodEnum<{
|
|
3667
|
+
packet_granted: "packet_granted";
|
|
3668
|
+
packet_denied: "packet_denied";
|
|
3669
|
+
backend_unenforceable: "backend_unenforceable";
|
|
3670
|
+
observed_after_execution: "observed_after_execution";
|
|
3671
|
+
}>;
|
|
3672
|
+
type WorkerAuthorityReason = z.infer<typeof WorkerAuthorityReason>;
|
|
3550
3673
|
declare const WorkspaceMutationFailureReason: z.ZodEnum<{
|
|
3551
3674
|
not_found: "not_found";
|
|
3552
3675
|
no_active_lease: "no_active_lease";
|
|
@@ -3861,6 +3984,24 @@ interface LaunchEnvelopeBindingRecord {
|
|
|
3861
3984
|
fencingToken: number;
|
|
3862
3985
|
createdAt: string;
|
|
3863
3986
|
}
|
|
3987
|
+
/**
|
|
3988
|
+
* Immutable canonical AgentTaskPacket snapshot bound to the durable Attempt.
|
|
3989
|
+
*
|
|
3990
|
+
* The snapshot is written only as part of launch-envelope binding, so callers
|
|
3991
|
+
* cannot make a packet body appear after a worker has started. It deliberately
|
|
3992
|
+
* retains the canonical JSON for later criterion/check reference validation;
|
|
3993
|
+
* consumers must parse it under AgentTaskPacket_v1 before acting on it.
|
|
3994
|
+
*/
|
|
3995
|
+
interface TaskPacketBindingRecord {
|
|
3996
|
+
runId: string;
|
|
3997
|
+
attemptId: string;
|
|
3998
|
+
workItemId: string;
|
|
3999
|
+
workItemRevision: number;
|
|
4000
|
+
packetId: string;
|
|
4001
|
+
packetHash: string;
|
|
4002
|
+
packetJson: string;
|
|
4003
|
+
createdAt: string;
|
|
4004
|
+
}
|
|
3864
4005
|
interface WorkerSessionEvent {
|
|
3865
4006
|
runId: string;
|
|
3866
4007
|
attemptId: string;
|
|
@@ -3877,6 +4018,32 @@ interface WorkerSessionEvent {
|
|
|
3877
4018
|
payload: JsonValue;
|
|
3878
4019
|
createdAt: string;
|
|
3879
4020
|
}
|
|
4021
|
+
/** Redacted packet-authority decision made immediately before, or observed after, worker action. */
|
|
4022
|
+
interface WorkerAuthorityEventRecord {
|
|
4023
|
+
runId: string;
|
|
4024
|
+
attemptId: string;
|
|
4025
|
+
workerSessionId: string;
|
|
4026
|
+
mutationId: string;
|
|
4027
|
+
sequence: number;
|
|
4028
|
+
attemptRevision: number;
|
|
4029
|
+
workspaceLeaseId: string;
|
|
4030
|
+
workspaceLeaseRevision: number;
|
|
4031
|
+
workerSessionRevision: number;
|
|
4032
|
+
packetId: string;
|
|
4033
|
+
packetHash: string;
|
|
4034
|
+
dimension: WorkerAuthorityDimension;
|
|
4035
|
+
decision: WorkerAuthorityDecision;
|
|
4036
|
+
enforcement: WorkerAuthorityEnforcement;
|
|
4037
|
+
actionClass: string;
|
|
4038
|
+
actionHash: string;
|
|
4039
|
+
backendId: string;
|
|
4040
|
+
backendVersion: string;
|
|
4041
|
+
reason: WorkerAuthorityReason;
|
|
4042
|
+
controllerId: string;
|
|
4043
|
+
controllerLeaseId: string;
|
|
4044
|
+
fencingToken: number;
|
|
4045
|
+
createdAt: string;
|
|
4046
|
+
}
|
|
3880
4047
|
interface AuthenticatedMutationInput {
|
|
3881
4048
|
runId: string;
|
|
3882
4049
|
expectedRunRevision: number;
|
|
@@ -3890,6 +4057,34 @@ interface AuthenticatedWorkerMutationInput extends AuthenticatedMutationInput {
|
|
|
3890
4057
|
expectedAttemptRevision: number;
|
|
3891
4058
|
expectedWorkspaceLeaseRevision: number;
|
|
3892
4059
|
}
|
|
4060
|
+
interface RecordWorkerAuthorityDecisionInput extends AuthenticatedMutationInput {
|
|
4061
|
+
attemptId: string;
|
|
4062
|
+
expectedAttemptRevision: number;
|
|
4063
|
+
workspaceLeaseId: string;
|
|
4064
|
+
expectedWorkspaceLeaseRevision: number;
|
|
4065
|
+
workerSessionId: string;
|
|
4066
|
+
expectedWorkerSessionRevision: number;
|
|
4067
|
+
dimension: WorkerAuthorityDimension;
|
|
4068
|
+
decision: WorkerAuthorityDecision;
|
|
4069
|
+
enforcement: WorkerAuthorityEnforcement;
|
|
4070
|
+
actionClass: string;
|
|
4071
|
+
actionHash: string;
|
|
4072
|
+
backendId: string;
|
|
4073
|
+
backendVersion: string;
|
|
4074
|
+
reason: WorkerAuthorityReason;
|
|
4075
|
+
}
|
|
4076
|
+
type WorkerAuthorityDecisionResult = {
|
|
4077
|
+
recorded: true;
|
|
4078
|
+
event: WorkerAuthorityEventRecord;
|
|
4079
|
+
idempotentReplay: boolean;
|
|
4080
|
+
} | {
|
|
4081
|
+
recorded: false;
|
|
4082
|
+
reason: WorkerSessionMutationFailureReason;
|
|
4083
|
+
currentAttemptRevision?: number;
|
|
4084
|
+
currentWorkspaceLeaseRevision?: number;
|
|
4085
|
+
currentSessionRevision?: number;
|
|
4086
|
+
currentRunRevision?: number;
|
|
4087
|
+
};
|
|
3893
4088
|
interface AttachWorkerSessionInput extends AuthenticatedWorkerMutationInput {
|
|
3894
4089
|
sessionId: string;
|
|
3895
4090
|
packetId: string;
|
|
@@ -4114,6 +4309,18 @@ interface SubmitAttemptVerificationInput {
|
|
|
4114
4309
|
/** Built-in fail-closed policy used by the first public acceptance surface. */
|
|
4115
4310
|
declare const STRICT_ATTEMPT_ACCEPTANCE_POLICY_ID: "lexrunner.strict-pass";
|
|
4116
4311
|
declare const STRICT_ATTEMPT_ACCEPTANCE_POLICY_VERSION: "1.0.0";
|
|
4312
|
+
interface ApplyAttemptAcceptanceInput extends AuthenticatedMutationInput {
|
|
4313
|
+
attemptId: string;
|
|
4314
|
+
expectedAttemptRevision: number;
|
|
4315
|
+
workspaceLeaseId: string;
|
|
4316
|
+
expectedWorkspaceLeaseRevision: number;
|
|
4317
|
+
workerSessionId: string;
|
|
4318
|
+
expectedWorkerSessionRevision: number;
|
|
4319
|
+
receiptId: string;
|
|
4320
|
+
receiptHash: string;
|
|
4321
|
+
verificationId: string;
|
|
4322
|
+
verificationHash: string;
|
|
4323
|
+
}
|
|
4117
4324
|
interface BeginAttemptVerificationInput {
|
|
4118
4325
|
runId: string;
|
|
4119
4326
|
expectedRunRevision: number;
|
|
@@ -4312,6 +4519,10 @@ interface LaunchEnvelopeBindingStore {
|
|
|
4312
4519
|
reconcileIncompleteLaunch(input: ReconcileIncompleteLaunchInput): Promise<WorkspaceMutationResult>;
|
|
4313
4520
|
getLaunchEnvelopeBinding(attemptId: string): Promise<LaunchEnvelopeBindingRecord | null>;
|
|
4314
4521
|
}
|
|
4522
|
+
/** Read-only access to immutable task packet snapshots written during launch binding. */
|
|
4523
|
+
interface TaskPacketBindingStore {
|
|
4524
|
+
getTaskPacketBinding(attemptId: string): Promise<TaskPacketBindingRecord | null>;
|
|
4525
|
+
}
|
|
4315
4526
|
/** Additive Stage 3 persistence port; kept separate from the Stage 1 workspace contract. */
|
|
4316
4527
|
interface WorkerSessionStore {
|
|
4317
4528
|
attachWorkerSession(input: AttachWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
@@ -4322,6 +4533,11 @@ interface WorkerSessionStore {
|
|
|
4322
4533
|
getWorkerAdapterBinding(sessionId: string): Promise<WorkerAdapterBindingRecord | null>;
|
|
4323
4534
|
listWorkerSessionEvents(runId: string): Promise<WorkerSessionEvent[]>;
|
|
4324
4535
|
}
|
|
4536
|
+
/** Additive audit port for packet-bound worker authority decisions. */
|
|
4537
|
+
interface WorkerAuthorityDecisionStore {
|
|
4538
|
+
recordWorkerAuthorityDecision(input: RecordWorkerAuthorityDecisionInput): Promise<WorkerAuthorityDecisionResult>;
|
|
4539
|
+
listWorkerAuthorityEvents(runId: string): Promise<WorkerAuthorityEventRecord[]>;
|
|
4540
|
+
}
|
|
4325
4541
|
/** Additive immutable AgentTaskReceipt v2 persistence port. */
|
|
4326
4542
|
interface AttemptReceiptStore {
|
|
4327
4543
|
submitAttemptReceipt(input: SubmitAttemptReceiptInput): Promise<AttemptReceiptSubmissionResult>;
|
|
@@ -4341,6 +4557,10 @@ interface AttemptVerificationStore {
|
|
|
4341
4557
|
getAttemptVerificationAuthorizationForAttempt(attemptId: string): Promise<AttemptVerificationAuthorizationRecord | null>;
|
|
4342
4558
|
listAttemptVerificationEvents(runId: string): Promise<AttemptVerificationEvent[]>;
|
|
4343
4559
|
}
|
|
4560
|
+
/** Policy-owned transition from verified evidence to an accepted or rejected Attempt. */
|
|
4561
|
+
interface AttemptAcceptanceStore {
|
|
4562
|
+
applyAttemptAcceptance(input: ApplyAttemptAcceptanceInput): Promise<WorkspaceMutationResult>;
|
|
4563
|
+
}
|
|
4344
4564
|
|
|
4345
4565
|
interface WorktreeTarget extends WorkspaceIdentity {
|
|
4346
4566
|
/** Immutable full Git object ID used to create this Attempt workspace. */
|
|
@@ -4694,9 +4914,9 @@ declare const SourceObservationShape: {
|
|
|
4694
4914
|
readonly source_head_sha: z.ZodString;
|
|
4695
4915
|
readonly requested_object_sha: z.ZodString;
|
|
4696
4916
|
readonly requested_object_type: z.ZodEnum<{
|
|
4917
|
+
missing: "missing";
|
|
4697
4918
|
commit: "commit";
|
|
4698
4919
|
other: "other";
|
|
4699
|
-
missing: "missing";
|
|
4700
4920
|
}>;
|
|
4701
4921
|
readonly cleanliness: z.ZodEnum<{
|
|
4702
4922
|
unknown: "unknown";
|
|
@@ -4714,9 +4934,9 @@ declare const NativeWslSourceObservation_v1: z.ZodPreprocess<z.ZodObject<{
|
|
|
4714
4934
|
source_head_sha: z.ZodString;
|
|
4715
4935
|
requested_object_sha: z.ZodString;
|
|
4716
4936
|
requested_object_type: z.ZodEnum<{
|
|
4937
|
+
missing: "missing";
|
|
4717
4938
|
commit: "commit";
|
|
4718
4939
|
other: "other";
|
|
4719
|
-
missing: "missing";
|
|
4720
4940
|
}>;
|
|
4721
4941
|
cleanliness: z.ZodEnum<{
|
|
4722
4942
|
unknown: "unknown";
|
|
@@ -4821,9 +5041,9 @@ declare const ProjectionManifestShape: {
|
|
|
4821
5041
|
source_head_sha: z.ZodString;
|
|
4822
5042
|
requested_object_sha: z.ZodString;
|
|
4823
5043
|
requested_object_type: z.ZodEnum<{
|
|
5044
|
+
missing: "missing";
|
|
4824
5045
|
commit: "commit";
|
|
4825
5046
|
other: "other";
|
|
4826
|
-
missing: "missing";
|
|
4827
5047
|
}>;
|
|
4828
5048
|
cleanliness: z.ZodEnum<{
|
|
4829
5049
|
unknown: "unknown";
|
|
@@ -4909,9 +5129,9 @@ declare const NativeWslProjectionManifest_v1: z.ZodPreprocess<z.ZodObject<{
|
|
|
4909
5129
|
source_head_sha: z.ZodString;
|
|
4910
5130
|
requested_object_sha: z.ZodString;
|
|
4911
5131
|
requested_object_type: z.ZodEnum<{
|
|
5132
|
+
missing: "missing";
|
|
4912
5133
|
commit: "commit";
|
|
4913
5134
|
other: "other";
|
|
4914
|
-
missing: "missing";
|
|
4915
5135
|
}>;
|
|
4916
5136
|
cleanliness: z.ZodEnum<{
|
|
4917
5137
|
unknown: "unknown";
|
|
@@ -5412,9 +5632,9 @@ declare const ProjectionSelectionShape: {
|
|
|
5412
5632
|
source_head_sha: z.ZodString;
|
|
5413
5633
|
requested_object_sha: z.ZodString;
|
|
5414
5634
|
requested_object_type: z.ZodEnum<{
|
|
5635
|
+
missing: "missing";
|
|
5415
5636
|
commit: "commit";
|
|
5416
5637
|
other: "other";
|
|
5417
|
-
missing: "missing";
|
|
5418
5638
|
}>;
|
|
5419
5639
|
cleanliness: z.ZodEnum<{
|
|
5420
5640
|
unknown: "unknown";
|
|
@@ -5476,9 +5696,9 @@ declare const NativeWslProjectionSelection_v1: z.ZodPreprocess<z.ZodObject<{
|
|
|
5476
5696
|
source_head_sha: z.ZodString;
|
|
5477
5697
|
requested_object_sha: z.ZodString;
|
|
5478
5698
|
requested_object_type: z.ZodEnum<{
|
|
5699
|
+
missing: "missing";
|
|
5479
5700
|
commit: "commit";
|
|
5480
5701
|
other: "other";
|
|
5481
|
-
missing: "missing";
|
|
5482
5702
|
}>;
|
|
5483
5703
|
cleanliness: z.ZodEnum<{
|
|
5484
5704
|
unknown: "unknown";
|
|
@@ -5543,9 +5763,9 @@ declare const NativeWslProjectionInventoryObservation_v1: z.ZodUnion<readonly [z
|
|
|
5543
5763
|
source_head_sha: z.ZodString;
|
|
5544
5764
|
requested_object_sha: z.ZodString;
|
|
5545
5765
|
requested_object_type: z.ZodEnum<{
|
|
5766
|
+
missing: "missing";
|
|
5546
5767
|
commit: "commit";
|
|
5547
5768
|
other: "other";
|
|
5548
|
-
missing: "missing";
|
|
5549
5769
|
}>;
|
|
5550
5770
|
cleanliness: z.ZodEnum<{
|
|
5551
5771
|
unknown: "unknown";
|
|
@@ -6843,6 +7063,715 @@ declare function orderAgentWorkPreparationSteps(preparation: Preparation): Prepa
|
|
|
6843
7063
|
/** Executes only the explicit preparation phase and emits hashes, never command logs. */
|
|
6844
7064
|
declare function executeAgentWorkPreparation(input: ExecuteAgentWorkPreparationInput): Promise<AgentWorkPreparationResult>;
|
|
6845
7065
|
|
|
7066
|
+
declare const ATTEMPT_AWAITABLE_CONTRACT_VERSION: "1.0.0";
|
|
7067
|
+
declare const AXF_AWAITABLE_SCHEMA_VERSION: "axf/awaitable/v1";
|
|
7068
|
+
declare const AXF_AWAIT_RESULT_SCHEMA_VERSION: "axf/await-result/v1";
|
|
7069
|
+
declare const MIN_ATTEMPT_AWAITABLE_DURATION_MS = 1000;
|
|
7070
|
+
declare const MAX_ATTEMPT_AWAITABLE_DURATION_MS: number;
|
|
7071
|
+
/** Credential-free AXF observation identity. Kind-specific semantics remain AXF-owned. */
|
|
7072
|
+
declare const ExternalAwaitableDescriptor_v1: z.ZodObject<{
|
|
7073
|
+
schemaVersion: z.ZodLiteral<"axf/awaitable/v1">;
|
|
7074
|
+
kind: z.ZodLiteral<"github.required-checks">;
|
|
7075
|
+
subject: z.ZodObject<{
|
|
7076
|
+
repository: z.ZodString;
|
|
7077
|
+
headSha: z.ZodString;
|
|
7078
|
+
pullRequestNumber: z.ZodOptional<z.ZodNumber>;
|
|
7079
|
+
}, z.core.$strict>;
|
|
7080
|
+
condition: z.ZodObject<{
|
|
7081
|
+
type: z.ZodLiteral<"all-required-checks-terminal">;
|
|
7082
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7083
|
+
source: z.ZodEnum<{
|
|
7084
|
+
status: "status";
|
|
7085
|
+
"check-run": "check-run";
|
|
7086
|
+
}>;
|
|
7087
|
+
name: z.ZodString;
|
|
7088
|
+
appSlug: z.ZodOptional<z.ZodString>;
|
|
7089
|
+
}, z.core.$strict>>;
|
|
7090
|
+
}, z.core.$strict>;
|
|
7091
|
+
}, z.core.$strict>;
|
|
7092
|
+
type ExternalAwaitableDescriptor_v1 = z.infer<typeof ExternalAwaitableDescriptor_v1>;
|
|
7093
|
+
declare const ExternalAwaitOutcome_v1: z.ZodEnum<{
|
|
7094
|
+
cancelled: "cancelled";
|
|
7095
|
+
satisfied: "satisfied";
|
|
7096
|
+
"terminal-failed": "terminal-failed";
|
|
7097
|
+
deadline: "deadline";
|
|
7098
|
+
"subject-drift": "subject-drift";
|
|
7099
|
+
"observation-error": "observation-error";
|
|
7100
|
+
}>;
|
|
7101
|
+
type ExternalAwaitOutcome_v1 = z.infer<typeof ExternalAwaitOutcome_v1>;
|
|
7102
|
+
/** Exact normalized terminal projection returned by AXF's process-bound wait capability. */
|
|
7103
|
+
declare const AxfExternalAwaitResult_v1: z.ZodObject<{
|
|
7104
|
+
schemaVersion: z.ZodLiteral<"axf/await-result/v1">;
|
|
7105
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7106
|
+
outcome: z.ZodEnum<{
|
|
7107
|
+
cancelled: "cancelled";
|
|
7108
|
+
satisfied: "satisfied";
|
|
7109
|
+
"terminal-failed": "terminal-failed";
|
|
7110
|
+
deadline: "deadline";
|
|
7111
|
+
"subject-drift": "subject-drift";
|
|
7112
|
+
"observation-error": "observation-error";
|
|
7113
|
+
}>;
|
|
7114
|
+
terminal: z.ZodLiteral<true>;
|
|
7115
|
+
durability: z.ZodLiteral<"process-bound">;
|
|
7116
|
+
authorityModel: z.ZodLiteral<"host-provided">;
|
|
7117
|
+
underlyingCancellation: z.ZodLiteral<false>;
|
|
7118
|
+
effectiveDeadlineMs: z.ZodNumber;
|
|
7119
|
+
observationCount: z.ZodNumber;
|
|
7120
|
+
evidence: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
7121
|
+
repository: z.ZodString;
|
|
7122
|
+
headSha: z.ZodString;
|
|
7123
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
7124
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7125
|
+
source: z.ZodEnum<{
|
|
7126
|
+
status: "status";
|
|
7127
|
+
"check-run": "check-run";
|
|
7128
|
+
}>;
|
|
7129
|
+
name: z.ZodString;
|
|
7130
|
+
appSlug: z.ZodNullable<z.ZodString>;
|
|
7131
|
+
state: z.ZodEnum<{
|
|
7132
|
+
error: "error";
|
|
7133
|
+
success: "success";
|
|
7134
|
+
failure: "failure";
|
|
7135
|
+
completed: "completed";
|
|
7136
|
+
pending: "pending";
|
|
7137
|
+
missing: "missing";
|
|
7138
|
+
queued: "queued";
|
|
7139
|
+
in_progress: "in_progress";
|
|
7140
|
+
waiting: "waiting";
|
|
7141
|
+
requested: "requested";
|
|
7142
|
+
}>;
|
|
7143
|
+
conclusion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7144
|
+
success: "success";
|
|
7145
|
+
failure: "failure";
|
|
7146
|
+
skipped: "skipped";
|
|
7147
|
+
stale: "stale";
|
|
7148
|
+
neutral: "neutral";
|
|
7149
|
+
cancelled: "cancelled";
|
|
7150
|
+
timed_out: "timed_out";
|
|
7151
|
+
action_required: "action_required";
|
|
7152
|
+
startup_failure: "startup_failure";
|
|
7153
|
+
}>>>;
|
|
7154
|
+
terminal: z.ZodBoolean;
|
|
7155
|
+
successful: z.ZodBoolean;
|
|
7156
|
+
}, z.core.$strict>>;
|
|
7157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7158
|
+
repository: z.ZodString;
|
|
7159
|
+
pullRequestNumber: z.ZodNumber;
|
|
7160
|
+
expectedHeadSha: z.ZodString;
|
|
7161
|
+
observedHeadSha: z.ZodString;
|
|
7162
|
+
}, z.core.$strict>]>;
|
|
7163
|
+
}, z.core.$strict>;
|
|
7164
|
+
type AxfExternalAwaitResult_v1 = z.infer<typeof AxfExternalAwaitResult_v1>;
|
|
7165
|
+
declare const AttemptAwaitableStatus_v1: z.ZodEnum<{
|
|
7166
|
+
cancelled: "cancelled";
|
|
7167
|
+
registered: "registered";
|
|
7168
|
+
satisfied: "satisfied";
|
|
7169
|
+
deadline: "deadline";
|
|
7170
|
+
observing: "observing";
|
|
7171
|
+
terminal_failed: "terminal_failed";
|
|
7172
|
+
subject_drift: "subject_drift";
|
|
7173
|
+
observation_error: "observation_error";
|
|
7174
|
+
}>;
|
|
7175
|
+
type AttemptAwaitableStatus_v1 = z.infer<typeof AttemptAwaitableStatus_v1>;
|
|
7176
|
+
declare const AttemptAwaitableObserverLease_v1: z.ZodObject<{
|
|
7177
|
+
observer_id: z.ZodString;
|
|
7178
|
+
lease_id: z.ZodString;
|
|
7179
|
+
fencing_token: z.ZodNumber;
|
|
7180
|
+
acquired_at: z.ZodString;
|
|
7181
|
+
expires_at: z.ZodString;
|
|
7182
|
+
}, z.core.$strict>;
|
|
7183
|
+
type AttemptAwaitableObserverLease_v1 = z.infer<typeof AttemptAwaitableObserverLease_v1>;
|
|
7184
|
+
declare const AttemptAwaitableTerminalResult_v1: z.ZodObject<{
|
|
7185
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7186
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7187
|
+
outcome: z.ZodEnum<{
|
|
7188
|
+
cancelled: "cancelled";
|
|
7189
|
+
satisfied: "satisfied";
|
|
7190
|
+
"terminal-failed": "terminal-failed";
|
|
7191
|
+
deadline: "deadline";
|
|
7192
|
+
"subject-drift": "subject-drift";
|
|
7193
|
+
"observation-error": "observation-error";
|
|
7194
|
+
}>;
|
|
7195
|
+
source: z.ZodEnum<{
|
|
7196
|
+
lexrunner: "lexrunner";
|
|
7197
|
+
observer: "observer";
|
|
7198
|
+
}>;
|
|
7199
|
+
observed_at: z.ZodString;
|
|
7200
|
+
observer_result: z.ZodOptional<z.ZodObject<{
|
|
7201
|
+
schemaVersion: z.ZodLiteral<"axf/await-result/v1">;
|
|
7202
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7203
|
+
outcome: z.ZodEnum<{
|
|
7204
|
+
cancelled: "cancelled";
|
|
7205
|
+
satisfied: "satisfied";
|
|
7206
|
+
"terminal-failed": "terminal-failed";
|
|
7207
|
+
deadline: "deadline";
|
|
7208
|
+
"subject-drift": "subject-drift";
|
|
7209
|
+
"observation-error": "observation-error";
|
|
7210
|
+
}>;
|
|
7211
|
+
terminal: z.ZodLiteral<true>;
|
|
7212
|
+
durability: z.ZodLiteral<"process-bound">;
|
|
7213
|
+
authorityModel: z.ZodLiteral<"host-provided">;
|
|
7214
|
+
underlyingCancellation: z.ZodLiteral<false>;
|
|
7215
|
+
effectiveDeadlineMs: z.ZodNumber;
|
|
7216
|
+
observationCount: z.ZodNumber;
|
|
7217
|
+
evidence: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
7218
|
+
repository: z.ZodString;
|
|
7219
|
+
headSha: z.ZodString;
|
|
7220
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
7221
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7222
|
+
source: z.ZodEnum<{
|
|
7223
|
+
status: "status";
|
|
7224
|
+
"check-run": "check-run";
|
|
7225
|
+
}>;
|
|
7226
|
+
name: z.ZodString;
|
|
7227
|
+
appSlug: z.ZodNullable<z.ZodString>;
|
|
7228
|
+
state: z.ZodEnum<{
|
|
7229
|
+
error: "error";
|
|
7230
|
+
success: "success";
|
|
7231
|
+
failure: "failure";
|
|
7232
|
+
completed: "completed";
|
|
7233
|
+
pending: "pending";
|
|
7234
|
+
missing: "missing";
|
|
7235
|
+
queued: "queued";
|
|
7236
|
+
in_progress: "in_progress";
|
|
7237
|
+
waiting: "waiting";
|
|
7238
|
+
requested: "requested";
|
|
7239
|
+
}>;
|
|
7240
|
+
conclusion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7241
|
+
success: "success";
|
|
7242
|
+
failure: "failure";
|
|
7243
|
+
skipped: "skipped";
|
|
7244
|
+
stale: "stale";
|
|
7245
|
+
neutral: "neutral";
|
|
7246
|
+
cancelled: "cancelled";
|
|
7247
|
+
timed_out: "timed_out";
|
|
7248
|
+
action_required: "action_required";
|
|
7249
|
+
startup_failure: "startup_failure";
|
|
7250
|
+
}>>>;
|
|
7251
|
+
terminal: z.ZodBoolean;
|
|
7252
|
+
successful: z.ZodBoolean;
|
|
7253
|
+
}, z.core.$strict>>;
|
|
7254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7255
|
+
repository: z.ZodString;
|
|
7256
|
+
pullRequestNumber: z.ZodNumber;
|
|
7257
|
+
expectedHeadSha: z.ZodString;
|
|
7258
|
+
observedHeadSha: z.ZodString;
|
|
7259
|
+
}, z.core.$strict>]>;
|
|
7260
|
+
}, z.core.$strict>>;
|
|
7261
|
+
reason_code: z.ZodOptional<z.ZodEnum<{
|
|
7262
|
+
deadline_elapsed: "deadline_elapsed";
|
|
7263
|
+
operator_cancelled: "operator_cancelled";
|
|
7264
|
+
}>>;
|
|
7265
|
+
}, z.core.$strict>;
|
|
7266
|
+
type AttemptAwaitableTerminalResult_v1 = z.infer<typeof AttemptAwaitableTerminalResult_v1>;
|
|
7267
|
+
declare const AttemptAwaitableDelivery_v1: z.ZodObject<{
|
|
7268
|
+
delivery_id: z.ZodString;
|
|
7269
|
+
status: z.ZodEnum<{
|
|
7270
|
+
pending: "pending";
|
|
7271
|
+
delivered: "delivered";
|
|
7272
|
+
}>;
|
|
7273
|
+
completion_hash: z.ZodString;
|
|
7274
|
+
attempt_count: z.ZodNumber;
|
|
7275
|
+
last_attempt_at: z.ZodOptional<z.ZodString>;
|
|
7276
|
+
delivered_at: z.ZodOptional<z.ZodString>;
|
|
7277
|
+
}, z.core.$strict>;
|
|
7278
|
+
type AttemptAwaitableDelivery_v1 = z.infer<typeof AttemptAwaitableDelivery_v1>;
|
|
7279
|
+
declare const AttemptAwaitableRecord_v1: z.ZodObject<{
|
|
7280
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7281
|
+
awaitable_id: z.ZodString;
|
|
7282
|
+
attempt_id: z.ZodString;
|
|
7283
|
+
worker_session_id: z.ZodOptional<z.ZodString>;
|
|
7284
|
+
revision: z.ZodNumber;
|
|
7285
|
+
descriptor: z.ZodObject<{
|
|
7286
|
+
schemaVersion: z.ZodLiteral<"axf/awaitable/v1">;
|
|
7287
|
+
kind: z.ZodLiteral<"github.required-checks">;
|
|
7288
|
+
subject: z.ZodObject<{
|
|
7289
|
+
repository: z.ZodString;
|
|
7290
|
+
headSha: z.ZodString;
|
|
7291
|
+
pullRequestNumber: z.ZodOptional<z.ZodNumber>;
|
|
7292
|
+
}, z.core.$strict>;
|
|
7293
|
+
condition: z.ZodObject<{
|
|
7294
|
+
type: z.ZodLiteral<"all-required-checks-terminal">;
|
|
7295
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7296
|
+
source: z.ZodEnum<{
|
|
7297
|
+
status: "status";
|
|
7298
|
+
"check-run": "check-run";
|
|
7299
|
+
}>;
|
|
7300
|
+
name: z.ZodString;
|
|
7301
|
+
appSlug: z.ZodOptional<z.ZodString>;
|
|
7302
|
+
}, z.core.$strict>>;
|
|
7303
|
+
}, z.core.$strict>;
|
|
7304
|
+
}, z.core.$strict>;
|
|
7305
|
+
descriptor_hash: z.ZodString;
|
|
7306
|
+
status: z.ZodEnum<{
|
|
7307
|
+
cancelled: "cancelled";
|
|
7308
|
+
registered: "registered";
|
|
7309
|
+
satisfied: "satisfied";
|
|
7310
|
+
deadline: "deadline";
|
|
7311
|
+
observing: "observing";
|
|
7312
|
+
terminal_failed: "terminal_failed";
|
|
7313
|
+
subject_drift: "subject_drift";
|
|
7314
|
+
observation_error: "observation_error";
|
|
7315
|
+
}>;
|
|
7316
|
+
deadline_at: z.ZodString;
|
|
7317
|
+
observer_fencing_token: z.ZodNumber;
|
|
7318
|
+
observer_lease: z.ZodOptional<z.ZodObject<{
|
|
7319
|
+
observer_id: z.ZodString;
|
|
7320
|
+
lease_id: z.ZodString;
|
|
7321
|
+
fencing_token: z.ZodNumber;
|
|
7322
|
+
acquired_at: z.ZodString;
|
|
7323
|
+
expires_at: z.ZodString;
|
|
7324
|
+
}, z.core.$strict>>;
|
|
7325
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
7326
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7327
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7328
|
+
outcome: z.ZodEnum<{
|
|
7329
|
+
cancelled: "cancelled";
|
|
7330
|
+
satisfied: "satisfied";
|
|
7331
|
+
"terminal-failed": "terminal-failed";
|
|
7332
|
+
deadline: "deadline";
|
|
7333
|
+
"subject-drift": "subject-drift";
|
|
7334
|
+
"observation-error": "observation-error";
|
|
7335
|
+
}>;
|
|
7336
|
+
source: z.ZodEnum<{
|
|
7337
|
+
lexrunner: "lexrunner";
|
|
7338
|
+
observer: "observer";
|
|
7339
|
+
}>;
|
|
7340
|
+
observed_at: z.ZodString;
|
|
7341
|
+
observer_result: z.ZodOptional<z.ZodObject<{
|
|
7342
|
+
schemaVersion: z.ZodLiteral<"axf/await-result/v1">;
|
|
7343
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7344
|
+
outcome: z.ZodEnum<{
|
|
7345
|
+
cancelled: "cancelled";
|
|
7346
|
+
satisfied: "satisfied";
|
|
7347
|
+
"terminal-failed": "terminal-failed";
|
|
7348
|
+
deadline: "deadline";
|
|
7349
|
+
"subject-drift": "subject-drift";
|
|
7350
|
+
"observation-error": "observation-error";
|
|
7351
|
+
}>;
|
|
7352
|
+
terminal: z.ZodLiteral<true>;
|
|
7353
|
+
durability: z.ZodLiteral<"process-bound">;
|
|
7354
|
+
authorityModel: z.ZodLiteral<"host-provided">;
|
|
7355
|
+
underlyingCancellation: z.ZodLiteral<false>;
|
|
7356
|
+
effectiveDeadlineMs: z.ZodNumber;
|
|
7357
|
+
observationCount: z.ZodNumber;
|
|
7358
|
+
evidence: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
7359
|
+
repository: z.ZodString;
|
|
7360
|
+
headSha: z.ZodString;
|
|
7361
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
7362
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7363
|
+
source: z.ZodEnum<{
|
|
7364
|
+
status: "status";
|
|
7365
|
+
"check-run": "check-run";
|
|
7366
|
+
}>;
|
|
7367
|
+
name: z.ZodString;
|
|
7368
|
+
appSlug: z.ZodNullable<z.ZodString>;
|
|
7369
|
+
state: z.ZodEnum<{
|
|
7370
|
+
error: "error";
|
|
7371
|
+
success: "success";
|
|
7372
|
+
failure: "failure";
|
|
7373
|
+
completed: "completed";
|
|
7374
|
+
pending: "pending";
|
|
7375
|
+
missing: "missing";
|
|
7376
|
+
queued: "queued";
|
|
7377
|
+
in_progress: "in_progress";
|
|
7378
|
+
waiting: "waiting";
|
|
7379
|
+
requested: "requested";
|
|
7380
|
+
}>;
|
|
7381
|
+
conclusion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7382
|
+
success: "success";
|
|
7383
|
+
failure: "failure";
|
|
7384
|
+
skipped: "skipped";
|
|
7385
|
+
stale: "stale";
|
|
7386
|
+
neutral: "neutral";
|
|
7387
|
+
cancelled: "cancelled";
|
|
7388
|
+
timed_out: "timed_out";
|
|
7389
|
+
action_required: "action_required";
|
|
7390
|
+
startup_failure: "startup_failure";
|
|
7391
|
+
}>>>;
|
|
7392
|
+
terminal: z.ZodBoolean;
|
|
7393
|
+
successful: z.ZodBoolean;
|
|
7394
|
+
}, z.core.$strict>>;
|
|
7395
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7396
|
+
repository: z.ZodString;
|
|
7397
|
+
pullRequestNumber: z.ZodNumber;
|
|
7398
|
+
expectedHeadSha: z.ZodString;
|
|
7399
|
+
observedHeadSha: z.ZodString;
|
|
7400
|
+
}, z.core.$strict>]>;
|
|
7401
|
+
}, z.core.$strict>>;
|
|
7402
|
+
reason_code: z.ZodOptional<z.ZodEnum<{
|
|
7403
|
+
deadline_elapsed: "deadline_elapsed";
|
|
7404
|
+
operator_cancelled: "operator_cancelled";
|
|
7405
|
+
}>>;
|
|
7406
|
+
}, z.core.$strict>>;
|
|
7407
|
+
result_hash: z.ZodOptional<z.ZodString>;
|
|
7408
|
+
delivery: z.ZodOptional<z.ZodObject<{
|
|
7409
|
+
delivery_id: z.ZodString;
|
|
7410
|
+
status: z.ZodEnum<{
|
|
7411
|
+
pending: "pending";
|
|
7412
|
+
delivered: "delivered";
|
|
7413
|
+
}>;
|
|
7414
|
+
completion_hash: z.ZodString;
|
|
7415
|
+
attempt_count: z.ZodNumber;
|
|
7416
|
+
last_attempt_at: z.ZodOptional<z.ZodString>;
|
|
7417
|
+
delivered_at: z.ZodOptional<z.ZodString>;
|
|
7418
|
+
}, z.core.$strict>>;
|
|
7419
|
+
created_at: z.ZodString;
|
|
7420
|
+
updated_at: z.ZodString;
|
|
7421
|
+
terminal_at: z.ZodOptional<z.ZodString>;
|
|
7422
|
+
}, z.core.$strict>;
|
|
7423
|
+
type AttemptAwaitableRecord_v1 = z.infer<typeof AttemptAwaitableRecord_v1>;
|
|
7424
|
+
declare const AttemptAwaitableCompletion_v1: z.ZodObject<{
|
|
7425
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7426
|
+
delivery_id: z.ZodString;
|
|
7427
|
+
awaitable_id: z.ZodString;
|
|
7428
|
+
attempt_id: z.ZodString;
|
|
7429
|
+
worker_session_id: z.ZodOptional<z.ZodString>;
|
|
7430
|
+
descriptor_hash: z.ZodString;
|
|
7431
|
+
result: z.ZodObject<{
|
|
7432
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7433
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7434
|
+
outcome: z.ZodEnum<{
|
|
7435
|
+
cancelled: "cancelled";
|
|
7436
|
+
satisfied: "satisfied";
|
|
7437
|
+
"terminal-failed": "terminal-failed";
|
|
7438
|
+
deadline: "deadline";
|
|
7439
|
+
"subject-drift": "subject-drift";
|
|
7440
|
+
"observation-error": "observation-error";
|
|
7441
|
+
}>;
|
|
7442
|
+
source: z.ZodEnum<{
|
|
7443
|
+
lexrunner: "lexrunner";
|
|
7444
|
+
observer: "observer";
|
|
7445
|
+
}>;
|
|
7446
|
+
observed_at: z.ZodString;
|
|
7447
|
+
observer_result: z.ZodOptional<z.ZodObject<{
|
|
7448
|
+
schemaVersion: z.ZodLiteral<"axf/await-result/v1">;
|
|
7449
|
+
provider: z.ZodLiteral<"github.required-checks">;
|
|
7450
|
+
outcome: z.ZodEnum<{
|
|
7451
|
+
cancelled: "cancelled";
|
|
7452
|
+
satisfied: "satisfied";
|
|
7453
|
+
"terminal-failed": "terminal-failed";
|
|
7454
|
+
deadline: "deadline";
|
|
7455
|
+
"subject-drift": "subject-drift";
|
|
7456
|
+
"observation-error": "observation-error";
|
|
7457
|
+
}>;
|
|
7458
|
+
terminal: z.ZodLiteral<true>;
|
|
7459
|
+
durability: z.ZodLiteral<"process-bound">;
|
|
7460
|
+
authorityModel: z.ZodLiteral<"host-provided">;
|
|
7461
|
+
underlyingCancellation: z.ZodLiteral<false>;
|
|
7462
|
+
effectiveDeadlineMs: z.ZodNumber;
|
|
7463
|
+
observationCount: z.ZodNumber;
|
|
7464
|
+
evidence: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
7465
|
+
repository: z.ZodString;
|
|
7466
|
+
headSha: z.ZodString;
|
|
7467
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
7468
|
+
requiredChecks: z.ZodArray<z.ZodObject<{
|
|
7469
|
+
source: z.ZodEnum<{
|
|
7470
|
+
status: "status";
|
|
7471
|
+
"check-run": "check-run";
|
|
7472
|
+
}>;
|
|
7473
|
+
name: z.ZodString;
|
|
7474
|
+
appSlug: z.ZodNullable<z.ZodString>;
|
|
7475
|
+
state: z.ZodEnum<{
|
|
7476
|
+
error: "error";
|
|
7477
|
+
success: "success";
|
|
7478
|
+
failure: "failure";
|
|
7479
|
+
completed: "completed";
|
|
7480
|
+
pending: "pending";
|
|
7481
|
+
missing: "missing";
|
|
7482
|
+
queued: "queued";
|
|
7483
|
+
in_progress: "in_progress";
|
|
7484
|
+
waiting: "waiting";
|
|
7485
|
+
requested: "requested";
|
|
7486
|
+
}>;
|
|
7487
|
+
conclusion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7488
|
+
success: "success";
|
|
7489
|
+
failure: "failure";
|
|
7490
|
+
skipped: "skipped";
|
|
7491
|
+
stale: "stale";
|
|
7492
|
+
neutral: "neutral";
|
|
7493
|
+
cancelled: "cancelled";
|
|
7494
|
+
timed_out: "timed_out";
|
|
7495
|
+
action_required: "action_required";
|
|
7496
|
+
startup_failure: "startup_failure";
|
|
7497
|
+
}>>>;
|
|
7498
|
+
terminal: z.ZodBoolean;
|
|
7499
|
+
successful: z.ZodBoolean;
|
|
7500
|
+
}, z.core.$strict>>;
|
|
7501
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7502
|
+
repository: z.ZodString;
|
|
7503
|
+
pullRequestNumber: z.ZodNumber;
|
|
7504
|
+
expectedHeadSha: z.ZodString;
|
|
7505
|
+
observedHeadSha: z.ZodString;
|
|
7506
|
+
}, z.core.$strict>]>;
|
|
7507
|
+
}, z.core.$strict>>;
|
|
7508
|
+
reason_code: z.ZodOptional<z.ZodEnum<{
|
|
7509
|
+
deadline_elapsed: "deadline_elapsed";
|
|
7510
|
+
operator_cancelled: "operator_cancelled";
|
|
7511
|
+
}>>;
|
|
7512
|
+
}, z.core.$strict>;
|
|
7513
|
+
result_hash: z.ZodString;
|
|
7514
|
+
terminal_at: z.ZodString;
|
|
7515
|
+
}, z.core.$strict>;
|
|
7516
|
+
type AttemptAwaitableCompletion_v1 = z.infer<typeof AttemptAwaitableCompletion_v1>;
|
|
7517
|
+
declare function completionForAttemptAwaitable(record: Pick<AttemptAwaitableRecord_v1, "awaitable_id" | "attempt_id" | "worker_session_id" | "descriptor_hash" | "result" | "result_hash" | "terminal_at" | "delivery">): AttemptAwaitableCompletion_v1;
|
|
7518
|
+
declare function statusForAwaitableOutcome(outcome: ExternalAwaitOutcome_v1): AttemptAwaitableStatus_v1;
|
|
7519
|
+
declare function deliveryIdForAttemptAwaitable(awaitableId: string): string;
|
|
7520
|
+
declare function parseExternalAwaitableDescriptor(value: unknown): ExternalAwaitableDescriptor_v1;
|
|
7521
|
+
declare function containsAttemptAwaitableCredentialValue(value: string): boolean;
|
|
7522
|
+
|
|
7523
|
+
declare const AttemptAwaitableEventType_v1: z.ZodEnum<{
|
|
7524
|
+
awaitable_registered: "awaitable_registered";
|
|
7525
|
+
awaitable_observation_claimed: "awaitable_observation_claimed";
|
|
7526
|
+
awaitable_observation_released: "awaitable_observation_released";
|
|
7527
|
+
awaitable_terminal_recorded: "awaitable_terminal_recorded";
|
|
7528
|
+
awaitable_delivery_attempted: "awaitable_delivery_attempted";
|
|
7529
|
+
awaitable_delivery_acknowledged: "awaitable_delivery_acknowledged";
|
|
7530
|
+
}>;
|
|
7531
|
+
type AttemptAwaitableEventType_v1 = z.infer<typeof AttemptAwaitableEventType_v1>;
|
|
7532
|
+
declare const AttemptAwaitableEvent_v1: z.ZodObject<{
|
|
7533
|
+
schema_version: z.ZodLiteral<"1.0.0">;
|
|
7534
|
+
awaitable_id: z.ZodString;
|
|
7535
|
+
attempt_id: z.ZodString;
|
|
7536
|
+
sequence: z.ZodNumber;
|
|
7537
|
+
awaitable_revision: z.ZodNumber;
|
|
7538
|
+
mutation_id: z.ZodString;
|
|
7539
|
+
mutation_fingerprint: z.ZodString;
|
|
7540
|
+
type: z.ZodEnum<{
|
|
7541
|
+
awaitable_registered: "awaitable_registered";
|
|
7542
|
+
awaitable_observation_claimed: "awaitable_observation_claimed";
|
|
7543
|
+
awaitable_observation_released: "awaitable_observation_released";
|
|
7544
|
+
awaitable_terminal_recorded: "awaitable_terminal_recorded";
|
|
7545
|
+
awaitable_delivery_attempted: "awaitable_delivery_attempted";
|
|
7546
|
+
awaitable_delivery_acknowledged: "awaitable_delivery_acknowledged";
|
|
7547
|
+
}>;
|
|
7548
|
+
payload: z.ZodCustom<JsonValue, JsonValue>;
|
|
7549
|
+
created_at: z.ZodString;
|
|
7550
|
+
}, z.core.$strict>;
|
|
7551
|
+
type AttemptAwaitableEvent_v1 = z.infer<typeof AttemptAwaitableEvent_v1>;
|
|
7552
|
+
interface AttemptAwaitableLeaseCredential {
|
|
7553
|
+
observerId: string;
|
|
7554
|
+
leaseId: string;
|
|
7555
|
+
fencingToken: number;
|
|
7556
|
+
}
|
|
7557
|
+
interface RegisterAttemptAwaitableInput {
|
|
7558
|
+
awaitableId: string;
|
|
7559
|
+
attemptId: string;
|
|
7560
|
+
workerSessionId?: string;
|
|
7561
|
+
descriptor: ExternalAwaitableDescriptor_v1;
|
|
7562
|
+
deadlineAt: string;
|
|
7563
|
+
mutationId: string;
|
|
7564
|
+
now: string;
|
|
7565
|
+
}
|
|
7566
|
+
interface ClaimAttemptAwaitableObservationInput {
|
|
7567
|
+
awaitableId: string;
|
|
7568
|
+
expectedRevision: number;
|
|
7569
|
+
observerId: string;
|
|
7570
|
+
leaseId: string;
|
|
7571
|
+
ttlMs: number;
|
|
7572
|
+
mutationId: string;
|
|
7573
|
+
now: string;
|
|
7574
|
+
}
|
|
7575
|
+
interface ReleaseAttemptAwaitableObservationInput {
|
|
7576
|
+
awaitableId: string;
|
|
7577
|
+
expectedRevision: number;
|
|
7578
|
+
lease: AttemptAwaitableLeaseCredential;
|
|
7579
|
+
mutationId: string;
|
|
7580
|
+
now: string;
|
|
7581
|
+
}
|
|
7582
|
+
interface CompleteAttemptAwaitableInput {
|
|
7583
|
+
awaitableId: string;
|
|
7584
|
+
expectedRevision: number;
|
|
7585
|
+
lease: AttemptAwaitableLeaseCredential;
|
|
7586
|
+
result: AttemptAwaitableTerminalResult_v1;
|
|
7587
|
+
mutationId: string;
|
|
7588
|
+
now: string;
|
|
7589
|
+
}
|
|
7590
|
+
interface CancelAttemptAwaitableInput {
|
|
7591
|
+
awaitableId: string;
|
|
7592
|
+
expectedRevision: number;
|
|
7593
|
+
mutationId: string;
|
|
7594
|
+
now: string;
|
|
7595
|
+
}
|
|
7596
|
+
interface BeginAttemptAwaitableDeliveryInput {
|
|
7597
|
+
awaitableId: string;
|
|
7598
|
+
expectedRevision: number;
|
|
7599
|
+
mutationId: string;
|
|
7600
|
+
now: string;
|
|
7601
|
+
}
|
|
7602
|
+
interface AcknowledgeAttemptAwaitableDeliveryInput {
|
|
7603
|
+
awaitableId: string;
|
|
7604
|
+
expectedRevision: number;
|
|
7605
|
+
deliveryId: string;
|
|
7606
|
+
completionHash: string;
|
|
7607
|
+
mutationId: string;
|
|
7608
|
+
now: string;
|
|
7609
|
+
}
|
|
7610
|
+
type AttemptAwaitableMutationFailureReason = "not_found" | "attempt_not_live" | "target_mismatch" | "awaitable_conflict" | "mutation_conflict" | "stale_revision" | "held_by_other" | "lease_mismatch" | "terminal_latched" | "not_observing" | "not_terminal" | "delivery_conflict";
|
|
7611
|
+
type RegisterAttemptAwaitableResult = {
|
|
7612
|
+
registered: true;
|
|
7613
|
+
record: AttemptAwaitableRecord_v1;
|
|
7614
|
+
idempotentReplay: boolean;
|
|
7615
|
+
} | {
|
|
7616
|
+
registered: false;
|
|
7617
|
+
reason: AttemptAwaitableMutationFailureReason;
|
|
7618
|
+
};
|
|
7619
|
+
type ClaimAttemptAwaitableObservationResult = {
|
|
7620
|
+
claimed: true;
|
|
7621
|
+
record: AttemptAwaitableRecord_v1;
|
|
7622
|
+
lease: AttemptAwaitableObserverLease_v1;
|
|
7623
|
+
idempotentReplay: boolean;
|
|
7624
|
+
} | {
|
|
7625
|
+
claimed: false;
|
|
7626
|
+
reason: AttemptAwaitableMutationFailureReason;
|
|
7627
|
+
record?: AttemptAwaitableRecord_v1;
|
|
7628
|
+
};
|
|
7629
|
+
type MutateAttemptAwaitableResult = {
|
|
7630
|
+
updated: true;
|
|
7631
|
+
record: AttemptAwaitableRecord_v1;
|
|
7632
|
+
idempotentReplay: boolean;
|
|
7633
|
+
} | {
|
|
7634
|
+
updated: false;
|
|
7635
|
+
reason: AttemptAwaitableMutationFailureReason;
|
|
7636
|
+
record?: AttemptAwaitableRecord_v1;
|
|
7637
|
+
};
|
|
7638
|
+
interface AttemptAwaitableStore {
|
|
7639
|
+
registerAttemptAwaitable(input: RegisterAttemptAwaitableInput): Promise<RegisterAttemptAwaitableResult>;
|
|
7640
|
+
claimAttemptAwaitableObservation(input: ClaimAttemptAwaitableObservationInput): Promise<ClaimAttemptAwaitableObservationResult>;
|
|
7641
|
+
releaseAttemptAwaitableObservation(input: ReleaseAttemptAwaitableObservationInput): Promise<MutateAttemptAwaitableResult>;
|
|
7642
|
+
completeAttemptAwaitable(input: CompleteAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
7643
|
+
cancelAttemptAwaitable(input: CancelAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
7644
|
+
beginAttemptAwaitableDelivery(input: BeginAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
7645
|
+
acknowledgeAttemptAwaitableDelivery(input: AcknowledgeAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
7646
|
+
getAttemptAwaitable(awaitableId: string): Promise<AttemptAwaitableRecord_v1 | null>;
|
|
7647
|
+
listRecoverableAttemptAwaitables(now: string): Promise<AttemptAwaitableRecord_v1[]>;
|
|
7648
|
+
listPendingAttemptAwaitableDeliveries(): Promise<AttemptAwaitableRecord_v1[]>;
|
|
7649
|
+
listAttemptAwaitableEvents(awaitableId: string): Promise<AttemptAwaitableEvent_v1[]>;
|
|
7650
|
+
}
|
|
7651
|
+
declare function parseAttemptAwaitableRecord(value: unknown): AttemptAwaitableRecord_v1;
|
|
7652
|
+
declare function parseAttemptAwaitableDescriptor(value: unknown): ExternalAwaitableDescriptor_v1;
|
|
7653
|
+
declare function parseAttemptAwaitableTerminalResult(value: unknown): AttemptAwaitableTerminalResult_v1;
|
|
7654
|
+
|
|
7655
|
+
interface AttemptAwaitableObservationRequest {
|
|
7656
|
+
descriptor: ExternalAwaitableDescriptor_v1;
|
|
7657
|
+
deadlineMs: number;
|
|
7658
|
+
signal: AbortSignal;
|
|
7659
|
+
}
|
|
7660
|
+
/** AXF-facing port. Authority is supplied by this host adapter, never by the durable descriptor. */
|
|
7661
|
+
interface AttemptAwaitableObserver {
|
|
7662
|
+
observe(request: AttemptAwaitableObservationRequest): Promise<AxfExternalAwaitResult_v1>;
|
|
7663
|
+
}
|
|
7664
|
+
/**
|
|
7665
|
+
* Provider-neutral continuation port. Implementations may enqueue a session message, notify a
|
|
7666
|
+
* coordinator, or persist another outbox entry. They must deduplicate by completion.delivery_id.
|
|
7667
|
+
*/
|
|
7668
|
+
interface AttemptAwaitableNotifier {
|
|
7669
|
+
deliver(completion: AttemptAwaitableCompletion_v1): Promise<void>;
|
|
7670
|
+
}
|
|
7671
|
+
type AttemptAwaitableSupervisorNotice = {
|
|
7672
|
+
type: "observation_started";
|
|
7673
|
+
awaitableId: string;
|
|
7674
|
+
} | {
|
|
7675
|
+
type: "observation_released";
|
|
7676
|
+
awaitableId: string;
|
|
7677
|
+
reason: string;
|
|
7678
|
+
} | {
|
|
7679
|
+
type: "terminal_recorded";
|
|
7680
|
+
awaitableId: string;
|
|
7681
|
+
outcome: string;
|
|
7682
|
+
} | {
|
|
7683
|
+
type: "delivery_succeeded";
|
|
7684
|
+
awaitableId: string;
|
|
7685
|
+
deliveryId: string;
|
|
7686
|
+
} | {
|
|
7687
|
+
type: "operation_failed";
|
|
7688
|
+
awaitableId: string;
|
|
7689
|
+
operation: "observe" | "release" | "deliver";
|
|
7690
|
+
message: string;
|
|
7691
|
+
};
|
|
7692
|
+
interface AttemptAwaitableSupervisorOptions {
|
|
7693
|
+
observerId: string;
|
|
7694
|
+
now?: () => string;
|
|
7695
|
+
leaseGraceMs?: number;
|
|
7696
|
+
createLeaseId?: (awaitableId: string) => string;
|
|
7697
|
+
deliveryRetryInitialMs?: number;
|
|
7698
|
+
deliveryRetryMaxMs?: number;
|
|
7699
|
+
onNotice?: (notice: AttemptAwaitableSupervisorNotice) => void | Promise<void>;
|
|
7700
|
+
}
|
|
7701
|
+
interface RegisterDurableAttemptAwaitableInput {
|
|
7702
|
+
awaitableId: string;
|
|
7703
|
+
attemptId: string;
|
|
7704
|
+
workerSessionId?: string;
|
|
7705
|
+
descriptor: ExternalAwaitableDescriptor_v1;
|
|
7706
|
+
deadlineMs: number;
|
|
7707
|
+
mutationId: string;
|
|
7708
|
+
}
|
|
7709
|
+
interface RegisterDurableAttemptAwaitableResult {
|
|
7710
|
+
registration: RegisterAttemptAwaitableResult;
|
|
7711
|
+
attachment?: AttemptAwaitableAttachmentResult;
|
|
7712
|
+
}
|
|
7713
|
+
type AttemptAwaitableAttachmentResult = "attached" | "delivery_attached" | "already_attached" | "held_by_other" | "not_found" | "not_recoverable";
|
|
7714
|
+
/**
|
|
7715
|
+
* Durable registration, restart recovery, and at-least-once completion delivery for Attempt-bound
|
|
7716
|
+
* external awaitables. Recovery performs one inventory read; live waiting happens inside AXF and
|
|
7717
|
+
* notification is event-driven. This supervisor never polls from the model or from LexRunner.
|
|
7718
|
+
*/
|
|
7719
|
+
declare class AttemptAwaitableSupervisor {
|
|
7720
|
+
private readonly store;
|
|
7721
|
+
private readonly observer;
|
|
7722
|
+
private readonly notifier;
|
|
7723
|
+
private readonly options;
|
|
7724
|
+
private readonly observations;
|
|
7725
|
+
private readonly deliveries;
|
|
7726
|
+
private readonly leaseExpiryWakeups;
|
|
7727
|
+
private readonly now;
|
|
7728
|
+
private readonly leaseGraceMs;
|
|
7729
|
+
private readonly createLeaseId;
|
|
7730
|
+
private readonly deliveryRetryInitialMs;
|
|
7731
|
+
private readonly deliveryRetryMaxMs;
|
|
7732
|
+
private stopping;
|
|
7733
|
+
constructor(store: AttemptAwaitableStore, observer: AttemptAwaitableObserver, notifier: AttemptAwaitableNotifier, options: AttemptAwaitableSupervisorOptions);
|
|
7734
|
+
register(input: RegisterDurableAttemptAwaitableInput): Promise<RegisterDurableAttemptAwaitableResult>;
|
|
7735
|
+
recover(): Promise<{
|
|
7736
|
+
observations: string[];
|
|
7737
|
+
deliveries: string[];
|
|
7738
|
+
heldByOther: string[];
|
|
7739
|
+
}>;
|
|
7740
|
+
attach(awaitableId: string): Promise<AttemptAwaitableAttachmentResult>;
|
|
7741
|
+
cancel(awaitableId: string, mutationId: string): Promise<MutateAttemptAwaitableResult>;
|
|
7742
|
+
get(awaitableId: string): Promise<AttemptAwaitableRecord_v1 | null>;
|
|
7743
|
+
wait(awaitableId: string): Promise<void>;
|
|
7744
|
+
shutdown(): Promise<void>;
|
|
7745
|
+
private runObservation;
|
|
7746
|
+
private recordLexRunnerDeadline;
|
|
7747
|
+
private complete;
|
|
7748
|
+
private release;
|
|
7749
|
+
private attachDelivery;
|
|
7750
|
+
private scheduleLeaseExpiryWakeup;
|
|
7751
|
+
private clearLeaseExpiryWakeup;
|
|
7752
|
+
private runDelivery;
|
|
7753
|
+
private retryDelay;
|
|
7754
|
+
private notice;
|
|
7755
|
+
}
|
|
7756
|
+
|
|
7757
|
+
interface AxfCliAttemptAwaitableObserverOptions {
|
|
7758
|
+
executable?: string;
|
|
7759
|
+
executableArgs?: readonly string[];
|
|
7760
|
+
capabilityId?: "global.wait.external" | "global.await.external";
|
|
7761
|
+
cwd?: string;
|
|
7762
|
+
/** Resolve authority at observation time. The returned values are never persisted by LexRunner. */
|
|
7763
|
+
environment?: () => NodeJS.ProcessEnv;
|
|
7764
|
+
}
|
|
7765
|
+
/** No-shell AXF CLI adapter for one bounded, process-bound external wait. */
|
|
7766
|
+
declare class AxfCliAttemptAwaitableObserver implements AttemptAwaitableObserver {
|
|
7767
|
+
private readonly options;
|
|
7768
|
+
private readonly executable;
|
|
7769
|
+
private readonly executableArgs;
|
|
7770
|
+
private readonly capabilityId;
|
|
7771
|
+
constructor(options?: AxfCliAttemptAwaitableObserverOptions);
|
|
7772
|
+
observe(request: AttemptAwaitableObservationRequest): Promise<AxfExternalAwaitResult_v1>;
|
|
7773
|
+
}
|
|
7774
|
+
|
|
6846
7775
|
interface AttemptReceiptStatusResult {
|
|
6847
7776
|
receipt: AttemptReceiptStatusProjection | null;
|
|
6848
7777
|
}
|
|
@@ -7053,6 +7982,346 @@ interface AttemptVerificationHandlerOptions {
|
|
|
7053
7982
|
}
|
|
7054
7983
|
declare function createAttemptVerificationHandlers(options?: AttemptVerificationHandlerOptions): AttemptVerificationHandlers;
|
|
7055
7984
|
|
|
7985
|
+
/** Deterministic in-memory implementation of the controller coordination contract. */
|
|
7986
|
+
declare class InMemoryCoordinationStore implements CoordinationStore {
|
|
7987
|
+
private readonly records;
|
|
7988
|
+
private readonly events;
|
|
7989
|
+
acquireControllerLease(input: AcquireControllerLeaseInput): Promise<AcquireControllerLeaseResult>;
|
|
7990
|
+
renewControllerLease(input: RenewControllerLeaseInput): Promise<RenewControllerLeaseResult>;
|
|
7991
|
+
releaseControllerLease(input: ReleaseControllerLeaseInput): Promise<ReleaseControllerLeaseResult>;
|
|
7992
|
+
getControllerLease(runId: string): Promise<ControllerLease | null>;
|
|
7993
|
+
getRunCoordination(runId: string): Promise<RunCoordinationRecord | null>;
|
|
7994
|
+
listRunCoordinationEvents(runId: string): Promise<RunCoordinationEvent[]>;
|
|
7995
|
+
compareAndSetRunState(input: CompareAndSetRunStateInput): Promise<CompareAndSetRunStateResult>;
|
|
7996
|
+
close(): Promise<void>;
|
|
7997
|
+
/**
|
|
7998
|
+
* Execute an in-memory mutation while the presented controller lease is
|
|
7999
|
+
* authoritative. Subclasses use this synchronous critical section so a
|
|
8000
|
+
* workspace mutation cannot be separated from controller authentication.
|
|
8001
|
+
*/
|
|
8002
|
+
protected withActiveControllerCredential<T>(credential: {
|
|
8003
|
+
runId: string;
|
|
8004
|
+
controllerId: string;
|
|
8005
|
+
leaseId: string;
|
|
8006
|
+
fencingToken: number;
|
|
8007
|
+
}, now: string, expectedRunRevision: number, action: () => T): {
|
|
8008
|
+
authenticated: true;
|
|
8009
|
+
value: T;
|
|
8010
|
+
} | {
|
|
8011
|
+
authenticated: false;
|
|
8012
|
+
reason: "no_active_lease" | "lease_mismatch" | "stale_fence" | "lease_expired" | "stale_run_revision";
|
|
8013
|
+
currentRunRevision?: number;
|
|
8014
|
+
};
|
|
8015
|
+
private createLease;
|
|
8016
|
+
private toPublicRecord;
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* In-memory authoritative controller + workspace lifecycle store.
|
|
8021
|
+
*
|
|
8022
|
+
* Extending the coordination store is intentional: controller credential
|
|
8023
|
+
* validation and each attempt/lease/event mutation share one synchronous
|
|
8024
|
+
* critical section instead of becoming two independently canonical stores.
|
|
8025
|
+
*/
|
|
8026
|
+
declare class InMemoryWorkspaceLifecycleStore extends InMemoryCoordinationStore implements WorkspaceLifecycleStore, LaunchEnvelopeBindingStore, TaskPacketBindingStore, WorkerSessionStore, WorkerAuthorityDecisionStore, AttemptVerificationStore, AttemptAcceptanceStore, AgentWorkFanoutStore {
|
|
8027
|
+
private readonly attempts;
|
|
8028
|
+
private readonly attemptRetryDeltas;
|
|
8029
|
+
private readonly fanoutPlans;
|
|
8030
|
+
private readonly fanoutBindings;
|
|
8031
|
+
private readonly fanInDecisions;
|
|
8032
|
+
private readonly fanInDecisionByFanout;
|
|
8033
|
+
private readonly fanoutMutations;
|
|
8034
|
+
private readonly workspaceLeases;
|
|
8035
|
+
private readonly lifecycleEvents;
|
|
8036
|
+
private readonly mutations;
|
|
8037
|
+
private readonly workerSessions;
|
|
8038
|
+
private readonly workerAdapterBindings;
|
|
8039
|
+
private readonly workerSessionByAttempt;
|
|
8040
|
+
private readonly workerEvents;
|
|
8041
|
+
private readonly workerMutations;
|
|
8042
|
+
private readonly workerAuthorityEvents;
|
|
8043
|
+
private readonly workerAuthorityMutations;
|
|
8044
|
+
private readonly launchEnvelopeBindings;
|
|
8045
|
+
private readonly taskPacketBindings;
|
|
8046
|
+
private readonly attemptReceipts;
|
|
8047
|
+
private readonly receiptByAttempt;
|
|
8048
|
+
private readonly receiptByHash;
|
|
8049
|
+
private readonly receiptEvents;
|
|
8050
|
+
private readonly receiptMutations;
|
|
8051
|
+
private readonly attemptVerifications;
|
|
8052
|
+
private readonly verificationAuthorizations;
|
|
8053
|
+
private readonly verificationAuthorizationByAttempt;
|
|
8054
|
+
private readonly verificationByAttempt;
|
|
8055
|
+
private readonly verificationByHash;
|
|
8056
|
+
private readonly verificationEvents;
|
|
8057
|
+
private readonly verificationMutations;
|
|
8058
|
+
private readonly verificationBeginMutations;
|
|
8059
|
+
createAttempt(input: CreateAttemptInput): Promise<WorkspaceMutationResult>;
|
|
8060
|
+
transitionAttempt(input: TransitionAttemptInput): Promise<WorkspaceMutationResult>;
|
|
8061
|
+
acquireWorkspace(input: AcquireWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8062
|
+
heartbeatWorkspace(input: HeartbeatWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8063
|
+
releaseWorkspace(input: ReleaseWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8064
|
+
reconcileWorkspace(input: ReconcileWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8065
|
+
quarantineWorkspace(input: QuarantineWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8066
|
+
getAttempt(attemptId: string): Promise<AttemptRecord | null>;
|
|
8067
|
+
listAttempts(runId: string): Promise<AttemptRecord[]>;
|
|
8068
|
+
createFanoutPlan(input: CreateFanoutPlanInput): Promise<FanoutPlanMutationResult>;
|
|
8069
|
+
getFanoutPlan(fanoutId: string): Promise<FanoutPlanRecord | null>;
|
|
8070
|
+
getAttemptFanoutBinding(attemptId: string): Promise<FanoutAttemptBindingRecord | null>;
|
|
8071
|
+
listFanoutAttemptBindings(fanoutId: string): Promise<FanoutAttemptBindingRecord[]>;
|
|
8072
|
+
commitFanInDecision(input: CommitFanInDecisionInput): Promise<FanInDecisionMutationResult>;
|
|
8073
|
+
getFanInDecision(decisionId: string): Promise<FanInDecisionRecord | null>;
|
|
8074
|
+
getFanInDecisionForFanout(fanoutId: string): Promise<FanInDecisionRecord | null>;
|
|
8075
|
+
getAttemptRetryDelta(attemptId: string): Promise<AttemptRetryDeltaRecord | null>;
|
|
8076
|
+
getWorkspaceLease(leaseId: string): Promise<WorkspaceLifecycleLeaseRecord | null>;
|
|
8077
|
+
listWorkspaceLeases(runId: string): Promise<WorkspaceLifecycleLeaseRecord[]>;
|
|
8078
|
+
listWorkspaceLifecycleEvents(runId: string): Promise<WorkspaceLifecycleEvent[]>;
|
|
8079
|
+
bindLaunchEnvelope(input: BindLaunchEnvelopeInput): Promise<LaunchEnvelopeBindingResult>;
|
|
8080
|
+
getLaunchEnvelopeBinding(attemptId: string): Promise<LaunchEnvelopeBindingRecord | null>;
|
|
8081
|
+
reconcileIncompleteLaunch(input: ReconcileIncompleteLaunchInput): Promise<WorkspaceMutationResult>;
|
|
8082
|
+
getTaskPacketBinding(attemptId: string): Promise<TaskPacketBindingRecord | null>;
|
|
8083
|
+
attachWorkerSession(input: AttachWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8084
|
+
heartbeatWorkerSession(input: HeartbeatWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8085
|
+
endWorkerSession(input: EndWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8086
|
+
getWorkerSession(sessionId: string): Promise<WorkerSessionRecord | null>;
|
|
8087
|
+
getWorkerSessionForAttempt(attemptId: string): Promise<WorkerSessionRecord | null>;
|
|
8088
|
+
getWorkerAdapterBinding(sessionId: string): Promise<WorkerAdapterBindingRecord | null>;
|
|
8089
|
+
listWorkerSessionEvents(runId: string): Promise<WorkerSessionEvent[]>;
|
|
8090
|
+
recordWorkerAuthorityDecision(input: RecordWorkerAuthorityDecisionInput): Promise<WorkerAuthorityDecisionResult>;
|
|
8091
|
+
listWorkerAuthorityEvents(runId: string): Promise<WorkerAuthorityEventRecord[]>;
|
|
8092
|
+
submitAttemptReceipt(input: SubmitAttemptReceiptInput): Promise<AttemptReceiptSubmissionResult>;
|
|
8093
|
+
getAttemptReceipt(receiptId: string): Promise<AttemptReceiptRecord | null>;
|
|
8094
|
+
getAttemptReceiptForAttempt(attemptId: string): Promise<AttemptReceiptRecord | null>;
|
|
8095
|
+
getAttemptReceiptByHash(receiptHash: string): Promise<AttemptReceiptRecord | null>;
|
|
8096
|
+
listAttemptReceiptEvents(runId: string): Promise<AttemptReceiptEvent[]>;
|
|
8097
|
+
beginAttemptVerification(input: BeginAttemptVerificationInput): Promise<AttemptVerificationBeginResult>;
|
|
8098
|
+
submitAttemptVerification(input: SubmitAttemptVerificationInput): Promise<AttemptVerificationSubmissionResult>;
|
|
8099
|
+
getAttemptVerification(verificationId: string): Promise<AttemptVerificationRecord | null>;
|
|
8100
|
+
getAttemptVerificationForAttempt(attemptId: string): Promise<AttemptVerificationRecord | null>;
|
|
8101
|
+
getAttemptVerificationByHash(verificationHash: string): Promise<AttemptVerificationRecord | null>;
|
|
8102
|
+
listAttemptVerificationEvents(runId: string): Promise<AttemptVerificationEvent[]>;
|
|
8103
|
+
getAttemptVerificationAuthorization(verificationId: string): Promise<AttemptVerificationAuthorizationRecord | null>;
|
|
8104
|
+
getAttemptVerificationAuthorizationForAttempt(attemptId: string): Promise<AttemptVerificationAuthorizationRecord | null>;
|
|
8105
|
+
applyAttemptAcceptance(input: ApplyAttemptAcceptanceInput): Promise<WorkspaceMutationResult>;
|
|
8106
|
+
private submitNewVerification;
|
|
8107
|
+
private recordVerificationEvent;
|
|
8108
|
+
private recordVerificationStartedEvent;
|
|
8109
|
+
private verificationBeginFailure;
|
|
8110
|
+
private verificationFailure;
|
|
8111
|
+
private committedVerificationResult;
|
|
8112
|
+
private submitNewReceipt;
|
|
8113
|
+
private recordReceiptEvent;
|
|
8114
|
+
private receiptFailure;
|
|
8115
|
+
private committedReceiptResult;
|
|
8116
|
+
private mutateWorker;
|
|
8117
|
+
private validateWorkerBinding;
|
|
8118
|
+
private validateSession;
|
|
8119
|
+
private recordWorker;
|
|
8120
|
+
private workerFailure;
|
|
8121
|
+
private authorityFailure;
|
|
8122
|
+
private mutate;
|
|
8123
|
+
private mutateWorkspace;
|
|
8124
|
+
private validateAttempt;
|
|
8125
|
+
private validateRetryDelta;
|
|
8126
|
+
private validateFanoutBinding;
|
|
8127
|
+
private hasNonFanoutMutation;
|
|
8128
|
+
private validFanInDecision;
|
|
8129
|
+
private validInheritedRetryEvidence;
|
|
8130
|
+
private finishLease;
|
|
8131
|
+
private quarantine;
|
|
8132
|
+
private record;
|
|
8133
|
+
private failure;
|
|
8134
|
+
}
|
|
8135
|
+
|
|
8136
|
+
type AwaitableRecord$1 = ReturnType<typeof AttemptAwaitableRecord_v1.parse>;
|
|
8137
|
+
declare class InMemoryAttemptAwaitableStore extends InMemoryWorkspaceLifecycleStore implements AttemptAwaitableStore {
|
|
8138
|
+
private readonly awaitables;
|
|
8139
|
+
private readonly awaitableEvents;
|
|
8140
|
+
registerAttemptAwaitable(input: RegisterAttemptAwaitableInput): Promise<RegisterAttemptAwaitableResult>;
|
|
8141
|
+
claimAttemptAwaitableObservation(input: ClaimAttemptAwaitableObservationInput): Promise<ClaimAttemptAwaitableObservationResult>;
|
|
8142
|
+
releaseAttemptAwaitableObservation(input: ReleaseAttemptAwaitableObservationInput): Promise<MutateAttemptAwaitableResult>;
|
|
8143
|
+
completeAttemptAwaitable(input: CompleteAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
8144
|
+
cancelAttemptAwaitable(input: CancelAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
8145
|
+
beginAttemptAwaitableDelivery(input: BeginAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
8146
|
+
acknowledgeAttemptAwaitableDelivery(input: AcknowledgeAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
8147
|
+
getAttemptAwaitable(awaitableId: string): Promise<AwaitableRecord$1 | null>;
|
|
8148
|
+
listRecoverableAttemptAwaitables(nowCandidate: string): Promise<AwaitableRecord$1[]>;
|
|
8149
|
+
listPendingAttemptAwaitableDeliveries(): Promise<AwaitableRecord$1[]>;
|
|
8150
|
+
listAttemptAwaitableEvents(awaitableId: string): Promise<AttemptAwaitableEvent_v1[]>;
|
|
8151
|
+
private mutateAwaitable;
|
|
8152
|
+
private appendEvent;
|
|
8153
|
+
private findMutation;
|
|
8154
|
+
}
|
|
8155
|
+
|
|
8156
|
+
interface SqliteCoordinationStoreOptions {
|
|
8157
|
+
readOnly?: boolean;
|
|
8158
|
+
}
|
|
8159
|
+
/** SQLite implementation with transactionally serialized lease and CAS operations. */
|
|
8160
|
+
declare class SqliteCoordinationStore implements CoordinationStore {
|
|
8161
|
+
/** Shared connection for additive stores whose mutations must share this transaction boundary. */
|
|
8162
|
+
protected readonly db: Database;
|
|
8163
|
+
private closed;
|
|
8164
|
+
constructor(dbPath: string, options?: SqliteCoordinationStoreOptions);
|
|
8165
|
+
acquireControllerLease(input: AcquireControllerLeaseInput): Promise<AcquireControllerLeaseResult>;
|
|
8166
|
+
renewControllerLease(input: RenewControllerLeaseInput): Promise<RenewControllerLeaseResult>;
|
|
8167
|
+
releaseControllerLease(input: ReleaseControllerLeaseInput): Promise<ReleaseControllerLeaseResult>;
|
|
8168
|
+
getControllerLease(runId: string): Promise<ControllerLease | null>;
|
|
8169
|
+
getRunCoordination(runId: string): Promise<RunCoordinationRecord | null>;
|
|
8170
|
+
listRunCoordinationEvents(runId: string): Promise<RunCoordinationEvent[]>;
|
|
8171
|
+
compareAndSetRunState(input: CompareAndSetRunStateInput): Promise<CompareAndSetRunStateResult>;
|
|
8172
|
+
close(): Promise<void>;
|
|
8173
|
+
protected immediateTransaction<T>(fn: () => T): T;
|
|
8174
|
+
private applyCoordinationMigration;
|
|
8175
|
+
private selectRow;
|
|
8176
|
+
private requireRow;
|
|
8177
|
+
private selectEvent;
|
|
8178
|
+
private requireEvent;
|
|
8179
|
+
private createLease;
|
|
8180
|
+
private rowToLease;
|
|
8181
|
+
private rowToRecord;
|
|
8182
|
+
private rowToEvent;
|
|
8183
|
+
private serializeState;
|
|
8184
|
+
}
|
|
8185
|
+
|
|
8186
|
+
/** SQLite attempt/workspace store sharing the authoritative controller transaction. */
|
|
8187
|
+
declare class SqliteWorkspaceLifecycleStore extends SqliteCoordinationStore implements WorkspaceLifecycleStore, LaunchEnvelopeBindingStore, TaskPacketBindingStore, WorkerSessionStore, WorkerAuthorityDecisionStore, AttemptVerificationStore, AttemptAcceptanceStore, AgentWorkFanoutStore {
|
|
8188
|
+
constructor(dbPath: string, options?: SqliteCoordinationStoreOptions);
|
|
8189
|
+
createAttempt(input: CreateAttemptInput): Promise<WorkspaceMutationResult>;
|
|
8190
|
+
transitionAttempt(input: TransitionAttemptInput): Promise<WorkspaceMutationResult>;
|
|
8191
|
+
acquireWorkspace(input: AcquireWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8192
|
+
heartbeatWorkspace(input: HeartbeatWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8193
|
+
releaseWorkspace(input: ReleaseWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8194
|
+
reconcileWorkspace(input: ReconcileWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8195
|
+
quarantineWorkspace(input: QuarantineWorkspaceInput): Promise<WorkspaceMutationResult>;
|
|
8196
|
+
getAttempt(attemptId: string): Promise<AttemptRecord | null>;
|
|
8197
|
+
listAttempts(runId: string): Promise<AttemptRecord[]>;
|
|
8198
|
+
createFanoutPlan(input: CreateFanoutPlanInput): Promise<FanoutPlanMutationResult>;
|
|
8199
|
+
getFanoutPlan(fanoutId: string): Promise<FanoutPlanRecord | null>;
|
|
8200
|
+
getAttemptFanoutBinding(attemptId: string): Promise<FanoutAttemptBindingRecord | null>;
|
|
8201
|
+
listFanoutAttemptBindings(fanoutId: string): Promise<FanoutAttemptBindingRecord[]>;
|
|
8202
|
+
commitFanInDecision(input: CommitFanInDecisionInput): Promise<FanInDecisionMutationResult>;
|
|
8203
|
+
getFanInDecision(decisionId: string): Promise<FanInDecisionRecord | null>;
|
|
8204
|
+
getFanInDecisionForFanout(fanoutId: string): Promise<FanInDecisionRecord | null>;
|
|
8205
|
+
getAttemptRetryDelta(attemptId: string): Promise<AttemptRetryDeltaRecord | null>;
|
|
8206
|
+
getWorkspaceLease(leaseId: string): Promise<WorkspaceLifecycleLeaseRecord | null>;
|
|
8207
|
+
listWorkspaceLeases(runId: string): Promise<WorkspaceLifecycleLeaseRecord[]>;
|
|
8208
|
+
listWorkspaceLifecycleEvents(runId: string): Promise<WorkspaceLifecycleEvent[]>;
|
|
8209
|
+
bindLaunchEnvelope(input: BindLaunchEnvelopeInput): Promise<LaunchEnvelopeBindingResult>;
|
|
8210
|
+
getLaunchEnvelopeBinding(attemptId: string): Promise<LaunchEnvelopeBindingRecord | null>;
|
|
8211
|
+
reconcileIncompleteLaunch(input: ReconcileIncompleteLaunchInput): Promise<WorkspaceMutationResult>;
|
|
8212
|
+
getTaskPacketBinding(attemptId: string): Promise<TaskPacketBindingRecord | null>;
|
|
8213
|
+
attachWorkerSession(input: AttachWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8214
|
+
heartbeatWorkerSession(input: HeartbeatWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8215
|
+
endWorkerSession(input: EndWorkerSessionInput): Promise<WorkerSessionMutationResult>;
|
|
8216
|
+
getWorkerSession(sessionId: string): Promise<WorkerSessionRecord | null>;
|
|
8217
|
+
getWorkerSessionForAttempt(attemptId: string): Promise<WorkerSessionRecord | null>;
|
|
8218
|
+
getWorkerAdapterBinding(sessionId: string): Promise<WorkerAdapterBindingRecord | null>;
|
|
8219
|
+
listWorkerSessionEvents(runId: string): Promise<WorkerSessionEvent[]>;
|
|
8220
|
+
recordWorkerAuthorityDecision(input: RecordWorkerAuthorityDecisionInput): Promise<WorkerAuthorityDecisionResult>;
|
|
8221
|
+
listWorkerAuthorityEvents(runId: string): Promise<WorkerAuthorityEventRecord[]>;
|
|
8222
|
+
submitAttemptReceipt(input: SubmitAttemptReceiptInput): Promise<AttemptReceiptSubmissionResult>;
|
|
8223
|
+
getAttemptReceipt(receiptId: string): Promise<AttemptReceiptRecord | null>;
|
|
8224
|
+
getAttemptReceiptForAttempt(attemptId: string): Promise<AttemptReceiptRecord | null>;
|
|
8225
|
+
getAttemptReceiptByHash(receiptHash: string): Promise<AttemptReceiptRecord | null>;
|
|
8226
|
+
listAttemptReceiptEvents(runId: string): Promise<AttemptReceiptEvent[]>;
|
|
8227
|
+
beginAttemptVerification(input: BeginAttemptVerificationInput): Promise<AttemptVerificationBeginResult>;
|
|
8228
|
+
submitAttemptVerification(input: SubmitAttemptVerificationInput): Promise<AttemptVerificationSubmissionResult>;
|
|
8229
|
+
getAttemptVerification(verificationId: string): Promise<AttemptVerificationRecord | null>;
|
|
8230
|
+
getAttemptVerificationForAttempt(attemptId: string): Promise<AttemptVerificationRecord | null>;
|
|
8231
|
+
getAttemptVerificationByHash(verificationHash: string): Promise<AttemptVerificationRecord | null>;
|
|
8232
|
+
listAttemptVerificationEvents(runId: string): Promise<AttemptVerificationEvent[]>;
|
|
8233
|
+
getAttemptVerificationAuthorization(verificationId: string): Promise<AttemptVerificationAuthorizationRecord | null>;
|
|
8234
|
+
getAttemptVerificationAuthorizationForAttempt(attemptId: string): Promise<AttemptVerificationAuthorizationRecord | null>;
|
|
8235
|
+
applyAttemptAcceptance(input: ApplyAttemptAcceptanceInput): Promise<WorkspaceMutationResult>;
|
|
8236
|
+
private submitNewVerification;
|
|
8237
|
+
private recordVerificationEvent;
|
|
8238
|
+
private recordVerificationStartedEvent;
|
|
8239
|
+
private storeVerificationMutation;
|
|
8240
|
+
private verificationFailure;
|
|
8241
|
+
private verificationBeginFailure;
|
|
8242
|
+
private submitNewReceipt;
|
|
8243
|
+
private recordReceiptEvent;
|
|
8244
|
+
private storeReceiptMutation;
|
|
8245
|
+
private receiptFailure;
|
|
8246
|
+
private committedReceiptResult;
|
|
8247
|
+
private committedVerificationResult;
|
|
8248
|
+
private mutateWorker;
|
|
8249
|
+
private validateWorkerBinding;
|
|
8250
|
+
private validateSession;
|
|
8251
|
+
private recordWorker;
|
|
8252
|
+
private workerFailure;
|
|
8253
|
+
private authorityFailure;
|
|
8254
|
+
private mutate;
|
|
8255
|
+
private mutateWorkspace;
|
|
8256
|
+
private validateAttempt;
|
|
8257
|
+
private finish;
|
|
8258
|
+
private quarantine;
|
|
8259
|
+
private record;
|
|
8260
|
+
private failure;
|
|
8261
|
+
private attempt;
|
|
8262
|
+
private requireAttempt;
|
|
8263
|
+
private lease;
|
|
8264
|
+
private requireLease;
|
|
8265
|
+
private workerSession;
|
|
8266
|
+
private launchEnvelopeBinding;
|
|
8267
|
+
private taskPacketBinding;
|
|
8268
|
+
private attemptReceipt;
|
|
8269
|
+
private requireAttemptReceipt;
|
|
8270
|
+
private attemptReceiptByHash;
|
|
8271
|
+
private getReceiptForAttempt;
|
|
8272
|
+
private attemptVerification;
|
|
8273
|
+
private verificationAuthorization;
|
|
8274
|
+
private requireVerificationAuthorization;
|
|
8275
|
+
private verificationAuthorizationForAttempt;
|
|
8276
|
+
private requireAttemptVerification;
|
|
8277
|
+
private attemptVerificationByHash;
|
|
8278
|
+
private getVerificationForAttempt;
|
|
8279
|
+
private requireLaunchEnvelopeBinding;
|
|
8280
|
+
private hasTable;
|
|
8281
|
+
private requireWorkerSession;
|
|
8282
|
+
private workerSessionForAttempt;
|
|
8283
|
+
private workerSessionForNativeIdentity;
|
|
8284
|
+
private bumpAttempt;
|
|
8285
|
+
private withFanoutAuthority;
|
|
8286
|
+
private fanoutPlan;
|
|
8287
|
+
private fanoutBinding;
|
|
8288
|
+
private fanInDecision;
|
|
8289
|
+
private fanInDecisionForFanout;
|
|
8290
|
+
private validateFanInDecisionRow;
|
|
8291
|
+
private fanoutMutation;
|
|
8292
|
+
private insertFanoutMutation;
|
|
8293
|
+
private nonFanoutMutationClaim;
|
|
8294
|
+
private validateFanoutBinding;
|
|
8295
|
+
private validFanInDecision;
|
|
8296
|
+
private validateRetryDelta;
|
|
8297
|
+
private validInheritedRetryEvidence;
|
|
8298
|
+
private applyWorkspaceMigration;
|
|
8299
|
+
}
|
|
8300
|
+
|
|
8301
|
+
type AwaitableRecord = ReturnType<typeof AttemptAwaitableRecord_v1.parse>;
|
|
8302
|
+
declare class SqliteAttemptAwaitableStore extends SqliteWorkspaceLifecycleStore implements AttemptAwaitableStore {
|
|
8303
|
+
constructor(dbPath: string, options?: SqliteCoordinationStoreOptions);
|
|
8304
|
+
registerAttemptAwaitable(input: RegisterAttemptAwaitableInput): Promise<RegisterAttemptAwaitableResult>;
|
|
8305
|
+
claimAttemptAwaitableObservation(input: ClaimAttemptAwaitableObservationInput): Promise<ClaimAttemptAwaitableObservationResult>;
|
|
8306
|
+
releaseAttemptAwaitableObservation(input: ReleaseAttemptAwaitableObservationInput): Promise<MutateAttemptAwaitableResult>;
|
|
8307
|
+
completeAttemptAwaitable(input: CompleteAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
8308
|
+
cancelAttemptAwaitable(input: CancelAttemptAwaitableInput): Promise<MutateAttemptAwaitableResult>;
|
|
8309
|
+
beginAttemptAwaitableDelivery(input: BeginAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
8310
|
+
acknowledgeAttemptAwaitableDelivery(input: AcknowledgeAttemptAwaitableDeliveryInput): Promise<MutateAttemptAwaitableResult>;
|
|
8311
|
+
getAttemptAwaitable(awaitableId: string): Promise<AwaitableRecord | null>;
|
|
8312
|
+
listRecoverableAttemptAwaitables(nowCandidate: string): Promise<AwaitableRecord[]>;
|
|
8313
|
+
listPendingAttemptAwaitableDeliveries(): Promise<AwaitableRecord[]>;
|
|
8314
|
+
listAttemptAwaitableEvents(awaitableId: string): Promise<AttemptAwaitableEvent_v1[]>;
|
|
8315
|
+
private mutateAwaitable;
|
|
8316
|
+
private insertAwaitable;
|
|
8317
|
+
private updateAwaitable;
|
|
8318
|
+
private insertEvent;
|
|
8319
|
+
private awaitable;
|
|
8320
|
+
private requireAwaitable;
|
|
8321
|
+
private eventByMutation;
|
|
8322
|
+
private applyAwaitableMigration;
|
|
8323
|
+
}
|
|
8324
|
+
|
|
7056
8325
|
/**
|
|
7057
8326
|
* Compute merge order levels using Kahn's algorithm with deterministic ordering
|
|
7058
8327
|
* Returns array of levels, where each level contains item names that can be processed in parallel
|
|
@@ -7850,7 +9119,7 @@ interface BoundedGateRunResult {
|
|
|
7850
9119
|
gates: Array<{
|
|
7851
9120
|
name: string;
|
|
7852
9121
|
status: string;
|
|
7853
|
-
failureKind?: "nonzero_exit" | "spawn_error" | "timeout";
|
|
9122
|
+
failureKind?: "nonzero_exit" | "spawn_error" | "timeout" | "evidence_error";
|
|
7854
9123
|
timeoutCleanup?: {
|
|
7855
9124
|
method: "process-group" | "taskkill" | "direct-child";
|
|
7856
9125
|
forceKilled: boolean;
|
|
@@ -8501,4 +9770,4 @@ declare function createWorkflowGuide(phase: WorkflowPhase): WorkflowGuide;
|
|
|
8501
9770
|
declare function inspectRegisteredCliSurface(): RegisteredCliCommand[];
|
|
8502
9771
|
declare function main(argv?: string[]): Promise<void>;
|
|
8503
9772
|
|
|
8504
|
-
export { AGENT_ENGINE_VERIFICATION_V2_VERSION, AGENT_TASK_RECEIPT_PATCH_PROFILE, AGENT_TASK_RECEIPT_V2_VERSION, AGENT_WORK_CONTRACT_VERSION, AgentEngineVerification_v1, AgentEngineVerification_v2, type AgentExecutionPathBindingContext, type AgentExecutionPathBindingValidation, AgentExecutionPathMapping_v1, type AgentTaskPacketHashInput, AgentTaskPacketHashInput_v1, AgentTaskPacket_v1, type AgentTaskReceiptBindingContext, AgentTaskReceiptOutcome, type AgentTaskReceiptV2BindingContext, AgentTaskReceipt_v1, AgentTaskReceipt_v2, AgentWorkContainmentPreflightRequestJsonSchema, AgentWorkFanInDecision_v1, type AgentWorkFanInResult, AgentWorkFanoutPlan_v1, AgentWorkFanoutService, type AgentWorkPreparationCommandResult, type AgentWorkPreparationCommandRunner, AgentWorkPreparationReceipt_v1, type AgentWorkPreparationResult, AttemptAcceptanceApplyRequestJsonSchema, AttemptAcceptanceStatusRequestJsonSchema, AttemptPrepareRequestJsonSchema, AttemptReceiptStatusRequestJsonSchema, AttemptReceiptSubmitRequestJsonSchema, AttemptRetryDeltaDimension_v1, AttemptRetryDelta_v1, AttemptStartRequestJsonSchema, AttemptStatus, AttemptStatusInputJsonSchema, AttemptVerificationRunRequestJsonSchema, AttemptVerificationStatusRequestJsonSchema, AttemptWorkerAttachRequestJsonSchema, AttemptWorkerEndRequestJsonSchema, AttemptWorkerHeartbeatRequestJsonSchema, AttemptWorkerStatusRequestJsonSchema, Attempt_v1, AuthorityEnvelope, type BoundedDiscoveryResult, type BoundedGateRunResult, type BoundedIntegrationStatus, type BoundedMergeApplicationResult, type BoundedMergeOrderResult, ClaimedCheckOutcome, ConfigurationQueryService, ControllerLease_v1, type CreateAgentWorkFanoutInput, type DecideAgentWorkFanInInput, DiscoveryQueryService, EngineVerificationCheckSource_v2, EngineVerificationDeterminism_v2, EngineVerificationTrustGapReason_v2, type ExecuteAgentWorkPreparationInput, ExecutionEnvelope_v1, ExecutionEnvironmentOS, ExecutionState, FanInCandidateConclusion_v1, FanoutAttemptBinding_v1, FanoutPremise_v1, FanoutRationale_v1, FanoutSelectionCriterion_v1, GATE_IMPACT_MODEL, GateExecutionService, GateExecutionServiceError, type GateExecutionServiceInput, type GateExecutionServiceResult, GateImpactService, GateImpactServiceError, GitHubAPI, GitObjectId, HumanActionPreconditions, HumanActionReceipt_v1, HumanActionRequest_v1, INTEGRATION_RECORD_REMOVAL_VERSION, INTEGRATION_RECORD_REPLACEMENTS, IntegrationQueryServiceError, IntegrationRecordCompatibilityError, IntegrationRecordCompatibilityService, IntegrationStatusQueryService, type MergeApplicationExecution, type MergeApplicationFailureCode, type MergeApplicationRuntime, MergeApplicationService, MergeApplicationServiceError, MergeEligibilityEvaluator, MergeOrderQueryService, type MultiRepoPlanOptions$1 as MultiRepoPlanOptions, NATIVE_WSL_PROJECTION_CONTRACT_VERSION, NATIVE_WSL_PROJECTION_HASH_PROFILE, NativeDirectoryIdentityClaim_v1, NativeExecutionPathMapping_v1, NativeWslExecutionPathMapping_v1, NativeWslProjectionCleanupRequestJsonSchema, NativeWslProjectionInventoryObservation_v1, NativeWslProjectionInventoryState, NativeWslProjectionManifest_v1, NativeWslProjectionNextAction, NativeWslProjectionOutcome, NativeWslProjectionPathMapping_v1, NativeWslProjectionPlanAction, NativeWslProjectionPlanReason, NativeWslProjectionPlan_v1, NativeWslProjectionPrepareRequestJsonSchema, NativeWslProjectionQuarantineRequestJsonSchema, NativeWslProjectionReasonCode, NativeWslProjectionReceipt_v1, NativeWslProjectionRequestJsonSchema, NativeWslProjectionRequest_v1, NativeWslProjectionSelection_v1, NativeWslProjectionStatusRequestJsonSchema, NativeWslSourceObservation_v1, type PlanArtifactFailureCode, type PlanArtifactIdentity, PlanArtifactService, PlanArtifactServiceError, type PlanArtifactSource, PlanCreationService, type RepoTarget, type ResolvePlanArtifactInput, type ResolvedPlanArtifact, RunStatus, Run_v1, STRICT_FANOUT_SELECTION_CRITERIA, VerificationOutcome, WorkItem_v1, WorkerSessionBackend, WorkerSessionStatus, WorkerSession_v1, WorkspaceAllocationStatus, WorkspaceAllocation_v1, WorkspaceCleanupDisposition, WorkspaceConfigServiceError, WorkspaceDiagnosticsService, WorkspaceInitializationService, WorkspaceLeaseStatus, WorkspaceLease_v1, applyGateImpactSelection, asPlanValidationFailure, attemptStatusRequiresReceipt, attemptStatusRequiresVerification, bootstrapWorkspace, canonicalJSONStringify, computeAgentEngineVerificationV2Hash, computeAgentTaskPacketHash, computeFanInEvidenceSetHash, computeMergeOrder, createAgentTaskPacket, createAgentWorkContainmentPreflightHandler, createAttemptLifecycleHandlers, createAttemptReceiptHandlers, createAttemptVerificationHandlers, createAttemptWorkerHandlers, createFileAnalyzer, createGitHubAPI, createGitHubClient, createGitOperations, createNativeExecutionPathMapping, createNativeWslExecutionPathMapping, createNativeWslProjectionLifecycleHandlers, createNativeWslProjectionManifest, createNativeWslProjectionPathMapping, createNativeWslProjectionReceipt, createNativeWslProjectionRequest, createNativeWslProjectionSelection, createNativeWslSourceObservation, createRunManager, createWorkflowGuide, detectProjectType, executeAgentWorkPreparation, executeGatesWithPolicy, formatPlanValidationFailure, formatPlanValidationFailureText, generateGitHubSnapshot, generateMultiRepoPlan, generatePlan, generatePlanFromGitHub, generateSnapshot, getEnvironmentSuggestions, healthChecker, initLocalOverlay, inspectRegisteredCliSurface, isTerminalAttemptStatus, loadInputs, loadPlan, main, nativeWslProjectionId, orderAgentWorkPreparationSteps, parseAgentEngineVerification, parseAgentEngineVerificationV2, parseAgentTaskPacket, parseAgentTaskReceipt, parseAgentTaskReceiptV2, parseAttempt, parseControllerLease, parseExecutionEnvelope, parseHumanActionReceipt, parseHumanActionRequest, parseRun, parseWorkItem, parseWorkerSession, parseWorkspaceAllocation, parseWorkspaceLease, planNativeWslProjection, resolveProfile, validateAgentEngineVerificationV2PacketReferences, validateAgentExecutionPathBinding, validateAgentTaskReceiptBinding, validateAgentTaskReceiptV2Binding, validateAgentTaskReceiptV2PacketReferences, validateHumanActionReceiptBinding, writeGateImpactReceipt };
|
|
9773
|
+
export { AGENT_ENGINE_VERIFICATION_V2_VERSION, AGENT_TASK_RECEIPT_PATCH_PROFILE, AGENT_TASK_RECEIPT_V2_VERSION, AGENT_WORK_CONTRACT_VERSION, ATTEMPT_AWAITABLE_CONTRACT_VERSION, AXF_AWAITABLE_SCHEMA_VERSION, AXF_AWAIT_RESULT_SCHEMA_VERSION, type AcknowledgeAttemptAwaitableDeliveryInput, AgentEngineVerification_v1, AgentEngineVerification_v2, type AgentExecutionPathBindingContext, type AgentExecutionPathBindingValidation, AgentExecutionPathMapping_v1, type AgentTaskPacketHashInput, AgentTaskPacketHashInput_v1, AgentTaskPacket_v1, type AgentTaskReceiptBindingContext, AgentTaskReceiptOutcome, type AgentTaskReceiptV2BindingContext, AgentTaskReceipt_v1, AgentTaskReceipt_v2, AgentWorkContainmentPreflightRequestJsonSchema, AgentWorkFanInDecision_v1, type AgentWorkFanInResult, AgentWorkFanoutPlan_v1, AgentWorkFanoutService, type AgentWorkPreparationCommandResult, type AgentWorkPreparationCommandRunner, AgentWorkPreparationReceipt_v1, type AgentWorkPreparationResult, AttemptAcceptanceApplyRequestJsonSchema, AttemptAcceptanceStatusRequestJsonSchema, type AttemptAwaitableAttachmentResult, AttemptAwaitableCompletion_v1, AttemptAwaitableDelivery_v1, AttemptAwaitableEventType_v1, AttemptAwaitableEvent_v1, type AttemptAwaitableLeaseCredential, type AttemptAwaitableMutationFailureReason, type AttemptAwaitableNotifier, type AttemptAwaitableObservationRequest, type AttemptAwaitableObserver, AttemptAwaitableObserverLease_v1, AttemptAwaitableRecord_v1, AttemptAwaitableStatus_v1, type AttemptAwaitableStore, AttemptAwaitableSupervisor, type AttemptAwaitableSupervisorNotice, type AttemptAwaitableSupervisorOptions, AttemptAwaitableTerminalResult_v1, AttemptPrepareRequestJsonSchema, AttemptReceiptStatusRequestJsonSchema, AttemptReceiptSubmitRequestJsonSchema, AttemptRetryDeltaDimension_v1, AttemptRetryDelta_v1, AttemptStartRequestJsonSchema, AttemptStatus, AttemptStatusInputJsonSchema, AttemptVerificationRunRequestJsonSchema, AttemptVerificationStatusRequestJsonSchema, AttemptWorkerAttachRequestJsonSchema, AttemptWorkerEndRequestJsonSchema, AttemptWorkerHeartbeatRequestJsonSchema, AttemptWorkerStatusRequestJsonSchema, Attempt_v1, AuthorityEnvelope, AxfCliAttemptAwaitableObserver, type AxfCliAttemptAwaitableObserverOptions, AxfExternalAwaitResult_v1, type BeginAttemptAwaitableDeliveryInput, type BoundedDiscoveryResult, type BoundedGateRunResult, type BoundedIntegrationStatus, type BoundedMergeApplicationResult, type BoundedMergeOrderResult, type CancelAttemptAwaitableInput, type ClaimAttemptAwaitableObservationInput, type ClaimAttemptAwaitableObservationResult, ClaimedCheckOutcome, type CompleteAttemptAwaitableInput, ConfigurationQueryService, ControllerLease_v1, type CreateAgentWorkFanoutInput, type DecideAgentWorkFanInInput, DiscoveryQueryService, EngineVerificationCheckSource_v2, EngineVerificationDeterminism_v2, EngineVerificationTrustGapReason_v2, type ExecuteAgentWorkPreparationInput, ExecutionEnvelope_v1, ExecutionEnvironmentOS, ExecutionState, ExternalAwaitOutcome_v1, ExternalAwaitableDescriptor_v1, FanInCandidateConclusion_v1, FanoutAttemptBinding_v1, FanoutPremise_v1, FanoutRationale_v1, FanoutSelectionCriterion_v1, GATE_IMPACT_MODEL, GateExecutionService, GateExecutionServiceError, type GateExecutionServiceInput, type GateExecutionServiceResult, GateImpactService, GateImpactServiceError, GitHubAPI, GitObjectId, HumanActionPreconditions, HumanActionReceipt_v1, HumanActionRequest_v1, INTEGRATION_RECORD_REMOVAL_VERSION, INTEGRATION_RECORD_REPLACEMENTS, InMemoryAttemptAwaitableStore, IntegrationQueryServiceError, IntegrationRecordCompatibilityError, IntegrationRecordCompatibilityService, IntegrationStatusQueryService, MAX_ATTEMPT_AWAITABLE_DURATION_MS, MIN_ATTEMPT_AWAITABLE_DURATION_MS, type MergeApplicationExecution, type MergeApplicationFailureCode, type MergeApplicationRuntime, MergeApplicationService, MergeApplicationServiceError, MergeEligibilityEvaluator, MergeOrderQueryService, type MultiRepoPlanOptions$1 as MultiRepoPlanOptions, type MutateAttemptAwaitableResult, NATIVE_WSL_PROJECTION_CONTRACT_VERSION, NATIVE_WSL_PROJECTION_HASH_PROFILE, NativeDirectoryIdentityClaim_v1, NativeExecutionPathMapping_v1, NativeWslExecutionPathMapping_v1, NativeWslProjectionCleanupRequestJsonSchema, NativeWslProjectionInventoryObservation_v1, NativeWslProjectionInventoryState, NativeWslProjectionManifest_v1, NativeWslProjectionNextAction, NativeWslProjectionOutcome, NativeWslProjectionPathMapping_v1, NativeWslProjectionPlanAction, NativeWslProjectionPlanReason, NativeWslProjectionPlan_v1, NativeWslProjectionPrepareRequestJsonSchema, NativeWslProjectionQuarantineRequestJsonSchema, NativeWslProjectionReasonCode, NativeWslProjectionReceipt_v1, NativeWslProjectionRequestJsonSchema, NativeWslProjectionRequest_v1, NativeWslProjectionSelection_v1, NativeWslProjectionStatusRequestJsonSchema, NativeWslSourceObservation_v1, type PlanArtifactFailureCode, type PlanArtifactIdentity, PlanArtifactService, PlanArtifactServiceError, type PlanArtifactSource, PlanCreationService, type RegisterAttemptAwaitableInput, type RegisterAttemptAwaitableResult, type RegisterDurableAttemptAwaitableInput, type RegisterDurableAttemptAwaitableResult, type ReleaseAttemptAwaitableObservationInput, type RepoTarget, type ResolvePlanArtifactInput, type ResolvedPlanArtifact, RunStatus, Run_v1, STRICT_FANOUT_SELECTION_CRITERIA, SqliteAttemptAwaitableStore, VerificationOutcome, WorkItem_v1, WorkerSessionBackend, WorkerSessionStatus, WorkerSession_v1, WorkspaceAllocationStatus, WorkspaceAllocation_v1, WorkspaceCleanupDisposition, WorkspaceConfigServiceError, WorkspaceDiagnosticsService, WorkspaceInitializationService, WorkspaceLeaseStatus, WorkspaceLease_v1, applyGateImpactSelection, asPlanValidationFailure, attemptStatusRequiresReceipt, attemptStatusRequiresVerification, bootstrapWorkspace, canonicalJSONStringify, completionForAttemptAwaitable, computeAgentEngineVerificationV2Hash, computeAgentTaskPacketHash, computeFanInEvidenceSetHash, computeMergeOrder, containsAttemptAwaitableCredentialValue, createAgentTaskPacket, createAgentWorkContainmentPreflightHandler, createAttemptLifecycleHandlers, createAttemptReceiptHandlers, createAttemptVerificationHandlers, createAttemptWorkerHandlers, createFileAnalyzer, createGitHubAPI, createGitHubClient, createGitOperations, createNativeExecutionPathMapping, createNativeWslExecutionPathMapping, createNativeWslProjectionLifecycleHandlers, createNativeWslProjectionManifest, createNativeWslProjectionPathMapping, createNativeWslProjectionReceipt, createNativeWslProjectionRequest, createNativeWslProjectionSelection, createNativeWslSourceObservation, createRunManager, createWorkflowGuide, deliveryIdForAttemptAwaitable, detectProjectType, executeAgentWorkPreparation, executeGatesWithPolicy, formatPlanValidationFailure, formatPlanValidationFailureText, generateGitHubSnapshot, generateMultiRepoPlan, generatePlan, generatePlanFromGitHub, generateSnapshot, getEnvironmentSuggestions, healthChecker, initLocalOverlay, inspectRegisteredCliSurface, isTerminalAttemptStatus, loadInputs, loadPlan, main, nativeWslProjectionId, orderAgentWorkPreparationSteps, parseAgentEngineVerification, parseAgentEngineVerificationV2, parseAgentTaskPacket, parseAgentTaskReceipt, parseAgentTaskReceiptV2, parseAttempt, parseAttemptAwaitableDescriptor, parseAttemptAwaitableRecord, parseAttemptAwaitableTerminalResult, parseControllerLease, parseExecutionEnvelope, parseExternalAwaitableDescriptor, parseHumanActionReceipt, parseHumanActionRequest, parseRun, parseWorkItem, parseWorkerSession, parseWorkspaceAllocation, parseWorkspaceLease, planNativeWslProjection, resolveProfile, statusForAwaitableOutcome, validateAgentEngineVerificationV2PacketReferences, validateAgentExecutionPathBinding, validateAgentTaskReceiptBinding, validateAgentTaskReceiptV2Binding, validateAgentTaskReceiptV2PacketReferences, validateHumanActionReceiptBinding, writeGateImpactReceipt };
|