@synap-core/cli 1.10.0 → 1.12.2

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 (461) hide show
  1. package/README.md +23 -198
  2. package/dist/build-info.json +6 -0
  3. package/dist/commands/agent-run.js +3 -2
  4. package/dist/commands/agent-run.js.map +1 -1
  5. package/dist/commands/agents.d.ts +33 -17
  6. package/dist/commands/agents.js +203 -237
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/app.d.ts +143 -0
  9. package/dist/commands/app.js +523 -0
  10. package/dist/commands/app.js.map +1 -0
  11. package/dist/commands/automate.d.ts +21 -0
  12. package/dist/commands/automate.js +42 -0
  13. package/dist/commands/automate.js.map +1 -0
  14. package/dist/commands/automation-schema.test.d.ts +16 -0
  15. package/dist/commands/automation-schema.test.js +77 -0
  16. package/dist/commands/automation-schema.test.js.map +1 -0
  17. package/dist/commands/automation.d.ts +12 -0
  18. package/dist/commands/automation.js +80 -35
  19. package/dist/commands/automation.js.map +1 -1
  20. package/dist/commands/bridge-setup.d.ts +14 -1
  21. package/dist/commands/bridge-setup.js +392 -128
  22. package/dist/commands/bridge-setup.js.map +1 -1
  23. package/dist/commands/cap-connections.d.ts +4 -4
  24. package/dist/commands/cap-connections.js +14 -14
  25. package/dist/commands/cap-connections.js.map +1 -1
  26. package/dist/commands/capability.d.ts +2 -0
  27. package/dist/commands/capability.js +297 -176
  28. package/dist/commands/capability.js.map +1 -1
  29. package/dist/commands/catalog.d.ts +275 -0
  30. package/dist/commands/catalog.js +481 -0
  31. package/dist/commands/catalog.js.map +1 -0
  32. package/dist/commands/cell.d.ts +155 -8
  33. package/dist/commands/cell.js +416 -40
  34. package/dist/commands/cell.js.map +1 -1
  35. package/dist/commands/centrality.js +3 -14
  36. package/dist/commands/centrality.js.map +1 -1
  37. package/dist/commands/connect.d.ts +38 -13
  38. package/dist/commands/connect.js +68 -167
  39. package/dist/commands/connect.js.map +1 -1
  40. package/dist/commands/connections.d.ts +3 -2
  41. package/dist/commands/connections.js +95 -25
  42. package/dist/commands/connections.js.map +1 -1
  43. package/dist/commands/context.js +9 -2
  44. package/dist/commands/context.js.map +1 -1
  45. package/dist/commands/data-extra.d.ts +34 -0
  46. package/dist/commands/data-extra.js +198 -25
  47. package/dist/commands/data-extra.js.map +1 -1
  48. package/dist/commands/data.d.ts +120 -2
  49. package/dist/commands/data.js +307 -24
  50. package/dist/commands/data.js.map +1 -1
  51. package/dist/commands/diagnose.d.ts +66 -4
  52. package/dist/commands/diagnose.js +329 -29
  53. package/dist/commands/diagnose.js.map +1 -1
  54. package/dist/commands/digest.js +2 -1
  55. package/dist/commands/digest.js.map +1 -1
  56. package/dist/commands/doc.d.ts +25 -4
  57. package/dist/commands/doc.js +100 -18
  58. package/dist/commands/doc.js.map +1 -1
  59. package/dist/commands/doctor.d.ts +130 -0
  60. package/dist/commands/doctor.js +814 -0
  61. package/dist/commands/doctor.js.map +1 -0
  62. package/dist/commands/events.js +3 -1
  63. package/dist/commands/events.js.map +1 -1
  64. package/dist/commands/explain.js +5 -5
  65. package/dist/commands/explain.js.map +1 -1
  66. package/dist/commands/graph.js +5 -3
  67. package/dist/commands/graph.js.map +1 -1
  68. package/dist/commands/import.d.ts +368 -13
  69. package/dist/commands/import.js +1096 -55
  70. package/dist/commands/import.js.map +1 -1
  71. package/dist/commands/init.d.ts +20 -9
  72. package/dist/commands/init.js +433 -973
  73. package/dist/commands/init.js.map +1 -1
  74. package/dist/commands/keys.d.ts +1 -0
  75. package/dist/commands/keys.js +15 -2
  76. package/dist/commands/keys.js.map +1 -1
  77. package/dist/commands/knowledge.d.ts +28 -6
  78. package/dist/commands/knowledge.js +358 -73
  79. package/dist/commands/knowledge.js.map +1 -1
  80. package/dist/commands/launch.js +2 -2
  81. package/dist/commands/launch.js.map +1 -1
  82. package/dist/commands/lens.d.ts +37 -1
  83. package/dist/commands/lens.js +193 -72
  84. package/dist/commands/lens.js.map +1 -1
  85. package/dist/commands/market-authoring.d.ts +72 -0
  86. package/dist/commands/market-authoring.js +566 -0
  87. package/dist/commands/market-authoring.js.map +1 -0
  88. package/dist/commands/market-official.d.ts +58 -0
  89. package/dist/commands/market-official.js +84 -0
  90. package/dist/commands/market-official.js.map +1 -0
  91. package/dist/commands/market.d.ts +419 -20
  92. package/dist/commands/market.js +2124 -193
  93. package/dist/commands/market.js.map +1 -1
  94. package/dist/commands/mcp.d.ts +70 -13
  95. package/dist/commands/mcp.js +308 -40
  96. package/dist/commands/mcp.js.map +1 -1
  97. package/dist/commands/open.d.ts +39 -9
  98. package/dist/commands/open.js +80 -25
  99. package/dist/commands/open.js.map +1 -1
  100. package/dist/commands/playbook.d.ts +42 -0
  101. package/dist/commands/playbook.js +162 -0
  102. package/dist/commands/playbook.js.map +1 -0
  103. package/dist/commands/pod.js +1 -1
  104. package/dist/commands/pod.js.map +1 -1
  105. package/dist/commands/pods.d.ts +19 -0
  106. package/dist/commands/pods.js +220 -85
  107. package/dist/commands/pods.js.map +1 -1
  108. package/dist/commands/proposals-actions.d.ts +62 -0
  109. package/dist/commands/proposals-actions.js +146 -8
  110. package/dist/commands/proposals-actions.js.map +1 -1
  111. package/dist/commands/proposals-await.d.ts +68 -0
  112. package/dist/commands/proposals-await.js +248 -0
  113. package/dist/commands/proposals-await.js.map +1 -0
  114. package/dist/commands/proton-setup.d.ts +73 -0
  115. package/dist/commands/proton-setup.js +577 -0
  116. package/dist/commands/proton-setup.js.map +1 -0
  117. package/dist/commands/providers.d.ts +23 -0
  118. package/dist/commands/providers.js +126 -1
  119. package/dist/commands/providers.js.map +1 -1
  120. package/dist/commands/raycast.js +6 -2
  121. package/dist/commands/raycast.js.map +1 -1
  122. package/dist/commands/rule.d.ts +150 -0
  123. package/dist/commands/rule.js +447 -0
  124. package/dist/commands/rule.js.map +1 -0
  125. package/dist/commands/session-wait.d.ts +111 -0
  126. package/dist/commands/session-wait.js +209 -0
  127. package/dist/commands/session-wait.js.map +1 -0
  128. package/dist/commands/sessions.d.ts +52 -0
  129. package/dist/commands/sessions.js +479 -58
  130. package/dist/commands/sessions.js.map +1 -1
  131. package/dist/commands/skill-manage.d.ts +21 -0
  132. package/dist/commands/skill-manage.js +136 -19
  133. package/dist/commands/skill-manage.js.map +1 -1
  134. package/dist/commands/skills.js +19 -1
  135. package/dist/commands/skills.js.map +1 -1
  136. package/dist/commands/status.d.ts +1 -4
  137. package/dist/commands/status.js +5 -34
  138. package/dist/commands/status.js.map +1 -1
  139. package/dist/commands/statusline.backoff.test.d.ts +13 -0
  140. package/dist/commands/statusline.backoff.test.js +100 -0
  141. package/dist/commands/statusline.backoff.test.js.map +1 -0
  142. package/dist/commands/statusline.js +16 -9
  143. package/dist/commands/statusline.js.map +1 -1
  144. package/dist/commands/sync-status.d.ts +12 -0
  145. package/dist/commands/sync-status.js +125 -0
  146. package/dist/commands/sync-status.js.map +1 -0
  147. package/dist/commands/templates-retire.d.ts +34 -0
  148. package/dist/commands/templates-retire.js +192 -0
  149. package/dist/commands/templates-retire.js.map +1 -0
  150. package/dist/commands/tools.js +6 -21
  151. package/dist/commands/tools.js.map +1 -1
  152. package/dist/commands/tracks.d.ts +51 -0
  153. package/dist/commands/tracks.js +291 -0
  154. package/dist/commands/tracks.js.map +1 -0
  155. package/dist/commands/update.d.ts +3 -11
  156. package/dist/commands/update.js +5 -134
  157. package/dist/commands/update.js.map +1 -1
  158. package/dist/commands/upload.d.ts +68 -0
  159. package/dist/commands/upload.js +257 -0
  160. package/dist/commands/upload.js.map +1 -0
  161. package/dist/commands/vendor.d.ts +28 -0
  162. package/dist/commands/vendor.js +110 -0
  163. package/dist/commands/vendor.js.map +1 -0
  164. package/dist/commands/versions.js +6 -0
  165. package/dist/commands/versions.js.map +1 -1
  166. package/dist/commands/view.js +10 -5
  167. package/dist/commands/view.js.map +1 -1
  168. package/dist/commands/whoami.d.ts +23 -3
  169. package/dist/commands/whoami.js +169 -23
  170. package/dist/commands/whoami.js.map +1 -1
  171. package/dist/commands/worker.d.ts +122 -0
  172. package/dist/commands/worker.js +435 -0
  173. package/dist/commands/worker.js.map +1 -0
  174. package/dist/commands/worker.test.d.ts +1 -0
  175. package/dist/commands/worker.test.js +116 -0
  176. package/dist/commands/worker.test.js.map +1 -0
  177. package/dist/commands/workspace-ops.d.ts +35 -0
  178. package/dist/commands/workspace-ops.js +153 -0
  179. package/dist/commands/workspace-ops.js.map +1 -0
  180. package/dist/index.d.ts +6 -6
  181. package/dist/index.js +1009 -171
  182. package/dist/index.js.map +1 -1
  183. package/dist/lib/agent-connections.d.ts +31 -0
  184. package/dist/lib/agent-connections.js +33 -0
  185. package/dist/lib/agent-connections.js.map +1 -0
  186. package/dist/lib/agent-detect.d.ts +27 -0
  187. package/dist/lib/agent-detect.js +71 -0
  188. package/dist/lib/agent-detect.js.map +1 -0
  189. package/dist/lib/agent-door.d.ts +138 -0
  190. package/dist/lib/agent-door.js +426 -0
  191. package/dist/lib/agent-door.js.map +1 -0
  192. package/dist/lib/agents-config.d.ts +2 -0
  193. package/dist/lib/agents-config.js +4 -9
  194. package/dist/lib/agents-config.js.map +1 -1
  195. package/dist/lib/approval-poll.d.ts +31 -2
  196. package/dist/lib/approval-poll.js +20 -7
  197. package/dist/lib/approval-poll.js.map +1 -1
  198. package/dist/lib/atomic-file.d.ts +48 -0
  199. package/dist/lib/atomic-file.js +129 -0
  200. package/dist/lib/atomic-file.js.map +1 -0
  201. package/dist/lib/auth.d.ts +14 -9
  202. package/dist/lib/auth.js +44 -61
  203. package/dist/lib/auth.js.map +1 -1
  204. package/dist/lib/batch-approval.d.ts +85 -0
  205. package/dist/lib/batch-approval.js +170 -0
  206. package/dist/lib/batch-approval.js.map +1 -0
  207. package/dist/lib/capture-lane.d.ts +6 -5
  208. package/dist/lib/capture-lane.js +11 -8
  209. package/dist/lib/capture-lane.js.map +1 -1
  210. package/dist/lib/capture-structure.d.ts +342 -0
  211. package/dist/lib/capture-structure.js +295 -0
  212. package/dist/lib/capture-structure.js.map +1 -0
  213. package/dist/lib/catalog-templates.d.ts +59 -0
  214. package/dist/lib/catalog-templates.js +126 -0
  215. package/dist/lib/catalog-templates.js.map +1 -0
  216. package/dist/lib/cli-build.d.ts +19 -0
  217. package/dist/lib/cli-build.js +37 -0
  218. package/dist/lib/cli-build.js.map +1 -0
  219. package/dist/lib/conversation-headers.d.ts +18 -0
  220. package/dist/lib/conversation-headers.js +32 -0
  221. package/dist/lib/conversation-headers.js.map +1 -0
  222. package/dist/lib/cp-packages.d.ts +216 -4
  223. package/dist/lib/cp-packages.js +414 -11
  224. package/dist/lib/cp-packages.js.map +1 -1
  225. package/dist/lib/credential-class.d.ts +117 -0
  226. package/dist/lib/credential-class.js +116 -0
  227. package/dist/lib/credential-class.js.map +1 -0
  228. package/dist/lib/describe-lens.d.ts +35 -0
  229. package/dist/lib/describe-lens.js +40 -0
  230. package/dist/lib/describe-lens.js.map +1 -1
  231. package/dist/lib/device-connect.d.ts +125 -0
  232. package/dist/lib/device-connect.js +256 -0
  233. package/dist/lib/device-connect.js.map +1 -0
  234. package/dist/lib/directory-lens.d.ts +99 -0
  235. package/dist/lib/directory-lens.js +187 -0
  236. package/dist/lib/directory-lens.js.map +1 -0
  237. package/dist/lib/exporter-coverage.d.ts +71 -0
  238. package/dist/lib/exporter-coverage.js +97 -0
  239. package/dist/lib/exporter-coverage.js.map +1 -0
  240. package/dist/lib/hub-client.d.ts +43 -9
  241. package/dist/lib/hub-client.js +429 -65
  242. package/dist/lib/hub-client.js.map +1 -1
  243. package/dist/lib/id.d.ts +23 -0
  244. package/dist/lib/id.js +35 -0
  245. package/dist/lib/id.js.map +1 -0
  246. package/dist/lib/init-connect.d.ts +41 -0
  247. package/dist/lib/init-connect.js +75 -0
  248. package/dist/lib/init-connect.js.map +1 -0
  249. package/dist/lib/init-exit.d.ts +24 -0
  250. package/dist/lib/init-exit.js +41 -0
  251. package/dist/lib/init-exit.js.map +1 -0
  252. package/dist/lib/init-flow.d.ts +25 -0
  253. package/dist/lib/init-flow.js +40 -0
  254. package/dist/lib/init-flow.js.map +1 -0
  255. package/dist/lib/init-handoff.d.ts +16 -0
  256. package/dist/lib/init-handoff.js +19 -0
  257. package/dist/lib/init-handoff.js.map +1 -0
  258. package/dist/lib/init-output.d.ts +18 -0
  259. package/dist/lib/init-output.js +43 -0
  260. package/dist/lib/init-output.js.map +1 -0
  261. package/dist/lib/init-pod.d.ts +45 -0
  262. package/dist/lib/init-pod.js +36 -0
  263. package/dist/lib/init-pod.js.map +1 -0
  264. package/dist/lib/installed.d.ts +210 -11
  265. package/dist/lib/installed.js +234 -36
  266. package/dist/lib/installed.js.map +1 -1
  267. package/dist/lib/key-approval.d.ts +57 -0
  268. package/dist/lib/key-approval.js +117 -0
  269. package/dist/lib/key-approval.js.map +1 -0
  270. package/dist/lib/key-diagnosis.d.ts +56 -0
  271. package/dist/lib/key-diagnosis.js +227 -0
  272. package/dist/lib/key-diagnosis.js.map +1 -0
  273. package/dist/lib/key-doctor.d.ts +136 -0
  274. package/dist/lib/key-doctor.js +286 -0
  275. package/dist/lib/key-doctor.js.map +1 -0
  276. package/dist/lib/key-locations.d.ts +120 -0
  277. package/dist/lib/key-locations.js +326 -0
  278. package/dist/lib/key-locations.js.map +1 -0
  279. package/dist/lib/key-source.d.ts +66 -0
  280. package/dist/lib/key-source.js +106 -0
  281. package/dist/lib/key-source.js.map +1 -0
  282. package/dist/lib/key-state.d.ts +70 -0
  283. package/dist/lib/key-state.js +115 -0
  284. package/dist/lib/key-state.js.map +1 -0
  285. package/dist/lib/kind-package.d.ts +181 -0
  286. package/dist/lib/kind-package.js +679 -0
  287. package/dist/lib/kind-package.js.map +1 -0
  288. package/dist/lib/knowledge-title.d.ts +24 -0
  289. package/dist/lib/knowledge-title.js +46 -0
  290. package/dist/lib/knowledge-title.js.map +1 -0
  291. package/dist/lib/knowledge-title.test.d.ts +1 -0
  292. package/dist/lib/knowledge-title.test.js +34 -0
  293. package/dist/lib/knowledge-title.test.js.map +1 -0
  294. package/dist/lib/machine-instance.d.ts +64 -0
  295. package/dist/lib/machine-instance.js +142 -0
  296. package/dist/lib/machine-instance.js.map +1 -0
  297. package/dist/lib/mcp-bridge.d.ts +42 -0
  298. package/dist/lib/mcp-bridge.js +147 -0
  299. package/dist/lib/mcp-bridge.js.map +1 -0
  300. package/dist/lib/mcp-bridge.test.d.ts +1 -0
  301. package/dist/lib/mcp-bridge.test.js +90 -0
  302. package/dist/lib/mcp-bridge.test.js.map +1 -0
  303. package/dist/lib/mcp-call.d.ts +30 -0
  304. package/dist/lib/mcp-call.js +107 -0
  305. package/dist/lib/mcp-call.js.map +1 -0
  306. package/dist/lib/mcp-snippets.d.ts +53 -0
  307. package/dist/lib/mcp-snippets.js +82 -0
  308. package/dist/lib/mcp-snippets.js.map +1 -0
  309. package/dist/lib/next-steps.d.ts +8 -0
  310. package/dist/lib/next-steps.js +31 -1
  311. package/dist/lib/next-steps.js.map +1 -1
  312. package/dist/lib/package-wire.d.ts +179 -0
  313. package/dist/lib/package-wire.js +68 -0
  314. package/dist/lib/package-wire.js.map +1 -0
  315. package/dist/lib/pair-link.d.ts +38 -0
  316. package/dist/lib/pair-link.js +68 -0
  317. package/dist/lib/pair-link.js.map +1 -0
  318. package/dist/lib/pod-wide.d.ts +40 -0
  319. package/dist/lib/pod-wide.js +46 -0
  320. package/dist/lib/pod-wide.js.map +1 -0
  321. package/dist/lib/pod.d.ts +119 -115
  322. package/dist/lib/pod.js +206 -412
  323. package/dist/lib/pod.js.map +1 -1
  324. package/dist/lib/project-ref.d.ts +9 -3
  325. package/dist/lib/project-ref.js +10 -4
  326. package/dist/lib/project-ref.js.map +1 -1
  327. package/dist/lib/review-credential.d.ts +119 -0
  328. package/dist/lib/review-credential.js +147 -0
  329. package/dist/lib/review-credential.js.map +1 -0
  330. package/dist/lib/safe-open.d.ts +49 -0
  331. package/dist/lib/safe-open.js +119 -0
  332. package/dist/lib/safe-open.js.map +1 -0
  333. package/dist/lib/session-lens.d.ts +40 -1
  334. package/dist/lib/session-lens.js +54 -4
  335. package/dist/lib/session-lens.js.map +1 -1
  336. package/dist/lib/superwhisper-import.d.ts +8 -0
  337. package/dist/lib/superwhisper-import.js +14 -7
  338. package/dist/lib/superwhisper-import.js.map +1 -1
  339. package/dist/lib/superwhisper-title.test.d.ts +1 -0
  340. package/dist/lib/superwhisper-title.test.js +18 -0
  341. package/dist/lib/superwhisper-title.test.js.map +1 -0
  342. package/dist/lib/targets.d.ts +134 -10
  343. package/dist/lib/targets.js +962 -258
  344. package/dist/lib/targets.js.map +1 -1
  345. package/dist/lib/template-file.d.ts +78 -0
  346. package/dist/lib/template-file.js +140 -0
  347. package/dist/lib/template-file.js.map +1 -0
  348. package/dist/lib/template-lifecycle.d.ts +217 -0
  349. package/dist/lib/template-lifecycle.js +433 -0
  350. package/dist/lib/template-lifecycle.js.map +1 -0
  351. package/dist/lib/template-steps.d.ts +88 -0
  352. package/dist/lib/template-steps.js +118 -0
  353. package/dist/lib/template-steps.js.map +1 -0
  354. package/dist/lib/time-ago.d.ts +2 -0
  355. package/dist/lib/time-ago.js +15 -0
  356. package/dist/lib/time-ago.js.map +1 -0
  357. package/dist/utils/logger.js +5 -2
  358. package/dist/utils/logger.js.map +1 -1
  359. package/package.json +25 -18
  360. package/skills/README.md +12 -10
  361. package/skills/agent-os/SKILL.md +220 -99
  362. package/skills/manifest.json +2 -2
  363. package/skills/onboard/SKILL.md +61 -25
  364. package/skills/synap/README.md +5 -8
  365. package/skills/synap/SKILL.md +1185 -301
  366. package/skills/synap/_order.txt +7 -0
  367. package/skills/synap/_skill.yaml +1 -1
  368. package/skills/synap/automations.md +15 -0
  369. package/skills/synap/capture.md +54 -151
  370. package/skills/synap/cli-operations.md +24 -18
  371. package/skills/synap/common-mistakes.md +1 -0
  372. package/skills/synap/concepts.md +28 -0
  373. package/skills/synap/content-os.md +92 -0
  374. package/skills/synap/creative-loop.md +15 -10
  375. package/skills/synap/crm.md +21 -52
  376. package/skills/synap/digesting-a-channel.md +25 -0
  377. package/skills/synap/document-embeds.md +141 -47
  378. package/skills/synap/escalation-ladder.md +20 -10
  379. package/skills/synap/focus-sessions.md +47 -21
  380. package/skills/synap/from-intent.md +142 -0
  381. package/skills/synap/governance-rules.md +4 -4
  382. package/skills/synap/governance.md +10 -7
  383. package/skills/synap/hand-off.md +33 -0
  384. package/skills/synap/inline-patterns.md +15 -7
  385. package/skills/synap/lenses.md +33 -15
  386. package/skills/synap/linking.md +41 -40
  387. package/skills/synap/mcp-remote-servers.md +64 -0
  388. package/skills/synap/mental-model.md +24 -22
  389. package/skills/synap/multi-entity-capture.md +6 -4
  390. package/skills/synap/operating-mode-rules.md +1 -1
  391. package/skills/synap/processes.md +118 -0
  392. package/skills/synap/quick-reference.md +5 -1
  393. package/skills/synap/reading.md +3 -1
  394. package/skills/synap/reflexes.md +12 -42
  395. package/skills/synap/viewframe-cells.md +38 -5
  396. package/skills/synap/work-flow.md +1 -1
  397. package/skills/synap/work-model.md +96 -0
  398. package/skills/synap/worked-examples.md +21 -1
  399. package/skills/synap/workspace-design.md +14 -10
  400. package/skills/synap/writes.md +165 -35
  401. package/skills/synap/writing-titles.md +63 -0
  402. package/skills/synap-app/SKILL.md +319 -0
  403. package/skills/synap-app/_order.txt +5 -0
  404. package/skills/synap-app/_skill.yaml +20 -0
  405. package/skills/synap-app/creating-the-base-app.md +64 -0
  406. package/skills/synap-app/governance.md +42 -0
  407. package/skills/synap-app/install-commands.md +55 -0
  408. package/skills/synap-app/overview.md +50 -0
  409. package/skills/synap-app/using-the-sdk.md +73 -0
  410. package/skills/synap-design/SKILL.md +474 -0
  411. package/skills/synap-design/_order.txt +4 -0
  412. package/skills/synap-design/_skill.yaml +21 -0
  413. package/skills/synap-design/loop.md +134 -0
  414. package/skills/synap-design/overview.md +44 -0
  415. package/skills/synap-design/principles.md +130 -0
  416. package/skills/synap-design/system.md +133 -0
  417. package/skills/synap-market/SKILL.md +625 -0
  418. package/skills/synap-market/_order.txt +5 -0
  419. package/skills/synap-market/_skill.yaml +24 -0
  420. package/skills/synap-market/author-and-publish.md +212 -0
  421. package/skills/synap-market/discover-and-fetch.md +59 -0
  422. package/skills/synap-market/governance-and-catalog.md +63 -0
  423. package/skills/synap-market/install.md +133 -0
  424. package/skills/synap-market/overview.md +119 -0
  425. package/skills/synap-schema/SKILL.md +172 -10
  426. package/skills/synap-schema/_order.txt +2 -0
  427. package/skills/synap-schema/_skill.yaml +4 -2
  428. package/skills/synap-schema/common-mistakes.md +4 -2
  429. package/skills/synap-schema/discover-profiles.md +1 -1
  430. package/skills/synap-schema/entity-scope.md +15 -3
  431. package/skills/synap-schema/extend-first.md +29 -0
  432. package/skills/synap-schema/extend-vs-create.md +1 -1
  433. package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
  434. package/skills/synap-schema/property-types.md +1 -1
  435. package/skills/synap-schema/relations.md +1 -1
  436. package/skills/synap-ui/SKILL.md +19 -12
  437. package/skills/synap-ui/_skill.yaml +1 -1
  438. package/skills/synap-ui/ai-companion.md +1 -1
  439. package/skills/synap-ui/arranging-bento.md +2 -0
  440. package/skills/synap-ui/bento-layouts.md +10 -10
  441. package/skills/synap-ui/bento-recipes.md +313 -543
  442. package/skills/synap-ui/four-builds.md +5 -0
  443. package/skills/synap-ui/view-types.md +2 -2
  444. package/skills/synap-ui/widget-catalog.md +22 -278
  445. package/templates/automations/bookmark-enrichment.automation.json +290 -13
  446. package/templates/automations/url-bookmark-capture.automation.json +73 -11
  447. package/templates/skills/authoring-playbooks/SKILL.md +6 -3
  448. package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
  449. package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
  450. package/dist/commands/infra.d.ts +0 -21
  451. package/dist/commands/infra.js +0 -262
  452. package/dist/commands/infra.js.map +0 -1
  453. package/dist/lib/browser-auth.d.ts +0 -35
  454. package/dist/lib/browser-auth.js +0 -170
  455. package/dist/lib/browser-auth.js.map +0 -1
  456. package/dist/lib/openclaw.d.ts +0 -32
  457. package/dist/lib/openclaw.js +0 -164
  458. package/dist/lib/openclaw.js.map +0 -1
  459. package/dist/lib/seed.d.ts +0 -13
  460. package/dist/lib/seed.js +0 -135
  461. package/dist/lib/seed.js.map +0 -1
