@astrosheep/keiyaku 4.5.7 → 4.5.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.
Files changed (244) hide show
  1. package/README.md +10 -0
  2. package/build/integrations/marketplace/plugins/keiyaku/.claude-plugin/plugin.json +1 -1
  3. package/build/integrations/marketplace/plugins/keiyaku/.codex-plugin/plugin.json +1 -1
  4. package/build/integrations/marketplace/plugins/keiyaku/opencode.js +3 -2
  5. package/build/integrations/marketplace/plugins/keiyaku/package.json +1 -1
  6. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku/SKILL.md +12 -11
  7. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +33 -12
  8. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-babysit/SKILL.md +35 -96
  9. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +28 -49
  10. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-task/SKILL.md +21 -15
  11. package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +148 -89
  12. package/build/src/akuma/abort.d.ts +2 -1
  13. package/build/src/akuma/abort.js +6 -23
  14. package/build/src/akuma/akuma-handle.js +4 -2
  15. package/build/src/akuma/akuma-observe.d.ts +2 -0
  16. package/build/src/akuma/akuma-observe.js +1 -0
  17. package/build/src/akuma/akuma-product.js +9 -7
  18. package/build/src/akuma/akuma.d.ts +392 -9
  19. package/build/src/akuma/akuma.js +31 -1
  20. package/build/src/akuma/allowed.d.ts +1 -1
  21. package/build/src/akuma/allowed.js +1 -0
  22. package/build/src/akuma/archetype.js +1 -1
  23. package/build/src/akuma/body.d.ts +8 -5
  24. package/build/src/akuma/body.js +12 -5
  25. package/build/src/akuma/call-request.d.ts +80 -0
  26. package/build/src/akuma/call-request.js +211 -0
  27. package/build/src/akuma/heart/facts.d.ts +16 -78
  28. package/build/src/akuma/heart/facts.js +11 -0
  29. package/build/src/akuma/heart/index.d.ts +3 -2
  30. package/build/src/akuma/heart/index.js +4 -1
  31. package/build/src/akuma/heart/request-authority.d.ts +5 -4
  32. package/build/src/akuma/heart/request-authority.js +20 -34
  33. package/build/src/akuma/heart/request-rows.js +12 -23
  34. package/build/src/akuma/heart/schema.d.ts +1 -1
  35. package/build/src/akuma/heart/schema.js +5 -13
  36. package/build/src/akuma/index.d.ts +1 -1
  37. package/build/src/akuma/index.js +1 -1
  38. package/build/src/akuma/projection-read.d.ts +1 -0
  39. package/build/src/akuma/projection-read.js +8 -1
  40. package/build/src/akuma/projection.d.ts +907 -137
  41. package/build/src/akuma/projection.js +193 -9
  42. package/build/src/akuma/provider.d.ts +30 -3
  43. package/build/src/akuma/provider.js +111 -0
  44. package/build/src/akuma/providers/acp/core.d.ts +2 -2
  45. package/build/src/akuma/providers/acp/core.js +13 -6
  46. package/build/src/akuma/providers/acp/index.js +5 -4
  47. package/build/src/akuma/providers/claude/events.d.ts +2 -2
  48. package/build/src/akuma/providers/claude/events.js +16 -3
  49. package/build/src/akuma/providers/claude/index.d.ts +3 -3
  50. package/build/src/akuma/providers/claude/index.js +16 -5
  51. package/build/src/akuma/providers/codex-app-server/events.d.ts +2 -2
  52. package/build/src/akuma/providers/codex-app-server/events.js +25 -4
  53. package/build/src/akuma/providers/codex-app-server/index.js +18 -6
  54. package/build/src/akuma/providers/grok-build/index.js +5 -4
  55. package/build/src/akuma/providers/opencode-sdk/index.js +66 -25
  56. package/build/src/akuma/providers/opencode-sdk/session.d.ts +3 -2
  57. package/build/src/akuma/providers/opencode-sdk/session.js +28 -11
  58. package/build/src/akuma/providers/pi/index.js +72 -58
  59. package/build/src/akuma/request-lifecycle.d.ts +4 -10
  60. package/build/src/akuma/request-lifecycle.js +7 -5
  61. package/build/src/akuma/request-rendezvous.d.ts +26 -0
  62. package/build/src/akuma/request-rendezvous.js +100 -0
  63. package/build/src/akuma/request-serve.d.ts +6 -66
  64. package/build/src/akuma/request-serve.js +83 -210
  65. package/build/src/akuma/request-wire.d.ts +109 -115
  66. package/build/src/akuma/request-wire.js +63 -318
  67. package/build/src/akuma/requests.d.ts +19 -47
  68. package/build/src/akuma/requests.js +51 -107
  69. package/build/src/akuma/turn-drive.d.ts +5 -3
  70. package/build/src/akuma/turn-drive.js +39 -11
  71. package/build/src/akuma-body.d.ts +7 -2
  72. package/build/src/akuma-body.js +68 -46
  73. package/build/src/body/amend.js +18 -19
  74. package/build/src/cli/accepted.d.ts +1 -1
  75. package/build/src/cli/accepted.js +2 -2
  76. package/build/src/cli/commands/akuma-invoke.d.ts +2 -0
  77. package/build/src/cli/commands/akuma-invoke.js +17 -9
  78. package/build/src/cli/commands/akuma.js +8 -8
  79. package/build/src/cli/commands/contract-invoke.d.ts +3 -2
  80. package/build/src/cli/commands/contract-invoke.js +42 -30
  81. package/build/src/cli/commands/contract.d.ts +16 -20
  82. package/build/src/cli/commands/contract.js +58 -25
  83. package/build/src/cli/commands/install.d.ts +2 -1
  84. package/build/src/cli/commands/install.js +3 -2
  85. package/build/src/cli/commands/task-invoke.d.ts +3 -0
  86. package/build/src/cli/commands/task-invoke.js +23 -140
  87. package/build/src/cli/commands/task.js +54 -20
  88. package/build/src/cli/invoke.js +39 -25
  89. package/build/src/cli/main.js +2 -1
  90. package/build/src/cli/parse.d.ts +2 -2
  91. package/build/src/cli/parse.js +56 -27
  92. package/build/src/cli/render/akuma-activity.d.ts +3 -0
  93. package/build/src/cli/render/akuma-activity.js +45 -29
  94. package/build/src/cli/render/akuma-tool.d.ts +5 -1
  95. package/build/src/cli/render/akuma.js +4 -8
  96. package/build/src/cli/render/audit.js +1 -1
  97. package/build/src/cli/render/catalog.js +80 -21
  98. package/build/src/cli/render/contract-observation.d.ts +2 -0
  99. package/build/src/cli/render/contract-observation.js +11 -0
  100. package/build/src/cli/render/contract.js +35 -62
  101. package/build/src/cli/render/kanshi-akuma.d.ts +8 -0
  102. package/build/src/cli/render/kanshi-akuma.js +132 -0
  103. package/build/src/cli/render/kanshi.js +131 -213
  104. package/build/src/cli/render/receipt.d.ts +1 -2
  105. package/build/src/cli/render/receipt.js +76 -26
  106. package/build/src/cli/render/refusal.js +2 -10
  107. package/build/src/cli/render/region.js +5 -2
  108. package/build/src/cli/render/settings.d.ts +1 -1
  109. package/build/src/cli/render/settings.js +27 -8
  110. package/build/src/cli/render/task.js +22 -5
  111. package/build/src/cli/render/terminal.d.ts +32 -1
  112. package/build/src/cli/render/terminal.js +77 -1
  113. package/build/src/cli/result.d.ts +3 -3
  114. package/build/src/cli/runtime.js +4 -2
  115. package/build/src/cli/selectors.d.ts +2 -1
  116. package/build/src/cli/selectors.js +4 -3
  117. package/build/src/cli/square-edge.js +120 -36
  118. package/build/src/cli/usage.js +2 -1
  119. package/build/src/contract-guidance.d.ts +5 -0
  120. package/build/src/contract-guidance.js +121 -0
  121. package/build/src/contract-worktree.d.ts +0 -1
  122. package/build/src/contract-worktree.js +32 -83
  123. package/build/src/coordination/sqlite-transaction-lock.d.ts +1 -0
  124. package/build/src/coordination/sqlite-transaction-lock.js +5 -0
  125. package/build/src/core/facts/codec.d.ts +2 -0
  126. package/build/src/core/facts/codec.js +4 -0
  127. package/build/src/core/verbs/placement.d.ts +6 -1
  128. package/build/src/core/verbs/placement.js +5 -3
  129. package/build/src/dispatch/index.d.ts +0 -2
  130. package/build/src/dispatch/index.js +54 -55
  131. package/build/src/git/admission.js +2 -2
  132. package/build/src/git/hooks.d.ts +9 -15
  133. package/build/src/git/hooks.js +23 -317
  134. package/build/src/git/nuke.d.ts +2 -1
  135. package/build/src/git/nuke.js +39 -21
  136. package/build/src/git/private-state-seat.d.ts +12 -0
  137. package/build/src/git/private-state-seat.js +39 -0
  138. package/build/src/git/process.d.ts +6 -0
  139. package/build/src/git/process.js +26 -11
  140. package/build/src/git/read-observation.js +29 -20
  141. package/build/src/git/reconcile.d.ts +13 -1
  142. package/build/src/git/reconcile.js +70 -11
  143. package/build/src/git/ref-migration.d.ts +22 -0
  144. package/build/src/git/ref-migration.js +55 -0
  145. package/build/src/git/repository.d.ts +10 -6
  146. package/build/src/git/repository.js +16 -8
  147. package/build/src/git/target-placement.d.ts +1 -0
  148. package/build/src/git/target-placement.js +5 -0
  149. package/build/src/git/tender.d.ts +1 -0
  150. package/build/src/git/terminal-reconcile.d.ts +1 -1
  151. package/build/src/git/terminal-reconcile.js +22 -20
  152. package/build/src/git/workspace.d.ts +14 -0
  153. package/build/src/git/workspace.js +44 -0
  154. package/build/src/kanshi/index.d.ts +1 -1
  155. package/build/src/kanshi/read.js +16 -16
  156. package/build/src/kanshi/report.d.ts +2 -2
  157. package/build/src/library/address.d.ts +9 -3
  158. package/build/src/library/address.js +3 -2
  159. package/build/src/library/akuma-creation.d.ts +4 -3
  160. package/build/src/library/akuma-creation.js +19 -13
  161. package/build/src/library/audit.d.ts +14 -6
  162. package/build/src/library/audit.js +13 -23
  163. package/build/src/library/catalog.d.ts +3 -1
  164. package/build/src/library/catalog.js +20 -6
  165. package/build/src/library/composition.d.ts +385 -0
  166. package/build/src/library/composition.js +28 -0
  167. package/build/src/library/configuration.js +8 -2
  168. package/build/src/library/continuation.js +66 -30
  169. package/build/src/library/contract-bind.js +10 -2
  170. package/build/src/library/contract-forwarding-reconciliation-result.d.ts +102 -0
  171. package/build/src/library/contract-forwarding-reconciliation-result.js +92 -0
  172. package/build/src/library/contract-forwarding-result.d.ts +4464 -0
  173. package/build/src/library/contract-forwarding-result.js +521 -0
  174. package/build/src/library/contract-forwarding.d.ts +71 -0
  175. package/build/src/library/contract-forwarding.js +114 -0
  176. package/build/src/library/contract-handle.d.ts +38 -0
  177. package/build/src/library/contract-handle.js +314 -0
  178. package/build/src/library/contract-operations.d.ts +214 -69
  179. package/build/src/library/contract-operations.js +189 -118
  180. package/build/src/library/contract-types.d.ts +7 -3
  181. package/build/src/library/contract.d.ts +21 -34
  182. package/build/src/library/contract.js +29 -287
  183. package/build/src/library/fleet-result.d.ts +1580 -0
  184. package/build/src/library/fleet-result.js +98 -0
  185. package/build/src/library/fleet.d.ts +112 -54
  186. package/build/src/library/fleet.js +211 -71
  187. package/build/src/library/input.d.ts +3 -1
  188. package/build/src/library/input.js +11 -1
  189. package/build/src/library/keiyaku.d.ts +388 -20
  190. package/build/src/library/keiyaku.js +13 -21
  191. package/build/src/library/mutation.d.ts +3 -3
  192. package/build/src/library/mutation.js +5 -9
  193. package/build/src/library/nuke.d.ts +1 -1
  194. package/build/src/library/nuke.js +4 -3
  195. package/build/src/library/reconcile.d.ts +4 -0
  196. package/build/src/library/reconcile.js +2 -0
  197. package/build/src/library/refusal.d.ts +0 -9
  198. package/build/src/library/refusal.js +0 -7
  199. package/build/src/protocol/amend.js +56 -50
  200. package/build/src/protocol/attempt.d.ts +2 -0
  201. package/build/src/protocol/attempt.js +8 -1
  202. package/build/src/protocol/completion.js +7 -0
  203. package/build/src/protocol/deliver.js +6 -2
  204. package/build/src/protocol/operations.d.ts +4 -1
  205. package/build/src/protocol/operations.js +5 -2
  206. package/build/src/protocol/placement.d.ts +1 -0
  207. package/build/src/protocol/placement.js +52 -38
  208. package/build/src/protocol/read/observation.d.ts +1 -4
  209. package/build/src/protocol/read/observation.js +2 -15
  210. package/build/src/protocol/reintegrate.js +62 -58
  211. package/build/src/protocol/review.js +5 -0
  212. package/build/src/protocol/run.js +17 -13
  213. package/build/src/runtime/proc/run.d.ts +9 -0
  214. package/build/src/runtime/proc/run.js +51 -4
  215. package/build/src/runtime/proc/termination.js +26 -22
  216. package/build/src/runtime/proc/windows-launch.exe +0 -0
  217. package/build/src/settlement/holder.d.ts +2 -1
  218. package/build/src/settlement/holder.js +15 -4
  219. package/build/src/settlement/settle.js +99 -33
  220. package/build/src/task/board.d.ts +68 -27
  221. package/build/src/task/board.js +31 -1
  222. package/build/src/task/catalog.d.ts +4 -0
  223. package/build/src/task/catalog.js +23 -0
  224. package/build/src/task/compose-language.js +33 -7
  225. package/build/src/task/compose-parser.d.ts +1 -1
  226. package/build/src/task/compose-parser.js +1 -1
  227. package/build/src/task/compose.js +2 -0
  228. package/build/src/task/index.d.ts +12 -4
  229. package/build/src/task/index.js +97 -16
  230. package/build/src/task/mutation-result.d.ts +923 -0
  231. package/build/src/task/mutation-result.js +140 -0
  232. package/build/src/task/mutation.d.ts +552 -28
  233. package/build/src/task/mutation.js +304 -97
  234. package/build/src/task/operations.d.ts +1 -4
  235. package/build/src/task/operations.js +0 -6
  236. package/build/src/task/public.d.ts +2 -0
  237. package/build/src/task/public.js +1 -0
  238. package/build/src/workspace-place.d.ts +7 -2
  239. package/build/src/workspace-place.js +34 -24
  240. package/build/src/world.d.ts +1 -0
  241. package/build/src/world.js +11 -0
  242. package/package.json +8 -6
  243. package/build/src/akuma/request-execution.d.ts +0 -8
  244. package/build/src/akuma/request-execution.js +0 -98
