@north-light/crouter 0.3.348 → 0.3.350

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 (634) hide show
  1. package/bin/crtr-launcher +4 -0
  2. package/bin/runtime-generation-manifest.mjs +12 -2
  3. package/dist/api/client.d.ts +50 -7
  4. package/dist/api/client.js +2 -2
  5. package/dist/api/command-manifest/schema.js +1 -1
  6. package/dist/api/dto/analytics.d.ts +184 -0
  7. package/dist/api/dto/analytics.js +0 -0
  8. package/dist/api/dto/broker-ops.d.ts +43 -1
  9. package/dist/api/dto/config.d.ts +11 -0
  10. package/dist/api/dto/grants.d.ts +14 -0
  11. package/dist/api/dto/grants.js +0 -0
  12. package/dist/api/dto/human-requests.d.ts +14 -0
  13. package/dist/api/dto/memory.d.ts +6 -0
  14. package/dist/api/dto/modelauth.d.ts +35 -0
  15. package/dist/api/dto/node-records.d.ts +35 -0
  16. package/dist/api/dto/node-records.js +0 -0
  17. package/dist/api/dto/nodes.d.ts +5 -0
  18. package/dist/api/dto/profiles.d.ts +38 -3
  19. package/dist/api/dto/worktree.d.ts +11 -0
  20. package/dist/api/errors.d.ts +23 -1
  21. package/dist/api/errors.js +1 -1
  22. package/dist/api/index.d.ts +2 -0
  23. package/dist/api/index.js +1 -1
  24. package/dist/api/node-transport.js +1 -1
  25. package/dist/api/routes.d.ts +22 -0
  26. package/dist/api/routes.js +1 -1
  27. package/dist/build-root.d.ts +6 -1
  28. package/dist/build-root.js +1 -1
  29. package/dist/builtin-memory/crouter-sdk/client.md +34 -0
  30. package/dist/builtin-memory/crouter-sdk/errors.md +2 -0
  31. package/dist/builtin-memory/crouter-sdk/memory.md +2 -2
  32. package/dist/builtin-memory/crouter-sdk/streaming.md +21 -0
  33. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/claude-plugin-commands.ts +8 -4
  34. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +39 -118
  35. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.d.ts +6 -1
  36. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.js +41 -27
  37. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +52 -29
  38. package/dist/cli.js +9 -8
  39. package/dist/clients/attach/chrome/inbox-strip.js +1 -1
  40. package/dist/clients/attach/chrome/roster.js +1 -1
  41. package/dist/clients/attach/config.js +1 -1
  42. package/dist/clients/attach/overlays/auth.js +2 -2
  43. package/dist/clients/attach/overlays/graph.js +1 -1
  44. package/dist/clients/attach/render/tool-calls.js +3 -3
  45. package/dist/clients/attach/session/connection.js +1 -1
  46. package/dist/clients/attach/session/profile-files.js +1 -1
  47. package/dist/clients/attach/viewer.js +1569 -816
  48. package/dist/commands/api-client.js +3 -3
  49. package/dist/commands/broker-permissions.d.ts +2 -0
  50. package/dist/commands/broker-permissions.js +1 -0
  51. package/dist/commands/canvas-analytics/chart.d.ts +52 -0
  52. package/dist/commands/canvas-analytics/chart.js +1 -0
  53. package/dist/commands/canvas-analytics/drilldown.d.ts +34 -0
  54. package/dist/commands/canvas-analytics/drilldown.js +1 -0
  55. package/dist/commands/canvas-analytics/format.d.ts +29 -0
  56. package/dist/commands/canvas-analytics/format.js +1 -0
  57. package/dist/commands/canvas-analytics/graph-detail.d.ts +2 -0
  58. package/dist/commands/canvas-analytics/graph-detail.js +2 -0
  59. package/dist/commands/canvas-analytics/graphs.d.ts +9 -0
  60. package/dist/commands/canvas-analytics/graphs.js +1 -0
  61. package/dist/commands/canvas-analytics/memory.d.ts +2 -0
  62. package/dist/commands/canvas-analytics/memory.js +1 -0
  63. package/dist/commands/canvas-analytics/overview.d.ts +2 -0
  64. package/dist/commands/canvas-analytics/overview.js +1 -0
  65. package/dist/commands/canvas-analytics/shell.d.ts +60 -0
  66. package/dist/commands/canvas-analytics/shell.js +2 -0
  67. package/dist/commands/canvas-analytics/time.d.ts +2 -0
  68. package/dist/commands/canvas-analytics/time.js +1 -0
  69. package/dist/commands/canvas-analytics/usage.d.ts +2 -0
  70. package/dist/commands/canvas-analytics/usage.js +1 -0
  71. package/dist/commands/canvas-analytics/view.d.ts +85 -0
  72. package/dist/commands/canvas-analytics/view.js +1 -0
  73. package/dist/commands/canvas-analytics.d.ts +2 -0
  74. package/dist/commands/canvas-analytics.js +1 -0
  75. package/dist/commands/canvas-prune.js +1 -1
  76. package/dist/commands/canvas.js +1 -1
  77. package/dist/commands/cron.js +5 -5
  78. package/dist/commands/human/components.d.ts +2 -0
  79. package/dist/commands/human/components.js +2 -2
  80. package/dist/commands/human/prompts.js +1 -1
  81. package/dist/commands/human/queue.js +1 -1
  82. package/dist/commands/memory/client.d.ts +11 -0
  83. package/dist/commands/memory/client.js +1 -0
  84. package/dist/commands/memory/delete.js +1 -1
  85. package/dist/commands/memory/edit.js +3 -3
  86. package/dist/commands/memory/find.js +1 -1
  87. package/dist/commands/memory/history.js +4 -4
  88. package/dist/commands/memory/lint.js +1 -1
  89. package/dist/commands/memory/list.d.ts +0 -2
  90. package/dist/commands/memory/list.js +1 -1
  91. package/dist/commands/memory/move.js +1 -1
  92. package/dist/commands/memory/origin.js +1 -1
  93. package/dist/commands/memory/read.d.ts +0 -5
  94. package/dist/commands/memory/read.js +3 -3
  95. package/dist/commands/memory/shared.d.ts +0 -178
  96. package/dist/commands/memory/shared.js +1 -12
  97. package/dist/commands/memory/write.js +5 -5
  98. package/dist/commands/node/bash.js +5 -5
  99. package/dist/commands/node/create.d.ts +0 -17
  100. package/dist/commands/node/create.js +2 -3
  101. package/dist/commands/node/inspect.js +6 -6
  102. package/dist/commands/node/lifecycle.js +2 -2
  103. package/dist/commands/node-context.js +2 -2
  104. package/dist/commands/node-inspect-artifacts.js +6 -6
  105. package/dist/commands/pkg/browse/catalog.js +1 -1
  106. package/dist/commands/pkg/browse/model.d.ts +1 -1
  107. package/dist/commands/pkg/market-manage.js +1 -1
  108. package/dist/commands/pkg/plugin-manage.js +10 -10
  109. package/dist/commands/profile/daemon-profiles.d.ts +13 -0
  110. package/dist/commands/profile/daemon-profiles.js +4 -0
  111. package/dist/commands/profile/delete.js +1 -1
  112. package/dist/commands/profile/env.d.ts +6 -0
  113. package/dist/commands/profile/env.js +2 -2
  114. package/dist/commands/profile/kind.js +1 -2
  115. package/dist/commands/profile/list.js +1 -1
  116. package/dist/commands/profile/meta.js +1 -1
  117. package/dist/commands/profile/new.js +1 -1
  118. package/dist/commands/profile/pause.js +1 -1
  119. package/dist/commands/profile/project.js +1 -1
  120. package/dist/commands/profile/rename.js +1 -1
  121. package/dist/commands/profile/show.js +1 -1
  122. package/dist/commands/profile.js +1 -1
  123. package/dist/commands/push.js +3 -3
  124. package/dist/commands/surface-inspect.js +1 -1
  125. package/dist/commands/sys/branch.js +1 -1
  126. package/dist/commands/sys/config.js +1 -1
  127. package/dist/commands/sys/connect.js +3 -3
  128. package/dist/commands/sys/context/admin/actions.js +1 -1
  129. package/dist/commands/sys/context/admin/model.d.ts +1 -0
  130. package/dist/commands/sys/context/admin/model.js +1 -1
  131. package/dist/commands/sys/context/admin.js +1 -1
  132. package/dist/commands/sys/context/expose.js +2 -1
  133. package/dist/commands/sys/context/prompt-review.js +2 -2
  134. package/dist/commands/sys/context/resolve.js +7 -7
  135. package/dist/commands/sys/context/sysprompt.js +1 -1
  136. package/dist/commands/sys/join.d.ts +1 -0
  137. package/dist/commands/sys/join.js +1 -0
  138. package/dist/commands/sys/migrate.js +1 -1
  139. package/dist/commands/sys/panels/models-panel.js +1 -1
  140. package/dist/commands/sys/panels/profiles-panel.d.ts +0 -1
  141. package/dist/commands/sys/panels/profiles-panel.js +1 -1
  142. package/dist/commands/sys/provider-login.js +6 -6
  143. package/dist/commands/sys/setup-core.d.ts +1 -1
  144. package/dist/commands/sys/setup-core.js +6 -6
  145. package/dist/commands/sys/setup-settings-runner.js +1 -1
  146. package/dist/commands/sys/setup.js +1 -1
  147. package/dist/commands/sys/spaces.d.ts +1 -0
  148. package/dist/commands/sys/spaces.js +2 -0
  149. package/dist/commands/sys/sync-deps.js +2 -2
  150. package/dist/commands/sys/sync-project-guidance.js +4 -4
  151. package/dist/commands/sys/sync-skills.js +2 -2
  152. package/dist/commands/sys/worktrees.d.ts +1 -0
  153. package/dist/commands/sys/worktrees.js +1 -1
  154. package/dist/commands/sys.js +1 -1
  155. package/dist/core/auth-file.js +2 -2
  156. package/dist/core/bash-job-supervisor.d.ts +6 -0
  157. package/dist/core/bash-job-supervisor.js +4 -0
  158. package/dist/core/bash-jobs.d.ts +13 -6
  159. package/dist/core/bash-jobs.js +8 -7
  160. package/dist/core/broker-client/transport-relay.d.ts +6 -3
  161. package/dist/core/broker-client/transport-relay.js +1 -1
  162. package/dist/core/broker-client/transport-socket.d.ts +6 -1
  163. package/dist/core/broker-client/transport-socket.js +1 -1
  164. package/dist/core/canvas/canvas.d.ts +39 -18
  165. package/dist/core/canvas/canvas.js +21 -20
  166. package/dist/core/canvas/context-strip.d.ts +20 -0
  167. package/dist/core/canvas/context-strip.js +5 -0
  168. package/dist/core/canvas/crons.d.ts +12 -20
  169. package/dist/core/canvas/crons.js +15 -13
  170. package/dist/core/canvas/db.js +2 -2
  171. package/dist/core/canvas/deliveries.d.ts +4 -1
  172. package/dist/core/canvas/deliveries.js +1 -1
  173. package/dist/core/canvas/executions.js +1 -1
  174. package/dist/core/canvas/history.d.ts +2 -1
  175. package/dist/core/canvas/history.js +17 -18
  176. package/dist/core/canvas/memory-reads.d.ts +19 -0
  177. package/dist/core/canvas/memory-reads.js +1 -0
  178. package/dist/core/canvas/migrations.d.ts +0 -4
  179. package/dist/core/canvas/migrations.js +99 -32
  180. package/dist/core/canvas/nav-render.js +1 -1
  181. package/dist/core/canvas/node-agent-paths.d.ts +8 -0
  182. package/dist/core/canvas/node-agent-paths.js +1 -0
  183. package/dist/core/canvas/node-recap.d.ts +2 -2
  184. package/dist/core/canvas/node-recap.js +2 -2
  185. package/dist/core/canvas/node-tokens.d.ts +24 -0
  186. package/dist/core/canvas/node-tokens.js +5 -0
  187. package/dist/core/canvas/paths.d.ts +16 -19
  188. package/dist/core/canvas/paths.js +1 -1
  189. package/dist/core/canvas/render-source.d.ts +2 -2
  190. package/dist/core/canvas/render-source.js +6 -9
  191. package/dist/core/canvas/sessions.d.ts +18 -0
  192. package/dist/core/canvas/sessions.js +4 -1
  193. package/dist/core/canvas/types.d.ts +22 -6
  194. package/dist/core/command-hooks/compose.js +1 -1
  195. package/dist/core/command-hooks/discovery.d.ts +15 -1
  196. package/dist/core/command-hooks/discovery.js +1 -1
  197. package/dist/core/command-hooks/help.d.ts +2 -2
  198. package/dist/core/command-hooks/lifecycle-create.d.ts +1 -1
  199. package/dist/core/command-hooks/lifecycle-create.js +1 -1
  200. package/dist/core/command-hooks/transport/exec-invoke.d.ts +2 -0
  201. package/dist/core/command-hooks/transport/exec-invoke.js +1 -1
  202. package/dist/core/command-hooks/transport/exec-lifecycle.d.ts +1 -0
  203. package/dist/core/command-hooks/transport/exec-lifecycle.js +1 -1
  204. package/dist/core/command-hooks/transport/plan.d.ts +3 -0
  205. package/dist/core/command-hooks/transport/plan.js +1 -0
  206. package/dist/core/command-plugins/discovery.js +1 -1
  207. package/dist/core/command-plugins/transport/http-invoke.js +2 -2
  208. package/dist/core/command.d.ts +6 -2
  209. package/dist/core/command.js +6 -6
  210. package/dist/core/config.d.ts +8 -5
  211. package/dist/core/config.js +1 -1
  212. package/dist/core/conversation-store/client-worker.d.ts +1 -0
  213. package/dist/core/conversation-store/client-worker.js +1 -0
  214. package/dist/core/conversation-store/client.d.ts +2 -0
  215. package/dist/core/conversation-store/client.js +2 -0
  216. package/dist/core/conversation-store/file-store.d.ts +37 -0
  217. package/dist/core/conversation-store/file-store.js +9 -0
  218. package/dist/core/conversation-store/index.d.ts +50 -0
  219. package/dist/core/conversation-store/index.js +1 -0
  220. package/dist/core/conversation-store/listener.d.ts +4 -0
  221. package/dist/core/conversation-store/listener.js +3 -0
  222. package/dist/core/conversation-store/patch.d.ts +1 -0
  223. package/dist/core/conversation-store/patch.js +1 -0
  224. package/dist/core/directory/join.d.ts +27 -0
  225. package/dist/core/directory/join.js +1 -0
  226. package/dist/core/disk-usage.d.ts +4 -0
  227. package/dist/core/disk-usage.js +1 -0
  228. package/dist/core/events/emit.d.ts +2 -0
  229. package/dist/core/events/emit.js +3 -1
  230. package/dist/core/feed/feed.js +4 -4
  231. package/dist/core/feed/messages.d.ts +3 -0
  232. package/dist/core/feed/messages.js +6 -6
  233. package/dist/core/fs-utils.d.ts +2 -0
  234. package/dist/core/fs-utils.js +3 -3
  235. package/dist/core/grants/local.d.ts +4 -0
  236. package/dist/core/grants/local.js +1 -0
  237. package/dist/core/grants/mirror.d.ts +44 -0
  238. package/dist/core/grants/mirror.js +4 -0
  239. package/dist/core/grants/on-sync.d.ts +22 -0
  240. package/dist/core/grants/on-sync.js +1 -0
  241. package/dist/core/grants/remove.d.ts +7 -0
  242. package/dist/core/grants/remove.js +1 -0
  243. package/dist/core/grants/sandboxes.d.ts +7 -0
  244. package/dist/core/grants/sandboxes.js +1 -0
  245. package/dist/core/grants/sync.d.ts +12 -0
  246. package/dist/core/grants/sync.js +1 -0
  247. package/dist/core/help/memory-extensions.d.ts +3 -0
  248. package/dist/core/help/memory-extensions.js +2 -0
  249. package/dist/core/help.d.ts +14 -0
  250. package/dist/core/help.js +7 -7
  251. package/dist/core/host-exports/builtins.js +3 -3
  252. package/dist/core/host-exports/export.js +3 -3
  253. package/dist/core/human/action-binding.d.ts +2 -0
  254. package/dist/core/human/action-binding.js +1 -1
  255. package/dist/core/human/feedback-companion.d.ts +0 -1
  256. package/dist/core/human/feedback-companion.js +1 -1
  257. package/dist/core/human/page-schema.d.ts +1 -1
  258. package/dist/core/inspector/core.d.ts +2 -0
  259. package/dist/core/inspector/core.js +1 -1
  260. package/dist/core/inspector/tui.js +2 -2
  261. package/dist/core/installed-plugins.js +1 -1
  262. package/dist/core/io.js +6 -6
  263. package/dist/core/keybindings/catalog.d.ts +1 -1
  264. package/dist/core/keybindings/catalog.js +1 -1
  265. package/dist/core/layout-migrate/index.d.ts +15 -0
  266. package/dist/core/layout-migrate/index.js +4 -0
  267. package/dist/core/layout-migrate/paths.d.ts +26 -0
  268. package/dist/core/layout-migrate/paths.js +1 -0
  269. package/dist/core/layout-migrate/stored-paths.d.ts +2 -0
  270. package/dist/core/layout-migrate/stored-paths.js +11 -0
  271. package/dist/core/layout-migrate/stores.d.ts +17 -0
  272. package/dist/core/layout-migrate/stores.js +4 -0
  273. package/dist/core/layout.d.ts +26 -0
  274. package/dist/core/layout.js +2 -0
  275. package/dist/core/llm/run.d.ts +60 -0
  276. package/dist/core/llm/run.js +4 -0
  277. package/dist/core/memory/cli-selector.d.ts +13 -0
  278. package/dist/core/memory/cli-selector.js +1 -0
  279. package/dist/core/memory/history.d.ts +5 -4
  280. package/dist/core/memory/history.js +6 -6
  281. package/dist/core/memory/inline-ref-inventory.d.ts +2 -1
  282. package/dist/core/memory/inline-ref-inventory.js +1 -1
  283. package/dist/core/memory/lint.js +2 -2
  284. package/dist/core/memory/mutation-domain.d.ts +2 -2
  285. package/dist/core/memory/mutation-domain.js +8 -7
  286. package/dist/core/memory/mutations.js +1 -1
  287. package/dist/core/memory/service.d.ts +5 -0
  288. package/dist/core/memory/service.js +2 -2
  289. package/dist/core/memory-resolver.d.ts +11 -7
  290. package/dist/core/memory-resolver.js +2 -2
  291. package/dist/core/model-auth/daemon-login.d.ts +13 -0
  292. package/dist/core/model-auth/daemon-login.js +1 -0
  293. package/dist/core/model-auth/flows.d.ts +45 -0
  294. package/dist/core/model-auth/flows.js +1 -0
  295. package/dist/core/model-auth/handoff-jti.d.ts +4 -0
  296. package/dist/core/model-auth/handoff-jti.js +1 -0
  297. package/dist/core/model-routes.js +1 -1
  298. package/dist/core/nested-stores.d.ts +2 -1
  299. package/dist/core/nested-stores.js +1 -2
  300. package/dist/core/preview-registry.js +2 -2
  301. package/dist/core/profiles/env-store.js +2 -2
  302. package/dist/core/profiles/manifest.d.ts +16 -5
  303. package/dist/core/profiles/manifest.js +1 -1
  304. package/dist/core/provider-management.js +1 -1
  305. package/dist/core/review/birth.js +1 -1
  306. package/dist/core/review/companion.d.ts +0 -2
  307. package/dist/core/review/companion.js +1 -1
  308. package/dist/core/review/fork.js +2 -2
  309. package/dist/core/review/realize.js +1 -1
  310. package/dist/core/review/stage.d.ts +1 -1
  311. package/dist/core/review/stage.js +1 -1
  312. package/dist/core/review/types.d.ts +1 -1
  313. package/dist/core/runs/events.d.ts +34 -0
  314. package/dist/core/runs/events.js +1 -0
  315. package/dist/core/runs/operations.d.ts +43 -0
  316. package/dist/core/runs/operations.js +12 -0
  317. package/dist/core/runtime/bearings-render.d.ts +2 -2
  318. package/dist/core/runtime/bearings-render.js +11 -11
  319. package/dist/core/runtime/bearings.js +2 -2
  320. package/dist/core/runtime/broker/cli-relay.d.ts +5 -0
  321. package/dist/core/runtime/broker/cli-relay.js +1 -0
  322. package/dist/core/runtime/broker/client-registry.d.ts +0 -5
  323. package/dist/core/runtime/broker/client-registry.js +1 -1
  324. package/dist/core/runtime/broker/daemon-ops.d.ts +28 -1
  325. package/dist/core/runtime/broker/daemon-ops.js +1 -1
  326. package/dist/core/runtime/broker/engine-drive.d.ts +0 -2
  327. package/dist/core/runtime/broker/engine-drive.js +1 -1
  328. package/dist/core/runtime/broker/fault-retry.d.ts +9 -0
  329. package/dist/core/runtime/broker/fault-retry.js +1 -1
  330. package/dist/core/runtime/broker/frame-dispatch.d.ts +5 -9
  331. package/dist/core/runtime/broker/frame-dispatch.js +1 -1
  332. package/dist/core/runtime/broker/frame-engine-control.d.ts +3 -2
  333. package/dist/core/runtime/broker/frame-engine-control.js +1 -1
  334. package/dist/core/runtime/broker/frame-memory-refs.d.ts +4 -3
  335. package/dist/core/runtime/broker/frame-memory-refs.js +1 -1
  336. package/dist/core/runtime/broker/frame-read.js +1 -1
  337. package/dist/core/runtime/broker/frame-session.js +1 -1
  338. package/dist/core/runtime/broker/held-deferred-inbox.d.ts +3 -1
  339. package/dist/core/runtime/broker/held-deferred-inbox.js +1 -1
  340. package/dist/core/runtime/broker/inbox.d.ts +1 -2
  341. package/dist/core/runtime/broker/inbox.js +7 -10
  342. package/dist/core/runtime/broker/model-adapter.d.ts +9 -0
  343. package/dist/core/runtime/broker/model-adapter.js +2 -0
  344. package/dist/core/runtime/broker/node-token.d.ts +3 -0
  345. package/dist/core/runtime/broker/node-token.js +1 -0
  346. package/dist/core/runtime/broker/read-ops.js +1 -1
  347. package/dist/core/runtime/broker/rebind.d.ts +2 -0
  348. package/dist/core/runtime/broker/rebind.js +1 -1
  349. package/dist/core/runtime/broker/tool-groups.js +1 -1
  350. package/dist/core/runtime/broker/turn-ignition.d.ts +3 -3
  351. package/dist/core/runtime/broker/turn-ignition.js +1 -1
  352. package/dist/core/runtime/broker-cli.js +3 -3
  353. package/dist/core/runtime/broker-extension-render.d.ts +2 -5
  354. package/dist/core/runtime/broker-extension-render.js +4 -4
  355. package/dist/core/runtime/broker-persona-guidance.js +3 -3
  356. package/dist/core/runtime/broker-protocol.d.ts +7 -8
  357. package/dist/core/runtime/broker.js +1 -1
  358. package/dist/core/runtime/canvas-extensions.d.ts +1 -0
  359. package/dist/core/runtime/canvas-extensions.js +1 -1
  360. package/dist/core/runtime/close.d.ts +9 -0
  361. package/dist/core/runtime/close.js +1 -1
  362. package/dist/core/runtime/deliver-live.js +1 -1
  363. package/dist/core/runtime/fleet.d.ts +1 -1
  364. package/dist/core/runtime/front-door-login.js +1 -1
  365. package/dist/core/runtime/front-door.js +2 -2
  366. package/dist/core/runtime/headless-pi.d.ts +1 -1
  367. package/dist/core/runtime/headless-pi.js +1 -1
  368. package/dist/core/runtime/host.d.ts +1 -1
  369. package/dist/core/runtime/host.js +3 -1
  370. package/dist/core/runtime/invocation.d.ts +3 -0
  371. package/dist/core/runtime/kickoff.d.ts +1 -0
  372. package/dist/core/runtime/kickoff.js +16 -16
  373. package/dist/core/runtime/launch-target.d.ts +1 -1
  374. package/dist/core/runtime/launch-target.js +1 -1
  375. package/dist/core/runtime/launch.d.ts +10 -35
  376. package/dist/core/runtime/launch.js +1 -1
  377. package/dist/core/runtime/lifecycle.js +2 -2
  378. package/dist/core/runtime/memory.d.ts +1 -1
  379. package/dist/core/runtime/memory.js +1 -1
  380. package/dist/core/runtime/model-registry.js +1 -1
  381. package/dist/core/runtime/model-swap.d.ts +17 -19
  382. package/dist/core/runtime/model-swap.js +1 -1
  383. package/dist/core/runtime/node-read.js +3 -2
  384. package/dist/core/runtime/nodes.d.ts +7 -0
  385. package/dist/core/runtime/nodes.js +1 -1
  386. package/dist/core/runtime/outcome-document.js +1 -1
  387. package/dist/core/runtime/package-health.js +2 -2
  388. package/dist/core/runtime/persona.js +2 -2
  389. package/dist/core/runtime/pi-vendored.js +1 -1
  390. package/dist/core/runtime/placement-tmux.d.ts +1 -1
  391. package/dist/core/runtime/placement-tmux.js +1 -1
  392. package/dist/core/runtime/placement.js +1 -1
  393. package/dist/core/runtime/promote.js +1 -1
  394. package/dist/core/runtime/provider-credential-gate.js +2 -2
  395. package/dist/core/runtime/recovery-hold.d.ts +2 -0
  396. package/dist/core/runtime/recovery-hold.js +1 -0
  397. package/dist/core/runtime/recycle.js +1 -1
  398. package/dist/core/runtime/reopen.js +1 -1
  399. package/dist/core/runtime/reset.js +1 -1
  400. package/dist/core/runtime/revive.d.ts +1 -1
  401. package/dist/core/runtime/revive.js +2 -3
  402. package/dist/core/runtime/roadmap.js +4 -4
  403. package/dist/core/runtime/run-command.d.ts +6 -0
  404. package/dist/core/runtime/run-command.js +1 -1
  405. package/dist/core/runtime/session-branch.d.ts +2 -8
  406. package/dist/core/runtime/session-branch.js +1 -1
  407. package/dist/core/runtime/session-list-cache.d.ts +6 -22
  408. package/dist/core/runtime/session-list-cache.js +1 -1
  409. package/dist/core/runtime/situational-context.js +2 -2
  410. package/dist/core/runtime/spawn-env.d.ts +6 -6
  411. package/dist/core/runtime/spawn-env.js +1 -1
  412. package/dist/core/runtime/spawn.d.ts +5 -0
  413. package/dist/core/runtime/spawn.js +2 -2
  414. package/dist/core/runtime/stop-guard.js +2 -2
  415. package/dist/core/runtime/stop-signals.d.ts +2 -2
  416. package/dist/core/runtime/stop-signals.js +1 -1
  417. package/dist/core/runtime/structured-output.d.ts +10 -4
  418. package/dist/core/runtime/structured-output.js +4 -4
  419. package/dist/core/runtime/tmux-bindings.js +3 -3
  420. package/dist/core/runtime/tmux-driver.d.ts +4 -0
  421. package/dist/core/runtime/tmux-driver.js +7 -7
  422. package/dist/core/runtime/view-socket.d.ts +9 -2
  423. package/dist/core/runtime/view-socket.js +1 -1
  424. package/dist/core/runtime/warm-pool.js +1 -1
  425. package/dist/core/scope.d.ts +3 -2
  426. package/dist/core/scope.js +1 -1
  427. package/dist/core/scoped-state/db.js +1 -1
  428. package/dist/core/scoped-state/migrate.js +3 -3
  429. package/dist/core/scoped-state/profiles.d.ts +2 -1
  430. package/dist/core/scoped-state/profiles.js +1 -1
  431. package/dist/core/scoped-state/schema.d.ts +2 -1
  432. package/dist/core/scoped-state/schema.js +4 -4
  433. package/dist/core/scopes.d.ts +2 -2
  434. package/dist/core/scopes.js +1 -1
  435. package/dist/core/secrets.d.ts +1 -0
  436. package/dist/core/secrets.js +2 -2
  437. package/dist/core/spaces/mounts.d.ts +32 -0
  438. package/dist/core/spaces/mounts.js +1 -0
  439. package/dist/core/spaces/open-beneath.d.ts +71 -0
  440. package/dist/core/spaces/open-beneath.js +1 -0
  441. package/dist/core/spaces/permissions.d.ts +46 -0
  442. package/dist/core/spaces/permissions.js +1 -0
  443. package/dist/core/spaces/process.d.ts +27 -0
  444. package/dist/core/spaces/process.js +1 -0
  445. package/dist/core/spaces/space.d.ts +8 -0
  446. package/dist/core/spaces/space.js +2 -0
  447. package/dist/core/spaces/stop.d.ts +8 -0
  448. package/dist/core/spaces/stop.js +2 -0
  449. package/dist/core/spaces/users.d.ts +19 -0
  450. package/dist/core/spaces/users.js +1 -0
  451. package/dist/core/subscription-state.d.ts +2 -0
  452. package/dist/core/subscription-state.js +3 -3
  453. package/dist/core/substrate/frontmatter-validation.js +1 -1
  454. package/dist/core/substrate/injected-store.d.ts +28 -3
  455. package/dist/core/substrate/injected-store.js +2 -1
  456. package/dist/core/substrate/listings.js +1 -1
  457. package/dist/core/substrate/memory-events.d.ts +6 -0
  458. package/dist/core/substrate/memory-events.js +1 -0
  459. package/dist/core/substrate/on-read-node.js +1 -1
  460. package/dist/core/substrate/on-read.d.ts +6 -6
  461. package/dist/core/substrate/on-read.js +5 -5
  462. package/dist/core/substrate/plan.js +1 -1
  463. package/dist/core/substrate/render-node.js +1 -1
  464. package/dist/core/substrate/render.d.ts +4 -3
  465. package/dist/core/substrate/render.js +38 -38
  466. package/dist/core/substrate/schema.d.ts +6 -0
  467. package/dist/core/substrate/schema.js +1 -1
  468. package/dist/core/tui/panel.js +1 -1
  469. package/dist/core/user-settings.d.ts +12 -0
  470. package/dist/core/user-settings.js +1 -1
  471. package/dist/core/worktree-mutation-async.js +5 -5
  472. package/dist/core/worktree-quarantine.js +1 -1
  473. package/dist/core/worktree-remove.d.ts +15 -0
  474. package/dist/core/worktree-remove.js +1 -0
  475. package/dist/core/worktree-sweep.js +6 -6
  476. package/dist/daemon/analytics/compute.d.ts +37 -0
  477. package/dist/daemon/analytics/compute.js +1 -0
  478. package/dist/daemon/analytics/scan-worker.d.ts +1 -0
  479. package/dist/daemon/analytics/scan-worker.js +2 -0
  480. package/dist/daemon/analytics/scan.d.ts +37 -0
  481. package/dist/daemon/analytics/scan.js +1 -0
  482. package/dist/daemon/api/app-listener.d.ts +11 -0
  483. package/dist/daemon/api/app-listener.js +21 -0
  484. package/dist/daemon/api/bridge.js +5 -5
  485. package/dist/daemon/api/handlers/analytics.d.ts +2 -0
  486. package/dist/daemon/api/handlers/analytics.js +1 -0
  487. package/dist/daemon/api/handlers/attach.js +1 -1
  488. package/dist/daemon/api/handlers/bash-jobs.js +2 -2
  489. package/dist/daemon/api/handlers/bash.js +1 -1
  490. package/dist/daemon/api/handlers/broker-ops.js +1 -1
  491. package/dist/daemon/api/handlers/canvas.d.ts +1 -1
  492. package/dist/daemon/api/handlers/canvas.js +6 -6
  493. package/dist/daemon/api/handlers/crons.js +1 -1
  494. package/dist/daemon/api/handlers/files.d.ts +1 -1
  495. package/dist/daemon/api/handlers/files.js +1 -1
  496. package/dist/daemon/api/handlers/health.js +2 -2
  497. package/dist/daemon/api/handlers/hook-exec.d.ts +2 -0
  498. package/dist/daemon/api/handlers/hook-exec.js +1 -0
  499. package/dist/daemon/api/handlers/human-requests.js +1 -1
  500. package/dist/daemon/api/handlers/inbox.js +1 -1
  501. package/dist/daemon/api/handlers/llm.d.ts +2 -0
  502. package/dist/daemon/api/handlers/llm.js +3 -0
  503. package/dist/daemon/api/handlers/memory-reads.d.ts +4 -0
  504. package/dist/daemon/api/handlers/memory-reads.js +1 -0
  505. package/dist/daemon/api/handlers/memory.js +5 -1
  506. package/dist/daemon/api/handlers/messages.js +2 -2
  507. package/dist/daemon/api/handlers/modelauth.js +1 -1
  508. package/dist/daemon/api/handlers/node-outcomes.js +1 -1
  509. package/dist/daemon/api/handlers/node-records.d.ts +2 -0
  510. package/dist/daemon/api/handlers/node-records.js +3 -0
  511. package/dist/daemon/api/handlers/nodes.d.ts +1 -1
  512. package/dist/daemon/api/handlers/nodes.js +1 -1
  513. package/dist/daemon/api/handlers/profiles.d.ts +4 -1
  514. package/dist/daemon/api/handlers/profiles.js +1 -1
  515. package/dist/daemon/api/handlers/reports.js +5 -3
  516. package/dist/daemon/api/handlers/reviews.d.ts +1 -1
  517. package/dist/daemon/api/handlers/reviews.js +1 -1
  518. package/dist/daemon/api/handlers/run-routes.d.ts +2 -0
  519. package/dist/daemon/api/handlers/run-routes.js +1 -0
  520. package/dist/daemon/api/handlers/runs.d.ts +9 -0
  521. package/dist/daemon/api/handlers/runs.js +1 -0
  522. package/dist/daemon/api/handlers/subscriptions.js +1 -1
  523. package/dist/daemon/api/handlers/worktree.js +1 -1
  524. package/dist/daemon/api/map.d.ts +10 -4
  525. package/dist/daemon/api/map.js +2 -2
  526. package/dist/daemon/api/operations.d.ts +18 -0
  527. package/dist/daemon/api/operations.js +1 -0
  528. package/dist/daemon/api/principal.d.ts +42 -0
  529. package/dist/daemon/api/principal.js +1 -0
  530. package/dist/daemon/api/router.d.ts +27 -3
  531. package/dist/daemon/api/router.js +1 -1
  532. package/dist/daemon/api/server.d.ts +4 -0
  533. package/dist/daemon/api/server.js +1 -1
  534. package/dist/daemon/api/vendor-signin.d.ts +7 -0
  535. package/dist/daemon/api/vendor-signin.js +77 -0
  536. package/dist/daemon/api/viewer-presence.d.ts +3 -0
  537. package/dist/daemon/api/viewer-presence.js +1 -0
  538. package/dist/daemon/cron/armed-context.d.ts +4 -0
  539. package/dist/daemon/cron/armed-context.js +1 -1
  540. package/dist/daemon/cron/escalation.js +3 -3
  541. package/dist/daemon/cron/lease-recovery.js +1 -1
  542. package/dist/daemon/cron/sinks.js +2 -2
  543. package/dist/daemon/cron-run.d.ts +5 -5
  544. package/dist/daemon/cron-run.js +1 -1
  545. package/dist/daemon/crtrd-cli.js +1 -1
  546. package/dist/daemon/crtrd.js +8 -7
  547. package/dist/daemon/delivery/run-delivery.d.ts +4 -0
  548. package/dist/daemon/delivery/run-delivery.js +1 -1
  549. package/dist/daemon/fleet.d.ts +1 -1
  550. package/dist/daemon/fleet.js +6 -6
  551. package/dist/daemon/http-dispatcher.d.ts +1 -0
  552. package/dist/daemon/http-dispatcher.js +1 -0
  553. package/dist/daemon/human/finish.js +7 -7
  554. package/dist/daemon/joined-owner.d.ts +5 -0
  555. package/dist/daemon/joined-owner.js +1 -0
  556. package/dist/daemon/manage.js +2 -2
  557. package/dist/daemon/messaging/node-message.js +1 -1
  558. package/dist/daemon/park-activity.js +1 -1
  559. package/dist/daemon/reconcilers/bash-deadline.js +1 -1
  560. package/dist/daemon/reconcilers/broker-supervision.d.ts +1 -1
  561. package/dist/daemon/reconcilers/broker-supervision.js +4 -4
  562. package/dist/daemon/reconcilers/delivery-lane.js +1 -1
  563. package/dist/daemon/reconcilers/live-obligation.d.ts +7 -0
  564. package/dist/daemon/reconcilers/live-obligation.js +1 -1
  565. package/dist/daemon/reconcilers/node-lifecycle/tick.js +1 -1
  566. package/dist/daemon/reconcilers/storage-maintenance.d.ts +20 -1
  567. package/dist/daemon/reconcilers/storage-maintenance.js +1 -1
  568. package/dist/daemon/runs/append-section.d.ts +6 -0
  569. package/dist/daemon/runs/append-section.js +2 -0
  570. package/dist/daemon/runs/observer.d.ts +5 -0
  571. package/dist/daemon/runs/observer.js +4 -0
  572. package/dist/launcher/bwrap.d.ts +4 -0
  573. package/dist/launcher/bwrap.js +2 -0
  574. package/dist/launcher/client.d.ts +2 -0
  575. package/dist/launcher/client.js +3 -0
  576. package/dist/launcher/main.d.ts +1 -0
  577. package/dist/launcher/main.js +3 -0
  578. package/dist/launcher/netrule.d.ts +1 -0
  579. package/dist/launcher/netrule.js +1 -0
  580. package/dist/launcher/seccomp.d.ts +1 -0
  581. package/dist/launcher/seccomp.js +1 -0
  582. package/dist/launcher/spec.d.ts +88 -0
  583. package/dist/launcher/spec.js +1 -0
  584. package/dist/launcher/users.d.ts +18 -0
  585. package/dist/launcher/users.js +7 -0
  586. package/dist/launcher/validate.d.ts +22 -0
  587. package/dist/launcher/validate.js +1 -0
  588. package/dist/migrations/corpus.js +3 -3
  589. package/dist/migrations/runner.js +1 -1
  590. package/dist/native/linux/addon.node +0 -0
  591. package/dist/native/linux.d.ts +29 -0
  592. package/dist/native/linux.js +1 -0
  593. package/dist/pi-extensions/broker-local.js +2 -2
  594. package/dist/pi-extensions/canvas-bash-valve.d.ts +1 -3
  595. package/dist/pi-extensions/canvas-bash-valve.js +4 -7
  596. package/dist/pi-extensions/canvas-context-intro.d.ts +1 -2
  597. package/dist/pi-extensions/canvas-context-intro.js +2 -2
  598. package/dist/pi-extensions/canvas-doc-substrate.js +6 -6
  599. package/dist/pi-extensions/canvas-inbox-watcher.d.ts +2 -1
  600. package/dist/pi-extensions/canvas-inbox-watcher.js +2 -1
  601. package/dist/pi-extensions/canvas-passive-context.d.ts +1 -1
  602. package/dist/pi-extensions/canvas-passive-context.js +11 -11
  603. package/dist/pi-extensions/canvas-recap.js +6 -6
  604. package/dist/pi-extensions/canvas-stophook.js +1 -1
  605. package/dist/pi-extensions/canvas-structured-output.js +4 -4
  606. package/dist/pi-extensions/canvas-tool-guide.js +1 -1
  607. package/dist/pi-extensions/system-prompt-entry.d.ts +15 -0
  608. package/dist/pi-extensions/system-prompt-entry.js +1 -0
  609. package/dist/shared/env.d.ts +5 -1
  610. package/dist/shared/env.js +1 -1
  611. package/dist/shared/strip-cd-prefix.d.ts +1 -0
  612. package/dist/shared/strip-cd-prefix.js +1 -0
  613. package/dist/types.d.ts +31 -15
  614. package/docs/cli/memory-and-preferences.md +3 -1
  615. package/docs/sdk/client.md +34 -0
  616. package/docs/sdk/errors.md +2 -0
  617. package/docs/sdk/memory.md +2 -2
  618. package/docs/sdk/streaming.md +21 -0
  619. package/package.json +19 -4
  620. package/packages/crouter-identity/dist/index.d.ts +54 -0
  621. package/packages/crouter-identity/dist/index.js +166 -0
  622. package/packages/crouter-identity/package.json +33 -0
  623. package/runtime.lock.json +44 -8
  624. package/scripts/build-native-linux.mjs +16 -0
  625. package/scripts/install-runtime.mjs +9 -7
  626. package/scripts/lib/isolation-env.mjs +42 -0
  627. package/scripts/runtime-smoke.mjs +49 -0
  628. package/src/native/linux/addon.c +249 -0
  629. package/dist/core/profiles/state-block.d.ts +0 -4
  630. package/dist/core/profiles/state-block.js +0 -3
  631. package/dist/core/runtime/broker/auth-reload.d.ts +0 -41
  632. package/dist/core/runtime/broker/auth-reload.js +0 -1
  633. package/dist/core/substrate/cli-context-delivery.d.ts +0 -22
  634. package/dist/core/substrate/cli-context-delivery.js +0 -1