@@ -4,41 +4,318 @@
4
4
  "status": "active",
5
5
  "triggerConfig": {
6
6
  "eventPattern": "entity.create.completed",
7
- "filters": { "profileSlug": "bookmark" }
7
+ "filters": {
8
+ "profileSlug": "bookmark"
9
+ }
8
10
  },
9
11
  "flowDefinition": {
10
12
  "nodes": [
11
13
  {
12
14
  "id": "trigger",
13
15
  "type": "trigger",
14
- "position": { "x": 0, "y": 0 },
16
+ "position": {
17
+ "x": 0,
18
+ "y": 0
19
+ },
15
20
  "data": {
16
21
  "triggerType": "event",
17
22
  "label": "Bookmark created",
18
23
  "config": {
19
24
  "eventPattern": "entity.create.completed",
20
- "filters": { "profileSlug": "bookmark" }
25
+ "filters": {
26
+ "profileSlug": "bookmark"
27
+ }
21
28
  }
22
29
  }
23
30
  },
24
31
  {
25
- "id": "enrich",
26
- "type": "skill",
27
- "position": { "x": 0, "y": 120 },
32
+ "id": "read",
33
+ "type": "entity_read",
34
+ "position": {
35
+ "x": 0,
36
+ "y": 120
37
+ },
28
38
  "data": {
29
- "label": "Bookmark Enrichment",
30
- "skillName": "bookmark-enrichment",
31
- "skillTitle": "Bookmark Enrichment",
39
+ "label": "Read the bookmark",
40
+ "entityId": "{{trigger.payload.subjectId}}"
41
+ }
42
+ },
43
+ {
44
+ "id": "graph-context",
45
+ "type": "related_entities",
46
+ "position": {
47
+ "x": 0,
48
+ "y": 240
49
+ },
50
+ "data": {
51
+ "label": "What the graph already connects (deterministic)",
52
+ "entityId": "{{trigger.payload.subjectId}}",
53
+ "direction": "both",
54
+ "limit": 10
55
+ }
56
+ },
57
+ {
58
+ "id": "channel-talk",
59
+ "type": "messages_query",
60
+ "position": {
61
+ "x": 0,
62
+ "y": 360
63
+ },
64
+ "data": {
65
+ "label": "What was being discussed (deterministic)",
66
+ "channelId": "{{steps.read.output.entity.properties.sourceChannelId}}",
67
+ "limit": 10,
68
+ "errorHandling": {
69
+ "continueOnError": true
70
+ }
71
+ }
72
+ },
73
+ {
74
+ "id": "sharer-lookup",
75
+ "type": "query",
76
+ "position": {
77
+ "x": 0,
78
+ "y": 480
79
+ },
80
+ "data": {
81
+ "label": "Resolve the sharer to a person entity (deterministic)",
82
+ "profileSlug": "person",
83
+ "filter": "{\"title\": \"{{steps.read.output.entity.properties.sharedBy}}\"}",
84
+ "limit": 5
85
+ }
86
+ },
87
+ {
88
+ "id": "has-sharer-name",
89
+ "type": "condition",
90
+ "position": {
91
+ "x": 0,
92
+ "y": 600
93
+ },
94
+ "data": {
95
+ "label": "Bookmark carries a sharer name?",
96
+ "expression": "steps.read.output.entity.properties.sharedBy !== ''"
97
+ }
98
+ },
99
+ {
100
+ "id": "sharer-matches",
101
+ "type": "condition",
102
+ "position": {
103
+ "x": 0,
104
+ "y": 720
105
+ },
106
+ "data": {
107
+ "label": "Matched person's title equals the sharer name exactly?",
108
+ "expression": "steps.sharer-lookup.output.entities.0.title === steps.read.output.entity.properties.sharedBy"
109
+ }
110
+ },
111
+ {
112
+ "id": "link-sharer",
113
+ "type": "output",
114
+ "position": {
115
+ "x": 0,
116
+ "y": 840
117
+ },
118
+ "data": {
119
+ "label": "Link bookmark → the person who shared it",
120
+ "outputType": "relation_create",
121
+ "config": {
122
+ "fromEntityId": "{{trigger.payload.subjectId}}",
123
+ "toEntityId": "{{steps.sharer-lookup.output.entities.0.id}}",
124
+ "relationType": "created_by"
125
+ }
126
+ }
127
+ },
128
+ {
129
+ "id": "classify",
130
+ "type": "capability",
131
+ "position": {
132
+ "x": 0,
133
+ "y": 1200
134
+ },
135
+ "data": {
136
+ "label": "Describe + classify (AI) — title only if the captured one is unusable",
137
+ "verbId": "ai.generate",
32
138
  "inputMapping": {
33
- "entityId": "{{trigger.payload.subjectId}}"
139
+ "system": "You name saved links for a personal knowledge base. Answer with a JSON object and nothing else: {\"title\": string, \"description\": string, \"category\": string}. `title` is a short human-readable name for the link (max 70 chars, no URL, no quotes). `description` is one factual sentence (max 200 chars). `category` is ONE lowercase word from: article, video, tool, repo, docs, social, media, other. You CANNOT open the link. Use ONLY the URL, the already-resolved graph context and the surrounding conversation you are given. `description` and `category` are ALWAYS used. `title` is used ONLY when the link has no usable name yet — when 'Current name' below already reads like a real title, it is kept and yours is discarded, so never optimise for replacing it. If the material does not tell you what the page is, set `title` to the empty string rather than guessing.",
140
+ "prompt": "URL: {{steps.read.output.entity.properties.url}}\nCurrent name: {{steps.read.output.entity.title}}\nShared by: {{steps.read.output.entity.properties.sharedBy}}\n\nAlready connected in the graph:\n{{steps.graph-context.output.entities}}\n\nSurrounding conversation in the source channel:\n{{steps.channel-talk.output.messages}}\n\nThe message it arrived in:\n{{steps.read.output.entity.preview}}",
141
+ "json": "true",
142
+ "maxTokens": "2000"
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "id": "apply-enrich",
148
+ "type": "output",
149
+ "position": {
150
+ "x": -400,
151
+ "y": 1500
152
+ },
153
+ "data": {
154
+ "label": "Write description + category back (always)",
155
+ "outputType": "entity_update",
156
+ "config": {
157
+ "entityId": "{{trigger.payload.subjectId}}",
158
+ "properties": {
159
+ "description": "{{steps.classify.output.description}}",
160
+ "category": "{{steps.classify.output.category}}"
161
+ }
162
+ }
163
+ }
164
+ },
165
+ {
166
+ "id": "title-present",
167
+ "type": "condition",
168
+ "position": {
169
+ "x": 400,
170
+ "y": 1350
171
+ },
172
+ "data": {
173
+ "label": "Did the link arrive with a name?",
174
+ "expression": "steps.read.output.entity.title !== ''"
175
+ }
176
+ },
177
+ {
178
+ "id": "title-not-url",
179
+ "type": "condition",
180
+ "position": {
181
+ "x": 400,
182
+ "y": 1470
183
+ },
184
+ "data": {
185
+ "label": "…and is that name more than the raw URL?",
186
+ "expression": "steps.read.output.entity.title !== steps.read.output.entity.properties.url"
187
+ }
188
+ },
189
+ {
190
+ "id": "usable-title",
191
+ "type": "guard",
192
+ "position": {
193
+ "x": 0,
194
+ "y": 1320
195
+ },
196
+ "data": {
197
+ "label": "Only rename when the model produced a real title",
198
+ "checks": [
199
+ {
200
+ "path": "steps.classify.output.title",
201
+ "minLength": 3,
202
+ "message": "ai.generate returned no usable title — leaving the bookmark's captured name untouched."
203
+ }
204
+ ]
205
+ }
206
+ },
207
+ {
208
+ "id": "apply-title",
209
+ "type": "output",
210
+ "position": {
211
+ "x": 0,
212
+ "y": 1440
213
+ },
214
+ "data": {
215
+ "label": "Write the AI title back (only when the captured one was unusable)",
216
+ "outputType": "entity_update",
217
+ "config": {
218
+ "entityId": "{{trigger.payload.subjectId}}",
219
+ "title": "{{steps.classify.output.title}}",
220
+ "properties": {
221
+ "title": "{{steps.classify.output.title}}"
222
+ }
34
223
  }
35
224
  }
36
225
  }
37
226
  ],
38
- "edges": [{ "id": "e1", "source": "trigger", "target": "enrich" }]
227
+ "edges": [
228
+ {
229
+ "id": "trigger->read",
230
+ "source": "trigger",
231
+ "target": "read"
232
+ },
233
+ {
234
+ "id": "read->graph-context",
235
+ "source": "read",
236
+ "target": "graph-context"
237
+ },
238
+ {
239
+ "id": "graph-context->channel-talk",
240
+ "source": "graph-context",
241
+ "target": "channel-talk"
242
+ },
243
+ {
244
+ "id": "channel-talk->sharer-lookup",
245
+ "source": "channel-talk",
246
+ "target": "sharer-lookup"
247
+ },
248
+ {
249
+ "id": "sharer-lookup->has-sharer-name",
250
+ "source": "sharer-lookup",
251
+ "target": "has-sharer-name"
252
+ },
253
+ {
254
+ "id": "has-sharer-name->sharer-matches",
255
+ "source": "has-sharer-name",
256
+ "target": "sharer-matches",
257
+ "sourceHandle": "yes"
258
+ },
259
+ {
260
+ "id": "sharer-matches->link-sharer",
261
+ "source": "sharer-matches",
262
+ "target": "link-sharer",
263
+ "sourceHandle": "yes"
264
+ },
265
+ {
266
+ "id": "link-sharer->classify",
267
+ "source": "link-sharer",
268
+ "target": "classify"
269
+ },
270
+ {
271
+ "id": "has-sharer-name->classify",
272
+ "source": "has-sharer-name",
273
+ "target": "classify",
274
+ "sourceHandle": "no"
275
+ },
276
+ {
277
+ "id": "sharer-matches->classify",
278
+ "source": "sharer-matches",
279
+ "target": "classify",
280
+ "sourceHandle": "no"
281
+ },
282
+ {
283
+ "id": "classify->apply-enrich",
284
+ "source": "classify",
285
+ "target": "apply-enrich"
286
+ },
287
+ {
288
+ "id": "classify->title-present",
289
+ "source": "classify",
290
+ "target": "title-present"
291
+ },
292
+ {
293
+ "id": "title-present->title-not-url",
294
+ "source": "title-present",
295
+ "target": "title-not-url",
296
+ "sourceHandle": "yes"
297
+ },
298
+ {
299
+ "id": "title-present->usable-title",
300
+ "source": "title-present",
301
+ "target": "usable-title",
302
+ "sourceHandle": "no"
303
+ },
304
+ {
305
+ "id": "title-not-url->usable-title",
306
+ "source": "title-not-url",
307
+ "target": "usable-title",
308
+ "sourceHandle": "no"
309
+ },
310
+ {
311
+ "id": "usable-title->apply-title",
312
+ "source": "usable-title",
313
+ "target": "apply-title"
314
+ }
315
+ ]
39
316
  },
40
317
  "metadata": {
41
318
  "source": "bridge-template",
42
- "note": "The skill node carries `skillName`; the CLI seed command resolves it to the live `skillId` at install time (GET /skills by name)."
319
+ "note": "DETERMINISTIC-FIRST. Everything reachable without a network call runs BEFORE the AI: `related_entities` (what the graph already connects to this bookmark — the capture flow's `references` edge to the channel's bound entity lands here), `messages_query` on the captured `sourceChannelId` (what was being discussed), and a `query` on `person` resolving the captured `sharedBy` display name to a real person entity, linked with the EXISTING `created_by` relation def (no new def, no new node type). ai.generate is now the LAST RESORT: it runs only when the captured name is empty OR is the raw URL — the branch `title-present`→`title-not-url` — so a human-written message preview is never overwritten by a guess, and when the AI does run it is handed the deterministic context instead of a bare URL. Two condition merges (`title-present`, `classify`) rely on markDescendantsSkipped's live-parent rule (graph-topology.ts) — a merge node survives as long as ONE incoming edge is unpruned. `sharer-lookup` uses the STRING filter form on purpose: `parseQueryFilterConditions` template-resolves a STRING filter but pushes an OBJECT filter's values RAW, so the object form would have compared the literal `{{...}}` text and silently matched nothing. The `sharer-matches` exact-equality condition is the containment for that string form: if a name with a quote breaks JSON.parse the filter is dropped and the query widens, and this check refuses to link a non-identical title. `messages_query` carries `continueOnError` because it THROWS when the channel is not visible in the automation's workspace. NOT expressible today: host→company/tool matching. `transform` has no host/hostname pipe and the query filter compiles only exact equality ($eq/$gt/$gte/$lt/$lte/$ne — no substring/LIKE), so a host could never be matched against a `website` property holding a full URL. A page `fetch` is deliberately still absent."
43
320
  }
44
- }
321
+ }
@@ -22,18 +22,36 @@
22
22
  }
