@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
|
@@ -4,41 +4,318 @@
|
|
|
4
4
|
"status": "active",
|
|
5
5
|
"triggerConfig": {
|
|
6
6
|
"eventPattern": "entity.create.completed",
|
|
7
|
-
"filters": {
|
|
7
|
+
"filters": {
|
|
8
|
+
"profileSlug": "bookmark"
|
|
9
|
+
}
|
|
8
10
|
},
|
|
9
11
|
"flowDefinition": {
|
|
10
12
|
"nodes": [
|
|
11
13
|
{
|
|
12
14
|
"id": "trigger",
|
|
13
15
|
"type": "trigger",
|
|
14
|
-
"position": {
|
|
16
|
+
"position": {
|
|
17
|
+
"x": 0,
|
|
18
|
+
"y": 0
|
|
19
|
+
},
|
|
15
20
|
"data": {
|
|
16
21
|
"triggerType": "event",
|
|
17
22
|
"label": "Bookmark created",
|
|
18
23
|
"config": {
|
|
19
24
|
"eventPattern": "entity.create.completed",
|
|
20
|
-
"filters": {
|
|
25
|
+
"filters": {
|
|
26
|
+
"profileSlug": "bookmark"
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
30
|
},
|
|
24
31
|
{
|
|
25
|
-
"id": "
|
|
26
|
-
"type": "
|
|
27
|
-
"position": {
|
|
32
|
+
"id": "read",
|
|
33
|
+
"type": "entity_read",
|
|
34
|
+
"position": {
|
|
35
|
+
"x": 0,
|
|
36
|
+
"y": 120
|
|
37
|
+
},
|
|
28
38
|
"data": {
|
|
29
|
-
"label": "
|
|
30
|
-
"
|
|
31
|
-
|
|
39
|
+
"label": "Read the bookmark",
|
|
40
|
+
"entityId": "{{trigger.payload.subjectId}}"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "graph-context",
|
|
45
|
+
"type": "related_entities",
|
|
46
|
+
"position": {
|
|
47
|
+
"x": 0,
|
|
48
|
+
"y": 240
|
|
49
|
+
},
|
|
50
|
+
"data": {
|
|
51
|
+
"label": "What the graph already connects (deterministic)",
|
|
52
|
+
"entityId": "{{trigger.payload.subjectId}}",
|
|
53
|
+
"direction": "both",
|
|
54
|
+
"limit": 10
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "channel-talk",
|
|
59
|
+
"type": "messages_query",
|
|
60
|
+
"position": {
|
|
61
|
+
"x": 0,
|
|
62
|
+
"y": 360
|
|
63
|
+
},
|
|
64
|
+
"data": {
|
|
65
|
+
"label": "What was being discussed (deterministic)",
|
|
66
|
+
"channelId": "{{steps.read.output.entity.properties.sourceChannelId}}",
|
|
67
|
+
"limit": 10,
|
|
68
|
+
"errorHandling": {
|
|
69
|
+
"continueOnError": true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "sharer-lookup",
|
|
75
|
+
"type": "query",
|
|
76
|
+
"position": {
|
|
77
|
+
"x": 0,
|
|
78
|
+
"y": 480
|
|
79
|
+
},
|
|
80
|
+
"data": {
|
|
81
|
+
"label": "Resolve the sharer to a person entity (deterministic)",
|
|
82
|
+
"profileSlug": "person",
|
|
83
|
+
"filter": "{\"title\": \"{{steps.read.output.entity.properties.sharedBy}}\"}",
|
|
84
|
+
"limit": 5
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "has-sharer-name",
|
|
89
|
+
"type": "condition",
|
|
90
|
+
"position": {
|
|
91
|
+
"x": 0,
|
|
92
|
+
"y": 600
|
|
93
|
+
},
|
|
94
|
+
"data": {
|
|
95
|
+
"label": "Bookmark carries a sharer name?",
|
|
96
|
+
"expression": "steps.read.output.entity.properties.sharedBy !== ''"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "sharer-matches",
|
|
101
|
+
"type": "condition",
|
|
102
|
+
"position": {
|
|
103
|
+
"x": 0,
|
|
104
|
+
"y": 720
|
|
105
|
+
},
|
|
106
|
+
"data": {
|
|
107
|
+
"label": "Matched person's title equals the sharer name exactly?",
|
|
108
|
+
"expression": "steps.sharer-lookup.output.entities.0.title === steps.read.output.entity.properties.sharedBy"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "link-sharer",
|
|
113
|
+
"type": "output",
|
|
114
|
+
"position": {
|
|
115
|
+
"x": 0,
|
|
116
|
+
"y": 840
|
|
117
|
+
},
|
|
118
|
+
"data": {
|
|
119
|
+
"label": "Link bookmark → the person who shared it",
|
|
120
|
+
"outputType": "relation_create",
|
|
121
|
+
"config": {
|
|
122
|
+
"fromEntityId": "{{trigger.payload.subjectId}}",
|
|
123
|
+
"toEntityId": "{{steps.sharer-lookup.output.entities.0.id}}",
|
|
124
|
+
"relationType": "created_by"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "classify",
|
|
130
|
+
"type": "capability",
|
|
131
|
+
"position": {
|
|
132
|
+
"x": 0,
|
|
133
|
+
"y": 1200
|
|
134
|
+
},
|
|
135
|
+
"data": {
|
|
136
|
+
"label": "Describe + classify (AI) — title only if the captured one is unusable",
|
|
137
|
+
"verbId": "ai.generate",
|
|
32
138
|
"inputMapping": {
|
|
33
|
-
"
|
|
139
|
+
"system": "You name saved links for a personal knowledge base. Answer with a JSON object and nothing else: {\"title\": string, \"description\": string, \"category\": string}. `title` is a short human-readable name for the link (max 70 chars, no URL, no quotes). `description` is one factual sentence (max 200 chars). `category` is ONE lowercase word from: article, video, tool, repo, docs, social, media, other. You CANNOT open the link. Use ONLY the URL, the already-resolved graph context and the surrounding conversation you are given. `description` and `category` are ALWAYS used. `title` is used ONLY when the link has no usable name yet — when 'Current name' below already reads like a real title, it is kept and yours is discarded, so never optimise for replacing it. If the material does not tell you what the page is, set `title` to the empty string rather than guessing.",
|
|
140
|
+
"prompt": "URL: {{steps.read.output.entity.properties.url}}\nCurrent name: {{steps.read.output.entity.title}}\nShared by: {{steps.read.output.entity.properties.sharedBy}}\n\nAlready connected in the graph:\n{{steps.graph-context.output.entities}}\n\nSurrounding conversation in the source channel:\n{{steps.channel-talk.output.messages}}\n\nThe message it arrived in:\n{{steps.read.output.entity.preview}}",
|
|
141
|
+
"json": "true",
|
|
142
|
+
"maxTokens": "2000"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "apply-enrich",
|
|
148
|
+
"type": "output",
|
|
149
|
+
"position": {
|
|
150
|
+
"x": -400,
|
|
151
|
+
"y": 1500
|
|
152
|
+
},
|
|
153
|
+
"data": {
|
|
154
|
+
"label": "Write description + category back (always)",
|
|
155
|
+
"outputType": "entity_update",
|
|
156
|
+
"config": {
|
|
157
|
+
"entityId": "{{trigger.payload.subjectId}}",
|
|
158
|
+
"properties": {
|
|
159
|
+
"description": "{{steps.classify.output.description}}",
|
|
160
|
+
"category": "{{steps.classify.output.category}}"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "title-present",
|
|
167
|
+
"type": "condition",
|
|
168
|
+
"position": {
|
|
169
|
+
"x": 400,
|
|
170
|
+
"y": 1350
|
|
171
|
+
},
|
|
172
|
+
"data": {
|
|
173
|
+
"label": "Did the link arrive with a name?",
|
|
174
|
+
"expression": "steps.read.output.entity.title !== ''"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "title-not-url",
|
|
179
|
+
"type": "condition",
|
|
180
|
+
"position": {
|
|
181
|
+
"x": 400,
|
|
182
|
+
"y": 1470
|
|
183
|
+
},
|
|
184
|
+
"data": {
|
|
185
|
+
"label": "…and is that name more than the raw URL?",
|
|
186
|
+
"expression": "steps.read.output.entity.title !== steps.read.output.entity.properties.url"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "usable-title",
|
|
191
|
+
"type": "guard",
|
|
192
|
+
"position": {
|
|
193
|
+
"x": 0,
|
|
194
|
+
"y": 1320
|
|
195
|
+
},
|
|
196
|
+
"data": {
|
|
197
|
+
"label": "Only rename when the model produced a real title",
|
|
198
|
+
"checks": [
|
|
199
|
+
{
|
|
200
|
+
"path": "steps.classify.output.title",
|
|
201
|
+
"minLength": 3,
|
|
202
|
+
"message": "ai.generate returned no usable title — leaving the bookmark's captured name untouched."
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "apply-title",
|
|
209
|
+
"type": "output",
|
|
210
|
+
"position": {
|
|
211
|
+
"x": 0,
|
|
212
|
+
"y": 1440
|
|
213
|
+
},
|
|
214
|
+
"data": {
|
|
215
|
+
"label": "Write the AI title back (only when the captured one was unusable)",
|
|
216
|
+
"outputType": "entity_update",
|
|
217
|
+
"config": {
|
|
218
|
+
"entityId": "{{trigger.payload.subjectId}}",
|
|
219
|
+
"title": "{{steps.classify.output.title}}",
|
|
220
|
+
"properties": {
|
|
221
|
+
"title": "{{steps.classify.output.title}}"
|
|
222
|
+
}
|
|
34
223
|
}
|
|
35
224
|
}
|
|
36
225
|
}
|
|
37
226
|
],
|
|
38
|
-
"edges": [
|
|
227
|
+
"edges": [
|
|
228
|
+
{
|
|
229
|
+
"id": "trigger->read",
|
|
230
|
+
"source": "trigger",
|
|
231
|
+
"target": "read"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "read->graph-context",
|
|
235
|
+
"source": "read",
|
|
236
|
+
"target": "graph-context"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "graph-context->channel-talk",
|
|
240
|
+
"source": "graph-context",
|
|
241
|
+
"target": "channel-talk"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "channel-talk->sharer-lookup",
|
|
245
|
+
"source": "channel-talk",
|
|
246
|
+
"target": "sharer-lookup"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"id": "sharer-lookup->has-sharer-name",
|
|
250
|
+
"source": "sharer-lookup",
|
|
251
|
+
"target": "has-sharer-name"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"id": "has-sharer-name->sharer-matches",
|
|
255
|
+
"source": "has-sharer-name",
|
|
256
|
+
"target": "sharer-matches",
|
|
257
|
+
"sourceHandle": "yes"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "sharer-matches->link-sharer",
|
|
261
|
+
"source": "sharer-matches",
|
|
262
|
+
"target": "link-sharer",
|
|
263
|
+
"sourceHandle": "yes"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"id": "link-sharer->classify",
|
|
267
|
+
"source": "link-sharer",
|
|
268
|
+
"target": "classify"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "has-sharer-name->classify",
|
|
272
|
+
"source": "has-sharer-name",
|
|
273
|
+
"target": "classify",
|
|
274
|
+
"sourceHandle": "no"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"id": "sharer-matches->classify",
|
|
278
|
+
"source": "sharer-matches",
|
|
279
|
+
"target": "classify",
|
|
280
|
+
"sourceHandle": "no"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "classify->apply-enrich",
|
|
284
|
+
"source": "classify",
|
|
285
|
+
"target": "apply-enrich"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "classify->title-present",
|
|
289
|
+
"source": "classify",
|
|
290
|
+
"target": "title-present"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "title-present->title-not-url",
|
|
294
|
+
"source": "title-present",
|
|
295
|
+
"target": "title-not-url",
|
|
296
|
+
"sourceHandle": "yes"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"id": "title-present->usable-title",
|
|
300
|
+
"source": "title-present",
|
|
301
|
+
"target": "usable-title",
|
|
302
|
+
"sourceHandle": "no"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "title-not-url->usable-title",
|
|
306
|
+
"source": "title-not-url",
|
|
307
|
+
"target": "usable-title",
|
|
308
|
+
"sourceHandle": "no"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"id": "usable-title->apply-title",
|
|
312
|
+
"source": "usable-title",
|
|
313
|
+
"target": "apply-title"
|
|
314
|
+
}
|
|
315
|
+
]
|
|
39
316
|
},
|
|
40
317
|
"metadata": {
|
|
41
318
|
"source": "bridge-template",
|
|
42
|
-
"note": "
|
|
319
|
+
"note": "DETERMINISTIC-FIRST. Everything reachable without a network call runs BEFORE the AI: `related_entities` (what the graph already connects to this bookmark — the capture flow's `references` edge to the channel's bound entity lands here), `messages_query` on the captured `sourceChannelId` (what was being discussed), and a `query` on `person` resolving the captured `sharedBy` display name to a real person entity, linked with the EXISTING `created_by` relation def (no new def, no new node type). ai.generate is now the LAST RESORT: it runs only when the captured name is empty OR is the raw URL — the branch `title-present`→`title-not-url` — so a human-written message preview is never overwritten by a guess, and when the AI does run it is handed the deterministic context instead of a bare URL. Two condition merges (`title-present`, `classify`) rely on markDescendantsSkipped's live-parent rule (graph-topology.ts) — a merge node survives as long as ONE incoming edge is unpruned. `sharer-lookup` uses the STRING filter form on purpose: `parseQueryFilterConditions` template-resolves a STRING filter but pushes an OBJECT filter's values RAW, so the object form would have compared the literal `{{...}}` text and silently matched nothing. The `sharer-matches` exact-equality condition is the containment for that string form: if a name with a quote breaks JSON.parse the filter is dropped and the query widens, and this check refuses to link a non-identical title. `messages_query` carries `continueOnError` because it THROWS when the channel is not visible in the automation's workspace. NOT expressible today: host→company/tool matching. `transform` has no host/hostname pipe and the query filter compiles only exact equality ($eq/$gt/$gte/$lt/$lte/$ne — no substring/LIKE), so a host could never be matched against a `website` property holding a full URL. A page `fetch` is deliberately still absent."
|
|
43
320
|
}
|
|
44
|
-
}
|
|
321
|
+
}
|
|
@@ -22,18 +22,36 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"id": "
|
|
25
|
+
"id": "content",
|
|
26
26
|
"type": "transform",
|
|
27
27
|
"position": { "x": 0, "y": 120 },
|
|
28
28
|
"data": {
|
|
29
|
-
"label": "
|
|
30
|
-
"expression": "{{trigger.payload.data.content}} |
|
|
29
|
+
"label": "Trim message text",
|
|
30
|
+
"expression": "{{trigger.payload.data.content}} | trim"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "title-src",
|
|
35
|
+
"type": "transform",
|
|
36
|
+
"position": { "x": 0, "y": 240 },
|
|
37
|
+
"data": {
|
|
38
|
+
"label": "Human text (title source)",
|
|
39
|
+
"expression": "{{trigger.payload.data.messagePreview}} | trim"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "extract",
|
|
44
|
+
"type": "transform",
|
|
45
|
+
"position": { "x": 0, "y": 360 },
|
|
46
|
+
"data": {
|
|
47
|
+
"label": "Extract URLs · drop bare-link noise",
|
|
48
|
+
"expression": "{{trigger.payload.data.content}} | url_extract | unique | filter:item !== steps.content.output.result | slice:5"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
{
|
|
34
52
|
"id": "url-loop",
|
|
35
53
|
"type": "loop",
|
|
36
|
-
"position": { "x": 0, "y":
|
|
54
|
+
"position": { "x": 0, "y": 480 },
|
|
37
55
|
"data": {
|
|
38
56
|
"label": "For each URL",
|
|
39
57
|
"iteratorExpression": "steps.extract.output.result",
|
|
@@ -43,28 +61,72 @@
|
|
|
43
61
|
{
|
|
44
62
|
"id": "create-bookmark",
|
|
45
63
|
"type": "output",
|
|
46
|
-
"position": { "x": 0, "y":
|
|
64
|
+
"position": { "x": 0, "y": 600 },
|
|
47
65
|
"data": {
|
|
48
66
|
"label": "Create bookmark",
|
|
49
67
|
"outputType": "entity_create",
|
|
50
68
|
"config": {
|
|
51
69
|
"profileSlug": "bookmark",
|
|
52
|
-
"title": "{{
|
|
70
|
+
"title": "{{steps.title-src.output.result}}",
|
|
53
71
|
"dedupeBy": "url",
|
|
72
|
+
"body": "{{steps.content.output.result}}",
|
|
54
73
|
"properties": {
|
|
55
74
|
"url": "{{loop.item}}",
|
|
75
|
+
"sourceChannelId": "{{trigger.payload.data.channelId}}",
|
|
76
|
+
"sourceThreadId": "{{trigger.payload.data.threadId}}",
|
|
56
77
|
"sourceMessageId": "{{trigger.payload.data.messageId}}",
|
|
57
|
-
"
|
|
78
|
+
"sourceProvider": "{{trigger.payload.data.provider}}",
|
|
79
|
+
"sharedBy": "{{trigger.payload.data.participantName}}"
|
|
58
80
|
}
|
|
59
81
|
}
|
|
60
82
|
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "has-bookmark-id",
|
|
86
|
+
"type": "condition",
|
|
87
|
+
"position": { "x": 0, "y": 720 },
|
|
88
|
+
"data": {
|
|
89
|
+
"label": "Bookmark row exists?",
|
|
90
|
+
"expression": "steps.create-bookmark.output.entityId !== ''"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "has-context-entity",
|
|
95
|
+
"type": "condition",
|
|
96
|
+
"position": { "x": 0, "y": 840 },
|
|
97
|
+
"data": {
|
|
98
|
+
"label": "Channel bound to an entity?",
|
|
99
|
+
"expression": "trigger.payload.data.entityId !== ''"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "link-context",
|
|
104
|
+
"type": "output",
|
|
105
|
+
"position": { "x": 0, "y": 960 },
|
|
106
|
+
"data": {
|
|
107
|
+
"label": "Link bookmark → channel's entity",
|
|
108
|
+
"outputType": "relation_create",
|
|
109
|
+
"config": {
|
|
110
|
+
"fromEntityId": "{{steps.create-bookmark.output.entityId}}",
|
|
111
|
+
"toEntityId": "{{trigger.payload.data.entityId}}",
|
|
112
|
+
"relationType": "references"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
61
115
|
}
|
|
62
116
|
],
|
|
63
117
|
"edges": [
|
|
64
|
-
{ "id": "e1", "source": "trigger", "target": "
|
|
65
|
-
{ "id": "e2", "source": "
|
|
66
|
-
{ "id": "e3", "source": "
|
|
118
|
+
{ "id": "e1", "source": "trigger", "target": "content" },
|
|
119
|
+
{ "id": "e2", "source": "content", "target": "title-src" },
|
|
120
|
+
{ "id": "e3", "source": "title-src", "target": "extract" },
|
|
121
|
+
{ "id": "e4", "source": "extract", "target": "url-loop" },
|
|
122
|
+
{ "id": "e5", "source": "url-loop", "target": "create-bookmark" },
|
|
123
|
+
{ "id": "e6", "source": "create-bookmark", "target": "has-bookmark-id" },
|
|
124
|
+
{ "id": "e7", "source": "has-bookmark-id", "target": "has-context-entity", "sourceHandle": "yes" },
|
|
125
|
+
{ "id": "e8", "source": "has-context-entity", "target": "link-context", "sourceHandle": "yes" }
|
|
67
126
|
]
|
|
68
127
|
},
|
|
69
|
-
"metadata": {
|
|
128
|
+
"metadata": {
|
|
129
|
+
"source": "bridge-template",
|
|
130
|
+
"note": "Phase 1 is DETERMINISTIC — no AI. It keeps the context the trigger already hands it: data.channelId (the INTERNAL Synap channel UUID, not the Discord snowflake, which is kept separately as sourceThreadId), data.content (as the bookmark body) and data.entityId (the channel's bound entity, linked with a `references` relation). Title = the message's own 120-char preview; when the message is nothing but a link the item is dropped by the noise filter rather than named, so the title is never invented. Noise filter: `filter:item !== steps.content.output.result` keeps only links that arrived WITH human text — a Tenor/giphy GIF drop or a bare Google Photos paste is exactly a message whose whole trimmed text IS the URL. A host denylist is NOT expressible: the condition grammar (condition-eval.ts) has no substring/regex operator and `contains` is exact set intersection, so any 'tenor.com'-style match would silently never fire."
|
|
131
|
+
}
|
|
70
132
|
}
|
|
@@ -32,7 +32,7 @@ A playbook is **not** authored as a standalone file. It ships **inside a Capabil
|
|
|
32
32
|
2. It is materialized by `createCapabilityFromDefinition()` when the capability is applied via `POST /api/hub/capabilities/apply`. Playbooks REQUIRE a `workspaceId` at apply time.
|
|
33
33
|
3. The Discord bridge seeds it by adding the capability key to `AGENCY_CAPABILITY_PLAN` in `synap-cli/src/commands/bridge-setup.ts` with `workspaceScoped: true` (the flag that tells the bridge this capability bundles playbooks, so it must be applied with a workspace).
|
|
34
34
|
|
|
35
|
-
**GOTCHA — do not copy the vestigial file.** `synap-control-plane-api/templates/packs/deep-research.playbook.json` looks like a standalone playbook template but it is VESTIGIAL: its playbook-specific fields are dropped during materialization. Never copy it or treat it as the schema. The authoritative shape is the `playbooks[]` entry inside a `.capability.json`. For a real example **with ordered stages**, see `
|
|
35
|
+
**GOTCHA — do not copy the vestigial file.** `synap-control-plane-api/templates/packs/deep-research.playbook.json` looks like a standalone playbook template but it is VESTIGIAL: its playbook-specific fields are dropped during materialization. Never copy it or treat it as the schema. The authoritative shape is the `playbooks[]` entry inside a `.capability.json`. For a real example **with ordered stages**, see the "Grant Process" playbook in `synap-app/packages/workspace-templates/src/grants.yaml` (a `scope: project` method with 6 stages) and `reference/worked-example.md` (note: `agency-skills.capability.json` bundles playbooks but their `stages` are `[]`, so it does not demo the stages contract).
|
|
36
36
|
|
|
37
37
|
## Playbook field reference
|
|
38
38
|
|
|
@@ -68,13 +68,16 @@ Stages are **ordered** and drive the session's progression. Read `reference/stag
|
|
|
68
68
|
```jsonc
|
|
69
69
|
"stages": [
|
|
70
70
|
{
|
|
71
|
-
"key": "scope", // stable id, referenced by currentStage
|
|
71
|
+
"key": "scope", // stable id, referenced by currentStage. Unique within the playbook.
|
|
72
72
|
"name": "Scope",
|
|
73
|
+
"category": "started", // REQUIRED. backlog | planned | started | paused | completed | canceled
|
|
73
74
|
"description": "Understand the client and their problem.",
|
|
74
75
|
"goal": "Produce a one-paragraph problem statement.", // optional
|
|
75
76
|
"grants": [{ "kind": "skill", "id": "client-brief" }], // optional, advisory hint (not enforced)
|
|
76
77
|
"expectedOutputs": [{ "kind": "note", "label": "Problem statement" }],
|
|
77
|
-
"suggestedTasks": ["Read the intake form", "List open questions"]
|
|
78
|
+
"suggestedTasks": ["Read the intake form", "List open questions"],
|
|
79
|
+
"position": 0, // optional, orders WITHIN the category group
|
|
80
|
+
"indefinite": false // optional, may a subject sit here forever?
|
|
78
81
|
}
|
|
79
82
|
]
|
|
80
83
|
```
|
|
@@ -8,14 +8,28 @@ Stages are the first-class, ordered process steps of a playbook. They replaced t
|
|
|
8
8
|
type PlaybookStage = {
|
|
9
9
|
key: string; // stable identifier; what currentStage holds. Required.
|
|
10
10
|
name: string; // human label. Required.
|
|
11
|
+
category: PlaybookStageCategory; // closed rollup bucket. REQUIRED — see below.
|
|
11
12
|
description?: string; // what this stage is about
|
|
12
13
|
goal?: string; // the concrete objective of this stage
|
|
13
14
|
grants?: CapabilityRef[]; // advisory capability hints ({ kind: tool|skill|command, id }) — see note below
|
|
14
15
|
expectedOutputs?: ExpectedOutput[];// deliverables expected before advancing ({ kind, label }; kind loosely typed)
|
|
15
16
|
suggestedTasks?: string[]; // soft checklist the agent can turn into tasks
|
|
17
|
+
position?: number; // order WITHIN this stage's category group — not a global order
|
|
18
|
+
indefinite?: boolean; // may a subject sit here forever? absent/false ⇒ a long dwell is worth surfacing
|
|
16
19
|
};
|
|
20
|
+
|
|
21
|
+
type PlaybookStageCategory =
|
|
22
|
+
| "backlog" // not committed
|
|
23
|
+
| "planned" // committed, not begun
|
|
24
|
+
| "started" // work under way
|
|
25
|
+
| "paused" // on hold
|
|
26
|
+
| "completed" // terminal, succeeded
|
|
27
|
+
| "canceled"; // terminal, abandoned
|
|
17
28
|
```
|
|
18
29
|
|
|
30
|
+
- `category` is **required and validated** — a write with a stage missing it, or carrying a value outside the six, is REJECTED at the door. `key`/`name` are your playbook's own vocabulary; `category` is the shared axis every playbook rolls up onto, so a board spanning several playbooks can group them without reconciling names (two playbooks' key sets are disjoint by construction). Pick the bucket by what the stage MEANS, not by its position: a stage named "Review" is `started` if someone is working it and `paused` if it is waiting on an outsider.
|
|
31
|
+
- `key` values must be **unique within one playbook** — `currentStage` stores the bare key, so a duplicate makes the active stage ambiguous. Also rejected at the door.
|
|
32
|
+
- `position` orders a stage **within its category group**, not globally. This is why ordering never needs cross-playbook reconciliation.
|
|
19
33
|
- `key` is **stable** — `focus_sessions.currentStage` stores it, and `stage_changed` events carry it. Don't rename keys on a live playbook; add/deprecate instead.
|
|
20
34
|
- Stages are **ordered** by their position in the `stages[]` array.
|
|
21
35
|
- `grants` here are **advisory**: stored as opaque JSON and surfaced to the agent in the stage's kickoff prompt via `RunContext`, but NOT resolved into enforcement `capability` / `link` rows (hard enforcement is a documented follow-up). "Granting" a skill at a stage = telling the agent to use it there; the skill is already reachable via the pod skill catalog + `load_skill` regardless. Declare grants on stages, not at the playbook level — top-level playbook `grants` are dropped during materialization.
|
|
@@ -29,6 +43,7 @@ type PlaybookStage = {
|
|
|
29
43
|
|
|
30
44
|
## Design rules
|
|
31
45
|
|
|
46
|
+
- Assign `category` honestly. Most working stages are `started`; reserve `paused` for genuinely blocked-on-someone-else, and use `completed`/`canceled` only for terminal stages. Marking every stage `started` makes a cross-playbook board useless.
|
|
32
47
|
- Keep stages **few and meaningful** (3–6 is typical). Each stage should represent a real change in what the agent is doing or waiting on.
|
|
33
48
|
- Give every stage a `goal` and at least one `expectedOutput` so "done with this stage" is observable.
|
|
34
49
|
- Use `suggestedTasks` for the soft checklist; use `expectedOutputs` for the hard deliverables that gate advancement. For `expectedOutputs[].kind`, keep to the shared (loosely typed) vocab `note` | `document` | `report`.
|
|
@@ -27,6 +27,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
|
|
|
27
27
|
{
|
|
28
28
|
"key": "scope",
|
|
29
29
|
"name": "Scope",
|
|
30
|
+
"category": "started",
|
|
30
31
|
"description": "Understand the company and the problem worth solving.",
|
|
31
32
|
"goal": "Produce a one-paragraph problem statement grounded in the company context.",
|
|
32
33
|
"grants": [{ "kind": "skill", "id": "client-brief" }],
|
|
@@ -36,6 +37,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
|
|
|
36
37
|
{
|
|
37
38
|
"key": "abstract",
|
|
38
39
|
"name": "Abstract",
|
|
40
|
+
"category": "started",
|
|
39
41
|
"description": "Turn the problem into a buildable specification.",
|
|
40
42
|
"goal": "Write a spec: scope, constraints, success criteria, and the smallest first deliverable.",
|
|
41
43
|
"expectedOutputs": [{ "kind": "document", "label": "Buildable spec" }],
|
|
@@ -44,6 +46,7 @@ This is a `playbooks[]` entry inside a `.capability.json` (NOT a standalone file
|
|
|
44
46
|
{
|
|
45
47
|
"key": "build",
|
|
46
48
|
"name": "Build",
|
|
49
|
+
"category": "started",
|
|
47
50
|
"description": "Ship the first deliverable against the spec.",
|
|
48
51
|
"goal": "Produce a working first build and link it to the company.",
|
|
49
52
|
"grants": [{ "kind": "tool", "id": "gdrive" }],
|
package/dist/commands/infra.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* synap infra
|
|
3
|
-
*
|
|
4
|
-
* Infrastructure management via Dokploy — view servers, trigger deploys,
|
|
5
|
-
* tail logs, and sync server state into Synap entities.
|
|
6
|
-
*
|
|
7
|
-
* synap infra — overview: servers + services status
|
|
8
|
-
* synap infra status — same as above
|
|
9
|
-
* synap infra deploy <app> — trigger a redeploy for a named app
|
|
10
|
-
* synap infra logs <app> — tail logs for a service
|
|
11
|
-
* synap infra sync — pull Dokploy state into Synap entities
|
|
12
|
-
* synap infra open — open Dokploy dashboard in browser
|
|
13
|
-
*/
|
|
14
|
-
export declare function infraStatus(): Promise<void>;
|
|
15
|
-
export declare function infraDeploy(appName: string): Promise<void>;
|
|
16
|
-
export declare function infraLogs(appName: string, opts: {
|
|
17
|
-
lines?: number;
|
|
18
|
-
follow?: boolean;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
export declare function infraSync(podUrl: string, apiKey: string): Promise<void>;
|
|
21
|
-
export declare function infraOpen(): void;
|