@synap-core/cli 1.11.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 (452) 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 +218 -168
  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 +1 -13
  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 +7 -1
  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 +193 -23
  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 +293 -20
  50. package/dist/commands/data.js.map +1 -1
  51. package/dist/commands/diagnose.d.ts +66 -4
  52. package/dist/commands/diagnose.js +285 -28
  53. package/dist/commands/diagnose.js.map +1 -1
  54. package/dist/commands/doc.d.ts +11 -4
  55. package/dist/commands/doc.js +39 -14
  56. package/dist/commands/doc.js.map +1 -1
  57. package/dist/commands/doctor.d.ts +112 -3
  58. package/dist/commands/doctor.js +657 -32
  59. package/dist/commands/doctor.js.map +1 -1
  60. package/dist/commands/explain.js +5 -5
  61. package/dist/commands/explain.js.map +1 -1
  62. package/dist/commands/import.d.ts +368 -13
  63. package/dist/commands/import.js +1064 -54
  64. package/dist/commands/import.js.map +1 -1
  65. package/dist/commands/init.d.ts +20 -9
  66. package/dist/commands/init.js +433 -973
  67. package/dist/commands/init.js.map +1 -1
  68. package/dist/commands/keys.d.ts +1 -0
  69. package/dist/commands/keys.js +15 -2
  70. package/dist/commands/keys.js.map +1 -1
  71. package/dist/commands/knowledge.d.ts +22 -6
  72. package/dist/commands/knowledge.js +117 -55
  73. package/dist/commands/knowledge.js.map +1 -1
  74. package/dist/commands/lens.d.ts +37 -1
  75. package/dist/commands/lens.js +192 -71
  76. package/dist/commands/lens.js.map +1 -1
  77. package/dist/commands/market-authoring.d.ts +29 -2
  78. package/dist/commands/market-authoring.js +348 -7
  79. package/dist/commands/market-authoring.js.map +1 -1
  80. package/dist/commands/market-official.d.ts +58 -0
  81. package/dist/commands/market-official.js +84 -0
  82. package/dist/commands/market-official.js.map +1 -0
  83. package/dist/commands/market.d.ts +400 -16
  84. package/dist/commands/market.js +1802 -146
  85. package/dist/commands/market.js.map +1 -1
  86. package/dist/commands/mcp.d.ts +60 -25
  87. package/dist/commands/mcp.js +251 -64
  88. package/dist/commands/mcp.js.map +1 -1
  89. package/dist/commands/open.d.ts +39 -9
  90. package/dist/commands/open.js +80 -25
  91. package/dist/commands/open.js.map +1 -1
  92. package/dist/commands/playbook.d.ts +42 -0
  93. package/dist/commands/playbook.js +162 -0
  94. package/dist/commands/playbook.js.map +1 -0
  95. package/dist/commands/pod.js +1 -1
  96. package/dist/commands/pod.js.map +1 -1
  97. package/dist/commands/pods.d.ts +5 -0
  98. package/dist/commands/pods.js +97 -116
  99. package/dist/commands/pods.js.map +1 -1
  100. package/dist/commands/proposals-actions.d.ts +62 -0
  101. package/dist/commands/proposals-actions.js +143 -8
  102. package/dist/commands/proposals-actions.js.map +1 -1
  103. package/dist/commands/proposals-await.d.ts +68 -0
  104. package/dist/commands/proposals-await.js +248 -0
  105. package/dist/commands/proposals-await.js.map +1 -0
  106. package/dist/commands/proton-setup.d.ts +73 -0
  107. package/dist/commands/proton-setup.js +577 -0
  108. package/dist/commands/proton-setup.js.map +1 -0
  109. package/dist/commands/providers.d.ts +23 -0
  110. package/dist/commands/providers.js +126 -1
  111. package/dist/commands/providers.js.map +1 -1
  112. package/dist/commands/raycast.js +6 -2
  113. package/dist/commands/raycast.js.map +1 -1
  114. package/dist/commands/rule.d.ts +150 -0
  115. package/dist/commands/rule.js +447 -0
  116. package/dist/commands/rule.js.map +1 -0
  117. package/dist/commands/session-wait.d.ts +111 -0
  118. package/dist/commands/session-wait.js +209 -0
  119. package/dist/commands/session-wait.js.map +1 -0
  120. package/dist/commands/sessions.d.ts +52 -0
  121. package/dist/commands/sessions.js +478 -58
  122. package/dist/commands/sessions.js.map +1 -1
  123. package/dist/commands/skill-manage.d.ts +21 -0
  124. package/dist/commands/skill-manage.js +136 -19
  125. package/dist/commands/skill-manage.js.map +1 -1
  126. package/dist/commands/skills.js +16 -0
  127. package/dist/commands/skills.js.map +1 -1
  128. package/dist/commands/status.d.ts +1 -4
  129. package/dist/commands/status.js +5 -34
  130. package/dist/commands/status.js.map +1 -1
  131. package/dist/commands/statusline.backoff.test.d.ts +13 -0
  132. package/dist/commands/statusline.backoff.test.js +100 -0
  133. package/dist/commands/statusline.backoff.test.js.map +1 -0
  134. package/dist/commands/statusline.js +16 -9
  135. package/dist/commands/statusline.js.map +1 -1
  136. package/dist/commands/sync-status.d.ts +12 -0
  137. package/dist/commands/sync-status.js +125 -0
  138. package/dist/commands/sync-status.js.map +1 -0
  139. package/dist/commands/templates-retire.d.ts +34 -0
  140. package/dist/commands/templates-retire.js +192 -0
  141. package/dist/commands/templates-retire.js.map +1 -0
  142. package/dist/commands/tools.js +6 -21
  143. package/dist/commands/tools.js.map +1 -1
  144. package/dist/commands/tracks.d.ts +51 -0
  145. package/dist/commands/tracks.js +291 -0
  146. package/dist/commands/tracks.js.map +1 -0
  147. package/dist/commands/update.d.ts +3 -11
  148. package/dist/commands/update.js +5 -134
  149. package/dist/commands/update.js.map +1 -1
  150. package/dist/commands/upload.d.ts +41 -3
  151. package/dist/commands/upload.js +120 -18
  152. package/dist/commands/upload.js.map +1 -1
  153. package/dist/commands/vendor.d.ts +28 -0
  154. package/dist/commands/vendor.js +110 -0
  155. package/dist/commands/vendor.js.map +1 -0
  156. package/dist/commands/versions.js +6 -0
  157. package/dist/commands/versions.js.map +1 -1
  158. package/dist/commands/view.js +10 -5
  159. package/dist/commands/view.js.map +1 -1
  160. package/dist/commands/whoami.d.ts +23 -3
  161. package/dist/commands/whoami.js +169 -23
  162. package/dist/commands/whoami.js.map +1 -1
  163. package/dist/commands/worker.d.ts +122 -0
  164. package/dist/commands/worker.js +435 -0
  165. package/dist/commands/worker.js.map +1 -0
  166. package/dist/commands/worker.test.d.ts +1 -0
  167. package/dist/commands/worker.test.js +116 -0
  168. package/dist/commands/worker.test.js.map +1 -0
  169. package/dist/commands/workspace-ops.d.ts +35 -0
  170. package/dist/commands/workspace-ops.js +153 -0
  171. package/dist/commands/workspace-ops.js.map +1 -0
  172. package/dist/index.d.ts +6 -6
  173. package/dist/index.js +900 -180
  174. package/dist/index.js.map +1 -1
  175. package/dist/lib/agent-connections.d.ts +31 -0
  176. package/dist/lib/agent-connections.js +33 -0
  177. package/dist/lib/agent-connections.js.map +1 -0
  178. package/dist/lib/agent-detect.d.ts +27 -0
  179. package/dist/lib/agent-detect.js +71 -0
  180. package/dist/lib/agent-detect.js.map +1 -0
  181. package/dist/lib/agent-door.d.ts +138 -0
  182. package/dist/lib/agent-door.js +426 -0
  183. package/dist/lib/agent-door.js.map +1 -0
  184. package/dist/lib/agents-config.d.ts +2 -0
  185. package/dist/lib/agents-config.js +4 -9
  186. package/dist/lib/agents-config.js.map +1 -1
  187. package/dist/lib/approval-poll.d.ts +31 -2
  188. package/dist/lib/approval-poll.js +20 -7
  189. package/dist/lib/approval-poll.js.map +1 -1
  190. package/dist/lib/atomic-file.d.ts +48 -0
  191. package/dist/lib/atomic-file.js +129 -0
  192. package/dist/lib/atomic-file.js.map +1 -0
  193. package/dist/lib/auth.d.ts +14 -9
  194. package/dist/lib/auth.js +44 -61
  195. package/dist/lib/auth.js.map +1 -1
  196. package/dist/lib/batch-approval.d.ts +85 -0
  197. package/dist/lib/batch-approval.js +170 -0
  198. package/dist/lib/batch-approval.js.map +1 -0
  199. package/dist/lib/capture-lane.d.ts +6 -5
  200. package/dist/lib/capture-lane.js +6 -5
  201. package/dist/lib/capture-lane.js.map +1 -1
  202. package/dist/lib/capture-structure.d.ts +230 -11
  203. package/dist/lib/capture-structure.js +251 -13
  204. package/dist/lib/capture-structure.js.map +1 -1
  205. package/dist/lib/catalog-templates.d.ts +59 -0
  206. package/dist/lib/catalog-templates.js +126 -0
  207. package/dist/lib/catalog-templates.js.map +1 -0
  208. package/dist/lib/cli-build.d.ts +19 -0
  209. package/dist/lib/cli-build.js +37 -0
  210. package/dist/lib/cli-build.js.map +1 -0
  211. package/dist/lib/conversation-headers.d.ts +18 -0
  212. package/dist/lib/conversation-headers.js +32 -0
  213. package/dist/lib/conversation-headers.js.map +1 -0
  214. package/dist/lib/cp-packages.d.ts +167 -11
  215. package/dist/lib/cp-packages.js +253 -21
  216. package/dist/lib/cp-packages.js.map +1 -1
  217. package/dist/lib/credential-class.d.ts +117 -0
  218. package/dist/lib/credential-class.js +116 -0
  219. package/dist/lib/credential-class.js.map +1 -0
  220. package/dist/lib/describe-lens.d.ts +35 -0
  221. package/dist/lib/describe-lens.js +40 -0
  222. package/dist/lib/describe-lens.js.map +1 -1
  223. package/dist/lib/device-connect.d.ts +125 -0
  224. package/dist/lib/device-connect.js +256 -0
  225. package/dist/lib/device-connect.js.map +1 -0
  226. package/dist/lib/directory-lens.d.ts +99 -0
  227. package/dist/lib/directory-lens.js +187 -0
  228. package/dist/lib/directory-lens.js.map +1 -0
  229. package/dist/lib/exporter-coverage.d.ts +71 -0
  230. package/dist/lib/exporter-coverage.js +97 -0
  231. package/dist/lib/exporter-coverage.js.map +1 -0
  232. package/dist/lib/hub-client.d.ts +29 -8
  233. package/dist/lib/hub-client.js +328 -55
  234. package/dist/lib/hub-client.js.map +1 -1
  235. package/dist/lib/init-connect.d.ts +41 -0
  236. package/dist/lib/init-connect.js +75 -0
  237. package/dist/lib/init-connect.js.map +1 -0
  238. package/dist/lib/init-exit.d.ts +24 -0
  239. package/dist/lib/init-exit.js +41 -0
  240. package/dist/lib/init-exit.js.map +1 -0
  241. package/dist/lib/init-flow.d.ts +25 -0
  242. package/dist/lib/init-flow.js +40 -0
  243. package/dist/lib/init-flow.js.map +1 -0
  244. package/dist/lib/init-handoff.d.ts +16 -0
  245. package/dist/lib/init-handoff.js +19 -0
  246. package/dist/lib/init-handoff.js.map +1 -0
  247. package/dist/lib/init-output.d.ts +18 -0
  248. package/dist/lib/init-output.js +43 -0
  249. package/dist/lib/init-output.js.map +1 -0
  250. package/dist/lib/init-pod.d.ts +45 -0
  251. package/dist/lib/init-pod.js +36 -0
  252. package/dist/lib/init-pod.js.map +1 -0
  253. package/dist/lib/installed.d.ts +210 -11
  254. package/dist/lib/installed.js +234 -36
  255. package/dist/lib/installed.js.map +1 -1
  256. package/dist/lib/key-approval.d.ts +57 -0
  257. package/dist/lib/key-approval.js +117 -0
  258. package/dist/lib/key-approval.js.map +1 -0
  259. package/dist/lib/key-diagnosis.d.ts +56 -0
  260. package/dist/lib/key-diagnosis.js +227 -0
  261. package/dist/lib/key-diagnosis.js.map +1 -0
  262. package/dist/lib/key-doctor.d.ts +136 -0
  263. package/dist/lib/key-doctor.js +286 -0
  264. package/dist/lib/key-doctor.js.map +1 -0
  265. package/dist/lib/key-locations.d.ts +120 -0
  266. package/dist/lib/key-locations.js +326 -0
  267. package/dist/lib/key-locations.js.map +1 -0
  268. package/dist/lib/key-source.d.ts +66 -0
  269. package/dist/lib/key-source.js +106 -0
  270. package/dist/lib/key-source.js.map +1 -0
  271. package/dist/lib/key-state.d.ts +70 -0
  272. package/dist/lib/key-state.js +115 -0
  273. package/dist/lib/key-state.js.map +1 -0
  274. package/dist/lib/kind-package.d.ts +181 -0
  275. package/dist/lib/kind-package.js +679 -0
  276. package/dist/lib/kind-package.js.map +1 -0
  277. package/dist/lib/knowledge-title.d.ts +24 -0
  278. package/dist/lib/knowledge-title.js +46 -0
  279. package/dist/lib/knowledge-title.js.map +1 -0
  280. package/dist/lib/knowledge-title.test.d.ts +1 -0
  281. package/dist/lib/knowledge-title.test.js +34 -0
  282. package/dist/lib/knowledge-title.test.js.map +1 -0
  283. package/dist/lib/machine-instance.d.ts +64 -0
  284. package/dist/lib/machine-instance.js +142 -0
  285. package/dist/lib/machine-instance.js.map +1 -0
  286. package/dist/lib/mcp-bridge.d.ts +42 -0
  287. package/dist/lib/mcp-bridge.js +147 -0
  288. package/dist/lib/mcp-bridge.js.map +1 -0
  289. package/dist/lib/mcp-bridge.test.d.ts +1 -0
  290. package/dist/lib/mcp-bridge.test.js +90 -0
  291. package/dist/lib/mcp-bridge.test.js.map +1 -0
  292. package/dist/lib/mcp-call.d.ts +30 -0
  293. package/dist/lib/mcp-call.js +107 -0
  294. package/dist/lib/mcp-call.js.map +1 -0
  295. package/dist/lib/mcp-snippets.d.ts +53 -0
  296. package/dist/lib/mcp-snippets.js +82 -0
  297. package/dist/lib/mcp-snippets.js.map +1 -0
  298. package/dist/lib/next-steps.d.ts +8 -0
  299. package/dist/lib/next-steps.js +31 -1
  300. package/dist/lib/next-steps.js.map +1 -1
  301. package/dist/lib/package-wire.d.ts +179 -0
  302. package/dist/lib/package-wire.js +68 -0
  303. package/dist/lib/package-wire.js.map +1 -0
  304. package/dist/lib/pair-link.d.ts +38 -0
  305. package/dist/lib/pair-link.js +68 -0
  306. package/dist/lib/pair-link.js.map +1 -0
  307. package/dist/lib/pod-wide.d.ts +40 -0
  308. package/dist/lib/pod-wide.js +46 -0
  309. package/dist/lib/pod-wide.js.map +1 -0
  310. package/dist/lib/pod.d.ts +66 -112
  311. package/dist/lib/pod.js +134 -412
  312. package/dist/lib/pod.js.map +1 -1
  313. package/dist/lib/project-ref.d.ts +9 -3
  314. package/dist/lib/project-ref.js +10 -4
  315. package/dist/lib/project-ref.js.map +1 -1
  316. package/dist/lib/review-credential.d.ts +119 -0
  317. package/dist/lib/review-credential.js +147 -0
  318. package/dist/lib/review-credential.js.map +1 -0
  319. package/dist/lib/safe-open.d.ts +49 -0
  320. package/dist/lib/safe-open.js +119 -0
  321. package/dist/lib/safe-open.js.map +1 -0
  322. package/dist/lib/session-lens.d.ts +40 -1
  323. package/dist/lib/session-lens.js +54 -4
  324. package/dist/lib/session-lens.js.map +1 -1
  325. package/dist/lib/superwhisper-import.d.ts +8 -0
  326. package/dist/lib/superwhisper-import.js +14 -7
  327. package/dist/lib/superwhisper-import.js.map +1 -1
  328. package/dist/lib/superwhisper-title.test.d.ts +1 -0
  329. package/dist/lib/superwhisper-title.test.js +18 -0
  330. package/dist/lib/superwhisper-title.test.js.map +1 -0
  331. package/dist/lib/targets.d.ts +134 -10
  332. package/dist/lib/targets.js +962 -258
  333. package/dist/lib/targets.js.map +1 -1
  334. package/dist/lib/template-file.d.ts +4 -0
  335. package/dist/lib/template-file.js.map +1 -1
  336. package/dist/lib/template-lifecycle.d.ts +217 -0
  337. package/dist/lib/template-lifecycle.js +433 -0
  338. package/dist/lib/template-lifecycle.js.map +1 -0
  339. package/dist/lib/template-steps.d.ts +88 -0
  340. package/dist/lib/template-steps.js +118 -0
  341. package/dist/lib/template-steps.js.map +1 -0
  342. package/dist/lib/time-ago.d.ts +2 -0
  343. package/dist/lib/time-ago.js +15 -0
  344. package/dist/lib/time-ago.js.map +1 -0
  345. package/dist/utils/logger.js +5 -2
  346. package/dist/utils/logger.js.map +1 -1
  347. package/package.json +23 -17
  348. package/skills/README.md +12 -10
  349. package/skills/agent-os/SKILL.md +214 -99
  350. package/skills/manifest.json +1 -1
  351. package/skills/onboard/SKILL.md +55 -26
  352. package/skills/synap/README.md +5 -8
  353. package/skills/synap/SKILL.md +1086 -283
  354. package/skills/synap/_order.txt +7 -0
  355. package/skills/synap/_skill.yaml +1 -1
  356. package/skills/synap/automations.md +15 -0
  357. package/skills/synap/capture.md +5 -0
  358. package/skills/synap/cli-operations.md +24 -18
  359. package/skills/synap/concepts.md +28 -0
  360. package/skills/synap/content-os.md +10 -1
  361. package/skills/synap/creative-loop.md +15 -10
  362. package/skills/synap/crm.md +21 -52
  363. package/skills/synap/document-embeds.md +141 -47
  364. package/skills/synap/escalation-ladder.md +20 -10
  365. package/skills/synap/focus-sessions.md +47 -21
  366. package/skills/synap/from-intent.md +142 -0
  367. package/skills/synap/governance-rules.md +4 -4
  368. package/skills/synap/governance.md +10 -7
  369. package/skills/synap/hand-off.md +33 -0
  370. package/skills/synap/inline-patterns.md +15 -7
  371. package/skills/synap/lenses.md +33 -15
  372. package/skills/synap/linking.md +41 -40
  373. package/skills/synap/mcp-remote-servers.md +64 -0
  374. package/skills/synap/mental-model.md +17 -15
  375. package/skills/synap/operating-mode-rules.md +1 -1
  376. package/skills/synap/processes.md +118 -0
  377. package/skills/synap/quick-reference.md +5 -1
  378. package/skills/synap/reading.md +3 -1
  379. package/skills/synap/reflexes.md +12 -42
  380. package/skills/synap/viewframe-cells.md +38 -5
  381. package/skills/synap/work-flow.md +1 -1
  382. package/skills/synap/work-model.md +96 -0
  383. package/skills/synap/worked-examples.md +4 -5
  384. package/skills/synap/workspace-design.md +14 -10
  385. package/skills/synap/writes.md +97 -24
  386. package/skills/synap/writing-titles.md +63 -0
  387. package/skills/synap-app/SKILL.md +2 -2
  388. package/skills/synap-app/_skill.yaml +1 -1
  389. package/skills/synap-app/install-commands.md +1 -1
  390. package/skills/synap-design/SKILL.md +474 -0
  391. package/skills/synap-design/_order.txt +4 -0
  392. package/skills/synap-design/_skill.yaml +21 -0
  393. package/skills/synap-design/loop.md +134 -0
  394. package/skills/synap-design/overview.md +44 -0
  395. package/skills/synap-design/principles.md +130 -0
  396. package/skills/synap-design/system.md +133 -0
  397. package/skills/synap-market/SKILL.md +306 -16
  398. package/skills/synap-market/_skill.yaml +1 -1
  399. package/skills/synap-market/author-and-publish.md +145 -8
  400. package/skills/synap-market/governance-and-catalog.md +7 -0
  401. package/skills/synap-market/install.md +79 -1
  402. package/skills/synap-market/overview.md +74 -6
  403. package/skills/synap-schema/SKILL.md +172 -10
  404. package/skills/synap-schema/_order.txt +2 -0
  405. package/skills/synap-schema/_skill.yaml +4 -2
  406. package/skills/synap-schema/common-mistakes.md +4 -2
  407. package/skills/synap-schema/discover-profiles.md +1 -1
  408. package/skills/synap-schema/entity-scope.md +15 -3
  409. package/skills/synap-schema/extend-first.md +29 -0
  410. package/skills/synap-schema/extend-vs-create.md +1 -1
  411. package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
  412. package/skills/synap-schema/property-types.md +1 -1
  413. package/skills/synap-schema/relations.md +1 -1
  414. package/skills/synap-ui/SKILL.md +19 -12
  415. package/skills/synap-ui/_skill.yaml +1 -1
  416. package/skills/synap-ui/ai-companion.md +1 -1
  417. package/skills/synap-ui/arranging-bento.md +2 -0
  418. package/skills/synap-ui/bento-layouts.md +10 -10
  419. package/skills/synap-ui/bento-recipes.md +313 -543
  420. package/skills/synap-ui/four-builds.md +5 -0
  421. package/skills/synap-ui/view-types.md +2 -2
  422. package/skills/synap-ui/widget-catalog.md +22 -278
  423. package/templates/automations/bookmark-enrichment.automation.json +290 -13
  424. package/templates/automations/url-bookmark-capture.automation.json +73 -11
  425. package/templates/skills/authoring-playbooks/SKILL.md +6 -3
  426. package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
  427. package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
  428. package/dist/commands/infra.d.ts +0 -21
  429. package/dist/commands/infra.js +0 -262
  430. package/dist/commands/infra.js.map +0 -1
  431. package/dist/commands/template.d.ts +0 -42
  432. package/dist/commands/template.js +0 -191
  433. package/dist/commands/template.js.map +0 -1
  434. package/dist/lib/browser-auth.d.ts +0 -35
  435. package/dist/lib/browser-auth.js +0 -170
  436. package/dist/lib/browser-auth.js.map +0 -1
  437. package/dist/lib/openclaw.d.ts +0 -32
  438. package/dist/lib/openclaw.js +0 -164
  439. package/dist/lib/openclaw.js.map +0 -1
  440. package/dist/lib/seed.d.ts +0 -13
  441. package/dist/lib/seed.js +0 -135
  442. package/dist/lib/seed.js.map +0 -1
  443. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
  444. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
  445. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
  446. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
  447. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  448. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
  449. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  450. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
  451. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
  452. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