23
23
  },
24
24
  {
25
- "id": "extract",
25
+ "id": "content",
26
26
  "type": "transform",
27
27
  "position": { "x": 0, "y": 120 },
28
28
  "data": {
29
- "label": "Extract URLs",
30
- "expression": "{{trigger.payload.data.content}} | url_extract"
29
+ "label": "Trim message text",
30
+ "expression": "{{trigger.payload.data.content}} | trim"
31
+ }
32
+ },
33
+ {
34
+ "id": "title-src",
35
+ "type": "transform",
36
+ "position": { "x": 0, "y": 240 },
37
+ "data": {
38
+ "label": "Human text (title source)",
39
+ "expression": "{{trigger.payload.data.messagePreview}} | trim"
40
+ }
41
+ },
42
+ {
43
+ "id": "extract",
44
+ "type": "transform",
45
+ "position": { "x": 0, "y": 360 },
46
+ "data": {
47
+ "label": "Extract URLs · drop bare-link noise",
48
+ "expression": "{{trigger.payload.data.content}} | url_extract | unique | filter:item !== steps.content.output.result | slice:5"
31
49
  }
32
50
  },
33
51
  {
34
52
  "id": "url-loop",
35
53
  "type": "loop",
36
- "position": { "x": 0, "y": 240 },
54
+ "position": { "x": 0, "y": 480 },
37
55
  "data": {
38
56
  "label": "For each URL",
39
57
  "iteratorExpression": "steps.extract.output.result",
@@ -43,28 +61,72 @@
43
61
  {
44
62
  "id": "create-bookmark",
45
63
  "type": "output",
46
- "position": { "x": 0, "y": 360 },
64
+ "position": { "x": 0, "y": 600 },
47
65
  "data": {
48
66
  "label": "Create bookmark",
49
67
  "outputType": "entity_create",
50
68
  "config": {
51
69
  "profileSlug": "bookmark",
52
- "title": "{{loop.item}}",
70
+ "title": "{{steps.title-src.output.result}}",
53
71
  "dedupeBy": "url",
72
+ "body": "{{steps.content.output.result}}",
54
73
  "properties": {
55
74
  "url": "{{loop.item}}",
75
+ "sourceChannelId": "{{trigger.payload.data.channelId}}",
76
+ "sourceThreadId": "{{trigger.payload.data.threadId}}",
56
77
  "sourceMessageId": "{{trigger.payload.data.messageId}}",
57
- "sourceChannelId": "{{trigger.payload.data.threadId}}"
78
+ "sourceProvider": "{{trigger.payload.data.provider}}",
79
+ "sharedBy": "{{trigger.payload.data.participantName}}"
58
80
  }
59
81
  }
60
82
  }
83
+ },
84
+ {
85
+ "id": "has-bookmark-id",
86
+ "type": "condition",
87
+ "position": { "x": 0, "y": 720 },
88
+ "data": {
89
+ "label": "Bookmark row exists?",
90
+ "expression": "steps.create-bookmark.output.entityId !== ''"
91
+ }
92
+ },
93
+ {
94
+ "id": "has-context-entity",
95
+ "type": "condition",
96
+ "position": { "x": 0, "y": 840 },
97
+ "data": {
98
+ "label": "Channel bound to an entity?",
99
+ "expression": "trigger.payload.data.entityId !== ''"
100
+ }
101
+ },
102
+ {
103
+ "id": "link-context",
104
+ "type": "output",
105
+ "position": { "x": 0, "y": 960 },
106
+ "data": {
107
+ "label": "Link bookmark → channel's entity",
108
+ "outputType": "relation_create",
109
+ "config": {
110
+ "fromEntityId": "{{steps.create-bookmark.output.entityId}}",
111
+ "toEntityId": "{{trigger.payload.data.entityId}}",
112
+ "relationType": "references"
113
+ }
114
+ }
61
115
  }
62
116
  ],
63
117
  "edges": [
64
- { "id": "e1", "source": "trigger", "target": "extract" },
65
- { "id": "e2", "source": "extract", "target": "url-loop" },
66
- { "id": "e3", "source": "url-loop", "target": "create-bookmark" }
118
+ { "id": "e1", "source": "trigger", "target": "content" },
119
+ { "id": "e2", "source": "content", "target": "title-src" },
120
+ { "id": "e3", "source": "title-src", "target": "extract" },
121
+ { "id": "e4", "source": "extract", "target": "url-loop" },
122
+ { "id": "e5", "source": "url-loop", "target": "create-bookmark" },
123
+ { "id": "e6", "source": "create-bookmark", "target": "has-bookmark-id" },
124
+ { "id": "e7", "source": "has-bookmark-id", "target": "has-context-entity", "sourceHandle": "yes" },
125
+ { "id": "e8", "source": "has-context-entity", "target": "link-context", "sourceHandle": "yes" }
67
126
  ]
68
127
  },
