@hearsay-tools/squawk 0.18.0-pr3336.5867 → 0.18.0-pr3344.5877

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 (188) hide show
  1. package/README.md +5 -14
  2. package/dist/ci-wait/controller.d.ts +4 -4
  3. package/dist/ci-wait/tools.d.ts +4 -4
  4. package/dist/cli-dispatch.d.ts +0 -3
  5. package/dist/cli-dispatch.js +3 -23
  6. package/dist/cli-dispatch.js.map +1 -1
  7. package/dist/contract/health.d.ts +0 -12
  8. package/dist/contract/index.d.ts +0 -2
  9. package/dist/contract/index.js +1965 -2102
  10. package/dist/{self-update/supervisor.js → desktop-supervisor.js} +2 -2
  11. package/dist/desktop-supervisor.js.map +1 -0
  12. package/dist/home/entry.d.ts +1 -1
  13. package/dist/home/entry.js +1 -1
  14. package/dist/home/entry.js.map +1 -1
  15. package/dist/home/home.d.ts +1 -4
  16. package/dist/home/home.js +1 -5
  17. package/dist/home/home.js.map +1 -1
  18. package/dist/home/migrate.js +4 -4
  19. package/dist/home/migrate.js.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/managed-install/launcher.d.ts +14 -0
  23. package/dist/{self-update → managed-install}/launcher.js +8 -43
  24. package/dist/managed-install/launcher.js.map +1 -0
  25. package/dist/managed-install/layout.d.ts +35 -0
  26. package/dist/managed-install/layout.js +43 -0
  27. package/dist/managed-install/layout.js.map +1 -0
  28. package/dist/runs/run-exits.d.ts +301 -301
  29. package/dist/runs/store.d.ts +72 -72
  30. package/dist/serve-boot.d.ts +1 -19
  31. package/dist/serve-boot.js +1 -44
  32. package/dist/serve-boot.js.map +1 -1
  33. package/dist/serve-command.d.ts +2 -4
  34. package/dist/serve-command.js +7 -11
  35. package/dist/serve-command.js.map +1 -1
  36. package/dist/server/live-routes.d.ts +6 -6
  37. package/dist/server/server.d.ts +61 -405
  38. package/dist/server/server.js +1 -60
  39. package/dist/server/server.js.map +1 -1
  40. package/dist/server/workspace-live-routes.d.ts +6 -6
  41. package/dist/workspace/config.d.ts +0 -5
  42. package/dist/workspace/config.js +0 -4
  43. package/dist/workspace/config.js.map +1 -1
  44. package/package.json +4 -4
  45. package/web/dist/assets/activity-motion-Dj3dlCYS.js +2 -0
  46. package/web/dist/assets/{activity-route-1OFUVP3A.js → activity-route-CpjbEhk_.js} +1 -1
  47. package/web/dist/assets/{alert-dialog-Dj464rjk.js → alert-dialog-h-3h9B4l.js} +1 -1
  48. package/web/dist/assets/button-CS5tOblf.js +3 -0
  49. package/web/dist/assets/{centered-state-DGyy0SuA.js → centered-state-BmsqxbI8.js} +1 -1
  50. package/web/dist/assets/commit-diff-panel-DGx2t9Pw.js +1 -0
  51. package/web/dist/assets/{control-locations-C9II3kPz.js → control-locations-CD2r0mMU.js} +1 -1
  52. package/web/dist/assets/{diff-controls-BR2uqhwG.js → diff-controls-BHF0Pvdc.js} +1 -1
  53. package/web/dist/assets/diff-qq2vW6Xc.js +3 -0
  54. package/web/dist/assets/{diff-view-BBhxSIlf.js → diff-view-wanjAW5U.js} +5 -5
  55. package/web/dist/assets/{dropdown-menu-DhrBcVgr.js → dropdown-menu-CjLqyqwB.js} +1 -1
  56. package/web/dist/assets/{es2015-D345RR4o.js → es2015-CX0rgbM5.js} +1 -1
  57. package/web/dist/assets/file-preview-YiP5f666.js +2 -0
  58. package/web/dist/assets/format-BNCkW110.js +1 -0
  59. package/web/dist/assets/git-toolbar-D0mTYtOj.js +1 -0
  60. package/web/dist/assets/github-DizdAh0y.js +1 -0
  61. package/web/dist/assets/{global-activity-route-Dt83uvZc.js → global-activity-route-DMbPEZPP.js} +1 -1
  62. package/web/dist/assets/{image-preview-Cq1vDiEo.js → image-preview-Dy3o8upo.js} +1 -1
  63. package/web/dist/assets/index-9YmaiQ1k.css +1 -0
  64. package/web/dist/assets/index-D51Su-nT.js +34 -0
  65. package/web/dist/assets/{live-refetch-BdnmTJ_8.js → live-refetch-C2xZHKkJ.js} +1 -1
  66. package/web/dist/assets/{nav-row-styles-BZUUavOF.js → nav-row-styles-CEA9c88Q.js} +1 -1
  67. package/web/dist/assets/play-CmVAj_fu.js +1 -0
  68. package/web/dist/assets/popover-s-Wchzjn.js +1 -0
  69. package/web/dist/assets/preview-pane-connected-DQYoGd9W.js +3 -0
  70. package/web/dist/assets/{project-router-MMOk9VbW.js → project-router-BLO2IxbU.js} +1 -1
  71. package/web/dist/assets/project-scope-context-DbO9a0ii.js +4 -0
  72. package/web/dist/assets/queries-C_DEjjv2.js +1 -0
  73. package/web/dist/assets/repo-git-CSTwuYJ5.js +1 -0
  74. package/web/dist/assets/report-reader-B8D_6si1.js +1 -0
  75. package/web/dist/assets/reports-Dr312nK-.js +1 -0
  76. package/web/dist/assets/run-header-B8M6-fvb.js +2 -0
  77. package/web/dist/assets/skills-Bz-itxvq.js +1 -0
  78. package/web/dist/assets/{tab-link-BvoGfK8S.js → tab-link-CqVqRhuM.js} +1 -1
  79. package/web/dist/assets/task-changes-6F8fNE6I.js +1 -0
  80. package/web/dist/assets/task-commits-1TKZD8tP.js +1 -0
  81. package/web/dist/assets/task-files-BitTchRw.js +1 -0
  82. package/web/dist/assets/{task-github-item-npfGLu9C.js → task-github-item-ux8yQOHs.js} +1 -1
  83. package/web/dist/assets/{task-thread-DnpkXb5P.js → task-thread-DAnwO8BU.js} +7 -7
  84. package/web/dist/assets/thread-state-COdb27sX.js +4 -0
  85. package/web/dist/assets/{toaster-B1MyeHiE.js → toaster-CRVRHlMR.js} +1 -1
  86. package/web/dist/assets/use-hand-to-agent-state-CZK9cWMq.js +1 -0
  87. package/web/dist/assets/{useInfiniteQuery-BbYMWe23.js → useInfiniteQuery-DCWsxLiy.js} +1 -1
  88. package/web/dist/assets/useQuery-C2HBIY3e.js +1 -0
  89. package/web/dist/assets/workflows-CNnPn5Zx.js +7 -0
  90. package/web/dist/assets/ws-BXdlGFIZ.js +1 -0
  91. package/web/dist/assets/{zoomable-image-5pOUaPEg.js → zoomable-image-UzXCYU7Z.js} +1 -1
  92. package/web/dist/index.html +21 -26
  93. package/dist/application-update/bin-recovery.d.ts +0 -5
  94. package/dist/application-update/bin-recovery.js +0 -96
  95. package/dist/application-update/bin-recovery.js.map +0 -1
  96. package/dist/application-update/discovery.d.ts +0 -23
  97. package/dist/application-update/discovery.js +0 -139
  98. package/dist/application-update/discovery.js.map +0 -1
  99. package/dist/application-update/helper.d.ts +0 -58
  100. package/dist/application-update/helper.js +0 -363
  101. package/dist/application-update/helper.js.map +0 -1
  102. package/dist/application-update/launcher.d.ts +0 -12
  103. package/dist/application-update/launcher.js +0 -61
  104. package/dist/application-update/launcher.js.map +0 -1
  105. package/dist/application-update/lock.d.ts +0 -4
  106. package/dist/application-update/lock.js +0 -70
  107. package/dist/application-update/lock.js.map +0 -1
  108. package/dist/application-update/npm-process.d.ts +0 -17
  109. package/dist/application-update/npm-process.js +0 -156
  110. package/dist/application-update/npm-process.js.map +0 -1
  111. package/dist/application-update/runtime-layout.d.ts +0 -20
  112. package/dist/application-update/runtime-layout.js +0 -91
  113. package/dist/application-update/runtime-layout.js.map +0 -1
  114. package/dist/application-update/scoped-recovery.d.ts +0 -32
  115. package/dist/application-update/scoped-recovery.js +0 -210
  116. package/dist/application-update/scoped-recovery.js.map +0 -1
  117. package/dist/application-update/service.d.ts +0 -86
  118. package/dist/application-update/service.js +0 -523
  119. package/dist/application-update/service.js.map +0 -1
  120. package/dist/contract/application-update.d.ts +0 -32
  121. package/dist/contract/self-update.d.ts +0 -255
  122. package/dist/self-update/checkouts.d.ts +0 -46
  123. package/dist/self-update/checkouts.js +0 -284
  124. package/dist/self-update/checkouts.js.map +0 -1
  125. package/dist/self-update/cli.d.ts +0 -19
  126. package/dist/self-update/cli.js +0 -243
  127. package/dist/self-update/cli.js.map +0 -1
  128. package/dist/self-update/installer.d.ts +0 -24
  129. package/dist/self-update/installer.js +0 -139
  130. package/dist/self-update/installer.js.map +0 -1
  131. package/dist/self-update/launcher.d.ts +0 -30
  132. package/dist/self-update/launcher.js.map +0 -1
  133. package/dist/self-update/layout.d.ts +0 -108
  134. package/dist/self-update/layout.js +0 -276
  135. package/dist/self-update/layout.js.map +0 -1
  136. package/dist/self-update/pulls.d.ts +0 -30
  137. package/dist/self-update/pulls.js +0 -128
  138. package/dist/self-update/pulls.js.map +0 -1
  139. package/dist/self-update/registry.d.ts +0 -37
  140. package/dist/self-update/registry.js +0 -86
  141. package/dist/self-update/registry.js.map +0 -1
  142. package/dist/self-update/restart.d.ts +0 -25
  143. package/dist/self-update/restart.js +0 -79
  144. package/dist/self-update/restart.js.map +0 -1
  145. package/dist/self-update/semver.d.ts +0 -19
  146. package/dist/self-update/semver.js +0 -79
  147. package/dist/self-update/semver.js.map +0 -1
  148. package/dist/self-update/service.d.ts +0 -115
  149. package/dist/self-update/service.js +0 -332
  150. package/dist/self-update/service.js.map +0 -1
  151. package/dist/self-update/supervisor.js.map +0 -1
  152. package/dist/server/self-update-routes.d.ts +0 -308
  153. package/dist/server/self-update-routes.js +0 -80
  154. package/dist/server/self-update-routes.js.map +0 -1
  155. package/web/dist/assets/activity-motion-BdGFmrw-.js +0 -2
  156. package/web/dist/assets/agent-accounts-f1cxwgfz.js +0 -18
  157. package/web/dist/assets/button-CHUAMTHK.js +0 -3
  158. package/web/dist/assets/commit-diff-panel-BiNPMHC6.js +0 -1
  159. package/web/dist/assets/diff-BHwQUS2W.js +0 -3
  160. package/web/dist/assets/file-preview-D08Kq15E.js +0 -2
  161. package/web/dist/assets/git-toolbar-BnOaO_OH.js +0 -1
  162. package/web/dist/assets/github-CXc8nroh.js +0 -1
  163. package/web/dist/assets/github-sidebar-model-B0Ufci5S.js +0 -1
  164. package/web/dist/assets/index-B18AqW0Z.css +0 -1
  165. package/web/dist/assets/index-B5LayM4y.js +0 -14
  166. package/web/dist/assets/loader-circle-CZkGEdoI.js +0 -1
  167. package/web/dist/assets/markdown-D7DUNWcJ.js +0 -6
  168. package/web/dist/assets/popover-DRcRI46x.js +0 -1
  169. package/web/dist/assets/preview-pane-connected-JHeCgq7I.js +0 -3
  170. package/web/dist/assets/project-scope-context-B3M-u8R0.js +0 -4
  171. package/web/dist/assets/queries-DORTKwyN.js +0 -1
  172. package/web/dist/assets/repo-git-wEXDON29.js +0 -1
  173. package/web/dist/assets/report-reader-DJ_0htSx.js +0 -1
  174. package/web/dist/assets/reports-BIXmTBFJ.js +0 -1
  175. package/web/dist/assets/run-header-Bgtlx-vc.js +0 -2
  176. package/web/dist/assets/skills-BJ2nSfyr.js +0 -1
  177. package/web/dist/assets/skills-DFBiAuJG.js +0 -1
  178. package/web/dist/assets/skills-workflows-C21NystW.css +0 -1
  179. package/web/dist/assets/task-changes-Dz0udwrE.js +0 -1
  180. package/web/dist/assets/task-commits-5uILgm5M.js +0 -1
  181. package/web/dist/assets/task-files-DGZjTKSS.js +0 -1
  182. package/web/dist/assets/textarea-DlVUfdWG.js +0 -1
  183. package/web/dist/assets/thread-state-BfrO2t7g.js +0 -4
  184. package/web/dist/assets/use-hand-to-agent-state-DyVB4IBv.js +0 -1
  185. package/web/dist/assets/useQuery-CqqnAJvu.js +0 -1
  186. package/web/dist/assets/workflows-ByduCwgu.js +0 -7
  187. package/web/dist/assets/ws-BtSVmivO.js +0 -1
  188. /package/dist/{self-update/supervisor.d.ts → desktop-supervisor.d.ts} +0 -0
