@intentic/sandbox-contract 1.311.0 → 1.312.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +9 -4
  2. package/dist/chores/chores.js +6 -6
  3. package/dist/chores/chores.js.map +1 -1
  4. package/dist/chores/fix-deps.d.ts.map +1 -1
  5. package/dist/chores/fix-deps.js +3 -2
  6. package/dist/chores/fix-deps.js.map +1 -1
  7. package/dist/chores/prompt.d.ts.map +1 -1
  8. package/dist/chores/prompt.js +3 -2
  9. package/dist/chores/prompt.js.map +1 -1
  10. package/dist/contracts/accounts.contract.d.ts +12 -0
  11. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  12. package/dist/contracts/agents.contract.d.ts +601 -0
  13. package/dist/contracts/agents.contract.d.ts.map +1 -1
  14. package/dist/contracts/agents.contract.js +30 -2
  15. package/dist/contracts/agents.contract.js.map +1 -1
  16. package/dist/contracts/device.contract.d.ts +1 -0
  17. package/dist/contracts/device.contract.d.ts.map +1 -1
  18. package/dist/contracts/extensions.contract.d.ts +2 -0
  19. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  20. package/dist/contracts/offload.contract.d.ts +107 -0
  21. package/dist/contracts/offload.contract.d.ts.map +1 -0
  22. package/dist/contracts/offload.contract.js +53 -0
  23. package/dist/contracts/offload.contract.js.map +1 -0
  24. package/dist/contracts/ports.contract.d.ts +5 -0
  25. package/dist/contracts/ports.contract.d.ts.map +1 -1
  26. package/dist/contracts/runner.contract.d.ts +66 -0
  27. package/dist/contracts/runner.contract.d.ts.map +1 -1
  28. package/dist/contracts/runner.contract.js +3 -1
  29. package/dist/contracts/runner.contract.js.map +1 -1
  30. package/dist/contracts/settings.contract.d.ts +8 -0
  31. package/dist/contracts/settings.contract.d.ts.map +1 -1
  32. package/dist/contracts/system.contract.d.ts +95 -0
  33. package/dist/contracts/system.contract.d.ts.map +1 -1
  34. package/dist/contracts/translator.contract.d.ts +16 -0
  35. package/dist/contracts/translator.contract.d.ts.map +1 -1
  36. package/dist/contracts/workspace.contract.d.ts +146 -0
  37. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  38. package/dist/contracts/workspace.contract.js +40 -3
  39. package/dist/contracts/workspace.contract.js.map +1 -1
  40. package/dist/documents/conversions.d.ts +81 -0
  41. package/dist/documents/conversions.d.ts.map +1 -0
  42. package/dist/documents/conversions.js +213 -0
  43. package/dist/documents/conversions.js.map +1 -0
  44. package/dist/documents/index.d.ts +3 -0
  45. package/dist/documents/index.d.ts.map +1 -0
  46. package/dist/documents/index.js +3 -0
  47. package/dist/documents/index.js.map +1 -0
  48. package/dist/documents/passthrough.d.ts +13 -0
  49. package/dist/documents/passthrough.d.ts.map +1 -0
  50. package/dist/documents/passthrough.js +101 -0
  51. package/dist/documents/passthrough.js.map +1 -0
  52. package/dist/events/land-breakage.d.ts +3 -0
  53. package/dist/events/land-breakage.d.ts.map +1 -1
  54. package/dist/events/land-breakage.js +3 -0
  55. package/dist/events/land-breakage.js.map +1 -1
  56. package/dist/events/land-conflict.d.ts +3 -0
  57. package/dist/events/land-conflict.d.ts.map +1 -0
  58. package/dist/events/land-conflict.js +4 -0
  59. package/dist/events/land-conflict.js.map +1 -0
  60. package/dist/events/system-events.d.ts +66 -0
  61. package/dist/events/system-events.d.ts.map +1 -1
  62. package/dist/events/system-events.js +3 -1
  63. package/dist/events/system-events.js.map +1 -1
  64. package/dist/events/verify-nudge.d.ts.map +1 -1
  65. package/dist/events/verify-nudge.js.map +1 -1
  66. package/dist/front/generated/wire.d.ts +63 -0
  67. package/dist/front/generated/wire.d.ts.map +1 -1
  68. package/dist/front/terminal-frames.d.ts +17 -0
  69. package/dist/front/terminal-frames.d.ts.map +1 -0
  70. package/dist/front/terminal-frames.js +79 -0
  71. package/dist/front/terminal-frames.js.map +1 -0
  72. package/dist/ids/conversation-ids.d.ts +2 -0
  73. package/dist/ids/conversation-ids.d.ts.map +1 -1
  74. package/dist/ids/conversation-ids.js +2 -0
  75. package/dist/ids/conversation-ids.js.map +1 -1
  76. package/dist/index.d.ts +1002 -8
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +7 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/protocol/container-requirements.d.ts +0 -1
  81. package/dist/protocol/container-requirements.d.ts.map +1 -1
  82. package/dist/protocol/container-requirements.js +1 -2
  83. package/dist/protocol/container-requirements.js.map +1 -1
  84. package/dist/protocol/ingress-contract.d.ts +0 -11
  85. package/dist/protocol/ingress-contract.d.ts.map +1 -1
  86. package/dist/protocol/raw-routes.d.ts +36 -4
  87. package/dist/protocol/raw-routes.d.ts.map +1 -1
  88. package/dist/protocol/raw-routes.js +18 -13
  89. package/dist/protocol/raw-routes.js.map +1 -1
  90. package/dist/protocol/route-meta.d.ts +2 -0
  91. package/dist/protocol/route-meta.d.ts.map +1 -1
  92. package/dist/protocol/route-meta.js.map +1 -1
  93. package/dist/protocol/runner-protocol.d.ts +34 -0
  94. package/dist/protocol/runner-protocol.d.ts.map +1 -1
  95. package/dist/protocol/runner-protocol.js +33 -0
  96. package/dist/protocol/runner-protocol.js.map +1 -1
  97. package/dist/protocol/tunnel-lanes.d.ts +10 -0
  98. package/dist/protocol/tunnel-lanes.d.ts.map +1 -0
  99. package/dist/protocol/tunnel-lanes.js +16 -0
  100. package/dist/protocol/tunnel-lanes.js.map +1 -0
  101. package/dist/schemas/activity.d.ts.map +1 -1
  102. package/dist/schemas/activity.js.map +1 -1
  103. package/dist/schemas/agents.d.ts +73 -0
  104. package/dist/schemas/agents.d.ts.map +1 -1
  105. package/dist/schemas/agents.js +33 -2
  106. package/dist/schemas/agents.js.map +1 -1
  107. package/dist/schemas/automations.d.ts +19 -0
  108. package/dist/schemas/automations.d.ts.map +1 -1
  109. package/dist/schemas/devices.d.ts +2 -0
  110. package/dist/schemas/devices.d.ts.map +1 -1
  111. package/dist/schemas/extension-updates.d.ts +4 -0
  112. package/dist/schemas/extension-updates.d.ts.map +1 -1
  113. package/dist/schemas/git/git.d.ts +16 -0
  114. package/dist/schemas/git/git.d.ts.map +1 -1
  115. package/dist/schemas/git/git.js +1 -0
  116. package/dist/schemas/git/git.js.map +1 -1
  117. package/dist/schemas/hosts.d.ts +8 -0
  118. package/dist/schemas/hosts.d.ts.map +1 -1
  119. package/dist/schemas/hosts.js +3 -0
  120. package/dist/schemas/hosts.js.map +1 -1
  121. package/dist/schemas/metrics.d.ts +7 -0
  122. package/dist/schemas/metrics.d.ts.map +1 -1
  123. package/dist/schemas/metrics.js +1 -0
  124. package/dist/schemas/metrics.js.map +1 -1
  125. package/dist/schemas/offload.d.ts +62 -0
  126. package/dist/schemas/offload.d.ts.map +1 -0
  127. package/dist/schemas/offload.js +23 -0
  128. package/dist/schemas/offload.js.map +1 -0
  129. package/dist/schemas/personas.js +3 -3
  130. package/dist/schemas/personas.js.map +1 -1
  131. package/dist/schemas/ports.d.ts +10 -0
  132. package/dist/schemas/ports.d.ts.map +1 -1
  133. package/dist/schemas/ports.js +8 -0
  134. package/dist/schemas/ports.js.map +1 -1
  135. package/dist/schemas/providers/plan-limits.d.ts +29 -0
  136. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  137. package/dist/schemas/providers/plan-limits.js +7 -0
  138. package/dist/schemas/providers/plan-limits.js.map +1 -1
  139. package/dist/schemas/providers/provider-oauth.d.ts +12 -0
  140. package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
  141. package/dist/schemas/settings-history.d.ts +28 -0
  142. package/dist/schemas/settings-history.d.ts.map +1 -0
  143. package/dist/schemas/settings-history.js +39 -0
  144. package/dist/schemas/settings-history.js.map +1 -0
  145. package/dist/schemas/settings.d.ts +4 -0
  146. package/dist/schemas/settings.d.ts.map +1 -1
  147. package/dist/schemas/settings.js +10 -3
  148. package/dist/schemas/settings.js.map +1 -1
  149. package/dist/schemas/system.d.ts +24 -0
  150. package/dist/schemas/system.d.ts.map +1 -1
  151. package/dist/schemas/system.js +15 -0
  152. package/dist/schemas/system.js.map +1 -1
  153. package/dist/schemas/workspace/mainline.d.ts +371 -0
  154. package/dist/schemas/workspace/mainline.d.ts.map +1 -0
  155. package/dist/schemas/workspace/mainline.js +134 -0
  156. package/dist/schemas/workspace/mainline.js.map +1 -0
  157. package/dist/schemas/workspace/workspace-tree.d.ts +23 -0
  158. package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
  159. package/dist/schemas/workspace/workspace-tree.js +34 -0
  160. package/dist/schemas/workspace/workspace-tree.js.map +1 -1
  161. package/dist/state/definition.d.ts +20 -4
  162. package/dist/state/definition.d.ts.map +1 -1
  163. package/dist/state/definition.js.map +1 -1
  164. package/dist/state/history-state.d.ts.map +1 -1
  165. package/dist/state/history-state.js +5 -0
  166. package/dist/state/history-state.js.map +1 -1
  167. package/dist/state/runtime-state.d.ts +3 -0
  168. package/dist/state/runtime-state.d.ts.map +1 -1
  169. package/dist/state/runtime-state.js +1 -0
  170. package/dist/state/runtime-state.js.map +1 -1
  171. package/dist/state/workspace-state.d.ts +22 -1
  172. package/dist/state/workspace-state.d.ts.map +1 -1
  173. package/dist/state/workspace-state.js +27 -1
  174. package/dist/state/workspace-state.js.map +1 -1
  175. package/dist/text/transcript-fold.d.ts +1 -0
  176. package/dist/text/transcript-fold.d.ts.map +1 -1
  177. package/dist/text/transcript-fold.js +10 -1
  178. package/dist/text/transcript-fold.js.map +1 -1
  179. package/package.json +28 -27
  180. package/src/chores/chores.ts +6 -6
  181. package/src/chores/fix-deps.ts +3 -2
  182. package/src/chores/prompt.ts +3 -2
  183. package/src/contracts/agents.contract.ts +36 -1
  184. package/src/contracts/offload.contract.ts +60 -0
  185. package/src/contracts/runner.contract.ts +7 -1
  186. package/src/contracts/workspace.contract.ts +54 -2
  187. package/src/documents/conversions.ts +402 -0
  188. package/src/documents/index.ts +5 -0
  189. package/src/documents/passthrough.ts +139 -0
  190. package/src/events/land-breakage.ts +12 -0
  191. package/src/events/land-conflict.ts +12 -0
  192. package/src/events/system-events.ts +9 -3
  193. package/src/events/verify-nudge.ts +4 -3
  194. package/src/front/generated/wire.ts +35 -4
  195. package/src/front/terminal-frames.fixture.json +55 -0
  196. package/src/front/terminal-frames.test.ts +63 -0
  197. package/src/front/terminal-frames.ts +102 -0
  198. package/src/ids/conversation-ids.ts +7 -0
  199. package/src/index.ts +7 -1
  200. package/src/protocol/container-requirements.test.ts +2 -3
  201. package/src/protocol/container-requirements.ts +1 -7
  202. package/src/protocol/ingress-contract.fixture.json +77 -0
  203. package/src/protocol/ingress-contract.test.ts +18 -26
  204. package/src/protocol/ingress-contract.ts +3 -22
  205. package/src/protocol/raw-routes.ts +21 -14
  206. package/src/protocol/route-meta.ts +4 -0
  207. package/src/protocol/runner-protocol.ts +53 -0
  208. package/src/protocol/tunnel-lanes.json +136 -0
  209. package/src/protocol/tunnel-lanes.test.ts +30 -0
  210. package/src/protocol/tunnel-lanes.ts +32 -0
  211. package/src/schemas/activity.ts +3 -1
  212. package/src/schemas/agents.ts +52 -3
  213. package/src/schemas/git/git.ts +5 -0
  214. package/src/schemas/hosts.ts +8 -0
  215. package/src/schemas/metrics.ts +2 -0
  216. package/src/schemas/offload.ts +44 -0
  217. package/src/schemas/personas.ts +3 -3
  218. package/src/schemas/ports.ts +10 -0
  219. package/src/schemas/providers/plan-limits.ts +13 -0
  220. package/src/schemas/settings-history.ts +61 -0
  221. package/src/schemas/settings.ts +40 -19
  222. package/src/schemas/system.ts +17 -0
  223. package/src/schemas/workspace/mainline.ts +201 -0
  224. package/src/schemas/workspace/workspace-tree.ts +47 -0
  225. package/src/state/definition.ts +3 -2
  226. package/src/state/history-state.ts +15 -0
  227. package/src/state/runtime-state.ts +4 -0
  228. package/src/state/workspace-state.ts +35 -1
  229. package/src/text/transcript-fold.test.ts +33 -0
  230. package/src/text/transcript-fold.ts +14 -1
  231. package/dist/protocol/ingress-protocol.d.ts +0 -30
  232. package/dist/protocol/ingress-protocol.d.ts.map +0 -1
  233. package/dist/protocol/ingress-protocol.js +0 -300
  234. package/dist/protocol/ingress-protocol.js.map +0 -1
  235. package/dist/protocol/terminal-protocol.d.ts +0 -18
  236. package/dist/protocol/terminal-protocol.d.ts.map +0 -1
  237. package/dist/protocol/terminal-protocol.js +0 -2
  238. package/dist/protocol/terminal-protocol.js.map +0 -1
  239. package/dist/protocol/tunnel-heartbeat.d.ts +0 -19
  240. package/dist/protocol/tunnel-heartbeat.d.ts.map +0 -1
  241. package/dist/protocol/tunnel-heartbeat.js +0 -41
  242. package/dist/protocol/tunnel-heartbeat.js.map +0 -1
  243. package/src/protocol/ingress-protocol.test.ts +0 -579
  244. package/src/protocol/ingress-protocol.ts +0 -469
  245. package/src/protocol/terminal-protocol.ts +0 -13
  246. package/src/protocol/tunnel-heartbeat.test.ts +0 -75
  247. package/src/protocol/tunnel-heartbeat.ts +0 -67