69
- "metadata": { "source": "bridge-template" }
128
+ "metadata": {
129
+ "source": "bridge-template",
130
+ "note": "Phase 1 is DETERMINISTIC — no AI. It keeps the context the trigger already hands it: data.channelId (the INTERNAL Synap channel UUID, not the Discord snowflake, which is kept separately as sourceThreadId), data.content (as the bookmark body) and data.entityId (the channel's bound entity, linked with a `references` relation). Title = the message's own 120-char preview; when the message is nothing but a link the item is dropped by the noise filter rather than named, so the title is never invented. Noise filter: `filter:item !== steps.content.output.result` keeps only links that arrived WITH human text — a Tenor/giphy GIF drop or a bare Google Photos paste is exactly a message whose whole trimmed text IS the URL. A host denylist is NOT expressible: the condition grammar (condition-eval.ts) has no substring/regex operator and `contains` is exact set intersection, so any 'tenor.com'-style match would silently never fire."
131
+ }
70
132
  }
@@ -32,7 +32,7 @@ A playbook is **not** authored as a standalone file. It ships **inside a Capabil
32
32
  2. It is materialized by `createCapabilityFromDefinition()` when the capability is applied via `POST /api/hub/capabilities/apply`. Playbooks REQUIRE a `workspaceId` at apply time.
