@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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-DIRECTORY lens — the durable default scope for a working tree.
|
|
3
|
+
*
|
|
4
|
+
* RATIFIED MODEL: a directory's `.synap/lens.json` is where a lens normally
|
|
5
|
+
* lives; the per-Claude-session lens (`session-lens.ts`) is an explicit
|
|
6
|
+
* OVERRIDE on top of it.
|
|
7
|
+
*
|
|
8
|
+
* The session lens alone could not express "this repo is always Builder" — it
|
|
9
|
+
* dies with the tab, so every new session started pod-wide (or, worse, on
|
|
10
|
+
* whatever the global config happened to hold) and the operator re-pinned by
|
|
11
|
+
* hand. A directory lens is discovered the way git discovers `.git`: walk UP
|
|
12
|
+
* from the cwd until a `.synap/lens.json` turns up.
|
|
13
|
+
*
|
|
14
|
+
* Full precedence, highest first (assembled in `hub-client.ts`):
|
|
15
|
+
*
|
|
16
|
+
* explicit flag › session lens › DIRECTORY LENS › env var › global config
|
|
17
|
+
*
|
|
18
|
+
* ── Pod qualification ────────────────────────────────────────────────────────
|
|
19
|
+
* Workspace and project ids are POD-LOCAL: sending workspace W (pod A) to pod B
|
|
20
|
+
* is the "Access denied to workspace" 403. A directory lens is exposed to that
|
|
21
|
+
* hazard MORE than a session lens is, because it outlives many `synap pods use`
|
|
22
|
+
* switches. It therefore carries the same `podUrl` stamp and is compared
|
|
23
|
+
* through the SAME door — {@link lensMatchesPod} from `session-lens.ts`. There
|
|
24
|
+
* is deliberately no second comparison implementation here; a duplicated
|
|
25
|
+
* "is this the right pod" rule that drifts is the bug, not the fix.
|
|
26
|
+
*
|
|
27
|
+
* ── Write safety ─────────────────────────────────────────────────────────────
|
|
28
|
+
* Writes never escape the user's own tree: the target is either an EXISTING
|
|
29
|
+
* lens found on the upward walk (only when it sits at or below the home dir) or
|
|
30
|
+
* the cwd itself. A lens is never created in an ancestor, never above the home
|
|
31
|
+
* dir, and never at the filesystem root.
|
|
32
|
+
*/
|
|
33
|
+
import { type SessionLens } from "./session-lens.js";
|
|
34
|
+
/** A directory lens is the same shape as a session lens — same fields, different lifetime. */
|
|
35
|
+
export type DirectoryLens = SessionLens;
|
|
36
|
+
export interface FoundDirectoryLens {
|
|
37
|
+
lens: DirectoryLens;
|
|
38
|
+
/** Absolute path to the `.synap/lens.json` that supplied it — shown by `synap lens`. */
|
|
39
|
+
file: string;
|
|
40
|
+
/** The directory that owns it (the one containing `.synap/`). */
|
|
41
|
+
dir: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Every directory to consider, nearest first: the cwd, then each ancestor.
|
|
45
|
+
* The walk STOPS after the home dir (a lens above `~` would apply to every
|
|
46
|
+
* unrelated project on the machine) and at the filesystem root.
|
|
47
|
+
*/
|
|
48
|
+
export declare function lensSearchPath(startDir?: string): string[];
|
|
49
|
+
/**
|
|
50
|
+
* The nearest directory lens at or above `startDir`, ignoring pod qualification.
|
|
51
|
+
* Callers that are about to SEND ids must use {@link resolveDirectoryLensForPod}.
|
|
52
|
+
*/
|
|
53
|
+
export declare function findDirectoryLens(startDir?: string): FoundDirectoryLens | null;
|
|
54
|
+
/**
|
|
55
|
+
* The nearest directory lens, but ONLY if it belongs to `podUrl`.
|
|
56
|
+
*
|
|
57
|
+
* A lens stamped with a different pod returns null so the caller falls through
|
|
58
|
+
* to the next rung (env var, then the pod-qualified global config) instead of
|
|
59
|
+
* sending a foreign workspace id. Comparison is delegated to `lensMatchesPod`
|
|
60
|
+
* — including its deliberate leniency for lenses written before the `podUrl`
|
|
61
|
+
* stamp existed.
|
|
62
|
+
*/
|
|
63
|
+
export declare function resolveDirectoryLensForPod(podUrl: string | undefined, startDir?: string): FoundDirectoryLens | null;
|
|
64
|
+
/**
|
|
65
|
+
* The fields of a directory lens that are in force for THIS process.
|
|
66
|
+
*
|
|
67
|
+
* Workspace and project are the tree's durable scope and always apply. The
|
|
68
|
+
* focus SESSION does not, inside a Claude Code conversation: a session is the
|
|
69
|
+
* conversation's own, and `attachActiveSessionId` writes it to the session lens
|
|
70
|
+
* there for exactly that reason. Read through, a directory-lens session —
|
|
71
|
+
* attached from a plain terminal, or migrated from a `.synap-session` — was
|
|
72
|
+
* sent as `X-Session-Id` by every conversation opened in the tree, long after
|
|
73
|
+
* it went quiet, so each one's writes were filed into that old session (and a
|
|
74
|
+
* stale one was revived by them). Outside Claude Code there is no conversation
|
|
75
|
+
* to own a session, so the directory lens still carries it.
|
|
76
|
+
*/
|
|
77
|
+
export declare function effectiveDirectoryLens(lens: DirectoryLens): DirectoryLens;
|
|
78
|
+
/**
|
|
79
|
+
* Where would a write land? An existing lens on the upward walk wins (so
|
|
80
|
+
* `synap use` from a subdirectory re-pins the repo's lens rather than seeding a
|
|
81
|
+
* nested one), but only when that lens sits at or below the home dir. Otherwise
|
|
82
|
+
* the cwd — a lens is never CREATED in an ancestor.
|
|
83
|
+
*/
|
|
84
|
+
export declare function directoryLensWriteTarget(startDir?: string): string;
|
|
85
|
+
/**
|
|
86
|
+
* Merge-write the directory lens. Returns the file it wrote, so the caller can
|
|
87
|
+
* TELL the user which path now owns their scope — a silently-resolved lens is
|
|
88
|
+
* exactly what produced the 403 class this module exists to make legible.
|
|
89
|
+
*/
|
|
90
|
+
export declare function writeDirectoryLens(patch: Partial<DirectoryLens>, startDir?: string): {
|
|
91
|
+
lens: DirectoryLens;
|
|
92
|
+
file: string;
|
|
93
|
+
dir: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Clear one field (or the whole lens) from the nearest directory lens.
|
|
97
|
+
* Returns the file touched, or null when there was nothing to clear.
|
|
98
|
+
*/
|
|
99
|
+
export declare function clearDirectoryLensField(field?: keyof DirectoryLens, startDir?: string): string | null;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-DIRECTORY lens — the durable default scope for a working tree.
|
|
3
|
+
*
|
|
4
|
+
* RATIFIED MODEL: a directory's `.synap/lens.json` is where a lens normally
|
|
5
|
+
* lives; the per-Claude-session lens (`session-lens.ts`) is an explicit
|
|
6
|
+
* OVERRIDE on top of it.
|
|
7
|
+
*
|
|
8
|
+
* The session lens alone could not express "this repo is always Builder" — it
|
|
9
|
+
* dies with the tab, so every new session started pod-wide (or, worse, on
|
|
10
|
+
* whatever the global config happened to hold) and the operator re-pinned by
|
|
11
|
+
* hand. A directory lens is discovered the way git discovers `.git`: walk UP
|
|
12
|
+
* from the cwd until a `.synap/lens.json` turns up.
|
|
13
|
+
*
|
|
14
|
+
* Full precedence, highest first (assembled in `hub-client.ts`):
|
|
15
|
+
*
|
|
16
|
+
* explicit flag › session lens › DIRECTORY LENS › env var › global config
|
|
17
|
+
*
|
|
18
|
+
* ── Pod qualification ────────────────────────────────────────────────────────
|
|
19
|
+
* Workspace and project ids are POD-LOCAL: sending workspace W (pod A) to pod B
|
|
20
|
+
* is the "Access denied to workspace" 403. A directory lens is exposed to that
|
|
21
|
+
* hazard MORE than a session lens is, because it outlives many `synap pods use`
|
|
22
|
+
* switches. It therefore carries the same `podUrl` stamp and is compared
|
|
23
|
+
* through the SAME door — {@link lensMatchesPod} from `session-lens.ts`. There
|
|
24
|
+
* is deliberately no second comparison implementation here; a duplicated
|
|
25
|
+
* "is this the right pod" rule that drifts is the bug, not the fix.
|
|
26
|
+
*
|
|
27
|
+
* ── Write safety ─────────────────────────────────────────────────────────────
|
|
28
|
+
* Writes never escape the user's own tree: the target is either an EXISTING
|
|
29
|
+
* lens found on the upward walk (only when it sits at or below the home dir) or
|
|
30
|
+
* the cwd itself. A lens is never created in an ancestor, never above the home
|
|
31
|
+
* dir, and never at the filesystem root.
|
|
32
|
+
*/
|
|
33
|
+
import fs from "node:fs";
|
|
34
|
+
import os from "node:os";
|
|
35
|
+
import path from "node:path";
|
|
36
|
+
import { getClaudeSessionId, lensMatchesPod } from "./session-lens.js";
|
|
37
|
+
import { writeSecretFile } from "./atomic-file.js";
|
|
38
|
+
/** The directory name a lens lives in, and the file inside it. */
|
|
39
|
+
const LENS_DIR_NAME = ".synap";
|
|
40
|
+
const LENS_FILE_NAME = "lens.json";
|
|
41
|
+
function lensFileIn(dir) {
|
|
42
|
+
return path.join(dir, LENS_DIR_NAME, LENS_FILE_NAME);
|
|
43
|
+
}
|
|
44
|
+
/** Is `dir` the home dir or inside it? Used to bound where a lens may be WRITTEN. */
|
|
45
|
+
function isAtOrBelowHome(dir) {
|
|
46
|
+
const home = path.resolve(os.homedir());
|
|
47
|
+
const target = path.resolve(dir);
|
|
48
|
+
if (target === home)
|
|
49
|
+
return true;
|
|
50
|
+
return target.startsWith(home + path.sep);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Every directory to consider, nearest first: the cwd, then each ancestor.
|
|
54
|
+
* The walk STOPS after the home dir (a lens above `~` would apply to every
|
|
55
|
+
* unrelated project on the machine) and at the filesystem root.
|
|
56
|
+
*/
|
|
57
|
+
export function lensSearchPath(startDir = process.cwd()) {
|
|
58
|
+
const home = path.resolve(os.homedir());
|
|
59
|
+
const dirs = [];
|
|
60
|
+
let dir = path.resolve(startDir);
|
|
61
|
+
for (;;) {
|
|
62
|
+
dirs.push(dir);
|
|
63
|
+
if (dir === home)
|
|
64
|
+
break;
|
|
65
|
+
const parent = path.dirname(dir);
|
|
66
|
+
if (parent === dir)
|
|
67
|
+
break; // filesystem root
|
|
68
|
+
dir = parent;
|
|
69
|
+
}
|
|
70
|
+
return dirs;
|
|
71
|
+
}
|
|
72
|
+
/** Read + parse one candidate, or null when absent/corrupt. A malformed lens must not crash the CLI. */
|
|
73
|
+
function readLensFile(dir) {
|
|
74
|
+
const file = lensFileIn(dir);
|
|
75
|
+
try {
|
|
76
|
+
const parsed = JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
77
|
+
if (!parsed || typeof parsed !== "object")
|
|
78
|
+
return null;
|
|
79
|
+
return { lens: parsed, file, dir };
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The nearest directory lens at or above `startDir`, ignoring pod qualification.
|
|
87
|
+
* Callers that are about to SEND ids must use {@link resolveDirectoryLensForPod}.
|
|
88
|
+
*/
|
|
89
|
+
export function findDirectoryLens(startDir) {
|
|
90
|
+
for (const dir of lensSearchPath(startDir)) {
|
|
91
|
+
const found = readLensFile(dir);
|
|
92
|
+
if (found)
|
|
93
|
+
return found;
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The nearest directory lens, but ONLY if it belongs to `podUrl`.
|
|
99
|
+
*
|
|
100
|
+
* A lens stamped with a different pod returns null so the caller falls through
|
|
101
|
+
* to the next rung (env var, then the pod-qualified global config) instead of
|
|
102
|
+
* sending a foreign workspace id. Comparison is delegated to `lensMatchesPod`
|
|
103
|
+
* — including its deliberate leniency for lenses written before the `podUrl`
|
|
104
|
+
* stamp existed.
|
|
105
|
+
*/
|
|
106
|
+
export function resolveDirectoryLensForPod(podUrl, startDir) {
|
|
107
|
+
const found = findDirectoryLens(startDir);
|
|
108
|
+
if (!found)
|
|
109
|
+
return null;
|
|
110
|
+
return lensMatchesPod(found.lens, podUrl) ? found : null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The fields of a directory lens that are in force for THIS process.
|
|
114
|
+
*
|
|
115
|
+
* Workspace and project are the tree's durable scope and always apply. The
|
|
116
|
+
* focus SESSION does not, inside a Claude Code conversation: a session is the
|
|
117
|
+
* conversation's own, and `attachActiveSessionId` writes it to the session lens
|
|
118
|
+
* there for exactly that reason. Read through, a directory-lens session —
|
|
119
|
+
* attached from a plain terminal, or migrated from a `.synap-session` — was
|
|
120
|
+
* sent as `X-Session-Id` by every conversation opened in the tree, long after
|
|
121
|
+
* it went quiet, so each one's writes were filed into that old session (and a
|
|
122
|
+
* stale one was revived by them). Outside Claude Code there is no conversation
|
|
123
|
+
* to own a session, so the directory lens still carries it.
|
|
124
|
+
*/
|
|
125
|
+
export function effectiveDirectoryLens(lens) {
|
|
126
|
+
if (!getClaudeSessionId())
|
|
127
|
+
return lens;
|
|
128
|
+
const { focusSessionId: _conversationOwned, ...scope } = lens;
|
|
129
|
+
return scope;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Where would a write land? An existing lens on the upward walk wins (so
|
|
133
|
+
* `synap use` from a subdirectory re-pins the repo's lens rather than seeding a
|
|
134
|
+
* nested one), but only when that lens sits at or below the home dir. Otherwise
|
|
135
|
+
* the cwd — a lens is never CREATED in an ancestor.
|
|
136
|
+
*/
|
|
137
|
+
export function directoryLensWriteTarget(startDir = process.cwd()) {
|
|
138
|
+
const found = findDirectoryLens(startDir);
|
|
139
|
+
if (found && isAtOrBelowHome(found.dir))
|
|
140
|
+
return found.dir;
|
|
141
|
+
return path.resolve(startDir);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Merge-write the directory lens. Returns the file it wrote, so the caller can
|
|
145
|
+
* TELL the user which path now owns their scope — a silently-resolved lens is
|
|
146
|
+
* exactly what produced the 403 class this module exists to make legible.
|
|
147
|
+
*/
|
|
148
|
+
export function writeDirectoryLens(patch, startDir) {
|
|
149
|
+
const dir = directoryLensWriteTarget(startDir);
|
|
150
|
+
const prev = readLensFile(dir)?.lens ?? {};
|
|
151
|
+
const next = { ...prev, ...patch, updatedAt: Date.now() };
|
|
152
|
+
const file = lensFileIn(dir);
|
|
153
|
+
fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
|
|
154
|
+
writeSecretFile(file, JSON.stringify(next, null, 2) + "\n", { mode: 0o600 });
|
|
155
|
+
return { lens: next, file, dir };
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Clear one field (or the whole lens) from the nearest directory lens.
|
|
159
|
+
* Returns the file touched, or null when there was nothing to clear.
|
|
160
|
+
*/
|
|
161
|
+
export function clearDirectoryLensField(field, startDir) {
|
|
162
|
+
const found = findDirectoryLens(startDir);
|
|
163
|
+
if (!found)
|
|
164
|
+
return null;
|
|
165
|
+
if (!field) {
|
|
166
|
+
try {
|
|
167
|
+
fs.unlinkSync(found.file);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
return found.file;
|
|
173
|
+
}
|
|
174
|
+
if (!(field in found.lens))
|
|
175
|
+
return null;
|
|
176
|
+
const next = { ...found.lens };
|
|
177
|
+
delete next[field];
|
|
178
|
+
next.updatedAt = Date.now();
|
|
179
|
+
try {
|
|
180
|
+
writeSecretFile(found.file, JSON.stringify(next, null, 2) + "\n", { mode: 0o600 });
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
return found.file;
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=directory-lens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-lens.js","sourceRoot":"","sources":["../../src/lib/directory-lens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAoB,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,kEAAkE;AAClE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,cAAc,GAAG,WAAW,CAAC;AAanC,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AACvD,CAAC;AAED,qFAAqF;AACrF,SAAS,eAAe,CAAC,GAAW;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,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E,CAAC;IAC5B,IAAI,CAAC;QACH,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACrF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `--from-workspace` / `--from-project` do NOT carry out of a live pod.
|
|
3
|
+
* ==========================================================================
|
|
4
|
+
*
|
|
5
|
+
* `synap market publish --from-workspace <id>` serialises a LIVE workspace
|
|
6
|
+
* through the pod's `workspaceToPackageDefinition`
|
|
7
|
+
* (synap-backend/packages/api/src/services/workspace-to-package-definition.ts)
|
|
8
|
+
* and posts the result. `--from-project` walks the same serialiser for every
|
|
9
|
+
* workspace a project `uses`, then composes a suite — so the same drop-list
|
|
10
|
+
* applies to each constituent. That serialiser is a **lossy projection**: it
|
|
11
|
+
* emits 21 of `packageDefinitionSchema`'s keys and has no projection at all
|
|
12
|
+
* for the ones below. A workspace carrying them exports WITHOUT them — no
|
|
13
|
+
* error, no signal.
|
|
14
|
+
*
|
|
15
|
+
* Loops stay here deliberately: there is no durable loop row to reverse-
|
|
16
|
+
* serialise (`createLoopFromDefinition` dissolves into playbooks + triggers).
|
|
17
|
+
*
|
|
18
|
+
* The template guide used to assert, unqualified, that a
|
|
19
|
+
* `PackageDefinition` "round-trips". It does not, in this direction, and the
|
|
20
|
+
* consequence is the shape this repo keeps paying for: an author who built one
|
|
21
|
+
* of the things below publishes their workspace, ships a thinner-than-expected
|
|
22
|
+
* package, and gets a success message. Same class as `status ?? "installed"` —
|
|
23
|
+
* a claim of completeness nobody verified. (Cards authored in Card Studio USED
|
|
24
|
+
* to be one of these — `workspaceToPackageDefinition` now emits them into
|
|
25
|
+
* `cells[]`, so that loss is fixed; the list below is what remains.)
|
|
26
|
+
*
|
|
27
|
+
* ── WHY THIS LIST IS UNCONDITIONAL, NOT DETECTED ────────────────────────────
|
|
28
|
+
* The CLI never sees the workspace, only the projection's OUTPUT. "key absent
|
|
29
|
+
* because the workspace had none" and "key absent because the serialiser cannot
|
|
30
|
+
* emit it" are indistinguishable from here, and reporting a count would be
|
|
31
|
+
* inventing a fact. So this warns about the DOOR ("this door does not carry
|
|
32
|
+
* these"), which is true on every call, rather than about the payload.
|
|
33
|
+
*
|
|
34
|
+
* Keeping it honest across the repo boundary is
|
|
35
|
+
* `test/exporter-coverage-parity.test.ts`, which reads the exporter's own
|
|
36
|
+
* source and fails if a key listed here has gained an assignment (the list is
|
|
37
|
+
* stale and over-warns) or if a key it claims to emit has lost one.
|
|
38
|
+
*/
|
|
39
|
+
/** A `packageDefinitionSchema` key the workspace serialiser cannot emit. */
|
|
40
|
+
export interface UnemittedKey {
|
|
41
|
+
/** The `PackageDefinition` key, verbatim. */
|
|
42
|
+
key: string;
|
|
43
|
+
/** What an author actually loses, in product words (Card, not cell). */
|
|
44
|
+
loses: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Keys with real user-authored content behind them that the serialiser drops.
|
|
48
|
+
*
|
|
49
|
+
* DELIBERATELY EXCLUDED, and why — these are absent from the export too, but
|
|
50
|
+
* warning about them would be noise rather than a loss:
|
|
51
|
+
* • `icon` / `color` / `domain` / `workspaceType` — a live workspace has no
|
|
52
|
+
* field to read them from (the exporter says so at L107-109). Honest
|
|
53
|
+
* under-convergence, not a silent drop.
|
|
54
|
+
* • `suggestedEntities` / `suggestedRelations` / `phases` / `composesFrom` —
|
|
55
|
+
* authoring-time seed hints and composition metadata. A live workspace has
|
|
56
|
+
* real entities, not "suggestions"; there is nothing to derive them from.
|
|
57
|
+
* • `capability` / `sourcePackage` / `contentHash` — a non-workspace package
|
|
58
|
+
* body and publish-time provenance. Not this door's business.
|
|
59
|
+
*/
|
|
60
|
+
export declare const EXPORTER_UNEMITTED_KEYS: readonly UnemittedKey[];
|
|
61
|
+
/**
|
|
62
|
+
* The keys the serialiser DOES emit. Not consumed at runtime — it is the other
|
|
63
|
+
* half of the parity tripwire's assertion, so that "emits" and "does not emit"
|
|
64
|
+
* are pinned by the same read of the same source and cannot disagree.
|
|
65
|
+
*/
|
|
66
|
+
export declare const EXPORTER_EMITTED_KEYS: readonly string[];
|
|
67
|
+
/**
|
|
68
|
+
* One human line per dropped key, for `--json`'s `warnings[]` and for the
|
|
69
|
+
* terminal hint list. Deliberately phrased as a property of the DOOR.
|
|
70
|
+
*/
|
|
71
|
+
export declare function exporterDropWarnings(): string[];
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `--from-workspace` / `--from-project` do NOT carry out of a live pod.
|
|
3
|
+
* ==========================================================================
|
|
4
|
+
*
|
|
5
|
+
* `synap market publish --from-workspace <id>` serialises a LIVE workspace
|
|
6
|
+
* through the pod's `workspaceToPackageDefinition`
|
|
7
|
+
* (synap-backend/packages/api/src/services/workspace-to-package-definition.ts)
|
|
8
|
+
* and posts the result. `--from-project` walks the same serialiser for every
|
|
9
|
+
* workspace a project `uses`, then composes a suite — so the same drop-list
|
|
10
|
+
* applies to each constituent. That serialiser is a **lossy projection**: it
|
|
11
|
+
* emits 21 of `packageDefinitionSchema`'s keys and has no projection at all
|
|
12
|
+
* for the ones below. A workspace carrying them exports WITHOUT them — no
|
|
13
|
+
* error, no signal.
|
|
14
|
+
*
|
|
15
|
+
* Loops stay here deliberately: there is no durable loop row to reverse-
|
|
16
|
+
* serialise (`createLoopFromDefinition` dissolves into playbooks + triggers).
|
|
17
|
+
*
|
|
18
|
+
* The template guide used to assert, unqualified, that a
|
|
19
|
+
* `PackageDefinition` "round-trips". It does not, in this direction, and the
|
|
20
|
+
* consequence is the shape this repo keeps paying for: an author who built one
|
|
21
|
+
* of the things below publishes their workspace, ships a thinner-than-expected
|
|
22
|
+
* package, and gets a success message. Same class as `status ?? "installed"` —
|
|
23
|
+
* a claim of completeness nobody verified. (Cards authored in Card Studio USED
|
|
24
|
+
* to be one of these — `workspaceToPackageDefinition` now emits them into
|
|
25
|
+
* `cells[]`, so that loss is fixed; the list below is what remains.)
|
|
26
|
+
*
|
|
27
|
+
* ── WHY THIS LIST IS UNCONDITIONAL, NOT DETECTED ────────────────────────────
|
|
28
|
+
* The CLI never sees the workspace, only the projection's OUTPUT. "key absent
|
|
29
|
+
* because the workspace had none" and "key absent because the serialiser cannot
|
|
30
|
+
* emit it" are indistinguishable from here, and reporting a count would be
|
|
31
|
+
* inventing a fact. So this warns about the DOOR ("this door does not carry
|
|
32
|
+
* these"), which is true on every call, rather than about the payload.
|
|
33
|
+
*
|
|
34
|
+
* Keeping it honest across the repo boundary is
|
|
35
|
+
* `test/exporter-coverage-parity.test.ts`, which reads the exporter's own
|
|
36
|
+
* source and fails if a key listed here has gained an assignment (the list is
|
|
37
|
+
* stale and over-warns) or if a key it claims to emit has lost one.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Keys with real user-authored content behind them that the serialiser drops.
|
|
41
|
+
*
|
|
42
|
+
* DELIBERATELY EXCLUDED, and why — these are absent from the export too, but
|
|
43
|
+
* warning about them would be noise rather than a loss:
|
|
44
|
+
* • `icon` / `color` / `domain` / `workspaceType` — a live workspace has no
|
|
45
|
+
* field to read them from (the exporter says so at L107-109). Honest
|
|
46
|
+
* under-convergence, not a silent drop.
|
|
47
|
+
* • `suggestedEntities` / `suggestedRelations` / `phases` / `composesFrom` —
|
|
48
|
+
* authoring-time seed hints and composition metadata. A live workspace has
|
|
49
|
+
* real entities, not "suggestions"; there is nothing to derive them from.
|
|
50
|
+
* • `capability` / `sourcePackage` / `contentHash` — a non-workspace package
|
|
51
|
+
* body and publish-time provenance. Not this door's business.
|
|
52
|
+
*/
|
|
53
|
+
export const EXPORTER_UNEMITTED_KEYS = [
|
|
54
|
+
{ key: "commands", loses: "workspace commands" },
|
|
55
|
+
{ key: "relationDefs", loses: "relation definitions" },
|
|
56
|
+
{ key: "loops", loses: "loops" },
|
|
57
|
+
{ key: "widgets", loses: "widget definitions" },
|
|
58
|
+
{ key: "dependencies", loses: "declared package dependencies" },
|
|
59
|
+
{ key: "defaultSources", loses: "declared workspace sources" },
|
|
60
|
+
{ key: "sourceRoles", loses: "source roles" },
|
|
61
|
+
];
|
|
62
|
+
/**
|
|
63
|
+
* The keys the serialiser DOES emit. Not consumed at runtime — it is the other
|
|
64
|
+
* half of the parity tripwire's assertion, so that "emits" and "does not emit"
|
|
65
|
+
* are pinned by the same read of the same source and cannot disagree.
|
|
66
|
+
*/
|
|
67
|
+
export const EXPORTER_EMITTED_KEYS = [
|
|
68
|
+
"_meta",
|
|
69
|
+
"workspaceName",
|
|
70
|
+
"description",
|
|
71
|
+
"workspaceSubtype",
|
|
72
|
+
"workspaceVisibility",
|
|
73
|
+
"workspaceCapabilities",
|
|
74
|
+
"onboarding",
|
|
75
|
+
"profileEntityBentoTemplates",
|
|
76
|
+
"profiles",
|
|
77
|
+
"bentoLayout",
|
|
78
|
+
"bentoViewBlocks",
|
|
79
|
+
"bentoViewName",
|
|
80
|
+
"views",
|
|
81
|
+
"entityLinks",
|
|
82
|
+
"displayTemplates",
|
|
83
|
+
"automations",
|
|
84
|
+
"playbooks",
|
|
85
|
+
"capabilities",
|
|
86
|
+
"layoutConfig",
|
|
87
|
+
"actionPlacements",
|
|
88
|
+
"cells",
|
|
89
|
+
];
|
|
90
|
+
/**
|
|
91
|
+
* One human line per dropped key, for `--json`'s `warnings[]` and for the
|
|
92
|
+
* terminal hint list. Deliberately phrased as a property of the DOOR.
|
|
93
|
+
*/
|
|
94
|
+
export function exporterDropWarnings() {
|
|
95
|
+
return EXPORTER_UNEMITTED_KEYS.map((k) => `${k.key} — ${k.loses} (not exported: no projection)`);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=exporter-coverage.js.map
|
|
@@ -0,0 +1 @@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+
* A GOAL's words as `synap track` prints them — status, verdict, kind of
|
|
3
|
+
* work, uncertainty, criterion marks, what it waits on, who is on it, the
|
|
4
|
+
* end state's label.
|
|
5
|
+
*
|
|
6
|
+
* `@synap-core/types/vocabulary` is the one door for these words, but this
|
|
7
|
+
* package cannot import it (the CLI links only `@synap-core/hub-rest-client`
|
|
8
|
+
* and `@synap-core/workspace-templates`). So each table here is a COPY of the
|
|
9
|
+
* vocabulary's own, held EQUAL — keys and words — by
|
|
10
|
+
* `test/goal-words-parity.test.ts`, which reads the vocabulary's source in
|
|
11
|
+
* the sibling `synap-backend`. Delete this file for a plain import once the
|
|
12
|
+
* CLI depends on a published `@synap-core/types` carrying them.
|
|
13
|
+
*/
|
|
14
|
+
/** `TRACK_STATUS_LABELS` */
|
|
15
|
+
export declare const TRACK_STATUS_LABELS: Readonly<Record<string, string>>;
|
|
16
|
+
/** `TRACK_VERDICT_LABELS` */
|
|
17
|
+
export declare const TRACK_VERDICT_LABELS: Readonly<Record<string, string>>;
|
|
18
|
+
/** `TRACK_WORK_KIND_LABELS` */
|
|
19
|
+
export declare const TRACK_WORK_KIND_LABELS: Readonly<Record<string, string>>;
|
|
20
|
+
/** `TRACK_UNCERTAINTY_LABELS` */
|
|
21
|
+
export declare const TRACK_UNCERTAINTY_LABELS: Readonly<Record<string, string>>;
|
|
22
|
+
/** `GOAL_CRITERION_MARK_LABELS` */
|
|
23
|
+
export declare const GOAL_CRITERION_MARK_LABELS: Readonly<Record<string, string>>;
|
|
24
|
+
/** `WAITING_ON_REASON_LABELS` */
|
|
25
|
+
export declare const WAITING_ON_REASON_LABELS: Readonly<Record<string, string>>;
|
|
26
|
+
/** `TRACK_PARTICIPANT_ROLE_LABELS` (vocabulary/track-participant-words.ts) */
|
|
27
|
+
export declare const TRACK_PARTICIPANT_ROLE_LABELS: Readonly<Record<string, string>>;
|
|
28
|
+
/** `TRACK_COMMITMENT_STATE_LABELS` (vocabulary/track-participant-words.ts) */
|
|
29
|
+
export declare const TRACK_COMMITMENT_STATE_LABELS: Readonly<Record<string, string>>;
|
|
30
|
+
/** `GOAL_FIELD_LABELS` — the goal's stored fields as a person reads them. */
|
|
31
|
+
export declare const GOAL_FIELD_LABELS: Readonly<Record<string, string>>;
|
|
32
|
+
/**
|
|
33
|
+
* The vocabulary's fallback (`humanizeToken`, minus its cased-words list): a
|
|
34
|
+
* value no table names reads as words, never as the raw token.
|
|
35
|
+
*/
|
|
36
|
+
export declare function humanizeToken(token: string): string;
|
|
37
|
+
/** A token through its table, else humanized — `""` for none. */
|
|
38
|
+
export declare function goalWord(table: Readonly<Record<string, string>>, token: string | null | undefined): string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A GOAL's words as `synap track` prints them — status, verdict, kind of
|
|
3
|
+
* work, uncertainty, criterion marks, what it waits on, who is on it, the
|
|
4
|
+
* end state's label.
|
|
5
|
+
*
|
|
6
|
+
* `@synap-core/types/vocabulary` is the one door for these words, but this
|
|
7
|
+
* package cannot import it (the CLI links only `@synap-core/hub-rest-client`
|
|
8
|
+
* and `@synap-core/workspace-templates`). So each table here is a COPY of the
|
|
9
|
+
* vocabulary's own, held EQUAL — keys and words — by
|
|
10
|
+
* `test/goal-words-parity.test.ts`, which reads the vocabulary's source in
|
|
11
|
+
* the sibling `synap-backend`. Delete this file for a plain import once the
|
|
12
|
+
* CLI depends on a published `@synap-core/types` carrying them.
|
|
13
|
+
*/
|
|
14
|
+
/** `TRACK_STATUS_LABELS` */
|
|
15
|
+
export const TRACK_STATUS_LABELS = {
|
|
16
|
+
proposed: "Proposed",
|
|
17
|
+
agreed: "Agreed",
|
|
18
|
+
ready: "Ready",
|
|
19
|
+
active: "Active",
|
|
20
|
+
paused: "Paused",
|
|
21
|
+
completed: "Closed",
|
|
22
|
+
archived: "Dropped",
|
|
23
|
+
};
|
|
24
|
+
/** `TRACK_VERDICT_LABELS` */
|
|
25
|
+
export const TRACK_VERDICT_LABELS = {
|
|
26
|
+
met: "Met",
|
|
27
|
+
partly_met: "Partly met",
|
|
28
|
+
not_met: "Not met",
|
|
29
|
+
retired: "Retired",
|
|
30
|
+
no_longer_needed: "No longer needed",
|
|
31
|
+
impossible: "Impossible",
|
|
32
|
+
replaced: "Replaced",
|
|
33
|
+
mistake: "Created by mistake",
|
|
34
|
+
};
|
|
35
|
+
/** `TRACK_WORK_KIND_LABELS` */
|
|
36
|
+
export const TRACK_WORK_KIND_LABELS = {
|
|
37
|
+
project: "Project",
|
|
38
|
+
flow: "Flow",
|
|
39
|
+
operation: "Operation",
|
|
40
|
+
investigation: "Investigation",
|
|
41
|
+
incident: "Incident",
|
|
42
|
+
commission: "Commission",
|
|
43
|
+
pathway: "Pathway",
|
|
44
|
+
};
|
|
45
|
+
/** `TRACK_UNCERTAINTY_LABELS` */
|
|
46
|
+
export const TRACK_UNCERTAINTY_LABELS = {
|
|
47
|
+
clear: "Clear",
|
|
48
|
+
complicated: "Complicated",
|
|
49
|
+
complex: "Complex",
|
|
50
|
+
chaotic: "Chaotic",
|
|
51
|
+
unknown: "Unknown",
|
|
52
|
+
};
|
|
53
|
+
/** `GOAL_CRITERION_MARK_LABELS` */
|
|
54
|
+
export const GOAL_CRITERION_MARK_LABELS = {
|
|
55
|
+
met: "Met",
|
|
56
|
+
claimed: "Claimed",
|
|
57
|
+
under_way: "Under way",
|
|
58
|
+
not_met: "Not met",
|
|
59
|
+
not_started: "Not started",
|
|
60
|
+
};
|
|
61
|
+
/** `WAITING_ON_REASON_LABELS` */
|
|
62
|
+
export const WAITING_ON_REASON_LABELS = {
|
|
63
|
+
input: "Input",
|
|
64
|
+
approval: "Approval",
|
|
65
|
+
access: "Access",
|
|
66
|
+
another_work: "Other work",
|
|
67
|
+
outside_world: "Outside world",
|
|
68
|
+
};
|
|
69
|
+
/** `TRACK_PARTICIPANT_ROLE_LABELS` (vocabulary/track-participant-words.ts) */
|
|
70
|
+
export const TRACK_PARTICIPANT_ROLE_LABELS = {
|
|
71
|
+
owner: "Owner",
|
|
72
|
+
judge: "Judge",
|
|
73
|
+
delegate: "Delegate",
|
|
74
|
+
integrator: "Integrator",
|
|
75
|
+
};
|
|
76
|
+
/** `TRACK_COMMITMENT_STATE_LABELS` (vocabulary/track-participant-words.ts) */
|
|
77
|
+
export const TRACK_COMMITMENT_STATE_LABELS = {
|
|
78
|
+
proposed: "Asked",
|
|
79
|
+
accepted: "Accepted",
|
|
80
|
+
countered: "Countered",
|
|
81
|
+
declined: "Declined",
|
|
82
|
+
reported_impossible: "Reported impossible",
|
|
83
|
+
done: "Done",
|
|
84
|
+
};
|
|
85
|
+
/** `GOAL_FIELD_LABELS` — the goal's stored fields as a person reads them. */
|
|
86
|
+
export const GOAL_FIELD_LABELS = {
|
|
87
|
+
endState: "What done looks like",
|
|
88
|
+
criteria: "Done when",
|
|
89
|
+
workKind: "Kind of work",
|
|
90
|
+
uncertainty: "How well the way is known",
|
|
91
|
+
dropConditions: "Drop it if",
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* The vocabulary's fallback (`humanizeToken`, minus its cased-words list): a
|
|
95
|
+
* value no table names reads as words, never as the raw token.
|
|
96
|
+
*/
|
|
97
|
+
export function humanizeToken(token) {
|
|
98
|
+
const tail = token.includes(".") ? token.slice(token.lastIndexOf(".") + 1) : token;
|
|
99
|
+
const words = tail
|
|
100
|
+
.replace(/[_-]+/g, " ")
|
|
101
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
102
|
+
.trim()
|
|
103
|
+
.toLowerCase();
|
|
104
|
+
return words ? words.charAt(0).toUpperCase() + words.slice(1) : "";
|
|
105
|
+
}
|
|
106
|
+
/** A token through its table, else humanized — `""` for none. */
|
|
107
|
+
export function goalWord(table, token) {
|
|
108
|
+
if (!token)
|
|
109
|
+
return "";
|
|
110
|
+
return Object.hasOwn(table, token) ? table[token] : humanizeToken(token);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=goal-words.js.map
|
|
@@ -0,0 +1 @@
|
|
|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