@@ -8,11 +8,15 @@ synap use <workspace-name-or-id> # focus a workspace (this
8
8
  synap create entity --profile=task --name="…" --props='{"status":"todo","priority":"high"}' --json
9
9
  synap set entity <id> --props='{"status":"done"}' --json # merge-patch (only changed keys)
10
10
  synap ask "your question" --json # THE read verb — routes to the right store(s) + shows which answered
11
- synap capture --type=lesson --claim="…" --json # Work lane (default) — domain knowledge → active workspace
11
+ synap create entity --profile=knowledge --name="…" --props='{"knowledgeForm":"fact|caution|convention","ek_claim":"…"}' --content="…" --json
12
12
  synap capture --global --type=reference --claim="…" --json # Global lane — pod-wide cross-cutting runbook (knowledge_keys)
13
13
  synap observe write "…" --json # User lane — durable user model (inferences proposed)
14
14
  ```
15
15
 
16
+ **Titles:** ≤ 80 characters, the lasting thing, no status words, ids or "…"; the
17
+ receipt's `titleLint` says what to rewrite. Rules + what counts as knowledge:
18
+ `synap_load_skill("system/synap/writing-titles")`.
19
+
16
20
  **The canonical verbs:** `ask` (read) · `capture` (structured write — pick a lane:
17
21
  Work default / `--global` / `observe` for User) · `orient` (bootstrap). `note` exists
18
22
  for the HUMAN's raw "dump now, structure later" inbox — **the AI always `capture`s
@@ -7,11 +7,13 @@ the low-level doors below only when you deliberately want a single substrate or
7
7
  specific shape (a graph traversal, a typed-entity filter, an entity's neighborhood).
8
8
 
9
9
  ```
