@pleri/olam-cli 0.1.201 → 0.1.205

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 (833) hide show
  1. package/README.md +102 -169
  2. package/dist/agent-stream/agent-sdk-to-chunks.js +1 -1
  3. package/dist/agent-stream/driver-runner.js +73 -7
  4. package/dist/agent-stream/host-driver-launch.js +14 -1
  5. package/dist/agent-stream/prototype-gen-launch.js +113 -0
  6. package/dist/agent-stream/question-broker-bridge.js +335 -0
  7. package/dist/agent-stream/sdk-env-merge.demo.js +35 -0
  8. package/dist/agent-stream/sdk-env-merge.js +98 -0
  9. package/dist/image-digests.json +8 -8
  10. package/dist/index.js +9533 -6258
  11. package/dist/index.js.map +1 -1
  12. package/dist/mcp-server.js +24721 -12934
  13. package/hermes-bundle/version.json +1 -1
  14. package/hooks/__tests__/_loader.py +26 -0
  15. package/hooks/__tests__/prompts.py +63 -0
  16. package/hooks/__tests__/test_classify_bench.py +94 -0
  17. package/hooks/__tests__/test_classify_pins.py +78 -0
  18. package/hooks/model-router.py +17 -4
  19. package/host-cp/k8s/manifests/50-deployment.yaml +1 -1
  20. package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +1 -1
  21. package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +1 -1
  22. package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +1 -1
  23. package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +1 -1
  24. package/host-cp/src/op-side-longpoll.mjs +212 -0
  25. package/host-cp/src/plan-chat-proxy-headers.mjs +53 -0
  26. package/host-cp/src/plan-chat-service.mjs +100 -0
  27. package/host-cp/src/plan-orchestrator.mjs +100 -6
  28. package/host-cp/src/server.mjs +607 -45
  29. package/memory-hooks/agentmemory-classify-queue.mjs +363 -0
  30. package/memory-hooks/agentmemory-recall-trigger.mjs +233 -0
  31. package/memory-hooks/agentmemory-reflect-cite.mjs +332 -0
  32. package/memory-hooks/agentmemory-session-recall.js +332 -0
  33. package/memory-hooks/recall-log.mjs +185 -0
  34. package/package.json +9 -4
  35. package/dist/ask/checkout.d.ts +0 -19
  36. package/dist/ask/checkout.d.ts.map +0 -1
  37. package/dist/ask/checkout.js +0 -40
  38. package/dist/ask/checkout.js.map +0 -1
  39. package/dist/ask/knowledge-pack-builder.d.ts +0 -72
  40. package/dist/ask/knowledge-pack-builder.d.ts.map +0 -1
  41. package/dist/ask/knowledge-pack-builder.js +0 -96
  42. package/dist/ask/knowledge-pack-builder.js.map +0 -1
  43. package/dist/ask/knowledge-pack.generated.d.ts +0 -8
  44. package/dist/ask/knowledge-pack.generated.d.ts.map +0 -1
  45. package/dist/ask/knowledge-pack.generated.js +0 -2362
  46. package/dist/ask/knowledge-pack.generated.js.map +0 -1
  47. package/dist/ask/one-shot.d.ts +0 -21
  48. package/dist/ask/one-shot.d.ts.map +0 -1
  49. package/dist/ask/one-shot.js +0 -50
  50. package/dist/ask/one-shot.js.map +0 -1
  51. package/dist/ask/repl.d.ts +0 -30
  52. package/dist/ask/repl.d.ts.map +0 -1
  53. package/dist/ask/repl.js +0 -109
  54. package/dist/ask/repl.js.map +0 -1
  55. package/dist/ask/sdk-client.d.ts +0 -87
  56. package/dist/ask/sdk-client.d.ts.map +0 -1
  57. package/dist/ask/sdk-client.js +0 -118
  58. package/dist/ask/sdk-client.js.map +0 -1
  59. package/dist/ask/system-prompt.d.ts +0 -30
  60. package/dist/ask/system-prompt.d.ts.map +0 -1
  61. package/dist/ask/system-prompt.js +0 -31
  62. package/dist/ask/system-prompt.js.map +0 -1
  63. package/dist/cli-version.d.ts +0 -16
  64. package/dist/cli-version.d.ts.map +0 -1
  65. package/dist/cli-version.js +0 -39
  66. package/dist/cli-version.js.map +0 -1
  67. package/dist/commands/ask.d.ts +0 -27
  68. package/dist/commands/ask.d.ts.map +0 -1
  69. package/dist/commands/ask.js +0 -63
  70. package/dist/commands/ask.js.map +0 -1
  71. package/dist/commands/auth-list-json.d.ts +0 -87
  72. package/dist/commands/auth-list-json.d.ts.map +0 -1
  73. package/dist/commands/auth-list-json.js +0 -71
  74. package/dist/commands/auth-list-json.js.map +0 -1
  75. package/dist/commands/auth-migrate.d.ts +0 -212
  76. package/dist/commands/auth-migrate.d.ts.map +0 -1
  77. package/dist/commands/auth-migrate.js +0 -465
  78. package/dist/commands/auth-migrate.js.map +0 -1
  79. package/dist/commands/auth-status.d.ts +0 -51
  80. package/dist/commands/auth-status.d.ts.map +0 -1
  81. package/dist/commands/auth-status.js +0 -250
  82. package/dist/commands/auth-status.js.map +0 -1
  83. package/dist/commands/auth-upgrade.d.ts +0 -88
  84. package/dist/commands/auth-upgrade.d.ts.map +0 -1
  85. package/dist/commands/auth-upgrade.js +0 -431
  86. package/dist/commands/auth-upgrade.js.map +0 -1
  87. package/dist/commands/auth.d.ts +0 -31
  88. package/dist/commands/auth.d.ts.map +0 -1
  89. package/dist/commands/auth.js +0 -784
  90. package/dist/commands/auth.js.map +0 -1
  91. package/dist/commands/begin.d.ts +0 -27
  92. package/dist/commands/begin.d.ts.map +0 -1
  93. package/dist/commands/begin.js +0 -45
  94. package/dist/commands/begin.js.map +0 -1
  95. package/dist/commands/bootstrap.d.ts +0 -111
  96. package/dist/commands/bootstrap.d.ts.map +0 -1
  97. package/dist/commands/bootstrap.js +0 -485
  98. package/dist/commands/bootstrap.js.map +0 -1
  99. package/dist/commands/clean.d.ts +0 -41
  100. package/dist/commands/clean.d.ts.map +0 -1
  101. package/dist/commands/clean.js +0 -382
  102. package/dist/commands/clean.js.map +0 -1
  103. package/dist/commands/completion.d.ts +0 -30
  104. package/dist/commands/completion.d.ts.map +0 -1
  105. package/dist/commands/completion.js +0 -50
  106. package/dist/commands/completion.js.map +0 -1
  107. package/dist/commands/config.d.ts +0 -3
  108. package/dist/commands/config.d.ts.map +0 -1
  109. package/dist/commands/config.js +0 -146
  110. package/dist/commands/config.js.map +0 -1
  111. package/dist/commands/create.d.ts +0 -8
  112. package/dist/commands/create.d.ts.map +0 -1
  113. package/dist/commands/create.js +0 -775
  114. package/dist/commands/create.js.map +0 -1
  115. package/dist/commands/crystallize.d.ts +0 -18
  116. package/dist/commands/crystallize.d.ts.map +0 -1
  117. package/dist/commands/crystallize.js +0 -123
  118. package/dist/commands/crystallize.js.map +0 -1
  119. package/dist/commands/destroy.d.ts +0 -59
  120. package/dist/commands/destroy.d.ts.map +0 -1
  121. package/dist/commands/destroy.js +0 -148
  122. package/dist/commands/destroy.js.map +0 -1
  123. package/dist/commands/diagnose.d.ts +0 -36
  124. package/dist/commands/diagnose.d.ts.map +0 -1
  125. package/dist/commands/diagnose.js +0 -177
  126. package/dist/commands/diagnose.js.map +0 -1
  127. package/dist/commands/dispatch-resolve.d.ts +0 -54
  128. package/dist/commands/dispatch-resolve.d.ts.map +0 -1
  129. package/dist/commands/dispatch-resolve.js +0 -105
  130. package/dist/commands/dispatch-resolve.js.map +0 -1
  131. package/dist/commands/dispatch.d.ts +0 -18
  132. package/dist/commands/dispatch.d.ts.map +0 -1
  133. package/dist/commands/dispatch.js +0 -159
  134. package/dist/commands/dispatch.js.map +0 -1
  135. package/dist/commands/doctor.d.ts +0 -258
  136. package/dist/commands/doctor.d.ts.map +0 -1
  137. package/dist/commands/doctor.js +0 -1073
  138. package/dist/commands/doctor.js.map +0 -1
  139. package/dist/commands/enter.d.ts +0 -63
  140. package/dist/commands/enter.d.ts.map +0 -1
  141. package/dist/commands/enter.js +0 -230
  142. package/dist/commands/enter.js.map +0 -1
  143. package/dist/commands/flywheel/check-persona-skeleton.d.ts +0 -35
  144. package/dist/commands/flywheel/check-persona-skeleton.d.ts.map +0 -1
  145. package/dist/commands/flywheel/check-persona-skeleton.js +0 -151
  146. package/dist/commands/flywheel/check-persona-skeleton.js.map +0 -1
  147. package/dist/commands/flywheel/diversity-check.d.ts +0 -17
  148. package/dist/commands/flywheel/diversity-check.d.ts.map +0 -1
  149. package/dist/commands/flywheel/diversity-check.js +0 -64
  150. package/dist/commands/flywheel/diversity-check.js.map +0 -1
  151. package/dist/commands/flywheel/emit-breadcrumb.d.ts +0 -20
  152. package/dist/commands/flywheel/emit-breadcrumb.d.ts.map +0 -1
  153. package/dist/commands/flywheel/emit-breadcrumb.js +0 -137
  154. package/dist/commands/flywheel/emit-breadcrumb.js.map +0 -1
  155. package/dist/commands/flywheel/index.d.ts +0 -27
  156. package/dist/commands/flywheel/index.d.ts.map +0 -1
  157. package/dist/commands/flywheel/index.js +0 -54
  158. package/dist/commands/flywheel/index.js.map +0 -1
  159. package/dist/commands/flywheel/install-sessionstart-hook.d.ts +0 -64
  160. package/dist/commands/flywheel/install-sessionstart-hook.d.ts.map +0 -1
  161. package/dist/commands/flywheel/install-sessionstart-hook.js +0 -197
  162. package/dist/commands/flywheel/install-sessionstart-hook.js.map +0 -1
  163. package/dist/commands/flywheel/install-shims.d.ts +0 -41
  164. package/dist/commands/flywheel/install-shims.d.ts.map +0 -1
  165. package/dist/commands/flywheel/install-shims.js +0 -126
  166. package/dist/commands/flywheel/install-shims.js.map +0 -1
  167. package/dist/commands/flywheel/k10-measure.d.ts +0 -17
  168. package/dist/commands/flywheel/k10-measure.d.ts.map +0 -1
  169. package/dist/commands/flywheel/k10-measure.js +0 -63
  170. package/dist/commands/flywheel/k10-measure.js.map +0 -1
  171. package/dist/commands/flywheel/k5-score.d.ts +0 -14
  172. package/dist/commands/flywheel/k5-score.d.ts.map +0 -1
  173. package/dist/commands/flywheel/k5-score.js +0 -59
  174. package/dist/commands/flywheel/k5-score.js.map +0 -1
  175. package/dist/commands/flywheel/k5-validate.d.ts +0 -46
  176. package/dist/commands/flywheel/k5-validate.d.ts.map +0 -1
  177. package/dist/commands/flywheel/k5-validate.js +0 -246
  178. package/dist/commands/flywheel/k5-validate.js.map +0 -1
  179. package/dist/commands/flywheel/migrate-overlays.d.ts +0 -116
  180. package/dist/commands/flywheel/migrate-overlays.d.ts.map +0 -1
  181. package/dist/commands/flywheel/migrate-overlays.js +0 -792
  182. package/dist/commands/flywheel/migrate-overlays.js.map +0 -1
  183. package/dist/commands/flywheel/ping.d.ts +0 -21
  184. package/dist/commands/flywheel/ping.d.ts.map +0 -1
  185. package/dist/commands/flywheel/ping.js +0 -79
  186. package/dist/commands/flywheel/ping.js.map +0 -1
  187. package/dist/commands/flywheel/sanitize-persona-output.d.ts +0 -38
  188. package/dist/commands/flywheel/sanitize-persona-output.d.ts.map +0 -1
  189. package/dist/commands/flywheel/sanitize-persona-output.js +0 -102
  190. package/dist/commands/flywheel/sanitize-persona-output.js.map +0 -1
  191. package/dist/commands/flywheel/session-start.d.ts +0 -26
  192. package/dist/commands/flywheel/session-start.d.ts.map +0 -1
  193. package/dist/commands/flywheel/session-start.js +0 -119
  194. package/dist/commands/flywheel/session-start.js.map +0 -1
  195. package/dist/commands/hermes-kg-hook.d.ts +0 -36
  196. package/dist/commands/hermes-kg-hook.d.ts.map +0 -1
  197. package/dist/commands/hermes-kg-hook.js +0 -80
  198. package/dist/commands/hermes-kg-hook.js.map +0 -1
  199. package/dist/commands/hermes.d.ts +0 -46
  200. package/dist/commands/hermes.d.ts.map +0 -1
  201. package/dist/commands/hermes.js +0 -320
  202. package/dist/commands/hermes.js.map +0 -1
  203. package/dist/commands/host-cp.d.ts +0 -216
  204. package/dist/commands/host-cp.d.ts.map +0 -1
  205. package/dist/commands/host-cp.js +0 -913
  206. package/dist/commands/host-cp.js.map +0 -1
  207. package/dist/commands/implode.d.ts +0 -86
  208. package/dist/commands/implode.d.ts.map +0 -1
  209. package/dist/commands/implode.js +0 -468
  210. package/dist/commands/implode.js.map +0 -1
  211. package/dist/commands/init.d.ts +0 -86
  212. package/dist/commands/init.d.ts.map +0 -1
  213. package/dist/commands/init.js +0 -357
  214. package/dist/commands/init.js.map +0 -1
  215. package/dist/commands/install.d.ts +0 -22
  216. package/dist/commands/install.d.ts.map +0 -1
  217. package/dist/commands/install.js +0 -203
  218. package/dist/commands/install.js.map +0 -1
  219. package/dist/commands/keys-list-json.d.ts +0 -55
  220. package/dist/commands/keys-list-json.d.ts.map +0 -1
  221. package/dist/commands/keys-list-json.js +0 -54
  222. package/dist/commands/keys-list-json.js.map +0 -1
  223. package/dist/commands/keys.d.ts +0 -26
  224. package/dist/commands/keys.d.ts.map +0 -1
  225. package/dist/commands/keys.js +0 -157
  226. package/dist/commands/keys.js.map +0 -1
  227. package/dist/commands/kg-build.d.ts +0 -80
  228. package/dist/commands/kg-build.d.ts.map +0 -1
  229. package/dist/commands/kg-build.js +0 -282
  230. package/dist/commands/kg-build.js.map +0 -1
  231. package/dist/commands/kg-classify.d.ts +0 -30
  232. package/dist/commands/kg-classify.d.ts.map +0 -1
  233. package/dist/commands/kg-classify.js +0 -88
  234. package/dist/commands/kg-classify.js.map +0 -1
  235. package/dist/commands/kg-doctor.d.ts +0 -76
  236. package/dist/commands/kg-doctor.d.ts.map +0 -1
  237. package/dist/commands/kg-doctor.js +0 -262
  238. package/dist/commands/kg-doctor.js.map +0 -1
  239. package/dist/commands/kg-install-hook.d.ts +0 -20
  240. package/dist/commands/kg-install-hook.d.ts.map +0 -1
  241. package/dist/commands/kg-install-hook.js +0 -208
  242. package/dist/commands/kg-install-hook.js.map +0 -1
  243. package/dist/commands/kg-mirror.d.ts +0 -72
  244. package/dist/commands/kg-mirror.d.ts.map +0 -1
  245. package/dist/commands/kg-mirror.js +0 -397
  246. package/dist/commands/kg-mirror.js.map +0 -1
  247. package/dist/commands/kg-savings.d.ts +0 -20
  248. package/dist/commands/kg-savings.d.ts.map +0 -1
  249. package/dist/commands/kg-savings.js +0 -77
  250. package/dist/commands/kg-savings.js.map +0 -1
  251. package/dist/commands/kg-service-container.d.ts +0 -68
  252. package/dist/commands/kg-service-container.d.ts.map +0 -1
  253. package/dist/commands/kg-service-container.js +0 -191
  254. package/dist/commands/kg-service-container.js.map +0 -1
  255. package/dist/commands/kg-status.d.ts +0 -59
  256. package/dist/commands/kg-status.d.ts.map +0 -1
  257. package/dist/commands/kg-status.js +0 -344
  258. package/dist/commands/kg-status.js.map +0 -1
  259. package/dist/commands/kg-uninstall-hook.d.ts +0 -12
  260. package/dist/commands/kg-uninstall-hook.d.ts.map +0 -1
  261. package/dist/commands/kg-uninstall-hook.js +0 -121
  262. package/dist/commands/kg-uninstall-hook.js.map +0 -1
  263. package/dist/commands/kg-watch.d.ts +0 -49
  264. package/dist/commands/kg-watch.d.ts.map +0 -1
  265. package/dist/commands/kg-watch.js +0 -172
  266. package/dist/commands/kg-watch.js.map +0 -1
  267. package/dist/commands/lanes-list-json.d.ts +0 -69
  268. package/dist/commands/lanes-list-json.d.ts.map +0 -1
  269. package/dist/commands/lanes-list-json.js +0 -42
  270. package/dist/commands/lanes-list-json.js.map +0 -1
  271. package/dist/commands/lanes.d.ts +0 -18
  272. package/dist/commands/lanes.d.ts.map +0 -1
  273. package/dist/commands/lanes.js +0 -133
  274. package/dist/commands/lanes.js.map +0 -1
  275. package/dist/commands/list.d.ts +0 -33
  276. package/dist/commands/list.d.ts.map +0 -1
  277. package/dist/commands/list.js +0 -87
  278. package/dist/commands/list.js.map +0 -1
  279. package/dist/commands/logs.d.ts +0 -52
  280. package/dist/commands/logs.d.ts.map +0 -1
  281. package/dist/commands/logs.js +0 -180
  282. package/dist/commands/logs.js.map +0 -1
  283. package/dist/commands/mcp/add.d.ts +0 -9
  284. package/dist/commands/mcp/add.d.ts.map +0 -1
  285. package/dist/commands/mcp/add.js +0 -87
  286. package/dist/commands/mcp/add.js.map +0 -1
  287. package/dist/commands/mcp/client.d.ts +0 -60
  288. package/dist/commands/mcp/client.d.ts.map +0 -1
  289. package/dist/commands/mcp/client.js +0 -70
  290. package/dist/commands/mcp/client.js.map +0 -1
  291. package/dist/commands/mcp/complete.d.ts +0 -36
  292. package/dist/commands/mcp/complete.d.ts.map +0 -1
  293. package/dist/commands/mcp/complete.js +0 -66
  294. package/dist/commands/mcp/complete.js.map +0 -1
  295. package/dist/commands/mcp/import-discovery.d.ts +0 -25
  296. package/dist/commands/mcp/import-discovery.d.ts.map +0 -1
  297. package/dist/commands/mcp/import-discovery.js +0 -135
  298. package/dist/commands/mcp/import-discovery.js.map +0 -1
  299. package/dist/commands/mcp/import-validate.d.ts +0 -15
  300. package/dist/commands/mcp/import-validate.d.ts.map +0 -1
  301. package/dist/commands/mcp/import-validate.js +0 -55
  302. package/dist/commands/mcp/import-validate.js.map +0 -1
  303. package/dist/commands/mcp/import.d.ts +0 -12
  304. package/dist/commands/mcp/import.d.ts.map +0 -1
  305. package/dist/commands/mcp/import.js +0 -126
  306. package/dist/commands/mcp/import.js.map +0 -1
  307. package/dist/commands/mcp/index.d.ts +0 -14
  308. package/dist/commands/mcp/index.d.ts.map +0 -1
  309. package/dist/commands/mcp/index.js +0 -39
  310. package/dist/commands/mcp/index.js.map +0 -1
  311. package/dist/commands/mcp/install-shared.d.ts +0 -24
  312. package/dist/commands/mcp/install-shared.d.ts.map +0 -1
  313. package/dist/commands/mcp/install-shared.js +0 -42
  314. package/dist/commands/mcp/install-shared.js.map +0 -1
  315. package/dist/commands/mcp/install.d.ts +0 -20
  316. package/dist/commands/mcp/install.d.ts.map +0 -1
  317. package/dist/commands/mcp/install.js +0 -59
  318. package/dist/commands/mcp/install.js.map +0 -1
  319. package/dist/commands/mcp/list.d.ts +0 -6
  320. package/dist/commands/mcp/list.d.ts.map +0 -1
  321. package/dist/commands/mcp/list.js +0 -56
  322. package/dist/commands/mcp/list.js.map +0 -1
  323. package/dist/commands/mcp/login.d.ts +0 -6
  324. package/dist/commands/mcp/login.d.ts.map +0 -1
  325. package/dist/commands/mcp/login.js +0 -38
  326. package/dist/commands/mcp/login.js.map +0 -1
  327. package/dist/commands/mcp/remove.d.ts +0 -6
  328. package/dist/commands/mcp/remove.d.ts.map +0 -1
  329. package/dist/commands/mcp/remove.js +0 -21
  330. package/dist/commands/mcp/remove.js.map +0 -1
  331. package/dist/commands/mcp/revoke.d.ts +0 -11
  332. package/dist/commands/mcp/revoke.d.ts.map +0 -1
  333. package/dist/commands/mcp/revoke.js +0 -51
  334. package/dist/commands/mcp/revoke.js.map +0 -1
  335. package/dist/commands/mcp/serve.d.ts +0 -23
  336. package/dist/commands/mcp/serve.d.ts.map +0 -1
  337. package/dist/commands/mcp/serve.js +0 -55
  338. package/dist/commands/mcp/serve.js.map +0 -1
  339. package/dist/commands/mcp/status.d.ts +0 -6
  340. package/dist/commands/mcp/status.d.ts.map +0 -1
  341. package/dist/commands/mcp/status.js +0 -57
  342. package/dist/commands/mcp/status.js.map +0 -1
  343. package/dist/commands/mcp/uninstall.d.ts +0 -20
  344. package/dist/commands/mcp/uninstall.d.ts.map +0 -1
  345. package/dist/commands/mcp/uninstall.js +0 -60
  346. package/dist/commands/mcp/uninstall.js.map +0 -1
  347. package/dist/commands/memory/_paths.d.ts +0 -25
  348. package/dist/commands/memory/_paths.d.ts.map +0 -1
  349. package/dist/commands/memory/_paths.js +0 -57
  350. package/dist/commands/memory/_paths.js.map +0 -1
  351. package/dist/commands/memory/bridge.d.ts +0 -57
  352. package/dist/commands/memory/bridge.d.ts.map +0 -1
  353. package/dist/commands/memory/bridge.js +0 -152
  354. package/dist/commands/memory/bridge.js.map +0 -1
  355. package/dist/commands/memory/index.d.ts +0 -20
  356. package/dist/commands/memory/index.d.ts.map +0 -1
  357. package/dist/commands/memory/index.js +0 -47
  358. package/dist/commands/memory/index.js.map +0 -1
  359. package/dist/commands/memory/install-hooks.d.ts +0 -22
  360. package/dist/commands/memory/install-hooks.d.ts.map +0 -1
  361. package/dist/commands/memory/install-hooks.js +0 -156
  362. package/dist/commands/memory/install-hooks.js.map +0 -1
  363. package/dist/commands/memory/install.d.ts +0 -57
  364. package/dist/commands/memory/install.d.ts.map +0 -1
  365. package/dist/commands/memory/install.js +0 -114
  366. package/dist/commands/memory/install.js.map +0 -1
  367. package/dist/commands/memory/logs.d.ts +0 -19
  368. package/dist/commands/memory/logs.d.ts.map +0 -1
  369. package/dist/commands/memory/logs.js +0 -50
  370. package/dist/commands/memory/logs.js.map +0 -1
  371. package/dist/commands/memory/mode.d.ts +0 -47
  372. package/dist/commands/memory/mode.d.ts.map +0 -1
  373. package/dist/commands/memory/mode.js +0 -185
  374. package/dist/commands/memory/mode.js.map +0 -1
  375. package/dist/commands/memory/reclassify.d.ts +0 -56
  376. package/dist/commands/memory/reclassify.d.ts.map +0 -1
  377. package/dist/commands/memory/reclassify.js +0 -177
  378. package/dist/commands/memory/reclassify.js.map +0 -1
  379. package/dist/commands/memory/secret.d.ts +0 -16
  380. package/dist/commands/memory/secret.d.ts.map +0 -1
  381. package/dist/commands/memory/secret.js +0 -80
  382. package/dist/commands/memory/secret.js.map +0 -1
  383. package/dist/commands/memory/start.d.ts +0 -25
  384. package/dist/commands/memory/start.d.ts.map +0 -1
  385. package/dist/commands/memory/start.js +0 -83
  386. package/dist/commands/memory/start.js.map +0 -1
  387. package/dist/commands/memory/stats.d.ts +0 -69
  388. package/dist/commands/memory/stats.d.ts.map +0 -1
  389. package/dist/commands/memory/stats.js +0 -164
  390. package/dist/commands/memory/stats.js.map +0 -1
  391. package/dist/commands/memory/status.d.ts +0 -45
  392. package/dist/commands/memory/status.d.ts.map +0 -1
  393. package/dist/commands/memory/status.js +0 -134
  394. package/dist/commands/memory/status.js.map +0 -1
  395. package/dist/commands/memory/stop.d.ts +0 -13
  396. package/dist/commands/memory/stop.d.ts.map +0 -1
  397. package/dist/commands/memory/stop.js +0 -52
  398. package/dist/commands/memory/stop.js.map +0 -1
  399. package/dist/commands/memory/uninstall.d.ts +0 -19
  400. package/dist/commands/memory/uninstall.d.ts.map +0 -1
  401. package/dist/commands/memory/uninstall.js +0 -60
  402. package/dist/commands/memory/uninstall.js.map +0 -1
  403. package/dist/commands/memory-service-container.d.ts +0 -130
  404. package/dist/commands/memory-service-container.d.ts.map +0 -1
  405. package/dist/commands/memory-service-container.js +0 -251
  406. package/dist/commands/memory-service-container.js.map +0 -1
  407. package/dist/commands/observe.d.ts +0 -9
  408. package/dist/commands/observe.d.ts.map +0 -1
  409. package/dist/commands/observe.js +0 -42
  410. package/dist/commands/observe.js.map +0 -1
  411. package/dist/commands/plans-list-json.d.ts +0 -77
  412. package/dist/commands/plans-list-json.d.ts.map +0 -1
  413. package/dist/commands/plans-list-json.js +0 -61
  414. package/dist/commands/plans-list-json.js.map +0 -1
  415. package/dist/commands/plans.d.ts +0 -3
  416. package/dist/commands/plans.d.ts.map +0 -1
  417. package/dist/commands/plans.js +0 -221
  418. package/dist/commands/plans.js.map +0 -1
  419. package/dist/commands/policy-check.d.ts +0 -14
  420. package/dist/commands/policy-check.d.ts.map +0 -1
  421. package/dist/commands/policy-check.js +0 -76
  422. package/dist/commands/policy-check.js.map +0 -1
  423. package/dist/commands/pr.d.ts +0 -17
  424. package/dist/commands/pr.d.ts.map +0 -1
  425. package/dist/commands/pr.js +0 -148
  426. package/dist/commands/pr.js.map +0 -1
  427. package/dist/commands/ps.d.ts +0 -57
  428. package/dist/commands/ps.d.ts.map +0 -1
  429. package/dist/commands/ps.js +0 -202
  430. package/dist/commands/ps.js.map +0 -1
  431. package/dist/commands/refresh-helpers.d.ts +0 -25
  432. package/dist/commands/refresh-helpers.d.ts.map +0 -1
  433. package/dist/commands/refresh-helpers.js +0 -56
  434. package/dist/commands/refresh-helpers.js.map +0 -1
  435. package/dist/commands/refresh.d.ts +0 -23
  436. package/dist/commands/refresh.d.ts.map +0 -1
  437. package/dist/commands/refresh.js +0 -237
  438. package/dist/commands/refresh.js.map +0 -1
  439. package/dist/commands/rekey.d.ts +0 -84
  440. package/dist/commands/rekey.d.ts.map +0 -1
  441. package/dist/commands/rekey.js +0 -209
  442. package/dist/commands/rekey.js.map +0 -1
  443. package/dist/commands/repos-list-json.d.ts +0 -58
  444. package/dist/commands/repos-list-json.d.ts.map +0 -1
  445. package/dist/commands/repos-list-json.js +0 -45
  446. package/dist/commands/repos-list-json.js.map +0 -1
  447. package/dist/commands/repos.d.ts +0 -11
  448. package/dist/commands/repos.d.ts.map +0 -1
  449. package/dist/commands/repos.js +0 -102
  450. package/dist/commands/repos.js.map +0 -1
  451. package/dist/commands/restart.d.ts +0 -18
  452. package/dist/commands/restart.d.ts.map +0 -1
  453. package/dist/commands/restart.js +0 -113
  454. package/dist/commands/restart.js.map +0 -1
  455. package/dist/commands/resume.d.ts +0 -63
  456. package/dist/commands/resume.d.ts.map +0 -1
  457. package/dist/commands/resume.js +0 -174
  458. package/dist/commands/resume.js.map +0 -1
  459. package/dist/commands/runbooks.d.ts +0 -45
  460. package/dist/commands/runbooks.d.ts.map +0 -1
  461. package/dist/commands/runbooks.js +0 -313
  462. package/dist/commands/runbooks.js.map +0 -1
  463. package/dist/commands/seed.d.ts +0 -27
  464. package/dist/commands/seed.d.ts.map +0 -1
  465. package/dist/commands/seed.js +0 -303
  466. package/dist/commands/seed.js.map +0 -1
  467. package/dist/commands/services-tls.d.ts +0 -120
  468. package/dist/commands/services-tls.d.ts.map +0 -1
  469. package/dist/commands/services-tls.js +0 -489
  470. package/dist/commands/services-tls.js.map +0 -1
  471. package/dist/commands/services.d.ts +0 -218
  472. package/dist/commands/services.d.ts.map +0 -1
  473. package/dist/commands/services.js +0 -830
  474. package/dist/commands/services.js.map +0 -1
  475. package/dist/commands/setup-linux-gate.d.ts +0 -26
  476. package/dist/commands/setup-linux-gate.d.ts.map +0 -1
  477. package/dist/commands/setup-linux-gate.js +0 -40
  478. package/dist/commands/setup-linux-gate.js.map +0 -1
  479. package/dist/commands/setup-metrics.d.ts +0 -26
  480. package/dist/commands/setup-metrics.d.ts.map +0 -1
  481. package/dist/commands/setup-metrics.js +0 -56
  482. package/dist/commands/setup-metrics.js.map +0 -1
  483. package/dist/commands/setup-phase-5a-skill-source.d.ts +0 -84
  484. package/dist/commands/setup-phase-5a-skill-source.d.ts.map +0 -1
  485. package/dist/commands/setup-phase-5a-skill-source.js +0 -259
  486. package/dist/commands/setup-phase-5a-skill-source.js.map +0 -1
  487. package/dist/commands/setup-phase-5b-project-sweep.d.ts +0 -38
  488. package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +0 -1
  489. package/dist/commands/setup-phase-5b-project-sweep.js +0 -175
  490. package/dist/commands/setup-phase-5b-project-sweep.js.map +0 -1
  491. package/dist/commands/setup-phase-8-kg-hook.d.ts +0 -48
  492. package/dist/commands/setup-phase-8-kg-hook.d.ts.map +0 -1
  493. package/dist/commands/setup-phase-8-kg-hook.js +0 -93
  494. package/dist/commands/setup-phase-8-kg-hook.js.map +0 -1
  495. package/dist/commands/setup-phase-9-memory-bridge.d.ts +0 -36
  496. package/dist/commands/setup-phase-9-memory-bridge.d.ts.map +0 -1
  497. package/dist/commands/setup-phase-9-memory-bridge.js +0 -59
  498. package/dist/commands/setup-phase-9-memory-bridge.js.map +0 -1
  499. package/dist/commands/setup.d.ts +0 -231
  500. package/dist/commands/setup.d.ts.map +0 -1
  501. package/dist/commands/setup.js +0 -1374
  502. package/dist/commands/setup.js.map +0 -1
  503. package/dist/commands/skills-100x.d.ts +0 -34
  504. package/dist/commands/skills-100x.d.ts.map +0 -1
  505. package/dist/commands/skills-100x.js +0 -405
  506. package/dist/commands/skills-100x.js.map +0 -1
  507. package/dist/commands/skills-doctor.d.ts +0 -14
  508. package/dist/commands/skills-doctor.d.ts.map +0 -1
  509. package/dist/commands/skills-doctor.js +0 -126
  510. package/dist/commands/skills-doctor.js.map +0 -1
  511. package/dist/commands/skills-hook.d.ts +0 -19
  512. package/dist/commands/skills-hook.d.ts.map +0 -1
  513. package/dist/commands/skills-hook.js +0 -99
  514. package/dist/commands/skills-hook.js.map +0 -1
  515. package/dist/commands/skills-install-model-router.d.ts +0 -20
  516. package/dist/commands/skills-install-model-router.d.ts.map +0 -1
  517. package/dist/commands/skills-install-model-router.js +0 -55
  518. package/dist/commands/skills-install-model-router.js.map +0 -1
  519. package/dist/commands/skills-migrate-back.d.ts +0 -21
  520. package/dist/commands/skills-migrate-back.d.ts.map +0 -1
  521. package/dist/commands/skills-migrate-back.js +0 -222
  522. package/dist/commands/skills-migrate-back.js.map +0 -1
  523. package/dist/commands/skills-migrate-hooks-back.d.ts +0 -19
  524. package/dist/commands/skills-migrate-hooks-back.d.ts.map +0 -1
  525. package/dist/commands/skills-migrate-hooks-back.js +0 -83
  526. package/dist/commands/skills-migrate-hooks-back.js.map +0 -1
  527. package/dist/commands/skills-migrate-hooks.d.ts +0 -40
  528. package/dist/commands/skills-migrate-hooks.d.ts.map +0 -1
  529. package/dist/commands/skills-migrate-hooks.js +0 -178
  530. package/dist/commands/skills-migrate-hooks.js.map +0 -1
  531. package/dist/commands/skills-migrate.d.ts +0 -33
  532. package/dist/commands/skills-migrate.d.ts.map +0 -1
  533. package/dist/commands/skills-migrate.js +0 -216
  534. package/dist/commands/skills-migrate.js.map +0 -1
  535. package/dist/commands/skills-onboard.d.ts +0 -26
  536. package/dist/commands/skills-onboard.d.ts.map +0 -1
  537. package/dist/commands/skills-onboard.js +0 -230
  538. package/dist/commands/skills-onboard.js.map +0 -1
  539. package/dist/commands/skills-shadow-backups.d.ts +0 -15
  540. package/dist/commands/skills-shadow-backups.d.ts.map +0 -1
  541. package/dist/commands/skills-shadow-backups.js +0 -132
  542. package/dist/commands/skills-shadow-backups.js.map +0 -1
  543. package/dist/commands/skills-source.d.ts +0 -61
  544. package/dist/commands/skills-source.d.ts.map +0 -1
  545. package/dist/commands/skills-source.js +0 -895
  546. package/dist/commands/skills-source.js.map +0 -1
  547. package/dist/commands/skills.d.ts +0 -59
  548. package/dist/commands/skills.d.ts.map +0 -1
  549. package/dist/commands/skills.js +0 -461
  550. package/dist/commands/skills.js.map +0 -1
  551. package/dist/commands/status.d.ts +0 -65
  552. package/dist/commands/status.d.ts.map +0 -1
  553. package/dist/commands/status.js +0 -249
  554. package/dist/commands/status.js.map +0 -1
  555. package/dist/commands/stop.d.ts +0 -10
  556. package/dist/commands/stop.d.ts.map +0 -1
  557. package/dist/commands/stop.js +0 -17
  558. package/dist/commands/stop.js.map +0 -1
  559. package/dist/commands/substrate-audit-log.d.ts +0 -51
  560. package/dist/commands/substrate-audit-log.d.ts.map +0 -1
  561. package/dist/commands/substrate-audit-log.js +0 -161
  562. package/dist/commands/substrate-audit-log.js.map +0 -1
  563. package/dist/commands/substrate.d.ts +0 -87
  564. package/dist/commands/substrate.d.ts.map +0 -1
  565. package/dist/commands/substrate.js +0 -194
  566. package/dist/commands/substrate.js.map +0 -1
  567. package/dist/commands/update.d.ts +0 -89
  568. package/dist/commands/update.d.ts.map +0 -1
  569. package/dist/commands/update.js +0 -331
  570. package/dist/commands/update.js.map +0 -1
  571. package/dist/commands/upgrade-history.d.ts +0 -15
  572. package/dist/commands/upgrade-history.d.ts.map +0 -1
  573. package/dist/commands/upgrade-history.js +0 -34
  574. package/dist/commands/upgrade-history.js.map +0 -1
  575. package/dist/commands/upgrade-lock.d.ts +0 -93
  576. package/dist/commands/upgrade-lock.d.ts.map +0 -1
  577. package/dist/commands/upgrade-lock.js +0 -225
  578. package/dist/commands/upgrade-lock.js.map +0 -1
  579. package/dist/commands/upgrade-log.d.ts +0 -86
  580. package/dist/commands/upgrade-log.d.ts.map +0 -1
  581. package/dist/commands/upgrade-log.js +0 -146
  582. package/dist/commands/upgrade-log.js.map +0 -1
  583. package/dist/commands/upgrade.d.ts +0 -445
  584. package/dist/commands/upgrade.d.ts.map +0 -1
  585. package/dist/commands/upgrade.js +0 -1718
  586. package/dist/commands/upgrade.js.map +0 -1
  587. package/dist/commands/workspace-list-json.d.ts +0 -73
  588. package/dist/commands/workspace-list-json.d.ts.map +0 -1
  589. package/dist/commands/workspace-list-json.js +0 -59
  590. package/dist/commands/workspace-list-json.js.map +0 -1
  591. package/dist/commands/workspace.d.ts +0 -23
  592. package/dist/commands/workspace.d.ts.map +0 -1
  593. package/dist/commands/workspace.js +0 -203
  594. package/dist/commands/workspace.js.map +0 -1
  595. package/dist/commands/world-snapshot.d.ts +0 -32
  596. package/dist/commands/world-snapshot.d.ts.map +0 -1
  597. package/dist/commands/world-snapshot.js +0 -531
  598. package/dist/commands/world-snapshot.js.map +0 -1
  599. package/dist/commands/world-upgrade.d.ts +0 -33
  600. package/dist/commands/world-upgrade.d.ts.map +0 -1
  601. package/dist/commands/world-upgrade.js +0 -82
  602. package/dist/commands/world-upgrade.js.map +0 -1
  603. package/dist/commands/world.d.ts +0 -12
  604. package/dist/commands/world.d.ts.map +0 -1
  605. package/dist/commands/world.js +0 -18
  606. package/dist/commands/world.js.map +0 -1
  607. package/dist/commands/worldspec/compile.d.ts +0 -20
  608. package/dist/commands/worldspec/compile.d.ts.map +0 -1
  609. package/dist/commands/worldspec/compile.js +0 -130
  610. package/dist/commands/worldspec/compile.js.map +0 -1
  611. package/dist/commands/worldspec/index.d.ts +0 -12
  612. package/dist/commands/worldspec/index.d.ts.map +0 -1
  613. package/dist/commands/worldspec/index.js +0 -23
  614. package/dist/commands/worldspec/index.js.map +0 -1
  615. package/dist/commands/worldspec/init.d.ts +0 -15
  616. package/dist/commands/worldspec/init.d.ts.map +0 -1
  617. package/dist/commands/worldspec/init.js +0 -166
  618. package/dist/commands/worldspec/init.js.map +0 -1
  619. package/dist/commands/worldspec/schema.d.ts +0 -11
  620. package/dist/commands/worldspec/schema.d.ts.map +0 -1
  621. package/dist/commands/worldspec/schema.js +0 -55
  622. package/dist/commands/worldspec/schema.js.map +0 -1
  623. package/dist/commands/worldspec/validate.d.ts +0 -15
  624. package/dist/commands/worldspec/validate.d.ts.map +0 -1
  625. package/dist/commands/worldspec/validate.js +0 -66
  626. package/dist/commands/worldspec/validate.js.map +0 -1
  627. package/dist/commands/yolo.d.ts +0 -95
  628. package/dist/commands/yolo.d.ts.map +0 -1
  629. package/dist/commands/yolo.js +0 -377
  630. package/dist/commands/yolo.js.map +0 -1
  631. package/dist/context.d.ts +0 -30
  632. package/dist/context.d.ts.map +0 -1
  633. package/dist/context.js +0 -56
  634. package/dist/context.js.map +0 -1
  635. package/dist/docker-host.d.ts +0 -18
  636. package/dist/docker-host.d.ts.map +0 -1
  637. package/dist/docker-host.js +0 -17
  638. package/dist/docker-host.js.map +0 -1
  639. package/dist/exit-codes.d.ts +0 -67
  640. package/dist/exit-codes.d.ts.map +0 -1
  641. package/dist/exit-codes.js +0 -67
  642. package/dist/exit-codes.js.map +0 -1
  643. package/dist/from-manifest.d.ts +0 -53
  644. package/dist/from-manifest.d.ts.map +0 -1
  645. package/dist/from-manifest.js +0 -95
  646. package/dist/from-manifest.js.map +0 -1
  647. package/dist/image-presence.d.ts +0 -40
  648. package/dist/image-presence.d.ts.map +0 -1
  649. package/dist/image-presence.js +0 -39
  650. package/dist/image-presence.js.map +0 -1
  651. package/dist/index.d.ts +0 -9
  652. package/dist/index.d.ts.map +0 -1
  653. package/dist/install-root.d.ts +0 -74
  654. package/dist/install-root.d.ts.map +0 -1
  655. package/dist/install-root.js +0 -98
  656. package/dist/install-root.js.map +0 -1
  657. package/dist/lib/anthropic-base-url-file.d.ts +0 -37
  658. package/dist/lib/anthropic-base-url-file.d.ts.map +0 -1
  659. package/dist/lib/anthropic-base-url-file.js +0 -46
  660. package/dist/lib/anthropic-base-url-file.js.map +0 -1
  661. package/dist/lib/auth-backend.d.ts +0 -168
  662. package/dist/lib/auth-backend.d.ts.map +0 -1
  663. package/dist/lib/auth-backend.js +0 -172
  664. package/dist/lib/auth-backend.js.map +0 -1
  665. package/dist/lib/auth-list-cache.d.ts +0 -67
  666. package/dist/lib/auth-list-cache.d.ts.map +0 -1
  667. package/dist/lib/auth-list-cache.js +0 -84
  668. package/dist/lib/auth-list-cache.js.map +0 -1
  669. package/dist/lib/auth-list.d.ts +0 -107
  670. package/dist/lib/auth-list.d.ts.map +0 -1
  671. package/dist/lib/auth-list.js +0 -123
  672. package/dist/lib/auth-list.js.map +0 -1
  673. package/dist/lib/auth-login.d.ts +0 -92
  674. package/dist/lib/auth-login.d.ts.map +0 -1
  675. package/dist/lib/auth-login.js +0 -124
  676. package/dist/lib/auth-login.js.map +0 -1
  677. package/dist/lib/auth-mutator-backend.d.ts +0 -54
  678. package/dist/lib/auth-mutator-backend.d.ts.map +0 -1
  679. package/dist/lib/auth-mutator-backend.js +0 -62
  680. package/dist/lib/auth-mutator-backend.js.map +0 -1
  681. package/dist/lib/auth-refresh-kubernetes.d.ts +0 -65
  682. package/dist/lib/auth-refresh-kubernetes.d.ts.map +0 -1
  683. package/dist/lib/auth-refresh-kubernetes.js +0 -125
  684. package/dist/lib/auth-refresh-kubernetes.js.map +0 -1
  685. package/dist/lib/auth-remote.d.ts +0 -172
  686. package/dist/lib/auth-remote.d.ts.map +0 -1
  687. package/dist/lib/auth-remote.js +0 -394
  688. package/dist/lib/auth-remote.js.map +0 -1
  689. package/dist/lib/bootstrap-kubernetes.d.ts +0 -164
  690. package/dist/lib/bootstrap-kubernetes.d.ts.map +0 -1
  691. package/dist/lib/bootstrap-kubernetes.js +0 -1002
  692. package/dist/lib/bootstrap-kubernetes.js.map +0 -1
  693. package/dist/lib/build-if-stale.d.ts +0 -33
  694. package/dist/lib/build-if-stale.d.ts.map +0 -1
  695. package/dist/lib/build-if-stale.js +0 -156
  696. package/dist/lib/build-if-stale.js.map +0 -1
  697. package/dist/lib/bundle-freshness.d.ts +0 -57
  698. package/dist/lib/bundle-freshness.d.ts.map +0 -1
  699. package/dist/lib/bundle-freshness.js +0 -223
  700. package/dist/lib/bundle-freshness.js.map +0 -1
  701. package/dist/lib/bundle-source.d.ts +0 -52
  702. package/dist/lib/bundle-source.d.ts.map +0 -1
  703. package/dist/lib/bundle-source.js +0 -83
  704. package/dist/lib/bundle-source.js.map +0 -1
  705. package/dist/lib/cf-access-token.d.ts +0 -32
  706. package/dist/lib/cf-access-token.d.ts.map +0 -1
  707. package/dist/lib/cf-access-token.js +0 -51
  708. package/dist/lib/cf-access-token.js.map +0 -1
  709. package/dist/lib/completion-generator.d.ts +0 -107
  710. package/dist/lib/completion-generator.d.ts.map +0 -1
  711. package/dist/lib/completion-generator.js +0 -226
  712. package/dist/lib/completion-generator.js.map +0 -1
  713. package/dist/lib/config.d.ts +0 -114
  714. package/dist/lib/config.d.ts.map +0 -1
  715. package/dist/lib/config.js +0 -246
  716. package/dist/lib/config.js.map +0 -1
  717. package/dist/lib/flywheel-probes.d.ts +0 -58
  718. package/dist/lib/flywheel-probes.d.ts.map +0 -1
  719. package/dist/lib/flywheel-probes.js +0 -163
  720. package/dist/lib/flywheel-probes.js.map +0 -1
  721. package/dist/lib/health-probes.d.ts +0 -267
  722. package/dist/lib/health-probes.d.ts.map +0 -1
  723. package/dist/lib/health-probes.js +0 -933
  724. package/dist/lib/health-probes.js.map +0 -1
  725. package/dist/lib/help-groups.d.ts +0 -36
  726. package/dist/lib/help-groups.d.ts.map +0 -1
  727. package/dist/lib/help-groups.js +0 -124
  728. package/dist/lib/help-groups.js.map +0 -1
  729. package/dist/lib/host-side-proxy.d.ts +0 -67
  730. package/dist/lib/host-side-proxy.d.ts.map +0 -1
  731. package/dist/lib/host-side-proxy.js +0 -177
  732. package/dist/lib/host-side-proxy.js.map +0 -1
  733. package/dist/lib/instrumentation.d.ts +0 -85
  734. package/dist/lib/instrumentation.d.ts.map +0 -1
  735. package/dist/lib/instrumentation.js +0 -104
  736. package/dist/lib/instrumentation.js.map +0 -1
  737. package/dist/lib/k8s-bootstrap.d.ts +0 -126
  738. package/dist/lib/k8s-bootstrap.d.ts.map +0 -1
  739. package/dist/lib/k8s-bootstrap.js +0 -218
  740. package/dist/lib/k8s-bootstrap.js.map +0 -1
  741. package/dist/lib/k8s-context-discovery.d.ts +0 -80
  742. package/dist/lib/k8s-context-discovery.d.ts.map +0 -1
  743. package/dist/lib/k8s-context-discovery.js +0 -102
  744. package/dist/lib/k8s-context-discovery.js.map +0 -1
  745. package/dist/lib/k8s-secret-render.d.ts +0 -141
  746. package/dist/lib/k8s-secret-render.d.ts.map +0 -1
  747. package/dist/lib/k8s-secret-render.js +0 -318
  748. package/dist/lib/k8s-secret-render.js.map +0 -1
  749. package/dist/lib/kg-caps.d.ts +0 -19
  750. package/dist/lib/kg-caps.d.ts.map +0 -1
  751. package/dist/lib/kg-caps.js +0 -19
  752. package/dist/lib/kg-caps.js.map +0 -1
  753. package/dist/lib/kubectl-context.d.ts +0 -87
  754. package/dist/lib/kubectl-context.d.ts.map +0 -1
  755. package/dist/lib/kubectl-context.js +0 -105
  756. package/dist/lib/kubectl-context.js.map +0 -1
  757. package/dist/lib/kubectl-wrap.d.ts +0 -65
  758. package/dist/lib/kubectl-wrap.d.ts.map +0 -1
  759. package/dist/lib/kubectl-wrap.js +0 -135
  760. package/dist/lib/kubectl-wrap.js.map +0 -1
  761. package/dist/lib/manifest-refresh.d.ts +0 -136
  762. package/dist/lib/manifest-refresh.d.ts.map +0 -1
  763. package/dist/lib/manifest-refresh.js +0 -298
  764. package/dist/lib/manifest-refresh.js.map +0 -1
  765. package/dist/lib/memory-host-process-migration.d.ts +0 -56
  766. package/dist/lib/memory-host-process-migration.d.ts.map +0 -1
  767. package/dist/lib/memory-host-process-migration.js +0 -156
  768. package/dist/lib/memory-host-process-migration.js.map +0 -1
  769. package/dist/lib/memory-secret.d.ts +0 -83
  770. package/dist/lib/memory-secret.d.ts.map +0 -1
  771. package/dist/lib/memory-secret.js +0 -147
  772. package/dist/lib/memory-secret.js.map +0 -1
  773. package/dist/lib/peripheral-registry.d.ts +0 -53
  774. package/dist/lib/peripheral-registry.d.ts.map +0 -1
  775. package/dist/lib/peripheral-registry.js +0 -73
  776. package/dist/lib/peripheral-registry.js.map +0 -1
  777. package/dist/lib/plans-client.d.ts +0 -69
  778. package/dist/lib/plans-client.d.ts.map +0 -1
  779. package/dist/lib/plans-client.js +0 -140
  780. package/dist/lib/plans-client.js.map +0 -1
  781. package/dist/lib/port-forward.d.ts +0 -168
  782. package/dist/lib/port-forward.d.ts.map +0 -1
  783. package/dist/lib/port-forward.js +0 -393
  784. package/dist/lib/port-forward.js.map +0 -1
  785. package/dist/lib/shell-rc.d.ts +0 -90
  786. package/dist/lib/shell-rc.d.ts.map +0 -1
  787. package/dist/lib/shell-rc.js +0 -91
  788. package/dist/lib/shell-rc.js.map +0 -1
  789. package/dist/lib/shim-generator.d.ts +0 -51
  790. package/dist/lib/shim-generator.d.ts.map +0 -1
  791. package/dist/lib/shim-generator.js +0 -88
  792. package/dist/lib/shim-generator.js.map +0 -1
  793. package/dist/lib/skills-apply-overlays.d.ts +0 -35
  794. package/dist/lib/skills-apply-overlays.d.ts.map +0 -1
  795. package/dist/lib/skills-apply-overlays.js +0 -243
  796. package/dist/lib/skills-apply-overlays.js.map +0 -1
  797. package/dist/lib/symlink-reconcile.d.ts +0 -32
  798. package/dist/lib/symlink-reconcile.d.ts.map +0 -1
  799. package/dist/lib/symlink-reconcile.js +0 -80
  800. package/dist/lib/symlink-reconcile.js.map +0 -1
  801. package/dist/lib/upgrade-check.d.ts +0 -60
  802. package/dist/lib/upgrade-check.d.ts.map +0 -1
  803. package/dist/lib/upgrade-check.js +0 -169
  804. package/dist/lib/upgrade-check.js.map +0 -1
  805. package/dist/lib/upgrade-kubernetes.d.ts +0 -193
  806. package/dist/lib/upgrade-kubernetes.d.ts.map +0 -1
  807. package/dist/lib/upgrade-kubernetes.js +0 -1014
  808. package/dist/lib/upgrade-kubernetes.js.map +0 -1
  809. package/dist/lib/world-mcp-register.d.ts +0 -98
  810. package/dist/lib/world-mcp-register.d.ts.map +0 -1
  811. package/dist/lib/world-mcp-register.js +0 -117
  812. package/dist/lib/world-mcp-register.js.map +0 -1
  813. package/dist/output.d.ts +0 -10
  814. package/dist/output.d.ts.map +0 -1
  815. package/dist/output.js +0 -31
  816. package/dist/output.js.map +0 -1
  817. package/dist/pleri-config.d.ts +0 -22
  818. package/dist/pleri-config.d.ts.map +0 -1
  819. package/dist/pleri-config.js +0 -42
  820. package/dist/pleri-config.js.map +0 -1
  821. package/dist/protocol-version.d.ts +0 -79
  822. package/dist/protocol-version.d.ts.map +0 -1
  823. package/dist/protocol-version.js +0 -133
  824. package/dist/protocol-version.js.map +0 -1
  825. package/dist/registry-allowlist.d.ts +0 -47
  826. package/dist/registry-allowlist.d.ts.map +0 -1
  827. package/dist/registry-allowlist.js +0 -67
  828. package/dist/registry-allowlist.js.map +0 -1
  829. package/dist/spawn/home-override.d.ts +0 -82
  830. package/dist/spawn/home-override.d.ts.map +0 -1
  831. package/dist/spawn/home-override.js +0 -107
  832. package/dist/spawn/home-override.js.map +0 -1
  833. package/host-cp/src/linear-sync.mjs +0 -43
