@synap-core/cli 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -198
  3. package/dist/build-info.json +6 -0
  4. package/dist/commands/agent-run.js +3 -2
  5. package/dist/commands/agent-run.js.map +1 -1
  6. package/dist/commands/agents.d.ts +32 -17
  7. package/dist/commands/agents.js +203 -237
  8. package/dist/commands/agents.js.map +1 -1
  9. package/dist/commands/app.d.ts +143 -0
  10. package/dist/commands/app.js +524 -0
  11. package/dist/commands/app.js.map +1 -0
  12. package/dist/commands/automate.d.ts +21 -0
  13. package/dist/commands/automate.js +42 -0
  14. package/dist/commands/automate.js.map +1 -0
  15. package/dist/commands/automation-schema.test.d.ts +16 -0
  16. package/dist/commands/automation-schema.test.js +77 -0
  17. package/dist/commands/automation-schema.test.js.map +1 -0
  18. package/dist/commands/automation.d.ts +12 -0
  19. package/dist/commands/automation.js +116 -66
  20. package/dist/commands/automation.js.map +1 -1
  21. package/dist/commands/box.d.ts +42 -0
  22. package/dist/commands/box.js +89 -0
  23. package/dist/commands/box.js.map +1 -0
  24. package/dist/commands/bridge-setup.d.ts +14 -1
  25. package/dist/commands/bridge-setup.js +395 -129
  26. package/dist/commands/bridge-setup.js.map +1 -1
  27. package/dist/commands/cap-connections.d.ts +4 -4
  28. package/dist/commands/cap-connections.js +14 -14
  29. package/dist/commands/cap-connections.js.map +1 -1
  30. package/dist/commands/capability.d.ts +3 -1
  31. package/dist/commands/capability.js +249 -176
  32. package/dist/commands/capability.js.map +1 -1
  33. package/dist/commands/catalog.d.ts +275 -0
  34. package/dist/commands/catalog.js +481 -0
  35. package/dist/commands/catalog.js.map +1 -0
  36. package/dist/commands/cell.d.ts +155 -8
  37. package/dist/commands/cell.js +416 -40
  38. package/dist/commands/cell.js.map +1 -1
  39. package/dist/commands/centrality.js +1 -13
  40. package/dist/commands/centrality.js.map +1 -1
  41. package/dist/commands/close-questions.d.ts +27 -0
  42. package/dist/commands/close-questions.js +49 -0
  43. package/dist/commands/close-questions.js.map +1 -0
  44. package/dist/commands/close-questions.test.d.ts +1 -0
  45. package/dist/commands/close-questions.test.js +52 -0
  46. package/dist/commands/close-questions.test.js.map +1 -0
  47. package/dist/commands/connect.d.ts +36 -13
  48. package/dist/commands/connect.js +68 -167
  49. package/dist/commands/connect.js.map +1 -1
  50. package/dist/commands/connections.d.ts +3 -2
  51. package/dist/commands/connections.js +95 -25
  52. package/dist/commands/connections.js.map +1 -1
  53. package/dist/commands/context.js +79 -44
  54. package/dist/commands/context.js.map +1 -1
  55. package/dist/commands/data-extra.d.ts +34 -0
  56. package/dist/commands/data-extra.js +203 -25
  57. package/dist/commands/data-extra.js.map +1 -1
  58. package/dist/commands/data.d.ts +120 -2
  59. package/dist/commands/data.js +295 -21
  60. package/dist/commands/data.js.map +1 -1
  61. package/dist/commands/diagnose.d.ts +66 -4
  62. package/dist/commands/diagnose.js +285 -28
  63. package/dist/commands/diagnose.js.map +1 -1
  64. package/dist/commands/doc.d.ts +11 -4
  65. package/dist/commands/doc.js +39 -14
  66. package/dist/commands/doc.js.map +1 -1
  67. package/dist/commands/doctor.d.ts +133 -3
  68. package/dist/commands/doctor.js +761 -41
  69. package/dist/commands/doctor.js.map +1 -1
  70. package/dist/commands/explain.js +5 -5
  71. package/dist/commands/explain.js.map +1 -1
  72. package/dist/commands/hooks.d.ts +19 -0
  73. package/dist/commands/hooks.js +70 -0
  74. package/dist/commands/hooks.js.map +1 -0
  75. package/dist/commands/import.d.ts +393 -13
  76. package/dist/commands/import.js +1150 -54
  77. package/dist/commands/import.js.map +1 -1
  78. package/dist/commands/init.d.ts +34 -9
  79. package/dist/commands/init.js +481 -981
  80. package/dist/commands/init.js.map +1 -1
  81. package/dist/commands/keys.d.ts +1 -0
  82. package/dist/commands/keys.js +15 -2
  83. package/dist/commands/keys.js.map +1 -1
  84. package/dist/commands/knowledge.d.ts +22 -6
  85. package/dist/commands/knowledge.js +121 -57
  86. package/dist/commands/knowledge.js.map +1 -1
  87. package/dist/commands/lens.d.ts +37 -1
  88. package/dist/commands/lens.js +194 -72
  89. package/dist/commands/lens.js.map +1 -1
  90. package/dist/commands/market-authoring.d.ts +29 -2
  91. package/dist/commands/market-authoring.js +348 -7
  92. package/dist/commands/market-authoring.js.map +1 -1
  93. package/dist/commands/market-official.d.ts +58 -0
  94. package/dist/commands/market-official.js +84 -0
  95. package/dist/commands/market-official.js.map +1 -0
  96. package/dist/commands/market.d.ts +400 -16
  97. package/dist/commands/market.js +1802 -146
  98. package/dist/commands/market.js.map +1 -1
  99. package/dist/commands/mcp.d.ts +60 -25
  100. package/dist/commands/mcp.js +251 -64
  101. package/dist/commands/mcp.js.map +1 -1
  102. package/dist/commands/observe.category.test.d.ts +1 -0
  103. package/dist/commands/observe.category.test.js +59 -0
  104. package/dist/commands/observe.category.test.js.map +1 -0
  105. package/dist/commands/observe.d.ts +3 -0
  106. package/dist/commands/observe.js +7 -5
  107. package/dist/commands/observe.js.map +1 -1
  108. package/dist/commands/observe.title.test.d.ts +1 -0
  109. package/dist/commands/observe.title.test.js +37 -0
  110. package/dist/commands/observe.title.test.js.map +1 -0
  111. package/dist/commands/open.d.ts +39 -9
  112. package/dist/commands/open.js +80 -25
  113. package/dist/commands/open.js.map +1 -1
  114. package/dist/commands/playbook.d.ts +42 -0
  115. package/dist/commands/playbook.js +171 -0
  116. package/dist/commands/playbook.js.map +1 -0
  117. package/dist/commands/pod.js +1 -1
  118. package/dist/commands/pod.js.map +1 -1
  119. package/dist/commands/pods.d.ts +11 -1
  120. package/dist/commands/pods.js +129 -131
  121. package/dist/commands/pods.js.map +1 -1
  122. package/dist/commands/proposals-actions.d.ts +62 -0
  123. package/dist/commands/proposals-actions.js +143 -8
  124. package/dist/commands/proposals-actions.js.map +1 -1
  125. package/dist/commands/proposals-await.d.ts +68 -0
  126. package/dist/commands/proposals-await.js +248 -0
  127. package/dist/commands/proposals-await.js.map +1 -0
  128. package/dist/commands/proton-setup.d.ts +73 -0
  129. package/dist/commands/proton-setup.js +579 -0
  130. package/dist/commands/proton-setup.js.map +1 -0
  131. package/dist/commands/providers.d.ts +23 -0
  132. package/dist/commands/providers.js +126 -1
  133. package/dist/commands/providers.js.map +1 -1
  134. package/dist/commands/raycast.js +6 -2
  135. package/dist/commands/raycast.js.map +1 -1
  136. package/dist/commands/rule.d.ts +150 -0
  137. package/dist/commands/rule.js +447 -0
  138. package/dist/commands/rule.js.map +1 -0
  139. package/dist/commands/session-feed-wait.d.ts +48 -0
  140. package/dist/commands/session-feed-wait.js +261 -0
  141. package/dist/commands/session-feed-wait.js.map +1 -0
  142. package/dist/commands/session-post.d.ts +40 -0
  143. package/dist/commands/session-post.js +96 -0
  144. package/dist/commands/session-post.js.map +1 -0
  145. package/dist/commands/session-wait.d.ts +116 -0
  146. package/dist/commands/session-wait.js +224 -0
  147. package/dist/commands/session-wait.js.map +1 -0
  148. package/dist/commands/sessions.d.ts +54 -0
  149. package/dist/commands/sessions.js +501 -58
  150. package/dist/commands/sessions.js.map +1 -1
  151. package/dist/commands/skill-manage.d.ts +21 -0
  152. package/dist/commands/skill-manage.js +136 -19
  153. package/dist/commands/skill-manage.js.map +1 -1
  154. package/dist/commands/skills-commands.d.ts +2 -0
  155. package/dist/commands/skills-commands.js +9 -1
  156. package/dist/commands/skills-commands.js.map +1 -1
  157. package/dist/commands/skills-commands.test.d.ts +1 -0
  158. package/dist/commands/skills-commands.test.js +57 -0
  159. package/dist/commands/skills-commands.test.js.map +1 -0
  160. package/dist/commands/skills.js +16 -0
  161. package/dist/commands/skills.js.map +1 -1
  162. package/dist/commands/status.d.ts +1 -4
  163. package/dist/commands/status.js +6 -35
  164. package/dist/commands/status.js.map +1 -1
  165. package/dist/commands/statusline.backoff.test.d.ts +13 -0
  166. package/dist/commands/statusline.backoff.test.js +100 -0
  167. package/dist/commands/statusline.backoff.test.js.map +1 -0
  168. package/dist/commands/statusline.js +16 -9
  169. package/dist/commands/statusline.js.map +1 -1
  170. package/dist/commands/sync-status.d.ts +12 -0
  171. package/dist/commands/sync-status.js +125 -0
  172. package/dist/commands/sync-status.js.map +1 -0
  173. package/dist/commands/templates-retire.d.ts +34 -0
  174. package/dist/commands/templates-retire.js +192 -0
  175. package/dist/commands/templates-retire.js.map +1 -0
  176. package/dist/commands/tools.js +6 -21
  177. package/dist/commands/tools.js.map +1 -1
  178. package/dist/commands/tracks.d.ts +112 -0
  179. package/dist/commands/tracks.js +543 -0
  180. package/dist/commands/tracks.js.map +1 -0
  181. package/dist/commands/update.d.ts +3 -11
  182. package/dist/commands/update.js +5 -134
  183. package/dist/commands/update.js.map +1 -1
  184. package/dist/commands/upload.d.ts +41 -3
  185. package/dist/commands/upload.js +120 -18
  186. package/dist/commands/upload.js.map +1 -1
  187. package/dist/commands/vendor.d.ts +28 -0
  188. package/dist/commands/vendor.js +110 -0
  189. package/dist/commands/vendor.js.map +1 -0
  190. package/dist/commands/versions.js +6 -0
  191. package/dist/commands/versions.js.map +1 -1
  192. package/dist/commands/view.js +10 -5
  193. package/dist/commands/view.js.map +1 -1
  194. package/dist/commands/whoami.d.ts +30 -3
  195. package/dist/commands/whoami.js +186 -23
  196. package/dist/commands/whoami.js.map +1 -1
  197. package/dist/commands/worker-accounts.d.ts +149 -0
  198. package/dist/commands/worker-accounts.js +339 -0
  199. package/dist/commands/worker-accounts.js.map +1 -0
  200. package/dist/commands/worker-accounts.test.d.ts +1 -0
  201. package/dist/commands/worker-accounts.test.js +224 -0
  202. package/dist/commands/worker-accounts.test.js.map +1 -0
  203. package/dist/commands/worker.d.ts +331 -0
  204. package/dist/commands/worker.js +1067 -0
  205. package/dist/commands/worker.js.map +1 -0
  206. package/dist/commands/worker.test.d.ts +1 -0
  207. package/dist/commands/worker.test.js +427 -0
  208. package/dist/commands/worker.test.js.map +1 -0
  209. package/dist/commands/workspace-ops.d.ts +35 -0
  210. package/dist/commands/workspace-ops.js +153 -0
  211. package/dist/commands/workspace-ops.js.map +1 -0
  212. package/dist/index.d.ts +6 -6
  213. package/dist/index.js +1043 -186
  214. package/dist/index.js.map +1 -1
  215. package/dist/lib/agent-connections.d.ts +31 -0
  216. package/dist/lib/agent-connections.js +33 -0
  217. package/dist/lib/agent-connections.js.map +1 -0
  218. package/dist/lib/agent-detect.d.ts +27 -0
  219. package/dist/lib/agent-detect.js +71 -0
  220. package/dist/lib/agent-detect.js.map +1 -0
  221. package/dist/lib/agent-door.d.ts +136 -0
  222. package/dist/lib/agent-door.js +429 -0
  223. package/dist/lib/agent-door.js.map +1 -0
  224. package/dist/lib/agents-config.d.ts +2 -0
  225. package/dist/lib/agents-config.js +4 -9
  226. package/dist/lib/agents-config.js.map +1 -1
  227. package/dist/lib/approval-poll.d.ts +31 -2
  228. package/dist/lib/approval-poll.js +20 -7
  229. package/dist/lib/approval-poll.js.map +1 -1
  230. package/dist/lib/atomic-file.d.ts +48 -0
  231. package/dist/lib/atomic-file.js +129 -0
  232. package/dist/lib/atomic-file.js.map +1 -0
  233. package/dist/lib/auth.d.ts +17 -11
  234. package/dist/lib/auth.js +47 -64
  235. package/dist/lib/auth.js.map +1 -1
  236. package/dist/lib/batch-approval.d.ts +85 -0
  237. package/dist/lib/batch-approval.js +170 -0
  238. package/dist/lib/batch-approval.js.map +1 -0
  239. package/dist/lib/box/egress.d.ts +82 -0
  240. package/dist/lib/box/egress.js +264 -0
  241. package/dist/lib/box/egress.js.map +1 -0
  242. package/dist/lib/box/evidence.d.ts +86 -0
  243. package/dist/lib/box/evidence.js +121 -0
  244. package/dist/lib/box/evidence.js.map +1 -0
  245. package/dist/lib/box/job-server.d.ts +72 -0
  246. package/dist/lib/box/job-server.js +246 -0
  247. package/dist/lib/box/job-server.js.map +1 -0
  248. package/dist/lib/box/provisioner.d.ts +83 -0
  249. package/dist/lib/box/provisioner.js +312 -0
  250. package/dist/lib/box/provisioner.js.map +1 -0
  251. package/dist/lib/box/proxmox.d.ts +112 -0
  252. package/dist/lib/box/proxmox.js +211 -0
  253. package/dist/lib/box/proxmox.js.map +1 -0
  254. package/dist/lib/box/wire.d.ts +98 -0
  255. package/dist/lib/box/wire.js +70 -0
  256. package/dist/lib/box/wire.js.map +1 -0
  257. package/dist/lib/capture-lane.d.ts +6 -5
  258. package/dist/lib/capture-lane.js +6 -5
  259. package/dist/lib/capture-lane.js.map +1 -1
  260. package/dist/lib/capture-structure.d.ts +230 -11
  261. package/dist/lib/capture-structure.js +251 -13
  262. package/dist/lib/capture-structure.js.map +1 -1
  263. package/dist/lib/catalog-templates.d.ts +59 -0
  264. package/dist/lib/catalog-templates.js +126 -0
  265. package/dist/lib/catalog-templates.js.map +1 -0
  266. package/dist/lib/cli-build.d.ts +19 -0
  267. package/dist/lib/cli-build.js +37 -0
  268. package/dist/lib/cli-build.js.map +1 -0
  269. package/dist/lib/client-header.test.d.ts +1 -0
  270. package/dist/lib/client-header.test.js +85 -0
  271. package/dist/lib/client-header.test.js.map +1 -0
  272. package/dist/lib/conversation-headers.d.ts +33 -0
  273. package/dist/lib/conversation-headers.js +69 -0
  274. package/dist/lib/conversation-headers.js.map +1 -0
  275. package/dist/lib/cp-packages.d.ts +167 -11
  276. package/dist/lib/cp-packages.js +253 -21
  277. package/dist/lib/cp-packages.js.map +1 -1
  278. package/dist/lib/credential-class.d.ts +144 -0
  279. package/dist/lib/credential-class.js +138 -0
  280. package/dist/lib/credential-class.js.map +1 -0
  281. package/dist/lib/describe-lens.d.ts +35 -0
  282. package/dist/lib/describe-lens.js +40 -0
  283. package/dist/lib/describe-lens.js.map +1 -1
  284. package/dist/lib/device-connect.d.ts +125 -0
  285. package/dist/lib/device-connect.js +256 -0
  286. package/dist/lib/device-connect.js.map +1 -0
  287. package/dist/lib/directory-lens.d.ts +99 -0
  288. package/dist/lib/directory-lens.js +187 -0
  289. package/dist/lib/directory-lens.js.map +1 -0
  290. package/dist/lib/exporter-coverage.d.ts +71 -0
  291. package/dist/lib/exporter-coverage.js +97 -0
  292. package/dist/lib/exporter-coverage.js.map +1 -0
  293. package/dist/lib/goal-words.d.ts +38 -0
  294. package/dist/lib/goal-words.js +112 -0
  295. package/dist/lib/goal-words.js.map +1 -0
  296. package/dist/lib/hub-client.d.ts +57 -15
  297. package/dist/lib/hub-client.js +396 -82
  298. package/dist/lib/hub-client.js.map +1 -1
  299. package/dist/lib/init-connect.d.ts +41 -0
  300. package/dist/lib/init-connect.js +75 -0
  301. package/dist/lib/init-connect.js.map +1 -0
  302. package/dist/lib/init-exit.d.ts +24 -0
  303. package/dist/lib/init-exit.js +41 -0
  304. package/dist/lib/init-exit.js.map +1 -0
  305. package/dist/lib/init-flow.d.ts +25 -0
  306. package/dist/lib/init-flow.js +40 -0
  307. package/dist/lib/init-flow.js.map +1 -0
  308. package/dist/lib/init-handoff.d.ts +24 -0
  309. package/dist/lib/init-handoff.js +26 -0
  310. package/dist/lib/init-handoff.js.map +1 -0
  311. package/dist/lib/init-output.d.ts +18 -0
  312. package/dist/lib/init-output.js +43 -0
  313. package/dist/lib/init-output.js.map +1 -0
  314. package/dist/lib/init-pod.d.ts +45 -0
  315. package/dist/lib/init-pod.js +36 -0
  316. package/dist/lib/init-pod.js.map +1 -0
  317. package/dist/lib/installed.d.ts +210 -11
  318. package/dist/lib/installed.js +234 -36
  319. package/dist/lib/installed.js.map +1 -1
  320. package/dist/lib/key-approval.d.ts +57 -0
  321. package/dist/lib/key-approval.js +117 -0
  322. package/dist/lib/key-approval.js.map +1 -0
  323. package/dist/lib/key-diagnosis.d.ts +56 -0
  324. package/dist/lib/key-diagnosis.js +227 -0
  325. package/dist/lib/key-diagnosis.js.map +1 -0
  326. package/dist/lib/key-doctor.d.ts +136 -0
  327. package/dist/lib/key-doctor.js +286 -0
  328. package/dist/lib/key-doctor.js.map +1 -0
  329. package/dist/lib/key-locations.d.ts +120 -0
  330. package/dist/lib/key-locations.js +326 -0
  331. package/dist/lib/key-locations.js.map +1 -0
  332. package/dist/lib/key-source.d.ts +68 -0
  333. package/dist/lib/key-source.js +109 -0
  334. package/dist/lib/key-source.js.map +1 -0
  335. package/dist/lib/key-state.d.ts +70 -0
  336. package/dist/lib/key-state.js +115 -0
  337. package/dist/lib/key-state.js.map +1 -0
  338. package/dist/lib/kind-package.d.ts +181 -0
  339. package/dist/lib/kind-package.js +679 -0
  340. package/dist/lib/kind-package.js.map +1 -0
  341. package/dist/lib/knowledge-title.d.ts +25 -0
  342. package/dist/lib/knowledge-title.js +47 -0
  343. package/dist/lib/knowledge-title.js.map +1 -0
  344. package/dist/lib/knowledge-title.test.d.ts +1 -0
  345. package/dist/lib/knowledge-title.test.js +34 -0
  346. package/dist/lib/knowledge-title.test.js.map +1 -0
  347. package/dist/lib/machine-instance.d.ts +64 -0
  348. package/dist/lib/machine-instance.js +142 -0
  349. package/dist/lib/machine-instance.js.map +1 -0
  350. package/dist/lib/mcp-bridge.d.ts +49 -0
  351. package/dist/lib/mcp-bridge.js +180 -0
  352. package/dist/lib/mcp-bridge.js.map +1 -0
  353. package/dist/lib/mcp-bridge.test.d.ts +1 -0
  354. package/dist/lib/mcp-bridge.test.js +118 -0
  355. package/dist/lib/mcp-bridge.test.js.map +1 -0
  356. package/dist/lib/mcp-call.d.ts +30 -0
  357. package/dist/lib/mcp-call.js +107 -0
  358. package/dist/lib/mcp-call.js.map +1 -0
  359. package/dist/lib/mcp-snippets.d.ts +53 -0
  360. package/dist/lib/mcp-snippets.js +82 -0
  361. package/dist/lib/mcp-snippets.js.map +1 -0
  362. package/dist/lib/next-steps.d.ts +8 -0
  363. package/dist/lib/next-steps.js +31 -1
  364. package/dist/lib/next-steps.js.map +1 -1
  365. package/dist/lib/openclaw.js +3 -2
  366. package/dist/lib/openclaw.js.map +1 -1
  367. package/dist/lib/package-wire.d.ts +179 -0
  368. package/dist/lib/package-wire.js +68 -0
  369. package/dist/lib/package-wire.js.map +1 -0
  370. package/dist/lib/pair-link.d.ts +38 -0
  371. package/dist/lib/pair-link.js +68 -0
  372. package/dist/lib/pair-link.js.map +1 -0
  373. package/dist/lib/pod-moved.d.ts +70 -0
  374. package/dist/lib/pod-moved.js +146 -0
  375. package/dist/lib/pod-moved.js.map +1 -0
  376. package/dist/lib/pod-reach.d.ts +39 -0
  377. package/dist/lib/pod-reach.js +117 -0
  378. package/dist/lib/pod-reach.js.map +1 -0
  379. package/dist/lib/pod-reach.test.d.ts +1 -0
  380. package/dist/lib/pod-reach.test.js +67 -0
  381. package/dist/lib/pod-reach.test.js.map +1 -0
  382. package/dist/lib/pod-wide.d.ts +40 -0
  383. package/dist/lib/pod-wide.js +46 -0
  384. package/dist/lib/pod-wide.js.map +1 -0
  385. package/dist/lib/pod.d.ts +74 -112
  386. package/dist/lib/pod.js +146 -415
  387. package/dist/lib/pod.js.map +1 -1
  388. package/dist/lib/project-ref.d.ts +9 -3
  389. package/dist/lib/project-ref.js +10 -4
  390. package/dist/lib/project-ref.js.map +1 -1
  391. package/dist/lib/register-claude-code-mcp.test.d.ts +1 -0
  392. package/dist/lib/register-claude-code-mcp.test.js +78 -0
  393. package/dist/lib/register-claude-code-mcp.test.js.map +1 -0
  394. package/dist/lib/review-credential.d.ts +119 -0
  395. package/dist/lib/review-credential.js +149 -0
  396. package/dist/lib/review-credential.js.map +1 -0
  397. package/dist/lib/safe-open.d.ts +49 -0
  398. package/dist/lib/safe-open.js +119 -0
  399. package/dist/lib/safe-open.js.map +1 -0
  400. package/dist/lib/session-feed.d.ts +185 -0
  401. package/dist/lib/session-feed.js +257 -0
  402. package/dist/lib/session-feed.js.map +1 -0
  403. package/dist/lib/session-lens.d.ts +40 -1
  404. package/dist/lib/session-lens.js +54 -4
  405. package/dist/lib/session-lens.js.map +1 -1
  406. package/dist/lib/superwhisper-import.d.ts +8 -0
  407. package/dist/lib/superwhisper-import.js +14 -7
  408. package/dist/lib/superwhisper-import.js.map +1 -1
  409. package/dist/lib/superwhisper-title.test.d.ts +1 -0
  410. package/dist/lib/superwhisper-title.test.js +18 -0
  411. package/dist/lib/superwhisper-title.test.js.map +1 -0
  412. package/dist/lib/targets.d.ts +152 -10
  413. package/dist/lib/targets.js +974 -325
  414. package/dist/lib/targets.js.map +1 -1
  415. package/dist/lib/template-file.d.ts +4 -0
  416. package/dist/lib/template-file.js.map +1 -1
  417. package/dist/lib/template-lifecycle.d.ts +217 -0
  418. package/dist/lib/template-lifecycle.js +433 -0
  419. package/dist/lib/template-lifecycle.js.map +1 -0
  420. package/dist/lib/template-steps.d.ts +88 -0
  421. package/dist/lib/template-steps.js +118 -0
  422. package/dist/lib/template-steps.js.map +1 -0
  423. package/dist/lib/time-ago.d.ts +2 -0
  424. package/dist/lib/time-ago.js +15 -0
  425. package/dist/lib/time-ago.js.map +1 -0
  426. package/dist/lib/wake-hook-settings.d.ts +57 -0
  427. package/dist/lib/wake-hook-settings.js +153 -0
  428. package/dist/lib/wake-hook-settings.js.map +1 -0
  429. package/dist/lib/wake-state.d.ts +65 -0
  430. package/dist/lib/wake-state.js +122 -0
  431. package/dist/lib/wake-state.js.map +1 -0
  432. package/dist/utils/logger.js +5 -2
  433. package/dist/utils/logger.js.map +1 -1
  434. package/package.json +26 -17
  435. package/skills/README.md +13 -11
  436. package/skills/agent-os/SKILL.md +214 -99
  437. package/skills/manifest.json +1 -1
  438. package/skills/onboard/SKILL.md +55 -26
  439. package/skills/synap/README.md +5 -8
  440. package/skills/synap/SKILL.md +1149 -289
  441. package/skills/synap/_order.txt +7 -0
  442. package/skills/synap/_skill.yaml +1 -1
  443. package/skills/synap/automations.md +15 -0
  444. package/skills/synap/capture.md +5 -0
  445. package/skills/synap/cli-operations.md +24 -18
  446. package/skills/synap/code-skills.md +70 -0
  447. package/skills/synap/concepts.md +36 -0
  448. package/skills/synap/content-os.md +10 -1
  449. package/skills/synap/creative-loop.md +15 -10
  450. package/skills/synap/crm.md +21 -52
  451. package/skills/synap/document-embeds.md +143 -47
  452. package/skills/synap/escalation-ladder.md +20 -10
  453. package/skills/synap/focus-sessions.md +56 -21
  454. package/skills/synap/from-intent.md +158 -0
  455. package/skills/synap/governance-rules.md +5 -5
  456. package/skills/synap/governance.md +10 -7
  457. package/skills/synap/hand-off.md +33 -0
  458. package/skills/synap/inline-patterns.md +15 -7
  459. package/skills/synap/lenses.md +34 -16
  460. package/skills/synap/linking.md +42 -41
  461. package/skills/synap/mcp-remote-servers.md +64 -0
  462. package/skills/synap/mental-model.md +17 -15
  463. package/skills/synap/operating-mode-rules.md +2 -2
  464. package/skills/synap/processes.md +118 -0
  465. package/skills/synap/quick-reference.md +7 -2
  466. package/skills/synap/reading.md +3 -1
  467. package/skills/synap/reflexes.md +12 -42
  468. package/skills/synap/viewframe-cells.md +38 -5
  469. package/skills/synap/work-flow.md +1 -1
  470. package/skills/synap/work-model.md +110 -0
  471. package/skills/synap/worked-examples.md +4 -5
  472. package/skills/synap/workspace-design.md +15 -11
  473. package/skills/synap/writes.md +105 -25
  474. package/skills/synap/writing-titles.md +63 -0
  475. package/skills/synap-app/SKILL.md +149 -67
  476. package/skills/synap-app/_skill.yaml +1 -1
  477. package/skills/synap-app/creating-the-base-app.md +12 -7
  478. package/skills/synap-app/governance.md +27 -16
  479. package/skills/synap-app/install-commands.md +18 -9
  480. package/skills/synap-app/overview.md +16 -9
  481. package/skills/synap-app/using-the-sdk.md +75 -25
  482. package/skills/synap-design/SKILL.md +474 -0
  483. package/skills/synap-design/_order.txt +4 -0
  484. package/skills/synap-design/_skill.yaml +21 -0
  485. package/skills/synap-design/loop.md +134 -0
  486. package/skills/synap-design/overview.md +44 -0
  487. package/skills/synap-design/principles.md +130 -0
  488. package/skills/synap-design/system.md +133 -0
  489. package/skills/synap-market/SKILL.md +306 -16
  490. package/skills/synap-market/_skill.yaml +1 -1
  491. package/skills/synap-market/author-and-publish.md +145 -8
  492. package/skills/synap-market/governance-and-catalog.md +7 -0
  493. package/skills/synap-market/install.md +79 -1
  494. package/skills/synap-market/overview.md +74 -6
  495. package/skills/synap-schema/SKILL.md +172 -10
  496. package/skills/synap-schema/_order.txt +2 -0
  497. package/skills/synap-schema/_skill.yaml +4 -2
  498. package/skills/synap-schema/common-mistakes.md +4 -2
  499. package/skills/synap-schema/discover-profiles.md +1 -1
  500. package/skills/synap-schema/entity-scope.md +15 -3
  501. package/skills/synap-schema/extend-first.md +29 -0
  502. package/skills/synap-schema/extend-vs-create.md +1 -1
  503. package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
  504. package/skills/synap-schema/property-types.md +1 -1
  505. package/skills/synap-schema/relations.md +1 -1
  506. package/skills/synap-ui/SKILL.md +19 -12
  507. package/skills/synap-ui/_skill.yaml +1 -1
  508. package/skills/synap-ui/ai-companion.md +1 -1
  509. package/skills/synap-ui/arranging-bento.md +2 -0
  510. package/skills/synap-ui/bento-layouts.md +10 -10
  511. package/skills/synap-ui/bento-recipes.md +313 -543
  512. package/skills/synap-ui/four-builds.md +5 -0
  513. package/skills/synap-ui/view-types.md +2 -2
  514. package/skills/synap-ui/widget-catalog.md +22 -278
  515. package/templates/automations/bookmark-enrichment.automation.json +290 -13
  516. package/templates/automations/url-bookmark-capture.automation.json +73 -11
  517. package/templates/box/runner.py +206 -0
  518. package/templates/skills/authoring-playbooks/SKILL.md +6 -3
  519. package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
  520. package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
  521. package/dist/commands/infra.d.ts +0 -21
  522. package/dist/commands/infra.js +0 -262
  523. package/dist/commands/infra.js.map +0 -1
  524. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
  525. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
  526. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
  527. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
  528. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  529. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
  530. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  531. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
  532. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
  533. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
