@synap-core/cli 1.11.0 → 1.13.0

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 (533) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -198
  3. package/dist/build-info.json +6 -0
  4. package/dist/commands/agent-run.js +3 -2
  5. package/dist/commands/agent-run.js.map +1 -1
  6. package/dist/commands/agents.d.ts +32 -17
  7. package/dist/commands/agents.js +203 -237
  8. package/dist/commands/agents.js.map +1 -1
  9. package/dist/commands/app.d.ts +143 -0
  10. package/dist/commands/app.js +524 -0
  11. package/dist/commands/app.js.map +1 -0
  12. package/dist/commands/automate.d.ts +21 -0
  13. package/dist/commands/automate.js +42 -0
  14. package/dist/commands/automate.js.map +1 -0
  15. package/dist/commands/automation-schema.test.d.ts +16 -0
  16. package/dist/commands/automation-schema.test.js +77 -0
  17. package/dist/commands/automation-schema.test.js.map +1 -0
  18. package/dist/commands/automation.d.ts +12 -0
  19. package/dist/commands/automation.js +116 -66
  20. package/dist/commands/automation.js.map +1 -1
  21. package/dist/commands/box.d.ts +42 -0
  22. package/dist/commands/box.js +89 -0
  23. package/dist/commands/box.js.map +1 -0
  24. package/dist/commands/bridge-setup.d.ts +14 -1
  25. package/dist/commands/bridge-setup.js +395 -129
  26. package/dist/commands/bridge-setup.js.map +1 -1
  27. package/dist/commands/cap-connections.d.ts +4 -4
  28. package/dist/commands/cap-connections.js +14 -14
  29. package/dist/commands/cap-connections.js.map +1 -1
  30. package/dist/commands/capability.d.ts +3 -1
  31. package/dist/commands/capability.js +249 -176
  32. package/dist/commands/capability.js.map +1 -1
  33. package/dist/commands/catalog.d.ts +275 -0
  34. package/dist/commands/catalog.js +481 -0
  35. package/dist/commands/catalog.js.map +1 -0
  36. package/dist/commands/cell.d.ts +155 -8
  37. package/dist/commands/cell.js +416 -40
  38. package/dist/commands/cell.js.map +1 -1
  39. package/dist/commands/centrality.js +1 -13
  40. package/dist/commands/centrality.js.map +1 -1
  41. package/dist/commands/close-questions.d.ts +27 -0
  42. package/dist/commands/close-questions.js +49 -0
  43. package/dist/commands/close-questions.js.map +1 -0
  44. package/dist/commands/close-questions.test.d.ts +1 -0
  45. package/dist/commands/close-questions.test.js +52 -0
  46. package/dist/commands/close-questions.test.js.map +1 -0
  47. package/dist/commands/connect.d.ts +36 -13
  48. package/dist/commands/connect.js +68 -167
  49. package/dist/commands/connect.js.map +1 -1
  50. package/dist/commands/connections.d.ts +3 -2
  51. package/dist/commands/connections.js +95 -25
  52. package/dist/commands/connections.js.map +1 -1
  53. package/dist/commands/context.js +79 -44
  54. package/dist/commands/context.js.map +1 -1
  55. package/dist/commands/data-extra.d.ts +34 -0
  56. package/dist/commands/data-extra.js +203 -25
  57. package/dist/commands/data-extra.js.map +1 -1
  58. package/dist/commands/data.d.ts +120 -2
  59. package/dist/commands/data.js +295 -21
  60. package/dist/commands/data.js.map +1 -1
  61. package/dist/commands/diagnose.d.ts +66 -4
  62. package/dist/commands/diagnose.js +285 -28
  63. package/dist/commands/diagnose.js.map +1 -1
  64. package/dist/commands/doc.d.ts +11 -4
  65. package/dist/commands/doc.js +39 -14
  66. package/dist/commands/doc.js.map +1 -1
  67. package/dist/commands/doctor.d.ts +133 -3
  68. package/dist/commands/doctor.js +761 -41
  69. package/dist/commands/doctor.js.map +1 -1
  70. package/dist/commands/explain.js +5 -5
  71. package/dist/commands/explain.js.map +1 -1
  72. package/dist/commands/hooks.d.ts +19 -0
  73. package/dist/commands/hooks.js +70 -0
  74. package/dist/commands/hooks.js.map +1 -0
  75. package/dist/commands/import.d.ts +393 -13
  76. package/dist/commands/import.js +1150 -54
  77. package/dist/commands/import.js.map +1 -1
  78. package/dist/commands/init.d.ts +34 -9
  79. package/dist/commands/init.js +481 -981
  80. package/dist/commands/init.js.map +1 -1
  81. package/dist/commands/keys.d.ts +1 -0
  82. package/dist/commands/keys.js +15 -2
  83. package/dist/commands/keys.js.map +1 -1
  84. package/dist/commands/knowledge.d.ts +22 -6
  85. package/dist/commands/knowledge.js +121 -57
  86. package/dist/commands/knowledge.js.map +1 -1
  87. package/dist/commands/lens.d.ts +37 -1
  88. package/dist/commands/lens.js +194 -72
  89. package/dist/commands/lens.js.map +1 -1
  90. package/dist/commands/market-authoring.d.ts +29 -2
  91. package/dist/commands/market-authoring.js +348 -7
  92. package/dist/commands/market-authoring.js.map +1 -1
  93. package/dist/commands/market-official.d.ts +58 -0
  94. package/dist/commands/market-official.js +84 -0
  95. package/dist/commands/market-official.js.map +1 -0
  96. package/dist/commands/market.d.ts +400 -16
  97. package/dist/commands/market.js +1802 -146
  98. package/dist/commands/market.js.map +1 -1
  99. package/dist/commands/mcp.d.ts +60 -25
  100. package/dist/commands/mcp.js +251 -64
  101. package/dist/commands/mcp.js.map +1 -1
  102. package/dist/commands/observe.category.test.d.ts +1 -0
  103. package/dist/commands/observe.category.test.js +59 -0
  104. package/dist/commands/observe.category.test.js.map +1 -0
  105. package/dist/commands/observe.d.ts +3 -0
  106. package/dist/commands/observe.js +7 -5
  107. package/dist/commands/observe.js.map +1 -1
  108. package/dist/commands/observe.title.test.d.ts +1 -0
  109. package/dist/commands/observe.title.test.js +37 -0
  110. package/dist/commands/observe.title.test.js.map +1 -0
  111. package/dist/commands/open.d.ts +39 -9
  112. package/dist/commands/open.js +80 -25
  113. package/dist/commands/open.js.map +1 -1
  114. package/dist/commands/playbook.d.ts +42 -0
  115. package/dist/commands/playbook.js +171 -0
  116. package/dist/commands/playbook.js.map +1 -0
  117. package/dist/commands/pod.js +1 -1
  118. package/dist/commands/pod.js.map +1 -1
  119. package/dist/commands/pods.d.ts +11 -1
  120. package/dist/commands/pods.js +129 -131
  121. package/dist/commands/pods.js.map +1 -1
  122. package/dist/commands/proposals-actions.d.ts +62 -0
  123. package/dist/commands/proposals-actions.js +143 -8
  124. package/dist/commands/proposals-actions.js.map +1 -1
  125. package/dist/commands/proposals-await.d.ts +68 -0
  126. package/dist/commands/proposals-await.js +248 -0
  127. package/dist/commands/proposals-await.js.map +1 -0
  128. package/dist/commands/proton-setup.d.ts +73 -0
  129. package/dist/commands/proton-setup.js +579 -0
  130. package/dist/commands/proton-setup.js.map +1 -0
  131. package/dist/commands/providers.d.ts +23 -0
  132. package/dist/commands/providers.js +126 -1
  133. package/dist/commands/providers.js.map +1 -1
  134. package/dist/commands/raycast.js +6 -2
  135. package/dist/commands/raycast.js.map +1 -1
  136. package/dist/commands/rule.d.ts +150 -0
  137. package/dist/commands/rule.js +447 -0
  138. package/dist/commands/rule.js.map +1 -0
  139. package/dist/commands/session-feed-wait.d.ts +48 -0
  140. package/dist/commands/session-feed-wait.js +261 -0
  141. package/dist/commands/session-feed-wait.js.map +1 -0
  142. package/dist/commands/session-post.d.ts +40 -0
  143. package/dist/commands/session-post.js +96 -0
  144. package/dist/commands/session-post.js.map +1 -0
  145. package/dist/commands/session-wait.d.ts +116 -0
  146. package/dist/commands/session-wait.js +224 -0
  147. package/dist/commands/session-wait.js.map +1 -0
  148. package/dist/commands/sessions.d.ts +54 -0
  149. package/dist/commands/sessions.js +501 -58
  150. package/dist/commands/sessions.js.map +1 -1
  151. package/dist/commands/skill-manage.d.ts +21 -0
  152. package/dist/commands/skill-manage.js +136 -19
  153. package/dist/commands/skill-manage.js.map +1 -1
  154. package/dist/commands/skills-commands.d.ts +2 -0
  155. package/dist/commands/skills-commands.js +9 -1
  156. package/dist/commands/skills-commands.js.map +1 -1
  157. package/dist/commands/skills-commands.test.d.ts +1 -0
  158. package/dist/commands/skills-commands.test.js +57 -0
  159. package/dist/commands/skills-commands.test.js.map +1 -0
  160. package/dist/commands/skills.js +16 -0
  161. package/dist/commands/skills.js.map +1 -1
  162. package/dist/commands/status.d.ts +1 -4
  163. package/dist/commands/status.js +6 -35
  164. package/dist/commands/status.js.map +1 -1
  165. package/dist/commands/statusline.backoff.test.d.ts +13 -0
  166. package/dist/commands/statusline.backoff.test.js +100 -0
  167. package/dist/commands/statusline.backoff.test.js.map +1 -0
  168. package/dist/commands/statusline.js +16 -9
  169. package/dist/commands/statusline.js.map +1 -1
  170. package/dist/commands/sync-status.d.ts +12 -0
  171. package/dist/commands/sync-status.js +125 -0
  172. package/dist/commands/sync-status.js.map +1 -0
  173. package/dist/commands/templates-retire.d.ts +34 -0
  174. package/dist/commands/templates-retire.js +192 -0
  175. package/dist/commands/templates-retire.js.map +1 -0
  176. package/dist/commands/tools.js +6 -21
  177. package/dist/commands/tools.js.map +1 -1
  178. package/dist/commands/tracks.d.ts +112 -0
  179. package/dist/commands/tracks.js +543 -0
  180. package/dist/commands/tracks.js.map +1 -0
  181. package/dist/commands/update.d.ts +3 -11
  182. package/dist/commands/update.js +5 -134
  183. package/dist/commands/update.js.map +1 -1
  184. package/dist/commands/upload.d.ts +41 -3
  185. package/dist/commands/upload.js +120 -18
  186. package/dist/commands/upload.js.map +1 -1
  187. package/dist/commands/vendor.d.ts +28 -0
  188. package/dist/commands/vendor.js +110 -0
  189. package/dist/commands/vendor.js.map +1 -0
  190. package/dist/commands/versions.js +6 -0
  191. package/dist/commands/versions.js.map +1 -1
  192. package/dist/commands/view.js +10 -5
  193. package/dist/commands/view.js.map +1 -1
  194. package/dist/commands/whoami.d.ts +30 -3
  195. package/dist/commands/whoami.js +186 -23
  196. package/dist/commands/whoami.js.map +1 -1
  197. package/dist/commands/worker-accounts.d.ts +149 -0
  198. package/dist/commands/worker-accounts.js +339 -0
  199. package/dist/commands/worker-accounts.js.map +1 -0
  200. package/dist/commands/worker-accounts.test.d.ts +1 -0
  201. package/dist/commands/worker-accounts.test.js +224 -0
  202. package/dist/commands/worker-accounts.test.js.map +1 -0
  203. package/dist/commands/worker.d.ts +331 -0
  204. package/dist/commands/worker.js +1067 -0
  205. package/dist/commands/worker.js.map +1 -0
  206. package/dist/commands/worker.test.d.ts +1 -0
  207. package/dist/commands/worker.test.js +427 -0
  208. package/dist/commands/worker.test.js.map +1 -0
  209. package/dist/commands/workspace-ops.d.ts +35 -0
  210. package/dist/commands/workspace-ops.js +153 -0
  211. package/dist/commands/workspace-ops.js.map +1 -0
  212. package/dist/index.d.ts +6 -6
  213. package/dist/index.js +1043 -186
  214. package/dist/index.js.map +1 -1
  215. package/dist/lib/agent-connections.d.ts +31 -0
  216. package/dist/lib/agent-connections.js +33 -0
  217. package/dist/lib/agent-connections.js.map +1 -0
  218. package/dist/lib/agent-detect.d.ts +27 -0
  219. package/dist/lib/agent-detect.js +71 -0
  220. package/dist/lib/agent-detect.js.map +1 -0
  221. package/dist/lib/agent-door.d.ts +136 -0
  222. package/dist/lib/agent-door.js +429 -0
  223. package/dist/lib/agent-door.js.map +1 -0
  224. package/dist/lib/agents-config.d.ts +2 -0
  225. package/dist/lib/agents-config.js +4 -9
  226. package/dist/lib/agents-config.js.map +1 -1
  227. package/dist/lib/approval-poll.d.ts +31 -2
  228. package/dist/lib/approval-poll.js +20 -7
  229. package/dist/lib/approval-poll.js.map +1 -1
  230. package/dist/lib/atomic-file.d.ts +48 -0
  231. package/dist/lib/atomic-file.js +129 -0
  232. package/dist/lib/atomic-file.js.map +1 -0
  233. package/dist/lib/auth.d.ts +17 -11
  234. package/dist/lib/auth.js +47 -64
  235. package/dist/lib/auth.js.map +1 -1
  236. package/dist/lib/batch-approval.d.ts +85 -0
  237. package/dist/lib/batch-approval.js +170 -0
  238. package/dist/lib/batch-approval.js.map +1 -0
  239. package/dist/lib/box/egress.d.ts +82 -0
  240. package/dist/lib/box/egress.js +264 -0
  241. package/dist/lib/box/egress.js.map +1 -0
  242. package/dist/lib/box/evidence.d.ts +86 -0
  243. package/dist/lib/box/evidence.js +121 -0
  244. package/dist/lib/box/evidence.js.map +1 -0
  245. package/dist/lib/box/job-server.d.ts +72 -0
  246. package/dist/lib/box/job-server.js +246 -0
  247. package/dist/lib/box/job-server.js.map +1 -0
  248. package/dist/lib/box/provisioner.d.ts +83 -0
  249. package/dist/lib/box/provisioner.js +312 -0
  250. package/dist/lib/box/provisioner.js.map +1 -0
  251. package/dist/lib/box/proxmox.d.ts +112 -0
  252. package/dist/lib/box/proxmox.js +211 -0
  253. package/dist/lib/box/proxmox.js.map +1 -0
  254. package/dist/lib/box/wire.d.ts +98 -0
  255. package/dist/lib/box/wire.js +70 -0
  256. package/dist/lib/box/wire.js.map +1 -0
  257. package/dist/lib/capture-lane.d.ts +6 -5
  258. package/dist/lib/capture-lane.js +6 -5
  259. package/dist/lib/capture-lane.js.map +1 -1
  260. package/dist/lib/capture-structure.d.ts +230 -11
  261. package/dist/lib/capture-structure.js +251 -13
  262. package/dist/lib/capture-structure.js.map +1 -1
  263. package/dist/lib/catalog-templates.d.ts +59 -0
  264. package/dist/lib/catalog-templates.js +126 -0
  265. package/dist/lib/catalog-templates.js.map +1 -0
  266. package/dist/lib/cli-build.d.ts +19 -0
  267. package/dist/lib/cli-build.js +37 -0
  268. package/dist/lib/cli-build.js.map +1 -0
  269. package/dist/lib/client-header.test.d.ts +1 -0
  270. package/dist/lib/client-header.test.js +85 -0
  271. package/dist/lib/client-header.test.js.map +1 -0
  272. package/dist/lib/conversation-headers.d.ts +33 -0
  273. package/dist/lib/conversation-headers.js +69 -0
  274. package/dist/lib/conversation-headers.js.map +1 -0
  275. package/dist/lib/cp-packages.d.ts +167 -11
  276. package/dist/lib/cp-packages.js +253 -21
  277. package/dist/lib/cp-packages.js.map +1 -1
  278. package/dist/lib/credential-class.d.ts +144 -0
  279. package/dist/lib/credential-class.js +138 -0
  280. package/dist/lib/credential-class.js.map +1 -0
  281. package/dist/lib/describe-lens.d.ts +35 -0
  282. package/dist/lib/describe-lens.js +40 -0
  283. package/dist/lib/describe-lens.js.map +1 -1
  284. package/dist/lib/device-connect.d.ts +125 -0
  285. package/dist/lib/device-connect.js +256 -0
  286. package/dist/lib/device-connect.js.map +1 -0
  287. package/dist/lib/directory-lens.d.ts +99 -0
  288. package/dist/lib/directory-lens.js +187 -0
  289. package/dist/lib/directory-lens.js.map +1 -0
  290. package/dist/lib/exporter-coverage.d.ts +71 -0
  291. package/dist/lib/exporter-coverage.js +97 -0
  292. package/dist/lib/exporter-coverage.js.map +1 -0
  293. package/dist/lib/goal-words.d.ts +38 -0
  294. package/dist/lib/goal-words.js +112 -0
  295. package/dist/lib/goal-words.js.map +1 -0
  296. package/dist/lib/hub-client.d.ts +57 -15
  297. package/dist/lib/hub-client.js +396 -82
  298. package/dist/lib/hub-client.js.map +1 -1
  299. package/dist/lib/init-connect.d.ts +41 -0
  300. package/dist/lib/init-connect.js +75 -0
  301. package/dist/lib/init-connect.js.map +1 -0
  302. package/dist/lib/init-exit.d.ts +24 -0
  303. package/dist/lib/init-exit.js +41 -0
  304. package/dist/lib/init-exit.js.map +1 -0
  305. package/dist/lib/init-flow.d.ts +25 -0
  306. package/dist/lib/init-flow.js +40 -0
  307. package/dist/lib/init-flow.js.map +1 -0
  308. package/dist/lib/init-handoff.d.ts +24 -0
  309. package/dist/lib/init-handoff.js +26 -0
  310. package/dist/lib/init-handoff.js.map +1 -0
  311. package/dist/lib/init-output.d.ts +18 -0
  312. package/dist/lib/init-output.js +43 -0
  313. package/dist/lib/init-output.js.map +1 -0
  314. package/dist/lib/init-pod.d.ts +45 -0
  315. package/dist/lib/init-pod.js +36 -0
  316. package/dist/lib/init-pod.js.map +1 -0
  317. package/dist/lib/installed.d.ts +210 -11
  318. package/dist/lib/installed.js +234 -36
  319. package/dist/lib/installed.js.map +1 -1
  320. package/dist/lib/key-approval.d.ts +57 -0
  321. package/dist/lib/key-approval.js +117 -0
  322. package/dist/lib/key-approval.js.map +1 -0
  323. package/dist/lib/key-diagnosis.d.ts +56 -0
  324. package/dist/lib/key-diagnosis.js +227 -0
  325. package/dist/lib/key-diagnosis.js.map +1 -0
  326. package/dist/lib/key-doctor.d.ts +136 -0
  327. package/dist/lib/key-doctor.js +286 -0
  328. package/dist/lib/key-doctor.js.map +1 -0
  329. package/dist/lib/key-locations.d.ts +120 -0
  330. package/dist/lib/key-locations.js +326 -0
  331. package/dist/lib/key-locations.js.map +1 -0
  332. package/dist/lib/key-source.d.ts +68 -0
  333. package/dist/lib/key-source.js +109 -0
  334. package/dist/lib/key-source.js.map +1 -0
  335. package/dist/lib/key-state.d.ts +70 -0
  336. package/dist/lib/key-state.js +115 -0
  337. package/dist/lib/key-state.js.map +1 -0
  338. package/dist/lib/kind-package.d.ts +181 -0
  339. package/dist/lib/kind-package.js +679 -0
  340. package/dist/lib/kind-package.js.map +1 -0
  341. package/dist/lib/knowledge-title.d.ts +25 -0
  342. package/dist/lib/knowledge-title.js +47 -0
  343. package/dist/lib/knowledge-title.js.map +1 -0
  344. package/dist/lib/knowledge-title.test.d.ts +1 -0
  345. package/dist/lib/knowledge-title.test.js +34 -0
  346. package/dist/lib/knowledge-title.test.js.map +1 -0
  347. package/dist/lib/machine-instance.d.ts +64 -0
  348. package/dist/lib/machine-instance.js +142 -0
  349. package/dist/lib/machine-instance.js.map +1 -0
  350. package/dist/lib/mcp-bridge.d.ts +49 -0
  351. package/dist/lib/mcp-bridge.js +180 -0
  352. package/dist/lib/mcp-bridge.js.map +1 -0
  353. package/dist/lib/mcp-bridge.test.d.ts +1 -0
  354. package/dist/lib/mcp-bridge.test.js +118 -0
  355. package/dist/lib/mcp-bridge.test.js.map +1 -0
  356. package/dist/lib/mcp-call.d.ts +30 -0
  357. package/dist/lib/mcp-call.js +107 -0
  358. package/dist/lib/mcp-call.js.map +1 -0
  359. package/dist/lib/mcp-snippets.d.ts +53 -0
  360. package/dist/lib/mcp-snippets.js +82 -0
  361. package/dist/lib/mcp-snippets.js.map +1 -0
  362. package/dist/lib/next-steps.d.ts +8 -0
  363. package/dist/lib/next-steps.js +31 -1
  364. package/dist/lib/next-steps.js.map +1 -1
  365. package/dist/lib/openclaw.js +3 -2
  366. package/dist/lib/openclaw.js.map +1 -1
  367. package/dist/lib/package-wire.d.ts +179 -0
  368. package/dist/lib/package-wire.js +68 -0
  369. package/dist/lib/package-wire.js.map +1 -0
  370. package/dist/lib/pair-link.d.ts +38 -0
  371. package/dist/lib/pair-link.js +68 -0
  372. package/dist/lib/pair-link.js.map +1 -0
  373. package/dist/lib/pod-moved.d.ts +70 -0
  374. package/dist/lib/pod-moved.js +146 -0
  375. package/dist/lib/pod-moved.js.map +1 -0
  376. package/dist/lib/pod-reach.d.ts +39 -0
  377. package/dist/lib/pod-reach.js +117 -0
  378. package/dist/lib/pod-reach.js.map +1 -0
  379. package/dist/lib/pod-reach.test.d.ts +1 -0
  380. package/dist/lib/pod-reach.test.js +67 -0
  381. package/dist/lib/pod-reach.test.js.map +1 -0
  382. package/dist/lib/pod-wide.d.ts +40 -0
  383. package/dist/lib/pod-wide.js +46 -0
  384. package/dist/lib/pod-wide.js.map +1 -0
  385. package/dist/lib/pod.d.ts +74 -112
  386. package/dist/lib/pod.js +146 -415
  387. package/dist/lib/pod.js.map +1 -1
  388. package/dist/lib/project-ref.d.ts +9 -3
  389. package/dist/lib/project-ref.js +10 -4
  390. package/dist/lib/project-ref.js.map +1 -1
  391. package/dist/lib/register-claude-code-mcp.test.d.ts +1 -0
  392. package/dist/lib/register-claude-code-mcp.test.js +78 -0
  393. package/dist/lib/register-claude-code-mcp.test.js.map +1 -0
  394. package/dist/lib/review-credential.d.ts +119 -0
  395. package/dist/lib/review-credential.js +149 -0
  396. package/dist/lib/review-credential.js.map +1 -0
  397. package/dist/lib/safe-open.d.ts +49 -0
  398. package/dist/lib/safe-open.js +119 -0
  399. package/dist/lib/safe-open.js.map +1 -0
  400. package/dist/lib/session-feed.d.ts +185 -0
  401. package/dist/lib/session-feed.js +257 -0
  402. package/dist/lib/session-feed.js.map +1 -0
  403. package/dist/lib/session-lens.d.ts +40 -1
  404. package/dist/lib/session-lens.js +54 -4
  405. package/dist/lib/session-lens.js.map +1 -1
  406. package/dist/lib/superwhisper-import.d.ts +8 -0
  407. package/dist/lib/superwhisper-import.js +14 -7
  408. package/dist/lib/superwhisper-import.js.map +1 -1
  409. package/dist/lib/superwhisper-title.test.d.ts +1 -0
  410. package/dist/lib/superwhisper-title.test.js +18 -0
  411. package/dist/lib/superwhisper-title.test.js.map +1 -0
  412. package/dist/lib/targets.d.ts +152 -10
  413. package/dist/lib/targets.js +974 -325
  414. package/dist/lib/targets.js.map +1 -1
  415. package/dist/lib/template-file.d.ts +4 -0
  416. package/dist/lib/template-file.js.map +1 -1
  417. package/dist/lib/template-lifecycle.d.ts +217 -0
  418. package/dist/lib/template-lifecycle.js +433 -0
  419. package/dist/lib/template-lifecycle.js.map +1 -0
  420. package/dist/lib/template-steps.d.ts +88 -0
  421. package/dist/lib/template-steps.js +118 -0
  422. package/dist/lib/template-steps.js.map +1 -0
  423. package/dist/lib/time-ago.d.ts +2 -0
  424. package/dist/lib/time-ago.js +15 -0
  425. package/dist/lib/time-ago.js.map +1 -0
  426. package/dist/lib/wake-hook-settings.d.ts +57 -0
  427. package/dist/lib/wake-hook-settings.js +153 -0
  428. package/dist/lib/wake-hook-settings.js.map +1 -0
  429. package/dist/lib/wake-state.d.ts +65 -0
  430. package/dist/lib/wake-state.js +122 -0
  431. package/dist/lib/wake-state.js.map +1 -0
  432. package/dist/utils/logger.js +5 -2
  433. package/dist/utils/logger.js.map +1 -1
  434. package/package.json +26 -17
  435. package/skills/README.md +13 -11
  436. package/skills/agent-os/SKILL.md +214 -99
  437. package/skills/manifest.json +1 -1
  438. package/skills/onboard/SKILL.md +55 -26
  439. package/skills/synap/README.md +5 -8
  440. package/skills/synap/SKILL.md +1149 -289
  441. package/skills/synap/_order.txt +7 -0
  442. package/skills/synap/_skill.yaml +1 -1
  443. package/skills/synap/automations.md +15 -0
  444. package/skills/synap/capture.md +5 -0
  445. package/skills/synap/cli-operations.md +24 -18
  446. package/skills/synap/code-skills.md +70 -0
  447. package/skills/synap/concepts.md +36 -0
  448. package/skills/synap/content-os.md +10 -1
  449. package/skills/synap/creative-loop.md +15 -10
  450. package/skills/synap/crm.md +21 -52
  451. package/skills/synap/document-embeds.md +143 -47
  452. package/skills/synap/escalation-ladder.md +20 -10
  453. package/skills/synap/focus-sessions.md +56 -21
  454. package/skills/synap/from-intent.md +158 -0
  455. package/skills/synap/governance-rules.md +5 -5
  456. package/skills/synap/governance.md +10 -7
  457. package/skills/synap/hand-off.md +33 -0
  458. package/skills/synap/inline-patterns.md +15 -7
  459. package/skills/synap/lenses.md +34 -16
  460. package/skills/synap/linking.md +42 -41
  461. package/skills/synap/mcp-remote-servers.md +64 -0
  462. package/skills/synap/mental-model.md +17 -15
  463. package/skills/synap/operating-mode-rules.md +2 -2
  464. package/skills/synap/processes.md +118 -0
  465. package/skills/synap/quick-reference.md +7 -2
  466. package/skills/synap/reading.md +3 -1
  467. package/skills/synap/reflexes.md +12 -42
  468. package/skills/synap/viewframe-cells.md +38 -5
  469. package/skills/synap/work-flow.md +1 -1
  470. package/skills/synap/work-model.md +110 -0
  471. package/skills/synap/worked-examples.md +4 -5
  472. package/skills/synap/workspace-design.md +15 -11
  473. package/skills/synap/writes.md +105 -25
  474. package/skills/synap/writing-titles.md +63 -0
  475. package/skills/synap-app/SKILL.md +149 -67
  476. package/skills/synap-app/_skill.yaml +1 -1
  477. package/skills/synap-app/creating-the-base-app.md +12 -7
  478. package/skills/synap-app/governance.md +27 -16
  479. package/skills/synap-app/install-commands.md +18 -9
  480. package/skills/synap-app/overview.md +16 -9
  481. package/skills/synap-app/using-the-sdk.md +75 -25
  482. package/skills/synap-design/SKILL.md +474 -0
  483. package/skills/synap-design/_order.txt +4 -0
  484. package/skills/synap-design/_skill.yaml +21 -0
  485. package/skills/synap-design/loop.md +134 -0
  486. package/skills/synap-design/overview.md +44 -0
  487. package/skills/synap-design/principles.md +130 -0
  488. package/skills/synap-design/system.md +133 -0
  489. package/skills/synap-market/SKILL.md +306 -16
  490. package/skills/synap-market/_skill.yaml +1 -1
  491. package/skills/synap-market/author-and-publish.md +145 -8
  492. package/skills/synap-market/governance-and-catalog.md +7 -0
  493. package/skills/synap-market/install.md +79 -1
  494. package/skills/synap-market/overview.md +74 -6
  495. package/skills/synap-schema/SKILL.md +172 -10
  496. package/skills/synap-schema/_order.txt +2 -0
  497. package/skills/synap-schema/_skill.yaml +4 -2
  498. package/skills/synap-schema/common-mistakes.md +4 -2
  499. package/skills/synap-schema/discover-profiles.md +1 -1
  500. package/skills/synap-schema/entity-scope.md +15 -3
  501. package/skills/synap-schema/extend-first.md +29 -0
  502. package/skills/synap-schema/extend-vs-create.md +1 -1
  503. package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
  504. package/skills/synap-schema/property-types.md +1 -1
  505. package/skills/synap-schema/relations.md +1 -1
  506. package/skills/synap-ui/SKILL.md +19 -12
  507. package/skills/synap-ui/_skill.yaml +1 -1
  508. package/skills/synap-ui/ai-companion.md +1 -1
  509. package/skills/synap-ui/arranging-bento.md +2 -0
  510. package/skills/synap-ui/bento-layouts.md +10 -10
  511. package/skills/synap-ui/bento-recipes.md +313 -543
  512. package/skills/synap-ui/four-builds.md +5 -0
  513. package/skills/synap-ui/view-types.md +2 -2
  514. package/skills/synap-ui/widget-catalog.md +22 -278
  515. package/templates/automations/bookmark-enrichment.automation.json +290 -13
  516. package/templates/automations/url-bookmark-capture.automation.json +73 -11
  517. package/templates/box/runner.py +206 -0
  518. package/templates/skills/authoring-playbooks/SKILL.md +6 -3
  519. package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
  520. package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
  521. package/dist/commands/infra.d.ts +0 -21
  522. package/dist/commands/infra.js +0 -262
  523. package/dist/commands/infra.js.map +0 -1
  524. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
  525. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
  526. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
  527. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
  528. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  529. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
  530. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  531. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
  532. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
  533. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
