onadit 0.0.1 → 1.0.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/README.dev.md +124 -0
- package/README.md +194 -2
- package/dist/src/auth/keychain.d.ts +42 -0
- package/dist/src/auth/keychain.d.ts.map +1 -0
- package/dist/src/auth/keychain.js +177 -0
- package/dist/src/auth/keychain.js.map +1 -0
- package/dist/src/auth/middleware.d.ts +21 -0
- package/dist/src/auth/middleware.d.ts.map +1 -0
- package/dist/src/auth/middleware.js +93 -0
- package/dist/src/auth/middleware.js.map +1 -0
- package/dist/src/auth/rate-limit.d.ts +16 -0
- package/dist/src/auth/rate-limit.d.ts.map +1 -0
- package/dist/src/auth/rate-limit.js +38 -0
- package/dist/src/auth/rate-limit.js.map +1 -0
- package/dist/src/auth/rotation.d.ts +67 -0
- package/dist/src/auth/rotation.d.ts.map +1 -0
- package/dist/src/auth/rotation.js +190 -0
- package/dist/src/auth/rotation.js.map +1 -0
- package/dist/src/backfill/project-context-batch-constructor.d.ts +127 -0
- package/dist/src/backfill/project-context-batch-constructor.d.ts.map +1 -0
- package/dist/src/backfill/project-context-batch-constructor.js +210 -0
- package/dist/src/backfill/project-context-batch-constructor.js.map +1 -0
- package/dist/src/capture/assistant-text-lookup.d.ts +31 -0
- package/dist/src/capture/assistant-text-lookup.d.ts.map +1 -0
- package/dist/src/capture/assistant-text-lookup.js +222 -0
- package/dist/src/capture/assistant-text-lookup.js.map +1 -0
- package/dist/src/capture/auto-capture.d.ts +322 -0
- package/dist/src/capture/auto-capture.d.ts.map +1 -0
- package/dist/src/capture/auto-capture.js +1167 -0
- package/dist/src/capture/auto-capture.js.map +1 -0
- package/dist/src/capture/auto-repair.d.ts +125 -0
- package/dist/src/capture/auto-repair.d.ts.map +1 -0
- package/dist/src/capture/auto-repair.js +280 -0
- package/dist/src/capture/auto-repair.js.map +1 -0
- package/dist/src/capture/batch-budget.d.ts +90 -0
- package/dist/src/capture/batch-budget.d.ts.map +1 -0
- package/dist/src/capture/batch-budget.js +148 -0
- package/dist/src/capture/batch-budget.js.map +1 -0
- package/dist/src/capture/claude-cli-triage-provider.d.ts +28 -0
- package/dist/src/capture/claude-cli-triage-provider.d.ts.map +1 -0
- package/dist/src/capture/claude-cli-triage-provider.js +101 -0
- package/dist/src/capture/claude-cli-triage-provider.js.map +1 -0
- package/dist/src/capture/codex-cli-triage-provider.d.ts +17 -0
- package/dist/src/capture/codex-cli-triage-provider.d.ts.map +1 -0
- package/dist/src/capture/codex-cli-triage-provider.js +91 -0
- package/dist/src/capture/codex-cli-triage-provider.js.map +1 -0
- package/dist/src/capture/cursor-capture.d.ts +89 -0
- package/dist/src/capture/cursor-capture.d.ts.map +1 -0
- package/dist/src/capture/cursor-capture.js +121 -0
- package/dist/src/capture/cursor-capture.js.map +1 -0
- package/dist/src/capture/observability.d.ts +131 -0
- package/dist/src/capture/observability.d.ts.map +1 -0
- package/dist/src/capture/observability.js +181 -0
- package/dist/src/capture/observability.js.map +1 -0
- package/dist/src/capture/openai-triage-provider.d.ts +92 -0
- package/dist/src/capture/openai-triage-provider.d.ts.map +1 -0
- package/dist/src/capture/openai-triage-provider.js +267 -0
- package/dist/src/capture/openai-triage-provider.js.map +1 -0
- package/dist/src/capture/recover-quarantine.d.ts +273 -0
- package/dist/src/capture/recover-quarantine.d.ts.map +1 -0
- package/dist/src/capture/recover-quarantine.js +581 -0
- package/dist/src/capture/recover-quarantine.js.map +1 -0
- package/dist/src/capture/review-queue-index.d.ts +51 -0
- package/dist/src/capture/review-queue-index.d.ts.map +1 -0
- package/dist/src/capture/review-queue-index.js +204 -0
- package/dist/src/capture/review-queue-index.js.map +1 -0
- package/dist/src/capture/review-queue.d.ts +47 -0
- package/dist/src/capture/review-queue.d.ts.map +1 -0
- package/dist/src/capture/review-queue.js +116 -0
- package/dist/src/capture/review-queue.js.map +1 -0
- package/dist/src/capture/sources.d.ts +53 -0
- package/dist/src/capture/sources.d.ts.map +1 -0
- package/dist/src/capture/sources.js +55 -0
- package/dist/src/capture/sources.js.map +1 -0
- package/dist/src/capture/stored-statements.d.ts +9 -0
- package/dist/src/capture/stored-statements.d.ts.map +1 -0
- package/dist/src/capture/stored-statements.js +63 -0
- package/dist/src/capture/stored-statements.js.map +1 -0
- package/dist/src/capture/triage-classification.d.ts +92 -0
- package/dist/src/capture/triage-classification.d.ts.map +1 -0
- package/dist/src/capture/triage-classification.js +94 -0
- package/dist/src/capture/triage-classification.js.map +1 -0
- package/dist/src/capture/triage-lane.d.ts +39 -0
- package/dist/src/capture/triage-lane.d.ts.map +1 -0
- package/dist/src/capture/triage-lane.js +217 -0
- package/dist/src/capture/triage-lane.js.map +1 -0
- package/dist/src/capture/triage-provider-factory.d.ts +36 -0
- package/dist/src/capture/triage-provider-factory.d.ts.map +1 -0
- package/dist/src/capture/triage-provider-factory.js +55 -0
- package/dist/src/capture/triage-provider-factory.js.map +1 -0
- package/dist/src/capture/triage-provider.d.ts +82 -0
- package/dist/src/capture/triage-provider.d.ts.map +1 -0
- package/dist/src/capture/triage-provider.js +126 -0
- package/dist/src/capture/triage-provider.js.map +1 -0
- package/dist/src/capture/triage.d.ts +30 -0
- package/dist/src/capture/triage.d.ts.map +1 -0
- package/dist/src/capture/triage.js +50 -0
- package/dist/src/capture/triage.js.map +1 -0
- package/dist/src/capture/user-statements-recheck.d.ts +22 -0
- package/dist/src/capture/user-statements-recheck.d.ts.map +1 -0
- package/dist/src/capture/user-statements-recheck.js +181 -0
- package/dist/src/capture/user-statements-recheck.js.map +1 -0
- package/dist/src/capture/user-statements.d.ts +84 -0
- package/dist/src/capture/user-statements.d.ts.map +1 -0
- package/dist/src/capture/user-statements.js +617 -0
- package/dist/src/capture/user-statements.js.map +1 -0
- package/dist/src/cli/agent-homes.d.ts +15 -0
- package/dist/src/cli/agent-homes.d.ts.map +1 -0
- package/dist/src/cli/agent-homes.js +45 -0
- package/dist/src/cli/agent-homes.js.map +1 -0
- package/dist/src/cli/commands/backfill.d.ts +3 -0
- package/dist/src/cli/commands/backfill.d.ts.map +1 -0
- package/dist/src/cli/commands/backfill.js +1379 -0
- package/dist/src/cli/commands/backfill.js.map +1 -0
- package/dist/src/cli/commands/brief.d.ts +12 -0
- package/dist/src/cli/commands/brief.d.ts.map +1 -0
- package/dist/src/cli/commands/brief.js +131 -0
- package/dist/src/cli/commands/brief.js.map +1 -0
- package/dist/src/cli/commands/bulk-ingest.d.ts +3 -0
- package/dist/src/cli/commands/bulk-ingest.d.ts.map +1 -0
- package/dist/src/cli/commands/bulk-ingest.js +126 -0
- package/dist/src/cli/commands/bulk-ingest.js.map +1 -0
- package/dist/src/cli/commands/capture-recover.d.ts +40 -0
- package/dist/src/cli/commands/capture-recover.d.ts.map +1 -0
- package/dist/src/cli/commands/capture-recover.js +194 -0
- package/dist/src/cli/commands/capture-recover.js.map +1 -0
- package/dist/src/cli/commands/capture.d.ts +12 -0
- package/dist/src/cli/commands/capture.d.ts.map +1 -0
- package/dist/src/cli/commands/capture.js +304 -0
- package/dist/src/cli/commands/capture.js.map +1 -0
- package/dist/src/cli/commands/chunk-backfill.d.ts +13 -0
- package/dist/src/cli/commands/chunk-backfill.d.ts.map +1 -0
- package/dist/src/cli/commands/chunk-backfill.js +157 -0
- package/dist/src/cli/commands/chunk-backfill.js.map +1 -0
- package/dist/src/cli/commands/compact.d.ts +3 -0
- package/dist/src/cli/commands/compact.d.ts.map +1 -0
- package/dist/src/cli/commands/compact.js +70 -0
- package/dist/src/cli/commands/compact.js.map +1 -0
- package/dist/src/cli/commands/cursor-probe.d.ts +20 -0
- package/dist/src/cli/commands/cursor-probe.d.ts.map +1 -0
- package/dist/src/cli/commands/cursor-probe.js +162 -0
- package/dist/src/cli/commands/cursor-probe.js.map +1 -0
- package/dist/src/cli/commands/doctor.d.ts +6 -0
- package/dist/src/cli/commands/doctor.d.ts.map +1 -0
- package/dist/src/cli/commands/doctor.js +259 -0
- package/dist/src/cli/commands/doctor.js.map +1 -0
- package/dist/src/cli/commands/feedback.d.ts +34 -0
- package/dist/src/cli/commands/feedback.d.ts.map +1 -0
- package/dist/src/cli/commands/feedback.js +214 -0
- package/dist/src/cli/commands/feedback.js.map +1 -0
- package/dist/src/cli/commands/hooks-install.d.ts +66 -0
- package/dist/src/cli/commands/hooks-install.d.ts.map +1 -0
- package/dist/src/cli/commands/hooks-install.js +228 -0
- package/dist/src/cli/commands/hooks-install.js.map +1 -0
- package/dist/src/cli/commands/import.d.ts +19 -0
- package/dist/src/cli/commands/import.d.ts.map +1 -0
- package/dist/src/cli/commands/import.js +258 -0
- package/dist/src/cli/commands/import.js.map +1 -0
- package/dist/src/cli/commands/ingest.d.ts +3 -0
- package/dist/src/cli/commands/ingest.d.ts.map +1 -0
- package/dist/src/cli/commands/ingest.js +80 -0
- package/dist/src/cli/commands/ingest.js.map +1 -0
- package/dist/src/cli/commands/mcp-install.d.ts +65 -0
- package/dist/src/cli/commands/mcp-install.d.ts.map +1 -0
- package/dist/src/cli/commands/mcp-install.js +306 -0
- package/dist/src/cli/commands/mcp-install.js.map +1 -0
- package/dist/src/cli/commands/menubar.d.ts +127 -0
- package/dist/src/cli/commands/menubar.d.ts.map +1 -0
- package/dist/src/cli/commands/menubar.js +585 -0
- package/dist/src/cli/commands/menubar.js.map +1 -0
- package/dist/src/cli/commands/onboard-first-run.d.ts +5 -0
- package/dist/src/cli/commands/onboard-first-run.d.ts.map +1 -0
- package/dist/src/cli/commands/onboard-first-run.js +156 -0
- package/dist/src/cli/commands/onboard-first-run.js.map +1 -0
- package/dist/src/cli/commands/onboard.d.ts +336 -0
- package/dist/src/cli/commands/onboard.d.ts.map +1 -0
- package/dist/src/cli/commands/onboard.js +1873 -0
- package/dist/src/cli/commands/onboard.js.map +1 -0
- package/dist/src/cli/commands/rebuild.d.ts +12 -0
- package/dist/src/cli/commands/rebuild.d.ts.map +1 -0
- package/dist/src/cli/commands/rebuild.js +167 -0
- package/dist/src/cli/commands/rebuild.js.map +1 -0
- package/dist/src/cli/commands/reconcile.d.ts +3 -0
- package/dist/src/cli/commands/reconcile.d.ts.map +1 -0
- package/dist/src/cli/commands/reconcile.js +68 -0
- package/dist/src/cli/commands/reconcile.js.map +1 -0
- package/dist/src/cli/commands/reindex.d.ts +3 -0
- package/dist/src/cli/commands/reindex.d.ts.map +1 -0
- package/dist/src/cli/commands/reindex.js +66 -0
- package/dist/src/cli/commands/reindex.js.map +1 -0
- package/dist/src/cli/commands/review.d.ts +13 -0
- package/dist/src/cli/commands/review.d.ts.map +1 -0
- package/dist/src/cli/commands/review.js +401 -0
- package/dist/src/cli/commands/review.js.map +1 -0
- package/dist/src/cli/commands/save.d.ts +3 -0
- package/dist/src/cli/commands/save.d.ts.map +1 -0
- package/dist/src/cli/commands/save.js +111 -0
- package/dist/src/cli/commands/save.js.map +1 -0
- package/dist/src/cli/commands/search.d.ts +37 -0
- package/dist/src/cli/commands/search.d.ts.map +1 -0
- package/dist/src/cli/commands/search.js +118 -0
- package/dist/src/cli/commands/search.js.map +1 -0
- package/dist/src/cli/commands/setup.d.ts +30 -0
- package/dist/src/cli/commands/setup.d.ts.map +1 -0
- package/dist/src/cli/commands/setup.js +122 -0
- package/dist/src/cli/commands/setup.js.map +1 -0
- package/dist/src/cli/commands/stats.d.ts +3 -0
- package/dist/src/cli/commands/stats.d.ts.map +1 -0
- package/dist/src/cli/commands/stats.js +42 -0
- package/dist/src/cli/commands/stats.js.map +1 -0
- package/dist/src/cli/commands/status.d.ts +17 -0
- package/dist/src/cli/commands/status.d.ts.map +1 -0
- package/dist/src/cli/commands/status.js +206 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/token-issue.d.ts +3 -0
- package/dist/src/cli/commands/token-issue.d.ts.map +1 -0
- package/dist/src/cli/commands/token-issue.js +33 -0
- package/dist/src/cli/commands/token-issue.js.map +1 -0
- package/dist/src/cli/commands/triage.d.ts +3 -0
- package/dist/src/cli/commands/triage.d.ts.map +1 -0
- package/dist/src/cli/commands/triage.js +127 -0
- package/dist/src/cli/commands/triage.js.map +1 -0
- package/dist/src/cli/commands/uninstall.d.ts +85 -0
- package/dist/src/cli/commands/uninstall.d.ts.map +1 -0
- package/dist/src/cli/commands/uninstall.js +512 -0
- package/dist/src/cli/commands/uninstall.js.map +1 -0
- package/dist/src/cli/commands/update.d.ts +105 -0
- package/dist/src/cli/commands/update.d.ts.map +1 -0
- package/dist/src/cli/commands/update.js +559 -0
- package/dist/src/cli/commands/update.js.map +1 -0
- package/dist/src/cli/default-config-path.d.ts +15 -0
- package/dist/src/cli/default-config-path.d.ts.map +1 -0
- package/dist/src/cli/default-config-path.js +28 -0
- package/dist/src/cli/default-config-path.js.map +1 -0
- package/dist/src/cli/feedback/feedback-config.d.ts +67 -0
- package/dist/src/cli/feedback/feedback-config.d.ts.map +1 -0
- package/dist/src/cli/feedback/feedback-config.js +169 -0
- package/dist/src/cli/feedback/feedback-config.js.map +1 -0
- package/dist/src/cli/feedback/feedback-history.d.ts +11 -0
- package/dist/src/cli/feedback/feedback-history.d.ts.map +1 -0
- package/dist/src/cli/feedback/feedback-history.js +145 -0
- package/dist/src/cli/feedback/feedback-history.js.map +1 -0
- package/dist/src/cli/feedback/feedback-payload.d.ts +74 -0
- package/dist/src/cli/feedback/feedback-payload.d.ts.map +1 -0
- package/dist/src/cli/feedback/feedback-payload.js +10 -0
- package/dist/src/cli/feedback/feedback-payload.js.map +1 -0
- package/dist/src/cli/feedback/feedback-relay.d.ts +15 -0
- package/dist/src/cli/feedback/feedback-relay.d.ts.map +1 -0
- package/dist/src/cli/feedback/feedback-relay.js +47 -0
- package/dist/src/cli/feedback/feedback-relay.js.map +1 -0
- package/dist/src/cli/feedback/feedback-status.d.ts +11 -0
- package/dist/src/cli/feedback/feedback-status.d.ts.map +1 -0
- package/dist/src/cli/feedback/feedback-status.js +122 -0
- package/dist/src/cli/feedback/feedback-status.js.map +1 -0
- package/dist/src/cli/feedback/invite.d.ts +17 -0
- package/dist/src/cli/feedback/invite.d.ts.map +1 -0
- package/dist/src/cli/feedback/invite.js +73 -0
- package/dist/src/cli/feedback/invite.js.map +1 -0
- package/dist/src/cli/feedback/relay-secret-store.d.ts +32 -0
- package/dist/src/cli/feedback/relay-secret-store.d.ts.map +1 -0
- package/dist/src/cli/feedback/relay-secret-store.js +137 -0
- package/dist/src/cli/feedback/relay-secret-store.js.map +1 -0
- package/dist/src/cli/hooks-writers/claude-code-policy-script.d.ts +35 -0
- package/dist/src/cli/hooks-writers/claude-code-policy-script.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/claude-code-policy-script.js +122 -0
- package/dist/src/cli/hooks-writers/claude-code-policy-script.js.map +1 -0
- package/dist/src/cli/hooks-writers/claude-code.d.ts +63 -0
- package/dist/src/cli/hooks-writers/claude-code.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/claude-code.js +289 -0
- package/dist/src/cli/hooks-writers/claude-code.js.map +1 -0
- package/dist/src/cli/hooks-writers/codex.d.ts +16 -0
- package/dist/src/cli/hooks-writers/codex.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/codex.js +17 -0
- package/dist/src/cli/hooks-writers/codex.js.map +1 -0
- package/dist/src/cli/hooks-writers/errors.d.ts +16 -0
- package/dist/src/cli/hooks-writers/errors.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/errors.js +24 -0
- package/dist/src/cli/hooks-writers/errors.js.map +1 -0
- package/dist/src/cli/hooks-writers/index.d.ts +23 -0
- package/dist/src/cli/hooks-writers/index.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/index.js +34 -0
- package/dist/src/cli/hooks-writers/index.js.map +1 -0
- package/dist/src/cli/hooks-writers/state.d.ts +43 -0
- package/dist/src/cli/hooks-writers/state.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/state.js +225 -0
- package/dist/src/cli/hooks-writers/state.js.map +1 -0
- package/dist/src/cli/hooks-writers/types.d.ts +28 -0
- package/dist/src/cli/hooks-writers/types.d.ts.map +1 -0
- package/dist/src/cli/hooks-writers/types.js +8 -0
- package/dist/src/cli/hooks-writers/types.js.map +1 -0
- package/dist/src/cli/http-client.d.ts +128 -0
- package/dist/src/cli/http-client.d.ts.map +1 -0
- package/dist/src/cli/http-client.js +401 -0
- package/dist/src/cli/http-client.js.map +1 -0
- package/dist/src/cli/index.d.ts +4 -0
- package/dist/src/cli/index.d.ts.map +1 -0
- package/dist/src/cli/index.js +99 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/job-poller.d.ts +13 -0
- package/dist/src/cli/job-poller.d.ts.map +1 -0
- package/dist/src/cli/job-poller.js +29 -0
- package/dist/src/cli/job-poller.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/codex-toml.d.ts +20 -0
- package/dist/src/cli/mcp-config-writers/codex-toml.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/codex-toml.js +918 -0
- package/dist/src/cli/mcp-config-writers/codex-toml.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.d.ts +11 -0
- package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.js +152 -0
- package/dist/src/cli/mcp-config-writers/earlier-name-restrictions.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/errors.d.ts +17 -0
- package/dist/src/cli/mcp-config-writers/errors.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/errors.js +13 -0
- package/dist/src/cli/mcp-config-writers/errors.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/index.d.ts +28 -0
- package/dist/src/cli/mcp-config-writers/index.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/index.js +70 -0
- package/dist/src/cli/mcp-config-writers/index.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/json-config.d.ts +20 -0
- package/dist/src/cli/mcp-config-writers/json-config.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/json-config.js +301 -0
- package/dist/src/cli/mcp-config-writers/json-config.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/left-in-folder.d.ts +18 -0
- package/dist/src/cli/mcp-config-writers/left-in-folder.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/left-in-folder.js +140 -0
- package/dist/src/cli/mcp-config-writers/left-in-folder.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/redact.d.ts +28 -0
- package/dist/src/cli/mcp-config-writers/redact.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/redact.js +48 -0
- package/dist/src/cli/mcp-config-writers/redact.js.map +1 -0
- package/dist/src/cli/mcp-config-writers/types.d.ts +46 -0
- package/dist/src/cli/mcp-config-writers/types.d.ts.map +1 -0
- package/dist/src/cli/mcp-config-writers/types.js +5 -0
- package/dist/src/cli/mcp-config-writers/types.js.map +1 -0
- package/dist/src/cli/output.d.ts +8 -0
- package/dist/src/cli/output.d.ts.map +1 -0
- package/dist/src/cli/output.js +34 -0
- package/dist/src/cli/output.js.map +1 -0
- package/dist/src/cli/postinstall-menubar.d.ts +38 -0
- package/dist/src/cli/postinstall-menubar.d.ts.map +1 -0
- package/dist/src/cli/postinstall-menubar.js +139 -0
- package/dist/src/cli/postinstall-menubar.js.map +1 -0
- package/dist/src/cli/status/friend-header.d.ts +61 -0
- package/dist/src/cli/status/friend-header.d.ts.map +1 -0
- package/dist/src/cli/status/friend-header.js +727 -0
- package/dist/src/cli/status/friend-header.js.map +1 -0
- package/dist/src/cli/status/local-signals.d.ts +89 -0
- package/dist/src/cli/status/local-signals.d.ts.map +1 -0
- package/dist/src/cli/status/local-signals.js +194 -0
- package/dist/src/cli/status/local-signals.js.map +1 -0
- package/dist/src/cli/token.d.ts +37 -0
- package/dist/src/cli/token.d.ts.map +1 -0
- package/dist/src/cli/token.js +105 -0
- package/dist/src/cli/token.js.map +1 -0
- package/dist/src/cli/ui.d.ts +47 -0
- package/dist/src/cli/ui.d.ts.map +1 -0
- package/dist/src/cli/ui.js +166 -0
- package/dist/src/cli/ui.js.map +1 -0
- package/dist/src/cli/uninstall/mcp-uninstall.d.ts +33 -0
- package/dist/src/cli/uninstall/mcp-uninstall.d.ts.map +1 -0
- package/dist/src/cli/uninstall/mcp-uninstall.js +116 -0
- package/dist/src/cli/uninstall/mcp-uninstall.js.map +1 -0
- package/dist/src/config/loader.d.ts +9 -0
- package/dist/src/config/loader.d.ts.map +1 -0
- package/dist/src/config/loader.js +73 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/schema.d.ts +956 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/schema.js +339 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/diagnostics/claude-preflight.d.ts +35 -0
- package/dist/src/diagnostics/claude-preflight.d.ts.map +1 -0
- package/dist/src/diagnostics/claude-preflight.js +90 -0
- package/dist/src/diagnostics/claude-preflight.js.map +1 -0
- package/dist/src/diagnostics/codex-preflight.d.ts +43 -0
- package/dist/src/diagnostics/codex-preflight.d.ts.map +1 -0
- package/dist/src/diagnostics/codex-preflight.js +128 -0
- package/dist/src/diagnostics/codex-preflight.js.map +1 -0
- package/dist/src/diagnostics/doctor.d.ts +125 -0
- package/dist/src/diagnostics/doctor.d.ts.map +1 -0
- package/dist/src/diagnostics/doctor.js +450 -0
- package/dist/src/diagnostics/doctor.js.map +1 -0
- package/dist/src/diagnostics/install-layout.d.ts +40 -0
- package/dist/src/diagnostics/install-layout.d.ts.map +1 -0
- package/dist/src/diagnostics/install-layout.js +55 -0
- package/dist/src/diagnostics/install-layout.js.map +1 -0
- package/dist/src/diagnostics/memory-coverage.d.ts +54 -0
- package/dist/src/diagnostics/memory-coverage.d.ts.map +1 -0
- package/dist/src/diagnostics/memory-coverage.js +272 -0
- package/dist/src/diagnostics/memory-coverage.js.map +1 -0
- package/dist/src/diagnostics/notify.d.ts +107 -0
- package/dist/src/diagnostics/notify.d.ts.map +1 -0
- package/dist/src/diagnostics/notify.js +217 -0
- package/dist/src/diagnostics/notify.js.map +1 -0
- package/dist/src/diagnostics/repair-prompt.d.ts +49 -0
- package/dist/src/diagnostics/repair-prompt.d.ts.map +1 -0
- package/dist/src/diagnostics/repair-prompt.js +223 -0
- package/dist/src/diagnostics/repair-prompt.js.map +1 -0
- package/dist/src/ingestion/bulk-ingest.d.ts +11 -0
- package/dist/src/ingestion/bulk-ingest.d.ts.map +1 -0
- package/dist/src/ingestion/bulk-ingest.js +11 -0
- package/dist/src/ingestion/bulk-ingest.js.map +1 -0
- package/dist/src/ingestion/chunk-meta.d.ts +85 -0
- package/dist/src/ingestion/chunk-meta.d.ts.map +1 -0
- package/dist/src/ingestion/chunk-meta.js +167 -0
- package/dist/src/ingestion/chunk-meta.js.map +1 -0
- package/dist/src/ingestion/chunk-text.d.ts +39 -0
- package/dist/src/ingestion/chunk-text.d.ts.map +1 -0
- package/dist/src/ingestion/chunk-text.js +114 -0
- package/dist/src/ingestion/chunk-text.js.map +1 -0
- package/dist/src/ingestion/cursor/cursor-store.d.ts +177 -0
- package/dist/src/ingestion/cursor/cursor-store.d.ts.map +1 -0
- package/dist/src/ingestion/cursor/cursor-store.js +242 -0
- package/dist/src/ingestion/cursor/cursor-store.js.map +1 -0
- package/dist/src/ingestion/cursor/enrich-roots.d.ts +16 -0
- package/dist/src/ingestion/cursor/enrich-roots.d.ts.map +1 -0
- package/dist/src/ingestion/cursor/enrich-roots.js +22 -0
- package/dist/src/ingestion/cursor/enrich-roots.js.map +1 -0
- package/dist/src/ingestion/cursor/vscdb-reader.d.ts +32 -0
- package/dist/src/ingestion/cursor/vscdb-reader.d.ts.map +1 -0
- package/dist/src/ingestion/cursor/vscdb-reader.js +113 -0
- package/dist/src/ingestion/cursor/vscdb-reader.js.map +1 -0
- package/dist/src/ingestion/cursor/workspace-root.d.ts +96 -0
- package/dist/src/ingestion/cursor/workspace-root.d.ts.map +1 -0
- package/dist/src/ingestion/cursor/workspace-root.js +187 -0
- package/dist/src/ingestion/cursor/workspace-root.js.map +1 -0
- package/dist/src/ingestion/extractor.d.ts +16 -0
- package/dist/src/ingestion/extractor.d.ts.map +1 -0
- package/dist/src/ingestion/extractor.js +85 -0
- package/dist/src/ingestion/extractor.js.map +1 -0
- package/dist/src/ingestion/extractors/docx.d.ts +3 -0
- package/dist/src/ingestion/extractors/docx.d.ts.map +1 -0
- package/dist/src/ingestion/extractors/docx.js +20 -0
- package/dist/src/ingestion/extractors/docx.js.map +1 -0
- package/dist/src/ingestion/extractors/pdf.d.ts +3 -0
- package/dist/src/ingestion/extractors/pdf.d.ts.map +1 -0
- package/dist/src/ingestion/extractors/pdf.js +32 -0
- package/dist/src/ingestion/extractors/pdf.js.map +1 -0
- package/dist/src/ingestion/historical-campaign.d.ts +340 -0
- package/dist/src/ingestion/historical-campaign.d.ts.map +1 -0
- package/dist/src/ingestion/historical-campaign.js +1010 -0
- package/dist/src/ingestion/historical-campaign.js.map +1 -0
- package/dist/src/ingestion/ignored-paths.d.ts +20 -0
- package/dist/src/ingestion/ignored-paths.d.ts.map +1 -0
- package/dist/src/ingestion/ignored-paths.js +45 -0
- package/dist/src/ingestion/ignored-paths.js.map +1 -0
- package/dist/src/ingestion/inbox-core/conversation-fingerprint.d.ts +2 -0
- package/dist/src/ingestion/inbox-core/conversation-fingerprint.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/conversation-fingerprint.js +27 -0
- package/dist/src/ingestion/inbox-core/conversation-fingerprint.js.map +1 -0
- package/dist/src/ingestion/inbox-core/conversation-key.d.ts +2 -0
- package/dist/src/ingestion/inbox-core/conversation-key.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/conversation-key.js +31 -0
- package/dist/src/ingestion/inbox-core/conversation-key.js.map +1 -0
- package/dist/src/ingestion/inbox-core/extensions.d.ts +3 -0
- package/dist/src/ingestion/inbox-core/extensions.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/extensions.js +16 -0
- package/dist/src/ingestion/inbox-core/extensions.js.map +1 -0
- package/dist/src/ingestion/inbox-core/idempotency.d.ts +2 -0
- package/dist/src/ingestion/inbox-core/idempotency.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/idempotency.js +22 -0
- package/dist/src/ingestion/inbox-core/idempotency.js.map +1 -0
- package/dist/src/ingestion/inbox-core/index.d.ts +20 -0
- package/dist/src/ingestion/inbox-core/index.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/index.js +20 -0
- package/dist/src/ingestion/inbox-core/index.js.map +1 -0
- package/dist/src/ingestion/inbox-core/source-detection.d.ts +2 -0
- package/dist/src/ingestion/inbox-core/source-detection.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/source-detection.js +23 -0
- package/dist/src/ingestion/inbox-core/source-detection.js.map +1 -0
- package/dist/src/ingestion/inbox-core/source-sniffer.d.ts +11 -0
- package/dist/src/ingestion/inbox-core/source-sniffer.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/source-sniffer.js +69 -0
- package/dist/src/ingestion/inbox-core/source-sniffer.js.map +1 -0
- package/dist/src/ingestion/inbox-core/zip-sniffer.d.ts +70 -0
- package/dist/src/ingestion/inbox-core/zip-sniffer.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-core/zip-sniffer.js +161 -0
- package/dist/src/ingestion/inbox-core/zip-sniffer.js.map +1 -0
- package/dist/src/ingestion/inbox-watcher.d.ts +12 -0
- package/dist/src/ingestion/inbox-watcher.d.ts.map +1 -0
- package/dist/src/ingestion/inbox-watcher.js +83 -0
- package/dist/src/ingestion/inbox-watcher.js.map +1 -0
- package/dist/src/ingestion/indexer.d.ts +39 -0
- package/dist/src/ingestion/indexer.d.ts.map +1 -0
- package/dist/src/ingestion/indexer.js +111 -0
- package/dist/src/ingestion/indexer.js.map +1 -0
- package/dist/src/ingestion/metadata-extraction.d.ts +56 -0
- package/dist/src/ingestion/metadata-extraction.d.ts.map +1 -0
- package/dist/src/ingestion/metadata-extraction.js +151 -0
- package/dist/src/ingestion/metadata-extraction.js.map +1 -0
- package/dist/src/ingestion/parsers/chatgpt-web.d.ts +29 -0
- package/dist/src/ingestion/parsers/chatgpt-web.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/chatgpt-web.js +100 -0
- package/dist/src/ingestion/parsers/chatgpt-web.js.map +1 -0
- package/dist/src/ingestion/parsers/claude-code-jsonl.d.ts +26 -0
- package/dist/src/ingestion/parsers/claude-code-jsonl.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/claude-code-jsonl.js +125 -0
- package/dist/src/ingestion/parsers/claude-code-jsonl.js.map +1 -0
- package/dist/src/ingestion/parsers/claude-desktop-sessions.d.ts +17 -0
- package/dist/src/ingestion/parsers/claude-desktop-sessions.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/claude-desktop-sessions.js +112 -0
- package/dist/src/ingestion/parsers/claude-desktop-sessions.js.map +1 -0
- package/dist/src/ingestion/parsers/claude-web.d.ts +24 -0
- package/dist/src/ingestion/parsers/claude-web.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/claude-web.js +75 -0
- package/dist/src/ingestion/parsers/claude-web.js.map +1 -0
- package/dist/src/ingestion/parsers/codex-jsonl.d.ts +18 -0
- package/dist/src/ingestion/parsers/codex-jsonl.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/codex-jsonl.js +150 -0
- package/dist/src/ingestion/parsers/codex-jsonl.js.map +1 -0
- package/dist/src/ingestion/parsers/gemini-web.d.ts +16 -0
- package/dist/src/ingestion/parsers/gemini-web.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/gemini-web.js +170 -0
- package/dist/src/ingestion/parsers/gemini-web.js.map +1 -0
- package/dist/src/ingestion/parsers/grok-cli.d.ts +19 -0
- package/dist/src/ingestion/parsers/grok-cli.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/grok-cli.js +126 -0
- package/dist/src/ingestion/parsers/grok-cli.js.map +1 -0
- package/dist/src/ingestion/parsers/grok-web.d.ts +40 -0
- package/dist/src/ingestion/parsers/grok-web.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/grok-web.js +67 -0
- package/dist/src/ingestion/parsers/grok-web.js.map +1 -0
- package/dist/src/ingestion/parsers/turns.d.ts +36 -0
- package/dist/src/ingestion/parsers/turns.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/turns.js +25 -0
- package/dist/src/ingestion/parsers/turns.js.map +1 -0
- package/dist/src/ingestion/parsers/types.d.ts +47 -0
- package/dist/src/ingestion/parsers/types.d.ts.map +1 -0
- package/dist/src/ingestion/parsers/types.js +26 -0
- package/dist/src/ingestion/parsers/types.js.map +1 -0
- package/dist/src/ingestion/report-cards.d.ts +75 -0
- package/dist/src/ingestion/report-cards.d.ts.map +1 -0
- package/dist/src/ingestion/report-cards.js +224 -0
- package/dist/src/ingestion/report-cards.js.map +1 -0
- package/dist/src/ingestion/scanner.d.ts +48 -0
- package/dist/src/ingestion/scanner.d.ts.map +1 -0
- package/dist/src/ingestion/scanner.js +131 -0
- package/dist/src/ingestion/scanner.js.map +1 -0
- package/dist/src/ingestion/skip-quarantine.d.ts +10 -0
- package/dist/src/ingestion/skip-quarantine.d.ts.map +1 -0
- package/dist/src/ingestion/skip-quarantine.js +35 -0
- package/dist/src/ingestion/skip-quarantine.js.map +1 -0
- package/dist/src/ingestion/staging.d.ts +109 -0
- package/dist/src/ingestion/staging.d.ts.map +1 -0
- package/dist/src/ingestion/staging.js +411 -0
- package/dist/src/ingestion/staging.js.map +1 -0
- package/dist/src/ingestion/watcher.d.ts +65 -0
- package/dist/src/ingestion/watcher.d.ts.map +1 -0
- package/dist/src/ingestion/watcher.js +182 -0
- package/dist/src/ingestion/watcher.js.map +1 -0
- package/dist/src/jobs/codex-override-handler.d.ts +3 -0
- package/dist/src/jobs/codex-override-handler.d.ts.map +1 -0
- package/dist/src/jobs/codex-override-handler.js +16 -0
- package/dist/src/jobs/codex-override-handler.js.map +1 -0
- package/dist/src/jobs/handlers/compact.d.ts +30 -0
- package/dist/src/jobs/handlers/compact.d.ts.map +1 -0
- package/dist/src/jobs/handlers/compact.js +360 -0
- package/dist/src/jobs/handlers/compact.js.map +1 -0
- package/dist/src/jobs/handlers/dedupe-conversations.d.ts +134 -0
- package/dist/src/jobs/handlers/dedupe-conversations.d.ts.map +1 -0
- package/dist/src/jobs/handlers/dedupe-conversations.js +371 -0
- package/dist/src/jobs/handlers/dedupe-conversations.js.map +1 -0
- package/dist/src/jobs/handlers/ingest.d.ts +13 -0
- package/dist/src/jobs/handlers/ingest.d.ts.map +1 -0
- package/dist/src/jobs/handlers/ingest.js +557 -0
- package/dist/src/jobs/handlers/ingest.js.map +1 -0
- package/dist/src/jobs/handlers/optimize.d.ts +11 -0
- package/dist/src/jobs/handlers/optimize.d.ts.map +1 -0
- package/dist/src/jobs/handlers/optimize.js +12 -0
- package/dist/src/jobs/handlers/optimize.js.map +1 -0
- package/dist/src/jobs/handlers/reconcile.d.ts +57 -0
- package/dist/src/jobs/handlers/reconcile.d.ts.map +1 -0
- package/dist/src/jobs/handlers/reconcile.js +685 -0
- package/dist/src/jobs/handlers/reconcile.js.map +1 -0
- package/dist/src/jobs/handlers/reindex.d.ts +38 -0
- package/dist/src/jobs/handlers/reindex.d.ts.map +1 -0
- package/dist/src/jobs/handlers/reindex.js +63 -0
- package/dist/src/jobs/handlers/reindex.js.map +1 -0
- package/dist/src/jobs/handlers/save.d.ts +10 -0
- package/dist/src/jobs/handlers/save.d.ts.map +1 -0
- package/dist/src/jobs/handlers/save.js +316 -0
- package/dist/src/jobs/handlers/save.js.map +1 -0
- package/dist/src/jobs/handlers/triage.d.ts +47 -0
- package/dist/src/jobs/handlers/triage.d.ts.map +1 -0
- package/dist/src/jobs/handlers/triage.js +95 -0
- package/dist/src/jobs/handlers/triage.js.map +1 -0
- package/dist/src/jobs/maintenance-scheduler.d.ts +30 -0
- package/dist/src/jobs/maintenance-scheduler.d.ts.map +1 -0
- package/dist/src/jobs/maintenance-scheduler.js +41 -0
- package/dist/src/jobs/maintenance-scheduler.js.map +1 -0
- package/dist/src/jobs/queue.d.ts +157 -0
- package/dist/src/jobs/queue.d.ts.map +1 -0
- package/dist/src/jobs/queue.js +759 -0
- package/dist/src/jobs/queue.js.map +1 -0
- package/dist/src/jobs/types.d.ts +53 -0
- package/dist/src/jobs/types.d.ts.map +1 -0
- package/dist/src/jobs/types.js +33 -0
- package/dist/src/jobs/types.js.map +1 -0
- package/dist/src/jobs/worker-entry.d.ts +10 -0
- package/dist/src/jobs/worker-entry.d.ts.map +1 -0
- package/dist/src/jobs/worker-entry.js +252 -0
- package/dist/src/jobs/worker-entry.js.map +1 -0
- package/dist/src/jobs/worker-process.d.ts +67 -0
- package/dist/src/jobs/worker-process.d.ts.map +1 -0
- package/dist/src/jobs/worker-process.js +227 -0
- package/dist/src/jobs/worker-process.js.map +1 -0
- package/dist/src/jobs/worker.d.ts +11 -0
- package/dist/src/jobs/worker.d.ts.map +1 -0
- package/dist/src/jobs/worker.js +14 -0
- package/dist/src/jobs/worker.js.map +1 -0
- package/dist/src/main.d.ts +2 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +683 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/mcp/capture-diagnostics.d.ts +51 -0
- package/dist/src/mcp/capture-diagnostics.d.ts.map +1 -0
- package/dist/src/mcp/capture-diagnostics.js +127 -0
- package/dist/src/mcp/capture-diagnostics.js.map +1 -0
- package/dist/src/mcp/errors.d.ts +8 -0
- package/dist/src/mcp/errors.d.ts.map +1 -0
- package/dist/src/mcp/errors.js +69 -0
- package/dist/src/mcp/errors.js.map +1 -0
- package/dist/src/mcp/memory-diagnostics.d.ts +6 -0
- package/dist/src/mcp/memory-diagnostics.d.ts.map +1 -0
- package/dist/src/mcp/memory-diagnostics.js +51 -0
- package/dist/src/mcp/memory-diagnostics.js.map +1 -0
- package/dist/src/mcp/names.d.ts +48 -0
- package/dist/src/mcp/names.d.ts.map +1 -0
- package/dist/src/mcp/names.js +77 -0
- package/dist/src/mcp/names.js.map +1 -0
- package/dist/src/mcp/server.d.ts +19 -0
- package/dist/src/mcp/server.d.ts.map +1 -0
- package/dist/src/mcp/server.js +184 -0
- package/dist/src/mcp/server.js.map +1 -0
- package/dist/src/mcp/stdio.d.ts +2 -0
- package/dist/src/mcp/stdio.d.ts.map +1 -0
- package/dist/src/mcp/stdio.js +8 -0
- package/dist/src/mcp/stdio.js.map +1 -0
- package/dist/src/mcp/tools/context-pack.d.ts +35 -0
- package/dist/src/mcp/tools/context-pack.d.ts.map +1 -0
- package/dist/src/mcp/tools/context-pack.js +279 -0
- package/dist/src/mcp/tools/context-pack.js.map +1 -0
- package/dist/src/mcp/tools/conversations-search.d.ts +38 -0
- package/dist/src/mcp/tools/conversations-search.d.ts.map +1 -0
- package/dist/src/mcp/tools/conversations-search.js +79 -0
- package/dist/src/mcp/tools/conversations-search.js.map +1 -0
- package/dist/src/mcp/tools/evidence-feedback.d.ts +60 -0
- package/dist/src/mcp/tools/evidence-feedback.d.ts.map +1 -0
- package/dist/src/mcp/tools/evidence-feedback.js +62 -0
- package/dist/src/mcp/tools/evidence-feedback.js.map +1 -0
- package/dist/src/mcp/tools/log-outcome.d.ts +72 -0
- package/dist/src/mcp/tools/log-outcome.d.ts.map +1 -0
- package/dist/src/mcp/tools/log-outcome.js +59 -0
- package/dist/src/mcp/tools/log-outcome.js.map +1 -0
- package/dist/src/mcp/tools/open-evidence.d.ts +37 -0
- package/dist/src/mcp/tools/open-evidence.d.ts.map +1 -0
- package/dist/src/mcp/tools/open-evidence.js +72 -0
- package/dist/src/mcp/tools/open-evidence.js.map +1 -0
- package/dist/src/mcp/tools/save.d.ts +37 -0
- package/dist/src/mcp/tools/save.d.ts.map +1 -0
- package/dist/src/mcp/tools/save.js +65 -0
- package/dist/src/mcp/tools/save.js.map +1 -0
- package/dist/src/mcp/tools/search.d.ts +37 -0
- package/dist/src/mcp/tools/search.d.ts.map +1 -0
- package/dist/src/mcp/tools/search.js +95 -0
- package/dist/src/mcp/tools/search.js.map +1 -0
- package/dist/src/mcp/tools/status.d.ts +31 -0
- package/dist/src/mcp/tools/status.d.ts.map +1 -0
- package/dist/src/mcp/tools/status.js +63 -0
- package/dist/src/mcp/tools/status.js.map +1 -0
- package/dist/src/observability/coverage.d.ts +100 -0
- package/dist/src/observability/coverage.d.ts.map +1 -0
- package/dist/src/observability/coverage.js +178 -0
- package/dist/src/observability/coverage.js.map +1 -0
- package/dist/src/observability/embedding-events.d.ts +52 -0
- package/dist/src/observability/embedding-events.d.ts.map +1 -0
- package/dist/src/observability/embedding-events.js +149 -0
- package/dist/src/observability/embedding-events.js.map +1 -0
- package/dist/src/observability/index-events.d.ts +70 -0
- package/dist/src/observability/index-events.d.ts.map +1 -0
- package/dist/src/observability/index-events.js +148 -0
- package/dist/src/observability/index-events.js.map +1 -0
- package/dist/src/observability/onboarding-metric.d.ts +131 -0
- package/dist/src/observability/onboarding-metric.d.ts.map +1 -0
- package/dist/src/observability/onboarding-metric.js +352 -0
- package/dist/src/observability/onboarding-metric.js.map +1 -0
- package/dist/src/observability/retrieval-feedback.d.ts +82 -0
- package/dist/src/observability/retrieval-feedback.d.ts.map +1 -0
- package/dist/src/observability/retrieval-feedback.js +231 -0
- package/dist/src/observability/retrieval-feedback.js.map +1 -0
- package/dist/src/observability/rift-context.d.ts +53 -0
- package/dist/src/observability/rift-context.d.ts.map +1 -0
- package/dist/src/observability/rift-context.js +141 -0
- package/dist/src/observability/rift-context.js.map +1 -0
- package/dist/src/observability/staleness.d.ts +43 -0
- package/dist/src/observability/staleness.d.ts.map +1 -0
- package/dist/src/observability/staleness.js +74 -0
- package/dist/src/observability/staleness.js.map +1 -0
- package/dist/src/observability/tool-usage-stats.d.ts +139 -0
- package/dist/src/observability/tool-usage-stats.d.ts.map +1 -0
- package/dist/src/observability/tool-usage-stats.js +245 -0
- package/dist/src/observability/tool-usage-stats.js.map +1 -0
- package/dist/src/observability/tool-usage.d.ts +231 -0
- package/dist/src/observability/tool-usage.d.ts.map +1 -0
- package/dist/src/observability/tool-usage.js +489 -0
- package/dist/src/observability/tool-usage.js.map +1 -0
- package/dist/src/observability/version-check.d.ts +75 -0
- package/dist/src/observability/version-check.d.ts.map +1 -0
- package/dist/src/observability/version-check.js +198 -0
- package/dist/src/observability/version-check.js.map +1 -0
- package/dist/src/onboarding/capture-switch.d.ts +20 -0
- package/dist/src/onboarding/capture-switch.d.ts.map +1 -0
- package/dist/src/onboarding/capture-switch.js +52 -0
- package/dist/src/onboarding/capture-switch.js.map +1 -0
- package/dist/src/onboarding/daemon-control.d.ts +33 -0
- package/dist/src/onboarding/daemon-control.d.ts.map +1 -0
- package/dist/src/onboarding/daemon-control.js +92 -0
- package/dist/src/onboarding/daemon-control.js.map +1 -0
- package/dist/src/onboarding/env-file.d.ts +18 -0
- package/dist/src/onboarding/env-file.d.ts.map +1 -0
- package/dist/src/onboarding/env-file.js +89 -0
- package/dist/src/onboarding/env-file.js.map +1 -0
- package/dist/src/onboarding/search-by-meaning.d.ts +35 -0
- package/dist/src/onboarding/search-by-meaning.d.ts.map +1 -0
- package/dist/src/onboarding/search-by-meaning.js +163 -0
- package/dist/src/onboarding/search-by-meaning.js.map +1 -0
- package/dist/src/onboarding/setup-page.d.ts +7 -0
- package/dist/src/onboarding/setup-page.d.ts.map +1 -0
- package/dist/src/onboarding/setup-page.js +823 -0
- package/dist/src/onboarding/setup-page.js.map +1 -0
- package/dist/src/onboarding/setup-session.d.ts +22 -0
- package/dist/src/onboarding/setup-session.d.ts.map +1 -0
- package/dist/src/onboarding/setup-session.js +80 -0
- package/dist/src/onboarding/setup-session.js.map +1 -0
- package/dist/src/onboarding/setup-state.d.ts +117 -0
- package/dist/src/onboarding/setup-state.d.ts.map +1 -0
- package/dist/src/onboarding/setup-state.js +267 -0
- package/dist/src/onboarding/setup-state.js.map +1 -0
- package/dist/src/onboarding/voyage-validate.d.ts +22 -0
- package/dist/src/onboarding/voyage-validate.d.ts.map +1 -0
- package/dist/src/onboarding/voyage-validate.js +96 -0
- package/dist/src/onboarding/voyage-validate.js.map +1 -0
- package/dist/src/providers/anthropic-digest.d.ts +23 -0
- package/dist/src/providers/anthropic-digest.d.ts.map +1 -0
- package/dist/src/providers/anthropic-digest.js +91 -0
- package/dist/src/providers/anthropic-digest.js.map +1 -0
- package/dist/src/providers/basic-metadata-extraction.d.ts +60 -0
- package/dist/src/providers/basic-metadata-extraction.d.ts.map +1 -0
- package/dist/src/providers/basic-metadata-extraction.js +114 -0
- package/dist/src/providers/basic-metadata-extraction.js.map +1 -0
- package/dist/src/providers/claude-cli-metadata-extraction.d.ts +47 -0
- package/dist/src/providers/claude-cli-metadata-extraction.d.ts.map +1 -0
- package/dist/src/providers/claude-cli-metadata-extraction.js +130 -0
- package/dist/src/providers/claude-cli-metadata-extraction.js.map +1 -0
- package/dist/src/providers/claude-cli-runner.d.ts +92 -0
- package/dist/src/providers/claude-cli-runner.d.ts.map +1 -0
- package/dist/src/providers/claude-cli-runner.js +598 -0
- package/dist/src/providers/claude-cli-runner.js.map +1 -0
- package/dist/src/providers/claude-input-limit.d.ts +32 -0
- package/dist/src/providers/claude-input-limit.d.ts.map +1 -0
- package/dist/src/providers/claude-input-limit.js +32 -0
- package/dist/src/providers/claude-input-limit.js.map +1 -0
- package/dist/src/providers/codex-cli-digest.d.ts +12 -0
- package/dist/src/providers/codex-cli-digest.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-digest.js +70 -0
- package/dist/src/providers/codex-cli-digest.js.map +1 -0
- package/dist/src/providers/codex-cli-metadata-extraction.d.ts +15 -0
- package/dist/src/providers/codex-cli-metadata-extraction.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-metadata-extraction.js +78 -0
- package/dist/src/providers/codex-cli-metadata-extraction.js.map +1 -0
- package/dist/src/providers/codex-cli-model.d.ts +110 -0
- package/dist/src/providers/codex-cli-model.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-model.js +338 -0
- package/dist/src/providers/codex-cli-model.js.map +1 -0
- package/dist/src/providers/codex-cli-runner.d.ts +70 -0
- package/dist/src/providers/codex-cli-runner.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-runner.js +745 -0
- package/dist/src/providers/codex-cli-runner.js.map +1 -0
- package/dist/src/providers/codex-input-limit.d.ts +43 -0
- package/dist/src/providers/codex-input-limit.d.ts.map +1 -0
- package/dist/src/providers/codex-input-limit.js +70 -0
- package/dist/src/providers/codex-input-limit.js.map +1 -0
- package/dist/src/providers/conversation-generation.d.ts +21 -0
- package/dist/src/providers/conversation-generation.d.ts.map +1 -0
- package/dist/src/providers/conversation-generation.js +132 -0
- package/dist/src/providers/conversation-generation.js.map +1 -0
- package/dist/src/providers/ollama-embed.d.ts +23 -0
- package/dist/src/providers/ollama-embed.d.ts.map +1 -0
- package/dist/src/providers/ollama-embed.js +137 -0
- package/dist/src/providers/ollama-embed.js.map +1 -0
- package/dist/src/providers/ollama.d.ts +42 -0
- package/dist/src/providers/ollama.d.ts.map +1 -0
- package/dist/src/providers/ollama.js +169 -0
- package/dist/src/providers/ollama.js.map +1 -0
- package/dist/src/providers/openai-metadata-extraction.d.ts +120 -0
- package/dist/src/providers/openai-metadata-extraction.d.ts.map +1 -0
- package/dist/src/providers/openai-metadata-extraction.js +225 -0
- package/dist/src/providers/openai-metadata-extraction.js.map +1 -0
- package/dist/src/providers/operator-overrides.d.ts +24 -0
- package/dist/src/providers/operator-overrides.d.ts.map +1 -0
- package/dist/src/providers/operator-overrides.js +84 -0
- package/dist/src/providers/operator-overrides.js.map +1 -0
- package/dist/src/providers/placeholder-embed.d.ts +56 -0
- package/dist/src/providers/placeholder-embed.d.ts.map +1 -0
- package/dist/src/providers/placeholder-embed.js +64 -0
- package/dist/src/providers/placeholder-embed.js.map +1 -0
- package/dist/src/providers/shared-request.d.ts +22 -0
- package/dist/src/providers/shared-request.d.ts.map +1 -0
- package/dist/src/providers/shared-request.js +63 -0
- package/dist/src/providers/shared-request.js.map +1 -0
- package/dist/src/providers/stub.d.ts +19 -0
- package/dist/src/providers/stub.d.ts.map +1 -0
- package/dist/src/providers/stub.js +74 -0
- package/dist/src/providers/stub.js.map +1 -0
- package/dist/src/providers/types.d.ts +100 -0
- package/dist/src/providers/types.d.ts.map +1 -0
- package/dist/src/providers/types.js +63 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/providers/voyage.d.ts +55 -0
- package/dist/src/providers/voyage.d.ts.map +1 -0
- package/dist/src/providers/voyage.js +179 -0
- package/dist/src/providers/voyage.js.map +1 -0
- package/dist/src/retrieval/brief.d.ts +26 -0
- package/dist/src/retrieval/brief.d.ts.map +1 -0
- package/dist/src/retrieval/brief.js +268 -0
- package/dist/src/retrieval/brief.js.map +1 -0
- package/dist/src/retrieval/canonical-files.d.ts +79 -0
- package/dist/src/retrieval/canonical-files.d.ts.map +1 -0
- package/dist/src/retrieval/canonical-files.js +432 -0
- package/dist/src/retrieval/canonical-files.js.map +1 -0
- package/dist/src/retrieval/compact.d.ts +306 -0
- package/dist/src/retrieval/compact.d.ts.map +1 -0
- package/dist/src/retrieval/compact.js +810 -0
- package/dist/src/retrieval/compact.js.map +1 -0
- package/dist/src/retrieval/context-pack.d.ts +344 -0
- package/dist/src/retrieval/context-pack.d.ts.map +1 -0
- package/dist/src/retrieval/context-pack.js +1483 -0
- package/dist/src/retrieval/context-pack.js.map +1 -0
- package/dist/src/retrieval/conversation-dedup.d.ts +54 -0
- package/dist/src/retrieval/conversation-dedup.d.ts.map +1 -0
- package/dist/src/retrieval/conversation-dedup.js +162 -0
- package/dist/src/retrieval/conversation-dedup.js.map +1 -0
- package/dist/src/retrieval/current-truth.d.ts +360 -0
- package/dist/src/retrieval/current-truth.d.ts.map +1 -0
- package/dist/src/retrieval/current-truth.js +766 -0
- package/dist/src/retrieval/current-truth.js.map +1 -0
- package/dist/src/retrieval/cwd.d.ts +25 -0
- package/dist/src/retrieval/cwd.d.ts.map +1 -0
- package/dist/src/retrieval/cwd.js +48 -0
- package/dist/src/retrieval/cwd.js.map +1 -0
- package/dist/src/retrieval/degraded.d.ts +20 -0
- package/dist/src/retrieval/degraded.d.ts.map +1 -0
- package/dist/src/retrieval/degraded.js +43 -0
- package/dist/src/retrieval/degraded.js.map +1 -0
- package/dist/src/retrieval/evidence-key.d.ts +48 -0
- package/dist/src/retrieval/evidence-key.d.ts.map +1 -0
- package/dist/src/retrieval/evidence-key.js +131 -0
- package/dist/src/retrieval/evidence-key.js.map +1 -0
- package/dist/src/retrieval/feedback-ranking.d.ts +49 -0
- package/dist/src/retrieval/feedback-ranking.d.ts.map +1 -0
- package/dist/src/retrieval/feedback-ranking.js +138 -0
- package/dist/src/retrieval/feedback-ranking.js.map +1 -0
- package/dist/src/retrieval/git-state.d.ts +62 -0
- package/dist/src/retrieval/git-state.d.ts.map +1 -0
- package/dist/src/retrieval/git-state.js +192 -0
- package/dist/src/retrieval/git-state.js.map +1 -0
- package/dist/src/retrieval/group-by-parent.d.ts +38 -0
- package/dist/src/retrieval/group-by-parent.d.ts.map +1 -0
- package/dist/src/retrieval/group-by-parent.js +40 -0
- package/dist/src/retrieval/group-by-parent.js.map +1 -0
- package/dist/src/retrieval/hybrid.d.ts +75 -0
- package/dist/src/retrieval/hybrid.d.ts.map +1 -0
- package/dist/src/retrieval/hybrid.js +151 -0
- package/dist/src/retrieval/hybrid.js.map +1 -0
- package/dist/src/retrieval/lexical.d.ts +33 -0
- package/dist/src/retrieval/lexical.d.ts.map +1 -0
- package/dist/src/retrieval/lexical.js +379 -0
- package/dist/src/retrieval/lexical.js.map +1 -0
- package/dist/src/retrieval/locator-boost.d.ts +37 -0
- package/dist/src/retrieval/locator-boost.d.ts.map +1 -0
- package/dist/src/retrieval/locator-boost.js +129 -0
- package/dist/src/retrieval/locator-boost.js.map +1 -0
- package/dist/src/retrieval/passages.d.ts +24 -0
- package/dist/src/retrieval/passages.d.ts.map +1 -0
- package/dist/src/retrieval/passages.js +160 -0
- package/dist/src/retrieval/passages.js.map +1 -0
- package/dist/src/retrieval/post-filter.d.ts +32 -0
- package/dist/src/retrieval/post-filter.d.ts.map +1 -0
- package/dist/src/retrieval/post-filter.js +57 -0
- package/dist/src/retrieval/post-filter.js.map +1 -0
- package/dist/src/retrieval/project-index.d.ts +71 -0
- package/dist/src/retrieval/project-index.d.ts.map +1 -0
- package/dist/src/retrieval/project-index.js +348 -0
- package/dist/src/retrieval/project-index.js.map +1 -0
- package/dist/src/retrieval/recall-hint.d.ts +22 -0
- package/dist/src/retrieval/recall-hint.d.ts.map +1 -0
- package/dist/src/retrieval/recall-hint.js +33 -0
- package/dist/src/retrieval/recall-hint.js.map +1 -0
- package/dist/src/retrieval/receipt.d.ts +57 -0
- package/dist/src/retrieval/receipt.d.ts.map +1 -0
- package/dist/src/retrieval/receipt.js +122 -0
- package/dist/src/retrieval/receipt.js.map +1 -0
- package/dist/src/retrieval/report-demotion.d.ts +46 -0
- package/dist/src/retrieval/report-demotion.d.ts.map +1 -0
- package/dist/src/retrieval/report-demotion.js +169 -0
- package/dist/src/retrieval/report-demotion.js.map +1 -0
- package/dist/src/retrieval/reranker.d.ts +119 -0
- package/dist/src/retrieval/reranker.d.ts.map +1 -0
- package/dist/src/retrieval/reranker.js +220 -0
- package/dist/src/retrieval/reranker.js.map +1 -0
- package/dist/src/retrieval/stitch-chunks.d.ts +76 -0
- package/dist/src/retrieval/stitch-chunks.d.ts.map +1 -0
- package/dist/src/retrieval/stitch-chunks.js +113 -0
- package/dist/src/retrieval/stitch-chunks.js.map +1 -0
- package/dist/src/retrieval/vector.d.ts +71 -0
- package/dist/src/retrieval/vector.d.ts.map +1 -0
- package/dist/src/retrieval/vector.js +147 -0
- package/dist/src/retrieval/vector.js.map +1 -0
- package/dist/src/runtime/legacy-migration.d.ts +27 -0
- package/dist/src/runtime/legacy-migration.d.ts.map +1 -0
- package/dist/src/runtime/legacy-migration.js +140 -0
- package/dist/src/runtime/legacy-migration.js.map +1 -0
- package/dist/src/runtime/legacy-name-guard.d.ts +35 -0
- package/dist/src/runtime/legacy-name-guard.d.ts.map +1 -0
- package/dist/src/runtime/legacy-name-guard.js +58 -0
- package/dist/src/runtime/legacy-name-guard.js.map +1 -0
- package/dist/src/runtime/rift-env.d.ts +14 -0
- package/dist/src/runtime/rift-env.d.ts.map +1 -0
- package/dist/src/runtime/rift-env.js +79 -0
- package/dist/src/runtime/rift-env.js.map +1 -0
- package/dist/src/runtime/voyage-key-source.d.ts +46 -0
- package/dist/src/runtime/voyage-key-source.d.ts.map +1 -0
- package/dist/src/runtime/voyage-key-source.js +97 -0
- package/dist/src/runtime/voyage-key-source.js.map +1 -0
- package/dist/src/runtime/watcher-startup.d.ts +2 -0
- package/dist/src/runtime/watcher-startup.d.ts.map +1 -0
- package/dist/src/runtime/watcher-startup.js +4 -0
- package/dist/src/runtime/watcher-startup.js.map +1 -0
- package/dist/src/security/archive.d.ts +23 -0
- package/dist/src/security/archive.d.ts.map +1 -0
- package/dist/src/security/archive.js +163 -0
- package/dist/src/security/archive.js.map +1 -0
- package/dist/src/security/paths.d.ts +21 -0
- package/dist/src/security/paths.d.ts.map +1 -0
- package/dist/src/security/paths.js +67 -0
- package/dist/src/security/paths.js.map +1 -0
- package/dist/src/server/app.d.ts +29 -0
- package/dist/src/server/app.d.ts.map +1 -0
- package/dist/src/server/app.js +356 -0
- package/dist/src/server/app.js.map +1 -0
- package/dist/src/server/build-info.d.ts +8 -0
- package/dist/src/server/build-info.d.ts.map +1 -0
- package/dist/src/server/build-info.js +61 -0
- package/dist/src/server/build-info.js.map +1 -0
- package/dist/src/server/lifecycle.d.ts +30 -0
- package/dist/src/server/lifecycle.d.ts.map +1 -0
- package/dist/src/server/lifecycle.js +59 -0
- package/dist/src/server/lifecycle.js.map +1 -0
- package/dist/src/server/middleware/multipart.d.ts +51 -0
- package/dist/src/server/middleware/multipart.d.ts.map +1 -0
- package/dist/src/server/middleware/multipart.js +86 -0
- package/dist/src/server/middleware/multipart.js.map +1 -0
- package/dist/src/server/routes/compact.d.ts +37 -0
- package/dist/src/server/routes/compact.d.ts.map +1 -0
- package/dist/src/server/routes/compact.js +80 -0
- package/dist/src/server/routes/compact.js.map +1 -0
- package/dist/src/server/routes/context.d.ts +12 -0
- package/dist/src/server/routes/context.d.ts.map +1 -0
- package/dist/src/server/routes/context.js +73 -0
- package/dist/src/server/routes/context.js.map +1 -0
- package/dist/src/server/routes/conversations-search.d.ts +4 -0
- package/dist/src/server/routes/conversations-search.d.ts.map +1 -0
- package/dist/src/server/routes/conversations-search.js +287 -0
- package/dist/src/server/routes/conversations-search.js.map +1 -0
- package/dist/src/server/routes/enqueue.d.ts +11 -0
- package/dist/src/server/routes/enqueue.d.ts.map +1 -0
- package/dist/src/server/routes/enqueue.js +17 -0
- package/dist/src/server/routes/enqueue.js.map +1 -0
- package/dist/src/server/routes/friend-status.d.ts +481 -0
- package/dist/src/server/routes/friend-status.d.ts.map +1 -0
- package/dist/src/server/routes/friend-status.js +675 -0
- package/dist/src/server/routes/friend-status.js.map +1 -0
- package/dist/src/server/routes/ingest.d.ts +15 -0
- package/dist/src/server/routes/ingest.d.ts.map +1 -0
- package/dist/src/server/routes/ingest.js +142 -0
- package/dist/src/server/routes/ingest.js.map +1 -0
- package/dist/src/server/routes/jobs.d.ts +10 -0
- package/dist/src/server/routes/jobs.d.ts.map +1 -0
- package/dist/src/server/routes/jobs.js +29 -0
- package/dist/src/server/routes/jobs.js.map +1 -0
- package/dist/src/server/routes/mcp-usage.d.ts +17 -0
- package/dist/src/server/routes/mcp-usage.d.ts.map +1 -0
- package/dist/src/server/routes/mcp-usage.js +17 -0
- package/dist/src/server/routes/mcp-usage.js.map +1 -0
- package/dist/src/server/routes/reconcile.d.ts +4 -0
- package/dist/src/server/routes/reconcile.d.ts.map +1 -0
- package/dist/src/server/routes/reconcile.js +62 -0
- package/dist/src/server/routes/reconcile.js.map +1 -0
- package/dist/src/server/routes/reindex.d.ts +4 -0
- package/dist/src/server/routes/reindex.d.ts.map +1 -0
- package/dist/src/server/routes/reindex.js +77 -0
- package/dist/src/server/routes/reindex.js.map +1 -0
- package/dist/src/server/routes/retrieval-feedback.d.ts +3 -0
- package/dist/src/server/routes/retrieval-feedback.d.ts.map +1 -0
- package/dist/src/server/routes/retrieval-feedback.js +290 -0
- package/dist/src/server/routes/retrieval-feedback.js.map +1 -0
- package/dist/src/server/routes/save.d.ts +52 -0
- package/dist/src/server/routes/save.d.ts.map +1 -0
- package/dist/src/server/routes/save.js +127 -0
- package/dist/src/server/routes/save.js.map +1 -0
- package/dist/src/server/routes/search.d.ts +5 -0
- package/dist/src/server/routes/search.d.ts.map +1 -0
- package/dist/src/server/routes/search.js +689 -0
- package/dist/src/server/routes/search.js.map +1 -0
- package/dist/src/server/routes/setup.d.ts +46 -0
- package/dist/src/server/routes/setup.d.ts.map +1 -0
- package/dist/src/server/routes/setup.js +322 -0
- package/dist/src/server/routes/setup.js.map +1 -0
- package/dist/src/server/routes/stats.d.ts +10 -0
- package/dist/src/server/routes/stats.d.ts.map +1 -0
- package/dist/src/server/routes/stats.js +15 -0
- package/dist/src/server/routes/stats.js.map +1 -0
- package/dist/src/server/routes/status.d.ts +20 -0
- package/dist/src/server/routes/status.d.ts.map +1 -0
- package/dist/src/server/routes/status.js +31 -0
- package/dist/src/server/routes/status.js.map +1 -0
- package/dist/src/server/routes/triage.d.ts +4 -0
- package/dist/src/server/routes/triage.d.ts.map +1 -0
- package/dist/src/server/routes/triage.js +97 -0
- package/dist/src/server/routes/triage.js.map +1 -0
- package/dist/src/server/save-quality.d.ts +21 -0
- package/dist/src/server/save-quality.d.ts.map +1 -0
- package/dist/src/server/save-quality.js +51 -0
- package/dist/src/server/save-quality.js.map +1 -0
- package/dist/src/server/serving-marker.d.ts +85 -0
- package/dist/src/server/serving-marker.d.ts.map +1 -0
- package/dist/src/server/serving-marker.js +226 -0
- package/dist/src/server/serving-marker.js.map +1 -0
- package/dist/src/storage/atomic.d.ts +8 -0
- package/dist/src/storage/atomic.d.ts.map +1 -0
- package/dist/src/storage/atomic.js +22 -0
- package/dist/src/storage/atomic.js.map +1 -0
- package/dist/src/storage/chunk-backfill.d.ts +39 -0
- package/dist/src/storage/chunk-backfill.d.ts.map +1 -0
- package/dist/src/storage/chunk-backfill.js +295 -0
- package/dist/src/storage/chunk-backfill.js.map +1 -0
- package/dist/src/storage/db.d.ts +15 -0
- package/dist/src/storage/db.d.ts.map +1 -0
- package/dist/src/storage/db.js +47 -0
- package/dist/src/storage/db.js.map +1 -0
- package/dist/src/storage/filter.d.ts +42 -0
- package/dist/src/storage/filter.d.ts.map +1 -0
- package/dist/src/storage/filter.js +70 -0
- package/dist/src/storage/filter.js.map +1 -0
- package/dist/src/storage/fts.d.ts +47 -0
- package/dist/src/storage/fts.d.ts.map +1 -0
- package/dist/src/storage/fts.js +86 -0
- package/dist/src/storage/fts.js.map +1 -0
- package/dist/src/storage/integrity.d.ts +11 -0
- package/dist/src/storage/integrity.d.ts.map +1 -0
- package/dist/src/storage/integrity.js +66 -0
- package/dist/src/storage/integrity.js.map +1 -0
- package/dist/src/storage/maintenance.d.ts +27 -0
- package/dist/src/storage/maintenance.d.ts.map +1 -0
- package/dist/src/storage/maintenance.js +66 -0
- package/dist/src/storage/maintenance.js.map +1 -0
- package/dist/src/storage/rebuild.d.ts +71 -0
- package/dist/src/storage/rebuild.d.ts.map +1 -0
- package/dist/src/storage/rebuild.js +605 -0
- package/dist/src/storage/rebuild.js.map +1 -0
- package/dist/src/storage/report-card-backfill.d.ts +20 -0
- package/dist/src/storage/report-card-backfill.d.ts.map +1 -0
- package/dist/src/storage/report-card-backfill.js +114 -0
- package/dist/src/storage/report-card-backfill.js.map +1 -0
- package/dist/src/storage/shadow-swap.d.ts +20 -0
- package/dist/src/storage/shadow-swap.d.ts.map +1 -0
- package/dist/src/storage/shadow-swap.js +163 -0
- package/dist/src/storage/shadow-swap.js.map +1 -0
- package/dist/src/storage/tables.d.ts +147 -0
- package/dist/src/storage/tables.d.ts.map +1 -0
- package/dist/src/storage/tables.js +290 -0
- package/dist/src/storage/tables.js.map +1 -0
- package/operator/swiftbar/render-menu.py +475 -0
- package/operator/swiftbar/rift.10s.sh +201 -0
- package/package.json +57 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /triage route — Slice 5.
|
|
3
|
+
*
|
|
4
|
+
* Submits a batch of conversation contents for triage. The handler runs
|
|
5
|
+
* the locked OpenAI provider with per-batch cost cap and parallelism.
|
|
6
|
+
* Async: returns 202 Accepted with { job_id }.
|
|
7
|
+
*
|
|
8
|
+
* Triage is non-exclusive — it doesn't pause watchers and can run
|
|
9
|
+
* alongside ingest/save.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
import { toJobStatusView } from "../../jobs/types.js";
|
|
13
|
+
import { enqueueJob } from "./enqueue.js";
|
|
14
|
+
import { HISTORICAL_BACKFILL_CAPABILITY_HEADER, HISTORICAL_BACKFILL_OVERRIDE_HEADER, INTERNAL_HISTORICAL_TRIAGE_CODEX_ROUTE, CODEX_CLI_OVERRIDE_PROVIDER, hasHistoricalBackfillCapability, isHistoricalTriageIdempotencyKey, } from "../../providers/operator-overrides.js";
|
|
15
|
+
const TriageItemSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
id: z.string().min(1),
|
|
18
|
+
content: z.string().min(1),
|
|
19
|
+
source: z.string().min(1).optional(),
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
const TriageRequestSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
items: z.array(TriageItemSchema).min(1).max(1000),
|
|
25
|
+
idempotency_key: z.string().optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
export function registerTriageRoute(server, queue, dataDir) {
|
|
29
|
+
const submitTriage = async (request, reply, providerOverride, requireHistoricalCapability = false) => {
|
|
30
|
+
const parsed = TriageRequestSchema.safeParse(request.body ?? {});
|
|
31
|
+
if (!parsed.success) {
|
|
32
|
+
return reply.code(400).send({
|
|
33
|
+
error: "validation_error",
|
|
34
|
+
details: parsed.error.issues,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (providerOverride === undefined &&
|
|
38
|
+
(request.headers[HISTORICAL_BACKFILL_OVERRIDE_HEADER] !== undefined ||
|
|
39
|
+
request.headers[HISTORICAL_BACKFILL_CAPABILITY_HEADER] !== undefined)) {
|
|
40
|
+
return reply.code(400).send({
|
|
41
|
+
error: "validation_error",
|
|
42
|
+
details: [
|
|
43
|
+
{
|
|
44
|
+
path: [
|
|
45
|
+
request.headers[HISTORICAL_BACKFILL_CAPABILITY_HEADER] !== undefined
|
|
46
|
+
? HISTORICAL_BACKFILL_CAPABILITY_HEADER
|
|
47
|
+
: HISTORICAL_BACKFILL_OVERRIDE_HEADER,
|
|
48
|
+
],
|
|
49
|
+
message: "Historical provider overrides are only allowed through the internal backfill route.",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (requireHistoricalCapability &&
|
|
55
|
+
!hasHistoricalBackfillCapability(dataDir, request.headers[HISTORICAL_BACKFILL_CAPABILITY_HEADER])) {
|
|
56
|
+
return reply.code(403).send({ error: "forbidden" });
|
|
57
|
+
}
|
|
58
|
+
if (requireHistoricalCapability &&
|
|
59
|
+
!isHistoricalTriageIdempotencyKey(parsed.data.idempotency_key)) {
|
|
60
|
+
return reply.code(400).send({
|
|
61
|
+
error: "validation_error",
|
|
62
|
+
details: [
|
|
63
|
+
{
|
|
64
|
+
path: ["idempotency_key"],
|
|
65
|
+
message: "Historical Codex triage requires a backfill triage idempotency key.",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const opts = {
|
|
71
|
+
payload: {
|
|
72
|
+
items: parsed.data.items,
|
|
73
|
+
...(providerOverride ? { provider_override: providerOverride } : {}),
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
if (parsed.data.idempotency_key !== undefined) {
|
|
77
|
+
opts.idempotency_key = parsed.data.idempotency_key;
|
|
78
|
+
}
|
|
79
|
+
const result = await enqueueJob(reply, queue, "triage", opts);
|
|
80
|
+
if (!result)
|
|
81
|
+
return;
|
|
82
|
+
if ("conflict" in result) {
|
|
83
|
+
return reply.code(409).send({ error: "conflict" });
|
|
84
|
+
}
|
|
85
|
+
if (result.duplicate) {
|
|
86
|
+
return reply.code(200).send({
|
|
87
|
+
job_id: result.job.id,
|
|
88
|
+
duplicate: true,
|
|
89
|
+
...toJobStatusView(result.job),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return reply.code(202).send({ job_id: result.job.id });
|
|
93
|
+
};
|
|
94
|
+
server.post("/triage", async (request, reply) => submitTriage(request, reply));
|
|
95
|
+
server.post(INTERNAL_HISTORICAL_TRIAGE_CODEX_ROUTE, async (request, reply) => submitTriage(request, reply, CODEX_CLI_OVERRIDE_PROVIDER, true));
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=triage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triage.js","sourceRoot":"","sources":["../../../../src/server/routes/triage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,qCAAqC,EACrC,mCAAmC,EACnC,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,EAC/B,gCAAgC,GAEjC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,mBAAmB,GAAG,CAAC;KAC1B,MAAM,CAAC;IACN,KAAK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CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBAC1B,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE;gBACrB,SAAS,EAAE,IAAI;gBACf,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC;aAC/B,CAAC,CAAC;QACL,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAC9C,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAC7B,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,sCAAsC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAC3E,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,2BAA2B,EAAE,IAAI,CAAC,CAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Save-quality grader — Slice 2.
|
|
3
|
+
*
|
|
4
|
+
* Pure function that scores an incoming save payload and returns a
|
|
5
|
+
* tier plus warnings. Never rejects: the goal is to nudge agents
|
|
6
|
+
* toward a useful shape, not to block saves. Warnings flow back in
|
|
7
|
+
* the 202 response so the caller sees immediate feedback.
|
|
8
|
+
*
|
|
9
|
+
* Tiers:
|
|
10
|
+
* - "thin" — summary-only; acceptable for trivial pings but low retrieval value.
|
|
11
|
+
* - "substantive" — has content; topically tagged or decision-bearing.
|
|
12
|
+
* - "rich" — content + topics + at least one of decisions/key_outputs.
|
|
13
|
+
*/
|
|
14
|
+
import type { SavePayload } from "./routes/save.js";
|
|
15
|
+
export type SaveTier = "thin" | "substantive" | "rich";
|
|
16
|
+
export interface SaveQualityReport {
|
|
17
|
+
tier: SaveTier;
|
|
18
|
+
warnings: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function gradeSavePayload(payload: SavePayload): SaveQualityReport;
|
|
21
|
+
//# sourceMappingURL=save-quality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-quality.d.ts","sourceRoot":"","sources":["../../../src/server/save-quality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAOD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,iBAAiB,CA6DxE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const SUMMARY_MIN = 10;
|
|
2
|
+
const SUMMARY_MAX = 1000;
|
|
3
|
+
const TOPIC_MAX = 40;
|
|
4
|
+
const SUBSTANTIVE_CONTENT_BYTES = 500;
|
|
5
|
+
export function gradeSavePayload(payload) {
|
|
6
|
+
const warnings = [];
|
|
7
|
+
const summary = payload.summary ?? "";
|
|
8
|
+
if (summary.length < SUMMARY_MIN) {
|
|
9
|
+
warnings.push(`summary too short (${summary.length} < ${SUMMARY_MIN} chars) — describe what was done, not just the topic`);
|
|
10
|
+
}
|
|
11
|
+
else if (summary.length > SUMMARY_MAX) {
|
|
12
|
+
warnings.push(`summary too long (${summary.length} > ${SUMMARY_MAX} chars) — put the transcript in content, keep summary one paragraph`);
|
|
13
|
+
}
|
|
14
|
+
const content = payload.content;
|
|
15
|
+
const contentBytes = content ? Buffer.byteLength(content, "utf-8") : 0;
|
|
16
|
+
const hasContent = contentBytes > 0;
|
|
17
|
+
const substantive = contentBytes >= SUBSTANTIVE_CONTENT_BYTES;
|
|
18
|
+
if (!hasContent) {
|
|
19
|
+
warnings.push("no content provided — summary-only saves have low retrieval value; send the full transcript when a session is substantive");
|
|
20
|
+
}
|
|
21
|
+
const topics = payload.topics ?? [];
|
|
22
|
+
if (substantive && topics.length === 0) {
|
|
23
|
+
warnings.push("substantive content without topics — add 1-5 short keywords so filtered search can find this");
|
|
24
|
+
}
|
|
25
|
+
for (const t of topics) {
|
|
26
|
+
if (t.length > TOPIC_MAX) {
|
|
27
|
+
warnings.push(`topic "${t.slice(0, TOPIC_MAX)}…" is too long (${t.length} chars) — topics should be short keywords, not sentences`);
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (!payload.idempotency_key) {
|
|
32
|
+
warnings.push("no idempotency_key provided — auto-derived from content hash; prefer an explicit key like <source>:<session-id>:<fingerprint> for cross-session replacement");
|
|
33
|
+
}
|
|
34
|
+
const decisions = payload.decisions ?? [];
|
|
35
|
+
const keyOutputs = payload.key_outputs ?? [];
|
|
36
|
+
let tier;
|
|
37
|
+
if (hasContent && topics.length > 0 && (decisions.length > 0 || keyOutputs.length > 0)) {
|
|
38
|
+
tier = "rich";
|
|
39
|
+
}
|
|
40
|
+
else if (hasContent && (topics.length > 0 || decisions.length > 0 || keyOutputs.length > 0)) {
|
|
41
|
+
tier = "substantive";
|
|
42
|
+
}
|
|
43
|
+
else if (hasContent) {
|
|
44
|
+
tier = "substantive";
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
tier = "thin";
|
|
48
|
+
}
|
|
49
|
+
return { tier, warnings };
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=save-quality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-quality.js","sourceRoot":"","sources":["../../../src/server/save-quality.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,yBAAyB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,CAAC,MAAM,0DAA0D,CACrH,CAAC;YACF,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;QAC7B,QAAQ,CAAC,IAAI,CACX,6JAA6J,CAC9J,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;IAC1C,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;IAE7C,IAAI,IAAc,CAAC;IACnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QACvF,IAAI,GAAG,MAAM,CAAC;IAChB,CAAC;SAAM,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9F,IAAI,GAAG,aAAa,CAAC;IACvB,CAAC;SAAM,IAAI,UAAU,EAAE,CAAC;QACtB,IAAI,GAAG,aAAa,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit capability flags. Capability booleans — not a commit/version string —
|
|
3
|
+
* are the contract: `package.json` still reads `beta.21` on chunk-aware `main`,
|
|
4
|
+
* so a version string cannot distinguish builds. Each build declares what IT can
|
|
5
|
+
* do; a future build that drops a capability flips the flag rather than relying
|
|
6
|
+
* on commit-ancestry math.
|
|
7
|
+
*/
|
|
8
|
+
export interface ServingCapabilities {
|
|
9
|
+
/** The conversation tables carry `parent_id`/`chunk_index`/`chunk_count`. */
|
|
10
|
+
conversation_chunk_columns: boolean;
|
|
11
|
+
/** Retrieval reassembles chunk sets on the expand path (`detail="full"`). */
|
|
12
|
+
expand_stitching: boolean;
|
|
13
|
+
/** Safe for `chunk-backfill` to write a chunk-column conversation set here. */
|
|
14
|
+
chunk_backfill_write_compatible: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ServingMarker {
|
|
17
|
+
version: string;
|
|
18
|
+
commit: string;
|
|
19
|
+
booted_at: string;
|
|
20
|
+
capabilities: ServingCapabilities;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Capabilities of THIS build. All true: this code defines the chunk columns in
|
|
24
|
+
* the conversation seed/migration, reassembles chunk sets on expand, and writes
|
|
25
|
+
* chunk-column sets coherently. A future build that regresses any of these must
|
|
26
|
+
* set the corresponding flag false.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CURRENT_SERVING_CAPABILITIES: ServingCapabilities;
|
|
29
|
+
/** Path of the marker within a data dir (under `observability/`, daemon-owned). */
|
|
30
|
+
export declare function servingMarkerPath(dataDir: string): string;
|
|
31
|
+
/** Assemble the marker for this build at boot time. */
|
|
32
|
+
export declare function buildServingMarker(bootedAt: string): ServingMarker;
|
|
33
|
+
/**
|
|
34
|
+
* Stamp the serving-build marker into the data dir. Atomic (write-temp +
|
|
35
|
+
* rename) so a crash mid-write never leaves a half-written marker that would
|
|
36
|
+
* read as malformed → refused. Best-effort: any failure is logged and
|
|
37
|
+
* swallowed so it can never break daemon boot.
|
|
38
|
+
*
|
|
39
|
+
* MUST be called only from the serving daemon boot path, never from a CLI tool.
|
|
40
|
+
*/
|
|
41
|
+
export declare function writeServingMarker(dataDir: string, bootedAt?: string): void;
|
|
42
|
+
/** Read the marker. Returns null if absent, unreadable, or malformed. */
|
|
43
|
+
export declare function readServingMarker(dataDir: string): ServingMarker | null;
|
|
44
|
+
export interface CompatibilityVerdict {
|
|
45
|
+
ok: boolean;
|
|
46
|
+
/** Operator-facing reason when `ok` is false. */
|
|
47
|
+
reason: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Maximum age of a serving-build marker the write guard will trust (24h). The
|
|
51
|
+
* marker certifies a RECENT boot, not an ancient one — see the downgrade note in
|
|
52
|
+
* the file header. The backfill tool requires the daemon stopped, so the owner
|
|
53
|
+
* naturally does a boot→stop cycle right before backfilling; that boot re-stamps
|
|
54
|
+
* the marker fresh. A window of a day gives slack ("booted this morning, backfill
|
|
55
|
+
* this evening") while still rejecting a months-old, possibly downgrade-era
|
|
56
|
+
* marker. Small future clock skew is tolerated up to {@link MAX_FUTURE_SKEW_MS}.
|
|
57
|
+
*/
|
|
58
|
+
export declare const MAX_MARKER_AGE_MS: number;
|
|
59
|
+
/** Clock-skew slack for a marker dated slightly in the future (5 min). */
|
|
60
|
+
export declare const MAX_FUTURE_SKEW_MS: number;
|
|
61
|
+
/**
|
|
62
|
+
* Decide whether a destructive `chunk-backfill` WRITE is safe against the
|
|
63
|
+
* install that serves `dataDir`. Refuses unless the serving daemon has stamped
|
|
64
|
+
* a well-formed, RECENT marker in which EVERY capability in
|
|
65
|
+
* {@link REQUIRED_WRITE_CAPABILITIES} is true.
|
|
66
|
+
*
|
|
67
|
+
* Refusal cases:
|
|
68
|
+
* - Absent/malformed marker: a pre-chunk daemon never writes one, so we cannot
|
|
69
|
+
* prove the install that restarts after the write can serve chunk rows.
|
|
70
|
+
* - Unparseable `booted_at`: a marker without a real boot time cannot prove
|
|
71
|
+
* freshness, so it is treated as malformed.
|
|
72
|
+
* - Missing capability: the serving build self-declares it cannot serve a
|
|
73
|
+
* chunk-column set.
|
|
74
|
+
* - Stale `booted_at` (older than `maxAgeMs`): proves only that SOME chunk-aware
|
|
75
|
+
* daemon booted this dir long ago, not that the CURRENT install is chunk-aware
|
|
76
|
+
* (closes the silent-downgrade gap — see file header).
|
|
77
|
+
*
|
|
78
|
+
* `now`/`maxAgeMs` are injectable for deterministic tests; production callers use
|
|
79
|
+
* the wall clock and {@link MAX_MARKER_AGE_MS}.
|
|
80
|
+
*/
|
|
81
|
+
export declare function assertChunkBackfillWriteCompatible(dataDir: string, opts?: {
|
|
82
|
+
now?: Date;
|
|
83
|
+
maxAgeMs?: number;
|
|
84
|
+
}): CompatibilityVerdict;
|
|
85
|
+
//# sourceMappingURL=serving-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serving-marker.d.ts","sourceRoot":"","sources":["../../../src/server/serving-marker.ts"],"names":[],"mappings":"AA8CA;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,0BAA0B,EAAE,OAAO,CAAC;IACpC,6EAA6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,+BAA+B,EAAE,OAAO,CAAC;CAC1C;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAAE,mBAI1C,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,uDAAuD;AACvD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAQlE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,MAAiC,GAC1C,IAAI,CAcN;AAsBD,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAQvE;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;CAChB;AAgBD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAC;AAErD,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,QAAgB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EACf,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAC3C,oBAAoB,CAoEtB"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serving-build capability marker.
|
|
3
|
+
*
|
|
4
|
+
* The serving daemon stamps a small JSON marker into the data dir on every
|
|
5
|
+
* boot, recording WHICH code last served this data dir and what that code is
|
|
6
|
+
* capable of. This is the contract that lets an OFFLINE tool — one that runs
|
|
7
|
+
* with the daemon stopped, so it cannot probe `GET /version` — decide whether a
|
|
8
|
+
* destructive, schema-touching operation is safe against the install that will
|
|
9
|
+
* restart and serve this dir.
|
|
10
|
+
*
|
|
11
|
+
* Why a capability marker and not the obvious alternatives:
|
|
12
|
+
* - On-disk table schema is the very thing that gets accidentally mutated
|
|
13
|
+
* (the chunk-backfill `--dry-run` incident added the chunk columns to a
|
|
14
|
+
* pre-chunk dir), so the schema cannot certify the serving code.
|
|
15
|
+
* - Observability events are an indirect history signal — they tell you what
|
|
16
|
+
* happened, not what the currently-installed code can do.
|
|
17
|
+
* - `RIFT_CHUNKING` gates whether NEW conversations are split, not whether the
|
|
18
|
+
* permanent chunk columns / expand read path exist in the serving build.
|
|
19
|
+
* Only a marker written BY the serving build answers the question we actually
|
|
20
|
+
* care about: "what code last served this dir, and can it handle a
|
|
21
|
+
* chunk-backfill write?".
|
|
22
|
+
*
|
|
23
|
+
* Discipline:
|
|
24
|
+
* - Written ONLY by the serving daemon (never by CLI tools). A CLI tool that
|
|
25
|
+
* stamped the marker would be certifying itself, defeating the purpose.
|
|
26
|
+
* - Best-effort and non-fatal — a failed marker write must never break boot.
|
|
27
|
+
* - Absent / unknown / malformed is treated by the write guard as "cannot
|
|
28
|
+
* confirm compatible → refuse". A pre-chunk daemon (e.g. beta.21) never
|
|
29
|
+
* writes the marker, so it always reads as absent → refused.
|
|
30
|
+
* - STALE markers are refused too (freshness window, see
|
|
31
|
+
* {@link MAX_MARKER_AGE_MS}). A marker proves "a chunk-aware daemon booted
|
|
32
|
+
* this dir RECENTLY", not "a chunk-aware daemon booted this dir once, ever".
|
|
33
|
+
* This closes the downgrade gap: if a chunk-aware daemon stamps a marker and
|
|
34
|
+
* a pre-chunk daemon (beta.21) later serves the same dir, beta.21 neither
|
|
35
|
+
* overwrites nor removes the stale chunk-aware marker — so without a
|
|
36
|
+
* freshness check the offline write guard would still pass against an install
|
|
37
|
+
* that can no longer serve chunk rows. Requiring a recent boot means the
|
|
38
|
+
* owner must (re)boot the chunk-aware daemon immediately before backfilling,
|
|
39
|
+
* which re-stamps the marker with the CURRENT install's real capabilities.
|
|
40
|
+
* Daemon DOWNGRADE (chunk-aware → pre-chunk) after a marker write is
|
|
41
|
+
* otherwise unsupported in this owner-only phase.
|
|
42
|
+
*/
|
|
43
|
+
import fs from "node:fs";
|
|
44
|
+
import path from "node:path";
|
|
45
|
+
import { getBuildInfo } from "./build-info.js";
|
|
46
|
+
/**
|
|
47
|
+
* Capabilities of THIS build. All true: this code defines the chunk columns in
|
|
48
|
+
* the conversation seed/migration, reassembles chunk sets on expand, and writes
|
|
49
|
+
* chunk-column sets coherently. A future build that regresses any of these must
|
|
50
|
+
* set the corresponding flag false.
|
|
51
|
+
*/
|
|
52
|
+
export const CURRENT_SERVING_CAPABILITIES = {
|
|
53
|
+
conversation_chunk_columns: true,
|
|
54
|
+
expand_stitching: true,
|
|
55
|
+
chunk_backfill_write_compatible: true,
|
|
56
|
+
};
|
|
57
|
+
/** Path of the marker within a data dir (under `observability/`, daemon-owned). */
|
|
58
|
+
export function servingMarkerPath(dataDir) {
|
|
59
|
+
return path.join(dataDir, "observability", "serving-build.json");
|
|
60
|
+
}
|
|
61
|
+
/** Assemble the marker for this build at boot time. */
|
|
62
|
+
export function buildServingMarker(bootedAt) {
|
|
63
|
+
const info = getBuildInfo();
|
|
64
|
+
return {
|
|
65
|
+
version: info.version,
|
|
66
|
+
commit: info.commit,
|
|
67
|
+
booted_at: bootedAt,
|
|
68
|
+
capabilities: { ...CURRENT_SERVING_CAPABILITIES },
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Stamp the serving-build marker into the data dir. Atomic (write-temp +
|
|
73
|
+
* rename) so a crash mid-write never leaves a half-written marker that would
|
|
74
|
+
* read as malformed → refused. Best-effort: any failure is logged and
|
|
75
|
+
* swallowed so it can never break daemon boot.
|
|
76
|
+
*
|
|
77
|
+
* MUST be called only from the serving daemon boot path, never from a CLI tool.
|
|
78
|
+
*/
|
|
79
|
+
export function writeServingMarker(dataDir, bootedAt = new Date().toISOString()) {
|
|
80
|
+
try {
|
|
81
|
+
const target = servingMarkerPath(dataDir);
|
|
82
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
83
|
+
const tmp = `${target}.tmp-${process.pid}`;
|
|
84
|
+
fs.writeFileSync(tmp, `${JSON.stringify(buildServingMarker(bootedAt), null, 2)}\n`);
|
|
85
|
+
fs.renameSync(tmp, target);
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
process.stderr.write(`serving-marker: failed to write (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function isServingMarker(v) {
|
|
92
|
+
if (!v || typeof v !== "object")
|
|
93
|
+
return false;
|
|
94
|
+
const m = v;
|
|
95
|
+
if (typeof m.version !== "string" ||
|
|
96
|
+
typeof m.commit !== "string" ||
|
|
97
|
+
typeof m.booted_at !== "string") {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
const c = m.capabilities;
|
|
101
|
+
if (!c || typeof c !== "object")
|
|
102
|
+
return false;
|
|
103
|
+
const caps = c;
|
|
104
|
+
return (typeof caps.conversation_chunk_columns === "boolean" &&
|
|
105
|
+
typeof caps.expand_stitching === "boolean" &&
|
|
106
|
+
typeof caps.chunk_backfill_write_compatible === "boolean");
|
|
107
|
+
}
|
|
108
|
+
/** Read the marker. Returns null if absent, unreadable, or malformed. */
|
|
109
|
+
export function readServingMarker(dataDir) {
|
|
110
|
+
try {
|
|
111
|
+
const raw = fs.readFileSync(servingMarkerPath(dataDir), "utf8");
|
|
112
|
+
const parsed = JSON.parse(raw);
|
|
113
|
+
return isServingMarker(parsed) ? parsed : null;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Every capability a chunk-backfill WRITE depends on. The write doesn't just
|
|
121
|
+
* need a serving build that *tolerates* a chunk-column write — it needs one that
|
|
122
|
+
* has the columns (`conversation_chunk_columns`), reassembles the sets it writes
|
|
123
|
+
* on the read path (`expand_stitching`), AND self-certifies the write as safe
|
|
124
|
+
* (`chunk_backfill_write_compatible`). A build that regresses ANY of these would
|
|
125
|
+
* serve the backfilled corpus incorrectly, so all must be true.
|
|
126
|
+
*/
|
|
127
|
+
const REQUIRED_WRITE_CAPABILITIES = [
|
|
128
|
+
"conversation_chunk_columns",
|
|
129
|
+
"expand_stitching",
|
|
130
|
+
"chunk_backfill_write_compatible",
|
|
131
|
+
];
|
|
132
|
+
/**
|
|
133
|
+
* Maximum age of a serving-build marker the write guard will trust (24h). The
|
|
134
|
+
* marker certifies a RECENT boot, not an ancient one — see the downgrade note in
|
|
135
|
+
* the file header. The backfill tool requires the daemon stopped, so the owner
|
|
136
|
+
* naturally does a boot→stop cycle right before backfilling; that boot re-stamps
|
|
137
|
+
* the marker fresh. A window of a day gives slack ("booted this morning, backfill
|
|
138
|
+
* this evening") while still rejecting a months-old, possibly downgrade-era
|
|
139
|
+
* marker. Small future clock skew is tolerated up to {@link MAX_FUTURE_SKEW_MS}.
|
|
140
|
+
*/
|
|
141
|
+
export const MAX_MARKER_AGE_MS = 24 * 60 * 60 * 1000;
|
|
142
|
+
/** Clock-skew slack for a marker dated slightly in the future (5 min). */
|
|
143
|
+
export const MAX_FUTURE_SKEW_MS = 5 * 60 * 1000;
|
|
144
|
+
/**
|
|
145
|
+
* Decide whether a destructive `chunk-backfill` WRITE is safe against the
|
|
146
|
+
* install that serves `dataDir`. Refuses unless the serving daemon has stamped
|
|
147
|
+
* a well-formed, RECENT marker in which EVERY capability in
|
|
148
|
+
* {@link REQUIRED_WRITE_CAPABILITIES} is true.
|
|
149
|
+
*
|
|
150
|
+
* Refusal cases:
|
|
151
|
+
* - Absent/malformed marker: a pre-chunk daemon never writes one, so we cannot
|
|
152
|
+
* prove the install that restarts after the write can serve chunk rows.
|
|
153
|
+
* - Unparseable `booted_at`: a marker without a real boot time cannot prove
|
|
154
|
+
* freshness, so it is treated as malformed.
|
|
155
|
+
* - Missing capability: the serving build self-declares it cannot serve a
|
|
156
|
+
* chunk-column set.
|
|
157
|
+
* - Stale `booted_at` (older than `maxAgeMs`): proves only that SOME chunk-aware
|
|
158
|
+
* daemon booted this dir long ago, not that the CURRENT install is chunk-aware
|
|
159
|
+
* (closes the silent-downgrade gap — see file header).
|
|
160
|
+
*
|
|
161
|
+
* `now`/`maxAgeMs` are injectable for deterministic tests; production callers use
|
|
162
|
+
* the wall clock and {@link MAX_MARKER_AGE_MS}.
|
|
163
|
+
*/
|
|
164
|
+
export function assertChunkBackfillWriteCompatible(dataDir, opts = {}) {
|
|
165
|
+
const now = opts.now ?? new Date();
|
|
166
|
+
const maxAgeMs = opts.maxAgeMs ?? MAX_MARKER_AGE_MS;
|
|
167
|
+
const marker = readServingMarker(dataDir);
|
|
168
|
+
if (!marker) {
|
|
169
|
+
return {
|
|
170
|
+
ok: false,
|
|
171
|
+
reason: `No serving-build marker at ${servingMarkerPath(dataDir)}. Cannot ` +
|
|
172
|
+
`confirm the install that serves this data dir is chunk-aware — a ` +
|
|
173
|
+
`pre-chunk daemon (e.g. beta.21) never writes this marker. Boot the ` +
|
|
174
|
+
`chunk-aware serving daemon on this dir first (it stamps the marker on ` +
|
|
175
|
+
`startup), or — if this is a DISPOSABLE COPY, never your live data dir — ` +
|
|
176
|
+
`re-run with --allow-uncertified-copy to override.`,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
const missing = REQUIRED_WRITE_CAPABILITIES.filter((cap) => !marker.capabilities[cap]);
|
|
180
|
+
if (missing.length > 0) {
|
|
181
|
+
return {
|
|
182
|
+
ok: false,
|
|
183
|
+
reason: `Serving-build marker (version ${marker.version}, commit ` +
|
|
184
|
+
`${marker.commit.slice(0, 12)}) is missing required capabilities: ` +
|
|
185
|
+
`${missing.map((c) => `${c}=false`).join(", ")} — the serving install ` +
|
|
186
|
+
`cannot safely serve a chunk-column conversation set. Upgrade the ` +
|
|
187
|
+
`serving daemon before backfilling.`,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
const bootedMs = Date.parse(marker.booted_at);
|
|
191
|
+
if (Number.isNaN(bootedMs)) {
|
|
192
|
+
return {
|
|
193
|
+
ok: false,
|
|
194
|
+
reason: `Serving-build marker has an invalid booted_at ("${marker.booted_at}") ` +
|
|
195
|
+
`— cannot prove the chunk-aware daemon booted recently. Reboot the ` +
|
|
196
|
+
`chunk-aware serving daemon on this dir to re-stamp the marker.`,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const ageMs = now.getTime() - bootedMs;
|
|
200
|
+
if (ageMs > maxAgeMs) {
|
|
201
|
+
const ageHours = Math.round(ageMs / 3_600_000);
|
|
202
|
+
const maxHours = Math.round(maxAgeMs / 3_600_000);
|
|
203
|
+
return {
|
|
204
|
+
ok: false,
|
|
205
|
+
reason: `Serving-build marker is stale (booted_at ${marker.booted_at}, ~${ageHours}h ` +
|
|
206
|
+
`old > ${maxHours}h freshness window). A stale marker only proves a ` +
|
|
207
|
+
`chunk-aware daemon booted this dir long ago — not that the CURRENT ` +
|
|
208
|
+
`install is chunk-aware (a since-downgraded daemon leaves the old marker ` +
|
|
209
|
+
`in place). (Re)boot the chunk-aware serving daemon on this dir ` +
|
|
210
|
+
`immediately before backfilling to re-stamp the marker, or — if this is ` +
|
|
211
|
+
`a DISPOSABLE COPY, never your live data dir — re-run with ` +
|
|
212
|
+
`--allow-uncertified-copy to override.`,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
if (ageMs < -MAX_FUTURE_SKEW_MS) {
|
|
216
|
+
return {
|
|
217
|
+
ok: false,
|
|
218
|
+
reason: `Serving-build marker is dated in the future (booted_at ` +
|
|
219
|
+
`${marker.booted_at}) beyond tolerated clock skew — refusing rather than ` +
|
|
220
|
+
`trusting a marker that may have been hand-edited. Reboot the chunk-aware ` +
|
|
221
|
+
`serving daemon on this dir to re-stamp the marker.`,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
return { ok: true, reason: "" };
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=serving-marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serving-marker.js","sourceRoot":"","sources":["../../../src/server/serving-marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAyB/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAwB;IAC/D,0BAA0B,EAAE,IAAI;IAChC,gBAAgB,EAAE,IAAI;IACtB,+BAA+B,EAAE,IAAI;CACtC,CAAC;AAEF,mFAAmF;AACnF,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC;AACnE,CAAC;AAED,u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AmD,MAAM,CAAC,SAAS,KAAK;gBACxE,oEAAoE;gBACpE,gEAAgE;SACnE,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC;IACvC,IAAI,KAAK,GAAG,QAAQ,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;QAClD,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EACJ,4CAA4C,MAAM,CAAC,SAAS,MAAM,QAAQ,IAAI;gBAC9E,SAAS,QAAQ,oDAAoD;gBACrE,qEAAqE;gBACrE,0EAA0E;gBAC1E,iEAAiE;gBACjE,yEAAyE;gBACzE,4DAA4D;gBAC5D,uCAAuC;SAC1C,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,kBAAkB,EAAE,CAAC;QAChC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EACJ,yDAAyD;gBACzD,GAAG,MAAM,CAAC,SAAS,uDAAuD;gBAC1E,2EAA2E;gBAC3E,oDAAoD;SACvD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomically write `data` to `filePath`.
|
|
3
|
+
*
|
|
4
|
+
* 1. Writes to `${filePath}.tmp.${pid}`
|
|
5
|
+
* 2. Renames temp -> target (atomic on same filesystem)
|
|
6
|
+
*/
|
|
7
|
+
export declare function atomicWrite(filePath: string, data: string): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=atomic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic.d.ts","sourceRoot":"","sources":["../../../src/storage/atomic.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atomic file write: write to temp, then rename.
|
|
3
|
+
*
|
|
4
|
+
* If the process crashes mid-write, only the temp file is corrupted —
|
|
5
|
+
* the target path either has the old content or the new content, never partial.
|
|
6
|
+
*/
|
|
7
|
+
import fs from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
/**
|
|
10
|
+
* Atomically write `data` to `filePath`.
|
|
11
|
+
*
|
|
12
|
+
* 1. Writes to `${filePath}.tmp.${pid}`
|
|
13
|
+
* 2. Renames temp -> target (atomic on same filesystem)
|
|
14
|
+
*/
|
|
15
|
+
export async function atomicWrite(filePath, data) {
|
|
16
|
+
const dir = path.dirname(filePath);
|
|
17
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
18
|
+
const tmp = `${filePath}.tmp.${process.pid}`;
|
|
19
|
+
fs.writeFileSync(tmp, data, "utf-8");
|
|
20
|
+
fs.renameSync(tmp, filePath);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=atomic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic.js","sourceRoot":"","sources":["../../../src/storage/atomic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAgB,EAAE,IAAY;IAC9D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,MAAM,GAAG,GAAG,GAAG,QAAQ,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC;IAC7C,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { EmbeddingProvider } from "../providers/types.js";
|
|
2
|
+
export interface ChunkBackfillOptions {
|
|
3
|
+
embedding: EmbeddingProvider;
|
|
4
|
+
dataDir: string;
|
|
5
|
+
/** Report what would change without embedding or writing anything. */
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
/** Stop after this many conversations have been (re)chunked. 0/undefined = no cap. */
|
|
8
|
+
limit?: number;
|
|
9
|
+
/** Sleep this many ms between conversations to spare the embedding API. */
|
|
10
|
+
throttleMs?: number;
|
|
11
|
+
/** Cooperative cancel — checked between conversations (Ctrl-C safe). */
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
/** Progress sink (one line per meaningful event). */
|
|
14
|
+
log?: (msg: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface ChunkBackfillSummary {
|
|
17
|
+
/** Distinct conversations examined (most-recent raw per id). */
|
|
18
|
+
scanned: number;
|
|
19
|
+
/** Conversations split into a multi-chunk set this run (or that would be, in dryRun). */
|
|
20
|
+
rechunked: number;
|
|
21
|
+
/** Conversations already in the desired multi-chunk shape — skipped. */
|
|
22
|
+
alreadyChunked: number;
|
|
23
|
+
/** Conversations short enough to stay a single unmarked row — skipped. */
|
|
24
|
+
singleChunk: number;
|
|
25
|
+
/** Raw artifacts with no matching indexed row — skipped (not resurrected). */
|
|
26
|
+
orphaned: number;
|
|
27
|
+
/** Raw artifacts that could not be read/parsed — skipped. */
|
|
28
|
+
errored: number;
|
|
29
|
+
/** True if an abort signal stopped the run before all conversations were seen. */
|
|
30
|
+
aborted: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Re-chunk historical conversations from raw into chunk sets. Returns a summary
|
|
34
|
+
* of what changed. Idempotent: a conversation already in its desired shape (a
|
|
35
|
+
* complete set of the right count, or a single unmarked row for a short
|
|
36
|
+
* conversation) is skipped, so re-running only touches the remainder.
|
|
37
|
+
*/
|
|
38
|
+
export declare function backfillConversationChunks(opts: ChunkBackfillOptions): Promise<ChunkBackfillSummary>;
|
|
39
|
+
//# sourceMappingURL=chunk-backfill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-backfill.d.ts","sourceRoot":"","sources":["../../../src/storage/chunk-backfill.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA0B/D,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qDAAqD;IACrD,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;CAClB;AAyGD;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,oBAAoB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAuH/B"}
|