@astrosheep/keiyaku 4.6.30 → 4.6.31
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 +5 -5
- package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +16 -16
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +10 -10
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +15 -15
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +16 -16
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +21 -21
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +16 -16
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +10 -10
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +15 -15
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +16 -16
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +21 -21
- package/build/plugins/opencode/package.json +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +12 -12
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +16 -16
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +10 -10
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +15 -15
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +16 -16
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +21 -21
- package/build/plugins/pi/README.md +5 -5
- package/build/plugins/pi/akuma-tools.ts +17 -23
- package/build/skills/keiyaku/SKILL.md +12 -12
- package/build/skills/keiyaku-akuma/SKILL.md +16 -16
- package/build/skills/keiyaku-akuma/references/automation.md +14 -14
- package/build/skills/keiyaku-babysit/SKILL.md +10 -10
- package/build/skills/keiyaku-bind/SKILL.md +15 -15
- package/build/skills/keiyaku-debt/SKILL.md +16 -16
- package/build/skills/keiyaku-workflow/SKILL.md +21 -21
- package/build/src/akuma/akuma-call.d.ts +1 -1
- package/build/src/akuma/akuma-call.js +9 -9
- package/build/src/akuma/akuma-errors.d.ts +5 -5
- package/build/src/akuma/akuma-instance.d.ts +355 -12
- package/build/src/akuma/akuma-instance.js +20 -20
- package/build/src/akuma/akuma-observe.d.ts +11 -12
- package/build/src/akuma/akuma-observe.js +34 -26
- package/build/src/akuma/akuma-owner.d.ts +32 -11
- package/build/src/akuma/akuma-owner.js +35 -16
- package/build/src/akuma/akuma-probe.d.ts +3 -3
- package/build/src/akuma/akuma-probe.js +2 -2
- package/build/src/akuma/akuma-selection-execution.d.ts +985 -1
- package/build/src/akuma/akuma-selection-execution.js +42 -18
- package/build/src/akuma/akuma-stream.d.ts +2 -2
- package/build/src/akuma/akuma-stream.js +1 -1
- package/build/src/akuma/akuma-wait.d.ts +5 -5
- package/build/src/akuma/akuma-wait.js +52 -14
- package/build/src/akuma/akuma.d.ts +245 -271
- package/build/src/akuma/akuma.js +98 -46
- package/build/src/akuma/archetype.d.ts +19 -6
- package/build/src/akuma/archetype.js +25 -9
- package/build/src/akuma/body-launch.d.ts +2 -2
- package/build/src/akuma/body.js +4 -4
- package/build/src/akuma/call-initial-tell.d.ts +60 -44
- package/build/src/akuma/call-initial-tell.js +41 -2
- package/build/src/akuma/caller.d.ts +26 -17
- package/build/src/akuma/caller.js +22 -9
- package/build/src/akuma/coordinate.d.ts +9 -0
- package/build/src/akuma/coordinate.js +13 -0
- package/build/src/akuma/detached-body.js +2 -2
- package/build/src/akuma/dispatch-association.d.ts +4 -4
- package/build/src/akuma/dispatch-association.js +12 -3
- package/build/src/akuma/execution-instructions.js +2 -2
- package/build/src/akuma/heart/facts.d.ts +29 -7
- package/build/src/akuma/heart/facts.js +13 -0
- package/build/src/akuma/heart/index.d.ts +0 -3
- package/build/src/akuma/heart/index.js +3 -6
- package/build/src/akuma/heart/rows.js +2 -2
- package/build/src/akuma/heart/soul.js +5 -5
- package/build/src/akuma/identity.d.ts +17 -16
- package/build/src/akuma/identity.js +20 -19
- package/build/src/akuma/index.d.ts +1 -2
- package/build/src/akuma/lineage-cache.d.ts +4 -4
- package/build/src/akuma/lineage-cache.js +10 -10
- package/build/src/akuma/projection-read.d.ts +2 -5
- package/build/src/akuma/projection-read.js +34 -47
- package/build/src/akuma/projection.d.ts +659 -569
- package/build/src/akuma/projection.js +203 -94
- package/build/src/akuma/providers/acp/index.js +1 -1
- package/build/src/akuma/providers/execution-environment.d.ts +1 -3
- package/build/src/akuma/providers/execution-environment.js +0 -4
- package/build/src/akuma/publication.d.ts +2 -2
- package/build/src/akuma/publication.js +3 -3
- package/build/src/akuma/retention.js +2 -2
- package/build/src/akuma/selection-observation.d.ts +507 -43
- package/build/src/akuma/selection-observation.js +153 -1
- package/build/src/akuma/status-projection.d.ts +288 -0
- package/build/src/akuma/status-projection.js +154 -0
- package/build/src/akuma/turn-drive.js +0 -3
- package/build/src/alias/index.d.ts +9 -4
- package/build/src/alias/index.js +11 -9
- package/build/src/bounded-list.d.ts +8 -0
- package/build/src/bounded-list.js +9 -0
- package/build/src/cli/commands/akuma-grammar.d.ts +2 -2
- package/build/src/cli/commands/akuma-grammar.js +21 -21
- package/build/src/cli/commands/akuma.d.ts +1 -2
- package/build/src/cli/commands/akuma.js +115 -251
- package/build/src/cli/commands/contract-grammar.d.ts +4 -3
- package/build/src/cli/commands/contract-grammar.js +39 -22
- package/build/src/cli/commands/contract-help.d.ts +3 -1
- package/build/src/cli/commands/contract-help.js +4 -3
- package/build/src/cli/commands/contract.d.ts +6 -3
- package/build/src/cli/commands/contract.js +203 -434
- package/build/src/cli/commands/debt.d.ts +2 -3
- package/build/src/cli/commands/debt.js +101 -317
- package/build/src/cli/commands/report.js +11 -28
- package/build/src/cli/commands/whoami.d.ts +3 -43
- package/build/src/cli/commands/whoami.js +8 -121
- package/build/src/cli/coordinates.d.ts +4 -35
- package/build/src/cli/coordinates.js +13 -129
- package/build/src/cli/parse.d.ts +0 -6
- package/build/src/cli/parse.js +5 -48
- package/build/src/cli/render/akuma-activity.d.ts +31 -16
- package/build/src/cli/render/akuma-activity.js +157 -149
- package/build/src/cli/render/akuma-tool.d.ts +3 -6
- package/build/src/cli/render/akuma-tool.js +20 -14
- package/build/src/cli/render/akuma.d.ts +25 -26
- package/build/src/cli/render/akuma.js +100 -129
- package/build/src/cli/render/catalog.d.ts +4 -7
- package/build/src/cli/render/catalog.js +52 -99
- package/build/src/cli/render/contract-history.d.ts +3 -1
- package/build/src/cli/render/contract-history.js +140 -215
- package/build/src/cli/render/contract-observation.d.ts +43 -30
- package/build/src/cli/render/contract-observation.js +64 -31
- package/build/src/cli/render/contract-wait.js +6 -6
- package/build/src/cli/render/contract.d.ts +41 -6
- package/build/src/cli/render/contract.js +274 -370
- package/build/src/cli/render/debt.d.ts +9 -19
- package/build/src/cli/render/debt.js +120 -185
- package/build/src/cli/render/delivery-preview.d.ts +4 -3
- package/build/src/cli/render/delivery-preview.js +68 -96
- package/build/src/cli/render/kanshi-akuma.d.ts +4 -4
- package/build/src/cli/render/kanshi-akuma.js +70 -59
- package/build/src/cli/render/kanshi.d.ts +4 -4
- package/build/src/cli/render/kanshi.js +205 -221
- package/build/src/cli/render/marks.d.ts +11 -2
- package/build/src/cli/render/marks.js +13 -3
- package/build/src/cli/render/nuke.d.ts +3 -3
- package/build/src/cli/render/nuke.js +13 -16
- package/build/src/cli/render/receipt.d.ts +37 -43
- package/build/src/cli/render/receipt.js +313 -236
- package/build/src/cli/render/reconcile.d.ts +6 -4
- package/build/src/cli/render/reconcile.js +53 -137
- package/build/src/cli/render/refusal.d.ts +3 -2
- package/build/src/cli/render/refusal.js +73 -54
- package/build/src/cli/render/region.d.ts +11 -2
- package/build/src/cli/render/region.js +17 -23
- package/build/src/cli/render/settings.d.ts +0 -1
- package/build/src/cli/render/settings.js +8 -17
- package/build/src/cli/render/terminal.d.ts +2 -0
- package/build/src/cli/render/verbs.d.ts +4 -0
- package/build/src/cli/render/verbs.js +312 -0
- package/build/src/cli/render/whoami.d.ts +1 -1
- package/build/src/cli/render/whoami.js +24 -31
- package/build/src/cli/runtime.d.ts +3 -11
- package/build/src/cli/runtime.js +96 -79
- package/build/src/cli/scan.d.ts +1 -1
- package/build/src/cli/streams.js +1 -0
- package/build/src/contract-guidance.js +2 -2
- package/build/src/contract-worktree.d.ts +2 -15
- package/build/src/contract-worktree.js +19 -35
- package/build/src/core/facts/observation.d.ts +4 -5
- package/build/src/core/facts/observation.js +7 -9
- package/build/src/core/verbs/amend.d.ts +0 -1
- package/build/src/core/verbs/amend.js +3 -3
- package/build/src/core/verbs/bind.d.ts +0 -1
- package/build/src/core/verbs/bind.js +5 -5
- package/build/src/core/verbs/deliver.d.ts +3 -2
- package/build/src/core/verbs/deliver.js +2 -2
- package/build/src/core/verbs/placement.d.ts +0 -5
- package/build/src/core/verbs/placement.js +4 -6
- package/build/src/core/verbs/reintegrate.d.ts +0 -1
- package/build/src/core/verbs/reintegrate.js +2 -2
- package/build/src/debt/board.d.ts +132 -116
- package/build/src/debt/board.js +138 -94
- package/build/src/debt/catalog.d.ts +4 -4
- package/build/src/debt/catalog.js +2 -18
- package/build/src/debt/context.d.ts +15 -3
- package/build/src/debt/context.js +12 -1
- package/build/src/debt/created-observation.d.ts +5 -17
- package/build/src/debt/created-observation.js +14 -6
- package/build/src/debt/document.d.ts +20 -15
- package/build/src/debt/document.js +18 -1
- package/build/src/debt/index.d.ts +346 -23
- package/build/src/debt/index.js +68 -22
- package/build/src/debt/input.d.ts +2 -1
- package/build/src/debt/input.js +14 -0
- package/build/src/debt/lifecycle-operations.d.ts +2 -2
- package/build/src/debt/lifecycle-operations.js +14 -22
- package/build/src/debt/operation-types.d.ts +188 -66
- package/build/src/debt/operation-types.js +113 -1
- package/build/src/debt/operations.d.ts +11 -10
- package/build/src/debt/operations.js +46 -71
- package/build/src/debt/query.d.ts +14 -10
- package/build/src/debt/query.js +3 -12
- package/build/src/debt/store.d.ts +4 -2
- package/build/src/debt/store.js +8 -8
- package/build/src/debt/view.d.ts +0 -3
- package/build/src/debt/view.js +0 -4
- package/build/src/dispatch/index.d.ts +22 -5
- package/build/src/dispatch/index.js +46 -37
- package/build/src/git/admission.d.ts +2 -2
- package/build/src/git/admission.js +2 -1
- package/build/src/git/hooks.d.ts +14 -35
- package/build/src/git/hooks.js +45 -25
- package/build/src/git/integration.d.ts +6 -24
- package/build/src/git/integration.js +10 -16
- package/build/src/git/private-state-seat.d.ts +2 -2
- package/build/src/git/private-state-seat.js +2 -1
- package/build/src/git/reconcile.d.ts +17 -79
- package/build/src/git/reconcile.js +37 -52
- package/build/src/git/scratch.d.ts +3 -3
- package/build/src/git/scratch.js +4 -1
- package/build/src/git/target-placement.d.ts +23 -31
- package/build/src/git/target-placement.js +42 -27
- package/build/src/git/target.d.ts +2 -2
- package/build/src/git/target.js +2 -1
- package/build/src/git/tender.d.ts +7 -39
- package/build/src/git/tender.js +21 -54
- package/build/src/git/terminal-reconcile.js +15 -18
- package/build/src/git/terminal-seal.d.ts +2 -4
- package/build/src/git/terminal-seal.js +7 -33
- package/build/src/git/workspace.d.ts +65 -41
- package/build/src/git/workspace.js +45 -14
- package/build/src/identity/selector.d.ts +2 -0
- package/build/src/identity/selector.js +13 -3
- package/build/src/index.d.ts +48 -54
- package/build/src/index.js +31 -43
- package/build/src/kanshi/counts.d.ts +42 -8
- package/build/src/kanshi/counts.js +13 -2
- package/build/src/kanshi/index.d.ts +5 -5
- package/build/src/kanshi/index.js +4 -3
- package/build/src/kanshi/read.d.ts +489 -6
- package/build/src/kanshi/read.js +334 -483
- package/build/src/kanshi/report.d.ts +2504 -103
- package/build/src/kanshi/report.js +165 -1
- package/build/src/kanshi/select.d.ts +0 -8
- package/build/src/kanshi/select.js +20 -59
- package/build/src/library/address.d.ts +8 -8
- package/build/src/library/address.js +7 -7
- package/build/src/library/akuma-creation.d.ts +690 -84
- package/build/src/library/akuma-creation.js +202 -142
- package/build/src/library/akuma-retention.d.ts +2 -2
- package/build/src/library/akuma-retention.js +2 -2
- package/build/src/library/akumas.d.ts +10 -6
- package/build/src/library/akumas.js +24 -7
- package/build/src/library/bind.d.ts +28 -54
- package/build/src/library/bind.js +6 -4
- package/build/src/library/continuation.d.ts +197 -479
- package/build/src/library/continuation.js +40 -23
- package/build/src/library/contract-address.d.ts +6 -5
- package/build/src/library/contract-address.js +5 -7
- package/build/src/library/contract-composition.d.ts +18 -12
- package/build/src/library/contract-composition.js +55 -47
- package/build/src/library/contract-creation.d.ts +3 -2
- package/build/src/library/contract-creation.js +38 -32
- package/build/src/library/contract-execution.js +77 -38
- package/build/src/library/contract-outcomes.d.ts +1877 -27
- package/build/src/library/contract-outcomes.js +93 -10
- package/build/src/library/contract-settings.d.ts +2 -2
- package/build/src/library/contract-settings.js +18 -14
- package/build/src/library/contract-types.d.ts +238 -61
- package/build/src/library/contract-types.js +131 -1
- package/build/src/library/contract-wait.d.ts +38 -17
- package/build/src/library/contract-wait.js +40 -10
- package/build/src/library/delivery.d.ts +588 -36
- package/build/src/library/delivery.js +35 -27
- package/build/src/library/input.d.ts +1 -1
- package/build/src/library/input.js +1 -2
- package/build/src/library/invocation.d.ts +11 -7
- package/build/src/library/invocation.js +42 -51
- package/build/src/library/kei.d.ts +48 -0
- package/build/src/library/kei.js +256 -0
- package/build/src/library/keiyaku-attribution.d.ts +11 -0
- package/build/src/{cli/delivery-identity.js → library/keiyaku-attribution.js} +12 -1
- package/build/src/library/keiyaku-classify.d.ts +11 -0
- package/build/src/library/keiyaku-classify.js +146 -0
- package/build/src/library/keiyaku-coordinates.d.ts +31 -0
- package/build/src/library/keiyaku-coordinates.js +103 -0
- package/build/src/library/keiyaku-debt.d.ts +142 -0
- package/build/src/library/keiyaku-debt.js +188 -0
- package/build/src/library/keiyaku-identity.d.ts +58 -0
- package/build/src/library/keiyaku-identity.js +176 -0
- package/build/src/library/keiyaku-policy.d.ts +27 -0
- package/build/src/library/keiyaku-policy.js +44 -0
- package/build/src/library/keiyaku-status.d.ts +1487 -0
- package/build/src/library/keiyaku-status.js +92 -0
- package/build/src/library/keiyaku-verbs.d.ts +6774 -0
- package/build/src/library/keiyaku-verbs.js +458 -0
- package/build/src/library/keiyaku.d.ts +871 -38
- package/build/src/library/keiyaku.js +677 -127
- package/build/src/library/nuke.d.ts +22 -0
- package/build/src/library/nuke.js +4 -1
- package/build/src/library/outcome.d.ts +706 -692
- package/build/src/library/outcome.js +582 -167
- package/build/src/library/reconcile.d.ts +464 -116
- package/build/src/library/reconcile.js +174 -102
- package/build/src/library/refusal.d.ts +113 -577
- package/build/src/library/refusal.js +64 -51
- package/build/src/library/region.d.ts +5 -24
- package/build/src/library/region.js +6 -21
- package/build/src/library/selection.d.ts +181 -32
- package/build/src/library/selection.js +99 -64
- package/build/src/mcp/adapter.d.ts +11 -0
- package/build/src/mcp/adapter.js +106 -0
- package/build/src/mcp/help.d.ts +1 -0
- package/build/src/mcp/help.js +26 -0
- package/build/src/mcp/index.d.ts +2 -0
- package/build/src/mcp/index.js +37 -0
- package/build/src/plugin/public.d.ts +1 -1
- package/build/src/plugin/runtime.js +17 -14
- package/build/src/protocol/arc.d.ts +4 -1
- package/build/src/protocol/arc.js +7 -1
- package/build/src/protocol/attempt.d.ts +2 -3
- package/build/src/protocol/attempt.js +1 -10
- package/build/src/protocol/bind.d.ts +6 -7
- package/build/src/protocol/bind.js +9 -5
- package/build/src/protocol/completion.d.ts +448 -12
- package/build/src/protocol/completion.js +164 -26
- package/build/src/protocol/deliver.d.ts +26 -24
- package/build/src/protocol/deliver.js +24 -52
- package/build/src/protocol/delivery-preview.d.ts +97 -247
- package/build/src/protocol/delivery-preview.js +132 -128
- package/build/src/protocol/execution-observation.d.ts +146 -123
- package/build/src/protocol/execution-observation.js +9 -6
- package/build/src/protocol/intent.d.ts +9 -48
- package/build/src/protocol/intent.js +32 -46
- package/build/src/protocol/operations.d.ts +207 -505
- package/build/src/protocol/operations.js +81 -134
- package/build/src/protocol/placement.d.ts +0 -1
- package/build/src/protocol/placement.js +5 -2
- package/build/src/protocol/progress.d.ts +7 -97
- package/build/src/protocol/progress.js +7 -55
- package/build/src/protocol/read/observation.d.ts +13 -6
- package/build/src/protocol/read/observation.js +10 -9
- package/build/src/protocol/read/status.d.ts +464 -93
- package/build/src/protocol/read/status.js +372 -85
- package/build/src/protocol/reconcile.d.ts +2 -0
- package/build/src/protocol/reconcile.js +12 -11
- package/build/src/protocol/reintegrate.d.ts +0 -1
- package/build/src/protocol/reintegrate.js +4 -4
- package/build/src/protocol/result-leaves.d.ts +528 -0
- package/build/src/protocol/result-leaves.js +195 -0
- package/build/src/protocol/result-reasons.d.ts +129 -0
- package/build/src/protocol/result-reasons.js +87 -0
- package/build/src/protocol/review.d.ts +14 -11
- package/build/src/protocol/review.js +30 -14
- package/build/src/protocol/run.d.ts +4 -4
- package/build/src/protocol/run.js +4 -1
- package/build/src/protocol/verify.d.ts +359 -30
- package/build/src/protocol/verify.js +118 -28
- package/build/src/region.d.ts +26 -0
- package/build/src/region.js +28 -0
- package/build/src/runtime/proc/diagnostic.d.ts +11 -0
- package/build/src/runtime/proc/diagnostic.js +20 -0
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settings.d.ts +126 -32
- package/build/src/settings.js +107 -34
- package/build/src/settlement/settle.d.ts +29 -12
- package/build/src/settlement/settle.js +22 -15
- package/build/src/verification/declaration.d.ts +1 -3
- package/build/src/verification/declaration.js +2 -5
- package/build/src/verification/execution.d.ts +7 -19
- package/build/src/verification/execution.js +37 -16
- package/build/src/verification/observation.d.ts +13 -13
- package/build/src/verification/observation.js +9 -7
- package/build/src/world.d.ts +8 -0
- package/build/src/world.js +7 -0
- package/package.json +6 -5
- package/plugins/paseo/plugin/server/keiyaku.ts +13 -46
- package/plugins/paseo/plugin/server/message.ts +8 -30
- package/plugins/paseo/plugin/server/mirror.ts +16 -20
- package/plugins/paseo/plugin/server/provider.ts +1 -1
- package/plugins/paseo/plugin/server/sdk.ts +14 -6
- package/plugins/pi/README.md +5 -5
- package/plugins/pi/akuma-tools.ts +17 -23
- package/skills/keiyaku/SKILL.md +12 -12
- package/skills/keiyaku-akuma/SKILL.md +16 -16
- package/skills/keiyaku-akuma/references/automation.md +14 -14
- package/skills/keiyaku-babysit/SKILL.md +10 -10
- package/skills/keiyaku-bind/SKILL.md +15 -15
- package/skills/keiyaku-debt/SKILL.md +16 -16
- package/skills/keiyaku-workflow/SKILL.md +21 -21
- package/build/src/cli/actor.d.ts +0 -10
- package/build/src/cli/actor.js +0 -24
- package/build/src/cli/akuma-caller.d.ts +0 -3
- package/build/src/cli/akuma-caller.js +0 -31
- package/build/src/cli/delivery-identity.d.ts +0 -3
- package/build/src/cli/render/effects.d.ts +0 -26
- package/build/src/cli/render/effects.js +0 -41
- package/build/src/cli/selectors.d.ts +0 -10
- package/build/src/cli/selectors.js +0 -42
- package/build/src/markdown/diff.d.ts +0 -1
- package/build/src/markdown/diff.js +0 -4
|
@@ -1,36 +1,365 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type { DocumentDerivation,
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ContractState, SnapshotId } from "../core/facts/types.js";
|
|
3
|
+
import type { DocumentDerivation, MechanicalPreparationRefusal, MutationOperationInput } from "./operations.js";
|
|
4
4
|
import { type ContractCheckpoint } from "./progress.js";
|
|
5
|
-
import { verifyRefusalSchema, deliverRefusalSchema,
|
|
6
|
-
import type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
kind:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
kind: "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
kind: "
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
import { verificationStopSchema as rawVerificationStopSchema, verifyRefusalSchema, deliverRefusalSchema, verificationDeclarationRefusalSchema } from "./operations.js";
|
|
6
|
+
import { type CompletionEvidence } from "./completion.js";
|
|
7
|
+
export declare const runtimeStopSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
8
|
+
kind: z.ZodEnum<{
|
|
9
|
+
cancelled: "cancelled";
|
|
10
|
+
"unknown-exit": "unknown-exit";
|
|
11
|
+
}>;
|
|
12
|
+
diagnostic: z.ZodExactOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
14
|
+
kind: z.ZodEnum<{
|
|
15
|
+
"spawn-error": "spawn-error";
|
|
16
|
+
"candidate-unavailable": "candidate-unavailable";
|
|
17
|
+
"environment-failure": "environment-failure";
|
|
18
|
+
}>;
|
|
19
|
+
diagnostic: z.ZodString;
|
|
20
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
21
|
+
kind: z.ZodLiteral<"environment-hook-failure">;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
diagnostic: z.ZodString;
|
|
24
|
+
}, z.core.$strict>>]>;
|
|
25
|
+
export declare const checkAdmissionStopSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
26
|
+
kind: z.ZodLiteral<"refused">;
|
|
27
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
28
|
+
kind: z.ZodEnum<{
|
|
29
|
+
terminal: "terminal";
|
|
30
|
+
"contract-missing": "contract-missing";
|
|
31
|
+
}>;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"retry">;
|
|
35
|
+
reason: z.ZodEnum<{
|
|
36
|
+
exhausted: "exhausted";
|
|
37
|
+
collision: "collision";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"retry">;
|
|
41
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
42
|
+
diagnostic: z.ZodString;
|
|
43
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
45
|
+
}, z.core.$strict>>]>;
|
|
46
|
+
export declare const verificationStopSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
47
|
+
kind: z.ZodEnum<{
|
|
48
|
+
cancelled: "cancelled";
|
|
49
|
+
"unknown-exit": "unknown-exit";
|
|
50
|
+
}>;
|
|
51
|
+
diagnostic: z.ZodExactOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
53
|
+
kind: z.ZodEnum<{
|
|
54
|
+
"spawn-error": "spawn-error";
|
|
55
|
+
"candidate-unavailable": "candidate-unavailable";
|
|
56
|
+
"environment-failure": "environment-failure";
|
|
57
|
+
}>;
|
|
58
|
+
diagnostic: z.ZodString;
|
|
59
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"environment-hook-failure">;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
diagnostic: z.ZodString;
|
|
63
|
+
}, z.core.$strict>>]>, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
64
|
+
kind: z.ZodLiteral<"refused">;
|
|
65
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
66
|
+
kind: z.ZodEnum<{
|
|
67
|
+
terminal: "terminal";
|
|
68
|
+
"contract-missing": "contract-missing";
|
|
69
|
+
}>;
|
|
70
|
+
}, z.core.$strict>>;
|
|
71
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"retry">;
|
|
73
|
+
reason: z.ZodEnum<{
|
|
74
|
+
exhausted: "exhausted";
|
|
75
|
+
collision: "collision";
|
|
76
|
+
}>;
|
|
77
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
78
|
+
kind: z.ZodLiteral<"retry">;
|
|
79
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
80
|
+
diagnostic: z.ZodString;
|
|
81
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
83
|
+
}, z.core.$strict>>]>]>;
|
|
84
|
+
export type VerificationStop = z.output<typeof verificationStopSchema>;
|
|
85
|
+
export declare const verificationCheckSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"terminal">;
|
|
87
|
+
verdict: z.ZodLiteral<"satisfied">;
|
|
88
|
+
admission: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodLiteral<"reused">, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"refused">;
|
|
90
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
91
|
+
kind: z.ZodEnum<{
|
|
92
|
+
terminal: "terminal";
|
|
93
|
+
"contract-missing": "contract-missing";
|
|
94
|
+
}>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"retry">;
|
|
98
|
+
reason: z.ZodEnum<{
|
|
99
|
+
exhausted: "exhausted";
|
|
100
|
+
collision: "collision";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
103
|
+
kind: z.ZodLiteral<"retry">;
|
|
104
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
105
|
+
diagnostic: z.ZodString;
|
|
106
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
108
|
+
}, z.core.$strict>>]>]>>;
|
|
109
|
+
index: z.ZodNumber;
|
|
110
|
+
requirement: z.ZodString;
|
|
111
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"terminal">;
|
|
114
|
+
verdict: z.ZodLiteral<"unsatisfied">;
|
|
115
|
+
summary: z.ZodString;
|
|
116
|
+
admission: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodLiteral<"reused">, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
117
|
+
kind: z.ZodLiteral<"refused">;
|
|
118
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
119
|
+
kind: z.ZodEnum<{
|
|
120
|
+
terminal: "terminal";
|
|
121
|
+
"contract-missing": "contract-missing";
|
|
122
|
+
}>;
|
|
123
|
+
}, z.core.$strict>>;
|
|
124
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
125
|
+
kind: z.ZodLiteral<"retry">;
|
|
126
|
+
reason: z.ZodEnum<{
|
|
127
|
+
exhausted: "exhausted";
|
|
128
|
+
collision: "collision";
|
|
129
|
+
}>;
|
|
130
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"retry">;
|
|
132
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
133
|
+
diagnostic: z.ZodString;
|
|
134
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
135
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
136
|
+
}, z.core.$strict>>]>]>>;
|
|
137
|
+
index: z.ZodNumber;
|
|
138
|
+
requirement: z.ZodString;
|
|
139
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strict>>, ...(z.ZodReadonly<z.ZodObject<{
|
|
141
|
+
kind: z.ZodEnum<{
|
|
142
|
+
"spawn-error": "spawn-error";
|
|
143
|
+
"candidate-unavailable": "candidate-unavailable";
|
|
144
|
+
"environment-failure": "environment-failure";
|
|
145
|
+
}>;
|
|
146
|
+
diagnostic: z.ZodString;
|
|
147
|
+
index: z.ZodNumber;
|
|
148
|
+
requirement: z.ZodString;
|
|
149
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strict>> | z.ZodReadonly<z.ZodObject<{
|
|
151
|
+
kind: z.ZodLiteral<"environment-hook-failure">;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
diagnostic: z.ZodString;
|
|
154
|
+
index: z.ZodNumber;
|
|
155
|
+
requirement: z.ZodString;
|
|
156
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>> | z.ZodReadonly<z.ZodObject<{
|
|
158
|
+
kind: z.ZodEnum<{
|
|
159
|
+
cancelled: "cancelled";
|
|
160
|
+
"unknown-exit": "unknown-exit";
|
|
161
|
+
}>;
|
|
162
|
+
diagnostic: z.ZodExactOptional<z.ZodString>;
|
|
163
|
+
index: z.ZodNumber;
|
|
164
|
+
requirement: z.ZodString;
|
|
165
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strict>>)[]]>;
|
|
167
|
+
export declare const verifyValueSchema: z.ZodReadonly<z.ZodObject<{
|
|
168
|
+
snapshot: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
169
|
+
checks: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
170
|
+
kind: z.ZodLiteral<"terminal">;
|
|
171
|
+
verdict: z.ZodLiteral<"satisfied">;
|
|
172
|
+
admission: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodLiteral<"reused">, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
173
|
+
kind: z.ZodLiteral<"refused">;
|
|
174
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
175
|
+
kind: z.ZodEnum<{
|
|
176
|
+
terminal: "terminal";
|
|
177
|
+
"contract-missing": "contract-missing";
|
|
178
|
+
}>;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
181
|
+
kind: z.ZodLiteral<"retry">;
|
|
182
|
+
reason: z.ZodEnum<{
|
|
183
|
+
exhausted: "exhausted";
|
|
184
|
+
collision: "collision";
|
|
185
|
+
}>;
|
|
186
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"retry">;
|
|
188
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
189
|
+
diagnostic: z.ZodString;
|
|
190
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
191
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
192
|
+
}, z.core.$strict>>]>]>>;
|
|
193
|
+
index: z.ZodNumber;
|
|
194
|
+
requirement: z.ZodString;
|
|
195
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
197
|
+
kind: z.ZodLiteral<"terminal">;
|
|
198
|
+
verdict: z.ZodLiteral<"unsatisfied">;
|
|
199
|
+
summary: z.ZodString;
|
|
200
|
+
admission: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodLiteral<"reused">, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
201
|
+
kind: z.ZodLiteral<"refused">;
|
|
202
|
+
reason: z.ZodReadonly<z.ZodObject<{
|
|
203
|
+
kind: z.ZodEnum<{
|
|
204
|
+
terminal: "terminal";
|
|
205
|
+
"contract-missing": "contract-missing";
|
|
206
|
+
}>;
|
|
207
|
+
}, z.core.$strict>>;
|
|
208
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
209
|
+
kind: z.ZodLiteral<"retry">;
|
|
210
|
+
reason: z.ZodEnum<{
|
|
211
|
+
exhausted: "exhausted";
|
|
212
|
+
collision: "collision";
|
|
213
|
+
}>;
|
|
214
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
215
|
+
kind: z.ZodLiteral<"retry">;
|
|
216
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
217
|
+
diagnostic: z.ZodString;
|
|
218
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
220
|
+
}, z.core.$strict>>]>]>>;
|
|
221
|
+
index: z.ZodNumber;
|
|
222
|
+
requirement: z.ZodString;
|
|
223
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strict>>, ...(z.ZodReadonly<z.ZodObject<{
|
|
225
|
+
kind: z.ZodEnum<{
|
|
226
|
+
"spawn-error": "spawn-error";
|
|
227
|
+
"candidate-unavailable": "candidate-unavailable";
|
|
228
|
+
"environment-failure": "environment-failure";
|
|
229
|
+
}>;
|
|
230
|
+
diagnostic: z.ZodString;
|
|
231
|
+
index: z.ZodNumber;
|
|
232
|
+
requirement: z.ZodString;
|
|
233
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
234
|
+
}, z.core.$strict>> | z.ZodReadonly<z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"environment-hook-failure">;
|
|
236
|
+
name: z.ZodString;
|
|
237
|
+
diagnostic: z.ZodString;
|
|
238
|
+
index: z.ZodNumber;
|
|
239
|
+
requirement: z.ZodString;
|
|
240
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strict>> | z.ZodReadonly<z.ZodObject<{
|
|
242
|
+
kind: z.ZodEnum<{
|
|
243
|
+
cancelled: "cancelled";
|
|
244
|
+
"unknown-exit": "unknown-exit";
|
|
245
|
+
}>;
|
|
246
|
+
diagnostic: z.ZodExactOptional<z.ZodString>;
|
|
247
|
+
index: z.ZodNumber;
|
|
248
|
+
requirement: z.ZodString;
|
|
249
|
+
retainedPath: z.ZodExactOptional<z.ZodString>;
|
|
250
|
+
}, z.core.$strict>>)[]]>>>;
|
|
251
|
+
placement: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
252
|
+
kind: z.ZodLiteral<"placed">;
|
|
253
|
+
integration: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
254
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
255
|
+
predecessor: z.ZodExactOptional<z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>>;
|
|
256
|
+
}, z.core.$strict>>, z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
257
|
+
kind: z.ZodEnum<{
|
|
258
|
+
terminal: "terminal";
|
|
259
|
+
"contract-missing": "contract-missing";
|
|
260
|
+
}>;
|
|
261
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
262
|
+
kind: z.ZodEnum<{
|
|
263
|
+
"target-contract-missing": "target-contract-missing";
|
|
264
|
+
"target-contract-terminal": "target-contract-terminal";
|
|
265
|
+
}>;
|
|
266
|
+
targetContractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
|
|
267
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"target-workspace-unavailable">;
|
|
269
|
+
targetContractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
|
|
270
|
+
reason: z.ZodEnum<{
|
|
271
|
+
missing: "missing";
|
|
272
|
+
replaced: "replaced";
|
|
273
|
+
unappointed: "unappointed";
|
|
274
|
+
association: "association";
|
|
275
|
+
attached: "attached";
|
|
276
|
+
uncommitted: "uncommitted";
|
|
277
|
+
operation: "operation";
|
|
278
|
+
}>;
|
|
279
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
280
|
+
kind: z.ZodEnum<{
|
|
281
|
+
"target-missing": "target-missing";
|
|
282
|
+
"delivery-missing": "delivery-missing";
|
|
283
|
+
}>;
|
|
284
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
285
|
+
kind: z.ZodLiteral<"prerequisites-unsatisfied">;
|
|
286
|
+
unmet: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
287
|
+
contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ContractId, string>>;
|
|
288
|
+
state: z.ZodEnum<{
|
|
289
|
+
active: "active";
|
|
290
|
+
abandoned: "abandoned";
|
|
291
|
+
missing: "missing";
|
|
292
|
+
}>;
|
|
293
|
+
}, z.core.$strict>>>>;
|
|
294
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
295
|
+
kind: z.ZodLiteral<"gates-unsatisfied">;
|
|
296
|
+
unmet: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
297
|
+
state: z.ZodLiteral<"missing">;
|
|
298
|
+
gate: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").Gate, string>>;
|
|
299
|
+
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
300
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
301
|
+
state: z.ZodLiteral<"unsatisfied">;
|
|
302
|
+
summary: z.ZodExactOptional<z.ZodString>;
|
|
303
|
+
gate: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").Gate, string>>;
|
|
304
|
+
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
305
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
306
|
+
state: z.ZodLiteral<"stale">;
|
|
307
|
+
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
308
|
+
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
309
|
+
gate: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").Gate, string>>;
|
|
310
|
+
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
311
|
+
}, z.core.$strict>>]>>>;
|
|
312
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
313
|
+
kind: z.ZodLiteral<"checkout-not-followable">;
|
|
314
|
+
target: z.ZodString;
|
|
315
|
+
path: z.ZodString;
|
|
316
|
+
paths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
317
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
318
|
+
kind: z.ZodEnum<{
|
|
319
|
+
"not-based-on-target": "not-based-on-target";
|
|
320
|
+
"unrelated-histories": "unrelated-histories";
|
|
321
|
+
}>;
|
|
322
|
+
targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
323
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
324
|
+
kind: z.ZodLiteral<"integration-conflict">;
|
|
325
|
+
targetHead: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
326
|
+
conflictPaths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
327
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
328
|
+
kind: z.ZodLiteral<"integration-unsupported">;
|
|
329
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
330
|
+
kind: z.ZodLiteral<"retry">;
|
|
331
|
+
reason: z.ZodEnum<{
|
|
332
|
+
exhausted: "exhausted";
|
|
333
|
+
collision: "collision";
|
|
334
|
+
}>;
|
|
335
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
336
|
+
kind: z.ZodLiteral<"retry">;
|
|
337
|
+
reason: z.ZodLiteral<"publication-failed">;
|
|
338
|
+
diagnostic: z.ZodString;
|
|
339
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
340
|
+
kind: z.ZodLiteral<"failed">;
|
|
341
|
+
diagnostic: z.ZodString;
|
|
342
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
343
|
+
kind: z.ZodLiteral<"target-content-identical">;
|
|
344
|
+
target: z.ZodString;
|
|
345
|
+
expected: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
346
|
+
observed: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
347
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
348
|
+
kind: z.ZodLiteral<"target-moved">;
|
|
349
|
+
target: z.ZodString;
|
|
350
|
+
integration: z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>;
|
|
351
|
+
observed: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<SnapshotId, string>>>;
|
|
352
|
+
}, z.core.$strict>>]>]>>;
|
|
353
|
+
}, z.core.$strict>>;
|
|
354
|
+
export type VerificationCheck = z.output<typeof verificationCheckSchema>;
|
|
355
|
+
export type VerifyValue = z.output<typeof verifyValueSchema>;
|
|
356
|
+
export declare function compactVerificationStop(stop: z.output<typeof rawVerificationStopSchema>): VerificationStop;
|
|
357
|
+
type VerifyAcceptedValue = Readonly<{
|
|
30
358
|
snapshot: SnapshotId;
|
|
31
359
|
checks: readonly VerificationCheck[];
|
|
32
360
|
}>;
|
|
33
|
-
|
|
361
|
+
export declare function compactVerify(value: CompletionEvidence & VerifyAcceptedValue): VerifyValue;
|
|
362
|
+
type VerifyRefusal = z.infer<typeof verifyRefusalSchema> | z.infer<typeof deliverRefusalSchema> | MechanicalPreparationRefusal | z.infer<typeof verificationDeclarationRefusalSchema>;
|
|
34
363
|
type VerifyOperationInput = MutationOperationInput & Readonly<{
|
|
35
364
|
deriveDocument(state: ContractState): DocumentDerivation;
|
|
36
365
|
includeDirty: boolean;
|
|
@@ -44,7 +373,7 @@ export type VerifyOperationResult = Readonly<{
|
|
|
44
373
|
}> | Readonly<{
|
|
45
374
|
kind: "accepted";
|
|
46
375
|
checkpoint: ContractCheckpoint;
|
|
47
|
-
value:
|
|
376
|
+
value: VerifyAcceptedValue;
|
|
48
377
|
}>;
|
|
49
378
|
/** Capture a prospective delivery without admitting a candidate, then independently attest each check. */
|
|
50
379
|
export declare function verifyOperation(input: VerifyOperationInput): Promise<VerifyOperationResult>;
|
|
@@ -1,34 +1,114 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { snapshotIdSchema } from "../git/identity.js";
|
|
3
|
+
import { activeContract, targetContractRefusal } from "../core/facts/observation.js";
|
|
2
4
|
import { observeGitForAdmissionAt } from "../git/observe.js";
|
|
3
5
|
import { VERIFIED, verificationRequirement } from "../verification/declaration.js";
|
|
4
6
|
import { prepareDelivery, deliveryIntegrationSnapshots } from "./deliver.js";
|
|
5
7
|
import { verifyRequirement } from "./intent.js";
|
|
6
8
|
import { timestamp, unpackVerificationOutcome } from "./operations.js";
|
|
7
9
|
import { executionStop } from "./progress.js";
|
|
10
|
+
import { compactPlacement, placementSchema } from "./completion.js";
|
|
11
|
+
import { activeReasonSchema, retrySchema, compactRetry, compactReason } from "./result-reasons.js";
|
|
12
|
+
const checkCoordinate = {
|
|
13
|
+
index: z.number().int().positive(),
|
|
14
|
+
requirement: z.string().min(1),
|
|
15
|
+
retainedPath: z.string().exactOptional(),
|
|
16
|
+
};
|
|
17
|
+
export const runtimeStopSchema = z.union([
|
|
18
|
+
z
|
|
19
|
+
.strictObject({ kind: z.enum(["unknown-exit", "cancelled"]), diagnostic: z.string().min(1).exactOptional() })
|
|
20
|
+
.readonly(),
|
|
21
|
+
z
|
|
22
|
+
.strictObject({
|
|
23
|
+
kind: z.enum(["candidate-unavailable", "spawn-error", "environment-failure"]),
|
|
24
|
+
diagnostic: z.string().min(1),
|
|
25
|
+
})
|
|
26
|
+
.readonly(),
|
|
27
|
+
z
|
|
28
|
+
.strictObject({
|
|
29
|
+
kind: z.literal("environment-hook-failure"),
|
|
30
|
+
name: z.string().min(1),
|
|
31
|
+
diagnostic: z.string().min(1),
|
|
32
|
+
})
|
|
33
|
+
.readonly(),
|
|
34
|
+
]);
|
|
35
|
+
export const checkAdmissionStopSchema = z.union([
|
|
36
|
+
z.strictObject({ kind: z.literal("refused"), reason: activeReasonSchema }).readonly(),
|
|
37
|
+
...retrySchema.options,
|
|
38
|
+
z.strictObject({ kind: z.literal("cancelled") }).readonly(),
|
|
39
|
+
]);
|
|
40
|
+
export const verificationStopSchema = z.union([runtimeStopSchema, checkAdmissionStopSchema]);
|
|
41
|
+
const admission = z.union([z.literal("reused"), checkAdmissionStopSchema]).exactOptional();
|
|
42
|
+
export const verificationCheckSchema = z.union([
|
|
43
|
+
z
|
|
44
|
+
.strictObject({ ...checkCoordinate, kind: z.literal("terminal"), verdict: z.literal("satisfied"), admission })
|
|
45
|
+
.readonly(),
|
|
46
|
+
z
|
|
47
|
+
.strictObject({
|
|
48
|
+
...checkCoordinate,
|
|
49
|
+
kind: z.literal("terminal"),
|
|
50
|
+
verdict: z.literal("unsatisfied"),
|
|
51
|
+
summary: z.string(),
|
|
52
|
+
admission,
|
|
53
|
+
})
|
|
54
|
+
.readonly(),
|
|
55
|
+
...runtimeStopSchema.options.map((schema) => schema.unwrap().extend(checkCoordinate).readonly()),
|
|
56
|
+
]);
|
|
57
|
+
export const verifyValueSchema = z
|
|
58
|
+
.strictObject({
|
|
59
|
+
snapshot: snapshotIdSchema,
|
|
60
|
+
checks: z.array(verificationCheckSchema).readonly(),
|
|
61
|
+
placement: placementSchema.exactOptional(),
|
|
62
|
+
})
|
|
63
|
+
.readonly();
|
|
64
|
+
export function compactVerificationStop(stop) {
|
|
65
|
+
if ("refusal" in stop)
|
|
66
|
+
return { kind: "refused", reason: compactReason(stop.refusal) };
|
|
67
|
+
if ("retry" in stop)
|
|
68
|
+
return compactRetry(stop.retry);
|
|
69
|
+
switch (stop.failure) {
|
|
70
|
+
case "cancelled":
|
|
71
|
+
case "unknown-exit":
|
|
72
|
+
return stop.diagnostic === undefined
|
|
73
|
+
? { kind: stop.failure }
|
|
74
|
+
: { kind: stop.failure, diagnostic: stop.diagnostic };
|
|
75
|
+
case "environment-failure":
|
|
76
|
+
return "name" in stop
|
|
77
|
+
? { kind: "environment-hook-failure", name: stop.name, diagnostic: stop.diagnostic }
|
|
78
|
+
: { kind: stop.failure, diagnostic: stop.diagnostic };
|
|
79
|
+
case "candidate-unavailable":
|
|
80
|
+
case "spawn-error":
|
|
81
|
+
return { kind: stop.failure, diagnostic: stop.diagnostic };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export function compactVerify(value) {
|
|
85
|
+
const placement = compactPlacement(value);
|
|
86
|
+
return {
|
|
87
|
+
snapshot: value.snapshot,
|
|
88
|
+
checks: value.checks,
|
|
89
|
+
...(placement === undefined ? {} : { placement }),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
8
92
|
async function prepareVerification(input) {
|
|
9
93
|
input.signal?.throwIfAborted();
|
|
10
94
|
const observed = await observeGitForAdmissionAt(input.scope, input.channel, [input.contractId]);
|
|
11
95
|
const state = activeContract(observed.decision, input.contractId);
|
|
12
96
|
if ("kind" in state)
|
|
13
97
|
return { kind: "refused", refusal: state };
|
|
14
|
-
const targetRefusal = targetContractRefusal(observed.decision, state.
|
|
98
|
+
const targetRefusal = targetContractRefusal(observed.decision, state.coordinates.target);
|
|
15
99
|
if (targetRefusal !== undefined)
|
|
16
100
|
return { kind: "refused", refusal: targetRefusal };
|
|
17
101
|
const derivation = input.deriveDocument(state);
|
|
18
|
-
if (!documentIsCurrent(state, derivation.document))
|
|
19
|
-
return { kind: "refused", refusal: { kind: "document-moved", contractId: state.id } };
|
|
20
102
|
if (derivation.verification.kind === "refused")
|
|
21
103
|
return { kind: "refused", refusal: derivation.verification.refusal };
|
|
22
104
|
const definition = derivation.verification.data;
|
|
23
105
|
if (definition === null)
|
|
24
|
-
return { kind: "refused", refusal: { kind: "verification-not-selected"
|
|
106
|
+
return { kind: "refused", refusal: { kind: "verification-not-selected" } };
|
|
25
107
|
if (input.index !== undefined && input.index > definition.declarations.length)
|
|
26
108
|
return {
|
|
27
109
|
kind: "refused",
|
|
28
110
|
refusal: {
|
|
29
111
|
kind: "verification-index-out-of-range",
|
|
30
|
-
contractId: state.id,
|
|
31
|
-
index: input.index,
|
|
32
112
|
total: definition.declarations.length,
|
|
33
113
|
},
|
|
34
114
|
};
|
|
@@ -51,29 +131,40 @@ async function prepareVerification(input) {
|
|
|
51
131
|
return { kind: "prepared", checkpoint: { state, journal }, definition, snapshot: prepared.data.integration.snapshot };
|
|
52
132
|
}
|
|
53
133
|
function checkReport(coordinate, checked) {
|
|
134
|
+
const { index, requirement, retainedPath } = coordinate;
|
|
135
|
+
const fields = { index, requirement, ...(retainedPath === undefined ? {} : { retainedPath }) };
|
|
54
136
|
if (checked.counts === undefined) {
|
|
55
137
|
if (checked.stop === undefined)
|
|
56
138
|
throw new Error("nonterminal verification requires a stop");
|
|
57
|
-
|
|
139
|
+
const stop = compactVerificationStop(checked.stop);
|
|
140
|
+
if (stop.kind === "refused" || stop.kind === "retry")
|
|
141
|
+
throw new Error("nonterminal check requires a runtime stop");
|
|
142
|
+
return { ...fields, ...stop };
|
|
58
143
|
}
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
144
|
+
// A terminal verdict only proves admission when custody holds the matching attestation, reuse, or stop.
|
|
145
|
+
const attested = checked.admission?.facts.some((fact) => fact.kind === "attestation" && fact.data.gate === VERIFIED && fact.data.requirement === requirement);
|
|
146
|
+
let admission;
|
|
147
|
+
if (checked.reuse !== undefined)
|
|
148
|
+
admission = "reused";
|
|
149
|
+
else if (attested === true)
|
|
150
|
+
admission = undefined;
|
|
151
|
+
else if (checked.stop !== undefined) {
|
|
152
|
+
const stop = compactVerificationStop(checked.stop);
|
|
153
|
+
if (stop.kind === "refused" || stop.kind === "retry")
|
|
154
|
+
admission = stop;
|
|
155
|
+
else if (stop.kind === "cancelled")
|
|
156
|
+
admission = { kind: "cancelled" };
|
|
157
|
+
else
|
|
158
|
+
throw new Error("terminal check admission can only refuse, retry or cancel");
|
|
159
|
+
}
|
|
160
|
+
else
|
|
69
161
|
throw new Error("terminal verification requires its admission conclusion");
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
};
|
|
162
|
+
const terminal = { ...fields, kind: "terminal", ...(admission === undefined ? {} : { admission }) };
|
|
163
|
+
if (checked.counts.verdict === "satisfied")
|
|
164
|
+
return { ...terminal, verdict: "satisfied" };
|
|
165
|
+
if (checked.counts.summary === undefined)
|
|
166
|
+
throw new Error("unsatisfied terminal check requires its diagnosis");
|
|
167
|
+
return { ...terminal, verdict: "unsatisfied", summary: checked.counts.summary };
|
|
77
168
|
}
|
|
78
169
|
/** Capture a prospective delivery without admitting a candidate, then independently attest each check. */
|
|
79
170
|
export async function verifyOperation(input) {
|
|
@@ -91,7 +182,7 @@ export async function verifyOperation(input) {
|
|
|
91
182
|
.filter(({ index }) => input.index === undefined || input.index === index);
|
|
92
183
|
for (const { declaration, index } of selected) {
|
|
93
184
|
if (input.signal?.aborted) {
|
|
94
|
-
input.progress?.recordStop(executionStop(state.id,
|
|
185
|
+
input.progress?.recordStop(executionStop(state.id, input.signal.reason, input.signal));
|
|
95
186
|
break;
|
|
96
187
|
}
|
|
97
188
|
const requirement = verificationRequirement(declaration);
|
|
@@ -115,12 +206,11 @@ export async function verifyOperation(input) {
|
|
|
115
206
|
const coordinate = {
|
|
116
207
|
index,
|
|
117
208
|
requirement,
|
|
118
|
-
snapshot,
|
|
119
209
|
...(result.leak?.path === undefined ? {} : { retainedPath: result.leak.path }),
|
|
120
210
|
};
|
|
121
211
|
const check = checkReport(coordinate, checked);
|
|
122
212
|
checks.push(check);
|
|
123
|
-
input.progress?.recordVerificationCheck(state.id, check);
|
|
213
|
+
input.progress?.recordVerificationCheck(state.id, snapshot, check);
|
|
124
214
|
if (checked.stop !== undefined)
|
|
125
215
|
break;
|
|
126
216
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const regionOverlapSchema: z.ZodObject<{
|
|
3
|
+
contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./index.js").ContractId, string>>;
|
|
4
|
+
patterns: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
5
|
+
mine: z.ZodString;
|
|
6
|
+
theirs: z.ZodString;
|
|
7
|
+
relation: z.ZodExactOptional<z.ZodEnum<{
|
|
8
|
+
"mine-within-theirs": "mine-within-theirs";
|
|
9
|
+
"theirs-within-mine": "theirs-within-mine";
|
|
10
|
+
intersect: "intersect";
|
|
11
|
+
}>>;
|
|
12
|
+
}, z.core.$strict>>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type RegionOverlap = z.infer<typeof regionOverlapSchema>;
|
|
15
|
+
export declare const regionOverlapResultSchema: z.ZodReadonly<z.ZodObject<{
|
|
16
|
+
contractId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./index.js").ContractId, string>>;
|
|
17
|
+
patterns: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
18
|
+
mine: z.ZodString;
|
|
19
|
+
theirs: z.ZodString;
|
|
20
|
+
relation: z.ZodExactOptional<z.ZodEnum<{
|
|
21
|
+
"mine-within-theirs": "mine-within-theirs";
|
|
22
|
+
"theirs-within-mine": "theirs-within-mine";
|
|
23
|
+
intersect: "intersect";
|
|
24
|
+
}>>;
|
|
25
|
+
}, z.core.$strict>>>>;
|
|
26
|
+
}, z.core.$strict>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { contractIdSchema } from "./git/identity.js";
|
|
3
|
+
export const regionOverlapSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
contractId: contractIdSchema,
|
|
6
|
+
patterns: z
|
|
7
|
+
.array(z
|
|
8
|
+
.object({
|
|
9
|
+
mine: z.string(),
|
|
10
|
+
theirs: z.string(),
|
|
11
|
+
relation: z.enum(["mine-within-theirs", "theirs-within-mine", "intersect"]).exactOptional(),
|
|
12
|
+
})
|
|
13
|
+
.strict())
|
|
14
|
+
.min(1)
|
|
15
|
+
.readonly(),
|
|
16
|
+
})
|
|
17
|
+
.strict();
|
|
18
|
+
const regionPatternSchema = regionOverlapSchema.shape.patterns.unwrap().element;
|
|
19
|
+
export const regionOverlapResultSchema = regionOverlapSchema
|
|
20
|
+
.extend({
|
|
21
|
+
patterns: z
|
|
22
|
+
.array(regionPatternSchema
|
|
23
|
+
.extend({ relation: regionPatternSchema.shape.relation.unwrap().exactOptional() })
|
|
24
|
+
.readonly())
|
|
25
|
+
.min(1)
|
|
26
|
+
.readonly(),
|
|
27
|
+
})
|
|
28
|
+
.readonly();
|