@openrig/cli 0.5.12 → 0.5.13

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 (413) hide show
  1. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  2. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +50 -4
  3. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  4. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  5. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
  6. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  7. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  8. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  9. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  10. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  11. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  12. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  13. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  14. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  15. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  16. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  17. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  18. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  19. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  21. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  22. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  23. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  54. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  55. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  56. package/daemon/dist/attention-surface.d.ts +36 -0
  57. package/daemon/dist/attention-surface.d.ts.map +1 -0
  58. package/daemon/dist/attention-surface.js +2 -0
  59. package/daemon/dist/attention-surface.js.map +1 -0
  60. package/daemon/dist/build-info.js +3 -3
  61. package/daemon/dist/db/all-migrations.d.ts +1 -1
  62. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  63. package/daemon/dist/db/all-migrations.js +3 -1
  64. package/daemon/dist/db/all-migrations.js.map +1 -1
  65. package/daemon/dist/db/migrations/080_scoped_operating_posture.d.ts +4 -0
  66. package/daemon/dist/db/migrations/080_scoped_operating_posture.d.ts.map +1 -0
  67. package/daemon/dist/db/migrations/080_scoped_operating_posture.js +21 -0
  68. package/daemon/dist/db/migrations/080_scoped_operating_posture.js.map +1 -0
  69. package/daemon/dist/domain/execution-view.d.ts +1 -0
  70. package/daemon/dist/domain/execution-view.d.ts.map +1 -1
  71. package/daemon/dist/domain/execution-view.js +20 -14
  72. package/daemon/dist/domain/execution-view.js.map +1 -1
  73. package/daemon/dist/domain/files/file-read.d.ts +17 -0
  74. package/daemon/dist/domain/files/file-read.d.ts.map +1 -0
  75. package/daemon/dist/domain/files/file-read.js +24 -0
  76. package/daemon/dist/domain/files/file-read.js.map +1 -0
  77. package/daemon/dist/domain/gateway/connections-projection.d.ts +4 -4
  78. package/daemon/dist/domain/health-context.d.ts +3 -0
  79. package/daemon/dist/domain/health-context.d.ts.map +1 -1
  80. package/daemon/dist/domain/health-context.js +78 -6
  81. package/daemon/dist/domain/health-context.js.map +1 -1
  82. package/daemon/dist/domain/health-detectors.d.ts +2 -1
  83. package/daemon/dist/domain/health-detectors.d.ts.map +1 -1
  84. package/daemon/dist/domain/health-detectors.js +8 -2
  85. package/daemon/dist/domain/health-detectors.js.map +1 -1
  86. package/daemon/dist/domain/health-diagnosis.d.ts +51 -1
  87. package/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
  88. package/daemon/dist/domain/health-diagnosis.js +60 -9
  89. package/daemon/dist/domain/health-diagnosis.js.map +1 -1
  90. package/daemon/dist/domain/health-passive-ceremony.d.ts +7 -1
  91. package/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
  92. package/daemon/dist/domain/health-passive-ceremony.js +59 -26
  93. package/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
  94. package/daemon/dist/domain/health-projection.d.ts +2 -0
  95. package/daemon/dist/domain/health-projection.d.ts.map +1 -1
  96. package/daemon/dist/domain/health-projection.js.map +1 -1
  97. package/daemon/dist/domain/rig-mode/operating-posture.d.ts +49 -0
  98. package/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -0
  99. package/daemon/dist/domain/rig-mode/operating-posture.js +255 -0
  100. package/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -0
  101. package/daemon/dist/domain/rig-mode/rig-mode-defaults.d.ts.map +1 -1
  102. package/daemon/dist/domain/rig-mode/rig-mode-defaults.js +20 -0
  103. package/daemon/dist/domain/rig-mode/rig-mode-defaults.js.map +1 -1
  104. package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts +2 -2
  105. package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -1
  106. package/daemon/dist/domain/rig-mode/rig-mode-store.js +19 -3
  107. package/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -1
  108. package/daemon/dist/domain/rig-mode/rig-mode-types.d.ts +12 -7
  109. package/daemon/dist/domain/rig-mode/rig-mode-types.d.ts.map +1 -1
  110. package/daemon/dist/domain/rig-mode/rig-mode-types.js +14 -3
  111. package/daemon/dist/domain/rig-mode/rig-mode-types.js.map +1 -1
  112. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +1 -0
  113. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  114. package/daemon/dist/domain/slices/slice-detail-projector.js +3 -0
  115. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  116. package/daemon/dist/domain/slices/slice-indexer.d.ts +4 -0
  117. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  118. package/daemon/dist/domain/slices/slice-indexer.js +10 -1
  119. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  120. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +2 -0
  121. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  122. package/daemon/dist/domain/terminal/herdr-adapter.js +1 -1
  123. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  124. package/daemon/dist/domain/terminal/terminal-service.d.ts +28 -2
  125. package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  126. package/daemon/dist/domain/terminal/terminal-service.js +50 -13
  127. package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  128. package/daemon/dist/domain/view-projector.d.ts +2 -0
  129. package/daemon/dist/domain/view-projector.d.ts.map +1 -1
  130. package/daemon/dist/domain/view-projector.js +1 -1
  131. package/daemon/dist/domain/view-projector.js.map +1 -1
  132. package/daemon/dist/domain/workspace/project-catalog.d.ts +18 -0
  133. package/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -0
  134. package/daemon/dist/domain/workspace/project-catalog.js +66 -0
  135. package/daemon/dist/domain/workspace/project-catalog.js.map +1 -0
  136. package/daemon/dist/domain/workspace/project-read.d.ts +29 -0
  137. package/daemon/dist/domain/workspace/project-read.d.ts.map +1 -0
  138. package/daemon/dist/domain/workspace/project-read.js +107 -0
  139. package/daemon/dist/domain/workspace/project-read.js.map +1 -0
  140. package/daemon/dist/health-projection-surface.d.ts +1 -0
  141. package/daemon/dist/health-projection-surface.d.ts.map +1 -1
  142. package/daemon/dist/local-reading-surface.d.ts +3 -0
  143. package/daemon/dist/local-reading-surface.d.ts.map +1 -0
  144. package/daemon/dist/local-reading-surface.js +3 -0
  145. package/daemon/dist/local-reading-surface.js.map +1 -0
  146. package/daemon/dist/project-catalog-surface.d.ts +2 -0
  147. package/daemon/dist/project-catalog-surface.d.ts.map +1 -0
  148. package/daemon/dist/project-catalog-surface.js +2 -0
  149. package/daemon/dist/project-catalog-surface.js.map +1 -0
  150. package/daemon/dist/routes/attention.d.ts +3 -0
  151. package/daemon/dist/routes/attention.d.ts.map +1 -0
  152. package/daemon/dist/routes/attention.js +155 -0
  153. package/daemon/dist/routes/attention.js.map +1 -0
  154. package/daemon/dist/routes/files.d.ts +1 -1
  155. package/daemon/dist/routes/files.d.ts.map +1 -1
  156. package/daemon/dist/routes/files.js +4 -24
  157. package/daemon/dist/routes/files.js.map +1 -1
  158. package/daemon/dist/routes/rig-mode.d.ts.map +1 -1
  159. package/daemon/dist/routes/rig-mode.js +67 -14
  160. package/daemon/dist/routes/rig-mode.js.map +1 -1
  161. package/daemon/dist/routes/scopes.d.ts.map +1 -1
  162. package/daemon/dist/routes/scopes.js +48 -3
  163. package/daemon/dist/routes/scopes.js.map +1 -1
  164. package/daemon/dist/routes/slices.d.ts +2 -2
  165. package/daemon/dist/routes/slices.d.ts.map +1 -1
  166. package/daemon/dist/routes/slices.js +18 -1
  167. package/daemon/dist/routes/slices.js.map +1 -1
  168. package/daemon/dist/routes/spec-library.d.ts.map +1 -1
  169. package/daemon/dist/routes/spec-library.js +11 -2
  170. package/daemon/dist/routes/spec-library.js.map +1 -1
  171. package/daemon/dist/routes/terminal.d.ts.map +1 -1
  172. package/daemon/dist/routes/terminal.js +14 -4
  173. package/daemon/dist/routes/terminal.js.map +1 -1
  174. package/daemon/dist/routes/views.d.ts.map +1 -1
  175. package/daemon/dist/routes/views.js +11 -1
  176. package/daemon/dist/routes/views.js.map +1 -1
  177. package/daemon/dist/server.d.ts +1 -0
  178. package/daemon/dist/server.d.ts.map +1 -1
  179. package/daemon/dist/server.js +3 -0
  180. package/daemon/dist/server.js.map +1 -1
  181. package/daemon/dist/startup.d.ts.map +1 -1
  182. package/daemon/dist/startup.js +8 -4
  183. package/daemon/dist/startup.js.map +1 -1
  184. package/daemon/docs/reference/getting-started.md +13 -1
  185. package/daemon/docs/reference/health-diagnosis.md +83 -6
  186. package/daemon/docs/reference/project-workspace.md +23 -0
  187. package/daemon/docs/reference/scoped-operating-posture.md +95 -0
  188. package/dist/build-info.js +3 -3
  189. package/dist/commands/context.d.ts.map +1 -1
  190. package/dist/commands/context.js +66 -124
  191. package/dist/commands/context.js.map +1 -1
  192. package/dist/commands/health.d.ts.map +1 -1
  193. package/dist/commands/health.js +17 -2
  194. package/dist/commands/health.js.map +1 -1
  195. package/dist/commands/rig-mode.d.ts +2 -2
  196. package/dist/commands/rig-mode.d.ts.map +1 -1
  197. package/dist/commands/rig-mode.js +36 -11
  198. package/dist/commands/rig-mode.js.map +1 -1
  199. package/dist/lib/context-git.d.ts +141 -0
  200. package/dist/lib/context-git.d.ts.map +1 -0
  201. package/dist/lib/context-git.js +256 -0
  202. package/dist/lib/context-git.js.map +1 -0
  203. package/dist/lib/context-install.d.ts +5 -0
  204. package/dist/lib/context-install.d.ts.map +1 -0
  205. package/dist/lib/context-install.js +125 -0
  206. package/dist/lib/context-install.js.map +1 -0
  207. package/dist/lib/work-install.d.ts.map +1 -1
  208. package/dist/lib/work-install.js +11 -36
  209. package/dist/lib/work-install.js.map +1 -1
  210. package/dist/local-reading.d.ts +31 -0
  211. package/dist/local-reading.d.ts.map +1 -0
  212. package/dist/local-reading.js +62 -0
  213. package/dist/local-reading.js.map +1 -0
  214. package/node_modules/@openrig/daemon/dist/attention-surface.d.ts +36 -0
  215. package/node_modules/@openrig/daemon/dist/attention-surface.d.ts.map +1 -0
  216. package/node_modules/@openrig/daemon/dist/attention-surface.js +2 -0
  217. package/node_modules/@openrig/daemon/dist/attention-surface.js.map +1 -0
  218. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  219. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
  220. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
  221. package/node_modules/@openrig/daemon/dist/db/all-migrations.js +3 -1
  222. package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
  223. package/node_modules/@openrig/daemon/dist/db/migrations/080_scoped_operating_posture.d.ts +4 -0
  224. package/node_modules/@openrig/daemon/dist/db/migrations/080_scoped_operating_posture.d.ts.map +1 -0
  225. package/node_modules/@openrig/daemon/dist/db/migrations/080_scoped_operating_posture.js +21 -0
  226. package/node_modules/@openrig/daemon/dist/db/migrations/080_scoped_operating_posture.js.map +1 -0
  227. package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts +1 -0
  228. package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts.map +1 -1
  229. package/node_modules/@openrig/daemon/dist/domain/execution-view.js +20 -14
  230. package/node_modules/@openrig/daemon/dist/domain/execution-view.js.map +1 -1
  231. package/node_modules/@openrig/daemon/dist/domain/files/file-read.d.ts +17 -0
  232. package/node_modules/@openrig/daemon/dist/domain/files/file-read.d.ts.map +1 -0
  233. package/node_modules/@openrig/daemon/dist/domain/files/file-read.js +24 -0
  234. package/node_modules/@openrig/daemon/dist/domain/files/file-read.js.map +1 -0
  235. package/node_modules/@openrig/daemon/dist/domain/gateway/connections-projection.d.ts +4 -4
  236. package/node_modules/@openrig/daemon/dist/domain/health-context.d.ts +3 -0
  237. package/node_modules/@openrig/daemon/dist/domain/health-context.d.ts.map +1 -1
  238. package/node_modules/@openrig/daemon/dist/domain/health-context.js +78 -6
  239. package/node_modules/@openrig/daemon/dist/domain/health-context.js.map +1 -1
  240. package/node_modules/@openrig/daemon/dist/domain/health-detectors.d.ts +2 -1
  241. package/node_modules/@openrig/daemon/dist/domain/health-detectors.d.ts.map +1 -1
  242. package/node_modules/@openrig/daemon/dist/domain/health-detectors.js +8 -2
  243. package/node_modules/@openrig/daemon/dist/domain/health-detectors.js.map +1 -1
  244. package/node_modules/@openrig/daemon/dist/domain/health-diagnosis.d.ts +51 -1
  245. package/node_modules/@openrig/daemon/dist/domain/health-diagnosis.d.ts.map +1 -1
  246. package/node_modules/@openrig/daemon/dist/domain/health-diagnosis.js +60 -9
  247. package/node_modules/@openrig/daemon/dist/domain/health-diagnosis.js.map +1 -1
  248. package/node_modules/@openrig/daemon/dist/domain/health-passive-ceremony.d.ts +7 -1
  249. package/node_modules/@openrig/daemon/dist/domain/health-passive-ceremony.d.ts.map +1 -1
  250. package/node_modules/@openrig/daemon/dist/domain/health-passive-ceremony.js +59 -26
  251. package/node_modules/@openrig/daemon/dist/domain/health-passive-ceremony.js.map +1 -1
  252. package/node_modules/@openrig/daemon/dist/domain/health-projection.d.ts +2 -0
  253. package/node_modules/@openrig/daemon/dist/domain/health-projection.d.ts.map +1 -1
  254. package/node_modules/@openrig/daemon/dist/domain/health-projection.js.map +1 -1
  255. package/node_modules/@openrig/daemon/dist/domain/rig-mode/operating-posture.d.ts +49 -0
  256. package/node_modules/@openrig/daemon/dist/domain/rig-mode/operating-posture.d.ts.map +1 -0
  257. package/node_modules/@openrig/daemon/dist/domain/rig-mode/operating-posture.js +255 -0
  258. package/node_modules/@openrig/daemon/dist/domain/rig-mode/operating-posture.js.map +1 -0
  259. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-defaults.d.ts.map +1 -1
  260. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-defaults.js +20 -0
  261. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-defaults.js.map +1 -1
  262. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.d.ts +2 -2
  263. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -1
  264. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.js +19 -3
  265. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -1
  266. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.d.ts +12 -7
  267. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.d.ts.map +1 -1
  268. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.js +14 -3
  269. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.js.map +1 -1
  270. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts +1 -0
  271. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  272. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +3 -0
  273. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  274. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.d.ts +4 -0
  275. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  276. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.js +10 -1
  277. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  278. package/node_modules/@openrig/daemon/dist/domain/terminal/herdr-adapter.d.ts +2 -0
  279. package/node_modules/@openrig/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  280. package/node_modules/@openrig/daemon/dist/domain/terminal/herdr-adapter.js +1 -1
  281. package/node_modules/@openrig/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  282. package/node_modules/@openrig/daemon/dist/domain/terminal/terminal-service.d.ts +28 -2
  283. package/node_modules/@openrig/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
  284. package/node_modules/@openrig/daemon/dist/domain/terminal/terminal-service.js +50 -13
  285. package/node_modules/@openrig/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
  286. package/node_modules/@openrig/daemon/dist/domain/view-projector.d.ts +2 -0
  287. package/node_modules/@openrig/daemon/dist/domain/view-projector.d.ts.map +1 -1
  288. package/node_modules/@openrig/daemon/dist/domain/view-projector.js +1 -1
  289. package/node_modules/@openrig/daemon/dist/domain/view-projector.js.map +1 -1
  290. package/node_modules/@openrig/daemon/dist/domain/workspace/project-catalog.d.ts +18 -0
  291. package/node_modules/@openrig/daemon/dist/domain/workspace/project-catalog.d.ts.map +1 -0
  292. package/node_modules/@openrig/daemon/dist/domain/workspace/project-catalog.js +66 -0
  293. package/node_modules/@openrig/daemon/dist/domain/workspace/project-catalog.js.map +1 -0
  294. package/node_modules/@openrig/daemon/dist/domain/workspace/project-read.d.ts +29 -0
  295. package/node_modules/@openrig/daemon/dist/domain/workspace/project-read.d.ts.map +1 -0
  296. package/node_modules/@openrig/daemon/dist/domain/workspace/project-read.js +107 -0
  297. package/node_modules/@openrig/daemon/dist/domain/workspace/project-read.js.map +1 -0
  298. package/node_modules/@openrig/daemon/dist/health-projection-surface.d.ts +1 -0
  299. package/node_modules/@openrig/daemon/dist/health-projection-surface.d.ts.map +1 -1
  300. package/node_modules/@openrig/daemon/dist/local-reading-surface.d.ts +3 -0
  301. package/node_modules/@openrig/daemon/dist/local-reading-surface.d.ts.map +1 -0
  302. package/node_modules/@openrig/daemon/dist/local-reading-surface.js +3 -0
  303. package/node_modules/@openrig/daemon/dist/local-reading-surface.js.map +1 -0
  304. package/node_modules/@openrig/daemon/dist/project-catalog-surface.d.ts +2 -0
  305. package/node_modules/@openrig/daemon/dist/project-catalog-surface.d.ts.map +1 -0
  306. package/node_modules/@openrig/daemon/dist/project-catalog-surface.js +2 -0
  307. package/node_modules/@openrig/daemon/dist/project-catalog-surface.js.map +1 -0
  308. package/node_modules/@openrig/daemon/dist/routes/attention.d.ts +3 -0
  309. package/node_modules/@openrig/daemon/dist/routes/attention.d.ts.map +1 -0
  310. package/node_modules/@openrig/daemon/dist/routes/attention.js +155 -0
  311. package/node_modules/@openrig/daemon/dist/routes/attention.js.map +1 -0
  312. package/node_modules/@openrig/daemon/dist/routes/files.d.ts +1 -1
  313. package/node_modules/@openrig/daemon/dist/routes/files.d.ts.map +1 -1
  314. package/node_modules/@openrig/daemon/dist/routes/files.js +4 -24
  315. package/node_modules/@openrig/daemon/dist/routes/files.js.map +1 -1
  316. package/node_modules/@openrig/daemon/dist/routes/rig-mode.d.ts.map +1 -1
  317. package/node_modules/@openrig/daemon/dist/routes/rig-mode.js +67 -14
  318. package/node_modules/@openrig/daemon/dist/routes/rig-mode.js.map +1 -1
  319. package/node_modules/@openrig/daemon/dist/routes/scopes.d.ts.map +1 -1
  320. package/node_modules/@openrig/daemon/dist/routes/scopes.js +48 -3
  321. package/node_modules/@openrig/daemon/dist/routes/scopes.js.map +1 -1
  322. package/node_modules/@openrig/daemon/dist/routes/slices.d.ts +2 -2
  323. package/node_modules/@openrig/daemon/dist/routes/slices.d.ts.map +1 -1
  324. package/node_modules/@openrig/daemon/dist/routes/slices.js +18 -1
  325. package/node_modules/@openrig/daemon/dist/routes/slices.js.map +1 -1
  326. package/node_modules/@openrig/daemon/dist/routes/spec-library.d.ts.map +1 -1
  327. package/node_modules/@openrig/daemon/dist/routes/spec-library.js +11 -2
  328. package/node_modules/@openrig/daemon/dist/routes/spec-library.js.map +1 -1
  329. package/node_modules/@openrig/daemon/dist/routes/terminal.d.ts.map +1 -1
  330. package/node_modules/@openrig/daemon/dist/routes/terminal.js +14 -4
  331. package/node_modules/@openrig/daemon/dist/routes/terminal.js.map +1 -1
  332. package/node_modules/@openrig/daemon/dist/routes/views.d.ts.map +1 -1
  333. package/node_modules/@openrig/daemon/dist/routes/views.js +11 -1
  334. package/node_modules/@openrig/daemon/dist/routes/views.js.map +1 -1
  335. package/node_modules/@openrig/daemon/dist/server.d.ts +1 -0
  336. package/node_modules/@openrig/daemon/dist/server.d.ts.map +1 -1
  337. package/node_modules/@openrig/daemon/dist/server.js +3 -0
  338. package/node_modules/@openrig/daemon/dist/server.js.map +1 -1
  339. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  340. package/node_modules/@openrig/daemon/dist/startup.js +8 -4
  341. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  342. package/node_modules/@openrig/daemon/package.json +13 -1
  343. package/package.json +1 -1
  344. package/tui/dist/attention/attention-model.d.ts +4 -0
  345. package/tui/dist/attention/attention-model.d.ts.map +1 -0
  346. package/tui/dist/attention/attention-model.js +44 -0
  347. package/tui/dist/attention/attention-model.js.map +1 -0
  348. package/tui/dist/commands/help.d.ts +4 -0
  349. package/tui/dist/commands/help.d.ts.map +1 -0
  350. package/tui/dist/commands/help.js +42 -0
  351. package/tui/dist/commands/help.js.map +1 -0
  352. package/tui/dist/commands/registry.d.ts.map +1 -1
  353. package/tui/dist/commands/registry.js +13 -0
  354. package/tui/dist/commands/registry.js.map +1 -1
  355. package/tui/dist/config/config-model.d.ts.map +1 -1
  356. package/tui/dist/config/config-model.js +32 -8
  357. package/tui/dist/config/config-model.js.map +1 -1
  358. package/tui/dist/daemon-client.d.ts +25 -6
  359. package/tui/dist/daemon-client.d.ts.map +1 -1
  360. package/tui/dist/daemon-client.js +61 -11
  361. package/tui/dist/daemon-client.js.map +1 -1
  362. package/tui/dist/detail.d.ts.map +1 -1
  363. package/tui/dist/detail.js +20 -7
  364. package/tui/dist/detail.js.map +1 -1
  365. package/tui/dist/health/health-model.d.ts.map +1 -1
  366. package/tui/dist/health/health-model.js +26 -34
  367. package/tui/dist/health/health-model.js.map +1 -1
  368. package/tui/dist/hydrate.d.ts +1 -1
  369. package/tui/dist/hydrate.d.ts.map +1 -1
  370. package/tui/dist/hydrate.js +67 -16
  371. package/tui/dist/hydrate.js.map +1 -1
  372. package/tui/dist/input.d.ts.map +1 -1
  373. package/tui/dist/input.js +20 -3
  374. package/tui/dist/input.js.map +1 -1
  375. package/tui/dist/local-reading.d.ts +54 -0
  376. package/tui/dist/local-reading.d.ts.map +1 -0
  377. package/tui/dist/local-reading.js +122 -0
  378. package/tui/dist/local-reading.js.map +1 -0
  379. package/tui/dist/main.js +73 -29
  380. package/tui/dist/main.js.map +1 -1
  381. package/tui/dist/motion.d.ts +2 -0
  382. package/tui/dist/motion.d.ts.map +1 -1
  383. package/tui/dist/motion.js +4 -0
  384. package/tui/dist/motion.js.map +1 -1
  385. package/tui/dist/reading.d.ts +36 -0
  386. package/tui/dist/reading.d.ts.map +1 -0
  387. package/tui/dist/reading.js +89 -0
  388. package/tui/dist/reading.js.map +1 -0
  389. package/tui/dist/render.d.ts.map +1 -1
  390. package/tui/dist/render.js +136 -166
  391. package/tui/dist/render.js.map +1 -1
  392. package/tui/dist/scopes/scopes-model.d.ts +1 -0
  393. package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
  394. package/tui/dist/scopes/scopes-model.js.map +1 -1
  395. package/tui/dist/sections.d.ts.map +1 -1
  396. package/tui/dist/sections.js +4 -3
  397. package/tui/dist/sections.js.map +1 -1
  398. package/tui/dist/startup.d.ts +6 -0
  399. package/tui/dist/startup.d.ts.map +1 -1
  400. package/tui/dist/startup.js +59 -13
  401. package/tui/dist/startup.js.map +1 -1
  402. package/tui/dist/state.d.ts.map +1 -1
  403. package/tui/dist/state.js +101 -14
  404. package/tui/dist/state.js.map +1 -1
  405. package/tui/dist/stylize.d.ts.map +1 -1
  406. package/tui/dist/stylize.js +10 -1
  407. package/tui/dist/stylize.js.map +1 -1
  408. package/tui/dist/terminals/terminal-model.d.ts +55 -0
  409. package/tui/dist/terminals/terminal-model.d.ts.map +1 -0
  410. package/tui/dist/terminals/terminal-model.js +95 -0
  411. package/tui/dist/terminals/terminal-model.js.map +1 -0
  412. package/tui/dist/types.d.ts +73 -1
  413. package/tui/dist/types.d.ts.map +1 -1