33
33
  3. The Discord bridge seeds it by adding the capability key to `AGENCY_CAPABILITY_PLAN` in `synap-cli/src/commands/bridge-setup.ts` with `workspaceScoped: true` (the flag that tells the bridge this capability bundles playbooks, so it must be applied with a workspace).
34
34
 
35
- **GOTCHA — do not copy the vestigial file.** `synap-control-plane-api/templates/packs/deep-research.playbook.json` looks like a standalone playbook template but it is VESTIGIAL: its playbook-specific fields are dropped during materialization. Never copy it or treat it as the schema. The authoritative shape is the `playbooks[]` entry inside a `.capability.json`. For a real example **with ordered stages**, see `stellar-grant-client.capability.json` and `reference/worked-example.md` (note: `agency-skills.capability.json` bundles playbooks but their `stages` are `[]`, so it does not demo the stages contract).
35
+ **GOTCHA — do not copy the vestigial file.** `synap-control-plane-api/templates/packs/deep-research.playbook.json` looks like a standalone playbook template but it is VESTIGIAL: its playbook-specific fields are dropped during materialization. Never copy it or treat it as the schema. The authoritative shape is the `playbooks[]` entry inside a `.capability.json`. For a real example **with ordered stages**, see the "Grant Process" playbook in `synap-app/packages/workspace-templates/src/grants.yaml` (a `scope: project` method with 6 stages) and `reference/worked-example.md` (note: `agency-skills.capability.json` bundles playbooks but their `stages` are `[]`, so it does not demo the stages contract).
36
36
 
