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,689 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /search route — Slice 7: hybrid retrieval + reranking + degraded mode.
|
|
3
|
+
*
|
|
4
|
+
* Zod-validated request body per PRD Section 4.
|
|
5
|
+
* Uses hybrid (vector + lexical) retrieval with deterministic reranking.
|
|
6
|
+
* Implicit cold-tier fallback when top results score < 0.4.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { hybridSearch } from "../../retrieval/hybrid.js";
|
|
10
|
+
import { rerank } from "../../retrieval/reranker.js";
|
|
11
|
+
import { lexicalSearch, lexicalSearchTables } from "../../retrieval/lexical.js";
|
|
12
|
+
import { isRiftBasicMetadata } from "../../providers/basic-metadata-extraction.js";
|
|
13
|
+
import { RIFT_NONE_VECTOR_EXCLUSION_CLAUSE } from "../../providers/placeholder-embed.js";
|
|
14
|
+
import { getTable, TABLE_NAMES } from "../../storage/tables.js";
|
|
15
|
+
import { resolveCwdRoot, escapeLike } from "../../retrieval/cwd.js";
|
|
16
|
+
import { demoteReports, fetchDocSourcePaths, fetchDocFields, isReportCandidateTable, } from "../../retrieval/report-demotion.js";
|
|
17
|
+
import { applyLocatorBoost, isLocatorTarget, locatorIntentFired, } from "../../retrieval/locator-boost.js";
|
|
18
|
+
import { applyFeedbackRanking, feedbackRankingEnabled, } from "../../retrieval/feedback-ranking.js";
|
|
19
|
+
import { buildCompactHit, buildExpandedHit, fetchParentKeysForRanked, fetchRawRowsForRanked, fetchRowByIdForTier, fetchRowsByIdAcrossTables, fetchRowsByIdInTables, tablesForTier, } from "../../retrieval/compact.js";
|
|
20
|
+
import { groupByParent, rankedKey } from "../../retrieval/group-by-parent.js";
|
|
21
|
+
import { collapseConversationDuplicates, convDedupEnabled, poolHasChunkMarkers, } from "../../retrieval/conversation-dedup.js";
|
|
22
|
+
const COLD_TIER_THRESHOLD = 0.4;
|
|
23
|
+
const TIER_VALUES = ["hot", "cold", "digest", "document", "structured_doc"];
|
|
24
|
+
/**
|
|
25
|
+
* /search request schema.
|
|
26
|
+
*
|
|
27
|
+
* Two modes:
|
|
28
|
+
* - Retrieval mode: `query` is required. Runs hybrid search + rerank.
|
|
29
|
+
* - Exact-ID mode: `detail` of `"full"` or `"middle"` + `id` — skips
|
|
30
|
+
* retrieval entirely and fetches the row by id. Trust contract: this
|
|
31
|
+
* never silently falls back to ranked search. With `tier` (and optionally
|
|
32
|
+
* `source_table`) the lookup is scoped to the backing table(s); without
|
|
33
|
+
* `tier`, the route scans every supported table and returns either the
|
|
34
|
+
* unique match, an explicit `id_not_found`, or an explicit `ambiguous_id`
|
|
35
|
+
* error. `detail="middle"` returns the same exact-row response shape with
|
|
36
|
+
* a bounded head+tail excerpt instead of the full body — preserves the
|
|
37
|
+
* evidence bookends a fact-checker needs while bounding context spend.
|
|
38
|
+
*
|
|
39
|
+
* `query` becomes optional in exact-ID mode. If both `query` and `id` are
|
|
40
|
+
* provided with a non-"summary" detail, the id wins — ranked retrieval is
|
|
41
|
+
* never run as a fallback. This is by design after the REX where a caller
|
|
42
|
+
* passed `query + id + detail="full"` and got a wrong-body response.
|
|
43
|
+
*/
|
|
44
|
+
const SearchRequestSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
query: z.string().min(1).optional(),
|
|
47
|
+
// Opt-in native reader positions keep the compact agent payload stable.
|
|
48
|
+
include_passage: z.boolean().default(false),
|
|
49
|
+
scope: z
|
|
50
|
+
.enum(["all", "clients", "projects", "conversations", "documents"])
|
|
51
|
+
.default("all"),
|
|
52
|
+
client: z.string().optional(),
|
|
53
|
+
since: z.string().datetime().optional(),
|
|
54
|
+
top_k: z.number().int().positive().default(10),
|
|
55
|
+
cwd: z.string().optional(),
|
|
56
|
+
detail: z.enum(["summary", "middle", "full"]).default("summary"),
|
|
57
|
+
/** With detail="middle"|"full", expand a single hit by id (bypasses ranking). */
|
|
58
|
+
id: z.string().optional(),
|
|
59
|
+
/** Tier of the id being expanded. Optional — narrows the lookup. */
|
|
60
|
+
tier: z.enum(TIER_VALUES).optional(),
|
|
61
|
+
/**
|
|
62
|
+
* Authoritative backing table for the id. When provided, disambiguates
|
|
63
|
+
* rows that share an id across the cloud/local structured-doc tables.
|
|
64
|
+
* Optional — absent requests scan every supported table.
|
|
65
|
+
*/
|
|
66
|
+
source_table: z.enum(TABLE_NAMES).optional(),
|
|
67
|
+
})
|
|
68
|
+
.refine((d) => !!d.query || ((d.detail === "full" || d.detail === "middle") && !!d.id), {
|
|
69
|
+
message: 'Either `query` is required, or provide `id` + `detail="full"` (or `detail="middle"`) for direct lookup.',
|
|
70
|
+
})
|
|
71
|
+
.refine((d) => {
|
|
72
|
+
// If both tier and source_table are provided in expansion mode, the
|
|
73
|
+
// source_table must be one the tier can legitimately resolve to.
|
|
74
|
+
// This catches callers that hand-craft pointers with inconsistent
|
|
75
|
+
// tier/source_table hints (e.g., tier=hot + source_table=digests).
|
|
76
|
+
if (!d.tier || !d.source_table)
|
|
77
|
+
return true;
|
|
78
|
+
const valid = {
|
|
79
|
+
hot: ["conversations_hot"],
|
|
80
|
+
cold: ["conversations_cold"],
|
|
81
|
+
digest: ["digests"],
|
|
82
|
+
document: ["structured_docs", "structured_docs_local"],
|
|
83
|
+
structured_doc: ["structured_docs", "structured_docs_local"],
|
|
84
|
+
};
|
|
85
|
+
return valid[d.tier].includes(d.source_table);
|
|
86
|
+
}, {
|
|
87
|
+
message: "`source_table` is not compatible with the provided `tier`.",
|
|
88
|
+
path: ["source_table"],
|
|
89
|
+
});
|
|
90
|
+
export function registerSearchRoute(server, embedding, localEmbedding, sourceDirs, selfReportsRoot, dataDir) {
|
|
91
|
+
server.post("/search", async (request, reply) => {
|
|
92
|
+
const parsed = SearchRequestSchema.safeParse(request.body);
|
|
93
|
+
if (!parsed.success) {
|
|
94
|
+
return reply.code(400).send({
|
|
95
|
+
error: "validation_error",
|
|
96
|
+
details: parsed.error.issues,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const { query, include_passage: includePassage, scope, client, since, top_k, cwd, detail, id: expandId, tier: expandTier, source_table: expandSourceTable, } = parsed.data;
|
|
100
|
+
const searchScope = scope;
|
|
101
|
+
// --- Exact-ID mode: direct id-based fetch, never falls back to ranking ---
|
|
102
|
+
// Triggered whenever `detail="full"` + `id` are provided. The trust
|
|
103
|
+
// contract is strict: return the exact row, or fail loudly. Four sub-cases:
|
|
104
|
+
// 1. `tier` + `source_table` — direct fetch from that table. Powers the
|
|
105
|
+
// round-trippable `expand` pointers carried by every compact hit
|
|
106
|
+
// (which always include `source_table`).
|
|
107
|
+
// 2. `tier` without `source_table` — scan the tier's candidate tables;
|
|
108
|
+
// the result must be unique. Multiple matches → 409 `ambiguous_id`
|
|
109
|
+
// (matters for `document` / `structured_doc`, which map to both the
|
|
110
|
+
// cloud and local structured-docs tables). Zero → 404 `id_not_found`.
|
|
111
|
+
// 3. `source_table` without `tier` — direct fetch from that table.
|
|
112
|
+
// 4. Neither `tier` nor `source_table` — scan every supported table.
|
|
113
|
+
// Exactly one match returns the row; zero → 404 `id_not_found`;
|
|
114
|
+
// multiple → 409 `ambiguous_id` with the candidate tables.
|
|
115
|
+
if ((detail === "full" || detail === "middle") && expandId) {
|
|
116
|
+
if (expandTier) {
|
|
117
|
+
// With an explicit `source_table`, the lookup is already scoped to
|
|
118
|
+
// one table — first-match is unambiguous. Without one, fall through
|
|
119
|
+
// to a multi-table scan so a tier that maps to multiple backing
|
|
120
|
+
// tables (document / structured_doc → cloud + local) gets the same
|
|
121
|
+
// ambiguity guarantee as the bare-id path. We never want to silently
|
|
122
|
+
// return the cloud row when a local row with the same id exists.
|
|
123
|
+
if (expandSourceTable) {
|
|
124
|
+
const fetched = await fetchRowByIdForTier(expandId, expandTier, expandSourceTable);
|
|
125
|
+
if (!fetched) {
|
|
126
|
+
return reply.code(404).send({
|
|
127
|
+
error: "id_not_found",
|
|
128
|
+
id: expandId,
|
|
129
|
+
tier: expandTier,
|
|
130
|
+
source_table: expandSourceTable,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
const hit = await buildExpandedHit(fetched.row, fetched.sourceTable, {
|
|
134
|
+
...(query ? { query } : {}),
|
|
135
|
+
expandRoute: "/search",
|
|
136
|
+
includePassage,
|
|
137
|
+
detail,
|
|
138
|
+
});
|
|
139
|
+
return {
|
|
140
|
+
results: [hit],
|
|
141
|
+
degraded: false,
|
|
142
|
+
cwd_matched: false,
|
|
143
|
+
cwd_scope_applied_to: [],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const tierTables = tablesForTier(expandTier);
|
|
147
|
+
const tierMatches = await fetchRowsByIdInTables(expandId, tierTables);
|
|
148
|
+
if (tierMatches.length === 0) {
|
|
149
|
+
return reply.code(404).send({
|
|
150
|
+
error: "id_not_found",
|
|
151
|
+
id: expandId,
|
|
152
|
+
tier: expandTier,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
if (tierMatches.length > 1) {
|
|
156
|
+
return reply.code(409).send({
|
|
157
|
+
error: "ambiguous_id",
|
|
158
|
+
id: expandId,
|
|
159
|
+
tier: expandTier,
|
|
160
|
+
message: "Multiple rows share this id across this tier's backing tables. Pass `source_table` to disambiguate.",
|
|
161
|
+
candidates: tierMatches.map((m) => ({ source_table: m.sourceTable })),
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const onlyTierMatch = tierMatches[0];
|
|
165
|
+
const hit = await buildExpandedHit(onlyTierMatch.row, onlyTierMatch.sourceTable, {
|
|
166
|
+
...(query ? { query } : {}),
|
|
167
|
+
expandRoute: "/search",
|
|
168
|
+
includePassage,
|
|
169
|
+
detail,
|
|
170
|
+
});
|
|
171
|
+
return {
|
|
172
|
+
results: [hit],
|
|
173
|
+
degraded: false,
|
|
174
|
+
cwd_matched: false,
|
|
175
|
+
cwd_scope_applied_to: [],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (expandSourceTable) {
|
|
179
|
+
// Direct table fetch — no tier needed when caller already named the
|
|
180
|
+
// authoritative table.
|
|
181
|
+
const escaped = expandId.replace(/'/g, "''");
|
|
182
|
+
const rows = (await getTable(expandSourceTable)
|
|
183
|
+
.query()
|
|
184
|
+
.where(`id = '${escaped}'`)
|
|
185
|
+
.limit(1)
|
|
186
|
+
.toArray());
|
|
187
|
+
if (rows.length === 0) {
|
|
188
|
+
return reply.code(404).send({
|
|
189
|
+
error: "id_not_found",
|
|
190
|
+
id: expandId,
|
|
191
|
+
source_table: expandSourceTable,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
const hit = await buildExpandedHit(rows[0], expandSourceTable, {
|
|
195
|
+
...(query ? { query } : {}),
|
|
196
|
+
expandRoute: "/search",
|
|
197
|
+
includePassage,
|
|
198
|
+
detail,
|
|
199
|
+
});
|
|
200
|
+
return {
|
|
201
|
+
results: [hit],
|
|
202
|
+
degraded: false,
|
|
203
|
+
cwd_matched: false,
|
|
204
|
+
cwd_scope_applied_to: [],
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
// No tier, no source_table — scan every table. Must be uniquely-resolvable.
|
|
208
|
+
const matches = await fetchRowsByIdAcrossTables(expandId);
|
|
209
|
+
if (matches.length === 0) {
|
|
210
|
+
return reply.code(404).send({
|
|
211
|
+
error: "id_not_found",
|
|
212
|
+
id: expandId,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (matches.length > 1) {
|
|
216
|
+
return reply.code(409).send({
|
|
217
|
+
error: "ambiguous_id",
|
|
218
|
+
id: expandId,
|
|
219
|
+
message: "Multiple rows share this id across tables. Pass `source_table` (or `tier`) to disambiguate.",
|
|
220
|
+
candidates: matches.map((m) => ({ source_table: m.sourceTable })),
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const only = matches[0];
|
|
224
|
+
const hit = await buildExpandedHit(only.row, only.sourceTable, {
|
|
225
|
+
...(query ? { query } : {}),
|
|
226
|
+
expandRoute: "/search",
|
|
227
|
+
includePassage,
|
|
228
|
+
detail,
|
|
229
|
+
});
|
|
230
|
+
return {
|
|
231
|
+
results: [hit],
|
|
232
|
+
degraded: false,
|
|
233
|
+
cwd_matched: false,
|
|
234
|
+
cwd_scope_applied_to: [],
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
if (!query) {
|
|
238
|
+
// Defensive: the refine() above guarantees this branch is unreachable,
|
|
239
|
+
// but TypeScript's narrowing can't see that through the schema.
|
|
240
|
+
return reply.code(400).send({
|
|
241
|
+
error: "validation_error",
|
|
242
|
+
details: [{ message: "query is required" }],
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
// Resolve cwd to a configured source root for project-scoped search
|
|
246
|
+
const cwdMatch = cwd && sourceDirs ? resolveCwdRoot(cwd, sourceDirs) : null;
|
|
247
|
+
const sourcePathPrefix = cwdMatch?.rootPath;
|
|
248
|
+
// 1. Retrieve candidates.
|
|
249
|
+
// - With a cloud embedding provider: hybrid (vector + lexical).
|
|
250
|
+
// - Without one: INTENTIONAL lexical-only mode. This is the no-key
|
|
251
|
+
// activation path — keyword search over the imported archive — and is
|
|
252
|
+
// NOT degraded (degraded is reserved for a vector path that was
|
|
253
|
+
// attempted and failed). `mode` distinguishes the two for callers.
|
|
254
|
+
const candidates = [];
|
|
255
|
+
let finalDegraded = false;
|
|
256
|
+
let finalDegradedReason;
|
|
257
|
+
const mode = embedding ? "hybrid" : "lexical";
|
|
258
|
+
if (embedding) {
|
|
259
|
+
const cloudResult = await hybridSearch(query, embedding, { scope: searchScope, client, since, top_k, ...(sourcePathPrefix ? { sourcePathPrefix } : {}) });
|
|
260
|
+
candidates.push(...cloudResult.candidates);
|
|
261
|
+
finalDegraded = cloudResult.degraded;
|
|
262
|
+
finalDegradedReason = cloudResult.degraded_reason;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
// Lexical-only: BM25 over the same tables hybrid covers (structured_docs
|
|
266
|
+
// + conversations_hot + digests), plus conversations_cold (which the
|
|
267
|
+
// default lexical table set omits) when the scope includes conversations.
|
|
268
|
+
const fetchK = Math.max(top_k * 3, 30);
|
|
269
|
+
const lexHits = await lexicalSearch(query, {
|
|
270
|
+
scope: searchScope,
|
|
271
|
+
top_k: fetchK,
|
|
272
|
+
...(client ? { client } : {}),
|
|
273
|
+
...(since ? { since } : {}),
|
|
274
|
+
...(sourcePathPrefix ? { sourcePathPrefix } : {}),
|
|
275
|
+
});
|
|
276
|
+
for (const h of lexHits)
|
|
277
|
+
candidates.push(lexicalHitToCandidate(h));
|
|
278
|
+
if (searchScope === "all" || searchScope === "conversations") {
|
|
279
|
+
const coldLex = await lexicalSearchTables(query, ["conversations_cold"], {
|
|
280
|
+
top_k: fetchK,
|
|
281
|
+
...(since ? { since } : {}),
|
|
282
|
+
});
|
|
283
|
+
const seen = new Set(candidates.map((c) => c.id));
|
|
284
|
+
for (const h of coldLex) {
|
|
285
|
+
if (!seen.has(h.id))
|
|
286
|
+
candidates.push(lexicalHitToCandidate(h));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// 1b. Search local table if local embedding is configured
|
|
291
|
+
const scopeIncludesDocs = searchScope === "all" ||
|
|
292
|
+
searchScope === "documents" ||
|
|
293
|
+
searchScope === "clients" ||
|
|
294
|
+
searchScope === "projects";
|
|
295
|
+
if (localEmbedding && scopeIncludesDocs) {
|
|
296
|
+
try {
|
|
297
|
+
const localCandidates = await searchLocalTable(query, localEmbedding, { scope: searchScope, ...(client ? { client } : {}), ...(since ? { since } : {}), top_k, ...(sourcePathPrefix ? { sourcePathPrefix } : {}) });
|
|
298
|
+
const existingIds = new Set(candidates.map((c) => c.id));
|
|
299
|
+
for (const lc of localCandidates) {
|
|
300
|
+
if (!existingIds.has(lc.id)) {
|
|
301
|
+
candidates.push(lc);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
catch (err) {
|
|
306
|
+
if (!finalDegraded) {
|
|
307
|
+
finalDegraded = true;
|
|
308
|
+
finalDegradedReason = `local search failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
// 2. Rerank candidates
|
|
313
|
+
const rerankInput = candidates.map((c) => {
|
|
314
|
+
const entry = {
|
|
315
|
+
id: c.id,
|
|
316
|
+
content: c.content,
|
|
317
|
+
raw_sim: c.raw_sim,
|
|
318
|
+
raw_bm25: c.raw_bm25,
|
|
319
|
+
source_table: c.source_table,
|
|
320
|
+
retrieval_method: c.retrieval_method,
|
|
321
|
+
};
|
|
322
|
+
if (c.indexed_at)
|
|
323
|
+
entry.indexed_at = c.indexed_at;
|
|
324
|
+
if (c.quality)
|
|
325
|
+
entry.quality = c.quality;
|
|
326
|
+
return entry;
|
|
327
|
+
});
|
|
328
|
+
let ranked = rerank(rerankInput);
|
|
329
|
+
// 3. Implicit cold-tier fallback: if top results score < 0.4,
|
|
330
|
+
// also search conversations_cold (only for scopes that include conversations)
|
|
331
|
+
const scopeIncludesConversations = searchScope === "all" || searchScope === "conversations";
|
|
332
|
+
const needsColdFallback = embedding &&
|
|
333
|
+
scopeIncludesConversations &&
|
|
334
|
+
(ranked.length === 0 || ranked[0].score < COLD_TIER_THRESHOLD);
|
|
335
|
+
if (needsColdFallback) {
|
|
336
|
+
const coldOpts = {
|
|
337
|
+
top_k,
|
|
338
|
+
degraded: finalDegraded,
|
|
339
|
+
};
|
|
340
|
+
if (since)
|
|
341
|
+
coldOpts.since = since;
|
|
342
|
+
const coldResult = await searchColdTier(query, embedding, coldOpts);
|
|
343
|
+
// Propagate cold-tier degradation
|
|
344
|
+
if (coldResult.degraded && !finalDegraded) {
|
|
345
|
+
finalDegraded = true;
|
|
346
|
+
finalDegradedReason = coldResult.degraded_reason;
|
|
347
|
+
}
|
|
348
|
+
// Deduplicate against existing results
|
|
349
|
+
const existingIds = new Set(ranked.map((r) => r.id));
|
|
350
|
+
const newCold = coldResult.candidates.filter((c) => !existingIds.has(c.id));
|
|
351
|
+
if (newCold.length > 0) {
|
|
352
|
+
const coldRanked = rerank(newCold);
|
|
353
|
+
ranked = [...ranked, ...coldRanked].sort((a, b) => b.score - a.score);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
// 3b. Retrieval-feedback ranking (Slice 16; flag-gated, OFF by default →
|
|
357
|
+
// ship path unchanged). Applies the bounded, positive-only B_feed
|
|
358
|
+
// learned from opened/cited evidence as a re-score over the full pool,
|
|
359
|
+
// BEFORE report-demotion / chunk-grouping / the top_k slice so it can
|
|
360
|
+
// change which candidates survive. Skipped entirely when the flag is
|
|
361
|
+
// off, dataDir is absent, or the ledger is empty — no extra DB fetch.
|
|
362
|
+
// Global scope in v0 (see applyFeedbackRanking): event project/intent
|
|
363
|
+
// are agent-supplied + usually absent, so a narrow scope would silently
|
|
364
|
+
// match nothing.
|
|
365
|
+
let feedbackApplied = [];
|
|
366
|
+
if (dataDir && feedbackRankingEnabled()) {
|
|
367
|
+
const fb = await applyFeedbackRanking(dataDir, ranked);
|
|
368
|
+
ranked = fb.ranked;
|
|
369
|
+
feedbackApplied = fb.applied;
|
|
370
|
+
}
|
|
371
|
+
// 4. Report-as-memory demotion: in the default mixed surface
|
|
372
|
+
// (scope:"all" only), push generated reports/snapshots behind non-report
|
|
373
|
+
// evidence so they stop impersonating memory. Stable reorder, scores
|
|
374
|
+
// unchanged. Deliberately gated to "all" — the eval only validated the
|
|
375
|
+
// mixed default. Explicit doc-like scopes (documents/clients/projects)
|
|
376
|
+
// are left untouched: a client's reports/ folder may be the real source
|
|
377
|
+
// of truth there, and we only proved this on "all". Skipped when there
|
|
378
|
+
// are no docs to classify.
|
|
379
|
+
if (searchScope === "all" && ranked.some((r) => isReportCandidateTable(r.source_table))) {
|
|
380
|
+
// PR2 locator-relevance — two levers, both UNEARNED on the current index
|
|
381
|
+
// and kept default-OFF (ship path unchanged). They fire only on
|
|
382
|
+
// locator-intent queries ("find the doc/file…", "where is…"), so
|
|
383
|
+
// discussion-query doc-intrusion is untouched. Mechanically: boost climbs
|
|
384
|
+
// the rerank loss for a field-matched report (reads path/slug/title only,
|
|
385
|
+
// never body/BM25, so body-only decoys can't be promoted); the exception
|
|
386
|
+
// stops a field-matched report from being demoted behind every
|
|
387
|
+
// conversation.
|
|
388
|
+
//
|
|
389
|
+
// WHY STILL OFF — re-evaluated 2026-06-30 against the live beta.27 index
|
|
390
|
+
// (scripts/eval-retrieval.ts): both levers only REORDER candidates already
|
|
391
|
+
// in the pool, but the eval's locator targets (reports + trackers) weren't
|
|
392
|
+
// retrieved at all, so all four ablation cells were identical
|
|
393
|
+
// (hit@1 0% · MRR 0.000) — flipping these on is a provable no-op here. The
|
|
394
|
+
// historical "0→75%" gain was measured on a June-2026 index that has since
|
|
395
|
+
// drifted and does not reproduce. The real gap is retrieval COVERAGE, not
|
|
396
|
+
// ranking: don't default-on until locator targets are actually retrievable
|
|
397
|
+
// (canonical-file indexing / write-time index cards) AND a fresh eval shows
|
|
398
|
+
// a real gain.
|
|
399
|
+
const locatorFired = locatorIntentFired(query);
|
|
400
|
+
const boostOn = process.env["RIFT_LOCATOR_BOOST"] === "1" && locatorFired;
|
|
401
|
+
const exceptionOn = process.env["RIFT_LOCATOR_DEMOTE_EXCEPTION"] === "1" && locatorFired;
|
|
402
|
+
if (boostOn || exceptionOn) {
|
|
403
|
+
const docFields = await fetchDocFields(ranked);
|
|
404
|
+
if (boostOn)
|
|
405
|
+
ranked = applyLocatorBoost(query, ranked, docFields);
|
|
406
|
+
const docPaths = new Map();
|
|
407
|
+
for (const [id, f] of docFields)
|
|
408
|
+
if (f.source_path)
|
|
409
|
+
docPaths.set(id, f.source_path);
|
|
410
|
+
const isExempt = exceptionOn
|
|
411
|
+
? (id) => {
|
|
412
|
+
const f = docFields.get(id);
|
|
413
|
+
return f !== undefined && isLocatorTarget(query, f);
|
|
414
|
+
}
|
|
415
|
+
: undefined;
|
|
416
|
+
ranked = demoteReports(ranked, docPaths, searchScope, selfReportsRoot, isExempt);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
const docPaths = await fetchDocSourcePaths(ranked);
|
|
420
|
+
ranked = demoteReports(ranked, docPaths, searchScope, selfReportsRoot);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
// 5. Collapse chunk siblings: a long doc/conversation indexed as multiple
|
|
424
|
+
// chunk rows yields ONE representative hit (the best-scoring chunk) plus
|
|
425
|
+
// a section count, instead of flooding top-k. parentKeyForRow returns
|
|
426
|
+
// null for unmarked/legacy rows, so with RIFT_CHUNKING off (no marked
|
|
427
|
+
// rows) this is provably a no-op. Key the WHOLE deep pool with a
|
|
428
|
+
// projection-only query (no content/embedding) so grouping can collapse
|
|
429
|
+
// siblings before the top-k slice; full rows are then fetched only for
|
|
430
|
+
// the surviving representatives.
|
|
431
|
+
const parentKeyById = await fetchParentKeysForRanked(ranked);
|
|
432
|
+
const grouped = groupByParent(ranked, (r) => parentKeyById.get(rankedKey(r)) ?? null);
|
|
433
|
+
// 6. Collapse near-duplicate CONVERSATION captures: the same task captured
|
|
434
|
+
// across sessions lands as DISTINCT conversation rows (distinct ids →
|
|
435
|
+
// distinct parent keys), so groupByParent never merges them and they
|
|
436
|
+
// crowd top-k. This pass folds near-identical conversation bodies into one
|
|
437
|
+
// representative + a duplicate count. Flag-gated (RIFT_CONV_DEDUP) and a
|
|
438
|
+
// provable no-op when off: collapseConversationDuplicates is never called.
|
|
439
|
+
// Skipped when the pool has chunk markers — dedup would compare best-chunk
|
|
440
|
+
// text and could false-merge distinct conversations (see conversation-dedup).
|
|
441
|
+
const convDedup = convDedupEnabled() && !poolHasChunkMarkers(grouped)
|
|
442
|
+
? collapseConversationDuplicates(grouped.ranked, { stopAfterKept: top_k })
|
|
443
|
+
: null;
|
|
444
|
+
const dedupRanked = convDedup?.ranked ?? grouped.ranked;
|
|
445
|
+
const topRanked = dedupRanked.slice(0, top_k);
|
|
446
|
+
const rawRows = await fetchRawRowsForRanked(topRanked);
|
|
447
|
+
const topResults = topRanked.map((r) => buildCompactHit(r, rawRows.get(rankedKey(r)), {
|
|
448
|
+
query,
|
|
449
|
+
detail,
|
|
450
|
+
expandRoute: "/search",
|
|
451
|
+
includePassage,
|
|
452
|
+
siblingCount: grouped.siblingCountById.get(rankedKey(r)),
|
|
453
|
+
duplicateCount: convDedup?.duplicateCountById.get(rankedKey(r)),
|
|
454
|
+
}));
|
|
455
|
+
// Build cwd observability fields
|
|
456
|
+
const cwdScopeAppliedTo = [];
|
|
457
|
+
if (cwdMatch) {
|
|
458
|
+
cwdScopeAppliedTo.push("structured_docs");
|
|
459
|
+
if (localEmbedding && scopeIncludesDocs) {
|
|
460
|
+
cwdScopeAppliedTo.push("structured_docs_local");
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
const response = {
|
|
464
|
+
results: topResults,
|
|
465
|
+
mode,
|
|
466
|
+
degraded: finalDegraded,
|
|
467
|
+
cwd_matched: !!cwdMatch,
|
|
468
|
+
cwd_scope_applied_to: cwdScopeAppliedTo,
|
|
469
|
+
};
|
|
470
|
+
if (finalDegradedReason)
|
|
471
|
+
response.degraded_reason = finalDegradedReason;
|
|
472
|
+
// Dogfood/explain surface: only present when feedback ranking actually moved
|
|
473
|
+
// something, so a flag-off (or no-learned-signal) response stays unchanged.
|
|
474
|
+
if (feedbackApplied.length > 0) {
|
|
475
|
+
response.feedback_boosts_applied = feedbackApplied;
|
|
476
|
+
}
|
|
477
|
+
return response;
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Adapt a lexical `SearchResult` into a `HybridResult` for the shared rerank
|
|
482
|
+
* path. Lexical-only, so `raw_sim` is 0 and the BM25 score carries the signal
|
|
483
|
+
* (the reranker normalizes BM25 into S_sim when no vector score is present).
|
|
484
|
+
*/
|
|
485
|
+
function lexicalHitToCandidate(h) {
|
|
486
|
+
const entry = {
|
|
487
|
+
id: h.id,
|
|
488
|
+
content: h.content,
|
|
489
|
+
raw_sim: 0,
|
|
490
|
+
raw_bm25: h.score,
|
|
491
|
+
source_table: h.source_table,
|
|
492
|
+
retrieval_method: "lexical",
|
|
493
|
+
};
|
|
494
|
+
if (h.indexed_at)
|
|
495
|
+
entry.indexed_at = h.indexed_at;
|
|
496
|
+
if (h.quality)
|
|
497
|
+
entry.quality = h.quality;
|
|
498
|
+
return entry;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Search conversations_cold for cold-tier fallback.
|
|
502
|
+
* Returns rerank-ready candidates and degradation status.
|
|
503
|
+
*/
|
|
504
|
+
async function searchColdTier(query, embedding, opts) {
|
|
505
|
+
const fetchK = opts.top_k * 3;
|
|
506
|
+
// Lexical search on cold tier
|
|
507
|
+
const lexOpts = { top_k: fetchK };
|
|
508
|
+
if (opts.since)
|
|
509
|
+
lexOpts.since = opts.since;
|
|
510
|
+
const lexResults = await lexicalSearchTables(query, ["conversations_cold"], lexOpts);
|
|
511
|
+
// Vector search on cold tier (if not already degraded)
|
|
512
|
+
const vectorResults = [];
|
|
513
|
+
let coldDegraded = false;
|
|
514
|
+
let coldDegradedReason;
|
|
515
|
+
if (!opts.degraded) {
|
|
516
|
+
try {
|
|
517
|
+
const queryVec = await embedding.embed(query);
|
|
518
|
+
const coldTable = getTable("conversations_cold");
|
|
519
|
+
// Exclude no-key placeholder rows: compaction/rebuild preserve the
|
|
520
|
+
// `rift-none` marker into conversations_cold, so an old no-key row moved
|
|
521
|
+
// to cold must not re-enter semantic search after a real key is connected.
|
|
522
|
+
const clauses = [RIFT_NONE_VECTOR_EXCLUSION_CLAUSE];
|
|
523
|
+
if (opts.since) {
|
|
524
|
+
clauses.push(`indexed_at >= '${opts.since.replace(/'/g, "''")}'`);
|
|
525
|
+
}
|
|
526
|
+
let vq = coldTable
|
|
527
|
+
.query()
|
|
528
|
+
.nearestTo(queryVec)
|
|
529
|
+
.distanceType("cosine")
|
|
530
|
+
.limit(fetchK);
|
|
531
|
+
if (clauses.length > 0) {
|
|
532
|
+
vq = vq.where(clauses.join(" AND "));
|
|
533
|
+
}
|
|
534
|
+
const vRows = await vq.toArray();
|
|
535
|
+
for (const row of vRows) {
|
|
536
|
+
const entry = {
|
|
537
|
+
id: row.id,
|
|
538
|
+
content: row.content || row.summary || "",
|
|
539
|
+
score: 1 - (row._distance ?? 0),
|
|
540
|
+
};
|
|
541
|
+
const ts = row.indexed_at;
|
|
542
|
+
if (ts)
|
|
543
|
+
entry.indexed_at = ts;
|
|
544
|
+
// Drop placeholder `quality` on no-AI basic rows so the reranker treats
|
|
545
|
+
// them as quality-neutral rather than ranking on a fake label.
|
|
546
|
+
const q = row.quality;
|
|
547
|
+
if (q && !isRiftBasicMetadata(row.metadata_provider)) {
|
|
548
|
+
entry.quality = q;
|
|
549
|
+
}
|
|
550
|
+
vectorResults.push(entry);
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
catch (err) {
|
|
554
|
+
// Cold-tier vector failure: surface degradation
|
|
555
|
+
coldDegraded = true;
|
|
556
|
+
coldDegradedReason = `cold-tier vector search failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
// Merge and tag retrieval method
|
|
560
|
+
const vectorIds = new Set(vectorResults.map((r) => r.id));
|
|
561
|
+
const lexicalById = new Map(lexResults.map((r) => [r.id, r]));
|
|
562
|
+
const merged = new Map();
|
|
563
|
+
for (const vr of vectorResults) {
|
|
564
|
+
const lexMatch = lexicalById.get(vr.id);
|
|
565
|
+
const entry = {
|
|
566
|
+
id: vr.id,
|
|
567
|
+
content: vr.content,
|
|
568
|
+
raw_sim: vr.score,
|
|
569
|
+
raw_bm25: lexMatch?.score ?? 0,
|
|
570
|
+
source_table: "conversations_cold",
|
|
571
|
+
retrieval_method: lexMatch ? "hybrid" : "vector",
|
|
572
|
+
};
|
|
573
|
+
if (vr.indexed_at)
|
|
574
|
+
entry.indexed_at = vr.indexed_at;
|
|
575
|
+
if (vr.quality)
|
|
576
|
+
entry.quality = vr.quality;
|
|
577
|
+
merged.set(vr.id, entry);
|
|
578
|
+
}
|
|
579
|
+
for (const lr of lexResults) {
|
|
580
|
+
if (!merged.has(lr.id)) {
|
|
581
|
+
const entry = {
|
|
582
|
+
id: lr.id,
|
|
583
|
+
content: lr.content,
|
|
584
|
+
raw_sim: 0,
|
|
585
|
+
raw_bm25: lr.score,
|
|
586
|
+
source_table: "conversations_cold",
|
|
587
|
+
retrieval_method: vectorIds.has(lr.id) ? "hybrid" : "lexical",
|
|
588
|
+
};
|
|
589
|
+
if (lr.indexed_at)
|
|
590
|
+
entry.indexed_at = lr.indexed_at;
|
|
591
|
+
if (lr.quality)
|
|
592
|
+
entry.quality = lr.quality;
|
|
593
|
+
merged.set(lr.id, entry);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
const result = {
|
|
597
|
+
candidates: Array.from(merged.values()),
|
|
598
|
+
degraded: coldDegraded,
|
|
599
|
+
};
|
|
600
|
+
if (coldDegradedReason)
|
|
601
|
+
result.degraded_reason = coldDegradedReason;
|
|
602
|
+
return result;
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Search the local-embedding table (structured_docs_local).
|
|
606
|
+
* Runs vector search with the local embedding provider + lexical search,
|
|
607
|
+
* then merges into hybrid candidates. Same pattern as searchColdTier.
|
|
608
|
+
*/
|
|
609
|
+
async function searchLocalTable(query, localEmbedding, opts) {
|
|
610
|
+
const fetchK = opts.top_k * 3;
|
|
611
|
+
const tableName = "structured_docs_local";
|
|
612
|
+
// Build WHERE clauses (same logic as cloud structured_docs)
|
|
613
|
+
const clauses = [];
|
|
614
|
+
if (opts.scope === "documents")
|
|
615
|
+
clauses.push("source_scope = 'document'");
|
|
616
|
+
else if (opts.scope === "clients")
|
|
617
|
+
clauses.push("source_scope = 'client'");
|
|
618
|
+
else if (opts.scope === "projects")
|
|
619
|
+
clauses.push("source_scope = 'project'");
|
|
620
|
+
if (opts.client)
|
|
621
|
+
clauses.push(`client_name = '${opts.client.replace(/'/g, "''")}'`);
|
|
622
|
+
if (opts.sourcePathPrefix)
|
|
623
|
+
clauses.push(`source_path LIKE '${escapeLike(opts.sourcePathPrefix).replace(/'/g, "''")}%' ESCAPE '\\'`);
|
|
624
|
+
if (opts.since)
|
|
625
|
+
clauses.push(`indexed_at >= '${opts.since.replace(/'/g, "''")}'`);
|
|
626
|
+
// Vector search with local embedding
|
|
627
|
+
const vectorResults = [];
|
|
628
|
+
const queryVec = await localEmbedding.embed(query);
|
|
629
|
+
const table = getTable(tableName);
|
|
630
|
+
let vq = table.query().nearestTo(queryVec).distanceType("cosine").limit(fetchK);
|
|
631
|
+
if (clauses.length > 0)
|
|
632
|
+
vq = vq.where(clauses.join(" AND "));
|
|
633
|
+
const vRows = await vq.toArray();
|
|
634
|
+
for (const row of vRows) {
|
|
635
|
+
const entry = {
|
|
636
|
+
id: row.id,
|
|
637
|
+
content: row.content || "",
|
|
638
|
+
score: 1 - (row._distance ?? 0),
|
|
639
|
+
};
|
|
640
|
+
const ts = row.indexed_at;
|
|
641
|
+
if (ts)
|
|
642
|
+
entry.indexed_at = ts;
|
|
643
|
+
vectorResults.push(entry);
|
|
644
|
+
}
|
|
645
|
+
// Lexical search on same table — pass scope so fetchRows applies the same
|
|
646
|
+
// source_scope/client/sourcePathPrefix filters as the vector path above.
|
|
647
|
+
const lexResults = await lexicalSearchTables(query, [tableName], {
|
|
648
|
+
top_k: fetchK,
|
|
649
|
+
scope: opts.scope,
|
|
650
|
+
since: opts.since,
|
|
651
|
+
client: opts.client,
|
|
652
|
+
sourcePathPrefix: opts.sourcePathPrefix,
|
|
653
|
+
});
|
|
654
|
+
// Merge vector + lexical
|
|
655
|
+
const vectorIds = new Set(vectorResults.map((r) => r.id));
|
|
656
|
+
const lexicalById = new Map(lexResults.map((r) => [r.id, r]));
|
|
657
|
+
const merged = [];
|
|
658
|
+
for (const vr of vectorResults) {
|
|
659
|
+
const lexMatch = lexicalById.get(vr.id);
|
|
660
|
+
const entry = {
|
|
661
|
+
id: vr.id,
|
|
662
|
+
content: vr.content,
|
|
663
|
+
raw_sim: vr.score,
|
|
664
|
+
raw_bm25: lexMatch?.score ?? 0,
|
|
665
|
+
source_table: tableName,
|
|
666
|
+
retrieval_method: lexMatch ? "hybrid" : "vector",
|
|
667
|
+
};
|
|
668
|
+
if (vr.indexed_at)
|
|
669
|
+
entry.indexed_at = vr.indexed_at;
|
|
670
|
+
merged.push(entry);
|
|
671
|
+
}
|
|
672
|
+
for (const lr of lexResults) {
|
|
673
|
+
if (!vectorIds.has(lr.id)) {
|
|
674
|
+
const entry = {
|
|
675
|
+
id: lr.id,
|
|
676
|
+
content: lr.content,
|
|
677
|
+
raw_sim: 0,
|
|
678
|
+
raw_bm25: lr.score,
|
|
679
|
+
source_table: tableName,
|
|
680
|
+
retrieval_method: "lexical",
|
|
681
|
+
};
|
|
682
|
+
if (lr.indexed_at)
|
|
683
|
+
entry.indexed_at = lr.indexed_at;
|
|
684
|
+
merged.push(entry);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
return merged;
|
|
688
|
+
}
|
|
689
|
+
//# sourceMappingURL=search.js.map
|