@astrosheep/keiyaku 4.6.7 → 4.6.9
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 +46 -16
- package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/opencode/index.js +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/pi/keiyaku.ts +0 -5
- package/build/skills/keiyaku/SKILL.md +5 -6
- package/build/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/src/akuma/akuma-call.d.ts +2 -0
- package/build/src/akuma/akuma-call.js +8 -2
- package/build/src/akuma/akuma-instance.d.ts +14 -1
- package/build/src/akuma/akuma-instance.js +37 -7
- package/build/src/akuma/akuma-observe.d.ts +33 -8
- package/build/src/akuma/akuma-observe.js +89 -63
- package/build/src/akuma/akuma-owner.d.ts +14 -2
- package/build/src/akuma/akuma-owner.js +49 -35
- package/build/src/akuma/akuma-selection-execution.js +9 -1
- package/build/src/akuma/akuma-stream.d.ts +22 -0
- package/build/src/akuma/akuma-stream.js +116 -0
- package/build/src/akuma/akuma-wait.d.ts +1 -40
- package/build/src/akuma/akuma-wait.js +23 -84
- package/build/src/akuma/akuma.d.ts +52 -16
- package/build/src/akuma/akuma.js +10 -10
- package/build/src/akuma/allowed.d.ts +7 -12
- package/build/src/akuma/allowed.js +13 -4
- package/build/src/akuma/archetype.d.ts +7 -15
- package/build/src/akuma/archetype.js +36 -35
- package/build/src/akuma/body-supervisor.d.ts +5 -5
- package/build/src/akuma/body-supervisor.js +22 -20
- package/build/src/akuma/body.d.ts +5 -3
- package/build/src/akuma/body.js +57 -8
- package/build/src/akuma/call-request.d.ts +30 -32
- package/build/src/akuma/call-request.js +10 -3
- package/build/src/akuma/caller.d.ts +39 -0
- package/build/src/akuma/caller.js +36 -0
- package/build/src/akuma/dispatch-association.d.ts +0 -1
- package/build/src/akuma/dispatch-association.js +0 -3
- package/build/src/akuma/heart/activity-schema.d.ts +12 -0
- package/build/src/akuma/heart/activity-schema.js +6 -0
- package/build/src/akuma/heart/facts.d.ts +16 -12
- package/build/src/akuma/heart/facts.js +8 -0
- package/build/src/akuma/heart/index.d.ts +61 -9
- package/build/src/akuma/heart/index.js +89 -24
- package/build/src/akuma/heart/rows.d.ts +3 -3
- package/build/src/akuma/heart/rows.js +5 -3
- package/build/src/akuma/heart/soul.d.ts +10 -1
- package/build/src/akuma/heart/soul.js +34 -24
- package/build/src/akuma/heart/storage.d.ts +20 -0
- package/build/src/akuma/heart/storage.js +62 -3
- package/build/src/akuma/heart/timeline.d.ts +7 -0
- package/build/src/akuma/heart/timeline.js +10 -0
- package/build/src/akuma/identity.d.ts +0 -1
- package/build/src/akuma/identity.js +2 -5
- package/build/src/akuma/index.d.ts +6 -2
- package/build/src/akuma/index.js +1 -0
- package/build/src/akuma/nuke.js +6 -28
- package/build/src/akuma/projection.d.ts +25 -11
- package/build/src/akuma/projection.js +24 -7
- package/build/src/akuma/provider-recipe.d.ts +18 -6
- package/build/src/akuma/provider-recipe.js +24 -1
- package/build/src/akuma/provider.d.ts +31 -10
- package/build/src/akuma/provider.js +105 -14
- package/build/src/akuma/providers/acp/events.js +29 -19
- package/build/src/akuma/providers/acp/index.js +2 -3
- package/build/src/akuma/providers/claude/events.js +110 -69
- package/build/src/akuma/providers/claude/index.d.ts +2 -2
- package/build/src/akuma/providers/claude/index.js +4 -8
- package/build/src/akuma/providers/codex-app-server/events.js +17 -2
- package/build/src/akuma/providers/codex-app-server/index.js +17 -11
- package/build/src/akuma/providers/decode.d.ts +33 -0
- package/build/src/akuma/providers/decode.js +65 -0
- package/build/src/akuma/providers/execution-environment.d.ts +2 -1
- package/build/src/akuma/providers/execution-environment.js +3 -0
- package/build/src/akuma/providers/grok-build/index.js +16 -48
- package/build/src/akuma/providers/index.js +2 -0
- package/build/src/akuma/providers/lifecycle.d.ts +9 -0
- package/build/src/akuma/providers/lifecycle.js +10 -0
- package/build/src/akuma/providers/opencode-sdk/event-stream.d.ts +3 -3
- package/build/src/akuma/providers/opencode-sdk/event-stream.js +2 -25
- package/build/src/akuma/providers/opencode-sdk/events.d.ts +7 -43
- package/build/src/akuma/providers/opencode-sdk/events.js +146 -296
- package/build/src/akuma/providers/opencode-sdk/index.js +270 -431
- package/build/src/akuma/providers/opencode-sdk/native-http.d.ts +9 -0
- package/build/src/akuma/providers/opencode-sdk/native-http.js +69 -0
- package/build/src/akuma/providers/opencode-sdk/session.d.ts +42 -36
- package/build/src/akuma/providers/opencode-sdk/session.js +75 -84
- package/build/src/akuma/providers/paseo/events.d.ts +33 -0
- package/build/src/akuma/providers/paseo/events.js +204 -0
- package/build/src/akuma/providers/paseo/index.d.ts +9 -0
- package/build/src/akuma/providers/paseo/index.js +357 -0
- package/build/src/akuma/providers/pi/events.d.ts +2 -0
- package/build/src/akuma/providers/pi/events.js +36 -38
- package/build/src/akuma/providers/pi/index.js +21 -35
- package/build/src/akuma/publication.d.ts +2 -0
- package/build/src/akuma/publication.js +5 -0
- package/build/src/akuma/request-lifecycle.d.ts +4 -2
- package/build/src/akuma/request-lifecycle.js +27 -12
- package/build/src/akuma/request-rendezvous.js +38 -55
- package/build/src/akuma/request-serve.d.ts +1 -1
- package/build/src/akuma/request-serve.js +77 -113
- package/build/src/akuma/requests.d.ts +3 -1
- package/build/src/akuma/requests.js +32 -0
- package/build/src/akuma/selection-observation.d.ts +129 -53
- package/build/src/akuma/selection-observation.js +3 -9
- package/build/src/akuma/turn-drive.d.ts +3 -0
- package/build/src/akuma/turn-drive.js +28 -10
- package/build/src/akuma-body.js +12 -22
- package/build/src/cli/akuma-caller.d.ts +3 -0
- package/build/src/cli/akuma-caller.js +31 -0
- package/build/src/cli/commands/akuma-grammar.js +10 -16
- package/build/src/cli/commands/akuma.js +25 -55
- package/build/src/cli/commands/contract-grammar.d.ts +9 -7
- package/build/src/cli/commands/contract-grammar.js +40 -47
- package/build/src/cli/commands/contract-help.d.ts +17 -7
- package/build/src/cli/commands/contract-help.js +50 -11
- package/build/src/cli/commands/contract.js +34 -63
- package/build/src/cli/commands/debt-grammar.d.ts +19 -0
- package/build/src/cli/commands/debt-grammar.js +323 -0
- package/build/src/cli/commands/debt-query.d.ts +5 -0
- package/build/src/cli/commands/{task-query.js → debt-query.js} +9 -9
- package/build/src/cli/commands/{task.d.ts → debt.d.ts} +2 -2
- package/build/src/cli/commands/{task.js → debt.js} +87 -164
- package/build/src/cli/coordinates.d.ts +1 -1
- package/build/src/cli/coordinates.js +1 -1
- package/build/src/cli/parse.d.ts +5 -5
- package/build/src/cli/parse.js +17 -16
- package/build/src/cli/render/akuma-activity.d.ts +11 -83
- package/build/src/cli/render/akuma-activity.js +20 -382
- package/build/src/cli/render/catalog.d.ts +4 -7
- package/build/src/cli/render/catalog.js +5 -5
- package/build/src/cli/render/contract-history.js +3 -6
- package/build/src/cli/render/contract.js +17 -52
- package/build/src/cli/render/debt.d.ts +28 -0
- package/build/src/cli/render/{task.js → debt.js} +55 -133
- package/build/src/cli/render/kanshi.js +28 -28
- package/build/src/cli/render/marks.d.ts +5 -5
- package/build/src/cli/render/marks.js +4 -10
- package/build/src/cli/render/nuke.js +1 -1
- package/build/src/cli/render/receipt.js +3 -10
- package/build/src/cli/runtime.d.ts +1 -1
- package/build/src/cli/runtime.js +14 -20
- package/build/src/cli/scan.d.ts +1 -1
- package/build/src/cli/selectors.d.ts +3 -6
- package/build/src/cli/selectors.js +22 -53
- package/build/src/cli/usage.d.ts +1 -1
- package/build/src/cli/usage.js +4 -4
- package/build/src/contract-worktree.js +3 -3
- package/build/src/debt/board.d.ts +160 -0
- package/build/src/{task → debt}/board.js +89 -89
- package/build/src/debt/catalog.d.ts +11 -0
- package/build/src/debt/catalog.js +59 -0
- package/build/src/{task → debt}/context.d.ts +1 -1
- package/build/src/{task → debt}/context.js +1 -1
- package/build/src/{task → debt}/created-observation.d.ts +6 -10
- package/build/src/{task → debt}/created-observation.js +7 -7
- package/build/src/debt/document.d.ts +37 -0
- package/build/src/{task → debt}/document.js +37 -37
- package/build/src/debt/identity.d.ts +21 -0
- package/build/src/{task → debt}/identity.js +35 -35
- package/build/src/debt/index.d.ts +111 -0
- package/build/src/debt/index.js +203 -0
- package/build/src/{task → debt}/input.d.ts +8 -8
- package/build/src/{task → debt}/input.js +21 -21
- package/build/src/debt/lifecycle-operations.d.ts +6 -0
- package/build/src/{task → debt}/lifecycle-operations.js +27 -31
- package/build/src/debt/mutation-result.d.ts +981 -0
- package/build/src/debt/mutation-result.js +109 -0
- package/build/src/debt/mutation.d.ts +424 -0
- package/build/src/debt/mutation.js +223 -0
- package/build/src/debt/operation-types.d.ts +71 -0
- package/build/src/debt/operations.d.ts +28 -0
- package/build/src/{task → debt}/operations.js +59 -60
- package/build/src/debt/query.d.ts +76 -0
- package/build/src/{task → debt}/query.js +55 -55
- package/build/src/{task → debt}/store.d.ts +13 -13
- package/build/src/{task → debt}/store.js +58 -49
- package/build/src/debt/view.d.ts +4 -0
- package/build/src/debt/view.js +7 -0
- package/build/src/dispatch/index.d.ts +3 -3
- package/build/src/dispatch/index.js +1 -2
- package/build/src/git/observe.d.ts +6 -2
- package/build/src/git/observe.js +6 -2
- package/build/src/identity/coordinates.d.ts +1 -1
- package/build/src/index.d.ts +17 -17
- package/build/src/index.js +11 -11
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/read.js +54 -39
- package/build/src/kanshi/report.d.ts +7 -7
- package/build/src/kanshi/select.js +4 -4
- package/build/src/library/address.js +2 -4
- package/build/src/library/akuma-creation.d.ts +5 -1
- package/build/src/library/akuma-creation.js +27 -47
- package/build/src/library/akumas.d.ts +7 -7
- package/build/src/library/akumas.js +13 -9
- package/build/src/library/bind.d.ts +17 -17
- package/build/src/library/bind.js +16 -12
- package/build/src/library/contract-address.d.ts +9 -0
- package/build/src/library/contract-address.js +71 -0
- package/build/src/library/contract-composition.d.ts +4 -7
- package/build/src/library/contract-composition.js +6 -18
- package/build/src/library/contract-creation.d.ts +3 -5
- package/build/src/library/contract-creation.js +24 -22
- package/build/src/library/contract-execution.js +21 -26
- package/build/src/library/contract-outcomes.d.ts +2 -14
- package/build/src/library/contract-outcomes.js +2 -13
- package/build/src/library/contract-types.d.ts +38 -4
- package/build/src/library/delivery.d.ts +0 -2
- package/build/src/library/delivery.js +2 -5
- package/build/src/library/input.d.ts +2 -2
- package/build/src/library/input.js +5 -5
- package/build/src/library/invocation.js +2 -2
- package/build/src/library/keiyaku.d.ts +0 -5
- package/build/src/library/keiyaku.js +6 -12
- package/build/src/library/nuke.js +3 -3
- package/build/src/library/outcome.d.ts +626 -625
- package/build/src/library/outcome.js +13 -3
- package/build/src/library/reconcile.js +8 -16
- package/build/src/library/refusal.d.ts +2 -2
- package/build/src/library/repo.d.ts +3 -2
- package/build/src/library/repo.js +10 -5
- package/build/src/library/selection.d.ts +5 -8
- package/build/src/library/selection.js +22 -73
- package/build/src/plugin/akuma-signals.d.ts +2 -0
- package/build/src/plugin/akuma-signals.js +4 -0
- package/build/src/plugin/public.d.ts +32 -2
- package/build/src/plugin/runtime.js +5 -3
- package/build/src/protocol/amend.js +3 -2
- package/build/src/protocol/attempt.js +3 -8
- package/build/src/protocol/bind.d.ts +2 -2
- package/build/src/protocol/bind.js +1 -1
- package/build/src/protocol/deliver.js +3 -3
- package/build/src/protocol/operations.d.ts +1 -3
- package/build/src/protocol/operations.js +0 -8
- package/build/src/protocol/outcome.d.ts +1 -2
- package/build/src/protocol/outcome.js +1 -13
- package/build/src/protocol/placement.js +3 -10
- package/build/src/protocol/read/status.js +31 -70
- package/build/src/protocol/reintegrate.js +3 -10
- package/build/src/protocol/review.js +3 -3
- package/build/src/protocol/run.d.ts +5 -1
- package/build/src/protocol/run.js +3 -3
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/fence.d.ts +3 -3
- package/build/src/settlement/fence.js +4 -4
- package/build/src/settlement/holder.d.ts +16 -16
- package/build/src/settlement/holder.js +69 -63
- package/build/src/settlement/settle.d.ts +5 -5
- package/build/src/settlement/settle.js +53 -53
- package/package.json +19 -9
- package/plugins/paseo/plugin/index.server.ts +17 -0
- package/plugins/paseo/plugin/paseo-plugin.json +4 -0
- package/plugins/paseo/plugin/server/attach.ts +52 -0
- package/plugins/paseo/plugin/server/keiyaku.ts +44 -0
- package/plugins/paseo/plugin/server/message.ts +60 -0
- package/plugins/paseo/plugin/server/mirror.ts +193 -0
- package/plugins/paseo/plugin/server/model.ts +14 -0
- package/plugins/paseo/plugin/server/provider.ts +276 -0
- package/plugins/paseo/plugin/server/sdk-worker.ts +237 -0
- package/plugins/paseo/plugin/server/sdk.ts +289 -0
- package/plugins/paseo/plugin/server/stop.ts +26 -0
- package/plugins/paseo/plugin/server/transport.ts +35 -0
- package/plugins/paseo/plugin/shared/attach-rpc.ts +10 -0
- package/plugins/paseo/plugin/shared/refresh-rpc.ts +6 -0
- package/plugins/paseo/plugin/tsconfig.json +6 -0
- package/plugins/pi/keiyaku.ts +57 -0
- package/skills/keiyaku/SKILL.md +43 -0
- package/skills/keiyaku-akuma/SKILL.md +130 -0
- package/skills/keiyaku-akuma/references/automation.md +269 -0
- package/skills/keiyaku-babysit/SKILL.md +65 -0
- package/skills/keiyaku-bind/SKILL.md +216 -0
- package/skills/keiyaku-bind/agents/openai.yaml +4 -0
- package/skills/keiyaku-debt/SKILL.md +91 -0
- package/skills/keiyaku-workflow/SKILL.md +129 -0
- package/build/plugins/claude/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/codex/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/opencode/skills/keiyaku-task/SKILL.md +0 -104
- package/build/skills/keiyaku-task/SKILL.md +0 -104
- package/build/src/cli/commands/amend.d.ts +0 -12
- package/build/src/cli/commands/amend.js +0 -10
- package/build/src/cli/commands/bind.d.ts +0 -11
- package/build/src/cli/commands/bind.js +0 -23
- package/build/src/cli/commands/task-grammar.d.ts +0 -19
- package/build/src/cli/commands/task-grammar.js +0 -384
- package/build/src/cli/commands/task-query.d.ts +0 -5
- package/build/src/cli/render/task.d.ts +0 -41
- package/build/src/dispatch/association.d.ts +0 -1
- package/build/src/dispatch/association.js +0 -1
- package/build/src/task/board.d.ts +0 -168
- package/build/src/task/catalog.d.ts +0 -11
- package/build/src/task/catalog.js +0 -59
- package/build/src/task/compose-language.d.ts +0 -57
- package/build/src/task/compose-language.js +0 -364
- package/build/src/task/compose-parser.d.ts +0 -32
- package/build/src/task/compose-parser.js +0 -180
- package/build/src/task/compose.d.ts +0 -16
- package/build/src/task/compose.js +0 -189
- package/build/src/task/document.d.ts +0 -39
- package/build/src/task/identity.d.ts +0 -21
- package/build/src/task/index.d.ts +0 -138
- package/build/src/task/index.js +0 -269
- package/build/src/task/lifecycle-operations.d.ts +0 -6
- package/build/src/task/mutation-result.d.ts +0 -1726
- package/build/src/task/mutation-result.js +0 -198
- package/build/src/task/mutation.d.ts +0 -590
- package/build/src/task/mutation.js +0 -262
- package/build/src/task/operation-types.d.ts +0 -71
- package/build/src/task/operations.d.ts +0 -28
- package/build/src/task/query.d.ts +0 -76
- package/build/src/task/view.d.ts +0 -4
- package/build/src/task/view.js +0 -7
- /package/build/src/{task → debt}/operation-types.js +0 -0
|
@@ -3,6 +3,30 @@ import { type AkumaStatus } from "./akuma.js";
|
|
|
3
3
|
declare const akumaObservationSchema: z.ZodObject<{
|
|
4
4
|
status: z.ZodObject<{
|
|
5
5
|
id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
6
|
+
birth: z.ZodObject<{
|
|
7
|
+
origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
+
kind: z.ZodLiteral<"direct">;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
kind: z.ZodLiteral<"request">;
|
|
11
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
12
|
+
requestId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"fork">;
|
|
15
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
16
|
+
at: z.ZodString;
|
|
17
|
+
}, z.core.$strip>], "kind">;
|
|
18
|
+
caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
+
kind: z.ZodLiteral<"akuma">;
|
|
20
|
+
world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
|
|
21
|
+
akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
kind: z.ZodLiteral<"external">;
|
|
24
|
+
integration: z.ZodString;
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"unknown">;
|
|
28
|
+
}, z.core.$strict>]>;
|
|
29
|
+
}, z.core.$strict>;
|
|
6
30
|
life: z.ZodEnum<{
|
|
7
31
|
killed: "killed";
|
|
8
32
|
hung: "hung";
|
|
@@ -12,24 +36,21 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
12
36
|
stranded: "stranded";
|
|
13
37
|
}>;
|
|
14
38
|
cwd: z.ZodOptional<z.ZodString>;
|
|
39
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
40
|
+
model: z.ZodOptional<z.ZodString>;
|
|
15
41
|
allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"task.hold": "task.hold";
|
|
22
|
-
"task.resume": "task.resume";
|
|
23
|
-
"task.start": "task.start";
|
|
24
|
-
"task.stop": "task.stop";
|
|
25
|
-
"task.update": "task.update";
|
|
42
|
+
"debt.add": "debt.add";
|
|
43
|
+
"debt.addDocument": "debt.addDocument";
|
|
44
|
+
"debt.done": "debt.done";
|
|
45
|
+
"debt.drop": "debt.drop";
|
|
46
|
+
"debt.update": "debt.update";
|
|
26
47
|
"akuma.call": "akuma.call";
|
|
27
48
|
"akuma.kill": "akuma.kill";
|
|
28
49
|
"akuma.tell": "akuma.tell";
|
|
29
50
|
"contract.audit": "contract.audit";
|
|
30
51
|
"contract.deliver": "contract.deliver";
|
|
31
52
|
"contract.review": "contract.review";
|
|
32
|
-
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("
|
|
53
|
+
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
|
|
33
54
|
timeline: z.ZodUnion<readonly [z.ZodObject<{
|
|
34
55
|
reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
35
56
|
sequence: z.ZodNumber;
|
|
@@ -173,6 +194,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
173
194
|
unspecified: "unspecified";
|
|
174
195
|
}>;
|
|
175
196
|
path: z.ZodString;
|
|
197
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
176
198
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
177
199
|
added: z.ZodNumber;
|
|
178
200
|
removed: z.ZodNumber;
|
|
@@ -187,6 +209,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
187
209
|
}, z.core.$strict>>;
|
|
188
210
|
}, z.core.$strict>]>;
|
|
189
211
|
state: z.ZodLiteral<"active">;
|
|
212
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
190
213
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
191
214
|
}, z.core.$strict>, z.ZodObject<{
|
|
192
215
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -223,6 +246,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
223
246
|
unspecified: "unspecified";
|
|
224
247
|
}>;
|
|
225
248
|
path: z.ZodString;
|
|
249
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
226
250
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
227
251
|
added: z.ZodNumber;
|
|
228
252
|
removed: z.ZodNumber;
|
|
@@ -242,8 +266,10 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
242
266
|
ok: "ok";
|
|
243
267
|
}>;
|
|
244
268
|
message: z.ZodOptional<z.ZodString>;
|
|
269
|
+
output: z.ZodOptional<z.ZodString>;
|
|
245
270
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
246
271
|
}, z.core.$strict>;
|
|
272
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
247
273
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
248
274
|
}, z.core.$strict>]>;
|
|
249
275
|
}, z.core.$strict>]>>>;
|
|
@@ -276,6 +302,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
276
302
|
kind: z.ZodLiteral<"answered">;
|
|
277
303
|
historyId: z.ZodString;
|
|
278
304
|
answer: z.ZodString;
|
|
305
|
+
foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
|
|
279
306
|
}, z.core.$strict>, z.ZodObject<{
|
|
280
307
|
kind: z.ZodLiteral<"failed">;
|
|
281
308
|
historyId: z.ZodString;
|
|
@@ -381,6 +408,7 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
381
408
|
unspecified: "unspecified";
|
|
382
409
|
}>;
|
|
383
410
|
path: z.ZodString;
|
|
411
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
384
412
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
385
413
|
added: z.ZodNumber;
|
|
386
414
|
removed: z.ZodNumber;
|
|
@@ -400,8 +428,10 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
400
428
|
ok: "ok";
|
|
401
429
|
}>;
|
|
402
430
|
message: z.ZodOptional<z.ZodString>;
|
|
431
|
+
output: z.ZodOptional<z.ZodString>;
|
|
403
432
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
404
433
|
}, z.core.$strict>;
|
|
434
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
405
435
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
406
436
|
}, z.core.$strict>]>;
|
|
407
437
|
}, z.core.$strict>]>>>;
|
|
@@ -418,22 +448,18 @@ declare const akumaObservationSchema: z.ZodObject<{
|
|
|
418
448
|
kind: z.ZodLiteral<"failed">;
|
|
419
449
|
diagnostic: z.ZodString;
|
|
420
450
|
}, z.core.$strict>]>;
|
|
421
|
-
|
|
451
|
+
createdDebts: z.ZodUnion<readonly [z.ZodObject<{
|
|
422
452
|
kind: z.ZodLiteral<"present">;
|
|
423
453
|
rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
424
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<`
|
|
454
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
|
|
425
455
|
title: z.ZodString;
|
|
426
456
|
state: z.ZodEnum<{
|
|
427
457
|
open: "open";
|
|
428
|
-
in_progress: "in_progress";
|
|
429
|
-
on_hold: "on_hold";
|
|
430
458
|
done: "done";
|
|
431
459
|
drop: "drop";
|
|
432
460
|
}>;
|
|
433
461
|
priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
434
462
|
disposition: z.ZodEnum<{
|
|
435
|
-
in_progress: "in_progress";
|
|
436
|
-
on_hold: "on_hold";
|
|
437
463
|
done: "done";
|
|
438
464
|
drop: "drop";
|
|
439
465
|
ready: "ready";
|
|
@@ -467,6 +493,30 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
467
493
|
observations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
468
494
|
status: z.ZodObject<{
|
|
469
495
|
id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
496
|
+
birth: z.ZodObject<{
|
|
497
|
+
origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
498
|
+
kind: z.ZodLiteral<"direct">;
|
|
499
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
500
|
+
kind: z.ZodLiteral<"request">;
|
|
501
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
502
|
+
requestId: z.ZodString;
|
|
503
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
504
|
+
kind: z.ZodLiteral<"fork">;
|
|
505
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
506
|
+
at: z.ZodString;
|
|
507
|
+
}, z.core.$strip>], "kind">;
|
|
508
|
+
caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
509
|
+
kind: z.ZodLiteral<"akuma">;
|
|
510
|
+
world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
|
|
511
|
+
akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
512
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
513
|
+
kind: z.ZodLiteral<"external">;
|
|
514
|
+
integration: z.ZodString;
|
|
515
|
+
id: z.ZodString;
|
|
516
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
517
|
+
kind: z.ZodLiteral<"unknown">;
|
|
518
|
+
}, z.core.$strict>]>;
|
|
519
|
+
}, z.core.$strict>;
|
|
470
520
|
life: z.ZodEnum<{
|
|
471
521
|
killed: "killed";
|
|
472
522
|
hung: "hung";
|
|
@@ -476,24 +526,21 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
476
526
|
stranded: "stranded";
|
|
477
527
|
}>;
|
|
478
528
|
cwd: z.ZodOptional<z.ZodString>;
|
|
529
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
530
|
+
model: z.ZodOptional<z.ZodString>;
|
|
479
531
|
allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
480
|
-
"
|
|
481
|
-
"
|
|
482
|
-
"
|
|
483
|
-
"
|
|
484
|
-
"
|
|
485
|
-
"task.hold": "task.hold";
|
|
486
|
-
"task.resume": "task.resume";
|
|
487
|
-
"task.start": "task.start";
|
|
488
|
-
"task.stop": "task.stop";
|
|
489
|
-
"task.update": "task.update";
|
|
532
|
+
"debt.add": "debt.add";
|
|
533
|
+
"debt.addDocument": "debt.addDocument";
|
|
534
|
+
"debt.done": "debt.done";
|
|
535
|
+
"debt.drop": "debt.drop";
|
|
536
|
+
"debt.update": "debt.update";
|
|
490
537
|
"akuma.call": "akuma.call";
|
|
491
538
|
"akuma.kill": "akuma.kill";
|
|
492
539
|
"akuma.tell": "akuma.tell";
|
|
493
540
|
"contract.audit": "contract.audit";
|
|
494
541
|
"contract.deliver": "contract.deliver";
|
|
495
542
|
"contract.review": "contract.review";
|
|
496
|
-
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("
|
|
543
|
+
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
|
|
497
544
|
timeline: z.ZodUnion<readonly [z.ZodObject<{
|
|
498
545
|
reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
499
546
|
sequence: z.ZodNumber;
|
|
@@ -637,6 +684,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
637
684
|
unspecified: "unspecified";
|
|
638
685
|
}>;
|
|
639
686
|
path: z.ZodString;
|
|
687
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
640
688
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
641
689
|
added: z.ZodNumber;
|
|
642
690
|
removed: z.ZodNumber;
|
|
@@ -651,6 +699,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
651
699
|
}, z.core.$strict>>;
|
|
652
700
|
}, z.core.$strict>]>;
|
|
653
701
|
state: z.ZodLiteral<"active">;
|
|
702
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
654
703
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
655
704
|
}, z.core.$strict>, z.ZodObject<{
|
|
656
705
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -687,6 +736,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
687
736
|
unspecified: "unspecified";
|
|
688
737
|
}>;
|
|
689
738
|
path: z.ZodString;
|
|
739
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
690
740
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
691
741
|
added: z.ZodNumber;
|
|
692
742
|
removed: z.ZodNumber;
|
|
@@ -706,8 +756,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
706
756
|
ok: "ok";
|
|
707
757
|
}>;
|
|
708
758
|
message: z.ZodOptional<z.ZodString>;
|
|
759
|
+
output: z.ZodOptional<z.ZodString>;
|
|
709
760
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
710
761
|
}, z.core.$strict>;
|
|
762
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
711
763
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
712
764
|
}, z.core.$strict>]>;
|
|
713
765
|
}, z.core.$strict>]>>>;
|
|
@@ -740,6 +792,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
740
792
|
kind: z.ZodLiteral<"answered">;
|
|
741
793
|
historyId: z.ZodString;
|
|
742
794
|
answer: z.ZodString;
|
|
795
|
+
foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
|
|
743
796
|
}, z.core.$strict>, z.ZodObject<{
|
|
744
797
|
kind: z.ZodLiteral<"failed">;
|
|
745
798
|
historyId: z.ZodString;
|
|
@@ -845,6 +898,7 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
845
898
|
unspecified: "unspecified";
|
|
846
899
|
}>;
|
|
847
900
|
path: z.ZodString;
|
|
901
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
848
902
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
849
903
|
added: z.ZodNumber;
|
|
850
904
|
removed: z.ZodNumber;
|
|
@@ -864,8 +918,10 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
864
918
|
ok: "ok";
|
|
865
919
|
}>;
|
|
866
920
|
message: z.ZodOptional<z.ZodString>;
|
|
921
|
+
output: z.ZodOptional<z.ZodString>;
|
|
867
922
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
868
923
|
}, z.core.$strict>;
|
|
924
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
869
925
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
870
926
|
}, z.core.$strict>]>;
|
|
871
927
|
}, z.core.$strict>]>>>;
|
|
@@ -882,22 +938,18 @@ declare const akumaWaitResultSchema: z.ZodObject<{
|
|
|
882
938
|
kind: z.ZodLiteral<"failed">;
|
|
883
939
|
diagnostic: z.ZodString;
|
|
884
940
|
}, z.core.$strict>]>;
|
|
885
|
-
|
|
941
|
+
createdDebts: z.ZodUnion<readonly [z.ZodObject<{
|
|
886
942
|
kind: z.ZodLiteral<"present">;
|
|
887
943
|
rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
888
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<`
|
|
944
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
|
|
889
945
|
title: z.ZodString;
|
|
890
946
|
state: z.ZodEnum<{
|
|
891
947
|
open: "open";
|
|
892
|
-
in_progress: "in_progress";
|
|
893
|
-
on_hold: "on_hold";
|
|
894
948
|
done: "done";
|
|
895
949
|
drop: "drop";
|
|
896
950
|
}>;
|
|
897
951
|
priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
898
952
|
disposition: z.ZodEnum<{
|
|
899
|
-
in_progress: "in_progress";
|
|
900
|
-
on_hold: "on_hold";
|
|
901
953
|
done: "done";
|
|
902
954
|
drop: "drop";
|
|
903
955
|
ready: "ready";
|
|
@@ -1164,8 +1216,6 @@ export type AkumaAskResult<T = unknown> = Omit<z.infer<typeof akumaAskResultSche
|
|
|
1164
1216
|
}>;
|
|
1165
1217
|
/** Compose one native status into the canonical observation its crossing transports. */
|
|
1166
1218
|
export declare function akumaObservationOf(status: AkumaStatus): AkumaObservation;
|
|
1167
|
-
export declare function isTellResult(value: unknown): value is AkumaTellResult;
|
|
1168
|
-
export declare function isAskResult(value: unknown): value is AkumaAskResult;
|
|
1169
1219
|
export declare const selectionResultSchemas: {
|
|
1170
1220
|
wait: z.ZodObject<{
|
|
1171
1221
|
mode: z.ZodEnum<{
|
|
@@ -1179,6 +1229,30 @@ export declare const selectionResultSchemas: {
|
|
|
1179
1229
|
observations: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1180
1230
|
status: z.ZodObject<{
|
|
1181
1231
|
id: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
1232
|
+
birth: z.ZodObject<{
|
|
1233
|
+
origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1234
|
+
kind: z.ZodLiteral<"direct">;
|
|
1235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1236
|
+
kind: z.ZodLiteral<"request">;
|
|
1237
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
1238
|
+
requestId: z.ZodString;
|
|
1239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1240
|
+
kind: z.ZodLiteral<"fork">;
|
|
1241
|
+
parent: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
1242
|
+
at: z.ZodString;
|
|
1243
|
+
}, z.core.$strip>], "kind">;
|
|
1244
|
+
caller: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1245
|
+
kind: z.ZodLiteral<"akuma">;
|
|
1246
|
+
world: z.ZodCustom<import("../world.js").WorldRoot, import("../world.js").WorldRoot>;
|
|
1247
|
+
akuId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identity.js").AkuId, string>>;
|
|
1248
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1249
|
+
kind: z.ZodLiteral<"external">;
|
|
1250
|
+
integration: z.ZodString;
|
|
1251
|
+
id: z.ZodString;
|
|
1252
|
+
}, z.core.$strict>], "kind">, z.ZodObject<{
|
|
1253
|
+
kind: z.ZodLiteral<"unknown">;
|
|
1254
|
+
}, z.core.$strict>]>;
|
|
1255
|
+
}, z.core.$strict>;
|
|
1182
1256
|
life: z.ZodEnum<{
|
|
1183
1257
|
killed: "killed";
|
|
1184
1258
|
hung: "hung";
|
|
@@ -1188,24 +1262,21 @@ export declare const selectionResultSchemas: {
|
|
|
1188
1262
|
stranded: "stranded";
|
|
1189
1263
|
}>;
|
|
1190
1264
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1265
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1266
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1191
1267
|
allowed: z.ZodPipe<z.ZodArray<z.ZodEnum<{
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1195
|
-
"
|
|
1196
|
-
"
|
|
1197
|
-
"task.hold": "task.hold";
|
|
1198
|
-
"task.resume": "task.resume";
|
|
1199
|
-
"task.start": "task.start";
|
|
1200
|
-
"task.stop": "task.stop";
|
|
1201
|
-
"task.update": "task.update";
|
|
1268
|
+
"debt.add": "debt.add";
|
|
1269
|
+
"debt.addDocument": "debt.addDocument";
|
|
1270
|
+
"debt.done": "debt.done";
|
|
1271
|
+
"debt.drop": "debt.drop";
|
|
1272
|
+
"debt.update": "debt.update";
|
|
1202
1273
|
"akuma.call": "akuma.call";
|
|
1203
1274
|
"akuma.kill": "akuma.kill";
|
|
1204
1275
|
"akuma.tell": "akuma.tell";
|
|
1205
1276
|
"contract.audit": "contract.audit";
|
|
1206
1277
|
"contract.deliver": "contract.deliver";
|
|
1207
1278
|
"contract.review": "contract.review";
|
|
1208
|
-
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("
|
|
1279
|
+
}>>, z.ZodTransform<import("./allowed.js").AllowedActions, ("debt.add" | "debt.addDocument" | "debt.done" | "debt.drop" | "debt.update" | "akuma.call" | "akuma.kill" | "akuma.tell" | "contract.audit" | "contract.deliver" | "contract.review")[]>>;
|
|
1209
1280
|
timeline: z.ZodUnion<readonly [z.ZodObject<{
|
|
1210
1281
|
reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1211
1282
|
sequence: z.ZodNumber;
|
|
@@ -1349,6 +1420,7 @@ export declare const selectionResultSchemas: {
|
|
|
1349
1420
|
unspecified: "unspecified";
|
|
1350
1421
|
}>;
|
|
1351
1422
|
path: z.ZodString;
|
|
1423
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
1352
1424
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
1353
1425
|
added: z.ZodNumber;
|
|
1354
1426
|
removed: z.ZodNumber;
|
|
@@ -1363,6 +1435,7 @@ export declare const selectionResultSchemas: {
|
|
|
1363
1435
|
}, z.core.$strict>>;
|
|
1364
1436
|
}, z.core.$strict>]>;
|
|
1365
1437
|
state: z.ZodLiteral<"active">;
|
|
1438
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
1366
1439
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1367
1440
|
}, z.core.$strict>, z.ZodObject<{
|
|
1368
1441
|
kind: z.ZodLiteral<"tool">;
|
|
@@ -1399,6 +1472,7 @@ export declare const selectionResultSchemas: {
|
|
|
1399
1472
|
unspecified: "unspecified";
|
|
1400
1473
|
}>;
|
|
1401
1474
|
path: z.ZodString;
|
|
1475
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
1402
1476
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
1403
1477
|
added: z.ZodNumber;
|
|
1404
1478
|
removed: z.ZodNumber;
|
|
@@ -1418,8 +1492,10 @@ export declare const selectionResultSchemas: {
|
|
|
1418
1492
|
ok: "ok";
|
|
1419
1493
|
}>;
|
|
1420
1494
|
message: z.ZodOptional<z.ZodString>;
|
|
1495
|
+
output: z.ZodOptional<z.ZodString>;
|
|
1421
1496
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
1422
1497
|
}, z.core.$strict>;
|
|
1498
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
1423
1499
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1424
1500
|
}, z.core.$strict>]>;
|
|
1425
1501
|
}, z.core.$strict>]>>>;
|
|
@@ -1452,6 +1528,7 @@ export declare const selectionResultSchemas: {
|
|
|
1452
1528
|
kind: z.ZodLiteral<"answered">;
|
|
1453
1529
|
historyId: z.ZodString;
|
|
1454
1530
|
answer: z.ZodString;
|
|
1531
|
+
foldedSaidSequence: z.ZodOptional<z.ZodNumber>;
|
|
1455
1532
|
}, z.core.$strict>, z.ZodObject<{
|
|
1456
1533
|
kind: z.ZodLiteral<"failed">;
|
|
1457
1534
|
historyId: z.ZodString;
|
|
@@ -1557,6 +1634,7 @@ export declare const selectionResultSchemas: {
|
|
|
1557
1634
|
unspecified: "unspecified";
|
|
1558
1635
|
}>;
|
|
1559
1636
|
path: z.ZodString;
|
|
1637
|
+
patch: z.ZodOptional<z.ZodString>;
|
|
1560
1638
|
diffstat: z.ZodOptional<z.ZodObject<{
|
|
1561
1639
|
added: z.ZodNumber;
|
|
1562
1640
|
removed: z.ZodNumber;
|
|
@@ -1576,8 +1654,10 @@ export declare const selectionResultSchemas: {
|
|
|
1576
1654
|
ok: "ok";
|
|
1577
1655
|
}>;
|
|
1578
1656
|
message: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
output: z.ZodOptional<z.ZodString>;
|
|
1579
1658
|
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
1580
1659
|
}, z.core.$strict>;
|
|
1660
|
+
toolId: z.ZodOptional<z.ZodString>;
|
|
1581
1661
|
truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1582
1662
|
}, z.core.$strict>]>;
|
|
1583
1663
|
}, z.core.$strict>]>>>;
|
|
@@ -1594,22 +1674,18 @@ export declare const selectionResultSchemas: {
|
|
|
1594
1674
|
kind: z.ZodLiteral<"failed">;
|
|
1595
1675
|
diagnostic: z.ZodString;
|
|
1596
1676
|
}, z.core.$strict>]>;
|
|
1597
|
-
|
|
1677
|
+
createdDebts: z.ZodUnion<readonly [z.ZodObject<{
|
|
1598
1678
|
kind: z.ZodLiteral<"present">;
|
|
1599
1679
|
rows: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1600
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<`
|
|
1680
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<`debt/${string}`, string>>;
|
|
1601
1681
|
title: z.ZodString;
|
|
1602
1682
|
state: z.ZodEnum<{
|
|
1603
1683
|
open: "open";
|
|
1604
|
-
in_progress: "in_progress";
|
|
1605
|
-
on_hold: "on_hold";
|
|
1606
1684
|
done: "done";
|
|
1607
1685
|
drop: "drop";
|
|
1608
1686
|
}>;
|
|
1609
1687
|
priority: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
1610
1688
|
disposition: z.ZodEnum<{
|
|
1611
|
-
in_progress: "in_progress";
|
|
1612
|
-
on_hold: "on_hold";
|
|
1613
1689
|
done: "done";
|
|
1614
1690
|
drop: "drop";
|
|
1615
1691
|
ready: "ready";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { EMPTY_CREATED_DEBT_OBSERVATION, createdDebtObservationSchema } from "../debt/created-observation.js";
|
|
3
3
|
import { akumaStatusSchema } from "./akuma.js";
|
|
4
4
|
import { tellResultSchema } from "./call-initial-tell.js";
|
|
5
5
|
import { NO_DISPATCH_ASSOCIATION, dispatchAssociationSchema } from "./dispatch-association.js";
|
|
@@ -16,7 +16,7 @@ const akumaObservationSchema = z
|
|
|
16
16
|
.object({
|
|
17
17
|
status: akumaStatusSchema,
|
|
18
18
|
contract: dispatchAssociationSchema,
|
|
19
|
-
|
|
19
|
+
createdDebts: createdDebtObservationSchema,
|
|
20
20
|
})
|
|
21
21
|
.strict();
|
|
22
22
|
const akumaUnobservedSchema = z.object({ id: akumaIdSchema, diagnostic: z.string() }).strict();
|
|
@@ -48,13 +48,7 @@ const akumaAskResultSchema = z
|
|
|
48
48
|
.strict();
|
|
49
49
|
/** Compose one native status into the canonical observation its crossing transports. */
|
|
50
50
|
export function akumaObservationOf(status) {
|
|
51
|
-
return { status, contract: NO_DISPATCH_ASSOCIATION,
|
|
52
|
-
}
|
|
53
|
-
export function isTellResult(value) {
|
|
54
|
-
return akumaTellResultSchema.safeParse(value).success;
|
|
55
|
-
}
|
|
56
|
-
export function isAskResult(value) {
|
|
57
|
-
return akumaAskResultSchema.safeParse(value).success;
|
|
51
|
+
return { status, contract: NO_DISPATCH_ASSOCIATION, createdDebts: EMPTY_CREATED_DEBT_OBSERVATION };
|
|
58
52
|
}
|
|
59
53
|
export const selectionResultSchemas = {
|
|
60
54
|
wait: akumaWaitResultSchema,
|
|
@@ -34,6 +34,9 @@ export type DriveTurnInput = Readonly<{
|
|
|
34
34
|
admitInitialTell(input: InitialTellAdmissionRequest): Promise<CallInitialTellAdmission>;
|
|
35
35
|
world: import("../world.js").WorldRoot;
|
|
36
36
|
externalCommands: Readonly<Record<string, ErasedRequestCommand>>;
|
|
37
|
+
turnStarted: Readonly<{
|
|
38
|
+
emit(turnSequence: number): Promise<void>;
|
|
39
|
+
}>;
|
|
37
40
|
now(): string;
|
|
38
41
|
}>;
|
|
39
42
|
export declare function driveTurn(input: DriveTurnInput): Promise<(DrivenTurn & Readonly<{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { abortableDelay } from "./abort.js";
|
|
2
2
|
/* eslint-disable max-lines-per-function -- Turn setup and consumption each preserve one ordered lifecycle transaction. */
|
|
3
|
-
import { appendActivity, beginTurn, bindTellsToTurn, breakBody, drainPendingTells, heartExists, readHeart, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
|
|
3
|
+
import { appendActivity, beginTurn, bindTellsToTurn, breakBody, drainPendingTells, heartExists, readHeart, recordCurrentModel, recordSession, recordTellDeliveries, recordTellReceipt, } from "./heart/index.js";
|
|
4
|
+
import { withoutModel } from "./provider-recipe.js";
|
|
4
5
|
import { encodeAgentEvent, } from "./provider.js";
|
|
5
6
|
import { akumaCallRequestCommands } from "./call-request.js";
|
|
6
7
|
import { BodyRequestPump } from "./request-serve.js";
|
|
@@ -27,12 +28,20 @@ function serializeEffects() {
|
|
|
27
28
|
return serialize;
|
|
28
29
|
}
|
|
29
30
|
export async function turnRecipe(paths, soul) {
|
|
30
|
-
const
|
|
31
|
+
const heart = await readHeart(paths);
|
|
32
|
+
const latest = heart.latestSession;
|
|
31
33
|
const admitted = latest?.provider === soul.provider.name ? latest : undefined;
|
|
32
34
|
const session = admitted?.coordinate;
|
|
35
|
+
// The current model is the one mutable member of the recipe and lives only
|
|
36
|
+
// in the Soul, so every Turn reads it freshly and no session copy, cached
|
|
37
|
+
// birth Soul, or stale option can re-admit a model that already moved.
|
|
38
|
+
const current = heart.soul?.options.model;
|
|
33
39
|
return {
|
|
34
40
|
cwd: soul.cwd,
|
|
35
|
-
options:
|
|
41
|
+
options: {
|
|
42
|
+
...withoutModel(admitted?.options ?? soul.options),
|
|
43
|
+
...(current === undefined ? {} : { model: current }),
|
|
44
|
+
},
|
|
36
45
|
...(session === undefined ? {} : { session }),
|
|
37
46
|
};
|
|
38
47
|
}
|
|
@@ -51,7 +60,7 @@ async function failedTurnSetup(input, turnSequence, requests, cancelDrive, error
|
|
|
51
60
|
}
|
|
52
61
|
return { kind: "failed", turnSequence, diagnostic: error instanceof Error ? error.message : String(error) };
|
|
53
62
|
}
|
|
54
|
-
async function writeProviderEvent(input, active, event) {
|
|
63
|
+
async function writeProviderEvent(input, active, event, witness) {
|
|
55
64
|
if (input.supervisor.signal.aborted)
|
|
56
65
|
return;
|
|
57
66
|
const at = input.now();
|
|
@@ -64,6 +73,16 @@ async function writeProviderEvent(input, active, event) {
|
|
|
64
73
|
admittedAt: at,
|
|
65
74
|
});
|
|
66
75
|
}
|
|
76
|
+
if (event.type === "model") {
|
|
77
|
+
// Native model evidence is authoritative current state, not narration: it
|
|
78
|
+
// moves the Soul's one model and is never appended to activity.
|
|
79
|
+
if (witness.written && witness.model === event.model)
|
|
80
|
+
return;
|
|
81
|
+
witness.written = true;
|
|
82
|
+
witness.model = event.model;
|
|
83
|
+
await recordCurrentModel(input.paths, { bodySequence: input.bodySequence, model: event.model });
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
67
86
|
await appendActivity(input.paths, { turnSequence: active.turnSequence, event: encodeAgentEvent(event), at });
|
|
68
87
|
}
|
|
69
88
|
async function startTurnDrive(input) {
|
|
@@ -87,6 +106,7 @@ async function startTurnDrive(input) {
|
|
|
87
106
|
boundAt: input.now(),
|
|
88
107
|
});
|
|
89
108
|
}
|
|
109
|
+
await input.turnStarted.emit(turn.sequence);
|
|
90
110
|
const { world, paths, soul: parent, runtimeSpawn: spawn, externalCommands, admitInitialTell } = input;
|
|
91
111
|
const commands = composeRequestCommands(akumaCallRequestCommands({ world, paths, parent, spawn, admitInitialTell }), externalCommands);
|
|
92
112
|
const requests = await BodyRequestPump.open({
|
|
@@ -115,7 +135,7 @@ async function startTurnDrive(input) {
|
|
|
115
135
|
cwd,
|
|
116
136
|
options,
|
|
117
137
|
signal: driveController.signal,
|
|
118
|
-
requests: { dir: requests.directory },
|
|
138
|
+
requests: { dir: requests.directory, entry: requests.entry },
|
|
119
139
|
...(schemaJson === undefined ? {} : { schemaJson }),
|
|
120
140
|
};
|
|
121
141
|
const attempt = session === undefined
|
|
@@ -232,9 +252,6 @@ function pumpReceipts(writers) {
|
|
|
232
252
|
function observeFailure(settlement) {
|
|
233
253
|
return settlement.then(() => new Promise(() => { }), (error) => Promise.reject(error));
|
|
234
254
|
}
|
|
235
|
-
function observeReceiptFailure(receiptPump) {
|
|
236
|
-
return observeFailure(receiptPump);
|
|
237
|
-
}
|
|
238
255
|
function observeCompletionFailure(drive) {
|
|
239
256
|
return drive.completion.then(() => new Promise(() => { }), (error) => ({ kind: "completion-failed", error }));
|
|
240
257
|
}
|
|
@@ -354,9 +371,10 @@ async function consumeTurnDrive(input, active) {
|
|
|
354
371
|
let writesOpen = true;
|
|
355
372
|
const mayWrite = () => writesOpen && !input.supervisor.signal.aborted;
|
|
356
373
|
const writers = { input, turnSequence, drive, writeWitness, mayWrite };
|
|
357
|
-
const receiptFailure =
|
|
374
|
+
const receiptFailure = observeFailure(pumpReceipts(writers));
|
|
358
375
|
const completionFailure = observeCompletionFailure(drive);
|
|
359
376
|
const iterator = drive.events[Symbol.asyncIterator]();
|
|
377
|
+
const witness = { written: false, model: undefined };
|
|
360
378
|
let liveTells = true;
|
|
361
379
|
let tellPump = null;
|
|
362
380
|
const wakeups = createTurnWakeups((after) => input.supervisor.next(after));
|
|
@@ -401,7 +419,7 @@ async function consumeTurnDrive(input, active) {
|
|
|
401
419
|
}
|
|
402
420
|
if (next.event.done)
|
|
403
421
|
break;
|
|
404
|
-
await writeProviderEvent(input, active, next.event.value);
|
|
422
|
+
await writeProviderEvent(input, active, next.event.value, witness);
|
|
405
423
|
if (next.event.value.type === "session")
|
|
406
424
|
turnSession = next.event.value.coordinate;
|
|
407
425
|
wakeups.event(iterator.next());
|