@synap-core/cli 1.7.0 → 1.10.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 (371) hide show
  1. package/dist/commands/agent-chat.d.ts +47 -0
  2. package/dist/commands/agent-chat.js +250 -0
  3. package/dist/commands/agent-chat.js.map +1 -0
  4. package/dist/commands/agent-run.d.ts +47 -0
  5. package/dist/commands/agent-run.js +301 -0
  6. package/dist/commands/agent-run.js.map +1 -0
  7. package/dist/commands/agents.js +85 -46
  8. package/dist/commands/agents.js.map +1 -1
  9. package/dist/commands/artifact.d.ts +26 -0
  10. package/dist/commands/artifact.js +76 -0
  11. package/dist/commands/artifact.js.map +1 -0
  12. package/dist/commands/automation.d.ts +47 -0
  13. package/dist/commands/automation.js +601 -0
  14. package/dist/commands/automation.js.map +1 -0
  15. package/dist/commands/bridge-setup.d.ts +66 -0
  16. package/dist/commands/bridge-setup.js +1112 -0
  17. package/dist/commands/bridge-setup.js.map +1 -0
  18. package/dist/commands/cap-connections.d.ts +28 -0
  19. package/dist/commands/cap-connections.js +224 -0
  20. package/dist/commands/cap-connections.js.map +1 -0
  21. package/dist/commands/capability.d.ts +89 -0
  22. package/dist/commands/capability.js +1523 -0
  23. package/dist/commands/capability.js.map +1 -0
  24. package/dist/commands/cell.d.ts +55 -0
  25. package/dist/commands/cell.js +277 -0
  26. package/dist/commands/cell.js.map +1 -0
  27. package/dist/commands/centrality.d.ts +20 -0
  28. package/dist/commands/centrality.js +94 -0
  29. package/dist/commands/centrality.js.map +1 -0
  30. package/dist/commands/connect.d.ts +2 -0
  31. package/dist/commands/connect.js +25 -10
  32. package/dist/commands/connect.js.map +1 -1
  33. package/dist/commands/connections.js +0 -16
  34. package/dist/commands/connections.js.map +1 -1
  35. package/dist/commands/context.d.ts +22 -0
  36. package/dist/commands/context.js +149 -0
  37. package/dist/commands/context.js.map +1 -0
  38. package/dist/commands/data-extra.d.ts +14 -0
  39. package/dist/commands/data-extra.js +185 -0
  40. package/dist/commands/data-extra.js.map +1 -0
  41. package/dist/commands/data.d.ts +14 -10
  42. package/dist/commands/data.js +353 -192
  43. package/dist/commands/data.js.map +1 -1
  44. package/dist/commands/diagnose.d.ts +20 -0
  45. package/dist/commands/diagnose.js +143 -0
  46. package/dist/commands/diagnose.js.map +1 -0
  47. package/dist/commands/digest.d.ts +17 -0
  48. package/dist/commands/digest.js +121 -0
  49. package/dist/commands/digest.js.map +1 -0
  50. package/dist/commands/discover.d.ts +2 -0
  51. package/dist/commands/discover.js +25 -8
  52. package/dist/commands/discover.js.map +1 -1
  53. package/dist/commands/doc.d.ts +39 -0
  54. package/dist/commands/doc.js +130 -0
  55. package/dist/commands/doc.js.map +1 -0
  56. package/dist/commands/events.d.ts +26 -0
  57. package/dist/commands/events.js +69 -0
  58. package/dist/commands/events.js.map +1 -0
  59. package/dist/commands/explain.d.ts +21 -0
  60. package/dist/commands/explain.js +251 -0
  61. package/dist/commands/explain.js.map +1 -0
  62. package/dist/commands/facet.d.ts +29 -0
  63. package/dist/commands/facet.js +113 -0
  64. package/dist/commands/facet.js.map +1 -0
  65. package/dist/commands/graph.d.ts +18 -0
  66. package/dist/commands/graph.js +74 -0
  67. package/dist/commands/graph.js.map +1 -0
  68. package/dist/commands/home.d.ts +12 -0
  69. package/dist/commands/home.js +54 -0
  70. package/dist/commands/home.js.map +1 -0
  71. package/dist/commands/import.d.ts +38 -0
  72. package/dist/commands/import.js +440 -0
  73. package/dist/commands/import.js.map +1 -0
  74. package/dist/commands/init.d.ts +0 -2
  75. package/dist/commands/init.js +97 -118
  76. package/dist/commands/init.js.map +1 -1
  77. package/dist/commands/keys.d.ts +9 -0
  78. package/dist/commands/keys.js +78 -0
  79. package/dist/commands/keys.js.map +1 -0
  80. package/dist/commands/knowledge.d.ts +34 -18
  81. package/dist/commands/knowledge.js +355 -57
  82. package/dist/commands/knowledge.js.map +1 -1
  83. package/dist/commands/launch.d.ts +50 -0
  84. package/dist/commands/launch.js +790 -0
  85. package/dist/commands/launch.js.map +1 -0
  86. package/dist/commands/lens.d.ts +45 -0
  87. package/dist/commands/lens.js +386 -0
  88. package/dist/commands/lens.js.map +1 -0
  89. package/dist/commands/market.d.ts +209 -0
  90. package/dist/commands/market.js +1368 -0
  91. package/dist/commands/market.js.map +1 -0
  92. package/dist/commands/mcp.d.ts +42 -0
  93. package/dist/commands/mcp.js +184 -0
  94. package/dist/commands/mcp.js.map +1 -0
  95. package/dist/commands/observe.d.ts +9 -0
  96. package/dist/commands/observe.js +93 -0
  97. package/dist/commands/observe.js.map +1 -0
  98. package/dist/commands/open.d.ts +32 -0
  99. package/dist/commands/open.js +85 -0
  100. package/dist/commands/open.js.map +1 -0
  101. package/dist/commands/pod.d.ts +100 -0
  102. package/dist/commands/pod.js +359 -0
  103. package/dist/commands/pod.js.map +1 -0
  104. package/dist/commands/pods.d.ts +6 -0
  105. package/dist/commands/pods.js +160 -50
  106. package/dist/commands/pods.js.map +1 -1
  107. package/dist/commands/proposals-actions.d.ts +7 -0
  108. package/dist/commands/proposals-actions.js +77 -0
  109. package/dist/commands/proposals-actions.js.map +1 -0
  110. package/dist/commands/providers.d.ts +38 -0
  111. package/dist/commands/providers.js +170 -0
  112. package/dist/commands/providers.js.map +1 -0
  113. package/dist/commands/purge.d.ts +23 -0
  114. package/dist/commands/purge.js +148 -0
  115. package/dist/commands/purge.js.map +1 -0
  116. package/dist/commands/raycast.d.ts +15 -0
  117. package/dist/commands/raycast.js +153 -0
  118. package/dist/commands/raycast.js.map +1 -0
  119. package/dist/commands/sessions.d.ts +31 -0
  120. package/dist/commands/sessions.js +248 -0
  121. package/dist/commands/sessions.js.map +1 -0
  122. package/dist/commands/skill-manage.d.ts +21 -0
  123. package/dist/commands/skill-manage.js +195 -0
  124. package/dist/commands/skill-manage.js.map +1 -0
  125. package/dist/commands/skills-commands.d.ts +26 -0
  126. package/dist/commands/skills-commands.js +187 -0
  127. package/dist/commands/skills-commands.js.map +1 -0
  128. package/dist/commands/skills.d.ts +26 -0
  129. package/dist/commands/skills.js +196 -0
  130. package/dist/commands/skills.js.map +1 -0
  131. package/dist/commands/status.d.ts +3 -1
  132. package/dist/commands/status.js +231 -41
  133. package/dist/commands/status.js.map +1 -1
  134. package/dist/commands/statusline.d.ts +24 -0
  135. package/dist/commands/statusline.js +450 -0
  136. package/dist/commands/statusline.js.map +1 -0
  137. package/dist/commands/subscribe.d.ts +19 -0
  138. package/dist/commands/subscribe.js +91 -0
  139. package/dist/commands/subscribe.js.map +1 -0
  140. package/dist/commands/tools.d.ts +30 -0
  141. package/dist/commands/tools.js +315 -0
  142. package/dist/commands/tools.js.map +1 -0
  143. package/dist/commands/versions.d.ts +27 -0
  144. package/dist/commands/versions.js +277 -0
  145. package/dist/commands/versions.js.map +1 -0
  146. package/dist/commands/view.d.ts +57 -0
  147. package/dist/commands/view.js +195 -0
  148. package/dist/commands/view.js.map +1 -0
  149. package/dist/commands/whoami.d.ts +21 -0
  150. package/dist/commands/whoami.js +129 -0
  151. package/dist/commands/whoami.js.map +1 -0
  152. package/dist/index.d.ts +3 -4
  153. package/dist/index.js +1524 -202
  154. package/dist/index.js.map +1 -1
  155. package/dist/lib/agent-templates.d.ts +25 -0
  156. package/dist/lib/agent-templates.js +148 -0
  157. package/dist/lib/agent-templates.js.map +1 -0
  158. package/dist/lib/agents-config.d.ts +4 -1
  159. package/dist/lib/agents-config.js +19 -2
  160. package/dist/lib/agents-config.js.map +1 -1
  161. package/dist/lib/approval-poll.d.ts +42 -0
  162. package/dist/lib/approval-poll.js +52 -0
  163. package/dist/lib/approval-poll.js.map +1 -0
  164. package/dist/lib/auth.d.ts +29 -6
  165. package/dist/lib/auth.js +105 -94
  166. package/dist/lib/auth.js.map +1 -1
  167. package/dist/lib/bundle-version.d.ts +11 -0
  168. package/dist/lib/bundle-version.js +33 -0
  169. package/dist/lib/bundle-version.js.map +1 -0
  170. package/dist/lib/capture-lane.d.ts +67 -0
  171. package/dist/lib/capture-lane.js +136 -0
  172. package/dist/lib/capture-lane.js.map +1 -0
  173. package/dist/lib/cp-packages.d.ts +121 -0
  174. package/dist/lib/cp-packages.js +218 -0
  175. package/dist/lib/cp-packages.js.map +1 -0
  176. package/dist/lib/describe-lens.d.ts +46 -0
  177. package/dist/lib/describe-lens.js +33 -0
  178. package/dist/lib/describe-lens.js.map +1 -0
  179. package/dist/lib/hub-client.d.ts +84 -1
  180. package/dist/lib/hub-client.js +502 -22
  181. package/dist/lib/hub-client.js.map +1 -1
  182. package/dist/lib/installed.d.ts +51 -0
  183. package/dist/lib/installed.js +70 -0
  184. package/dist/lib/installed.js.map +1 -0
  185. package/dist/lib/next-steps.d.ts +61 -0
  186. package/dist/lib/next-steps.js +146 -0
  187. package/dist/lib/next-steps.js.map +1 -0
  188. package/dist/lib/pod.d.ts +104 -19
  189. package/dist/lib/pod.js +245 -57
  190. package/dist/lib/pod.js.map +1 -1
  191. package/dist/lib/project-ref.d.ts +95 -0
  192. package/dist/lib/project-ref.js +144 -0
  193. package/dist/lib/project-ref.js.map +1 -0
  194. package/dist/lib/project.d.ts +35 -0
  195. package/dist/lib/project.js +39 -0
  196. package/dist/lib/project.js.map +1 -0
  197. package/dist/lib/session-lens.d.ts +33 -0
  198. package/dist/lib/session-lens.js +76 -0
  199. package/dist/lib/session-lens.js.map +1 -0
  200. package/dist/lib/skill-import.d.ts +40 -0
  201. package/dist/lib/skill-import.js +203 -0
  202. package/dist/lib/skill-import.js.map +1 -0
  203. package/dist/lib/skills-installer.d.ts +16 -5
  204. package/dist/lib/skills-installer.js +132 -18
  205. package/dist/lib/skills-installer.js.map +1 -1
  206. package/dist/lib/suite.d.ts +28 -0
  207. package/dist/lib/suite.js +29 -0
  208. package/dist/lib/suite.js.map +1 -0
  209. package/dist/lib/superwhisper-import.d.ts +40 -0
  210. package/dist/lib/superwhisper-import.js +389 -0
  211. package/dist/lib/superwhisper-import.js.map +1 -0
  212. package/dist/lib/targets.d.ts +66 -2
  213. package/dist/lib/targets.js +914 -132
  214. package/dist/lib/targets.js.map +1 -1
  215. package/dist/lib/unwrapList.d.ts +1 -0
  216. package/dist/lib/unwrapList.js +20 -0
  217. package/dist/lib/unwrapList.js.map +1 -0
  218. package/dist/utils/logger.d.ts +2 -0
  219. package/dist/utils/logger.js +10 -2
  220. package/dist/utils/logger.js.map +1 -1
  221. package/package.json +10 -4
  222. package/skills/agent-os/SKILL.md +212 -0
  223. package/skills/manifest.json +5 -0
  224. package/skills/onboard/SKILL.md +186 -0
  225. package/skills/synap/SKILL.md +1524 -104
  226. package/skills/synap/_order.txt +37 -0
  227. package/skills/synap/_skill.yaml +24 -0
  228. package/skills/synap/authentication.md +10 -0
  229. package/skills/synap/automations.md +264 -0
  230. package/skills/synap/capabilities.md +107 -0
  231. package/skills/synap/capture.md +10 -0
  232. package/skills/synap/cli-operations.md +107 -0
  233. package/skills/synap/common-mistakes.md +12 -0
  234. package/skills/synap/creative-loop.md +43 -0
  235. package/skills/synap/crm.md +117 -0
  236. package/skills/synap/diagnostics.md +35 -0
  237. package/skills/synap/digesting-a-channel.md +38 -0
  238. package/skills/synap/document-embeds.md +123 -0
  239. package/skills/synap/escalation-ladder.md +71 -0
  240. package/skills/synap/focus-sessions.md +47 -0
  241. package/skills/synap/governance-rules.md +64 -0
  242. package/skills/synap/governance.md +6 -6
  243. package/skills/synap/graph-gardening.md +21 -0
  244. package/skills/synap/inline-patterns.md +38 -0
  245. package/skills/synap/lenses.md +38 -0
  246. package/skills/synap/linking-principle.md +39 -0
  247. package/skills/synap/linking.md +1 -0
  248. package/skills/synap/mental-model.md +45 -0
  249. package/skills/synap/more.md +7 -0
  250. package/skills/synap/multi-entity-capture.md +10 -0
  251. package/skills/synap/next-action.md +37 -0
  252. package/skills/synap/north-star.md +17 -0
  253. package/skills/synap/operating-mode-rules.md +45 -0
  254. package/skills/synap/operating-mode.md +9 -0
  255. package/skills/synap/quick-reference.md +67 -0
  256. package/skills/synap/reading.md +43 -0
  257. package/skills/synap/recap.md +21 -0
  258. package/skills/synap/reflexes.md +46 -0
  259. package/skills/synap/response-style.md +21 -0
  260. package/skills/synap/scope.md +13 -0
  261. package/skills/synap/showing.md +17 -0
  262. package/skills/synap/user-model.md +25 -0
  263. package/skills/synap/viewframe-cells.md +290 -0
  264. package/skills/synap/work-flow.md +113 -0
  265. package/skills/synap/worked-examples.md +53 -0
  266. package/skills/synap/workspace-design.md +45 -0
  267. package/skills/synap/workspace-edges.md +49 -0
  268. package/skills/synap/writes.md +156 -0
  269. package/skills/synap-schema/SKILL.md +97 -6
  270. package/skills/synap-schema/_order.txt +13 -0
  271. package/skills/synap-schema/_skill.yaml +22 -0
  272. package/skills/synap-schema/before-you-touch.md +14 -0
  273. package/skills/synap-schema/common-mistakes.md +9 -0
  274. package/skills/synap-schema/creating-profiles.md +17 -0
  275. package/skills/synap-schema/discover-profiles.md +24 -0
  276. package/skills/synap-schema/entity-scope.md +8 -0
  277. package/skills/synap-schema/extend-vs-create.md +31 -0
  278. package/skills/synap-schema/more.md +6 -0
  279. package/skills/synap-schema/overlay-properties.md +22 -0
  280. package/skills/synap-schema/profiles.md +3 -0
  281. package/skills/synap-schema/property-defs.md +29 -0
  282. package/skills/synap-schema/read-before-write.md +50 -0
  283. package/skills/synap-schema/relations.md +18 -0
  284. package/skills/synap-schema/worked-example.md +30 -0
  285. package/skills/synap-ui/SKILL.md +38 -11
  286. package/skills/synap-ui/_order.txt +13 -0
  287. package/skills/synap-ui/_skill.yaml +23 -0
  288. package/skills/synap-ui/ai-companion.md +27 -0
  289. package/skills/synap-ui/arranging-bento.md +8 -0
  290. package/skills/synap-ui/before-you-build.md +20 -0
  291. package/skills/synap-ui/bento-layouts.md +35 -0
  292. package/skills/synap-ui/common-mistakes.md +10 -0
  293. package/skills/synap-ui/creating-views.md +26 -0
  294. package/skills/synap-ui/four-builds.md +24 -0
  295. package/skills/synap-ui/more.md +7 -0
  296. package/skills/synap-ui/proposing-vs-extending.md +11 -0
  297. package/skills/synap-ui/view-list.md +24 -0
  298. package/skills/synap-ui/views.md +3 -0
  299. package/skills/synap-ui/worked-example.md +18 -0
  300. package/skills/synap-ui/workspaces.md +47 -0
  301. package/templates/automations/bookmark-enrichment.automation.json +44 -0
  302. package/templates/automations/mail-feed.automation.json +86 -0
  303. package/templates/automations/url-bookmark-capture.automation.json +70 -0
  304. package/templates/skills/README.md +21 -0
  305. package/templates/skills/authoring-automations/SKILL.md +95 -0
  306. package/templates/skills/authoring-automations/reference/node-matrix.md +49 -0
  307. package/templates/skills/authoring-capabilities/SKILL.md +93 -0
  308. package/templates/skills/authoring-capabilities/reference/template-anatomy.md +70 -0
  309. package/templates/skills/authoring-playbooks/SKILL.md +102 -0
  310. package/templates/skills/authoring-playbooks/reference/stages-contract.md +35 -0
  311. package/templates/skills/authoring-playbooks/reference/worked-example.md +64 -0
  312. package/templates/skills/bookmark-enrichment/SKILL.md +40 -0
  313. package/templates/skills/coordinating-agents/SKILL.md +32 -0
  314. package/templates/skills/coordinating-branches/SKILL.md +27 -0
  315. package/templates/skills/mapping-the-server/SKILL.md +54 -0
  316. package/templates/skills/reading-client-progress/SKILL.md +65 -0
  317. package/templates/skills/routing-to-channels/SKILL.md +54 -0
  318. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
  319. package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
  320. package/templates/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
  321. package/templates/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
  322. package/templates/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
  323. package/templates/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
  324. package/templates/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
  325. package/templates/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
  326. package/templates/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
  327. package/templates/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
  328. package/templates/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
  329. package/templates/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
  330. package/templates/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
  331. package/templates/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
  332. package/templates/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
  333. package/templates/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
  334. package/templates/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
  335. package/templates/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
  336. package/templates/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
  337. package/templates/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
  338. package/templates/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
  339. package/templates/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
  340. package/templates/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
  341. package/templates/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
  342. package/templates/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
  343. package/templates/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
  344. package/templates/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
  345. package/templates/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
  346. package/dist/commands/finish.d.ts +0 -25
  347. package/dist/commands/finish.js +0 -274
  348. package/dist/commands/finish.js.map +0 -1
  349. package/dist/commands/openclaw.d.ts +0 -40
  350. package/dist/commands/openclaw.js +0 -1148
  351. package/dist/commands/openclaw.js.map +0 -1
  352. package/dist/commands/security-audit.d.ts +0 -12
  353. package/dist/commands/security-audit.js +0 -100
  354. package/dist/commands/security-audit.js.map +0 -1
  355. package/dist/lib/hardening.d.ts +0 -18
  356. package/dist/lib/hardening.js +0 -214
  357. package/dist/lib/hardening.js.map +0 -1
  358. package/dist/lib/templates.d.ts +0 -11
  359. package/dist/lib/templates.js +0 -13
  360. package/dist/lib/templates.js.map +0 -1
  361. package/dist/templates/agent-os.json +0 -3090
  362. package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -881
  363. package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -907
  364. package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -907
  365. package/node_modules/@synap/hub-rest-client/dist/index.js +0 -851
  366. package/node_modules/@synap/hub-rest-client/package.json +0 -45
  367. package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1143
  368. package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
  369. package/node_modules/@synap/hub-rest-client/src/index.ts +0 -111
  370. package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -77
  371. package/node_modules/@synap/hub-rest-client/src/types.ts +0 -639
