@synap-core/cli 1.8.0 → 1.11.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 (372) hide show
  1. package/dist/commands/agent-chat.d.ts +47 -0
  2. package/dist/commands/agent-chat.js +250 -0
  3. package/dist/commands/agent-chat.js.map +1 -0
  4. package/dist/commands/agent-run.js +3 -4
  5. package/dist/commands/agent-run.js.map +1 -1
  6. package/dist/commands/agents.js +85 -46
  7. package/dist/commands/agents.js.map +1 -1
  8. package/dist/commands/automation.js +2 -1
  9. package/dist/commands/automation.js.map +1 -1
  10. package/dist/commands/bridge-setup.d.ts +66 -0
  11. package/dist/commands/bridge-setup.js +1112 -0
  12. package/dist/commands/bridge-setup.js.map +1 -0
  13. package/dist/commands/cap-connections.d.ts +28 -0
  14. package/dist/commands/cap-connections.js +224 -0
  15. package/dist/commands/cap-connections.js.map +1 -0
  16. package/dist/commands/capability.d.ts +89 -0
  17. package/dist/commands/capability.js +1594 -0
  18. package/dist/commands/capability.js.map +1 -0
  19. package/dist/commands/centrality.d.ts +20 -0
  20. package/dist/commands/centrality.js +95 -0
  21. package/dist/commands/centrality.js.map +1 -0
  22. package/dist/commands/connect.d.ts +2 -0
  23. package/dist/commands/connect.js +16 -35
  24. package/dist/commands/connect.js.map +1 -1
  25. package/dist/commands/context.js +6 -7
  26. package/dist/commands/context.js.map +1 -1
  27. package/dist/commands/data-extra.d.ts +1 -0
  28. package/dist/commands/data-extra.js +41 -14
  29. package/dist/commands/data-extra.js.map +1 -1
  30. package/dist/commands/data.d.ts +4 -4
  31. package/dist/commands/data.js +254 -187
  32. package/dist/commands/data.js.map +1 -1
  33. package/dist/commands/diagnose.d.ts +20 -0
  34. package/dist/commands/diagnose.js +186 -0
  35. package/dist/commands/diagnose.js.map +1 -0
  36. package/dist/commands/digest.d.ts +17 -0
  37. package/dist/commands/digest.js +122 -0
  38. package/dist/commands/digest.js.map +1 -0
  39. package/dist/commands/discover.d.ts +2 -0
  40. package/dist/commands/discover.js +25 -8
  41. package/dist/commands/discover.js.map +1 -1
  42. package/dist/commands/doc.d.ts +14 -0
  43. package/dist/commands/doc.js +61 -4
  44. package/dist/commands/doc.js.map +1 -1
  45. package/dist/commands/doctor.d.ts +21 -0
  46. package/dist/commands/doctor.js +189 -0
  47. package/dist/commands/doctor.js.map +1 -0
  48. package/dist/commands/events.js +5 -2
  49. package/dist/commands/events.js.map +1 -1
  50. package/dist/commands/explain.d.ts +1 -1
  51. package/dist/commands/explain.js +18 -15
  52. package/dist/commands/explain.js.map +1 -1
  53. package/dist/commands/facet.d.ts +29 -0
  54. package/dist/commands/facet.js +113 -0
  55. package/dist/commands/facet.js.map +1 -0
  56. package/dist/commands/graph.js +7 -4
  57. package/dist/commands/graph.js.map +1 -1
  58. package/dist/commands/import.d.ts +38 -0
  59. package/dist/commands/import.js +471 -0
  60. package/dist/commands/import.js.map +1 -0
  61. package/dist/commands/init.js +35 -16
  62. package/dist/commands/init.js.map +1 -1
  63. package/dist/commands/keys.js +3 -4
  64. package/dist/commands/keys.js.map +1 -1
  65. package/dist/commands/knowledge.d.ts +8 -0
  66. package/dist/commands/knowledge.js +308 -33
  67. package/dist/commands/knowledge.js.map +1 -1
  68. package/dist/commands/launch.d.ts +50 -0
  69. package/dist/commands/launch.js +790 -0
  70. package/dist/commands/launch.js.map +1 -0
  71. package/dist/commands/lens.d.ts +45 -0
  72. package/dist/commands/lens.js +386 -0
  73. package/dist/commands/lens.js.map +1 -0
  74. package/dist/commands/market-authoring.d.ts +45 -0
  75. package/dist/commands/market-authoring.js +225 -0
  76. package/dist/commands/market-authoring.js.map +1 -0
  77. package/dist/commands/market.d.ts +224 -0
  78. package/dist/commands/market.js +1643 -0
  79. package/dist/commands/market.js.map +1 -0
  80. package/dist/commands/mcp.d.ts +64 -0
  81. package/dist/commands/mcp.js +265 -0
  82. package/dist/commands/mcp.js.map +1 -0
  83. package/dist/commands/observe.js +14 -11
  84. package/dist/commands/observe.js.map +1 -1
  85. package/dist/commands/open.d.ts +21 -4
  86. package/dist/commands/open.js +45 -4
  87. package/dist/commands/open.js.map +1 -1
  88. package/dist/commands/pod.d.ts +100 -0
  89. package/dist/commands/pod.js +359 -0
  90. package/dist/commands/pod.js.map +1 -0
  91. package/dist/commands/pods.d.ts +15 -0
  92. package/dist/commands/pods.js +233 -17
  93. package/dist/commands/pods.js.map +1 -1
  94. package/dist/commands/proposals-actions.js +43 -3
  95. package/dist/commands/proposals-actions.js.map +1 -1
  96. package/dist/commands/purge.d.ts +23 -0
  97. package/dist/commands/purge.js +148 -0
  98. package/dist/commands/purge.js.map +1 -0
  99. package/dist/commands/raycast.d.ts +15 -0
  100. package/dist/commands/raycast.js +153 -0
  101. package/dist/commands/raycast.js.map +1 -0
  102. package/dist/commands/sessions.js +47 -22
  103. package/dist/commands/sessions.js.map +1 -1
  104. package/dist/commands/skill-manage.d.ts +21 -0
  105. package/dist/commands/skill-manage.js +195 -0
  106. package/dist/commands/skill-manage.js.map +1 -0
  107. package/dist/commands/skills-commands.js +2 -1
  108. package/dist/commands/skills-commands.js.map +1 -1
  109. package/dist/commands/skills.js +7 -4
  110. package/dist/commands/skills.js.map +1 -1
  111. package/dist/commands/status.d.ts +3 -1
  112. package/dist/commands/status.js +166 -14
  113. package/dist/commands/status.js.map +1 -1
  114. package/dist/commands/statusline.d.ts +24 -0
  115. package/dist/commands/statusline.js +450 -0
  116. package/dist/commands/statusline.js.map +1 -0
  117. package/dist/commands/subscribe.js +2 -2
  118. package/dist/commands/subscribe.js.map +1 -1
  119. package/dist/commands/template.d.ts +42 -0
  120. package/dist/commands/template.js +191 -0
  121. package/dist/commands/template.js.map +1 -0
  122. package/dist/commands/tools.d.ts +30 -0
  123. package/dist/commands/tools.js +315 -0
  124. package/dist/commands/tools.js.map +1 -0
  125. package/dist/commands/upload.d.ts +30 -0
  126. package/dist/commands/upload.js +155 -0
  127. package/dist/commands/upload.js.map +1 -0
  128. package/dist/commands/versions.d.ts +27 -0
  129. package/dist/commands/versions.js +277 -0
  130. package/dist/commands/versions.js.map +1 -0
  131. package/dist/commands/view.js +3 -2
  132. package/dist/commands/view.js.map +1 -1
  133. package/dist/commands/whoami.d.ts +21 -0
  134. package/dist/commands/whoami.js +129 -0
  135. package/dist/commands/whoami.js.map +1 -0
  136. package/dist/index.js +894 -60
  137. package/dist/index.js.map +1 -1
  138. package/dist/lib/approval-poll.d.ts +42 -0
  139. package/dist/lib/approval-poll.js +52 -0
  140. package/dist/lib/approval-poll.js.map +1 -0
  141. package/dist/lib/auth.d.ts +29 -6
  142. package/dist/lib/auth.js +105 -94
  143. package/dist/lib/auth.js.map +1 -1
  144. package/dist/lib/bundle-version.d.ts +11 -0
  145. package/dist/lib/bundle-version.js +33 -0
  146. package/dist/lib/bundle-version.js.map +1 -0
  147. package/dist/lib/capture-lane.d.ts +30 -12
  148. package/dist/lib/capture-lane.js +73 -14
  149. package/dist/lib/capture-lane.js.map +1 -1
  150. package/dist/lib/capture-structure.d.ts +123 -0
  151. package/dist/lib/capture-structure.js +57 -0
  152. package/dist/lib/capture-structure.js.map +1 -0
  153. package/dist/lib/cp-packages.d.ts +177 -0
  154. package/dist/lib/cp-packages.js +389 -0
  155. package/dist/lib/cp-packages.js.map +1 -0
  156. package/dist/lib/describe-lens.d.ts +46 -0
  157. package/dist/lib/describe-lens.js +33 -0
  158. package/dist/lib/describe-lens.js.map +1 -0
  159. package/dist/lib/hub-client.d.ts +91 -1
  160. package/dist/lib/hub-client.js +565 -22
  161. package/dist/lib/hub-client.js.map +1 -1
  162. package/dist/lib/id.d.ts +23 -0
  163. package/dist/lib/id.js +35 -0
  164. package/dist/lib/id.js.map +1 -0
  165. package/dist/lib/installed.d.ts +51 -0
  166. package/dist/lib/installed.js +70 -0
  167. package/dist/lib/installed.js.map +1 -0
  168. package/dist/lib/next-steps.d.ts +61 -0
  169. package/dist/lib/next-steps.js +146 -0
  170. package/dist/lib/next-steps.js.map +1 -0
  171. package/dist/lib/pod.d.ts +144 -22
  172. package/dist/lib/pod.js +302 -64
  173. package/dist/lib/pod.js.map +1 -1
  174. package/dist/lib/project-ref.d.ts +95 -0
  175. package/dist/lib/project-ref.js +144 -0
  176. package/dist/lib/project-ref.js.map +1 -0
  177. package/dist/lib/project.d.ts +35 -0
  178. package/dist/lib/project.js +39 -0
  179. package/dist/lib/project.js.map +1 -0
  180. package/dist/lib/session-lens.d.ts +33 -0
  181. package/dist/lib/session-lens.js +76 -0
  182. package/dist/lib/session-lens.js.map +1 -0
  183. package/dist/lib/skill-import.d.ts +40 -0
  184. package/dist/lib/skill-import.js +203 -0
  185. package/dist/lib/skill-import.js.map +1 -0
  186. package/dist/lib/skills-installer.d.ts +17 -6
  187. package/dist/lib/skills-installer.js +133 -19
  188. package/dist/lib/skills-installer.js.map +1 -1
  189. package/dist/lib/suite.d.ts +28 -0
  190. package/dist/lib/suite.js +29 -0
  191. package/dist/lib/suite.js.map +1 -0
  192. package/dist/lib/superwhisper-import.d.ts +40 -0
  193. package/dist/lib/superwhisper-import.js +389 -0
  194. package/dist/lib/superwhisper-import.js.map +1 -0
  195. package/dist/lib/targets.d.ts +49 -1
  196. package/dist/lib/targets.js +420 -288
  197. package/dist/lib/targets.js.map +1 -1
  198. package/dist/lib/template-file.d.ts +74 -0
  199. package/dist/lib/template-file.js +140 -0
  200. package/dist/lib/template-file.js.map +1 -0
  201. package/dist/lib/unwrapList.d.ts +1 -0
  202. package/dist/lib/unwrapList.js +20 -0
  203. package/dist/lib/unwrapList.js.map +1 -0
  204. package/dist/utils/logger.d.ts +2 -0
  205. package/dist/utils/logger.js +10 -2
  206. package/dist/utils/logger.js.map +1 -1
  207. package/node_modules/@synap/hub-rest-client/dist/index.cjs +414 -34
  208. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +762 -22
  209. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +762 -22
  210. package/node_modules/@synap/hub-rest-client/dist/index.js +414 -34
  211. package/node_modules/@synap/hub-rest-client/package.json +1 -1
  212. package/node_modules/@synap/hub-rest-client/src/client.ts +525 -37
  213. package/node_modules/@synap/hub-rest-client/src/index.ts +42 -0
  214. package/node_modules/@synap/hub-rest-client/src/setup.ts +57 -1
  215. package/node_modules/@synap/hub-rest-client/src/types.ts +697 -37
  216. package/package.json +11 -5
  217. package/skills/agent-os/SKILL.md +218 -0
  218. package/skills/manifest.json +5 -0
  219. package/skills/onboard/SKILL.md +193 -0
  220. package/skills/synap/SKILL.md +1284 -58
  221. package/skills/synap/_order.txt +37 -0
  222. package/skills/synap/_skill.yaml +24 -0
  223. package/skills/synap/authentication.md +10 -0
  224. package/skills/synap/automations.md +264 -0
  225. package/skills/synap/capabilities.md +107 -0
  226. package/skills/synap/capture.md +50 -142
  227. package/skills/synap/cli-operations.md +107 -0
  228. package/skills/synap/common-mistakes.md +13 -0
  229. package/skills/synap/content-os.md +83 -0
  230. package/skills/synap/creative-loop.md +43 -0
  231. package/skills/synap/crm.md +117 -0
  232. package/skills/synap/diagnostics.md +35 -0
  233. package/skills/synap/digesting-a-channel.md +63 -0
  234. package/skills/synap/document-embeds.md +123 -0
  235. package/skills/synap/escalation-ladder.md +71 -0
  236. package/skills/synap/focus-sessions.md +47 -0
  237. package/skills/synap/governance-rules.md +64 -0
  238. package/skills/synap/governance.md +6 -6
  239. package/skills/synap/graph-gardening.md +21 -0
  240. package/skills/synap/inline-patterns.md +38 -0
  241. package/skills/synap/lenses.md +38 -0
  242. package/skills/synap/linking-principle.md +39 -0
  243. package/skills/synap/linking.md +1 -0
  244. package/skills/synap/mental-model.md +45 -0
  245. package/skills/synap/more.md +7 -0
  246. package/skills/synap/multi-entity-capture.md +12 -0
  247. package/skills/synap/next-action.md +37 -0
  248. package/skills/synap/north-star.md +17 -0
  249. package/skills/synap/operating-mode-rules.md +45 -0
  250. package/skills/synap/operating-mode.md +9 -0
  251. package/skills/synap/quick-reference.md +67 -0
  252. package/skills/synap/reading.md +43 -0
  253. package/skills/synap/recap.md +21 -0
  254. package/skills/synap/reflexes.md +46 -0
  255. package/skills/synap/response-style.md +21 -0
  256. package/skills/synap/scope.md +13 -0
  257. package/skills/synap/showing.md +17 -0
  258. package/skills/synap/user-model.md +25 -0
  259. package/skills/synap/viewframe-cells.md +290 -0
  260. package/skills/synap/work-flow.md +113 -0
  261. package/skills/synap/worked-examples.md +74 -0
  262. package/skills/synap/workspace-design.md +45 -0
  263. package/skills/synap/workspace-edges.md +49 -0
  264. package/skills/synap/writes.md +213 -0
  265. package/skills/synap-app/SKILL.md +319 -0
  266. package/skills/synap-app/_order.txt +5 -0
  267. package/skills/synap-app/_skill.yaml +20 -0
  268. package/skills/synap-app/creating-the-base-app.md +64 -0
  269. package/skills/synap-app/governance.md +42 -0
  270. package/skills/synap-app/install-commands.md +55 -0
  271. package/skills/synap-app/overview.md +50 -0
  272. package/skills/synap-app/using-the-sdk.md +73 -0
  273. package/skills/synap-market/SKILL.md +335 -0
  274. package/skills/synap-market/_order.txt +5 -0
  275. package/skills/synap-market/_skill.yaml +24 -0
  276. package/skills/synap-market/author-and-publish.md +75 -0
  277. package/skills/synap-market/discover-and-fetch.md +59 -0
  278. package/skills/synap-market/governance-and-catalog.md +56 -0
  279. package/skills/synap-market/install.md +55 -0
  280. package/skills/synap-market/overview.md +51 -0
  281. package/skills/synap-schema/SKILL.md +97 -6
  282. package/skills/synap-schema/_order.txt +13 -0
  283. package/skills/synap-schema/_skill.yaml +22 -0
  284. package/skills/synap-schema/before-you-touch.md +14 -0
  285. package/skills/synap-schema/common-mistakes.md +9 -0
  286. package/skills/synap-schema/creating-profiles.md +17 -0
  287. package/skills/synap-schema/discover-profiles.md +24 -0
  288. package/skills/synap-schema/entity-scope.md +8 -0
  289. package/skills/synap-schema/extend-vs-create.md +31 -0
  290. package/skills/synap-schema/more.md +6 -0
  291. package/skills/synap-schema/overlay-properties.md +22 -0
  292. package/skills/synap-schema/profiles.md +3 -0
  293. package/skills/synap-schema/property-defs.md +29 -0
  294. package/skills/synap-schema/read-before-write.md +50 -0
  295. package/skills/synap-schema/relations.md +18 -0
  296. package/skills/synap-schema/worked-example.md +30 -0
  297. package/skills/synap-ui/SKILL.md +26 -2
  298. package/skills/synap-ui/_order.txt +13 -0
  299. package/skills/synap-ui/_skill.yaml +23 -0
  300. package/skills/synap-ui/ai-companion.md +27 -0
  301. package/skills/synap-ui/arranging-bento.md +8 -0
  302. package/skills/synap-ui/before-you-build.md +20 -0
  303. package/skills/synap-ui/bento-layouts.md +35 -0
  304. package/skills/synap-ui/common-mistakes.md +10 -0
  305. package/skills/synap-ui/creating-views.md +26 -0
  306. package/skills/synap-ui/four-builds.md +24 -0
  307. package/skills/synap-ui/more.md +7 -0
  308. package/skills/synap-ui/proposing-vs-extending.md +11 -0
  309. package/skills/synap-ui/view-list.md +24 -0
  310. package/skills/synap-ui/views.md +3 -0
  311. package/skills/synap-ui/worked-example.md +18 -0
  312. package/skills/synap-ui/workspaces.md +47 -0
  313. package/templates/automations/bookmark-enrichment.automation.json +44 -0
  314. package/templates/automations/mail-feed.automation.json +86 -0
  315. package/templates/automations/url-bookmark-capture.automation.json +70 -0
  316. package/templates/skills/README.md +21 -0
  317. package/templates/skills/authoring-automations/SKILL.md +95 -0
  318. package/templates/skills/authoring-automations/reference/node-matrix.md +49 -0
  319. package/templates/skills/authoring-capabilities/SKILL.md +93 -0
  320. package/templates/skills/authoring-capabilities/reference/template-anatomy.md +70 -0
  321. package/templates/skills/authoring-playbooks/SKILL.md +102 -0
  322. package/templates/skills/authoring-playbooks/reference/stages-contract.md +35 -0
  323. package/templates/skills/authoring-playbooks/reference/worked-example.md +64 -0
  324. package/templates/skills/bookmark-enrichment/SKILL.md +40 -0
  325. package/templates/skills/coordinating-agents/SKILL.md +32 -0
  326. package/templates/skills/coordinating-branches/SKILL.md +27 -0
  327. package/templates/skills/mapping-the-server/SKILL.md +54 -0
  328. package/templates/skills/reading-client-progress/SKILL.md +65 -0
  329. package/templates/skills/routing-to-channels/SKILL.md +54 -0
  330. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  331. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  332. package/templates/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  333. package/templates/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  334. package/templates/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  335. package/templates/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  336. package/templates/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  337. package/templates/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  338. package/templates/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  339. package/templates/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  340. package/templates/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  341. package/templates/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  342. package/templates/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  343. package/templates/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  344. package/templates/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  345. package/templates/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  346. package/templates/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  347. package/templates/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  348. package/templates/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  349. package/templates/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  350. package/templates/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  351. package/templates/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  352. package/templates/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  353. package/templates/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  354. package/templates/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  355. package/templates/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  356. package/templates/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  357. package/templates/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  358. package/dist/commands/connectors.d.ts +0 -31
  359. package/dist/commands/connectors.js +0 -276
  360. package/dist/commands/connectors.js.map +0 -1
  361. package/dist/commands/finish.d.ts +0 -25
  362. package/dist/commands/finish.js +0 -274
  363. package/dist/commands/finish.js.map +0 -1
  364. package/dist/commands/openclaw.d.ts +0 -40
  365. package/dist/commands/openclaw.js +0 -1148
  366. package/dist/commands/openclaw.js.map +0 -1
  367. package/dist/commands/security-audit.d.ts +0 -12
  368. package/dist/commands/security-audit.js +0 -100
  369. package/dist/commands/security-audit.js.map +0 -1
  370. package/dist/lib/hardening.d.ts +0 -18
  371. package/dist/lib/hardening.js +0 -214
  372. package/dist/lib/hardening.js.map +0 -1