@@ -1,121 +0,0 @@
1
- /**
2
- * `olam kg uninstall-hook [--scope project|user]` — surgical removal of the
3
- * kg-service PreToolUse hook from .claude/settings.json.
4
- *
5
- * Matches by sentinel — only removes hook entries whose command contains
6
- * KG_HOOK_SENTINEL. Other PreToolUse entries (e.g. operator-installed
7
- * custom hooks) are left intact. Idempotent: running on a non-installed
8
- * file is a no-op.
9
- */
10
- import * as fs from 'node:fs';
11
- import * as path from 'node:path';
12
- import * as os from 'node:os';
13
- import { KG_HOOK_SENTINEL } from '@olam/core/src/kg/hook-template.js';
14
- import { printError, printInfo, printSuccess } from '../output.js';
15
- function settingsPathFor(scope) {
16
- if (scope === 'user') {
17
- return path.join(os.homedir(), '.claude', 'settings.json');
18
- }
19
- return path.join(process.cwd(), '.claude', 'settings.json');
20
- }
21
- /**
22
- * Walk a PreToolUse matcher array and drop:
23
- * - inner hook entries whose `command` contains the sentinel
24
- * - outer matcher entries left empty after the inner-drop
25
- * Returns the filtered array + a boolean "did anything change".
26
- */
27
- function dropSentinel(matchers) {
28
- let changed = false;
29
- const out = [];
30
- for (const matcher of matchers) {
31
- const innerHooks = matcher.hooks ?? [];
32
- const keptInner = innerHooks.filter((h) => {
33
- if (typeof h.command === 'string' && h.command.includes(KG_HOOK_SENTINEL)) {
34
- changed = true;
35
- return false;
36
- }
37
- return true;
38
- });
39
- if (keptInner.length === 0 && innerHooks.length > 0) {
40
- // The matcher had hooks but they were all kg-service; drop the matcher entirely.
41
- changed = true;
42
- continue;
43
- }
44
- if (keptInner.length === innerHooks.length) {
45
- out.push(matcher);
46
- }
47
- else {
48
- out.push({ ...matcher, hooks: keptInner });
49
- }
50
- }
51
- return { matchers: out, changed };
52
- }
53
- export function registerKgUninstallHookCommand(kg) {
54
- kg.command('uninstall-hook')
55
- .description('Remove kg-service PreToolUse hook from .claude/settings.json (sentinel-matched; surgical)')
56
- .option('--scope <scope>', 'project (default) or user', 'project')
57
- .action((opts) => {
58
- const scope = opts.scope === 'user' ? 'user' : 'project';
59
- const filePath = settingsPathFor(scope);
60
- if (!fs.existsSync(filePath)) {
61
- printInfo('kg-service hook', `no settings.json at ${filePath} — nothing to remove`);
62
- return;
63
- }
64
- let settings;
65
- try {
66
- const raw = fs.readFileSync(filePath, 'utf-8');
67
- settings = raw.trim() ? JSON.parse(raw) : {};
68
- }
69
- catch (err) {
70
- printError(`could not parse ${filePath}: ${err instanceof Error ? err.message : String(err)}`);
71
- process.exitCode = 1;
72
- return;
73
- }
74
- const preToolUse = settings.hooks?.PreToolUse;
75
- if (!Array.isArray(preToolUse) || preToolUse.length === 0) {
76
- printInfo('kg-service hook', `no PreToolUse hooks at ${filePath} — nothing to remove`);
77
- return;
78
- }
79
- const { matchers, changed } = dropSentinel(preToolUse);
80
- if (!changed) {
81
- printInfo('kg-service hook', `not found in ${filePath} — already uninstalled`);
82
- return;
83
- }
84
- // Back up before writing the filtered result.
85
- const ts = new Date().toISOString().replace(/[:.]/g, '-');
86
- const backupPath = `${filePath}.olam-bak.${ts}`;
87
- try {
88
- fs.copyFileSync(filePath, backupPath);
89
- }
90
- catch {
91
- // best-effort backup
92
- }
93
- const next = {
94
- ...settings,
95
- hooks: {
96
- ...settings.hooks,
97
- PreToolUse: matchers,
98
- },
99
- };
100
- // If PreToolUse is now empty AND there are no other hook stages, drop the key entirely.
101
- if (matchers.length === 0) {
102
- const otherStages = Object.keys(next.hooks ?? {}).filter((k) => k !== 'PreToolUse');
103
- if (otherStages.length === 0) {
104
- delete next.hooks;
105
- }
106
- else {
107
- delete next.hooks.PreToolUse;
108
- }
109
- }
110
- try {
111
- fs.writeFileSync(filePath, JSON.stringify(next, null, 2) + '\n');
112
- printSuccess(`kg-service hook removed from ${filePath}`);
113
- printInfo('backup', backupPath);
114
- }
115
- catch (err) {
116
- printError(`could not write ${filePath}: ${err instanceof Error ? err.message : String(err)}`);
117
- process.exitCode = 1;
118
- }
119
- });
120
- }
121
- //# sourceMappingURL=kg-uninstall-hook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kg-uninstall-hook.js","sourceRoot":"","sources":["../../src/commands/kg-uninstall-hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAmBnE,SAAS,eAAe,CAAC,KAAY;IACnC,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,SAAS,YAAY,CACnB,QAAwE;IAExE,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,GAAG,GAAoB,EAAE,CAAC;IAChC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;YACxC,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAC1E,OAAO,GAAG,IAAI,CAA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GAAG,QAAQ,CAAC,KAAK;gBACjB,UAAU,EAAE,QAAQ;aACrB;SACF,CAAC;QACF,wFAAwF;QACxF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC;YACpF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC,KAAK,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAC,KAAM,CAAC,UAAU,CAAC;YAChC,CAAC;QACH,CAAC;QAED,IAAI,CAAC;YACH,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YACjE,YAAY,CAAC,gCAAgC,QAAQ,EAAE,CAAC,CAAC;YACzD,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,UAAU,CAAC,mBAAmB,QAAQ,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC/F,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,49 +0,0 @@
1
- /**
2
- * olam kg watch <workspace> — opt-in pristine watcher.
3
- *
4
- * Phase C2 of olam-kg-service (plan ~/.claude/plans/olam-kg-service.md).
5
- *
6
- * Runs `graphify <workspacePath> --watch --update --graph <pristinePath>/graph.json`
7
- * as a managed subprocess against the operator's workspace clone so the
8
- * pristine KG stays fresh as host-side commits land. Off by default;
9
- * operator opts in per workspace.
10
- *
11
- * Single-instance enforcement via PID file at
12
- * `~/.olam/kg/<workspace>/.watch.pid`. Reclaim stale PIDs (process gone
13
- * but file remains) silently. Reject when an active PID still owns the
14
- * file.
15
- *
16
- * Lifecycle:
17
- * 1. CLI process spawns graphify in the FOREGROUND (`detached: false`)
18
- * so the operator's terminal owns it; Ctrl-C kills both cleanly.
19
- * 2. SIGINT/SIGTERM on this process → forwarded to graphify; subprocess
20
- * exits; CLI removes PID file; CLI exits.
21
- * 3. graphify exiting on its own → CLI removes PID file + exits with
22
- * graphify's status code.
23
- *
24
- * Risk T7 mitigation: workspace name regex-validated via @olam/core's
25
- * `validateWorkspaceName`; `--graph` path resolved via `kgPristinePath`
26
- * (which asserts the resolved path stays under `~/.olam/kg/`). All
27
- * subprocess invocations use argv arrays (no shell interpolation).
28
- */
29
- import type { Command } from 'commander';
30
- import { spawn } from 'node:child_process';
31
- interface KgWatchOptions {
32
- readonly cwd?: string;
33
- }
34
- export interface RunKgWatchDeps {
35
- /** Spawn factory; injectable for tests so we don't fork real graphify. */
36
- readonly spawnImpl?: typeof spawn;
37
- /** Resolve workspace cwd; defaults to process.cwd(). */
38
- readonly cwd?: string;
39
- /** Suppresses signal-handler registration during tests. */
40
- readonly registerSignalHandlers?: boolean;
41
- }
42
- interface RunResult {
43
- readonly exitCode: number;
44
- readonly pidWritten: boolean;
45
- }
46
- export declare function runKgWatch(workspaceArg: string | undefined, opts: KgWatchOptions, deps?: RunKgWatchDeps): Promise<RunResult>;
47
- export declare function registerKgWatchCommand(kg: Command): void;
48
- export {};
49
- //# sourceMappingURL=kg-watch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kg-watch.d.ts","sourceRoot":"","sources":["../../src/commands/kg-watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAO9D,UAAU,cAAc;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAqED,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IAClC,wDAAwD;IACxD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAC3C;AAED,UAAU,SAAS;IACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAsB,UAAU,CAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,EAAE,cAAc,EACpB,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC,SAAS,CAAC,CAyEpB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAWxD"}
@@ -1,172 +0,0 @@
1
- /**
2
- * olam kg watch <workspace> — opt-in pristine watcher.
3
- *
4
- * Phase C2 of olam-kg-service (plan ~/.claude/plans/olam-kg-service.md).
5
- *
6
- * Runs `graphify <workspacePath> --watch --update --graph <pristinePath>/graph.json`
7
- * as a managed subprocess against the operator's workspace clone so the
8
- * pristine KG stays fresh as host-side commits land. Off by default;
9
- * operator opts in per workspace.
10
- *
11
- * Single-instance enforcement via PID file at
12
- * `~/.olam/kg/<workspace>/.watch.pid`. Reclaim stale PIDs (process gone
13
- * but file remains) silently. Reject when an active PID still owns the
14
- * file.
15
- *
16
- * Lifecycle:
17
- * 1. CLI process spawns graphify in the FOREGROUND (`detached: false`)
18
- * so the operator's terminal owns it; Ctrl-C kills both cleanly.
19
- * 2. SIGINT/SIGTERM on this process → forwarded to graphify; subprocess
20
- * exits; CLI removes PID file; CLI exits.
21
- * 3. graphify exiting on its own → CLI removes PID file + exits with
22
- * graphify's status code.
23
- *
24
- * Risk T7 mitigation: workspace name regex-validated via @olam/core's
25
- * `validateWorkspaceName`; `--graph` path resolved via `kgPristinePath`
26
- * (which asserts the resolved path stays under `~/.olam/kg/`). All
27
- * subprocess invocations use argv arrays (no shell interpolation).
28
- */
29
- import { spawn } from 'node:child_process';
30
- import fs from 'node:fs';
31
- import path from 'node:path';
32
- import { kgPristinePath } from '@olam/core/src/kg/storage-paths.js';
33
- import { validateWorkspaceName } from '@olam/core/src/world/workspace-name.js';
34
- import { printError, printInfo, printSuccess } from '../output.js';
35
- function pidFilePath(workspace) {
36
- return path.join(kgPristinePath(workspace), '.watch.pid');
37
- }
38
- /**
39
- * Check whether a given PID is currently a live process.
40
- *
41
- * `process.kill(pid, 0)` returns truthy AND doesn't actually send a
42
- * signal when called with signal=0 — it's the standard POSIX liveness
43
- * check. Throws ESRCH when the PID is dead. EPERM means "exists but
44
- * I can't signal it" (different user); we treat EPERM as "alive" because
45
- * the same operator owning olam should own the graphify subprocess.
46
- */
47
- function isPidAlive(pid) {
48
- if (!Number.isInteger(pid) || pid <= 0)
49
- return false;
50
- try {
51
- process.kill(pid, 0);
52
- return true;
53
- }
54
- catch (err) {
55
- const code = err.code;
56
- if (code === 'EPERM')
57
- return true; // exists, different user
58
- return false; // ESRCH or other → dead
59
- }
60
- }
61
- function readAndClassifyPid(workspace) {
62
- const file = pidFilePath(workspace);
63
- if (!fs.existsSync(file))
64
- return { status: 'no-pidfile', pid: null };
65
- let pid;
66
- try {
67
- const raw = fs.readFileSync(file, 'utf-8').trim();
68
- pid = Number.parseInt(raw, 10);
69
- }
70
- catch {
71
- // Unreadable → treat as stale; the writer must have been killed mid-flush
72
- fs.rmSync(file, { force: true });
73
- return { status: 'stale-reclaimed', pid: null };
74
- }
75
- if (!Number.isInteger(pid) || pid <= 0) {
76
- fs.rmSync(file, { force: true });
77
- return { status: 'stale-reclaimed', pid: null };
78
- }
79
- if (isPidAlive(pid))
80
- return { status: 'active', pid };
81
- fs.rmSync(file, { force: true });
82
- return { status: 'stale-reclaimed', pid: null };
83
- }
84
- function writePidFile(workspace, pid) {
85
- const file = pidFilePath(workspace);
86
- const dir = path.dirname(file);
87
- fs.mkdirSync(dir, { recursive: true });
88
- fs.writeFileSync(file, String(pid), { encoding: 'utf-8' });
89
- }
90
- function removePidFile(workspace) {
91
- const file = pidFilePath(workspace);
92
- try {
93
- fs.rmSync(file, { force: true });
94
- }
95
- catch {
96
- // best-effort cleanup
97
- }
98
- }
99
- export async function runKgWatch(workspaceArg, opts, deps = {}) {
100
- const cwd = deps.cwd ?? opts.cwd ?? process.cwd();
101
- const name = workspaceArg ?? path.basename(cwd).toLowerCase();
102
- try {
103
- validateWorkspaceName(name);
104
- }
105
- catch (err) {
106
- printError(err.message);
107
- return { exitCode: 1, pidWritten: false };
108
- }
109
- const pristinePath = kgPristinePath(name);
110
- const graphPath = path.join(pristinePath, 'graphify-out', 'graph.json');
111
- // Single-instance gate. PRE-spawn so we never start a duplicate watcher.
112
- const pidState = readAndClassifyPid(name);
113
- if (pidState.status === 'active') {
114
- printError(`olam kg watch ${name} — already running (PID ${pidState.pid}). `
115
- + `Send SIGINT to that process to stop the existing watcher first.`);
116
- return { exitCode: 1, pidWritten: false };
117
- }
118
- if (pidState.status === 'stale-reclaimed') {
119
- printInfo('stale-pid', `reclaimed dead PID file at ${pidFilePath(name)}`);
120
- }
121
- const spawnFn = deps.spawnImpl ?? spawn;
122
- const child = spawnFn('graphify', [cwd, '--watch', '--update', '--graph', graphPath], {
123
- cwd,
124
- env: process.env,
125
- detached: false,
126
- stdio: 'inherit',
127
- });
128
- if (typeof child.pid !== 'number') {
129
- printError('graphify failed to launch (no PID assigned)');
130
- return { exitCode: 1, pidWritten: false };
131
- }
132
- writePidFile(name, child.pid);
133
- printSuccess(`olam kg watch ${name} — graphify PID ${child.pid} (Ctrl-C to stop)`);
134
- if (deps.registerSignalHandlers !== false) {
135
- const forward = (sig) => {
136
- if (child.pid && !child.killed) {
137
- try {
138
- process.kill(child.pid, sig);
139
- }
140
- catch {
141
- // child already dead; fall through to wait
142
- }
143
- }
144
- };
145
- process.on('SIGINT', () => forward('SIGINT'));
146
- process.on('SIGTERM', () => forward('SIGTERM'));
147
- }
148
- return new Promise((resolve) => {
149
- child.on('exit', (code, signal) => {
150
- removePidFile(name);
151
- const exitCode = typeof code === 'number' ? code : signal === 'SIGINT' || signal === 'SIGTERM' ? 0 : 1;
152
- resolve({ exitCode, pidWritten: true });
153
- });
154
- child.on('error', (err) => {
155
- removePidFile(name);
156
- printError(`graphify subprocess error: ${err.message}`);
157
- resolve({ exitCode: 1, pidWritten: true });
158
- });
159
- });
160
- }
161
- export function registerKgWatchCommand(kg) {
162
- kg.command('watch')
163
- .description('Run graphify --watch against a workspace, keeping its pristine KG fresh '
164
- + 'as host-side commits land. Single-instance via PID file; Ctrl-C cleanly stops.')
165
- .argument('[workspace]', 'workspace name (lowercase alphanumeric + hyphens/underscores)')
166
- .action(async (workspaceArg) => {
167
- const r = await runKgWatch(workspaceArg, {});
168
- if (r.exitCode !== 0)
169
- process.exitCode = r.exitCode;
170
- });
171
- }
172
- //# sourceMappingURL=kg-watch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kg-watch.js","sourceRoot":"","sources":["../../src/commands/kg-watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAMnE,SAAS,WAAW,CAAC,SAAi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,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxF,OAAO,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,CAAC;YACpB,UAAU,CAAC,8BAA+B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YACnE,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,EAAW;IAChD,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CACV,0EAA0E;UACtE,gFAAgF,CACrF;SACA,QAAQ,CAAC,aAAa,EAAE,+DAA+D,CAAC;SACxF,MAAM,CAAC,KAAK,EAAE,YAAgC,EAAE,EAAE;QACjD,MAAM,CAAC,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,69 +0,0 @@
1
- /**
2
- * Pure JSON serialiser for `olam lanes list <world> --json`.
3
- *
4
- * Kept separate from the command action so the wire contract is
5
- * unit-testable without a network round-trip (mirrors the pattern
6
- * used by `repos-list-json.ts`, `auth-list-json.ts`, `services.ts`).
7
- *
8
- * WHY this exists: agent/script drivers (Rico, flywheel chain skills,
9
- * CI pipelines) need to enumerate running lanes in a world before
10
- * dispatching work or routing a follow-up task to the right lane.
11
- * The human renderer uses printInfo/printHeader which emit ANSI codes
12
- * and may reflow — scraping it is brittle. This serialiser gives
13
- * drivers a stable, colour-free array with the exact fields needed to
14
- * pick a lane without re-querying host-cp.
15
- *
16
- * Secret redaction: lane records contain no secrets (names, tasks, and
17
- * status strings are all operator-visible). No redaction needed.
18
- */
19
- /**
20
- * Per-lane row in the `lanes list --json` payload.
21
- * Field names are load-bearing — add new fields freely, never rename.
22
- */
23
- export interface LaneListJsonEntry {
24
- /** Lane name (lowercase + digits + hyphens). */
25
- readonly name: string;
26
- /** Task prompt the lane was created with. */
27
- readonly task: string;
28
- /**
29
- * Lifecycle status string as reported by host-cp.
30
- * Typically 'running' | 'idle' | 'stopped' but treated as opaque string
31
- * here — drivers should compare against known values defensively.
32
- */
33
- readonly status: string;
34
- /** Underlying tmux session name (e.g. "claude-lane-main"). */
35
- readonly tmuxSession: string;
36
- /** ISO-8601 creation timestamp, as returned by host-cp. */
37
- readonly createdAt: string;
38
- /**
39
- * True for the world's main lane (spawned by dispatch, not by
40
- * `olam lanes create`). False or absent → user-created lane.
41
- */
42
- readonly isMain: boolean;
43
- }
44
- /** Top-level shape emitted by `olam lanes list <world> --json`. */
45
- export interface LanesListJson {
46
- /** World id that was queried. */
47
- readonly worldId: string;
48
- /** Number of lanes returned. */
49
- readonly count: number;
50
- readonly lanes: readonly LaneListJsonEntry[];
51
- }
52
- /** Input shape as returned by host-cp GET /lanes. Field names match the API. */
53
- export interface HostCpLaneInfo {
54
- readonly name: string;
55
- readonly task: string;
56
- readonly status: string;
57
- readonly tmuxSession: string;
58
- readonly createdAt: string;
59
- readonly isMain?: boolean;
60
- }
61
- /**
62
- * Serialise host-cp's lane list to the stable `--json` wire shape.
63
- *
64
- * @param worldId The world id that was queried (echoed back for driver convenience).
65
- * @param lanes Lane array from host-cp (may be empty).
66
- * @returns JSON string — no trailing newline (caller adds it).
67
- */
68
- export declare function renderLanesListJson(worldId: string, lanes: readonly HostCpLaneInfo[]): string;
69
- //# sourceMappingURL=l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Pure JSON serialiser for `olam lanes list <world> --json`.
3
- *
4
- * Kept separate from the command action so the wire contract is
5
- * unit-testable without a network round-trip (mirrors the pattern
6
- * used by `repos-list-json.ts`, `auth-list-json.ts`, `services.ts`).
7
- *
8
- * WHY this exists: agent/script drivers (Rico, flywheel chain skills,
9
- * CI pipelines) need to enumerate running lanes in a world before
10
- * dispatching work or routing a follow-up task to the right lane.
11
- * The human renderer uses printInfo/printHeader which emit ANSI codes
12
- * and may reflow — scraping it is brittle. This serialiser gives
13
- * drivers a stable, colour-free array with the exact fields needed to
14
- * pick a lane without re-querying host-cp.
15
- *
16
- * Secret redaction: lane records contain no secrets (names, tasks, and
17
- * status strings are all operator-visible). No redaction needed.
18
- */
19
- /**
20
- * Serialise host-cp's lane list to the stable `--json` wire shape.
21
- *
22
- * @param worldId The world id that was queried (echoed back for driver convenience).
23
- * @param lanes Lane array from host-cp (may be empty).
24
- * @returns JSON string — no trailing newline (caller adds it).
25
- */
26
- export function renderLanesListJson(worldId, lanes) {
27
- const rows = lanes.map((l) => ({
28
- name: l.name,
29
- task: l.task,
30
- status: l.status,
31
- tmuxSession: l.tmuxSession,
32
- createdAt: l.createdAt,
33
- isMain: l.isMain ?? false,
34
- }));
35
- const payload = {
36
- worldId,
37
- count: rows.length,
38
- lanes: rows,
39
- };
40
- return JSON.stringify(payload);
41
- }
42
- //# sourceMappingURL=lanes-list-json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lanes-list-json.js","sourceRoot":"","sources":["../../src/commands/lanes-list-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA+CH;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,KAAgC;IAEhC,MAAM,IAAI,GAAwB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,KAAK;KAC1B,CAAC,CAAC,CAAC;IAEJ,MAAM,OAAO,GAAkB;QAC7B,OAAO;QACP,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Phase C8 (olam-dogfood-vision): `olam lanes <subcommand>` — operator-
3
- * facing CRUD for claude-lane-* tmux sessions in a running world.
4
- *
5
- * Subcommands:
6
- * list <world> — GET /lanes
7
- * create <world> --name <n> --task <t> — POST /lanes/create
8
- * destroy <world> <name> — DELETE /lanes/<name>
9
- * dispatch <world> <name> <prompt> — POST /lanes/<name>/dispatch
10
- *
11
- * Goes through host-cp's `/api/world/<id>/*` proxy (Bearer-auth) so the
12
- * operator never handles the per-world CP's CONTAINER_SECRET directly.
13
- * The host-cp proxy injects X-Olam-Secret server-side per the
14
- * established Phase F-2-D proxy contract.
15
- */
16
- import type { Command } from 'commander';
17
- export declare function registerLanes(program: Command): void;
18
- //# sourceMappingURL=lanes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lanes.d.ts","sourceRoot":"","sources":["../../src/commands/lanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgHzC,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsCpD"}
@@ -1,133 +0,0 @@
1
- /**
2
- * Phase C8 (olam-dogfood-vision): `olam lanes <subcommand>` — operator-
3
- * facing CRUD for claude-lane-* tmux sessions in a running world.
4
- *
5
- * Subcommands:
6
- * list <world> — GET /lanes
7
- * create <world> --name <n> --task <t> — POST /lanes/create
8
- * destroy <world> <name> — DELETE /lanes/<name>
9
- * dispatch <world> <name> <prompt> — POST /lanes/<name>/dispatch
10
- *
11
- * Goes through host-cp's `/api/world/<id>/*` proxy (Bearer-auth) so the
12
- * operator never handles the per-world CP's CONTAINER_SECRET directly.
13
- * The host-cp proxy injects X-Olam-Secret server-side per the
14
- * established Phase F-2-D proxy contract.
15
- */
16
- import { callHostCpProxy } from './host-cp.js';
17
- import { printError, printSuccess, printInfo, printHeader } from '../output.js';
18
- import { renderLanesListJson } from './lanes-list-json.js';
19
- async function handleList(world, opts) {
20
- const result = await callHostCpProxy('GET', world, '/lanes');
21
- if (!result.ok) {
22
- if (opts.json) {
23
- process.stdout.write(JSON.stringify({ worldId: world, count: 0, lanes: [], error: result.error }) + '\n');
24
- }
25
- else {
26
- printError(`List failed: ${result.error}`);
27
- if (result.status === 0) {
28
- printInfo('Hint', 'Is host CP running? `olam host-cp status`');
29
- }
30
- }
31
- process.exitCode = 1;
32
- return;
33
- }
34
- const data = result.data;
35
- const lanes = (data?.lanes ?? []);
36
- if (opts.json) {
37
- process.stdout.write(renderLanesListJson(world, lanes) + '\n');
38
- return;
39
- }
40
- printHeader(`Lanes in world ${world}`);
41
- if (lanes.length === 0) {
42
- printInfo('Lanes', '(none — dispatch a task to spawn claude-main)');
43
- return;
44
- }
45
- for (const l of lanes) {
46
- const marker = l.isMain ? '◉' : '·';
47
- const taskPreview = l.task.length > 60 ? l.task.slice(0, 57) + '...' : l.task;
48
- printInfo(`${marker} ${l.name}`.padEnd(24), `${l.status.padEnd(8)} ${l.tmuxSession.padEnd(28)} ${taskPreview}`);
49
- }
50
- }
51
- async function handleCreate(world, opts) {
52
- printHeader(`Create lane ${opts.name} in ${world}`);
53
- const result = await callHostCpProxy('POST', world, '/lanes/create', {
54
- name: opts.name,
55
- task: opts.task,
56
- });
57
- if (!result.ok) {
58
- printError(`Create failed (HTTP ${result.status}): ${result.error}`);
59
- process.exitCode = 1;
60
- return;
61
- }
62
- const data = result.data;
63
- if (!data) {
64
- printError('Create succeeded but response body was empty');
65
- return;
66
- }
67
- printSuccess(`${data.action ?? 'created'} lane ${data.name} → ${data.tmuxSession} (${data.status})`);
68
- }
69
- async function handleDestroy(world, name) {
70
- printHeader(`Destroy lane ${name} in ${world}`);
71
- const result = await callHostCpProxy('DELETE', world, `/lanes/${encodeURIComponent(name)}`);
72
- if (!result.ok) {
73
- printError(`Destroy failed (HTTP ${result.status}): ${result.error}`);
74
- if (result.status === 404) {
75
- printInfo('Hint', 'Lane already gone? Check `olam lanes list <world>`.');
76
- }
77
- process.exitCode = 1;
78
- return;
79
- }
80
- printSuccess(`Destroyed lane ${name} (transcript retained)`);
81
- }
82
- async function handleDispatch(world, name, prompt) {
83
- printHeader(`Dispatch to lane ${name} in ${world}`);
84
- if (!prompt || prompt.trim().length === 0) {
85
- printError('prompt must be a non-empty string');
86
- process.exitCode = 1;
87
- return;
88
- }
89
- const result = await callHostCpProxy('POST', world, `/lanes/${encodeURIComponent(name)}/dispatch`, {
90
- prompt,
91
- });
92
- if (!result.ok) {
93
- printError(`Dispatch failed (HTTP ${result.status}): ${result.error}`);
94
- if (result.status === 503) {
95
- printInfo('Hint', 'Lane exists but claude is not running. Try `olam lanes destroy` then re-create.');
96
- }
97
- process.exitCode = 1;
98
- return;
99
- }
100
- printSuccess(`Dispatched to ${name} (status accepted)`);
101
- }
102
- export function registerLanes(program) {
103
- const lanes = program
104
- .command('lanes')
105
- .description('Manage claude-lane-* tmux sessions inside a running world');
106
- lanes
107
- .command('list')
108
- .description('Enumerate lanes in a world')
109
- .argument('<world>', 'World id (e.g. ember-elk-8412)')
110
- .option('--json', 'Emit machine-readable JSON instead of the text table', false)
111
- .action((world, opts) => handleList(world, opts));
112
- lanes
113
- .command('create')
114
- .description('Spawn a new claude-lane-<name> session with an initial task')
115
- .argument('<world>', 'World id')
116
- .requiredOption('--name <name>', 'Lane name (lowercase + digits + hyphens)')
117
- .requiredOption('--task <task>', 'Initial task prompt sent to the new lane')
118
- .action((world, opts) => handleCreate(world, opts));
119
- lanes
120
- .command('destroy')
121
- .description("Kill a lane's tmux session (transcript retained)")
122
- .argument('<world>', 'World id')
123
- .argument('<name>', 'Lane name')
124
- .action((world, name) => handleDestroy(world, name));
125
- lanes
126
- .command('dispatch')
127
- .description('Re-prompt an existing lane')
128
- .argument('<world>', 'World id')
129
- .argument('<name>', 'Lane name')
130
- .argument('<prompt...>', 'Prompt to send (multi-arg joined with spaces)')
131
- .action((world, name, promptParts) => handleDispatch(world, name, promptParts.join(' ')));
132
- }
133
- //# sourceMappingURL=lanes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lanes.js","sourceRoot":"","sources":["../../src/commands/lanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAWhF,KAAK,UAAU,UAAU,CAAC,KAAa,EAAE,IAAwB;IAC/D,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC7D,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CACpF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YAC3C,IA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