10
- # THE read door — routes across semantic / procedural / episodic, tells you which answered
10
+ # THE read door — routes across semantic / procedural / episodic / library, tells you which answered
11
11
  POST /api/hub/knowledge/ask body: { query, workspaceId?, limit? }
12
12
  → { query, routedTo: [...], primary, answers: [{ substrate, items, status }], degraded, understanding, verdict }
13
13
  ```
14
14
 
15
+ A link the person kept is in their Library: `ask` finds it (a `library` block — title, source URL, a snippet of what was read, who read it; `degraded: ["library"]` means the Library could not be read, never "nothing kept"). To read any URL use the `read_webpage` intent (builtin `web.read`).
16
+
15
17
  Low-level doors (`ask` routes to these — graph-based, not semantic; type filter →
16
18
  relations → neighborhood):
17
19
 
@@ -1,46 +1,16 @@
1
- ## Reflexes — the two habits, every session
1
+ ## Reflexes — what holds on every door
2
2
 
3
- > Canonical source — MCP instructions and other surfaces derive from this file.
3
+ > Canonical source — the MCP `instructions` field is derived from this file and composed with live grounding under ONE 2 KB budget (pinned by `instructions-budget.test.ts`). Most important first. Depth belongs in a skill, never here.
4
4
 
5
- You are connected to the user's Synap pod — their sovereign personal data brain
6
- (the source of truth about their life, work, projects, people, and preferences).
7
- Two reflexes hold on every session, on every door (MCP, IS, CLI, HTTP):
5
+ The user's Synap pod: their source of truth. Tool names below are stems; your door may prefix them (`pod__ask`).
8
6
 
9
- - **Recall — BEFORE any non-trivial task.** Before answering anything about the
10
- user's own world, and before creating anything, call `synap_ask` (CLI:
11
- `synap ask`, REST: `POST /api/hub/knowledge/ask`) to recall what the pod
12
- already knows. Prefer it over your own assumptions or training data — asking
13
- first also avoids duplicate creates.
14
- - **Capture — AFTER you learn something durable.** A fact, a decision, a new
15
- person/company/task, a stated preference — call `synap_capture` (CLI:
16
- `synap capture`) to write it back. Don't wait to be asked; this is how the
17
- second brain grows.
7
+ 1. **Recall first.** Before answering or creating, `ask`.
8
+ 2. **Capture after.** A durable fact, decision, person, task: `capture`; about the user: `remember_fact`. No private scratchpad.
9
+ 3. **Orient once.** `orient`: pending review (raise first), open sessions, kinds.
10
+ 4. **Work in a session.** `start_session` or resume (playbook `templateId`); a lasting goal = TRACK: `list_tracks`, else `start_track`; work in it = `start_session` + `trackId`; 2-5 `criteria`; status moves carry `expectedStatus`; person-only: `owner:'human'` slot + `blockedReason` + `ask` (confirm/choose with 1 `recommended`/form/act/provide), then `wait_for_answer` if listed; post progress, questions and results in its room (`post_message` to `session.channelId`); your own chat may repeat them; `evaluate_session` before `complete_session`.
11
+ 5. **Never guess a project.** Pin only what the user names (`set_workspace_focus`, `set_project_focus`).
12
+ 6. **`proposed` is success**: keep going, never retry.
13
+ 7. **Discover before inventing.** `list_profiles` / `list_capabilities` before defining a kind, role, space. **Extend first** (facet, overlay, parent); never a twin.
14
+ 8. **One space per domain**; projects filter it (`file_into_project`, `project_use_workspace`).
18
15
 
19
- Run `synap_orient` (CLI: `synap orient`) once per session to see the available
20
- workspaces, projects, and entity types before acting.
21
-
22
- **Writes are governed: a `"proposed"` response is normal, never an error.** It
23
- means the write is queued for the user's review — like a PR, not a failure. Keep
24
- working; see `writes.md` for the full governance contract and `inline-patterns.md`
25
- for how to surface a proposal's review link in a Companion reply.
26
-
27
- **No private scratchpad.** Everything you learn goes into the shared graph, not a hidden note. Capture a proven tool-fact into `knowledge` immediately; PROMOTE it into a curated skill only once it's proven reusable — a skill is a versioned artifact (one capability, when-to-use + do/don't), never an append-anything log.
28
-
29
- ## Escalation ladder (keep in a corner of your head)
30
-
31
- You can always escalate — never dead-end on "I can't." Full detail: `escalation-ladder.md`.
32
-
33
- - **L0 Reflexes** — recall before, capture after, proposed ≠ error
34
- - **L1 OPERATE on data** — capture, create_entity, link, attach KNOWN facets, sessions
35
- - **L2 DISCOVER before invent** — list_profiles, list_capabilities, market.search (capability|template|automation|cell)
36
- - **L3 MUTATE meta-model (proposal-gated)** — only if L2 empty for the need:
37
- define_role, create_property_def/profile, create_view, create_workspace, market.install.
38
- **Template FIRST for new domains:** market.search(kind:template) before freehand create_workspace
39
- - **L4 CRYSTALLIZE after proof** — promote_session_to_playbook, promote_cell_to_renderer, create_playbook.
40
- Never crystallize a one-off that hasn't succeeded once
41
-
42
- **Gates:**
43
-
44
- - Blocked / can't express need → L2 then L3 propose (never dead-end error; never silent invent)
45
- - Success / repeatable pattern → one structural suggestion (question first if speculative)
46
- - Capture placement routes to EXISTING lenses only — never invent a workspace from capture
16
+ Depth: `load_skill` `system/synap/concepts`, `work-model`, `focus-sessions`, `from-intent`, `escalation-ladder`, `writes`, `catalog`.
@@ -10,6 +10,12 @@ ViewFrame is the standard way to create custom data visualizations in Synap. Use
10
10
  | User asks for a specific chart type, map, 3D scene, or custom layout | Generate a ViewFrame widget |
11
11
  | User says "show X as a [funnel / heatmap / treemap / scatter / globe]" | Generate a ViewFrame widget |
12
12
 
13
+ ### Default vs. generated — never the reflex, always the explicit ask
14
+
15
+ Every kind already renders as a familiar, kind-shaped card — its built-in `entity-card` (small block) / `entity-detail` (full page) / `entity-profile` (dashboard) renderer. That built-in is the DEFAULT for everyone, including brand-new user-defined kinds (which get an automatic card built from the schema — no generation needed). **Never generate a frame renderer as a kind's default presentation.** Generate one ONLY when the user explicitly asks for a custom look — a specific chart type, a redesigned card, a bespoke layout — and bind it PER KIND (one profile's one renderer slot), never as a blanket replacement for every kind. The sandbox's egress holes (see Security below) are still open, so treat "generate a view/card" as a deliberate, scoped request, not something to reach for by default.
16
+
17
+ After binding, tell the user where the result lives: **"⋯ → Customize display"** on that kind's page (Renderer Studio itself now lives in Builder mode / Settings, not a designer mode you build). That is the one place a human reverts it or picks something else — never invent a second, agent-only way to switch it back.
18
+
13
19
  ### What ViewFrame Is
14
20
 
15
21
  - A sandboxed iframe that renders **one ES module** that default-exports a React component (or plain JS)
@@ -17,7 +23,7 @@ ViewFrame is the standard way to create custom data visualizations in Synap. Use
17
23
  `deps` map, but the current Hub `cells/define` persistence path does not yet
18
24
  retain that map, so external runtime dependencies are not a reliable contract.
19
25
  - The host injects a `SynapWidget` bridge for data access and shell actions
20
- - Security: `sandbox="allow-scripts allow-modals allow-popups"`, no `allow-same-origin`, no cookies, no pod token
26
+ - Security: `sandbox="allow-scripts allow-modals"` — no `allow-popups`, no `allow-same-origin`, no cookies, no pod token
21
27
 
22
28
  ### Authoring contract
23
29
 
@@ -32,7 +38,7 @@ A ViewFrame cell is **one self-contained ES module** (inline in `rendererSource`
32
38
 
33
39
  **Use `POST /api/hub/cells/define` — this is the canonical Hub Protocol path for AI-generated cells.**
34
40
 
35
- It is idempotent (upserts on typeKey), pod-global by default (no workspaceId needed), and immediately available across all of the user's workspaces without any proposal step.
41
+ It is idempotent (upserts on typeKey) and pod-global by default (no workspaceId needed). **It IS governed for agent callers** — `POST /cells/define` runs `checkPermissionOrPropose({ resource: "cell", action: "define", trustLevel: "generated" })`; a `status: "proposed"` response is the normal outcome for AI-generated renderer source, not an error — surface `reviewUrl` and keep going. Only an operator-initiated define auto-applies.
36
42
 
37
43
  ```