@@ -23,7 +23,9 @@
23
23
  */
24
24
  import { type CatalogEntry, type TemplateUpdateCheck } from "@synap-core/workspace-templates";
25
25
  import { type PackageFilters, type TierInfo } from "../lib/cp-packages.js";
26
- import { type InstalledTemplateInfo } from "../lib/installed.js";
26
+ import { type InstalledKind, type InstalledRow, type InstalledTemplateInfo, type WorkspaceAttachment } from "../lib/installed.js";
27
+ import { type TemplateUpdateStep } from "../lib/template-steps.js";
28
+ import { type PendingDataChanges } from "../lib/template-lifecycle.js";
27
29
  export interface MarketCatalog {
28
30
  entries: CatalogEntry[];
29
31
  tierBySlug: Map<string, TierInfo>;
@@ -44,6 +46,8 @@ export interface MarketCatalog {
44
46
  */
45
47
  remoteVersionBySlug: Map<string, string>;
46
48
  }
49
+ /** Drop workspace entries whose slug the CP retired. `null` (unknown) keeps every entry. */
50
+ export declare function dropRetiredWorkspaces(entries: CatalogEntry[], retiredSlugs: Set<string> | null): CatalogEntry[];
47
51
  /**
48
52
  * Assemble the market catalog: bundled workspace templates ∪ public CP browse
49
53
  * (all types) ∪ the caller's own packages (when logged in), through the shared
@@ -52,9 +56,19 @@ export interface MarketCatalog {
52
56
  * the CP browse route (which needs no auth).
53
57
  */
54
58
  export declare function buildMarketCatalog(filters?: PackageFilters): Promise<MarketCatalog>;
55
- /** The `kind` values the pod's `market.install` verb provisions (see
56
- * cp-catalog-sync.ts `CatalogKind`). */
57
- export type MarketInstallKind = "capability" | "automation" | "template" | "cell";
59
+ /**
60
+ * The `kind` values the pod's `market.install` verb provisions.
61
+ *
62
+ * SSOT: the `kind` zod enum of `marketInstallParams` in
63
+ * `synap-backend/packages/api/src/services/capabilities/builtin-verbs.ts`
64
+ * (each arm implemented in `marketplace-install.ts`). This list is a
65
+ * hand-maintained copy — `test/market-install-kind.test.ts` pins it against a
66
+ * copy of that enum so a widening on the pod cannot silently leave the CLI
67
+ * refusing a kind the verb accepts (which is exactly how `view` and `skill`
68
+ * became uninstallable from the CLI).
69
+ */
70
+ export declare const MARKET_INSTALL_KINDS: readonly ["capability", "automation", "template", "cell", "skill", "view"];
71
+ export type MarketInstallKind = (typeof MARKET_INSTALL_KINDS)[number];
58
72
  /**
59
73
  * Map a CP package `category` (what {@link typeOf} returns) → the pod
60
74
  * `market.install` verb's `kind` vocabulary, or `null` when the verb can't
@@ -66,6 +80,39 @@ export type MarketInstallKind = "capability" | "automation" | "template" | "cell
66
80
  * row already speaking the pod's cache vocabulary still resolves.
67
81
  */
68
82
  export declare function marketInstallKind(type: string): MarketInstallKind | null;
83
+ /**
84
+ * Kinds whose `market.install` arm HARD-REQUIRES an acting workspace and 400s
85
+ * without one (`marketplace-install.ts`): an automation is added TO a workspace,
86
+ * and a view package needs a workspace to place its views in. Every other kind
87
+ * (capability / cell / skill) lands pod-wide — that branch is deliberate, so
88
+ * they must NOT be added here.
89
+ */
90
+ export declare function marketInstallNeedsWorkspace(kind: MarketInstallKind): boolean;
91
+ /** One per-item result of a kind:automation market.install (marketplace-install.ts). */
92
+ export type ItemInstallResult = {
93
+ name?: string;
94
+ status?: string;
95
+ message?: string;
96
+ };
97
+ /**
98
+ * Classify the PER-ITEM results of a kind:automation (workflow) install.
99
+ *
100
+ * The backend `market.install` automation case installs each automation under
101
+ * its own try/catch (per-item isolation), so the verb can report the overall
102
+ * install as `{status:"installed"}` while individual items are
103
+ * `{status:"error"}`. The CLI must inspect these before printing success — a
104
+ * bare "✓ Installed" is a lie when every item errored (the false-success bug).
105
+ *
106
+ * Returns null for any outcome that carries NO per-item array (cell, skill,
107
+ * workspace, …) so the caller falls through to the unchanged success line.
108
+ * Reads `automations[]` (the automation kind's field) or a generic `results[]`.
109
+ */
110
+ export declare function summarizeItemInstall(installed: Record<string, unknown>): {
111
+ created: number;
112
+ reused: number;
113
+ errored: ItemInstallResult[];
114
+ okCount: number;
115
+ } | null;
69
116
  interface DependencySeedOutcome {
70
117
  slug: string;
71
118
  status: "no-layers" | "seeded" | "failed";
@@ -96,13 +143,92 @@ export interface WorkspaceApplyResult {
96
143
  workspaceId?: string;
97
144
  onto?: string;
98
145
  outcome?: "created" | "reconciled" | "unchanged";
146
+ /**
147
+ * Per-layer install outcomes, `status.conditions[]`-shaped, added pod-side on
148
+ * 2026-09-06 (`services/capabilities/install-layers.ts`).
149
+ *
150
+ * The pod already KNEW when a workspace landed but its capabilities,
151
+ * playbooks or automations did not — `applyPackagePostWorkspace` stamps the
152
+ * failure into `workspace.settings` — but `createFromDefinition` swallowed the
153
+ * rethrow and returned a clean report, so this CLI printed a bare
154
+ * "✓ Installed" for an install whose every capability had failed. Projecting
155
+ * the failure without reading it here would just move the lie one layer out.
156
+ *
157
+ * OPTIONAL because an older pod does not send it. Absent means "this pod
158
+ * cannot tell me", NOT "nothing failed" — so absence never downgrades the
159
+ * verdict, and the pre-existing `seedFailed` signal remains the fallback.
160
+ */
161
+ layers?: InstallLayerReport[];
99
162
  }
163
+ /**
164
+ * One install layer's outcome, as the pod reports it.
165
+ *
166
+ * ⚠️ The failure text field is `message`, NOT `detail`. The pod's SSOT
167
+ * (`InstallLayerReport` in `@synap/database`'s
168
+ * `reconcile-workspace-from-definition.ts`) declares `message`, and all four
169
+ * producers write it — `summarizePostWorkspaceLayers`
170
+ * (`services/capabilities/install-layers.ts`, the ONE derivation) plus the three
171
+ * hand-pushed failed layers in `routers/workspaces/definition-engine.ts`. This
172
+ * mirror declared `detail`, a field the wire never carries — so `printLayerOutcomes`
173
+ * printed "no detail reported" on EVERY failed layer, and because the mirror is
174
+ * local, tsc could never see the drift.
175
+ */
176
+ export interface InstallLayerReport {
177
+ layer?: string;
178
+ status?: string;
179
+ message?: string;
180
+ }
181
+ /**
182
+ * True when the pod reported a FAILED install layer.
183
+ *
184
+ * Reads `status` explicitly rather than inferring failure from the absence of a
185
+ * success marker: an unrecognised status is not a failure, and an absent
186
+ * `layers` array is not a success. Both are simply "not a reported failure",
187
+ * which is what the pre-existing `seedFailed` path already covers.
188
+ */
189
+ export declare function hasLayerFailure(layers: InstallLayerReport[] | undefined): boolean;
190
+ /**
191
+ * Print an honest per-dependency seed summary — no more silent "✓ ready" when
192
+ * a dependency's capabilities/playbooks failed to seed. Prefers the top-level
193
+ * `seedSummary` rollup when present (pre-aggregated by the backend); falls
194
+ * back to re-deriving from the per-dependency `dependencies[]` array on older
195
+ * pod builds. No-op when there's nothing to report.
196
+ */
197
+ /**
198
+ * Name the install layers the pod reported as FAILED.
199
+ *
200
+ * The verdict line already says "some capabilities failed"; without
201
+ * this the user is told something failed and never which thing — the same
202
+ * complaint that made `install-layers.ts` fall back from `name` to `key`.
203
+ * Silent when the pod sent no layers (an older pod) or none failed.
204
+ */
205
+ export declare function printLayerOutcomes(layers: InstallLayerReport[] | undefined): void;
100
206
  export interface ApplyVerdict {
101
207
  /** Honest coarse status — JSON consumers should branch on this, never guess from `workspace.outcome` alone. */
102
- status: "installed" | "installed-with-failures" | "updated" | "updated-with-failures" | "unchanged" | "composed" | "composed-with-failures" | "stamp-contradiction" | "legacy-unknown" | "no-workspace";
103
- /** Non-fatal warnings — a stamp contradiction or a compose-overlay note. Seed failures are reported separately via `printSeedOutcomes`. */
208
+ status: "installed" | "installed-with-failures" | "updated" | "updated-with-failures" | "unchanged" | "composed" | "composed-with-failures" | "not-finished" | "awaiting-approval" | "stamp-contradiction" | "legacy-unknown" | "no-workspace";
209
+ /** Non-fatal warnings — a stamp contradiction, a compose-overlay note, or the next step of an unfinished apply. Seed failures are reported separately via `printSeedOutcomes`. */
104
210
  warnings: string[];
105
211
  }
212
+ /**
213
+ * How far the pod says layer 2 got, read from the `/packages/apply` response
214
+ * (synap-backend `hub-protocol/rest/packages.ts`): a thrown layer 2 arrives as
215
+ * `layer2: {status: "failed"}`, an unconverged one as the `templateApply`
216
+ * record, and either way the pod's sentence as `templateApplyWarning`.
217
+ * `null` = the pod reported nothing unfinished (converged, or an older pod).
218
+ */
219
+ export declare function podApplyState(res: Record<string, unknown>): "not-finished" | "awaiting-approval" | null;
220
+ /**
221
+ * The verdict of one `/packages/apply` response — the ONE reader both
222
+ * `marketInstall` and `applyOnePackage` call. Layer 2's outcome comes from the
223
+ * pod's own state (`podApplyState`): an apply the pod says is unfinished is
224
+ * never "updated", and never a stamp contradiction (the pod held the version
225
+ * on purpose — redeploying fixes nothing).
226
+ */
227
+ export declare function classifyApplyResponse(entry: CatalogEntry, res: Record<string, unknown>, ctx: {
228
+ remoteVersionSent?: string;
229
+ wasUnstamped: boolean;
230
+ stampVerified?: boolean | null;
231
+ }): ApplyVerdict;
106
232
  /**
107
233
  * Classify one `/packages/apply` response into the honest verdict both
108
234
  * `marketInstall` and `applyOnePackage` print (and both put in `--json`).
@@ -114,7 +240,32 @@ export interface ApplyVerdict {
114
240
  export declare function classifyApplyResult(entry: CatalogEntry, ws: WorkspaceApplyResult | undefined, dependencies: ResolvedDependencyLike[] | undefined, seedSummary: SeedSummary | undefined, ctx: {
115
241
  remoteVersionSent?: string;
116
242
  wasUnstamped: boolean;
243
+ stampVerified?: boolean | null;
244
+ /** The pod HELD the version on purpose (`templateApply` in the response): not a contradiction. */
245
+ stampHeld?: boolean;
117
246
  }): ApplyVerdict;