@@ -62,7 +62,11 @@ export interface BrokerParkCompleteRequest extends BrokerExecutionRequest {
62
62
  /** Durable model recipe selected by the live broker after Pi accepts a model or thinking change. */
63
63
  export interface BrokerModelCommitRequest extends BrokerExecutionRequest {
64
64
  spec: string;
65
- pinnedOverride?: boolean;
65
+ /** Portable routing contract for a user-selected change; absent means exact. */
66
+ intent?: {
67
+ family: string;
68
+ strength: 'ultra' | 'strong' | 'medium' | 'light';
69
+ };
66
70
  userSelected: boolean;
67
71
  }
68
72
  export interface BrokerModelCommitResultDTO {
@@ -72,6 +76,7 @@ export interface BrokerModelCommitResultDTO {
72
76
  * render their local Pi hooks without reading canvas.db themselves. */
73
77
  export interface BrokerExtensionNodeDTO {
74
78
  node_id: string;
79
+ grantee: string;
75
80
  name: string;
76
81
  description?: string;
77
82
  title?: string;
@@ -114,6 +119,7 @@ export type BrokerExtensionSubjectDTO = NodeSubjectDTO;
114
119
  * data; this daemon projection supplies only existence and display metadata. */
115
120
  export interface BrokerReportNodeDTO {
116
121
  node_id: string;
122
+ grantee: string;
117
123
  name: string;
118
124
  created: string;
119
125
  }
@@ -128,6 +134,42 @@ export interface BrokerExtensionStateDTO {
128
134
  subject: BrokerExtensionSubjectDTO;
129
135
  report_nodes: BrokerReportNodeDTO[];
130
136
  }
137
+ /** Memory-bearing context is rendered by crtrd, not by a sandboxed broker. */
138
+ export interface BrokerContextSnapshotDTO {
139
+ preferenceSnapshot: string | null;
140
+ exposures: Record<string, {
141
+ system?: number;
142
+ transcript?: number;
143
+ }>;
144
+ }
145
+ export interface BrokerContextRequest extends BrokerExecutionRequest {
146
+ mode: 'baseline' | 'compact' | 'preferences';
147
+ }
148
+ /** One full document body that entered the context: a `loaded` memory-log event. */
149
+ export interface BrokerContextLoadDTO {
150
+ name: string;
151
+ scope: string;
152
+ }
153
+ export interface BrokerContextDTO {
154
+ content: string;
155
+ compact: boolean;
156
+ snapshot: BrokerContextSnapshotDTO;
157
+ /** Full bodies this preparation delivers; the broker returns them with the commit. */
158
+ loads: BrokerContextLoadDTO[];
159
+ }
160
+ export interface BrokerMemoryRefsDTO {
161
+ refs: import('../../core/runtime/broker-protocol.js').RefMeta[];
162
+ names: string[];
163
+ }
164
+ export interface BrokerContextCommitRequest extends BrokerExecutionRequest {
165
+ snapshot: BrokerContextSnapshotDTO;
166
+ /** The prepared `loads` once the broker has delivered them; recorded as `loaded` events. */
167
+ loads?: BrokerContextLoadDTO[];
168
+ }
169
+ export interface BrokerContextEventRequest extends BrokerExecutionRequest {
170
+ event: 'read' | 'command' | 'pre-command' | 'compact' | 'persona';
171
+ value?: string;
172
+ }
131
173
  /** Guarded generated-label update. `initial` can only fill a blank generated
132
174
  * description; `recap` additionally compares the exact automatic-name snapshot
133
175
  * captured before the headless naming call. */
@@ -19,3 +19,14 @@ export interface NodeConfigPatch {
19
19
  /** Per-run allow-list. A patch may only remove scopes; it applies to a live broker on its next revive. */
20
20
  scopes?: string[];
21
21
  }
22
+ /** One installed persona kind, as the daemon resolves kinds for node creation. */
23
+ export interface KindDTO {
24
+ kind: string;
25
+ when_to_use: string | null;
26
+ /** Top-level kinds a sub-kind is offered to; null takes the default (its own ancestor). */
27
+ available_to: string[] | null;
28
+ }
29
+ /** `GET /v1/kinds` — every kind the daemon accepts on create, sorted by name. */
30
+ export interface KindListDTO {
31
+ kinds: KindDTO[];
32
+ }
@@ -0,0 +1,14 @@
1
+ export interface GrantGetDTO {
2
+ sub: string;
3
+ grantee: string;
4
+ client_id: string;
5
+ grant: string;
6
+ exp: number;
7
+ rev: number;
8
+ resolved_scopes: {
9
+ scope: string;
10
+ mode: 'always' | 'ask';
11
+ }[];
12
+ spend_cap: number | null;
13
+ payer: 'user';
14
+ }
File without changes
@@ -97,3 +97,17 @@ export interface SettleHumanRequestRequest {
97
97
  reason?: string;
98
98
  actor?: string;
99
99
  }
100
+ /** One product page component registered by config or an enabled plugin. */
101
+ export interface PageComponentDTO {
102
+ kind: string;
103
+ description?: string;
104
+ useWhen?: string;
105
+ doc?: string;
106
+ /** A display-only product slot contributes no page response. */
107
+ display?: boolean;
108
+ }
109
+ /** `GET /v1/human/components` — the product page components the runtime's
110
+ * config and enabled plugins register, merged in precedence order. */
111
+ export interface PageComponentListDTO {
112
+ components: PageComponentDTO[];
113
+ }
@@ -2,6 +2,9 @@ export declare const MEMORY_SCOPES: readonly ["node", "project", "profile", "use
2
2
  export type MemoryScopeName = typeof MEMORY_SCOPES[number];
3
3
  /** A canonical document address: slash-joined safe segments, carried as one percent-encoded path segment. */
4
4
  export declare function isMemoryDocName(name: string): boolean;
5
+ export interface MemoryOriginConversationDTO {
6
+ session_file: string;
7
+ }
5
8
  export interface MemoryScope {
6
9
  node?: string;
7
10
  cwd?: string;
@@ -12,6 +15,7 @@ export interface MemoryDocSummaryDTO {
12
15
  name: string;
13
16
  short_form: string;
14
17
  kind: string;
18
+ privacy: 'public' | 'friends' | 'private';
15
19
  scope: MemoryScopeName;
16
20
  extensions: Record<string, Record<string, string | boolean | number>>;
17
21
  path: string;
@@ -95,6 +99,7 @@ export type MemorySearchHitDTO = MemoryRankedSearchHitDTO | MemoryGrepSearchHitD
95
99
  export interface MemoryRankedSearchHitDTO {
96
100
  name: string;
97
101
  kind: string;
102
+ privacy: 'public' | 'friends' | 'private';
98
103
  scope: MemoryScopeName;
99
104
  score: number;
100
105
  short_form: string;
@@ -105,6 +110,7 @@ export interface MemoryRankedSearchHitDTO {
105
110
  }
106
111
  export interface MemoryGrepSearchHitDTO {
107
112
  name: string;
113
+ privacy: 'public' | 'friends' | 'private';
108
114
  scope: MemoryScopeName;
109
115
  line: number;
110
116
  text: string;
@@ -86,3 +86,38 @@ export interface CredentialRemovalResultDTO {
86
86
  provider: string;
87
87
  removed_accounts: number;
88
88
  }
89
+ /** `POST /v1/model-auth/flows` (`model_auth.start`) — begin a daemon-run vendor
90
+ * sign-in. `openai` is accepted as `openai-codex`. `redirect: "loopback"` makes
91
+ * the daemon listen on the vendor's registered localhost port (self-host only). */
92
+ export interface StartModelAuthFlowRequest {
93
+ provider: 'anthropic' | 'openai-codex' | 'openai';
94
+ redirect?: 'loopback';
95
+ /** Name for the signed-in account; omitted, a newly seen account is auto-labeled. */
96
+ label?: string;
97
+ }
98
+ /** The started flow: open `url`; for Anthropic's code page paste the code back
99
+ * through `complete`; for OpenAI's device flow enter `user_code` at `url`. */
100
+ export interface ModelAuthFlowStartedDTO {
101
+ flow_id: string;
102
+ provider: 'anthropic' | 'openai-codex';
103
+ url: string;
104
+ instructions: string;
105
+ user_code?: string;
106
+ expires_at: string;
107
+ }
108
+ /** `POST /v1/model-auth/flows/{flow_id}/complete` (`model_auth.complete`). */
109
+ export interface CompleteModelAuthFlowRequest {
110
+ input: string;
111
+ }
112
+ export interface ModelAuthFlowCompletedDTO {
113
+ flow_id: string;
114
+ provider: 'anthropic' | 'openai-codex';
115
+ status: 'connected';
116
+ }
117
+ /** `GET /v1/model-auth/flows/{flow_id}` — a flow's state. */
118
+ export interface ModelAuthFlowDTO {
119
+ flow_id: string;
120
+ provider: 'anthropic' | 'openai-codex';
121
+ status: 'pending' | 'connected' | 'failed' | 'expired';
122
+ message?: string;
123
+ }
@@ -0,0 +1,35 @@
1
+ /** `POST /v1/nodes/{id}/records/log` body: one serialized event record, no newline. */
2
+ export interface NodeLogAppendRequest {
3
+ record: string;
4
+ expected_execution_id: string;
5
+ }
6
+ export interface NodeLogAppendResultDTO {
7
+ appended: boolean;
8
+ }
9
+ /** `PUT /v1/nodes/{id}/records/telemetry` body. A null gauge or activity keeps the recorded value. */
10
+ export interface NodeTelemetryRecordRequest {
11
+ tokens_in: number;
12
+ tokens_out: number;
13
+ model: string;
14
+ context_tokens: number | null;
15
+ last_activity: string | null;
16
+ updated_at: string;
17
+ expected_execution_id: string;
18
+ }
19
+ /** `PUT /v1/nodes/{id}/records/recap` body. */
20
+ export interface NodeRecapRecordRequest {
21
+ briefing: string;
22
+ expected_execution_id: string;
23
+ }
24
+ /** `GET /v1/nodes/{id}/records/passive?ref=` result: a spilled direct-message body. */
25
+ export interface NodeMessageBodyDTO {
26
+ content: string;
27
+ }
28
+ /** `POST /v1/nodes/{id}/records/pushed-final` body. */
29
+ export interface NodePushedFinalRequest {
30
+ action: 'mark' | 'clear' | 'consume';
31
+ expected_execution_id: string;
32
+ }
33
+ export interface NodePushedFinalResultDTO {
34
+ pushedFinal: boolean;
35
+ }
File without changes
@@ -92,6 +92,8 @@ export interface NodeSummaryDTO {
92
92
  profile_id: string | null;
93
93
  /** Per-run allow-list; null inherits everything. */
94
94
  scopes: string[] | null;
95
+ /** App that owns this node's agent folder. */
96
+ grantee: string;
95
97
  /** Whether the node's profile is currently paused. */
96
98
  profile_paused: boolean;
97
99
  parent: NodeIdDTO | null;
@@ -352,6 +354,8 @@ export interface ArtifactDTO {
352
354
  source: string;
353
355
  ts: IsoTime;
354
356
  title: string;
357
+ /** Byte size of the file behind the ref; 0 for a synthetic or unreadable one. */
358
+ size: number;
355
359
  }
356
360
  /** `GET /v1/nodes/{id}/artifacts` query. Narrow to one corpus; absent is the
357
361
  * default report/doc/roadmap set (`inbox` is opt-in only). */
@@ -369,6 +373,7 @@ export interface ContextRootDTO {
369
373
  node_id: NodeIdDTO;
370
374
  label: string;
371
375
  dir: string;
376
+ reports_dir: string;
372
377
  /** True for the node's own context root. */
373
378
  self: boolean;
374
379
  /** Count of context + report files under the root. */
@@ -23,6 +23,36 @@ export interface EnsureProfileRequest {
23
23
  * launched under the profile as `CRTR_PROFILE_META_<KEY>` env. */
24
24
  metadata?: Record<string, string>;
25
25
  }
26
+ /** `POST /v1/profiles` body — create a profile of the caller's app. A name the
27
+ * caller's app already holds is refused. */
28
+ export interface CreateProfileRequest extends EnsureProfileRequest {
29
+ name: string;
30
+ }
31
+ /** `PATCH /v1/profiles/{name}` body — each present field changes one fact of a
32
+ * profile the caller's app holds. */
33
+ export interface UpdateProfileRequest {
34
+ name?: string;
35
+ default_kind?: string;
36
+ /** Append a project, or change the memory cap of the one at this path. */
37
+ add_project?: ProfileProject;
38
+ /** Remove the project at this path; the directory need not still exist. */
39
+ remove_project?: string;
40
+ }
41
+ /** `GET /v1/profiles/{name}/env` — stored env var names, never values. */
42
+ export interface ProfileEnvNamesDTO {
43
+ profile_id: string;
44
+ names: string[];
45
+ }
46
+ /** `PUT /v1/profiles/{name}/env/{var}` body. */
47
+ export interface SetProfileEnvRequest {
48
+ value: string;
49
+ }
50
+ /** `PUT` / `DELETE /v1/profiles/{name}/env/{var}` result. */
51
+ export interface ProfileEnvChangeDTO {
52
+ profile_id: string;
53
+ /** PUT: the name was newly added. DELETE: a stored value was removed. */
54
+ changed: boolean;
55
+ }
26
56
  /** `PATCH /v1/profiles/{name}/metadata` body. Merges `set` and removes `unset`. */
27
57
  export interface UpdateProfileMetadataRequest {
28
58
  set?: Record<string, string>;
@@ -60,11 +90,10 @@ export interface DeleteProfileResultDTO {
60
90
  export interface ProfileDTO {
61
91
  /** Stable profile-directory id (`<slug>-<id>`). */
62
92
  id: string;
93
+ /** Owning app, including for profiles shared with the caller. */
94
+ app: string;
63
95
  name: string;
64
96
  projects: ProfileProject[];
65
- /** Where nodes under this profile run — one of `projects[].path` (the first
66
- * unless re-pointed), or null when the profile owns none. */
67
- home: string | null;
68
97
  /** ISO timestamp when the profile was paused, or null while active. */
69
98
  paused_at: string | null;
70
99
  /** Default node kind when a create omits kind; `general` when absent on the manifest. */
@@ -73,4 +102,10 @@ export interface ProfileDTO {
73
102
  metadata: Record<string, string>;
74
103
  /** The directory this profile is pinned as default for, if any. */
75
104
  default_dir?: string | null;
105
+ /** ISO timestamp the profile was created. */
106
+ created_at: string;
107
+ /** ISO timestamp of the most recent selection, or null if never selected. */
108
+ last_used_at: string | null;
109
+ /** Absolute path of the profile's memory store. */
110
+ memory_path: string;
76
111
  }
@@ -42,3 +42,14 @@ export interface QuarantinedWorktreeDTO {
42
42
  /** Bytes occupied by the checkout, or null when it is gone or unmeasurable. */
43
43
  size_bytes: number | null;
44
44
  }
45
+ /** One space on the runtime: the person's (`user`) or an app's (`app:<id>`). */
46
+ export interface SpaceDTO {
47
+ space: string;
48
+ path: string;
49
+ /** Bytes the space occupies, or null when it cannot be measured. */
50
+ size_bytes: number | null;
51
+ }
52
+ /** `GET /v1/spaces` — person only. */
53
+ export interface SpaceListDTO {
54
+ spaces: SpaceDTO[];
55
+ }
@@ -4,6 +4,17 @@ export interface ErrorBody {
4
4
  code: string;
5
5
  message: string;
6
6
  details?: unknown;
7
+ type?: string;
8
+ param?: string;
9
+ origin?: string;
10
+ retryable?: boolean;
11
+ retry_after_s?: number;
12
+ reset_at?: string;
13
+ request_id?: string;
14
+ run_id?: string;
15
+ question_id?: string;
16
+ scope?: string;
17
+ user_action?: string;
7
18
  };
8
19
  }
9
20
  /** Thrown by `CrtrClient` on a non-2xx response (or a synthesized transport
@@ -14,7 +25,18 @@ export declare class APIError extends Error {
14
25
  readonly code: string;
15
26
  readonly details?: unknown;
16
27
  readonly headers: Headers;
17
- constructor(status: number, code: string, message: string, details?: unknown, headers?: HeadersInit);
28
+ readonly type?: string;
29
+ readonly param?: string;
30
+ readonly origin?: string;
31
+ readonly retryable?: boolean;
32
+ readonly retryAfterS?: number;
33
+ readonly resetAt?: string;
34
+ readonly requestId?: string;
35
+ readonly runId?: string;
36
+ readonly questionId?: string;
37
+ readonly scope?: string;
38
+ readonly userAction?: string;
39
+ constructor(status: number, code: string, message: string, details?: unknown, headers?: HeadersInit, envelope?: Partial<ErrorBody['error']>);
18
40
  }
19
41
  /** @deprecated Use APIError. Kept as the in-repo compatibility alias. */
20
42
  export { APIError as ApiError };
@@ -1 +1 @@
1
- var u=Object.defineProperty;var s=(t,e)=>u(t,"name",{value:e,configurable:!0});class a extends Error{static{s(this,"APIError")}status;code;details;headers;constructor(e,o,n,r,i){super(n),this.name="APIError",this.status=e,this.code=o,this.headers=new Headers(i),r!==void 0&&(this.details=r)}}function c(t){return t instanceof a?t.status===503&&(t.code==="daemon_unavailable"||t.code==="transport_error"||t.code==="daemon_request_interrupted")||t.status===504&&t.code==="request_timeout"||t.status>=500&&t.code==="daemon_health_unavailable":!1}s(c,"isDaemonTransportApiError");function f(t){if(typeof t!="object"||t===null)return!1;const e=t.error;if(typeof e!="object"||e===null)return!1;const{code:o,message:n}=e;return typeof o=="string"&&typeof n=="string"}s(f,"isErrorBody");export{a as APIError,a as ApiError,c as isDaemonTransportApiError,f as isErrorBody};
1
+ var d=Object.defineProperty;var e=(t,r)=>d(t,"name",{value:r,configurable:!0});class o extends Error{static{e(this,"APIError")}status;code;details;headers;type;param;origin;retryable;retryAfterS;resetAt;requestId;runId;questionId;scope;userAction;constructor(r,i,a,n,u,s){super(a),this.name="APIError",this.status=r,this.code=i,this.headers=new Headers(u),n!==void 0&&(this.details=n),this.type=s?.type,this.param=s?.param,this.origin=s?.origin,this.retryable=s?.retryable,this.retryAfterS=s?.retry_after_s,this.resetAt=s?.reset_at,this.requestId=s?.request_id??this.headers.get("Request-Id")??void 0,this.runId=s?.run_id,this.questionId=s?.question_id,this.scope=s?.scope,this.userAction=s?.user_action}}function h(t){return t instanceof o?t.status===503&&(t.code==="daemon_unavailable"||t.code==="transport_error"||t.code==="daemon_request_interrupted")||t.status===504&&t.code==="request_timeout"||t.status>=500&&t.code==="daemon_health_unavailable":!1}e(h,"isDaemonTransportApiError");function f(t){if(typeof t!="object"||t===null)return!1;const r=t.error;if(typeof r!="object"||r===null)return!1;const{code:i,message:a}=r;return typeof i=="string"&&typeof a=="string"}e(f,"isErrorBody");export{o as APIError,o as ApiError,h as isDaemonTransportApiError,f as isErrorBody};
@@ -6,6 +6,7 @@ export { API_VERSION, routes } from './routes.js';
6
6
  export * from '../shared/generated-context.js';
7
7
  export * from './dto/common.js';
8
8
  export * from './dto/health.js';
9
+ export * from './dto/grants.js';
9
10
  export * from './dto/nodes.js';
10
11
  export * from './dto/node-outcomes.js';
11
12
  export * from './dto/node-events.js';
@@ -33,3 +34,4 @@ export * from './dto/human-requests.js';
33
34
  export * from './dto/reviews.js';
34
35
  export * from './dto/review-comments.js';
35
36
  export * from './dto/chat-inventory.js';
37
+ export * from './dto/analytics.js';
package/dist/api/index.js CHANGED
@@ -1 +1 @@
1
- import{CrtrClient as t,waitForDaemonAvailability as e}from"./client.js";import{APIError as p,ApiError as f,isErrorBody as x}from"./errors.js";import{API_VERSION as a,routes as A}from"./routes.js";export*from"../shared/generated-context.js";export*from"./dto/common.js";export*from"./dto/health.js";export*from"./dto/nodes.js";export*from"./dto/node-outcomes.js";export*from"./dto/node-events.js";export*from"./dto/bash-jobs.js";export*from"./dto/messages.js";export*from"./dto/reports.js";export*from"./dto/lifecycle.js";export*from"./dto/subscriptions.js";export*from"./dto/focus.js";export*from"./dto/crons.js";export*from"./dto/config.js";export*from"./dto/attach.js";export*from"./dto/broker.js";export*from"./dto/profiles.js";export*from"./dto/modelauth.js";export*from"./dto/model-config.js";export*from"./dto/canvas.js";export*from"./dto/worktree.js";export*from"./dto/human.js";export*from"./dto/files.js";export*from"./dto/bash.js";export*from"./dto/memory.js";export*from"./dto/inbox.js";export*from"./dto/human-requests.js";export*from"./dto/reviews.js";export*from"./dto/review-comments.js";export*from"./dto/chat-inventory.js";export{p as APIError,a as API_VERSION,f as ApiError,t as CrtrClient,x as isErrorBody,A as routes,e as waitForDaemonAvailability};
1
+ import{CrtrClient as t,waitForDaemonAvailability as e}from"./client.js";import{APIError as p,ApiError as f,isErrorBody as x}from"./errors.js";import{API_VERSION as a,routes as A}from"./routes.js";export*from"../shared/generated-context.js";export*from"./dto/common.js";export*from"./dto/health.js";export*from"./dto/grants.js";export*from"./dto/nodes.js";export*from"./dto/node-outcomes.js";export*from"./dto/node-events.js";export*from"./dto/bash-jobs.js";export*from"./dto/messages.js";export*from"./dto/reports.js";export*from"./dto/lifecycle.js";export*from"./dto/subscriptions.js";export*from"./dto/focus.js";export*from"./dto/crons.js";export*from"./dto/config.js";export*from"./dto/attach.js";export*from"./dto/broker.js";export*from"./dto/profiles.js";export*from"./dto/modelauth.js";export*from"./dto/model-config.js";export*from"./dto/canvas.js";export*from"./dto/worktree.js";export*from"./dto/human.js";export*from"./dto/files.js";export*from"./dto/bash.js";export*from"./dto/memory.js";export*from"./dto/inbox.js";export*from"./dto/human-requests.js";export*from"./dto/reviews.js";export*from"./dto/review-comments.js";export*from"./dto/chat-inventory.js";export*from"./dto/analytics.js";export{p as APIError,a as API_VERSION,f as ApiError,t as CrtrClient,x as isErrorBody,A as routes,e as waitForDaemonAvailability};
@@ -1 +1 @@
1
- var v=Object.defineProperty;var a=(e,o)=>v(e,"name",{value:o,configurable:!0});import{request as A}from"node:http";import{homedir as R}from"node:os";import{join as w}from"node:path";import{CrtrClient as S}from"./client.js";import{envHomeOverride as T}from"../shared/env.js";const O=".crouter",k="crtrd.sock",L=Symbol.for("@north-light/crouter-api/local-socket-fetch");function x(){const e=T(),o=e!==void 0&&e!==""?e:w(R(),O,"canvas");return w(o,k)}a(x,"defaultSocketPath");function H(e){const o=a(function(n,s={}){const m=n instanceof URL?n:new URL(typeof n=="string"?n:n.url),E=s.method??"GET",h={};if(s.headers!==void 0)for(const[l,u]of new Headers(s.headers).entries())h[l]=u;const f=typeof s.body=="string"?s.body:void 0;return f!==void 0&&(h["content-length"]=String(Buffer.byteLength(f))),new Promise((l,u)=>{const i=A({socketPath:e,path:m.pathname+m.search,method:E,headers:h},t=>{const g=new ReadableStream({start(d){t.on("data",r=>d.enqueue(new Uint8Array(r))),t.on("end",()=>d.close()),t.on("error",r=>d.error(r))},cancel(){t.destroy()}}),y=new Headers;for(const[d,r]of Object.entries(t.headers))if(r!==void 0)for(const C of Array.isArray(r)?r:[r])y.append(d,C);const b=t.statusCode??0;l(new Response(b===204?null:g,{status:b,statusText:t.statusMessage,headers:y}))});i.on("error",t=>u(new TypeError("fetch failed",{cause:t})));const c=s.signal,p=a(()=>{i.destroy(),u(c?.reason??new DOMException("The operation was aborted.","AbortError"))},"abort");if(c!=null){if(c.aborted){p();return}c.addEventListener("abort",p,{once:!0})}f!==void 0&&i.write(f),i.end()})},"fetchOverSocket");return o[L]=!0,o}a(H,"socketFetch");function D(e={}){const{socketPath:o,...n}=e;return new S({baseUrl:"http://localhost",fetch:H(o??x()),autostart:!0,...n})}a(D,"localClient");export{x as defaultSocketPath,D as localClient,H as socketFetch};
1
+ var T=Object.defineProperty;var a=(r,e)=>T(r,"name",{value:e,configurable:!0});import{request as g}from"node:http";import{homedir as A}from"node:os";import{join as p}from"node:path";import{CrtrClient as S}from"./client.js";import{envHomeOverride as v}from"../shared/env.js";const O=".crouter",_="api.sock",k=Symbol.for("@north-light/crouter-api/local-socket-fetch");function x(){const r=process.env.CRTR_API_SOCKET;if(r)return r;const e=v(),t=e!==void 0&&e!==""?e:p(A(),O);return p(process.platform==="linux"?"/run/crtr":p(t,"runtime"),_)}a(x,"defaultSocketPath");function L(r){const e=a(function(t,s={}){const m=t instanceof URL?t:new URL(typeof t=="string"?t:t.url),E=s.method??"GET",l={};if(s.headers!==void 0)for(const[h,u]of new Headers(s.headers).entries())l[h]=u;const f=typeof s.body=="string"?s.body:void 0;return f!==void 0&&(l["content-length"]=String(Buffer.byteLength(f))),new Promise((h,u)=>{const i=g({socketPath:r,path:m.pathname+m.search,method:E,headers:l},o=>{const C=new ReadableStream({start(d){o.on("data",n=>d.enqueue(new Uint8Array(n))),o.on("end",()=>d.close()),o.on("error",n=>d.error(n))},cancel(){o.destroy()}}),b=new Headers;for(const[d,n]of Object.entries(o.headers))if(n!==void 0)for(const R of Array.isArray(n)?n:[n])b.append(d,R);const w=o.statusCode??0;h(new Response(w===204?null:C,{status:w,statusText:o.statusMessage,headers:b}))});i.on("error",o=>u(new TypeError("fetch failed",{cause:o})));const c=s.signal,y=a(()=>{i.destroy(),u(c?.reason??new DOMException("The operation was aborted.","AbortError"))},"abort");if(c!=null){if(c.aborted){y();return}c.addEventListener("abort",y,{once:!0})}f!==void 0&&i.write(f),i.end()})},"fetchOverSocket");return e[k]=!0,e}a(L,"socketFetch");function B(r={}){const{socketPath:e,...t}=r;return new S({baseUrl:"http://localhost",fetch:L(e??x()),autostart:!0,...t})}a(B,"localClient");export{x as defaultSocketPath,B as localClient,L as socketFetch};
@@ -10,6 +10,7 @@ export declare const routes: {
10
10
  readonly nodes: () => string;
11
11
  readonly reviveAll: () => string;
12
12
  readonly node: (id: string) => string;
13
+ readonly nodeMemoryReads: (id: string) => string;
13
14
  readonly nodeOutcome: (id: string) => string;
14
15
  readonly nodeOutcomeDelivery: (id: string) => string;
15
16
  readonly nodeEvents: (id: string) => string;
@@ -35,10 +36,20 @@ export declare const routes: {
35
36
  readonly nodeBrokerParkComplete: (id: string) => string;
36
37
  readonly nodeBrokerParkActivity: (id: string) => string;
37
38
  readonly nodeBrokerTelemetry: (id: string) => string;
39
+ readonly nodeLog: (id: string) => string;
40
+ readonly nodeTelemetry: (id: string) => string;
41
+ readonly nodeRecap: (id: string) => string;
42
+ readonly nodeInboxReport: (id: string) => string;
43
+ readonly nodePassiveMessage: (id: string) => string;
44
+ readonly nodePushedFinal: (id: string) => string;
38
45
  readonly nodeMailClaim: (id: string) => string;
39
46
  readonly nodeMailAcknowledge: (id: string) => string;
40
47
  readonly nodeBrokerModel: (id: string) => string;
41
48
  readonly nodeBrokerExtensionState: (id: string) => string;
49
+ readonly nodeBrokerContext: (id: string) => string;
50
+ readonly nodeBrokerMemoryRefs: (id: string) => string;
51
+ readonly nodeBrokerContextCommit: (id: string) => string;
52
+ readonly nodeBrokerContextEvent: (id: string) => string;
42
53
  readonly nodeBrokerGeneratedName: (id: string) => string;
43
54
  readonly nodeBrokerPersonaAck: (id: string) => string;
44
55
  readonly brokerTurn: (id: string) => string;
@@ -53,9 +64,11 @@ export declare const routes: {
53
64
  readonly nodeYield: (id: string) => string;
54
65
  readonly nodeWait: (id: string) => string;
55
66
  readonly nodeConfig: (id: string) => string;
67
+ readonly kinds: () => string;
56
68
  readonly nodeWorktreeClose: (id: string) => string;
57
69
  readonly nodeWorktreeAbandon: (id: string) => string;
58
70
  readonly quarantinedWorktrees: () => string;
71
+ readonly spaces: () => string;
59
72
  readonly nodeAttach: (id: string) => string;
60
73
  readonly focuses: () => string;
61
74
  readonly focusByNode: () => string;
@@ -77,6 +90,7 @@ export declare const routes: {
77
90
  readonly canvasHistoryStats: () => string;
78
91
  readonly canvasSnapshot: () => string;
79
92
  readonly canvasRoster: () => string;
93
+ readonly canvasAnalytics: () => string;
80
94
  readonly canvasGraph: () => string;
81
95
  readonly canvasPrune: () => string;
82
96
  readonly humanReviews: () => string;
@@ -101,6 +115,7 @@ export declare const routes: {
101
115
  readonly humanInboxCancel: (ticketId: string) => string;
102
116
  readonly humanInboxFeedbackResolve: (ticketId: string, commentId: string) => string;
103
117
  readonly humanRequests: () => string;
118
+ readonly humanComponents: () => string;
104
119
  readonly humanRequest: (requestId: string) => string;
105
120
  readonly humanRequestReplace: (requestId: string) => string;
106
121
  readonly humanRequestRespond: (requestId: string) => string;
@@ -111,9 +126,15 @@ export declare const routes: {
111
126
  readonly profilePause: (name: string) => string;
112
127
  readonly profileResume: (name: string) => string;
113
128
  readonly profileMetadata: (name: string) => string;
129
+ readonly profileEnv: (name: string) => string;
130
+ readonly profileEnvVar: (name: string, variable: string) => string;
114
131
  readonly modelAuths: () => string;
115
132
  readonly modelAuthReadiness: () => string;
116
133
  readonly modelAuth: (provider: string) => string;
134
+ readonly modelAuthFlows: () => string;
135
+ readonly modelAuthFlow: (flowId: string) => string;
136
+ readonly modelAuthFlowComplete: (flowId: string) => string;
137
+ readonly modelAuthFlowCancel: (flowId: string) => string;
117
138
  readonly filePeek: () => string;
118
139
  readonly fileWrite: () => string;
119
140
  readonly fileList: () => string;
@@ -124,4 +145,5 @@ export declare const routes: {
124
145
  readonly memoryDocHistory: (name: string) => string;
125
146
  readonly memorySearch: () => string;
126
147
  readonly memoryResolve: () => string;
148
+ readonly memoryOrigin: () => string;
127
149
  };
@@ -1 +1 @@
1
- var s=Object.defineProperty;var o=(e,n)=>s(e,"name",{value:n,configurable:!0});const $="v1",a="/v1",t={healthz:o(()=>"/healthz","healthz"),status:o(()=>"/v1/status","status"),daemonRestart:o(()=>"/v1/daemon/restart","daemonRestart"),daemonMigrate:o(()=>"/v1/daemon/migrate","daemonMigrate"),daemonAdmit:o(()=>"/v1/daemon/admit","daemonAdmit"),nodes:o(()=>"/v1/nodes","nodes"),reviveAll:o(()=>"/v1/nodes/revive-all","reviveAll"),node:o(e=>`/v1/nodes/${e}`,"node"),nodeOutcome:o(e=>`/v1/nodes/${e}/outcome`,"nodeOutcome"),nodeOutcomeDelivery:o(e=>`/v1/nodes/${e}/outcome-delivery`,"nodeOutcomeDelivery"),nodeEvents:o(e=>`/v1/nodes/${e}/events`,"nodeEvents"),nodeSnapshot:o(e=>`/v1/nodes/${e}/snapshot`,"nodeSnapshot"),nodeSubject:o(e=>`/v1/nodes/${e}/subject`,"nodeSubject"),nodeSession:o(e=>`/v1/nodes/${e}/session`,"nodeSession"),nodeChatInventory:o(e=>`/v1/nodes/${e}/chat-inventory`,"nodeChatInventory"),prospectiveChatInventory:o(()=>"/v1/prospective-chat-inventory","prospectiveChatInventory"),nodeTranscript:o(e=>`/v1/nodes/${e}/transcript`,"nodeTranscript"),nodeContext:o(e=>`/v1/nodes/${e}/context`,"nodeContext"),nodeArtifacts:o(e=>`/v1/nodes/${e}/artifacts`,"nodeArtifacts"),nodeReports:o(e=>`/v1/nodes/${e}/reports`,"nodeReports"),nodeResult:o(e=>`/v1/nodes/${e}/result`,"nodeResult"),nodeJobs:o(e=>`/v1/nodes/${e}/jobs`,"nodeJobs"),nodeJob:o((e,n)=>`/v1/nodes/${e}/jobs/${n}`,"nodeJob"),nodeMessages:o(e=>`/v1/nodes/${e}/messages`,"nodeMessages"),nodeInterrupt:o(e=>`/v1/nodes/${e}/interrupt`,"nodeInterrupt"),nodeFork:o(e=>`/v1/nodes/${e}/fork`,"nodeFork"),nodeRevive:o(e=>`/v1/nodes/${e}/revive`,"nodeRevive"),nodeRelaunchRoot:o(e=>`/v1/nodes/${e}/relaunch-root`,"nodeRelaunchRoot"),nodeBrokerSessionBound:o(e=>`/v1/nodes/${e}/broker/session-bound`,"nodeBrokerSessionBound"),nodeBrokerSettle:o(e=>`/v1/nodes/${e}/broker/settle`,"nodeBrokerSettle"),nodeBrokerParkComplete:o(e=>`/v1/nodes/${e}/broker/park-complete`,"nodeBrokerParkComplete"),nodeBrokerParkActivity:o(e=>`/v1/nodes/${e}/broker/park-activity`,"nodeBrokerParkActivity"),nodeBrokerTelemetry:o(e=>`/v1/nodes/${e}/broker/telemetry`,"nodeBrokerTelemetry"),nodeMailClaim:o(e=>`/v1/nodes/${e}/mail/claim`,"nodeMailClaim"),nodeMailAcknowledge:o(e=>`/v1/nodes/${e}/mail/acknowledge`,"nodeMailAcknowledge"),nodeBrokerModel:o(e=>`/v1/nodes/${e}/broker/model`,"nodeBrokerModel"),nodeBrokerExtensionState:o(e=>`/v1/nodes/${e}/broker/extension-state`,"nodeBrokerExtensionState"),nodeBrokerGeneratedName:o(e=>`/v1/nodes/${e}/broker/generated-name`,"nodeBrokerGeneratedName"),nodeBrokerPersonaAck:o(e=>`/v1/nodes/${e}/broker/persona-ack`,"nodeBrokerPersonaAck"),brokerTurn:o(e=>`/v1/broker/${e}/turn`,"brokerTurn"),brokerProviderRetry:o(e=>`/v1/broker/${e}/provider-retry`,"brokerProviderRetry"),brokerFault:o(e=>`/v1/broker/${e}/fault`,"brokerFault"),brokerRecovery:o(e=>`/v1/broker/${e}/recovery`,"brokerRecovery"),nodeFault:o(e=>`/v1/nodes/${e}/fault`,"nodeFault"),nodeClose:o(e=>`/v1/nodes/${e}/close`,"nodeClose"),nodeRecycle:o(e=>`/v1/nodes/${e}/recycle`,"nodeRecycle"),nodeDemote:o(e=>`/v1/nodes/${e}/demote`,"nodeDemote"),nodePromote:o(e=>`/v1/nodes/${e}/promote`,"nodePromote"),nodeYield:o(e=>`/v1/nodes/${e}/yield`,"nodeYield"),nodeWait:o(e=>`/v1/nodes/${e}/wait`,"nodeWait"),nodeConfig:o(e=>`/v1/nodes/${e}/config`,"nodeConfig"),nodeWorktreeClose:o(e=>`/v1/nodes/${e}/worktree/close`,"nodeWorktreeClose"),nodeWorktreeAbandon:o(e=>`/v1/nodes/${e}/worktree/abandon`,"nodeWorktreeAbandon"),quarantinedWorktrees:o(()=>"/v1/worktrees/quarantined","quarantinedWorktrees"),nodeAttach:o(e=>`/v1/nodes/${e}/attach`,"nodeAttach"),focuses:o(()=>"/v1/focuses","focuses"),focusByNode:o(()=>"/v1/focuses/by-node","focusByNode"),focusByPane:o(()=>"/v1/focuses/by-pane","focusByPane"),focus:o(e=>`/v1/focuses/${e}`,"focus"),nodeSubscriptions:o(e=>`/v1/nodes/${e}/subscriptions`,"nodeSubscriptions"),nodeSubscription:o((e,n)=>`/v1/nodes/${e}/subscriptions/${n}`,"nodeSubscription"),crons:o(()=>"/v1/crons","crons"),cron:o(e=>`/v1/crons/${e}`,"cron"),cronPause:o(e=>`/v1/crons/${e}/pause`,"cronPause"),cronResume:o(e=>`/v1/crons/${e}/resume`,"cronResume"),cronRun:o(e=>`/v1/crons/${e}/run`,"cronRun"),cronsPoke:o(()=>"/v1/crons/poke","cronsPoke"),canvasAttention:o(()=>"/v1/canvas/attention","canvasAttention"),canvasAttentionCounts:o(()=>"/v1/canvas/attention/counts","canvasAttentionCounts"),canvasHistorySearch:o(()=>"/v1/canvas/history/search","canvasHistorySearch"),canvasHistoryGrep:o(()=>"/v1/canvas/history/grep","canvasHistoryGrep"),canvasHistoryRead:o(()=>"/v1/canvas/history/read","canvasHistoryRead"),canvasHistoryStats:o(()=>"/v1/canvas/history/stats","canvasHistoryStats"),canvasSnapshot:o(()=>"/v1/canvas/snapshot","canvasSnapshot"),canvasRoster:o(()=>"/v1/canvas/roster","canvasRoster"),canvasGraph:o(()=>"/v1/canvas/graph","canvasGraph"),canvasPrune:o(()=>"/v1/canvas/prune","canvasPrune"),humanReviews:o(()=>"/v1/human/reviews","humanReviews"),humanReview:o(e=>`/v1/human/reviews/${e}`,"humanReview"),humanReviewSubmit:o(e=>`/v1/human/reviews/${e}/submit`,"humanReviewSubmit"),humanReviewCancel:o(e=>`/v1/human/reviews/${e}/cancel`,"humanReviewCancel"),humanReviewDocument:o(e=>`/v1/human/reviews/${e}/document`,"humanReviewDocument"),humanReviewComments:o(e=>`/v1/human/reviews/${e}/comments`,"humanReviewComments"),humanReviewCommentEvents:o(e=>`/v1/human/reviews/${e}/comment-events`,"humanReviewCommentEvents"),humanReviewCommentRanges:o(e=>`/v1/human/reviews/${e}/comment-ranges`,"humanReviewCommentRanges"),humanComment:o(e=>`/v1/human/comments/${e}`,"humanComment"),humanCommentEdit:o(e=>`/v1/human/comments/${e}/edit`,"humanCommentEdit"),humanCommentResolve:o(e=>`/v1/human/comments/${e}/resolve`,"humanCommentResolve"),humanCommentReopen:o(e=>`/v1/human/comments/${e}/reopen`,"humanCommentReopen"),humanCommentDelete:o(e=>`/v1/human/comments/${e}/delete`,"humanCommentDelete"),humanCommentFork:o(e=>`/v1/human/comments/${e}/fork`,"humanCommentFork"),humanInbox:o(()=>"/v1/human/inbox","humanInbox"),humanInboxTicket:o(e=>`/v1/human/inbox/${e}`,"humanInboxTicket"),humanInboxRespond:o(e=>`/v1/human/inbox/${e}/respond`,"humanInboxRespond"),humanInboxProgress:o(e=>`/v1/human/inbox/${e}/progress`,"humanInboxProgress"),humanInboxResponse:o(e=>`/v1/human/inbox/${e}/response`,"humanInboxResponse"),humanInboxCancel:o(e=>`/v1/human/inbox/${e}/cancel`,"humanInboxCancel"),humanInboxFeedbackResolve:o((e,n)=>`/v1/human/inbox/${e}/feedback-comments/${n}/resolve`,"humanInboxFeedbackResolve"),humanRequests:o(()=>"/v1/human/requests","humanRequests"),humanRequest:o(e=>`/v1/human/requests/${e}`,"humanRequest"),humanRequestReplace:o(e=>`/v1/human/requests/${e}/replace`,"humanRequestReplace"),humanRequestRespond:o(e=>`/v1/human/requests/${e}/respond`,"humanRequestRespond"),humanRequestDismiss:o(e=>`/v1/human/requests/${e}/dismiss`,"humanRequestDismiss"),humanRequestCancel:o(e=>`/v1/human/requests/${e}/cancel`,"humanRequestCancel"),profiles:o(()=>"/v1/profiles","profiles"),profile:o(e=>`/v1/profiles/${e}`,"profile"),profilePause:o(e=>`/v1/profiles/${e}/pause`,"profilePause"),profileResume:o(e=>`/v1/profiles/${e}/resume`,"profileResume"),profileMetadata:o(e=>`/v1/profiles/${e}/metadata`,"profileMetadata"),modelAuths:o(()=>"/v1/model-auth","modelAuths"),modelAuthReadiness:o(()=>"/v1/model-auth/readiness","modelAuthReadiness"),modelAuth:o(e=>`/v1/model-auth/${e}`,"modelAuth"),filePeek:o(()=>"/v1/files/peek","filePeek"),fileWrite:o(()=>"/v1/files/write","fileWrite"),fileList:o(()=>"/v1/files/list","fileList"),bash:o(()=>"/v1/bash","bash"),memoryDocs:o(()=>"/v1/memory/docs","memoryDocs"),memoryDoc:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}`,"memoryDoc"),memoryDocMove:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}/move`,"memoryDocMove"),memoryDocHistory:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}/history`,"memoryDocHistory"),memorySearch:o(()=>"/v1/memory/search","memorySearch"),memoryResolve:o(()=>"/v1/memory/resolve","memoryResolve")};export{$ as API_VERSION,t as routes};
1
+ var s=Object.defineProperty;var o=(e,n)=>s(e,"name",{value:n,configurable:!0});const $="v1",t="/v1",a={healthz:o(()=>"/healthz","healthz"),status:o(()=>"/v1/status","status"),daemonRestart:o(()=>"/v1/daemon/restart","daemonRestart"),daemonMigrate:o(()=>"/v1/daemon/migrate","daemonMigrate"),daemonAdmit:o(()=>"/v1/daemon/admit","daemonAdmit"),nodes:o(()=>"/v1/nodes","nodes"),reviveAll:o(()=>"/v1/nodes/revive-all","reviveAll"),node:o(e=>`/v1/nodes/${e}`,"node"),nodeMemoryReads:o(e=>`/v1/nodes/${e}/memory-reads`,"nodeMemoryReads"),nodeOutcome:o(e=>`/v1/nodes/${e}/outcome`,"nodeOutcome"),nodeOutcomeDelivery:o(e=>`/v1/nodes/${e}/outcome-delivery`,"nodeOutcomeDelivery"),nodeEvents:o(e=>`/v1/nodes/${e}/events`,"nodeEvents"),nodeSnapshot:o(e=>`/v1/nodes/${e}/snapshot`,"nodeSnapshot"),nodeSubject:o(e=>`/v1/nodes/${e}/subject`,"nodeSubject"),nodeSession:o(e=>`/v1/nodes/${e}/session`,"nodeSession"),nodeChatInventory:o(e=>`/v1/nodes/${e}/chat-inventory`,"nodeChatInventory"),prospectiveChatInventory:o(()=>"/v1/prospective-chat-inventory","prospectiveChatInventory"),nodeTranscript:o(e=>`/v1/nodes/${e}/transcript`,"nodeTranscript"),nodeContext:o(e=>`/v1/nodes/${e}/context`,"nodeContext"),nodeArtifacts:o(e=>`/v1/nodes/${e}/artifacts`,"nodeArtifacts"),nodeReports:o(e=>`/v1/nodes/${e}/reports`,"nodeReports"),nodeResult:o(e=>`/v1/nodes/${e}/result`,"nodeResult"),nodeJobs:o(e=>`/v1/nodes/${e}/jobs`,"nodeJobs"),nodeJob:o((e,n)=>`/v1/nodes/${e}/jobs/${n}`,"nodeJob"),nodeMessages:o(e=>`/v1/nodes/${e}/messages`,"nodeMessages"),nodeInterrupt:o(e=>`/v1/nodes/${e}/interrupt`,"nodeInterrupt"),nodeFork:o(e=>`/v1/nodes/${e}/fork`,"nodeFork"),nodeRevive:o(e=>`/v1/nodes/${e}/revive`,"nodeRevive"),nodeRelaunchRoot:o(e=>`/v1/nodes/${e}/relaunch-root`,"nodeRelaunchRoot"),nodeBrokerSessionBound:o(e=>`/v1/nodes/${e}/broker/session-bound`,"nodeBrokerSessionBound"),nodeBrokerSettle:o(e=>`/v1/nodes/${e}/broker/settle`,"nodeBrokerSettle"),nodeBrokerParkComplete:o(e=>`/v1/nodes/${e}/broker/park-complete`,"nodeBrokerParkComplete"),nodeBrokerParkActivity:o(e=>`/v1/nodes/${e}/broker/park-activity`,"nodeBrokerParkActivity"),nodeBrokerTelemetry:o(e=>`/v1/nodes/${e}/broker/telemetry`,"nodeBrokerTelemetry"),nodeLog:o(e=>`/v1/nodes/${e}/records/log`,"nodeLog"),nodeTelemetry:o(e=>`/v1/nodes/${e}/records/telemetry`,"nodeTelemetry"),nodeRecap:o(e=>`/v1/nodes/${e}/records/recap`,"nodeRecap"),nodeInboxReport:o(e=>`/v1/nodes/${e}/records/inbox`,"nodeInboxReport"),nodePassiveMessage:o(e=>`/v1/nodes/${e}/records/passive`,"nodePassiveMessage"),nodePushedFinal:o(e=>`/v1/nodes/${e}/records/pushed-final`,"nodePushedFinal"),nodeMailClaim:o(e=>`/v1/nodes/${e}/mail/claim`,"nodeMailClaim"),nodeMailAcknowledge:o(e=>`/v1/nodes/${e}/mail/acknowledge`,"nodeMailAcknowledge"),nodeBrokerModel:o(e=>`/v1/nodes/${e}/broker/model`,"nodeBrokerModel"),nodeBrokerExtensionState:o(e=>`/v1/nodes/${e}/broker/extension-state`,"nodeBrokerExtensionState"),nodeBrokerContext:o(e=>`/v1/nodes/${e}/broker/context`,"nodeBrokerContext"),nodeBrokerMemoryRefs:o(e=>`/v1/nodes/${e}/broker/memory-refs`,"nodeBrokerMemoryRefs"),nodeBrokerContextCommit:o(e=>`/v1/nodes/${e}/broker/context/commit`,"nodeBrokerContextCommit"),nodeBrokerContextEvent:o(e=>`/v1/nodes/${e}/broker/context/event`,"nodeBrokerContextEvent"),nodeBrokerGeneratedName:o(e=>`/v1/nodes/${e}/broker/generated-name`,"nodeBrokerGeneratedName"),nodeBrokerPersonaAck:o(e=>`/v1/nodes/${e}/broker/persona-ack`,"nodeBrokerPersonaAck"),brokerTurn:o(e=>`/v1/broker/${e}/turn`,"brokerTurn"),brokerProviderRetry:o(e=>`/v1/broker/${e}/provider-retry`,"brokerProviderRetry"),brokerFault:o(e=>`/v1/broker/${e}/fault`,"brokerFault"),brokerRecovery:o(e=>`/v1/broker/${e}/recovery`,"brokerRecovery"),nodeFault:o(e=>`/v1/nodes/${e}/fault`,"nodeFault"),nodeClose:o(e=>`/v1/nodes/${e}/close`,"nodeClose"),nodeRecycle:o(e=>`/v1/nodes/${e}/recycle`,"nodeRecycle"),nodeDemote:o(e=>`/v1/nodes/${e}/demote`,"nodeDemote"),nodePromote:o(e=>`/v1/nodes/${e}/promote`,"nodePromote"),nodeYield:o(e=>`/v1/nodes/${e}/yield`,"nodeYield"),nodeWait:o(e=>`/v1/nodes/${e}/wait`,"nodeWait"),nodeConfig:o(e=>`/v1/nodes/${e}/config`,"nodeConfig"),kinds:o(()=>"/v1/kinds","kinds"),nodeWorktreeClose:o(e=>`/v1/nodes/${e}/worktree/close`,"nodeWorktreeClose"),nodeWorktreeAbandon:o(e=>`/v1/nodes/${e}/worktree/abandon`,"nodeWorktreeAbandon"),quarantinedWorktrees:o(()=>"/v1/worktrees/quarantined","quarantinedWorktrees"),spaces:o(()=>"/v1/spaces","spaces"),nodeAttach:o(e=>`/v1/nodes/${e}/attach`,"nodeAttach"),focuses:o(()=>"/v1/focuses","focuses"),focusByNode:o(()=>"/v1/focuses/by-node","focusByNode"),focusByPane:o(()=>"/v1/focuses/by-pane","focusByPane"),focus:o(e=>`/v1/focuses/${e}`,"focus"),nodeSubscriptions:o(e=>`/v1/nodes/${e}/subscriptions`,"nodeSubscriptions"),nodeSubscription:o((e,n)=>`/v1/nodes/${e}/subscriptions/${n}`,"nodeSubscription"),crons:o(()=>"/v1/crons","crons"),cron:o(e=>`/v1/crons/${e}`,"cron"),cronPause:o(e=>`/v1/crons/${e}/pause`,"cronPause"),cronResume:o(e=>`/v1/crons/${e}/resume`,"cronResume"),cronRun:o(e=>`/v1/crons/${e}/run`,"cronRun"),cronsPoke:o(()=>"/v1/crons/poke","cronsPoke"),canvasAttention:o(()=>"/v1/canvas/attention","canvasAttention"),canvasAttentionCounts:o(()=>"/v1/canvas/attention/counts","canvasAttentionCounts"),canvasHistorySearch:o(()=>"/v1/canvas/history/search","canvasHistorySearch"),canvasHistoryGrep:o(()=>"/v1/canvas/history/grep","canvasHistoryGrep"),canvasHistoryRead:o(()=>"/v1/canvas/history/read","canvasHistoryRead"),canvasHistoryStats:o(()=>"/v1/canvas/history/stats","canvasHistoryStats"),canvasSnapshot:o(()=>"/v1/canvas/snapshot","canvasSnapshot"),canvasRoster:o(()=>"/v1/canvas/roster","canvasRoster"),canvasAnalytics:o(()=>"/v1/canvas/analytics","canvasAnalytics"),canvasGraph:o(()=>"/v1/canvas/graph","canvasGraph"),canvasPrune:o(()=>"/v1/canvas/prune","canvasPrune"),humanReviews:o(()=>"/v1/human/reviews","humanReviews"),humanReview:o(e=>`/v1/human/reviews/${e}`,"humanReview"),humanReviewSubmit:o(e=>`/v1/human/reviews/${e}/submit`,"humanReviewSubmit"),humanReviewCancel:o(e=>`/v1/human/reviews/${e}/cancel`,"humanReviewCancel"),humanReviewDocument:o(e=>`/v1/human/reviews/${e}/document`,"humanReviewDocument"),humanReviewComments:o(e=>`/v1/human/reviews/${e}/comments`,"humanReviewComments"),humanReviewCommentEvents:o(e=>`/v1/human/reviews/${e}/comment-events`,"humanReviewCommentEvents"),humanReviewCommentRanges:o(e=>`/v1/human/reviews/${e}/comment-ranges`,"humanReviewCommentRanges"),humanComment:o(e=>`/v1/human/comments/${e}`,"humanComment"),humanCommentEdit:o(e=>`/v1/human/comments/${e}/edit`,"humanCommentEdit"),humanCommentResolve:o(e=>`/v1/human/comments/${e}/resolve`,"humanCommentResolve"),humanCommentReopen:o(e=>`/v1/human/comments/${e}/reopen`,"humanCommentReopen"),humanCommentDelete:o(e=>`/v1/human/comments/${e}/delete`,"humanCommentDelete"),humanCommentFork:o(e=>`/v1/human/comments/${e}/fork`,"humanCommentFork"),humanInbox:o(()=>"/v1/human/inbox","humanInbox"),humanInboxTicket:o(e=>`/v1/human/inbox/${e}`,"humanInboxTicket"),humanInboxRespond:o(e=>`/v1/human/inbox/${e}/respond`,"humanInboxRespond"),humanInboxProgress:o(e=>`/v1/human/inbox/${e}/progress`,"humanInboxProgress"),humanInboxResponse:o(e=>`/v1/human/inbox/${e}/response`,"humanInboxResponse"),humanInboxCancel:o(e=>`/v1/human/inbox/${e}/cancel`,"humanInboxCancel"),humanInboxFeedbackResolve:o((e,n)=>`/v1/human/inbox/${e}/feedback-comments/${n}/resolve`,"humanInboxFeedbackResolve"),humanRequests:o(()=>"/v1/human/requests","humanRequests"),humanComponents:o(()=>"/v1/human/components","humanComponents"),humanRequest:o(e=>`/v1/human/requests/${e}`,"humanRequest"),humanRequestReplace:o(e=>`/v1/human/requests/${e}/replace`,"humanRequestReplace"),humanRequestRespond:o(e=>`/v1/human/requests/${e}/respond`,"humanRequestRespond"),humanRequestDismiss:o(e=>`/v1/human/requests/${e}/dismiss`,"humanRequestDismiss"),humanRequestCancel:o(e=>`/v1/human/requests/${e}/cancel`,"humanRequestCancel"),profiles:o(()=>"/v1/profiles","profiles"),profile:o(e=>`/v1/profiles/${e}`,"profile"),profilePause:o(e=>`/v1/profiles/${e}/pause`,"profilePause"),profileResume:o(e=>`/v1/profiles/${e}/resume`,"profileResume"),profileMetadata:o(e=>`/v1/profiles/${e}/metadata`,"profileMetadata"),profileEnv:o(e=>`/v1/profiles/${e}/env`,"profileEnv"),profileEnvVar:o((e,n)=>`/v1/profiles/${e}/env/${n}`,"profileEnvVar"),modelAuths:o(()=>"/v1/model-auth","modelAuths"),modelAuthReadiness:o(()=>"/v1/model-auth/readiness","modelAuthReadiness"),modelAuth:o(e=>`/v1/model-auth/${e}`,"modelAuth"),modelAuthFlows:o(()=>"/v1/model-auth/flows","modelAuthFlows"),modelAuthFlow:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}`,"modelAuthFlow"),modelAuthFlowComplete:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/complete`,"modelAuthFlowComplete"),modelAuthFlowCancel:o(e=>`/v1/model-auth/flows/${encodeURIComponent(e)}/cancel`,"modelAuthFlowCancel"),filePeek:o(()=>"/v1/files/peek","filePeek"),fileWrite:o(()=>"/v1/files/write","fileWrite"),fileList:o(()=>"/v1/files/list","fileList"),bash:o(()=>"/v1/bash","bash"),memoryDocs:o(()=>"/v1/memory/docs","memoryDocs"),memoryDoc:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}`,"memoryDoc"),memoryDocMove:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}/move`,"memoryDocMove"),memoryDocHistory:o(e=>`/v1/memory/docs/${encodeURIComponent(e)}/history`,"memoryDocHistory"),memorySearch:o(()=>"/v1/memory/search","memorySearch"),memoryResolve:o(()=>"/v1/memory/resolve","memoryResolve"),memoryOrigin:o(()=>"/v1/memory/origin","memoryOrigin")};export{$ as API_VERSION,a as routes};
@@ -6,10 +6,15 @@ export declare const SUBTREE_NAMES: readonly string[];
6
6
  export declare function coreHookCatalog(): Promise<CoreHookCatalog>;
7
7
  export declare function coreCommandPaths(): Promise<ReadonlySet<string>>;
8
8
  export declare function extensibleCoreBranches(): Promise<ReadonlySet<string>>;
9
- /** Whether argv targets the daemon-control subtree after the dispatcher's global-token normalization. This only selects a smaller canonical tree; `runCli` still parses, renders help, and reports errors. */
9
+ /** The person-only command path `argv` dispatches into, or null. */
10
+ export declare function personOnlyInvocation(argv: readonly string[]): string | null;
11
+ /** Select a smaller canonical tree; `runCli` still parses, renders help, and reports errors. */
10
12
  export declare function isDaemonControlInvocation(argv: readonly string[]): boolean;
13
+ export declare function isLayoutMigrationInvocation(argv: readonly string[]): boolean;
11
14
  /** Assemble the canonical daemon-control definitions without loading settings or plugin discovery. This path exists so `crtr sys daemon restart` can start the new generation that converts pre-SQL user state. */
12
15
  export declare function resolveDaemonControlRoot(): Promise<RootDef>;
16
+ /** Migration runs offline before command plugins can read or initialize scoped state. */
17
+ export declare function resolveLayoutMigrationRoot(): Promise<RootDef>;
13
18
  /** Build a root that contains only the subtree `first` dispatches into.
14
19
  * Returns the FULL root when `first` is not a recognized subtree — bare `crtr`,
15
20
  * `-h`/`--help`, `--version`, and any unknown leading token all need the
@@ -1 +1 @@
1
- var L=Object.defineProperty;var t=(e,n)=>L(e,"name",{value:n,configurable:!0});import{defineBranch as T,defineRoot as l,GLOBAL_TOKENS as _}from"./core/command.js";import{createCoreHookCatalog as b}from"./core/command-hooks/catalog.js";import{composeCoreHooks as C}from"./core/command-hooks/compose.js";import{mark as m}from"./core/timing.js";import{envScopes as j,scopeAllowed as A}from"./shared/env.js";const p="crtr: agentic runtime.",f=[{name:"--json",desc:"stdout as the leaf's declared outputs in raw JSON instead of prose \u2014 for scripts (a cron's bash, external tooling) that must branch on canvas state; prose stays the contract for what you read yourself."}],d=Object.assign(Object.create(null),{memory:t(async()=>(await import("./commands/memory.js")).registerMemory(),"memory"),profile:t(async()=>(await import("./commands/profile.js")).registerProfile(),"profile"),pkg:t(async()=>(await import("./commands/pkg.js")).registerPkg(),"pkg"),human:t(async()=>(await import("./commands/human.js")).registerHuman(),"human"),sys:t(async()=>(await import("./commands/sys.js")).registerSys(),"sys"),node:t(async()=>(await import("./commands/node.js")).registerNode(),"node"),push:t(async()=>(await import("./commands/push.js")).registerPush(),"push"),cron:t(async()=>(await import("./commands/cron.js")).registerCron(),"cron"),canvas:t(async()=>(await import("./commands/canvas.js")).registerCanvas(),"canvas"),surface:t(async()=>(await import("./commands/surface.js")).registerSurface(),"surface")}),g=Object.freeze(Object.keys(d)),H={human:["ask"],cron:["schedule"],memory:["memory:read","memory:write"]};function x(e){const n=j();return n===null?e:e.filter(r=>{const o=H[r.name];return o===void 0||o.some(s=>A(n,s))})}t(x,"allowedSubtrees");let E;function u(){return E??=Promise.all(g.map(e=>d[e]())),E}t(u,"loadCoreSubtrees");let P;function M(){return m("cli.hooks.catalog"),P??=u().then(b),P}t(M,"coreHookCatalog");function v(){let e;return()=>(e??=(async()=>{const{compileHookRegistry:n,effectiveHookPlugins:r}=await import("./core/command-hooks/discovery.js"),o=r();return m("cli.hooks.effective_plugins",{count:o.length}),o.length===0?(m("cli.hooks.empty_registry"),n(b([]),[])):n(await M(),o)})(),e)}t(v,"hookRegistryLoader");function h(e){const n=new Set,r=t((o,s)=>{if(!(o.kind==="branch"&&o.passthrough!==void 0)&&(n.add(s),o.kind==="branch"))for(const i of o.children)r(i,`${s} ${i.name}`)},"visit");for(const o of e)r(o,o.name);return n}t(h,"commandPathsFor");async function J(){return h(await u())}t(J,"coreCommandPaths");function N(e){const n=[],r=t((o,s)=>{o.extensible===!0&&n.push(s);for(const i of o.children)i.kind==="branch"&&r(i,[...s,i.name])},"visit");for(const o of e)r(o,[o.name]);return n}t(N,"extensibleBranchPaths");async function B(){return new Set(N(await u()).map(e=>e.join(" ")))}t(B,"extensibleCoreBranches");function U(e,n){const{listing:r,...o}=e.help;return T({name:e.name,description:e.description,whenToUse:e.whenToUse,tier:e.tier,help:o,rootEntry:e.rootEntry,extensible:e.extensible,plugin:e.plugin,slash:e.slash,passthrough:e.passthrough,children:n})}t(U,"rebuildBranch");async function O(e,n){if(n.size===0)return e;const[{buildExternalCommandSnapshot:r},{composeCoreBranchMounts:o}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),s=r(new Set(g),void 0,void 0,h(await u()),n),i=t((a,y)=>{let w=!1;const R=a.children.map(c=>{if(c.kind!=="branch")return c;const k=i(c,[...y,c.name]);return k!==c&&(w=!0),k}),S=a.extensible===!0?o(s.coreMounts,y):[];return w||S.length>0?U(a,[...R,...S]):a},"composeBranch");return e.map(a=>i(a,[a.name]))}t(O,"composeCorePluginMounts");function K(e){const n=e.slice(2).filter(r=>!_.has(r));return n[0]==="sys"&&n[1]==="daemon"}t(K,"isDaemonControlInvocation");async function Q(){const{registerDaemonControlSys:e}=await import("./commands/sys/daemon.js");return l({tagline:p,globals:f,subtrees:[e()]})}t(Q,"resolveDaemonControlRoot");async function V(e){const n=e!==void 0?d[e]:void 0;if(n!==void 0){const r=x(await O([await n()],await B()));if(r.length>0)return l({tagline:p,globals:f,subtrees:C(r,v())})}return D()}t(V,"resolveRoot");async function D(){const e=await u(),[{buildExternalCommandSnapshot:n},{composeExternalSubtrees:r}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),o=await B(),s=await O(e,o),i=n(new Set(g),void 0,void 0,h(e),o),a=r(i);return l({tagline:p,globals:f,subtrees:[...C(x(s),v()),...a]})}t(D,"buildRoot");export{g as SUBTREE_NAMES,D as buildRoot,J as coreCommandPaths,M as coreHookCatalog,B as extensibleCoreBranches,K as isDaemonControlInvocation,Q as resolveDaemonControlRoot,V as resolveRoot};
1
+ var L=Object.defineProperty;var o=(e,n)=>L(e,"name",{value:n,configurable:!0});import{defineBranch as j,defineRoot as l,GLOBAL_TOKENS as R}from"./core/command.js";import{createCoreHookCatalog as x}from"./core/command-hooks/catalog.js";import{composeCoreHooks as C}from"./core/command-hooks/compose.js";import{mark as f}from"./core/timing.js";import{envNodeId as k,envScopes as H,scopeAllowed as d}from"./shared/env.js";const m="crtr: agentic runtime.",p=[{name:"--json",desc:"stdout as the leaf's declared outputs in raw JSON instead of prose \u2014 for scripts (a cron's bash, external tooling) that must branch on canvas state; prose stays the contract for what you read yourself."}],g=Object.assign(Object.create(null),{memory:o(async()=>(await import("./commands/memory.js")).registerMemory(),"memory"),profile:o(async()=>(await import("./commands/profile.js")).registerProfile(),"profile"),pkg:o(async()=>(await import("./commands/pkg.js")).registerPkg(),"pkg"),human:o(async()=>(await import("./commands/human.js")).registerHuman(),"human"),sys:o(async()=>(await import("./commands/sys.js")).registerSys(),"sys"),node:o(async()=>(await import("./commands/node.js")).registerNode(),"node"),push:o(async()=>(await import("./commands/push.js")).registerPush(),"push"),cron:o(async()=>(await import("./commands/cron.js")).registerCron(),"cron"),canvas:o(async()=>(await import("./commands/canvas.js")).registerCanvas(),"canvas"),surface:o(async()=>(await import("./commands/surface.js")).registerSurface(),"surface")}),y=Object.freeze(Object.keys(g)),M={human:["crtr:act"],cron:["crtr:schedule"],memory:["crtr:memory:read:user","crtr:memory:rw:user"]};function b(e){const n=H();return n===null?e:e.filter(r=>{const t=M[r.name];return t===void 0||t.some(s=>d(n,s))||r.name==="memory"&&typeof process.env.CRTR_GRANTEE=="string"&&process.env.CRTR_GRANTEE.startsWith("app:")&&(d(n,`crtr:memory:read:${process.env.CRTR_GRANTEE}`)||d(n,`crtr:memory:rw:${process.env.CRTR_GRANTEE}`))})}o(b,"allowedSubtrees");let P;function u(){return P??=Promise.all(y.map(e=>g[e]())),P}o(u,"loadCoreSubtrees");let T;function G(){return f("cli.hooks.catalog"),T??=u().then(x),T}o(G,"coreHookCatalog");function O(){let e;return()=>(e??=(async()=>{const{compileHookRegistry:n,effectiveHookPlugins:r}=await import("./core/command-hooks/discovery.js"),t=r(),s=process.platform==="linux"&&k()?await(await import("./core/command-hooks/transport/plan.js")).remoteHookPlan(process.cwd()):[];return f("cli.hooks.effective_plugins",{count:t.length+s.length}),t.length===0&&s.length===0?(f("cli.hooks.empty_registry"),n(x([]),[])):n(await G(),process.platform==="linux"&&k()?t.filter(a=>a.scope==="project"):t,s)})(),e)}o(O,"hookRegistryLoader");function h(e){const n=new Set,r=o((t,s)=>{if(!(t.kind==="branch"&&t.passthrough!==void 0)&&(n.add(s),t.kind==="branch"))for(const a of t.children)r(a,`${s} ${a.name}`)},"visit");for(const t of e)r(t,t.name);return n}o(h,"commandPathsFor");async function Y(){return h(await u())}o(Y,"coreCommandPaths");function I(e){const n=[],r=o((t,s)=>{t.extensible===!0&&n.push(s);for(const a of t.children)a.kind==="branch"&&r(a,[...s,a.name])},"visit");for(const t of e)r(t,[t.name]);return n}o(I,"extensibleBranchPaths");async function _(){return new Set(I(await u()).map(e=>e.join(" ")))}o(_,"extensibleCoreBranches");function U(e,n){const{listing:r,...t}=e.help;return j({name:e.name,description:e.description,whenToUse:e.whenToUse,tier:e.tier,help:t,rootEntry:e.rootEntry,extensible:e.extensible,plugin:e.plugin,slash:e.slash,passthrough:e.passthrough,children:n})}o(U,"rebuildBranch");async function B(e,n){if(n.size===0)return e;const[{buildExternalCommandSnapshot:r},{composeCoreBranchMounts:t}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),s=r(new Set(y),void 0,void 0,h(await u()),n),a=o((i,w)=>{let S=!1;const A=i.children.map(c=>{if(c.kind!=="branch")return c;const E=a(c,[...w,c.name]);return E!==c&&(S=!0),E}),v=i.extensible===!0?t(s.coreMounts,w):[];return S||v.length>0?U(i,[...A,...v]):i},"composeBranch");return e.map(i=>a(i,[i.name]))}o(B,"composeCorePluginMounts");function N(e,n){const r=e.slice(2).filter(t=>!R.has(t));return r[0]==="sys"&&r[1]===n}o(N,"isSysInvocation");const D=[["surface"],["sys"],["pkg"],["profile","default"],["canvas","chord"],["canvas","config"],["canvas","use"],["canvas","browse"],["canvas","issue"]];function Q(e){const n=e.slice(2).filter(t=>!R.has(t)),r=D.find(t=>t.every((s,a)=>n[a]===s));return r===void 0?null:r.join(" ")}o(Q,"personOnlyInvocation");function V(e){return N(e,"daemon")}o(V,"isDaemonControlInvocation");function X(e){return N(e,"migrate")}o(X,"isLayoutMigrationInvocation");async function Z(){const{registerDaemonControlSys:e}=await import("./commands/sys/daemon.js");return l({tagline:m,globals:p,subtrees:[e()]})}o(Z,"resolveDaemonControlRoot");async function ee(){const[{defineSysBranch:e},{sysMigrateLeaf:n}]=await Promise.all([import("./commands/sys/branch.js"),import("./commands/sys/migrate.js")]);return l({tagline:m,globals:p,subtrees:[e([n])]})}o(ee,"resolveLayoutMigrationRoot");async function te(e){const n=e!==void 0?g[e]:void 0;if(n!==void 0){const r=b(await B([await n()],await _()));if(r.length>0)return l({tagline:m,globals:p,subtrees:C(r,O())})}return $()}o(te,"resolveRoot");async function $(){const e=await u(),[{buildExternalCommandSnapshot:n},{composeExternalSubtrees:r}]=await Promise.all([import("./core/command-plugins/discovery.js"),import("./core/command-plugins/compose.js")]),t=await _(),s=await B(e,t),a=n(new Set(y),void 0,void 0,h(e),t),i=r(a);return l({tagline:m,globals:p,subtrees:[...C(b(s),O()),...i]})}o($,"buildRoot");export{y as SUBTREE_NAMES,$ as buildRoot,Y as coreCommandPaths,G as coreHookCatalog,_ as extensibleCoreBranches,V as isDaemonControlInvocation,X as isLayoutMigrationInvocation,Q as personOnlyInvocation,Z as resolveDaemonControlRoot,ee as resolveLayoutMigrationRoot,te as resolveRoot};