@@ -10,7 +10,7 @@ description: >
10
10
  "npx create-synap-app". NOT the `synap` skill (capture/recall in a pod) nor
11
11
  `synap-ui` (views inside the pod's own UI) — this is about writing app CODE.
12
12
  metadata:
13
- openclaw:
13
+ synap:
14
14
  requires:
15
15
  env: []
16
16
  optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID]
@@ -32,8 +32,8 @@ pod, and **every write is governed** (see `governance.md`).
32
32
  | The user has… | Do this | Read |
33
33
  |---|---|---|
34
34
  | an existing app (any framework) | add the SDK | `using-the-sdk.md`, `install-commands.md` |
35
- | nothing yet, wants a full app fast | scaffold the base app | `creating-the-base-app.md`, `install-commands.md` |
36
- | a server / script / CLI (no browser) | SDK with a session token or API key | `using-the-sdk.md` |
35
+ | nothing yet, wants a full app fast | scaffold the base app (scaffolder not published yet) | `creating-the-base-app.md`, `install-commands.md` |
36
+ | a server / script / CLI (no browser) | SDK with a session token, or the REST client with an API key | `using-the-sdk.md` |
37
37
 
38
38
  Both paths use the same underlying packages; only the amount of scaffolding differs.
39
39
 
@@ -41,9 +41,11 @@ Both paths use the same underlying packages; only the amount of scaffolding diff
41
41
 