@@ -1,3 +1,7 @@
1
+ import { helpScreen } from "./commands/help.js";
2
+ import { commandFocusVisible } from "./motion.js";
3
+ import { attentionLines } from "./attention/attention-model.js";
4
+ import { fileLines, externalLines, fileTargetForPath, referenceLines, referenceAction } from "./reading.js";
1
5
  import { DEFAULT_TIME_ZONE, displayTime } from "./time.js";
2
6
  import { startupLines } from "./startup.js";
3
7
  import { configLines } from "./config/config-model.js";
@@ -9,10 +13,8 @@ import { connectionsLines } from "./connections/connections-model.js";
9
13
  // SAME semantic actions commands produce (PIN 1). Isolated seam: a substrate
10
14
  // swap touches only this module (spike verdict revisit trigger).
11
15
  import { computeExplorerRows, findAgent, findSpec, findAgentBySession, agentsRunningSpec, agentsRunningSpecTargets, specDetailArrowsScroll } from "./state.js";
12
- import { filterPalette } from "./commands/palette.js";
13
16
  import { scopesContentLines } from "./scopes/scopes-model.js";
14
17
  import { executionContentLines, executionSliceStripLines } from "./execution/execution-model.js";
15
- import { COMMAND_REGISTRY } from "./commands/registry.js";
16
18
  import { navigatorDisplay } from "./navigator.js";