247
+ /**
248
+ * An action button the template places on a record page, held back because the
249
+ * playbook (or automation) it launches is waiting on a proposal — the pod's
250
+ * `actionPlacements.deferred[]` on `/packages/apply`. The button appears on the
251
+ * next update once that proposal is approved.
252
+ */
253
+ export interface DeferredPlacement {
254
+ kind?: string;
255
+ ref?: string;
256
+ label?: string;
257
+ proposalId?: string;
258
+ }
259
+ /** One plain line per deferred placement; `[]` when none (or an older pod). */
260
+ export declare function deferredPlacementLines(res: Record<string, unknown>): string[];
261
+ /**
262
+ * Why the pod did NOT record the template version — the pod's ONE sentence
263
+ * (`templateApplyWarning` on the `/packages/apply` response, synap-backend
264
+ * `templateApplyWarning`): the same words `synap templates` keeps showing under
265
+ * the space. Printed verbatim; `null` when the version was recorded (or an
266
+ * older pod that does not say).
267
+ */
268
+ export declare function heldVersionLine(res: Record<string, unknown>): string | null;
118
269
  /** Render a `classifyApplyResult` verdict — the ONE honest-text door for both `marketInstall` and `applyOnePackage`. */
119
270
  export declare function printApplyVerdict(entry: CatalogEntry, verdict: ApplyVerdict): void;