@@ -1,101 +1,905 @@
1
- import { type ToolCall, type ToolResult } from "./provider.js";
2
- import type { TellDelivery, TellFact, TimelineFact } from "./heart/index.js";
3
- export type TurnOutcome = Readonly<{
4
- kind: "answered";
5
- historyId: string;
6
- answer: string;
7
- }> | Readonly<{
8
- kind: "failed";
9
- historyId: string;
10
- diagnostic: string;
11
- }>;
12
- export type TurnStartRow = Readonly<{
13
- kind: "turn";
14
- sequence: number;
15
- turnSequence: number;
16
- bodySequence: number;
17
- at: string;
18
- }>;
19
- type CallRow = Readonly<{
20
- kind: "call";
21
- sequence: number;
22
- turnSequence: number;
23
- at: string;
24
- text: string;
25
- }>;
26
- type SaidRow = Readonly<{
27
- kind: "said";
28
- sequence: number;
29
- turnSequence: number;
30
- at: string;
31
- text: string;
32
- truncated?: true;
33
- }>;
34
- type ThoughtRow = Readonly<{
35
- kind: "thought";
36
- sequence: number;
37
- turnSequence: number;
38
- at: string;
39
- text: string;
40
- truncated?: true;
41
- }>;
42
- type NoteRow = Readonly<{
43
- kind: "note";
44
- sequence: number;
45
- turnSequence: number;
46
- at: string;
47
- text: string;
48
- truncated?: true;
49
- }>;
1
+ import type { TimelineFact } from "./heart/index.js";
2
+ import { type TellRow } from "./heart/facts.js";
3
+ import { z } from "zod";
4
+ declare const turnRowSchema: z.ZodObject<{
5
+ kind: z.ZodLiteral<"turn">;
6
+ sequence: z.ZodNumber;
7
+ turnSequence: z.ZodNumber;
8
+ bodySequence: z.ZodNumber;
9
+ at: z.ZodString;
10
+ }, z.core.$strict>;
11
+ declare const callRowSchema: z.ZodObject<{
12
+ kind: z.ZodLiteral<"call">;
13
+ sequence: z.ZodNumber;
14
+ turnSequence: z.ZodNumber;
15
+ at: z.ZodString;
16
+ text: z.ZodString;
17
+ }, z.core.$strict>;
18
+ declare const textRowSchema: (kind: "said" | "thought" | "note") => z.ZodObject<{
19
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
20
+ sequence: z.ZodNumber;
21
+ turnSequence: z.ZodNumber;
22
+ at: z.ZodString;
23
+ text: z.ZodString;
24
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
25
+ }, z.core.$strict>;
26
+ export declare const tellRowSchema: z.ZodObject<{
27
+ kind: z.ZodLiteral<"tell">;
28
+ sequence: z.ZodNumber;
29
+ at: z.ZodString;
30
+ tellId: z.ZodString;
31
+ text: z.ZodString;
32
+ state: z.ZodEnum<{
33
+ pending: "pending";
34
+ told: "told";
35
+ }>;
36
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
37
+ deliveredAt: z.ZodString;
38
+ route: z.ZodEnum<{
39
+ live: "live";
40
+ launch: "launch";
41
+ }>;
42
+ turnSequence: z.ZodNumber;
43
+ receipt: z.ZodOptional<z.ZodEnum<{
44
+ required: "required";
45
+ unavailable: "unavailable";
46
+ }>>;
47
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
48
+ turnSequence: number;
49
+ route: "launch" | "live";
50
+ receipt?: "unavailable" | "required";
51
+ deliveredAt: string;
52
+ }>, {
53
+ deliveredAt: string;
54
+ route: "live" | "launch";
55
+ turnSequence: number;
56
+ receipt?: "required" | "unavailable" | undefined;
57
+ }>>>>;
58
+ }, z.core.$strict>;
59
+ declare const outcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
60
+ kind: z.ZodLiteral<"answered">;
61
+ historyId: z.ZodString;
62
+ answer: z.ZodString;
63
+ }, z.core.$strict>, z.ZodObject<{
64
+ kind: z.ZodLiteral<"failed">;
65
+ historyId: z.ZodString;
66
+ diagnostic: z.ZodString;
67
+ }, z.core.$strict>]>;
68
+ declare const outcomeRowSchema: z.ZodObject<{
69
+ kind: z.ZodLiteral<"outcome">;
70
+ sequence: z.ZodNumber;
71
+ turnSequence: z.ZodNumber;
72
+ at: z.ZodString;
73
+ outcome: z.ZodUnion<readonly [z.ZodObject<{
74
+ kind: z.ZodLiteral<"answered">;
75
+ historyId: z.ZodString;
76
+ answer: z.ZodString;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ kind: z.ZodLiteral<"failed">;
79
+ historyId: z.ZodString;
80
+ diagnostic: z.ZodString;
81
+ }, z.core.$strict>]>;
82
+ }, z.core.$strict>;
83
+ declare const activeToolRowSchema: z.ZodObject<{
84
+ kind: z.ZodLiteral<"tool">;
85
+ sequence: z.ZodNumber;
86
+ turnSequence: z.ZodNumber;
87
+ at: z.ZodString;
88
+ name: z.ZodString;
89
+ call: z.ZodUnion<readonly [z.ZodObject<{
90
+ kind: z.ZodLiteral<"run">;
91
+ command: z.ZodString;
92
+ }, z.core.$strict>, z.ZodObject<{
93
+ kind: z.ZodLiteral<"read">;
94
+ path: z.ZodString;
95
+ offset: z.ZodOptional<z.ZodNumber>;
96
+ limit: z.ZodOptional<z.ZodNumber>;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"search">;
99
+ query: z.ZodString;
100
+ scope: z.ZodOptional<z.ZodEnum<{
101
+ content: "content";
102
+ files: "files";
103
+ web: "web";
104
+ }>>;
105
+ path: z.ZodOptional<z.ZodString>;
106
+ glob: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strict>, z.ZodObject<{
108
+ kind: z.ZodLiteral<"fileChange">;
109
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
110
+ op: z.ZodEnum<{
111
+ add: "add";
112
+ update: "update";
113
+ delete: "delete";
114
+ unspecified: "unspecified";
115
+ }>;
116
+ path: z.ZodString;
117
+ diffstat: z.ZodOptional<z.ZodObject<{
118
+ added: z.ZodNumber;
119
+ removed: z.ZodNumber;
120
+ }, z.core.$strict>>;
121
+ }, z.core.$strict>>>;
122
+ }, z.core.$strict>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"other">;
124
+ display: z.ZodString;
125
+ }, z.core.$strict>]>;
126
+ state: z.ZodLiteral<"active">;
127
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
128
+ }, z.core.$strict>;
129
+ declare const completedToolRowSchema: z.ZodObject<{
130
+ kind: z.ZodLiteral<"tool">;
131
+ sequence: z.ZodNumber;
132
+ turnSequence: z.ZodNumber;
133
+ at: z.ZodString;
134
+ completedAt: z.ZodOptional<z.ZodString>;
135
+ durationMs: z.ZodOptional<z.ZodNumber>;
136
+ name: z.ZodString;
137
+ call: z.ZodUnion<readonly [z.ZodObject<{
138
+ kind: z.ZodLiteral<"run">;
139
+ command: z.ZodString;
140
+ }, z.core.$strict>, z.ZodObject<{
141
+ kind: z.ZodLiteral<"read">;
142
+ path: z.ZodString;
143
+ offset: z.ZodOptional<z.ZodNumber>;
144
+ limit: z.ZodOptional<z.ZodNumber>;
145
+ }, z.core.$strict>, z.ZodObject<{
146
+ kind: z.ZodLiteral<"search">;
147
+ query: z.ZodString;
148
+ scope: z.ZodOptional<z.ZodEnum<{
149
+ content: "content";
150
+ files: "files";
151
+ web: "web";
152
+ }>>;
153
+ path: z.ZodOptional<z.ZodString>;
154
+ glob: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ kind: z.ZodLiteral<"fileChange">;
157
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
158
+ op: z.ZodEnum<{
159
+ add: "add";
160
+ update: "update";
161
+ delete: "delete";
162
+ unspecified: "unspecified";
163
+ }>;
164
+ path: z.ZodString;
165
+ diffstat: z.ZodOptional<z.ZodObject<{
166
+ added: z.ZodNumber;
167
+ removed: z.ZodNumber;
168
+ }, z.core.$strict>>;
169
+ }, z.core.$strict>>>;
170
+ }, z.core.$strict>, z.ZodObject<{
171
+ kind: z.ZodLiteral<"other">;
172
+ display: z.ZodString;
173
+ }, z.core.$strict>]>;
174
+ state: z.ZodObject<{
175
+ status: z.ZodEnum<{
176
+ error: "error";
177
+ ok: "ok";
178
+ }>;
179
+ message: z.ZodOptional<z.ZodString>;
180
+ exitCode: z.ZodOptional<z.ZodNumber>;
181
+ }, z.core.$strict>;
182
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
183
+ }, z.core.$strict>;
184
+ declare const unsettledToolRowSchema: z.ZodObject<{
185
+ kind: z.ZodLiteral<"tool">;
186
+ sequence: z.ZodNumber;
187
+ turnSequence: z.ZodNumber;
188
+ at: z.ZodString;
189
+ name: z.ZodString;
190
+ call: z.ZodUnion<readonly [z.ZodObject<{
191
+ kind: z.ZodLiteral<"run">;
192
+ command: z.ZodString;
193
+ }, z.core.$strict>, z.ZodObject<{
194
+ kind: z.ZodLiteral<"read">;
195
+ path: z.ZodString;
196
+ offset: z.ZodOptional<z.ZodNumber>;
197
+ limit: z.ZodOptional<z.ZodNumber>;
198
+ }, z.core.$strict>, z.ZodObject<{
199
+ kind: z.ZodLiteral<"search">;
200
+ query: z.ZodString;
201
+ scope: z.ZodOptional<z.ZodEnum<{
202
+ content: "content";
203
+ files: "files";
204
+ web: "web";
205
+ }>>;
206
+ path: z.ZodOptional<z.ZodString>;
207
+ glob: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strict>, z.ZodObject<{
209
+ kind: z.ZodLiteral<"fileChange">;
210
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
211
+ op: z.ZodEnum<{
212
+ add: "add";
213
+ update: "update";
214
+ delete: "delete";
215
+ unspecified: "unspecified";
216
+ }>;
217
+ path: z.ZodString;
218
+ diffstat: z.ZodOptional<z.ZodObject<{
219
+ added: z.ZodNumber;
220
+ removed: z.ZodNumber;
221
+ }, z.core.$strict>>;
222
+ }, z.core.$strict>>>;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ kind: z.ZodLiteral<"other">;
225
+ display: z.ZodString;
226
+ }, z.core.$strict>]>;
227
+ state: z.ZodLiteral<"unsettled">;
228
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
229
+ }, z.core.$strict>;
230
+ declare const openSnapshotRowSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
231
+ kind: z.ZodLiteral<"call">;
232
+ sequence: z.ZodNumber;
233
+ turnSequence: z.ZodNumber;
234
+ at: z.ZodString;
235
+ text: z.ZodString;
236
+ }, z.core.$strict>, z.ZodObject<{
237
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
238
+ sequence: z.ZodNumber;
239
+ turnSequence: z.ZodNumber;
240
+ at: z.ZodString;
241
+ text: z.ZodString;
242
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
245
+ sequence: z.ZodNumber;
246
+ turnSequence: z.ZodNumber;
247
+ at: z.ZodString;
248
+ text: z.ZodString;
249
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
250
+ }, z.core.$strict>, z.ZodObject<{
251
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
252
+ sequence: z.ZodNumber;
253
+ turnSequence: z.ZodNumber;
254
+ at: z.ZodString;
255
+ text: z.ZodString;
256
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ kind: z.ZodLiteral<"tell">;
259
+ sequence: z.ZodNumber;
260
+ at: z.ZodString;
261
+ tellId: z.ZodString;
262
+ text: z.ZodString;
263
+ state: z.ZodEnum<{
264
+ pending: "pending";
265
+ told: "told";
266
+ }>;
267
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
268
+ deliveredAt: z.ZodString;
269
+ route: z.ZodEnum<{
270
+ live: "live";
271
+ launch: "launch";
272
+ }>;
273
+ turnSequence: z.ZodNumber;
274
+ receipt: z.ZodOptional<z.ZodEnum<{
275
+ required: "required";
276
+ unavailable: "unavailable";
277
+ }>>;
278
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
279
+ turnSequence: number;
280
+ route: "launch" | "live";
281
+ receipt?: "unavailable" | "required";
282
+ deliveredAt: string;
283
+ }>, {
284
+ deliveredAt: string;
285
+ route: "live" | "launch";
286
+ turnSequence: number;
287
+ receipt?: "required" | "unavailable" | undefined;
288
+ }>>>>;
289
+ }, z.core.$strict>]>, z.ZodObject<{
290
+ kind: z.ZodLiteral<"tool">;
291
+ sequence: z.ZodNumber;
292
+ turnSequence: z.ZodNumber;
293
+ at: z.ZodString;
294
+ name: z.ZodString;
295
+ call: z.ZodUnion<readonly [z.ZodObject<{
296
+ kind: z.ZodLiteral<"run">;
297
+ command: z.ZodString;
298
+ }, z.core.$strict>, z.ZodObject<{
299
+ kind: z.ZodLiteral<"read">;
300
+ path: z.ZodString;
301
+ offset: z.ZodOptional<z.ZodNumber>;
302
+ limit: z.ZodOptional<z.ZodNumber>;
303
+ }, z.core.$strict>, z.ZodObject<{
304
+ kind: z.ZodLiteral<"search">;
305
+ query: z.ZodString;
306
+ scope: z.ZodOptional<z.ZodEnum<{
307
+ content: "content";
308
+ files: "files";
309
+ web: "web";
310
+ }>>;
311
+ path: z.ZodOptional<z.ZodString>;
312
+ glob: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strict>, z.ZodObject<{
314
+ kind: z.ZodLiteral<"fileChange">;
315
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
316
+ op: z.ZodEnum<{
317
+ add: "add";
318
+ update: "update";
319
+ delete: "delete";
320
+ unspecified: "unspecified";
321
+ }>;
322
+ path: z.ZodString;
323
+ diffstat: z.ZodOptional<z.ZodObject<{
324
+ added: z.ZodNumber;
325
+ removed: z.ZodNumber;
326
+ }, z.core.$strict>>;
327
+ }, z.core.$strict>>>;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ kind: z.ZodLiteral<"other">;
330
+ display: z.ZodString;
331
+ }, z.core.$strict>]>;
332
+ state: z.ZodLiteral<"active">;
333
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ kind: z.ZodLiteral<"tool">;
336
+ sequence: z.ZodNumber;
337
+ turnSequence: z.ZodNumber;
338
+ at: z.ZodString;
339
+ completedAt: z.ZodOptional<z.ZodString>;
340
+ durationMs: z.ZodOptional<z.ZodNumber>;
341
+ name: z.ZodString;
342
+ call: z.ZodUnion<readonly [z.ZodObject<{
343
+ kind: z.ZodLiteral<"run">;
344
+ command: z.ZodString;
345
+ }, z.core.$strict>, z.ZodObject<{
346
+ kind: z.ZodLiteral<"read">;
347
+ path: z.ZodString;
348
+ offset: z.ZodOptional<z.ZodNumber>;
349
+ limit: z.ZodOptional<z.ZodNumber>;
350
+ }, z.core.$strict>, z.ZodObject<{
351
+ kind: z.ZodLiteral<"search">;
352
+ query: z.ZodString;
353
+ scope: z.ZodOptional<z.ZodEnum<{
354
+ content: "content";
355
+ files: "files";
356
+ web: "web";
357
+ }>>;
358
+ path: z.ZodOptional<z.ZodString>;
359
+ glob: z.ZodOptional<z.ZodString>;
360
+ }, z.core.$strict>, z.ZodObject<{
361
+ kind: z.ZodLiteral<"fileChange">;
362
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
363
+ op: z.ZodEnum<{
364
+ add: "add";
365
+ update: "update";
366
+ delete: "delete";
367
+ unspecified: "unspecified";
368
+ }>;
369
+ path: z.ZodString;
370
+ diffstat: z.ZodOptional<z.ZodObject<{
371
+ added: z.ZodNumber;
372
+ removed: z.ZodNumber;
373
+ }, z.core.$strict>>;
374
+ }, z.core.$strict>>>;
375
+ }, z.core.$strict>, z.ZodObject<{
376
+ kind: z.ZodLiteral<"other">;
377
+ display: z.ZodString;
378
+ }, z.core.$strict>]>;
379
+ state: z.ZodObject<{
380
+ status: z.ZodEnum<{
381
+ error: "error";
382
+ ok: "ok";
383
+ }>;
384
+ message: z.ZodOptional<z.ZodString>;
385
+ exitCode: z.ZodOptional<z.ZodNumber>;
386
+ }, z.core.$strict>;
387
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
388
+ }, z.core.$strict>]>;
389
+ declare const idleSnapshotRowSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
390
+ kind: z.ZodLiteral<"call">;
391
+ sequence: z.ZodNumber;
392
+ turnSequence: z.ZodNumber;
393
+ at: z.ZodString;
394
+ text: z.ZodString;
395
+ }, z.core.$strict>, z.ZodObject<{
396
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
397
+ sequence: z.ZodNumber;
398
+ turnSequence: z.ZodNumber;
399
+ at: z.ZodString;
400
+ text: z.ZodString;
401
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
402
+ }, z.core.$strict>, z.ZodObject<{
403
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
404
+ sequence: z.ZodNumber;
405
+ turnSequence: z.ZodNumber;
406
+ at: z.ZodString;
407
+ text: z.ZodString;
408
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
409
+ }, z.core.$strict>, z.ZodObject<{
410
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
411
+ sequence: z.ZodNumber;
412
+ turnSequence: z.ZodNumber;
413
+ at: z.ZodString;
414
+ text: z.ZodString;
415
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
416
+ }, z.core.$strict>, z.ZodObject<{
417
+ kind: z.ZodLiteral<"tell">;
418
+ sequence: z.ZodNumber;
419
+ at: z.ZodString;
420
+ tellId: z.ZodString;
421
+ text: z.ZodString;
422
+ state: z.ZodEnum<{
423
+ pending: "pending";
424
+ told: "told";
425
+ }>;
426
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
427
+ deliveredAt: z.ZodString;
428
+ route: z.ZodEnum<{
429
+ live: "live";
430
+ launch: "launch";
431
+ }>;
432
+ turnSequence: z.ZodNumber;
433
+ receipt: z.ZodOptional<z.ZodEnum<{
434
+ required: "required";
435
+ unavailable: "unavailable";
436
+ }>>;
437
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
438
+ turnSequence: number;
439
+ route: "launch" | "live";
440
+ receipt?: "unavailable" | "required";
441
+ deliveredAt: string;
442
+ }>, {
443
+ deliveredAt: string;
444
+ route: "live" | "launch";
445
+ turnSequence: number;
446
+ receipt?: "required" | "unavailable" | undefined;
447
+ }>>>>;
448
+ }, z.core.$strict>]>, z.ZodObject<{
449
+ kind: z.ZodLiteral<"tool">;
450
+ sequence: z.ZodNumber;
451
+ turnSequence: z.ZodNumber;
452
+ at: z.ZodString;
453
+ completedAt: z.ZodOptional<z.ZodString>;
454
+ durationMs: z.ZodOptional<z.ZodNumber>;
455
+ name: z.ZodString;
456
+ call: z.ZodUnion<readonly [z.ZodObject<{
457
+ kind: z.ZodLiteral<"run">;
458
+ command: z.ZodString;
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ kind: z.ZodLiteral<"read">;
461
+ path: z.ZodString;
462
+ offset: z.ZodOptional<z.ZodNumber>;
463
+ limit: z.ZodOptional<z.ZodNumber>;
464
+ }, z.core.$strict>, z.ZodObject<{
465
+ kind: z.ZodLiteral<"search">;
466
+ query: z.ZodString;
467
+ scope: z.ZodOptional<z.ZodEnum<{
468
+ content: "content";
469
+ files: "files";
470
+ web: "web";
471
+ }>>;
472
+ path: z.ZodOptional<z.ZodString>;
473
+ glob: z.ZodOptional<z.ZodString>;
474
+ }, z.core.$strict>, z.ZodObject<{
475
+ kind: z.ZodLiteral<"fileChange">;
476
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
477
+ op: z.ZodEnum<{
478
+ add: "add";
479
+ update: "update";
480
+ delete: "delete";
481
+ unspecified: "unspecified";
482
+ }>;
483
+ path: z.ZodString;
484
+ diffstat: z.ZodOptional<z.ZodObject<{
485
+ added: z.ZodNumber;
486
+ removed: z.ZodNumber;
487
+ }, z.core.$strict>>;
488
+ }, z.core.$strict>>>;
489
+ }, z.core.$strict>, z.ZodObject<{
490
+ kind: z.ZodLiteral<"other">;
491
+ display: z.ZodString;
492
+ }, z.core.$strict>]>;
493
+ state: z.ZodObject<{
494
+ status: z.ZodEnum<{
495
+ error: "error";
496
+ ok: "ok";
497
+ }>;
498
+ message: z.ZodOptional<z.ZodString>;
499
+ exitCode: z.ZodOptional<z.ZodNumber>;
500
+ }, z.core.$strict>;
501
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
502
+ }, z.core.$strict>]>;
503
+ declare const snapshotEntrySchema: <Row extends z.ZodType>(row: Row) => z.ZodUnion<readonly [z.ZodObject<{
504
+ kind: z.ZodLiteral<"gap">;
505
+ count: z.ZodNumber;
506
+ }, z.core.$strict>, z.ZodObject<{
507
+ kind: z.ZodLiteral<"row">;
508
+ row: Row;
509
+ }, z.core.$strict>]>;
510
+ declare const reportedFileChangeSchema: z.ZodObject<{
511
+ sequence: z.ZodNumber;
512
+ at: z.ZodString;
513
+ op: z.ZodEnum<{
514
+ add: "add";
515
+ update: "update";
516
+ delete: "delete";
517
+ unspecified: "unspecified";
518
+ }>;
519
+ path: z.ZodString;
520
+ diffstat: z.ZodOptional<z.ZodObject<{
521
+ added: z.ZodNumber;
522
+ removed: z.ZodNumber;
523
+ }, z.core.$strict>>;
524
+ }, z.core.$strict>;
525
+ export declare const activitySnapshotSchema: z.ZodUnion<readonly [z.ZodObject<{
526
+ reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
527
+ sequence: z.ZodNumber;
528
+ at: z.ZodString;
529
+ op: z.ZodEnum<{
530
+ add: "add";
531
+ update: "update";
532
+ delete: "delete";
533
+ unspecified: "unspecified";
534
+ }>;
535
+ path: z.ZodString;
536
+ diffstat: z.ZodOptional<z.ZodObject<{
537
+ added: z.ZodNumber;
538
+ removed: z.ZodNumber;
539
+ }, z.core.$strict>>;
540
+ }, z.core.$strict>>>;
541
+ reportedChangesOmitted: z.ZodNumber;
542
+ kind: z.ZodLiteral<"unborn">;
543
+ entries: z.ZodReadonly<z.ZodTuple<[], null>>;
544
+ omitted: z.ZodLiteral<0>;
545
+ }, z.core.$strict>, z.ZodObject<{
546
+ reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
547
+ sequence: z.ZodNumber;
548
+ at: z.ZodString;
549
+ op: z.ZodEnum<{
550
+ add: "add";
551
+ update: "update";
552
+ delete: "delete";
553
+ unspecified: "unspecified";
554
+ }>;
555
+ path: z.ZodString;
556
+ diffstat: z.ZodOptional<z.ZodObject<{
557
+ added: z.ZodNumber;
558
+ removed: z.ZodNumber;
559
+ }, z.core.$strict>>;
560
+ }, z.core.$strict>>>;
561
+ reportedChangesOmitted: z.ZodNumber;
562
+ kind: z.ZodLiteral<"open">;
563
+ turn: z.ZodObject<{
564
+ kind: z.ZodLiteral<"turn">;
565
+ sequence: z.ZodNumber;
566
+ turnSequence: z.ZodNumber;
567
+ bodySequence: z.ZodNumber;
568
+ at: z.ZodString;
569
+ }, z.core.$strict>;
570
+ entries: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
571
+ kind: z.ZodLiteral<"gap">;
572
+ count: z.ZodNumber;
573
+ }, z.core.$strict>, z.ZodObject<{
574
+ kind: z.ZodLiteral<"row">;
575
+ row: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
576
+ kind: z.ZodLiteral<"call">;
577
+ sequence: z.ZodNumber;
578
+ turnSequence: z.ZodNumber;
579
+ at: z.ZodString;
580
+ text: z.ZodString;
581
+ }, z.core.$strict>, z.ZodObject<{
582
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
583
+ sequence: z.ZodNumber;
584
+ turnSequence: z.ZodNumber;
585
+ at: z.ZodString;
586
+ text: z.ZodString;
587
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
588
+ }, z.core.$strict>, z.ZodObject<{
589
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
590
+ sequence: z.ZodNumber;
591
+ turnSequence: z.ZodNumber;
592
+ at: z.ZodString;
593
+ text: z.ZodString;
594
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
595
+ }, z.core.$strict>, z.ZodObject<{
596
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
597
+ sequence: z.ZodNumber;
598
+ turnSequence: z.ZodNumber;
599
+ at: z.ZodString;
600
+ text: z.ZodString;
601
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
602
+ }, z.core.$strict>, z.ZodObject<{
603
+ kind: z.ZodLiteral<"tell">;
604
+ sequence: z.ZodNumber;
605
+ at: z.ZodString;
606
+ tellId: z.ZodString;
607
+ text: z.ZodString;
608
+ state: z.ZodEnum<{
609
+ pending: "pending";
610
+ told: "told";
611
+ }>;
612
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
613
+ deliveredAt: z.ZodString;
614
+ route: z.ZodEnum<{
615
+ live: "live";
616
+ launch: "launch";
617
+ }>;
618
+ turnSequence: z.ZodNumber;
619
+ receipt: z.ZodOptional<z.ZodEnum<{
620
+ required: "required";
621
+ unavailable: "unavailable";
622
+ }>>;
623
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
624
+ turnSequence: number;
625
+ route: "launch" | "live";
626
+ receipt?: "unavailable" | "required";
627
+ deliveredAt: string;
628
+ }>, {
629
+ deliveredAt: string;
630
+ route: "live" | "launch";
631
+ turnSequence: number;
632
+ receipt?: "required" | "unavailable" | undefined;
633
+ }>>>>;
634
+ }, z.core.$strict>]>, z.ZodObject<{
635
+ kind: z.ZodLiteral<"tool">;
636
+ sequence: z.ZodNumber;
637
+ turnSequence: z.ZodNumber;
638
+ at: z.ZodString;
639
+ name: z.ZodString;
640
+ call: z.ZodUnion<readonly [z.ZodObject<{
641
+ kind: z.ZodLiteral<"run">;
642
+ command: z.ZodString;
643
+ }, z.core.$strict>, z.ZodObject<{
644
+ kind: z.ZodLiteral<"read">;
645
+ path: z.ZodString;
646
+ offset: z.ZodOptional<z.ZodNumber>;
647
+ limit: z.ZodOptional<z.ZodNumber>;
648
+ }, z.core.$strict>, z.ZodObject<{
649
+ kind: z.ZodLiteral<"search">;
650
+ query: z.ZodString;
651
+ scope: z.ZodOptional<z.ZodEnum<{
652
+ content: "content";
653
+ files: "files";
654
+ web: "web";
655
+ }>>;
656
+ path: z.ZodOptional<z.ZodString>;
657
+ glob: z.ZodOptional<z.ZodString>;
658
+ }, z.core.$strict>, z.ZodObject<{
659
+ kind: z.ZodLiteral<"fileChange">;
660
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
661
+ op: z.ZodEnum<{
662
+ add: "add";
663
+ update: "update";
664
+ delete: "delete";
665
+ unspecified: "unspecified";
666
+ }>;
667
+ path: z.ZodString;
668
+ diffstat: z.ZodOptional<z.ZodObject<{
669
+ added: z.ZodNumber;
670
+ removed: z.ZodNumber;
671
+ }, z.core.$strict>>;
672
+ }, z.core.$strict>>>;
673
+ }, z.core.$strict>, z.ZodObject<{
674
+ kind: z.ZodLiteral<"other">;
675
+ display: z.ZodString;
676
+ }, z.core.$strict>]>;
677
+ state: z.ZodLiteral<"active">;
678
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
679
+ }, z.core.$strict>, z.ZodObject<{
680
+ kind: z.ZodLiteral<"tool">;
681
+ sequence: z.ZodNumber;
682
+ turnSequence: z.ZodNumber;
683
+ at: z.ZodString;
684
+ completedAt: z.ZodOptional<z.ZodString>;
685
+ durationMs: z.ZodOptional<z.ZodNumber>;
686
+ name: z.ZodString;
687
+ call: z.ZodUnion<readonly [z.ZodObject<{
688
+ kind: z.ZodLiteral<"run">;
689
+ command: z.ZodString;
690
+ }, z.core.$strict>, z.ZodObject<{
691
+ kind: z.ZodLiteral<"read">;
692
+ path: z.ZodString;
693
+ offset: z.ZodOptional<z.ZodNumber>;
694
+ limit: z.ZodOptional<z.ZodNumber>;
695
+ }, z.core.$strict>, z.ZodObject<{
696
+ kind: z.ZodLiteral<"search">;
697
+ query: z.ZodString;
698
+ scope: z.ZodOptional<z.ZodEnum<{
699
+ content: "content";
700
+ files: "files";
701
+ web: "web";
702
+ }>>;
703
+ path: z.ZodOptional<z.ZodString>;
704
+ glob: z.ZodOptional<z.ZodString>;
705
+ }, z.core.$strict>, z.ZodObject<{
706
+ kind: z.ZodLiteral<"fileChange">;
707
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
708
+ op: z.ZodEnum<{
709
+ add: "add";
710
+ update: "update";
711
+ delete: "delete";
712
+ unspecified: "unspecified";
713
+ }>;
714
+ path: z.ZodString;
715
+ diffstat: z.ZodOptional<z.ZodObject<{
716
+ added: z.ZodNumber;
717
+ removed: z.ZodNumber;
718
+ }, z.core.$strict>>;
719
+ }, z.core.$strict>>>;
720
+ }, z.core.$strict>, z.ZodObject<{
721
+ kind: z.ZodLiteral<"other">;
722
+ display: z.ZodString;
723
+ }, z.core.$strict>]>;
724
+ state: z.ZodObject<{
725
+ status: z.ZodEnum<{
726
+ error: "error";
727
+ ok: "ok";
728
+ }>;
729
+ message: z.ZodOptional<z.ZodString>;
730
+ exitCode: z.ZodOptional<z.ZodNumber>;
731
+ }, z.core.$strict>;
732
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
733
+ }, z.core.$strict>]>;
734
+ }, z.core.$strict>]>>>;
735
+ omitted: z.ZodNumber;
736
+ }, z.core.$strict>, z.ZodObject<{
737
+ reportedChanges: z.ZodReadonly<z.ZodArray<z.ZodObject<{
738
+ sequence: z.ZodNumber;
739
+ at: z.ZodString;
740
+ op: z.ZodEnum<{
741
+ add: "add";
742
+ update: "update";
743
+ delete: "delete";
744
+ unspecified: "unspecified";
745
+ }>;
746
+ path: z.ZodString;
747
+ diffstat: z.ZodOptional<z.ZodObject<{
748
+ added: z.ZodNumber;
749
+ removed: z.ZodNumber;
750
+ }, z.core.$strict>>;
751
+ }, z.core.$strict>>>;
752
+ reportedChangesOmitted: z.ZodNumber;
753
+ kind: z.ZodLiteral<"idle">;
754
+ outcome: z.ZodOptional<z.ZodObject<{
755
+ kind: z.ZodLiteral<"outcome">;
756
+ sequence: z.ZodNumber;
757
+ turnSequence: z.ZodNumber;
758
+ at: z.ZodString;
759
+ outcome: z.ZodUnion<readonly [z.ZodObject<{
760
+ kind: z.ZodLiteral<"answered">;
761
+ historyId: z.ZodString;
762
+ answer: z.ZodString;
763
+ }, z.core.$strict>, z.ZodObject<{
764
+ kind: z.ZodLiteral<"failed">;
765
+ historyId: z.ZodString;
766
+ diagnostic: z.ZodString;
767
+ }, z.core.$strict>]>;
768
+ }, z.core.$strict>>;
769
+ entries: z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
770
+ kind: z.ZodLiteral<"gap">;
771
+ count: z.ZodNumber;
772
+ }, z.core.$strict>, z.ZodObject<{
773
+ kind: z.ZodLiteral<"row">;
774
+ row: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
775
+ kind: z.ZodLiteral<"call">;
776
+ sequence: z.ZodNumber;
777
+ turnSequence: z.ZodNumber;
778
+ at: z.ZodString;
779
+ text: z.ZodString;
780
+ }, z.core.$strict>, z.ZodObject<{
781
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
782
+ sequence: z.ZodNumber;
783
+ turnSequence: z.ZodNumber;
784
+ at: z.ZodString;
785
+ text: z.ZodString;
786
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
787
+ }, z.core.$strict>, z.ZodObject<{
788
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
789
+ sequence: z.ZodNumber;
790
+ turnSequence: z.ZodNumber;
791
+ at: z.ZodString;
792
+ text: z.ZodString;
793
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
794
+ }, z.core.$strict>, z.ZodObject<{
795
+ kind: z.ZodLiteral<"note" | "thought" | "said">;
796
+ sequence: z.ZodNumber;
797
+ turnSequence: z.ZodNumber;
798
+ at: z.ZodString;
799
+ text: z.ZodString;
800
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
801
+ }, z.core.$strict>, z.ZodObject<{
802
+ kind: z.ZodLiteral<"tell">;
803
+ sequence: z.ZodNumber;
804
+ at: z.ZodString;
805
+ tellId: z.ZodString;
806
+ text: z.ZodString;
807
+ state: z.ZodEnum<{
808
+ pending: "pending";
809
+ told: "told";
810
+ }>;
811
+ deliveries: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodObject<{
812
+ deliveredAt: z.ZodString;
813
+ route: z.ZodEnum<{
814
+ live: "live";
815
+ launch: "launch";
816
+ }>;
817
+ turnSequence: z.ZodNumber;
818
+ receipt: z.ZodOptional<z.ZodEnum<{
819
+ required: "required";
820
+ unavailable: "unavailable";
821
+ }>>;
822
+ }, z.core.$strict>, z.ZodTransform<Readonly<{
823
+ turnSequence: number;
824
+ route: "launch" | "live";
825
+ receipt?: "unavailable" | "required";
826
+ deliveredAt: string;
827
+ }>, {
828
+ deliveredAt: string;
829
+ route: "live" | "launch";
830
+ turnSequence: number;
831
+ receipt?: "required" | "unavailable" | undefined;
832
+ }>>>>;
833
+ }, z.core.$strict>]>, z.ZodObject<{
834
+ kind: z.ZodLiteral<"tool">;
835
+ sequence: z.ZodNumber;
836
+ turnSequence: z.ZodNumber;
837
+ at: z.ZodString;
838
+ completedAt: z.ZodOptional<z.ZodString>;
839
+ durationMs: z.ZodOptional<z.ZodNumber>;
840
+ name: z.ZodString;
841
+ call: z.ZodUnion<readonly [z.ZodObject<{
842
+ kind: z.ZodLiteral<"run">;
843
+ command: z.ZodString;
844
+ }, z.core.$strict>, z.ZodObject<{
845
+ kind: z.ZodLiteral<"read">;
846
+ path: z.ZodString;
847
+ offset: z.ZodOptional<z.ZodNumber>;
848
+ limit: z.ZodOptional<z.ZodNumber>;
849
+ }, z.core.$strict>, z.ZodObject<{
850
+ kind: z.ZodLiteral<"search">;
851
+ query: z.ZodString;
852
+ scope: z.ZodOptional<z.ZodEnum<{
853
+ content: "content";
854
+ files: "files";
855
+ web: "web";
856
+ }>>;
857
+ path: z.ZodOptional<z.ZodString>;
858
+ glob: z.ZodOptional<z.ZodString>;
859
+ }, z.core.$strict>, z.ZodObject<{
860
+ kind: z.ZodLiteral<"fileChange">;
861
+ changes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
862
+ op: z.ZodEnum<{
863
+ add: "add";
864
+ update: "update";
865
+ delete: "delete";
866
+ unspecified: "unspecified";
867
+ }>;
868
+ path: z.ZodString;
869
+ diffstat: z.ZodOptional<z.ZodObject<{
870
+ added: z.ZodNumber;
871
+ removed: z.ZodNumber;
872
+ }, z.core.$strict>>;
873
+ }, z.core.$strict>>>;
874
+ }, z.core.$strict>, z.ZodObject<{
875
+ kind: z.ZodLiteral<"other">;
876
+ display: z.ZodString;
877
+ }, z.core.$strict>]>;
878
+ state: z.ZodObject<{
879
+ status: z.ZodEnum<{
880
+ error: "error";
881
+ ok: "ok";
882
+ }>;
883
+ message: z.ZodOptional<z.ZodString>;
884
+ exitCode: z.ZodOptional<z.ZodNumber>;
885
+ }, z.core.$strict>;
886
+ truncated: z.ZodOptional<z.ZodLiteral<true>>;
887
+ }, z.core.$strict>]>;
888
+ }, z.core.$strict>]>>>;
889
+ omitted: z.ZodNumber;
890
+ }, z.core.$strict>]>;
891
+ export type TurnOutcome = z.infer<typeof outcomeSchema>;
892
+ export type TurnStartRow = z.infer<typeof turnRowSchema>;
893
+ type CallRow = z.infer<typeof callRowSchema>;
894
+ type SaidRow = z.infer<ReturnType<typeof textRowSchema>>;
895
+ type ThoughtRow = z.infer<ReturnType<typeof textRowSchema>>;
896
+ type NoteRow = z.infer<ReturnType<typeof textRowSchema>>;
50
897
  type TurnNarrationRow = CallRow | SaidRow | ThoughtRow | NoteRow;
