@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
|
@@ -13,7 +13,7 @@ description: >
|
|
|
13
13
|
about the PACKAGE layer: finding, installing, and publishing reusable
|
|
14
14
|
templates/capabilities/automations/cells to/from the Control Plane catalog.
|
|
15
15
|
metadata:
|
|
16
|
-
|
|
16
|
+
synap:
|
|
17
17
|
requires:
|
|
18
18
|
env: []
|
|
19
19
|
optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID, SYNAP_HUB_API_KEY]
|
|
@@ -27,11 +27,79 @@ metadata:
|
|
|
27
27
|
|
|
28
28
|
# Marketplace & templates on Synap
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
Synap is **configuration-first**: a feature is _stored, user-editable config_
|
|
31
|
+
published to one catalog and installed through shared substrate — not hardcoded in
|
|
32
|
+
the pod backend. The marketplace is that **package layer**, and the catalog
|
|
33
|
+
(`synap_packages`) is **kind-agnostic** — one door serves every kind:
|
|
34
|
+
|
|
35
|
+
| Kind | Configures | Standalone install (via `applyMarketInstall`) |
|
|
36
|
+
| ------------------------- | ---------------------------------------------------------------- | -------------------------------------------------- |
|
|
37
|
+
| **workspace** | a whole domain (profiles + views + bento + its caps/automations) | ✅ `createWorkspaceFromDefinitionIdempotent` |
|
|
38
|
+
| **capability** | a credentialed tool pack (+ embedded skills/playbooks) | ✅ `createCapabilityFromDefinition` |
|
|
39
|
+
| **cell** | a renderer — the code that draws an entity/widget | ✅ `installCellFromDefinition` (needs a cache row) |
|
|
40
|
+
| **view** | a saved view/layout | ✅ `viewsRouter.create` (needs a `workspaceId`) |
|
|
41
|
+
| **skill** | agent know-how | ✅ `skillsRouter.create` (pod-wide if no ws) |
|
|
42
|
+
| **workflow / automation** | a WHEN→ACTION flow | ✅ `automationsRouter.create` into acting ws |
|
|
43
|
+
|
|
44
|
+
**All six kinds install standalone today** through the ONE apply core
|
|
45
|
+
`applyMarketInstall` (`services/capabilities/marketplace-install.ts`) — the same
|
|
46
|
+
governed door `market.install` and the `capability.install` proposal executor share,
|
|
47
|
+
each reusing the kind's _governed_ router caller (zero duplicated insert logic). The
|
|
48
|
+
remaining gaps are NOT install: (1) **private-package sync is unauthenticated**, so a
|
|
49
|
+
private package can't reach a pod yet (see `governance-and-catalog.md` / RC4); (2)
|
|
50
|
+
standalone **view / skill / automation stamp no source-link**, so they don't self-heal
|
|
51
|
+
via reconcile the way workspace/capability do. (Subscription-`tier` gating is a
|
|
52
|
+
separate axis — see `governance-and-catalog.md`.)
|
|
53
|
+
|
|
54
|
+
**Words** (template, pack, workspace/work/track/rule template) are defined once
|
|
55
|
+
in the `synap` skill's `concepts` topic. In short: a template's kind is DERIVED
|
|
56
|
+
from its content (a playbook with `scope: "project"` is a track template, the
|
|
57
|
+
default `scope: "session"` a work template), never declared.
|
|
58
|
+
|
|
59
|
+
**A pack is not a seventh kind.** Today it ships as a **suite**: a `workspace`
|
|
60
|
+
package tagged `suite` that `require`s its constituent workspaces, built from a
|
|
61
|
+
live project with `synap market publish --from-project <id>`, and installed
|
|
62
|
+
with `--project <id>` to link every workspace to that project. See
|
|
63
|
+
`install.md` → "Project packs". The model it is moving to: a pack lists the
|
|
64
|
+
workspace templates it depends on and installs the missing ones, and never
|
|
65
|
+
creates a workspace of its own.
|
|
66
|
+
|
|
67
|
+
It lives in the Control Plane (CP) catalog and is discoverable and installable from
|
|
68
|
+
any door: the `synap` CLI, MCP (`market_search` / `run_capability`), or the Hub REST
|
|
69
|
+
API. **Everything that is config, not code, can be a template** — workspaces, entity
|
|
70
|
+
profiles/views, renderers (cells), capabilities, skills, automations.
|
|
71
|
+
|
|
72
|
+
## The authoring order — bottom-up, ALWAYS
|
|
73
|
+
|
|
74
|
+
Everything installable is a **standalone package**, and packages form a graph: a
|
|
75
|
+
bigger one **declares `dependencies[]`** on smaller ones, and the pod installs the
|
|
76
|
+
missing ones in the same governed pass. So author from the SMALLEST piece up:
|
|
77
|
+
|
|
78
|
+
1. **Basic objects** — entity types (profiles), **skills**, capabilities, cells,
|
|
79
|
+
views, workflow/automations. Each is publishable on its OWN and is useful before
|
|
80
|
+
any container exists. A skill package is one skill: its documentation or code.
|
|
81
|
+
2. **Containers** — a **space** (a `workspace` template) that declares
|
|
82
|
+
`dependencies[]` on the basic objects it needs, and activates its skills with a
|
|
83
|
+
`skills:` block.
|
|
84
|
+
3. **Compositions** — a **project / suite** ("truck") that `require`s the spaces.
|
|
85
|
+
|
|
86
|
+
Publish the small pieces FIRST, then the space, then install. Nothing in the chain
|
|
87
|
+
waits on a container.
|
|
88
|
+
|
|
89
|
+
**The two verbs are different, and confusing them is the classic mistake:**
|
|
90
|
+
|
|
91
|
+
- `dependencies[]` = what gets **INSTALLED** — the pod materialises the package if
|
|
92
|
+
it is not already there (idempotent; a second pass reports `found`).
|
|
93
|
+
- `skills:` inside a template = what gets **LINKED** to that space, and in which
|
|
94
|
+
mode (`always` / `on-demand`). It names a skill some `dependencies[]` entry —
|
|
95
|
+
usually its own — already installed. Declaring the link without the dependency
|
|
96
|
+
installs cleanly and links NOTHING.
|
|
97
|
+
|
|
98
|
+
**Never inline what is already a package.** Copying a skill's text into a template,
|
|
99
|
+
or re-declaring a profile set that ships as a dependency, forks the thing and stops
|
|
100
|
+
it converging. Depend on it; let the install bring it. And **never** seed a skill
|
|
101
|
+
into the backend (`skills/synap/…`) to make a template resolve — that directory is
|
|
102
|
+
not the marketplace. Publish it as a package.
|
|
35
103
|
|
|
36
104
|
## The two reflexes
|
|
37
105
|
|
|
@@ -67,7 +135,7 @@ REST API (`/api/hub/capabilities/execute`).
|
|
|
67
135
|
The CLI's browse filter (`market --type`) uses
|
|
68
136
|
`workspace|capability|skill|workflow|view|cell`; the pod-native install verb
|
|
69
137
|
(`market.install`) and its catalog use the narrower
|
|
70
|
-
`capability|automation|template|cell` (workspace
|
|
138
|
+
`capability|automation|template|cell` (`template` there means a workspace template). Match
|
|
71
139
|
whichever surface you're calling.
|
|
72
140
|
|
|
73
141
|
## Visibility
|
|
@@ -149,7 +217,7 @@ human.
|
|
|
149
217
|
synap market install crm # install as a new workspace
|
|
150
218
|
synap market install crm --dry-run # preview: would-create / reuse / conflicts, writes nothing
|
|
151
219
|
synap market install crm --onto <workspaceId> # reconcile ONTO an existing workspace (additive)
|
|
152
|
-
synap market install crm --project <id> #
|
|
220
|
+
synap market install crm --project <id> # link the installed workspace(s) to an EXISTING project (id only)
|
|
153
221
|
```
|
|
154
222
|
|
|
155
223
|
Installs are **workspace-first**: a `workspace`/`template` package spins up
|
|
@@ -157,6 +225,8 @@ Installs are **workspace-first**: a `workspace`/`template` package spins up
|
|
|
157
225
|
automation, cell) route you to the right surface (`synap capability add`,
|
|
158
226
|
etc.) rather than being force-fit into a workspace install.
|
|
159
227
|
|
|
228
|
+
**One space per domain:** A space is a domain, installed once (Content, Brand, CRM…). A project is a filter across spaces. To make something “for project X”: file it into X inside the domain's space (`file_into_project`), and link X to the space (`project_use_workspace`). Never create a space named after a project, a brand or a client. Reinstalling reuses the live space. A template is installed **once per pod**, and a space name is held by **one** active space — whoever owns it, human or agent alike: a second copy is refused (`409` — `status: "exists"` + the space to use, or `WORKSPACE_IDENTITY_CONFLICT` naming the space that holds it). There are no named copies: `--as <name>` / `instanceName` answers `400`, and a package with no `_meta.slug` (and no `--onto` target) answers `400` instead of minting a second space.
|
|
229
|
+
|
|
160
230
|
## Pod verb — `market.install` (MCP / agent / automation)
|
|
161
231
|
|
|
162
232
|
```json
|
|
@@ -180,6 +250,59 @@ never treat a non-"installed" response as failure:
|
|
|
180
250
|
they can approve it — don't retry, don't report it as a failure. See
|
|
181
251
|
`governance-and-catalog.md`.
|
|
182
252
|
|
|
253
|
+
## Project packs — a suite of workspaces, linked to a project
|
|
254
|
+
|
|
255
|
+
A **project** is a cross-cutting lens over workspaces, not a package kind. A
|
|
256
|
+
"project pack" is a **suite**: an ordinary `workspace`-category package tagged
|
|
257
|
+
`suite`, whose `dependencies[]` **`require`** each constituent workspace package
|
|
258
|
+
(never `compose` — re-applying must not duplicate workspaces). Installing a
|
|
259
|
+
suite installs every constituent workspace (idempotent: reused if present).
|
|
260
|
+
|
|
261
|
+
**Author one from a live project** — never hand-write the suite:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
synap market publish --from-project <projectId> # publishes the constituents first, then the thin suite
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
(Agent door: `export_project_pack` returns `{ definition, constituents }` —
|
|
268
|
+
publish the constituents before the suite so every `require` resolves.)
|
|
269
|
+
|
|
270
|
+
**Install onto a project.** The install never needs to know why the project
|
|
271
|
+
exists — it installs the workspaces and LINKS them (a `project --uses-->
|
|
272
|
+
workspace` edge per workspace, plus seeded entities filed into the project):
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
synap market install <suite-slug> --project <projectId> # EXISTING project id only; errors if not found
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The CLI has no flag that creates a project. Create the project first:
|
|
279
|
+
|
|
280
|
+
- **A human**: in the app, or by passing `projectName` on the Hub door
|
|
281
|
+
`POST /api/hub/packages/apply` (mints or reuses by exact name).
|
|
282
|
+
- **An agent**: `create_project` requires `evidenceEntityIds` — at least 5
|
|
283
|
+
existing entities that belong to it — or it is REJECTED (not proposed).
|
|
284
|
+
Without that evidence, ask the human to create the project, then install with
|
|
285
|
+
its id.
|
|
286
|
+
- **An agent calling `market.install` with `projectName`**: the install becomes
|
|
287
|
+
a proposal that carries the name, and when a human approves it the project is
|
|
288
|
+
minted. The approval is the consent — say so when you propose it.
|
|
289
|
+
|
|
290
|
+
Two packs on one project = install each with the same `--project <id>`. Each
|
|
291
|
+
lands its own workspaces; both link to the project. Only ONE `compose`
|
|
292
|
+
dependency is allowed per package, at every level.
|
|
293
|
+
|
|
294
|
+
**The brief comes with the workspaces.** A workspace package's `onboarding` is
|
|
295
|
+
the space's BRIEF — steady state (`purpose`, `framing`, `expertise`, `anchors`,
|
|
296
|
+
`fetch`) plus its onboarding mode (`goal`, `collect`, `openingQuestions`,
|
|
297
|
+
`doneWhen`) — stored on that workspace's `settings.onboarding`; the package's
|
|
298
|
+
top-level `rules[]` install as the space's rules. A template update reaches an
|
|
299
|
+
installed space without overwriting what its owner edited (conflicts are
|
|
300
|
+
reported), and `synap_update_space_brief` proposes a change. The `onboard` skill runs the
|
|
301
|
+
interview when a lens is empty; for a project spanning several workspaces it
|
|
302
|
+
sets up one workspace's slice at a time, each entity filed into the project.
|
|
303
|
+
There is no project-level recipe — the recipe always lives on a workspace. A
|
|
304
|
+
journey completes by itself once the lens holds real data.
|
|
305
|
+
|
|
183
306
|
## Idempotency by kind
|
|
184
307
|
|
|
185
308
|
- **capability** — natural key is `(name, workspaceId)`; installing twice
|
|
@@ -190,6 +313,29 @@ they can approve it — don't retry, don't report it as a failure. See
|
|
|
190
313
|
- **automation** — pre-checked by `(name, workspace)` before creating.
|
|
191
314
|
- **cell** — keyed by `(typeKey, workspaceId)`.
|
|
192
315
|
|
|
316
|
+
## Template updates — where a space stands, and whose step it is
|
|
317
|
+
|
|
318
|
+
Read it with MCP `synap_template_health` (or `synap templates` in a terminal).
|
|
319
|
+
Each space's row says what is left to do; act on these fields, not on
|
|
320
|
+
`drifted` alone (`drifted: true` means "there is a step", not "apply now"):
|
|
321
|
+
|
|
322
|
+
| Field | Means | Your move |
|
|
323
|
+
|---|---|---|
|
|
324
|
+
| `state: "active"`, `drifted: true` | a newer version is out | the update path below |
|
|
325
|
+
| `state: "awaiting-approval"` + `awaitingApproval: [ids]` | the last update filed proposals | point the person to them; **do not re-apply** |
|
|
326
|
+
| `state: "partial"` / `"layer-2-not-run"` / `"failed"` | the last update did not finish | `synap templates update <slug>` finishes it |
|
|
327
|
+
| `pendingDataChanges: {count, sentences, needsPodAdmin}` | the update changes existing data and waits for a **person** to agree | tell them the sentences; they run `synap templates update <slug>` themselves (a pod owner/admin when `needsPodAdmin`) |
|
|
328
|
+
| `updateProposal: {id}` | an update of this space is already proposed | point the person to that proposal; **never file another** |
|
|
329
|
+
| `applyWarning` | the pod's one sentence for what is left | relay it as is |
|
|
330
|
+
|
|
331
|
+
The update path is `synap templates update <slug>` (the person's door). Run
|
|
332
|
+
with an agent key it becomes a proposal the person approves. **Agreeing to data
|
|
333
|
+
changes is never an agent's**: the door answers `409
|
|
334
|
+
DATA_CHANGES_NEED_CONSENT` with `needsPerson: true` for any agent, whatever it
|
|
335
|
+
lists in `acceptDataChanges`. The version stamp (`settings.template.version`) is
|
|
336
|
+
written only when an update converged, so a space never reads "up to date" over
|
|
337
|
+
an update that did not land.
|
|
338
|
+
|
|
193
339
|
## Locked / tier-gated packages
|
|
194
340
|
|
|
195
341
|
A package can declare a `requiredTier`. Installing one your account's plan
|
|
@@ -201,11 +347,24 @@ retrying.
|
|
|
201
347
|
|
|
202
348
|
# Author & publish — the ONE write door
|
|
203
349
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
350
|
+
Every kind (workspace, capability, cell, view, …) publishes through the SAME door:
|
|
351
|
+
`POST /api/packages` → `publishPackageCore`. `synap market <verb>` is the CLI front
|
|
352
|
+
end (human, or an AI driving the CLI on the user's behalf — always say what you ran).
|
|
353
|
+
|
|
354
|
+
**Two distinct AI paths — don't conflate them:**
|
|
355
|
+
|
|
356
|
+
- **Publish to the MARKET (the shared catalog)** = human / CLI / browser only.
|
|
357
|
+
Publishing a template to the CP catalog needs the user's CP session; an agent
|
|
358
|
+
in the pod holds no CP credential (founder-gated trust boundary). So an agent
|
|
359
|
+
_authors + drives the CLI_, or the user publishes from the browser wizard.
|
|
360
|
+
- **Author + PROPOSE an install** = agents CAN do this natively. The IS tool
|
|
361
|
+
**`propose_workspace_template`** authors a full workspace definition and routes it
|
|
362
|
+
through the pod's governed `/packages/apply` → a **reviewable proposal** carrying
|
|
363
|
+
the whole definition (the user sees a live preview and approves). This is NOT a
|
|
364
|
+
market publish — it installs the AI-authored template into the user's pod, governed.
|
|
365
|
+
Use it when the user wants a whole workspace set up as a reviewable proposal.
|
|
366
|
+
|
|
367
|
+
**One space per domain:** A space is a domain, installed once (Content, Brand, CRM…). A project is a filter across spaces. To make something “for project X”: file it into X inside the domain's space (`file_into_project`), and link X to the space (`project_use_workspace`). Never create a space named after a project, a brand or a client.
|
|
209
368
|
|
|
210
369
|
## The loop
|
|
211
370
|
|
|
@@ -251,6 +410,53 @@ synap market publish [file] [--public|--private] [--from-workspace <id>] [--json
|
|
|
251
410
|
`research-base` are reserved bedrock templates — publishing under one of
|
|
252
411
|
those 403s; pick a different slug.
|
|
253
412
|
|
|
413
|
+
### Standalone non-workspace kinds (`--kind`)
|
|
414
|
+
|
|
415
|
+
A lone **cell** (a renderer — the code that draws an entity/widget) or **view** can
|
|
416
|
+
be authored + published on its own, same door:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
synap market scaffold --kind cell my-card # → my-card.cell.json {category, slug, displayName, definition}
|
|
420
|
+
# edit the cell's code/definition
|
|
421
|
+
synap market publish my-card.cell.json # category:"cell", same publish client
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
`--kind view` works the same, and so does **`--kind skill`** — a skill ships as its
|
|
425
|
+
own package now:
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
synap market scaffold --kind skill my-method # → my-method.skill.json
|
|
429
|
+
# definition.skill = { slug, name, kind: "instruction"|"code", body | code, … }
|
|
430
|
+
synap market publish my-method.skill.json
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Author a skill a template needs as its OWN package, never nested inside a
|
|
434
|
+
capability (the nested form still exists for a capability's own verbs, but it is
|
|
435
|
+
not how a space gets a skill). The `slug` is the skill's `load_skill` ref and
|
|
436
|
+
**cannot start with `system/`** — that namespace is reserved for seeded skills.
|
|
437
|
+
|
|
438
|
+
The door is category-gated: only `category:"workspace"` runs the WorkspaceYaml
|
|
439
|
+
validator + lossless normalization; every other kind is stored pod-native as-is (a
|
|
440
|
+
capability/cell/skill is NOT a WorkspaceYaml). A `category:"skill"` publish must
|
|
441
|
+
carry a non-empty `definition.skill` with documentation or code — the pod refuses a
|
|
442
|
+
bodiless skill at install, so the CP refuses it at publish.
|
|
443
|
+
|
|
444
|
+
### Compose — ship a whole stack in one install
|
|
445
|
+
|
|
446
|
+
A template declares `dependencies[]` (`{kind, relation: compose|require}`) so
|
|
447
|
+
installing it installs its whole stack in one governed pass. The resolver
|
|
448
|
+
materializes **workspace / capability / cell / skill** dependencies today;
|
|
449
|
+
**view and workflow are accepted and composable but not yet installed
|
|
450
|
+
standalone** (pending appliers) — so a space can ship its cells + capabilities +
|
|
451
|
+
skills + a base workspace as ONE install. Compose, don't inline.
|
|
452
|
+
|
|
453
|
+
Author these BOTTOM-UP: publish the skill/cell/capability first, then the template
|
|
454
|
+
that requires it. `dependencies[]` is the INSTALL; the template's own `skills:`
|
|
455
|
+
block is the LINK to the space (and its mode). A link with no matching dependency
|
|
456
|
+
installs cleanly and links nothing — silently, because a missing dependency is
|
|
457
|
+
non-fatal by design (`required-absent` in the resolver's report, which you should
|
|
458
|
+
read rather than assume).
|
|
459
|
+
|
|
254
460
|
### `unpublish <slug>`
|
|
255
461
|
|
|
256
462
|
Flips a published package back to private (owner-only). ⚠️ Known gap: the CP's
|
|
@@ -264,9 +470,86 @@ declared) with the full referential-integrity check (dangling profile refs in
|
|
|
264
470
|
views/entityLinks, missing view scope, entityLink predicates). A template that
|
|
265
471
|
**declares `dependencies`** (compose/require another template) passes through
|
|
266
472
|
this HTTP door **without** that validation — composition-aware server-side
|
|
267
|
-
validation is not yet wired for ad-hoc publishes (
|
|
268
|
-
|
|
269
|
-
fully validated; say what actually ran.
|
|
473
|
+
validation is not yet wired for ad-hoc publishes (official templates are
|
|
474
|
+
validated corpus-wide from their YAML by the official publish
|
|
475
|
+
(`synap market publish --official`) before it posts). Don't claim a composed publish was fully validated; say what actually ran.
|
|
476
|
+
|
|
477
|
+
**Official templates — ONE catalog, ONE writer.** Every official template, of
|
|
478
|
+
every kind, lives in ONE catalog package: `synap-app/packages/workspace-templates/`
|
|
479
|
+
(npm `@synap-core/workspace-templates`; a rename to `packages/catalog` /
|
|
480
|
+
`@synap-core/catalog` is planned, not done). By kind: workspaces in `src/*.yaml`,
|
|
481
|
+
then `capabilities/`, `skills/`, `packs/`, `automations/`. Each file is one manifest
|
|
482
|
+
`{apiVersion: synap/v1, kind, meta, spec, dependencies}`. Its `README.md` is the
|
|
483
|
+
how-to. It has ONE writer: `synap catalog publish --official [--kind k] [slug...]`.
|
|
484
|
+
That is the founder's command: its `synap login` session must own the
|
|
485
|
+
`synap-official` vendor. It refuses a non-official account before the preview,
|
|
486
|
+
validates the whole corpus, previews the diff against the live catalog, and asks
|
|
487
|
+
before writing; `--dry-run` previews only. `synap market publish --official` is
|
|
488
|
+
its alias for `--kind workspace`. Both go through the ONE lib
|
|
489
|
+
`scripts/catalog-lib.mjs` → `POST /api/packages` (`publishPackageCore`).
|
|
490
|
+
`synap catalog validate|diff` are the read-only verbs. `scripts/publish-official.mjs`
|
|
491
|
+
is only the CI wrapper (`publish-official-templates.yml`): a read-only preview on
|
|
492
|
+
PRs, and on main a live publish of the kinds in `SYNAP_CATALOG_LIVE_KINDS` (default
|
|
493
|
+
`workspace`). The CP never reseeds on deploy, neither templates nor capabilities.
|
|
494
|
+
`seed-templates.ts` and `seed-capability-templates.ts` are insert-only, by-hand
|
|
495
|
+
bootstraps for an empty CP. A catalog change reaches pods only when that publish
|
|
496
|
+
runs. A CP-door change ships CP-deploy first, then publish.
|
|
497
|
+
`definition.sourcePackage` (the `mergeCatalog` winner signal) is official-only:
|
|
498
|
+
the CP rejects it (403) from any other publisher, so never put it in an ad-hoc
|
|
499
|
+
package. Official capability keys are reserved: an ad-hoc publish of a capability
|
|
500
|
+
whose slug or `capability.key` matches an official one gets 409
|
|
501
|
+
`OFFICIAL_CAPABILITY_KEY_RESERVED`. Pick your own key. Never pass the official
|
|
502
|
+
`vendorId` to `market_publish` or publish an official slug ad-hoc — official
|
|
503
|
+
content is authored in the catalog and published by the human with
|
|
504
|
+
`synap catalog publish --official`.
|
|
505
|
+
|
|
506
|
+
## Writing a process (a playbook that follows a kind's lifecycle)
|
|
507
|
+
|
|
508
|
+
The status belongs to the **kind or role**, never to a playbook. Its profile declares the lifecycle ONCE, in its
|
|
509
|
+
template:
|
|
510
|
+
|
|
511
|
+
```yaml
|
|
512
|
+
lifecycle:
|
|
513
|
+
property: post-status
|
|
514
|
+
options:
|
|
515
|
+
- { key: Idea, category: open }
|
|
516
|
+
- { key: Published, category: done }
|
|
517
|
+
- { key: Archived, category: lost, humanOnly: true }
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
Every option has one category (`open · active · paused · done · lost`); rules read the category, names stay free.
|
|
521
|
+
`humanOnly` marks an option no agent sets; an agent's move into `done` or `lost` proposes. Every move goes through
|
|
522
|
+
the one status door (`moveStatus`; an agent sends `update_entity` with `expectedStatus`).
|
|
523
|
+
|
|
524
|
+
A playbook that works that lifecycle is a **process**: it FOLLOWS it. Its stages name options of it, its workers
|
|
525
|
+
start on it, and a person decides at the moments that commit the business. It never keeps a second status field.
|
|
526
|
+
The reference is Content OS "Produce Content" (`synap-app/packages/workspace-templates/src/content-os.yaml`).
|
|
527
|
+
|
|
528
|
+
**Official vs pod-local.** An official template or capability lives ONLY in the catalog
|
|
529
|
+
(`synap-app/packages/workspace-templates/`, by kind) and is published with
|
|
530
|
+
`synap catalog publish --official` (CI on main). A playbook, kind or automation an agent creates on a pod
|
|
531
|
+
(`synap_create_playbook`, `synap_define_kind`, …) is **pod-local**: it never reaches the catalog. To make it
|
|
532
|
+
official, write it into the catalog file and publish.
|
|
533
|
+
|
|
534
|
+
| Field | Where | Rule |
|
|
535
|
+
| ------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
536
|
+
| `subjectProfile.profileSlug` | playbook | The kind or role the process works. |
|
|
537
|
+
| `subjectProfile.statusProperty` | playbook | Omit it: the pod follows the profile's declared lifecycle. If you name it, name that same property. A status worker on a role with no declared lifecycle is refused. |
|
|
538
|
+
| `stages[].subjectStatus` | stage | Entering the stage moves the subject to this option, through the door. Must be an **existing option** of the lifecycle — never invent one. |
|
|
539
|
+
| `stages[].gate` | stage | `{kind: human}` at every commitment: send to a client, sign, pay, publish, won/lost, anything irreversible. `{kind: check}` only where the stage's own criteria can be verified. A gated stage writes its status only when the gate passes. A check gate judges the stage being LEFT, so never use it to guard an irreversible status. |
|
|
540
|
+
| `stages[].onFail` | stage | `{toStage: <key>}` — where a rejected gate sends the run (rework loop). |
|
|
541
|
+
| `stages[].criteria` | stage | 2–5 binary statements; `check.kind` evidence (cheapest) · capability · judge · human. |
|
|
542
|
+
| `expectedOutputs[]` | stage or playbook | What the step must produce: `kind` + `label` + `relationToSubject` (an existing relation slug, or `none`). The UI shows what was produced from this. |
|
|
543
|
+
| `activators[]` (workers) | playbook | `on`: `created` · `enters_status` (+ `status`) · `count` (+ `status`, `min` ≥ 2) · `schedule` (+ `cron`, UTC) · `manual`. `size`: `per_thing` (default) · `per_moment` (count and schedule always are). `mode`: `propose` (default) · `run` only when cheap and safe. `maxPendingApprovals` (default 20) throttles. Compiled to a governed rule the owner can pause; it fires once per thing per transition. |
|
|
544
|
+
| `humanOnlyStatuses` | playbook | Legacy: the options no stage owns. Mark a person-only option `humanOnly` on the lifecycle instead; while `statusProperty` is set, `synap catalog validate` still checks that stages and this list cover every option. |
|
|
545
|
+
| `goalTemplate` | playbook | Placeholders are `{paramName}`. Never `@{arg:…}` (read-only legacy). |
|
|
546
|
+
| `params` | playbook | The subject is a `type: entity` param. A required param left unanswered becomes a question owed by the person, not an empty string. |
|
|
547
|
+
|
|
548
|
+
Human moments use an `ask` on an owed slot: `confirm` / `choose` (one `recommended`) / `form` / `act` / `provide`
|
|
549
|
+
(connection, file or secret through the vault). Never ask for a secret in a form.
|
|
550
|
+
|
|
551
|
+
Validation: `synap catalog validate` (process contract, goal grammar, lifecycle coverage ratchet — the count of
|
|
552
|
+
lifecycle kinds with no process may only go down).
|
|
270
553
|
|
|
271
554
|
## What you're producing
|
|
272
555
|
|
|
@@ -333,3 +616,10 @@ unlocks; a slug missing from that list but present in the browse catalog is
|
|
|
333
616
|
locked for them — `market.install` pre-checks this and fails before touching
|
|
334
617
|
governance, so surface the tier requirement rather than treating it as a
|
|
335
618
|
generic install error.
|
|
619
|
+
|
|
620
|
+
The **server pre-check is the authoritative floor** (`assertPackageTierAccess`,
|
|
621
|
+
wired at every install site). The browser UI is **display-only**: it threads
|
|
622
|
+
`requiredTier` through to a "requires <tier>" badge but does NOT hard-block, and
|
|
623
|
+
its lock/upgrade CTA only engages once a host wires a billing destination — so
|
|
624
|
+
don't add a UI-side gate expecting it to enforce anything, and don't rebuild the
|
|
625
|
+
badge thread (it exists). Full current-state: repo `TEMPLATE-DEV-GUIDE.md`.
|
|
@@ -12,7 +12,7 @@ description: >
|
|
|
12
12
|
about the PACKAGE layer: finding, installing, and publishing reusable
|
|
13
13
|
templates/capabilities/automations/cells to/from the Control Plane catalog.
|
|
14
14
|
metadata:
|
|
15
|
-
|
|
15
|
+
synap:
|
|
16
16
|
requires:
|
|
17
17
|
env: []
|
|
18
18
|
optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID, SYNAP_HUB_API_KEY]
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
# Author & publish — the ONE write door
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Every kind (workspace, capability, cell, view, …) publishes through the SAME door:
|
|
4
|
+
`POST /api/packages` → `publishPackageCore`. `synap market <verb>` is the CLI front
|
|
5
|
+
end (human, or an AI driving the CLI on the user's behalf — always say what you ran).
|
|
6
|
+
|
|
7
|
+
**Two distinct AI paths — don't conflate them:**
|
|
8
|
+
|
|
9
|
+
- **Publish to the MARKET (the shared catalog)** = human / CLI / browser only.
|
|
10
|
+
Publishing a template to the CP catalog needs the user's CP session; an agent
|
|
11
|
+
in the pod holds no CP credential (founder-gated trust boundary). So an agent
|
|
12
|
+
_authors + drives the CLI_, or the user publishes from the browser wizard.
|
|
13
|
+
- **Author + PROPOSE an install** = agents CAN do this natively. The IS tool
|
|
14
|
+
**`propose_workspace_template`** authors a full workspace definition and routes it
|
|
15
|
+
through the pod's governed `/packages/apply` → a **reviewable proposal** carrying
|
|
16
|
+
the whole definition (the user sees a live preview and approves). This is NOT a
|
|
17
|
+
market publish — it installs the AI-authored template into the user's pod, governed.
|
|
18
|
+
Use it when the user wants a whole workspace set up as a reviewable proposal.
|
|
19
|
+
|
|
20
|
+
**One space per domain:** A space is a domain, installed once (Content, Brand, CRM…). A project is a filter across spaces. To make something “for project X”: file it into X inside the domain's space (`file_into_project`), and link X to the space (`project_use_workspace`). Never create a space named after a project, a brand or a client.
|
|
8
21
|
|
|
9
22
|
## The loop
|
|
10
23
|
|
|
@@ -50,6 +63,53 @@ synap market publish [file] [--public|--private] [--from-workspace <id>] [--json
|
|
|
50
63
|
`research-base` are reserved bedrock templates — publishing under one of
|
|
51
64
|
those 403s; pick a different slug.
|
|
52
65
|
|
|
66
|
+
### Standalone non-workspace kinds (`--kind`)
|
|
67
|
+
|
|
68
|
+
A lone **cell** (a renderer — the code that draws an entity/widget) or **view** can
|
|
69
|
+
be authored + published on its own, same door:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
synap market scaffold --kind cell my-card # → my-card.cell.json {category, slug, displayName, definition}
|
|
73
|
+
# edit the cell's code/definition
|
|
74
|
+
synap market publish my-card.cell.json # category:"cell", same publish client
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`--kind view` works the same, and so does **`--kind skill`** — a skill ships as its
|
|
78
|
+
own package now:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
synap market scaffold --kind skill my-method # → my-method.skill.json
|
|
82
|
+
# definition.skill = { slug, name, kind: "instruction"|"code", body | code, … }
|
|
83
|
+
synap market publish my-method.skill.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Author a skill a template needs as its OWN package, never nested inside a
|
|
87
|
+
capability (the nested form still exists for a capability's own verbs, but it is
|
|
88
|
+
not how a space gets a skill). The `slug` is the skill's `load_skill` ref and
|
|
89
|
+
**cannot start with `system/`** — that namespace is reserved for seeded skills.
|
|
90
|
+
|
|
91
|
+
The door is category-gated: only `category:"workspace"` runs the WorkspaceYaml
|
|
92
|
+
validator + lossless normalization; every other kind is stored pod-native as-is (a
|
|
93
|
+
capability/cell/skill is NOT a WorkspaceYaml). A `category:"skill"` publish must
|
|
94
|
+
carry a non-empty `definition.skill` with documentation or code — the pod refuses a
|
|
95
|
+
bodiless skill at install, so the CP refuses it at publish.
|
|
96
|
+
|
|
97
|
+
### Compose — ship a whole stack in one install
|
|
98
|
+
|
|
99
|
+
A template declares `dependencies[]` (`{kind, relation: compose|require}`) so
|
|
100
|
+
installing it installs its whole stack in one governed pass. The resolver
|
|
101
|
+
materializes **workspace / capability / cell / skill** dependencies today;
|
|
102
|
+
**view and workflow are accepted and composable but not yet installed
|
|
103
|
+
standalone** (pending appliers) — so a space can ship its cells + capabilities +
|
|
104
|
+
skills + a base workspace as ONE install. Compose, don't inline.
|
|
105
|
+
|
|
106
|
+
Author these BOTTOM-UP: publish the skill/cell/capability first, then the template
|
|
107
|
+
that requires it. `dependencies[]` is the INSTALL; the template's own `skills:`
|
|
108
|
+
block is the LINK to the space (and its mode). A link with no matching dependency
|
|
109
|
+
installs cleanly and links nothing — silently, because a missing dependency is
|
|
110
|
+
non-fatal by design (`required-absent` in the resolver's report, which you should
|
|
111
|
+
read rather than assume).
|
|
112
|
+
|
|
53
113
|
### `unpublish <slug>`
|
|
54
114
|
|
|
55
115
|
Flips a published package back to private (owner-only). ⚠️ Known gap: the CP's
|
|
@@ -63,9 +123,86 @@ declared) with the full referential-integrity check (dangling profile refs in
|
|
|
63
123
|
views/entityLinks, missing view scope, entityLink predicates). A template that
|
|
64
124
|
**declares `dependencies`** (compose/require another template) passes through
|
|
65
125
|
this HTTP door **without** that validation — composition-aware server-side
|
|
66
|
-
validation is not yet wired for ad-hoc publishes (
|
|
67
|
-
|
|
68
|
-
fully validated; say what actually ran.
|
|
126
|
+
validation is not yet wired for ad-hoc publishes (official templates are
|
|
127
|
+
validated corpus-wide from their YAML by the official publish
|
|
128
|
+
(`synap market publish --official`) before it posts). Don't claim a composed publish was fully validated; say what actually ran.
|
|
129
|
+
|
|
130
|
+
**Official templates — ONE catalog, ONE writer.** Every official template, of
|
|
131
|
+
every kind, lives in ONE catalog package: `synap-app/packages/workspace-templates/`
|
|
132
|
+
(npm `@synap-core/workspace-templates`; a rename to `packages/catalog` /
|
|
133
|
+
`@synap-core/catalog` is planned, not done). By kind: workspaces in `src/*.yaml`,
|
|
134
|
+
then `capabilities/`, `skills/`, `packs/`, `automations/`. Each file is one manifest
|
|
135
|
+
`{apiVersion: synap/v1, kind, meta, spec, dependencies}`. Its `README.md` is the
|
|
136
|
+
how-to. It has ONE writer: `synap catalog publish --official [--kind k] [slug...]`.
|
|
137
|
+
That is the founder's command: its `synap login` session must own the
|
|
138
|
+
`synap-official` vendor. It refuses a non-official account before the preview,
|
|
139
|
+
validates the whole corpus, previews the diff against the live catalog, and asks
|
|
140
|
+
before writing; `--dry-run` previews only. `synap market publish --official` is
|
|
141
|
+
its alias for `--kind workspace`. Both go through the ONE lib
|
|
142
|
+
`scripts/catalog-lib.mjs` → `POST /api/packages` (`publishPackageCore`).
|
|
143
|
+
`synap catalog validate|diff` are the read-only verbs. `scripts/publish-official.mjs`
|
|
144
|
+
is only the CI wrapper (`publish-official-templates.yml`): a read-only preview on
|
|
145
|
+
PRs, and on main a live publish of the kinds in `SYNAP_CATALOG_LIVE_KINDS` (default
|
|
146
|
+
`workspace`). The CP never reseeds on deploy, neither templates nor capabilities.
|
|
147
|
+
`seed-templates.ts` and `seed-capability-templates.ts` are insert-only, by-hand
|
|
148
|
+
bootstraps for an empty CP. A catalog change reaches pods only when that publish
|
|
149
|
+
runs. A CP-door change ships CP-deploy first, then publish.
|
|
150
|
+
`definition.sourcePackage` (the `mergeCatalog` winner signal) is official-only:
|
|
151
|
+
the CP rejects it (403) from any other publisher, so never put it in an ad-hoc
|
|
152
|
+
package. Official capability keys are reserved: an ad-hoc publish of a capability
|
|
153
|
+
whose slug or `capability.key` matches an official one gets 409
|
|
154
|
+
`OFFICIAL_CAPABILITY_KEY_RESERVED`. Pick your own key. Never pass the official
|
|
155
|
+
`vendorId` to `market_publish` or publish an official slug ad-hoc — official
|
|
156
|
+
content is authored in the catalog and published by the human with
|
|
157
|
+
`synap catalog publish --official`.
|
|
158
|
+
|
|
159
|
+
## Writing a process (a playbook that follows a kind's lifecycle)
|
|
160
|
+
|
|
161
|
+
The status belongs to the **kind or role**, never to a playbook. Its profile declares the lifecycle ONCE, in its
|
|
162
|
+
template:
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
lifecycle:
|
|
166
|
+
property: post-status
|
|
167
|
+
options:
|
|
168
|
+
- { key: Idea, category: open }
|
|
169
|
+
- { key: Published, category: done }
|
|
170
|
+
- { key: Archived, category: lost, humanOnly: true }
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Every option has one category (`open · active · paused · done · lost`); rules read the category, names stay free.
|
|
174
|
+
`humanOnly` marks an option no agent sets; an agent's move into `done` or `lost` proposes. Every move goes through
|
|
175
|
+
the one status door (`moveStatus`; an agent sends `update_entity` with `expectedStatus`).
|
|
176
|
+
|
|
177
|
+
A playbook that works that lifecycle is a **process**: it FOLLOWS it. Its stages name options of it, its workers
|
|
178
|
+
start on it, and a person decides at the moments that commit the business. It never keeps a second status field.
|
|
179
|
+
The reference is Content OS "Produce Content" (`synap-app/packages/workspace-templates/src/content-os.yaml`).
|
|
180
|
+
|
|
181
|
+
**Official vs pod-local.** An official template or capability lives ONLY in the catalog
|
|
182
|
+
(`synap-app/packages/workspace-templates/`, by kind) and is published with
|
|
183
|
+
`synap catalog publish --official` (CI on main). A playbook, kind or automation an agent creates on a pod
|
|
184
|
+
(`synap_create_playbook`, `synap_define_kind`, …) is **pod-local**: it never reaches the catalog. To make it
|
|
185
|
+
official, write it into the catalog file and publish.
|
|
186
|
+
|
|
187
|
+
| Field | Where | Rule |
|
|
188
|
+
| ------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
189
|
+
| `subjectProfile.profileSlug` | playbook | The kind or role the process works. |
|
|
190
|
+
| `subjectProfile.statusProperty` | playbook | Omit it: the pod follows the profile's declared lifecycle. If you name it, name that same property. A status worker on a role with no declared lifecycle is refused. |
|
|
191
|
+
| `stages[].subjectStatus` | stage | Entering the stage moves the subject to this option, through the door. Must be an **existing option** of the lifecycle — never invent one. |
|
|
192
|
+
| `stages[].gate` | stage | `{kind: human}` at every commitment: send to a client, sign, pay, publish, won/lost, anything irreversible. `{kind: check}` only where the stage's own criteria can be verified. A gated stage writes its status only when the gate passes. A check gate judges the stage being LEFT, so never use it to guard an irreversible status. |
|
|
193
|
+
| `stages[].onFail` | stage | `{toStage: <key>}` — where a rejected gate sends the run (rework loop). |
|
|
194
|
+
| `stages[].criteria` | stage | 2–5 binary statements; `check.kind` evidence (cheapest) · capability · judge · human. |
|
|
195
|
+
| `expectedOutputs[]` | stage or playbook | What the step must produce: `kind` + `label` + `relationToSubject` (an existing relation slug, or `none`). The UI shows what was produced from this. |
|
|
196
|
+
| `activators[]` (workers) | playbook | `on`: `created` · `enters_status` (+ `status`) · `count` (+ `status`, `min` ≥ 2) · `schedule` (+ `cron`, UTC) · `manual`. `size`: `per_thing` (default) · `per_moment` (count and schedule always are). `mode`: `propose` (default) · `run` only when cheap and safe. `maxPendingApprovals` (default 20) throttles. Compiled to a governed rule the owner can pause; it fires once per thing per transition. |
|
|
197
|
+
| `humanOnlyStatuses` | playbook | Legacy: the options no stage owns. Mark a person-only option `humanOnly` on the lifecycle instead; while `statusProperty` is set, `synap catalog validate` still checks that stages and this list cover every option. |
|
|
198
|
+
| `goalTemplate` | playbook | Placeholders are `{paramName}`. Never `@{arg:…}` (read-only legacy). |
|
|
199
|
+
| `params` | playbook | The subject is a `type: entity` param. A required param left unanswered becomes a question owed by the person, not an empty string. |
|
|
200
|
+
|
|
201
|
+
Human moments use an `ask` on an owed slot: `confirm` / `choose` (one `recommended`) / `form` / `act` / `provide`
|
|
202
|
+
(connection, file or secret through the vault). Never ask for a secret in a form.
|
|
203
|
+
|
|
204
|
+
Validation: `synap catalog validate` (process contract, goal grammar, lifecycle coverage ratchet — the count of
|
|
205
|
+
lifecycle kinds with no process may only go down).
|
|
69
206
|
|
|
70
207
|
## What you're producing
|
|
71
208
|
|
|
@@ -54,3 +54,10 @@ unlocks; a slug missing from that list but present in the browse catalog is
|
|
|
54
54
|
locked for them — `market.install` pre-checks this and fails before touching
|
|
55
55
|
governance, so surface the tier requirement rather than treating it as a
|
|
56
56
|
generic install error.
|
|
57
|
+
|
|
58
|
+
The **server pre-check is the authoritative floor** (`assertPackageTierAccess`,
|
|
59
|
+
wired at every install site). The browser UI is **display-only**: it threads
|
|
60
|
+
`requiredTier` through to a "requires <tier>" badge but does NOT hard-block, and
|
|
61
|
+
its lock/upgrade CTA only engages once a host wires a billing destination — so
|
|
62
|
+
don't add a UI-side gate expecting it to enforce anything, and don't rebuild the
|
|
63
|
+
badge thread (it exists). Full current-state: repo `TEMPLATE-DEV-GUIDE.md`.
|