38
44
  POST /api/hub/cells/define
@@ -100,7 +106,7 @@ The cell appears immediately in the side panel with "Q2 Revenue Report" as the t
100
106
 
101
107
  > **Note:** `POST /api/hub/widget-definitions` (tRPC path) still works but is the internal/admin path. Use `POST /api/hub/cells/define` for all agent-generated cells.
102
108
 
103
- ### CLI commands (when running as Claude Code / OpenClaw agent)
109
+ ### CLI commands (when running as Claude Code or another terminal agent)
104
110
 
105
111
  ```bash
106
112
  # Build a multi-file cell source into a single ES module bundle
@@ -120,7 +126,7 @@ synap doc create --title "Q2 Report" --file ./report.md
120
126
  synap doc update <docId> --file ./updated-report.md
121
127
 
122
128
  # Arrange widgets on an existing bento view
123
- synap view arrange <viewId> --blocks '[{"id":"b1","kind":"widget","widgetKind":"generated:my-chart","layout":{"x":0,"y":0,"w":8,"h":6}}]'
129
+ echo '[{"key":"generated:my-chart","x":0,"y":0,"w":8,"h":6}]' | synap view arrange <viewId>
124
130
  ```
125
131
 
126
132
  ### The SynapWidget Bridge (inside the iframe)