@@ -0,0 +1,335 @@
1
+ ---
2
+ name: synap-market
3
+ description: >
4
+ Use this skill when the user (or an agent driving the CLI/MCP/HTTP) wants to
5
+ DISCOVER, INSTALL, or AUTHOR/PUBLISH marketplace & template data on Synap —
6
+ workspace templates, capabilities, automations, and cells. Triggers: "find a
7
+ template for X", "is there a marketplace package for Y", "install this
8
+ template/capability", "create a new template", "publish this as a
9
+ workspace/capability", "scaffold a template", "share my workspace as a
10
+ template", "make this private/public". NOT the `synap` skill (capture/recall
11
+ data INSIDE a workspace) nor `synap-schema` (extending the data model of an
12
+ existing workspace) nor `synap-ui` (building views/dashboards) — this skill is
13
+ about the PACKAGE layer: finding, installing, and publishing reusable
14
+ templates/capabilities/automations/cells to/from the Control Plane catalog.
15
+ metadata:
16
+ openclaw:
17
+ requires:
18
+ env: []
19
+ optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID, SYNAP_HUB_API_KEY]
20
+ primaryEnv: null
21
+ homepage: https://synap.live
22
+ capabilities:
23
+ [market-search, market-install, template-author, template-publish]
24
+ os: [macos, linux, windows]
25
+ userInvocable: true
26
+ ---
27
+
28
+ # Marketplace & templates on Synap
29
+
30
+ The marketplace is Synap's **package layer**: workspace templates, capabilities,
31
+ automations, and cells — anything that can be installed into a pod rather than
32
+ hand-built. It lives in the Control Plane (CP) catalog and is discoverable and
33
+ installable from any door: the `synap` CLI, MCP (`run_capability`), or the Hub
34
+ REST API (`/api/hub/capabilities/execute`).
35
+
36
+ ## The two reflexes
37
+
38
+ 1. **DISCOVER before you invent.** Before scaffolding a new template or
39
+ capability, search the catalog — `synap market --search "<query>"` or the
40
+ `market.search` verb. Someone may have already published what you need.
41
+ Reinventing a workspace that already exists as a template is wasted work
42
+ AND fragments the catalog.
43
+ 2. **One catalog, never a second one.** Every package — public or private —
44
+ lives in the CP's `synapPackages` table, reached through
45
+ `GET/POST /api/packages`. There is no side channel: don't write a
46
+ template to a random file and call it "published," and don't stand up a
47
+ local list of "known templates" — search the real catalog every time.
48
+
49
+ ## The four things this skill teaches
50
+
51
+ | Task | Doc |
52
+ | --------------------------------------------------------- | --------------------------- |
53
+ | Search/browse/fetch a package (any kind) | `discover-and-fetch.md` |
54
+ | Install a package into a pod | `install.md` |
55
+ | Author a new template and publish it (the ONE write door) | `author-and-publish.md` |
56
+ | Governance rules + the one-catalog principle | `governance-and-catalog.md` |
57
+
58
+ ## Package kinds
59
+
60
+ - **workspace / template** — a full workspace definition (profiles, views,
61
+ entity links) you can spin up as a new workspace, or reconcile onto an
62
+ existing one.
63
+ - **capability** — a tool + skill bundle (an integration or verb pack).
64
+ - **automation** — a trigger + action definition.
65
+ - **cell** — a custom UI renderer.
66
+
67
+ The CLI's browse filter (`market --type`) uses
68
+ `workspace|capability|skill|workflow|view|cell`; the pod-native install verb
69
+ (`market.install`) and its catalog use the narrower
70
+ `capability|automation|template|cell` (workspace ≡ template there). Match
71
+ whichever surface you're calling.
72
+
73
+ ## Visibility
74
+
75
+ Every package is **public** or **private** (owner-only). Default on publish is
76
+ **private** — you opt in to sharing with `--public`. A private package 404s
77
+ (not 403) to anyone who isn't its author or an active member of its owning pod
78
+ — see `governance-and-catalog.md`.
79
+
80
+ ---
81
+
82
+ # Discover & fetch
83
+
84
+ Three doors reach the same catalog. Pick the one that matches where you're
85
+ running.
86
+
87
+ ## CLI — `synap market`
88
+
89
+ ```bash
90
+ synap market # browse/list (the default action)
91
+ synap market --search "crm" # filter by name/description/slug
92
+ synap market --type capability # filter by type: workspace|capability|skill|workflow|view|cell
93
+ synap market --search "crm" --type workspace --json
94
+ ```
95
+
96
+ `market` with no subcommand lists; `--list` is accepted explicitly too. It
97
+ merges: your OWN packages (public + private, via `GET /api/packages/mine`)
98
+ with the PUBLIC catalog (`GET /api/packages`) — logged out, you only see the
99
+ public/bundled set.
100
+
101
+ Companion commands:
102
+
103
+ ```bash
104
+ synap market installed # what's already installed on THIS pod (pure read)
105
+ synap market installed --tree # composition graph: package → templates → workspaces
106
+ synap market update # check installed packages for drift against the catalog
107
+ ```
108
+
109
+ ## Pod verb — `market.search` (MCP / agent / automation)
110
+
111
+ The pod-native verb, run via MCP `run_capability` or
112
+ `POST /api/hub/capabilities/execute` with `{ verbId: "market.search", parameters }`:
113
+
114
+ ```json
115
+ { "query": "crm", "kind": "template", "limit": 20 }
116
+ ```
117
+
118
+ - `kind` ∈ `capability | automation | template | cell` (omit to search all).
119
+ - Reads the pod-local `cp_catalog_cache` — fast, no live CP round-trip.
120
+ - Returns `{ entries: [{ slug, kind, name, description, version, tier, installed }], count }`.
121
+ - `installed` is `true`/`false` for capability/cell (cheap natural-key check);
122
+ `undefined` for automation/template — that's an HONEST unknown, not a bug,
123
+ never read it as "not installed."
124
+ - Empty result → say so plainly ("nothing matched") — never fabricate a
125
+ package that doesn't exist. Offer to capture the gap as a note for later.
126
+
127
+ This is the verb an agent should reach for first — it's read-only (auto-runs,
128
+ no approval needed) and mirrors exactly what `synap market --search` shows a
129
+ human.
130
+
131
+ ## Fetching one package's full definition
132
+
133
+ - **CLI (authoring path):** `synap market publish --from-workspace <id>` reads
134
+ a LIVE workspace via the pod's own `to-template` serializer — see
135
+ `author-and-publish.md`.
136
+ - **CP directly:** `GET /api/packages/:slug` returns the full row **with**
137
+ `definition` — the install payload. Auth is required to see a private
138
+ package (author-only). No auth → public only, and a private slug 404s.
139
+ - **From an install:** you don't normally need the definition yourself —
140
+ `market.install` (see `install.md`) resolves and applies it for you.
141
+
142
+ ---
143
+
144
+ # Install
145
+
146
+ ## CLI — `synap market install <slug>`
147
+
148
+ ```bash
149
+ synap market install crm # install as a new workspace
150
+ synap market install crm --dry-run # preview: would-create / reuse / conflicts, writes nothing
151
+ synap market install crm --onto <workspaceId> # reconcile ONTO an existing workspace (additive)
152
+ synap market install crm --project <id> # tag seeded entities to a project (install stays pod-wide)
153
+ ```
154
+
155
+ Installs are **workspace-first**: a `workspace`/`template` package spins up
156
+ (or reconciles onto) a workspace directly. Other package types (capability,
157
+ automation, cell) route you to the right surface (`synap capability add`,
158
+ etc.) rather than being force-fit into a workspace install.
159
+
160
+ ## Pod verb — `market.install` (MCP / agent / automation)
161
+
162
+ ```json
163
+ { "slug": "crm", "kind": "template", "version": "optional", "params": {} }
164
+ ```
165
+
166
+ `kind` ∈ `capability | automation | template | cell` — required, unlike
167
+ `market.search`.
168
+
169
+ **This verb ALWAYS mutates**, so it goes through the full permission gate —
170
+ never treat a non-"installed" response as failure:
171
+
172
+ - **Operator call** (no agent identity — e.g. you're driving the CLI as the
173
+ pod owner): executes directly → `{ status: "installed", result }`.
174
+ - **Agent call** (any MCP/automation/agent-key caller): ALWAYS proposes,
175
+ regardless of any standing grant on `market.install` itself — a grant on
176
+ the verb governs _invoking_ it, not the provisioning it performs. Response:
177
+ `{ status: "proposed", proposalId, reviewUrl }`.
178
+
179
+ **`"proposed"` is success, not an error.** Surface `reviewUrl` to the user so
180
+ they can approve it — don't retry, don't report it as a failure. See
181
+ `governance-and-catalog.md`.
182
+
183
+ ## Idempotency by kind
184
+
185
+ - **capability** — natural key is `(name, workspaceId)`; installing twice
186
+ converges, doesn't duplicate.
187
+ - **template/workspace** — keyed by `packageSlug`/`proposalId` (both set to
188
+ the catalog slug); re-installing the same template for the same user
189
+ converges to the existing workspace rather than creating a second one.
190
+ - **automation** — pre-checked by `(name, workspace)` before creating.
191
+ - **cell** — keyed by `(typeKey, workspaceId)`.
192
+
193
+ ## Locked / tier-gated packages
194
+
195
+ A package can declare a `requiredTier`. Installing one your account's plan
196
+ doesn't cover fails a pre-check (`assertPackageTierAccess`) BEFORE any
197
+ proposal or provisioning — tell the user which tier is required rather than
198
+ retrying.
199
+
200
+ ---
201
+
202
+ # Author & publish — the ONE write door
203
+
204
+ `synap market <verb>` is the only supported authoring path today (human or AI
205
+ driving the CLI). There is no agent-native "publish a template" MCP verb —
206
+ `market.install` only ever CONSUMES the catalog. Authoring is a human/CLI
207
+ action; if you're an agent helping the user author one, drive the CLI on
208
+ their behalf and always tell them what you ran.
209
+
210
+ ## The loop
211
+
212
+ ```bash
213
+ synap market scaffold my-thing # writes my-thing.template.yaml (refuses to overwrite)
214
+ # ...edit the file...
215
+ synap market validate my-thing.template.yaml
216
+ synap market publish my-thing.template.yaml # PRIVATE by default
217
+ synap market publish my-thing.template.yaml --public # opt in to sharing
218
+ ```
219
+
220
+ ### `scaffold <slug>`
221
+
222
+ Writes a minimal valid `<slug>.template.yaml` — `meta` (slug/name/description/
223
+ icon/color), `workspace` (name/description), and one starter profile. Refuses
224
+ to clobber an existing file — create-then-configure, never silently overwrite
225
+ an author's work.
226
+
227
+ ### `validate <file>`
228
+
229
+ Runs the ONE shared validator (`validateTemplate` from
230
+ `@synap-core/workspace-templates`) locally — fast feedback before any network
231
+ call. Fix every reported error before publishing; the CP re-runs the same
232
+ class of check server-side and will reject an invalid definition (400).
233
+
234
+ ### `publish [file]`
235
+
236
+ ```bash
237
+ synap market publish [file] [--public|--private] [--from-workspace <id>] [--json]
238
+ ```
239
+
240
+ - Validates first — a failing template is never published.
241
+ - Default is **private**; pass `--public` to share. `--private` is accepted
242
+ explicitly if a script wants to state intent.
243
+ - `--from-workspace <id>` serializes a LIVE, already-built workspace into a
244
+ template via the pod's own `POST /workspaces/:id/to-template` door, then
245
+ publishes that — the fastest way to turn something you already built into a
246
+ reusable package. It runs through the SAME validator as a hand-authored file.
247
+ - Writes go to `POST /api/packages` (upsert by `(slug, authorId)`; version is
248
+ a content hash, so republishing identical content is a safe no-op — you'll
249
+ see `outcome: "no-op"` vs `"created"`/`"updated"`).
250
+ - Slugs `foundation`, `crm`, `operations`, `content-os`, `enterprise-os`,
251
+ `research-base` are reserved bedrock templates — publishing under one of
252
+ those 403s; pick a different slug.
253
+
254
+ ### `unpublish <slug>`
255
+
256
+ Flips a published package back to private (owner-only). ⚠️ Known gap: the CP's
257
+ PATCH validator doesn't yet accept `isPublic` on every deploy — if it 400s,
258
+ that's a server-side TODO, not something to work around; report it honestly.
259
+
260
+ ## Server-side validation scope (important honesty note)
261
+
262
+ `POST /api/packages` validates **self-contained** templates (no `dependencies`
263
+ declared) with the full referential-integrity check (dangling profile refs in
264
+ views/entityLinks, missing view scope, entityLink predicates). A template that
265
+ **declares `dependencies`** (compose/require another template) passes through
266
+ this HTTP door **without** that validation — composition-aware server-side
267
+ validation is not yet wired for ad-hoc publishes (only the seeded flagship
268
+ templates get validated at that level). Don't claim a composed publish was
269
+ fully validated; say what actually ran.
270
+
271
+ ## What you're producing
272
+
273
+ A `PackageDefinition`: `_meta` (slug/name/description/icon/color/tags),
274
+ `workspaceName`, `description`, `profiles`, `views`, `entityLinks`, optional
275
+ `dependencies`. The scaffolded YAML and `--from-workspace` both produce this
276
+ shape — never hand-write JSON against the raw DB row shape.
277
+
278
+ ---
279
+
280
+ # Governance & the one-catalog principle
281
+
282
+ ## Writes are governed — "proposed" is success
283
+
284
+ Every mutating marketplace action an AGENT takes (`market.install` above all)
285
+ can come back `{ status: "proposed", proposalId, reviewUrl }` instead of
286
+ `{ status: "installed" }`. That is the write queued for the pod owner's
287
+ review — like opening a PR, not a failure and not an error to retry. Always:
288
+
289
+ - Surface `reviewUrl` to the user.
290
+ - Don't retry the same install hoping for "installed" — it won't change the
291
+ outcome and may create a duplicate proposal.
292
+ - Remember an unreviewed proposal isn't live yet: `market.search`'s
293
+ `installed` flag and any downstream read won't reflect it until approved.
294
+
295
+ An OPERATOR-driven install (the pod owner themself, via CLI with their own
296
+ credentials, no agent identity) executes directly — no proposal. The
297
+ distinction is WHO is acting, not which door they used.
298
+
299
+ ## One catalog — never fork it
300
+
301
+ - The catalog is `synapPackages` in the Control Plane, reached through
302
+ `GET/POST/PATCH /api/packages*`. `cp_catalog_cache` on the pod is a
303
+ **read-through cache** of it (populated by sync), not a second source of
304
+ truth — never write to it directly, and never treat a cache miss as "the
305
+ package doesn't exist" without falling back to a live CP fetch (which
306
+ `market.install` already does for automation/template kinds).
307
+ - Discovery happens on the CP (`market.search`, `synap market`); apply
308
+ happens on the pod (`market.install`, workspace creation). Don't invent a
309
+ parallel "known templates" list anywhere else in a workflow you're
310
+ building — always search the real catalog.
311
+ - Publishing to anywhere other than `POST /api/packages` (e.g. hand-writing a
312
+ file and calling it "published," or registering a template only in a local
313
+ config) is NOT publishing — it produces something invisible to
314
+ `market.search` and every other consumer.
315
+
316
+ ## Visibility model
317
+
318
+ - **Public** (`isPublic: true`) — visible to everyone via `GET /api/packages`.
319
+ - **Private** (`isPublic: false`, the default) — visible only to its
320
+ `authorId` (and, for non-workspace categories, active members of an
321
+ `podId`-owned team). A private **workspace template** is stricter:
322
+ owner-only, full stop, even for pod teammates.
323
+ - A private package a caller can't see **404s, never 403s** — this is
324
+ deliberate (don't leak existence). If you get a 404 fetching a package by
325
+ slug, don't assume it never existed — it may just be private to someone
326
+ else.
327
+
328
+ ## Tier gating
329
+
330
+ A public package can declare `requiredTier`. `GET /api/packages/available`
331
+ tells an authed caller which tiered slugs their subscription actually
332
+ unlocks; a slug missing from that list but present in the browse catalog is
333
+ locked for them — `market.install` pre-checks this and fails before touching
334
+ governance, so surface the tier requirement rather than treating it as a
335
+ generic install error.
@@ -0,0 +1,5 @@
1
+ overview.md
2
+ discover-and-fetch.md
3
+ install.md
4
+ author-and-publish.md
5
+ governance-and-catalog.md
@@ -0,0 +1,24 @@
1
+ name: synap-market
2
+ description: >
3
+ Use this skill when the user (or an agent driving the CLI/MCP/HTTP) wants to
4
+ DISCOVER, INSTALL, or AUTHOR/PUBLISH marketplace & template data on Synap —
5
+ workspace templates, capabilities, automations, and cells. Triggers: "find a
6
+ template for X", "is there a marketplace package for Y", "install this
7
+ template/capability", "create a new template", "publish this as a
8
+ workspace/capability", "scaffold a template", "share my workspace as a
9
+ template", "make this private/public". NOT the `synap` skill (capture/recall
10
+ data INSIDE a workspace) nor `synap-schema` (extending the data model of an
11
+ existing workspace) nor `synap-ui` (building views/dashboards) — this skill is
12
+ about the PACKAGE layer: finding, installing, and publishing reusable
13
+ templates/capabilities/automations/cells to/from the Control Plane catalog.
14
+ metadata:
15
+ openclaw:
16
+ requires:
17
+ env: []
18
+ optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID, SYNAP_HUB_API_KEY]
19
+ primaryEnv: null
20
+ homepage: https://synap.live
21
+ capabilities:
22
+ [market-search, market-install, template-author, template-publish]
23
+ os: [macos, linux, windows]
24
+ userInvocable: true
@@ -0,0 +1,75 @@
1
+ # Author & publish — the ONE write door
2
+
3
+ `synap market <verb>` is the only supported authoring path today (human or AI
4
+ driving the CLI). There is no agent-native "publish a template" MCP verb —
5
+ `market.install` only ever CONSUMES the catalog. Authoring is a human/CLI
6
+ action; if you're an agent helping the user author one, drive the CLI on
7
+ their behalf and always tell them what you ran.
8
+
9
+ ## The loop
10
+
11
+ ```bash
12
+ synap market scaffold my-thing # writes my-thing.template.yaml (refuses to overwrite)
13
+ # ...edit the file...
14
+ synap market validate my-thing.template.yaml
15
+ synap market publish my-thing.template.yaml # PRIVATE by default
16
+ synap market publish my-thing.template.yaml --public # opt in to sharing
17
+ ```
18
+
19
+ ### `scaffold <slug>`
20
+
21
+ Writes a minimal valid `<slug>.template.yaml` — `meta` (slug/name/description/
22
+ icon/color), `workspace` (name/description), and one starter profile. Refuses
23
+ to clobber an existing file — create-then-configure, never silently overwrite
24
+ an author's work.
25
+
26
+ ### `validate <file>`
27
+
28
+ Runs the ONE shared validator (`validateTemplate` from
29
+ `@synap-core/workspace-templates`) locally — fast feedback before any network
30
+ call. Fix every reported error before publishing; the CP re-runs the same
31
+ class of check server-side and will reject an invalid definition (400).
32
+
33
+ ### `publish [file]`
34
+
35
+ ```bash
36
+ synap market publish [file] [--public|--private] [--from-workspace <id>] [--json]
37
+ ```
38
+
39
+ - Validates first — a failing template is never published.
40
+ - Default is **private**; pass `--public` to share. `--private` is accepted
41
+ explicitly if a script wants to state intent.
42
+ - `--from-workspace <id>` serializes a LIVE, already-built workspace into a
43
+ template via the pod's own `POST /workspaces/:id/to-template` door, then
44
+ publishes that — the fastest way to turn something you already built into a
45
+ reusable package. It runs through the SAME validator as a hand-authored file.
46
+ - Writes go to `POST /api/packages` (upsert by `(slug, authorId)`; version is
47
+ a content hash, so republishing identical content is a safe no-op — you'll
48
+ see `outcome: "no-op"` vs `"created"`/`"updated"`).
49
+ - Slugs `foundation`, `crm`, `operations`, `content-os`, `enterprise-os`,
50
+ `research-base` are reserved bedrock templates — publishing under one of
51
+ those 403s; pick a different slug.
52
+
53
+ ### `unpublish <slug>`
54
+
55
+ Flips a published package back to private (owner-only). ⚠️ Known gap: the CP's
56
+ PATCH validator doesn't yet accept `isPublic` on every deploy — if it 400s,
57
+ that's a server-side TODO, not something to work around; report it honestly.
58
+
59
+ ## Server-side validation scope (important honesty note)
60
+
61
+ `POST /api/packages` validates **self-contained** templates (no `dependencies`
62
+ declared) with the full referential-integrity check (dangling profile refs in
63
+ views/entityLinks, missing view scope, entityLink predicates). A template that
64
+ **declares `dependencies`** (compose/require another template) passes through
65
+ this HTTP door **without** that validation — composition-aware server-side
66
+ validation is not yet wired for ad-hoc publishes (only the seeded flagship
67
+ templates get validated at that level). Don't claim a composed publish was
68
+ fully validated; say what actually ran.
69
+
70
+ ## What you're producing
71
+
72
+ A `PackageDefinition`: `_meta` (slug/name/description/icon/color/tags),
73
+ `workspaceName`, `description`, `profiles`, `views`, `entityLinks`, optional
74
+ `dependencies`. The scaffolded YAML and `--from-workspace` both produce this
75
+ shape — never hand-write JSON against the raw DB row shape.
@@ -0,0 +1,59 @@
1
+ # Discover & fetch
2
+
3
+ Three doors reach the same catalog. Pick the one that matches where you're
4
+ running.
5
+
6
+ ## CLI — `synap market`
7
+
8
+ ```bash
9
+ synap market # browse/list (the default action)
10
+ synap market --search "crm" # filter by name/description/slug
11
+ synap market --type capability # filter by type: workspace|capability|skill|workflow|view|cell
12
+ synap market --search "crm" --type workspace --json
13
+ ```
14
+
15
+ `market` with no subcommand lists; `--list` is accepted explicitly too. It
16
+ merges: your OWN packages (public + private, via `GET /api/packages/mine`)
17
+ with the PUBLIC catalog (`GET /api/packages`) — logged out, you only see the
18
+ public/bundled set.
19
+
20
+ Companion commands:
21
+
22
+ ```bash
23
+ synap market installed # what's already installed on THIS pod (pure read)
24
+ synap market installed --tree # composition graph: package → templates → workspaces
25
+ synap market update # check installed packages for drift against the catalog
26
+ ```
27
+
28
+ ## Pod verb — `market.search` (MCP / agent / automation)
29
+
30
+ The pod-native verb, run via MCP `run_capability` or
31
+ `POST /api/hub/capabilities/execute` with `{ verbId: "market.search", parameters }`:
32
+
33
+ ```json
34
+ { "query": "crm", "kind": "template", "limit": 20 }
35
+ ```
36
+
37
+ - `kind` ∈ `capability | automation | template | cell` (omit to search all).
38
+ - Reads the pod-local `cp_catalog_cache` — fast, no live CP round-trip.
39
+ - Returns `{ entries: [{ slug, kind, name, description, version, tier, installed }], count }`.
40
+ - `installed` is `true`/`false` for capability/cell (cheap natural-key check);
41
+ `undefined` for automation/template — that's an HONEST unknown, not a bug,
42
+ never read it as "not installed."
43
+ - Empty result → say so plainly ("nothing matched") — never fabricate a
44
+ package that doesn't exist. Offer to capture the gap as a note for later.
45
+
46
+ This is the verb an agent should reach for first — it's read-only (auto-runs,
47
+ no approval needed) and mirrors exactly what `synap market --search` shows a
48
+ human.
49
+
50
+ ## Fetching one package's full definition
51
+
52
+ - **CLI (authoring path):** `synap market publish --from-workspace <id>` reads
53
+ a LIVE workspace via the pod's own `to-template` serializer — see
54
+ `author-and-publish.md`.
55
+ - **CP directly:** `GET /api/packages/:slug` returns the full row **with**
56
+ `definition` — the install payload. Auth is required to see a private
57
+ package (author-only). No auth → public only, and a private slug 404s.
58
+ - **From an install:** you don't normally need the definition yourself —
59
+ `market.install` (see `install.md`) resolves and applies it for you.
@@ -0,0 +1,56 @@
1
+ # Governance & the one-catalog principle
2
+
3
+ ## Writes are governed — "proposed" is success
4
+
5
+ Every mutating marketplace action an AGENT takes (`market.install` above all)
6
+ can come back `{ status: "proposed", proposalId, reviewUrl }` instead of
7
+ `{ status: "installed" }`. That is the write queued for the pod owner's
8
+ review — like opening a PR, not a failure and not an error to retry. Always:
9
+
10
+ - Surface `reviewUrl` to the user.
11
+ - Don't retry the same install hoping for "installed" — it won't change the
12
+ outcome and may create a duplicate proposal.
13
+ - Remember an unreviewed proposal isn't live yet: `market.search`'s
14
+ `installed` flag and any downstream read won't reflect it until approved.
15
+
16
+ An OPERATOR-driven install (the pod owner themself, via CLI with their own
17
+ credentials, no agent identity) executes directly — no proposal. The
18
+ distinction is WHO is acting, not which door they used.
19
+
20
+ ## One catalog — never fork it
21
+
22
+ - The catalog is `synapPackages` in the Control Plane, reached through
23
+ `GET/POST/PATCH /api/packages*`. `cp_catalog_cache` on the pod is a
24
+ **read-through cache** of it (populated by sync), not a second source of
25
+ truth — never write to it directly, and never treat a cache miss as "the
26
+ package doesn't exist" without falling back to a live CP fetch (which
27
+ `market.install` already does for automation/template kinds).
28
+ - Discovery happens on the CP (`market.search`, `synap market`); apply
29
+ happens on the pod (`market.install`, workspace creation). Don't invent a
30
+ parallel "known templates" list anywhere else in a workflow you're
31
+ building — always search the real catalog.
32
+ - Publishing to anywhere other than `POST /api/packages` (e.g. hand-writing a
33
+ file and calling it "published," or registering a template only in a local
34
+ config) is NOT publishing — it produces something invisible to
35
+ `market.search` and every other consumer.
36
+
37
+ ## Visibility model
38
+
39
+ - **Public** (`isPublic: true`) — visible to everyone via `GET /api/packages`.
40
+ - **Private** (`isPublic: false`, the default) — visible only to its
41
+ `authorId` (and, for non-workspace categories, active members of an
42
+ `podId`-owned team). A private **workspace template** is stricter:
43
+ owner-only, full stop, even for pod teammates.
44
+ - A private package a caller can't see **404s, never 403s** — this is
45
+ deliberate (don't leak existence). If you get a 404 fetching a package by
46
+ slug, don't assume it never existed — it may just be private to someone
47
+ else.
48
+
49
+ ## Tier gating
50
+
51
+ A public package can declare `requiredTier`. `GET /api/packages/available`
52
+ tells an authed caller which tiered slugs their subscription actually
53
+ unlocks; a slug missing from that list but present in the browse catalog is
54
+ locked for them — `market.install` pre-checks this and fails before touching
55
+ governance, so surface the tier requirement rather than treating it as a
56
+ generic install error.
@@ -0,0 +1,55 @@
1
+ # Install
2
+
3
+ ## CLI — `synap market install <slug>`
4
+
5
+ ```bash
6
+ synap market install crm # install as a new workspace
7
+ synap market install crm --dry-run # preview: would-create / reuse / conflicts, writes nothing
8
+ synap market install crm --onto <workspaceId> # reconcile ONTO an existing workspace (additive)
9
+ synap market install crm --project <id> # tag seeded entities to a project (install stays pod-wide)
10
+ ```
11
+
12
+ Installs are **workspace-first**: a `workspace`/`template` package spins up
13
+ (or reconciles onto) a workspace directly. Other package types (capability,
14
+ automation, cell) route you to the right surface (`synap capability add`,
15
+ etc.) rather than being force-fit into a workspace install.
16
+
17
+ ## Pod verb — `market.install` (MCP / agent / automation)
18
+
19
+ ```json
20
+ { "slug": "crm", "kind": "template", "version": "optional", "params": {} }
21
+ ```
22
+
23
+ `kind` ∈ `capability | automation | template | cell` — required, unlike
24
+ `market.search`.
25
+
26
+ **This verb ALWAYS mutates**, so it goes through the full permission gate —
27
+ never treat a non-"installed" response as failure:
28
+
29
+ - **Operator call** (no agent identity — e.g. you're driving the CLI as the
30
+ pod owner): executes directly → `{ status: "installed", result }`.
31
+ - **Agent call** (any MCP/automation/agent-key caller): ALWAYS proposes,
32
+ regardless of any standing grant on `market.install` itself — a grant on
33
+ the verb governs _invoking_ it, not the provisioning it performs. Response:
34
+ `{ status: "proposed", proposalId, reviewUrl }`.
35
+
36
+ **`"proposed"` is success, not an error.** Surface `reviewUrl` to the user so
37
+ they can approve it — don't retry, don't report it as a failure. See
38
+ `governance-and-catalog.md`.
39
+
40
+ ## Idempotency by kind
41
+
42
+ - **capability** — natural key is `(name, workspaceId)`; installing twice
43
+ converges, doesn't duplicate.
44
+ - **template/workspace** — keyed by `packageSlug`/`proposalId` (both set to
45
+ the catalog slug); re-installing the same template for the same user
46
+ converges to the existing workspace rather than creating a second one.
47
+ - **automation** — pre-checked by `(name, workspace)` before creating.
48
+ - **cell** — keyed by `(typeKey, workspaceId)`.
49
+
50
+ ## Locked / tier-gated packages
51
+
52
+ A package can declare a `requiredTier`. Installing one your account's plan
53
+ doesn't cover fails a pre-check (`assertPackageTierAccess`) BEFORE any
54
+ proposal or provisioning — tell the user which tier is required rather than
55
+ retrying.
@@ -0,0 +1,51 @@
1
+ # Marketplace & templates on Synap
2
+
3
+ The marketplace is Synap's **package layer**: workspace templates, capabilities,
4
+ automations, and cells — anything that can be installed into a pod rather than
5
+ hand-built. It lives in the Control Plane (CP) catalog and is discoverable and
6
+ installable from any door: the `synap` CLI, MCP (`run_capability`), or the Hub
7
+ REST API (`/api/hub/capabilities/execute`).
8
+
9
+ ## The two reflexes
10
+
11
+ 1. **DISCOVER before you invent.** Before scaffolding a new template or
12
+ capability, search the catalog — `synap market --search "<query>"` or the
13
+ `market.search` verb. Someone may have already published what you need.
14
+ Reinventing a workspace that already exists as a template is wasted work
15
+ AND fragments the catalog.
16
+ 2. **One catalog, never a second one.** Every package — public or private —
17
+ lives in the CP's `synapPackages` table, reached through
18
+ `GET/POST /api/packages`. There is no side channel: don't write a
19
+ template to a random file and call it "published," and don't stand up a
20
+ local list of "known templates" — search the real catalog every time.
21
+
22
+ ## The four things this skill teaches
23
+
24
+ | Task | Doc |
25
+ | --------------------------------------------------------- | --------------------------- |
26
+ | Search/browse/fetch a package (any kind) | `discover-and-fetch.md` |
27
+ | Install a package into a pod | `install.md` |
28
+ | Author a new template and publish it (the ONE write door) | `author-and-publish.md` |
29
+ | Governance rules + the one-catalog principle | `governance-and-catalog.md` |
30
+
31
+ ## Package kinds
32
+
33
+ - **workspace / template** — a full workspace definition (profiles, views,
34
+ entity links) you can spin up as a new workspace, or reconcile onto an
35
+ existing one.
36
+ - **capability** — a tool + skill bundle (an integration or verb pack).
37
+ - **automation** — a trigger + action definition.
38
+ - **cell** — a custom UI renderer.
39
+
40
+ The CLI's browse filter (`market --type`) uses
41
+ `workspace|capability|skill|workflow|view|cell`; the pod-native install verb
42
+ (`market.install`) and its catalog use the narrower
43
+ `capability|automation|template|cell` (workspace ≡ template there). Match
44
+ whichever surface you're calling.
45
+
46
+ ## Visibility
47
+
48
+ Every package is **public** or **private** (owner-only). Default on publish is
49
+ **private** — you opt in to sharing with `--public`. A private package 404s
50
+ (not 403) to anyone who isn't its author or an active member of its owning pod
51
+ — see `governance-and-catalog.md`.