37
37
  ## Playbook field reference
38
38
 
@@ -68,13 +68,16 @@ Stages are **ordered** and drive the session's progression. Read `reference/stag
68
68
  ```jsonc
69
69
  "stages": [
70
70
  {
71
- "key": "scope", // stable id, referenced by currentStage
71
+ "key": "scope", // stable id, referenced by currentStage. Unique within the playbook.
72
72
  "name": "Scope",
73
+ "category": "started", // REQUIRED. backlog | planned | started | paused | completed | canceled
73
74
  "description": "Understand the client and their problem.",
74
75
  "goal": "Produce a one-paragraph problem statement.", // optional
75
76
  "grants": [{ "kind": "skill", "id": "client-brief" }], // optional, advisory hint (not enforced)
76
77
  "expectedOutputs": [{ "kind": "note", "label": "Problem statement" }],
77
- "suggestedTasks": ["Read the intake form", "List open questions"]
78
+ "suggestedTasks": ["Read the intake form", "List open questions"],
79
+ "position": 0, // optional, orders WITHIN the category group
80
+ "indefinite": false // optional, may a subject sit here forever?
78
81
  }
79
82
  ]
80
83
  ```
@@ -8,14 +8,28 @@ Stages are the first-class, ordered process steps of a playbook. They replaced t
8
8
  type PlaybookStage = {
9
9
  key: string; // stable identifier; what currentStage holds. Required.
10
10
  name: string; // human label. Required.
11
+ category: PlaybookStageCategory; // closed rollup bucket. REQUIRED — see below.
11
12
  description?: string; // what this stage is about
12
13
  goal?: string; // the concrete objective of this stage
13
14
  grants?: CapabilityRef[]; // advisory capability hints ({ kind: tool|skill|command, id }) — see note below
14
15
  expectedOutputs?: ExpectedOutput[];// deliverables expected before advancing ({ kind, label }; kind loosely typed)
15
16
  suggestedTasks?: string[]; // soft checklist the agent can turn into tasks
17
+ position?: number; // order WITHIN this stage's category group — not a global order
18
+ indefinite?: boolean; // may a subject sit here forever? absent/false ⇒ a long dwell is worth surfacing
16
19
  };