51
- export type TellRow = Readonly<{
52
- kind: "tell";
53
- sequence: number;
54
- at: string;
55
- tellId: string;
56
- text: string;
57
- state: TellFact["state"];
58
- deliveries: readonly TellDelivery[];
59
- }>;
60
- export type OutcomeRow = Readonly<{
61
- kind: "outcome";
62
- sequence: number;
63
- turnSequence: number;
64
- at: string;
65
- outcome: TurnOutcome;
66
- }>;
67
- export type ActiveToolRow = Readonly<{
68
- kind: "tool";
69
- sequence: number;
70
- turnSequence: number;
71
- at: string;
72
- name: string;
73
- call: ToolCall;
74
- state: "active";
75
- truncated?: true;
76
- }>;
77
- export type CompletedToolRow = Readonly<{
78
- kind: "tool";
79
- sequence: number;
80
- turnSequence: number;
81
- at: string;
82
- completedAt?: string;
83
- durationMs?: number;
84
- name: string;
85
- call: ToolCall;
86
- state: ToolResult;
87
- truncated?: true;
88
- }>;
89
- export type UnsettledToolRow = Readonly<{
90
- kind: "tool";
91
- sequence: number;
92
- turnSequence: number;
93
- at: string;
94
- name: string;
95
- call: ToolCall;
96
- state: "unsettled";
97
- truncated?: true;
98
- }>;
898
+ export type { TellRow } from "./heart/facts.js";
899
+ export type OutcomeRow = z.infer<typeof outcomeRowSchema>;
900
+ export type ActiveToolRow = z.infer<typeof activeToolRowSchema>;
901
+ export type CompletedToolRow = z.infer<typeof completedToolRowSchema>;
902
+ export type UnsettledToolRow = z.infer<typeof unsettledToolRowSchema>;
99
903
  export type OpenTurnRow = TurnNarrationRow | ActiveToolRow | CompletedToolRow;
