@synap-core/cli 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +40 -198
- package/dist/build-info.json +6 -0
- package/dist/commands/agent-run.js +3 -2
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/agents.d.ts +32 -17
- package/dist/commands/agents.js +203 -237
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/app.d.ts +143 -0
- package/dist/commands/app.js +524 -0
- package/dist/commands/app.js.map +1 -0
- package/dist/commands/automate.d.ts +21 -0
- package/dist/commands/automate.js +42 -0
- package/dist/commands/automate.js.map +1 -0
- package/dist/commands/automation-schema.test.d.ts +16 -0
- package/dist/commands/automation-schema.test.js +77 -0
- package/dist/commands/automation-schema.test.js.map +1 -0
- package/dist/commands/automation.d.ts +12 -0
- package/dist/commands/automation.js +116 -66
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/box.d.ts +42 -0
- package/dist/commands/box.js +89 -0
- package/dist/commands/box.js.map +1 -0
- package/dist/commands/bridge-setup.d.ts +14 -1
- package/dist/commands/bridge-setup.js +395 -129
- package/dist/commands/bridge-setup.js.map +1 -1
- package/dist/commands/cap-connections.d.ts +4 -4
- package/dist/commands/cap-connections.js +14 -14
- package/dist/commands/cap-connections.js.map +1 -1
- package/dist/commands/capability.d.ts +3 -1
- package/dist/commands/capability.js +249 -176
- package/dist/commands/capability.js.map +1 -1
- package/dist/commands/catalog.d.ts +275 -0
- package/dist/commands/catalog.js +481 -0
- package/dist/commands/catalog.js.map +1 -0
- package/dist/commands/cell.d.ts +155 -8
- package/dist/commands/cell.js +416 -40
- package/dist/commands/cell.js.map +1 -1
- package/dist/commands/centrality.js +1 -13
- package/dist/commands/centrality.js.map +1 -1
- package/dist/commands/close-questions.d.ts +27 -0
- package/dist/commands/close-questions.js +49 -0
- package/dist/commands/close-questions.js.map +1 -0
- package/dist/commands/close-questions.test.d.ts +1 -0
- package/dist/commands/close-questions.test.js +52 -0
- package/dist/commands/close-questions.test.js.map +1 -0
- package/dist/commands/connect.d.ts +36 -13
- package/dist/commands/connect.js +68 -167
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connections.d.ts +3 -2
- package/dist/commands/connections.js +95 -25
- package/dist/commands/connections.js.map +1 -1
- package/dist/commands/context.js +79 -44
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/data-extra.d.ts +34 -0
- package/dist/commands/data-extra.js +203 -25
- package/dist/commands/data-extra.js.map +1 -1
- package/dist/commands/data.d.ts +120 -2
- package/dist/commands/data.js +295 -21
- package/dist/commands/data.js.map +1 -1
- package/dist/commands/diagnose.d.ts +66 -4
- package/dist/commands/diagnose.js +285 -28
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/doc.d.ts +11 -4
- package/dist/commands/doc.js +39 -14
- package/dist/commands/doc.js.map +1 -1
- package/dist/commands/doctor.d.ts +133 -3
- package/dist/commands/doctor.js +761 -41
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain.js +5 -5
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/hooks.d.ts +19 -0
- package/dist/commands/hooks.js +70 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/import.d.ts +393 -13
- package/dist/commands/import.js +1150 -54
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +34 -9
- package/dist/commands/init.js +481 -981
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.d.ts +1 -0
- package/dist/commands/keys.js +15 -2
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/knowledge.d.ts +22 -6
- package/dist/commands/knowledge.js +121 -57
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/lens.d.ts +37 -1
- package/dist/commands/lens.js +194 -72
- package/dist/commands/lens.js.map +1 -1
- package/dist/commands/market-authoring.d.ts +29 -2
- package/dist/commands/market-authoring.js +348 -7
- package/dist/commands/market-authoring.js.map +1 -1
- package/dist/commands/market-official.d.ts +58 -0
- package/dist/commands/market-official.js +84 -0
- package/dist/commands/market-official.js.map +1 -0
- package/dist/commands/market.d.ts +400 -16
- package/dist/commands/market.js +1802 -146
- package/dist/commands/market.js.map +1 -1
- package/dist/commands/mcp.d.ts +60 -25
- package/dist/commands/mcp.js +251 -64
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/observe.category.test.d.ts +1 -0
- package/dist/commands/observe.category.test.js +59 -0
- package/dist/commands/observe.category.test.js.map +1 -0
- package/dist/commands/observe.d.ts +3 -0
- package/dist/commands/observe.js +7 -5
- package/dist/commands/observe.js.map +1 -1
- package/dist/commands/observe.title.test.d.ts +1 -0
- package/dist/commands/observe.title.test.js +37 -0
- package/dist/commands/observe.title.test.js.map +1 -0
- package/dist/commands/open.d.ts +39 -9
- package/dist/commands/open.js +80 -25
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/playbook.d.ts +42 -0
- package/dist/commands/playbook.js +171 -0
- package/dist/commands/playbook.js.map +1 -0
- package/dist/commands/pod.js +1 -1
- package/dist/commands/pod.js.map +1 -1
- package/dist/commands/pods.d.ts +11 -1
- package/dist/commands/pods.js +129 -131
- package/dist/commands/pods.js.map +1 -1
- package/dist/commands/proposals-actions.d.ts +62 -0
- package/dist/commands/proposals-actions.js +143 -8
- package/dist/commands/proposals-actions.js.map +1 -1
- package/dist/commands/proposals-await.d.ts +68 -0
- package/dist/commands/proposals-await.js +248 -0
- package/dist/commands/proposals-await.js.map +1 -0
- package/dist/commands/proton-setup.d.ts +73 -0
- package/dist/commands/proton-setup.js +579 -0
- package/dist/commands/proton-setup.js.map +1 -0
- package/dist/commands/providers.d.ts +23 -0
- package/dist/commands/providers.js +126 -1
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/raycast.js +6 -2
- package/dist/commands/raycast.js.map +1 -1
- package/dist/commands/rule.d.ts +150 -0
- package/dist/commands/rule.js +447 -0
- package/dist/commands/rule.js.map +1 -0
- package/dist/commands/session-feed-wait.d.ts +48 -0
- package/dist/commands/session-feed-wait.js +261 -0
- package/dist/commands/session-feed-wait.js.map +1 -0
- package/dist/commands/session-post.d.ts +40 -0
- package/dist/commands/session-post.js +96 -0
- package/dist/commands/session-post.js.map +1 -0
- package/dist/commands/session-wait.d.ts +116 -0
- package/dist/commands/session-wait.js +224 -0
- package/dist/commands/session-wait.js.map +1 -0
- package/dist/commands/sessions.d.ts +54 -0
- package/dist/commands/sessions.js +501 -58
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/skill-manage.d.ts +21 -0
- package/dist/commands/skill-manage.js +136 -19
- package/dist/commands/skill-manage.js.map +1 -1
- package/dist/commands/skills-commands.d.ts +2 -0
- package/dist/commands/skills-commands.js +9 -1
- package/dist/commands/skills-commands.js.map +1 -1
- package/dist/commands/skills-commands.test.d.ts +1 -0
- package/dist/commands/skills-commands.test.js +57 -0
- package/dist/commands/skills-commands.test.js.map +1 -0
- package/dist/commands/skills.js +16 -0
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +1 -4
- package/dist/commands/status.js +6 -35
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/statusline.backoff.test.d.ts +13 -0
- package/dist/commands/statusline.backoff.test.js +100 -0
- package/dist/commands/statusline.backoff.test.js.map +1 -0
- package/dist/commands/statusline.js +16 -9
- package/dist/commands/statusline.js.map +1 -1
- package/dist/commands/sync-status.d.ts +12 -0
- package/dist/commands/sync-status.js +125 -0
- package/dist/commands/sync-status.js.map +1 -0
- package/dist/commands/templates-retire.d.ts +34 -0
- package/dist/commands/templates-retire.js +192 -0
- package/dist/commands/templates-retire.js.map +1 -0
- package/dist/commands/tools.js +6 -21
- package/dist/commands/tools.js.map +1 -1
- package/dist/commands/tracks.d.ts +112 -0
- package/dist/commands/tracks.js +543 -0
- package/dist/commands/tracks.js.map +1 -0
- package/dist/commands/update.d.ts +3 -11
- package/dist/commands/update.js +5 -134
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upload.d.ts +41 -3
- package/dist/commands/upload.js +120 -18
- package/dist/commands/upload.js.map +1 -1
- package/dist/commands/vendor.d.ts +28 -0
- package/dist/commands/vendor.js +110 -0
- package/dist/commands/vendor.js.map +1 -0
- package/dist/commands/versions.js +6 -0
- package/dist/commands/versions.js.map +1 -1
- package/dist/commands/view.js +10 -5
- package/dist/commands/view.js.map +1 -1
- package/dist/commands/whoami.d.ts +30 -3
- package/dist/commands/whoami.js +186 -23
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/worker-accounts.d.ts +149 -0
- package/dist/commands/worker-accounts.js +339 -0
- package/dist/commands/worker-accounts.js.map +1 -0
- package/dist/commands/worker-accounts.test.d.ts +1 -0
- package/dist/commands/worker-accounts.test.js +224 -0
- package/dist/commands/worker-accounts.test.js.map +1 -0
- package/dist/commands/worker.d.ts +331 -0
- package/dist/commands/worker.js +1067 -0
- package/dist/commands/worker.js.map +1 -0
- package/dist/commands/worker.test.d.ts +1 -0
- package/dist/commands/worker.test.js +427 -0
- package/dist/commands/worker.test.js.map +1 -0
- package/dist/commands/workspace-ops.d.ts +35 -0
- package/dist/commands/workspace-ops.js +153 -0
- package/dist/commands/workspace-ops.js.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1043 -186
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-connections.d.ts +31 -0
- package/dist/lib/agent-connections.js +33 -0
- package/dist/lib/agent-connections.js.map +1 -0
- package/dist/lib/agent-detect.d.ts +27 -0
- package/dist/lib/agent-detect.js +71 -0
- package/dist/lib/agent-detect.js.map +1 -0
- package/dist/lib/agent-door.d.ts +136 -0
- package/dist/lib/agent-door.js +429 -0
- package/dist/lib/agent-door.js.map +1 -0
- package/dist/lib/agents-config.d.ts +2 -0
- package/dist/lib/agents-config.js +4 -9
- package/dist/lib/agents-config.js.map +1 -1
- package/dist/lib/approval-poll.d.ts +31 -2
- package/dist/lib/approval-poll.js +20 -7
- package/dist/lib/approval-poll.js.map +1 -1
- package/dist/lib/atomic-file.d.ts +48 -0
- package/dist/lib/atomic-file.js +129 -0
- package/dist/lib/atomic-file.js.map +1 -0
- package/dist/lib/auth.d.ts +17 -11
- package/dist/lib/auth.js +47 -64
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/batch-approval.d.ts +85 -0
- package/dist/lib/batch-approval.js +170 -0
- package/dist/lib/batch-approval.js.map +1 -0
- package/dist/lib/box/egress.d.ts +82 -0
- package/dist/lib/box/egress.js +264 -0
- package/dist/lib/box/egress.js.map +1 -0
- package/dist/lib/box/evidence.d.ts +86 -0
- package/dist/lib/box/evidence.js +121 -0
- package/dist/lib/box/evidence.js.map +1 -0
- package/dist/lib/box/job-server.d.ts +72 -0
- package/dist/lib/box/job-server.js +246 -0
- package/dist/lib/box/job-server.js.map +1 -0
- package/dist/lib/box/provisioner.d.ts +83 -0
- package/dist/lib/box/provisioner.js +312 -0
- package/dist/lib/box/provisioner.js.map +1 -0
- package/dist/lib/box/proxmox.d.ts +112 -0
- package/dist/lib/box/proxmox.js +211 -0
- package/dist/lib/box/proxmox.js.map +1 -0
- package/dist/lib/box/wire.d.ts +98 -0
- package/dist/lib/box/wire.js +70 -0
- package/dist/lib/box/wire.js.map +1 -0
- package/dist/lib/capture-lane.d.ts +6 -5
- package/dist/lib/capture-lane.js +6 -5
- package/dist/lib/capture-lane.js.map +1 -1
- package/dist/lib/capture-structure.d.ts +230 -11
- package/dist/lib/capture-structure.js +251 -13
- package/dist/lib/capture-structure.js.map +1 -1
- package/dist/lib/catalog-templates.d.ts +59 -0
- package/dist/lib/catalog-templates.js +126 -0
- package/dist/lib/catalog-templates.js.map +1 -0
- package/dist/lib/cli-build.d.ts +19 -0
- package/dist/lib/cli-build.js +37 -0
- package/dist/lib/cli-build.js.map +1 -0
- package/dist/lib/client-header.test.d.ts +1 -0
- package/dist/lib/client-header.test.js +85 -0
- package/dist/lib/client-header.test.js.map +1 -0
- package/dist/lib/conversation-headers.d.ts +33 -0
- package/dist/lib/conversation-headers.js +69 -0
- package/dist/lib/conversation-headers.js.map +1 -0
- package/dist/lib/cp-packages.d.ts +167 -11
- package/dist/lib/cp-packages.js +253 -21
- package/dist/lib/cp-packages.js.map +1 -1
- package/dist/lib/credential-class.d.ts +144 -0
- package/dist/lib/credential-class.js +138 -0
- package/dist/lib/credential-class.js.map +1 -0
- package/dist/lib/describe-lens.d.ts +35 -0
- package/dist/lib/describe-lens.js +40 -0
- package/dist/lib/describe-lens.js.map +1 -1
- package/dist/lib/device-connect.d.ts +125 -0
- package/dist/lib/device-connect.js +256 -0
- package/dist/lib/device-connect.js.map +1 -0
- package/dist/lib/directory-lens.d.ts +99 -0
- package/dist/lib/directory-lens.js +187 -0
- package/dist/lib/directory-lens.js.map +1 -0
- package/dist/lib/exporter-coverage.d.ts +71 -0
- package/dist/lib/exporter-coverage.js +97 -0
- package/dist/lib/exporter-coverage.js.map +1 -0
- package/dist/lib/goal-words.d.ts +38 -0
- package/dist/lib/goal-words.js +112 -0
- package/dist/lib/goal-words.js.map +1 -0
- package/dist/lib/hub-client.d.ts +57 -15
- package/dist/lib/hub-client.js +396 -82
- package/dist/lib/hub-client.js.map +1 -1
- package/dist/lib/init-connect.d.ts +41 -0
- package/dist/lib/init-connect.js +75 -0
- package/dist/lib/init-connect.js.map +1 -0
- package/dist/lib/init-exit.d.ts +24 -0
- package/dist/lib/init-exit.js +41 -0
- package/dist/lib/init-exit.js.map +1 -0
- package/dist/lib/init-flow.d.ts +25 -0
- package/dist/lib/init-flow.js +40 -0
- package/dist/lib/init-flow.js.map +1 -0
- package/dist/lib/init-handoff.d.ts +24 -0
- package/dist/lib/init-handoff.js +26 -0
- package/dist/lib/init-handoff.js.map +1 -0
- package/dist/lib/init-output.d.ts +18 -0
- package/dist/lib/init-output.js +43 -0
- package/dist/lib/init-output.js.map +1 -0
- package/dist/lib/init-pod.d.ts +45 -0
- package/dist/lib/init-pod.js +36 -0
- package/dist/lib/init-pod.js.map +1 -0
- package/dist/lib/installed.d.ts +210 -11
- package/dist/lib/installed.js +234 -36
- package/dist/lib/installed.js.map +1 -1
- package/dist/lib/key-approval.d.ts +57 -0
- package/dist/lib/key-approval.js +117 -0
- package/dist/lib/key-approval.js.map +1 -0
- package/dist/lib/key-diagnosis.d.ts +56 -0
- package/dist/lib/key-diagnosis.js +227 -0
- package/dist/lib/key-diagnosis.js.map +1 -0
- package/dist/lib/key-doctor.d.ts +136 -0
- package/dist/lib/key-doctor.js +286 -0
- package/dist/lib/key-doctor.js.map +1 -0
- package/dist/lib/key-locations.d.ts +120 -0
- package/dist/lib/key-locations.js +326 -0
- package/dist/lib/key-locations.js.map +1 -0
- package/dist/lib/key-source.d.ts +68 -0
- package/dist/lib/key-source.js +109 -0
- package/dist/lib/key-source.js.map +1 -0
- package/dist/lib/key-state.d.ts +70 -0
- package/dist/lib/key-state.js +115 -0
- package/dist/lib/key-state.js.map +1 -0
- package/dist/lib/kind-package.d.ts +181 -0
- package/dist/lib/kind-package.js +679 -0
- package/dist/lib/kind-package.js.map +1 -0
- package/dist/lib/knowledge-title.d.ts +25 -0
- package/dist/lib/knowledge-title.js +47 -0
- package/dist/lib/knowledge-title.js.map +1 -0
- package/dist/lib/knowledge-title.test.d.ts +1 -0
- package/dist/lib/knowledge-title.test.js +34 -0
- package/dist/lib/knowledge-title.test.js.map +1 -0
- package/dist/lib/machine-instance.d.ts +64 -0
- package/dist/lib/machine-instance.js +142 -0
- package/dist/lib/machine-instance.js.map +1 -0
- package/dist/lib/mcp-bridge.d.ts +49 -0
- package/dist/lib/mcp-bridge.js +180 -0
- package/dist/lib/mcp-bridge.js.map +1 -0
- package/dist/lib/mcp-bridge.test.d.ts +1 -0
- package/dist/lib/mcp-bridge.test.js +118 -0
- package/dist/lib/mcp-bridge.test.js.map +1 -0
- package/dist/lib/mcp-call.d.ts +30 -0
- package/dist/lib/mcp-call.js +107 -0
- package/dist/lib/mcp-call.js.map +1 -0
- package/dist/lib/mcp-snippets.d.ts +53 -0
- package/dist/lib/mcp-snippets.js +82 -0
- package/dist/lib/mcp-snippets.js.map +1 -0
- package/dist/lib/next-steps.d.ts +8 -0
- package/dist/lib/next-steps.js +31 -1
- package/dist/lib/next-steps.js.map +1 -1
- package/dist/lib/openclaw.js +3 -2
- package/dist/lib/openclaw.js.map +1 -1
- package/dist/lib/package-wire.d.ts +179 -0
- package/dist/lib/package-wire.js +68 -0
- package/dist/lib/package-wire.js.map +1 -0
- package/dist/lib/pair-link.d.ts +38 -0
- package/dist/lib/pair-link.js +68 -0
- package/dist/lib/pair-link.js.map +1 -0
- package/dist/lib/pod-moved.d.ts +70 -0
- package/dist/lib/pod-moved.js +146 -0
- package/dist/lib/pod-moved.js.map +1 -0
- package/dist/lib/pod-reach.d.ts +39 -0
- package/dist/lib/pod-reach.js +117 -0
- package/dist/lib/pod-reach.js.map +1 -0
- package/dist/lib/pod-reach.test.d.ts +1 -0
- package/dist/lib/pod-reach.test.js +67 -0
- package/dist/lib/pod-reach.test.js.map +1 -0
- package/dist/lib/pod-wide.d.ts +40 -0
- package/dist/lib/pod-wide.js +46 -0
- package/dist/lib/pod-wide.js.map +1 -0
- package/dist/lib/pod.d.ts +74 -112
- package/dist/lib/pod.js +146 -415
- package/dist/lib/pod.js.map +1 -1
- package/dist/lib/project-ref.d.ts +9 -3
- package/dist/lib/project-ref.js +10 -4
- package/dist/lib/project-ref.js.map +1 -1
- package/dist/lib/register-claude-code-mcp.test.d.ts +1 -0
- package/dist/lib/register-claude-code-mcp.test.js +78 -0
- package/dist/lib/register-claude-code-mcp.test.js.map +1 -0
- package/dist/lib/review-credential.d.ts +119 -0
- package/dist/lib/review-credential.js +149 -0
- package/dist/lib/review-credential.js.map +1 -0
- package/dist/lib/safe-open.d.ts +49 -0
- package/dist/lib/safe-open.js +119 -0
- package/dist/lib/safe-open.js.map +1 -0
- package/dist/lib/session-feed.d.ts +185 -0
- package/dist/lib/session-feed.js +257 -0
- package/dist/lib/session-feed.js.map +1 -0
- package/dist/lib/session-lens.d.ts +40 -1
- package/dist/lib/session-lens.js +54 -4
- package/dist/lib/session-lens.js.map +1 -1
- package/dist/lib/superwhisper-import.d.ts +8 -0
- package/dist/lib/superwhisper-import.js +14 -7
- package/dist/lib/superwhisper-import.js.map +1 -1
- package/dist/lib/superwhisper-title.test.d.ts +1 -0
- package/dist/lib/superwhisper-title.test.js +18 -0
- package/dist/lib/superwhisper-title.test.js.map +1 -0
- package/dist/lib/targets.d.ts +152 -10
- package/dist/lib/targets.js +974 -325
- package/dist/lib/targets.js.map +1 -1
- package/dist/lib/template-file.d.ts +4 -0
- package/dist/lib/template-file.js.map +1 -1
- package/dist/lib/template-lifecycle.d.ts +217 -0
- package/dist/lib/template-lifecycle.js +433 -0
- package/dist/lib/template-lifecycle.js.map +1 -0
- package/dist/lib/template-steps.d.ts +88 -0
- package/dist/lib/template-steps.js +118 -0
- package/dist/lib/template-steps.js.map +1 -0
- package/dist/lib/time-ago.d.ts +2 -0
- package/dist/lib/time-ago.js +15 -0
- package/dist/lib/time-ago.js.map +1 -0
- package/dist/lib/wake-hook-settings.d.ts +57 -0
- package/dist/lib/wake-hook-settings.js +153 -0
- package/dist/lib/wake-hook-settings.js.map +1 -0
- package/dist/lib/wake-state.d.ts +65 -0
- package/dist/lib/wake-state.js +122 -0
- package/dist/lib/wake-state.js.map +1 -0
- package/dist/utils/logger.js +5 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +26 -17
- package/skills/README.md +13 -11
- package/skills/agent-os/SKILL.md +214 -99
- package/skills/manifest.json +1 -1
- package/skills/onboard/SKILL.md +55 -26
- package/skills/synap/README.md +5 -8
- package/skills/synap/SKILL.md +1149 -289
- package/skills/synap/_order.txt +7 -0
- package/skills/synap/_skill.yaml +1 -1
- package/skills/synap/automations.md +15 -0
- package/skills/synap/capture.md +5 -0
- package/skills/synap/cli-operations.md +24 -18
- package/skills/synap/code-skills.md +70 -0
- package/skills/synap/concepts.md +36 -0
- package/skills/synap/content-os.md +10 -1
- package/skills/synap/creative-loop.md +15 -10
- package/skills/synap/crm.md +21 -52
- package/skills/synap/document-embeds.md +143 -47
- package/skills/synap/escalation-ladder.md +20 -10
- package/skills/synap/focus-sessions.md +56 -21
- package/skills/synap/from-intent.md +158 -0
- package/skills/synap/governance-rules.md +5 -5
- package/skills/synap/governance.md +10 -7
- package/skills/synap/hand-off.md +33 -0
- package/skills/synap/inline-patterns.md +15 -7
- package/skills/synap/lenses.md +34 -16
- package/skills/synap/linking.md +42 -41
- package/skills/synap/mcp-remote-servers.md +64 -0
- package/skills/synap/mental-model.md +17 -15
- package/skills/synap/operating-mode-rules.md +2 -2
- package/skills/synap/processes.md +118 -0
- package/skills/synap/quick-reference.md +7 -2
- package/skills/synap/reading.md +3 -1
- package/skills/synap/reflexes.md +12 -42
- package/skills/synap/viewframe-cells.md +38 -5
- package/skills/synap/work-flow.md +1 -1
- package/skills/synap/work-model.md +110 -0
- package/skills/synap/worked-examples.md +4 -5
- package/skills/synap/workspace-design.md +15 -11
- package/skills/synap/writes.md +105 -25
- package/skills/synap/writing-titles.md +63 -0
- package/skills/synap-app/SKILL.md +149 -67
- package/skills/synap-app/_skill.yaml +1 -1
- package/skills/synap-app/creating-the-base-app.md +12 -7
- package/skills/synap-app/governance.md +27 -16
- package/skills/synap-app/install-commands.md +18 -9
- package/skills/synap-app/overview.md +16 -9
- package/skills/synap-app/using-the-sdk.md +75 -25
- package/skills/synap-design/SKILL.md +474 -0
- package/skills/synap-design/_order.txt +4 -0
- package/skills/synap-design/_skill.yaml +21 -0
- package/skills/synap-design/loop.md +134 -0
- package/skills/synap-design/overview.md +44 -0
- package/skills/synap-design/principles.md +130 -0
- package/skills/synap-design/system.md +133 -0
- package/skills/synap-market/SKILL.md +306 -16
- package/skills/synap-market/_skill.yaml +1 -1
- package/skills/synap-market/author-and-publish.md +145 -8
- package/skills/synap-market/governance-and-catalog.md +7 -0
- package/skills/synap-market/install.md +79 -1
- package/skills/synap-market/overview.md +74 -6
- package/skills/synap-schema/SKILL.md +172 -10
- package/skills/synap-schema/_order.txt +2 -0
- package/skills/synap-schema/_skill.yaml +4 -2
- package/skills/synap-schema/common-mistakes.md +4 -2
- package/skills/synap-schema/discover-profiles.md +1 -1
- package/skills/synap-schema/entity-scope.md +15 -3
- package/skills/synap-schema/extend-first.md +29 -0
- package/skills/synap-schema/extend-vs-create.md +1 -1
- package/skills/synap-schema/intent-vocabulary-ssot.md +111 -0
- package/skills/synap-schema/property-types.md +1 -1
- package/skills/synap-schema/relations.md +1 -1
- package/skills/synap-ui/SKILL.md +19 -12
- package/skills/synap-ui/_skill.yaml +1 -1
- package/skills/synap-ui/ai-companion.md +1 -1
- package/skills/synap-ui/arranging-bento.md +2 -0
- package/skills/synap-ui/bento-layouts.md +10 -10
- package/skills/synap-ui/bento-recipes.md +313 -543
- package/skills/synap-ui/four-builds.md +5 -0
- package/skills/synap-ui/view-types.md +2 -2
- package/skills/synap-ui/widget-catalog.md +22 -278
- package/templates/automations/bookmark-enrichment.automation.json +290 -13
- package/templates/automations/url-bookmark-capture.automation.json +73 -11
- package/templates/box/runner.py +206 -0
- package/templates/skills/authoring-playbooks/SKILL.md +6 -3
- package/templates/skills/authoring-playbooks/reference/stages-contract.md +15 -0
- package/templates/skills/authoring-playbooks/reference/worked-example.md +3 -0
- package/dist/commands/infra.d.ts +0 -21
- package/dist/commands/infra.js +0 -262
- package/dist/commands/infra.js.map +0 -1
- package/node_modules/@synap/hub-rest-client/dist/index.cjs +0 -1261
- package/node_modules/@synap/hub-rest-client/dist/index.d.cts +0 -1647
- package/node_modules/@synap/hub-rest-client/dist/index.d.ts +0 -1647
- package/node_modules/@synap/hub-rest-client/dist/index.js +0 -1231
- package/node_modules/@synap/hub-rest-client/package.json +0 -45
- package/node_modules/@synap/hub-rest-client/src/client.ts +0 -1631
- package/node_modules/@synap/hub-rest-client/src/errors.ts +0 -30
- package/node_modules/@synap/hub-rest-client/src/index.ts +0 -153
- package/node_modules/@synap/hub-rest-client/src/setup.ts +0 -133
- package/node_modules/@synap/hub-rest-client/src/types.ts +0 -1299
|
@@ -10,7 +10,7 @@ description: >
|
|
|
10
10
|
"npx create-synap-app". NOT the `synap` skill (capture/recall in a pod) nor
|
|
11
11
|
`synap-ui` (views inside the pod's own UI) — this is about writing app CODE.
|
|
12
12
|
metadata:
|
|
13
|
-
|
|
13
|
+
synap:
|
|
14
14
|
requires:
|
|
15
15
|
env: []
|
|
16
16
|
optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID]
|
|
@@ -32,8 +32,8 @@ pod, and **every write is governed** (see `governance.md`).
|
|
|
32
32
|
| The user has… | Do this | Read |
|
|
33
33
|
|---|---|---|
|
|
34
34
|
| an existing app (any framework) | add the SDK | `using-the-sdk.md`, `install-commands.md` |
|
|
35
|
-
| nothing yet, wants a full app fast | scaffold the base app | `creating-the-base-app.md`, `install-commands.md` |
|
|
36
|
-
| a server / script / CLI (no browser) | SDK with a session token or API key | `using-the-sdk.md` |
|
|
35
|
+
| nothing yet, wants a full app fast | scaffold the base app (scaffolder not published yet) | `creating-the-base-app.md`, `install-commands.md` |
|
|
36
|
+
| a server / script / CLI (no browser) | SDK with a session token, or the REST client with an API key | `using-the-sdk.md` |
|
|
37
37
|
|
|
38
38
|
Both paths use the same underlying packages; only the amount of scaffolding differs.
|
|
39
39
|
|
|
@@ -41,9 +41,11 @@ Both paths use the same underlying packages; only the amount of scaffolding diff
|
|
|
41
41
|
|
|
42
42
|
- `@synap-core/sdk` — typed tRPC client. `createSynapClient({ podUrl, ... })`. **The one you almost always want.**
|
|
43
43
|
- `@synap-core/react` — React/TanStack-Query bindings (`SynapProvider`, hooks).
|
|
44
|
-
- `@synap-core/sdk-realtime` — Socket.IO
|
|
45
|
-
- `@synap-core/
|
|
46
|
-
|
|
44
|
+
- `@synap-core/sdk-realtime` — Socket.IO "something changed" events (`createRealtimeClient`).
|
|
45
|
+
- `@synap-core/hub-rest-client` — zero-dep REST client for API-key holders (`HubRestClient`, `setupAgent`).
|
|
46
|
+
|
|
47
|
+
Do not install `@synap-core/auth`: that package was retired, and its last npm
|
|
48
|
+
release signs in through a pod route that no longer exists.
|
|
47
49
|
|
|
48
50
|
Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
|
|
49
51
|
|
|
@@ -53,13 +55,18 @@ Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
|
|
|
53
55
|
the change is queued for the pod owner's review (like a PR). Surface the review,
|
|
54
56
|
don't retry. Full contract: `governance.md`.
|
|
55
57
|
2. **The pod URL has no `/trpc` suffix and no trailing slash.** The SDK appends `/trpc`.
|
|
56
|
-
3. **Non-browser clients (server/CLI/mobile) authenticate with a token or
|
|
57
|
-
never a cookie.
|
|
58
|
+
3. **Non-browser clients (server/CLI/mobile) authenticate with a session token or
|
|
59
|
+
an API key**, never a cookie. An API key only works on the REST client and
|
|
60
|
+
realtime, not on the tRPC SDK. Browser apps use the Kratos session cookie.
|
|
58
61
|
|
|
59
62
|
## Get a pod to build against
|
|
60
63
|
|
|
61
|
-
- **Self-host (free):**
|
|
62
|
-
|
|
64
|
+
- **Self-host (free):** run the backend's `install.sh` (it installs Docker if
|
|
65
|
+
needed, fetches the release bundle, checks it against the release manifest's
|
|
66
|
+
sha256 and runs `synap install`); see the backend's `deploy/README.md`. It
|
|
67
|
+
also checks the manifest's signature: by default
|
|
68
|
+
(`SYNAP_RELEASE_VERIFY=warn`) it only warns and carries on when the signature
|
|
69
|
+
is missing or does not verify; `SYNAP_RELEASE_VERIFY=enforce` refuses.
|
|
63
70
|
- **Managed (paid):** sign up at synap.live and provision a pod.
|
|
64
71
|
|
|
65
72
|
You can develop the base app with **no pod at all** using its mock mode
|
|
@@ -78,11 +85,17 @@ don't architect around a capability that isn't there.
|
|
|
78
85
|
|
|
79
86
|
## Scaffold a full app (recommended for a fresh start)
|
|
80
87
|
|
|
88
|
+
> **Not published yet.** The scaffolder (`@synap-core/create-synap-app`) is not
|
|
89
|
+
> on npm and the base template is not public, so `npx` returns 404 today. Use the
|
|
90
|
+
> SDK path below until a release exists.
|
|
91
|
+
|
|
92
|
+
Once published:
|
|
93
|
+
|
|
81
94
|
```bash
|
|
82
|
-
npx create-synap-app my-app
|
|
95
|
+
npx @synap-core/create-synap-app my-app
|
|
83
96
|
```
|
|
84
97
|
|
|
85
|
-
|
|
98
|
+
It creates a Next.js + HeroUI project from the base template, with the SDK, auth,
|
|
86
99
|
app shell, command palette, realtime, and mock mode pre-wired. It also drops an
|
|
87
100
|
`AGENTS.md` into the project so your AI coding tool knows how to work with it.
|
|
88
101
|
|
|
@@ -98,24 +111,27 @@ npm install @synap-core/sdk@^1.0.0 @synap-core/react@^1.0.0
|
|
|
98
111
|
# realtime
|
|
99
112
|
npm install @synap-core/sdk-realtime
|
|
100
113
|
|
|
101
|
-
#
|
|
102
|
-
npm install @synap-core/
|
|
114
|
+
# REST client for API-key holders (agents, scripts); also has setupAgent()
|
|
115
|
+
npm install @synap-core/hub-rest-client
|
|
103
116
|
```
|
|
104
117
|
|
|
118
|
+
Do not install `@synap-core/auth` (retired; its last release calls a removed pod
|
|
119
|
+
route) or `@synap-core/auth-bootstrap` (not published).
|
|
120
|
+
|
|
105
121
|
Pin `@^1.0.0` on `sdk`/`react`. **Do not** install unpinned `@synap-core/sdk` —
|
|
106
122
|
older `0.x` versions on the registry are a different, abandoned package.
|
|
107
123
|
|
|
108
124
|
## Get this knowledge into your AI coding tool
|
|
109
125
|
|
|
110
126
|
```bash
|
|
111
|
-
#
|
|
112
|
-
synap
|
|
127
|
+
# print this skill from your pod's skill knowledge base
|
|
128
|
+
synap skill get synap-app
|
|
113
129
|
|
|
114
|
-
# or wire a tool end-to-end (skills + MCP)
|
|
115
|
-
synap connect --target=cursor # or claude,
|
|
130
|
+
# or wire a tool end-to-end (skills + MCP)
|
|
131
|
+
synap connect --target=cursor # or claude-code, claude-desktop, codex, …
|
|
116
132
|
```
|
|
117
133
|
|
|
118
|
-
|
|
134
|
+
Once the scaffolder is published, the scaffolded project ships an `AGENTS.md` at its root — most AI
|
|
119
135
|
coding tools read it automatically, so a freshly-scaffolded app teaches the AI
|
|
120
136
|
how to build on it with zero extra setup.
|
|
121
137
|
|
|
@@ -141,33 +157,41 @@ import { createSynapClient } from "@synap-core/sdk";
|
|
|
141
157
|
|
|
142
158
|
const synap = createSynapClient({
|
|
143
159
|
podUrl: "https://pod.example.com", // NO trailing slash, NO /trpc suffix
|
|
144
|
-
|
|
160
|
+
sessionToken: process.env.SYNAP_SESSION_TOKEN, // see auth below
|
|
145
161
|
workspaceId: process.env.SYNAP_WORKSPACE_ID ?? "",
|
|
162
|
+
onAuthError: () => {/* 401: sign in again */},
|
|
146
163
|
});
|
|
147
164
|
|
|
148
165
|
// It's a typed tRPC client — full autocomplete over every router.
|
|
149
166
|
const me = await synap.users.me.query();
|
|
150
167
|
const entities = await synap.entities.list.query({ /* filter */ });
|
|
151
168
|
const result = await synap.entities.create.mutate({ /* ... */ });
|
|
152
|
-
// result may be
|
|
169
|
+
// result.status may be "proposed" — that is success. See governance.md.
|
|
153
170
|
```
|
|
154
171
|
|
|
155
172
|
### Auth modes (pick ONE)
|
|
156
|
-
- **`
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
`@synap-core/
|
|
165
|
-
|
|
173
|
+
- **`sessionToken`** — an Ory Kratos session token from a Kratos API (native)
|
|
174
|
+
login flow, sent as `X-Session-Token`. The normal choice for servers, scripts,
|
|
175
|
+
CLIs and mobile.
|
|
176
|
+
- **cookie fallback** — omit both; the client sends the ambient Kratos cookie
|
|
177
|
+
(`credentials: "include"`). Browser only.
|
|
178
|
+
- **`apiKey`** — only the local-mode token of a desktop pod, sent as
|
|
179
|
+
`Authorization: Bearer`. `/trpc` refuses hub and user API keys
|
|
180
|
+
(keys starting with synap_hub_ or synap_user_), and `createSynapClient` throws if you pass
|
|
181
|
+
one. For an API key, use `@synap-core/hub-rest-client` (below).
|
|
182
|
+
|
|
183
|
+
Other options: `extraHeaders`, and `onAuthError({ status, message })`, called on a
|
|
184
|
+
401 (it also turns the pod's plain-JSON 401 body into a clean tRPC error).
|
|
185
|
+
|
|
186
|
+
To mint an API key for a machine client, `setupAgent(podUrl, provisioningToken,
|
|
187
|
+
agentType)` from `@synap-core/hub-rest-client` returns `{ hubApiKey, agentUserId,
|
|
188
|
+
workspaceId }`. That key works with the REST client and the realtime client, not
|
|
189
|
+
with `/trpc`.
|
|
166
190
|
|
|
167
191
|
## React — `@synap-core/react`
|
|
168
192
|
|
|
169
193
|
```tsx
|
|
170
|
-
import { SynapProvider,
|
|
194
|
+
import { SynapProvider, useSynap, useEntities } from "@synap-core/react";
|
|
171
195
|
|
|
172
196
|
function App() {
|
|
173
197
|
return (
|
|
@@ -176,31 +200,73 @@ function App() {
|
|
|
176
200
|
</SynapProvider>
|
|
177
201
|
);
|
|
178
202
|
}
|
|
203
|
+
|
|
204
|
+
function Dashboard() {
|
|
205
|
+
const { data } = useEntities("note", { limit: 20 }); // thin data hook
|
|
206
|
+
const create = useSynap.entities.create.useMutation(); // raw tRPC hooks
|
|
207
|
+
// …
|
|
208
|
+
}
|
|
179
209
|
```
|
|
180
210
|
|
|
181
|
-
`
|
|
182
|
-
|
|
183
|
-
|
|
211
|
+
`useSynap` is the tRPC React hook tree itself — write
|
|
212
|
+
`useSynap.entities.list.useQuery(…)`, **not** `useSynap().entities…`: calling it
|
|
213
|
+
returns `undefined` at runtime (some package docs still show the call form).
|
|
214
|
+
|
|
215
|
+
`SynapProvider` takes every `createSynapClient` option (incl. `sessionToken` and
|
|
216
|
+
`onAuthError`) plus an optional `queryClient` to share an existing TanStack Query
|
|
217
|
+
client. Exports: `SynapProvider`, `useSynapContext` (`{ podUrl, workspaceId }`),
|
|
218
|
+
`useSynap`, the data hooks `useEntity`, `useEntities`, `useLinks`, `useView`,
|
|
219
|
+
and the `RouterInputs` / `RouterOutputs` types. React 18 or 19 is a peer
|
|
220
|
+
dependency — the package does not bundle its own.
|
|
184
221
|
|
|
185
222
|
## Realtime — `@synap-core/sdk-realtime`
|
|
186
223
|
|
|
187
224
|
```ts
|
|
188
225
|
import { createRealtimeClient } from "@synap-core/sdk-realtime";
|
|
189
226
|
|
|
190
|
-
const rt = createRealtimeClient({
|
|
191
|
-
|
|
192
|
-
|
|
227
|
+
const rt = createRealtimeClient({
|
|
228
|
+
url: podUrl, // pod base URL; the client adds the /presence namespace
|
|
229
|
+
workspaceId,
|
|
230
|
+
sessionToken, // a Kratos session token…
|
|
231
|
+
userId, // …and the identity id it belongs to (both required)
|
|
232
|
+
// or, as a service account: apiKey (scope realtime:observe), no userId
|
|
233
|
+
onInvalidate: (event) => {
|
|
234
|
+
// entity/relation changed — refetch, e.g.
|
|
235
|
+
queryClient.invalidateQueries({ queryKey: ["entities"] });
|
|
236
|
+
},
|
|
193
237
|
});
|
|
238
|
+
|
|
239
|
+
rt.connect(); // nothing connects until you call this
|
|
240
|
+
// … later
|
|
241
|
+
rt.disconnect();
|
|
194
242
|
```
|
|
195
243
|
|
|
196
|
-
|
|
197
|
-
|
|
244
|
+
- Callbacks (all options, no subscribe methods): `onInvalidate` (the
|
|
245
|
+
entity/relation-changing subset), `onEvent` (every known event, `{ name, data }`),
|
|
246
|
+
`onConnect`, `onDisconnect(reason)`, `onError(error)`.
|
|
247
|
+
- The returned client has `connect()`, `disconnect()`, and read-only `connected`
|
|
248
|
+
and `state` (`"idle" | "connecting" | "connected" | "disconnected"`).
|
|
249
|
+
- `SYNAP_EVENT_NAMES` lists the forwarded events; `ENTITY_INVALIDATING_EVENTS` is
|
|
250
|
+
the subset behind `onInvalidate`.
|
|
251
|
+
- Websocket-only transport (credentials never ride a long-poll URL), and
|
|
252
|
+
`connect()` throws on a non-TLS URL unless you pass `allowInsecure: true`
|
|
253
|
+
(localhost dev only).
|
|
254
|
+
|
|
255
|
+
**Version note.** `@synap-core/sdk-realtime@0.1.0` (the current npm release) sends
|
|
256
|
+
every credential as `auth.token`. The pod reads `{ userId, token, workspaceId }`
|
|
257
|
+
for a user and `{ apiKey, workspaceId }` for a service account, so on 0.1.0 a
|
|
258
|
+
session token works only when you also pass `userId`, and an `apiKey` is always
|
|
259
|
+
refused. The fix — correct handshake keys, plus an up-front throw for no
|
|
260
|
+
credential, both credentials, or `sessionToken` without `userId` — lands in the
|
|
261
|
+
first release after 0.1.0. Until then, authenticate realtime with
|
|
262
|
+
`sessionToken` + `userId`.
|
|
198
263
|
|
|
199
264
|
## Two transports, on purpose
|
|
200
|
-
- `@synap-core/sdk` (tRPC) — for apps. Typed, hooks
|
|
201
|
-
- `@synap-core/hub-rest-client` (REST
|
|
202
|
-
|
|
203
|
-
|
|
265
|
+
- `@synap-core/sdk` (tRPC) — for apps signed in as a user. Typed, React hooks.
|
|
266
|
+
- `@synap-core/hub-rest-client` (REST against `/api/hub/*`, zero-dep) — for
|
|
267
|
+
agents/CLIs/scripts holding an API key. `new HubRestClient({ podUrl, apiKey,
|
|
268
|
+
workspaceId })`. Carries agent verbs the tRPC surface has no first-class path
|
|
269
|
+
for (`ask`, `orient`, `discover`).
|
|
204
270
|
|
|
205
271
|
## Keep types fresh
|
|
206
272
|
The SDK is typed by `@synap-core/api-types`, generated from the pod's live router.
|
|
@@ -217,11 +283,16 @@ mock mode — all pre-wired. You add your screens; the plumbing is done.
|
|
|
217
283
|
|
|
218
284
|
## Scaffold it
|
|
219
285
|
|
|
286
|
+
> **Not published yet.** `@synap-core/create-synap-app` is not on npm and the
|
|
287
|
+
> base template is not public, so this does not work today. Until a release
|
|
288
|
+
> exists, build on the SDK directly (`using-the-sdk.md`). The rest of this page
|
|
289
|
+
> describes the template as it will ship.
|
|
290
|
+
|
|
220
291
|
```bash
|
|
221
|
-
npx create-synap-app my-app
|
|
222
|
-
cd my-app
|
|
223
|
-
|
|
224
|
-
pnpm dev
|
|
292
|
+
npx @synap-core/create-synap-app my-app
|
|
293
|
+
cd my-app # the scaffolder seeds .env.local from env.example;
|
|
294
|
+
# fill in your pod / control-plane URLs
|
|
295
|
+
pnpm install && pnpm dev # http://localhost:3010
|
|
225
296
|
```
|
|
226
297
|
|
|
227
298
|
Develop with **no pod** by setting `NEXT_PUBLIC_BASE_MOCK_MODE=true`.
|
|
@@ -269,9 +340,9 @@ components/layout/
|
|
|
269
340
|
|
|
270
341
|
## Auth flow (already wired)
|
|
271
342
|
|
|
272
|
-
`/login` → Synap Cloud sign-in
|
|
273
|
-
|
|
274
|
-
|
|
343
|
+
`/login` → Synap Cloud sign-in → optional TOTP → pod picker → session stored →
|
|
344
|
+
`/home`. A pod can also be signed into directly through its own Kratos (the
|
|
345
|
+
login screen's manual-login step). You don't build this; you theme it.
|
|
275
346
|
|
|
276
347
|
---
|
|
277
348
|
|
|
@@ -282,38 +353,49 @@ mutates a Synap pod.
|
|
|
282
353
|
|
|
283
354
|
## The contract
|
|
284
355
|
|
|
285
|
-
Every mutation (`entities.create`, `entities.update`, `relations.create`, …)
|
|
286
|
-
|
|
356
|
+
Every governed mutation (`entities.create`, `entities.update`, `relations.create`, …)
|
|
357
|
+
has one of three outcomes, decided **by the pod**, not by your app:
|
|
287
358
|
|
|
288
|
-
| Outcome |
|
|
359
|
+
| Outcome | How it arrives | What your code should do |
|
|
289
360
|
|---|---|---|
|
|
290
|
-
|
|
|
291
|
-
| `proposed`
|
|
292
|
-
|
|
|
361
|
+
| applied | resolves with the procedure's own status (`"created"`, `"updated"`, …) | proceed |
|
|
362
|
+
| proposed | resolves with `status: "proposed"`, `proposalId`, `reviewUrl`, `message` — queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
|
|
363
|
+
| denied | **rejects** with a tRPC `FORBIDDEN` error whose message is the reason | show why; do not retry blindly |
|
|
293
364
|
|
|
294
365
|
## Why it matters for your code
|
|
295
366
|
|
|
296
367
|
- **Never treat `proposed` as an error.** It is the normal, healthy path for any
|
|
297
368
|
write that governance decides a human should see first. Retrying a `proposed`
|
|
298
369
|
write creates duplicates.
|
|
299
|
-
- **
|
|
300
|
-
|
|
370
|
+
- **A `proposed` result does not throw.** It is a successful response with a
|
|
371
|
+
status; only a denial throws.
|
|
301
372
|
- **Surface the review link/id** so the user can approve it. An unreviewed
|
|
302
373
|
proposal is not yet in the graph — it won't show up in reads until approved.
|
|
303
374
|
|
|
304
375
|
## Pattern
|
|
305
376
|
|
|
306
377
|
```ts
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
378
|
+
import { TRPCClientError } from "@trpc/client";
|
|
379
|
+
|
|
380
|
+
try {
|
|
381
|
+
const res = await synap.entities.create.mutate(input);
|
|
382
|
+
if (res.status === "proposed") {
|
|
383
|
+
// tell the user "queued for review"; link res.reviewUrl / res.proposalId.
|
|
384
|
+
// res.entity is null — nothing exists until the proposal is approved.
|
|
385
|
+
} else {
|
|
386
|
+
// "created": res.id / res.entity are live
|
|
387
|
+
}
|
|
388
|
+
} catch (err) {
|
|
389
|
+
if (err instanceof TRPCClientError && err.data?.code === "FORBIDDEN") {
|
|
390
|
+
// denied: show err.message; don't retry
|
|
391
|
+
} else throw err;
|
|
312
392
|
}
|
|
313
393
|
```
|
|
314
394
|
|
|
315
395
|
## Idempotency
|
|
316
396
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
397
|
+
`entities.create` takes no idempotency key. The pod dedups some repeats on its
|
|
398
|
+
own — an identical agent-authored retry within a short window, and creates that
|
|
399
|
+
match an existing entity by identity (a stable `externalId`, or identifying
|
|
400
|
+
properties) — but neither covers every case. Never resend a `proposed` write,
|
|
401
|
+
and when unsure, read back before re-creating.
|
|
@@ -9,7 +9,7 @@ description: >
|
|
|
9
9
|
"npx create-synap-app". NOT the `synap` skill (capture/recall in a pod) nor
|
|
10
10
|
`synap-ui` (views inside the pod's own UI) — this is about writing app CODE.
|
|
11
11
|
metadata:
|
|
12
|
-
|
|
12
|
+
synap:
|
|
13
13
|
requires:
|
|
14
14
|
env: []
|
|
15
15
|
optional_env: [SYNAP_POD_URL, SYNAP_WORKSPACE_ID]
|
|
@@ -7,11 +7,16 @@ mock mode — all pre-wired. You add your screens; the plumbing is done.
|
|
|
7
7
|
|
|
8
8
|
## Scaffold it
|
|
9
9
|
|
|
10
|
+
> **Not published yet.** `@synap-core/create-synap-app` is not on npm and the
|
|
11
|
+
> base template is not public, so this does not work today. Until a release
|
|
12
|
+
> exists, build on the SDK directly (`using-the-sdk.md`). The rest of this page
|
|
13
|
+
> describes the template as it will ship.
|
|
14
|
+
|
|
10
15
|
```bash
|
|
11
|
-
npx create-synap-app my-app
|
|
12
|
-
cd my-app
|
|
13
|
-
|
|
14
|
-
pnpm dev
|
|
16
|
+
npx @synap-core/create-synap-app my-app
|
|
17
|
+
cd my-app # the scaffolder seeds .env.local from env.example;
|
|
18
|
+
# fill in your pod / control-plane URLs
|
|
19
|
+
pnpm install && pnpm dev # http://localhost:3010
|
|
15
20
|
```
|
|
16
21
|
|
|
17
22
|
Develop with **no pod** by setting `NEXT_PUBLIC_BASE_MOCK_MODE=true`.
|
|
@@ -59,6 +64,6 @@ components/layout/
|
|
|
59
64
|
|
|
60
65
|
## Auth flow (already wired)
|
|
61
66
|
|
|
62
|
-
`/login` → Synap Cloud sign-in
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
`/login` → Synap Cloud sign-in → optional TOTP → pod picker → session stored →
|
|
68
|
+
`/home`. A pod can also be signed into directly through its own Kratos (the
|
|
69
|
+
login screen's manual-login step). You don't build this; you theme it.
|
|
@@ -5,38 +5,49 @@ mutates a Synap pod.
|
|
|
5
5
|
|
|
6
6
|
## The contract
|
|
7
7
|
|
|
8
|
-
Every mutation (`entities.create`, `entities.update`, `relations.create`, …)
|
|
9
|
-
|
|
8
|
+
Every governed mutation (`entities.create`, `entities.update`, `relations.create`, …)
|
|
9
|
+
has one of three outcomes, decided **by the pod**, not by your app:
|
|
10
10
|
|
|
11
|
-
| Outcome |
|
|
11
|
+
| Outcome | How it arrives | What your code should do |
|
|
12
12
|
|---|---|---|
|
|
13
|
-
|
|
|
14
|
-
| `proposed`
|
|
15
|
-
|
|
|
13
|
+
| applied | resolves with the procedure's own status (`"created"`, `"updated"`, …) | proceed |
|
|
14
|
+
| proposed | resolves with `status: "proposed"`, `proposalId`, `reviewUrl`, `message` — queued for the pod owner's review (like a PR) | **surface the review — do NOT treat as failure, do NOT retry** |
|
|
15
|
+
| denied | **rejects** with a tRPC `FORBIDDEN` error whose message is the reason | show why; do not retry blindly |
|
|
16
16
|
|
|
17
17
|
## Why it matters for your code
|
|
18
18
|
|
|
19
19
|
- **Never treat `proposed` as an error.** It is the normal, healthy path for any
|
|
20
20
|
write that governance decides a human should see first. Retrying a `proposed`
|
|
21
21
|
write creates duplicates.
|
|
22
|
-
- **
|
|
23
|
-
|
|
22
|
+
- **A `proposed` result does not throw.** It is a successful response with a
|
|
23
|
+
status; only a denial throws.
|
|
24
24
|
- **Surface the review link/id** so the user can approve it. An unreviewed
|
|
25
25
|
proposal is not yet in the graph — it won't show up in reads until approved.
|
|
26
26
|
|
|
27
27
|
## Pattern
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
import { TRPCClientError } from "@trpc/client";
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const res = await synap.entities.create.mutate(input);
|
|
34
|
+
if (res.status === "proposed") {
|
|
35
|
+
// tell the user "queued for review"; link res.reviewUrl / res.proposalId.
|
|
36
|
+
// res.entity is null — nothing exists until the proposal is approved.
|
|
37
|
+
} else {
|
|
38
|
+
// "created": res.id / res.entity are live
|
|
39
|
+
}
|
|
40
|
+
} catch (err) {
|
|
41
|
+
if (err instanceof TRPCClientError && err.data?.code === "FORBIDDEN") {
|
|
42
|
+
// denied: show err.message; don't retry
|
|
43
|
+
} else throw err;
|
|
35
44
|
}
|
|
36
45
|
```
|
|
37
46
|
|
|
38
47
|
## Idempotency
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
`entities.create` takes no idempotency key. The pod dedups some repeats on its
|
|
50
|
+
own — an identical agent-authored retry within a short window, and creates that
|
|
51
|
+
match an existing entity by identity (a stable `externalId`, or identifying
|
|
52
|
+
properties) — but neither covers every case. Never resend a `proposed` write,
|
|
53
|
+
and when unsure, read back before re-creating.
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Scaffold a full app (recommended for a fresh start)
|
|
4
4
|
|
|
5
|
+
> **Not published yet.** The scaffolder (`@synap-core/create-synap-app`) is not
|
|
6
|
+
> on npm and the base template is not public, so `npx` returns 404 today. Use the
|
|
7
|
+
> SDK path below until a release exists.
|
|
8
|
+
|
|
9
|
+
Once published:
|
|
10
|
+
|
|
5
11
|
```bash
|
|
6
|
-
npx create-synap-app my-app
|
|
12
|
+
npx @synap-core/create-synap-app my-app
|
|
7
13
|
```
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
It creates a Next.js + HeroUI project from the base template, with the SDK, auth,
|
|
10
16
|
app shell, command palette, realtime, and mock mode pre-wired. It also drops an
|
|
11
17
|
`AGENTS.md` into the project so your AI coding tool knows how to work with it.
|
|
12
18
|
|
|
@@ -22,24 +28,27 @@ npm install @synap-core/sdk@^1.0.0 @synap-core/react@^1.0.0
|
|
|
22
28
|
# realtime
|
|
23
29
|
npm install @synap-core/sdk-realtime
|
|
24
30
|
|
|
25
|
-
#
|
|
26
|
-
npm install @synap-core/
|
|
31
|
+
# REST client for API-key holders (agents, scripts); also has setupAgent()
|
|
32
|
+
npm install @synap-core/hub-rest-client
|
|
27
33
|
```
|
|
28
34
|
|
|
35
|
+
Do not install `@synap-core/auth` (retired; its last release calls a removed pod
|
|
36
|
+
route) or `@synap-core/auth-bootstrap` (not published).
|
|
37
|
+
|
|
29
38
|
Pin `@^1.0.0` on `sdk`/`react`. **Do not** install unpinned `@synap-core/sdk` —
|
|
30
39
|
older `0.x` versions on the registry are a different, abandoned package.
|
|
31
40
|
|
|
32
41
|
## Get this knowledge into your AI coding tool
|
|
33
42
|
|
|
34
43
|
```bash
|
|
35
|
-
#
|
|
36
|
-
synap
|
|
44
|
+
# print this skill from your pod's skill knowledge base
|
|
45
|
+
synap skill get synap-app
|
|
37
46
|
|
|
38
|
-
# or wire a tool end-to-end (skills + MCP)
|
|
39
|
-
synap connect --target=cursor # or claude,
|
|
47
|
+
# or wire a tool end-to-end (skills + MCP)
|
|
48
|
+
synap connect --target=cursor # or claude-code, claude-desktop, codex, …
|
|
40
49
|
```
|
|
41
50
|
|
|
42
|
-
|
|
51
|
+
Once the scaffolder is published, the scaffolded project ships an `AGENTS.md` at its root — most AI
|
|
43
52
|
coding tools read it automatically, so a freshly-scaffolded app teaches the AI
|
|
44
53
|
how to build on it with zero extra setup.
|
|
45
54
|
|
|
@@ -9,8 +9,8 @@ pod, and **every write is governed** (see `governance.md`).
|
|
|
9
9
|
| The user has… | Do this | Read |
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| an existing app (any framework) | add the SDK | `using-the-sdk.md`, `install-commands.md` |
|
|
12
|
-
| nothing yet, wants a full app fast | scaffold the base app | `creating-the-base-app.md`, `install-commands.md` |
|
|
13
|
-
| a server / script / CLI (no browser) | SDK with a session token or API key | `using-the-sdk.md` |
|
|
12
|
+
| nothing yet, wants a full app fast | scaffold the base app (scaffolder not published yet) | `creating-the-base-app.md`, `install-commands.md` |
|
|
13
|
+
| a server / script / CLI (no browser) | SDK with a session token, or the REST client with an API key | `using-the-sdk.md` |
|
|
14
14
|
|
|
15
15
|
Both paths use the same underlying packages; only the amount of scaffolding differs.
|
|
16
16
|
|
|
@@ -18,9 +18,11 @@ Both paths use the same underlying packages; only the amount of scaffolding diff
|
|
|
18
18
|
|
|
19
19
|
- `@synap-core/sdk` — typed tRPC client. `createSynapClient({ podUrl, ... })`. **The one you almost always want.**
|
|
20
20
|
- `@synap-core/react` — React/TanStack-Query bindings (`SynapProvider`, hooks).
|
|
21
|
-
- `@synap-core/sdk-realtime` — Socket.IO
|
|
22
|
-
- `@synap-core/
|
|
23
|
-
|
|
21
|
+
- `@synap-core/sdk-realtime` — Socket.IO "something changed" events (`createRealtimeClient`).
|
|
22
|
+
- `@synap-core/hub-rest-client` — zero-dep REST client for API-key holders (`HubRestClient`, `setupAgent`).
|
|
23
|
+
|
|
24
|
+
Do not install `@synap-core/auth`: that package was retired, and its last npm
|
|
25
|
+
release signs in through a pod route that no longer exists.
|
|
24
26
|
|
|
25
27
|
Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
|
|
26
28
|
|
|
@@ -30,13 +32,18 @@ Pin `@^1.0.0` on `sdk`/`react` so you never resolve an old, abandoned `0.x`.
|
|
|
30
32
|
the change is queued for the pod owner's review (like a PR). Surface the review,
|
|
31
33
|
don't retry. Full contract: `governance.md`.
|
|
32
34
|
2. **The pod URL has no `/trpc` suffix and no trailing slash.** The SDK appends `/trpc`.
|
|
33
|
-
3. **Non-browser clients (server/CLI/mobile) authenticate with a token or
|
|
34
|
-
never a cookie.
|
|
35
|
+
3. **Non-browser clients (server/CLI/mobile) authenticate with a session token or
|
|
36
|
+
an API key**, never a cookie. An API key only works on the REST client and
|
|
37
|
+
realtime, not on the tRPC SDK. Browser apps use the Kratos session cookie.
|
|
35
38
|
|
|
36
39
|
## Get a pod to build against
|
|
37
40
|
|
|
38
|
-
- **Self-host (free):**
|
|
39
|
-
|
|
41
|
+
- **Self-host (free):** run the backend's `install.sh` (it installs Docker if
|
|
42
|
+
needed, fetches the release bundle, checks it against the release manifest's
|
|
43
|
+
sha256 and runs `synap install`); see the backend's `deploy/README.md`. It
|
|
44
|
+
also checks the manifest's signature: by default
|
|
45
|
+
(`SYNAP_RELEASE_VERIFY=warn`) it only warns and carries on when the signature
|
|
46
|
+
is missing or does not verify; `SYNAP_RELEASE_VERIFY=enforce` refuses.
|
|
40
47
|
- **Managed (paid):** sign up at synap.live and provision a pod.
|
|
41
48
|
|
|
42
49
|
You can develop the base app with **no pod at all** using its mock mode
|