@@ -1,255 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Self-update (`/api/v1/workspace/self-update`, PoC — spec to follow): the cockpit's own
4
- * "update cezar" surface. cezar can only replace ITSELF when it runs from the managed layout
5
- * (`~/.cezar/versions/<id>`, activated through the `current` link and launched by
6
- * `~/.cezar/bin/cezar`); every other install kind is reported so the dialog can explain how to
7
- * get there instead of failing a download nobody can use.
8
- */
9
- /** Release channels map onto npm dist-tags: `stable` → `latest`, `nightly` → `nightly`.
10
- * `development` follows no tag: nothing is ever offered as an update, and the dialog picks a
11
- * cezar worktree or an open pull request's preview build by hand instead. */
12
- export declare const updateChannelSchema: z.ZodEnum<{
13
- development: "development";
14
- nightly: "nightly";
15
- stable: "stable";
16
- }>;
17
- export type UpdateChannel = z.infer<typeof updateChannelSchema>;
18
- /** How the running process was installed — decides whether a self-update is possible. */
19
- export declare const installKindSchema: z.ZodEnum<{
20
- checkout: "checkout";
21
- "global-npm": "global-npm";
22
- managed: "managed";
23
- npx: "npx";
24
- unknown: "unknown";
25
- }>;
26
- export type InstallKind = z.infer<typeof installKindSchema>;
27
- /** One entry under `~/.cezar/versions/`. `id` is the directory name; a local build carries a
28
- * `+local` suffix so it never collides with the registry version it was built from, and a
29
- * linked checkout (`link`, `cezar link`) a `+<branch>` one. */
30
- export declare const installedVersionSchema: z.ZodObject<{
31
- id: z.ZodString;
32
- version: z.ZodString;
33
- source: z.ZodEnum<{
34
- link: "link";
35
- local: "local";
36
- registry: "registry";
37
- }>;
38
- installedAt: z.ZodString;
39
- active: z.ZodBoolean;
40
- branch: z.ZodOptional<z.ZodString>;
41
- checkout: z.ZodOptional<z.ZodString>;
42
- }, z.core.$strip>;
43
- export type InstalledVersion = z.infer<typeof installedVersionSchema>;
44
- /** One registry version the picker can install. `channel` is the dist-tag family it belongs to:
45
- * a plain semver is `stable`, `-nightly.` a nightly, anything else (`-develop.`, `-pr123.`) a
46
- * `preview`. `publishedAt` comes from the registry's `time` map, null when it is missing. */
47
- export declare const availableVersionSchema: z.ZodObject<{
48
- version: z.ZodString;
49
- channel: z.ZodEnum<{
50
- nightly: "nightly";
51
- preview: "preview";
52
- stable: "stable";
53
- }>;
54
- publishedAt: z.ZodNullable<z.ZodString>;
55
- installed: z.ZodBoolean;
56
- }, z.core.$strip>;
57
- export type AvailableVersion = z.infer<typeof availableVersionSchema>;
58
- export declare const selfUpdateJobStatusSchema: z.ZodEnum<{
59
- failed: "failed";
60
- restarting: "restarting";
61
- running: "running";
62
- }>;
63
- /** The one in-flight or last-finished install job. `log` is npm's own output, line by line,
64
- * capped server-side. `restarting` means the new version is activated and the process is about
65
- * to exit — the cockpit polls health until a different `version` answers. */
66
- export declare const selfUpdateJobSchema: z.ZodObject<{
67
- status: z.ZodEnum<{
68
- failed: "failed";
69
- restarting: "restarting";
70
- running: "running";
71
- }>;
72
- target: z.ZodString;
73
- startedAt: z.ZodString;
74
- finishedAt: z.ZodNullable<z.ZodString>;
75
- log: z.ZodArray<z.ZodString>;
76
- error: z.ZodOptional<z.ZodString>;
77
- }, z.core.$strip>;
78
- export type SelfUpdateJob = z.infer<typeof selfUpdateJobSchema>;
79
- /** `GET /api/v1/workspace/self-update` (and every mutation on the family). */
80
- export declare const selfUpdateStatusSchema: z.ZodObject<{
81
- version: z.ZodString;
82
- installKind: z.ZodEnum<{
83
- checkout: "checkout";
84
- "global-npm": "global-npm";
85
- managed: "managed";
86
- npx: "npx";
87
- unknown: "unknown";
88
- }>;
89
- entry: z.ZodString;
90
- canSelfUpdate: z.ZodBoolean;
91
- reason: z.ZodOptional<z.ZodString>;
92
- channel: z.ZodEnum<{
93
- development: "development";
94
- nightly: "nightly";
95
- stable: "stable";
96
- }>;
97
- restartMode: z.ZodEnum<{
98
- reexec: "reexec";
99
- supervisor: "supervisor";
100
- }>;
101
- latest: z.ZodObject<{
102
- stable: z.ZodNullable<z.ZodString>;
103
- nightly: z.ZodNullable<z.ZodString>;
104
- }, z.core.$strip>;
105
- updateAvailable: z.ZodNullable<z.ZodString>;
106
- checkedAt: z.ZodNullable<z.ZodString>;
107
- installed: z.ZodArray<z.ZodObject<{
108
- id: z.ZodString;
109
- version: z.ZodString;
110
- source: z.ZodEnum<{
111
- link: "link";
112
- local: "local";
113
- registry: "registry";
114
- }>;
115
- installedAt: z.ZodString;
116
- active: z.ZodBoolean;
117
- branch: z.ZodOptional<z.ZodString>;
118
- checkout: z.ZodOptional<z.ZodString>;
119
- }, z.core.$strip>>;
120
- available: z.ZodArray<z.ZodObject<{
121
- version: z.ZodString;
122
- channel: z.ZodEnum<{
123
- nightly: "nightly";
124
- preview: "preview";
125
- stable: "stable";
126
- }>;
127
- publishedAt: z.ZodNullable<z.ZodString>;
128
- installed: z.ZodBoolean;
129
- }, z.core.$strip>>;
130
- job: z.ZodNullable<z.ZodObject<{
131
- status: z.ZodEnum<{
132
- failed: "failed";
133
- restarting: "restarting";
134
- running: "running";
135
- }>;
136
- target: z.ZodString;
137
- startedAt: z.ZodString;
138
- finishedAt: z.ZodNullable<z.ZodString>;
139
- log: z.ZodArray<z.ZodString>;
140
- error: z.ZodOptional<z.ZodString>;
141
- }, z.core.$strip>>;
142
- activeRuns: z.ZodNumber;
143
- }, z.core.$strip>;
144
- export type SelfUpdateStatus = z.infer<typeof selfUpdateStatusSchema>;
145
- /** `POST /api/v1/workspace/self-update/apply` — a version string, never a URL or a path. */
146
- export declare const selfUpdateApplyRequestSchema: z.ZodObject<{
147
- version: z.ZodString;
148
- }, z.core.$strict>;
149
- export type SelfUpdateApplyRequest = z.infer<typeof selfUpdateApplyRequestSchema>;
150
- /** `PUT /api/v1/workspace/self-update/channel`. */
151
- export declare const selfUpdateChannelRequestSchema: z.ZodObject<{
152
- channel: z.ZodEnum<{
153
- development: "development";
154
- nightly: "nightly";
155
- stable: "stable";
156
- }>;
157
- }, z.core.$strict>;
158
- export type SelfUpdateChannelRequest = z.infer<typeof selfUpdateChannelRequestSchema>;
159
- /** The cezar task that owns a worktree (`.ai/cezar/worktrees/<runId>` in the repo's run index). */
160
- export declare const checkoutTaskSchema: z.ZodObject<{
161
- id: z.ZodString;
162
- title: z.ZodString;
163
- status: z.ZodString;
164
- }, z.core.$strip>;
165
- export type CheckoutTask = z.infer<typeof checkoutTaskSchema>;
166
- /** A cezar checkout (a worktree of a registered cezar repo) the cockpit can switch to by
167
- * applying its `id` — linked on the spot, no copy, no publish. Only built ones can be applied.
168
- * Everything past `linked` is there to tell forty task branches apart: what the task was, what
169
- * was last committed and when, and whether the build needs refreshing. */
170
- export declare const cezarCheckoutSchema: z.ZodObject<{
171
- id: z.ZodString;
172
- branch: z.ZodString;
173
- version: z.ZodString;
174
- worktree: z.ZodString;
175
- built: z.ZodBoolean;
176
- linked: z.ZodBoolean;
177
- commit: z.ZodNullable<z.ZodObject<{
178
- sha: z.ZodString;
179
- subject: z.ZodString;
180
- at: z.ZodString;
181
- }, z.core.$strip>>;
182
- builtAt: z.ZodNullable<z.ZodString>;
183
- stale: z.ZodBoolean;
184
- task: z.ZodNullable<z.ZodObject<{
185
- id: z.ZodString;
186
- title: z.ZodString;
187
- status: z.ZodString;
188
- }, z.core.$strip>>;
189
- pr: z.ZodNullable<z.ZodNumber>;
190
- }, z.core.$strip>;
191
- export type CezarCheckout = z.infer<typeof cezarCheckoutSchema>;
192
- /** An open pull request of cezar's own repository, with the preview build CI published for it
193
- * (the `pr-<N>` npm dist-tag, spec 2026-07-18-npm-preview-publish). `version` is null when the
194
- * PR has no build (a fork, CI not green yet): listed, never installable. */
195
- export declare const pullBuildSchema: z.ZodObject<{
196
- number: z.ZodNumber;
197
- title: z.ZodString;
198
- author: z.ZodNullable<z.ZodString>;
199
- branch: z.ZodString;
200
- draft: z.ZodBoolean;
201
- updatedAt: z.ZodString;
202
- url: z.ZodString;
203
- version: z.ZodNullable<z.ZodString>;
204
- publishedAt: z.ZodNullable<z.ZodString>;
205
- installed: z.ZodBoolean;
206
- }, z.core.$strip>;
207
- export type PullBuild = z.infer<typeof pullBuildSchema>;
208
- /** `GET /api/v1/workspace/self-update/development?refresh=1` — `refresh` skips the caches. */
209
- export declare const selfUpdateDevelopmentQuerySchema: z.ZodObject<{
210
- refresh: z.ZodOptional<z.ZodLiteral<"1">>;
211
- }, z.core.$strict>;
212
- export type SelfUpdateDevelopmentQuery = z.infer<typeof selfUpdateDevelopmentQuerySchema>;
213
- /** `GET /api/v1/workspace/self-update/development` — what the development channel picks from.
214
- * Kept off the status route: it costs a git call per worktree and a GitHub round trip. */
215
- export declare const selfUpdateDevelopmentSchema: z.ZodObject<{
216
- checkouts: z.ZodArray<z.ZodObject<{
217
- id: z.ZodString;
218
- branch: z.ZodString;
219
- version: z.ZodString;
220
- worktree: z.ZodString;
221
- built: z.ZodBoolean;
222
- linked: z.ZodBoolean;
223
- commit: z.ZodNullable<z.ZodObject<{
224
- sha: z.ZodString;
225
- subject: z.ZodString;
226
- at: z.ZodString;
227
- }, z.core.$strip>>;
228
- builtAt: z.ZodNullable<z.ZodString>;
229
- stale: z.ZodBoolean;
230
- task: z.ZodNullable<z.ZodObject<{
231
- id: z.ZodString;
232
- title: z.ZodString;
233
- status: z.ZodString;
234
- }, z.core.$strip>>;
235
- pr: z.ZodNullable<z.ZodNumber>;
236
- }, z.core.$strip>>;
237
- pulls: z.ZodObject<{
238
- available: z.ZodBoolean;
239
- reason: z.ZodOptional<z.ZodString>;
240
- repo: z.ZodString;
241
- items: z.ZodArray<z.ZodObject<{
242
- number: z.ZodNumber;
243
- title: z.ZodString;
244
- author: z.ZodNullable<z.ZodString>;
245
- branch: z.ZodString;
246
- draft: z.ZodBoolean;
247
- updatedAt: z.ZodString;
248
- url: z.ZodString;
249
- version: z.ZodNullable<z.ZodString>;
250
- publishedAt: z.ZodNullable<z.ZodString>;
251
- installed: z.ZodBoolean;
252
- }, z.core.$strip>>;
253
- }, z.core.$strip>;
254
- }, z.core.$strip>;
255
- export type SelfUpdateDevelopment = z.infer<typeof selfUpdateDevelopmentSchema>;
@@ -1,46 +0,0 @@
1
- import type { Home } from '../home/home.ts';
2
- import { runNpm } from './installer.ts';
3
- export interface CezarCheckout {
4
- /** The package root to link: `<worktree>/packages/cezar` (or the worktree itself for the
5
- * single-package layout older branches have). */
6
- packageRoot: string;
7
- worktree: string;
8
- /** Branch name, or the worktree's directory name when HEAD is detached. */
9
- branch: string;
10
- version: string;
11
- built: boolean;
12
- /** The id this checkout has (when linked) or would get (when not yet). */
13
- id: string;
14
- linked: boolean;
15
- commit: {
16
- sha: string;
17
- subject: string;
18
- at: string;
19
- } | null;
20
- builtAt: string | null;
21
- /** Built, but HEAD is newer than the build or uncommitted changes require rebuilding. */
22
- stale: boolean;
23
- /** The cezar task that owns the worktree, from the repo's own run index. */
24
- task: {
25
- id: string;
26
- title: string;
27
- status: string;
28
- } | null;
29
- }
30
- /** The cezar package root inside a checkout, or null when the tree is not cezar's. */
31
- export declare function cezarPackageRoot(worktree: string): string | null;
32
- export declare function isBuilt(packageRoot: string): boolean;
33
- /** The branch a single checkout is on (`link` from a terminal), else its directory name. */
34
- export declare function branchOf(worktree: string): Promise<string>;
35
- /**
36
- * Every cezar checkout reachable from the project registry (and from existing links, so a repo
37
- * that was never registered but was linked once keeps showing its siblings), newest commit
38
- * first, each with what it takes to tell it apart: its task, its last commit, its build age.
39
- */
40
- export declare function discoverCheckouts(env: NodeJS.ProcessEnv | undefined, home: Home): Promise<CezarCheckout[]>;
41
- /**
42
- * Build a checkout so it can be linked: `npm install` when its dependencies are missing or out of
43
- * date, then the server and cockpit builds. The workspace layout skips the root `build`'s
44
- * `check:pack` tarball gate — it proves the release tarball, which a link never uses.
45
- */
46
- export declare function buildCheckout(checkout: Pick<CezarCheckout, 'worktree' | 'packageRoot'>, onLog: (line: string) => void, npm?: typeof runNpm): Promise<void>;
@@ -1,284 +0,0 @@
1
- import { projectPaths } from '../project-paths.js';
2
- /**
3
- * Finding cezar's OWN checkouts — the worktrees a developer might want the desktop app (or the
4
- * `cezar` launcher) to run instead of a published release. Nothing to configure: every
5
- * registered project whose tree holds the `@wjarka/cezarion` package is a cezar repo, and
6
- * `git worktree list` in it names every task branch cezar (or the developer) checked out. A
7
- * worktree is switchable once it is built (`dist/index.js` and the cockpit's `web/dist`); the
8
- * switch itself is `linkCheckout` in layout.ts.
9
- */
10
- import { execFile } from 'node:child_process';
11
- import { cpSync, existsSync, readFileSync, realpathSync, renameSync, rmSync, statSync } from 'node:fs';
12
- import { join } from 'node:path';
13
- import { promisify } from 'node:util';
14
- import { workspaceConfigPath } from '../paths.js';
15
- import { loadWorkspaceConfig } from '../workspace/config.js';
16
- import { findColdRunByCheckout } from '../runs/run-index.js';
17
- import { projectAdmissionRefusal } from '../server/cockpit-ownership.js';
18
- import { runNpm } from './installer.js';
19
- import { linkId, listLinks, PACKAGE_NAME, readManifest, suffixedLinkId } from './layout.js';
20
- const exec = promisify(execFile);
21
- function packageVersion(dir) {
22
- try {
23
- const pkg = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8'));
24
- return pkg.name === PACKAGE_NAME && typeof pkg.version === 'string' ? pkg.version : null;
25
- }
26
- catch {
27
- return null;
28
- }
29
- }
30
- /** The cezar package root inside a checkout, or null when the tree is not cezar's. */
31
- export function cezarPackageRoot(worktree) {
32
- for (const dir of [join(worktree, 'packages', 'cezar'), worktree]) {
33
- if (packageVersion(dir))
34
- return dir;
35
- }
36
- return null;
37
- }
38
- export function isBuilt(packageRoot) {
39
- return existsSync(join(packageRoot, 'dist', 'index.js')) && existsSync(join(packageRoot, 'web', 'dist', 'index.html'));
40
- }
41
- /** When the server build was last written — the older of the two halves would be more honest,
42
- * but `npm run build` writes both in one go and the server is what a restart picks up. */
43
- function builtAtOf(packageRoot) {
44
- try {
45
- return statSync(join(packageRoot, 'dist', 'index.js')).mtime.toISOString();
46
- }
47
- catch {
48
- return null;
49
- }
50
- }
51
- /** HEAD's sha, subject and commit time. Null when git cannot answer. */
52
- async function lastCommit(worktree) {
53
- try {
54
- const { stdout } = await exec('git', ['log', '-1', '--format=%h%x1f%cI%x1f%s'], { cwd: worktree, timeout: 5_000 });
55
- const [sha, at, subject] = stdout.trim().split('\x1f');
56
- return sha && at ? { sha, subject: subject ?? '', at: new Date(at).toISOString() } : null;
57
- }
58
- catch {
59
- return null;
60
- }
61
- }
62
- /** A dirty tree cannot prove its build matches its sources. Include staged, deleted and
63
- * untracked files; ignored build output does not count. A git failure also requires a rebuild. */
64
- async function hasUncommittedChanges(worktree) {
65
- try {
66
- const { stdout } = await exec('git', ['status', '--porcelain', '--untracked-files=normal'], {
67
- cwd: worktree, timeout: 5_000, maxBuffer: 4 * 1024 * 1024,
68
- });
69
- return stdout.trim().length > 0;
70
- }
71
- catch {
72
- return true;
73
- }
74
- }
75
- /** `git worktree list --porcelain` → [path, branch]. Never throws: not a repo is no worktrees. */
76
- async function worktreesOf(root) {
77
- try {
78
- const { stdout } = await exec('git', ['worktree', 'list', '--porcelain'], { cwd: root, timeout: 5_000, maxBuffer: 4 * 1024 * 1024 });
79
- const out = [];
80
- for (const block of stdout.split(/\n\n+/)) {
81
- const path = /^worktree (.+)$/m.exec(block)?.[1];
82
- if (!path || /^prunable/m.test(block))
83
- continue;
84
- const ref = /^branch (.+)$/m.exec(block)?.[1];
85
- out.push({ path, branch: ref ? ref.replace(/^refs\/heads\//, '') : null });
86
- }
87
- return out;
88
- }
89
- catch {
90
- return [];
91
- }
92
- }
93
- function real(path) {
94
- try {
95
- return realpathSync(path);
96
- }
97
- catch {
98
- return path;
99
- }
100
- }
101
- /** The branch a single checkout is on (`link` from a terminal), else its directory name. */
102
- export async function branchOf(worktree) {
103
- try {
104
- const { stdout } = await exec('git', ['symbolic-ref', '--short', '-q', 'HEAD'], { cwd: worktree, timeout: 5_000 });
105
- if (stdout.trim())
106
- return stdout.trim();
107
- }
108
- catch {
109
- // detached HEAD, or not a repo
110
- }
111
- return worktree.split(/[\\/]/).filter(Boolean).pop() ?? 'checkout';
112
- }
113
- /** The main checkout's data directory, which names task worktrees. A project under a migration
114
- * fence is not read: its checkouts show without their tasks. */
115
- function taskDataDir(trees) {
116
- const dataDir = trees.length > 0 ? projectPaths(trees[0].path).write : null;
117
- return dataDir && !projectAdmissionRefusal(dataDir) ? dataDir : null;
118
- }
119
- /** `root`'s worktrees, listed again after its unfinished migration finishes: the migration moves
120
- * and repairs task worktrees, so a list taken before it names their old paths. The new list
121
- * comes from the main checkout, which no migration moves: `root` may be a task checkout that
122
- * the recovery just moved away. */
123
- async function recoveredWorktreesOf(root) {
124
- const trees = await worktreesOf(root);
125
- const main = trees[0]?.path;
126
- if (!main || projectAdmissionRefusal(projectPaths(main).write)?.reason !== 'journal')
127
- return trees;
128
- const recovered = await (await import('../project-migration/recovery.js')).recoverProjectMigration(main).catch(() => undefined);
129
- return recovered ? worktreesOf(main) : trees;
130
- }
131
- /**
132
- * Every cezar checkout reachable from the project registry (and from existing links, so a repo
133
- * that was never registered but was linked once keeps showing its siblings), newest commit
134
- * first, each with what it takes to tell it apart: its task, its last commit, its build age.
135
- */
136
- export async function discoverCheckouts(env = process.env, home) {
137
- const config = await loadWorkspaceConfig(workspaceConfigPath(env, home));
138
- const links = listLinks(env, home);
139
- const roots = [...config.projects.map((project) => project.root), ...links.map((link) => link.checkout).filter((p) => !!p)];
140
- const seen = new Set();
141
- const found = [];
142
- for (const root of roots) {
143
- if (!existsSync(root) || !cezarPackageRoot(root))
144
- continue;
145
- const trees = await recoveredWorktreesOf(root);
146
- // Task worktrees live under the main checkout, whose run store names them.
147
- const dataDir = taskDataDir(trees);
148
- for (const tree of trees) {
149
- const worktree = real(tree.path);
150
- if (seen.has(worktree))
151
- continue;
152
- seen.add(worktree);
153
- const packageRoot = cezarPackageRoot(worktree);
154
- const version = packageRoot ? packageVersion(packageRoot) : null;
155
- if (!packageRoot || !version)
156
- continue;
157
- const branch = tree.branch ?? worktree.split(/[\\/]/).filter(Boolean).pop() ?? 'checkout';
158
- const link = links.find((entry) => entry.checkout === packageRoot);
159
- const task = dataDir ? findColdRunByCheckout(dataDir, { worktreePaths: [...new Set([tree.path, worktree])], branch: tree.branch }) : undefined;
160
- const built = isBuilt(packageRoot);
161
- found.push({
162
- packageRoot,
163
- worktree,
164
- branch,
165
- version,
166
- built,
167
- builtAt: built ? builtAtOf(packageRoot) : null,
168
- stale: false,
169
- task: task ? { id: task.id, title: task.titleSummary ?? task.title, status: task.status } : null,
170
- id: link?.id ?? '',
171
- linked: !!link,
172
- });
173
- }
174
- }
175
- assignUniqueIds(found, links, env, home);
176
- const out = await Promise.all(found.map(async (checkout) => {
177
- const [commit, dirty] = await Promise.all([
178
- lastCommit(checkout.worktree),
179
- checkout.built ? hasUncommittedChanges(checkout.worktree) : false,
180
- ]);
181
- const stale = checkout.built && (dirty || !!(checkout.builtAt && commit && commit.at > checkout.builtAt));
182
- return { ...checkout, commit, stale };
183
- }));
184
- // Newest work first: that is the branch a developer is most likely reaching for.
185
- return out.sort((a, b) => (b.commit?.at ?? '').localeCompare(a.commit?.at ?? ''));
186
- }
187
- /**
188
- * Give every unlinked checkout an id no other checkout or install answers to: `apply` resolves a
189
- * target by id, so two clones on `main` (or `cez/foo` beside `cez-foo`) sharing
190
- * `<version>+main` would let a pick of one build and run the other. Links keep theirs; the
191
- * first unlinked checkout on a slug keeps the plain id, later ones get `linkCheckout`'s
192
- * path-hash suffix — which `linkDiscovered` then passes back so the link lands under it.
193
- */
194
- function assignUniqueIds(found, links, env, home) {
195
- const owner = new Map();
196
- for (const link of links)
197
- owner.set(link.id, link.checkout ?? '');
198
- for (const checkout of found) {
199
- if (checkout.linked)
200
- continue;
201
- const base = safeLinkId(checkout.version, checkout.branch);
202
- if (!base)
203
- continue;
204
- // Taken by another checkout, or by any install on disk (`+local` builds included).
205
- const taken = owner.get(base) ?? (readManifest(base, env, home) ? '' : undefined);
206
- checkout.id = taken === undefined || taken === checkout.packageRoot ? base : safeSuffixed(base, checkout.packageRoot);
207
- if (checkout.id)
208
- owner.set(checkout.id, checkout.packageRoot);
209
- }
210
- }
211
- function safeSuffixed(base, packageRoot) {
212
- try {
213
- return suffixedLinkId(base, packageRoot);
214
- }
215
- catch {
216
- return '';
217
- }
218
- }
219
- function safeLinkId(version, branch) {
220
- try {
221
- return linkId(version, branch);
222
- }
223
- catch {
224
- return '';
225
- }
226
- }
227
- /** `npm install` is due when the checkout has never installed, or its lockfile changed since. */
228
- function needsInstall(worktree) {
229
- try {
230
- const installed = statSync(join(worktree, 'node_modules', '.package-lock.json')).mtimeMs;
231
- return statSync(join(worktree, 'package-lock.json')).mtimeMs > installed;
232
- }
233
- catch {
234
- return !existsSync(join(worktree, 'node_modules'));
235
- }
236
- }
237
- /**
238
- * Build a checkout so it can be linked: `npm install` when its dependencies are missing or out of
239
- * date, then the server and cockpit builds. The workspace layout skips the root `build`'s
240
- * `check:pack` tarball gate — it proves the release tarball, which a link never uses.
241
- */
242
- export async function buildCheckout(checkout, onLog, npm = runNpm) {
243
- const { worktree, packageRoot } = checkout;
244
- if (needsInstall(worktree)) {
245
- onLog(`npm install in ${worktree}`);
246
- await npm(['install', '--no-audit', '--no-fund'], worktree, onLog);
247
- }
248
- const scripts = (() => {
249
- try {
250
- return JSON.parse(readFileSync(join(worktree, 'package.json'), 'utf8')).scripts ?? {};
251
- }
252
- catch {
253
- return {};
254
- }
255
- })();
256
- const steps = packageRoot !== worktree && scripts['build:server'] && scripts['build:web'] ? ['build:server', 'build:web'] : ['build'];
257
- // A rebuild of the worktree cezar is running from empties the `web/dist` it serves (vite's
258
- // `emptyOutDir`): keep a copy, so a build that fails leaves the old cockpit, not none.
259
- const webDist = join(packageRoot, 'web', 'dist');
260
- const backup = join(packageRoot, 'web', '.dist-before-build');
261
- rmSync(backup, { recursive: true, force: true });
262
- if (existsSync(join(webDist, 'index.html')))
263
- cpSync(webDist, backup, { recursive: true });
264
- try {
265
- for (const step of steps) {
266
- onLog(`npm run ${step} in ${worktree}`);
267
- await npm(['run', step], worktree, onLog);
268
- }
269
- if (!isBuilt(packageRoot))
270
- throw new Error(`${worktree} built, but dist/index.js or web/dist is still missing`);
271
- }
272
- catch (error) {
273
- if (existsSync(backup) && !existsSync(join(webDist, 'index.html'))) {
274
- rmSync(webDist, { recursive: true, force: true });
275
- renameSync(backup, webDist);
276
- onLog('the build failed — restored the previous cockpit build');
277
- }
278
- throw error;
279
- }
280
- finally {
281
- rmSync(backup, { recursive: true, force: true });
282
- }
283
- }
284
- //# sourceMappingURL=checkouts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkouts.js","sourceRoot":"","sources":["../../src/self-update/checkouts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAo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,CAAC,GAAG,QAAQ,wDAAwD,CAAC,CAAC;IAClH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC;YACnE,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAClD,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC5B,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAClE,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { Home } from '../home/home.ts';
2
- import { SelfUpdateService } from './service.ts';
3
- export interface SelfUpdateCliOptions {
4
- service: SelfUpdateService;
5
- home: Home;
6
- channel?: string;
7
- version?: string;
8
- modifyPath: boolean;
9
- /** `link --use`: activate the linked checkout right away. */
10
- use?: boolean;
11
- }
12
- /** Run `argv[0]` when it names a managed-install command and answer its exit code; anything else
13
- * is not ours. Runs before the global parseArgs: these flags are not cockpit flags. */
14
- export declare function runManagedCommand(argv: string[], identity: {
15
- pkgName: string;
16
- version: string;
17
- entry: string;
18
- }, getHome: () => Home): Promise<number | undefined>;
19
- export declare function runSelfUpdateCommand(command: string, args: string[], opts: SelfUpdateCliOptions): Promise<number>;