17
19
  import { renderGraphStyle } from "./topology/render-graph.js";
18
20
  import { buildPulseModel } from "./pulse/pulse-model.js";
@@ -22,6 +24,7 @@ import { buildLedgerExplorer } from "./crash-cart/ledger-explorer.js";
22
24
  import { runtimeMarkSegs } from "./topology/runtime-marks.js";
23
25
  import { barCells, flashActive, reducedMotion, spinnerFrame } from "./motion.js";
24
26
  import { explorerWidth, MOTION_FRAME_MS } from "./visual-layout.js";
27
+ import { terminalLines } from "./terminals/terminal-model.js";
25
28
  import { detailPage, fieldLine, sectionRule, listItem, alignedRow, LABEL_W, wrapDetailLines } from "./detail.js";
26
29
  import { healthAgentLines, healthDetailLines, healthListLines, healthSummaryLine } from "./health/health-model.js";
27
30
  function pad(text, width) {
@@ -434,11 +437,11 @@ function timeZoneLines(state, width) {
434
437
  listItem("Back · Esc", { type: "back" }),
435
438
  ], width);
436
439
  }
437
- function specTabsLine(state, name) {
440
+ function specTabsLine(state) {
438
441
  const active = state.viewTab === "topology" || state.viewTab === "yaml" ? state.viewTab : "configuration";
439
442
  const labels = ["topology", "configuration", "yaml"];
440
443
  const parts = labels.map((tab) => (tab === active ? `[ ${tab.toUpperCase()} ]` : ` ${tab.toUpperCase()} `));
441
- const text = `rig spec ${name} ${parts.join(" ")}`;
444
+ const text = parts.join(" ");
442
445
  return {
443
446
  text,
444
447
  zones: labels.map((tab, index) => {
@@ -469,6 +472,25 @@ function sourceProvenance(spec) {
469
472
  return "user library";
470
473
  return spec.sourceState === "library_item" ? "library" : "source unknown";
471
474
  }
475
+ function specSourceLines(spec, snap) {
476
+ if (!spec.sourcePath)
477
+ return [{ text: "Source path unavailable; no current-file claim." }];
478
+ const target = fileTargetForPath(spec.resolvedSourcePath ?? spec.sourcePath, snap.fileRoots ?? []) ?? { root: "", path: spec.sourcePath };
479
+ const lines = [fieldLine({ label: "source", value: `${displayPath(spec.sourcePath, 56)} · ${sourceProvenance(spec)}` }), listItem("View current source", { type: "file-open", target })];
480
+ if (!target.root)
481
+ lines.push({ text: "Source is not mapped to a configured readable root." });
482
+ if (target.root) {
483
+ lines.push({ text: `Readable root: ${target.root}` }, ...referenceLines(spec.description ?? "", target));
484
+ const markdownLinks = new Set([...((spec.description ?? "").matchAll(/\[[^\]\n]+\]\(<?([^\s)>]+)/g))].map((match) => match[1]));
485
+ // Prose paths stay relative to the named source, not an inferred checkout.
486
+ for (const match of (spec.description ?? "").matchAll(/(?:[\w.-]+\/)+[\w.-]+\.(?:md|txt|ya?ml)(?:#[\w-]+)?/g)) {
487
+ if (markdownLinks.has(match[0]))
488
+ continue;
489
+ lines.push(listItem(`Reference: ${match[0]} · relative to source`, referenceAction(target, match[0])));
490
+ }
491
+ }
492
+ return lines;
493
+ }
472
494
  function displayPath(path, max = 68) {
473
495
  if (path.length <= max)
474
496
  return path;
@@ -632,6 +654,12 @@ function instanceContentLines(state, snap, host, contentWidth, motion) {
632
654
  return lines;
633
655
  }
634
656
  function contentLines(state, snap, contentWidth, motion) {
657
+ if (state.file) {
658
+ const read = JSON.stringify(snap.fileRead?.target) === JSON.stringify(state.file) ? snap.fileRead?.result : null;
659
+ return [...(state.project ? wrapDetailLines([{ text: `Project ${state.project.id} · ${state.project.root}` }], contentWidth) : []), ...fileLines(read, state.file, contentWidth)];
660
+ }
661
+ if (state.externalUrl)
662
+ return externalLines(state.externalUrl, contentWidth);
635
663
  const contentWidthForGraph = contentWidth;
636
664
  void contentWidthForGraph;
637
665
  const lines = [];
@@ -639,6 +667,8 @@ function contentLines(state, snap, contentWidth, motion) {
639
667
  return timeZoneLines(state, contentWidth);
640
668
  if (state.recentOpen)
641
669
  return recentDetailLines(state, snap, contentWidth);
670
+ if (state.section === "terminals")
671
+ return terminalLines(state, snap, contentWidth);
642
672
  if (state.section === "config")
643
673
  return configLines(state, snap, contentWidth);
644
674
  if (state.section === "connections")
@@ -680,6 +710,9 @@ function contentLines(state, snap, contentWidth, motion) {
680
710
  const rigName = state.drill.find((d) => d.kind === "rig")?.name ?? snap.hosts[0]?.rigs[0]?.name;
681
711
  const rig = host?.rigs.find((candidate) => candidate.name === rigName);
682
712
  if (!rig || !host) {
713
+ const notLoaded = snap.readErrors.find((error) => error.startsWith("Live data not loaded"));
714
+ if (notLoaded)
715
+ return [{ text: notLoaded }];
683
716
  // round-6 (guard): the ROOT topology branch consumes the OWNER's load
684
717
  // truth like every other read surface — a real in-flight cold start
685
718
  // renders the spinner; after settlement only a NAMED rigs-summary
@@ -848,13 +881,13 @@ function contentLines(state, snap, contentWidth, motion) {
848
881
  if (leaf?.kind === "spec") {
849
882
  const spec = findSpec(snap, leaf.name);
850
883
  if (!spec)
851
- return [{ text: `spec "${leaf.name}" not in the current snapshot` }];
884
+ return [{ text: snap.readErrors.find((error) => error.startsWith("specs-library")) ?? (!snap.specsLoaded ? "Specs catalog read pending" : `spec "${leaf.name}" not in the current catalog`) }];
852
885
  if (spec.kind === "rig")
853
- lines.push(specTabsLine(state, spec.name));
886
+ lines.push(specTabsLine(state));
854
887
  lines.push({ text: `${spec.kind} spec ${spec.name}` });
855
888
  lines.push(fieldLine({ label: "purpose", value: spec.description ?? "not declared in the available source" }));
856
889
  lines.push(fieldLine({ label: "provenance", value: `${sourceProvenance(spec)} · ${spec.sourceState ?? "source state not served"}` }));
857
- lines.push(fieldLine({ label: "source", value: spec.sourcePath ?? "path unavailable" }));
890
+ lines.push(...specSourceLines(spec, snap));
858
891
  lines.push({ text: " Authored declaration. Resource availability is not the effective loadout of a running seat." });
859
892
  lines.push(sectionRule("Observed consumers · open for effective runtime/configuration", contentWidth));
860
893
  for (const consumer of spec.consumers ?? []) {
@@ -871,8 +904,6 @@ function contentLines(state, snap, contentWidth, motion) {
871
904
  if (spec.sourceUnavailable)
872
905
  return wrapDetailLines([...lines, { text: ` Source unavailable: ${spec.sourceUnavailable}` }], contentWidth);
873
906
  if (spec.kind === "rig") {
874
- if (spec.sourcePath)
875
- lines.push(fieldLine({ label: "source", value: `${displayPath(spec.sourcePath, 56)} · ${sourceProvenance(spec)}` }));
876
907
  if (state.viewTab === "topology") {
877
908
  // ROUND-4 item 1: the established table treatment, not unformatted rows
878
909
  const nodes = spec.graph?.nodes ?? [];
@@ -994,111 +1025,64 @@ function contentLines(state, snap, contentWidth, motion) {
994
1025
  }
995
1026
  return wrapDetailLines(lines, contentWidth);
996
1027
  }
997
- lines.push({ text: "SPEC LIBRARY" });
998
- lines.push({ text: state.filter ? `/ filter specs: ${state.filter} · / replace · esc clear` : "/ filter specs…" });
999
- // mirrors the explorer exactly (same grouping, same expansion state, same
1000
- // filter-overrides-collapse rule) — glance consistency across panes
1001
- const expandedSet = new Set(state.expanded);
1002
- for (const kind of ["rig", "agent", "workflow"]) {
1003
- const shown = snap.specs.filter((s) => s.kind === kind).filter((s) => !state.filter || s.name.includes(state.filter));
1004
- if (shown.length === 0 && !snap.specs.some((s) => s.kind === kind))
1005
- continue;
1006
- lines.push({ text: ` ${kind.toUpperCase()} (${shown.length})` });
1007
- if (kind !== "agent") {
1008
- for (const s of shown)
1009
- lines.push({ text: ` ▪ ${s.name}`, action: { type: "drill", resource: "spec", name: s.name } });
1010
- continue;
1011
- }
1012
- const groups = new Map();
1013
- for (const s of shown) {
1014
- const namespace = s.namespace ?? "(root)";
1015
- groups.set(namespace, [...(groups.get(namespace) ?? []), s]);
1016
- }
1017
- for (const [namespace, specs] of [...groups.entries()].sort(([a], [b]) => a.localeCompare(b))) {
1018
- const open = namespace === "(root)" || expandedSet.has(`folder:${namespace}`) || !!state.filter;
1019
- if (namespace !== "(root)")
1020
- lines.push({
1021
- text: ` ${open ? "▾" : "▸"} ${namespace}/ (${specs.length})`,
1022
- action: { type: "toggle-expand", key: `folder:${namespace}` },
1023
- });
1024
- if (!open)
1025
- continue;
1026
- for (const s of specs)
1027
- lines.push({
1028
- text: `${namespace === "(root)" ? " " : " "}▪ ${s.name}`,
1029
- action: { type: "drill", resource: "spec", name: s.name },
1030
- });
1031
- }
1032
- }
1033
- if (snap.specs.length === 0) {
1034
- // round-5 (guard): spin only while the owner is loading; settled empty
1035
- // is PROVEN empty and a settled failure is named — neither spins
1036
- if (motion.loading) {
1037
- if (!motion.reduced)
1038
- motion.used = true;
1039
- lines.push({ text: ` ${motion.frame} library read pending — honest-empty` });
1040
- }
1041
- else if (snap.readErrors.some((e) => e.startsWith("specs-library"))) {
1042
- lines.push({ text: " ✕ library read failed — named in the status line" });
1043
- }
1044
- else {
1045
- lines.push({ text: " (library empty — proven, no specs served)" });
1046
- }
1047
- }
1048
- return lines;
1049
- }
1050
- if (state.section === "needs") {
1051
- lines.push({ text: "NEEDS-YOU" });
1052
- for (const item of snap.needs) {
1053
- // open/navigate is the ONLY in-TUI action (B3): the click target joins
1054
- // the item's session back to topology; unresolvable targets never
1055
- // advertise a control that can only fail.
1056
- lines.push(needsLine(item.source === "agent" ? " ☐ " : " ⚑ ", item, snap));
1057
- }
1058
- if (snap.needs.length === 0 && snap.humanQueueProbed)
1059
- lines.push({ text: " (no fleet attention items right now)" });
1060
- if (snap.hostsDown.length > 0) {
1061
- // composed BESIDE the items (a separate shipped read), never into the item shape
1062
- lines.push({ text: "" });
1063
- lines.push({ text: " hosts/rigs down:" });
1064
- // NB: glyphs here must be single-cell — U+26D4 ⛔ is emoji-width (2 cells)
1065
- // and wraps a full-width padded line, shearing every row below it.
1066
- for (const h of snap.hostsDown)
1067
- lines.push({ text: ` ✖ ${alignedRow([[h.hostId, 28], [h.status, 26]])} ${h.error ?? ""}`.trimEnd() });
1028
+ if (state.filter)
1029
+ lines.push({ text: `/ filter specs: ${state.filter} · / replace · esc clear` });
1030
+ const selected = computeExplorerRows(state, snap)[state.selection]?.action;
1031
+ const spec = selected?.type === "drill" && selected.resource === "spec" ? findSpec(snap, selected.name) : null;
1032
+ if (spec) {
1033
+ lines.push({ text: `${spec.name} · ${spec.kind} · ${sourceProvenance(spec)}` });
1034
+ lines.push({ text: "" }, { text: spec.description?.trim() || "Purpose not declared in the available source." });
1035
+ if (spec.kind === "rig")
1036
+ lines.push(fieldLine({ label: "contents", value: `${spec.pods?.length ?? 0} pods · ${spec.pods?.reduce((n, p) => n + p.members.length, 0) ?? spec.legacyNodes?.length ?? 0} members · ${spec.agentRefs?.join(", ") || "no member references served"}` }));
1037
+ else if (spec.kind === "agent")
1038
+ lines.push(fieldLine({ label: "contents", value: `${spec.runtime ?? "runtime not declared"} · ${(spec.skills ?? []).length} skills · ${(spec.startupFiles ?? []).length} startup files` }));
1039
+ else
1040
+ lines.push(fieldLine({ label: "contents", value: `${spec.rolesCount ?? "unknown"} roles · ${spec.stepsCount ?? "unknown"} steps` }));
1041
+ lines.push({ text: "" }, listItem("Read details · Enter", { type: "drill", resource: "spec", name: spec.name }), ...specSourceLines(spec, snap));
1042
+ if (spec.sourceUnavailable)
1043
+ lines.push({ text: `Source unavailable: ${spec.sourceUnavailable}` });
1068
1044
  }
1069
- lines.push({ text: "" });
1070
- if (!snap.humanQueueProbed) {
1071
- if (motion.loading) {
1072
- // region discipline (max ONE persistent animation): while a derived ⚑
1073
- // item pulses on this page, the pending spinner degrades to the honest
1074
- // static dot instead of animating beside it
1075
- const pulseVisible = snap.needs.some((item) => item.source === "derived") && !motion.reduced;
1076
- const spin = pulseVisible ? "·" : motion.frame;
1077
- if (!pulseVisible && !motion.reduced)
1078
- motion.used = true;
1079
- lines.push({ text: ` ${spin} human-queue: not yet known (read pending)` });
1080
- }
1081
- else {
1082
- // round-5 (guard): settled-unprobed is a static truth (hosts down or
1083
- // registry unavailable) — "(read pending)" would be a false claim
1084
- lines.push({ text: " human-queue: not yet known (hosts unreachable or registry unavailable)" });
1045
+ else {
1046
+ lines.push({ text: "SPEC LIBRARY" }, { text: "Choose a spec at left to preview its purpose, contents and source." }, { text: "Enter reads details · / filters · source opens current disk content" }, { text: "" });
1047
+ for (const kind of ["rig", "agent", "workflow"])
1048
+ lines.push({ text: `${kind}: ${snap.specs.filter((spec) => spec.kind === kind).length} available` });
1049
+ if (!snap.specs.length) {
1050
+ if (motion.loading) {
1051
+ if (!motion.reduced)
1052
+ motion.used = true;
1053
+ lines.push({ text: ` ${motion.frame} library read pending` });
1054
+ }
1055
+ else {
1056
+ const failure = snap.readErrors.find((error) => error.startsWith("specs-library"));
1057
+ const notLoaded = snap.readErrors.find((error) => error.startsWith("Live data not loaded"));
1058
+ lines.push({ text: failure ? ` ✕ library read failed: ${failure}` : notLoaded ?? (snap.specsLoaded === false ? "Specs catalog read unavailable" : " (library empty — proven, no specs served)") });
1059
+ }
1085
1060
  }
1086
1061
  }
1087
- else if (!snap.needs.some((item) => item.source === "agent"))
1088
- lines.push({ text: " human-queue: no items (proven empty — surfacing adoption pending)" });
1089
- return lines;
1062
+ return wrapDetailLines(lines, contentWidth);
1090
1063
  }
1064
+ if (state.section === "needs")
1065
+ return attentionLines(state, snap, contentWidth);
1091
1066
  if (state.section === "scopes") {
1092
- if (!state.scopesMission && snap.execution) {
1093
- const selected = snap.execution;
1094
- const instances = selected.lifecycle_instances;
1067
+ const catalog = snap.projects;
1068
+ if (!state.project && catalog !== undefined)
1095
1069
  return wrapDetailLines([
1096
- { text: "SCOPES · choose a mission in the explorer" },
1097
- listItem(`Default mission · ${selected.mission}`, { type: "scopes-mission-open", mission: selected.mission }),
1098
- { text: ` Workflows: ${instances ? instances.map((instance) => String(instance.status ?? "unknown")).join(", ") || "none bound" : "projection unavailable"}` },
1099
- { text: ` Execution snapshot: ${displayTime(selected.derived_at, state.timeZone)}. Other missions load when selected.` },
1070
+ { text: "PROJECTS · select a project" },
1071
+ { text: catalog ? `Catalog: ${catalog.catalogPath}` : "Project catalog unavailable or loading" },
1072
+ ...(snap.readErrors ?? []).map(text => ({ text })),
1073
+ ...(catalog?.projects ?? []).flatMap(p => [listItem(`${p.name} · ${p.id}`, { type: "project-select", id: p.id }), { text: p.root }, ...(p.error ? [{ text: `Unavailable: ${p.error}` }] : [])]),
1074
+ ...(catalog?.projects.length === 0 ? [{ text: "No projects declared in this catalog." }] : []),
1100
1075
  ], contentWidth);
1101
- }
1076
+ const identity = state.project ? wrapDetailLines([{ text: `PROJECT ${state.project.id}` }, { text: state.project.root }], contentWidth) : [];
1077
+ if (state.project && (snap.projectRead?.id !== state.project.id || snap.projectRead?.root !== state.project.root))
1078
+ return [...identity, { text: "Reading selected project…" }];
1079
+ const entry = catalog?.projects.find(p => p.id === state.project.id && p.root === state.project.root);
1080
+ const errors = (snap.readErrors ?? []).map(text => ({ text: `Unavailable: ${text}` }));
1081
+ const projectHeader = state.project ? [...identity, listItem("Read current source", { type: "project-source" }), ...wrapDetailLines(errors, contentWidth)] : [];
1082
+ if (state.project && (!entry || entry.error))
1083
+ return [...projectHeader, { text: "Choose a project again or go Back." }];
1084
+ if (state.project && !state.scopesMission)
1085
+ return [...projectHeader, { text: "Choose a mission" }, ...(snap.scopes ?? []).map(m => listItem(m.mission, { type: "scopes-mission-open", mission: m.mission })), ...(!snap.scopes?.length && !errors.length ? [{ text: "No missions found in this project." }] : [])];
1102
1086
  // SCOPES owns both levels. Both mission-graph and Explorer slice routes land
1103
1087
  // on the same execution-backed canonical detail; store-direct content is
1104
1088
  // composed into that page instead of surviving as a competing destination.
@@ -1109,27 +1093,27 @@ function contentLines(state, snap, contentWidth, motion) {
1109
1093
  ? (snap.scopes ?? []).find((m) => m.mission === sel.mission)?.slices.find((sl) => sl.dirName === sel.slice) ?? null
1110
1094
  : null;
1111
1095
  if (state.executionOpen && execution) {
1112
- return executionContentLines(execution, snap.scopes, snap.readErrors, state.executionOpen, contentWidth, false, snap.sliceDetail, {
1113
- collapseReqs: state.scopesCollapseReqs,
1114
- narrative: state.scopesNarrative,
1115
- }, state.timeZone);
1096
+ return [...projectHeader, ...executionContentLines(execution, snap.scopes, snap.readErrors, state.executionOpen, contentWidth, false, snap.sliceDetail, {
1097
+ collapseReqs: state.scopesCollapseReqs,
1098
+ narrative: state.scopesNarrative,
1099
+ }, state.timeZone)];
1116
1100
  }
1117
1101
  if (detail && execution) {
1118
- return executionContentLines(execution, snap.scopes, snap.readErrors, `slice:${detail.id ?? detail.dirName}`, contentWidth, false, snap.sliceDetail, {
1119
- collapseReqs: state.scopesCollapseReqs,
1120
- narrative: state.scopesNarrative,
1121
- }, state.timeZone);
1102
+ return [...projectHeader, ...executionContentLines(execution, snap.scopes, snap.readErrors, `slice:${detail.id ?? detail.dirName}`, contentWidth, false, snap.sliceDetail, {
1103
+ collapseReqs: state.scopesCollapseReqs,
1104
+ narrative: state.scopesNarrative,
1105
+ }, state.timeZone)];
1122
1106
  }
1123
1107
  if (!detail && missionName) {
1124
1108
  const lines = executionContentLines(execution, snap.scopes, snap.readErrors, state.executionOpen, contentWidth, !snap.hydratedAt || snap.executionMission !== missionName, undefined, undefined, state.timeZone);
1125
- return execution ? lines : [{ text: ` ${missionName} EXECUTION` }, ...lines];
1109
+ return [...projectHeader, ...(execution ? lines : [{ text: ` ${missionName} EXECUTION` }, ...lines])];
1126
1110
  }
1127
- return scopesContentLines(detail, missionName, {
1128
- collapseReqs: state.scopesCollapseReqs,
1129
- narrative: state.scopesNarrative,
1130
- width: contentWidth,
1131
- executionStrip: detail ? executionSliceStripLines(null, detail.id ?? detail.dirName, detail.dirName, contentWidth, detail.status) : undefined,
1132
- });
1111
+ return [...projectHeader, ...scopesContentLines(detail, missionName, {
1112
+ collapseReqs: state.scopesCollapseReqs,
1113
+ narrative: state.scopesNarrative,
1114
+ width: contentWidth,
1115
+ executionStrip: detail ? executionSliceStripLines(null, detail.id ?? detail.dirName, detail.dirName, contentWidth, detail.status) : undefined,
1116
+ })];
1133
1117
  }
1134
1118
  return [{ text: `(${state.section})` }];
1135
1119
  }
@@ -1257,21 +1241,6 @@ function renderPulseScreen(state, snap, options, inputLine) {
1257
1241
  if (options.completion.candidates.length > 4)
1258
1242
  lines.push(pad(" … keep typing to narrow matches", cols));
1259
1243
  }
1260
- // REGISTRY I3 — the palette overlay: fuzzy rows over the ONE registry; unavailable
1261
- // entries render DIMMED-WITH-REASON, never hidden (PM pin); bounded height.
1262
- if (state.palette) {
1263
- const rows = filterPalette(state.palette.query, COMMAND_REGISTRY, options.commandContext ?? "standard");
1264
- const sel = Math.min(state.palette.selection, Math.max(0, rows.length - 1));
1265
- lines.push(pad(`? ${state.palette.query}▊ (${rows.length} commands · ↑↓ · ⏎ run · esc close)`, cols));
1266
- for (let i = 0; i < Math.min(rows.length, 8); i += 1) {
1267
- const r = rows[i];
1268
- const mark = i === sel ? "▸" : " ";
1269
- const label = `${r.entry.name}${r.entry.args ? " " + r.entry.args : ""}`;
1270
- const alias = r.entry.aliases.length ? ` (${r.entry.aliases.join(",")})` : "";
1271
- const tail = r.available ? r.entry.description : `${r.entry.description} — unavailable: ${r.reason}`;
1272
- lines.push(pad(`${mark} ${label}${alias} ${tail}`, cols));
1273
- }
1274
- }
1275
1244
  const explorerTitle = state.focusedPane === "explorer" ? "{ EXPLORER }" : "EXPLORER";
1276
1245
  const contentTitle = state.focusedPane === "content" ? "{ PULSE }" : "PULSE";
1277
1246
  lines.push(paneRule(cols, explW, "top", explorerTitle, contentTitle));
@@ -1463,18 +1432,34 @@ function crashCartShell(content, led, contentTitle, cols, rows, inputLine, opts)
1463
1432
  };
1464
1433
  }
1465
1434
  export function renderScreen(state, snap, options = {}, inputLine = "") {
1435
+ if (state.palette)
1436
+ return helpScreen(state.palette, options.commandContext ?? "standard", options.cols ?? 120, options.rows ?? 32);
1437
+ const screen = renderBody(state, snap, options, inputLine);
1438
+ const commandReady = !options.startup?.open && !options.restore && !options.unavailable && (!options.daemonState || options.daemonState === "up");
1439
+ if (commandReady) {
1440
+ const reduced = reducedMotion();
1441
+ if (!commandFocusVisible(options.nowMs ?? 0, inputLine.length > 0, reduced)) {
1442
+ const line = screen.lines[0];
1443
+ screen.lines[0] = line.slice(0, 6) + " " + line.slice(7);
1444
+ }
1445
+ screen.commandMotionActive = !reduced && inputLine.length === 0;
1446
+ }
1447
+ return screen;
1448
+ }
1449
+ function renderBody(state, snap, options = {}, inputLine = "") {
1466
1450
  const { cols = 120, rows = 32, nowMs = 0 } = options;
1467
- const explW = explorerWidth(cols);
1451
+ const fullReading = !options.startup?.open && (!!state.file || !!state.externalUrl || (cols <= 90 && state.section === "specs" && state.drill.length > 0));
1452
+ const explW = fullReading ? 0 : explorerWidth(cols);
1468
1453
  if (options.startup?.open) {
1469
1454
  const startup = options.startup;
1470
1455
  const content = wrapContentLines(startupLines(startup).map((line) => ({ ...line,
1471
1456
  text: line.text.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "").replace(/[\x00-\x1f\x7f]/g, " ")
1472
1457
  .replace(/(https?:\/\/)[^\s/@]+:[^\s/@]+@/gi, "$1[redacted]@").replace(/Bearer\s+[^\s]+/gi, "Bearer [redacted]"),
1473
1458
  })), Math.max(1, cols - explW - 2));
1474
- const selected = content.findIndex((line) => line.action?.type === "startup" && line.action.key === `select:${startup.selected}`);
1475
- const scroll = startup.expanded ? startup.scroll : Math.max(0, selected - Math.max(1, rows - 12));
1459
+ const selected = content.findIndex((line) => line.action?.type === "startup" && line.action.key === `select:${startup.local?.selected ?? startup.selected}`);
1460
+ const scroll = startup.local && !startup.local.result.entries ? startup.local.scroll : startup.expanded ? startup.scroll : Math.max(0, selected - Math.max(1, rows - 12));
1476
1461
  const screen = crashCartShell(content, { note: "startup", rows: [] }, "START AND RETURN", cols, rows, "", { scroll });
1477
- screen.lines[rows - 1] = pad("↑↓ choose · Enter select · r refresh · d details · Esc back · q quit", cols);
1462
+ screen.lines[rows - 1] = pad("? Help · w Skip · L Local · ↑↓ scroll · Enter read · Esc Back · q Quit", cols);
1478
1463
  return screen;
1479
1464
  }
1480
1465
  // 5.2 crash-cart (shell-placement rework, ruling 3c6c2be0): daemon-DOWN renders as a CONTENT-PANE
@@ -1548,7 +1533,7 @@ export function renderScreen(state, snap, options = {}, inputLine = "") {
1548
1533
  // current insertion point for EMPTY and non-empty buffers alike — the
1549
1534
  // shell accepts typing from the empty state, so the honest readiness
1550
1535
  // affordance must show BEFORE the first key (no new focus state; stylize
1551
- // gives the cell SGR blink; zero effect on hit geometry).
1536
+ // paints the cell; the shared motion clock controls its visibility).
1552
1537
  lines.push(pad(`cmd ▸ ${inputLine}▊${inputLine ? "" : " Tab complete · ? help · timezone"}`, cols));
1553
1538
  if (options.completion) {
1554
1539
  lines.push(pad(options.completion.message, cols));
@@ -1557,31 +1542,16 @@ export function renderScreen(state, snap, options = {}, inputLine = "") {
1557
1542
  if (options.completion.candidates.length > 4)
1558
1543
  lines.push(pad(" … keep typing to narrow matches", cols));
1559
1544
  }
1560
- // REGISTRY I3 — the palette overlay: fuzzy rows over the ONE registry; unavailable
1561
- // entries render DIMMED-WITH-REASON, never hidden (PM pin); bounded height.
1562
- if (state.palette) {
1563
- const rows = filterPalette(state.palette.query, COMMAND_REGISTRY, options.commandContext ?? "standard");
1564
- const sel = Math.min(state.palette.selection, Math.max(0, rows.length - 1));
1565
- lines.push(pad(`? ${state.palette.query}▊ (${rows.length} commands · ↑↓ · ⏎ run · esc close)`, cols));
1566
- for (let i = 0; i < Math.min(rows.length, 8); i += 1) {
1567
- const r = rows[i];
1568
- const mark = i === sel ? "▸" : " ";
1569
- const label = `${r.entry.name}${r.entry.args ? " " + r.entry.args : ""}`;
1570
- const alias = r.entry.aliases.length ? ` (${r.entry.aliases.join(",")})` : "";
1571
- const tail = r.available ? r.entry.description : `${r.entry.description} — unavailable: ${r.reason}`;
1572
- lines.push(pad(`${mark} ${label}${alias} ${tail}`, cols));
1573
- }
1574
- }
1575
- const sectionTitle = { topology: "TOPOLOGY", specs: "SPECS", needs: "NEEDS-YOU" }[state.section] ?? state.section.toUpperCase();
1545
+ const sectionTitle = { topology: "TOPOLOGY", specs: "SPECS", scopes: "PROJECTS", needs: "ATTENTION" }[state.section] ?? state.section.toUpperCase();
1576
1546
  // active-pane emphasis (k9s-class chrome): the focused pane's title is bracketed
1577
1547
  const explorerTitle = state.focusedPane === "explorer" ? "{ EXPLORER }" : "EXPLORER";
1578
1548
  const contentTitle = state.focusedPane === "content" ? `{ ${sectionTitle} }` : sectionTitle;
1579
- lines.push(paneRule(cols, explW, "top", explorerTitle, contentTitle));
1580
- const explorer = computeExplorerRows(state, snap);
1549
+ lines.push(fullReading ? pad(`━ ${state.file ? "READ" : state.externalUrl ? "EXTERNAL URL" : "SPECS"} · Esc / ← Back `, cols) : paneRule(cols, explW, "top", explorerTitle, contentTitle));
1550
+ const explorer = fullReading ? [] : computeExplorerRows(state, snap);
1581
1551
  // Slice-17: the file-tree re-skin is a DISPLAY transform only — rows, keys,
1582
1552
  // actions, and the hit-map all keep resolving against the row model above.
1583
1553
  const { labels: explorerDisplay, metas: explorerMetas } = navigatorDisplay(explorer, snap, explW - 1);
1584
- const content = contentLines(state, snap, Math.max(cols - explW - 2, 0), motion);
1554
+ const content = contentLines(state, snap, Math.max(cols - explW - (fullReading ? 1 : 2), 0), motion);
1585
1555
  const footer = state.footerOn ? snap.stream.at(-1) : undefined;
1586
1556
  // round-5 (guard): the tmux-style ONE-SHOT activity flash targets the
1587
1557
  // flashed agent's EXPLORER row — per-seat pane-output events from the
@@ -1653,7 +1623,7 @@ export function renderScreen(state, snap, options = {}, inputLine = "") {
1653
1623
  else
1654
1624
  contentMarker = "›";
1655
1625
  }
1656
- lines.push(pad(`${left}┃${contentMarker}${contentText}`, cols));
1626
+ lines.push(pad(fullReading ? `${contentMarker}${contentText}` : `${left}┃${contentMarker}${contentText}`, cols));
1657
1627
  if (row) {
1658
1628
  pushExplorerTargets(hitMap, row, explorerDisplay[explorerIndex] ?? row.label, y, explW);
1659
1629
  explorerRows.push({ ...row, y });
@@ -1665,12 +1635,12 @@ export function renderScreen(state, snap, options = {}, inputLine = "") {
1665
1635
  }
1666
1636
  // zones first: hit lookup takes the first match, so a zone wins over the row-wide action
1667
1637
  for (const z of zones) {
1668
- const target = { y, x1: explW + 3 + z.start, x2: explW + 2 + z.end, action: z.action };
1638
+ const target = { y, x1: (fullReading ? 2 : explW + 3) + z.start, x2: (fullReading ? 1 : explW + 2) + z.end, action: z.action };
1669
1639
  hitMap.push(target);
1670
1640
  contentTargets.push(target);
1671
1641
  }
1672
1642
  if (item?.action) {
1673
- const target = { y, x1: explW + 3, x2: cols, action: item.action };
1643
+ const target = { y, x1: fullReading ? 2 : explW + 3, x2: cols, action: item.action };
1674
1644
  hitMap.push(target);
1675
1645
  contentTargets.push(target);
1676
1646
  }
@@ -1681,8 +1651,8 @@ export function renderScreen(state, snap, options = {}, inputLine = "") {
1681
1651
  lines.push(pad(`≋ ${displayTime(footer.tsEmitted, state.timeZone)} ${footer.sourceSession}: ${footer.body}`, cols));
1682
1652
  const drillPath = state.drill.map((d) => d.name).join(" → ");
1683
1653
  const readWarn = snap.readErrors.length > 0 ? ` ⚠ ${snap.readErrors.length} read(s) failed: ${snap.readErrors[0]}` : "";
1684
- lines.push(paneRule(cols, explW, "bottom"));
1685
- lines.push(pad(keybindHints(state), cols));
1654
+ lines.push(fullReading ? "━".repeat(cols) : paneRule(cols, explW, "bottom"));
1655
+ lines.push(pad(fullReading ? "↑↓ scroll / links · → links · Enter open · Esc Back · refresh · v copy" : keybindHints(state), cols));
1686
1656
  lines.push(pad(`[${state.instanceId}] ${state.section}${drillPath ? " · " + drillPath : ""}${state.lastError ? " ✗ " + state.lastError : ""}${state.notice ? " ▸ " + state.notice : ""}${readWarn}${state.timeZoneWarning ? " · ⚠ timezone; run timezone" : ""}`, cols));
1687
1657
  while (lines.length < rows)
1688
1658
  lines.push("");