100
904
  export type ClosedTurnRow = TurnNarrationRow | UnsettledToolRow | CompletedToolRow;
101
905
  export type OpenTurn = Readonly<{
@@ -111,47 +915,13 @@ export type ClosedTurn = Readonly<{
111
915
  }>;
112
916
  export type ProjectedTurn = OpenTurn | ClosedTurn;
113
917
  export type ActivityRow = TurnStartRow | OpenTurnRow | ClosedTurnRow | TellRow | OutcomeRow;
114
- type SnapshotFactRow = TurnNarrationRow | TellRow;
115
- export type OpenSnapshotRow = SnapshotFactRow | ActiveToolRow | CompletedToolRow;
116
- export type IdleSnapshotRow = SnapshotFactRow | CompletedToolRow;
918
+ export type OpenSnapshotRow = z.infer<typeof openSnapshotRowSchema>;
919
+ export type IdleSnapshotRow = z.infer<typeof idleSnapshotRowSchema>;
117
920
  export type SnapshotRow = OpenSnapshotRow | IdleSnapshotRow;
118
- export type ActivitySnapshotEntry<Row extends SnapshotRow = SnapshotRow> = Readonly<{
119
- kind: "row";
120
- row: Row;
121
- }> | Readonly<{
122
- kind: "gap";
123
- count: number;
124
- }>;
125
- export type ReportedFileChange = Readonly<{
126
- sequence: number;
127
- at: string;
128
- op: "add" | "update" | "delete" | "unspecified";
129
- path: string;
130
- diffstat?: Readonly<{
131
- added: number;
132
- removed: number;
133
- }>;
134
- }>;
135
- type ReportedChangeSummary = Readonly<{
136
- reportedChanges: readonly ReportedFileChange[];
137
- reportedChangesOmitted: number;
138
- }>;
139
- export type Snapshot = Readonly<{
140
- kind: "unborn";
141
- entries: readonly [];
142
- omitted: 0;
143
- } & ReportedChangeSummary> | Readonly<{
144
- kind: "open";
145
- turn: TurnStartRow;
146
- entries: readonly ActivitySnapshotEntry<OpenSnapshotRow>[];
147
- omitted: number;
148
- } & ReportedChangeSummary> | Readonly<{
149
- kind: "idle";
150
- outcome?: OutcomeRow;
151
- entries: readonly ActivitySnapshotEntry<IdleSnapshotRow>[];
152
- omitted: number;
153
- } & ReportedChangeSummary>;
154
- export type ActivitySnapshot = Snapshot;
921
+ export type ActivitySnapshotEntry<Row extends SnapshotRow = SnapshotRow> = z.infer<ReturnType<typeof snapshotEntrySchema<z.ZodType<Row>>>>;
922
+ export type ReportedFileChange = z.infer<typeof reportedFileChangeSchema>;
923
+ export type Snapshot = z.infer<typeof activitySnapshotSchema>;
924
+ export type ActivitySnapshot = z.infer<typeof activitySnapshotSchema>;
155
925
  export type ActivityHistory = Readonly<{
156
926
  rows: readonly ActivityRow[];
157
927
  omitted: number;