@astrosheep/keiyaku 4.6.32 → 4.6.33
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 +8 -6
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +13 -9
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +8 -6
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -1
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +13 -9
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +8 -6
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -1
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +13 -9
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +8 -6
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -1
- package/build/plugins/pi/README.md +55 -97
- package/build/plugins/pi/keiyaku.ts +2 -9
- package/build/skills/keiyaku-akuma/SKILL.md +13 -9
- package/build/skills/keiyaku-babysit/SKILL.md +8 -6
- package/build/skills/keiyaku-workflow/SKILL.md +2 -1
- package/build/src/akuma/akuma-instance.d.ts +11 -0
- package/build/src/akuma/akuma-instance.js +1 -2
- package/build/src/akuma/akuma-observe.js +73 -14
- package/build/src/akuma/akuma-selection-execution.d.ts +82 -7
- package/build/src/akuma/akuma-selection-execution.js +26 -27
- package/build/src/akuma/akuma-wait.d.ts +40 -1
- package/build/src/akuma/akuma-wait.js +58 -29
- package/build/src/akuma/akuma.d.ts +11 -0
- package/build/src/akuma/body.js +13 -18
- package/build/src/akuma/call-initial-tell.d.ts +0 -1
- package/build/src/akuma/call-initial-tell.js +0 -1
- package/build/src/akuma/heart/activity-schema.d.ts +16 -0
- package/build/src/akuma/heart/activity-schema.js +7 -0
- package/build/src/akuma/heart/index.d.ts +1 -1
- package/build/src/akuma/heart/index.js +9 -1
- package/build/src/akuma/heart/timeline.js +4 -4
- package/build/src/akuma/projection-read.d.ts +4 -2
- package/build/src/akuma/projection-read.js +21 -14
- package/build/src/akuma/projection.d.ts +94 -2
- package/build/src/akuma/projection.js +47 -47
- package/build/src/akuma/provider.d.ts +2 -2
- package/build/src/akuma/provider.js +27 -20
- package/build/src/akuma/providers/acp/core.js +2 -5
- package/build/src/akuma/providers/opencode-sdk/events.d.ts +2 -1
- package/build/src/akuma/providers/opencode-sdk/events.js +31 -1
- package/build/src/akuma/publication.js +3 -2
- package/build/src/akuma/selection-observation.d.ts +23 -0
- package/build/src/akuma/selection-observation.js +15 -4
- package/build/src/akuma/status-projection.d.ts +14 -1
- package/build/src/akuma/status-projection.js +40 -2
- package/build/src/akuma/turn-drive.js +21 -15
- package/build/src/body/amend.js +5 -17
- package/build/src/body/decode.js +11 -1
- package/build/src/body/envelope.d.ts +5 -1
- package/build/src/body/envelope.js +4 -2
- package/build/src/body/render.js +4 -6
- package/build/src/cli/commands/akuma-grammar.d.ts +3 -5
- package/build/src/cli/commands/akuma-grammar.js +22 -40
- package/build/src/cli/commands/akuma.d.ts +1 -2
- package/build/src/cli/commands/akuma.js +6 -58
- package/build/src/cli/commands/contract-grammar.d.ts +1 -0
- package/build/src/cli/commands/contract-grammar.js +7 -11
- package/build/src/cli/commands/contract-help.d.ts +3 -2
- package/build/src/cli/commands/contract-help.js +11 -5
- package/build/src/cli/commands/contract.js +3 -0
- package/build/src/cli/commands/debt-grammar.js +2 -4
- package/build/src/cli/parse.js +1 -4
- package/build/src/cli/render/akuma-activity.d.ts +3 -15
- package/build/src/cli/render/akuma-activity.js +19 -73
- package/build/src/cli/render/akuma.d.ts +5 -11
- package/build/src/cli/render/akuma.js +22 -30
- package/build/src/cli/render/catalog.js +1 -4
- package/build/src/cli/render/contract-history.js +2 -0
- package/build/src/cli/render/contract-observation.d.ts +2 -1
- package/build/src/cli/render/contract-observation.js +25 -1
- package/build/src/cli/render/contract-wait.d.ts +2 -2
- package/build/src/cli/render/contract-wait.js +13 -17
- package/build/src/cli/render/contract.js +12 -9
- package/build/src/cli/render/debt.js +1 -2
- package/build/src/cli/render/execution-progress.js +1 -3
- package/build/src/cli/render/kanshi-akuma.js +1 -2
- package/build/src/cli/render/kanshi.js +11 -17
- package/build/src/cli/render/receipt.d.ts +1 -1
- package/build/src/cli/render/receipt.js +33 -28
- package/build/src/cli/render/reconcile.js +2 -5
- package/build/src/cli/render/refusal.js +3 -6
- package/build/src/cli/render/terminal.d.ts +2 -4
- package/build/src/cli/render/terminal.js +10 -17
- package/build/src/cli/render/verbs.d.ts +1 -0
- package/build/src/cli/render/verbs.js +19 -17
- package/build/src/cli/runtime.js +3 -9
- package/build/src/core/facts/codec.js +7 -2
- package/build/src/core/facts/eligibility.d.ts +4 -4
- package/build/src/core/facts/eligibility.js +11 -0
- package/build/src/core/facts/fold.js +9 -5
- package/build/src/core/facts/gate.d.ts +5 -1
- package/build/src/core/facts/gate.js +14 -10
- package/build/src/core/facts/types.d.ts +5 -1
- package/build/src/core/facts/types.js +7 -0
- package/build/src/core/subject.d.ts +4 -1
- package/build/src/core/subject.js +10 -2
- package/build/src/core/verbs/amend.d.ts +15 -4
- package/build/src/core/verbs/amend.js +19 -9
- package/build/src/debt/index.d.ts +0 -1
- package/build/src/debt/index.js +6 -11
- package/build/src/debt/input.d.ts +2 -1
- package/build/src/debt/input.js +6 -4
- package/build/src/dispatch/index.d.ts +0 -17
- package/build/src/dispatch/index.js +1 -10
- package/build/src/git/identity.js +16 -45
- package/build/src/git/nuke.js +13 -23
- package/build/src/git/observe.d.ts +3 -0
- package/build/src/git/observe.js +25 -23
- package/build/src/git/process.js +11 -18
- package/build/src/git/read-observation.d.ts +5 -4
- package/build/src/git/repository.d.ts +2 -0
- package/build/src/git/repository.js +13 -1
- package/build/src/git/scratch.js +2 -14
- package/build/src/git/terminal-reconcile.js +1 -13
- package/build/src/index.d.ts +2 -0
- package/build/src/kanshi/index.d.ts +0 -1
- package/build/src/kanshi/index.js +0 -1
- package/build/src/kanshi/read.d.ts +21 -0
- package/build/src/kanshi/read.js +2 -1
- package/build/src/kanshi/report.d.ts +94 -0
- package/build/src/library/address.d.ts +12 -5
- package/build/src/library/address.js +18 -32
- package/build/src/library/akuma-creation.d.ts +39 -0
- package/build/src/library/akuma-creation.js +3 -9
- package/build/src/library/continuation.d.ts +10 -0
- package/build/src/library/contract-creation.js +10 -11
- package/build/src/library/contract-outcomes.d.ts +72 -1
- package/build/src/library/contract-outcomes.js +1 -0
- package/build/src/library/contract-types.d.ts +18 -0
- package/build/src/library/contract-types.js +2 -0
- package/build/src/library/contract-wait.d.ts +7 -0
- package/build/src/library/contract-wait.js +53 -49
- package/build/src/library/delivery.d.ts +25 -0
- package/build/src/library/input.d.ts +5 -23
- package/build/src/library/input.js +12 -7
- package/build/src/library/kei.js +39 -20
- package/build/src/library/keiyaku-classify.js +3 -3
- package/build/src/library/keiyaku-debt.js +1 -2
- package/build/src/library/keiyaku-identity.d.ts +3 -3
- package/build/src/library/keiyaku-identity.js +11 -6
- package/build/src/library/keiyaku-verbs.d.ts +456 -1362
- package/build/src/library/keiyaku-verbs.js +80 -92
- package/build/src/library/keiyaku-wait.d.ts +183 -0
- package/build/src/library/keiyaku-wait.js +213 -0
- package/build/src/library/keiyaku.d.ts +3 -1
- package/build/src/library/keiyaku.js +49 -73
- package/build/src/{mcp/output.d.ts → library/model-tools.d.ts} +227 -56
- package/build/src/library/model-tools.js +347 -0
- package/build/src/library/outcome.js +5 -6
- package/build/src/library/refusal.d.ts +25 -1
- package/build/src/library/refusal.js +4 -5
- package/build/src/library/selection.d.ts +12 -0
- package/build/src/library/selection.js +1 -2
- package/build/src/mcp/adapter.d.ts +0 -6
- package/build/src/mcp/adapter.js +10 -159
- package/build/src/mcp/description.d.ts +2 -0
- package/build/src/mcp/description.js +2 -0
- package/build/src/mcp/help.d.ts +1 -1
- package/build/src/mcp/help.js +6 -4
- package/build/src/pi/index.d.ts +3 -0
- package/build/src/pi/index.js +83 -0
- package/build/src/protocol/amend.d.ts +14 -3
- package/build/src/protocol/amend.js +113 -46
- package/build/src/protocol/bind.d.ts +1 -1
- package/build/src/protocol/bind.js +5 -16
- package/build/src/protocol/completion.d.ts +30 -0
- package/build/src/protocol/completion.js +8 -5
- package/build/src/protocol/deliver.js +7 -20
- package/build/src/protocol/delivery-preview.d.ts +5 -0
- package/build/src/protocol/execution-observation.d.ts +8 -0
- package/build/src/protocol/intent.d.ts +1 -0
- package/build/src/protocol/intent.js +4 -1
- package/build/src/protocol/operations.d.ts +54 -16
- package/build/src/protocol/operations.js +17 -31
- package/build/src/protocol/placement.js +7 -1
- package/build/src/protocol/progress.js +0 -6
- package/build/src/protocol/read/status.d.ts +40 -0
- package/build/src/protocol/read/status.js +7 -10
- package/build/src/protocol/reintegrate.js +2 -2
- package/build/src/protocol/result-leaves.d.ts +56 -8
- package/build/src/protocol/result-leaves.js +11 -2
- package/build/src/protocol/run.js +1 -4
- package/build/src/protocol/verify.d.ts +10 -0
- package/build/src/protocol/verify.js +1 -0
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/settle.js +19 -68
- package/package.json +7 -3
- package/plugins/pi/README.md +55 -97
- package/plugins/pi/keiyaku.ts +2 -9
- package/skills/keiyaku-akuma/SKILL.md +13 -9
- package/skills/keiyaku-babysit/SKILL.md +8 -6
- package/skills/keiyaku-workflow/SKILL.md +2 -1
- package/build/plugins/pi/akuma-tools.ts +0 -283
- package/build/src/body/keys.d.ts +0 -4
- package/build/src/body/keys.js +0 -11
- package/build/src/kanshi/roster.d.ts +0 -2
- package/build/src/kanshi/roster.js +0 -2
- package/build/src/mcp/output.js +0 -193
- package/plugins/pi/akuma-tools.ts +0 -283
|
@@ -87,6 +87,16 @@ declare const contractDetail: z.ZodReadonly<z.ZodObject<{
|
|
|
87
87
|
kind: z.ZodLiteral<"missing">;
|
|
88
88
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
89
89
|
kind: z.ZodLiteral<"stale">;
|
|
90
|
+
reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
91
|
+
kind: z.ZodLiteral<"candidate-content-changed">;
|
|
92
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
93
|
+
previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
94
|
+
currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
95
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
96
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
97
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
98
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
99
|
+
}, z.core.$strict>>]>>;
|
|
90
100
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
91
101
|
kind: z.ZodLiteral<"attested">;
|
|
92
102
|
verdict: z.ZodEnum<{
|
|
@@ -175,6 +185,16 @@ export declare const contractNormalStatusSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
175
185
|
kind: z.ZodLiteral<"missing">;
|
|
176
186
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
177
187
|
kind: z.ZodLiteral<"stale">;
|
|
188
|
+
reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
189
|
+
kind: z.ZodLiteral<"candidate-content-changed">;
|
|
190
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
191
|
+
previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
192
|
+
currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
193
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
194
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
195
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
196
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
197
|
+
}, z.core.$strict>>]>>;
|
|
178
198
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
179
199
|
kind: z.ZodLiteral<"attested">;
|
|
180
200
|
verdict: z.ZodEnum<{
|
|
@@ -263,6 +283,16 @@ export declare const contractStatusSchema: z.ZodUnion<readonly [z.ZodReadonly<z.
|
|
|
263
283
|
kind: z.ZodLiteral<"missing">;
|
|
264
284
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
265
285
|
kind: z.ZodLiteral<"stale">;
|
|
286
|
+
reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
287
|
+
kind: z.ZodLiteral<"candidate-content-changed">;
|
|
288
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
289
|
+
previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
290
|
+
currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
291
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
292
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
293
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
294
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
295
|
+
}, z.core.$strict>>]>>;
|
|
266
296
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
267
297
|
kind: z.ZodLiteral<"attested">;
|
|
268
298
|
verdict: z.ZodEnum<{
|
|
@@ -358,6 +388,16 @@ export declare const kanshiContractReportSchema: z.ZodUnion<readonly [z.ZodReado
|
|
|
358
388
|
kind: z.ZodLiteral<"missing">;
|
|
359
389
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
360
390
|
kind: z.ZodLiteral<"stale">;
|
|
391
|
+
reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
392
|
+
kind: z.ZodLiteral<"candidate-content-changed">;
|
|
393
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
394
|
+
previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
395
|
+
currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
396
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
397
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
398
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
399
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
400
|
+
}, z.core.$strict>>]>>;
|
|
361
401
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
362
402
|
kind: z.ZodLiteral<"attested">;
|
|
363
403
|
verdict: z.ZodEnum<{
|
|
@@ -538,6 +578,17 @@ declare const akumaWorldRow: z.ZodReadonly<z.ZodObject<{
|
|
|
538
578
|
toolId: z.ZodString;
|
|
539
579
|
}, z.core.$strict>>>>>;
|
|
540
580
|
latestActivity: z.ZodExactOptional<z.ZodNumber>;
|
|
581
|
+
awaiting: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
582
|
+
kind: z.ZodLiteral<"permission">;
|
|
583
|
+
id: z.ZodNumber;
|
|
584
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
585
|
+
id: z.ZodString;
|
|
586
|
+
action: z.ZodString;
|
|
587
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
588
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strict>>>>;
|
|
590
|
+
clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
591
|
+
}, z.core.$strict>>>;
|
|
541
592
|
pending: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
542
593
|
id: z.ZodNumber;
|
|
543
594
|
tellId: z.ZodString;
|
|
@@ -603,6 +654,17 @@ declare const akumaWorld: z.ZodReadonly<z.ZodObject<{
|
|
|
603
654
|
toolId: z.ZodString;
|
|
604
655
|
}, z.core.$strict>>>>>;
|
|
605
656
|
latestActivity: z.ZodExactOptional<z.ZodNumber>;
|
|
657
|
+
awaiting: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
658
|
+
kind: z.ZodLiteral<"permission">;
|
|
659
|
+
id: z.ZodNumber;
|
|
660
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
661
|
+
id: z.ZodString;
|
|
662
|
+
action: z.ZodString;
|
|
663
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
664
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
665
|
+
}, z.core.$strict>>>>;
|
|
666
|
+
clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
667
|
+
}, z.core.$strict>>>;
|
|
606
668
|
pending: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
607
669
|
id: z.ZodNumber;
|
|
608
670
|
tellId: z.ZodString;
|
|
@@ -763,6 +825,17 @@ export declare const kanshiReportSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
763
825
|
toolId: z.ZodString;
|
|
764
826
|
}, z.core.$strict>>>>>;
|
|
765
827
|
latestActivity: z.ZodExactOptional<z.ZodNumber>;
|
|
828
|
+
awaiting: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
829
|
+
kind: z.ZodLiteral<"permission">;
|
|
830
|
+
id: z.ZodNumber;
|
|
831
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
832
|
+
id: z.ZodString;
|
|
833
|
+
action: z.ZodString;
|
|
834
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
835
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
836
|
+
}, z.core.$strict>>>>;
|
|
837
|
+
clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
838
|
+
}, z.core.$strict>>>;
|
|
766
839
|
pending: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
767
840
|
id: z.ZodNumber;
|
|
768
841
|
tellId: z.ZodString;
|
|
@@ -1064,6 +1137,17 @@ export declare const kanshiResultSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Zo
|
|
|
1064
1137
|
toolId: z.ZodString;
|
|
1065
1138
|
}, z.core.$strict>>>>>;
|
|
1066
1139
|
latestActivity: z.ZodExactOptional<z.ZodNumber>;
|
|
1140
|
+
awaiting: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1141
|
+
kind: z.ZodLiteral<"permission">;
|
|
1142
|
+
id: z.ZodNumber;
|
|
1143
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1144
|
+
id: z.ZodString;
|
|
1145
|
+
action: z.ZodString;
|
|
1146
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
1147
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
1148
|
+
}, z.core.$strict>>>>;
|
|
1149
|
+
clipped: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
1150
|
+
}, z.core.$strict>>>;
|
|
1067
1151
|
pending: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
1068
1152
|
id: z.ZodNumber;
|
|
1069
1153
|
tellId: z.ZodString;
|
|
@@ -1144,6 +1228,16 @@ export declare const kanshiResultSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Zo
|
|
|
1144
1228
|
kind: z.ZodLiteral<"missing">;
|
|
1145
1229
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1146
1230
|
kind: z.ZodLiteral<"stale">;
|
|
1231
|
+
reason: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
1232
|
+
kind: z.ZodLiteral<"candidate-content-changed">;
|
|
1233
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
1234
|
+
previousChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
1235
|
+
currentChange: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").ChangeId, string>>;
|
|
1236
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1237
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1238
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1239
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1240
|
+
}, z.core.$strict>>]>>;
|
|
1147
1241
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1148
1242
|
kind: z.ZodLiteral<"attested">;
|
|
1149
1243
|
verdict: z.ZodEnum<{
|
|
@@ -69,12 +69,19 @@ type AddressedAkuma = Readonly<{
|
|
|
69
69
|
}>;
|
|
70
70
|
/** Resolve one selector and prove its birth through the native addressability owner. */
|
|
71
71
|
export declare function addressAkuma(input: UncheckedAkumaAddressInput): Promise<AddressedAkuma>;
|
|
72
|
+
type ResolvedAkumaSet = Readonly<{
|
|
73
|
+
path: WorldRoot;
|
|
74
|
+
/** The same set in the caller's selector order, for surfaces that name the selection as chosen. */
|
|
75
|
+
orderedIds: readonly AkumaId[];
|
|
76
|
+
/** Frozen expansion per selector, before cross-selector deduplication. */
|
|
77
|
+
selections: readonly (readonly AkumaId[])[];
|
|
78
|
+
/** The canonical order of the selected set. */
|
|
79
|
+
ids: readonly AkumaId[];
|
|
80
|
+
contractMembers: ReadonlySet<AkumaId>;
|
|
81
|
+
explicit: ReadonlySet<AkumaId>;
|
|
82
|
+
}>;
|
|
72
83
|
type AkumaSetOptions = Readonly<{
|
|
73
84
|
contractSelectors?: boolean;
|
|
74
85
|
}>;
|
|
75
|
-
export declare function addressAkumaSet(input: UncheckedAkumaAddressInput, options?: AkumaSetOptions): Promise<
|
|
76
|
-
path: WorldRoot;
|
|
77
|
-
ids: readonly AkumaId[];
|
|
78
|
-
orderedIds: readonly AkumaId[];
|
|
79
|
-
}>>;
|
|
86
|
+
export declare function addressAkumaSet(input: UncheckedAkumaAddressInput, options?: AkumaSetOptions): Promise<Pick<ResolvedAkumaSet, "path" | "ids" | "orderedIds" | "selections">>;
|
|
80
87
|
export {};
|
|
@@ -9,7 +9,7 @@ import { readDispatches } from "../dispatch/index.js";
|
|
|
9
9
|
import { matchesAkumaGlob, parseReadableAkumaAlias, parseAkumaGlob, } from "../identity/selector.js";
|
|
10
10
|
import { World } from "../world.js";
|
|
11
11
|
import { matchContractCandidates, readContractCandidates } from "./contract-address.js";
|
|
12
|
-
import { requireInput } from "./input.js";
|
|
12
|
+
import { nonblank, requireInput } from "./input.js";
|
|
13
13
|
import { scopeForRepo } from "./repo.js";
|
|
14
14
|
export class AkumaAddressError extends KeiyakuError {
|
|
15
15
|
refusal;
|
|
@@ -27,14 +27,9 @@ export class AkumaWorldScopeError extends KeiyakuError {
|
|
|
27
27
|
this.refusal = refusal;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
if (typeof value !== "string" || value.trim().length === 0)
|
|
32
|
-
throw new KeiyakuError("invalid-input", `${label} must be a nonblank string`);
|
|
33
|
-
return value;
|
|
34
|
-
}
|
|
35
|
-
function parseAddressAlias(selector) {
|
|
30
|
+
function parseAddress(selector, parse) {
|
|
36
31
|
try {
|
|
37
|
-
return
|
|
32
|
+
return parse(selector);
|
|
38
33
|
}
|
|
39
34
|
catch (error) {
|
|
40
35
|
if (errorCategory(error) !== "invalid-input")
|
|
@@ -42,15 +37,11 @@ function parseAddressAlias(selector) {
|
|
|
42
37
|
throw new AkumaAddressError({ kind: "invalid-akuma", selector });
|
|
43
38
|
}
|
|
44
39
|
}
|
|
40
|
+
function parseAddressAlias(selector) {
|
|
41
|
+
return parseAddress(selector, parseReadableAkumaAlias);
|
|
42
|
+
}
|
|
45
43
|
function parseAddressId(selector) {
|
|
46
|
-
|
|
47
|
-
return parseAkumaId(selector);
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
if (errorCategory(error) !== "invalid-input")
|
|
51
|
-
throw error;
|
|
52
|
-
throw new AkumaAddressError({ kind: "invalid-akuma", selector });
|
|
53
|
-
}
|
|
44
|
+
return parseAddress(selector, parseAkumaId);
|
|
54
45
|
}
|
|
55
46
|
async function directId(path, selector) {
|
|
56
47
|
if (selector.startsWith("@")) {
|
|
@@ -120,12 +111,7 @@ export function resolveNamedAddress(input) {
|
|
|
120
111
|
}
|
|
121
112
|
/** Resolve one selector and prove its birth through the native addressability owner. */
|
|
122
113
|
export async function addressAkuma(input) {
|
|
123
|
-
const values = requireInput(input, "Akuma address input");
|
|
124
|
-
for (const key of Object.keys(values)) {
|
|
125
|
-
if (!["path", "akuma", "repo"].includes(key)) {
|
|
126
|
-
throw new KeiyakuError("invalid-input", `Akuma address input has unknown field: ${key}`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
114
|
+
const values = requireInput(input, "Akuma address input", ["path", "akuma", "repo"]);
|
|
129
115
|
if (values.repo !== undefined)
|
|
130
116
|
scopeForRepo(values.repo);
|
|
131
117
|
const path = await World.prove(nonblank(values.path, "path"));
|
|
@@ -194,12 +180,7 @@ function canonicalAkumaOrder(selected) {
|
|
|
194
180
|
return ids;
|
|
195
181
|
}
|
|
196
182
|
async function readAkumaSet(input, options) {
|
|
197
|
-
const values = requireInput(input, "Akuma set address input");
|
|
198
|
-
for (const key of Object.keys(values)) {
|
|
199
|
-
if (!["path", "akuma", "repo"].includes(key)) {
|
|
200
|
-
throw new KeiyakuError("invalid-input", `Akuma set address input has unknown field: ${key}`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
183
|
+
const values = requireInput(input, "Akuma set address input", ["path", "akuma", "repo"]);
|
|
203
184
|
if (!Array.isArray(values.akuma) || values.akuma.length === 0)
|
|
204
185
|
throw new KeiyakuError("invalid-input", "akuma must be a nonempty selector array");
|
|
205
186
|
const path = await World.prove(nonblank(values.path, "path"));
|
|
@@ -222,14 +203,19 @@ async function readAkumaSet(input, options) {
|
|
|
222
203
|
const contractMembers = new Set();
|
|
223
204
|
const explicit = new Set();
|
|
224
205
|
const sources = { rosterIds, aliases, dispatches };
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
206
|
+
const selections = selectors.map((selector) => {
|
|
207
|
+
const members = new Set();
|
|
208
|
+
addSelectorIds(selector, sources, members, contractMembers, explicit);
|
|
209
|
+
for (const id of members)
|
|
210
|
+
selected.add(id);
|
|
211
|
+
return [...members];
|
|
212
|
+
});
|
|
213
|
+
return { path, orderedIds: [...selected], selections, ids: canonicalAkumaOrder(selected), contractMembers, explicit };
|
|
228
214
|
}
|
|
229
215
|
export async function addressAkumaSet(input, options = {}) {
|
|
230
216
|
const resolved = await readAkumaSet(input, options);
|
|
231
217
|
for (const id of resolved.explicit)
|
|
232
218
|
await requireBornAkuma(resolved.path, id);
|
|
233
219
|
await refuseForeignContractMembers(resolved.path, resolved.ids, resolved.contractMembers);
|
|
234
|
-
return { path: resolved.path, ids: resolved.ids, orderedIds: resolved.orderedIds };
|
|
220
|
+
return { path: resolved.path, ids: resolved.ids, orderedIds: resolved.orderedIds, selections: resolved.selections };
|
|
235
221
|
}
|
|
@@ -70,6 +70,7 @@ export declare const spawnNormalResultSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
70
70
|
input: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
71
71
|
kind: z.ZodLiteral<"answered">;
|
|
72
72
|
answer: z.ZodString;
|
|
73
|
+
completedAt: z.ZodExactOptional<z.ZodString>;
|
|
73
74
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
74
75
|
kind: z.ZodLiteral<"unanswered">;
|
|
75
76
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
@@ -91,6 +92,7 @@ export declare const spawnResultSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Zod
|
|
|
91
92
|
input: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
92
93
|
kind: z.ZodLiteral<"answered">;
|
|
93
94
|
answer: z.ZodString;
|
|
95
|
+
completedAt: z.ZodExactOptional<z.ZodString>;
|
|
94
96
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
95
97
|
kind: z.ZodLiteral<"unanswered">;
|
|
96
98
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
@@ -192,6 +194,7 @@ export declare const spawnResultSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Zod
|
|
|
192
194
|
input: z.ZodExactOptional<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
193
195
|
kind: z.ZodLiteral<"answered">;
|
|
194
196
|
answer: z.ZodString;
|
|
197
|
+
completedAt: z.ZodExactOptional<z.ZodString>;
|
|
195
198
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
196
199
|
kind: z.ZodLiteral<"unanswered">;
|
|
197
200
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
@@ -427,6 +430,18 @@ export declare const spawnProgressSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
427
430
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
428
431
|
kind: z.ZodLiteral<"row">;
|
|
429
432
|
row: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
433
|
+
kind: z.ZodLiteral<"permission">;
|
|
434
|
+
sequence: z.ZodNumber;
|
|
435
|
+
turnSequence: z.ZodNumber;
|
|
436
|
+
at: z.ZodString;
|
|
437
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
438
|
+
id: z.ZodString;
|
|
439
|
+
action: z.ZodString;
|
|
440
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
441
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
442
|
+
}, z.core.$strict>>>>;
|
|
443
|
+
truncated: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
444
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
430
445
|
kind: z.ZodLiteral<"report">;
|
|
431
446
|
sequence: z.ZodNumber;
|
|
432
447
|
bodySequence: z.ZodNumber;
|
|
@@ -573,6 +588,18 @@ export declare const spawnProgressSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
573
588
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
574
589
|
kind: z.ZodLiteral<"row">;
|
|
575
590
|
row: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
591
|
+
kind: z.ZodLiteral<"permission">;
|
|
592
|
+
sequence: z.ZodNumber;
|
|
593
|
+
turnSequence: z.ZodNumber;
|
|
594
|
+
at: z.ZodString;
|
|
595
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
596
|
+
id: z.ZodString;
|
|
597
|
+
action: z.ZodString;
|
|
598
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
599
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
600
|
+
}, z.core.$strict>>>>;
|
|
601
|
+
truncated: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
602
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
576
603
|
kind: z.ZodLiteral<"report">;
|
|
577
604
|
sequence: z.ZodNumber;
|
|
578
605
|
bodySequence: z.ZodNumber;
|
|
@@ -689,6 +716,18 @@ export declare const spawnProgressSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
689
716
|
}, z.core.$strict>>;
|
|
690
717
|
ordinarySelected: z.ZodNumber;
|
|
691
718
|
rows: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
719
|
+
kind: z.ZodLiteral<"permission">;
|
|
720
|
+
sequence: z.ZodNumber;
|
|
721
|
+
turnSequence: z.ZodNumber;
|
|
722
|
+
at: z.ZodString;
|
|
723
|
+
requests: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
724
|
+
id: z.ZodString;
|
|
725
|
+
action: z.ZodString;
|
|
726
|
+
resources: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
727
|
+
tool: z.ZodExactOptional<z.ZodString>;
|
|
728
|
+
}, z.core.$strict>>>>;
|
|
729
|
+
truncated: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
730
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
692
731
|
kind: z.ZodLiteral<"turn">;
|
|
693
732
|
sequence: z.ZodNumber;
|
|
694
733
|
bodySequence: z.ZodNumber;
|
|
@@ -11,7 +11,7 @@ import { decodeAkumaCaller } from "../akuma/caller.js";
|
|
|
11
11
|
import { prepareAkumaCall, publishAkumaCall, } from "../akuma/akuma-call.js";
|
|
12
12
|
import { discardPreparedCall } from "../akuma/publication.js";
|
|
13
13
|
import { AkumaOwner } from "../akuma/akuma-owner.js";
|
|
14
|
-
import { liveStatusObservationSchema,
|
|
14
|
+
import { liveStatusObservationSchema, observeAdmittedTellAkuma, } from "../akuma/akuma-selection-execution.js";
|
|
15
15
|
import { bareOption, canonicalBirthCwd, durationSchema, validateAkumaInput } from "../akuma/call-input.js";
|
|
16
16
|
import { pathsForAkumaId } from "../akuma/identity.js";
|
|
17
17
|
import { moveAlias } from "../alias/index.js";
|
|
@@ -21,7 +21,7 @@ import { akumaAliasSchema, parseAkumaAlias } from "../identity/selector.js";
|
|
|
21
21
|
import { outcomePluginObserver, stderrPluginDiagnostic, withAkumaWaitDeferrals } from "../plugin/akuma-signals.js";
|
|
22
22
|
import { World } from "../world.js";
|
|
23
23
|
import { addressAkuma } from "./address.js";
|
|
24
|
-
import { requireInput, requireMarkdown as text, optionalNonblank, optionalSignal } from "./input.js";
|
|
24
|
+
import { requireInput, requireMarkdown as text, nonblank, optionalNonblank, optionalSignal } from "./input.js";
|
|
25
25
|
import { seatForKei } from "./kei.js";
|
|
26
26
|
import { scopeForRepo } from "./repo.js";
|
|
27
27
|
import { withSpawnFailureReceipt } from "./outcome.js";
|
|
@@ -119,12 +119,6 @@ const spawnModeSchema = z.union([
|
|
|
119
119
|
}),
|
|
120
120
|
z.strictObject({ mode: z.literal("detach").exactOptional(), body: z.string().exactOptional() }),
|
|
121
121
|
]);
|
|
122
|
-
function nonblank(value, label) {
|
|
123
|
-
if (typeof value !== "string" || value.trim().length === 0) {
|
|
124
|
-
throw new KeiyakuError("invalid-input", `${label} must be a nonblank string`);
|
|
125
|
-
}
|
|
126
|
-
return value;
|
|
127
|
-
}
|
|
128
122
|
function settingsOption(value) {
|
|
129
123
|
if (value === undefined)
|
|
130
124
|
return undefined;
|
|
@@ -338,7 +332,7 @@ async function settleCall(parsed, admitted, head, reportDiagnostic) {
|
|
|
338
332
|
throw withSpawnFailureReceipt(admitted.failure, result(), parsed.signal);
|
|
339
333
|
if (receipt !== undefined && parsed.mode === "wait") {
|
|
340
334
|
try {
|
|
341
|
-
const { akumaId: _id, tellId: _tell, wake: _wake, interrupt: _interrupt, ...observation } = await
|
|
335
|
+
const { akumaId: _id, tellId: _tell, wake: _wake, interrupt: _interrupt, ...observation } = await observeAdmittedTellAkuma({
|
|
342
336
|
...parsed,
|
|
343
337
|
id: admitted.id,
|
|
344
338
|
tellId: receipt.admission.tellId,
|
|
@@ -34,6 +34,11 @@ export declare const continuationNormalReportSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
34
34
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
35
35
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
36
36
|
state: z.ZodLiteral<"stale">;
|
|
37
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
39
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
40
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
41
|
+
}, z.core.$strict>>>;
|
|
37
42
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
38
43
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
39
44
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -73,6 +78,11 @@ export declare const continuationReportSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
73
78
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
74
79
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
75
80
|
state: z.ZodLiteral<"stale">;
|
|
81
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
83
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
84
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
85
|
+
}, z.core.$strict>>>;
|
|
76
86
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
77
87
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
78
88
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @architectureCompositionRoot */
|
|
2
2
|
import { decodeCanonicalContractDocument } from "../body/render.js";
|
|
3
|
+
import { targetName } from "../core/facts/types.js";
|
|
3
4
|
import { KeiyakuError } from "../errors.js";
|
|
4
5
|
import { withGitDecodeChannel } from "../git/read-observation.js";
|
|
5
6
|
import { executionStop, isOperationalFailure, isOperationalStop } from "../protocol/progress.js";
|
|
@@ -75,10 +76,7 @@ export async function bindKei(scope, input, createHandle, composition = captureL
|
|
|
75
76
|
const id = admission.value.contractId;
|
|
76
77
|
retainBindCoordinates(accumulator, admission);
|
|
77
78
|
const value = await bindComplete(accumulator, id, scope, channel, admission, hooks, () => observeRegion(scope, channel, id, fork.document.region).then((region) => bindValue(handle(id), region)));
|
|
78
|
-
return
|
|
79
|
-
value: value.kei,
|
|
80
|
-
enumerable: false,
|
|
81
|
-
});
|
|
79
|
+
return acceptedBind(id, value);
|
|
82
80
|
}
|
|
83
81
|
if (document === undefined)
|
|
84
82
|
throw new Error("Markdown bind requires its prepared document");
|
|
@@ -109,6 +107,12 @@ export async function bindKei(scope, input, createHandle, composition = captureL
|
|
|
109
107
|
throw projected.error;
|
|
110
108
|
return projected.outcome;
|
|
111
109
|
}
|
|
110
|
+
function acceptedBind(id, value) {
|
|
111
|
+
return Object.defineProperty({ kind: "accepted", contractId: id, ...value }, "kei", {
|
|
112
|
+
value: value.kei,
|
|
113
|
+
enumerable: false,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
112
116
|
function bindValue(kei, region) {
|
|
113
117
|
const value = { ...region, kei };
|
|
114
118
|
Object.defineProperty(value, "kei", { value: kei, enumerable: false });
|
|
@@ -160,10 +164,7 @@ async function markdownBind(prepared, document, hooks, scope, channel, accumulat
|
|
|
160
164
|
const id = leading.value.contractId;
|
|
161
165
|
retainBindCoordinates(accumulator, leading);
|
|
162
166
|
const value = await bindComplete(accumulator, id, scope, channel, leading, hooks, async () => bindValue(handle(id), await observeRegion(scope, channel, id, document.region)));
|
|
163
|
-
return
|
|
164
|
-
value: value.kei,
|
|
165
|
-
enumerable: false,
|
|
166
|
-
});
|
|
167
|
+
return acceptedBind(id, value);
|
|
167
168
|
}
|
|
168
169
|
function retainBindCoordinates(accumulator, leading) {
|
|
169
170
|
const bind = leading.facts.find((fact) => fact.kind === "bind");
|
|
@@ -171,9 +172,7 @@ function retainBindCoordinates(accumulator, leading) {
|
|
|
171
172
|
throw new Error("bind receipt requires its admitted coordinates");
|
|
172
173
|
const target = bind.data.coordinates.target;
|
|
173
174
|
if (target !== undefined)
|
|
174
|
-
accumulator.extendConclusions(bind.contract, {
|
|
175
|
-
target: typeof target === "string" ? target : target.contractId,
|
|
176
|
-
});
|
|
175
|
+
accumulator.extendConclusions(bind.contract, { target: targetName(target) });
|
|
177
176
|
}
|
|
178
177
|
function parseMarkdown(markdown) {
|
|
179
178
|
return decodeCanonicalContractDocument(markdown, { requireTimeout: true });
|
|
@@ -36,6 +36,7 @@ declare const amendValueSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
36
36
|
}, z.core.$strict>>>>;
|
|
37
37
|
}, z.core.$strict>>>>>;
|
|
38
38
|
overlapError: z.ZodExactOptional<z.ZodString>;
|
|
39
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
39
40
|
changedSections: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
40
41
|
gatesChanged: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
41
42
|
afterChanged: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
@@ -426,22 +427,47 @@ export declare const amendOutcomeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Zo
|
|
|
426
427
|
}, z.core.$strict>>>>;
|
|
427
428
|
}, z.core.$strict>>>>>;
|
|
428
429
|
overlapError: z.ZodExactOptional<z.ZodString>;
|
|
430
|
+
target: z.ZodExactOptional<z.ZodString>;
|
|
429
431
|
changedSections: z.ZodExactOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
430
432
|
gatesChanged: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
431
433
|
afterChanged: z.ZodExactOptional<z.ZodLiteral<true>>;
|
|
432
434
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
433
435
|
kind: z.ZodLiteral<"refused">;
|
|
434
436
|
contractId: z.ZodPipe<z.ZodString, z.ZodTransform<ContractId, string>>;
|
|
435
|
-
reason: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
437
|
+
reason: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
436
438
|
kind: z.ZodEnum<{
|
|
437
439
|
"contract-missing": "contract-missing";
|
|
438
440
|
terminal: "terminal";
|
|
439
441
|
"unknown-prerequisite": "unknown-prerequisite";
|
|
440
442
|
"terms-moved": "terms-moved";
|
|
441
443
|
"cyclic-prerequisite": "cyclic-prerequisite";
|
|
444
|
+
"cyclic-target": "cyclic-target";
|
|
445
|
+
}>;
|
|
446
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
447
|
+
kind: z.ZodEnum<{
|
|
448
|
+
"target-contract-missing": "target-contract-missing";
|
|
449
|
+
"target-contract-terminal": "target-contract-terminal";
|
|
450
|
+
}>;
|
|
451
|
+
targetContractId: z.ZodPipe<z.ZodString, z.ZodTransform<ContractId, string>>;
|
|
452
|
+
}, z.core.$strict>>]>, z.ZodReadonly<z.ZodObject<{
|
|
453
|
+
kind: z.ZodEnum<{
|
|
454
|
+
"target-missing": "target-missing";
|
|
455
|
+
"invalid-target": "invalid-target";
|
|
442
456
|
}>;
|
|
443
457
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
444
458
|
kind: z.ZodLiteral<"verification-declaration-invalid">;
|
|
459
|
+
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
460
|
+
kind: z.ZodLiteral<"target-workspace-unavailable">;
|
|
461
|
+
targetContractId: z.ZodPipe<z.ZodString, z.ZodTransform<ContractId, string>>;
|
|
462
|
+
reason: z.ZodEnum<{
|
|
463
|
+
unappointed: "unappointed";
|
|
464
|
+
missing: "missing";
|
|
465
|
+
association: "association";
|
|
466
|
+
replaced: "replaced";
|
|
467
|
+
attached: "attached";
|
|
468
|
+
uncommitted: "uncommitted";
|
|
469
|
+
operation: "operation";
|
|
470
|
+
}>;
|
|
445
471
|
}, z.core.$strict>>]>;
|
|
446
472
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
447
473
|
kind: z.ZodLiteral<"retry">;
|
|
@@ -614,6 +640,11 @@ export declare const deliverOutcomeSchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
614
640
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
615
641
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
616
642
|
state: z.ZodLiteral<"stale">;
|
|
643
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
644
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
645
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
646
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
647
|
+
}, z.core.$strict>>>;
|
|
617
648
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
618
649
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
619
650
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -723,6 +754,11 @@ export declare const deliverOutcomeSchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
723
754
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
724
755
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
725
756
|
state: z.ZodLiteral<"stale">;
|
|
757
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
758
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
759
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
760
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
761
|
+
}, z.core.$strict>>>;
|
|
726
762
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
727
763
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
728
764
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -989,6 +1025,11 @@ export declare const verifyNormalOutcomeSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
989
1025
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
990
1026
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
991
1027
|
state: z.ZodLiteral<"stale">;
|
|
1028
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1029
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1030
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1031
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1032
|
+
}, z.core.$strict>>>;
|
|
992
1033
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
993
1034
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
994
1035
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1054,6 +1095,11 @@ export declare const verifyNormalOutcomeSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
1054
1095
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
1055
1096
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1056
1097
|
state: z.ZodLiteral<"stale">;
|
|
1098
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1099
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1100
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1101
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1102
|
+
}, z.core.$strict>>>;
|
|
1057
1103
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
1058
1104
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
1059
1105
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1214,6 +1260,11 @@ export declare const verifyOutcomeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
1214
1260
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
1215
1261
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1216
1262
|
state: z.ZodLiteral<"stale">;
|
|
1263
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1264
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1265
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1266
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1267
|
+
}, z.core.$strict>>>;
|
|
1217
1268
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
1218
1269
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
1219
1270
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1414,6 +1465,11 @@ export declare const verifyOutcomeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
1414
1465
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
1415
1466
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1416
1467
|
state: z.ZodLiteral<"stale">;
|
|
1468
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1469
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1470
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1471
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1472
|
+
}, z.core.$strict>>>;
|
|
1417
1473
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
1418
1474
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
1419
1475
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1702,6 +1758,11 @@ export declare const reviewOutcomeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
1702
1758
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
1703
1759
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1704
1760
|
state: z.ZodLiteral<"stale">;
|
|
1761
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1762
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1763
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1764
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1765
|
+
}, z.core.$strict>>>;
|
|
1705
1766
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
1706
1767
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
1707
1768
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -1817,6 +1878,11 @@ export declare const reviewOutcomeSchema: z.ZodUnion<readonly [z.ZodReadonly<z.Z
|
|
|
1817
1878
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
1818
1879
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
1819
1880
|
state: z.ZodLiteral<"stale">;
|
|
1881
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
1882
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
1883
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1884
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
1885
|
+
}, z.core.$strict>>>;
|
|
1820
1886
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
1821
1887
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
1822
1888
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
@@ -2222,6 +2288,11 @@ export declare const deliveryPreviewOutcomeSchema: z.ZodUnion<readonly [z.ZodRea
|
|
|
2222
2288
|
requirement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").RequirementId, string>>;
|
|
2223
2289
|
}, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
|
|
2224
2290
|
state: z.ZodLiteral<"stale">;
|
|
2291
|
+
reason: z.ZodExactOptional<z.ZodReadonly<z.ZodObject<{
|
|
2292
|
+
kind: z.ZodLiteral<"snapshot-changed">;
|
|
2293
|
+
previousSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
2294
|
+
currentSnapshot: z.ZodPipe<z.ZodString, z.ZodTransform<import("../core/facts/types.js").SnapshotId, string>>;
|
|
2295
|
+
}, z.core.$strict>>>;
|
|
2225
2296
|
previousContentId: z.ZodExactOptional<z.ZodString>;
|
|
2226
2297
|
currentContentId: z.ZodExactOptional<z.ZodString>;
|
|
2227
2298
|
gate: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|