@synap-core/cli 1.8.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agent-chat.d.ts +47 -0
- package/dist/commands/agent-chat.js +250 -0
- package/dist/commands/agent-chat.js.map +1 -0
- package/dist/commands/agent-run.js +3 -4
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/agents.js +85 -46
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/automation.js +2 -1
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/bridge-setup.d.ts +66 -0
- package/dist/commands/bridge-setup.js +1112 -0
- package/dist/commands/bridge-setup.js.map +1 -0
- package/dist/commands/cap-connections.d.ts +28 -0
- package/dist/commands/cap-connections.js +224 -0
- package/dist/commands/cap-connections.js.map +1 -0
- package/dist/commands/capability.d.ts +89 -0
- package/dist/commands/capability.js +1594 -0
- package/dist/commands/capability.js.map +1 -0
- package/dist/commands/centrality.d.ts +20 -0
- package/dist/commands/centrality.js +95 -0
- package/dist/commands/centrality.js.map +1 -0
- package/dist/commands/connect.d.ts +2 -0
- package/dist/commands/connect.js +16 -35
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/context.js +6 -7
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/data-extra.d.ts +1 -0
- package/dist/commands/data-extra.js +41 -14
- package/dist/commands/data-extra.js.map +1 -1
- package/dist/commands/data.d.ts +4 -4
- package/dist/commands/data.js +254 -187
- package/dist/commands/data.js.map +1 -1
- package/dist/commands/diagnose.d.ts +20 -0
- package/dist/commands/diagnose.js +186 -0
- package/dist/commands/diagnose.js.map +1 -0
- package/dist/commands/digest.d.ts +17 -0
- package/dist/commands/digest.js +122 -0
- package/dist/commands/digest.js.map +1 -0
- package/dist/commands/discover.d.ts +2 -0
- package/dist/commands/discover.js +25 -8
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/doc.d.ts +14 -0
- package/dist/commands/doc.js +61 -4
- package/dist/commands/doc.js.map +1 -1
- package/dist/commands/doctor.d.ts +21 -0
- package/dist/commands/doctor.js +189 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/events.js +5 -2
- package/dist/commands/events.js.map +1 -1
- package/dist/commands/explain.d.ts +1 -1
- package/dist/commands/explain.js +18 -15
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/facet.d.ts +29 -0
- package/dist/commands/facet.js +113 -0
- package/dist/commands/facet.js.map +1 -0
- package/dist/commands/graph.js +7 -4
- package/dist/commands/graph.js.map +1 -1
- package/dist/commands/import.d.ts +38 -0
- package/dist/commands/import.js +471 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init.js +35 -16
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.js +3 -4
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/knowledge.d.ts +8 -0
- package/dist/commands/knowledge.js +308 -33
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/launch.d.ts +50 -0
- package/dist/commands/launch.js +790 -0
- package/dist/commands/launch.js.map +1 -0
- package/dist/commands/lens.d.ts +45 -0
- package/dist/commands/lens.js +386 -0
- package/dist/commands/lens.js.map +1 -0
- package/dist/commands/market-authoring.d.ts +45 -0
- package/dist/commands/market-authoring.js +225 -0
- package/dist/commands/market-authoring.js.map +1 -0
- package/dist/commands/market.d.ts +224 -0
- package/dist/commands/market.js +1643 -0
- package/dist/commands/market.js.map +1 -0
- package/dist/commands/mcp.d.ts +64 -0
- package/dist/commands/mcp.js +265 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/observe.js +14 -11
- package/dist/commands/observe.js.map +1 -1
- package/dist/commands/open.d.ts +21 -4
- package/dist/commands/open.js +45 -4
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/pod.d.ts +100 -0
- package/dist/commands/pod.js +359 -0
- package/dist/commands/pod.js.map +1 -0
- package/dist/commands/pods.d.ts +15 -0
- package/dist/commands/pods.js +233 -17
- package/dist/commands/pods.js.map +1 -1
- package/dist/commands/proposals-actions.js +43 -3
- package/dist/commands/proposals-actions.js.map +1 -1
- package/dist/commands/purge.d.ts +23 -0
- package/dist/commands/purge.js +148 -0
- package/dist/commands/purge.js.map +1 -0
- package/dist/commands/raycast.d.ts +15 -0
- package/dist/commands/raycast.js +153 -0
- package/dist/commands/raycast.js.map +1 -0
- package/dist/commands/sessions.js +47 -22
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/skill-manage.d.ts +21 -0
- package/dist/commands/skill-manage.js +195 -0
- package/dist/commands/skill-manage.js.map +1 -0
- package/dist/commands/skills-commands.js +2 -1
- package/dist/commands/skills-commands.js.map +1 -1
- package/dist/commands/skills.js +7 -4
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +3 -1
- package/dist/commands/status.js +166 -14
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/statusline.d.ts +24 -0
- package/dist/commands/statusline.js +450 -0
- package/dist/commands/statusline.js.map +1 -0
- package/dist/commands/subscribe.js +2 -2
- package/dist/commands/subscribe.js.map +1 -1
- package/dist/commands/template.d.ts +42 -0
- package/dist/commands/template.js +191 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/tools.d.ts +30 -0
- package/dist/commands/tools.js +315 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/upload.d.ts +30 -0
- package/dist/commands/upload.js +155 -0
- package/dist/commands/upload.js.map +1 -0
- package/dist/commands/versions.d.ts +27 -0
- package/dist/commands/versions.js +277 -0
- package/dist/commands/versions.js.map +1 -0
- package/dist/commands/view.js +3 -2
- package/dist/commands/view.js.map +1 -1
- package/dist/commands/whoami.d.ts +21 -0
- package/dist/commands/whoami.js +129 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/index.js +894 -60
- package/dist/index.js.map +1 -1
- package/dist/lib/approval-poll.d.ts +42 -0
- package/dist/lib/approval-poll.js +52 -0
- package/dist/lib/approval-poll.js.map +1 -0
- package/dist/lib/auth.d.ts +29 -6
- package/dist/lib/auth.js +105 -94
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/bundle-version.d.ts +11 -0
- package/dist/lib/bundle-version.js +33 -0
- package/dist/lib/bundle-version.js.map +1 -0
- package/dist/lib/capture-lane.d.ts +30 -12
- package/dist/lib/capture-lane.js +73 -14
- package/dist/lib/capture-lane.js.map +1 -1
- package/dist/lib/capture-structure.d.ts +123 -0
- package/dist/lib/capture-structure.js +57 -0
- package/dist/lib/capture-structure.js.map +1 -0
- package/dist/lib/cp-packages.d.ts +177 -0
- package/dist/lib/cp-packages.js +389 -0
- package/dist/lib/cp-packages.js.map +1 -0
- package/dist/lib/describe-lens.d.ts +46 -0
- package/dist/lib/describe-lens.js +33 -0
- package/dist/lib/describe-lens.js.map +1 -0
- package/dist/lib/hub-client.d.ts +91 -1
- package/dist/lib/hub-client.js +565 -22
- package/dist/lib/hub-client.js.map +1 -1
- package/dist/lib/id.d.ts +23 -0
- package/dist/lib/id.js +35 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/installed.d.ts +51 -0
- package/dist/lib/installed.js +70 -0
- package/dist/lib/installed.js.map +1 -0
- package/dist/lib/next-steps.d.ts +61 -0
- package/dist/lib/next-steps.js +146 -0
- package/dist/lib/next-steps.js.map +1 -0
- package/dist/lib/pod.d.ts +144 -22
- package/dist/lib/pod.js +302 -64
- package/dist/lib/pod.js.map +1 -1
- package/dist/lib/project-ref.d.ts +95 -0
- package/dist/lib/project-ref.js +144 -0
- package/dist/lib/project-ref.js.map +1 -0
- package/dist/lib/project.d.ts +35 -0
- package/dist/lib/project.js +39 -0
- package/dist/lib/project.js.map +1 -0
- package/dist/lib/session-lens.d.ts +33 -0
- package/dist/lib/session-lens.js +76 -0
- package/dist/lib/session-lens.js.map +1 -0
- package/dist/lib/skill-import.d.ts +40 -0
- package/dist/lib/skill-import.js +203 -0
- package/dist/lib/skill-import.js.map +1 -0
- package/dist/lib/skills-installer.d.ts +17 -6
- package/dist/lib/skills-installer.js +133 -19
- package/dist/lib/skills-installer.js.map +1 -1
- package/dist/lib/suite.d.ts +28 -0
- package/dist/lib/suite.js +29 -0
- package/dist/lib/suite.js.map +1 -0
- package/dist/lib/superwhisper-import.d.ts +40 -0
- package/dist/lib/superwhisper-import.js +389 -0
- package/dist/lib/superwhisper-import.js.map +1 -0
- package/dist/lib/targets.d.ts +49 -1
- package/dist/lib/targets.js +420 -288
- package/dist/lib/targets.js.map +1 -1
- package/dist/lib/template-file.d.ts +74 -0
- package/dist/lib/template-file.js +140 -0
- package/dist/lib/template-file.js.map +1 -0
- package/dist/lib/unwrapList.d.ts +1 -0
- package/dist/lib/unwrapList.js +20 -0
- package/dist/lib/unwrapList.js.map +1 -0
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/logger.js +10 -2
- package/dist/utils/logger.js.map +1 -1
- package/node_modules/@synap/hub-rest-client/dist/index.cjs +414 -34
- package/node_modules/@synap/hub-rest-client/dist/index.d.cts +762 -22
- package/node_modules/@synap/hub-rest-client/dist/index.d.ts +762 -22
- package/node_modules/@synap/hub-rest-client/dist/index.js +414 -34
- package/node_modules/@synap/hub-rest-client/package.json +1 -1
- package/node_modules/@synap/hub-rest-client/src/client.ts +525 -37
- package/node_modules/@synap/hub-rest-client/src/index.ts +42 -0
- package/node_modules/@synap/hub-rest-client/src/setup.ts +57 -1
- package/node_modules/@synap/hub-rest-client/src/types.ts +697 -37
- package/package.json +11 -5
- package/skills/agent-os/SKILL.md +218 -0
- package/skills/manifest.json +5 -0
- package/skills/onboard/SKILL.md +193 -0
- package/skills/synap/SKILL.md +1284 -58
- package/skills/synap/_order.txt +37 -0
- package/skills/synap/_skill.yaml +24 -0
- package/skills/synap/authentication.md +10 -0
- package/skills/synap/automations.md +264 -0
- package/skills/synap/capabilities.md +107 -0
- package/skills/synap/capture.md +50 -142
- package/skills/synap/cli-operations.md +107 -0
- package/skills/synap/common-mistakes.md +13 -0
- package/skills/synap/content-os.md +83 -0
- package/skills/synap/creative-loop.md +43 -0
- package/skills/synap/crm.md +117 -0
- package/skills/synap/diagnostics.md +35 -0
- package/skills/synap/digesting-a-channel.md +63 -0
- package/skills/synap/document-embeds.md +123 -0
- package/skills/synap/escalation-ladder.md +71 -0
- package/skills/synap/focus-sessions.md +47 -0
- package/skills/synap/governance-rules.md +64 -0
- package/skills/synap/governance.md +6 -6
- package/skills/synap/graph-gardening.md +21 -0
- package/skills/synap/inline-patterns.md +38 -0
- package/skills/synap/lenses.md +38 -0
- package/skills/synap/linking-principle.md +39 -0
- package/skills/synap/linking.md +1 -0
- package/skills/synap/mental-model.md +45 -0
- package/skills/synap/more.md +7 -0
- package/skills/synap/multi-entity-capture.md +12 -0
- package/skills/synap/next-action.md +37 -0
- package/skills/synap/north-star.md +17 -0
- package/skills/synap/operating-mode-rules.md +45 -0
- package/skills/synap/operating-mode.md +9 -0
- package/skills/synap/quick-reference.md +67 -0
- package/skills/synap/reading.md +43 -0
- package/skills/synap/recap.md +21 -0
- package/skills/synap/reflexes.md +46 -0
- package/skills/synap/response-style.md +21 -0
- package/skills/synap/scope.md +13 -0
- package/skills/synap/showing.md +17 -0
- package/skills/synap/user-model.md +25 -0
- package/skills/synap/viewframe-cells.md +290 -0
- package/skills/synap/work-flow.md +113 -0
- package/skills/synap/worked-examples.md +74 -0
- package/skills/synap/workspace-design.md +45 -0
- package/skills/synap/workspace-edges.md +49 -0
- package/skills/synap/writes.md +213 -0
- package/skills/synap-app/SKILL.md +319 -0
- package/skills/synap-app/_order.txt +5 -0
- package/skills/synap-app/_skill.yaml +20 -0
- package/skills/synap-app/creating-the-base-app.md +64 -0
- package/skills/synap-app/governance.md +42 -0
- package/skills/synap-app/install-commands.md +55 -0
- package/skills/synap-app/overview.md +50 -0
- package/skills/synap-app/using-the-sdk.md +73 -0
- package/skills/synap-market/SKILL.md +335 -0
- package/skills/synap-market/_order.txt +5 -0
- package/skills/synap-market/_skill.yaml +24 -0
- package/skills/synap-market/author-and-publish.md +75 -0
- package/skills/synap-market/discover-and-fetch.md +59 -0
- package/skills/synap-market/governance-and-catalog.md +56 -0
- package/skills/synap-market/install.md +55 -0
- package/skills/synap-market/overview.md +51 -0
- package/skills/synap-schema/SKILL.md +97 -6
- package/skills/synap-schema/_order.txt +13 -0
- package/skills/synap-schema/_skill.yaml +22 -0
- package/skills/synap-schema/before-you-touch.md +14 -0
- package/skills/synap-schema/common-mistakes.md +9 -0
- package/skills/synap-schema/creating-profiles.md +17 -0
- package/skills/synap-schema/discover-profiles.md +24 -0
- package/skills/synap-schema/entity-scope.md +8 -0
- package/skills/synap-schema/extend-vs-create.md +31 -0
- package/skills/synap-schema/more.md +6 -0
- package/skills/synap-schema/overlay-properties.md +22 -0
- package/skills/synap-schema/profiles.md +3 -0
- package/skills/synap-schema/property-defs.md +29 -0
- package/skills/synap-schema/read-before-write.md +50 -0
- package/skills/synap-schema/relations.md +18 -0
- package/skills/synap-schema/worked-example.md +30 -0
- package/skills/synap-ui/SKILL.md +26 -2
- package/skills/synap-ui/_order.txt +13 -0
- package/skills/synap-ui/_skill.yaml +23 -0
- package/skills/synap-ui/ai-companion.md +27 -0
- package/skills/synap-ui/arranging-bento.md +8 -0
- package/skills/synap-ui/before-you-build.md +20 -0
- package/skills/synap-ui/bento-layouts.md +35 -0
- package/skills/synap-ui/common-mistakes.md +10 -0
- package/skills/synap-ui/creating-views.md +26 -0
- package/skills/synap-ui/four-builds.md +24 -0
- package/skills/synap-ui/more.md +7 -0
- package/skills/synap-ui/proposing-vs-extending.md +11 -0
- package/skills/synap-ui/view-list.md +24 -0
- package/skills/synap-ui/views.md +3 -0
- package/skills/synap-ui/worked-example.md +18 -0
- package/skills/synap-ui/workspaces.md +47 -0
- package/templates/automations/bookmark-enrichment.automation.json +44 -0
- package/templates/automations/mail-feed.automation.json +86 -0
- package/templates/automations/url-bookmark-capture.automation.json +70 -0
- package/templates/skills/README.md +21 -0
- package/templates/skills/authoring-automations/SKILL.md +95 -0
- package/templates/skills/authoring-automations/reference/node-matrix.md +49 -0
- package/templates/skills/authoring-capabilities/SKILL.md +93 -0
- package/templates/skills/authoring-capabilities/reference/template-anatomy.md +70 -0
- package/templates/skills/authoring-playbooks/SKILL.md +102 -0
- package/templates/skills/authoring-playbooks/reference/stages-contract.md +35 -0
- package/templates/skills/authoring-playbooks/reference/worked-example.md +64 -0
- package/templates/skills/bookmark-enrichment/SKILL.md +40 -0
- package/templates/skills/coordinating-agents/SKILL.md +32 -0
- package/templates/skills/coordinating-branches/SKILL.md +27 -0
- package/templates/skills/mapping-the-server/SKILL.md +54 -0
- package/templates/skills/reading-client-progress/SKILL.md +65 -0
- package/templates/skills/routing-to-channels/SKILL.md +54 -0
- package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
- package/templates/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
- package/templates/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
- package/templates/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
- package/templates/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
- package/templates/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
- package/templates/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
- package/templates/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
- package/templates/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
- package/dist/commands/connectors.d.ts +0 -31
- package/dist/commands/connectors.js +0 -276
- package/dist/commands/connectors.js.map +0 -1
- package/dist/commands/finish.d.ts +0 -25
- package/dist/commands/finish.js +0 -274
- package/dist/commands/finish.js.map +0 -1
- package/dist/commands/openclaw.d.ts +0 -40
- package/dist/commands/openclaw.js +0 -1148
- package/dist/commands/openclaw.js.map +0 -1
- package/dist/commands/security-audit.d.ts +0 -12
- package/dist/commands/security-audit.js +0 -100
- package/dist/commands/security-audit.js.map +0 -1
- package/dist/lib/hardening.d.ts +0 -18
- package/dist/lib/hardening.js +0 -214
- package/dist/lib/hardening.js.map +0 -1
|
@@ -28,6 +28,15 @@ export interface HubEntity {
|
|
|
28
28
|
dueDate?: string;
|
|
29
29
|
content?: string;
|
|
30
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;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
export interface HubDocument {
|
|
@@ -37,18 +46,16 @@ export interface HubDocument {
|
|
|
37
46
|
workspaceId: string | null;
|
|
38
47
|
createdAt: string;
|
|
39
48
|
updatedAt: string;
|
|
49
|
+
userId?: string;
|
|
50
|
+
type?: "text" | "markdown" | "code" | "html" | "pdf" | "docx";
|
|
51
|
+
language?: string | null;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
export interface HubChannel {
|
|
43
55
|
id: string;
|
|
44
56
|
name: string;
|
|
45
57
|
type:
|
|
46
|
-
| "
|
|
47
|
-
| "thread"
|
|
48
|
-
| "sub_thread"
|
|
49
|
-
| "feed"
|
|
50
|
-
| "external"
|
|
51
|
-
| "agent_collab";
|
|
58
|
+
"personal" | "thread" | "sub_thread" | "feed" | "external" | "agent_collab";
|
|
52
59
|
workspaceId: string | null;
|
|
53
60
|
agentType?: string;
|
|
54
61
|
contextObjectType?:
|
|
@@ -82,6 +89,8 @@ export interface HubUser {
|
|
|
82
89
|
email?: string;
|
|
83
90
|
name?: string;
|
|
84
91
|
scopes?: string[];
|
|
92
|
+
/** True only when the server authenticated this request as an agent credential. */
|
|
93
|
+
isAgent: boolean;
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
export interface HubMemoryResult {
|
|
@@ -109,12 +118,35 @@ export interface CreateEntityInput {
|
|
|
109
118
|
profileSlug: string;
|
|
110
119
|
title: string;
|
|
111
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;
|
|
112
125
|
properties?: Record<string, unknown>;
|
|
113
126
|
content?: string;
|
|
114
127
|
url?: string;
|
|
115
128
|
status?: string;
|
|
116
129
|
priority?: "low" | "medium" | "high" | "urgent";
|
|
117
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
|
+
}>;
|
|
118
150
|
}
|
|
119
151
|
|
|
120
152
|
export interface UpdateEntityInput {
|
|
@@ -132,6 +164,49 @@ export interface CreateDocumentInput {
|
|
|
132
164
|
content?: string;
|
|
133
165
|
workspaceId?: string;
|
|
134
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;
|
|
135
210
|
}
|
|
136
211
|
|
|
137
212
|
export interface StoreMemoryInput {
|
|
@@ -167,12 +242,64 @@ export interface PodStatus {
|
|
|
167
242
|
|
|
168
243
|
// ─── Capture pipeline types ───────────────────────────────────────────────────
|
|
169
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
|
+
|
|
170
287
|
export interface CaptureProposal {
|
|
171
288
|
tempId: string;
|
|
172
289
|
profileSlug: string;
|
|
173
290
|
title: string;
|
|
174
291
|
description?: string;
|
|
292
|
+
/** Long-form body preserved through plan → commit as a linked document. */
|
|
293
|
+
content?: string;
|
|
175
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
|
+
}>;
|
|
176
303
|
confidence: number;
|
|
177
304
|
action: "create" | "link" | "dismiss";
|
|
178
305
|
linkedEntityId?: string;
|
|
@@ -194,10 +321,39 @@ export interface CaptureRelation {
|
|
|
194
321
|
export interface CaptureStructureResponse {
|
|
195
322
|
proposals: CaptureProposal[];
|
|
196
323
|
relations: CaptureRelation[];
|
|
197
|
-
|
|
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
|
+
}>;
|
|
198
349
|
dedupCandidates?: Record<
|
|
199
350
|
string,
|
|
200
|
-
Array<{
|
|
351
|
+
Array<{
|
|
352
|
+
entityId: string;
|
|
353
|
+
title: string;
|
|
354
|
+
profileSlug: string;
|
|
355
|
+
score: number;
|
|
356
|
+
}>
|
|
201
357
|
>;
|
|
202
358
|
}
|
|
203
359
|
|
|
@@ -208,11 +364,122 @@ export interface CaptureExecuteInput {
|
|
|
208
364
|
title: string;
|
|
209
365
|
description?: string;
|
|
210
366
|
properties?: Record<string, unknown>;
|
|
211
|
-
|
|
367
|
+
/** Legacy structure-output field; the execute route ignores it. */
|
|
368
|
+
action?: "create" | "link" | "dismiss";
|
|
212
369
|
linkedEntityId?: string;
|
|
213
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
|
+
}>;
|
|
214
382
|
}>;
|
|
215
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;
|
|
216
483
|
}
|
|
217
484
|
|
|
218
485
|
export interface CaptureExecuteResponse {
|
|
@@ -227,6 +494,37 @@ export interface CaptureExecuteResponse {
|
|
|
227
494
|
targetTempId: string;
|
|
228
495
|
relationType: string;
|
|
229
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;
|
|
230
528
|
}
|
|
231
529
|
|
|
232
530
|
// ─── Relations & Graph ───────────────────────────────────────────────────────
|
|
@@ -257,22 +555,30 @@ export interface HubGraphResult {
|
|
|
257
555
|
}
|
|
258
556
|
|
|
259
557
|
/**
|
|
260
|
-
* A single link returned by getConnections()
|
|
558
|
+
* A single link returned by getConnections() across the local graph:
|
|
261
559
|
* - `"graph"` : an explicit row in the relations table
|
|
262
|
-
* - `"property"` :
|
|
263
|
-
* - `"thread"` : a
|
|
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
|
|
264
563
|
*/
|
|
265
564
|
export interface HubConnection {
|
|
266
565
|
entityId: string;
|
|
267
566
|
entity: HubEntity | null;
|
|
268
567
|
label: string;
|
|
269
568
|
direction: "outgoing" | "incoming" | "structural";
|
|
270
|
-
source: "graph" | "property" | "thread";
|
|
569
|
+
source: "graph" | "property" | "thread" | "context_channel" | "focus_session";
|
|
570
|
+
relationId?: string;
|
|
271
571
|
relationType?: string;
|
|
272
572
|
propertySlug?: string;
|
|
273
573
|
propertyLabel?: string;
|
|
274
574
|
channelId?: string;
|
|
275
575
|
channelRelationshipType?: string;
|
|
576
|
+
channelTitle?: string | null;
|
|
577
|
+
channelWorkspaceId?: string | null;
|
|
578
|
+
focusSessionId?: string;
|
|
579
|
+
focusSessionGoal?: string;
|
|
580
|
+
focusSessionStatus?: string;
|
|
581
|
+
focusSessionWorkspaceId?: string | null;
|
|
276
582
|
createdAt?: string | null;
|
|
277
583
|
}
|
|
278
584
|
|
|
@@ -283,6 +589,8 @@ export interface HubConnectionsResult {
|
|
|
283
589
|
graph: number;
|
|
284
590
|
structural: number;
|
|
285
591
|
threads: number;
|
|
592
|
+
contextChannels?: number;
|
|
593
|
+
focusSessions?: number;
|
|
286
594
|
};
|
|
287
595
|
}
|
|
288
596
|
|
|
@@ -298,6 +606,10 @@ export interface HubProfile {
|
|
|
298
606
|
icon?: string;
|
|
299
607
|
color?: string;
|
|
300
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;
|
|
301
613
|
}
|
|
302
614
|
|
|
303
615
|
export interface HubPropertyDef {
|
|
@@ -325,6 +637,15 @@ export interface HubDiscoverProperty {
|
|
|
325
637
|
type: string;
|
|
326
638
|
options?: string[];
|
|
327
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;
|
|
328
649
|
}
|
|
329
650
|
|
|
330
651
|
export interface HubDiscoverProfile {
|
|
@@ -333,8 +654,12 @@ export interface HubDiscoverProfile {
|
|
|
333
654
|
scope: "pod" | "workspace";
|
|
334
655
|
description?: string | null;
|
|
335
656
|
icon?: string | null;
|
|
336
|
-
|
|
337
|
-
|
|
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;
|
|
338
663
|
}
|
|
339
664
|
|
|
340
665
|
export interface HubDiscoverResult {
|
|
@@ -343,18 +668,88 @@ export interface HubDiscoverResult {
|
|
|
343
668
|
hint: string;
|
|
344
669
|
}
|
|
345
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
|
+
|
|
346
746
|
// ─── Threads & Channels ──────────────────────────────────────────────────────
|
|
347
747
|
|
|
348
748
|
export interface HubThread {
|
|
349
749
|
id: string;
|
|
350
750
|
name?: string;
|
|
351
751
|
type:
|
|
352
|
-
| "
|
|
353
|
-
| "thread"
|
|
354
|
-
| "sub_thread"
|
|
355
|
-
| "feed"
|
|
356
|
-
| "external"
|
|
357
|
-
| "agent_collab";
|
|
752
|
+
"personal" | "thread" | "sub_thread" | "feed" | "external" | "agent_collab";
|
|
358
753
|
workspaceId?: string;
|
|
359
754
|
agentType?: string;
|
|
360
755
|
contextObjectType?:
|
|
@@ -421,6 +816,9 @@ export interface HubView {
|
|
|
421
816
|
profileSlug?: string;
|
|
422
817
|
workspaceId?: string;
|
|
423
818
|
config?: Record<string, unknown>;
|
|
819
|
+
metadata?: Record<string, unknown>;
|
|
820
|
+
profileId?: string | null;
|
|
821
|
+
userId?: string;
|
|
424
822
|
createdAt: string;
|
|
425
823
|
updatedAt: string;
|
|
426
824
|
}
|
|
@@ -462,8 +860,43 @@ export interface HubUserContext {
|
|
|
462
860
|
|
|
463
861
|
// ─── Governance ───────────────────────────────────────────────────────────────
|
|
464
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
|
+
|
|
465
897
|
export interface HubGovernanceResult {
|
|
466
|
-
|
|
898
|
+
/** `created` is an inline, materialized write; `proposed` remains pending. */
|
|
899
|
+
status: "approved" | "created" | "proposed" | "denied";
|
|
467
900
|
id?: string;
|
|
468
901
|
proposalId?: string;
|
|
469
902
|
reason?: string;
|
|
@@ -479,16 +912,18 @@ export interface HubGovernanceResult {
|
|
|
479
912
|
*/
|
|
480
913
|
reasoning?: string;
|
|
481
914
|
/**
|
|
482
|
-
* Pod-relative path
|
|
915
|
+
* Pod-relative path into the app: `/open/{id}`.
|
|
483
916
|
* Present on `proposed` responses.
|
|
484
917
|
*/
|
|
485
918
|
reviewPath?: string;
|
|
486
919
|
/**
|
|
487
|
-
* Absolute
|
|
488
|
-
*
|
|
489
|
-
* the user so they can approve without digging through the app.
|
|
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.
|
|
490
923
|
*/
|
|
491
924
|
reviewUrl?: string;
|
|
925
|
+
/** Additive receipt for write-aware clients. Legacy clients may keep using status/id. */
|
|
926
|
+
writeReceipt?: HubWriteReceipt;
|
|
492
927
|
}
|
|
493
928
|
|
|
494
929
|
// ─── Write input types ────────────────────────────────────────────────────────
|
|
@@ -512,13 +947,247 @@ export interface CreateRelationInput {
|
|
|
512
947
|
userId?: string;
|
|
513
948
|
}
|
|
514
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
|
+
|
|
515
983
|
export interface CreateViewInput {
|
|
516
984
|
name: string;
|
|
517
985
|
type: HubView["type"];
|
|
518
986
|
profileSlug?: string;
|
|
519
987
|
workspaceId: string;
|
|
520
988
|
config?: Record<string, unknown>;
|
|
989
|
+
metadata?: Record<string, unknown>;
|
|
521
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>;
|
|
522
1191
|
}
|
|
523
1192
|
|
|
524
1193
|
export interface ExecuteCommandInput {
|
|
@@ -585,12 +1254,7 @@ export interface UpdateAutomationInput {
|
|
|
585
1254
|
// ─── Subscriptions / Reactions (Pulse) ───────────────────────────────────────
|
|
586
1255
|
|
|
587
1256
|
export type ReactionKind =
|
|
588
|
-
| "
|
|
589
|
-
| "ai_feed"
|
|
590
|
-
| "ai_react"
|
|
591
|
-
| "notify"
|
|
592
|
-
| "webhook"
|
|
593
|
-
| "message_out";
|
|
1257
|
+
"automation" | "ai_feed" | "ai_react" | "notify" | "webhook" | "message_out";
|
|
594
1258
|
|
|
595
1259
|
export type ReactionLens = "all" | "internal" | "external";
|
|
596
1260
|
|
|
@@ -609,11 +1273,7 @@ export interface HubReactionEvent {
|
|
|
609
1273
|
// ─── Notifications ────────────────────────────────────────────────────────────
|
|
610
1274
|
|
|
611
1275
|
export type NotificationSourceType =
|
|
612
|
-
| "
|
|
613
|
-
| "connector"
|
|
614
|
-
| "agent"
|
|
615
|
-
| "system"
|
|
616
|
-
| "inbox_item";
|
|
1276
|
+
"proposal" | "connector" | "agent" | "system" | "inbox_item";
|
|
617
1277
|
|
|
618
1278
|
export interface CreateNotificationInput {
|
|
619
1279
|
userId: string;
|