@@ -157,6 +163,33 @@ SynapWidget.onInit(async ({ config, context }) => {
157
163
 
158
164
  All `query()` calls return a Promise. Entity shape: `{ id, title, profileSlug, properties, createdAt, … }`.
159
165
 
166
+ #### Intent reads (a kind's pipeline, goal, needs-you, sessions)
167
+
168
+ The same reads a kind's own page makes, so a frame can be that kind's dashboard. The host stamps the lens (the active space and project); a `workspaceId` / `projectId` you pass is ignored. `trackId` narrows to one track.
169
+
170
+ | Operation | Params | Returns |
171
+ | ---------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
172
+ | `lifecycle.board` | `profileSlug` (required), `trackId`, `windowDays`, `firstN`, `column` + `cursor`, `limit`, `workedBy` | `{ lifecycle: { profileSlug, property, options }, columns: [{ key, category, count, stuck, items: [{ id, name, status, since, stuck, workedBy? }] }], live, total, doneWindowed, lostWindowed, suggestedShape, window, nextCursor }` |
173
+ | `lifecycle.throughput` | `profileSlug`, `trackId`, `bucket` (`day` · `week` · `month`), `count` | `{ bucket, since, buckets: [{ bucketStart, done, lost }] }`, oldest first, zeros included |
174
+ | `attention.needsYou` | `profileSlug`, `trackId`, `limit` | `{ signals: [{ id, kind, title, count, occurredAt, target }] }` |
175
+ | `attention.count` | `profileSlug`, `trackId` | `{ needsYou, decisions, blocked, review, captures, truncated, … }` |
176
+ | `sessions.list` | `profileSlug` (its things) or `entityId` (one thing), `status`, `kind` (default `work`), `limit` | `[{ id, title, goal, status, currentStage, progress, startedAt, … }]` |
177
+
178
+ ```js
179
+ const board = await SynapWidget.query("lifecycle.board", {
180
+ profileSlug: "post",
181
+ firstN: 5,
182
+ });
183
+ if (board?.error) return showError(board.error); // 404 = unknown kind, 412 = no lifecycle
184
+ const month = await SynapWidget.query("lifecycle.throughput", {
185
+ profileSlug: "post",
186
+ bucket: "month",
187
+ count: 1,
188
+ });
189
+ ```
190
+
191
+ A failed read returns `{ error }`. Show it as a failure, never as an empty board. Moves still go through `update_entity` (the lifecycle property), so the status door and governance apply.
192
+
160
193
  #### Mutations (governance-gated — return `{ status: "approved" | "proposed" | "denied" }`)
161
194
 
162
195
  ```js
@@ -182,7 +215,7 @@ await SynapWidget.mutate("delete_entity", { id: "uuid" });
182
215
  await SynapWidget.mutate("create_relation", {
183
216
  sourceEntityId: "uuid-a",
184
217
  targetEntityId: "uuid-b",
185
- type: "related_to",
218
+ type: "relates_to",
186
219
  });
187
220
  ```
188
221
 
@@ -77,7 +77,7 @@ User: _"I'm trying to figure out whether we should build our own orchestrator or
77
77
  } }
78
78
  ```
79
79
 
80
- 4. When the user picks, create a decision linked to the question:
80
+ 4. When the user picked through an answered `confirm`/`choose` ask, the pod ALREADY filed the decision (`slot.decisionId`) — link that one, never create a twin. Picked in plain chat? Create it yourself, linked to the question:
81
81
 
82
82
  ```json
83
83
  POST /api/hub/entities
