@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
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* synap import — "capture, but for files and URLs".
|
|
2
|
+
* synap import — "capture, but for files and URLs" (personal OS intake).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* POST /capture/structure
|
|
7
|
-
*
|
|
4
|
+
* Routing (INTAKE-CONSOLIDATION-PLAN Wave 1):
|
|
5
|
+
* - Superwhisper store-first → lib/superwhisper-import (unchanged)
|
|
6
|
+
* - Single file OR single URL → POST /capture/structure + /capture/execute
|
|
7
|
+
* - Any .csv (even ONE) → its own `source: csv` batch on the table
|
|
8
|
+
* door below (a CSV is a table, never prose)
|
|
9
|
+
* - 2 text-like files
|
|
10
|
+
* (md / markdown / txt / csv) → ONE batch via SYNCHRONOUS REST import:
|
|
11
|
+
* POST /import/analyze → human review (or --yes / --dry-run)
|
|
12
|
+
* POST /import/apply → materialize the EXACT previewed ops
|
|
13
|
+
* - ≥CORPUS_THRESHOLD (3) such
|
|
14
|
+
* files → ONE BACKGROUND job (the sync door times out):
|
|
15
|
+
* POST /import/enqueue-corpus → { jobId }, returns immediately
|
|
16
|
+
* GET /import/corpus-job/{id} → poll to "completed"
|
|
17
|
+
* On completion the result is ONE pending governed `import.graph`
|
|
18
|
+
* proposal — NOT stored entities. `--dry-run` never takes this door
|
|
19
|
+
* (enqueueing is itself a write).
|
|
20
|
+
* - Mixed binary/URL + text → capture path for URLs/binaries;
|
|
21
|
+
* batch text via /import/* when N≥2
|
|
8
22
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
23
|
+
* Directory walks cap at DIR_FILE_CAP (sync analyze max); truncate is warned,
|
|
24
|
+
* never silent. After expansion, batch-eligible text is also capped at
|
|
25
|
+
* GLOBAL_BATCH_CAP (same ceiling) across all inputs — not only per-directory.
|
|
26
|
+
* Workspace/project from --workspace / --project (or cfg);
|
|
27
|
+
* session from --session (active session id).
|
|
11
28
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* -
|
|
15
|
-
*
|
|
29
|
+
* Optional --home-map rewrites batch item paths so the backend path heuristic
|
|
30
|
+
* (workspace **name** as a path segment) pins multi-home destinations. Example:
|
|
31
|
+
* --home-map "Projects=Builder,Posts=Content OS"
|
|
32
|
+
* rewrites `5. Projects/foo.md` → `Builder/5. Projects/foo.md`. No product
|
|
33
|
+
* defaults — user-supplied pairs only. It applies to the corpus door too: the
|
|
34
|
+
* background job forwards `items` verbatim into the SAME
|
|
35
|
+
* `ImportOrchestrator.analyzeLarge` the sync door reaches, so the path
|
|
36
|
+
* heuristic is identical on both.
|
|
16
37
|
*
|
|
17
|
-
*
|
|
18
|
-
* AI-proposed targetWorkspaceId / targetProjectId from /capture/structure win.
|
|
38
|
+
* No Company OS coupling — pure personal intake doors.
|
|
19
39
|
*/
|
|
40
|
+
import { type StructureResult, type ExecuteResult } from "../lib/capture-structure.js";
|
|
20
41
|
export interface ImportOpts {
|
|
21
42
|
workspace?: string;
|
|
22
43
|
project?: string;
|
|
@@ -26,13 +47,372 @@ export interface ImportOpts {
|
|
|
26
47
|
json?: boolean;
|
|
27
48
|
podUrl?: string;
|
|
28
49
|
apiKey?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Preferred-home map: comma-separated `pathSubstring=workspaceNameOrId`.
|
|
52
|
+
* Matched paths (case-insensitive substring) are rewritten so the first
|
|
53
|
+
* path segment is the resolved workspace **name** — backend deep structure
|
|
54
|
+
* matches workspace names in path segments.
|
|
55
|
+
*/
|
|
56
|
+
homeMap?: string;
|
|
29
57
|
/** Adapter name: "superwhisper" enables paired store-first path. */
|
|
30
58
|
source?: string;
|
|
31
59
|
/** Skip AI structure; store corpus units (Superwhisper). */
|
|
32
60
|
storeFirst?: boolean;
|
|
33
61
|
withAudio?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Preserve the ORIGINAL file alongside the entities the AI derived from it.
|
|
64
|
+
*
|
|
65
|
+
* Default (absent) is extract-and-discard: the bytes are read for structuring
|
|
66
|
+
* and then dropped, so an imported PDF produced entities with no `documentId`
|
|
67
|
+
* and no source document — dogfooding an import of a real PDF found exactly
|
|
68
|
+
* that. `--with-audio` is NOT this: it is Superwhisper-adapter-specific and
|
|
69
|
+
* only rides the store-first path. This flag threads `keepRaw` + the bytes
|
|
70
|
+
* through the SAME `capture.execute` disposition the browser uses.
|
|
71
|
+
*/
|
|
72
|
+
keepRaw?: boolean;
|
|
34
73
|
limit?: number;
|
|
35
74
|
concurrency?: number;
|
|
36
75
|
resume?: boolean;
|
|
76
|
+
/** `--job-status <uuid>`: re-poll a background corpus job instead of importing. */
|
|
77
|
+
jobStatus?: string;
|
|
37
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* At or above this many batch-eligible text files, route to the BACKGROUND
|
|
81
|
+
* corpus door (`POST /import/enqueue-corpus`) instead of the synchronous
|
|
82
|
+
* `/import/analyze`.
|
|
83
|
+
*
|
|
84
|
+
* Why 3, measured rather than guessed: 3 markdown files complete in ~2m01s on
|
|
85
|
+
* the background worker, and the SAME 3 files fail 0/5 through /import/analyze,
|
|
86
|
+
* each dying at 45–48s against the pod's 45s request timeout. So 3 is the
|
|
87
|
+
* smallest N at which the synchronous door is observed to be unusable.
|
|
88
|
+
*
|
|
89
|
+
* Below it (1–2 files) the synchronous path stays: it is proven to work at that
|
|
90
|
+
* size and it is strictly more interactive — it renders the operation list, the
|
|
91
|
+
* multi-home placement and the quality report, then applies on a y/N confirm.
|
|
92
|
+
* The corpus door can offer none of that; it returns a job handle and files ONE
|
|
93
|
+
* governed proposal for later review. Routing everything through it would trade
|
|
94
|
+
* a working interactive preview for a background job on inputs that never
|
|
95
|
+
* needed one.
|
|
96
|
+
*/
|
|
97
|
+
export declare const CORPUS_THRESHOLD = 3;
|
|
98
|
+
type ImportSource = "obsidian" | "markdown" | "csv";
|
|
99
|
+
type ImportItem = {
|
|
100
|
+
kind: "url";
|
|
101
|
+
label: string;
|
|
102
|
+
url: string;
|
|
103
|
+
} | {
|
|
104
|
+
kind: "file";
|
|
105
|
+
label: string;
|
|
106
|
+
/** Source-relative path for /import/analyze (vault structure). */
|
|
107
|
+
path: string;
|
|
108
|
+
file: {
|
|
109
|
+
content: string;
|
|
110
|
+
mimeType: string;
|
|
111
|
+
filename: string;
|
|
112
|
+
encoding: "base64" | "utf8";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/** Wire shape from POST /import/analyze (Wave 1 REST → ImportOrchestrator). */
|
|
116
|
+
interface ImportAnalyzeResult {
|
|
117
|
+
workspaceId?: string | null;
|
|
118
|
+
source?: string;
|
|
119
|
+
mode?: string;
|
|
120
|
+
proposalId?: string | null;
|
|
121
|
+
sessionId?: string | null;
|
|
122
|
+
operations?: unknown[];
|
|
123
|
+
summary?: string;
|
|
124
|
+
stats?: Record<string, unknown>;
|
|
125
|
+
droppedReferences?: number;
|
|
126
|
+
aiTyped?: number;
|
|
127
|
+
tablePlan?: unknown;
|
|
128
|
+
/** Multi-home placement summary (create_entity destinations). */
|
|
129
|
+
homes?: {
|
|
130
|
+
byWorkspace?: Record<string, number>;
|
|
131
|
+
podWide?: number;
|
|
132
|
+
byProject?: Record<string, number>;
|
|
133
|
+
multiHome?: boolean;
|
|
134
|
+
};
|
|
135
|
+
/** Continuous-improvement quality report (stored on proposal too). */
|
|
136
|
+
quality?: {
|
|
137
|
+
score?: number;
|
|
138
|
+
summary?: string;
|
|
139
|
+
counts?: Record<string, unknown>;
|
|
140
|
+
hierarchy?: Record<string, unknown>;
|
|
141
|
+
findings?: Array<{
|
|
142
|
+
id?: string;
|
|
143
|
+
severity?: string;
|
|
144
|
+
message?: string;
|
|
145
|
+
}>;
|
|
146
|
+
nextUpgrades?: string[];
|
|
147
|
+
};
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
/** Wire shape from POST /import/apply. */
|
|
151
|
+
interface ImportApplyResult {
|
|
152
|
+
workspaceId?: string | null;
|
|
153
|
+
source?: string;
|
|
154
|
+
created?: number;
|
|
155
|
+
linked?: number;
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Which batch-eligible files go through the table/batch door, and in which
|
|
160
|
+
* batches:
|
|
161
|
+
* - every CSV, even a lone one, in ONE `source: csv` batch. A CSV is a TABLE:
|
|
162
|
+
* the batch door builds a column→kind plan for it, while the single-file
|
|
163
|
+
* capture door reads it as free text (a 1,500-row contacts export came back
|
|
164
|
+
* as one degraded note filed in the wrong space). Keeping CSVs apart also
|
|
165
|
+
* stops a mixed md + csv batch from parsing the markdown as CSV.
|
|
166
|
+
* - the other text files in ONE batch when there are ≥2; a lone one stays on
|
|
167
|
+
* the capture door (unchanged).
|
|
168
|
+
*/
|
|
169
|
+
export declare function groupBatchFiles<T extends {
|
|
170
|
+
path: string;
|
|
171
|
+
}>(files: T[]): {
|
|
172
|
+
batches: T[][];
|
|
173
|
+
single: T[];
|
|
174
|
+
};
|
|
175
|
+
type HomeMapPair = {
|
|
176
|
+
pathSubstring: string;
|
|
177
|
+
workspace: string;
|
|
178
|
+
};
|
|
179
|
+
/** Resolved map: path substring → workspace **name** (for path prefix rewrite). */
|
|
180
|
+
type ResolvedHomeMapEntry = {
|
|
181
|
+
pathSubstring: string;
|
|
182
|
+
workspaceName: string;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Parse `--home-map "Projects=Builder,Posts=Content OS"` into pairs.
|
|
186
|
+
* Values may be workspace names or UUIDs (resolved later).
|
|
187
|
+
*/
|
|
188
|
+
export declare function parseHomeMap(raw: string): HomeMapPair[];
|
|
189
|
+
/**
|
|
190
|
+
* If `path` contains any map pathSubstring (case-insensitive), prefix with the
|
|
191
|
+
* resolved workspace name so deep-structure segment match pins that home.
|
|
192
|
+
* First matching pair wins. Skips rewrite when the path already starts with the
|
|
193
|
+
* workspace name segment.
|
|
194
|
+
*/
|
|
195
|
+
export declare function applyHomeMapToPath(path: string, map: ResolvedHomeMapEntry[]): string;
|
|
196
|
+
export interface ItemOutcome {
|
|
197
|
+
label: string;
|
|
198
|
+
status: "stored" | "proposed" | "degraded" | "dry-run" | "skipped" | "empty" | "failed"
|
|
199
|
+
/**
|
|
200
|
+
* Background corpus job accepted, but not observed to finish inside this
|
|
201
|
+
* invocation's wait window. Nothing was lost — the job keeps running on the
|
|
202
|
+
* pod. Exit code stays 0 (see importExitCode): a still-running job is not a
|
|
203
|
+
* degraded one.
|
|
204
|
+
*/
|
|
205
|
+
| "queued";
|
|
206
|
+
entities?: number;
|
|
207
|
+
relations?: number;
|
|
208
|
+
workspaceId?: string | null;
|
|
209
|
+
projectId?: string | null;
|
|
210
|
+
error?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Why the item degraded. Either a pod plumbing reason (`is_auth_error` |
|
|
213
|
+
* `is_invalid_response` | `is_empty_result`) or an Intelligence Service
|
|
214
|
+
* extraction reason (`vision_provider_not_configured`,
|
|
215
|
+
* `pdf_scanned_needs_ocr`, `unsupported_type`, …) — the pod no longer
|
|
216
|
+
* relabels the latter as the former. The human path prints this through
|
|
217
|
+
* `degradedMessage()`; carrying the raw token here keeps `--json` machine
|
|
218
|
+
* readable while the human line stays token-free.
|
|
219
|
+
*/
|
|
220
|
+
degradedReason?: string;
|
|
221
|
+
/**
|
|
222
|
+
* What happened to the ORIGINAL file under `--keep-raw`. Absent when nothing
|
|
223
|
+
* was kept. Never collapsed to a boolean: `denied` (policy said no) and
|
|
224
|
+
* `failed` (storage broke) are different problems, and `proposed` means the
|
|
225
|
+
* blob is still only a pending review.
|
|
226
|
+
*/
|
|
227
|
+
sourceFile?: "stored" | "proposed" | "denied" | "failed";
|
|
228
|
+
/**
|
|
229
|
+
* Where a person reviews a `proposed` import (the pod's /open/<id> page).
|
|
230
|
+
* Present when the import was filed and NOT applied — an agent credential
|
|
231
|
+
* cannot approve, so its import stops at the proposal.
|
|
232
|
+
*/
|
|
233
|
+
reviewUrl?: string;
|
|
234
|
+
/** Present for the multi-file /import/* batch path. */
|
|
235
|
+
batch?: {
|
|
236
|
+
source: ImportSource;
|
|
237
|
+
fileCount: number;
|
|
238
|
+
proposalId?: string | null;
|
|
239
|
+
sessionId?: string | null;
|
|
240
|
+
analyze?: ImportAnalyzeResult;
|
|
241
|
+
apply?: ImportApplyResult;
|
|
242
|
+
/** Present for the background /import/enqueue-corpus path. */
|
|
243
|
+
corpus?: {
|
|
244
|
+
jobId: string | null;
|
|
245
|
+
/** Last pg-boss state we observed, or "unknown" if we never got one. */
|
|
246
|
+
state: string;
|
|
247
|
+
/** True when the wait window elapsed with the job still running. */
|
|
248
|
+
timedOut: boolean;
|
|
249
|
+
waitedMs: number;
|
|
250
|
+
itemCount: number;
|
|
251
|
+
/**
|
|
252
|
+
* File-level truth from the job's own output. `outcomeKnown: false` means
|
|
253
|
+
* the pod did not report it (older pod, or job unfinished) — a script must
|
|
254
|
+
* treat that as UNKNOWN, not as "0 failed".
|
|
255
|
+
*/
|
|
256
|
+
outcomeKnown?: boolean;
|
|
257
|
+
filesProcessed?: number | null;
|
|
258
|
+
filesFailed?: number | null;
|
|
259
|
+
findings?: Array<{
|
|
260
|
+
id?: string;
|
|
261
|
+
severity?: string;
|
|
262
|
+
message?: string;
|
|
263
|
+
}>;
|
|
264
|
+
proposalId?: string | null;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Build the outcome for an item the IS structurer could not structure.
|
|
270
|
+
*
|
|
271
|
+
* Carries `degradedReason` so `--json` reports the same cause the human path
|
|
272
|
+
* already prints via `degradedMessage()`. Without it a scripted import saw
|
|
273
|
+
* `{"status":"degraded"}` with no way to tell an auth error from an empty
|
|
274
|
+
* result — the reason existed on the wire and was dropped at this one seam.
|
|
275
|
+
*/
|
|
276
|
+
export declare function degradedOutcome(label: string, res: StructureResult, workspaceId: string | null, projectId: string | null): ItemOutcome;
|
|
277
|
+
/**
|
|
278
|
+
* The exit code for a finished import run.
|
|
279
|
+
*
|
|
280
|
+
* A degraded item produced ZERO entities — the IS structurer was down and the
|
|
281
|
+
* CLI deliberately created nothing. Exiting 0 on that told a scripted backfill
|
|
282
|
+
* "success" while most of its input was silently lost, so `degraded` is a
|
|
283
|
+
* non-zero outcome exactly like `failed`.
|
|
284
|
+
*
|
|
285
|
+
* Everything else stays 0, including a clean `--dry-run` (nothing was meant to
|
|
286
|
+
* be written), a `skipped` item (the user declined) and an `empty` one (the
|
|
287
|
+
* structurer ran fine and honestly found nothing to create).
|
|
288
|
+
*
|
|
289
|
+
* Scoped to `import` on purpose: this is `import`'s own final line, not a
|
|
290
|
+
* shared helper, so no other command's exit semantics change.
|
|
291
|
+
*/
|
|
292
|
+
export declare function importExitCode(outcomes: Array<{
|
|
293
|
+
status: ItemOutcome["status"];
|
|
294
|
+
}>): number;
|
|
295
|
+
/**
|
|
296
|
+
* The `keepRaw` half of a `/capture/execute` body — `{}` unless `--keep-raw`
|
|
297
|
+
* was passed for a FILE item.
|
|
298
|
+
*
|
|
299
|
+
* Three things it must get right, all of which the pod silently tolerates:
|
|
300
|
+
* • `content` MUST be base64. `fileToItem` reads text-like files as utf8, and
|
|
301
|
+
* the pod does `Buffer.from(content, "base64")` unconditionally — sending
|
|
302
|
+
* utf8 there stores a mangled blob with no error.
|
|
303
|
+
* • `extractedText` is echoed from the structure response so the stored
|
|
304
|
+
* document lands with a real v1 body. Skipping it leaves
|
|
305
|
+
* `document_versions.content` empty, which blinds the embedding worker, the
|
|
306
|
+
* retrieval body join and Typesense enrichment.
|
|
307
|
+
* • A URL item has no bytes to keep, so `keepRaw` is simply not sent — the pod
|
|
308
|
+
* would accept `keepRaw: true` with no file and do nothing.
|
|
309
|
+
*/
|
|
310
|
+
export declare function buildKeepRawPayload(opts: Pick<ImportOpts, "keepRaw">, item: ImportItem, structureRes: Pick<StructureResult, "extraction">): Record<string, unknown>;
|
|
311
|
+
/**
|
|
312
|
+
* One line describing what ACTUALLY happened to a kept original. The pod
|
|
313
|
+
* reports four dispositions and they are not interchangeable: a
|
|
314
|
+
* governance-parked attach is not a save, and a policy denial is not a storage
|
|
315
|
+
* failure. Returns null when nothing was kept (so nothing is claimed).
|
|
316
|
+
*/
|
|
317
|
+
export declare function keepRawLine(res: ExecuteResult): string | null;
|
|
318
|
+
/**
|
|
319
|
+
* The finished run's FILE-LEVEL outcome, as the pod stores it on the pg-boss job
|
|
320
|
+
* (`output`) and returns it from GET /import/corpus-job/{jobId}.
|
|
321
|
+
*
|
|
322
|
+
* This is the only place a partially failed corpus import is visible. The pod
|
|
323
|
+
* records `filesFailed` on the resulting import.graph proposal; before the pod
|
|
324
|
+
* returned this object the CLI could not see it and printed `0 failed` for a run
|
|
325
|
+
* that had dropped 2 of 3 files.
|
|
326
|
+
*/
|
|
327
|
+
export interface CorpusJobOutput {
|
|
328
|
+
proposalId?: string | null;
|
|
329
|
+
workspaceId?: string | null;
|
|
330
|
+
filesProcessed?: number;
|
|
331
|
+
filesFailed?: number;
|
|
332
|
+
qualityScore?: number;
|
|
333
|
+
findings?: Array<{
|
|
334
|
+
id?: string;
|
|
335
|
+
severity?: string;
|
|
336
|
+
message?: string;
|
|
337
|
+
}>;
|
|
338
|
+
}
|
|
339
|
+
/** What a completed corpus job actually did, once the wire value is judged. */
|
|
340
|
+
export type CorpusFileOutcome = {
|
|
341
|
+
known: false;
|
|
342
|
+
} | {
|
|
343
|
+
known: true;
|
|
344
|
+
filesProcessed: number | null;
|
|
345
|
+
filesFailed: number;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Judge a completed job's `output`.
|
|
349
|
+
*
|
|
350
|
+
* The ONE place absence is turned into `known: false`. A pod that predates the
|
|
351
|
+
* result-carrying worker returns no output; so does a job whose handler reported
|
|
352
|
+
* nothing. Neither is evidence that every file landed, so neither may collapse
|
|
353
|
+
* into `filesFailed: 0`.
|
|
354
|
+
*/
|
|
355
|
+
export declare function readCorpusFileOutcome(output: CorpusJobOutput | null | undefined): CorpusFileOutcome;
|
|
356
|
+
/**
|
|
357
|
+
* The outcome status a COMPLETED corpus job earns.
|
|
358
|
+
*
|
|
359
|
+
* The ONE decision point: files were dropped → `degraded`, which `importExitCode`
|
|
360
|
+
* already treats as non-zero (no second exit-code path). An unknown outcome stays
|
|
361
|
+
* `proposed` — the proposal genuinely exists — but the caller must print
|
|
362
|
+
* CORPUS_OUTCOME_UNAVAILABLE so the unknown is never read as "0 failed".
|
|
363
|
+
*/
|
|
364
|
+
export declare function corpusCompletionOutcome(output: CorpusJobOutput | null | undefined): {
|
|
365
|
+
status: "proposed" | "degraded";
|
|
366
|
+
degradedReason?: string;
|
|
367
|
+
};
|
|
368
|
+
/** The message shown when the pod cannot tell us what happened per file. */
|
|
369
|
+
export declare const CORPUS_OUTCOME_UNAVAILABLE: string;
|
|
370
|
+
/**
|
|
371
|
+
* Human lines for a completed corpus run's file-level outcome.
|
|
372
|
+
*
|
|
373
|
+
* Exported so the run summary, the `--job-status` re-poll and the tests all read
|
|
374
|
+
* the SAME judgement — a second copy is how "0 failed" survived on one path.
|
|
375
|
+
*/
|
|
376
|
+
export declare function corpusOutcomeLines(output: CorpusJobOutput | null | undefined, itemCount?: number): string[];
|
|
377
|
+
/**
|
|
378
|
+
* Which batch door to use. The ONE place the threshold is applied — the human
|
|
379
|
+
* message, the --json payload and the actual POST all read this.
|
|
380
|
+
*
|
|
381
|
+
* `--dry-run` always stays on `/import/analyze`: the corpus door has no preview
|
|
382
|
+
* mode (`previewOnly` is an /import/analyze field), and enqueueing is itself a
|
|
383
|
+
* durable write. A dry run that queued a background job would be a dry run that
|
|
384
|
+
* writes — the exact thing the flag promises not to do.
|
|
385
|
+
*/
|
|
386
|
+
export declare function chooseBatchDoor(args: {
|
|
387
|
+
fileCount: number;
|
|
388
|
+
dryRun?: boolean;
|
|
389
|
+
}): "analyze" | "enqueue-corpus";
|
|
390
|
+
/**
|
|
391
|
+
* How long to wait for a corpus job before handing the terminal back.
|
|
392
|
+
*
|
|
393
|
+
* Scaled from measured throughput (~45s/file) so a small corpus is not waited on
|
|
394
|
+
* for an hour and a 257-file backfill is not abandoned after five minutes, then
|
|
395
|
+
* clamped: never under 10 minutes, never over 2 hours. The ceiling is safe
|
|
396
|
+
* precisely because expiry is not failure — see corpusTimeoutLines().
|
|
397
|
+
*/
|
|
398
|
+
export declare function corpusPollTimeoutMs(itemCount: number): number;
|
|
399
|
+
/**
|
|
400
|
+
* What we print when the wait window elapses.
|
|
401
|
+
*
|
|
402
|
+
* The job is STILL RUNNING — pg-boss holds it, the worker keeps chunking, and
|
|
403
|
+
* the governed `import.graph` proposal will still be written. Saying "failed"
|
|
404
|
+
* (or exiting non-zero) here would send a user to re-run a 257-file import that
|
|
405
|
+
* is already half-done. So: state plainly that nothing was lost, and give the
|
|
406
|
+
* exact command to re-poll.
|
|
407
|
+
*/
|
|
408
|
+
export declare function corpusTimeoutLines(jobId: string, waitedMs: number): string[];
|
|
409
|
+
/**
|
|
410
|
+
* Re-poll a corpus job started by an earlier `synap import`.
|
|
411
|
+
*
|
|
412
|
+
* This is the command `corpusTimeoutLines()` tells the user to run, so it has to
|
|
413
|
+
* exist: a timeout message naming a command that does not resolve is worse than
|
|
414
|
+
* no message. One GET, no waiting — it reports the current state and exits.
|
|
415
|
+
*/
|
|
416
|
+
export declare function importJobStatus(jobId: string, opts: ImportOpts): Promise<void>;
|
|
38
417
|
export declare function importData(inputs: string[], opts: ImportOpts): Promise<void>;
|
|
418
|
+
export {};
|