@hearsay-tools/squawk 0.19.0-pr4563.9051 → 0.19.0-pr4564.9050

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 (173) hide show
  1. package/dist/built-in-cli-commands.js +1 -1
  2. package/dist/built-in-cli-commands.js.map +1 -1
  3. package/dist/cli-dispatch.d.ts +1 -1
  4. package/dist/cli-dispatch.js +19 -4
  5. package/dist/cli-dispatch.js.map +1 -1
  6. package/dist/config.d.ts +1 -1
  7. package/dist/config.js +3 -0
  8. package/dist/config.js.map +1 -1
  9. package/dist/contract/health.d.ts +2 -2
  10. package/dist/contract/index.js +13 -7
  11. package/dist/contract/projects.d.ts +8 -2
  12. package/dist/core/cli-registry.d.ts +1 -0
  13. package/dist/core/server-hook-registry.d.ts +4 -2
  14. package/dist/core/server-hook-registry.js.map +1 -1
  15. package/dist/features/automations/automations-routes.js +4 -3
  16. package/dist/features/automations/automations-routes.js.map +1 -1
  17. package/dist/index.js +2 -2
  18. package/dist/index.js.map +1 -1
  19. package/dist/serve-boot.d.ts +1 -1
  20. package/dist/serve-boot.js +4 -2
  21. package/dist/serve-boot.js.map +1 -1
  22. package/dist/serve-command.d.ts +2 -2
  23. package/dist/serve-command.js +47 -31
  24. package/dist/serve-command.js.map +1 -1
  25. package/dist/server/activity-routes.js +1 -1
  26. package/dist/server/activity-routes.js.map +1 -1
  27. package/dist/server/activity-sources.d.ts +1 -1
  28. package/dist/server/activity-sources.js +6 -4
  29. package/dist/server/activity-sources.js.map +1 -1
  30. package/dist/server/activity-topic.js +5 -2
  31. package/dist/server/activity-topic.js.map +1 -1
  32. package/dist/server/live-routes.d.ts +2 -1
  33. package/dist/server/live-routes.js +2 -2
  34. package/dist/server/live-routes.js.map +1 -1
  35. package/dist/server/plugin-server-hooks.js +7 -4
  36. package/dist/server/plugin-server-hooks.js.map +1 -1
  37. package/dist/server/project-context.d.ts +3 -1
  38. package/dist/server/project-context.js +5 -1
  39. package/dist/server/project-context.js.map +1 -1
  40. package/dist/server/projects-routes.d.ts +64 -2
  41. package/dist/server/projects-routes.js +15 -8
  42. package/dist/server/projects-routes.js.map +1 -1
  43. package/dist/server/providers-routes.d.ts +16 -2
  44. package/dist/server/providers-routes.js +9 -4
  45. package/dist/server/providers-routes.js.map +1 -1
  46. package/dist/server/runs-routes.d.ts +18 -18
  47. package/dist/server/server-deps.d.ts +11 -4
  48. package/dist/server/server-deps.js +26 -9
  49. package/dist/server/server-deps.js.map +1 -1
  50. package/dist/server/server.d.ts +88 -6
  51. package/dist/server/server.js +22 -30
  52. package/dist/server/server.js.map +1 -1
  53. package/dist/server/start-server.js +22 -14
  54. package/dist/server/start-server.js.map +1 -1
  55. package/dist/server/workspace-projects.d.ts +11 -8
  56. package/dist/server/workspace-projects.js +50 -12
  57. package/dist/server/workspace-projects.js.map +1 -1
  58. package/dist/server/workspace-routes.d.ts +1 -1
  59. package/dist/server/workspace-routes.js +2 -2
  60. package/dist/server/workspace-routes.js.map +1 -1
  61. package/dist/server/workspace-run-feed.d.ts +4 -4
  62. package/dist/server/workspace-run-feed.js +2 -0
  63. package/dist/server/workspace-run-feed.js.map +1 -1
  64. package/dist/task-cli/discovery.js +7 -0
  65. package/dist/task-cli/discovery.js.map +1 -1
  66. package/package.json +4 -4
  67. package/web/dist/assets/accounts-section-6maSAsJt.js +1 -0
  68. package/web/dist/assets/activity-motion-2ckGi01V.js +1 -0
  69. package/web/dist/assets/{activity-route-DXzqvW9b.js → activity-route-2I944jwR.js} +1 -1
  70. package/web/dist/assets/{agent-config-section-GRuA0UJW.js → agent-config-section--zfrJO8b.js} +1 -1
  71. package/web/dist/assets/{agent-defaults-section-BD9daH9I.js → agent-defaults-section-Cu3gS_Jo.js} +1 -1
  72. package/web/dist/assets/{appearance-BPhiCdKN.js → appearance-DUefmqo9.js} +1 -1
  73. package/web/dist/assets/{archive-on-merge-field-DSmA6OIB.js → archive-on-merge-field-Do2X4sBM.js} +1 -1
  74. package/web/dist/assets/attention-BHlvWUvR.js +1 -0
  75. package/web/dist/assets/automations-route-BVFd7SeR.js +2 -0
  76. package/web/dist/assets/{badge-DVxxThpb.js → badge-B6B-xYQQ.js} +1 -1
  77. package/web/dist/assets/{button-B22ANdCY.js → button-C8jUIs8Q.js} +1 -1
  78. package/web/dist/assets/{command-B2Y0By1v.js → command-BiBq24zL.js} +1 -1
  79. package/web/dist/assets/{commit-list-CLS8Nxm8.js → commit-list-okUEljEG.js} +1 -1
  80. package/web/dist/assets/{dialog-rpNyAWGb.js → dialog-DRZuXvul.js} +1 -1
  81. package/web/dist/assets/diff-controls-CRJ2Qfbb.js +1 -0
  82. package/web/dist/assets/{diff-DQU_FZVG.js → diff-o-UDJ2RE.js} +2 -2
  83. package/web/dist/assets/{diff-view-BTRxRhsf.js → diff-view-D4yGYS9C.js} +1 -1
  84. package/web/dist/assets/{discard-changes-dialog-DbdQZI9d.js → discard-changes-dialog-uHeDnRFZ.js} +1 -1
  85. package/web/dist/assets/{file-preview-Br2EBKlM.js → file-preview-B37EVTqv.js} +1 -1
  86. package/web/dist/assets/{folder-browser-CUUWpb8F.js → folder-browser-BF7yByS9.js} +1 -1
  87. package/web/dist/assets/{git-toolbar-zU_7VMhB.js → git-toolbar-DKZehSdA.js} +1 -1
  88. package/web/dist/assets/github-DmB9tnIb.js +1 -0
  89. package/web/dist/assets/{global-activity-route-CHqGz8GT.js → global-activity-route-BkDu06si.js} +2 -2
  90. package/web/dist/assets/index-BI3glGOM.js +21 -0
  91. package/web/dist/assets/index-aGnZVJo_.css +1 -0
  92. package/web/dist/assets/label-CR3x1nrW.js +1 -0
  93. package/web/dist/assets/{markdown-C-sGdeCW.js → markdown-DIvVclXt.js} +1 -1
  94. package/web/dist/assets/{open-in-menu-CxD3RKm9.js → open-in-menu-Bc0mf1Q8.js} +1 -1
  95. package/web/dist/assets/{option-select-Bfg_P_yg.js → option-select-jRSeVdmG.js} +1 -1
  96. package/web/dist/assets/{page-shell-CEIoW56O.css → page-shell-DQPYcKyL.css} +1 -1
  97. package/web/dist/assets/page-shell-Dky5crRl.js +1 -0
  98. package/web/dist/assets/{preferences-section-Dmgl8w2W.js → preferences-section-B8cufiat.js} +1 -1
  99. package/web/dist/assets/preview-pane-connected-ciRgTMV4.js +3 -0
  100. package/web/dist/assets/{project-location-Bd_uaIX3.js → project-location-BcmeWSjQ.js} +1 -1
  101. package/web/dist/assets/{project-router-C53GCY_8.js → project-router-BmHj3sRY.js} +1 -1
  102. package/web/dist/assets/{projects-section-B7zvg1E5.js → projects-section-B4JJuB75.js} +1 -1
  103. package/web/dist/assets/{prompt-templates-section-D44hUQVS.js → prompt-templates-section-bovd2ULK.js} +1 -1
  104. package/web/dist/assets/queries-C7Ps3qgO.js +1 -0
  105. package/web/dist/assets/{reference-chip-95DURw1q.js → reference-chip-D0zVVSpi.js} +1 -1
  106. package/web/dist/assets/{remote-settings-notice-BFbapSXR.js → remote-settings-notice-TR1fwO0C.js} +1 -1
  107. package/web/dist/assets/repo-git-ER2cNas6.js +1 -0
  108. package/web/dist/assets/{report-reader-Chf7Bw6i.js → report-reader-BxBnRfHb.js} +1 -1
  109. package/web/dist/assets/{report-selection-DAPzf1Aa.js → report-selection-D73fe0ma.js} +1 -1
  110. package/web/dist/assets/{reports-KBr2fKXD.js → reports-jiSmLK1M.js} +1 -1
  111. package/web/dist/assets/{resources-section-BFfXzHg9.js → resources-section-BHBw18Kd.js} +1 -1
  112. package/web/dist/assets/review-panel-DA2YgxkG.js +11 -0
  113. package/web/dist/assets/{run-detail-refresh-DYY7EWeq.js → run-detail-refresh-B4MGFY0x.js} +1 -1
  114. package/web/dist/assets/run-header-BBsXrvF4.js +2 -0
  115. package/web/dist/assets/{select-vFAk3UG6.js → select-SNjNDDvi.js} +1 -1
  116. package/web/dist/assets/{session-context-section-CKwSUFn5.js → session-context-section-DJpLtLRJ.js} +2 -2
  117. package/web/dist/assets/{settings-agent-picker-DSecGk3L.js → settings-agent-picker-CC0ojY-I.js} +1 -1
  118. package/web/dist/assets/{settings-list-detail-D3ibaYUj.js → settings-list-detail-Dn5CWzHj.js} +1 -1
  119. package/web/dist/assets/{settings-save-bar-jXUf92MJ.js → settings-save-bar-DDH5LZnC.js} +1 -1
  120. package/web/dist/assets/settings-shell-Ct_qn_MM.css +1 -0
  121. package/web/dist/assets/settings-shell-DrBSckNn.js +1 -0
  122. package/web/dist/assets/sidebar-section-BTjcF-KU.js +1 -0
  123. package/web/dist/assets/{skills-4Th9BbMq.js → skills-D7qOIuFK.js} +1 -1
  124. package/web/dist/assets/{status-dot-Drd4-nfa.js → status-dot-BXf-Ubd0.js} +1 -1
  125. package/web/dist/assets/{tab-link-BGfSJ-ah.js → tab-link-xESwYBsl.js} +1 -1
  126. package/web/dist/assets/{task-changes-BK6iTdQV.js → task-changes-CKfPnOaO.js} +1 -1
  127. package/web/dist/assets/{task-commits-qF88ZXOO.js → task-commits-BLiq1qsZ.js} +1 -1
  128. package/web/dist/assets/{task-file-scope-xJJGIf0D.js → task-file-scope-C277fbSR.js} +1 -1
  129. package/web/dist/assets/{task-files-BWteSDsw.js → task-files-cOnEUKs3.js} +1 -1
  130. package/web/dist/assets/{task-github-item-CW4X_p9e.js → task-github-item-J7LFh_Kd.js} +1 -1
  131. package/web/dist/assets/{task-groups-7p6Gvpg8.js → task-groups-B7v_DBPP.js} +1 -1
  132. package/web/dist/assets/task-thread-1mNL_5FP.css +1 -0
  133. package/web/dist/assets/task-thread-BfLYIJZb.js +2 -0
  134. package/web/dist/assets/thread-state-ClJxRWSd.js +4 -0
  135. package/web/dist/assets/toaster-Dw5f80iU.js +4 -0
  136. package/web/dist/assets/use-hand-to-agent-state-DBd7nKiU.js +1 -0
  137. package/web/dist/assets/use-hand-to-agent-state-DZZUsUAd.css +1 -0
  138. package/web/dist/assets/use-path-bases-BNMkgxOJ.js +1 -0
  139. package/web/dist/assets/use-workspace-config-save-DL2b0h2K.js +1 -0
  140. package/web/dist/assets/workflows-B2Sw8qQa.css +1 -0
  141. package/web/dist/assets/workflows-Clhyfufk.js +7 -0
  142. package/web/dist/assets/workspace-tools-ChfTGxIP.js +1 -0
  143. package/web/dist/assets/{worktrees-section-1d2KIy6I.js → worktrees-section-w-A9RL4F.js} +1 -1
  144. package/web/dist/index.html +20 -20
  145. package/web/dist/assets/accounts-section-BDgI3Hsq.js +0 -1
  146. package/web/dist/assets/activity-motion-CtraluxE.js +0 -1
  147. package/web/dist/assets/attention-xl4bwNkx.js +0 -1
  148. package/web/dist/assets/automations-route-DkriPsWY.js +0 -2
  149. package/web/dist/assets/diff-controls-CUc7cvz0.js +0 -1
  150. package/web/dist/assets/github-C1BmiuP9.js +0 -1
  151. package/web/dist/assets/index-BonK0A5B.js +0 -21
  152. package/web/dist/assets/index-DiCkTdS4.css +0 -1
  153. package/web/dist/assets/label-DRXJ8ljY.js +0 -1
  154. package/web/dist/assets/page-shell-BgabWJ3w.js +0 -1
  155. package/web/dist/assets/preview-pane-connected-BXaUpoqO.js +0 -3
  156. package/web/dist/assets/queries-jsRcJKo6.js +0 -1
  157. package/web/dist/assets/repo-git-H2vRjLc1.js +0 -1
  158. package/web/dist/assets/review-panel-C0h6Tetr.js +0 -11
  159. package/web/dist/assets/run-header-XaXxzoWJ.js +0 -2
  160. package/web/dist/assets/settings-shell-B3kwe0pE.js +0 -1
  161. package/web/dist/assets/settings-shell-Bvje3VDf.css +0 -1
  162. package/web/dist/assets/sidebar-section-BKdm6QSG.js +0 -1
  163. package/web/dist/assets/task-thread-CUaMrB9s.js +0 -2
  164. package/web/dist/assets/task-thread-RqPPF0Xz.css +0 -1
  165. package/web/dist/assets/thread-state-CURR1x40.js +0 -4
  166. package/web/dist/assets/toaster-C1BFyQ8i.js +0 -4
  167. package/web/dist/assets/use-hand-to-agent-state-BSM9EGsW.css +0 -1
  168. package/web/dist/assets/use-hand-to-agent-state-C99b3Swp.js +0 -1
  169. package/web/dist/assets/use-path-bases-BDBUs9SG.js +0 -1
  170. package/web/dist/assets/use-workspace-config-save-D2fOudMd.js +0 -1
  171. package/web/dist/assets/workflows-BGFzcDbi.js +0 -7
  172. package/web/dist/assets/workflows-D7bXUmGa.css +0 -1
  173. package/web/dist/assets/workspace-tools-B3YX-Z9c.js +0 -1