42
42
  - `@synap-core/sdk` — typed tRPC client. `createSynapClient({ podUrl, ... })`. **The one you almost always want.**
43
43
  - `@synap-core/react` — React/TanStack-Query bindings (`SynapProvider`, hooks).
44
- - `@synap-core/sdk-realtime` — Socket.IO presence/live-updates (`createRealtimeClient`).
45
- - `@synap-core/auth` — sign-in orchestration (Synap Cloud + pod handshake), framework-agnostic.
46
- - `@synap-core/auth-bootstrap` — zero-dep server helpers (`setupAgent`, `handshake`) for machine clients.
44
+ - `@synap-core/sdk-realtime` — Socket.IO "something changed" events (`createRealtimeClient`).
45
+ - `@synap-core/hub-rest-client` — zero-dep REST client for API-key holders (`HubRestClient`, `setupAgent`).
46
+
47
+ Do not install `@synap-core/auth`: that package was retired, and its last npm
48
+ release signs in through a pod route that no longer exists.
47
49
 
48
50
  Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
49
51
 
@@ -53,13 +55,18 @@ Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
53
55
  the change is queued for the pod owner's review (like a PR). Surface the review,
54
56
  don't retry. Full contract: `governance.md`.
55
57
  2. **The pod URL has no `/trpc` suffix and no trailing slash.** The SDK appends `/trpc`.