@@ -0,0 +1,96 @@
1
+ ## Work model — how work is shaped on a pod
2
+
3
+ Load this before you plan, start or run work, or author a process. The long form is the pod document "The Synap work model" (36878a70-6cbb-4122-8bfa-288fdbd65218); the words are in `concepts`.
4
+
5
+ ### Why
6
+
7
+ A process is the life of a **thing**, not a script. A lead, a post or a feature has ONE status. Boards, workers, sessions, goals and history read that status or move it through ONE door. So "when a post enters Review, run the review" is one rule, "how many leads reached Qualified this month" is a count, and a person and an agent can work the same thing without overwriting each other. Before, each playbook kept its own stages and status field, and the same fact lived in three places.
8
+
9
+ ### The nouns
10
+
11
+ | Noun | What it is | Not |
12
+ | -------------------- | ----------------------------------------------------------------------------------- | ------------------------------------ |
13
+ | **Project** | a commitment, and a lens across spaces | a method, a domain |
14
+ | **Track** (optional) | a LASTING intent in one project: direction, instructions, goal; it turns workers on | a list of stages; it never completes |
15
+ | **Thing** | any entity: one kind, maybe roles, one status per kind or role | a second entity for a hat |
16
+ | **Session** | the unit of work that closes: goal, criteria, room; one thing or a batch | a "run" because it follows a method |
17
+
18
+ Not nouns (nobody manages them as objects): a **pipeline** is a view of a lifecycle; a **worker** is configuration (a method + a trigger + a size); a **method** is a playbook a session may follow; a **check** is a recurring verification.
19
+
20
+ How they relate: a project files things; each kind or role declares one **lifecycle** (its status list); its **pipeline** is computed (columns = the options in order); a status change fires **workers**, which start **sessions** carrying the project, the track and their **targets**; a session moves each thing's status through the door. **Hand-off is a role:** a won deal makes the party a client (attach the role); nothing is copied.
21
+
22
+ ### Three tenses of a thing
23
+
24
+ - **Past = history.** Every status change is one transition event: from, to, who, which session, why.
25
+ - **Present = status.** One value per kind or role, in its own column.
26
+ - **Future = agenda.** Tasks and events linked to the thing, with an owner. _(Planned, wave 4.)_
27
+
28
+ ### Five categories
29
+
30
+ Every lifecycle option has one fixed category: `open · active · paused · done · lost`. Names are free; rules read the category. An agent moving a thing into `done` or `lost` proposes by default; an option marked `humanOnly` is never set by an agent. A space may ADD options; it never renames, removes or recategorises one.
31
+
32
+ ### The one door
33
+
34
+ Every status change — your call, a board drag, a method's step, a sync — goes through `moveStatus`. As an agent: a kind's status = `update_entity` with the lifecycle property set to the new value AND, over MCP, `expectedStatus` = the status you saw (the in-app `update_entity` has no `expectedStatus` yet; the door still checks the lifecycle); a role's status = `update_facet` `status` where your tools list it (the in-app agent; MCP has no role-status tool yet).
35
+
36
+ - `conflict` (with the current status) is normal: someone moved it; re-read and decide again. A person's move always wins.
37
+ - `proposed` is success (a done/lost move, or governance said review).
38
+ - A refusal naming the valid options means the value is not in the declared lifecycle: pick one of them.
39
+ Never invent a status, never keep your own stage field.
40
+
41
+ ### Session size
42
+
43
+ - **Per thing** when each item needs its own thinking: a post, a feature, a deal in negotiation.
44
+ - **Per batch** when items are interchangeable: one session for "find 10 leads today" or "today's follow-ups".
45
+ - A session's **step is its subject's status**: move the thing, the step follows.
46
+ - **Set the subject.** A session about one thing names it: `subjectEntityId` on `start_session`, or on `update_session` the moment the thing exists (a batch names its things as targets). A session on no thing shows on the homes as "No thing yet · attach one", outside every pipeline.
47
+ - Following a method does not turn your session into a run; it stays your work and still shows in the method's runs.
48
+ - **Targets get a result each**: a worker session holds its things as targets. Your own move of a target marks it `done`; someone else's move marks it `skipped`; targets left at close are `skipped`. Put the outcome on each thing, not only in a summary.
49
+
50
+ ### Workers
51
+
52
+ A worker is a playbook **activator**, declared on the method and owned by the lifecycle: `on` = `created` · `enters_status` (+ `status`) · `count` (+ `status`, `min`: once N things wait) · `schedule` (+ `cron`) · `manual`; `size` = `per_thing` · `per_moment` (a count or schedule is always per batch); `mode` = `propose` (default) · `run`; `maxPendingApprovals` throttles it. It compiles into a governed rule the owner can pause; it fires once per thing per transition. A track or project **turns it on** for its scope; installs turn it on space-wide. Authoring: `processes`.
53
+
54
+ ### Tracks
55
+
56
+ A track holds an owner, a direction, instructions, the workers it turns on, and a goal (stated, or measured as transitions into `done`). It has no stages and never completes: pause or archive it. Work in it = `start_session` + `trackId`. A thing may count for two tracks. Solo users may never need one: workers can run space-wide. Legacy: `start_stage_session` and `add_track_stage` serve old tracks started from a method; never `advance_track` without the user.
57
+
58
+ ### The homes: what each space makes, what is moving
59
+
60
+ Home, a space and a project read the work through two reads (the same answer every app shows):
61
+
62
+ - `lifecycle.home` (Hub `GET /api/hub/lifecycle/home?projectId=`): every space you see with its intent and, per kind it produces, the pipeline in one line, needs-you, being-worked and one headline thing.
63
+ - `lifecycle.moving` (Hub `GET /api/hub/lifecycle/moving?workspaceId=&projectId=&limit=`): the things with open work on them, the work under each (asks you first), and `unattached`, the open sessions on no thing.
64
+
65
+ Read them to answer "what is going on" before you list sessions one by one.
66
+
67
+ ### A kind's dashboard
68
+
69
+ A kind with a lifecycle has its own page: the board, Needs you, the sessions on its things. To give it a custom Dashboard ("make this my Posts dashboard"), `create_cell` a frame over the bridge's intent reads (`lifecycle.board`, `lifecycle.throughput`, `attention.needsYou`, `attention.count`, `sessions.list`), then `promote_cell_to_renderer` with `slot: "dashboard"` (the `entity-profile` content kind). Recipe: `synap-ui`; params and shapes: `viewframe-cells`.
70
+
71
+ ### Rules of thumb
72
+
73
+ 1. Find the thing before creating one: resolve identity, then attach a role — never a twin.
74
+ 2. Status changes go through the door, with `expectedStatus`.
75
+ 3. Never invent a status or a second status field; the lifecycle is declared on the profile (`list_profiles`).
76
+ 4. Size the session from the work: per thing or per batch.
77
+ 5. Results go on the things, not only in prose.
78
+ 6. `proposed` is success. Commitments (publish, send, sign, spend) are a person's call.
79
+
80
+ ### Applied: content (Content OS)
81
+
82
+ - Thing = a **post**. Lifecycle `post-status`: Idea (open) · Briefed · Scripted · In Draft · Review · Scheduled (active) · Published (done) · Archived (lost, human-only).
83
+ - Nothing publishes itself: a move to Published is a proposal the person approves on the preview.
84
+ - Pipeline = the Posts board, filtered by project or campaign.
85
+ - Workers: **Draft** (per thing, enters Briefed) · **Review prep** (per thing, enters Review, ends by proposing the publish date) · **Ideas** (per batch, weekly, creates posts at Idea). Today the catalog ships them as Produce Content (enters Briefed), Repurpose (enters Published) and Plan Next Content (weekly, off by default).
86
+ - "The next posts" = read the pipeline: gaps per pillar, posts waiting per status.
87
+
88
+ ### Applied: leads and deals (CRM)
89
+
90
+ - **Lead** = a role for qualification only, `leadStage`: new · researching · outreach (open) · engaged · qualified · nurturing (active) · converted (done) · disqualified (lost, human-only).
91
+ - **Deal** = the sale, `commercialStage`, created only at hand-off. A **won** deal attaches the client role to the party.
92
+ - A Cal.com booking makes the attendee a lead at `engaged` and records the call as an event; it never creates a deal and never moves a lead backwards.
93
+
94
+ ### Point another AI here
95
+
96
+ Every door can load this: `load_skill system/synap/work-model`. To make a space carry it, put a one-line pointer in the space brief (`update_space_brief`, `purpose` or `framing`, 240 characters each): in-app agents and worker sessions read the brief every turn, MCP agents when they `orient`. To steer a session in flight, post the pointer in its room. A document attached to a session reaches an agent as a title only, so it does not teach.
@@ -25,7 +25,7 @@
25
25
  { "userId": "{userId}",
26
26
  "sourceEntityId": "ent_new_task",
27
27
  "targetEntityId": "ent_acme",
28
- "type": "related_to" }
28
+ "type": "relates_to" }
29
29
  ```
30
30
 
31
31
  5. Confirm: "Task created and linked to Acme, due Friday."
@@ -57,18 +57,17 @@
57
57
  You are authoring this text yourself — it is not a file you have. Don't create
58
58
  a `file`/`document`-kind entity and stuff the Markdown into it.
59
59
 
60
- 1. Search for an existing plan: `GET /entities?q=Q3 launch&profileSlug=knowledge&workspaceId=…` → none
60
+ 1. Search for an existing plan: `GET /entities?q=Q3 launch&profileSlug=note&workspaceId=…` → none
61
61
  2. Create a CONTENT-kind entity carrying the plan as `content` (the doc auto-materializes):
62
62
 
63
63
  ```json
64
64
  POST /api/hub/entities
65
65
  { "userId": "{userId}", "workspaceId": "{wsId}",
66
- "profileSlug": "knowledge",
66
+ "profileSlug": "note",
67
67
  "title": "Q3 launch strategic plan",
68
- "properties": { "ek_type": "reference" },
69
68
  "content": "# Q3 Launch Plan\n\n## Goals\n…\n\n## Timeline\n…"
70
69
  }
