harnery 0.22.1 → 0.24.0
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/README.md +1 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +302 -5
- package/dist/core/work/state.d.ts +7 -0
- package/dist/core/work/state.d.ts.map +1 -1
- package/dist/core/work/state.js +112 -23
- package/dist/core/workflow/child-env.d.ts +10 -6
- package/dist/core/workflow/child-env.d.ts.map +1 -1
- package/dist/core/workflow/child-env.js +15 -7
- package/dist/core/workflow/durable-record.d.ts +7 -0
- package/dist/core/workflow/durable-record.d.ts.map +1 -0
- package/dist/core/workflow/durable-record.js +83 -0
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +208 -29
- package/dist/core/workflow/index.d.ts +2 -0
- package/dist/core/workflow/index.d.ts.map +1 -1
- package/dist/core/workflow/index.js +1 -0
- package/dist/core/workflow/proof.d.ts +4 -0
- package/dist/core/workflow/proof.d.ts.map +1 -1
- package/dist/core/workflow/proof.js +50 -15
- package/dist/core/workflow/run-state.d.ts +3 -0
- package/dist/core/workflow/run-state.d.ts.map +1 -1
- package/dist/core/workflow/run-state.js +25 -13
- package/dist/core/workflow/spawn-cursor.d.ts +3 -0
- package/dist/core/workflow/spawn-cursor.d.ts.map +1 -1
- package/dist/core/workflow/spawn-cursor.js +8 -4
- package/dist/core/workflow/types.d.ts +10 -0
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/core/workflow/workspaces/attestation-error.d.ts +7 -0
- package/dist/core/workflow/workspaces/attestation-error.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/attestation-error.js +25 -0
- package/dist/core/workflow/workspaces/cancellation.d.ts +8 -0
- package/dist/core/workflow/workspaces/cancellation.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/cancellation.js +95 -0
- package/dist/core/workflow/workspaces/cleanup.d.ts +9 -0
- package/dist/core/workflow/workspaces/cleanup.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/cleanup.js +223 -0
- package/dist/core/workflow/workspaces/execution.d.ts +25 -0
- package/dist/core/workflow/workspaces/execution.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/execution.js +316 -0
- package/dist/core/workflow/workspaces/git.d.ts +25 -0
- package/dist/core/workflow/workspaces/git.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/git.js +102 -0
- package/dist/core/workflow/workspaces/index.d.ts +15 -0
- package/dist/core/workflow/workspaces/index.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/index.js +7 -0
- package/dist/core/workflow/workspaces/inspect.d.ts +85 -0
- package/dist/core/workflow/workspaces/inspect.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/inspect.js +255 -0
- package/dist/core/workflow/workspaces/integration.d.ts +32 -0
- package/dist/core/workflow/workspaces/integration.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/integration.js +631 -0
- package/dist/core/workflow/workspaces/leases.d.ts +37 -0
- package/dist/core/workflow/workspaces/leases.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/leases.js +397 -0
- package/dist/core/workflow/workspaces/lifecycle.d.ts +43 -0
- package/dist/core/workflow/workspaces/lifecycle.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/lifecycle.js +622 -0
- package/dist/core/workflow/workspaces/local-git.d.ts +8 -0
- package/dist/core/workflow/workspaces/local-git.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/local-git.js +1474 -0
- package/dist/core/workflow/workspaces/paths.d.ts +23 -0
- package/dist/core/workflow/workspaces/paths.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/paths.js +191 -0
- package/dist/core/workflow/workspaces/recovery.d.ts +3 -0
- package/dist/core/workflow/workspaces/recovery.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/recovery.js +50 -0
- package/dist/core/workflow/workspaces/state.d.ts +60 -0
- package/dist/core/workflow/workspaces/state.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/state.js +296 -0
- package/dist/core/workflow/workspaces/types.d.ts +445 -0
- package/dist/core/workflow/workspaces/types.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/types.js +2 -0
- package/dist/core/workflow/workspaces/validate.d.ts +14 -0
- package/dist/core/workflow/workspaces/validate.d.ts.map +1 -0
- package/dist/core/workflow/workspaces/validate.js +476 -0
- package/package.json +5 -3
- package/src/commands/workflow.ts +366 -8
- package/src/core/work/state.ts +156 -28
- package/src/core/workflow/child-env.ts +18 -7
- package/src/core/workflow/durable-record.ts +94 -0
- package/src/core/workflow/engine.ts +230 -30
- package/src/core/workflow/index.ts +74 -0
- package/src/core/workflow/proof.ts +70 -22
- package/src/core/workflow/run-state.ts +46 -11
- package/src/core/workflow/spawn-cursor.ts +8 -4
- package/src/core/workflow/types.ts +14 -0
- package/src/core/workflow/workspaces/attestation-error.ts +30 -0
- package/src/core/workflow/workspaces/cancellation.ts +137 -0
- package/src/core/workflow/workspaces/cleanup.ts +308 -0
- package/src/core/workflow/workspaces/execution.ts +412 -0
- package/src/core/workflow/workspaces/git.ts +125 -0
- package/src/core/workflow/workspaces/index.ts +89 -0
- package/src/core/workflow/workspaces/inspect.ts +421 -0
- package/src/core/workflow/workspaces/integration.ts +845 -0
- package/src/core/workflow/workspaces/leases.ts +517 -0
- package/src/core/workflow/workspaces/lifecycle.ts +792 -0
- package/src/core/workflow/workspaces/local-git.ts +1892 -0
- package/src/core/workflow/workspaces/paths.ts +247 -0
- package/src/core/workflow/workspaces/recovery.ts +56 -0
- package/src/core/workflow/workspaces/state.ts +481 -0
- package/src/core/workflow/workspaces/types.ts +517 -0
- package/src/core/workflow/workspaces/validate.ts +595 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import type { PolicyDecision, PolicyIsolation, PolicyNetworkAccess } from "../../policy/index.js";
|
|
2
|
+
export declare const WORKSPACE_BINDING_SCHEMA_VERSION: 1;
|
|
3
|
+
export declare const WORKSPACE_RECEIPT_SCHEMA_VERSION: 1;
|
|
4
|
+
export type WorkspaceIsolation = Exclude<PolicyIsolation, "shared">;
|
|
5
|
+
export type WorkspaceOwner = {
|
|
6
|
+
kind: "work_attempt";
|
|
7
|
+
work_item_id: string;
|
|
8
|
+
attempt: number;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "standalone";
|
|
11
|
+
work_item_id: null;
|
|
12
|
+
attempt: null;
|
|
13
|
+
};
|
|
14
|
+
export interface FilesystemIdentity {
|
|
15
|
+
platform: NodeJS.Platform;
|
|
16
|
+
device: string;
|
|
17
|
+
inode: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ValidatedFilesystemPath {
|
|
20
|
+
configured: string;
|
|
21
|
+
realpath: string;
|
|
22
|
+
identity: FilesystemIdentity;
|
|
23
|
+
}
|
|
24
|
+
/** @deprecated Use ValidatedFilesystemPath. */
|
|
25
|
+
export type ValidatedFilesystemRoot = ValidatedFilesystemPath;
|
|
26
|
+
export interface WorkspaceProviderRef {
|
|
27
|
+
id: string;
|
|
28
|
+
version: string;
|
|
29
|
+
capability_digest: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ProviderUnsupportedReason {
|
|
32
|
+
code: string;
|
|
33
|
+
message: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ProviderUnknown {
|
|
36
|
+
code: string;
|
|
37
|
+
message: string;
|
|
38
|
+
}
|
|
39
|
+
export interface WorkspaceProviderCapabilities {
|
|
40
|
+
schema_version: 1;
|
|
41
|
+
provider_id: string;
|
|
42
|
+
provider_version: string;
|
|
43
|
+
isolation: readonly ("worktree" | "sandbox" | "remote")[];
|
|
44
|
+
reattach: "supported" | "unsupported";
|
|
45
|
+
cancellation: "supported" | "partial" | "unsupported";
|
|
46
|
+
cleanup: "ownership_gated" | "unsupported";
|
|
47
|
+
integration: readonly "fast_forward"[];
|
|
48
|
+
network_attestation: "supported" | "unknown" | "unsupported";
|
|
49
|
+
filesystem_identity: "supported" | "unsupported";
|
|
50
|
+
capability_digest: string;
|
|
51
|
+
}
|
|
52
|
+
export interface WorkspaceProbeResult {
|
|
53
|
+
schema_version: 1;
|
|
54
|
+
supported: boolean;
|
|
55
|
+
capabilities: WorkspaceProviderCapabilities;
|
|
56
|
+
unsupported: readonly ProviderUnsupportedReason[];
|
|
57
|
+
unknowns: readonly ProviderUnknown[];
|
|
58
|
+
}
|
|
59
|
+
export interface WorkspaceProbeInput {
|
|
60
|
+
requested_cwd: string;
|
|
61
|
+
writable_roots: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
export interface WorkspaceAllocationRequest {
|
|
64
|
+
schema_version: 1;
|
|
65
|
+
run_id: string;
|
|
66
|
+
owner: WorkspaceOwner;
|
|
67
|
+
requested_cwd: string;
|
|
68
|
+
requested_isolation: WorkspaceIsolation;
|
|
69
|
+
network_access: PolicyNetworkAccess;
|
|
70
|
+
script: {
|
|
71
|
+
path: string;
|
|
72
|
+
sha256: string;
|
|
73
|
+
};
|
|
74
|
+
policy_sha256: string | null;
|
|
75
|
+
allowed_paths: readonly ValidatedFilesystemPath[];
|
|
76
|
+
writable_roots: readonly ValidatedFilesystemPath[];
|
|
77
|
+
selected_writable_root: ValidatedFilesystemPath;
|
|
78
|
+
provider_id: string;
|
|
79
|
+
capability_digest: string;
|
|
80
|
+
idempotency_key: string;
|
|
81
|
+
}
|
|
82
|
+
export interface GitRepositoryBinding {
|
|
83
|
+
source_root: {
|
|
84
|
+
configured: string;
|
|
85
|
+
realpath: string;
|
|
86
|
+
identity: FilesystemIdentity;
|
|
87
|
+
};
|
|
88
|
+
common_dir: {
|
|
89
|
+
realpath: string;
|
|
90
|
+
identity: FilesystemIdentity;
|
|
91
|
+
};
|
|
92
|
+
base_commit: string;
|
|
93
|
+
target_commit: string;
|
|
94
|
+
target_ref: string;
|
|
95
|
+
workspace_ref: string;
|
|
96
|
+
workspace_branch: string;
|
|
97
|
+
gitdir: {
|
|
98
|
+
realpath: string;
|
|
99
|
+
identity: FilesystemIdentity;
|
|
100
|
+
};
|
|
101
|
+
branch_created_by_provider: boolean;
|
|
102
|
+
}
|
|
103
|
+
export type RepositoryBinding = GitRepositoryBinding;
|
|
104
|
+
export interface WorkspaceBinding {
|
|
105
|
+
schema_version: 1;
|
|
106
|
+
binding_id: string;
|
|
107
|
+
workspace_id: string;
|
|
108
|
+
run_id: string;
|
|
109
|
+
owner: WorkspaceOwner;
|
|
110
|
+
provider: WorkspaceProviderRef;
|
|
111
|
+
isolation: WorkspaceIsolation;
|
|
112
|
+
network_access: PolicyNetworkAccess;
|
|
113
|
+
workspace_root: string;
|
|
114
|
+
workspace_root_identity: FilesystemIdentity;
|
|
115
|
+
active_root: string;
|
|
116
|
+
active_root_identity: FilesystemIdentity;
|
|
117
|
+
integration_root?: string;
|
|
118
|
+
writable_root: ValidatedFilesystemPath;
|
|
119
|
+
repository?: GitRepositoryBinding;
|
|
120
|
+
generation: number;
|
|
121
|
+
recovery_token: string;
|
|
122
|
+
request_sha256: string;
|
|
123
|
+
created_at: string;
|
|
124
|
+
}
|
|
125
|
+
export interface RepositoryObservation {
|
|
126
|
+
source_root: {
|
|
127
|
+
configured: string;
|
|
128
|
+
realpath?: string;
|
|
129
|
+
identity?: FilesystemIdentity;
|
|
130
|
+
};
|
|
131
|
+
common_dir?: {
|
|
132
|
+
realpath: string;
|
|
133
|
+
identity: FilesystemIdentity;
|
|
134
|
+
};
|
|
135
|
+
active_gitdir?: {
|
|
136
|
+
realpath: string;
|
|
137
|
+
identity: FilesystemIdentity;
|
|
138
|
+
};
|
|
139
|
+
worktree_registered: boolean;
|
|
140
|
+
current_ref?: string;
|
|
141
|
+
workspace_ref_oid?: string;
|
|
142
|
+
target_ref_oid?: string;
|
|
143
|
+
head_commit?: string;
|
|
144
|
+
base_is_ancestor: boolean | null;
|
|
145
|
+
target_is_ancestor: boolean | null;
|
|
146
|
+
dirty_paths: string[];
|
|
147
|
+
conflicts: string[];
|
|
148
|
+
operation_in_progress: string[];
|
|
149
|
+
}
|
|
150
|
+
export type WorkspaceObservation = RepositoryObservation;
|
|
151
|
+
export type WorkspaceLifecycleState = "shared" | "allocation_recorded" | "allocating" | "bound" | "running" | "parked" | "completed_unintegrated" | "failed_retained" | "integration_requested" | "integrating" | "integrated" | "cleanup_pending" | "released" | "unsupported" | "preserved_dirty" | "blocked" | "lost" | "abandoned_dirty";
|
|
152
|
+
export type WorkspaceProofOutcome = "completed_unintegrated" | "failed_retained" | "blocked" | "lost";
|
|
153
|
+
/** @deprecated Use WorkspaceProofOutcome. */
|
|
154
|
+
export type WorkspaceProofLifecycleState = WorkspaceProofOutcome;
|
|
155
|
+
export type WorkspaceResourceState = "active" | "preserved_dirty" | "released" | "blocked" | "lost";
|
|
156
|
+
export type WorkspaceIntegrationState = "none" | "planned" | "applying" | "applied";
|
|
157
|
+
export interface WorkspaceAttestation {
|
|
158
|
+
schema_version: 1;
|
|
159
|
+
binding_id: string;
|
|
160
|
+
workspace_id: string;
|
|
161
|
+
run_id: string;
|
|
162
|
+
owner: WorkspaceOwner;
|
|
163
|
+
provider: WorkspaceBinding["provider"];
|
|
164
|
+
recorded_at: string;
|
|
165
|
+
containment: {
|
|
166
|
+
writable_root: boolean;
|
|
167
|
+
workspace_root: boolean;
|
|
168
|
+
active_root: boolean;
|
|
169
|
+
integration_root: boolean | null;
|
|
170
|
+
};
|
|
171
|
+
filesystem: {
|
|
172
|
+
root_identity_match: boolean;
|
|
173
|
+
workspace_identity?: FilesystemIdentity;
|
|
174
|
+
active_identity?: FilesystemIdentity;
|
|
175
|
+
};
|
|
176
|
+
provider_drift: string[];
|
|
177
|
+
workspace_exists: boolean;
|
|
178
|
+
repository?: RepositoryObservation;
|
|
179
|
+
resource_state: WorkspaceResourceState;
|
|
180
|
+
unsupported: ProviderUnsupportedReason[];
|
|
181
|
+
unknowns: ProviderUnknown[];
|
|
182
|
+
status: "ok" | "blocked" | "lost";
|
|
183
|
+
}
|
|
184
|
+
export interface WorkspaceCancellationResult {
|
|
185
|
+
schema_version: 1;
|
|
186
|
+
binding_id: string;
|
|
187
|
+
status: "cancelled" | "unsupported" | "preserved_dirty" | "blocked";
|
|
188
|
+
recorded_at: string;
|
|
189
|
+
attestation: WorkspaceAttestation;
|
|
190
|
+
reason?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface WorkspaceCancellationReceipt {
|
|
193
|
+
schema_version: 1;
|
|
194
|
+
receipt_id: string;
|
|
195
|
+
run_id: string;
|
|
196
|
+
binding_id: string;
|
|
197
|
+
binding_sha256: string;
|
|
198
|
+
work_item_id: string;
|
|
199
|
+
work_event_seq: number;
|
|
200
|
+
work_event_sha256: string;
|
|
201
|
+
status: WorkspaceCancellationResult["status"];
|
|
202
|
+
recorded_at: string;
|
|
203
|
+
attestation: WorkspaceAttestation;
|
|
204
|
+
reason?: string;
|
|
205
|
+
}
|
|
206
|
+
export type WorkspaceCleanupMode = "normal";
|
|
207
|
+
export interface WorkspaceCleanupResult {
|
|
208
|
+
schema_version: 1;
|
|
209
|
+
binding_id: string;
|
|
210
|
+
status: "released" | "already_released" | "preserved_dirty" | "blocked" | "unsupported" | "partial";
|
|
211
|
+
recorded_at: string;
|
|
212
|
+
branch_deleted: boolean;
|
|
213
|
+
attestation: WorkspaceAttestation;
|
|
214
|
+
reason?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface WorkspaceCleanupIntent {
|
|
217
|
+
schema_version: 1;
|
|
218
|
+
run_id: string;
|
|
219
|
+
operation_id: string;
|
|
220
|
+
binding_id: string;
|
|
221
|
+
binding_sha256: string;
|
|
222
|
+
mode: WorkspaceCleanupMode;
|
|
223
|
+
expected: {
|
|
224
|
+
worktree_path: string;
|
|
225
|
+
gitdir: GitRepositoryBinding["gitdir"];
|
|
226
|
+
workspace_ref: string;
|
|
227
|
+
workspace_ref_oid: string;
|
|
228
|
+
target_ref: string;
|
|
229
|
+
target_ref_oid: string;
|
|
230
|
+
};
|
|
231
|
+
created_at: string;
|
|
232
|
+
}
|
|
233
|
+
export interface WorkspaceCleanupAttempt {
|
|
234
|
+
schema_version: 1;
|
|
235
|
+
seq: number;
|
|
236
|
+
previous_sha256: string | null;
|
|
237
|
+
record_sha256: string;
|
|
238
|
+
operation_id: string;
|
|
239
|
+
binding_id: string;
|
|
240
|
+
binding_sha256: string;
|
|
241
|
+
mode: WorkspaceCleanupMode;
|
|
242
|
+
status: "started" | WorkspaceCleanupResult["status"];
|
|
243
|
+
branch_deleted?: boolean;
|
|
244
|
+
attestation?: WorkspaceAttestation;
|
|
245
|
+
reason?: string;
|
|
246
|
+
recorded_at: string;
|
|
247
|
+
}
|
|
248
|
+
export interface WorkspaceCleanupReceipt {
|
|
249
|
+
schema_version: 1;
|
|
250
|
+
receipt_id: string;
|
|
251
|
+
operation_id: string;
|
|
252
|
+
binding_id: string;
|
|
253
|
+
binding_sha256: string;
|
|
254
|
+
mode: WorkspaceCleanupMode;
|
|
255
|
+
status: "released" | "already_released";
|
|
256
|
+
branch_deleted: true;
|
|
257
|
+
attestation: WorkspaceAttestation;
|
|
258
|
+
recorded_at: string;
|
|
259
|
+
}
|
|
260
|
+
export interface IntegrationTarget {
|
|
261
|
+
root: string;
|
|
262
|
+
ref?: string;
|
|
263
|
+
}
|
|
264
|
+
export interface ProviderIntegrationPreview {
|
|
265
|
+
schema_version: 1;
|
|
266
|
+
provider_id: string;
|
|
267
|
+
binding_id: string;
|
|
268
|
+
operation: "fast_forward";
|
|
269
|
+
target_root: string;
|
|
270
|
+
target_ref: string;
|
|
271
|
+
target_commit: string;
|
|
272
|
+
target_tree: string;
|
|
273
|
+
source_commit: string;
|
|
274
|
+
source_tree: string;
|
|
275
|
+
changed_paths: string[];
|
|
276
|
+
blocked: ProviderUnsupportedReason[];
|
|
277
|
+
unknowns: ProviderUnknown[];
|
|
278
|
+
prepared_at: string;
|
|
279
|
+
}
|
|
280
|
+
export interface IntegrationReviewRecord {
|
|
281
|
+
schema_version: 1;
|
|
282
|
+
run_id: string;
|
|
283
|
+
owner: WorkspaceOwner;
|
|
284
|
+
proof_sha256: string;
|
|
285
|
+
binding_id: string;
|
|
286
|
+
terminal_attestation_sha256: string;
|
|
287
|
+
accepted_unknowns: string[];
|
|
288
|
+
actor: string;
|
|
289
|
+
reason?: string;
|
|
290
|
+
reviewed_at: string;
|
|
291
|
+
}
|
|
292
|
+
export interface IntegrationAuthorization {
|
|
293
|
+
schema_version: 1;
|
|
294
|
+
run_id: string;
|
|
295
|
+
plan_sha256: string;
|
|
296
|
+
policy_sha256: string;
|
|
297
|
+
decision: PolicyDecision;
|
|
298
|
+
decision_sha256: string;
|
|
299
|
+
approval_id?: string;
|
|
300
|
+
approval_actor?: string;
|
|
301
|
+
approval_sha256?: string;
|
|
302
|
+
journal_anchor: {
|
|
303
|
+
event: "integration.plan";
|
|
304
|
+
plan_sha256: string;
|
|
305
|
+
};
|
|
306
|
+
authorized_at: string;
|
|
307
|
+
}
|
|
308
|
+
export interface IntegrationPlan {
|
|
309
|
+
schema_version: 1;
|
|
310
|
+
plan_id: string;
|
|
311
|
+
run_id: string;
|
|
312
|
+
operation: "fast_forward";
|
|
313
|
+
binding: WorkspaceBinding;
|
|
314
|
+
binding_sha256: string;
|
|
315
|
+
proof_sha256: string;
|
|
316
|
+
terminal_attestation_sha256: string;
|
|
317
|
+
review_sha256: string;
|
|
318
|
+
accepted_unknowns: string[];
|
|
319
|
+
provider_preview: ProviderIntegrationPreview;
|
|
320
|
+
target_identity_sha256: string;
|
|
321
|
+
idempotency_sha256: string;
|
|
322
|
+
prepared_at: string;
|
|
323
|
+
}
|
|
324
|
+
export interface AuthorizedIntegrationPlan {
|
|
325
|
+
schema_version: 1;
|
|
326
|
+
plan: IntegrationPlan;
|
|
327
|
+
plan_sha256: string;
|
|
328
|
+
authorization: IntegrationAuthorization;
|
|
329
|
+
authorization_sha256: string;
|
|
330
|
+
}
|
|
331
|
+
export interface ProviderIntegrationInput {
|
|
332
|
+
schema_version: 1;
|
|
333
|
+
run_id: string;
|
|
334
|
+
binding: WorkspaceBinding;
|
|
335
|
+
binding_sha256: string;
|
|
336
|
+
proof_sha256: string;
|
|
337
|
+
terminal_attestation: WorkspaceAttestation;
|
|
338
|
+
terminal_attestation_sha256: string;
|
|
339
|
+
review_sha256: string;
|
|
340
|
+
accepted_unknowns: readonly string[];
|
|
341
|
+
target: IntegrationTarget;
|
|
342
|
+
}
|
|
343
|
+
export interface AuthorizedProviderIntegrationInput {
|
|
344
|
+
schema_version: 1;
|
|
345
|
+
run_id: string;
|
|
346
|
+
binding: WorkspaceBinding;
|
|
347
|
+
binding_sha256: string;
|
|
348
|
+
plan_id: string;
|
|
349
|
+
plan_sha256: string;
|
|
350
|
+
authorization_sha256: string;
|
|
351
|
+
proof_sha256: string;
|
|
352
|
+
terminal_attestation_sha256: string;
|
|
353
|
+
review_sha256: string;
|
|
354
|
+
accepted_unknowns: readonly string[];
|
|
355
|
+
preview: ProviderIntegrationPreview;
|
|
356
|
+
}
|
|
357
|
+
export interface ProviderIntegrationResult {
|
|
358
|
+
schema_version: 1;
|
|
359
|
+
binding_id: string;
|
|
360
|
+
plan_id: string;
|
|
361
|
+
status: "applied" | "already_applied";
|
|
362
|
+
target_commit: string;
|
|
363
|
+
target_tree: string;
|
|
364
|
+
applied_at: string;
|
|
365
|
+
}
|
|
366
|
+
export interface IntegrationApplyReceipt {
|
|
367
|
+
schema_version: 1;
|
|
368
|
+
receipt_id: string;
|
|
369
|
+
run_id: string;
|
|
370
|
+
plan_id: string;
|
|
371
|
+
plan_sha256: string;
|
|
372
|
+
authorization_sha256: string;
|
|
373
|
+
proof_sha256: string;
|
|
374
|
+
binding_sha256: string;
|
|
375
|
+
binding_id: string;
|
|
376
|
+
provider_id: string;
|
|
377
|
+
status: "applied" | "already_applied";
|
|
378
|
+
target_root: string;
|
|
379
|
+
target_ref: string;
|
|
380
|
+
source_commit: string;
|
|
381
|
+
target_commit: string;
|
|
382
|
+
target_tree: string;
|
|
383
|
+
applied_at: string;
|
|
384
|
+
}
|
|
385
|
+
export interface IntegrationApplyAttempt {
|
|
386
|
+
schema_version: 1;
|
|
387
|
+
seq: number;
|
|
388
|
+
previous_sha256: string | null;
|
|
389
|
+
record_sha256: string;
|
|
390
|
+
run_id: string;
|
|
391
|
+
plan_sha256: string;
|
|
392
|
+
authorization_sha256: string;
|
|
393
|
+
proof_sha256: string;
|
|
394
|
+
binding_sha256: string;
|
|
395
|
+
status: "started" | ProviderIntegrationResult["status"];
|
|
396
|
+
target_commit?: string;
|
|
397
|
+
target_tree?: string;
|
|
398
|
+
recorded_at: string;
|
|
399
|
+
}
|
|
400
|
+
export interface WorkspaceBoundExecutionEvidence {
|
|
401
|
+
schema_version: 1;
|
|
402
|
+
binding: WorkspaceBinding;
|
|
403
|
+
terminal_attestation: WorkspaceAttestation;
|
|
404
|
+
terminal_lifecycle_state: WorkspaceProofOutcome;
|
|
405
|
+
drift: string[];
|
|
406
|
+
unsupported: ProviderUnsupportedReason[];
|
|
407
|
+
unknowns: ProviderUnknown[];
|
|
408
|
+
receipts: {
|
|
409
|
+
request: "workspace-request.json";
|
|
410
|
+
cancellation_outcome?: "cancellation/outcome.json";
|
|
411
|
+
integration_plan?: "integration/plan.json";
|
|
412
|
+
integration_authorization?: "integration/authorization.json";
|
|
413
|
+
integration_apply?: "integration/receipt.json";
|
|
414
|
+
cleanup_intent?: "cleanup/intent.json";
|
|
415
|
+
cleanup_receipt?: "cleanup/receipt.json";
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
export interface WorkspaceCompatibilityExecutionEvidence {
|
|
419
|
+
schema_version: 1;
|
|
420
|
+
run_id: string;
|
|
421
|
+
requested_isolation: WorkspaceIsolation;
|
|
422
|
+
effective_isolation: "shared";
|
|
423
|
+
selection_reason: "provider_not_configured" | "provider_unsupported";
|
|
424
|
+
provider?: WorkspaceProviderRef;
|
|
425
|
+
terminal_lifecycle_state: "shared";
|
|
426
|
+
drift: string[];
|
|
427
|
+
unsupported: ProviderUnsupportedReason[];
|
|
428
|
+
unknowns: ProviderUnknown[];
|
|
429
|
+
receipts: Record<string, never>;
|
|
430
|
+
}
|
|
431
|
+
/** @deprecated Use WorkspaceCompatibilityExecutionEvidence. */
|
|
432
|
+
export type WorkspaceUnsupportedExecutionEvidence = WorkspaceCompatibilityExecutionEvidence;
|
|
433
|
+
export type WorkspaceExecutionEvidence = WorkspaceBoundExecutionEvidence | WorkspaceCompatibilityExecutionEvidence;
|
|
434
|
+
export interface WorkspaceProvider {
|
|
435
|
+
probe(input: WorkspaceProbeInput): Promise<WorkspaceProbeResult>;
|
|
436
|
+
allocate(request: WorkspaceAllocationRequest): Promise<WorkspaceBinding>;
|
|
437
|
+
readBinding(binding: WorkspaceBinding): Promise<WorkspaceBinding>;
|
|
438
|
+
reattach(binding: WorkspaceBinding): Promise<WorkspaceAttestation>;
|
|
439
|
+
attest(binding: WorkspaceBinding): Promise<WorkspaceAttestation>;
|
|
440
|
+
cancel(binding: WorkspaceBinding): Promise<WorkspaceCancellationResult>;
|
|
441
|
+
previewIntegration(input: ProviderIntegrationInput): Promise<ProviderIntegrationPreview>;
|
|
442
|
+
applyAuthorizedIntegration(input: AuthorizedProviderIntegrationInput): Promise<ProviderIntegrationResult>;
|
|
443
|
+
cleanup(binding: WorkspaceBinding, intent: WorkspaceCleanupIntent): Promise<WorkspaceCleanupResult>;
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/workflow/workspaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAElG,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAC3D,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAE3D,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAEpE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,YAAY,EAAE,M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QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnE,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjE,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxE,kBAAkB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzF,0BAA0B,CACxB,KAAK,EAAE,kCAAkC,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtC,OAAO,CACL,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkflowRunManifest } from "../run-state.js";
|
|
2
|
+
import type { WorkspaceAllocationRequest, WorkspaceAttestation, WorkspaceBinding, WorkspaceBoundExecutionEvidence, WorkspaceCompatibilityExecutionEvidence, WorkspaceExecutionEvidence, WorkspaceOwner, WorkspaceProofOutcome } from "./types.js";
|
|
3
|
+
export declare function isWorkspaceOwner(value: unknown): value is WorkspaceOwner;
|
|
4
|
+
export declare function isWorkspaceAllocationRequest(value: unknown): value is WorkspaceAllocationRequest;
|
|
5
|
+
export declare function isWorkspaceBinding(value: unknown, runId?: string): value is WorkspaceBinding;
|
|
6
|
+
export declare function isWorkspaceAttestation(value: unknown, binding: WorkspaceBinding): value is WorkspaceAttestation;
|
|
7
|
+
export declare function isWorkspaceExecutionEvidence(value: unknown, runId: string, workflowStatus?: "succeeded" | "failed"): value is WorkspaceExecutionEvidence;
|
|
8
|
+
export declare function isWorkspaceBoundExecutionEvidence(value: unknown, runId?: string, workflowStatus?: "succeeded" | "failed"): value is WorkspaceBoundExecutionEvidence;
|
|
9
|
+
export declare function workspaceProofLifecycle(workflowStatus: "succeeded" | "failed", attestation: WorkspaceAttestation): WorkspaceProofOutcome;
|
|
10
|
+
export declare function assertWorkspaceManifestAuthority(manifest: WorkflowRunManifest, request: WorkspaceAllocationRequest | undefined): void;
|
|
11
|
+
export declare function isWorkspaceCompatibilityExecutionEvidence(value: unknown, runId?: string): value is WorkspaceCompatibilityExecutionEvidence;
|
|
12
|
+
/** @deprecated Use isWorkspaceCompatibilityExecutionEvidence. */
|
|
13
|
+
export declare const isWorkspaceUnsupportedExecutionEvidence: typeof isWorkspaceCompatibilityExecutionEvidence;
|
|
14
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/core/workflow/workspaces/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAEV,0BAA0B,EAC1B,oBAAoB,EACpB,gBAAgB,EAChB,+BAA+B,EAC/B,uCAAuC,EACvC,0BAA0B,EAC1B,cAAc,EAEd,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAKpB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAUxE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,0BAA0B,CA2BhG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CA6C5F;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,gBAAgB,GACxB,KAAK,IAAI,oBAAoB,CA8I/B;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,WAAW,GAAG,QAAQ,GACtC,KAAK,IAAI,0BAA0B,CAKrC;AAED,wBAAgB,iCAA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