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
package/dist/src/main.js
ADDED
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { loadConfig } from "./config/loader.js";
|
|
4
|
+
import { buildApp } from "./server/app.js";
|
|
5
|
+
import { registerShutdownHandlers } from "./server/lifecycle.js";
|
|
6
|
+
import { macKeychain } from "./auth/keychain.js";
|
|
7
|
+
import { TokenManager } from "./auth/rotation.js";
|
|
8
|
+
import { JobQueue } from "./jobs/queue.js";
|
|
9
|
+
import { WorkerPool, createWorkerHandler, resolveWorkerEntryPoint, } from "./jobs/worker-process.js";
|
|
10
|
+
import { createCodexOverrideAwareHandler } from "./jobs/codex-override-handler.js";
|
|
11
|
+
import { createIngestHandler } from "./jobs/handlers/ingest.js";
|
|
12
|
+
import { createTriageHandler } from "./jobs/handlers/triage.js";
|
|
13
|
+
import { ProjectIndex, recordSavedSessionProject, setProjectIndex } from "./retrieval/project-index.js";
|
|
14
|
+
import { startMaintenanceScheduler } from "./jobs/maintenance-scheduler.js";
|
|
15
|
+
import { initTables, closeTables } from "./storage/tables.js";
|
|
16
|
+
import { writeServingMarker } from "./server/serving-marker.js";
|
|
17
|
+
import { recheckStoredUserStatements } from "./capture/user-statements-recheck.js";
|
|
18
|
+
import { createAssistantTextLookup, sessionRoots } from "./capture/assistant-text-lookup.js";
|
|
19
|
+
import { ownsPassage } from "./capture/user-statements.js";
|
|
20
|
+
import { checkIntegrity } from "./storage/integrity.js";
|
|
21
|
+
import { Watcher } from "./ingestion/watcher.js";
|
|
22
|
+
import { Indexer } from "./ingestion/indexer.js";
|
|
23
|
+
import { Scanner } from "./ingestion/scanner.js";
|
|
24
|
+
import { buildIgnoredPaths } from "./ingestion/ignored-paths.js";
|
|
25
|
+
import { createInboxWatcher } from "./ingestion/inbox-watcher.js";
|
|
26
|
+
import { watcherStartupDisabled as watcherStartupDisabledFromEnv } from "./runtime/watcher-startup.js";
|
|
27
|
+
import { loadRiftEnv } from "./runtime/rift-env.js";
|
|
28
|
+
import { runLegacyMigration } from "./runtime/legacy-migration.js";
|
|
29
|
+
import { VoyageEmbeddingProvider, voyageEndpoint } from "./providers/voyage.js";
|
|
30
|
+
import { backfillPending, clearBackfillPending } from "./onboarding/search-by-meaning.js";
|
|
31
|
+
import { OllamaEmbeddingProvider } from "./providers/ollama-embed.js";
|
|
32
|
+
import { checkOllamaHealth } from "./providers/ollama.js";
|
|
33
|
+
import { createDaemonConversationGenerationProviders } from "./providers/conversation-generation.js";
|
|
34
|
+
import { setDefaultTriageProvider } from "./capture/triage.js";
|
|
35
|
+
import { resolveTriageProviderName, setConfiguredTriageProviderName, createConfiguredTriageProvider, } from "./capture/triage-provider-factory.js";
|
|
36
|
+
import { configureCodexModel } from "./providers/codex-cli-model.js";
|
|
37
|
+
import { generateCapabilityMap, getCapabilityCounts, writeRiftContext, } from "./observability/rift-context.js";
|
|
38
|
+
import { getBuildInfo } from "./server/build-info.js";
|
|
39
|
+
const configPath = process.argv[2];
|
|
40
|
+
if (!configPath) {
|
|
41
|
+
process.stderr.write("Usage: onadit <config-path>\n");
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const absoluteConfigPath = path.resolve(configPath);
|
|
45
|
+
const config = loadConfig(absoluteConfigPath);
|
|
46
|
+
// Pin the Codex model for every codex exec (triage/metadata/digest/recovery).
|
|
47
|
+
// Resolution: this override → source ~/.codex/config.toml → persisted → probe.
|
|
48
|
+
configureCodexModel({
|
|
49
|
+
model: config.codex_cli?.model,
|
|
50
|
+
dataDir: config.data_paths.data_dir,
|
|
51
|
+
});
|
|
52
|
+
// Record the configured triage worker process-wide (default codex_cli) so the
|
|
53
|
+
// per-session triage default, the lazy fallback, and the auto-capture preflight
|
|
54
|
+
// all probe/route through the same selected CLI.
|
|
55
|
+
setConfiguredTriageProviderName(resolveTriageProviderName(config));
|
|
56
|
+
// Anchor for failure-notification recency gating. Captured here (rather
|
|
57
|
+
// than reusing buildApp's internal startTime) so the capture loop can
|
|
58
|
+
// distinguish "failing during this uptime" from "stale error from a
|
|
59
|
+
// prior process" without threading startTime out of buildApp.
|
|
60
|
+
const daemonStartTime = Date.now();
|
|
61
|
+
// Run hidden legacy migration BEFORE loadRiftEnv so the env loader never
|
|
62
|
+
// resolves to the legacy path on a machine carrying pre-rename state.
|
|
63
|
+
// Idempotent — no-op on a clean Mac, and on second boot.
|
|
64
|
+
try {
|
|
65
|
+
await runLegacyMigration({ dataDir: config.data_paths.data_dir });
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
process.stderr.write(`Legacy migration failed (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
69
|
+
}
|
|
70
|
+
const envLoadResult = loadRiftEnv();
|
|
71
|
+
if (envLoadResult.loadedKeys.length > 0) {
|
|
72
|
+
process.stderr.write(`Loaded ${envLoadResult.loadedKeys.length} runtime secret(s).\n`);
|
|
73
|
+
}
|
|
74
|
+
const tokenManager = new TokenManager(macKeychain);
|
|
75
|
+
await tokenManager.load();
|
|
76
|
+
const queuePath = path.join(config.data_paths.jobs_dir, "queue.json");
|
|
77
|
+
const jobQueue = new JobQueue(queuePath);
|
|
78
|
+
await jobQueue.load();
|
|
79
|
+
// Hold processing so recovered jobs don't execute before the startup
|
|
80
|
+
// integrity check completes. Released after initTables + rebuild enqueue.
|
|
81
|
+
jobQueue.hold();
|
|
82
|
+
// --- Cloud embedding provider (needed for search + cloud watchers) ---
|
|
83
|
+
const hasCloudSources = config.sources.some((s) => s.extraction !== "local");
|
|
84
|
+
const voyageApiKey = process.env["VOYAGE_API_KEY"];
|
|
85
|
+
// First-boot path: install.sh writes a config with cloud sources, but the
|
|
86
|
+
// VOYAGE_API_KEY only lands in ~/.rift.env after `onadit onboard` runs.
|
|
87
|
+
// Booting in degraded mode lets /health respond so onboard's kickstart can
|
|
88
|
+
// reach the daemon and supply the key. On the next launchd respawn the env
|
|
89
|
+
// loader picks up ~/.rift.env and the cloud provider initializes normally.
|
|
90
|
+
let embeddingProvider;
|
|
91
|
+
if (voyageApiKey) {
|
|
92
|
+
const cachePath = path.join(config.data_paths.data_dir, "embeddings");
|
|
93
|
+
embeddingProvider = new VoyageEmbeddingProvider({
|
|
94
|
+
apiKey: voyageApiKey,
|
|
95
|
+
...voyageEndpoint(config.embedding),
|
|
96
|
+
cachePath,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
else if (hasCloudSources) {
|
|
100
|
+
process.stderr.write("Cloud sources configured but VOYAGE_API_KEY missing — booting in degraded mode " +
|
|
101
|
+
"(cloud embeds disabled). Run `onadit onboard` to set the key, or `onadit status` to inspect.\n");
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
process.stderr.write("Running in local-only mode (no VOYAGE_API_KEY — cloud features disabled)\n");
|
|
105
|
+
}
|
|
106
|
+
// --- Ollama providers (for extraction: "local" sources) ---
|
|
107
|
+
const localSources = config.sources.filter((s) => s.extraction === "local");
|
|
108
|
+
let ollamaEmbedding;
|
|
109
|
+
if (localSources.length > 0) {
|
|
110
|
+
await checkOllamaHealth();
|
|
111
|
+
ollamaEmbedding = new OllamaEmbeddingProvider({
|
|
112
|
+
cachePath: path.join(config.data_paths.data_dir, "embeddings-local"),
|
|
113
|
+
});
|
|
114
|
+
process.stderr.write(`Ollama providers initialized for ${localSources.length} local source(s)\n`);
|
|
115
|
+
}
|
|
116
|
+
const conversationProviders = await createDaemonConversationGenerationProviders(config);
|
|
117
|
+
const metadataExtractor = conversationProviders.metadataExtractor;
|
|
118
|
+
const digestSummarizer = conversationProviders.digestSummarizer;
|
|
119
|
+
// Log the extractor actually selected, keyed off the explicit
|
|
120
|
+
// `metadataProvider` discriminator (not `digestSummarizer` presence — Claude
|
|
121
|
+
// metadata ships no digest, so inferring from digests would misreport an active
|
|
122
|
+
// Claude config as AI-free Basic).
|
|
123
|
+
const metadataStartupLine = {
|
|
124
|
+
ollama: "Local generation enabled for conversation metadata extraction and digests\n",
|
|
125
|
+
codex_cli: "Cloud generation routed through Codex CLI for metadata extraction and digests\n",
|
|
126
|
+
claude_code: "Cloud generation routed through Claude Code for metadata extraction (digests/compaction off until Claude digest support ships)\n",
|
|
127
|
+
basic: "AI-free metadata enabled (BasicMetadataExtractor) — AI enrichment off, no AI-worker calls\n",
|
|
128
|
+
};
|
|
129
|
+
process.stderr.write(metadataStartupLine[conversationProviders.metadataProvider]);
|
|
130
|
+
// --- Worker pool (heavy jobs run in child processes) ---
|
|
131
|
+
const workerEntryPoint = resolveWorkerEntryPoint(import.meta.url);
|
|
132
|
+
const workerPool = new WorkerPool(workerEntryPoint, absoluteConfigPath);
|
|
133
|
+
// Declare watchers + scanner early so buildApp can capture the reference.
|
|
134
|
+
const watchers = [];
|
|
135
|
+
const scanSources = config.sources.filter((s) => s.mode === "scheduled_scan");
|
|
136
|
+
const scanner = scanSources.length > 0
|
|
137
|
+
? new Scanner(config.data_paths.data_dir)
|
|
138
|
+
: null;
|
|
139
|
+
const watcherStartupDisabled = watcherStartupDisabledFromEnv();
|
|
140
|
+
// --- Register worker-wrapped handlers BEFORE buildApp ---
|
|
141
|
+
// Heavy jobs run in child processes; parent handles queue + watcher
|
|
142
|
+
// coordination. Registering before buildApp ensures:
|
|
143
|
+
// 1. buildApp's hasHandler() checks see worker handlers, skip fallbacks
|
|
144
|
+
// 2. Recovered jobs from queue.load() don't execute in-process
|
|
145
|
+
const projectIndex = new ProjectIndex(config.data_paths.data_dir);
|
|
146
|
+
setProjectIndex(projectIndex);
|
|
147
|
+
const saveWorkerHandler = createWorkerHandler(workerPool, "save", absoluteConfigPath, watchers, scanner, jobQueue);
|
|
148
|
+
jobQueue.registerHandler("save", async (job) => {
|
|
149
|
+
await saveWorkerHandler(job);
|
|
150
|
+
// Link the session to its project on every save path, not just the daemon's.
|
|
151
|
+
recordSavedSessionProject(projectIndex, job.payload);
|
|
152
|
+
});
|
|
153
|
+
// Ingest is always available in the queue. Worker-side provider selection is
|
|
154
|
+
// config-driven, and VOYAGE_API_KEY is still validated at job execution time.
|
|
155
|
+
const workerIngestHandler = createWorkerHandler(workerPool, "ingest", absoluteConfigPath, watchers, scanner, jobQueue);
|
|
156
|
+
const codexOverrideIngestHandler = embeddingProvider
|
|
157
|
+
? createIngestHandler({
|
|
158
|
+
embeddingProvider,
|
|
159
|
+
metadataExtractor,
|
|
160
|
+
dataDir: config.data_paths.data_dir,
|
|
161
|
+
queue: jobQueue,
|
|
162
|
+
})
|
|
163
|
+
: null;
|
|
164
|
+
jobQueue.registerHandler("ingest", codexOverrideIngestHandler
|
|
165
|
+
? createCodexOverrideAwareHandler(workerIngestHandler, codexOverrideIngestHandler)
|
|
166
|
+
: workerIngestHandler);
|
|
167
|
+
if (digestSummarizer) {
|
|
168
|
+
jobQueue.registerHandler("compact", createWorkerHandler(workerPool, "compact", absoluteConfigPath, watchers, scanner, jobQueue));
|
|
169
|
+
}
|
|
170
|
+
jobQueue.registerHandler("reindex", createWorkerHandler(workerPool, "reindex", absoluteConfigPath, watchers, scanner, jobQueue));
|
|
171
|
+
jobQueue.registerHandler("reconcile", createWorkerHandler(workerPool, "reconcile", absoluteConfigPath, watchers, scanner, jobQueue));
|
|
172
|
+
jobQueue.registerHandler("optimize", createWorkerHandler(workerPool, "optimize", absoluteConfigPath, watchers, scanner, jobQueue));
|
|
173
|
+
const workerTriageHandler = createWorkerHandler(workerPool, "triage", absoluteConfigPath, watchers, scanner, jobQueue);
|
|
174
|
+
jobQueue.registerHandler("triage", createCodexOverrideAwareHandler(workerTriageHandler, createTriageHandler({
|
|
175
|
+
dataDir: config.data_paths.data_dir,
|
|
176
|
+
openai: config.openai,
|
|
177
|
+
})));
|
|
178
|
+
// Auto-capture (in-process) calls triageConversation() directly. Install the
|
|
179
|
+
// configured triage worker (codex_cli by default, claude_code when selected)
|
|
180
|
+
// — the operator's own authenticated CLI runtime, no Onadit-held API key.
|
|
181
|
+
setDefaultTriageProvider(createConfiguredTriageProvider());
|
|
182
|
+
const { server, markReady } = await buildApp(config, tokenManager, jobQueue, embeddingProvider, watchers, scanner, digestSummarizer, metadataExtractor, ollamaEmbedding, absoluteConfigPath);
|
|
183
|
+
registerShutdownHandlers(server, {
|
|
184
|
+
onShutdown: () => workerPool.shutdown(),
|
|
185
|
+
});
|
|
186
|
+
// SIGHUP reloads tokens from Keychain so CLI-issued tokens become
|
|
187
|
+
// usable without a full daemon restart. noGrace ensures the new token
|
|
188
|
+
// is the sole active credential (PRD: no grace overlap on token issue).
|
|
189
|
+
process.on("SIGHUP", () => {
|
|
190
|
+
tokenManager
|
|
191
|
+
.reload({ noGrace: true })
|
|
192
|
+
.then(() => {
|
|
193
|
+
process.stderr.write("Reloaded auth tokens from Keychain\n");
|
|
194
|
+
})
|
|
195
|
+
.catch((err) => {
|
|
196
|
+
process.stderr.write(`Failed to reload tokens: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
await server.listen({ host: config.server.host, port: config.server.port });
|
|
200
|
+
// --- Startup integrity check (runs BEFORE initTables to detect corruption) ---
|
|
201
|
+
const integrity = await checkIntegrity(config.data_paths.data_dir);
|
|
202
|
+
// Close the connection used by integrity check so initTables gets a fresh state.
|
|
203
|
+
const { closeConnection: closeConn, resetConnectionRef: resetConn } = await import("./storage/db.js");
|
|
204
|
+
closeConn();
|
|
205
|
+
resetConn();
|
|
206
|
+
// --- Initialize storage and ingestion pipeline ---
|
|
207
|
+
await initTables(config.data_paths.data_dir);
|
|
208
|
+
// Stamp the serving-build capability marker: records that THIS build (and its
|
|
209
|
+
// chunk capabilities) last served this data dir. Offline tools that run with the
|
|
210
|
+
// daemon stopped read it to gate destructive schema-touching writes. Best-effort
|
|
211
|
+
// — never breaks boot. Written only here, by the serving daemon, never by a CLI.
|
|
212
|
+
writeServingMarker(config.data_paths.data_dir);
|
|
213
|
+
// Attribution rules changed since some entries were stored: drop the "said by
|
|
214
|
+
// the user" entries the current rules refuse. Once per rules version, no model
|
|
215
|
+
// call, never breaks boot.
|
|
216
|
+
try {
|
|
217
|
+
// Entries were captured over the last days: look that far back for the
|
|
218
|
+
// assistant messages a forwarded report came from.
|
|
219
|
+
const recheckAssistantText = createAssistantTextLookup({
|
|
220
|
+
ownedBy: ownsPassage,
|
|
221
|
+
roots: sessionRoots({ sources: config.capture.sources }),
|
|
222
|
+
windowMs: 14 * 24 * 60 * 60 * 1000,
|
|
223
|
+
});
|
|
224
|
+
const rechecked = await recheckStoredUserStatements(config.data_paths.data_dir, recheckAssistantText);
|
|
225
|
+
if (rechecked) {
|
|
226
|
+
process.stderr.write(`User statements re-checked: ${rechecked.conversations} conversation(s), ${rechecked.removed} entry(ies) no longer attributed to the user, ${rechecked.skipped} left for the next start\n`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
catch (err) {
|
|
230
|
+
process.stderr.write(`User statement re-check failed (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
231
|
+
}
|
|
232
|
+
if (!integrity.healthy) {
|
|
233
|
+
process.stderr.write(`Startup integrity check: corruption detected in [${integrity.corruptTables.join(", ")}]. Auto-triggering rebuild.\n`);
|
|
234
|
+
// Use createUrgent to bypass the exclusivity gate and insert at
|
|
235
|
+
// the front of the queue. Other queued exclusive jobs (recovered or
|
|
236
|
+
// legitimate) naturally wait — one-at-a-time processing means they
|
|
237
|
+
// run after the rebuild against healthy storage.
|
|
238
|
+
const rebuildResult = await jobQueue.createUrgent("reindex", {
|
|
239
|
+
payload: { scope: "all", rebuild: true },
|
|
240
|
+
});
|
|
241
|
+
process.stderr.write(`Startup rebuild enqueued as job ${rebuildResult.job.id}\n`);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
process.stderr.write("Startup integrity check: all tables healthy\n");
|
|
245
|
+
}
|
|
246
|
+
// Integrity check done + tables initialized — safe to process jobs.
|
|
247
|
+
jobQueue.releaseHold();
|
|
248
|
+
// --- Source ownership helper (longest-prefix match) ---
|
|
249
|
+
// Used by watcher + scan loops to route files to the correct provider
|
|
250
|
+
// when source roots overlap or nest (e.g., cloud=/docs + local=/docs/private).
|
|
251
|
+
function findOwningSource(filePath) {
|
|
252
|
+
let best;
|
|
253
|
+
let bestLen = 0;
|
|
254
|
+
for (const s of config.sources) {
|
|
255
|
+
if (filePath.startsWith(s.path) && s.path.length > bestLen) {
|
|
256
|
+
best = s;
|
|
257
|
+
bestLen = s.path.length;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return best;
|
|
261
|
+
}
|
|
262
|
+
function buildWatcherIgnoredPaths(source) {
|
|
263
|
+
return buildIgnoredPaths(source, config.data_paths);
|
|
264
|
+
}
|
|
265
|
+
// --- File watchers (mode: "watch") ---
|
|
266
|
+
const watchSources = config.sources.filter((s) => s.mode === "watch");
|
|
267
|
+
if (watcherStartupDisabled) {
|
|
268
|
+
process.stderr.write("Watcher startup disabled by RIFT_DISABLE_WATCHERS=1\n");
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
for (const source of watchSources) {
|
|
272
|
+
// Select embedding provider based on extraction mode.
|
|
273
|
+
const embedding = source.extraction === "local" && ollamaEmbedding
|
|
274
|
+
? ollamaEmbedding
|
|
275
|
+
: embeddingProvider;
|
|
276
|
+
if (!embedding) {
|
|
277
|
+
process.stderr.write(`Skipping watcher for ${source.path}: no embedding provider available\n`);
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
const indexer = new Indexer(embedding, {
|
|
281
|
+
sourceType: "filesystem_watched",
|
|
282
|
+
sourceScope: source.scope,
|
|
283
|
+
clientName: source.client_name ?? "",
|
|
284
|
+
allowedRoots: [source.path],
|
|
285
|
+
dataDir: config.data_paths.data_dir,
|
|
286
|
+
...(source.extraction === "local" ? { tableName: "structured_docs_local" } : {}),
|
|
287
|
+
});
|
|
288
|
+
// Wrap handler to skip files owned by a more-specific source root.
|
|
289
|
+
// Without this, a cloud watcher on /docs would also index files under
|
|
290
|
+
// /docs/private (a nested local source), leaking local content to cloud.
|
|
291
|
+
const handler = (event) => {
|
|
292
|
+
const owner = findOwningSource(event.path);
|
|
293
|
+
if (owner && owner.path !== source.path)
|
|
294
|
+
return Promise.resolve();
|
|
295
|
+
return indexer.handleEvent(event);
|
|
296
|
+
};
|
|
297
|
+
const watcher = new Watcher([source.path], handler, {
|
|
298
|
+
ignoredPaths: buildWatcherIgnoredPaths(source),
|
|
299
|
+
});
|
|
300
|
+
await watcher.start();
|
|
301
|
+
watchers.push(watcher);
|
|
302
|
+
}
|
|
303
|
+
if (watchers.length > 0) {
|
|
304
|
+
process.stderr.write(`Started ${watchers.length} file watcher(s)\n`);
|
|
305
|
+
}
|
|
306
|
+
// --- Inbox watcher ---
|
|
307
|
+
if (jobQueue.hasHandler("ingest")) {
|
|
308
|
+
const inboxWatcher = createInboxWatcher({
|
|
309
|
+
dataDir: config.data_paths.data_dir,
|
|
310
|
+
queue: jobQueue,
|
|
311
|
+
});
|
|
312
|
+
await inboxWatcher.start();
|
|
313
|
+
watchers.push(inboxWatcher);
|
|
314
|
+
process.stderr.write("Inbox watcher started\n");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
// --- Scheduled scan (mode: "scheduled_scan") ---
|
|
318
|
+
let scanInterval = null;
|
|
319
|
+
const scanIntervalSeconds = config.scan.interval_seconds;
|
|
320
|
+
const scanIntervalMs = scanIntervalSeconds * 1000;
|
|
321
|
+
if (config.cron.cron_enabled && scanSources.length > 0 && scanner) {
|
|
322
|
+
const scanDirs = scanSources.map((s) => s.path);
|
|
323
|
+
// Union ignored paths across all scheduled_scan sources. `walkDirectory`
|
|
324
|
+
// uses prefix matching, so paths outside a given root are no-ops for
|
|
325
|
+
// that root — the flat list is safe across sources.
|
|
326
|
+
const scanIgnoredPaths = Array.from(new Set(scanSources.flatMap((s) => buildIgnoredPaths(s, config.data_paths))));
|
|
327
|
+
const runScan = async () => {
|
|
328
|
+
if (scanner.isPaused)
|
|
329
|
+
return;
|
|
330
|
+
try {
|
|
331
|
+
const result = await scanner.scan(scanDirs, { ignoredPaths: scanIgnoredPaths });
|
|
332
|
+
for (const event of result.events) {
|
|
333
|
+
// Use longest-prefix match across ALL sources so files under a
|
|
334
|
+
// nested source root (e.g., local=/docs/private under cloud=/docs)
|
|
335
|
+
// are attributed to the most-specific owner.
|
|
336
|
+
const owner = findOwningSource(event.path);
|
|
337
|
+
if (!owner || owner.mode !== "scheduled_scan")
|
|
338
|
+
continue;
|
|
339
|
+
const embedding = owner.extraction === "local" && ollamaEmbedding
|
|
340
|
+
? ollamaEmbedding
|
|
341
|
+
: embeddingProvider;
|
|
342
|
+
if (!embedding)
|
|
343
|
+
continue;
|
|
344
|
+
const indexer = new Indexer(embedding, {
|
|
345
|
+
sourceType: "filesystem_scheduled_scan",
|
|
346
|
+
sourceScope: owner.scope,
|
|
347
|
+
clientName: owner.client_name ?? "",
|
|
348
|
+
allowedRoots: [owner.path],
|
|
349
|
+
dataDir: config.data_paths.data_dir,
|
|
350
|
+
...(owner.extraction === "local" ? { tableName: "structured_docs_local" } : {}),
|
|
351
|
+
});
|
|
352
|
+
await indexer.handleEvent(event);
|
|
353
|
+
}
|
|
354
|
+
scanner.setNextScan(new Date(Date.now() + scanIntervalMs).toISOString());
|
|
355
|
+
}
|
|
356
|
+
catch (err) {
|
|
357
|
+
process.stderr.write(`Scan error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
if (scanner.isDue(scanIntervalSeconds)) {
|
|
361
|
+
process.stderr.write("Scheduled scan overdue — running catch-up scan\n");
|
|
362
|
+
void runScan();
|
|
363
|
+
}
|
|
364
|
+
scanInterval = setInterval(() => void runScan(), scanIntervalMs);
|
|
365
|
+
scanner.setNextScan(new Date(Date.now() + scanIntervalMs).toISOString());
|
|
366
|
+
process.stderr.write(`Scheduled scan enabled for ${scanSources.length} source(s) (interval: ${scanIntervalSeconds}s)\n`);
|
|
367
|
+
}
|
|
368
|
+
// --- Automatic capture (local CLI conversations) ---
|
|
369
|
+
let captureInterval = null;
|
|
370
|
+
if (config.capture.enabled && !voyageApiKey) {
|
|
371
|
+
// Capture is enabled in config but this daemon process loaded no
|
|
372
|
+
// VOYAGE_API_KEY (e.g. ~/.rift.env not yet written, or onboarding not
|
|
373
|
+
// finished before launchd booted us). Capture is the off-device path: both
|
|
374
|
+
// triage and background self-repair send parsed conversation content to Codex
|
|
375
|
+
// and then save the result. Without a key the save would fail, so we hold the
|
|
376
|
+
// ENTIRE loop (triage + self-repair) until a key is loaded — the daemon-side
|
|
377
|
+
// equivalent of the manual `onadit capture` gate. The next launchd respawn that
|
|
378
|
+
// picks up the key from ~/.rift.env starts capture normally.
|
|
379
|
+
process.stderr.write("Auto-capture is enabled but no VOYAGE_API_KEY is loaded — capture disabled " +
|
|
380
|
+
"until a Voyage key is loaded (no Codex triage or self-repair will run). " +
|
|
381
|
+
"Run `onadit onboard --reconfigure-voyage`, then restart the daemon.\n");
|
|
382
|
+
}
|
|
383
|
+
if (config.capture.enabled && voyageApiKey) {
|
|
384
|
+
const { runAutoCapture, zeroCounts, buildDaemonAutoCaptureDeps } = await import("./capture/auto-capture.js");
|
|
385
|
+
const { appendAutoCaptureRunRecord, buildAutoCaptureRunRecord, } = await import("./capture/observability.js");
|
|
386
|
+
const { maybeRunAutoRepair, clearSaveFailureCooldown, autoRepairAllowed } = await import("./capture/auto-repair.js");
|
|
387
|
+
const { CodexCliChunkSummarizer } = await import("./capture/recover-quarantine.js");
|
|
388
|
+
const captureIntervalMs = config.capture.interval_seconds * 1000;
|
|
389
|
+
// Block a save through the job queue and wait for it to reach a terminal
|
|
390
|
+
// state. Shared by auto-capture and background large-session repair so both
|
|
391
|
+
// confirm the save landed before marking their work done.
|
|
392
|
+
const saveViaJobQueue = async (opts) => {
|
|
393
|
+
const result = await jobQueue.create("save", {
|
|
394
|
+
idempotency_key: opts.idempotency_key,
|
|
395
|
+
payload: {
|
|
396
|
+
source: opts.source,
|
|
397
|
+
summary: opts.summary,
|
|
398
|
+
content: opts.content,
|
|
399
|
+
topics: opts.topics,
|
|
400
|
+
...(opts.decisions?.length
|
|
401
|
+
? { decisions: opts.decisions, user_statements_seal: opts.user_statements_seal }
|
|
402
|
+
: {}),
|
|
403
|
+
domain: opts.domain,
|
|
404
|
+
idempotency_key: opts.idempotency_key,
|
|
405
|
+
replace_idempotency_key: opts.replace_idempotency_key,
|
|
406
|
+
...(opts.cwd ? { cwd: opts.cwd } : {}),
|
|
407
|
+
},
|
|
408
|
+
});
|
|
409
|
+
if ("conflict" in result) {
|
|
410
|
+
throw new Error("Job queue conflict during save");
|
|
411
|
+
}
|
|
412
|
+
const jobId = result.job.id;
|
|
413
|
+
const maxWaitMs = 120_000;
|
|
414
|
+
const pollMs = 250;
|
|
415
|
+
const start = Date.now();
|
|
416
|
+
// A confirmed save proves the Voyage/save path is healthy, so clear any
|
|
417
|
+
// background-repair save cooldown — recovery can resume now instead of
|
|
418
|
+
// idling out the rest of the window. Best-effort; never blocks the save.
|
|
419
|
+
const onSaveSuccess = async () => {
|
|
420
|
+
await clearSaveFailureCooldown(config.data_paths.data_dir);
|
|
421
|
+
};
|
|
422
|
+
while (Date.now() - start < maxWaitMs) {
|
|
423
|
+
const j = jobQueue.get(jobId);
|
|
424
|
+
if (!j) {
|
|
425
|
+
await onSaveSuccess(); // Pruned — treat as success
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
if (j.status === "completed") {
|
|
429
|
+
await onSaveSuccess();
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
if (j.status === "failed") {
|
|
433
|
+
throw new Error(`Save job failed: ${j.error ?? "unknown"}`);
|
|
434
|
+
}
|
|
435
|
+
await new Promise((r) => setTimeout(r, pollMs));
|
|
436
|
+
}
|
|
437
|
+
throw new Error("Save job timed out");
|
|
438
|
+
};
|
|
439
|
+
// Fire-and-forget background self-repair for oversized Codex sessions that
|
|
440
|
+
// auto-capture parked. Reuses the existing recovery path (chunked summarize
|
|
441
|
+
// + /save), bounds retries per-session, and dedups concurrent runs inside
|
|
442
|
+
// `maybeRunAutoRepair`. Never awaited by capture — recovery is slow (one
|
|
443
|
+
// Codex CLI call per chunk) and must not delay the capture loop or status.
|
|
444
|
+
const triggerAutoRepair = () => {
|
|
445
|
+
const repairAssistantText = createAssistantTextLookup({
|
|
446
|
+
ownedBy: ownsPassage,
|
|
447
|
+
roots: sessionRoots({ sources: config.capture.sources }),
|
|
448
|
+
});
|
|
449
|
+
void maybeRunAutoRepair({
|
|
450
|
+
recover: {
|
|
451
|
+
dataDir: config.data_paths.data_dir,
|
|
452
|
+
summarizer: new CodexCliChunkSummarizer({ timeoutMs: 180_000 }),
|
|
453
|
+
assistantText: repairAssistantText,
|
|
454
|
+
saveFn: (input) => saveViaJobQueue({
|
|
455
|
+
source: "codex_cli",
|
|
456
|
+
summary: input.summary,
|
|
457
|
+
content: input.content,
|
|
458
|
+
topics: input.topics,
|
|
459
|
+
...(input.decisions
|
|
460
|
+
? { decisions: input.decisions, user_statements_seal: input.userStatementsSeal }
|
|
461
|
+
: {}),
|
|
462
|
+
idempotency_key: input.idempotencyKey,
|
|
463
|
+
...(input.replaceIdempotencyKey
|
|
464
|
+
? { replace_idempotency_key: input.replaceIdempotencyKey }
|
|
465
|
+
: {}),
|
|
466
|
+
}),
|
|
467
|
+
},
|
|
468
|
+
log: (message) => process.stderr.write(`${message}\n`),
|
|
469
|
+
}).catch((err) => {
|
|
470
|
+
process.stderr.write(`Auto-repair error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
471
|
+
});
|
|
472
|
+
};
|
|
473
|
+
const runCapture = async () => {
|
|
474
|
+
const startedAt = new Date();
|
|
475
|
+
try {
|
|
476
|
+
const report = await runAutoCapture(buildDaemonAutoCaptureDeps({
|
|
477
|
+
config,
|
|
478
|
+
// Wait for the save job to reach a terminal state so auto-capture
|
|
479
|
+
// only marks the conversation as processed after a confirmed save.
|
|
480
|
+
// If the job fails, this throws, and auto-capture's per-session error
|
|
481
|
+
// handler skips persisting state — the conversation is retried next run.
|
|
482
|
+
saveFn: (opts) => saveViaJobQueue(opts),
|
|
483
|
+
}));
|
|
484
|
+
const durationMs = Date.now() - startedAt.getTime();
|
|
485
|
+
await appendAutoCaptureRunRecord(config.data_paths.data_dir, buildAutoCaptureRunRecord({
|
|
486
|
+
timestamp: startedAt.toISOString(),
|
|
487
|
+
enabledSources: config.capture.sources,
|
|
488
|
+
durationMs,
|
|
489
|
+
report,
|
|
490
|
+
trigger: "daemon",
|
|
491
|
+
}));
|
|
492
|
+
process.stderr.write(`Auto-capture: ${report.saved} saved, ${report.review} review, ${report.discarded} discarded, ${report.errors} errors, ${report.new_conversations} new, ${durationMs}ms\n`);
|
|
493
|
+
// Self-repair any oversized sessions this (or a prior) run parked, but
|
|
494
|
+
// only when the whole path is actually ready:
|
|
495
|
+
// - Codex preflight passed (summarize needs the Codex CLI), and
|
|
496
|
+
// - this run had no per-session errors, and
|
|
497
|
+
// - a Voyage key is present (the save handler needs it).
|
|
498
|
+
// The budget no longer counts save failures, so a missed gate here is
|
|
499
|
+
// not catastrophic — but skipping the attempt entirely avoids burning
|
|
500
|
+
// Codex calls to summarize sessions we then can't save. The repair runs
|
|
501
|
+
// in the background; we don't await it.
|
|
502
|
+
// It also needs Codex to be capture's worker (see autoRepairAllowed).
|
|
503
|
+
if (autoRepairAllowed({
|
|
504
|
+
preflightOk: report.preflight_ok,
|
|
505
|
+
errors: report.errors,
|
|
506
|
+
keyPresent: Boolean(voyageApiKey),
|
|
507
|
+
worker: resolveTriageProviderName(config),
|
|
508
|
+
})) {
|
|
509
|
+
triggerAutoRepair();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
catch (err) {
|
|
513
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
514
|
+
try {
|
|
515
|
+
await appendAutoCaptureRunRecord(config.data_paths.data_dir, {
|
|
516
|
+
timestamp: startedAt.toISOString(),
|
|
517
|
+
enabled_sources: config.capture.sources,
|
|
518
|
+
run_ok: false,
|
|
519
|
+
preflight_ok: true,
|
|
520
|
+
duration_ms: Date.now() - startedAt.getTime(),
|
|
521
|
+
counts_by_source: Object.fromEntries(config.capture.sources.map((source) => [source, zeroCounts()])),
|
|
522
|
+
errors: [{
|
|
523
|
+
sessionId: "run",
|
|
524
|
+
error,
|
|
525
|
+
}],
|
|
526
|
+
run_error: error,
|
|
527
|
+
trigger: "daemon",
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
catch (observabilityErr) {
|
|
531
|
+
process.stderr.write(`Auto-capture observability append failed: ${observabilityErr instanceof Error ? observabilityErr.message : String(observabilityErr)}\n`);
|
|
532
|
+
}
|
|
533
|
+
process.stderr.write(`Auto-capture error: ${error}\n`);
|
|
534
|
+
}
|
|
535
|
+
finally {
|
|
536
|
+
// Daemon-observed failure notifications. Runs after the run record
|
|
537
|
+
// is written (both branches), so it diagnoses the freshest signals.
|
|
538
|
+
// Best-effort: a notification failure must never affect capture.
|
|
539
|
+
await notifyDaemonObservedFailures();
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
// Diagnose the live daemon signals and raise one native notification
|
|
543
|
+
// per newly-failing, daemon-observable issue (expired Codex login,
|
|
544
|
+
// missing/failing Voyage key, index-write failure, capture failure).
|
|
545
|
+
// Rate-limited inside notifyDaemonFailures (transition + once/day).
|
|
546
|
+
const notifyDaemonObservedFailures = async () => {
|
|
547
|
+
try {
|
|
548
|
+
const { buildFriendStatusPayload } = await import("./server/routes/friend-status.js");
|
|
549
|
+
const { diagnose } = await import("./diagnostics/doctor.js");
|
|
550
|
+
const { notifyDaemonFailures } = await import("./diagnostics/notify.js");
|
|
551
|
+
const payload = buildFriendStatusPayload({
|
|
552
|
+
config,
|
|
553
|
+
startTime: daemonStartTime,
|
|
554
|
+
jobQueue,
|
|
555
|
+
});
|
|
556
|
+
const report = diagnose({
|
|
557
|
+
status: payload,
|
|
558
|
+
// The notifier only acts on daemon-observable issues, none of
|
|
559
|
+
// which depend on local MCP-client config — so the daemon need
|
|
560
|
+
// not read the friend's client files here.
|
|
561
|
+
localSignals: { voyageLast4: null, mcpClients: [] },
|
|
562
|
+
now: Date.now(),
|
|
563
|
+
});
|
|
564
|
+
notifyDaemonFailures(config.data_paths.data_dir, report.issues);
|
|
565
|
+
}
|
|
566
|
+
catch (notifyErr) {
|
|
567
|
+
process.stderr.write(`Failure-notification check skipped: ${notifyErr instanceof Error ? notifyErr.message : String(notifyErr)}\n`);
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
// Run once at startup (after tables are ready)
|
|
571
|
+
void runCapture();
|
|
572
|
+
captureInterval = setInterval(() => void runCapture(), captureIntervalMs);
|
|
573
|
+
process.stderr.write(`Auto-capture enabled for ${config.capture.sources.join(", ")} (interval: ${config.capture.interval_seconds}s)\n`);
|
|
574
|
+
}
|
|
575
|
+
// --- npm-registry update check ---
|
|
576
|
+
// One eager probe at boot, then hourly. Metadata-only — see
|
|
577
|
+
// docs/feedback/PRIVACY.md and src/observability/version-check.ts.
|
|
578
|
+
// Non-fatal: any failure is recorded in the snapshot and surfaced to
|
|
579
|
+
// the renderer, never thrown.
|
|
580
|
+
let versionCheckInterval = null;
|
|
581
|
+
{
|
|
582
|
+
const { runVersionCheck, VERSION_CHECK_INTERVAL_MS } = await import("./observability/version-check.js");
|
|
583
|
+
const installedVersion = getBuildInfo().version;
|
|
584
|
+
const runProbe = async () => {
|
|
585
|
+
try {
|
|
586
|
+
await runVersionCheck({
|
|
587
|
+
dataDir: config.data_paths.data_dir,
|
|
588
|
+
installed: installedVersion,
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
catch (err) {
|
|
592
|
+
process.stderr.write(`Version-check probe failed (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
void runProbe();
|
|
596
|
+
versionCheckInterval = setInterval(() => void runProbe(), VERSION_CHECK_INTERVAL_MS);
|
|
597
|
+
}
|
|
598
|
+
// --- Project identity for captured sessions (sidecar; see project-index.ts) ---
|
|
599
|
+
// Backfill runs in the background: unknown sessions stay searchable, just not
|
|
600
|
+
// project-scoped, so nothing waits on it.
|
|
601
|
+
void projectIndex
|
|
602
|
+
.backfillFromTable()
|
|
603
|
+
.then(({ resolved, unknown }) => {
|
|
604
|
+
if (resolved || unknown) {
|
|
605
|
+
process.stderr.write(`Project index: ${resolved} sessions resolved, ${unknown} unknown\n`);
|
|
606
|
+
}
|
|
607
|
+
})
|
|
608
|
+
.catch((err) => {
|
|
609
|
+
process.stderr.write(`Project index backfill failed (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
610
|
+
});
|
|
611
|
+
// --- Table maintenance (compaction + full-text indexes) ---
|
|
612
|
+
const stopMaintenanceScheduler = startMaintenanceScheduler({
|
|
613
|
+
queue: jobQueue,
|
|
614
|
+
log: (line) => process.stderr.write(line),
|
|
615
|
+
});
|
|
616
|
+
// Write PID file so the CLI can find and signal this process.
|
|
617
|
+
const pidPath = path.join(config.data_paths.data_dir, "rift.pid");
|
|
618
|
+
fs.writeFileSync(pidPath, String(process.pid));
|
|
619
|
+
// Clean up PID file, auth timers, watchers, scan interval, and tables on exit.
|
|
620
|
+
// Worker pool is shut down via registerShutdownHandlers' onShutdown hook
|
|
621
|
+
// (runs before process.exit, so the 3s SIGKILL escalation works).
|
|
622
|
+
process.on("exit", () => {
|
|
623
|
+
if (scanInterval)
|
|
624
|
+
clearInterval(scanInterval);
|
|
625
|
+
if (captureInterval)
|
|
626
|
+
clearInterval(captureInterval);
|
|
627
|
+
if (versionCheckInterval)
|
|
628
|
+
clearInterval(versionCheckInterval);
|
|
629
|
+
stopMaintenanceScheduler();
|
|
630
|
+
tokenManager.shutdown();
|
|
631
|
+
for (const w of watchers) {
|
|
632
|
+
void w.stop();
|
|
633
|
+
}
|
|
634
|
+
closeTables();
|
|
635
|
+
try {
|
|
636
|
+
fs.unlinkSync(pidPath);
|
|
637
|
+
}
|
|
638
|
+
catch {
|
|
639
|
+
// Best-effort — process is exiting.
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
const buildInfo = getBuildInfo();
|
|
643
|
+
process.stderr.write(`onadit ${buildInfo.version} (commit ${buildInfo.commit.slice(0, 12)}, node ${buildInfo.node}) listening on ${config.server.host}:${config.server.port}\n`);
|
|
644
|
+
// Regenerate the on-disk capability map at boot so a fresh daemon always
|
|
645
|
+
// advertises the current tool surface, independent of whether /status is
|
|
646
|
+
// ever hit. Before this, `data/rift-context.md` only refreshed as a side
|
|
647
|
+
// effect of GET /status, leaving newly-shipped tools (e.g. onadit_context_pack)
|
|
648
|
+
// missing from the map right after a deploy. Best-effort: writeRiftContext
|
|
649
|
+
// already swallows and logs its own failures.
|
|
650
|
+
try {
|
|
651
|
+
const counts = await getCapabilityCounts();
|
|
652
|
+
const capabilityMap = generateCapabilityMap(counts);
|
|
653
|
+
await writeRiftContext(config.data_paths.data_dir, capabilityMap);
|
|
654
|
+
}
|
|
655
|
+
catch (err) {
|
|
656
|
+
process.stderr.write(`Boot capability-map regeneration failed (non-fatal): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
657
|
+
}
|
|
658
|
+
markReady();
|
|
659
|
+
// "Search by meaning" was just turned on, so the archive still holds
|
|
660
|
+
// placeholder vectors from keyword-only mode: re-embed it once. Another
|
|
661
|
+
// repair job may hold the queue; keep trying until the re-embed is queued.
|
|
662
|
+
if (embeddingProvider && backfillPending(absoluteConfigPath)) {
|
|
663
|
+
const queueBackfill = async () => {
|
|
664
|
+
const result = await jobQueue.create("reindex", { payload: { scope: "all", rebuild: false } });
|
|
665
|
+
if ("conflict" in result)
|
|
666
|
+
return false;
|
|
667
|
+
clearBackfillPending(absoluteConfigPath);
|
|
668
|
+
process.stderr.write(`Search by meaning: re-embedding the archive (job ${result.job.id})\n`);
|
|
669
|
+
return true;
|
|
670
|
+
};
|
|
671
|
+
if (!(await queueBackfill().catch(() => false))) {
|
|
672
|
+
const retry = setInterval(() => {
|
|
673
|
+
void queueBackfill()
|
|
674
|
+
.then((queued) => {
|
|
675
|
+
if (queued)
|
|
676
|
+
clearInterval(retry);
|
|
677
|
+
})
|
|
678
|
+
.catch(() => undefined);
|
|
679
|
+
}, 10 * 60 * 1000);
|
|
680
|
+
retry.unref();
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
//# sourceMappingURL=main.js.map
|