@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.
- package/LICENSE +21 -0
- package/README.md +40 -198
- package/dist/build-info.json +6 -0
- package/dist/commands/agent-run.js +3 -2
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/agents.d.ts +32 -17
- package/dist/commands/agents.js +203 -237
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/app.d.ts +143 -0
- package/dist/commands/app.js +524 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/automate.d.ts +21 -0
- package/dist/commands/automate.js +42 -0
- package/dist/commands/automate.js.map +1 -0
- package/dist/commands/automation-schema.test.d.ts +16 -0
- package/dist/commands/automation-schema.test.js +77 -0
- package/dist/commands/automation-schema.test.js.map +1 -0
- package/dist/commands/automation.d.ts +12 -0
- package/dist/commands/automation.js +116 -66
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/box.d.ts +42 -0
- package/dist/commands/box.js +89 -0
- package/dist/commands/box.js.map +1 -0
- package/dist/commands/bridge-setup.d.ts +14 -1
- package/dist/commands/bridge-setup.js +395 -129
- package/dist/commands/bridge-setup.js.map +1 -1
- package/dist/commands/cap-connections.d.ts +4 -4
- package/dist/commands/cap-connections.js +14 -14
- package/dist/commands/cap-connections.js.map +1 -1
- package/dist/commands/capability.d.ts +3 -1
- package/dist/commands/capability.js +249 -176
- package/dist/commands/capability.js.map +1 -1
- package/dist/commands/catalog.d.ts +275 -0
- package/dist/commands/catalog.js +481 -0
- package/dist/commands/catalog.js.map +1 -0
- package/dist/commands/cell.d.ts +155 -8
- package/dist/commands/cell.js +416 -40
- package/dist/commands/cell.js.map +1 -1
- package/dist/commands/centrality.js +1 -13
- package/dist/commands/centrality.js.map +1 -1
- package/dist/commands/close-questions.d.ts +27 -0
- package/dist/commands/close-questions.js +49 -0
- package/dist/commands/close-questions.js.map +1 -0
- package/dist/commands/close-questions.test.d.ts +1 -0
- package/dist/commands/close-questions.test.js +52 -0
- package/dist/commands/close-questions.test.js.map +1 -0
- package/dist/commands/connect.d.ts +36 -13
- package/dist/commands/connect.js +68 -167
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connections.d.ts +3 -2
- package/dist/commands/connections.js +95 -25
- package/dist/commands/connections.js.map +1 -1
- package/dist/commands/context.js +79 -44
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/data-extra.d.ts +34 -0
- package/dist/commands/data-extra.js +203 -25
- package/dist/commands/data-extra.js.map +1 -1
- package/dist/commands/data.d.ts +120 -2
- package/dist/commands/data.js +295 -21
- package/dist/commands/data.js.map +1 -1
- package/dist/commands/diagnose.d.ts +66 -4
- package/dist/commands/diagnose.js +285 -28
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/doc.d.ts +11 -4
- package/dist/commands/doc.js +39 -14
- package/dist/commands/doc.js.map +1 -1
- package/dist/commands/doctor.d.ts +133 -3
- package/dist/commands/doctor.js +761 -41
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain.js +5 -5
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/hooks.d.ts +19 -0
- package/dist/commands/hooks.js +70 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/import.d.ts +393 -13
- package/dist/commands/import.js +1150 -54
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +34 -9
- package/dist/commands/init.js +481 -981
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.d.ts +1 -0
- package/dist/commands/keys.js +15 -2
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/knowledge.d.ts +22 -6
- package/dist/commands/knowledge.js +121 -57
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/lens.d.ts +37 -1
- package/dist/commands/lens.js +194 -72
- package/dist/commands/lens.js.map +1 -1
- package/dist/commands/market-authoring.d.ts +29 -2
- package/dist/commands/market-authoring.js +348 -7
- package/dist/commands/market-authoring.js.map +1 -1
- package/dist/commands/market-official.d.ts +58 -0
- package/dist/commands/market-official.js +84 -0
- package/dist/commands/market-official.js.map +1 -0
- package/dist/commands/market.d.ts +400 -16
- package/dist/commands/market.js +1802 -146
- package/dist/commands/market.js.map +1 -1
- package/dist/commands/mcp.d.ts +60 -25
- package/dist/commands/mcp.js +251 -64
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/observe.category.test.d.ts +1 -0
- package/dist/commands/observe.category.test.js +59 -0
- package/dist/commands/observe.category.test.js.map +1 -0
- package/dist/commands/observe.d.ts +3 -0
- package/dist/commands/observe.js +7 -5
- package/dist/commands/observe.js.map +1 -1
- package/dist/commands/observe.title.test.d.ts +1 -0
- package/dist/commands/observe.title.test.js +37 -0
- package/dist/commands/observe.title.test.js.map +1 -0
- package/dist/commands/open.d.ts +39 -9
- package/dist/commands/open.js +80 -25
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/playbook.d.ts +42 -0
- package/dist/commands/playbook.js +171 -0
- package/dist/commands/playbook.js.map +1 -0
- package/dist/commands/pod.js +1 -1
- package/dist/commands/pod.js.map +1 -1
- package/dist/commands/pods.d.ts +11 -1
- package/dist/commands/pods.js +129 -131
- package/dist/commands/pods.js.map +1 -1
- package/dist/commands/proposals-actions.d.ts +62 -0
- package/dist/commands/proposals-actions.js +143 -8
- package/dist/commands/proposals-actions.js.map +1 -1
- package/dist/commands/proposals-await.d.ts +68 -0
- package/dist/commands/proposals-await.js +248 -0
- package/dist/commands/proposals-await.js.map +1 -0
- package/dist/commands/proton-setup.d.ts +73 -0
- package/dist/commands/proton-setup.js +579 -0
- package/dist/commands/proton-setup.js.map +1 -0
- package/dist/commands/providers.d.ts +23 -0
- package/dist/commands/providers.js +126 -1
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/raycast.js +6 -2
- package/dist/commands/raycast.js.map +1 -1
- package/dist/commands/rule.d.ts +150 -0
- package/dist/commands/rule.js +447 -0
- package/dist/commands/rule.js.map +1 -0
- package/dist/commands/session-feed-wait.d.ts +48 -0
- package/dist/commands/session-feed-wait.js +261 -0
- package/dist/commands/session-feed-wait.js.map +1 -0
- package/dist/commands/session-post.d.ts +40 -0
- package/dist/commands/session-post.js +96 -0
- package/dist/commands/session-post.js.map +1 -0
- package/dist/commands/session-wait.d.ts +116 -0
- package/dist/commands/session-wait.js +224 -0
- package/dist/commands/session-wait.js.map +1 -0
- package/dist/commands/sessions.d.ts +54 -0
- package/dist/commands/sessions.js +501 -58
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/skill-manage.d.ts +21 -0
- package/dist/commands/skill-manage.js +136 -19
- package/dist/commands/skill-manage.js.map +1 -1
- package/dist/commands/skills-commands.d.ts +2 -0
- package/dist/commands/skills-commands.js +9 -1
- package/dist/commands/skills-commands.js.map +1 -1
- package/dist/commands/skills-commands.test.d.ts +1 -0
- package/dist/commands/skills-commands.test.js +57 -0
- package/dist/commands/skills-commands.test.js.map +1 -0
- package/dist/commands/skills.js +16 -0
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +1 -4
- package/dist/commands/status.js +6 -35
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/statusline.backoff.test.d.ts +13 -0
- package/dist/commands/statusline.backoff.test.js +100 -0
- package/dist/commands/statusline.backoff.test.js.map +1 -0
- package/dist/commands/statusline.js +16 -9
- package/dist/commands/statusline.js.map +1 -1
- package/dist/commands/sync-status.d.ts +12 -0
- package/dist/commands/sync-status.js +125 -0
- package/dist/commands/sync-status.js.map +1 -0
- package/dist/commands/templates-retire.d.ts +34 -0
- package/dist/commands/templates-retire.js +192 -0
- package/dist/commands/templates-retire.js.map +1 -0
- package/dist/commands/tools.js +6 -21
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/tracks.d.ts +112 -0
- package/dist/commands/tracks.js +543 -0
- package/dist/commands/tracks.js.map +1 -0
- package/dist/commands/update.d.ts +3 -11
- package/dist/commands/update.js +5 -134
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upload.d.ts +41 -3
- package/dist/commands/upload.js +120 -18
- package/dist/commands/upload.js.map +1 -1
- package/dist/commands/vendor.d.ts +28 -0
- package/dist/commands/vendor.js +110 -0
- package/dist/commands/vendor.js.map +1 -0
- package/dist/commands/versions.js +6 -0
- package/dist/commands/versions.js.map +1 -1
- package/dist/commands/view.js +10 -5
- package/dist/commands/view.js.map +1 -1
- package/dist/commands/whoami.d.ts +30 -3
- package/dist/commands/whoami.js +186 -23
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/worker-accounts.d.ts +149 -0
- package/dist/commands/worker-accounts.js +339 -0
- package/dist/commands/worker-accounts.js.map +1 -0
- package/dist/commands/worker-accounts.test.d.ts +1 -0
- package/dist/commands/worker-accounts.test.js +224 -0
- package/dist/commands/worker-accounts.test.js.map +1 -0
- package/dist/commands/worker.d.ts +331 -0
- package/dist/commands/worker.js +1067 -0
- package/dist/commands/worker.js.map +1 -0
- package/dist/commands/worker.test.d.ts +1 -0
- package/dist/commands/worker.test.js +427 -0
- package/dist/commands/worker.test.js.map +1 -0
- package/dist/commands/workspace-ops.d.ts +35 -0
- package/dist/commands/workspace-ops.js +153 -0
- package/dist/commands/workspace-ops.js.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1043 -186
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-connections.d.ts +31 -0
- package/dist/lib/agent-connections.js +33 -0
- package/dist/lib/agent-connections.js.map +1 -0
- package/dist/lib/agent-detect.d.ts +27 -0
- package/dist/lib/agent-detect.js +71 -0
- package/dist/lib/agent-detect.js.map +1 -0
- package/dist/lib/agent-door.d.ts +136 -0
- package/dist/lib/agent-door.js +429 -0
- package/dist/lib/agent-door.js.map +1 -0
- package/dist/lib/agents-config.d.ts +2 -0
- package/dist/lib/agents-config.js +4 -9
- package/dist/lib/agents-config.js.map +1 -1
- package/dist/lib/approval-poll.d.ts +31 -2
- package/dist/lib/approval-poll.js +20 -7
- package/dist/lib/approval-poll.js.map +1 -1
- package/dist/lib/atomic-file.d.ts +48 -0
- package/dist/lib/atomic-file.js +129 -0
- package/dist/lib/atomic-file.js.map +1 -0
- package/dist/lib/auth.d.ts +17 -11
- package/dist/lib/auth.js +47 -64
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/batch-approval.d.ts +85 -0
- package/dist/lib/batch-approval.js +170 -0
- package/dist/lib/batch-approval.js.map +1 -0
- package/dist/lib/box/egress.d.ts +82 -0
- package/dist/lib/box/egress.js +264 -0
- package/dist/lib/box/egress.js.map +1 -0
- package/dist/lib/box/evidence.d.ts +86 -0
- package/dist/lib/box/evidence.js +121 -0
- package/dist/lib/box/evidence.js.map +1 -0
- package/dist/lib/box/job-server.d.ts +72 -0
- package/dist/lib/box/job-server.js +246 -0
- package/dist/lib/box/job-server.js.map +1 -0
- package/dist/lib/box/provisioner.d.ts +83 -0
- package/dist/lib/box/provisioner.js +312 -0
- package/dist/lib/box/provisioner.js.map +1 -0
- package/dist/lib/box/proxmox.d.ts +112 -0
- package/dist/lib/box/proxmox.js +211 -0
- package/dist/lib/box/proxmox.js.map +1 -0
- package/dist/lib/box/wire.d.ts +98 -0
- package/dist/lib/box/wire.js +70 -0
- package/dist/lib/box/wire.js.map +1 -0
- package/dist/lib/capture-lane.d.ts +6 -5
- package/dist/lib/capture-lane.js +6 -5
- package/dist/lib/capture-lane.js.map +1 -1
- package/dist/lib/capture-structure.d.ts +230 -11
- package/dist/lib/capture-structure.js +251 -13
- package/dist/lib/capture-structure.js.map +1 -1
- package/dist/lib/catalog-templates.d.ts +59 -0
- package/dist/lib/catalog-templates.js +126 -0
- package/dist/lib/catalog-templates.js.map +1 -0
- package/dist/lib/cli-build.d.ts +19 -0
- package/dist/lib/cli-build.js +37 -0
- package/dist/lib/cli-build.js.map +1 -0
- package/dist/lib/client-header.test.d.ts +1 -0
- package/dist/lib/client-header.test.js +85 -0
- package/dist/lib/client-header.test.js.map +1 -0
- package/dist/lib/conversation-headers.d.ts +33 -0
- package/dist/lib/conversation-headers.js +69 -0
- package/dist/lib/conversation-headers.js.map +1 -0
- package/dist/lib/cp-packages.d.ts +167 -11
- package/dist/lib/cp-packages.js +253 -21
- package/dist/lib/cp-packages.js.map +1 -1
- package/dist/lib/credential-class.d.ts +144 -0
- package/dist/lib/credential-class.js +138 -0
- package/dist/lib/credential-class.js.map +1 -0
- package/dist/lib/describe-lens.d.ts +35 -0
- package/dist/lib/describe-lens.js +40 -0
- package/dist/lib/describe-lens.js.map +1 -1
- package/dist/lib/device-connect.d.ts +125 -0
- package/dist/lib/device-connect.js +256 -0
- package/dist/lib/device-connect.js.map +1 -0
- package/dist/lib/directory-lens.d.ts +99 -0
- package/dist/lib/directory-lens.js +187 -0
- package/dist/lib/directory-lens.js.map +1 -0
- package/dist/lib/exporter-coverage.d.ts +71 -0
- package/dist/lib/exporter-coverage.js +97 -0
- package/dist/lib/exporter-coverage.js.map +1 -0
- package/dist/lib/goal-words.d.ts +38 -0
- package/dist/lib/goal-words.js +112 -0
- package/dist/lib/goal-words.js.map +1 -0
- package/dist/lib/hub-client.d.ts +57 -15
- package/dist/lib/hub-client.js +396 -82
- package/dist/lib/hub-client.js.map +1 -1
- package/dist/lib/init-connect.d.ts +41 -0
- package/dist/lib/init-connect.js +75 -0
- package/dist/lib/init-connect.js.map +1 -0
- package/dist/lib/init-exit.d.ts +24 -0
- package/dist/lib/init-exit.js +41 -0
- package/dist/lib/init-exit.js.map +1 -0
- package/dist/lib/init-flow.d.ts +25 -0
- package/dist/lib/init-flow.js +40 -0
- package/dist/lib/init-flow.js.map +1 -0
- package/dist/lib/init-handoff.d.ts +24 -0
- package/dist/lib/init-handoff.js +26 -0
- package/dist/lib/init-handoff.js.map +1 -0
- package/dist/lib/init-output.d.ts +18 -0
- package/dist/lib/init-output.js +43 -0
- package/dist/lib/init-output.js.map +1 -0
- package/dist/lib/init-pod.d.ts +45 -0
- package/dist/lib/init-pod.js +36 -0
- package/dist/lib/init-pod.js.map +1 -0
- package/dist/lib/installed.d.ts +210 -11
- package/dist/lib/installed.js +234 -36
- package/dist/lib/installed.js.map +1 -1
- package/dist/lib/key-approval.d.ts +57 -0
- package/dist/lib/key-approval.js +117 -0
- package/dist/lib/key-approval.js.map +1 -0
- package/dist/lib/key-diagnosis.d.ts +56 -0
- package/dist/lib/key-diagnosis.js +227 -0
- package/dist/lib/key-diagnosis.js.map +1 -0
- package/dist/lib/key-doctor.d.ts +136 -0
- package/dist/lib/key-doctor.js +286 -0
- package/dist/lib/key-doctor.js.map +1 -0
- package/dist/lib/key-locations.d.ts +120 -0
- package/dist/lib/key-locations.js +326 -0
- package/dist/lib/key-locations.js.map +1 -0
- package/dist/lib/key-source.d.ts +68 -0
- package/dist/lib/key-source.js +109 -0
- package/dist/lib/key-source.js.map +1 -0
- package/dist/lib/key-state.d.ts +70 -0
- package/dist/lib/key-state.js +115 -0
- package/dist/lib/key-state.js.map +1 -0
- package/dist/lib/kind-package.d.ts +181 -0
- package/dist/lib/kind-package.js +679 -0
- package/dist/lib/kind-package.js.map +1 -0
- package/dist/lib/knowledge-title.d.ts +25 -0
- package/dist/lib/knowledge-title.js +47 -0
- package/dist/lib/knowledge-title.js.map +1 -0
- package/dist/lib/knowledge-title.test.d.ts +1 -0
- package/dist/lib/knowledge-title.test.js +34 -0
- package/dist/lib/knowledge-title.test.js.map +1 -0
- package/dist/lib/machine-instance.d.ts +64 -0
- package/dist/lib/machine-instance.js +142 -0
- package/dist/lib/machine-instance.js.map +1 -0
- package/dist/lib/mcp-bridge.d.ts +49 -0
- package/dist/lib/mcp-bridge.js +180 -0
- package/dist/lib/mcp-bridge.js.map +1 -0
- package/dist/lib/mcp-bridge.test.d.ts +1 -0
- package/dist/lib/mcp-bridge.test.js +118 -0
- package/dist/lib/mcp-bridge.test.js.map +1 -0
- package/dist/lib/mcp-call.d.ts +30 -0
- package/dist/lib/mcp-call.js +107 -0
- package/dist/lib/mcp-call.js.map +1 -0
- package/dist/lib/mcp-snippets.d.ts +53 -0
- package/dist/lib/mcp-snippets.js +82 -0
- package/dist/lib/mcp-snippets.js.map +1 -0
- package/dist/lib/next-steps.d.ts +8 -0
- package/dist/lib/next-steps.js +31 -1
- package/dist/lib/next-steps.js.map +1 -1
- package/dist/lib/openclaw.js +3 -2
- package/dist/lib/openclaw.js.map +1 -1
- package/dist/lib/package-wire.d.ts +179 -0
- package/dist/lib/package-wire.js +68 -0
- package/dist/lib/package-wire.js.map +1 -0
- package/dist/lib/pair-link.d.ts +38 -0
- package/dist/lib/pair-link.js +68 -0
- package/dist/lib/pair-link.js.map +1 -0
- package/dist/lib/pod-moved.d.ts +70 -0
- package/dist/lib/pod-moved.js +146 -0
- package/dist/lib/pod-moved.js.map +1 -0
- package/dist/lib/pod-reach.d.ts +39 -0
- package/dist/lib/pod-reach.js +117 -0
- package/dist/lib/pod-reach.js.map +1 -0
- package/dist/lib/pod-reach.test.d.ts +1 -0
- package/dist/lib/pod-reach.test.js +67 -0
- package/dist/lib/pod-reach.test.js.map +1 -0
- package/dist/lib/pod-wide.d.ts +40 -0
- package/dist/lib/pod-wide.js +46 -0
- package/dist/lib/pod-wide.js.map +1 -0
- package/dist/lib/pod.d.ts +74 -112
- package/dist/lib/pod.js +146 -415
- package/dist/lib/pod.js.map +1 -1
- package/dist/lib/project-ref.d.ts +9 -3
- package/dist/lib/project-ref.js +10 -4
- package/dist/lib/project-ref.js.map +1 -1
- package/dist/lib/register-claude-code-mcp.test.d.ts +1 -0
- package/dist/lib/register-claude-code-mcp.test.js +78 -0
- package/dist/lib/register-claude-code-mcp.test.js.map +1 -0
- package/dist/lib/review-credential.d.ts +119 -0
- package/dist/lib/review-credential.js +149 -0
- package/dist/lib/review-credential.js.map +1 -0
- package/dist/lib/safe-open.d.ts +49 -0
- package/dist/lib/safe-open.js +119 -0
- package/dist/lib/safe-open.js.map +1 -0
- package/dist/lib/session-feed.d.ts +185 -0
- package/dist/lib/session-feed.js +257 -0
- package/dist/lib/session-feed.js.map +1 -0
- package/dist/lib/session-lens.d.ts +40 -1
- package/dist/lib/session-lens.js +54 -4
- package/dist/lib/session-lens.js.map +1 -1
- package/dist/lib/superwhisper-import.d.ts +8 -0
- package/dist/lib/superwhisper-import.js +14 -7
- package/dist/lib/superwhisper-import.js.map +1 -1
- package/dist/lib/superwhisper-title.test.d.ts +1 -0
- package/dist/lib/superwhisper-title.test.js +18 -0
- package/dist/lib/superwhisper-title.test.js.map +1 -0
- package/dist/lib/targets.d.ts +152 -10
- package/dist/lib/targets.js +974 -325
- package/dist/lib/targets.js.map +1 -1
- package/dist/lib/template-file.d.ts +4 -0
- package/dist/lib/template-file.js.map +1 -1
- package/dist/lib/template-lifecycle.d.ts +217 -0
- package/dist/lib/template-lifecycle.js +433 -0
- package/dist/lib/template-lifecycle.js.map +1 -0
- package/dist/lib/template-steps.d.ts +88 -0
- package/dist/lib/template-steps.js +118 -0
- package/dist/lib/template-steps.js.map +1 -0
- package/dist/lib/time-ago.d.ts +2 -0
- package/dist/lib/time-ago.js +15 -0
- package/dist/lib/time-ago.js.map +1 -0
- package/dist/lib/wake-hook-settings.d.ts +57 -0
- package/dist/lib/wake-hook-settings.js +153 -0
- package/dist/lib/wake-hook-settings.js.map +1 -0
- package/dist/lib/wake-state.d.ts +65 -0
- package/dist/lib/wake-state.js +122 -0
- package/dist/lib/wake-state.js.map +1 -0
- package/dist/utils/logger.js +5 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +26 -17
- package/skills/README.md +13 -11
- package/skills/agent-os/SKILL.md +214 -99
- package/skills/manifest.json +1 -1
- package/skills/onboard/SKILL.md +55 -26
- package/skills/synap/README.md +5 -8
- package/skills/synap/SKILL.md +1149 -289
- package/skills/synap/_order.txt +7 -0
- package/skills/synap/_skill.yaml +1 -1
- package/skills/synap/automations.md +15 -0
- package/skills/synap/capture.md +5 -0
- package/skills/synap/cli-operations.md +24 -18
- package/skills/synap/code-skills.md +70 -0
- package/skills/synap/concepts.md +36 -0
- package/skills/synap/content-os.md +10 -1
- package/skills/synap/creative-loop.md +15 -10
- package/skills/synap/crm.md +21 -52
- package/skills/synap/document-embeds.md +143 -47
- package/skills/synap/escalation-ladder.md +20 -10
- package/skills/synap/focus-sessions.md +56 -21
- package/skills/synap/from-intent.md +158 -0
- package/skills/synap/governance-rules.md +5 -5
- package/skills/synap/governance.md +10 -7
- package/skills/synap/hand-off.md +33 -0
- package/skills/synap/inline-patterns.md +15 -7
- package/skills/synap/lenses.md +34 -16
- package/skills/synap/linking.md +42 -41
- package/skills/synap/mcp-remote-servers.md +64 -0
- package/skills/synap/mental-model.md +17 -15
- package/skills/synap/operating-mode-rules.md +2 -2
- package/skills/synap/processes.md +118 -0
- package/skills/synap/quick-reference.md +7 -2
- package/skills/synap/reading.md +3 -1
- package/skills/synap/reflexes.md +12 -42
- package/skills/synap/viewframe-cells.md +38 -5
- package/skills/synap/work-flow.md +1 -1
- package/skills/synap/work-model.md +110 -0
- package/skills/synap/worked-examples.md +4 -5
- package/skills/synap/workspace-design.md +15 -11
- package/skills/synap/writes.md +105 -25
- package/skills/synap/writing-titles.md +63 -0
- package/skills/synap-app/SKILL.md +149 -67
- package/skills/synap-app/_skill.yaml +1 -1
- package/skills/synap-app/creating-the-base-app.md +12 -7
- package/skills/synap-app/governance.md +27 -16
- package/skills/synap-app/install-commands.md +18 -9
- package/skills/synap-app/overview.md +16 -9
- package/skills/synap-app/using-the-sdk.md +75 -25
- package/skills/synap-design/SKILL.md +474 -0
- package/skills/synap-design/_order.txt +4 -0
- package/skills/synap-design/_skill.yaml +21 -0
- package/skills/synap-design/loop.md +134 -0
- package/skills/synap-design/overview.md +44 -0
- package/skills/synap-design/principles.md +130 -0
- package/skills/synap-design/system.md +133 -0
- package/skills/synap-market/SKILL.md +306 -16
- package/skills/synap-market/_skill.yaml +1 -1
- package/skills/synap-market/author-and-publish.md +145 -8
- package/skills/synap-market/governance-and-catalog.md +7 -0
- package/skills/synap-market/install.md +79 -1
- package/skills/synap-market/overview.md +74 -6
- package/skills/synap-schema/SKILL.md +172 -10
- package/skills/synap-schema/_order.txt +2 -0
- package/skills/synap-schema/_skill.yaml +4 -2
- package/skills/synap-schema/common-mistakes.md +4 -2
- package/skills/synap-schema/discover-profiles.md +1 -1
- package/skills/synap-schema/entity-scope.md +15 -3
- package/skills/synap-schema/extend-first.md +29 -0
- package/skills/synap-schema/extend-vs-create.md +1 -1
- package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
- package/skills/synap-schema/property-types.md +1 -1
- package/skills/synap-schema/relations.md +1 -1
- package/skills/synap-ui/SKILL.md +19 -12
- package/skills/synap-ui/_skill.yaml +1 -1
- package/skills/synap-ui/ai-companion.md +1 -1
- package/skills/synap-ui/arranging-bento.md +2 -0
- package/skills/synap-ui/bento-layouts.md +10 -10
- package/skills/synap-ui/bento-recipes.md +313 -543
- package/skills/synap-ui/four-builds.md +5 -0
- package/skills/synap-ui/view-types.md +2 -2
- package/skills/synap-ui/widget-catalog.md +22 -278
- package/templates/automations/bookmark-enrichment.automation.json +290 -13
- package/templates/automations/url-bookmark-capture.automation.json +73 -11
- package/templates/box/runner.py +206 -0
- package/templates/skills/authoring-playbooks/SKILL.md +6 -3
- package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
- package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
- package/dist/commands/infra.d.ts +0 -21
- package/dist/commands/infra.js +0 -262
- package/dist/commands/infra.js.map +0 -1
- package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
- package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
- package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
- package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
- package/node_modules/@synap/hub-rest-client/package.json +0 -45
- package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
- package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
- package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
- package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
- package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
|
@@ -1,1299 +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
|
-
/** Short, server-generated summary suitable for lists and agent context. */
|
|
32
|
-
preview?: string | null;
|
|
33
|
-
/** Optional long-form summary returned by entity detail routes. */
|
|
34
|
-
description?: string | null;
|
|
35
|
-
/** Linked versioned document, when this entity has long-form content. */
|
|
36
|
-
documentId?: string | null;
|
|
37
|
-
/** System-managed fields returned by the canonical entity wire codec. */
|
|
38
|
-
systemData?: Record<string, unknown>;
|
|
39
|
-
version?: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface HubDocument {
|
|
43
|
-
id: string;
|
|
44
|
-
title: string;
|
|
45
|
-
content: string;
|
|
46
|
-
workspaceId: string | null;
|
|
47
|
-
createdAt: string;
|
|
48
|
-
updatedAt: string;
|
|
49
|
-
userId?: string;
|
|
50
|
-
type?: "text" | "markdown" | "code" | "html" | "pdf" | "docx";
|
|
51
|
-
language?: string | null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface HubChannel {
|
|
55
|
-
id: string;
|
|
56
|
-
name: string;
|
|
57
|
-
type:
|
|
58
|
-
"personal" | "thread" | "sub_thread" | "feed" | "external" | "agent_collab";
|
|
59
|
-
workspaceId: string | null;
|
|
60
|
-
agentType?: string;
|
|
61
|
-
contextObjectType?:
|
|
62
|
-
| "workspace"
|
|
63
|
-
| "entity"
|
|
64
|
-
| "document"
|
|
65
|
-
| "view"
|
|
66
|
-
| "project"
|
|
67
|
-
| "task"
|
|
68
|
-
| "user"
|
|
69
|
-
| "external"
|
|
70
|
-
| null;
|
|
71
|
-
contextObjectId?: string | null;
|
|
72
|
-
createdAt: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface HubWorkspace {
|
|
76
|
-
id: string;
|
|
77
|
-
name: string;
|
|
78
|
-
role?: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** GET /api/hub/workspaces — canonical Hub Protocol shape (not `data`). */
|
|
82
|
-
export interface HubWorkspacesListResponse {
|
|
83
|
-
workspaces: HubWorkspace[];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** GET /api/hub/users/me returns at least `id` (and `scopes`); email may be omitted. */
|
|
87
|
-
export interface HubUser {
|
|
88
|
-
id: string;
|
|
89
|
-
email?: string;
|
|
90
|
-
name?: string;
|
|
91
|
-
scopes?: string[];
|
|
92
|
-
/** True only when the server authenticated this request as an agent credential. */
|
|
93
|
-
isAgent: boolean;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface HubMemoryResult {
|
|
97
|
-
id: string;
|
|
98
|
-
content: string;
|
|
99
|
-
score?: number;
|
|
100
|
-
createdAt: string;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// ─── Response wrappers ───────────────────────────────────────────────────────
|
|
104
|
-
|
|
105
|
-
export interface HubListResponse<T> {
|
|
106
|
-
data: T[];
|
|
107
|
-
total?: number;
|
|
108
|
-
hasMore?: boolean;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface HubSingleResponse<T> {
|
|
112
|
-
data: T;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// ─── Input types ─────────────────────────────────────────────────────────────
|
|
116
|
-
|
|
117
|
-
export interface CreateEntityInput {
|
|
118
|
-
profileSlug: string;
|
|
119
|
-
title: string;
|
|
120
|
-
workspaceId?: string;
|
|
121
|
-
/** Existing project to file this entity into via `belongs_to_project`. */
|
|
122
|
-
projectId?: string;
|
|
123
|
-
/** Short description rendered with the entity; long-form text belongs in content. */
|
|
124
|
-
description?: string;
|
|
125
|
-
properties?: Record<string, unknown>;
|
|
126
|
-
content?: string;
|
|
127
|
-
url?: string;
|
|
128
|
-
status?: string;
|
|
129
|
-
priority?: "low" | "medium" | "high" | "urgent";
|
|
130
|
-
dueDate?: string;
|
|
131
|
-
// Agent attribution — the IS threads these so writes are recorded as agent
|
|
132
|
-
// actions (governance/provenance); the CLI omits them. The backend reads them
|
|
133
|
-
// from the body (sessionId is also accepted via the x-session-id header).
|
|
134
|
-
agentUserId?: string;
|
|
135
|
-
sessionId?: string;
|
|
136
|
-
reasoning?: string;
|
|
137
|
-
/** Origin signal for audit/provenance. It does not grant permissions. */
|
|
138
|
-
source?: HubWriteSource;
|
|
139
|
-
sourceMessageId?: string;
|
|
140
|
-
extractedFromMessageId?: string;
|
|
141
|
-
/** Role profiles to attach with this entity when the write applies inline. */
|
|
142
|
-
facets?: Array<{
|
|
143
|
-
/** `profileSlug` is accepted by REST; `slug` remains valid for legacy callers. */
|
|
144
|
-
profileSlug?: string;
|
|
145
|
-
slug?: string;
|
|
146
|
-
status?: string;
|
|
147
|
-
properties?: Record<string, unknown>;
|
|
148
|
-
contextEntityId?: string;
|
|
149
|
-
}>;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export interface UpdateEntityInput {
|
|
153
|
-
title?: string;
|
|
154
|
-
properties?: Record<string, unknown>;
|
|
155
|
-
content?: string;
|
|
156
|
-
url?: string;
|
|
157
|
-
status?: string;
|
|
158
|
-
priority?: "low" | "medium" | "high" | "urgent";
|
|
159
|
-
dueDate?: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface CreateDocumentInput {
|
|
163
|
-
title: string;
|
|
164
|
-
content?: string;
|
|
165
|
-
workspaceId?: string;
|
|
166
|
-
entityId?: string;
|
|
167
|
-
type?: HubDocument["type"];
|
|
168
|
-
reasoning?: string;
|
|
169
|
-
agentUserId?: string;
|
|
170
|
-
sourceMessageId?: string;
|
|
171
|
-
sessionId?: string;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/** Full-document replacement input for PATCH /documents/:id. */
|
|
175
|
-
export interface UpdateDocumentInput {
|
|
176
|
-
content: string;
|
|
177
|
-
title?: string;
|
|
178
|
-
agentUserId?: string;
|
|
179
|
-
sourceMessageId?: string;
|
|
180
|
-
sessionId?: string;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface HubDocumentChange {
|
|
184
|
-
op: "insert" | "delete" | "replace";
|
|
185
|
-
position?: number;
|
|
186
|
-
range?: [number, number];
|
|
187
|
-
text?: string;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/** Submit a governed edit proposal without replacing a document directly. */
|
|
191
|
-
export interface CreateDocumentProposalInput {
|
|
192
|
-
documentId: string;
|
|
193
|
-
agentUserId?: string;
|
|
194
|
-
threadId?: string;
|
|
195
|
-
sourceMessageId?: string;
|
|
196
|
-
sessionId?: string;
|
|
197
|
-
proposalType?: "ai_edit" | "user_suggestion" | "review_comment";
|
|
198
|
-
changes: HubDocumentChange[];
|
|
199
|
-
proposedContent: string;
|
|
200
|
-
originalContent?: string;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/** Proposal rows vary slightly by pod version; these stable fields are shared. */
|
|
204
|
-
export interface HubDocumentProposalResult {
|
|
205
|
-
id?: string;
|
|
206
|
-
proposalId?: string;
|
|
207
|
-
status?: string;
|
|
208
|
-
reviewUrl?: string;
|
|
209
|
-
[key: string]: unknown;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface StoreMemoryInput {
|
|
213
|
-
fact: string;
|
|
214
|
-
context?: string;
|
|
215
|
-
workspaceId?: string;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export interface SendToChannelInput {
|
|
219
|
-
channelId: string;
|
|
220
|
-
content: string;
|
|
221
|
-
/** Defaults to the authenticated user (GET /users/me). */
|
|
222
|
-
userId?: string;
|
|
223
|
-
role?: "system" | "assistant" | "user";
|
|
224
|
-
/** When true, may queue an IS response on AI-active threads (server-side). */
|
|
225
|
-
autoRespond?: boolean;
|
|
226
|
-
workspaceId?: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ─── Setup types ─────────────────────────────────────────────────────────────
|
|
230
|
-
|
|
231
|
-
export interface AgentSetupResult {
|
|
232
|
-
hubApiKey: string;
|
|
233
|
-
agentUserId: string;
|
|
234
|
-
workspaceId: string;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export interface PodStatus {
|
|
238
|
-
url: string;
|
|
239
|
-
healthy: boolean;
|
|
240
|
-
version?: string;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// ─── Capture pipeline types ───────────────────────────────────────────────────
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* A single tappable chip in a structured follow-up. Mirrors the IS `structure`
|
|
247
|
-
* output and the frontend capture-pipeline contract EXACTLY (do NOT narrow).
|
|
248
|
-
*/
|
|
249
|
-
export interface FollowUpChip {
|
|
250
|
-
label: string;
|
|
251
|
-
value: string;
|
|
252
|
-
action:
|
|
253
|
-
"link_entity" | "set_property" | "add_relation" | "confirm" | "dismiss";
|
|
254
|
-
icon?: string;
|
|
255
|
-
entityId?: string;
|
|
256
|
-
propertyKey?: string;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/** Structured follow-up the IS may emit instead of a plain string question. */
|
|
260
|
-
export interface StructuredFollowUp {
|
|
261
|
-
question: string;
|
|
262
|
-
suggestions: FollowUpChip[];
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/** One field of an AI-authored dynamic form. `type` is a free string (field kind). */
|
|
266
|
-
export interface DynamicFormField {
|
|
267
|
-
key: string;
|
|
268
|
-
label: string;
|
|
269
|
-
type: string;
|
|
270
|
-
constraints?: {
|
|
271
|
-
enum?: string[];
|
|
272
|
-
min?: number;
|
|
273
|
-
max?: number;
|
|
274
|
-
pattern?: string;
|
|
275
|
-
};
|
|
276
|
-
required?: boolean;
|
|
277
|
-
help?: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/** AI-authored guided-capture form spec (additive, null-safe). */
|
|
281
|
-
export interface DynamicFormSpec {
|
|
282
|
-
title?: string;
|
|
283
|
-
note?: string;
|
|
284
|
-
fields: DynamicFormField[];
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export interface CaptureProposal {
|
|
288
|
-
tempId: string;
|
|
289
|
-
profileSlug: string;
|
|
290
|
-
title: string;
|
|
291
|
-
description?: string;
|
|
292
|
-
/** Long-form body preserved through plan → commit as a linked document. */
|
|
293
|
-
content?: string;
|
|
294
|
-
properties?: Record<string, unknown>;
|
|
295
|
-
/** Role profiles proposed alongside the primary kind. */
|
|
296
|
-
facets?: Array<{
|
|
297
|
-
profileSlug: string;
|
|
298
|
-
status?: string;
|
|
299
|
-
properties?: Record<string, unknown>;
|
|
300
|
-
/** Batch-local entity reference used by captureExecute. */
|
|
301
|
-
contextTempId?: string;
|
|
302
|
-
}>;
|
|
303
|
-
confidence: number;
|
|
304
|
-
action: "create" | "link" | "dismiss";
|
|
305
|
-
linkedEntityId?: string;
|
|
306
|
-
linkedEntityTitle?: string;
|
|
307
|
-
dedupCandidates?: Array<{
|
|
308
|
-
entityId: string;
|
|
309
|
-
title: string;
|
|
310
|
-
profileSlug: string;
|
|
311
|
-
score: number;
|
|
312
|
-
}>;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export interface CaptureRelation {
|
|
316
|
-
sourceTempId: string;
|
|
317
|
-
targetTempId: string;
|
|
318
|
-
relationType: string;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export interface CaptureStructureResponse {
|
|
322
|
-
proposals: CaptureProposal[];
|
|
323
|
-
relations: CaptureRelation[];
|
|
324
|
-
/** The intelligence service was unavailable, so the pod returned a raw-note fallback. */
|
|
325
|
-
degraded?: boolean;
|
|
326
|
-
followUp: string | StructuredFollowUp | null;
|
|
327
|
-
formSpec?: DynamicFormSpec | null;
|
|
328
|
-
targetWorkspaceId?: string | null;
|
|
329
|
-
targetWorkspaceConfidence?: number | null;
|
|
330
|
-
targetWorkspaceReason?: string | null;
|
|
331
|
-
targetProjectId?: string | null;
|
|
332
|
-
/**
|
|
333
|
-
* Soft meta-structure suggestions (display-only chips). Never materialize.
|
|
334
|
-
* Additive — absent when the model has nothing to suggest.
|
|
335
|
-
*/
|
|
336
|
-
architectureSuggestions?: Array<{
|
|
337
|
-
kind?:
|
|
338
|
-
| "workspace_template"
|
|
339
|
-
| "new_workspace"
|
|
340
|
-
| "project"
|
|
341
|
-
| "view"
|
|
342
|
-
| "role"
|
|
343
|
-
| "playbook";
|
|
344
|
-
title: string;
|
|
345
|
-
reason?: string;
|
|
346
|
-
confidence?: number;
|
|
347
|
-
payload?: Record<string, unknown>;
|
|
348
|
-
}>;
|
|
349
|
-
dedupCandidates?: Record<
|
|
350
|
-
string,
|
|
351
|
-
Array<{
|
|
352
|
-
entityId: string;
|
|
353
|
-
title: string;
|
|
354
|
-
profileSlug: string;
|
|
355
|
-
score: number;
|
|
356
|
-
}>
|
|
357
|
-
>;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export interface CaptureExecuteInput {
|
|
361
|
-
entities: Array<{
|
|
362
|
-
tempId: string;
|
|
363
|
-
profileSlug: string;
|
|
364
|
-
title: string;
|
|
365
|
-
description?: string;
|
|
366
|
-
properties?: Record<string, unknown>;
|
|
367
|
-
/** Legacy structure-output field; the execute route ignores it. */
|
|
368
|
-
action?: "create" | "link" | "dismiss";
|
|
369
|
-
linkedEntityId?: string;
|
|
370
|
-
confidence?: number;
|
|
371
|
-
/** Long-form body materialized as a linked document by the capture pipeline. */
|
|
372
|
-
content?: string;
|
|
373
|
-
/** Reuse an existing entity instead of creating one for this batch entry. */
|
|
374
|
-
existingEntityId?: string;
|
|
375
|
-
/** Role profiles to attach after the primary kind materializes. */
|
|
376
|
-
facets?: Array<{
|
|
377
|
-
profileSlug: string;
|
|
378
|
-
status?: string;
|
|
379
|
-
properties?: Record<string, unknown>;
|
|
380
|
-
contextTempId?: string;
|
|
381
|
-
}>;
|
|
382
|
-
}>;
|
|
383
|
-
relations?: CaptureRelation[];
|
|
384
|
-
/** Cross-cutting project lens to file the created entities into. */
|
|
385
|
-
projectId?: string | null;
|
|
386
|
-
/** Explicit reviewed placement override; unlike workspaceId it is never inferred. */
|
|
387
|
-
targetWorkspaceId?: string | null;
|
|
388
|
-
/** Preserve the original binary source with the primary derived entity. */
|
|
389
|
-
keepRaw?: boolean;
|
|
390
|
-
file?: {
|
|
391
|
-
/** Base64 payload; server caps it at about 5MB decoded. */
|
|
392
|
-
content: string;
|
|
393
|
-
mimeType: string;
|
|
394
|
-
filename?: string;
|
|
395
|
-
};
|
|
396
|
-
/** Client-stable retry namespace for this capture execution. */
|
|
397
|
-
idempotencyKey?: string;
|
|
398
|
-
/**
|
|
399
|
-
* Workspace routing (shared across all capture doors). Forward the AI's
|
|
400
|
-
* structure hints + the caller's mode so the door auto-routes; the backend
|
|
401
|
-
* decides the final workspace (auto/ask/locked, confidence + membership gated).
|
|
402
|
-
*/
|
|
403
|
-
workspaceRouting?: "auto" | "ask" | "locked";
|
|
404
|
-
aiWorkspaceId?: string | null;
|
|
405
|
-
aiWorkspaceConfidence?: number | null;
|
|
406
|
-
aiWorkspaceReason?: string | null;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/** One planned entity in the proposal-first graph capture door. */
|
|
410
|
-
export interface CaptureGraphEntity {
|
|
411
|
-
/** Batch-local ID used by relations and bindings. Must be unique per request. */
|
|
412
|
-
ref: string;
|
|
413
|
-
profileSlug: string;
|
|
414
|
-
title?: string;
|
|
415
|
-
/** Short descriptive body retained on the approved entity. */
|
|
416
|
-
description?: string;
|
|
417
|
-
/** Long-form body materialized through the canonical document path on approval. */
|
|
418
|
-
content?: string;
|
|
419
|
-
properties?: Record<string, unknown>;
|
|
420
|
-
/** Link this graph node to an existing entity rather than creating it. */
|
|
421
|
-
existingEntityId?: string;
|
|
422
|
-
/** Role profiles to attach after the primary kind materializes. */
|
|
423
|
-
facets?: Array<{
|
|
424
|
-
profileSlug: string;
|
|
425
|
-
status?: string;
|
|
426
|
-
properties?: Record<string, unknown>;
|
|
427
|
-
contextRef?: string;
|
|
428
|
-
}>;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
export interface CaptureGraphRelation {
|
|
432
|
-
sourceRef: string;
|
|
433
|
-
targetRef: string;
|
|
434
|
-
type: string;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/** Optional post-approval external-channel binding for an entity in the graph. */
|
|
438
|
-
export interface CaptureGraphBinding {
|
|
439
|
-
externalChannelId: string;
|
|
440
|
-
entityRef: string;
|
|
441
|
-
branchPurpose?: "client-comms" | "team";
|
|
442
|
-
title?: string;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
/**
|
|
446
|
-
* Bounded original-input context retained in proposal data for review/retry.
|
|
447
|
-
* It is deliberately not a materialized source artifact or entity provenance.
|
|
448
|
-
*/
|
|
449
|
-
export interface CaptureGraphRawSource {
|
|
450
|
-
rawText?: string;
|
|
451
|
-
sourceUrl?: string;
|
|
452
|
-
label?: string;
|
|
453
|
-
mimeType?: string;
|
|
454
|
-
hash?: string;
|
|
455
|
-
idempotencyKey?: string;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/** Input for POST /capture/graph. The server always creates one composite proposal. */
|
|
459
|
-
export interface SubmitCaptureGraphInput {
|
|
460
|
-
workspaceId?: string | null;
|
|
461
|
-
/** Existing project to file every newly created graph entity into on approval. */
|
|
462
|
-
projectId?: string | null;
|
|
463
|
-
/** Origin signal preserved through proposal approval and materialization. */
|
|
464
|
-
source?: HubWriteSource;
|
|
465
|
-
sourceMessageId?: string;
|
|
466
|
-
sessionId?: string;
|
|
467
|
-
rawSource?: CaptureGraphRawSource;
|
|
468
|
-
entities: CaptureGraphEntity[];
|
|
469
|
-
relations?: CaptureGraphRelation[];
|
|
470
|
-
bindings?: CaptureGraphBinding[];
|
|
471
|
-
summary?: string;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
export interface SubmitCaptureGraphResult {
|
|
475
|
-
/** Composite graph writes are proposal-first, so this receipt begins pending. */
|
|
476
|
-
writeReceipt?: HubWriteReceipt;
|
|
477
|
-
proposalId?: string;
|
|
478
|
-
entityCount: number;
|
|
479
|
-
relationCount: number;
|
|
480
|
-
bindingCount: number;
|
|
481
|
-
reviewUrl?: string;
|
|
482
|
-
summary: string;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export interface CaptureExecuteResponse {
|
|
486
|
-
created: Array<{
|
|
487
|
-
tempId: string;
|
|
488
|
-
entityId: string;
|
|
489
|
-
profileSlug: string;
|
|
490
|
-
linked: boolean;
|
|
491
|
-
}>;
|
|
492
|
-
relations: Array<{
|
|
493
|
-
sourceTempId: string;
|
|
494
|
-
targetTempId: string;
|
|
495
|
-
relationType: string;
|
|
496
|
-
}>;
|
|
497
|
-
/** Set when AUTO routing moved the capture to the AI-resolved workspace. */
|
|
498
|
-
movedToWorkspace?: string;
|
|
499
|
-
/** Set in ASK mode — a suggested switch for the surface to confirm. */
|
|
500
|
-
pendingWorkspaceSwitch?: {
|
|
501
|
-
suggestedWorkspaceId: string;
|
|
502
|
-
reason: string | null;
|
|
503
|
-
confidence: number | null;
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
// ─── Recall (ask) ──────────────────────────────────────────────────────────────
|
|
508
|
-
|
|
509
|
-
/** One substrate's slice of an `ask` answer (semantic / procedural / episodic). */
|
|
510
|
-
export interface AskAnswerBlock {
|
|
511
|
-
substrate: string;
|
|
512
|
-
items: Array<Record<string, unknown>>;
|
|
513
|
-
status: "ok" | "error";
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* The provenance-tagged result of `ask` — glass-box: it says which substrates
|
|
518
|
-
* were queried (`routedTo`), what the query's cue suggested (`intent`), and the
|
|
519
|
-
* per-substrate answer blocks. Shape mirrors the backend `AskResult`.
|
|
520
|
-
*/
|
|
521
|
-
export interface AskResponse {
|
|
522
|
-
query: string;
|
|
523
|
-
routedTo: string[];
|
|
524
|
-
intent: string;
|
|
525
|
-
answers?: AskAnswerBlock[];
|
|
526
|
-
verdict?: string;
|
|
527
|
-
[key: string]: unknown;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
// ─── Relations & Graph ───────────────────────────────────────────────────────
|
|
531
|
-
|
|
532
|
-
export interface HubRelation {
|
|
533
|
-
id: string;
|
|
534
|
-
sourceEntityId: string;
|
|
535
|
-
targetEntityId: string;
|
|
536
|
-
type: string;
|
|
537
|
-
label?: string;
|
|
538
|
-
createdAt: string;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
export interface HubGraphNode extends HubEntity {
|
|
542
|
-
depth: number;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export interface HubGraphEdge {
|
|
546
|
-
sourceId: string;
|
|
547
|
-
targetId: string;
|
|
548
|
-
type: string;
|
|
549
|
-
label?: string;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
export interface HubGraphResult {
|
|
553
|
-
nodes: HubGraphNode[];
|
|
554
|
-
edges: HubGraphEdge[];
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* A single link returned by getConnections() across the local graph:
|
|
559
|
-
* - `"graph"` : an explicit row in the relations table
|
|
560
|
-
* - `"property"` : an inbound or outbound `entity_id` property edge
|
|
561
|
-
* - `"thread"` / `"context_channel"` : a channel that touched or is about this entity
|
|
562
|
-
* - `"focus_session"` : a session anchored to this entity
|
|
563
|
-
*/
|
|
564
|
-
export interface HubConnection {
|
|
565
|
-
entityId: string;
|
|
566
|
-
entity: HubEntity | null;
|
|
567
|
-
label: string;
|
|
568
|
-
direction: "outgoing" | "incoming" | "structural";
|
|
569
|
-
source: "graph" | "property" | "thread" | "context_channel" | "focus_session";
|
|
570
|
-
relationId?: string;
|
|
571
|
-
relationType?: string;
|
|
572
|
-
propertySlug?: string;
|
|
573
|
-
propertyLabel?: string;
|
|
574
|
-
channelId?: string;
|
|
575
|
-
channelRelationshipType?: string;
|
|
576
|
-
channelTitle?: string | null;
|
|
577
|
-
channelWorkspaceId?: string | null;
|
|
578
|
-
focusSessionId?: string;
|
|
579
|
-
focusSessionGoal?: string;
|
|
580
|
-
focusSessionStatus?: string;
|
|
581
|
-
focusSessionWorkspaceId?: string | null;
|
|
582
|
-
createdAt?: string | null;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
export interface HubConnectionsResult {
|
|
586
|
-
connections: HubConnection[];
|
|
587
|
-
counts: {
|
|
588
|
-
total: number;
|
|
589
|
-
graph: number;
|
|
590
|
-
structural: number;
|
|
591
|
-
threads: number;
|
|
592
|
-
contextChannels?: number;
|
|
593
|
-
focusSessions?: number;
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
// ─── Profiles & Property Defs ────────────────────────────────────────────────
|
|
598
|
-
|
|
599
|
-
export interface HubProfile {
|
|
600
|
-
id: string;
|
|
601
|
-
slug: string;
|
|
602
|
-
displayName: string;
|
|
603
|
-
description?: string;
|
|
604
|
-
entityScope: "pod" | "workspace";
|
|
605
|
-
parentSlug?: string;
|
|
606
|
-
icon?: string;
|
|
607
|
-
color?: string;
|
|
608
|
-
properties?: HubPropertyDef[];
|
|
609
|
-
/** Primary entity kind or attachable role/facet. Defaults to kind on old pods. */
|
|
610
|
-
profileKind?: "kind" | "role";
|
|
611
|
-
/** Kinds this role can be attached to; null means the pod did not constrain it. */
|
|
612
|
-
applicableKinds?: string[] | null;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
export interface HubPropertyDef {
|
|
616
|
-
id: string;
|
|
617
|
-
slug: string;
|
|
618
|
-
displayName: string;
|
|
619
|
-
type:
|
|
620
|
-
| "string"
|
|
621
|
-
| "number"
|
|
622
|
-
| "boolean"
|
|
623
|
-
| "date"
|
|
624
|
-
| "entity_id"
|
|
625
|
-
| "array"
|
|
626
|
-
| "object"
|
|
627
|
-
| "secret";
|
|
628
|
-
required?: boolean;
|
|
629
|
-
options?: string[];
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
// ─── Discover ────────────────────────────────────────────────────────────────
|
|
633
|
-
|
|
634
|
-
export interface HubDiscoverProperty {
|
|
635
|
-
slug: string;
|
|
636
|
-
displayName: string;
|
|
637
|
-
type: string;
|
|
638
|
-
options?: string[];
|
|
639
|
-
required?: boolean;
|
|
640
|
-
/** Default the validator applies when this property is omitted. */
|
|
641
|
-
defaultValue?: unknown;
|
|
642
|
-
/** Exact validation constraints used by the property validator. */
|
|
643
|
-
constraints?: Record<string, unknown>;
|
|
644
|
-
/** Target kind for an entity_id property, when configured. */
|
|
645
|
-
targetProfileSlug?: string;
|
|
646
|
-
/** Base definitions are always visible; workspace definitions require this lens. */
|
|
647
|
-
schemaScope?: "base" | "workspace";
|
|
648
|
-
workspaceId?: string | null;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
export interface HubDiscoverProfile {
|
|
652
|
-
slug: string;
|
|
653
|
-
displayName: string;
|
|
654
|
-
scope: "pod" | "workspace";
|
|
655
|
-
description?: string | null;
|
|
656
|
-
icon?: string | null;
|
|
657
|
-
/** Omitted by the summary tier. */
|
|
658
|
-
properties?: HubDiscoverProperty[];
|
|
659
|
-
/** Omitted by the summary tier. */
|
|
660
|
-
createCommand?: string;
|
|
661
|
-
profileKind?: "kind" | "role";
|
|
662
|
-
applicableKinds?: string[] | null;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
export interface HubDiscoverResult {
|
|
666
|
-
profiles: HubDiscoverProfile[];
|
|
667
|
-
commands: Record<string, string>;
|
|
668
|
-
hint: string;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/** Progressive-disclosure controls for GET /discover. */
|
|
672
|
-
export interface HubDiscoverOptions {
|
|
673
|
-
/**
|
|
674
|
-
* Omit to read the base/pod schema only. Supplying a workspace resolves only
|
|
675
|
-
* that workspace's overlays; callers must never substitute a default here.
|
|
676
|
-
*/
|
|
677
|
-
workspaceId?: string;
|
|
678
|
-
/** Return the digest tier without property schemas. */
|
|
679
|
-
summary?: boolean;
|
|
680
|
-
/** Limit full discovery to these profile slugs when the pod supports it. */
|
|
681
|
-
profileSlugs?: string[];
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
export type HubOrientScope = "workspaces" | "projects" | "profiles";
|
|
685
|
-
export type HubOrientDetail = "light" | "full";
|
|
686
|
-
|
|
687
|
-
export interface HubOrientProfile {
|
|
688
|
-
slug: string;
|
|
689
|
-
name: string;
|
|
690
|
-
profileKind: "kind" | "role";
|
|
691
|
-
applicableKinds?: string[] | null;
|
|
692
|
-
/** Placement for entities of this kind; distinct from profile visibility. */
|
|
693
|
-
entityScope?: "pod" | "workspace" | null;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
export interface HubOrientWorkspace {
|
|
697
|
-
id: string;
|
|
698
|
-
name: string;
|
|
699
|
-
domain: string | null;
|
|
700
|
-
entityCount: number;
|
|
701
|
-
onboarding?: Record<string, unknown>;
|
|
702
|
-
description?: string | null;
|
|
703
|
-
profiles?: HubOrientProfile[];
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
export interface HubOrientProject {
|
|
707
|
-
id: string;
|
|
708
|
-
name: string;
|
|
709
|
-
description: string | null;
|
|
710
|
-
status: string | null;
|
|
711
|
-
workspaceId: string | null;
|
|
712
|
-
homeWorkspace: string | null;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Prompt-facing team roster for a workspace (no emails). Present when the
|
|
717
|
-
* pinned/sample workspace has human members. Treat as internal — not contacts.
|
|
718
|
-
*/
|
|
719
|
-
export interface HubOrientTeamRoster {
|
|
720
|
-
instructionBlock: string | null;
|
|
721
|
-
names: string[];
|
|
722
|
-
members: Array<{ displayName: string; personId?: string | null }>;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
/** Canonical session bootstrap response shared by MCP, CLI, and REST surfaces. */
|
|
726
|
-
export interface HubOrientResult {
|
|
727
|
-
me: { userId: string; scopes: string[] };
|
|
728
|
-
detail: HubOrientDetail;
|
|
729
|
-
projects: HubOrientProject[];
|
|
730
|
-
projectCount: number;
|
|
731
|
-
workspaces: HubOrientWorkspace[];
|
|
732
|
-
workspaceCount: number;
|
|
733
|
-
profiles: HubOrientProfile[];
|
|
734
|
-
note: string;
|
|
735
|
-
/** Internal team for the pinned/sample workspace — omitted when empty. */
|
|
736
|
-
teamRoster?: HubOrientTeamRoster;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
export interface HubOrientOptions {
|
|
740
|
-
detail?: HubOrientDetail;
|
|
741
|
-
scope?: HubOrientScope[];
|
|
742
|
-
workspaceId?: string;
|
|
743
|
-
projectId?: string;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// ─── Threads & Channels ──────────────────────────────────────────────────────
|
|
747
|
-
|
|
748
|
-
export interface HubThread {
|
|
749
|
-
id: string;
|
|
750
|
-
name?: string;
|
|
751
|
-
type:
|
|
752
|
-
"personal" | "thread" | "sub_thread" | "feed" | "external" | "agent_collab";
|
|
753
|
-
workspaceId?: string;
|
|
754
|
-
agentType?: string;
|
|
755
|
-
contextObjectType?:
|
|
756
|
-
| "workspace"
|
|
757
|
-
| "entity"
|
|
758
|
-
| "document"
|
|
759
|
-
| "view"
|
|
760
|
-
| "project"
|
|
761
|
-
| "task"
|
|
762
|
-
| "user"
|
|
763
|
-
| "external";
|
|
764
|
-
contextObjectId?: string;
|
|
765
|
-
parentChannelId?: string;
|
|
766
|
-
linkedEntityIds?: string[];
|
|
767
|
-
linkedDocumentIds?: string[];
|
|
768
|
-
createdAt: string;
|
|
769
|
-
updatedAt: string;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
export interface HubMessage {
|
|
773
|
-
id: string;
|
|
774
|
-
content: string;
|
|
775
|
-
role: "user" | "assistant" | "system";
|
|
776
|
-
userId?: string;
|
|
777
|
-
createdAt: string;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
export interface HubThreadContext {
|
|
781
|
-
thread: HubThread;
|
|
782
|
-
messages: HubMessage[];
|
|
783
|
-
linkedEntities: HubEntity[];
|
|
784
|
-
linkedDocuments: HubDocument[];
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
// ─── Proposals ───────────────────────────────────────────────────────────────
|
|
788
|
-
|
|
789
|
-
export interface HubProposal {
|
|
790
|
-
id: string;
|
|
791
|
-
status: "pending" | "approved" | "rejected";
|
|
792
|
-
action: "create" | "update" | "delete";
|
|
793
|
-
subjectType: string;
|
|
794
|
-
data: Record<string, unknown>;
|
|
795
|
-
reason?: string;
|
|
796
|
-
createdAt: string;
|
|
797
|
-
reviewedAt?: string;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
// ─── Views ───────────────────────────────────────────────────────────────────
|
|
801
|
-
|
|
802
|
-
export interface HubView {
|
|
803
|
-
id: string;
|
|
804
|
-
name: string;
|
|
805
|
-
type:
|
|
806
|
-
| "table"
|
|
807
|
-
| "kanban"
|
|
808
|
-
| "list"
|
|
809
|
-
| "grid"
|
|
810
|
-
| "gallery"
|
|
811
|
-
| "calendar"
|
|
812
|
-
| "timeline"
|
|
813
|
-
| "graph"
|
|
814
|
-
| "bento"
|
|
815
|
-
| string;
|
|
816
|
-
profileSlug?: string;
|
|
817
|
-
workspaceId?: string;
|
|
818
|
-
config?: Record<string, unknown>;
|
|
819
|
-
metadata?: Record<string, unknown>;
|
|
820
|
-
profileId?: string | null;
|
|
821
|
-
userId?: string;
|
|
822
|
-
createdAt: string;
|
|
823
|
-
updatedAt: string;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
// ─── Search ───────────────────────────────────────────────────────────────────
|
|
827
|
-
|
|
828
|
-
export interface HubSearchResult {
|
|
829
|
-
entities: HubEntity[];
|
|
830
|
-
documents: HubDocument[];
|
|
831
|
-
total: number;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
// ─── Commands ────────────────────────────────────────────────────────────────
|
|
835
|
-
|
|
836
|
-
export interface HubCommand {
|
|
837
|
-
id: string;
|
|
838
|
-
name: string;
|
|
839
|
-
slug: string;
|
|
840
|
-
description?: string;
|
|
841
|
-
workspaceId?: string;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
// ─── Agent Users ─────────────────────────────────────────────────────────────
|
|
845
|
-
|
|
846
|
-
export interface HubAgentUser {
|
|
847
|
-
id: string;
|
|
848
|
-
name: string;
|
|
849
|
-
agentType?: string;
|
|
850
|
-
workspaceId?: string;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
// ─── User Context ─────────────────────────────────────────────────────────────
|
|
854
|
-
|
|
855
|
-
export interface HubUserContext {
|
|
856
|
-
recentEntities: HubEntity[];
|
|
857
|
-
activeThreads: HubThread[];
|
|
858
|
-
workspaceSummary?: Record<string, unknown>;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
// ─── Governance ───────────────────────────────────────────────────────────────
|
|
862
|
-
|
|
863
|
-
export type HubWriteSource =
|
|
864
|
-
| "intelligence"
|
|
865
|
-
| "agent"
|
|
866
|
-
| "openwebui-pipeline"
|
|
867
|
-
| "extension"
|
|
868
|
-
| "cli"
|
|
869
|
-
| "n8n"
|
|
870
|
-
| "raycast";
|
|
871
|
-
|
|
872
|
-
/**
|
|
873
|
-
* Truthful outcome envelope shared by direct and proposal-first write doors.
|
|
874
|
-
* `partial` means independently-applied sub-operations failed; it never
|
|
875
|
-
* implies an atomic rollback.
|
|
876
|
-
*/
|
|
877
|
-
export interface HubWriteReceipt {
|
|
878
|
-
state: "pending" | "applied" | "partial";
|
|
879
|
-
proposalId?: string;
|
|
880
|
-
reviewUrl?: string;
|
|
881
|
-
entityId?: string;
|
|
882
|
-
proposedEntityId?: string;
|
|
883
|
-
profileSlug?: string;
|
|
884
|
-
effectiveWorkspaceId?: string | null;
|
|
885
|
-
projectId?: string;
|
|
886
|
-
source?: HubWriteSource;
|
|
887
|
-
facets?: Array<{
|
|
888
|
-
slug: string;
|
|
889
|
-
outcome: "attached" | "proposed" | "dropped" | "error" | string;
|
|
890
|
-
facetId?: string;
|
|
891
|
-
proposalId?: string;
|
|
892
|
-
error?: string;
|
|
893
|
-
}>;
|
|
894
|
-
warnings?: string[];
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
export interface HubGovernanceResult {
|
|
898
|
-
/** `created` is an inline, materialized write; `proposed` remains pending. */
|
|
899
|
-
status: "approved" | "created" | "proposed" | "denied";
|
|
900
|
-
id?: string;
|
|
901
|
-
proposalId?: string;
|
|
902
|
-
reason?: string;
|
|
903
|
-
message?: string;
|
|
904
|
-
/**
|
|
905
|
-
* Short human-readable summary of what was proposed. Present on `proposed`
|
|
906
|
-
* responses. Example: `Delete task "Q2 plan review"`.
|
|
907
|
-
*/
|
|
908
|
-
summary?: string;
|
|
909
|
-
/**
|
|
910
|
-
* Reasoning — echoed from the AI's rationale or the policy's explanation
|
|
911
|
-
* of why review is needed. Present on `proposed` responses.
|
|
912
|
-
*/
|
|
913
|
-
reasoning?: string;
|
|
914
|
-
/**
|
|
915
|
-
* Pod-relative path into the app: `/open/{id}`.
|
|
916
|
-
* Present on `proposed` responses.
|
|
917
|
-
*/
|
|
918
|
-
reviewPath?: string;
|
|
919
|
-
/**
|
|
920
|
-
* Absolute clickable link into the app: `${PUBLIC_URL}/open/{id}`. The pod
|
|
921
|
-
* resolves the id's type server-side and bounces to the Electron app. Surface
|
|
922
|
-
* this directly to the user so they can approve without digging through the app.
|
|
923
|
-
*/
|
|
924
|
-
reviewUrl?: string;
|
|
925
|
-
/** Additive receipt for write-aware clients. Legacy clients may keep using status/id. */
|
|
926
|
-
writeReceipt?: HubWriteReceipt;
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
// ─── Write input types ────────────────────────────────────────────────────────
|
|
930
|
-
|
|
931
|
-
export interface CreateThreadInput {
|
|
932
|
-
name?: string;
|
|
933
|
-
type?: HubThread["type"];
|
|
934
|
-
workspaceId?: string;
|
|
935
|
-
agentType?: string;
|
|
936
|
-
entityId?: string;
|
|
937
|
-
documentId?: string;
|
|
938
|
-
userId?: string;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
export interface CreateRelationInput {
|
|
942
|
-
sourceEntityId: string;
|
|
943
|
-
targetEntityId: string;
|
|
944
|
-
type: string;
|
|
945
|
-
label?: string;
|
|
946
|
-
workspaceId?: string;
|
|
947
|
-
userId?: string;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/** Attach an existing role-profile to a primary-kind entity. */
|
|
951
|
-
export interface AttachFacetInput {
|
|
952
|
-
entityId: string;
|
|
953
|
-
profileSlug?: string;
|
|
954
|
-
profileId?: string;
|
|
955
|
-
workspaceId?: string | null;
|
|
956
|
-
contextEntityId?: string | null;
|
|
957
|
-
status?: string;
|
|
958
|
-
properties?: Record<string, unknown>;
|
|
959
|
-
reasoning?: string;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
/**
|
|
963
|
-
* Result of `POST /entities/{entityId}/facets`.
|
|
964
|
-
*
|
|
965
|
-
* NOT a `HubGovernanceResult`: the facet door's inline-write status is
|
|
966
|
-
* `attached` (never `created`/`approved`), and it reports the new row as
|
|
967
|
-
* `facetId` rather than `id`. Source of truth for both branches:
|
|
968
|
-
* `entities.attachFacet` in `packages/api/src/routers/entities.ts`.
|
|
969
|
-
*/
|
|
970
|
-
export interface HubAttachFacetResult {
|
|
971
|
-
status: "attached" | "proposed";
|
|
972
|
-
message?: string;
|
|
973
|
-
/** Present on the inline `attached` branch. */
|
|
974
|
-
facetId?: string;
|
|
975
|
-
/** The materialized facet row on `attached`; `null` on `proposed`. */
|
|
976
|
-
facet?: Record<string, unknown> | null;
|
|
977
|
-
/** Present on the `proposed` branch. */
|
|
978
|
-
proposalId?: string;
|
|
979
|
-
proposalType?: string;
|
|
980
|
-
reviewUrl?: string;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
export interface CreateViewInput {
|
|
984
|
-
name: string;
|
|
985
|
-
type: HubView["type"];
|
|
986
|
-
profileSlug?: string;
|
|
987
|
-
workspaceId: string;
|
|
988
|
-
config?: Record<string, unknown>;
|
|
989
|
-
metadata?: Record<string, unknown>;
|
|
990
|
-
userId?: string;
|
|
991
|
-
agentUserId?: string;
|
|
992
|
-
reasoning?: string;
|
|
993
|
-
sourceMessageId?: string;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
export interface UpdateViewInput {
|
|
997
|
-
name?: string;
|
|
998
|
-
config?: Record<string, unknown>;
|
|
999
|
-
metadata?: Record<string, unknown>;
|
|
1000
|
-
workspaceId?: string;
|
|
1001
|
-
userId?: string;
|
|
1002
|
-
agentUserId?: string;
|
|
1003
|
-
reasoning?: string;
|
|
1004
|
-
sourceMessageId?: string;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
export interface BentoWidgetInput {
|
|
1008
|
-
/** Canonical Hub-router field naming the cell type. */
|
|
1009
|
-
key: string;
|
|
1010
|
-
x: number;
|
|
1011
|
-
y: number;
|
|
1012
|
-
w: number;
|
|
1013
|
-
h: number;
|
|
1014
|
-
config?: Record<string, unknown>;
|
|
1015
|
-
props?: Record<string, unknown>;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
export interface ArrangeBentoViewInput {
|
|
1019
|
-
workspaceId?: string;
|
|
1020
|
-
userId?: string;
|
|
1021
|
-
widgets: BentoWidgetInput[];
|
|
1022
|
-
agentUserId?: string;
|
|
1023
|
-
reasoning?: string;
|
|
1024
|
-
sourceMessageId?: string;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
export interface HubBentoArrangementResult {
|
|
1028
|
-
status: string;
|
|
1029
|
-
viewId?: string;
|
|
1030
|
-
widgetCount?: number;
|
|
1031
|
-
message?: string;
|
|
1032
|
-
proposalId?: string;
|
|
1033
|
-
reviewUrl?: string;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// ─── Capabilities & teaching substrate ─────────────────────────────────────
|
|
1037
|
-
|
|
1038
|
-
export interface HubCapabilityVerb {
|
|
1039
|
-
id?: string;
|
|
1040
|
-
verbId?: string;
|
|
1041
|
-
label?: string;
|
|
1042
|
-
type?: "read" | "write";
|
|
1043
|
-
enabled?: boolean;
|
|
1044
|
-
granted?: boolean;
|
|
1045
|
-
runnable?: boolean;
|
|
1046
|
-
governance?: "auto" | "propose";
|
|
1047
|
-
effectiveExecMode?: string;
|
|
1048
|
-
govDefault?: string;
|
|
1049
|
-
[key: string]: unknown;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
/** Flat capability read-model for callers that need every granted verb. */
|
|
1053
|
-
export interface HubCapability {
|
|
1054
|
-
id?: string;
|
|
1055
|
-
name?: string;
|
|
1056
|
-
key?: string;
|
|
1057
|
-
kind?: string;
|
|
1058
|
-
description?: string | null;
|
|
1059
|
-
verbs?: HubCapabilityVerb[];
|
|
1060
|
-
governance?: Record<string, unknown>;
|
|
1061
|
-
approved?: boolean;
|
|
1062
|
-
[key: string]: unknown;
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
export interface HubCapabilityCatalogConnection {
|
|
1066
|
-
required: boolean;
|
|
1067
|
-
kind: "provider" | "vault" | null;
|
|
1068
|
-
provider?: string;
|
|
1069
|
-
/** `unavailable`: this pod's Nango doesn't declare the provider — no connect action exists. */
|
|
1070
|
-
state: "connected" | "missing" | "expired" | "unavailable";
|
|
1071
|
-
account?: string;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
export interface HubCapabilityCatalogCard {
|
|
1075
|
-
id: string | null;
|
|
1076
|
-
key: string;
|
|
1077
|
-
name: string;
|
|
1078
|
-
description?: string | null;
|
|
1079
|
-
source: "installed" | "available";
|
|
1080
|
-
status:
|
|
1081
|
-
| "available"
|
|
1082
|
-
| "needs_connection"
|
|
1083
|
-
| "connected"
|
|
1084
|
-
| "draft"
|
|
1085
|
-
| "ready"
|
|
1086
|
-
| "partial"
|
|
1087
|
-
| "unavailable";
|
|
1088
|
-
connection?: HubCapabilityCatalogConnection;
|
|
1089
|
-
verbs: Array<{
|
|
1090
|
-
verbId: string;
|
|
1091
|
-
label: string;
|
|
1092
|
-
type: "read" | "write";
|
|
1093
|
-
enabled: boolean;
|
|
1094
|
-
governance: "auto" | "propose";
|
|
1095
|
-
runnable: boolean;
|
|
1096
|
-
}>;
|
|
1097
|
-
nextAction: {
|
|
1098
|
-
kind: "add" | "connect" | "enable" | "run" | "none";
|
|
1099
|
-
hint: string;
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
export interface HubCapabilityCatalogResult {
|
|
1104
|
-
capabilities: HubCapabilityCatalogCard[];
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
/** One action the shared capability execute door can launch immediately. */
|
|
1108
|
-
export interface HubRunnableCapabilityAction {
|
|
1109
|
-
skillId?: string;
|
|
1110
|
-
verbId?: string;
|
|
1111
|
-
label: string;
|
|
1112
|
-
description?: string | null;
|
|
1113
|
-
tool: string | null;
|
|
1114
|
-
connection?: {
|
|
1115
|
-
required: true;
|
|
1116
|
-
state: "connected";
|
|
1117
|
-
provider: string;
|
|
1118
|
-
};
|
|
1119
|
-
governance: "auto";
|
|
1120
|
-
executionMode?: string;
|
|
1121
|
-
parameters: Record<string, unknown>;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export interface HubRunnableCapabilityActionsResult {
|
|
1125
|
-
actions: HubRunnableCapabilityAction[];
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
export interface ExecuteCapabilityInput {
|
|
1129
|
-
verbId?: string;
|
|
1130
|
-
skillId?: string;
|
|
1131
|
-
parameters?: Record<string, unknown>;
|
|
1132
|
-
workspaceId?: string;
|
|
1133
|
-
connectionSelector?: {
|
|
1134
|
-
connectionId?: string;
|
|
1135
|
-
contextObjectId?: string;
|
|
1136
|
-
};
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
export type ExecuteCapabilityResult =
|
|
1140
|
-
| {
|
|
1141
|
-
status: "run" | "dry-run";
|
|
1142
|
-
skillId: string;
|
|
1143
|
-
result?: unknown;
|
|
1144
|
-
dryRun?: boolean;
|
|
1145
|
-
}
|
|
1146
|
-
| { proposed: true; proposalId: string; reviewUrl?: string };
|
|
1147
|
-
|
|
1148
|
-
export interface HubAgentSkill {
|
|
1149
|
-
id: string;
|
|
1150
|
-
slug: string;
|
|
1151
|
-
name: string;
|
|
1152
|
-
description: string | null;
|
|
1153
|
-
topics: string[];
|
|
1154
|
-
body: string | null;
|
|
1155
|
-
source: string | null;
|
|
1156
|
-
author: string | null;
|
|
1157
|
-
version: string | null;
|
|
1158
|
-
tags: string[];
|
|
1159
|
-
teachesTools: string[];
|
|
1160
|
-
skillGroup: string | null;
|
|
1161
|
-
alwaysOn: boolean;
|
|
1162
|
-
createdAt: string;
|
|
1163
|
-
updatedAt: string;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
export interface ListAgentSkillsOptions {
|
|
1167
|
-
topic?: string;
|
|
1168
|
-
query?: string;
|
|
1169
|
-
tag?: string;
|
|
1170
|
-
/** Restrict to the seeded system/* teaching catalog. */
|
|
1171
|
-
system?: boolean;
|
|
1172
|
-
/** Include visible workspace-scoped skills for this selected lens. */
|
|
1173
|
-
workspaceId?: string;
|
|
1174
|
-
limit?: number;
|
|
1175
|
-
offset?: number;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
export interface HubAgentSkillsResult {
|
|
1179
|
-
skills: HubAgentSkill[];
|
|
1180
|
-
total: number;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
export interface GetCapabilityBriefsInput {
|
|
1184
|
-
tools: string[];
|
|
1185
|
-
workspaceId?: string;
|
|
1186
|
-
door?: "chat" | "automation";
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
export interface HubCapabilityBriefsResult {
|
|
1190
|
-
briefs: Record<string, string>;
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
export interface ExecuteCommandInput {
|
|
1194
|
-
slug: string;
|
|
1195
|
-
workspaceId?: string;
|
|
1196
|
-
parameters?: Record<string, unknown>;
|
|
1197
|
-
userId?: string;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
// ─── Automations ──────────────────────────────────────────────────────────────
|
|
1201
|
-
|
|
1202
|
-
export type AutomationStatus = "draft" | "active" | "paused" | "error";
|
|
1203
|
-
export type AutomationTriggerType = "event" | "cron" | "webhook" | "manual";
|
|
1204
|
-
|
|
1205
|
-
export interface HubAutomation {
|
|
1206
|
-
id: string;
|
|
1207
|
-
userId: string;
|
|
1208
|
-
workspaceId?: string | null;
|
|
1209
|
-
name: string;
|
|
1210
|
-
description?: string | null;
|
|
1211
|
-
triggerType: AutomationTriggerType;
|
|
1212
|
-
triggerConfig?: Record<string, unknown>;
|
|
1213
|
-
flowDefinition?: {
|
|
1214
|
-
nodes: Record<string, unknown>[];
|
|
1215
|
-
edges: Record<string, unknown>[];
|
|
1216
|
-
};
|
|
1217
|
-
status: AutomationStatus;
|
|
1218
|
-
metadata?: Record<string, unknown>;
|
|
1219
|
-
createdAt?: string;
|
|
1220
|
-
updatedAt?: string;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
export interface CreateAutomationInput {
|
|
1224
|
-
name: string;
|
|
1225
|
-
triggerType: AutomationTriggerType;
|
|
1226
|
-
workspaceId?: string | null;
|
|
1227
|
-
description?: string;
|
|
1228
|
-
triggerConfig?: Record<string, unknown>;
|
|
1229
|
-
flowDefinition?: {
|
|
1230
|
-
nodes: Record<string, unknown>[];
|
|
1231
|
-
edges: Record<string, unknown>[];
|
|
1232
|
-
};
|
|
1233
|
-
status?: AutomationStatus;
|
|
1234
|
-
metadata?: Record<string, unknown>;
|
|
1235
|
-
userId?: string;
|
|
1236
|
-
agentUserId?: string;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
export interface UpdateAutomationInput {
|
|
1240
|
-
name?: string;
|
|
1241
|
-
description?: string;
|
|
1242
|
-
triggerType?: AutomationTriggerType;
|
|
1243
|
-
triggerConfig?: Record<string, unknown>;
|
|
1244
|
-
flowDefinition?: {
|
|
1245
|
-
nodes: Record<string, unknown>[];
|
|
1246
|
-
edges: Record<string, unknown>[];
|
|
1247
|
-
};
|
|
1248
|
-
status?: AutomationStatus;
|
|
1249
|
-
metadata?: Record<string, unknown>;
|
|
1250
|
-
workspaceId?: string;
|
|
1251
|
-
userId?: string;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
// ─── Subscriptions / Reactions (Pulse) ───────────────────────────────────────
|
|
1255
|
-
|
|
1256
|
-
export type ReactionKind =
|
|
1257
|
-
"automation" | "ai_feed" | "ai_react" | "notify" | "webhook" | "message_out";
|
|
1258
|
-
|
|
1259
|
-
export type ReactionLens = "all" | "internal" | "external";
|
|
1260
|
-
|
|
1261
|
-
/** Opaque reaction event from the Pulse feed — shape varies by kind. */
|
|
1262
|
-
export interface HubReactionEvent {
|
|
1263
|
-
id: string;
|
|
1264
|
-
eventType: string;
|
|
1265
|
-
kind?: ReactionKind;
|
|
1266
|
-
workspaceId?: string | null;
|
|
1267
|
-
userId?: string;
|
|
1268
|
-
createdAt: string;
|
|
1269
|
-
reactions?: Record<string, unknown>[];
|
|
1270
|
-
[key: string]: unknown;
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
// ─── Notifications ────────────────────────────────────────────────────────────
|
|
1274
|
-
|
|
1275
|
-
export type NotificationSourceType =
|
|
1276
|
-
"proposal" | "connector" | "agent" | "system" | "inbox_item";
|
|
1277
|
-
|
|
1278
|
-
export interface CreateNotificationInput {
|
|
1279
|
-
userId: string;
|
|
1280
|
-
workspaceId: string;
|
|
1281
|
-
type: string;
|
|
1282
|
-
sourceType?: NotificationSourceType;
|
|
1283
|
-
sourceId?: string;
|
|
1284
|
-
workspaceUrl?: string;
|
|
1285
|
-
groupKey?: string;
|
|
1286
|
-
data?: Record<string, unknown>;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
// ─── Webhooks ─────────────────────────────────────────────────────────────────
|
|
1290
|
-
|
|
1291
|
-
export interface HubWebhookDelivery {
|
|
1292
|
-
id: string;
|
|
1293
|
-
subscriptionId: string;
|
|
1294
|
-
status: string;
|
|
1295
|
-
responseStatus?: number;
|
|
1296
|
-
attempt: number;
|
|
1297
|
-
deliveredAt?: string;
|
|
1298
|
-
createdAt: string;
|
|
1299
|
-
}
|