20
+
21
+ type PlaybookStageCategory =
22
+ | "backlog" // not committed
23
+ | "planned" // committed, not begun
24
+ | "started" // work under way
25
+ | "paused" // on hold
26
+ | "completed" // terminal, succeeded
27
+ | "canceled"; // terminal, abandoned
17
28
  ```
18
29
 
30
+ - `category` is **required and validated** — a write with a stage missing it, or carrying a value outside the six, is REJECTED at the door. `key`/`name` are your playbook's own vocabulary; `category` is the shared axis every playbook rolls up onto, so a board spanning several playbooks can group them without reconciling names (two playbooks' key sets are disjoint by construction). Pick the bucket by what the stage MEANS, not by its position: a stage named "Review" is `started` if someone is working it and `paused` if it is waiting on an outsider.
31
+ - `key` values must be **unique within one playbook** — `currentStage` stores the bare key, so a duplicate makes the active stage ambiguous. Also rejected at the door.
32
+ - `position` orders a stage **within its category group**, not globally. This is why ordering never needs cross-playbook reconciliation.
19
33
  - `key` is **stable** — `focus_sessions.currentStage` stores it, and `stage_changed` events carry it. Don't rename keys on a live playbook; add/deprecate instead.
20
34
  - Stages are **ordered** by their position in the `stages[]` array.
21
35
  - `grants` here are **advisory**: stored as opaque JSON and surfaced to the agent in the stage's kickoff prompt via `RunContext`, but NOT resolved into enforcement `capability` / `link` rows (hard enforcement is a documented follow-up). "Granting" a skill at a stage = telling the agent to use it there; the skill is already reachable via the pod skill catalog + `load_skill` regardless. Declare grants on stages, not at the playbook level — top-level playbook `grants` are dropped during materialization.
@@ -29,6 +43,7 @@ type PlaybookStage = {
29
43
 
30
44
  ## Design rules
31
45
 
46
+ - Assign `category` honestly. Most working stages are `started`; reserve `paused` for genuinely blocked-on-someone-else, and use `completed`/`canceled` only for terminal stages. Marking every stage `started` makes a cross-playbook board useless.
32
47
  - Keep stages **few and meaningful** (3–6 is typical). Each stage should represent a real change in what the agent is doing or waiting on.
33
48
  - Give every stage a `goal` and at least one `expectedOutput` so "done with this stage" is observable.
34
49
  - Use `suggestedTasks` for the soft checklist; use `expectedOutputs` for the hard deliverables that gate advancement. For `expectedOutputs[].kind`, keep to the shared (loosely typed) vocab `note` | `document` | `report`.
@@ -27,6 +27,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
27
27
  {
28
28
  "key": "scope",
29
29
  "name": "Scope",
30
+ "category": "started",
30
31
  "description": "Understand the company and the problem worth solving.",
31
32
  "goal": "Produce a one-paragraph problem statement grounded in the company context.",
32
33
  "grants": [{ "kind": "skill", "id": "client-brief" }],
@@ -36,6 +37,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
36
37
  {
37
38
  "key": "abstract",
38
39
  "name": "Abstract",
40
+ "category": "started",
39
41
  "description": "Turn the problem into a buildable specification.",
40
42
  "goal": "Write a spec: scope, constraints, success criteria, and the smallest first deliverable.",
41
43
  "expectedOutputs": [{ "kind": "document", "label": "Buildable spec" }],
@@ -44,6 +46,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
44
46
  {
45
47
  "key": "build",
46
48
  "name": "Build",
49
+ "category": "started",
47
50
  "description": "Ship the first deliverable against the spec.",
48
51
  "goal": "Produce a working first build and link it to the company.",
49
52
  "grants": [{ "kind": "tool", "id": "gdrive" }],
@@ -1,21 +0,0 @@
1
- /**
2
- * synap infra
3
- *
4
- * Infrastructure management via Dokploy — view servers, trigger deploys,
5
- * tail logs, and sync server state into Synap entities.
6
- *
7
- * synap infra — overview: servers + services status
8
- * synap infra status — same as above
9
- * synap infra deploy <app> — trigger a redeploy for a named app
10
- * synap infra logs <app> — tail logs for a service
11
- * synap infra sync — pull Dokploy state into Synap entities
12
- * synap infra open — open Dokploy dashboard in browser
13
- */
14
- export declare function infraStatus(): Promise<void>;
15
- export declare function infraDeploy(appName: string): Promise<void>;
16
- export declare function infraLogs(appName: string, opts: {
17
- lines?: number;
18
- follow?: boolean;
19
- }): Promise<void>;
20
- export declare function infraSync(podUrl: string, apiKey: string): Promise<void>;
21
- export declare function infraOpen(): void;