120
271
  export declare function market(opts: {
@@ -133,7 +284,39 @@ export declare function marketInstall(slug: string, opts: {
133
284
  onto?: string;
134
285
  /** Preview the create path write-free (`/packages/preflight`) — reports would-create / reuse / conflicts and writes nothing. */
135
286
  dryRun?: boolean;
287
+ /** Acting workspace (UUID) an `automation`/`workflow` install is added TO — the
288
+ * backend `market.install` verb requires one for that kind (an automation
289
+ * lives in a workspace). Defaults to the active lens (`synap use` / env); a
290
+ * pod-wide kind (cell/capability) ignores it. */
291
+ workspace?: string;
136
292
  }): Promise<void>;
293
+ /** The definition a workspace install sends, and the version label it carries. */
294
+ export interface InstallPayload {
295
+ pkg: Record<string, unknown>;
296
+ /** Where `pkg` came from. */
297
+ from: "catalog" | "bundle";
298
+ /**
299
+ * The CATALOG version, set ONLY when `pkg` is that catalog row's own
300
+ * definition — the one value the CLI may expect the pod to stamp. Never set
301
+ * for a bundled definition (incident 2026-10-06: the bundle's OLD content-os
302
+ * went out labelled with the catalog's `h-448ffcae9220`, and the pod recorded
303
+ * a stale layout as up to date).
304
+ */
305
+ catalogVersion?: string;
306
+ }
307
+ /**
308
+ * Pick the install definition through the SAME winner rule the catalog uses
309
+ * (`mergeCatalog`: an official CP row wins over this CLI's frozen bundle only
310
+ * when its `definition.sourcePackage.version` is strictly newer), and label it
311
+ * honestly: a catalog definition carries the catalog version; a bundled one
312
+ * carries the bundle's own package version (`bundle@x.y.z`), never the
313
+ * catalog's. The pod re-derives the stamp from what it applied either way.
314
+ *
315
+ * Returns `null` only for a non-bundled slug whose definition could not be
316
+ * fetched (the caller reports it). A failed fetch for a BUNDLED slug falls back
317
+ * to the bundle — the documented offline path — labelled as the bundle.
318
+ */
319
+ export declare function resolveInstallPayload(slug: string, cat: Pick<MarketCatalog, "bundledSlugs" | "remoteVersionBySlug" | "reachedCp">, cpToken: string | undefined): Promise<InstallPayload | null>;
137
320
  export interface UpdateCheck extends TemplateUpdateCheck {
138
321
  /**
139
322
  * True when the installed workspace carries no version stamp at all — the
@@ -142,24 +325,87 @@ export interface UpdateCheck extends TemplateUpdateCheck {
142
325
  * see `InstalledTemplateInfo.version`'s doc in `lib/installed.ts`.
143
326
  */
144
327
  noVersionInfo: boolean;
328
+ /** The installed row's kind (absent = `"workspace"`, the only kind an older pod reports). Picks the update door — see {@link updateDoorFor}. */
329
+ kind?: InstalledKind;
145
330
  }
146
331
  /**
147
- * Per-installed-slug drift check. Starts from the shared `computeTemplateUpdates`
148
- * (handles bundled-only / private-only slugs via `bundleVersion`), then
149
- * overrides `latestVersion`/`updateAvailable` with the CP row's OWN version for
150
- * any slug in `remoteVersionBySlug` — the merge-winner bypass this command
151
- * needs (see `MarketCatalog.remoteVersionBySlug`'s doc). A slug the pod never
152
- * version-stamped is reported `noVersionInfo: true`, never silently "outdated".
332
+ * Which pod door UPDATES an installed package of this kind, or `null` when the
333
+ * pod has no per-package updater for it.
334
+ *
335
+ * ⚠️ Never default to `/packages/apply`. That is the WORKSPACE door: it mints a
336
+ * workspace for any body carrying a `_meta.slug`. On 2026-10-12 `market update`
337
+ * sent the `creative-director` SKILL through it and the pod created an empty
338
+ * "New Workspace" — the update-time twin of the 2026-09-05 install bug that
339
+ * {@link declaredCategoryOf} fixed.
340
+ *
341
+ * - view / skill / automation converge through the source-linked 3-way-merge
342
+ * reconcile (`POST /configs/reconcile`) — the SAME comparator whose dry run
343
+ * marked the row drifted (`GET /installed?drift`). Re-running `market.install`
344
+ * is not an update: the skill arm always creates (unique slug ⇒ fails), the
345
+ * automation arm returns "reused".
346
+ * - cell / capability have no per-package updater here: `null`.
347
+ */
348
+ export type UpdateDoor = "packages-apply" | "configs-reconcile";
349
+ export declare function updateDoorFor(kind: InstalledKind | undefined): UpdateDoor | null;
350
+ /**
351
+ * Per-installed-slug drift check. SERVER-FIRST: when the pod runs the
352
+ * server-side TemplateHealth code (Hub `/workspaces` returns `drifted`/
353
+ * `latestVersion`), that verdict wins — the CLI stops re-deriving drift, so it
354
+ * can't disagree with the pod (or the browser, which reads the same authority).
355
+ *
356
+ * FALLBACK (older pod, `drifted === undefined`): the legacy client derivation —
357
+ * the shared `computeTemplateUpdates` (handles bundled-only / private-only slugs
358
+ * via `bundleVersion`), then override `latestVersion`/`updateAvailable` with the
359
+ * CP row's OWN version for any slug in `remoteVersionBySlug` (the merge-winner
360
+ * bypass). A slug the pod never version-stamped is `noVersionInfo: true`, never
361
+ * silently "outdated".
153
362
  */
154
363
  export declare function computeUpdates(installedTemplates: InstalledTemplateInfo[], cat: MarketCatalog): UpdateCheck[];
364
+ /** First check per slug, order preserved — an update is applied per PACKAGE, not per installed object. */
365
+ export declare function dedupeBySlug(checks: UpdateCheck[]): UpdateCheck[];
155
366
  export declare function marketUpdate(slugsArg: string[] | undefined, opts: {
367
+ /** The literal `--yes` flag: apply every update AND agree to every data change listed. */
156
368
  yes?: boolean;
369
+ /** `update all`: apply every update — data changes still need agreement (asked, or flagged). */
370
+ all?: boolean;
371
+ /** `--accept-data-changes a,b`: agree to exactly these opKeys. */
372
+ acceptDataChanges?: string;
157
373
  dryRun?: boolean;
158
374
  json?: boolean;
159
375
  podUrl?: string;
160
376
  apiKey?: string;
161
377
  timeout?: string;
162
378
  }): Promise<void>;
379
+ /**
380
+ * One-line rollup over a batch of `applyOnePackage` outcomes — computed from
381
+ * the SAME per-item `status` (`classifyApplyResult`'s honest verdict) the
382
+ * loop already collects, not a separate tally. `"installed"`/`"updated"`/
383
+ * `"composed"`/`"legacy-unknown"` count as a clean update, `"unchanged"` as
384
+ * already-current, the `*-with-failures` and `"stamp-contradiction"` statuses
385
+ * get their OWN bucket — a partial capability-seed failure or a stamp that
386
+ * silently didn't take is never folded into a clean "updated" count.
387
+ * `"timed-out"` is broken out from the generic `"failed"` bucket; everything
388
+ * else (locked/proposed/fetch-failed/not-in-catalog/no-workspace/unknown)
389
+ * rolls into "failed".
390
+ */
391
+ export declare function summarizeApplyResults(results: Array<{
392
+ slug: string;
393
+ status: string;
394
+ }>): {
395
+ updated: number;
396
+ unchanged: number;
397
+ withFailures: number;
398
+ failed: number;
399
+ timedOut: number;
400
+ proposed: number;
401
+ needsConsent: number;
402
+ line: string;
403
+ };
404
+ /**
405
+ * Human status cell for one installed row — distinguishes hash drift (no
406
+ * ordering, just "changed") from semver drift ("update available").
407
+ */
408
+ export declare function installedStatusLabel(c: UpdateCheck, isPrivate: boolean, loggedIn: boolean): string;
163
409
  export interface TreeNode {
164
410
  slug: string;
165
411
  name: string;
@@ -210,15 +456,153 @@ export declare function buildCompositionTrees(rows: UpdateCheck[], cat: MarketCa
210
456
  }>;
211
457
  export declare function printCompositionTree(pkg: TreePackage): void;
212
458
  /**
213
- * Pure-read inventory of what's installed on this pod — reuses
214
- * `buildMarketCatalog` + `fetchInstalledTemplates` + `computeUpdates`
215
- * (`market update`'s own drift check), never writes anything. Pairs with
216
- * `market update` to apply what this surfaces.
459
+ * "3 workspaces" / "pod-wide" / "2 workspaces · pod-wide" — where a slug landed.
460
+ *
461
+ * Counts DISTINCT placements, not rows. Since `GET /installed` reports one row
462
+ * per installed OBJECT (four `task-views-pack` views across two workspaces is
463
+ * four rows), tallying rows would have printed "4 workspaces" for two. The
464
+ * workspace-kind rows this replaced are one-per-workspace either way, so their
465
+ * output is unchanged.
466
+ */
467
+ export declare function fanOutLabel(placements: Set<string>): string;
468
+ /**
469
+ * One INVENTORY-ONLY row — installed, source-linked, but NOT to a package slug,
470
+ * so `market update` structurally cannot act on it. Every `capability` row is
471
+ * one of these (its link is a CP template key), as is any cell whose type key
472
+ * carried the `"unknown"` sentinel.
473
+ *
474
+ * They are listed, never hidden: an unlisted install is exactly the blindness
475
+ * this door was built to remove. They are just kept OUT of the update table so
476
+ * nothing offers a slug the catalog does not have.
217
477
  */
478
+ export interface UnlinkedInstall {
479
+ kind: InstalledKind;
480
+ /** The CP template key, or null when the row has no source link at all. */
481
+ templateKey: string | null;
482
+ name: string;
483
+ placements: Set<string>;
484
+ note?: string;
485
+ }
486
+ /** Dedupe the not-package-linked rows by `kind + templateKey` (falling back to the row name). */
487
+ export declare function collectUnlinked(rows: InstalledRow[]): UnlinkedInstall[];
218
488
  export declare function marketInstalled(opts: {
219
489
  json?: boolean;
220
490
  outdated?: boolean;
221
491
  tree?: boolean;
222
492
  layers?: boolean;
223
493
  }): Promise<void>;
494
+ type AttachmentStatus = {
495
+ kind: "unattached";
496
+ } | {
497
+ kind: "no-version";
498
+ slug: string;
499
+ }
500
+ /** Attached, no version recorded, and the pod reads it drifted: its last install/update did not finish (the pod holds the version until it does). */
501
+ | {
502
+ kind: "unfinished";
503
+ slug: string;
504
+ } | {
505
+ kind: "attached";
506
+ slug: string;
507
+ version: string;
508
+ updateAvailable: boolean;
509
+ latestVersion?: string;
510
+ };
511
+ /** Human status cell for one workspace row — the same vocabulary as `market installed`, keyed on attachment. */
512
+ export declare function attachmentStatusLabel(s: AttachmentStatus): string;
513
+ /**
514
+ * Pure-read discovery surface — every workspace on the pod with its template-
515
+ * attachment status. Sources the linkage from the SAME Hub `GET /workspaces`
516
+ * call `market installed` uses (`fetchWorkspaceAttachments`), and reuses
517
+ * `computeUpdates` for the stamped-drift verdict. Never writes.
518
+ */
519
+ export declare function marketWorkspaces(opts: {
520
+ json?: boolean;
521
+ unattached?: boolean;
522
+ }): Promise<void>;
523
+ export declare function marketAttach(workspaceId: string, opts: {
524
+ slug?: string;
525
+ project?: string;
526
+ timeout?: string;
527
+ json?: boolean;
528
+ podUrl?: string;
529
+ apiKey?: string;
530
+ }): Promise<void>;
531
+ interface TemplateSuggestion {
532
+ slug: string;
533
+ name: string;
534
+ /** "strong" = exact domain match (safe to auto-fill on --yes); "weak" = the name looks like it (confirm first). */
535
+ confidence: "strong" | "weak";
536
+ }
537
+ /** Best template guess for an unattached workspace: exact domain match wins; else the name containing a template slug. Null when nothing fits — we never invent a link. */
538
+ export declare function suggestTemplateFor(ws: WorkspaceAttachment, entries: CatalogEntry[]): TemplateSuggestion | null;
539
+ type WorkspaceResolution = {
540
+ kind: "found";
541
+ ws: WorkspaceAttachment;
542
+ } | {
543
+ kind: "none";
544
+ } | {
545
+ kind: "ambiguous";
546
+ matches: WorkspaceAttachment[];
547
+ };
548
+ /** Resolve a user-typed workspace reference — exact id, else exact (case-insensitive) name, else a UNIQUE substring name match. No silent pick when >1 fits. */
549
+ export declare function resolveWorkspaceQuery(query: string, attachments: WorkspaceAttachment[]): WorkspaceResolution;
550
+ type TemplateRowGroup = "attention" | "ok" | "unlinked";
551
+ export interface TemplateRow {
552
+ ws: WorkspaceAttachment;
553
+ status: AttachmentStatus;
554
+ suggestion: TemplateSuggestion | null;
555
+ group: TemplateRowGroup;
556
+ /** The exact next command for this row — null for a row with no action (current, or unlinked with no confident match). */
557
+ action: string | null;
558
+ /** The template is not `current` on the pod (retired / unlisted / catalog not fully synced) — null when current or on an older pod. */
559
+ lifecycleNotice: {
560
+ label: string;
561
+ action: string | null;
562
+ } | null;
563
+ /** One line per overlay on the space, with its notice when not `current`. Empty on an older pod. */
564
+ overlayNotices: Array<{
565
+ slug: string;
566
+ label: string | null;
567
+ lifecycle: string;
568
+ }>;
569
+ /** The pod's sentence for why the last update did not finish (`applyWarning`) — null when there is nothing to say. */
570
+ applyNotice: string | null;
571
+ /** The space's leading step (`classifyTemplateStep`, the shared rule + precedence) — null when current. */
572
+ step: TemplateUpdateStep | null;
573
+ /** Data changes the update waits on the person to agree to — null when none (or an older pod). */
574
+ dataChanges: PendingDataChanges | null;
575
+ /** An agent's pending "update this space" proposal — null when none (or an older pod). */
576
+ updateProposalId: string | null;
577
+ }
578
+ /** Sort one workspace into the action-ranked home: drifted / unstamped / (unattached-with-suggestion) → attention; current → ok; unattached-no-match → unlinked. */
579
+ export declare function classifyTemplateRow(ws: WorkspaceAttachment, check: UpdateCheck | undefined, entries: CatalogEntry[]): TemplateRow;
580
+ export declare function renderTemplateRow(r: TemplateRow): void;
581
+ /**
582
+ * `synap templates` — grouped, action-ranked view of every workspace's template
583
+ * link. Default surfaces "Needs attention" first (drifted + unattached-with-
584
+ * suggestion + unstamped), then up-to-date, then unlinked. `--needs-attention`
585
+ * shows only the first group; `--json` for scripts. Pure read.
586
+ */
587
+ export declare function marketTemplates(opts: {
588
+ json?: boolean;
589
+ needsAttention?: boolean;
590
+ podUrl?: string;
591
+ apiKey?: string;
592
+ }): Promise<void>;
593
+ /**
594
+ * `synap templates attach <workspace>` — the ONE natural connect command. Takes a
595
+ * workspace NAME (or id), suggests the template, confirms once. `--slug` forces a
596
+ * specific template; `--yes` accepts a strong suggestion non-interactively.
597
+ * Hands the actual reconcile+stamp to the same door `market install --onto` uses.
598
+ */
599
+ export declare function templatesAttach(query: string, opts: {
600
+ slug?: string;
601
+ yes?: boolean;
602
+ project?: string;
603
+ timeout?: string;
604
+ json?: boolean;
605
+ podUrl?: string;
606
+ apiKey?: string;
607
+ }): Promise<void>;
224
608
  export {};