@@ -0,0 +1,371 @@
1
+ import { z } from "zod";
2
+ export declare const MainlineLandSchema: z.ZodObject<{
3
+ conversationId: z.ZodString;
4
+ title: z.ZodOptional<z.ZodString>;
5
+ at: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ export type MainlineLand = z.infer<typeof MainlineLandSchema>;
8
+ export declare const MainlineRoutingKindSchema: z.ZodEnum<{
9
+ "fix-up": "fix-up";
10
+ held: "held";
11
+ original: "original";
12
+ reported: "reported";
13
+ resolved: "resolved";
14
+ spent: "spent";
15
+ waiting: "waiting";
16
+ }>;
17
+ export type MainlineRoutingKind = z.infer<typeof MainlineRoutingKindSchema>;
18
+ export declare const MainlineRoutingSchema: z.ZodObject<{
19
+ kind: z.ZodEnum<{
20
+ "fix-up": "fix-up";
21
+ held: "held";
22
+ original: "original";
23
+ reported: "reported";
24
+ resolved: "resolved";
25
+ spent: "spent";
26
+ waiting: "waiting";
27
+ }>;
28
+ conversationId: z.ZodOptional<z.ZodString>;
29
+ at: z.ZodNumber;
30
+ detail: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export type MainlineRouting = z.infer<typeof MainlineRoutingSchema>;
33
+ export declare const MAINLINE_FAILURES_KEPT = 30;
34
+ export declare const MainlineRunSchema: z.ZodObject<{
35
+ project: z.ZodString;
36
+ command: z.ZodString;
37
+ status: z.ZodEnum<{
38
+ green: "green";
39
+ red: "red";
40
+ }>;
41
+ startedAt: z.ZodNumber;
42
+ at: z.ZodNumber;
43
+ lands: z.ZodArray<z.ZodObject<{
44
+ conversationId: z.ZodString;
45
+ title: z.ZodOptional<z.ZodString>;
46
+ at: z.ZodNumber;
47
+ }, z.core.$strip>>;
48
+ failures: z.ZodArray<z.ZodString>;
49
+ failureCount: z.ZodNumber;
50
+ attempt: z.ZodNumber;
51
+ suspects: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ routing: z.ZodOptional<z.ZodObject<{
53
+ kind: z.ZodEnum<{
54
+ "fix-up": "fix-up";
55
+ held: "held";
56
+ original: "original";
57
+ reported: "reported";
58
+ resolved: "resolved";
59
+ spent: "spent";
60
+ waiting: "waiting";
61
+ }>;
62
+ conversationId: z.ZodOptional<z.ZodString>;
63
+ at: z.ZodNumber;
64
+ detail: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>>;
66
+ }, z.core.$strip>;
67
+ export type MainlineRun = z.infer<typeof MainlineRunSchema>;
68
+ export declare const MainlineProjectSchema: z.ZodObject<{
69
+ project: z.ZodString;
70
+ running: z.ZodOptional<z.ZodObject<{
71
+ command: z.ZodString;
72
+ startedAt: z.ZodNumber;
73
+ lands: z.ZodArray<z.ZodObject<{
74
+ conversationId: z.ZodString;
75
+ title: z.ZodOptional<z.ZodString>;
76
+ at: z.ZodNumber;
77
+ }, z.core.$strip>>;
78
+ on: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>>;
80
+ queued: z.ZodArray<z.ZodObject<{
81
+ conversationId: z.ZodString;
82
+ title: z.ZodOptional<z.ZodString>;
83
+ at: z.ZodNumber;
84
+ }, z.core.$strip>>;
85
+ last: z.ZodOptional<z.ZodObject<{
86
+ project: z.ZodString;
87
+ command: z.ZodString;
88
+ status: z.ZodEnum<{
89
+ green: "green";
90
+ red: "red";
91
+ }>;
92
+ startedAt: z.ZodNumber;
93
+ at: z.ZodNumber;
94
+ lands: z.ZodArray<z.ZodObject<{
95
+ conversationId: z.ZodString;
96
+ title: z.ZodOptional<z.ZodString>;
97
+ at: z.ZodNumber;
98
+ }, z.core.$strip>>;
99
+ failures: z.ZodArray<z.ZodString>;
100
+ failureCount: z.ZodNumber;
101
+ attempt: z.ZodNumber;
102
+ suspects: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ routing: z.ZodOptional<z.ZodObject<{
104
+ kind: z.ZodEnum<{
105
+ "fix-up": "fix-up";
106
+ held: "held";
107
+ original: "original";
108
+ reported: "reported";
109
+ resolved: "resolved";
110
+ spent: "spent";
111
+ waiting: "waiting";
112
+ }>;
113
+ conversationId: z.ZodOptional<z.ZodString>;
114
+ at: z.ZodNumber;
115
+ detail: z.ZodOptional<z.ZodString>;
116
+ }, z.core.$strip>>;
117
+ }, z.core.$strip>>;
118
+ redSince: z.ZodOptional<z.ZodNumber>;
119
+ }, z.core.$strip>;
120
+ export type MainlineProject = z.infer<typeof MainlineProjectSchema>;
121
+ export declare const PushFindingKindSchema: z.ZodEnum<{
122
+ check: "check";
123
+ lint: "lint";
124
+ lockstep: "lockstep";
125
+ ratchet: "ratchet";
126
+ rustfmt: "rustfmt";
127
+ }>;
128
+ export type PushFindingKind = z.infer<typeof PushFindingKindSchema>;
129
+ export declare const PushFindingStateSchema: z.ZodEnum<{
130
+ dismissed: "dismissed";
131
+ open: "open";
132
+ resolved: "resolved";
133
+ }>;
134
+ export type PushFindingState = z.infer<typeof PushFindingStateSchema>;
135
+ export declare const PushFindingSchema: z.ZodObject<{
136
+ id: z.ZodString;
137
+ kind: z.ZodEnum<{
138
+ check: "check";
139
+ lint: "lint";
140
+ lockstep: "lockstep";
141
+ ratchet: "ratchet";
142
+ rustfmt: "rustfmt";
143
+ }>;
144
+ check: z.ZodOptional<z.ZodString>;
145
+ gate: z.ZodOptional<z.ZodEnum<{
146
+ code: "code";
147
+ tidy: "tidy";
148
+ }>>;
149
+ text: z.ZodString;
150
+ command: z.ZodOptional<z.ZodString>;
151
+ commit: z.ZodOptional<z.ZodObject<{
152
+ sha: z.ZodString;
153
+ subject: z.ZodString;
154
+ }, z.core.$strip>>;
155
+ state: z.ZodEnum<{
156
+ dismissed: "dismissed";
157
+ open: "open";
158
+ resolved: "resolved";
159
+ }>;
160
+ settledAt: z.ZodOptional<z.ZodNumber>;
161
+ }, z.core.$strip>;
162
+ export type PushFinding = z.infer<typeof PushFindingSchema>;
163
+ export declare const MainlinePushSchema: z.ZodObject<{
164
+ project: z.ZodString;
165
+ id: z.ZodString;
166
+ at: z.ZodNumber;
167
+ remote: z.ZodOptional<z.ZodString>;
168
+ branch: z.ZodOptional<z.ZodString>;
169
+ base: z.ZodOptional<z.ZodString>;
170
+ head: z.ZodString;
171
+ commits: z.ZodNumber;
172
+ findings: z.ZodArray<z.ZodObject<{
173
+ id: z.ZodString;
174
+ kind: z.ZodEnum<{
175
+ check: "check";
176
+ lint: "lint";
177
+ lockstep: "lockstep";
178
+ ratchet: "ratchet";
179
+ rustfmt: "rustfmt";
180
+ }>;
181
+ check: z.ZodOptional<z.ZodString>;
182
+ gate: z.ZodOptional<z.ZodEnum<{
183
+ code: "code";
184
+ tidy: "tidy";
185
+ }>>;
186
+ text: z.ZodString;
187
+ command: z.ZodOptional<z.ZodString>;
188
+ commit: z.ZodOptional<z.ZodObject<{
189
+ sha: z.ZodString;
190
+ subject: z.ZodString;
191
+ }, z.core.$strip>>;
192
+ state: z.ZodEnum<{
193
+ dismissed: "dismissed";
194
+ open: "open";
195
+ resolved: "resolved";
196
+ }>;
197
+ settledAt: z.ZodOptional<z.ZodNumber>;
198
+ }, z.core.$strip>>;
199
+ measuredAt: z.ZodOptional<z.ZodNumber>;
200
+ }, z.core.$strip>;
201
+ export type MainlinePush = z.infer<typeof MainlinePushSchema>;
202
+ export declare const MainlineStatusSchema: z.ZodObject<{
203
+ projects: z.ZodArray<z.ZodObject<{
204
+ project: z.ZodString;
205
+ running: z.ZodOptional<z.ZodObject<{
206
+ command: z.ZodString;
207
+ startedAt: z.ZodNumber;
208
+ lands: z.ZodArray<z.ZodObject<{
209
+ conversationId: z.ZodString;
210
+ title: z.ZodOptional<z.ZodString>;
211
+ at: z.ZodNumber;
212
+ }, z.core.$strip>>;
213
+ on: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strip>>;
215
+ queued: z.ZodArray<z.ZodObject<{
216
+ conversationId: z.ZodString;
217
+ title: z.ZodOptional<z.ZodString>;
218
+ at: z.ZodNumber;
219
+ }, z.core.$strip>>;
220
+ last: z.ZodOptional<z.ZodObject<{
221
+ project: z.ZodString;
222
+ command: z.ZodString;
223
+ status: z.ZodEnum<{
224
+ green: "green";
225
+ red: "red";
226
+ }>;
227
+ startedAt: z.ZodNumber;
228
+ at: z.ZodNumber;
229
+ lands: z.ZodArray<z.ZodObject<{
230
+ conversationId: z.ZodString;
231
+ title: z.ZodOptional<z.ZodString>;
232
+ at: z.ZodNumber;
233
+ }, z.core.$strip>>;
234
+ failures: z.ZodArray<z.ZodString>;
235
+ failureCount: z.ZodNumber;
236
+ attempt: z.ZodNumber;
237
+ suspects: z.ZodOptional<z.ZodArray<z.ZodString>>;
238
+ routing: z.ZodOptional<z.ZodObject<{
239
+ kind: z.ZodEnum<{
240
+ "fix-up": "fix-up";
241
+ held: "held";
242
+ original: "original";
243
+ reported: "reported";
244
+ resolved: "resolved";
245
+ spent: "spent";
246
+ waiting: "waiting";
247
+ }>;
248
+ conversationId: z.ZodOptional<z.ZodString>;
249
+ at: z.ZodNumber;
250
+ detail: z.ZodOptional<z.ZodString>;
251
+ }, z.core.$strip>>;
252
+ }, z.core.$strip>>;
253
+ redSince: z.ZodOptional<z.ZodNumber>;
254
+ }, z.core.$strip>>;
255
+ recent: z.ZodArray<z.ZodObject<{
256
+ project: z.ZodString;
257
+ command: z.ZodString;
258
+ status: z.ZodEnum<{
259
+ green: "green";
260
+ red: "red";
261
+ }>;
262
+ startedAt: z.ZodNumber;
263
+ at: z.ZodNumber;
264
+ lands: z.ZodArray<z.ZodObject<{
265
+ conversationId: z.ZodString;
266
+ title: z.ZodOptional<z.ZodString>;
267
+ at: z.ZodNumber;
268
+ }, z.core.$strip>>;
269
+ failures: z.ZodArray<z.ZodString>;
270
+ failureCount: z.ZodNumber;
271
+ attempt: z.ZodNumber;
272
+ suspects: z.ZodOptional<z.ZodArray<z.ZodString>>;
273
+ routing: z.ZodOptional<z.ZodObject<{
274
+ kind: z.ZodEnum<{
275
+ "fix-up": "fix-up";
276
+ held: "held";
277
+ original: "original";
278
+ reported: "reported";
279
+ resolved: "resolved";
280
+ spent: "spent";
281
+ waiting: "waiting";
282
+ }>;
283
+ conversationId: z.ZodOptional<z.ZodString>;
284
+ at: z.ZodNumber;
285
+ detail: z.ZodOptional<z.ZodString>;
286
+ }, z.core.$strip>>;
287
+ }, z.core.$strip>>;
288
+ pushes: z.ZodOptional<z.ZodArray<z.ZodObject<{
289
+ project: z.ZodString;
290
+ id: z.ZodString;
291
+ at: z.ZodNumber;
292
+ remote: z.ZodOptional<z.ZodString>;
293
+ branch: z.ZodOptional<z.ZodString>;
294
+ base: z.ZodOptional<z.ZodString>;
295
+ head: z.ZodString;
296
+ commits: z.ZodNumber;
297
+ findings: z.ZodArray<z.ZodObject<{
298
+ id: z.ZodString;
299
+ kind: z.ZodEnum<{
300
+ check: "check";
301
+ lint: "lint";
302
+ lockstep: "lockstep";
303
+ ratchet: "ratchet";
304
+ rustfmt: "rustfmt";
305
+ }>;
306
+ check: z.ZodOptional<z.ZodString>;
307
+ gate: z.ZodOptional<z.ZodEnum<{
308
+ code: "code";
309
+ tidy: "tidy";
310
+ }>>;
311
+ text: z.ZodString;
312
+ command: z.ZodOptional<z.ZodString>;
313
+ commit: z.ZodOptional<z.ZodObject<{
314
+ sha: z.ZodString;
315
+ subject: z.ZodString;
316
+ }, z.core.$strip>>;
317
+ state: z.ZodEnum<{
318
+ dismissed: "dismissed";
319
+ open: "open";
320
+ resolved: "resolved";
321
+ }>;
322
+ settledAt: z.ZodOptional<z.ZodNumber>;
323
+ }, z.core.$strip>>;
324
+ measuredAt: z.ZodOptional<z.ZodNumber>;
325
+ }, z.core.$strip>>>;
326
+ }, z.core.$strip>;
327
+ export type MainlineStatus = z.infer<typeof MainlineStatusSchema>;
328
+ export declare const MainlinePushDismissSchema: z.ZodObject<{
329
+ project: z.ZodString;
330
+ ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
331
+ restore: z.ZodOptional<z.ZodBoolean>;
332
+ }, z.core.$strip>;
333
+ export type MainlinePushDismiss = z.infer<typeof MainlinePushDismissSchema>;
334
+ export declare const MainlinePushDismissResultSchema: z.ZodObject<{
335
+ changed: z.ZodNumber;
336
+ }, z.core.$strip>;
337
+ export declare const MainlinePushRecheckSchema: z.ZodObject<{
338
+ project: z.ZodString;
339
+ }, z.core.$strip>;
340
+ export declare const MainlinePushRecheckResultSchema: z.ZodObject<{
341
+ measured: z.ZodBoolean;
342
+ resolved: z.ZodNumber;
343
+ open: z.ZodNumber;
344
+ }, z.core.$strip>;
345
+ export type MainlinePushRecheckResult = z.infer<typeof MainlinePushRecheckResultSchema>;
346
+ export declare const MainlinePushFixSchema: z.ZodObject<{
347
+ project: z.ZodString;
348
+ pick: z.ZodOptional<z.ZodObject<{
349
+ agent: z.ZodString;
350
+ model: z.ZodString;
351
+ account: z.ZodOptional<z.ZodString>;
352
+ harness: z.ZodOptional<z.ZodEnum<{
353
+ "claude-code": "claude-code";
354
+ native: "native";
355
+ }>>;
356
+ effort: z.ZodOptional<z.ZodString>;
357
+ thinking: z.ZodOptional<z.ZodBoolean>;
358
+ fast: z.ZodOptional<z.ZodBoolean>;
359
+ }, z.core.$strip>>;
360
+ mode: z.ZodOptional<z.ZodEnum<{
361
+ continue: "continue";
362
+ "start-over": "start-over";
363
+ }>>;
364
+ }, z.core.$strip>;
365
+ export type MainlinePushFix = z.infer<typeof MainlinePushFixSchema>;
366
+ export declare const MainlinePushFixResultSchema: z.ZodObject<{
367
+ conversationId: z.ZodString;
368
+ }, z.core.$strip>;
369
+ export declare const oldestOpenPush: (pushes: readonly MainlinePush[], project: string) => MainlinePush | undefined;
370
+ export declare const pushFindingsFixBase: (pushes: readonly MainlinePush[], project: string) => string | undefined;
371
+ //# sourceMappingURL=mainline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainline.d.ts","sourceRoot":"","sources":["../../../src/schemas/workspace/mainline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,eAAO,MAAM,yBAAyB;;;;;;;;EAepC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAchC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAWpE,eAAO,MAAM,qBAAqB;;;;;;EAA8D,CAAC;AACjG,MAAM,MAAM,eAAe,G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qB,CAAC,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAKH,eAAO,MAAM,cAAc,WAAY,SAAS,YAAY,EAAE,WAAW,MAAM,KAAG,YAAY,GAAG,SACmB,CAAC;AAIrH,eAAO,MAAM,mBAAmB,WAAY,SAAS,YAAY,EAAE,WAAW,MAAM,KAAG,MAAM,GAAG,SAG/F,CAAC"}
@@ -0,0 +1,134 @@
1
+ import { z } from "zod";
2
+ import { pushFixConversationId } from "../../ids/conversation-ids.js";
3
+ import { AgentRunPickSchema } from "../agent.js";
4
+ export const MainlineLandSchema = z.object({
5
+ conversationId: z.string().describe("The conversation whose work landed."),
6
+ title: z.string().optional().describe("Its title when it landed."),
7
+ at: z.number().describe("When the land asked for the check, in milliseconds."),
8
+ });
9
+ export const MainlineRoutingKindSchema = z.enum([
10
+ "waiting",
11
+ "held",
12
+ "original",
13
+ "fix-up",
14
+ "reported",
15
+ "resolved",
16
+ "spent",
17
+ ]);
18
+ export const MainlineRoutingSchema = z.object({
19
+ kind: MainlineRoutingKindSchema.describe("What became of the failures."),
20
+ conversationId: z
21
+ .string()
22
+ .optional()
23
+ .describe("The conversation working on them (the original or a fresh one), or the one still working that the repair waits for."),
24
+ at: z.number().describe("When that was decided, in milliseconds."),
25
+ detail: z.string().optional().describe("One sentence on why, in the sandbox's words."),
26
+ });
27
+ export const MAINLINE_FAILURES_KEPT = 30;
28
+ export const MainlineRunSchema = z.object({
29
+ project: z.string().describe("Which project, by folder relative to the workspace. Empty is the workspace root."),
30
+ command: z.string().describe("What ran."),
31
+ status: z.enum(["green", "red"]).describe("How it ended."),
32
+ startedAt: z.number().describe("When it started, in milliseconds."),
33
+ at: z.number().describe("When it ended, in milliseconds."),
34
+ lands: z.array(MainlineLandSchema).describe("The lands it answered for, oldest first. Empty for a run no land asked for."),
35
+ failures: z.array(z.string()).describe(`The first failures it named, at most ${MAINLINE_FAILURES_KEPT}.`),
36
+ failureCount: z.number().describe("How many failures it named in all. Zero on a red run that wrote no list."),
37
+ attempt: z.number().describe("How many red runs in a row this is for the project; zero when green."),
38
+ suspects: z
39
+ .array(z.string())
40
+ .optional()
41
+ .describe("The conversations whose lands these failures were laid at, when any could be named."),
42
+ routing: MainlineRoutingSchema.optional().describe("What became of a red run's failures. Absent on green, and until it is decided."),
43
+ });
44
+ export const MainlineProjectSchema = z.object({
45
+ project: z.string().describe("Which project, by folder relative to the workspace. Empty is the workspace root."),
46
+ running: z
47
+ .object({
48
+ command: z.string().describe("What is running."),
49
+ startedAt: z.number().describe("When it started, in milliseconds."),
50
+ lands: z.array(MainlineLandSchema).describe("The lands it answers for."),
51
+ on: z.string().optional().describe("The runner it was sent to, on one of your machines. Absent when it runs in this sandbox."),
52
+ })
53
+ .optional()
54
+ .describe("The check running on it now, if any."),
55
+ queued: z.array(MainlineLandSchema).describe("Lands waiting for the next check, which will measure them together."),
56
+ last: MainlineRunSchema.optional().describe("Its most recent settled check."),
57
+ redSince: z.number().optional().describe("When its checks went red and stayed so, in milliseconds. Absent while green."),
58
+ });
59
+ export const PushFindingKindSchema = z.enum(["check", "lint", "ratchet", "lockstep", "rustfmt"]);
60
+ export const PushFindingStateSchema = z.enum([
61
+ "open",
62
+ "resolved",
63
+ "dismissed",
64
+ ]);
65
+ export const PushFindingSchema = z.object({
66
+ id: z.string().describe("Stable across pushes: the same problem found again is the same id."),
67
+ kind: PushFindingKindSchema.describe("What measured it."),
68
+ check: z.string().optional().describe("The check's own id, for a check's finding."),
69
+ gate: z
70
+ .enum(["code", "tidy"])
71
+ .optional()
72
+ .describe("For a check's finding: `code` means the tree fails the check whoever caused it; `tidy` means the push added this line."),
73
+ text: z.string().describe("The finding as the check printed it."),
74
+ command: z.string().optional().describe("The command that shows it again."),
75
+ commit: z
76
+ .object({ sha: z.string(), subject: z.string() })
77
+ .optional()
78
+ .describe("The newest pushed commit that touched the path the finding names, when it names one."),
79
+ state: PushFindingStateSchema,
80
+ settledAt: z.number().optional().describe("When it was resolved or dismissed, in milliseconds."),
81
+ });
82
+ export const MainlinePushSchema = z.object({
83
+ project: z.string().describe("Which project, by folder relative to the workspace. Empty is the workspace root."),
84
+ id: z.string().describe("The report's own id."),
85
+ at: z.number().describe("When the push check ran, in milliseconds."),
86
+ remote: z.string().optional().describe("The remote it was pushed to."),
87
+ branch: z.string().optional().describe("The branch it was pushed to."),
88
+ base: z.string().optional().describe("The commit the pushed range starts from; absent when the remote had nothing to compare with."),
89
+ head: z.string().describe("The commit that was pushed."),
90
+ commits: z.number().describe("How many commits the push carried."),
91
+ findings: z.array(PushFindingSchema).describe("What it found that this push brought in, open or not. Empty for a clean push."),
92
+ measuredAt: z.number().optional().describe("When its findings were last measured again, in milliseconds."),
93
+ });
94
+ export const MainlineStatusSchema = z.object({
95
+ projects: z.array(MainlineProjectSchema).describe("Every project a land has been checked in, or is waiting to be."),
96
+ recent: z.array(MainlineRunSchema).describe("The latest settled checks across every project, newest first."),
97
+ pushes: z
98
+ .array(MainlinePushSchema)
99
+ .optional()
100
+ .describe("The latest push checks across every project, newest first, with what each left behind. Absent from a daemon that records none."),
101
+ });
102
+ export const MainlinePushDismissSchema = z.object({
103
+ project: z.string().describe("Which project, by folder relative to the workspace."),
104
+ ids: z.array(z.string()).optional().describe("Which findings. Leave it out for every open one in the project."),
105
+ restore: z.boolean().optional().describe("Undo: open the named dismissed findings again."),
106
+ });
107
+ export const MainlinePushDismissResultSchema = z.object({
108
+ changed: z.number().describe("How many findings changed state."),
109
+ });
110
+ export const MainlinePushRecheckSchema = z.object({
111
+ project: z.string().describe("Which project, by folder relative to the workspace."),
112
+ });
113
+ export const MainlinePushRecheckResultSchema = z.object({
114
+ measured: z.boolean().describe("Whether the project could be measured at all; false leaves every finding as it was."),
115
+ resolved: z.number().describe("How many findings the measurement no longer saw."),
116
+ open: z.number().describe("How many are still open."),
117
+ });
118
+ export const MainlinePushFixSchema = z.object({
119
+ project: z.string().describe("Which project's open push findings to hand over, by folder relative to the workspace."),
120
+ pick: AgentRunPickSchema.describe("Which model to open the conversation on, when somebody chose one. Leave it out for the sandbox's own choice."),
121
+ mode: z
122
+ .enum(["continue", "start-over"])
123
+ .optional()
124
+ .describe("What to do about an attempt already made at these findings: `continue` carries on in it, `start-over` files it away and opens the next attempt. Leave it out for the plain press."),
125
+ });
126
+ export const MainlinePushFixResultSchema = z.object({
127
+ conversationId: z.string().describe("The conversation holding the findings. Open it to watch."),
128
+ });
129
+ export const oldestOpenPush = (pushes, project) => pushes.findLast((push) => push.project === project && push.findings.some((finding) => finding.state === "open"));
130
+ export const pushFindingsFixBase = (pushes, project) => {
131
+ const oldest = oldestOpenPush(pushes, project);
132
+ return oldest === undefined ? undefined : pushFixConversationId(project === "" ? "workspace" : project, `left:${oldest.head}`);
133
+ };
134
+ //# sourceMappingURL=mainline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainline.js","sourceRoot":"","sources":["../../../src/schemas/workspace/mainline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAClE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;CACjF,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAE5C,SAAS;IAET,MAAM;IAEN,UAAU;IAEV,QAAQ;IAER,UAAU;IAEV,UAAU;IAEV,OAAO;CACV,CAAC,CAAC;AAG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C,QAAQ,EAAE;SACV,QAAQ,CACL,mLAAmL,CACtL;CACR,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;CAClG,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAA+B,EAAE,OAAe,EAA4B,EAAE,CACzG,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC;AAIrH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAA+B,EAAE,OAAe,EAAsB,EAAE;IACxG,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AACnI,CAAC,CAAC"}
@@ -29,8 +29,19 @@ export declare const WorkspaceTreeSchema: z.ZodObject<{
29
29
  tree: z.ZodArray<z.ZodType<WorkspaceTreeEntry, unknown, z.core.$ZodTypeInternals<WorkspaceTreeEntry, unknown>>>;
30
30
  hidden: z.ZodNumber;
31
31
  barren: z.ZodArray<z.ZodString>;
32
+ generation: z.ZodOptional<z.ZodNumber>;
32
33
  }, z.core.$strip>;
33
34
  export type WorkspaceTree = z.infer<typeof WorkspaceTreeSchema>;
35
+ export declare const WorkspaceTreeDeltaSchema: z.ZodObject<{
36
+ from: z.ZodNumber;
37
+ generation: z.ZodNumber;
38
+ dirs: z.ZodArray<z.ZodObject<{
39
+ path: z.ZodString;
40
+ entries: z.ZodArray<z.ZodType<WorkspaceTreeEntry, unknown, z.core.$ZodTypeInternals<WorkspaceTreeEntry, unknown>>>;
41
+ }, z.core.$strip>>;
42
+ barren: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
+ }, z.core.$strip>;
44
+ export type WorkspaceTreeDelta = z.infer<typeof WorkspaceTreeDeltaSchema>;
34
45
  export declare const WorkspaceChildrenQuerySchema: z.ZodObject<{
35
46
  agent: z.ZodOptional<z.ZodString>;
36
47
  path: z.ZodString;
@@ -227,6 +238,18 @@ export declare const WorkspaceExtractSchema: z.ZodObject<{
227
238
  path: z.ZodString;
228
239
  }, z.core.$strip>;
229
240
  export type WorkspaceExtract = z.infer<typeof WorkspaceExtractSchema>;
241
+ export declare const WorkspaceDeletedSchema: z.ZodObject<{
242
+ ok: z.ZodLiteral<true>;
243
+ trashed: z.ZodOptional<z.ZodString>;
244
+ }, z.core.$strip>;
245
+ export type WorkspaceDeleted = z.infer<typeof WorkspaceDeletedSchema>;
246
+ export declare const WorkspaceRestoreSchema: z.ZodObject<{
247
+ trashed: z.ZodString;
248
+ }, z.core.$strip>;
249
+ export declare const WorkspaceRestoredSchema: z.ZodObject<{
250
+ path: z.ZodString;
251
+ }, z.core.$strip>;
252
+ export type WorkspaceRestored = z.infer<typeof WorkspaceRestoredSchema>;
230
253
  export declare const WorkspaceBucketSchema: z.ZodEnum<{
231
254
  archives: "archives";
232
255
  documents: "documents";
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-tree.d.ts","sourceRoot":"","sources":["../../../src/schemas/workspace/workspace-tree.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;iBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC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;;iBAEjC,CAAC;AAGH,eAAO,MAAM,kBAAkB;;iBAAoH,CAAC;AACpJ,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAGH,eAAO,MAAM,sBAAsB;;iBAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;iBAQjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AACH,eAAO,MAAM,uBAAuB;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAGxE,eAAO,MAAM,qBAAqB;;;;;;EAAsE,CAAC;AACzG,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;iBAYxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -36,6 +36,25 @@ export const WorkspaceTreeSchema = z.object({
36
36
  barren: z
37
37
  .array(z.string())
38
38
  .describe("Folders whose whole contents are empty folders, and nothing else. Complete for the workspace, however much of the tree above was listed, and ordered like the tree, so a parent comes before the branch below it."),
39
+ generation: z
40
+ .number()
41
+ .int()
42
+ .nonnegative()
43
+ .optional()
44
+ .describe("Which state of the shared tree this is; the changes that follow count from it. Absent for a conversation's own checkout, which is listed when asked and followed by no changes."),
45
+ });
46
+ export const WorkspaceTreeDeltaSchema = z.object({
47
+ from: z.number().int().nonnegative().describe("The generation this applies on top of. A reader holding any other fetches the tree afresh instead."),
48
+ generation: z.number().int().nonnegative().describe("The generation it leaves the tree at."),
49
+ dirs: z
50
+ .array(z.object({
51
+ path: z.string().describe("The folder, as a workspace path; empty for the workspace root."),
52
+ entries: z
53
+ .array(WorkspaceTreeEntrySchema)
54
+ .describe("Its entries now, without their contents: a folder whose own entries also changed comes as an item of its own."),
55
+ }))
56
+ .describe("Each folder that changed, parents before the folders inside them."),
57
+ barren: z.array(z.string()).optional().describe("The barren folders now, present only when that list moved."),
39
58
  });
40
59
  export const WorkspaceChildrenQuerySchema = WorkspaceScopeSchema.extend({
41
60
  path: z.string().min(1).describe("The folder to open, as a workspace path."),
@@ -165,6 +184,21 @@ export const WorkspaceExtractSchema = z.object({
165
184
  .string()
166
185
  .describe("Where the contents landed, as a workspace path: a new folder named after the archive, or the decompressed file itself when the archive held just one. Never an existing entry written over, so a name already taken lands beside it under a free one."),
167
186
  });
187
+ export const WorkspaceDeletedSchema = z.object({
188
+ ok: z.literal(true).describe("Always true: the entry is gone from where it was, or was never there."),
189
+ trashed: z
190
+ .string()
191
+ .optional()
192
+ .describe("The trash id that brings it back through the restore call, for a day. Absent when there was nothing at that path to delete."),
193
+ });
194
+ export const WorkspaceRestoreSchema = z.object({
195
+ trashed: z.string().min(1).describe("The trash id a delete answered with."),
196
+ });
197
+ export const WorkspaceRestoredSchema = z.object({
198
+ path: z
199
+ .string()
200
+ .describe("Where it came back, as a workspace path: where it was deleted from, or beside that under a `(restored)` name when something new has taken the name since."),
201
+ });
168
202
  export const WorkspaceBucketSchema = z.enum(["repositories", "documents", "media", "archives", "other"]);
169
203
  export const WorkspaceClassificationSchema = z.object({
170
204
  classifications: z