@synap-core/cli 1.11.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -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 +33 -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 +523 -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 +80 -35
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/bridge-setup.d.ts +14 -1
- package/dist/commands/bridge-setup.js +392 -128
- 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 +2 -0
- package/dist/commands/capability.js +218 -168
- 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/connect.d.ts +38 -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 +7 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/data-extra.d.ts +34 -0
- package/dist/commands/data-extra.js +193 -23
- package/dist/commands/data-extra.js.map +1 -1
- package/dist/commands/data.d.ts +120 -2
- package/dist/commands/data.js +293 -20
- 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 +112 -3
- package/dist/commands/doctor.js +657 -32
- 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/import.d.ts +368 -13
- package/dist/commands/import.js +1064 -54
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +20 -9
- package/dist/commands/init.js +433 -973
- 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 +117 -55
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/lens.d.ts +37 -1
- package/dist/commands/lens.js +192 -71
- 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/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 +162 -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 +5 -0
- package/dist/commands/pods.js +97 -116
- 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 +577 -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-wait.d.ts +111 -0
- package/dist/commands/session-wait.js +209 -0
- package/dist/commands/session-wait.js.map +1 -0
- package/dist/commands/sessions.d.ts +52 -0
- package/dist/commands/sessions.js +478 -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.js +16 -0
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +1 -4
- package/dist/commands/status.js +5 -34
- 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 +51 -0
- package/dist/commands/tracks.js +291 -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 +23 -3
- package/dist/commands/whoami.js +169 -23
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/worker.d.ts +122 -0
- package/dist/commands/worker.js +435 -0
- package/dist/commands/worker.js.map +1 -0
- package/dist/commands/worker.test.d.ts +1 -0
- package/dist/commands/worker.test.js +116 -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 +900 -180
- 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 +138 -0
- package/dist/lib/agent-door.js +426 -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 +14 -9
- package/dist/lib/auth.js +44 -61
- 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/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/conversation-headers.d.ts +18 -0
- package/dist/lib/conversation-headers.js +32 -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 +117 -0
- package/dist/lib/credential-class.js +116 -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/hub-client.d.ts +29 -8
- package/dist/lib/hub-client.js +328 -55
- 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 +16 -0
- package/dist/lib/init-handoff.js +19 -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 +66 -0
- package/dist/lib/key-source.js +106 -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 +24 -0
- package/dist/lib/knowledge-title.js +46 -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 +42 -0
- package/dist/lib/mcp-bridge.js +147 -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 +90 -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/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-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 +66 -112
- package/dist/lib/pod.js +134 -412
- 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/review-credential.d.ts +119 -0
- package/dist/lib/review-credential.js +147 -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-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 +134 -10
- package/dist/lib/targets.js +962 -258
- 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/utils/logger.js +5 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +23 -17
- package/skills/README.md +12 -10
- 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 +1086 -283
- 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/concepts.md +28 -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 +141 -47
- package/skills/synap/escalation-ladder.md +20 -10
- package/skills/synap/focus-sessions.md +47 -21
- package/skills/synap/from-intent.md +142 -0
- package/skills/synap/governance-rules.md +4 -4
- 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 +33 -15
- package/skills/synap/linking.md +41 -40
- package/skills/synap/mcp-remote-servers.md +64 -0
- package/skills/synap/mental-model.md +17 -15
- package/skills/synap/operating-mode-rules.md +1 -1
- package/skills/synap/processes.md +118 -0
- package/skills/synap/quick-reference.md +5 -1
- 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 +96 -0
- package/skills/synap/worked-examples.md +4 -5
- package/skills/synap/workspace-design.md +14 -10
- package/skills/synap/writes.md +97 -24
- package/skills/synap/writing-titles.md +63 -0
- package/skills/synap-app/SKILL.md +2 -2
- package/skills/synap-app/_skill.yaml +1 -1
- package/skills/synap-app/install-commands.md +1 -1
- 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/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/dist/commands/template.d.ts +0 -42
- package/dist/commands/template.js +0 -191
- package/dist/commands/template.js.map +0 -1
- package/dist/lib/browser-auth.d.ts +0 -35
- package/dist/lib/browser-auth.js +0 -170
- package/dist/lib/browser-auth.js.map +0 -1
- package/dist/lib/openclaw.d.ts +0 -32
- package/dist/lib/openclaw.js +0 -164
- package/dist/lib/openclaw.js.map +0 -1
- package/dist/lib/seed.d.ts +0 -13
- package/dist/lib/seed.js +0 -135
- package/dist/lib/seed.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
package/skills/synap/_order.txt
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
operating-mode.md
|
|
2
2
|
reflexes.md
|
|
3
|
+
concepts.md
|
|
4
|
+
work-model.md
|
|
3
5
|
escalation-ladder.md
|
|
6
|
+
from-intent.md
|
|
4
7
|
mental-model.md
|
|
5
8
|
quick-reference.md
|
|
6
9
|
lenses.md
|
|
@@ -12,6 +15,7 @@ linking-principle.md
|
|
|
12
15
|
governance-rules.md
|
|
13
16
|
capabilities.md
|
|
14
17
|
writes.md
|
|
18
|
+
writing-titles.md
|
|
15
19
|
document-embeds.md
|
|
16
20
|
creative-loop.md
|
|
17
21
|
graph-gardening.md
|
|
@@ -35,3 +39,6 @@ recap.md
|
|
|
35
39
|
showing.md
|
|
36
40
|
user-model.md
|
|
37
41
|
north-star.md
|
|
42
|
+
processes.md
|
|
43
|
+
mcp-remote-servers.md
|
|
44
|
+
hand-off.md
|
package/skills/synap/_skill.yaml
CHANGED
|
@@ -12,7 +12,7 @@ description: >
|
|
|
12
12
|
when the user asks about their own data. Do NOT use this skill for extending
|
|
13
13
|
the schema (use synap-schema) or building dashboards and views (use synap-ui).
|
|
14
14
|
metadata:
|
|
15
|
-
|
|
15
|
+
synap:
|
|
16
16
|
requires:
|
|
17
17
|
env: [SYNAP_HUB_API_KEY, SYNAP_POD_URL]
|
|
18
18
|
optional_env:
|
|
@@ -39,6 +39,21 @@ Filters narrow the event to specific conditions:
|
|
|
39
39
|
}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
### Status changes: the transitioned event
|
|
43
|
+
|
|
44
|
+
A status move (a kind's own lifecycle, or a role's) emits ONE event, `entity.transition.completed` (the verb "transitioned"), whatever moved it: a person, a board drag, an agent through `update_entity` + `expectedStatus`, a sync. Filter it on `lifecycleProfile` (the kind or ROLE whose lifecycle moved; `profileSlug` stays the entity's kind even for a role) and `to` / `from` / `property`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"eventPattern": "entity.transition.completed",
|
|
49
|
+
"filters": { "lifecycleProfile": "lead", "to": "qualified" }
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Prefer it to `entity.update.completed` for any status. For a ROLE it is the only one: a role's status lives on its facet, so an update rule never sees it.
|
|
54
|
+
|
|
55
|
+
**A worker usually beats a hand-written rule.** "When a post enters Review, run the review" is an activator on the playbook (`on: enters_status`), and "once 5 leads wait in qualified" is `on: count` + `min`; both compile to a governed rule like the one above, fire once per thing per transition, and are throttled by `maxPendingApprovals`. Write the rule by hand only for work no method owns. Workers: `processes`.
|
|
56
|
+
|
|
42
57
|
### Cron Expressions
|
|
43
58
|
|
|
44
59
|
Standard 5-field cron (minute hour day month weekday):
|
package/skills/synap/capture.md
CHANGED
|
@@ -8,6 +8,11 @@ entities[] → you already know the kind + fields
|
|
|
8
8
|
entities[] + relations[] → a graph; refs link things that don't exist yet, reviewed as ONE proposal
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
**Titles and kinds:** each entity's title is linted — the receipt's `titleLint`
|
|
12
|
+
(per `ref`) names what to rewrite, and `validate: true` shows it before you
|
|
13
|
+
write. Status reports, decisions, open bugs and ideas are not `knowledge`; see
|
|
14
|
+
`writing-titles.md` for the routing rule.
|
|
15
|
+
|
|
11
16
|
There is no wrong door to pick, because there is one door. `text` alone is the old "capture"; `entities[]` is the old "rich create"; `entities[] + relations[]` is the composite graph. All three go through `synap_capture`.
|
|
12
17
|
|
|
13
18
|
## One call → one receipt (no plan-and-commit)
|
|
@@ -40,10 +40,11 @@ synap list entities --profile=task --workspace=<id> --json
|
|
|
40
40
|
synap get entity <id> --json
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
**
|
|
43
|
+
**Recording a decision as its own graph entity:**
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
synap
|
|
46
|
+
synap create entity --profile=decision --name="Use Typesense for entity search" \
|
|
47
|
+
--props='{"summary":"Use Typesense for entity search","decisionStatus":"accepted"}' --json
|
|
47
48
|
# Retrieve later with the one read verb: synap ask "Typesense decision"
|
|
48
49
|
```
|
|
49
50
|
|
|
@@ -52,27 +53,32 @@ synap capture --type decision --claim "Use Typesense for entity search" --json
|
|
|
52
53
|
**Structured knowledge (durable, typed, searchable — preferred for engineering learnings):**
|
|
53
54
|
|
|
54
55
|
```bash
|
|
55
|
-
# Work lane
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
--
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
--
|
|
66
|
-
|
|
67
|
-
#
|
|
68
|
-
synap
|
|
56
|
+
# Work lane: one explicit Knowledge form. Keep the Markdown body on the
|
|
57
|
+
# linked document; these properties remain compact/queryable metadata.
|
|
58
|
+
synap create entity --profile=knowledge --name="Hono static route ordering" \
|
|
59
|
+
--workspace=<id> \
|
|
60
|
+
--props='{"knowledgeForm":"caution","ek_claim":"Static routes must come before /:id","ek_tags":["repo:synap-backend","layer:routing"]}' \
|
|
61
|
+
--content=$'## Why\\n\\nStatic routes must come before `/:id`.' --json
|
|
62
|
+
|
|
63
|
+
synap create entity --profile=knowledge --name="Verify library APIs at runtime" \
|
|
64
|
+
--workspace=<id> \
|
|
65
|
+
--props='{"knowledgeForm":"fact","ek_claim":"Code-read is not runtime-true for library APIs"}' \
|
|
66
|
+
--content=$'Validate the installed version before depending on an API.' --json
|
|
67
|
+
|
|
68
|
+
# A Decision is its own lifecycle entity; link it to the supporting Knowledge.
|
|
69
|
+
synap create entity --profile=decision --name="Use Typesense for entity search" \
|
|
70
|
+
--props='{"summary":"pgvector deferred to V1; Typesense ships now","decisionStatus":"accepted"}' --json
|
|
71
|
+
|
|
72
|
+
# A Reference is source material, not a Knowledge form. Create/use a source
|
|
73
|
+
# entity or document and link it as evidence; global runbooks remain knowledge_keys.
|
|
74
|
+
synap capture --global "Always fix the canonical path, never a workaround" \
|
|
69
75
|
--key "principle:root-cause" --json
|
|
70
76
|
|
|
71
77
|
# Retrieve any of it later with the one read verb (it spans every lane):
|
|
72
|
-
synap ask "hono routing
|
|
78
|
+
synap ask "hono routing caution" --json
|
|
73
79
|
```
|
|
74
80
|
|
|
75
|
-
`
|
|
81
|
+
`knowledge` has exactly one canonical `knowledgeForm`: `fact`, `caution` or `convention` (a legacy `insight` is read as `fact`). It is workspace-scoped, so the active workspace supplies the domain. `ek_claim` (the "Claim") is required — the full sentence; the title is its short handle, never the claim cut off. Readable long form belongs in the entity's linked Markdown document. Status reports, decisions, open problems (`issue`) and ideas are not knowledge — see `writing-titles.md`. A formal **Decision** has its own rationale/lifecycle entity, and a **Reference** is source material linked as evidence — neither is a Knowledge form. The legacy `synap capture --type gotcha|lesson|decision|reference` command is still accepted for compatibility, but new automation must use the canonical entity properties above. Retrieve everything with `synap ask`.
|
|
76
82
|
Use `capture` for anything worth remembering across sessions and projects.
|
|
77
83
|
|
|
78
84
|
**Open (the one display door):**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## Concepts — one word per idea
|
|
2
|
+
|
|
3
|
+
The ONE glossary; other skills point here. Word = what the user sees; internal = tools and tables.
|
|
4
|
+
|
|
5
|
+
| Word | Internal | Answers | Test · e.g. · not |
|
|
6
|
+
| ------------- | ----------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| **Space** | workspace | which domain: kinds + tools? | owns kinds, never done · CRM · not a project or method; findable, not emphasised |
|
|
8
|
+
| **Project** | project | what am I committed to, with whom? | ends with the commitment; spans spaces · a launch · not a task, method, or the owner's company |
|
|
9
|
+
| **Track** | project_tracks | what lasting intent am I pursuing? | inside ONE project, lasts, never completes; direction, instructions, goal; turns workers on; work in it = sessions · grow the newsletter · no stages |
|
|
10
|
+
| **Step** | stage | where does this work stand? | = the subject's status: move the thing, the step follows · legacy: steps of a track started from a method |
|
|
11
|
+
| **Work** | focus_session | what am I doing this sitting? | one goal · no noun: "Start work" |
|
|
12
|
+
| **Template** | playbook | how do I reuse it? | kind DERIVED, never declared: scope session = work template (a method a session or worker follows), project = track template (legacy); also space and rule templates |
|
|
13
|
+
| **Pack** | suite | which templates come together? | a bundle; depends on space templates, never creates a space |
|
|
14
|
+
| **Rule** | automation | what runs by itself, when? | standing · "every Monday…" · not Approvals |
|
|
15
|
+
| **Approvals** | governance rules | which AI writes wait for me? | decides review vs auto, does no work |
|
|
16
|
+
| **Tools** | capability, skill, tool | what can it act with? | one word; the detail shows the kind |
|
|
17
|
+
| **To review** | proposal | what awaits my approval? | `proposed` is success |
|
|
18
|
+
| **Role** | role profile + facet | which hat does it wear? | one role per name, pod-wide; spaces add properties by overlay; its entities show in all · client · never a twin |
|
|
19
|
+
| **Thing** | entity | what is being worked on? | one kind, maybe roles · a post, a lead · never a twin for a hat |
|
|
20
|
+
| **Status** | lifecycle | where does it stand? | ONE list per kind or role, declared on its profile; category open·active·paused·done·lost · moved only through the door (`expectedStatus`) |
|
|
21
|
+
| **Pipeline** | pipeline view | what is in each status? | computed from a lifecycle, never created · not an object |
|
|
22
|
+
| **Worker** | playbook activator | what starts work by itself? | a method + trigger (enters status · schedule · count · manual) + size (per thing · per batch); a track or project turns it on |
|
|
23
|
+
|
|
24
|
+
Doors: `start_track`, `start_session`, `create_rule`, `attach_facet`, `update_entity` + `expectedStatus` (a status). How they fit (sizes, workers, tenses): `work-model`.
|
|
25
|
+
|
|
26
|
+
A lasting goal on a project: `list_tracks` → none? `start_track` (`name`, `direction`, a `kpi` only if the person names one; no method needed); work in it = `start_session` + `trackId`, as many sessions as it takes. Detail: `from-intent`.
|
|
27
|
+
|
|
28
|
+
Existing work can be filed into a track with `update_session` `trackId` (proposed; the session keeps its space). Track stages are legacy: only a track started from a track template has them (`start_stage_session`; never `advance_track` without the user).
|
|
@@ -5,7 +5,7 @@ Some workspaces run an editorial engine: `pillar`, `post`, `platform`, `newslett
|
|
|
5
5
|
**The editorial core:**
|
|
6
6
|
|
|
7
7
|
- **`pillar`** — a recurring theme the audience knows the operator for. Two to four, not twelve. `pillar-status` (Active, Developing, Paused, Retired), `pillar-goal`, `pillar-formats`, `posting-frequency`.
|
|
8
|
-
- **`post`** — the atomic unit. `post-status`
|
|
8
|
+
- **`post`** — the atomic unit. `post-status` is the post's ONE lifecycle: Idea → Briefed → Scripted → In Draft → Review → Scheduled → Published, or Archived (see below). Plus `post-format`, `post-platform`, `publish-date`, `post-hook`, `post-cta`; measured by `engagement-score` and `post-reach`.
|
|
9
9
|
- **`platform`** — a publishing account (social, newsletter publication, podcast). Carries its own cadence and audience metrics.
|
|
10
10
|
- **`newsletter`** — one issue of the owned channel. `newsletter-status`, `newsletter-pillar`.
|
|
11
11
|
- **`campaign`** and **`sponsor`** — reused from marketing / foundation, not owned here.
|
|
@@ -20,6 +20,15 @@ A post joins these through `post-stage`, `post-series`, `post-offer`; a repurpos
|
|
|
20
20
|
|
|
21
21
|
**Two axes, both optional, composable:** CURRICULUM (`series` — ordered, "which chapter is this?") and AUDIENCE STAGE (`journey-stage` — an unordered tag, "where is the reader?"). A post carries at most one of each. With neither, Content OS still works exactly as a post tracker — that is a valid end state, not an incomplete one.
|
|
22
22
|
|
|
23
|
+
## The post lifecycle and who moves it
|
|
24
|
+
|
|
25
|
+
The lifecycle is declared on the `post` kind (work model: `load_skill system/synap/work-model`). Categories: Idea = open; Briefed, Scripted, In Draft, Review, Scheduled = active; Published = done; Archived = lost and **human-only**.
|
|
26
|
+
|
|
27
|
+
- **Nothing publishes itself.** Your move to Published is a proposal the person approves on the preview. Never set Archived.
|
|
28
|
+
- **Every move goes through the door:** `update_entity` with `post-status` = the new option AND `expectedStatus` = the status you read. A `conflict` means someone moved it; re-read. Never invent an option.
|
|
29
|
+
- **Workers, as the model maps them:** **Draft** (per post, when it enters Briefed) · **Review prep** (per post, when it enters Review; ends by proposing the publish date) · **Ideas** (per batch, weekly; creates posts at Idea). Today the catalog ships them as Produce Content (enters Briefed, a person approves the script and the draft), Repurpose (enters Published) and Plan Next Content (weekly, off until the operator turns it on).
|
|
30
|
+
- **Results go on each post**, not only in a summary. "What to make next" = read the pipeline (the Posts board): gaps per pillar, posts waiting per status.
|
|
31
|
+
|
|
23
32
|
## The degradation rule — check before you assume
|
|
24
33
|
|
|
25
34
|
Read the world before you reason about it: `list_profiles` tells you the vocabulary actually provisioned, and the `## Pod Domains` block in your context tells you which domains exist.
|
|
@@ -6,12 +6,12 @@ The loop has three moves that compound. Each takes a one-off act and, if it's wo
|
|
|
6
6
|
|
|
7
7
|
| Do-once (author) | → Crystallize (curate) | Tool |
|
|
8
8
|
| --------------------------------------- | ----------------------------------- | ----------------------------- |
|
|
9
|
-
| Work a multi-step goal in a **session** | → a **
|
|
9
|
+
| Work a multi-step goal in a **session** | → a **work template** (the process) | `promote_session_to_playbook` |
|
|
10
10
|
| Show a result in a **cell** | → a **renderer** for an entity type | `promote_cell_to_renderer` |
|
|
11
11
|
|
|
12
12
|
### 1. Open a session for real work
|
|
13
13
|
|
|
14
|
-
When the task is a unit of work with a deliverable — research, a build, an investigation, a sprint — and there's no active session, **`start_session`** with a clear `goal` and `expectedOutputs`. The session is the spine that accrues results (see the focus-sessions skill). Don't open one for a one-shot lookup or a casual reply.
|
|
14
|
+
When the task is a unit of work with a deliverable — research, a build, an investigation, a sprint — and there's no active session, **`start_session`** with a clear `goal` and `expectedOutputs`. The start door hands back the pod's matching playbooks (`playbooks.candidates`) — read them before working ad-hoc, and start again with `templateId` when one fits. The session is the spine that accrues results (see the focus-sessions skill). Don't open one for a one-shot lookup or a casual reply.
|
|
15
15
|
|
|
16
16
|
### 2. Create a cell to REPORT — don't dump data into chat
|
|
17
17
|
|
|
@@ -22,22 +22,27 @@ When you have something to _show_ the user — a list of leads, a summary, a com
|
|
|
22
22
|
|
|
23
23
|
### 3. Promote a good cell to a renderer — recurring presentation
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Every kind already has a built-in card — the readable-first default nobody has to ask for (a brand-new user kind even gets one AUTOMATICALLY, built from its schema). Don't reach for this move by default; reach for it when the user explicitly asks for a different look and a cell has already proven it once.
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
- This is **governed**: for you it returns `{ status: "proposed", proposalId }`. That is the point — you author the renderer, the user reviews and curates it before it becomes every entity's view. Surface the proposal plainly ("I've proposed this as the detail view for bookmarks — review it when you like"), don't treat it as a failure.
|
|
29
|
-
- Use `scope: "pod"` only when the presentation should apply in every workspace; default to workspace scope.
|
|
27
|
+
When a cell is a _good, recurring way to present a whole entity type or step_ — e.g. every `bookmark`'s small card, every `lead`'s list row — promote it with `promote_cell_to_renderer`:
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
- Pick the `profileSlug` (the entity type), the `slot` (`list` | `card` | `detail` | `dashboard` — `card` is the small embeddable block; most "change how X looks" requests mean this one, not `detail`), and the `cellKey` from `create_cell`.
|
|
30
|
+
- This is **governed**: for you it returns `{ status: "proposed", proposalId }`. That is the point — you author the renderer, the user reviews and curates it before it becomes every entity's view. Surface the proposal plainly ("I've proposed this as the card for bookmarks — review it when you like"), don't treat it as a failure.
|
|
31
|
+
- Use `scope: "pod"` only when the presentation should apply in every workspace; default to workspace scope. Bind PER KIND — never as a blanket replacement for every kind's card.
|
|
32
|
+
- Once it lands, tell the user where to find or revert it: **"⋯ → Customize display"** on that kind's page.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
### 4. Promote a finished session to a template — recurring process
|
|
35
|
+
|
|
36
|
+
When the session is done **and the work was a repeatable process** (not a one-off), promote it with `promote_session_to_playbook({ sessionId })`. This captures the goal, tasks, expected outputs, and phases as a reusable **work template** (one sitting) — so next time the process starts pre-built instead of from scratch. Words: `concepts`.
|
|
34
37
|
|
|
35
38
|
- Do this at the _end_, once the promised outputs are produced and verified.
|
|
36
|
-
- Judge repeatability honestly: a bespoke, never-again investigation is not a
|
|
39
|
+
- Judge repeatability honestly: a bespoke, never-again investigation is not a template. "New-client onboarding" is a work template.
|
|
40
|
+
- If it should **run on its own** ("a weekly competitor scan"), that is a **Rule** that starts the work each cycle (`create_rule`), not a template alone.
|
|
41
|
+
- If the work is a **lasting goal** worked over weeks, start a **track** for it on the project (`start_track`) and run this work template in it (`trackId`) — a track needs no template of its own.
|
|
37
42
|
- Governed like the others — `promoted` (applied) or `proposed` (awaiting review) are both normal.
|
|
38
43
|
|
|
39
44
|
### The symmetry
|
|
40
45
|
|
|
41
|
-
Sessions and cells are the two things you _do_;
|
|
46
|
+
Sessions and cells are the two things you _do_; templates and renderers are the two things you _keep_. The instinct to build: **first do it once concretely, watch it work, then offer to crystallize it** — and let the user decide what becomes standing config. Never crystallize speculatively before the one-off has proven itself.
|
|
42
47
|
|
|
43
48
|
This is escalation ladder **L4**: crystallize only after proof. Blocked/missing structure climbs L2→L3 first (`escalation-ladder.md`); L4 is the success path, not a substitute for discovery.
|
package/skills/synap/crm.md
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
## CRM Workspaces —
|
|
1
|
+
## CRM Workspaces — identity, roles, deals
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A CRM workspace holds `person` and `company` (identity records), the `lead` and `client` ROLES those identities wear (facets, not entities), and `deal` (the sale). Understand this pattern when proposing lead captures, deal updates, or campaign membership.
|
|
4
4
|
|
|
5
|
-
**The model:**
|
|
5
|
+
**The model (one lifecycle per kind or role):**
|
|
6
6
|
|
|
7
7
|
- **`person` + `company`** — Identity only, no sales state. Persist across deals.
|
|
8
|
-
- **`
|
|
9
|
-
- **`
|
|
10
|
-
- **`
|
|
8
|
+
- **`lead` role** — qualification only. Attach it with `attach_facet` to the person/company; its status is `leadStage`: new, researching, outreach, engaged, qualified, nurturing, converted, disqualified.
|
|
9
|
+
- **`deal`** — the sale, and nothing before it. Its one lifecycle is `commercialStage`: draft, proposed, negotiating, won, lost. Linked to person/company via `linked_to_deal`. Open a deal only when a person chose to pursue the lead.
|
|
10
|
+
- **`client` role** — attached to the party when a deal is won. Status `clientStatus`: prospect, active, paused, former, churned. An ended relationship is `clientStatus: churned` — never a separate `churned` role.
|
|
11
11
|
|
|
12
12
|
**AI behavior — lead capture:**
|
|
13
13
|
|
|
14
|
-
When the user describes a lead (inbound person, prospect, or company lead)
|
|
14
|
+
When the user describes a lead (inbound person, prospect, or company lead):
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4. Create `linked_to_deal` relation connecting person/company to deal
|
|
16
|
+
1. Resolve the person/company first (email, domain, url); create only if none matches
|
|
17
|
+
2. `attach_facet` the `lead` role with `leadStage: "new"`
|
|
18
|
+
3. Do NOT open a deal yet — a deal starts when the person decides to pursue
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
A booked call (Cal.com) is lead evidence, not a deal. The booking already resolves the person (and company), attaches `lead` at `leadStage: "engaged"` — moving an earlier lead forward, never a qualified, nurturing, converted or disqualified one back — and links the call as an `event` `attended_by` the person. Do not open a deal for a booking.
|
|
22
21
|
|
|
23
22
|
```json
|
|
24
23
|
POST /api/hub/entities
|
|
@@ -27,50 +26,19 @@ POST /api/hub/entities
|
|
|
27
26
|
"title": "Alice Johnson",
|
|
28
27
|
"properties": { "email": "alice@acme.com", "role": "VP Engineering" }
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
POST /api/hub/entities
|
|
32
|
-
{ "userId": "{userId}", "workspaceId": "{wsId}",
|
|
33
|
-
"profileSlug": "deal",
|
|
34
|
-
"title": "Acme prospect",
|
|
35
|
-
"properties": { "dealStage": "lead", "estimatedValue": 50000 }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
POST /api/hub/relations
|
|
39
|
-
{ "userId": "{userId}",
|
|
40
|
-
"sourceEntityId": "ent_person_alice",
|
|
41
|
-
"targetEntityId": "ent_deal_acme",
|
|
42
|
-
"type": "linked_to_deal"
|
|
43
|
-
}
|
|
29
|
+
// then attach_facet { entityId: "ent_person_alice", facetSlug: "lead", properties: { "leadStage": "new" } }
|
|
44
30
|
```
|
|
45
31
|
|
|
46
|
-
**AI behavior —
|
|
32
|
+
**AI behavior — pursue, then win:**
|
|
47
33
|
|
|
48
|
-
When a deal
|
|
34
|
+
When the person chooses to pursue: create the `deal` at `commercialStage: "draft"`, link the party with `linked_to_deal`, and set the lead's `leadStage: "converted"`. When a person confirms the deal is won: set `commercialStage: "won"` and `attach_facet` the `client` role on the party with `clientStatus: "active"`. Moving a deal to won or lost is a person's call — propose it, never decide it.
|
|
35
|
+
|
|
36
|
+
Every status move goes through the one door (work model: `load_skill system/synap/work-model`): send the new value AND `expectedStatus` = the status you read (`update_entity` for the deal's `commercialStage`; `update_facet` for a role's status where your tools list it). A `conflict` means someone moved it: re-read. `converted` and `won` are done, `lost` and `disqualified` are lost: an agent's move into them proposes, and `disqualified` is a person's call only.
|
|
49
37
|
|
|
50
38
|
```json
|
|
51
39
|
PATCH /api/hub/entities/ent_deal_acme
|
|
52
|
-
{ "properties": { "
|
|
53
|
-
|
|
54
|
-
POST /api/hub/entities
|
|
55
|
-
{ "userId": "{userId}", "workspaceId": "{wsId}",
|
|
56
|
-
"profileSlug": "client",
|
|
57
|
-
"title": "Acme (active)",
|
|
58
|
-
"properties": { "clientStatus": "active" }
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
POST /api/hub/relations
|
|
62
|
-
{ "userId": "{userId}",
|
|
63
|
-
"sourceEntityId": "ent_person_alice",
|
|
64
|
-
"targetEntityId": "ent_client_acme",
|
|
65
|
-
"type": "is_client"
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
POST /api/hub/relations
|
|
69
|
-
{ "userId": "{userId}",
|
|
70
|
-
"sourceEntityId": "ent_deal_acme",
|
|
71
|
-
"targetEntityId": "ent_client_acme",
|
|
72
|
-
"type": "produced_by_deal"
|
|
73
|
-
}
|
|
40
|
+
{ "properties": { "commercialStage": "won" } }
|
|
41
|
+
// then attach_facet { entityId: "ent_company_acme", facetSlug: "client", properties: { "clientStatus": "active" } }
|
|
74
42
|
```
|
|
75
43
|
|
|
76
44
|
**AI behavior — campaign membership:**
|
|
@@ -96,8 +64,9 @@ POST /api/hub/relations
|
|
|
96
64
|
|
|
97
65
|
**Property names:**
|
|
98
66
|
|
|
99
|
-
- `
|
|
100
|
-
- `
|
|
67
|
+
- `commercialStage` on `deal` (never `dealStage`, `stage`, `crmStatus` or `status` — retired) — draft, proposed, negotiating, won, lost
|
|
68
|
+
- `leadStage` on the `lead` facet — new, researching, outreach, engaged, qualified, nurturing, converted, disqualified
|
|
69
|
+
- `clientStatus` on the `client` facet — prospect, active, paused, former, churned
|
|
101
70
|
- Identities (person, company) carry no sales state
|
|
102
71
|
|
|
103
72
|
**Why separate identity from state:**
|