56
- 3. **Non-browser clients (server/CLI/mobile) authenticate with a token or API key**,
57
- never a cookie. Browser apps use the Synap Cloud sign-in flow (`@synap-core/auth`).
58
+ 3. **Non-browser clients (server/CLI/mobile) authenticate with a session token or
59
+ an API key**, never a cookie. An API key only works on the REST client and
60
+ realtime, not on the tRPC SDK. Browser apps use the Kratos session cookie.
58
61
 
59
62
  ## Get a pod to build against
60
63
 
61
- - **Self-host (free):** `git clone` the backend, `docker compose up -d` (run its
62
- `install.sh` to generate secrets). Pod answers on `:4000`.
64
+ - **Self-host (free):** run the backend's `install.sh` (it installs Docker if
65
+ needed, fetches the release bundle, checks it against the release manifest's
66
+ sha256 and runs `synap install`); see the backend's `deploy/README.md`. It
67
+ also checks the manifest's signature: by default
68
+ (`SYNAP_RELEASE_VERIFY=warn`) it only warns and carries on when the signature
69
+ is missing or does not verify; `SYNAP_RELEASE_VERIFY=enforce` refuses.
63
70
  - **Managed (paid):** sign up at synap.live and provision a pod.
64
71
 
65
72
  You can develop the base app with **no pod at all** using its mock mode