@@ -94,8 +94,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
94
94
  } | undefined;
95
95
  invalidAsk?: boolean | undefined;
96
96
  delegation?: {
97
- role: "invalid";
98
- } | {
99
97
  role: "root";
100
98
  conversation?: {
101
99
  messages: {
@@ -330,6 +328,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
330
328
  } | undefined;
331
329
  executionRevision?: number | undefined;
332
330
  executionStartSeq?: number | undefined;
331
+ } | {
332
+ role: "invalid";
333
333
  } | undefined;
334
334
  agentInputs?: {
335
335
  conversation?: {
@@ -1941,8 +1941,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
1941
1941
  } | undefined;
1942
1942
  invalidAsk?: boolean | undefined;
1943
1943
  delegation?: {
1944
- role: "invalid";
1945
- } | {
1946
1944
  role: "root";
1947
1945
  conversation?: {
1948
1946
  messages: {
@@ -2177,6 +2175,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
2177
2175
  } | undefined;
2178
2176
  executionRevision?: number | undefined;
2179
2177
  executionStartSeq?: number | undefined;
2178
+ } | {
2179
+ role: "invalid";
2180
2180
  } | undefined;
2181
2181
  agentInputs?: {
2182
2182
  conversation?: {
@@ -3156,8 +3156,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
3156
3156
  } | undefined;
3157
3157
  invalidAsk?: boolean | undefined;
3158
3158
  delegation?: {
3159
- role: "invalid";
3160
- } | {
3161
3159
  role: "root";
3162
3160
  conversation?: {
3163
3161
  messages: {
@@ -3392,6 +3390,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
3392
3390
  } | undefined;
3393
3391
  executionRevision?: number | undefined;
3394
3392
  executionStartSeq?: number | undefined;
3393
+ } | {
3394
+ role: "invalid";
3395
3395
  } | undefined;
3396
3396
  agentInputs?: {
3397
3397
  conversation?: {
@@ -5142,8 +5142,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
5142
5142
  currentStepId?: string | undefined;
5143
5143
  error?: string | undefined;
5144
5144
  delegation?: {
5145
- role: "invalid";
5146
- } | {
5147
5145
  role: "root";
5148
5146
  conversation?: {
5149
5147
  messages: {
@@ -5378,6 +5376,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
5378
5376
  } | undefined;
5379
5377
  executionRevision?: number | undefined;
5380
5378
  executionStartSeq?: number | undefined;
5379
+ } | {
5380
+ role: "invalid";
5381
5381
  } | undefined;
5382
5382
  lastWaitsError?: string | undefined;
5383
5383
  automaticWakes?: number | undefined;
@@ -5615,8 +5615,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
5615
5615
  } | undefined;
5616
5616
  invalidAsk?: boolean | undefined;
5617
5617
  delegation?: {
5618
- role: "invalid";
5619
- } | {
5620
5618
  role: "root";
5621
5619
  conversation?: {
5622
5620
  messages: {
@@ -5851,6 +5849,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
5851
5849
  } | undefined;
5852
5850
  executionRevision?: number | undefined;
5853
5851
  executionStartSeq?: number | undefined;
5852
+ } | {
5853
+ role: "invalid";
5854
5854
  } | undefined;
5855
5855
  agentInputs?: {
5856
5856
  conversation?: {
@@ -6806,8 +6806,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
6806
6806
  } | undefined;
6807
6807
  invalidAsk?: boolean | undefined;
6808
6808
  delegation?: {
6809
- role: "invalid";
6810
- } | {
6811
6809
  role: "root";
6812
6810
  conversation?: {
6813
6811
  messages: {
@@ -7042,6 +7040,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
7042
7040
  } | undefined;
7043
7041
  executionRevision?: number | undefined;
7044
7042
  executionStartSeq?: number | undefined;
7043
+ } | {
7044
+ role: "invalid";
7045
7045
  } | undefined;
7046
7046
  agentInputs?: {
7047
7047
  conversation?: {
@@ -8735,8 +8735,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
8735
8735
  currentStepId?: string | undefined;
8736
8736
  error?: string | undefined;
8737
8737
  delegation?: {
8738
- role: "invalid";
8739
- } | {
8740
8738
  role: "root";
8741
8739
  conversation?: {
8742
8740
  messages: {
@@ -8971,6 +8969,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
8971
8969
  } | undefined;
8972
8970
  executionRevision?: number | undefined;
8973
8971
  executionStartSeq?: number | undefined;
8972
+ } | {
8973
+ role: "invalid";
8974
8974
  } | undefined;
8975
8975
  lastWaitsError?: string | undefined;
8976
8976
  automaticWakes?: number | undefined;
@@ -9268,8 +9268,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
9268
9268
  } | undefined;
9269
9269
  invalidAsk?: boolean | undefined;
9270
9270
  delegation?: {
9271
- role: "invalid";
9272
- } | {
9273
9271
  role: "root";
9274
9272
  conversation?: {
9275
9273
  messages: {
@@ -9504,6 +9502,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
9504
9502
  } | undefined;
9505
9503
  executionRevision?: number | undefined;
9506
9504
  executionStartSeq?: number | undefined;
9505
+ } | {
9506
+ role: "invalid";
9507
9507
  } | undefined;
9508
9508
  agentInputs?: {
9509
9509
  conversation?: {
@@ -11327,8 +11327,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
11327
11327
  currentStepId?: string | undefined;
11328
11328
  error?: string | undefined;
11329
11329
  delegation?: {
11330
- role: "invalid";
11331
- } | {
11332
11330
  role: "root";
11333
11331
  conversation?: {
11334
11332
  messages: {
@@ -11563,6 +11561,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
11563
11561
  } | undefined;
11564
11562
  executionRevision?: number | undefined;
11565
11563
  executionStartSeq?: number | undefined;
11564
+ } | {
11565
+ role: "invalid";
11566
11566
  } | undefined;
11567
11567
  lastWaitsError?: string | undefined;
11568
11568
  automaticWakes?: number | undefined;
@@ -16,7 +16,7 @@ type HostServices = {
16
16
  * built only when its dependency is absent (`??` short-circuits), in the order below, so a test
17
17
  * that injects a service never pays for the real one.
18
18
  */
19
- export declare function resolveServerDeps(deps: Pick<ServerDeps, HostServiceKey> & Pick<ServerDeps, 'home'>, bootRoot: string): HostServices;
19
+ export declare function resolveServerDeps(deps: Pick<ServerDeps, HostServiceKey> & Pick<ServerDeps, 'home'>, bootRoot: string | undefined): HostServices;
20
20
  /** The host-wide provider closures the provider, models and start-gate routes share. */
21
21
  export declare function createProviderStatus(services: Pick<HostServices, 'modelCatalog' | 'providerAuth' | 'workspaceConfig'>, home: Home): {
22
22
  providerStatus: (options?: {
@@ -33,9 +33,16 @@ export declare function emitProviderRow(workspaceEvents: WorkspaceEventBus, prov
33
33
  * starts as the reserved alias when registration was suppressed — handlers never read it; API
34
34
  * payloads name the boot project via `resolveBootProject` instead.
35
35
  */
36
- export declare function createBootContext(deps: Pick<ServerDeps, 'bootProjectId' | 'store' | 'manager' | 'bootProjectState' | 'home'>, bootRoot: string, bootDataDir: string): ProjectContext;
37
- /** Watch the boot store, every context already built, and each store or context built later. */
38
- export declare function watchProviderRuntimeAuth(providerRuntimeAuth: Pick<ProviderRuntimeAuthObserver, 'watch'>, bootContext: Pick<ProjectContext, 'store'>, contexts: Pick<ProjectContexts, 'ids' | 'peek' | 'onStoreCreated' | 'onContextBuilt'>): void;
36
+ export declare function createBootContext(deps: Pick<ServerDeps, 'bootProjectId' | 'bootProjectState' | 'home'> & {
37
+ store: NonNullable<ServerDeps['store']>;
38
+ manager: NonNullable<ServerDeps['manager']>;
39
+ }, bootRoot: string, bootDataDir: string): ProjectContext;
40
+ /** Build the boot project's context when `repoRoot` is set, or return `undefined` with `--no-project`. */
41
+ export declare function createOptionalBootContext(deps: Pick<ServerDeps, 'repoRoot' | 'bootProjectId' | 'store' | 'manager' | 'bootProjectState' | 'home'>): ProjectContext | undefined;
42
+ /** Run `attach` once on the optional boot context, every already-built context, and each one built later. */
43
+ export declare function attachLoadedProjects(bootContext: ProjectContext | undefined, contexts: Pick<ProjectContexts, 'ids' | 'peek' | 'onContextBuilt'>, attach: (project: ProjectContext) => void): void;
44
+ /** Watch the boot store (when present), every context already built, and each store or context built later. */
45
+ export declare function watchProviderRuntimeAuth(providerRuntimeAuth: Pick<ProviderRuntimeAuthObserver, 'watch'>, bootContext: Pick<ProjectContext, 'store'> | undefined, contexts: Pick<ProjectContexts, 'ids' | 'peek' | 'onStoreCreated' | 'onContextBuilt'>): void;
39
46
  /** Injected contexts (tests) skip `prepareManager`; attach those now, and each one built later. */
40
47
  export declare function attachProjectWebhooks(taskWebhooks: Pick<TaskWebhooks, 'attach'>, contexts: Pick<ProjectContexts, 'ids' | 'peek' | 'onContextBuilt'>): void;
41
48
  /** The origin a local client reaches this cockpit at: `CEZ_COCKPIT_URL` and the task webhook's links (hearsay-tools/cezarion#774, hearsay-tools/cezarion#594). */
@@ -19,6 +19,7 @@ import { openFileInDefaultApp, openInApp } from './open-in-app.js';
19
19
  import { openInTerminal } from './open-in-terminal.js';
20
20
  import { unavailableProviderMessage } from './provider-action-gate.js';
21
21
  import { probeNamedAccounts, scopeRunAccounts } from './run-accounts.js';
22
+ import { projectPaths } from '../project-paths.js';
22
23
  /**
23
24
  * Resolve each host-wide service to the injected dependency or its real default. A default is
24
25
  * built only when its dependency is absent (`??` short-circuits), in the order below, so a test
@@ -30,7 +31,7 @@ export function resolveServerDeps(deps, bootRoot) {
30
31
  // One adapter per contract-advertised runner; the map is typed over `modelDiscoveryRunnerSchema`
31
32
  // so a runner added to the contract without an adapter fails typecheck (AGENT_PROTOCOL.md §10).
32
33
  skillCatalog: deps.skillCatalog ?? new RunnerSkillCatalog({ adapters: hostSkillCatalogAdapters() }),
33
- modelCatalog: deps.modelCatalog ?? new RunnerModelCatalog({ adapters: hostModelCatalogAdapters(bootRoot) }),
34
+ modelCatalog: deps.modelCatalog ?? new RunnerModelCatalog({ adapters: hostModelCatalogAdapters(bootRoot ?? process.cwd()) }),
34
35
  providerAuth: deps.providerAuth ?? new ProviderAuthService(),
35
36
  detectEnvironment: deps.detectEnvironment ?? detectEnvironment,
36
37
  workspaceConfig: deps.workspaceConfig ?? {
@@ -111,9 +112,30 @@ export function createBootContext(deps, bootRoot, bootDataDir) {
111
112
  state: createProjectPluginState(deps.bootProjectState),
112
113
  };
113
114
  }
114
- /** Watch the boot store, every context already built, and each store or context built later. */
115
+ /** Build the boot project's context when `repoRoot` is set, or return `undefined` with `--no-project`. */
116
+ export function createOptionalBootContext(deps) {
117
+ if (deps.repoRoot === undefined)
118
+ return undefined;
119
+ if (!deps.store || !deps.manager) {
120
+ throw new Error('createApp requires store and manager whenever repoRoot is provided');
121
+ }
122
+ return createBootContext({ ...deps, store: deps.store, manager: deps.manager }, deps.repoRoot, projectPaths(deps.repoRoot).write);
123
+ }
124
+ /** Run `attach` once on the optional boot context, every already-built context, and each one built later. */
125
+ export function attachLoadedProjects(bootContext, contexts, attach) {
126
+ if (bootContext)
127
+ attach(bootContext);
128
+ for (const id of contexts.ids()) {
129
+ const ctx = contexts.peek(id);
130
+ if (ctx)
131
+ attach(ctx);
132
+ }
133
+ contexts.onContextBuilt(attach);
134
+ }
135
+ /** Watch the boot store (when present), every context already built, and each store or context built later. */
115
136
  export function watchProviderRuntimeAuth(providerRuntimeAuth, bootContext, contexts) {
116
- providerRuntimeAuth.watch(bootContext.store);
137
+ if (bootContext)
138
+ providerRuntimeAuth.watch(bootContext.store);
117
139
  for (const id of contexts.ids()) {
118
140
  const ctx = contexts.peek(id);
119
141
  if (ctx)
@@ -124,12 +146,7 @@ export function watchProviderRuntimeAuth(providerRuntimeAuth, bootContext, conte
124
146
  }
125
147
  /** Injected contexts (tests) skip `prepareManager`; attach those now, and each one built later. */
126
148
  export function attachProjectWebhooks(taskWebhooks, contexts) {
127
- for (const id of contexts.ids()) {
128
- const ctx = contexts.peek(id);
129
- if (ctx)
130
- taskWebhooks.attach(ctx);
131
- }
132
- contexts.onContextBuilt((ctx) => taskWebhooks.attach(ctx));
149
+ attachLoadedProjects(undefined, contexts, (ctx) => taskWebhooks.attach(ctx));
133
150
  }
134
151
  function taskWebhookHost(bindHost) {
135
152
  if (!bindHost || bindHost === '0.0.0.0' || bindHost === '::')
@@ -1 +1 @@
1
- {"version":3,"file":"server-deps.js","sourceRoot":"","sources":["../../src/server/server-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAE3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAqB,MAAM,mBAAmB,CAAC;AAU5F;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAiE,EAAE,QAAgB;IACnH,MAAM,IAAI,GAAG,IAAI,CAAC,IAA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,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IACD,QAAQ,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,QAAQ,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,qBAAqB,CACnC,YAA0C,EAC1C,QAAkE;IAElE,oBAAoB,CAAC,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,eAAe,CAAC,QAA4B;IACnD,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IACjF,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAED,kKAAkK;AAClK,MAAM,UAAU,gBAAgB,CAAC,QAA4B,EAAE,IAAY;IACzE,OAAO,UAAU,eAAe,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;AACvD,CAAC"}
@@ -7,6 +7,7 @@ import { type WorkerCleanupFactory } from '../delegation/service.ts';
7
7
  import type { DelegationController } from '../delegation/provision.ts';
8
8
  import { Hono } from 'hono';
9
9
  import { TaskWebhooks } from '../runs/webhook.ts';
10
+ import type { RunnerFactory } from '../core/agent-runner.ts';
10
11
  import type { HttpRouteDefinition } from '../core/http-route-registry.ts';
11
12
  import type { ServerHookDefinition } from '../core/server-hook-registry.ts';
12
13
  import { type detectEnvironment } from '../core/backend-detect.ts';
@@ -43,9 +44,14 @@ export interface ServerDeps extends ActivityServerDeps {
43
44
  /** Same-process optional private listener; attached to managers before recovery. Without it, `workerCleanup` lets the fallback service destroy workers. */
44
45
  delegation?: DelegationController;
45
46
  workerCleanup?: WorkerCleanupFactory;
46
- repoRoot: string;
47
- store: RunStore;
48
- manager: ProjectRunManager;
47
+ /** Boot project root. Absent when the server starts with `--no-project`. */
48
+ repoRoot?: string | undefined;
49
+ /** Boot project run store. Required whenever `repoRoot` is set. */
50
+ store?: RunStore | undefined;
51
+ /** Boot project run manager. Required whenever `repoRoot` is set. */
52
+ manager?: ProjectRunManager | undefined;
53
+ /** Runner factory for lazily built project managers when no boot manager is present. */
54
+ createRunner?: RunnerFactory | undefined;
49
55
  version: string;
50
56
  /** Mutable holder for the async npm-registry update check (#368) —
51
57
  * `latest` appears once the registry answers with a newer version. */
@@ -211,7 +217,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
211
217
  output: {
212
218
  version: string;
213
219
  latestVersion?: string | undefined;
214
- repoRoot: string;
220
+ repoRoot: string | null;
215
221
  repo: {
216
222
  root: string;
217
223
  branch: string;
@@ -244,7 +250,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
244
250
  id: string;
245
251
  name: string;
246
252
  }[];
247
- bootProject: string;
253
+ bootProject: string | null;
248
254
  plugins: {
249
255
  loaded: {
250
256
  name: string;
@@ -1961,6 +1967,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
1961
1967
  } & {
1962
1968
  "/workspace/agent-profiles/selection": {
1963
1969
  $put: {
1970
+ output: {
1971
+ error: string;
1972
+ code: "no-boot-project";
1973
+ };
1974
+ outputFormat: "json";
1975
+ status: 409;
1976
+ input: {
1977
+ json: {
1978
+ projectId: string;
1979
+ provider: string;
1980
+ profileId: string | null;
1981
+ };
1982
+ };
1983
+ } | {
1964
1984
  output: {
1965
1985
  error: string;
1966
1986
  };
@@ -2117,7 +2137,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2117
2137
  agent: boolean;
2118
2138
  }[] | undefined;
2119
2139
  }[];
2120
- bootProject: string;
2140
+ bootProject: string | null;
2121
2141
  projectsDir: string;
2122
2142
  };
2123
2143
  outputFormat: "json";
@@ -2223,6 +2243,18 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2223
2243
  } & {
2224
2244
  "/projects/:projectId": {
2225
2245
  $delete: {
2246
+ output: {
2247
+ error: string;
2248
+ code?: "no-boot-project" | undefined;
2249
+ };
2250
+ outputFormat: "json";
2251
+ status: 404 | 409;
2252
+ input: {
2253
+ param: {
2254
+ projectId: string;
2255
+ };
2256
+ };
2257
+ } | {
2226
2258
  output: {
2227
2259
  error: string;
2228
2260
  };
@@ -2272,6 +2304,28 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2272
2304
  } & {
2273
2305
  "/projects/:projectId": {
2274
2306
  $patch: {
2307
+ output: {
2308
+ error: string;
2309
+ code?: "no-boot-project" | undefined;
2310
+ };
2311
+ outputFormat: "json";
2312
+ status: 404 | 409;
2313
+ input: {
2314
+ json: {
2315
+ maxParallel?: number | null | undefined;
2316
+ tags?: string[] | null | undefined;
2317
+ webhook?: {
2318
+ url: string;
2319
+ token?: string | undefined;
2320
+ triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
2321
+ } | null | undefined;
2322
+ };
2323
+ } & {
2324
+ param: {
2325
+ projectId: string;
2326
+ };
2327
+ };
2328
+ } | {
2275
2329
  output: {
2276
2330
  error: string;
2277
2331
  };
@@ -2367,6 +2421,18 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2367
2421
  } & {
2368
2422
  "/projects/:projectId/webhook/test": {
2369
2423
  $post: {
2424
+ output: {
2425
+ error: string;
2426
+ code: "no-boot-project";
2427
+ };
2428
+ outputFormat: "json";
2429
+ status: 409;
2430
+ input: {
2431
+ param: {
2432
+ projectId: string;
2433
+ };
2434
+ };
2435
+ } | {
2370
2436
  output: {
2371
2437
  error: string;
2372
2438
  };
@@ -2409,6 +2475,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2409
2475
  $post: {
2410
2476
  output: {
2411
2477
  error: string;
2478
+ code?: "no-boot-project" | undefined;
2412
2479
  };
2413
2480
  outputFormat: "json";
2414
2481
  status: 400 | 404 | 409 | 500;
@@ -2576,6 +2643,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2576
2643
  } | {
2577
2644
  output: {
2578
2645
  error: string;
2646
+ code?: "no-boot-project" | undefined;
2579
2647
  };
2580
2648
  outputFormat: "json";
2581
2649
  status: 400 | 404 | 409 | 500;
@@ -2655,6 +2723,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2655
2723
  } | {
2656
2724
  output: {
2657
2725
  error: string;
2726
+ code?: "no-boot-project" | undefined;
2658
2727
  };
2659
2728
  outputFormat: "json";
2660
2729
  status: 400 | 404 | 409 | 500;
@@ -2696,6 +2765,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
2696
2765
  webhookId: string;
2697
2766
  };
2698
2767
  };
2768
+ } | {
2769
+ output: {
2770
+ error: string;
2771
+ code: "no-boot-project";
2772
+ };
2773
+ outputFormat: "json";
2774
+ status: 409;
2775
+ input: {
2776
+ param: {
2777
+ projectId: string;
2778
+ webhookId: string;
2779
+ };
2780
+ };
2699
2781
  } | {
2700
2782
  output: {
2701
2783
  error: string;
@@ -1,4 +1,3 @@
1
- import { projectPaths } from '../project-paths.js';
2
1
  import { reportsRoutes } from './reports-api.js';
3
2
  import { CheckoutProgressCache } from './checkout-progress.js';
4
3
  import { createWorkspaceLiveRoutes } from './workspace-live-routes.js';
@@ -35,7 +34,7 @@ import { openRemoteForge, resolveProjectForge as resolveRegistryForge } from './
35
34
  import { withProjectAdmission } from './cockpit-ownership.js';
36
35
  import { prepareProject, prepareProjects } from '../project-migration/auto.js';
37
36
  import { ProviderRuntimeAuthObserver } from './provider-auth-runtime.js';
38
- import { attachProjectWebhooks, createBootContext, createProviderStatus, resolveServerDeps, watchProviderRuntimeAuth } from './server-deps.js';
37
+ import { attachLoadedProjects, attachProjectWebhooks, createOptionalBootContext, createProviderStatus, resolveServerDeps, watchProviderRuntimeAuth } from './server-deps.js';
39
38
  import { ASSET_CACHE_CONTROL, BUILD_HINT_HTML, assetContentType, isSafeAssetFilename, resolveGetRequest, } from './static-ui.js';
40
39
  import { compression, createStaticAssets, isFile } from './static-assets.js';
41
40
  import { registerBrandFileRoutes } from './brand-file-routes.js';
@@ -103,7 +102,6 @@ export function createApp(deps) {
103
102
  // handler body would silently pin it to the boot project, which the rename
104
103
  // turns into a compile error instead.
105
104
  const bootRoot = deps.repoRoot;
106
- const bootDataDir = projectPaths(bootRoot).write;
107
105
  // The host-wide services and the provider closures built on them live in `./server-deps.ts`.
108
106
  const { skillCatalog, modelCatalog, providerAuth, workspaceConfig, openTerminal, openFile, openApp, detectEnvironment } = resolveServerDeps(deps, bootRoot);
109
107
  const { providerStatus, providerActionError, invalidateHostModels } = createProviderStatus({ modelCatalog, providerAuth, workspaceConfig }, deps.home);
@@ -137,13 +135,14 @@ export function createApp(deps) {
137
135
  // and since step 2.3 the per-dataDir watch is created lazily by the first
138
136
  // SSE subscription (and torn down with the last), nothing to start here.
139
137
  // ---- project contexts (multi-project spec, step 2.2) ---------------------
140
- // The boot project's context is SEEDED from the deps the caller already built (`createBootContext`).
141
- const bootContext = createBootContext(deps, bootRoot, bootDataDir);
138
+ // The boot project's context is SEEDED from the deps the caller already built (`createOptionalBootContext`).
139
+ const bootContext = createOptionalBootContext(deps);
142
140
  // The task webhook (#589): attached before any recovery — the boot store by `index.ts`, lazy
143
141
  // projects through `prepareManager` below. Attaching is idempotent, so the calls here only
144
142
  // cover an app built without boot's wiring (tests, embedded servers).
145
143
  const taskWebhooks = createTaskWebhooks(deps, '');
146
- taskWebhooks.attach(bootContext);
144
+ if (bootContext)
145
+ taskWebhooks.attach(bootContext);
147
146
  // Non-boot projects build lazily on first scoped request; their managers
148
147
  // count against the same workspace semaphore as the boot manager (step 2.5).
149
148
  const contexts = createWorkspaceProjectContexts(deps, taskWebhooks, {
@@ -159,14 +158,7 @@ export function createApp(deps) {
159
158
  ?? new ProviderRuntimeAuthObserver(providerAuth, (status) => {
160
159
  workspaceEvents.emit('provider-status', status);
161
160
  }, undefined, deps.home);
162
- const attachSkillCatalog = (project) => project.manager?.setSkillCatalog?.(skillCatalog);
163
- attachSkillCatalog(bootContext);
164
- for (const id of contexts.ids()) {
165
- const project = contexts.peek(id);
166
- if (project)
167
- attachSkillCatalog(project);
168
- }
169
- contexts.onContextBuilt(attachSkillCatalog);
161
+ attachLoadedProjects(bootContext, contexts, (project) => project.manager?.setSkillCatalog?.(skillCatalog));
170
162
  watchProviderRuntimeAuth(providerRuntimeAuth, bootContext, contexts);
171
163
  attachProjectWebhooks(taskWebhooks, contexts);
172
164
  // #667: recovery ran inside the build, before any workspace stream attached to this project's
@@ -254,17 +246,21 @@ export function createApp(deps) {
254
246
  // Resolve default and boot ids to the boot context; context failures map through projectFailure.
255
247
  const resolveProjectScope = async (c, next) => {
256
248
  const raw = c.req.param('projectId');
249
+ // `v1` mounts on `/api/v1` ahead of `workspaceV1`, so this middleware also runs on workspace
250
+ // routes (`/health`, `/projects`, `/workspace/*`, plugin workspace routes). Skip scope
251
+ // resolution for unscoped requests that do not match any registered project route.
252
+ if (raw === undefined && !servesProjectRoute(c))
253
+ return next();
257
254
  let project;
258
255
  try {
259
256
  project = await workspaceProjects.resolveProject(raw);
260
257
  }
261
258
  catch (err) {
262
259
  const failure = workspaceProjects.projectFailure(err, raw ?? 'default');
263
- return c.json({ error: failure.error }, failure.status);
260
+ return c.json({ error: failure.error, ...(failure.code ? { code: failure.code } : {}) }, failure.status);
264
261
  }
265
262
  // The boot project's store could not open (#779): its runs are unknown, not absent, so its
266
- // routes answer with why rather than as an empty project. Only its routes: this resolver also
267
- // runs in front of every workspace route (`/health` above all), which must keep answering.
263
+ // routes answer with why rather than as an empty project.
268
264
  if (project.store.unavailable && servesProjectRoute(c))
269
265
  return c.json({ error: project.store.unavailable.message }, 409);
270
266
  c.set('project', project);
@@ -368,13 +364,15 @@ export function createApp(deps) {
368
364
  const healthSnapshot = async () => {
369
365
  const [checks, repo, config, workspace] = await Promise.all([
370
366
  backendChecks.read(),
371
- getRepoInfo(bootRoot),
367
+ bootRoot !== undefined ? getRepoInfo(bootRoot) : Promise.resolve(null),
372
368
  healthConfig(bootRoot, deps.home),
373
369
  workspaceSummary(),
374
370
  ]);
375
371
  bootRepoRoot = repo?.root;
376
372
  // The registry match reads the remote health already has, so health reads Git once.
377
- const projectForge = deps.projectForge ? await deps.projectForge(bootRoot) : openRemoteForge(bootRoot, repo?.remote);
373
+ const projectForge = bootRoot === undefined
374
+ ? null
375
+ : (deps.projectForge ? await deps.projectForge(bootRoot) : openRemoteForge(bootRoot, repo?.remote));
378
376
  // Callers outside the cockpit read this JSON.
379
377
  const caps = capabilities();
380
378
  return {
@@ -387,7 +385,7 @@ export function createApp(deps) {
387
385
  // Health is CORS-open and, in hosted mode, reachable off the loopback (#431). Local mode
388
386
  // keeps full paths; hosted/remote mode trims repoRoot and repo.root to basenames so host
389
387
  // checkout paths and usernames are never exposed.
390
- repoRoot: caps.localHandoff ? bootRoot : basename(bootRoot),
388
+ repoRoot: bootRoot === undefined ? null : (caps.localHandoff ? bootRoot : basename(bootRoot)),
391
389
  repo: trimHealthRepo(repo, caps.localHandoff),
392
390
  checks,
393
391
  defaultRunner: config.defaultRunner,
@@ -415,7 +413,7 @@ export function createApp(deps) {
415
413
  // snapshot cached in local mode must not send them once the cockpit is hosted.
416
414
  const inCurrentMode = (payload) => {
417
415
  const caps = capabilities();
418
- const repoRoot = caps.localHandoff ? bootRoot : basename(bootRoot);
416
+ const repoRoot = bootRoot === undefined ? null : (caps.localHandoff ? bootRoot : basename(bootRoot));
419
417
  return { ...payload, capabilities: caps, repoRoot, repo: trimHealthRepo(payload.repo, caps.localHandoff, bootRepoRoot), plugins: pluginHealth(pluginLoadReport(), { hostPaths: caps.localHandoff }) };
420
418
  };
421
419
  const healthCache = createHealthCache({
@@ -606,14 +604,14 @@ export function createApp(deps) {
606
604
  // One run feed for every workspace stream connection (hearsay-tools/cezarion#2730): one store
607
605
  // subscription per project, one process-wide `seq`, each frame built once per mode.
608
606
  const workspaceRunFeed = createWorkspaceRunFeed({
609
- bootStore: bootContext.store, contexts, onWorkspaceEvent: (listener) => workspaceEvents.on(listener),
607
+ bootStore: bootContext?.store, contexts, onWorkspaceEvent: (listener) => workspaceEvents.on(listener),
610
608
  onUsage, allUsage, withLiveUsage,
611
609
  });
612
610
  const serverPluginHost = createServerPluginHost({
613
611
  serverHooks: deps.serverHooks,
614
612
  context: {
615
613
  home: deps.home,
616
- bootProjectId: deps.bootProjectId ?? 'default',
614
+ bootProjectId: bootContext ? (deps.bootProjectId ?? 'default') : undefined,
617
615
  capabilities,
618
616
  modelCatalog,
619
617
  providerStatus,
@@ -634,13 +632,7 @@ export function createApp(deps) {
634
632
  },
635
633
  });
636
634
  serverPluginHost.runOnAppCreated();
637
- serverPluginHost.runOnProjectContextBuilt(bootContext);
638
- for (const id of contexts.ids()) {
639
- const project = contexts.peek(id);
640
- if (project)
641
- serverPluginHost.runOnProjectContextBuilt(project);
642
- }
643
- contexts.onContextBuilt((project) => serverPluginHost.runOnProjectContextBuilt(project));
635
+ attachLoadedProjects(bootContext, contexts, (project) => serverPluginHost.runOnProjectContextBuilt(project));
644
636
  contexts.onContextDisposed((project) => serverPluginHost.runOnProjectContextDisposed(project));
645
637
  const runsRoutes = createRunsRoutes({
646
638
  home: deps.home,