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