@@ -78,11 +85,17 @@ don't architect around a capability that isn't there.
78
85
 
79
86
  ## Scaffold a full app (recommended for a fresh start)
80
87
 
88
+ > **Not published yet.** The scaffolder (`@synap-core/create-synap-app`) is not
89
+ > on npm and the base template is not public, so `npx` returns 404 today. Use the
90
+ > SDK path below until a release exists.
91
+
92
+ Once published:
93
+
81
94
  ```bash
82
- npx create-synap-app my-app
95
+ npx @synap-core/create-synap-app my-app
83
96
  ```
84
97
 
85
- Creates a Next.js + HeroUI project from the base template, with the SDK, auth,
98
+ It creates a Next.js + HeroUI project from the base template, with the SDK, auth,
86
99
  app shell, command palette, realtime, and mock mode pre-wired. It also drops an
87
100
  `AGENTS.md` into the project so your AI coding tool knows how to work with it.
88
101
 
@@ -98,24 +111,27 @@ npm install @synap-core/sdk@^1.0.0 @synap-core/react@^1.0.0
98
111
  # realtime
99
112
  npm install @synap-core/sdk-realtime
100
113
 
101
- # auth (browser sign-in) or auth-bootstrap (server credential bootstrap)
102
- npm install @synap-core/auth # or @synap-core/auth-bootstrap
114
+ # REST client for API-key holders (agents, scripts); also has setupAgent()
115
+ npm install @synap-core/hub-rest-client
103
116
  ```
104
117
 
118
+ Do not install `@synap-core/auth` (retired; its last release calls a removed pod
119
+ route) or `@synap-core/auth-bootstrap` (not published).
120
+
105
121
  Pin `@^1.0.0` on `sdk`/`react`. **Do not** install unpinned `@synap-core/sdk` —
106
122
  older `0.x` versions on the registry are a different, abandoned package.
107
123
 
108
124
  ## Get this knowledge into your AI coding tool
109
125
 
110
126
  ```bash
111
- # add the app-creation skill (this skill) to a connected AI tool
112
- synap skills get synap-app
127
+ # print this skill from your pod's skill knowledge base
128
+ synap skill get synap-app
113
129
 
114
- # or wire a tool end-to-end (skills + MCP), any target
115
- synap connect --target=cursor # or claude, openclaw, …
130
+ # or wire a tool end-to-end (skills + MCP)
131
+ synap connect --target=cursor # or claude-code, claude-desktop, codex, …
116
132
  ```
117
133
 
118
- Alternatively, the scaffolded project ships an `AGENTS.md` at its root — most AI
134
+ Once the scaffolder is published, the scaffolded project ships an `AGENTS.md` at its root — most AI
119
135
  coding tools read it automatically, so a freshly-scaffolded app teaches the AI
120
136
  how to build on it with zero extra setup.
121
137
 
@@ -141,33 +157,41 @@ import { createSynapClient } from "@synap-core/sdk";
141
157
 
142
158
  const synap = createSynapClient({
143
159
  podUrl: "https://pod.example.com", // NO trailing slash, NO /trpc suffix
144
- apiKey: process.env.SYNAP_API_KEY, // or sessionToken (see auth below)
160
+ sessionToken: process.env.SYNAP_SESSION_TOKEN, // see auth below
145
161
  workspaceId: process.env.SYNAP_WORKSPACE_ID ?? "",
162
+ onAuthError: () => {/* 401: sign in again */},
146
163
  });
147
164
 
148
165
  // It's a typed tRPC client — full autocomplete over every router.
149
166
  const me = await synap.users.me.query();
150
167
  const entities = await synap.entities.list.query({ /* filter */ });
151
168
  const result = await synap.entities.create.mutate({ /* ... */ });
152
- // result may be { status: "proposed", ... } — that is success. See governance.md.
169
+ // result.status may be "proposed" — that is success. See governance.md.
153
170
  ```
154
171
 
155
172
  ### Auth modes (pick ONE)