71
70
  ```
72
71
 
73
- 3. Link it to the relevant project: `POST /api/hub/relations` `{ sourceEntityId: "ent_new_plan", targetEntityId: "ent_project_q3", type: "related_to" }`.
72
+ 3. Link it to the relevant project: `POST /api/hub/relations` `{ sourceEntityId: "ent_new_plan", targetEntityId: "ent_project_q3", type: "relates_to" }`.
74
73
  4. Confirm: "Plan captured and linked to Q3 launch." No upload, no `file` entity, no separate `synap_create_document` call.
@@ -1,6 +1,8 @@
1
1
  ## Workspace design — is this concern a WORKSPACE, or something smaller?
2
2
 
3
- Before you create a workspace, run the decision rule. A workspace (an operational **domain**) is the heaviest structure in the pod — it owns kinds, confers roles, carries its own team and automations. Most new concerns are NOT domains; they are a **hat**, an **initiative**, or a **stage**. Creating a workspace for one of those is the anti-pattern that fragments the graph. Decide first, then create.
3
+ Before you create a workspace, run the decision rule. A workspace (an operational **domain**) is the heaviest structure in the pod — it owns kinds, confers roles, carries its own team and automations. Most new concerns are NOT domains; they are a **hat**, an **initiative**, a **lasting goal** (track), or a **status**. Creating a workspace for one of those is the anti-pattern that fragments the graph. Decide first, then create. What each word means: `concepts` (the one glossary).
4
+
5
+ **One space per domain:** A space is a domain, installed once (Content, Brand, CRM…). A project is a filter across spaces. To make something “for project X”: file it into X inside the domain's space (`file_into_project`), and link X to the space (`project_use_workspace`). Never create a space named after a project, a brand or a client.
4
6
 
5
7
  ## The decision rule — a concern earns a workspace ONLY if ALL FOUR hold
6
8
 
@@ -11,20 +13,22 @@ Before you create a workspace, run the decision rule. A workspace (an operationa
11
13
 
12
14
  **All four, or it is not a workspace.** Then fork it to the right lighter structure:
13
15
 
14
- | If the concern is… | It is a… | Substrate | Example |
15
- | ----------------------------------------------------------- | -------------- | -------------------------------------- | ------------------------------------------- |
16
- | a **role/hat** an existing entity wears in a domain | **Facet** | `attach_facet` (`profileKind: "role"`) | `client`, `sponsor`, `prospect`, `investor` |
17
- | a **cross-cutting, time-bound initiative** spanning domains | **Project** | `create_project` (a lens) | a campaign, an engagement, a launch |
18
- | a **stage/filter WITHIN a domain** | **State/View** | a `status` property def + a view | pipeline stage, "active"/"archived" |
16
+ | If the concern is… | It is a… | Substrate | Example |
17
+ | ----------------------------------------------------------- | ----------- | -------------------------------------- | ------------------------------------------- |
18
+ | a **role/hat** an existing entity wears in a domain | **Facet** | `attach_facet` (`profileKind: "role"`) | `client`, `sponsor`, `prospect`, `investor` |
19
+ | a **cross-cutting, time-bound initiative** spanning domains | **Project** | `create_project` (a lens) | a campaign, an engagement, a launch |
20
+ | a **lasting goal** a project pursues (worked in sessions) | **Track** | `start_track` (no method needed) | grow the newsletter, win ten clients |
21
+ | a **stage/filter WITHIN a domain** | **Status** | an option of the kind's lifecycle | pipeline stage, "active"/"archived" |
19
22
 
20
23
  ## The decision procedure (follow in order)
21
24
 
22
25
  1. **Name the source-of-truth noun.** What kind would this workspace _own_ that no existing workspace owns? Run `list_profiles` — if the noun already lives in another domain, you have a facet or a project, not a domain. STOP.
23
26
  2. **Test all four conditions.** Owns kinds AND own team AND native automations AND stable. Any one fails → fork below.
24
- 3. **If it's a hat** (a status/role on an entity that already exists elsewhere) → resolve the entity, `attach_facet`. Never a workspace, never a second entity.
27
+ 3. **If it's a hat** (a status/role on an entity that already exists elsewhere) → resolve the entity, `attach_facet`. Never a workspace, never a second entity. One role per name, pod-wide: a role several workspaces use is ONE role, each workspace adding properties by overlay — never a per-workspace twin (`concepts`).
25
28
  4. **If it's time-bound work across domains** → `create_project` and set it as the lens; the work files into it from whatever workspace holds the data. **A project is a COMMITMENT WITH GRAVITY** — a real initiative that ties work together (a campaign, an engagement, a client, a launch). Tasks, plans, repos, themes, and topics are **entities**, never projects. Before you create one: (a) **search existing projects first** (`synap orient` / `GET /api/hub/projects`) and prefer **linking into an existing project** via `belongs_to_project` — near-duplicate names are rejected with the existing candidates; (b) an agent-created project must cite **≥5 existing entities** that would belong to it as `evidenceEntityIds` — the backend rejects a project with no gravity and tells you to store it as an entity or reuse an existing project instead; (c) **never create a project for the pod owner's own company** — the company _is_ the pod, not a project inside it.
26
- 5. **If it's a stage inside a domain** → add a `status` property def (`create_property_def`) and a view; don't split the stage into its own space.
27
- 6. **Only if all four held** → **template first** (escalation ladder L3):
29
+ 5. **If it's a lasting goal a project pursues** ("keep the content side of the launch going") → a **track**: `list_tracks`, else `start_track` (`name`, `direction`); work in it with `start_session` + `trackId`. Never a workspace, never a twin project.
30
+ 6. **If it's a stage inside a domain** → it is an option of the kind's or role's declared lifecycle, never a role and never a space. Its pipeline is computed from the lifecycle: open it, don't build one. A kind with no lifecycle yet gets a `status` property def (`create_property_def`).
31
+ 7. **Only if all four held** → **template first** (escalation ladder L3):
28
32
  `market.search({query, kind: "template"})` and propose install of a matching
29
33
  template before freehand `create_workspace`. Freehand create is last resort
30
34
  and always proposed — a deliberate move, offer it to the user (see
@@ -32,7 +36,7 @@ Before you create a workspace, run the decision rule. A workspace (an operationa
32
36
 
33
37
  ## The CRM corollary — the load-bearing example
34
38
 
35
- Operational state — **prospect → client → delivered** — is a **FLOW across domains**, expressed as **facets + a triggered project**, NEVER as workspaces and NEVER by bolting delivery onto the identity domain.
39
+ Operational state — **prospect → client → delivered** — is a **FLOW across domains**, expressed as **facets + an engagement project** (its delivery runs as a track), NEVER as workspaces and NEVER by bolting delivery onto the identity domain.
36
40
 
37
41
  - CRM = **who** (owns `person`/`company`, confers the `lead`/`client` facets).
38
42
  - Operations = **what we do for them** (owns `engagement`/`contract`/`deliverable`).
@@ -1,11 +1,29 @@
1
1
  ## Core writes
2
2
 
3
- **Two write doors, one gradient.** `create_entity` is for exactly ONE
3
+ > **Scope of this page.** It covers writes that produce ENTITY-shaped data.
4
+ > There are ~30 other write tools (sessions, capabilities, automations, cells,
5
+ > playbooks, views, channels…) that this page does not orient across — reach for
6
+ > `synap_list_capabilities` / the escalation ladder for those. If you are about
7
+ > to pick a tool and the choice feels ambiguous, that ambiguity is real: the
8
+ > tools below differ in ATOMICITY and COLLISION policy, not just in shape.
9
+
10
+ **Two entity-write doors, one gradient.** `create_entity` is for exactly ONE
4
11
  fully-structured, typed entity you already have. For anything unstructured,
5
12
  several entities, or a graph — or **when in doubt** — use the capture door
6
13
  (`synap_capture`, see `capture.md`): precision comes from sending more structure
7
14
  in the SAME call, never from picking a different tool or a second commit step.
8
15
 
16
+ The difference that is NOT visible in either tool's description: `create_entity`
17
+ writes one entity with per-entity governance and REJECTS a name collision unless
18
+ `forceCreate`; capture-with-`entities[]` files ONE atomic proposal for the whole
19
+ graph and DEDUP-MERGES instead of rejecting. Pick by whether you want a partial
20
+ write to be possible, not by how structured your data feels.
21
+
22
+ **Every title is linted.** Both doors return `titleLint` in the receipt when a
23
+ title breaks the rubric (too long, cut off, status words, ids, a placeholder…);
24
+ the title is stored as sent, so rewrite it. Over 200 characters the write is
25
+ refused. Title rules and what counts as knowledge: `writing-titles.md`.
26
+
9
27
  ### Create an entity (one exact typed entity)
10
28
 
11
29
  Before this call, use `/discover?userId=…&profileSlugs=<kind>` to read the
@@ -31,9 +49,10 @@ The response has legacy `status`/`id` fields plus `writeReceipt`:
31
49
  `pending`/`proposed` means a proposal exists and no entity is live yet;
32
50
  `applied` means the reported direct write completed; `partial` means a follow-up
33
51
  (for example a facet) failed after the entity applied. **A `proposed`/`pending`
34
- receipt is a governed success, not an error** — surface its `reviewUrl`, never
35
- claim completion, and only enrich again when the receipt identifies a real
36
- missing fact.
52
+ receipt is a governed success, not an error** — you MUST surface its
53
+ `reviewUrl` as a clickable markdown link in the same reply (see
54
+ `inline-patterns.md`), never claim completion, and only enrich again when the
55
+ receipt identifies a real missing fact.
37
56
 
38
57
  For several entities, creation-time roles/facets, or relations that need one
39
58
  review, send the whole graph through the capture door (`synap_capture` with
@@ -59,6 +78,26 @@ PATCH /api/hub/entities/{entityId}
59
78
 
60
79
  **Properties are deep-merged — send only the keys you want to change.** An update with `{ "status": "done" }` leaves all other properties untouched. You never need to re-send the full properties object.
61
80
 
81
+ **Many changes → ONE call: `synap_update_entities`** (up to 500 items
82
+ `{id, patch, expected?}`; Hub: `POST /api/hub/entities/batch-update`). Never
83
+ script a loop of single updates, and never apply a change set over Hub REST with
84
+ a user key. Governance is per item: some apply now, the rest ride ONE review for
85
+ the person; the answer lists `applied` / `proposed` / `denied` / `skipped` — a
86
+ partial result is normal. Send `validate: true` first to see each verdict without
87
+ writing, and an `idempotencyKey` so a retry never acts twice.
88
+
89
+ **A write blocked on a space join is KEPT.** When you write into a space your
90
+ agent has not joined (`synap_orient` marks it `joined: false`), the answer is
91
+ `proposed` with `proposalType: "join"`, `deferred: true` and a `ref`: the write
92
+ rides the join request and is replayed for you once it is approved. Do not
93
+ resend it, and do not retry it into another space.
94
+
95
+ **Moving, not recreating.** A session into another space:
96
+ `synap_update_session` with `moveToWorkspaceId` (never `workspaceId` — that is
97
+ the connection's lens). A kind another space needs: `synap_change_kind_scope`
98
+ (`scope: "shared"` + `allowedWorkspaceIds`), never a twin kind. Records:
99
+ `synap_move_entities`. All three are reviewed.
100
+
62
101
  ### Authored text is content, not a `file`
63
102
 
64
103
  Something **you** author — a pitch deck, a strategic plan, a note body — is
@@ -67,8 +106,8 @@ kind (`note`, `knowledge`, or a fitting domain kind) with `content` set to the
67
106
  Markdown body; Synap **auto-materializes** that `content` into a real
68
107
  versioned document behind the scenes (`entities WHERE documentId = ?`) — no
69
108
  upload step needed. `file` is reserved for real uploaded bytes you actually
70
- have (the upload door / `synap upload`) — an agent has no filesystem, so it
71
- rarely touches `file` at all. Reach for `synap_create_document` /
109
+ have (`synap_store_file`; over 10MB `synap_request_upload`) — authored text
110
+ never becomes a `file`. Reach for `synap_create_document` /
72
111
  `POST /api/hub/documents` directly only for a standalone rich document that
73
112
  isn't itself a title-worthy entity (see below) — never as a substitute for an
74
113
  entity's `content`.
@@ -82,9 +121,18 @@ You CAN store content you **hold** — you send it inline. Pick by what you have
82
121
  | **Content in hand** — a report/CSV/image/PDF/etc. you generated or received (text or bytes) | **`synap_store_file`** (`content` for text, `contentBase64` for binary) + `mimeType`/`filename` | a `file` entity, content stored **as-is, never read** (≤10MB inline) |
83
122
  | Text you're **authoring as a note/idea** (not "a file") — a plan, a thought | `synap_create_entity` with `content` (a content kind) | body auto-becomes a document — NOT a `file` |
84
123
  | Only a **URL/link** (no bytes) — a Google Doc, a PDF url, an article | `synap_create_document` with **`url`**, or attach via `entityId` | an external **reference** document (no bytes) |
85
- | A **large file on a local disk** you don't hold in context | the CLI `synap upload <path>` (streams it) — an agent can't send bytes it doesn't have | a `file` entity backed by stored bytes |
124
+ | A **large file** (over 10MB, up to 500MB video) | `synap_request_upload` → PUT the bytes to `uploadUrl` → `synap_store_file({ uploadToken })` | a `file` entity backed by stored bytes |
86
125
  | Only a file's **name**, nothing else | you **cannot** invent it — ask the human/client to provide the content or a link | — |
87
126
 
127
+ **A typed thing with a file → the KIND first, the bytes on it.** When a kind
128
+ exists for the thing (a logo is a `brand-asset`, not a `file`; check the space
129
+ brief or `synap_list_profiles`): (1) resolve-or-create that entity
130
+ (`synap_ask`, then `synap_create_entity`); (2) `synap_store_file` with
131
+ `attachToEntityId` = its id (`content` for SVG/text, `contentBase64` for
132
+ binary, ≤10MB inline; larger: `synap_request_upload`, then `uploadToken`); (3) link it /
133
+ `synap_file_into_project` if asked. A `proposed` create has no live id yet —
134
+ attach after approval. A bare `file` is only for bytes with no kind.
135
+
88
136
  **Store ≠ analyze.** `synap_store_file` / `synap_create_document` store content
89
137
  **deterministically — the file is NEVER read by an LLM.** Only fetch a document
90
138
  and reason over it when the user explicitly says "read/analyze this file."
@@ -106,11 +154,19 @@ POST /api/hub/documents
106
154
  "type": "markdown", // "markdown" | "html" | "text" | "code"
107
155
  "entityId": "ent_event_..." // attach to an entity for context
108
156
  }
157
+ // → { "id": "doc_abc", "documentId": "doc_abc", "status": "created", "ackState": "applied",
158
+ // "attached": { "entityId": "ent_event_...", "documentId": "doc_abc", "status": "updated" } }
109
159
  ```