@@ -1,639 +0,0 @@
1
- /**
2
- * @synap/hub-rest-client — Hub Protocol REST API Types
3
- *
4
- * Canonical TypeScript interfaces for all objects returned by the
5
- * Synap Hub Protocol REST API (`/api/hub/*`).
6
- *
7
- * These are the source of truth for external consumers (Raycast extension,
8
- * CLI, third-party integrations). Keep in sync with hub-protocol-rest.ts
9
- * response shapes in synap-backend.
10
- *
11
- * Zero runtime dependencies — pure TypeScript interfaces.
12
- */
13
-
14
- // ─── Core entities ───────────────────────────────────────────────────────────
15
-
16
- export interface HubEntity {
17
- id: string;
18
- title: string;
19
- profileSlug: string;
20
- workspaceId: string | null;
21
- /** JSONB property bag — keys depend on the profile schema */
22
- properties: Record<string, unknown>;
23
- createdAt: string;
24
- updatedAt: string;
25
- // Convenience shortcuts pulled from properties at response time
26
- status?: string;
27
- priority?: string;
28
- dueDate?: string;
29
- content?: string;
30
- url?: string;
31
- }
32
-
33
- export interface HubDocument {
34
- id: string;
35
- title: string;
36
- content: string;
37
- workspaceId: string | null;
38
- createdAt: string;
39
- updatedAt: string;
40
- }
41
-
42
- export interface HubChannel {
43
- id: string;
44
- name: string;
45
- type:
46
- | "personal"
47
- | "thread"
48
- | "sub_thread"
49
- | "feed"
50
- | "external"
51
- | "agent_collab";
52
- workspaceId: string | null;
53
- agentType?: string;
54
- contextObjectType?:
55
- | "workspace"
56
- | "entity"
57
- | "document"
58
- | "view"
59
- | "project"
60
- | "task"
61
- | "user"
62
- | "external"
63
- | null;
64
- contextObjectId?: string | null;
65
- createdAt: string;
66
- }
67
-
68
- export interface HubWorkspace {
69
- id: string;
70
- name: string;
71
- role?: string;
72
- }
73
-
74
- /** GET /api/hub/workspaces — canonical Hub Protocol shape (not `data`). */
75
- export interface HubWorkspacesListResponse {
76
- workspaces: HubWorkspace[];
77
- }
78
-
79
- /** GET /api/hub/users/me returns at least `id` (and `scopes`); email may be omitted. */
80
- export interface HubUser {
81
- id: string;
82
- email?: string;
83
- name?: string;
84
- scopes?: string[];
85
- }
86
-
87
- export interface HubMemoryResult {
88
- id: string;
89
- content: string;
90
- score?: number;
91
- createdAt: string;
92
- }
93
-
94
- // ─── Response wrappers ───────────────────────────────────────────────────────
95
-
96
- export interface HubListResponse<T> {
97
- data: T[];
98
- total?: number;
99
- hasMore?: boolean;
100
- }
101
-
102
- export interface HubSingleResponse<T> {
103
- data: T;
104
- }
105
-
106
- // ─── Input types ─────────────────────────────────────────────────────────────
107
-
108
- export interface CreateEntityInput {
109
- profileSlug: string;
110
- title: string;
111
- workspaceId?: string;
112
- properties?: Record<string, unknown>;
113
- content?: string;
114
- url?: string;
115
- status?: string;
116
- priority?: "low" | "medium" | "high" | "urgent";
117
- dueDate?: string;
118
- }
119
-
120
- export interface UpdateEntityInput {
121
- title?: string;
122
- properties?: Record<string, unknown>;
123
- content?: string;
124
- url?: string;
125
- status?: string;
126
- priority?: "low" | "medium" | "high" | "urgent";
127
- dueDate?: string;
128
- }
129
-
130
- export interface CreateDocumentInput {
131
- title: string;
132
- content?: string;
133
- workspaceId?: string;
134
- entityId?: string;
135
- }
136
-
137
- export interface StoreMemoryInput {
138
- fact: string;
139
- context?: string;
140
- workspaceId?: string;
141
- }
142
-
143
- export interface SendToChannelInput {
144
- channelId: string;
145
- content: string;
146
- /** Defaults to the authenticated user (GET /users/me). */
147
- userId?: string;
148
- role?: "system" | "assistant" | "user";
149
- /** When true, may queue an IS response on AI-active threads (server-side). */
150
- autoRespond?: boolean;
151
- workspaceId?: string;
152
- }
153
-
154
- // ─── Setup types ─────────────────────────────────────────────────────────────
155
-
156
- export interface AgentSetupResult {
157
- hubApiKey: string;
158
- agentUserId: string;
159
- workspaceId: string;
160
- }
161
-
162
- export interface PodStatus {
163
- url: string;
164
- healthy: boolean;
165
- version?: string;
166
- }
167
-
168
- // ─── Capture pipeline types ───────────────────────────────────────────────────
169
-
170
- export interface CaptureProposal {
171
- tempId: string;
172
- profileSlug: string;
173
- title: string;
174
- description?: string;
175
- properties?: Record<string, unknown>;
176
- confidence: number;
177
- action: "create" | "link" | "dismiss";
178
- linkedEntityId?: string;
179
- linkedEntityTitle?: string;
180
- dedupCandidates?: Array<{
181
- entityId: string;
182
- title: string;
183
- profileSlug: string;
184
- score: number;
185
- }>;
186
- }
187
-
188
- export interface CaptureRelation {
189
- sourceTempId: string;
190
- targetTempId: string;
191
- relationType: string;
192
- }
193
-
194
- export interface CaptureStructureResponse {
195
- proposals: CaptureProposal[];
196
- relations: CaptureRelation[];
197
- followUp: string | null;
198
- dedupCandidates?: Record<
199
- string,
200
- Array<{ entityId: string; title: string; score: number }>
201
- >;
202
- }
203
-
204
- export interface CaptureExecuteInput {
205
- entities: Array<{
206
- tempId: string;
207
- profileSlug: string;
208
- title: string;
209
- description?: string;
210
- properties?: Record<string, unknown>;
211
- action: "create" | "link" | "dismiss";
212
- linkedEntityId?: string;
213
- confidence?: number;
214
- }>;
215
- relations?: CaptureRelation[];
216
- }
217
-
218
- export interface CaptureExecuteResponse {
219
- created: Array<{
220
- tempId: string;
221
- entityId: string;
222
- profileSlug: string;
223
- linked: boolean;
224
- }>;
225
- relations: Array<{
226
- sourceTempId: string;
227
- targetTempId: string;
228
- relationType: string;
229
- }>;
230
- }
231
-
232
- // ─── Relations & Graph ───────────────────────────────────────────────────────
233
-
234
- export interface HubRelation {
235
- id: string;
236
- sourceEntityId: string;
237
- targetEntityId: string;
238
- type: string;
239
- label?: string;
240
- createdAt: string;
241
- }
242
-
243
- export interface HubGraphNode extends HubEntity {
244
- depth: number;
245
- }
246
-
247
- export interface HubGraphEdge {
248
- sourceId: string;
249
- targetId: string;
250
- type: string;
251
- label?: string;
252
- }
253
-
254
- export interface HubGraphResult {
255
- nodes: HubGraphNode[];
256
- edges: HubGraphEdge[];
257
- }
258
-
259
- /**
260
- * A single link returned by getConnections() — unified view across three sources:
261
- * - `"graph"` : an explicit row in the relations table
262
- * - `"property"` : derived from another entity's `entity_id` property pointing here
263
- * - `"thread"` : a chat thread created, updated, or referenced this entity
264
- */
265
- export interface HubConnection {
266
- entityId: string;
267
- entity: HubEntity | null;
268
- label: string;
269
- direction: "outgoing" | "incoming" | "structural";
270
- source: "graph" | "property" | "thread";
271
- relationType?: string;
272
- propertySlug?: string;
273
- propertyLabel?: string;
274
- channelId?: string;
275
- channelRelationshipType?: string;
276
- createdAt?: string | null;
277
- }
278
-
279
- export interface HubConnectionsResult {
280
- connections: HubConnection[];
281
- counts: {
282
- total: number;
283
- graph: number;
284
- structural: number;
285
- threads: number;
286
- };
287
- }
288
-
289
- // ─── Profiles & Property Defs ────────────────────────────────────────────────
290
-
291
- export interface HubProfile {
292
- id: string;
293
- slug: string;
294
- displayName: string;
295
- description?: string;
296
- entityScope: "pod" | "workspace";
297
- parentSlug?: string;
298
- icon?: string;
299
- color?: string;
300
- properties?: HubPropertyDef[];
301
- }
302
-
303
- export interface HubPropertyDef {
304
- id: string;
305
- slug: string;
306
- displayName: string;
307
- type:
308
- | "string"
309
- | "number"
310
- | "boolean"
311
- | "date"
312
- | "entity_id"
313
- | "array"
314
- | "object"
315
- | "secret";
316
- required?: boolean;
317
- options?: string[];
318
- }
319
-
320
- // ─── Discover ────────────────────────────────────────────────────────────────
321
-
322
- export interface HubDiscoverProperty {
323
- slug: string;
324
- displayName: string;
325
- type: string;
326
- options?: string[];
327
- required?: boolean;
328
- }
329
-
330
- export interface HubDiscoverProfile {
331
- slug: string;
332
- displayName: string;
333
- scope: "pod" | "workspace";
334
- description?: string | null;
335
- icon?: string | null;
336
- properties: HubDiscoverProperty[];
337
- createCommand: string;
338
- }
339
-
340
- export interface HubDiscoverResult {
341
- profiles: HubDiscoverProfile[];
342
- commands: Record<string, string>;
343
- hint: string;
344
- }
345
-
346
- // ─── Threads & Channels ──────────────────────────────────────────────────────
347
-
348
- export interface HubThread {
349
- id: string;
350
- name?: string;
351
- type:
352
- | "personal"
353
- | "thread"
354
- | "sub_thread"
355
- | "feed"
356
- | "external"
357
- | "agent_collab";
358
- workspaceId?: string;
359
- agentType?: string;
360
- contextObjectType?:
361
- | "workspace"
362
- | "entity"
363
- | "document"
364
- | "view"
365
- | "project"
366
- | "task"
367
- | "user"
368
- | "external";
369
- contextObjectId?: string;
370
- parentChannelId?: string;
371
- linkedEntityIds?: string[];
372
- linkedDocumentIds?: string[];
373
- createdAt: string;
374
- updatedAt: string;
375
- }
376
-
377
- export interface HubMessage {
378
- id: string;
379
- content: string;
380
- role: "user" | "assistant" | "system";
381
- userId?: string;
382
- createdAt: string;
383
- }
384
-
385
- export interface HubThreadContext {
386
- thread: HubThread;
387
- messages: HubMessage[];
388
- linkedEntities: HubEntity[];
389
- linkedDocuments: HubDocument[];
390
- }
391
-
392
- // ─── Proposals ───────────────────────────────────────────────────────────────
393
-
394
- export interface HubProposal {
395
- id: string;
396
- status: "pending" | "approved" | "rejected";
397
- action: "create" | "update" | "delete";
398
- subjectType: string;
399
- data: Record<string, unknown>;
400
- reason?: string;
401
- createdAt: string;
402
- reviewedAt?: string;
403
- }
404
-
405
- // ─── Views ───────────────────────────────────────────────────────────────────
406
-
407
- export interface HubView {
408
- id: string;
409
- name: string;
410
- type:
411
- | "table"
412
- | "kanban"
413
- | "list"
414
- | "grid"
415
- | "gallery"
416
- | "calendar"
417
- | "timeline"
418
- | "graph"
419
- | "bento"
420
- | string;
421
- profileSlug?: string;
422
- workspaceId?: string;
423
- config?: Record<string, unknown>;
424
- createdAt: string;
425
- updatedAt: string;
426
- }
427
-
428
- // ─── Search ───────────────────────────────────────────────────────────────────
429
-
430
- export interface HubSearchResult {
431
- entities: HubEntity[];
432
- documents: HubDocument[];
433
- total: number;
434
- }
435
-
436
- // ─── Commands ────────────────────────────────────────────────────────────────
437
-
438
- export interface HubCommand {
439
- id: string;
440
- name: string;
441
- slug: string;
442
- description?: string;
443
- workspaceId?: string;
444
- }
445
-
446
- // ─── Agent Users ─────────────────────────────────────────────────────────────
447
-
448
- export interface HubAgentUser {
449
- id: string;
450
- name: string;
451
- agentType?: string;
452
- workspaceId?: string;
453
- }
454
-
455
- // ─── User Context ─────────────────────────────────────────────────────────────
456
-
457
- export interface HubUserContext {
458
- recentEntities: HubEntity[];
459
- activeThreads: HubThread[];
460
- workspaceSummary?: Record<string, unknown>;
461
- }
462
-
463
- // ─── Governance ───────────────────────────────────────────────────────────────
464
-
465
- export interface HubGovernanceResult {
466
- status: "approved" | "proposed" | "denied";
467
- id?: string;
468
- proposalId?: string;
469
- reason?: string;
470
- message?: string;
471
- /**
472
- * Short human-readable summary of what was proposed. Present on `proposed`
473
- * responses. Example: `Delete task "Q2 plan review"`.
474
- */
475
- summary?: string;
476
- /**
477
- * Reasoning — echoed from the AI's rationale or the policy's explanation
478
- * of why review is needed. Present on `proposed` responses.
479
- */
480
- reasoning?: string;
481
- /**
482
- * Pod-relative path for the review UI: `/proposals/{id}`.
483
- * Present on `proposed` responses.
484
- */
485
- reviewPath?: string;
486
- /**
487
- * Absolute URL for the review UI (defaults to `studio.synap.live`,
488
- * overridable via `SYNAP_APP_URL` on the pod). Surface this directly to
489
- * the user so they can approve without digging through the app.
490
- */
491
- reviewUrl?: string;
492
- }
493
-
494
- // ─── Write input types ────────────────────────────────────────────────────────
495
-
496
- export interface CreateThreadInput {
497
- name?: string;
498
- type?: HubThread["type"];
499
- workspaceId?: string;
500
- agentType?: string;
501
- entityId?: string;
502
- documentId?: string;
503
- userId?: string;
504
- }
505
-
506
- export interface CreateRelationInput {
507
- sourceEntityId: string;
508
- targetEntityId: string;
509
- type: string;
510
- label?: string;
511
- workspaceId?: string;
512
- userId?: string;
513
- }
514
-
515
- export interface CreateViewInput {
516
- name: string;
517
- type: HubView["type"];
518
- profileSlug?: string;
519
- workspaceId: string;
520
- config?: Record<string, unknown>;
521
- userId?: string;
522
- }
523
-
524
- export interface ExecuteCommandInput {
525
- slug: string;
526
- workspaceId?: string;
527
- parameters?: Record<string, unknown>;
528
- userId?: string;
529
- }
530
-
531
- // ─── Automations ──────────────────────────────────────────────────────────────
532
-
533
- export type AutomationStatus = "draft" | "active" | "paused" | "error";
534
- export type AutomationTriggerType = "event" | "cron" | "webhook" | "manual";
535
-
536
- export interface HubAutomation {
537
- id: string;
538
- userId: string;
539
- workspaceId?: string | null;
540
- name: string;
541
- description?: string | null;
542
- triggerType: AutomationTriggerType;
543
- triggerConfig?: Record<string, unknown>;
544
- flowDefinition?: {
545
- nodes: Record<string, unknown>[];
546
- edges: Record<string, unknown>[];
547
- };
548
- status: AutomationStatus;
549
- metadata?: Record<string, unknown>;
550
- createdAt?: string;
551
- updatedAt?: string;
552
- }
553
-
554
- export interface CreateAutomationInput {
555
- name: string;
556
- triggerType: AutomationTriggerType;
557
- workspaceId?: string | null;
558
- description?: string;
559
- triggerConfig?: Record<string, unknown>;
560
- flowDefinition?: {
561
- nodes: Record<string, unknown>[];
562
- edges: Record<string, unknown>[];
563
- };
564
- status?: AutomationStatus;
565
- metadata?: Record<string, unknown>;
566
- userId?: string;
567
- agentUserId?: string;
568
- }
569
-
570
- export interface UpdateAutomationInput {
571
- name?: string;
572
- description?: string;
573
- triggerType?: AutomationTriggerType;
574
- triggerConfig?: Record<string, unknown>;
575
- flowDefinition?: {
576
- nodes: Record<string, unknown>[];
577
- edges: Record<string, unknown>[];
578
- };
579
- status?: AutomationStatus;
580
- metadata?: Record<string, unknown>;
581
- workspaceId?: string;
582
- userId?: string;
583
- }
584
-
585
- // ─── Subscriptions / Reactions (Pulse) ───────────────────────────────────────
586
-
587
- export type ReactionKind =
588
- | "automation"
589
- | "ai_feed"
590
- | "ai_react"
591
- | "notify"
592
- | "webhook"
593
- | "message_out";
594
-
595
- export type ReactionLens = "all" | "internal" | "external";
596
-
597
- /** Opaque reaction event from the Pulse feed — shape varies by kind. */
598
- export interface HubReactionEvent {
599
- id: string;
600
- eventType: string;
601
- kind?: ReactionKind;
602
- workspaceId?: string | null;
603
- userId?: string;
604
- createdAt: string;
605
- reactions?: Record<string, unknown>[];
606
- [key: string]: unknown;
607
- }
608
-
609
- // ─── Notifications ────────────────────────────────────────────────────────────
610
-
611
- export type NotificationSourceType =
612
- | "proposal"
613
- | "connector"
614
- | "agent"
615
- | "system"
616
- | "inbox_item";
617
-
618
- export interface CreateNotificationInput {
619
- userId: string;
620
- workspaceId: string;
621
- type: string;
622
- sourceType?: NotificationSourceType;
623
- sourceId?: string;
624
- workspaceUrl?: string;
625
- groupKey?: string;
626
- data?: Record<string, unknown>;
627
- }
628
-
629
- // ─── Webhooks ─────────────────────────────────────────────────────────────────
630
-
631
- export interface HubWebhookDelivery {
632
- id: string;
633
- subscriptionId: string;
634
- status: string;
635
- responseStatus?: number;
636
- attempt: number;
637
- deliveredAt?: string;
638
- createdAt: string;
639
- }