156
- - **`apiKey`** — a Bearer key generated in the workspace's developer settings.
157
- Best for servers, scripts, CLIs.
158
- - **`sessionToken`** — an Ory Kratos session token, sent as `X-Session-Token`.
159
- Best for non-browser clients that completed a sign-in.
160
- - **cookie fallback** — omit both; the client uses the ambient Kratos cookie.
161
- Browser, same-origin only.
162
-
163
- For machine clients that need to bootstrap a credential, use
164
- `@synap-core/auth-bootstrap` (`setupAgent(provisioningToken)` → API key,
165
- `handshake(jwt)` → session token). Zero-dependency, safe in edge/serverless.
173
+ - **`sessionToken`** — an Ory Kratos session token from a Kratos API (native)
174
+ login flow, sent as `X-Session-Token`. The normal choice for servers, scripts,
175
+ CLIs and mobile.
176
+ - **cookie fallback** — omit both; the client sends the ambient Kratos cookie
177
+ (`credentials: "include"`). Browser only.
178
+ - **`apiKey`** — only the local-mode token of a desktop pod, sent as
179
+ `Authorization: Bearer`. `/trpc` refuses hub and user API keys
180
+ (keys starting with synap_hub_ or synap_user_), and `createSynapClient` throws if you pass
181
+ one. For an API key, use `@synap-core/hub-rest-client` (below).
182
+
183
+ Other options: `extraHeaders`, and `onAuthError({ status, message })`, called on a
184
+ 401 (it also turns the pod's plain-JSON 401 body into a clean tRPC error).
185
+
186
+ To mint an API key for a machine client, `setupAgent(podUrl, provisioningToken,
187
+ agentType)` from `@synap-core/hub-rest-client` returns `{ hubApiKey, agentUserId,
188
+ workspaceId }`. That key works with the REST client and the realtime client, not
189
+ with `/trpc`.
166
190
 
167
191
  ## React — `@synap-core/react`
168
192
 
169
193
  ```tsx
170
- import { SynapProvider, useSynapContext } from "@synap-core/react";
194
+ import { SynapProvider, useSynap, useEntities } from "@synap-core/react";
171
195
 
172
196
  function App() {
173
197
  return (
@@ -176,31 +200,73 @@ function App() {
176
200
  </SynapProvider>
177
201
  );
178
202
  }
203
+
204
+ function Dashboard() {
205
+ const { data } = useEntities("note", { limit: 20 }); // thin data hook
206
+ const create = useSynap.entities.create.useMutation(); // raw tRPC hooks
207
+ // …
208
+ }
179
209
  ```
180
210
 
181
- `SynapProvider` honours every `createSynapClient` option, incl. `sessionToken`
182
- and `onAuthError` (a 401 handler). `react` is a peer of your app's React — it
183
- does not bundle its own.
211
+ `useSynap` is the tRPC React hook tree itself — write
212
+ `useSynap.entities.list.useQuery(…)`, **not** `useSynap().entities…`: calling it
213
+ returns `undefined` at runtime (some package docs still show the call form).
214
+
215
+ `SynapProvider` takes every `createSynapClient` option (incl. `sessionToken` and
216
+ `onAuthError`) plus an optional `queryClient` to share an existing TanStack Query
217
+ client. Exports: `SynapProvider`, `useSynapContext` (`{ podUrl, workspaceId }`),
218
+ `useSynap`, the data hooks `useEntity`, `useEntities`, `useLinks`, `useView`,
219
+ and the `RouterInputs` / `RouterOutputs` types. React 18 or 19 is a peer
220
+ dependency — the package does not bundle its own.
184
221
 
185
222
  ## Realtime — `@synap-core/sdk-realtime`
186
223
 
187
224
  ```ts
188
225
  import { createRealtimeClient } from "@synap-core/sdk-realtime";
189
226
 
190
- const rt = createRealtimeClient({ podUrl, sessionToken });
191
- const stop = rt.onInvalidate((target) => {
192
- // e.g. refetch the affected query
227
+ const rt = createRealtimeClient({
228
+ url: podUrl, // pod base URL; the client adds the /presence namespace
229
+ workspaceId,
230
+ sessionToken, // a Kratos session token…
231
+ userId, // …and the identity id it belongs to (both required)
232
+ // or, as a service account: apiKey (scope realtime:observe), no userId
233
+ onInvalidate: (event) => {
234
+ // entity/relation changed — refetch, e.g.
235
+ queryClient.invalidateQueries({ queryKey: ["entities"] });
236
+ },
193
237
  });
238
+
239
+ rt.connect(); // nothing connects until you call this
240
+ // … later
241
+ rt.disconnect();
194
242
  ```
195
243
 
196
- Websocket-only transport (credentials never ride a long-poll URL) and it refuses
197
- to send credentials over non-TLS unless you explicitly pass `allowInsecure`.
244
+ - Callbacks (all options, no subscribe methods): `onInvalidate` (the
245
+ entity/relation-changing subset), `onEvent` (every known event, `{ name, data }`),
246
+ `onConnect`, `onDisconnect(reason)`, `onError(error)`.
247
+ - The returned client has `connect()`, `disconnect()`, and read-only `connected`
248
+ and `state` (`"idle" | "connecting" | "connected" | "disconnected"`).
249
+ - `SYNAP_EVENT_NAMES` lists the forwarded events; `ENTITY_INVALIDATING_EVENTS` is
250
+ the subset behind `onInvalidate`.
251
+ - Websocket-only transport (credentials never ride a long-poll URL), and
252
+ `connect()` throws on a non-TLS URL unless you pass `allowInsecure: true`
253
+ (localhost dev only).
254
+
255
+ **Version note.** `@synap-core/sdk-realtime@0.1.0` (the current npm release) sends
256
+ every credential as `auth.token`. The pod reads `{ userId, token, workspaceId }`
257
+ for a user and `{ apiKey, workspaceId }` for a service account, so on 0.1.0 a
258
+ session token works only when you also pass `userId`, and an `apiKey` is always
259
+ refused. The fix — correct handshake keys, plus an up-front throw for no
260
+ credential, both credentials, or `sessionToken` without `userId` — lands in the
261
+ first release after 0.1.0. Until then, authenticate realtime with
262
+ `sessionToken` + `userId`.
198
263
 
199
264
  ## Two transports, on purpose
200
- - `@synap-core/sdk` (tRPC) — for apps. Typed, hooks, realtime.
201
- - `@synap-core/hub-rest-client` (REST, zero-dep) — for agents/CLIs/scripts. Carries
202
- agent verbs the tRPC surface has no first-class path for (`ask`, `orient`,
203
- `discover`). Use it when you want a dependency-free REST client, not a full app.
265
+ - `@synap-core/sdk` (tRPC) — for apps signed in as a user. Typed, React hooks.
266
+ - `@synap-core/hub-rest-client` (REST against `/api/hub/*`, zero-dep) — for
267
+ agents/CLIs/scripts holding an API key. `new HubRestClient({ podUrl, apiKey,
268
+ workspaceId })`. Carries agent verbs the tRPC surface has no first-class path
269
+ for (`ask`, `orient`, `discover`).
204
270
 
205
271
  ## Keep types fresh
206
272
  The SDK is typed by `@synap-core/api-types`, generated from the pod's live router.
@@ -217,11 +283,16 @@ mock mode — all pre-wired. You add your screens; the plumbing is done.
217
283
 
218
284
  ## Scaffold it
219
285
 
286
+ > **Not published yet.** `@synap-core/create-synap-app` is not on npm and the
287
+ > base template is not public, so this does not work today. Until a release
288
+ > exists, build on the SDK directly (`using-the-sdk.md`). The rest of this page
289
+ > describes the template as it will ship.
290
+
220
291
  ```bash
221
- npx create-synap-app my-app
222
- cd my-app
223
- cp .env.example .env.local # fill in your pod / control-plane URLs
224
- pnpm dev # http://localhost:3010
292
+ npx @synap-core/create-synap-app my-app
293
+ cd my-app # the scaffolder seeds .env.local from env.example;
294
+ # fill in your pod / control-plane URLs
295
+ pnpm install && pnpm dev # http://localhost:3010
225
296
  ```
226
297
 
227
298
  Develop with **no pod** by setting `NEXT_PUBLIC_BASE_MOCK_MODE=true`.
@@ -269,9 +340,9 @@ components/layout/
269
340
 
270
341
  ## Auth flow (already wired)
271
342
 
272
- `/login` → Synap Cloud sign-in (email + password or magic link) → optional TOTP →
273
- pod picker → handshake → session stored → `/home`. Self-hosted pods fall back to
274
- the pod's own Kratos at `/login?mode=kratos`. You don't build this; you theme it.
343
+ `/login` → Synap Cloud sign-in → optional TOTP → pod picker → session stored →
344
+ `/home`. A pod can also be signed into directly through its own Kratos (the
345
+ login screen's manual-login step). You don't build this; you theme it.
275
346
 
276
347
  ---
277
348
 
@@ -282,38 +353,49 @@ mutates a Synap pod.
282
353
 
283
354
  ## The contract
284
355
 
285
- Every mutation (`entities.create`, `entities.update`, `relations.create`, …)
286
- resolves to one of three outcomes, decided **by the pod**, not by your app:
356
+ Every governed mutation (`entities.create`, `entities.update`, `relations.create`, …)
357
+ has one of three outcomes, decided **by the pod**, not by your app:
287
358
 
288
- | Outcome | Meaning | What your code should do |
359
+ | Outcome | How it arrives | What your code should do |
289
360
  |---|---|---|
290
- | `approved` | applied immediately | proceed |
291
- | `proposed` | queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
292
- | `denied` | the principal may not do this | show why; do not retry blindly |
361
+ | applied | resolves with the procedure's own status (`"created"`, `"updated"`, …) | proceed |
362
+ | proposed | resolves with `status: "proposed"`, `proposalId`, `reviewUrl`, `message` — queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
363
+ | denied | **rejects** with a tRPC `FORBIDDEN` error whose message is the reason | show why; do not retry blindly |
293
364
 
294
365
  ## Why it matters for your code
295
366
 
296
367
  - **Never treat `proposed` as an error.** It is the normal, healthy path for any
297
368
  write that governance decides a human should see first. Retrying a `proposed`
298
369
  write creates duplicates.
299
- - **Never `try/catch` a `proposed` as if it threw.** It's a successful response
300
- with a status, not an exception.
370
+ - **A `proposed` result does not throw.** It is a successful response with a
371
+ status; only a denial throws.
301
372
  - **Surface the review link/id** so the user can approve it. An unreviewed
302
373
  proposal is not yet in the graph — it won't show up in reads until approved.
303
374
 
304
375
  ## Pattern
305
376
 
306
377
  ```ts
307
- const res = await synap.entities.create.mutate(input);
308
- switch (res.status) {
309
- case "approved": /* it's live */ break;
310
- case "proposed": /* tell the user: "queued for review" + show res.proposalId */ break;
311
- case "denied": /* show res.reason; don't retry */ break;
378
+ import { TRPCClientError } from "@trpc/client";
379
+
380
+ try {
381
+ const res = await synap.entities.create.mutate(input);
382
+ if (res.status === "proposed") {
383
+ // tell the user "queued for review"; link res.reviewUrl / res.proposalId.
384
+ // res.entity is null — nothing exists until the proposal is approved.
385
+ } else {
386
+ // "created": res.id / res.entity are live
387
+ }
388
+ } catch (err) {
389
+ if (err instanceof TRPCClientError && err.data?.code === "FORBIDDEN") {
390
+ // denied: show err.message; don't retry
391
+ } else throw err;
312
392
  }
313
393
  ```
314
394
 
315
395
  ## Idempotency
316
396
 
317
- If you must retry a create after a network error, pass an idempotency key where
318
- the API accepts one — a `proposed` write that you retry without one will
319
- duplicate on approval. When unsure, read back before re-creating.
397
+ `entities.create` takes no idempotency key. The pod dedups some repeats on its
398
+ own — an identical agent-authored retry within a short window, and creates that
399
+ match an existing entity by identity (a stable `externalId`, or identifying
400
+ properties) — but neither covers every case. Never resend a `proposed` write,
401
+ and when unsure, read back before re-creating.
@@ -9,7 +9,7 @@ description: >
9
9
  "npx create-synap-app". NOT the `synap` skill (capture/recall in a pod) nor
10
10
  `synap-ui` (views inside the pod's own UI) — this is about writing app CODE.
11
11
  metadata:
12
- openclaw:
12
+ synap:
13
13
  requires:
14
14
  env: []
15
15
  optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID]
@@ -7,11 +7,16 @@ mock mode — all pre-wired. You add your screens; the plumbing is done.
7
7
 
8
8
  ## Scaffold it
9
9
 
10
+ > **Not published yet.** `@synap-core/create-synap-app` is not on npm and the
11
+ > base template is not public, so this does not work today. Until a release
12
+ > exists, build on the SDK directly (`using-the-sdk.md`). The rest of this page
13
+ > describes the template as it will ship.
14
+
10
15
  ```bash
11
- npx create-synap-app my-app
12
- cd my-app
13
- cp .env.example .env.local # fill in your pod / control-plane URLs
14
- pnpm dev # http://localhost:3010
16
+ npx @synap-core/create-synap-app my-app
17
+ cd my-app # the scaffolder seeds .env.local from env.example;
18
+ # fill in your pod / control-plane URLs
19
+ pnpm install && pnpm dev # http://localhost:3010
15
20
  ```
16
21
 
17
22
  Develop with **no pod** by setting `NEXT_PUBLIC_BASE_MOCK_MODE=true`.
@@ -59,6 +64,6 @@ components/layout/
59
64
 
60
65
  ## Auth flow (already wired)
61
66
 
62
- `/login` → Synap Cloud sign-in (email + password or magic link) → optional TOTP →
63
- pod picker → handshake → session stored → `/home`. Self-hosted pods fall back to
64
- the pod's own Kratos at `/login?mode=kratos`. You don't build this; you theme it.
67
+ `/login` → Synap Cloud sign-in → optional TOTP → pod picker → session stored →
68
+ `/home`. A pod can also be signed into directly through its own Kratos (the
69
+ login screen's manual-login step). You don't build this; you theme it.
@@ -5,38 +5,49 @@ mutates a Synap pod.
5
5
 
6
6
  ## The contract
7
7
 
8
- Every mutation (`entities.create`, `entities.update`, `relations.create`, …)
9
- resolves to one of three outcomes, decided **by the pod**, not by your app:
8
+ Every governed mutation (`entities.create`, `entities.update`, `relations.create`, …)
9
+ has one of three outcomes, decided **by the pod**, not by your app:
10
10
 
11
- | Outcome | Meaning | What your code should do |
11
+ | Outcome | How it arrives | What your code should do |
12
12
  |---|---|---|
13
- | `approved` | applied immediately | proceed |
14
- | `proposed` | queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
15
- | `denied` | the principal may not do this | show why; do not retry blindly |
13
+ | applied | resolves with the procedure's own status (`"created"`, `"updated"`, …) | proceed |
14
+ | proposed | resolves with `status: "proposed"`, `proposalId`, `reviewUrl`, `message` — queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
15
+ | denied | **rejects** with a tRPC `FORBIDDEN` error whose message is the reason | show why; do not retry blindly |
16
16
 
17
17
  ## Why it matters for your code
18
18
 
19
19
  - **Never treat `proposed` as an error.** It is the normal, healthy path for any
20
20
  write that governance decides a human should see first. Retrying a `proposed`
21
21
  write creates duplicates.
22
- - **Never `try/catch` a `proposed` as if it threw.** It's a successful response
23
- with a status, not an exception.
22
+ - **A `proposed` result does not throw.** It is a successful response with a
23
+ status; only a denial throws.
24
24
  - **Surface the review link/id** so the user can approve it. An unreviewed
25
25
  proposal is not yet in the graph — it won't show up in reads until approved.
26
26
 
27
27
  ## Pattern
28
28
 
29
29
  ```ts
30
- const res = await synap.entities.create.mutate(input);
31
- switch (res.status) {
32
- case "approved": /* it's live */ break;
33
- case "proposed": /* tell the user: "queued for review" + show res.proposalId */ break;
34
- case "denied": /* show res.reason; don't retry */ break;
30
+ import { TRPCClientError } from "@trpc/client";
31
+
32
+ try {
33
+ const res = await synap.entities.create.mutate(input);
34
+ if (res.status === "proposed") {
35
+ // tell the user "queued for review"; link res.reviewUrl / res.proposalId.
36
+ // res.entity is null — nothing exists until the proposal is approved.
37
+ } else {
38
+ // "created": res.id / res.entity are live
39
+ }
40
+ } catch (err) {
41
+ if (err instanceof TRPCClientError && err.data?.code === "FORBIDDEN") {
42
+ // denied: show err.message; don't retry
43
+ } else throw err;
35
44
  }
36
45
  ```
37
46
 
38
47
  ## Idempotency
39
48
 
40
- If you must retry a create after a network error, pass an idempotency key where
41
- the API accepts one — a `proposed` write that you retry without one will
42
- duplicate on approval. When unsure, read back before re-creating.
49
+ `entities.create` takes no idempotency key. The pod dedups some repeats on its
50
+ own — an identical agent-authored retry within a short window, and creates that
51
+ match an existing entity by identity (a stable `externalId`, or identifying
52
+ properties) — but neither covers every case. Never resend a `proposed` write,
53
+ and when unsure, read back before re-creating.
@@ -2,11 +2,17 @@
2
2
 
3
3
  ## Scaffold a full app (recommended for a fresh start)
4
4
 
5
+ > **Not published yet.** The scaffolder (`@synap-core/create-synap-app`) is not
6
+ > on npm and the base template is not public, so `npx` returns 404 today. Use the
7
+ > SDK path below until a release exists.
8
+
9
+ Once published:
10
+
5
11
  ```bash
6
- npx create-synap-app my-app
12
+ npx @synap-core/create-synap-app my-app
7
13
  ```
8
14
 
9
- Creates a Next.js + HeroUI project from the base template, with the SDK, auth,
15
+ It creates a Next.js + HeroUI project from the base template, with the SDK, auth,
10
16
  app shell, command palette, realtime, and mock mode pre-wired. It also drops an
11
17
  `AGENTS.md` into the project so your AI coding tool knows how to work with it.
12
18
 
@@ -22,24 +28,27 @@ npm install @synap-core/sdk@^1.0.0 @synap-core/react@^1.0.0
22
28
  # realtime
23
29
  npm install @synap-core/sdk-realtime
24
30
 
25
- # auth (browser sign-in) or auth-bootstrap (server credential bootstrap)
26
- npm install @synap-core/auth # or @synap-core/auth-bootstrap
31
+ # REST client for API-key holders (agents, scripts); also has setupAgent()
32
+ npm install @synap-core/hub-rest-client
27
33
  ```
28
34
 
35
+ Do not install `@synap-core/auth` (retired; its last release calls a removed pod
36
+ route) or `@synap-core/auth-bootstrap` (not published).
37
+
29
38
  Pin `@^1.0.0` on `sdk`/`react`. **Do not** install unpinned `@synap-core/sdk` —
30
39
  older `0.x` versions on the registry are a different, abandoned package.
31
40
 
32
41
  ## Get this knowledge into your AI coding tool
33
42
 
34
43
  ```bash
35
- # add the app-creation skill (this skill) to a connected AI tool
36
- synap skills get synap-app
44
+ # print this skill from your pod's skill knowledge base
45
+ synap skill get synap-app
37
46
 
38
- # or wire a tool end-to-end (skills + MCP), any target
39
- synap connect --target=cursor # or claude, openclaw, …
47
+ # or wire a tool end-to-end (skills + MCP)
48
+ synap connect --target=cursor # or claude-code, claude-desktop, codex, …
40
49
  ```
41
50
 
42
- Alternatively, the scaffolded project ships an `AGENTS.md` at its root — most AI
51
+ Once the scaffolder is published, the scaffolded project ships an `AGENTS.md` at its root — most AI
43
52
  coding tools read it automatically, so a freshly-scaffolded app teaches the AI
44
53
  how to build on it with zero extra setup.
45
54
 
@@ -9,8 +9,8 @@ pod, and **every write is governed** (see `governance.md`).
9
9
  | The user has… | Do this | Read |
10
10
  |---|---|---|
11
11
  | an existing app (any framework) | add the SDK | `using-the-sdk.md`, `install-commands.md` |
12
- | nothing yet, wants a full app fast | scaffold the base app | `creating-the-base-app.md`, `install-commands.md` |
13
- | a server / script / CLI (no browser) | SDK with a session token or API key | `using-the-sdk.md` |
12
+ | nothing yet, wants a full app fast | scaffold the base app (scaffolder not published yet) | `creating-the-base-app.md`, `install-commands.md` |
13
+ | a server / script / CLI (no browser) | SDK with a session token, or the REST client with an API key | `using-the-sdk.md` |
14
14
 
15
15
  Both paths use the same underlying packages; only the amount of scaffolding differs.
16
16
 
@@ -18,9 +18,11 @@ Both paths use the same underlying packages; only the amount of scaffolding diff
18
18
 
19
19
  - `@synap-core/sdk` — typed tRPC client. `createSynapClient({ podUrl, ... })`. **The one you almost always want.**
20
20
  - `@synap-core/react` — React/TanStack-Query bindings (`SynapProvider`, hooks).
21
- - `@synap-core/sdk-realtime` — Socket.IO presence/live-updates (`createRealtimeClient`).
22
- - `@synap-core/auth` — sign-in orchestration (Synap Cloud + pod handshake), framework-agnostic.
23
- - `@synap-core/auth-bootstrap` — zero-dep server helpers (`setupAgent`, `handshake`) for machine clients.
21
+ - `@synap-core/sdk-realtime` — Socket.IO "something changed" events (`createRealtimeClient`).
22
+ - `@synap-core/hub-rest-client` — zero-dep REST client for API-key holders (`HubRestClient`, `setupAgent`).
23
+
24
+ Do not install `@synap-core/auth`: that package was retired, and its last npm
25
+ release signs in through a pod route that no longer exists.
24
26
 
25
27
  Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
26
28
 
@@ -30,13 +32,18 @@ Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
30
32
  the change is queued for the pod owner's review (like a PR). Surface the review,
31
33
  don't retry. Full contract: `governance.md`.
32
34
  2. **The pod URL has no `/trpc` suffix and no trailing slash.** The SDK appends `/trpc`.
33
- 3. **Non-browser clients (server/CLI/mobile) authenticate with a token or API key**,
34
- never a cookie. Browser apps use the Synap Cloud sign-in flow (`@synap-core/auth`).
35
+ 3. **Non-browser clients (server/CLI/mobile) authenticate with a session token or
36
+ an API key**, never a cookie. An API key only works on the REST client and
37
+ realtime, not on the tRPC SDK. Browser apps use the Kratos session cookie.
35
38
 
36
39
  ## Get a pod to build against
37
40
 
38
- - **Self-host (free):** `git clone` the backend, `docker compose up -d` (run its
39
- `install.sh` to generate secrets). Pod answers on `:4000`.
41
+ - **Self-host (free):** run the backend's `install.sh` (it installs Docker if
42
+ needed, fetches the release bundle, checks it against the release manifest's
43
+ sha256 and runs `synap install`); see the backend's `deploy/README.md`. It
44
+ also checks the manifest's signature: by default
45
+ (`SYNAP_RELEASE_VERIFY=warn`) it only warns and carries on when the signature
46
+ is missing or does not verify; `SYNAP_RELEASE_VERIFY=enforce` refuses.
40
47
  - **Managed (paid):** sign up at synap.live and provision a pod.
41
48
 
42
49
  You can develop the base app with **no pod at all** using its mock mode