110
160
 
161
+ `attached` reports the attach outcome: it is a governed entity update, so it can
162
+ be `proposed`, and it is `skipped` (with a `reason`) while the document itself is
163
+ awaiting review. Other optional fields: `url` (an https link — creates a reference
164
+ document with no stored bytes), `idempotencyKey` (a retry with the same key returns
165
+ the prior document), `expectedLabel` (the session-output slot it fulfils).
166
+
111
167
  `type: "html"` stores self-contained HTML. The browser renders it via the `html-doc` cell in a sandboxed iframe. Use for AI-generated reports, rich visualisations, custom charts, or anything beyond markdown.
112
168
 
113
- **Full HTML cell workflow** (AI → visible custom UI in any bento):
169
+ **HTML document workflow:**
114
170
 
115
171
  ```json
116
172
  // 1. Create the HTML document
@@ -119,35 +175,50 @@ POST /api/hub/documents
119
175
  "title": "Q2 Revenue Report", "type": "html",
120
176
  "content": "<!DOCTYPE html><html>…</html>",
121
177
  "entityId": "ent_project_..." }
122
- // → { "document": { "id": "doc_abc" }, ... }
178
+ // → { "id": "doc_abc", "documentId": "doc_abc", "status": "created", ... }
123
179
 
124
- // 2. Place the html-doc cell in any bento view
125
- POST /api/hub/views/{bentoViewId}/arrange
126
- { "userId": "{userId}", "workspaceId": "{workspaceId}",
127
- "widgets": [
128
- { "id": "b1", "kind": "html-doc", "config": { "documentId": "doc_abc" },
129
- "layout": { "x": 0, "y": 0, "w": 8, "h": 6 } }
130
- ] }
131
-
132
- // 3. Update the HTML (cell auto-refreshes)
180
+ // 2. Replace the HTML (read it first: GET → `revision`)
133
181
  PATCH /api/hub/documents/doc_abc
134
- { "userId": "{userId}", "content": "<!DOCTYPE html>…updated…</html>" }
182
+ { "userId": "{userId}", "content": "<!DOCTYPE html>…updated…</html>", "baseRevision": 3 }
183
+ // → a pending proposal; readers see the new HTML only once it is approved
135
184
  ```
136
185
 
186
+ `html-doc` is **not** an agent-placeable bento widget: `arrange` rejects it. The
187
+ document renders where it is opened (the Files app, or the entity it is attached
188
+ to). For HTML you want to embed elsewhere, create an HTML cell instance
189
+ (`POST /api/hub/cell-instances/html`) and embed it by `instanceId`.
190
+
137
191
  The iframe uses `sandbox="allow-scripts"` — scripts run but have no same-origin access to the parent app. The HTML is fully isolated.
138
192
 
139
- ### Update a document (title and/or content)
193
+ ### Update a document's content (a patch, reviewed)
194
+
195
+ Change the part you mean, not the whole body. Read it first —
196
+ `GET /api/hub/documents/{id}?userId={userId}` → `content`, `revision`,
197
+ `sections` (id + owner) — then:
140
198
 
141
199
  ```json
142
- PATCH /api/hub/documents/{documentId}
200
+ POST /api/hub/documents/{documentId}/patch
143
201
  {
144
202
  "userId": "{userId}",
145
- "title": "Updated title", // optional
146
- "content": "# Full replacement\n…" // full string — not a diff
203
+ "baseRevision": 3,
204
+ "ops": [
205
+ { "op": "replace_text", "old": "ships on Friday", "new": "ships on Monday" },
206
+ { "op": "upsert_section", "id": "risks", "title": "Risks", "body": "None yet." }
207
+ ]
147
208
  }
148
209
  ```
149
210
 
150
- Content is a **full replacement**, not a patch. Fetch the current content first if you want to append: `GET /api/hub/documents/{id}?userId={userId}` → `.content`, append, then PATCH.
211
+ Ops: `upsert_section {id, title, body}` (one section by id), `replace_text {old,
212
+ new}` (`old` must match **exactly once**, else 400 with the count), `append
213
+ {body}`, `replace_all {content}`. An agent's edit is filed as a proposal (a
214
+ governance rule may apply it directly); a person's section (`owner="human"`) is
215
+ never changed and an embed is never dropped unless you pass
216
+ `"allowRemovingEmbeds": true` (403 otherwise). A moved document answers 409 and
217
+ nothing is written: read again. An applied or approved edit reaches open editors
218
+ (`document:content-replaced`), so they reload instead of overwriting it. `PATCH /api/hub/documents/{id}` with `content` is the same door with
219
+ one `replace_all` — it cannot rename (a `title` is refused with 400; to rename an
220
+ entity's document, update the entity's title). MCP: `synap_update_document`;
221
+ full syntax in `document-embeds.md`.
151
222
 
152
223
  The reverse lookup is `entities WHERE documentId = ?`. Always attach the document to a meaningful entity (the meeting event, the project, the person) — a floating document is another orphan.
153
224
 
@@ -202,6 +273,8 @@ POST /api/hub/entities
202
273
 
203
274
  This creates a first-class decision entity linked to Project Eve. It shows up in traversals, can be superseded later (`supersededBy: newDecisionId`), and survives governance. Memory can't do any of that.
204
275
 
276
+ **A decision the PERSON must make** — create it with `decisionStatus: "proposed"` and the pod asks them for you: pass `decisionOptions` (≤8 of `{label, value?, description?}`) and `recommendedOption` (an option's `value`, else its `label`); set `sourceSessionId` to keep the question in your session. Their answer UPDATES that decision — never create a second one. Every answered `confirm`/`choose` ask already files its decision (`slot.decisionId`): don't create one for it. A person-owned slot blocked on a decision is ANSWERED by them (Yes/No or a choice) — it is never closed by marking it done. **Before you recommend**, recall the user's past decisions (`synap_ask`, or find `decision` entities) so your pick follows their past choices.
277
+
205
278
  ### Post to the user's personal channel
206
279
 
207
280
  ```