onadit 0.0.1 → 0.1.0-beta.45
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 +556 -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 +708 -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 +33 -0
- package/dist/src/diagnostics/codex-preflight.d.ts.map +1 -0
- package/dist/src/diagnostics/codex-preflight.js +99 -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 +71 -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 +61 -0
- package/dist/src/providers/codex-cli-model.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-model.js +194 -0
- package/dist/src/providers/codex-cli-model.js.map +1 -0
- package/dist/src/providers/codex-cli-runner.d.ts +60 -0
- package/dist/src/providers/codex-cli-runner.d.ts.map +1 -0
- package/dist/src/providers/codex-cli-runner.js +584 -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 +1473 -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 +474 -0
- package/dist/src/server/routes/friend-status.d.ts.map +1 -0
- package/dist/src/server/routes/friend-status.js +671 -0
- package/dist/src/server/routes/friend-status.js.map +1 -0
- package/dist/src/server/routes/ingest.d.ts +15 -0
- package/dist/src/server/routes/ingest.d.ts.map +1 -0
- package/dist/src/server/routes/ingest.js +142 -0
- package/dist/src/server/routes/ingest.js.map +1 -0
- package/dist/src/server/routes/jobs.d.ts +10 -0
- package/dist/src/server/routes/jobs.d.ts.map +1 -0
- package/dist/src/server/routes/jobs.js +29 -0
- package/dist/src/server/routes/jobs.js.map +1 -0
- package/dist/src/server/routes/mcp-usage.d.ts +17 -0
- package/dist/src/server/routes/mcp-usage.d.ts.map +1 -0
- package/dist/src/server/routes/mcp-usage.js +17 -0
- package/dist/src/server/routes/mcp-usage.js.map +1 -0
- package/dist/src/server/routes/reconcile.d.ts +4 -0
- package/dist/src/server/routes/reconcile.d.ts.map +1 -0
- package/dist/src/server/routes/reconcile.js +62 -0
- package/dist/src/server/routes/reconcile.js.map +1 -0
- package/dist/src/server/routes/reindex.d.ts +4 -0
- package/dist/src/server/routes/reindex.d.ts.map +1 -0
- package/dist/src/server/routes/reindex.js +77 -0
- package/dist/src/server/routes/reindex.js.map +1 -0
- package/dist/src/server/routes/retrieval-feedback.d.ts +3 -0
- package/dist/src/server/routes/retrieval-feedback.d.ts.map +1 -0
- package/dist/src/server/routes/retrieval-feedback.js +290 -0
- package/dist/src/server/routes/retrieval-feedback.js.map +1 -0
- package/dist/src/server/routes/save.d.ts +52 -0
- package/dist/src/server/routes/save.d.ts.map +1 -0
- package/dist/src/server/routes/save.js +127 -0
- package/dist/src/server/routes/save.js.map +1 -0
- package/dist/src/server/routes/search.d.ts +5 -0
- package/dist/src/server/routes/search.d.ts.map +1 -0
- package/dist/src/server/routes/search.js +689 -0
- package/dist/src/server/routes/search.js.map +1 -0
- package/dist/src/server/routes/setup.d.ts +46 -0
- package/dist/src/server/routes/setup.d.ts.map +1 -0
- package/dist/src/server/routes/setup.js +322 -0
- package/dist/src/server/routes/setup.js.map +1 -0
- package/dist/src/server/routes/stats.d.ts +10 -0
- package/dist/src/server/routes/stats.d.ts.map +1 -0
- package/dist/src/server/routes/stats.js +15 -0
- package/dist/src/server/routes/stats.js.map +1 -0
- package/dist/src/server/routes/status.d.ts +20 -0
- package/dist/src/server/routes/status.d.ts.map +1 -0
- package/dist/src/server/routes/status.js +31 -0
- package/dist/src/server/routes/status.js.map +1 -0
- package/dist/src/server/routes/triage.d.ts +4 -0
- package/dist/src/server/routes/triage.d.ts.map +1 -0
- package/dist/src/server/routes/triage.js +97 -0
- package/dist/src/server/routes/triage.js.map +1 -0
- package/dist/src/server/save-quality.d.ts +21 -0
- package/dist/src/server/save-quality.d.ts.map +1 -0
- package/dist/src/server/save-quality.js +51 -0
- package/dist/src/server/save-quality.js.map +1 -0
- package/dist/src/server/serving-marker.d.ts +85 -0
- package/dist/src/server/serving-marker.d.ts.map +1 -0
- package/dist/src/server/serving-marker.js +226 -0
- package/dist/src/server/serving-marker.js.map +1 -0
- package/dist/src/storage/atomic.d.ts +8 -0
- package/dist/src/storage/atomic.d.ts.map +1 -0
- package/dist/src/storage/atomic.js +22 -0
- package/dist/src/storage/atomic.js.map +1 -0
- package/dist/src/storage/chunk-backfill.d.ts +39 -0
- package/dist/src/storage/chunk-backfill.d.ts.map +1 -0
- package/dist/src/storage/chunk-backfill.js +295 -0
- package/dist/src/storage/chunk-backfill.js.map +1 -0
- package/dist/src/storage/db.d.ts +15 -0
- package/dist/src/storage/db.d.ts.map +1 -0
- package/dist/src/storage/db.js +47 -0
- package/dist/src/storage/db.js.map +1 -0
- package/dist/src/storage/filter.d.ts +42 -0
- package/dist/src/storage/filter.d.ts.map +1 -0
- package/dist/src/storage/filter.js +70 -0
- package/dist/src/storage/filter.js.map +1 -0
- package/dist/src/storage/fts.d.ts +47 -0
- package/dist/src/storage/fts.d.ts.map +1 -0
- package/dist/src/storage/fts.js +86 -0
- package/dist/src/storage/fts.js.map +1 -0
- package/dist/src/storage/integrity.d.ts +11 -0
- package/dist/src/storage/integrity.d.ts.map +1 -0
- package/dist/src/storage/integrity.js +66 -0
- package/dist/src/storage/integrity.js.map +1 -0
- package/dist/src/storage/maintenance.d.ts +27 -0
- package/dist/src/storage/maintenance.d.ts.map +1 -0
- package/dist/src/storage/maintenance.js +66 -0
- package/dist/src/storage/maintenance.js.map +1 -0
- package/dist/src/storage/rebuild.d.ts +71 -0
- package/dist/src/storage/rebuild.d.ts.map +1 -0
- package/dist/src/storage/rebuild.js +605 -0
- package/dist/src/storage/rebuild.js.map +1 -0
- package/dist/src/storage/report-card-backfill.d.ts +20 -0
- package/dist/src/storage/report-card-backfill.d.ts.map +1 -0
- package/dist/src/storage/report-card-backfill.js +114 -0
- package/dist/src/storage/report-card-backfill.js.map +1 -0
- package/dist/src/storage/shadow-swap.d.ts +20 -0
- package/dist/src/storage/shadow-swap.d.ts.map +1 -0
- package/dist/src/storage/shadow-swap.js +163 -0
- package/dist/src/storage/shadow-swap.js.map +1 -0
- package/dist/src/storage/tables.d.ts +147 -0
- package/dist/src/storage/tables.d.ts.map +1 -0
- package/dist/src/storage/tables.js +290 -0
- package/dist/src/storage/tables.js.map +1 -0
- package/operator/swiftbar/render-menu.py +475 -0
- package/operator/swiftbar/rift.10s.sh +201 -0
- package/package.json +57 -3
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native failure notifications for daemon-observed problems.
|
|
3
|
+
*
|
|
4
|
+
* A running daemon can see capture failures, expired Codex login, an
|
|
5
|
+
* invalid/failing Voyage key, and index-write failures. When one of
|
|
6
|
+
* those crosses into a failing state, the friend should get one calm
|
|
7
|
+
* macOS notification that points at the repair surface — not a wall of
|
|
8
|
+
* logs, and not a notification on every poll.
|
|
9
|
+
*
|
|
10
|
+
* What this module does NOT cover: a fully dead daemon cannot notify
|
|
11
|
+
* about itself. That needs a separate watchdog and is explicitly Slice D
|
|
12
|
+
* (see docs/feedback/2026-05-20-friend-onboarding-status-surface.md).
|
|
13
|
+
*
|
|
14
|
+
* Rate-limiting rules (status-surface plan + the 2026-06 flood fix):
|
|
15
|
+
* - Only user-ACTIONABLE kinds (FRIEND_NOTIFY_KINDS) ever reach a friend;
|
|
16
|
+
* transient/infra failures (probe timeouts, index/save errors) are
|
|
17
|
+
* operator-only — visible in `onadit doctor`/`status`, never a banner.
|
|
18
|
+
* - Notify on state transition, not every poll.
|
|
19
|
+
* - Do not repeat the same unresolved issue more than once per day — and the
|
|
20
|
+
* dedup memory SURVIVES a healthy run, so an intermittent failure
|
|
21
|
+
* (fail → heal → fail within 24h) notifies once, not on every recurrence.
|
|
22
|
+
* - After the cooldown elapses, a genuine later recurrence notifies fresh.
|
|
23
|
+
*
|
|
24
|
+
* The planning logic (`planNotifications`) is pure and fully tested; the
|
|
25
|
+
* IO (reading/writing dedup state, sending via osascript) is thin and
|
|
26
|
+
* best-effort so a notification failure can never break capture.
|
|
27
|
+
*/
|
|
28
|
+
import { execFile } from "node:child_process";
|
|
29
|
+
import fs from "node:fs";
|
|
30
|
+
import path from "node:path";
|
|
31
|
+
/** Re-notify cadence for an issue that stays unresolved. */
|
|
32
|
+
export const RENOTIFY_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
33
|
+
/**
|
|
34
|
+
* The only issue kinds that ever raise a friend-facing macOS banner — the
|
|
35
|
+
* user-ACTIONABLE failures, where the friend can sign in or add a key and the
|
|
36
|
+
* problem clears. Everything else (a transient codex/claude probe failure, an
|
|
37
|
+
* index-write or save error, a backend timeout) is operator-only: surfaced in
|
|
38
|
+
* `onadit doctor` / `onadit status` and the logs, never a banner, because a
|
|
39
|
+
* non-technical friend cannot act on it and Onadit retries it on its own.
|
|
40
|
+
*
|
|
41
|
+
* New kinds default to operator-only (fail-closed): add a kind here only when
|
|
42
|
+
* there is a safe, concrete action the friend can take.
|
|
43
|
+
*/
|
|
44
|
+
export const FRIEND_NOTIFY_KINDS = new Set([
|
|
45
|
+
"codex_auth_expired",
|
|
46
|
+
"claude_auth_expired",
|
|
47
|
+
"voyage_key_missing",
|
|
48
|
+
// NOT voyage_embed_errors: "key present but embedding failed" is not cleanly
|
|
49
|
+
// friend-actionable — it spans an invalid key AND a network/provider flake.
|
|
50
|
+
// It stays operator-only until the cause is split into its own kind
|
|
51
|
+
// (voyage_key_invalid → friend banner, voyage_embed_errors → operator).
|
|
52
|
+
]);
|
|
53
|
+
/** Cause identity for an issue: explicit fingerprint, else its kind. */
|
|
54
|
+
function issueFingerprint(issue) {
|
|
55
|
+
return issue.fingerprint ?? issue.kind;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Build the friend-facing notification for an issue. Pure. The title is
|
|
59
|
+
* intentionally constant ("Onadit needs attention") so the friend learns
|
|
60
|
+
* to recognise it; the subtitle and body carry the specifics.
|
|
61
|
+
*/
|
|
62
|
+
export function buildNotificationPayload(issue) {
|
|
63
|
+
return {
|
|
64
|
+
title: "Onadit needs attention",
|
|
65
|
+
subtitle: issue.title,
|
|
66
|
+
message: issue.nextAction,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Decide which notifications to send this tick and what state to persist.
|
|
71
|
+
* Pure: no IO, no clock except the injected `now`.
|
|
72
|
+
*
|
|
73
|
+
* Eligible issues are the intersection of `daemonObservable` (the daemon can
|
|
74
|
+
* see them) and `FRIEND_NOTIFY_KINDS` (the friend can act on them) — so a
|
|
75
|
+
* transient probe/index/save failure never reaches a banner.
|
|
76
|
+
*
|
|
77
|
+
* The dedup memory survives a healthy run: a record is retained until its 24h
|
|
78
|
+
* cooldown elapses, even on ticks where the issue is absent. That is the flood
|
|
79
|
+
* fix — without it, one healthy poll wiped the "already warned you" memory and
|
|
80
|
+
* the next recurrence re-notified, defeating the daily limit.
|
|
81
|
+
*/
|
|
82
|
+
export function planNotifications(input) {
|
|
83
|
+
const { issues, state, now } = input;
|
|
84
|
+
const eligible = issues.filter((i) => i.daemonObservable && FRIEND_NOTIFY_KINDS.has(i.kind));
|
|
85
|
+
const presentKinds = new Set(eligible.map((i) => i.kind));
|
|
86
|
+
const notifications = [];
|
|
87
|
+
const nextActive = {};
|
|
88
|
+
// Carry over prior records for kinds NOT failing this tick, as long as their
|
|
89
|
+
// cooldown window has not elapsed. This keeps the "already warned" memory
|
|
90
|
+
// alive across a healthy run, so an intermittent failure notifies once per
|
|
91
|
+
// day rather than on every recurrence. Expired records are dropped, so a
|
|
92
|
+
// genuine later recurrence notifies fresh.
|
|
93
|
+
for (const [kind, record] of Object.entries(state.active)) {
|
|
94
|
+
if (presentKinds.has(kind))
|
|
95
|
+
continue;
|
|
96
|
+
const lastMs = Date.parse(record.last_notified_at);
|
|
97
|
+
const fresh = !Number.isNaN(lastMs) && now - lastMs < RENOTIFY_INTERVAL_MS;
|
|
98
|
+
if (fresh)
|
|
99
|
+
nextActive[kind] = record;
|
|
100
|
+
}
|
|
101
|
+
for (const issue of eligible) {
|
|
102
|
+
const prior = state.active[issue.kind];
|
|
103
|
+
const fingerprint = issueFingerprint(issue);
|
|
104
|
+
const notify = () => {
|
|
105
|
+
notifications.push(buildNotificationPayload(issue));
|
|
106
|
+
nextActive[issue.kind] = {
|
|
107
|
+
last_notified_at: new Date(now).toISOString(),
|
|
108
|
+
fingerprint,
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
if (!prior) {
|
|
112
|
+
// First transition into failure → notify.
|
|
113
|
+
notify();
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
// The cause changed under the same subsystem (e.g. a Voyage network
|
|
117
|
+
// blip became a provider rejection). The action and risk differ, so
|
|
118
|
+
// treat it as a fresh failure rather than a still-unresolved repeat.
|
|
119
|
+
if ((prior.fingerprint ?? issue.kind) !== fingerprint) {
|
|
120
|
+
notify();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const priorMs = Date.parse(prior.last_notified_at);
|
|
124
|
+
const stale = Number.isNaN(priorMs) || now - priorMs >= RENOTIFY_INTERVAL_MS;
|
|
125
|
+
if (stale) {
|
|
126
|
+
// Still failing, same cause, a day later → re-notify once.
|
|
127
|
+
notify();
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// Already notified within the window → stay quiet, keep the record.
|
|
131
|
+
nextActive[issue.kind] = prior;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return { notifications, nextState: { active: nextActive } };
|
|
135
|
+
}
|
|
136
|
+
/** Absolute path to the dedup-state file under the data dir. */
|
|
137
|
+
export function notifyStatePath(dataDir) {
|
|
138
|
+
return path.join(dataDir, "observability", "notifications.json");
|
|
139
|
+
}
|
|
140
|
+
/** Read dedup state; returns empty state on any read/parse failure. */
|
|
141
|
+
export function readNotifyState(dataDir) {
|
|
142
|
+
try {
|
|
143
|
+
const raw = fs.readFileSync(notifyStatePath(dataDir), "utf8");
|
|
144
|
+
const parsed = JSON.parse(raw);
|
|
145
|
+
if (parsed && typeof parsed === "object" && parsed.active) {
|
|
146
|
+
return { active: parsed.active };
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
// fall through
|
|
151
|
+
}
|
|
152
|
+
return { active: {} };
|
|
153
|
+
}
|
|
154
|
+
/** Persist dedup state best-effort; swallows IO errors. */
|
|
155
|
+
export function writeNotifyState(dataDir, state) {
|
|
156
|
+
try {
|
|
157
|
+
const file = notifyStatePath(dataDir);
|
|
158
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
159
|
+
fs.writeFileSync(file, JSON.stringify(state, null, 2) + "\n", "utf8");
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// best-effort: a failed write just means we may re-notify next tick.
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Send a single notification via macOS `osascript`. Best-effort and
|
|
167
|
+
* fire-and-forget — any failure (non-macOS, osascript missing, user has
|
|
168
|
+
* notifications disabled) is swallowed so capture is never affected.
|
|
169
|
+
*
|
|
170
|
+
* Strings are passed as argv to `execFile` (not interpolated into a
|
|
171
|
+
* shell), and AppleScript string literals are escaped, so notification
|
|
172
|
+
* text cannot inject shell or AppleScript.
|
|
173
|
+
*/
|
|
174
|
+
export function sendNotification(payload, opts = {}) {
|
|
175
|
+
const platform = opts.platform ?? process.platform;
|
|
176
|
+
if (platform !== "darwin")
|
|
177
|
+
return;
|
|
178
|
+
const script = `display notification ${asAppleScriptString(payload.message)} ` +
|
|
179
|
+
`with title ${asAppleScriptString(payload.title)} ` +
|
|
180
|
+
`subtitle ${asAppleScriptString(payload.subtitle)}`;
|
|
181
|
+
try {
|
|
182
|
+
execFile("osascript", ["-e", script], () => {
|
|
183
|
+
// ignore stdout/stderr/exit — best-effort.
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
// ignore spawn errors entirely.
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/** Escape a string into an AppleScript double-quoted literal. */
|
|
191
|
+
export function asAppleScriptString(value) {
|
|
192
|
+
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* End-to-end daemon helper: given the diagnosed issues, send any due
|
|
196
|
+
* notifications and persist updated dedup state. Best-effort throughout
|
|
197
|
+
* — wired into the capture loop, so it must never throw.
|
|
198
|
+
*/
|
|
199
|
+
export function notifyDaemonFailures(dataDir, issues, opts = {}) {
|
|
200
|
+
try {
|
|
201
|
+
const now = opts.now ?? Date.now();
|
|
202
|
+
const state = readNotifyState(dataDir);
|
|
203
|
+
const { notifications, nextState } = planNotifications({
|
|
204
|
+
issues,
|
|
205
|
+
state,
|
|
206
|
+
now,
|
|
207
|
+
});
|
|
208
|
+
for (const payload of notifications) {
|
|
209
|
+
sendNotification(payload, opts.platform ? { platform: opts.platform } : {});
|
|
210
|
+
}
|
|
211
|
+
writeNotifyState(dataDir, nextState);
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
// best-effort: never let notification logic break the daemon.
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/diagnostics/notify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAExD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAiC,IAAI,GAAG,CAAC;IACvE,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,6EAA6E;IAC7E,4EAA4E;IAC5E,oEAAoE;IACpE,wEAAwE;CACzE,CAAC,CAAC;AAkCH,wEAAwE;AACxE,SAAS,gBAAgB,CAAC,KAAkB;IAC1C,OAAO,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC;AACzC,CAAC;AAiBD;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CACtC,KAAkB;IAElB,OAAO;QACL,KAAK,EAAE,wBAAwB;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/**
|
|
2
|
+
* Redacted repair-prompt generator for `onadit doctor --copy-prompt`.
|
|
3
|
+
*
|
|
4
|
+
* The output is designed to be pasted straight into Claude or Codex and
|
|
5
|
+
* be safe to do so. It carries enough state to debug Onadit but never
|
|
6
|
+
* leaks a secret, and it forbids destructive repair so an over-eager
|
|
7
|
+
* assistant cannot wipe the user's memory.
|
|
8
|
+
*
|
|
9
|
+
* Redaction contract (see the friend-onboarding status-surface plan):
|
|
10
|
+
* - Never include full Voyage keys, auth tokens, bearer tokens, or raw
|
|
11
|
+
* private conversation content.
|
|
12
|
+
* - Voyage keys appear only as a last-4 fingerprint, and only when one
|
|
13
|
+
* is known locally.
|
|
14
|
+
* - Local paths are allowed only when they help repair (data + log
|
|
15
|
+
* locations), because they are not secrets and the assistant needs
|
|
16
|
+
* them to inspect the right folder.
|
|
17
|
+
*
|
|
18
|
+
* Safety contract:
|
|
19
|
+
* - Tell the assistant to inspect before changing anything.
|
|
20
|
+
* - Prefer commands that inspect/repair over commands that reset.
|
|
21
|
+
* - Explicitly forbid destructive resets and
|
|
22
|
+
* `onadit uninstall --purge-data`.
|
|
23
|
+
*
|
|
24
|
+
* This module is pure (no IO). Centralizing prompt generation here —
|
|
25
|
+
* rather than in the SwiftBar script or the CLI command — keeps
|
|
26
|
+
* redaction, status interpretation, and future issue classes in one
|
|
27
|
+
* place (Slice C's menu bar will call this same generator).
|
|
28
|
+
*/
|
|
29
|
+
import type { FriendStatusPayload } from "../server/routes/friend-status.js";
|
|
30
|
+
import type { DoctorLocalSignals, DoctorReport } from "./doctor.js";
|
|
31
|
+
export type RepairTarget = "claude" | "codex";
|
|
32
|
+
export interface RepairPromptInput {
|
|
33
|
+
report: DoctorReport;
|
|
34
|
+
status: FriendStatusPayload | null;
|
|
35
|
+
localSignals: DoctorLocalSignals;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Commands the assistant must never run from this prompt. Kept as data
|
|
39
|
+
* so the test suite can assert every one is named in the rendered
|
|
40
|
+
* "Constraints" block.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FORBIDDEN_COMMANDS: readonly string[];
|
|
43
|
+
/**
|
|
44
|
+
* Build the repair prompt. `target` only changes which assistant the
|
|
45
|
+
* prompt addresses; the state and safety rules are identical so neither
|
|
46
|
+
* tool can be talked into something the other forbids.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildRepairPrompt(input: RepairPromptInput, target: RepairTarget): string;
|
|
49
|
+
//# sourceMappingURL=repair-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repair-prompt.d.ts","sourceRoot":"","sources":["../../../src/diagnostics/repair-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,kBAAkB,CAAC;CAClC;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAI/C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,YAAY,GACnB,MAAM,CAsER"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands the assistant must never run from this prompt. Kept as data
|
|
3
|
+
* so the test suite can assert every one is named in the rendered
|
|
4
|
+
* "Constraints" block.
|
|
5
|
+
*/
|
|
6
|
+
export const FORBIDDEN_COMMANDS = [
|
|
7
|
+
"onadit uninstall --purge-data",
|
|
8
|
+
"onadit rebuild --reset",
|
|
9
|
+
"rm -rf",
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Build the repair prompt. `target` only changes which assistant the
|
|
13
|
+
* prompt addresses; the state and safety rules are identical so neither
|
|
14
|
+
* tool can be talked into something the other forbids.
|
|
15
|
+
*/
|
|
16
|
+
export function buildRepairPrompt(input, target) {
|
|
17
|
+
const { report, status, localSignals } = input;
|
|
18
|
+
const assistant = target === "claude" ? "Claude" : "Codex";
|
|
19
|
+
// Open with the right severity. "Onadit is not healthy" is correct only
|
|
20
|
+
// when something is actually broken; a warning-only state (e.g. large
|
|
21
|
+
// sessions parked, an available update) must not tell the user their
|
|
22
|
+
// Onadit is broken — that copy erodes trust on a working install.
|
|
23
|
+
const hasBroken = report.issues.some((i) => i.severity === "broken");
|
|
24
|
+
const onlyParked = !hasBroken &&
|
|
25
|
+
report.issues.some((i) => i.kind === "capture_quarantined" || i.kind === "capture_repairing");
|
|
26
|
+
const opener = hasBroken
|
|
27
|
+
? `Onadit is not healthy on this Mac. Please help me fix it, ${assistant}.`
|
|
28
|
+
: onlyParked
|
|
29
|
+
? `Onadit is working, but some large Codex sessions are not searchable yet. ` +
|
|
30
|
+
`Please help me recover them, ${assistant}.`
|
|
31
|
+
: `Onadit is working, but a few things could use attention. ` +
|
|
32
|
+
`Please help me sort them out, ${assistant}.`;
|
|
33
|
+
const lines = [];
|
|
34
|
+
lines.push(opener);
|
|
35
|
+
lines.push("");
|
|
36
|
+
// --- Symptoms: the diagnosed issues, plain-language, no secrets. ---
|
|
37
|
+
lines.push("Symptoms:");
|
|
38
|
+
if (report.issues.length === 0) {
|
|
39
|
+
lines.push("- onadit doctor found no specific broken signal, but I think something " +
|
|
40
|
+
"is off. Please investigate.");
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
for (const issue of report.issues) {
|
|
44
|
+
lines.push(`- ${issue.title}. ${issue.detail}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
lines.push("");
|
|
48
|
+
// --- State: redacted, debug-useful facts. ---
|
|
49
|
+
lines.push("Current state:");
|
|
50
|
+
for (const line of renderStateLines(report, status, localSignals)) {
|
|
51
|
+
lines.push(`- ${line}`);
|
|
52
|
+
}
|
|
53
|
+
lines.push("");
|
|
54
|
+
// --- Inspect-first checklist, ordered by the primary issue. ---
|
|
55
|
+
lines.push("Start by inspecting, in this order:");
|
|
56
|
+
let step = 1;
|
|
57
|
+
lines.push(`${step++}. \`onadit status\` — confirm the current state for yourself.`);
|
|
58
|
+
lines.push(`${step++}. \`onadit doctor\` — read the plain-language diagnosis.`);
|
|
59
|
+
for (const cmd of inspectionCommandsFor(report)) {
|
|
60
|
+
lines.push(`${step++}. ${cmd}`);
|
|
61
|
+
}
|
|
62
|
+
lines.push(`${step++}. Onadit logs only if the above is not enough.`);
|
|
63
|
+
lines.push("");
|
|
64
|
+
// --- Hard constraints. ---
|
|
65
|
+
lines.push("Constraints:");
|
|
66
|
+
lines.push("- Explain the failure to me in plain English BEFORE changing anything.");
|
|
67
|
+
lines.push("- Inspect first; prefer commands that inspect and repair over commands that reset.");
|
|
68
|
+
lines.push("- Do not print or echo secrets (Voyage key, tokens).");
|
|
69
|
+
lines.push("- Do not delete or reset my Onadit data.");
|
|
70
|
+
for (const forbidden of FORBIDDEN_COMMANDS) {
|
|
71
|
+
lines.push(`- Do not run \`${forbidden}\`.`);
|
|
72
|
+
}
|
|
73
|
+
lines.push("- If a fix is risky or irreversible, stop and ask me first.");
|
|
74
|
+
return lines.join("\n");
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Render the redacted "Current state" facts. Every value here is either
|
|
78
|
+
* non-sensitive (versions, ports, booleans, ages) or already reduced to
|
|
79
|
+
* a safe fingerprint (Voyage last-4). Raw keys, tokens, and conversation
|
|
80
|
+
* content never reach this function.
|
|
81
|
+
*/
|
|
82
|
+
function renderStateLines(report, status, localSignals) {
|
|
83
|
+
const out = [];
|
|
84
|
+
if (!status) {
|
|
85
|
+
// The reason /status/friend could not be read drives the state copy:
|
|
86
|
+
// "not responding" is only true for a genuinely down daemon, not for
|
|
87
|
+
// an auth/config failure where the daemon may be perfectly alive.
|
|
88
|
+
switch (report.primary?.kind) {
|
|
89
|
+
case "config_missing":
|
|
90
|
+
out.push("Onadit config: missing (could not resolve the daemon URL).");
|
|
91
|
+
out.push("This Mac looks like onboarding never completed.");
|
|
92
|
+
break;
|
|
93
|
+
case "daemon_auth_failed":
|
|
94
|
+
out.push("Onadit daemon: reachable, but this command could not authenticate " +
|
|
95
|
+
"to it (missing or rejected token). The daemon itself may be fine.");
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
out.push("Onadit daemon: not responding (could not reach /status/friend).");
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
out.push("Expected daemon label: com.getrift.daemon (managed by launchd on port 3577).");
|
|
102
|
+
out.push(voyageFingerprintLine(localSignals));
|
|
103
|
+
out.push(mcpLine(localSignals));
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
out.push(`Onadit version: ${status.build.version} (node ${status.build.node}).`);
|
|
107
|
+
out.push(`Daemon: running on port ${status.daemon.port}, up ${formatSeconds(status.daemon.uptime_seconds)}.`);
|
|
108
|
+
// data_dir is a local path, not a secret, and the assistant needs it
|
|
109
|
+
// to inspect the right data root (a stale Application Support copy is
|
|
110
|
+
// a real false-alarm source).
|
|
111
|
+
out.push(`Data directory: ${status.daemon.data_dir}`);
|
|
112
|
+
out.push(`Voyage key present in daemon env: ${status.daemon.voyage_key_present ? "yes" : "no"}.`);
|
|
113
|
+
out.push(voyageFingerprintLine(localSignals));
|
|
114
|
+
if (status.voyage.last_embed_at) {
|
|
115
|
+
out.push(`Last successful embed: ${status.voyage.last_embed_at}.`);
|
|
116
|
+
}
|
|
117
|
+
if (status.voyage.last_error_at) {
|
|
118
|
+
out.push(`Last Voyage error: ${status.voyage.last_error_at} (${status.voyage.last_error_reason ?? "unknown"}).`);
|
|
119
|
+
}
|
|
120
|
+
if (status.index.last_update_at) {
|
|
121
|
+
out.push(`Last index write: ${status.index.last_update_at}.`);
|
|
122
|
+
}
|
|
123
|
+
if (status.index.last_error_at) {
|
|
124
|
+
out.push(`Last index error: ${status.index.last_error_at} (${status.index.last_error_reason ?? "unknown"}).`);
|
|
125
|
+
}
|
|
126
|
+
out.push(`Codex CLI auth: ${codexAuthLabel(status.codex.last_preflight_ok)}${status.codex.last_preflight_at
|
|
127
|
+
? ` (last checked ${status.codex.last_preflight_at})`
|
|
128
|
+
: ""}.`);
|
|
129
|
+
if (status.capture.last_run_at) {
|
|
130
|
+
out.push(`Last capture run: ${status.capture.last_run_at} — ${status.capture.last_saved} saved, ` +
|
|
131
|
+
`${status.capture.last_review} for review, ${status.capture.last_errors} errors.`);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
out.push("Last capture run: none yet.");
|
|
135
|
+
}
|
|
136
|
+
out.push(mcpLine(localSignals));
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
139
|
+
function voyageFingerprintLine(localSignals) {
|
|
140
|
+
return localSignals.voyageLast4
|
|
141
|
+
? `Voyage key fingerprint (last 4 only): …${localSignals.voyageLast4}.`
|
|
142
|
+
: "Voyage key fingerprint: not found locally.";
|
|
143
|
+
}
|
|
144
|
+
function mcpLine(localSignals) {
|
|
145
|
+
if (localSignals.mcpClients.length === 0) {
|
|
146
|
+
return "MCP clients: none detected.";
|
|
147
|
+
}
|
|
148
|
+
const parts = localSignals.mcpClients.map((c) => `${c.client}=${c.installed ? "connected" : "not connected"}`);
|
|
149
|
+
return `MCP clients: ${parts.join(", ")}.`;
|
|
150
|
+
}
|
|
151
|
+
function codexAuthLabel(ok) {
|
|
152
|
+
if (ok === null)
|
|
153
|
+
return "unknown (not checked yet)";
|
|
154
|
+
return ok ? "looks authenticated" : "appears expired";
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Issue-specific inspection commands, deduped and ordered by the issues
|
|
158
|
+
* present. Inspection/repair only — nothing here resets state.
|
|
159
|
+
*/
|
|
160
|
+
function inspectionCommandsFor(report) {
|
|
161
|
+
const cmds = [];
|
|
162
|
+
const seen = new Set();
|
|
163
|
+
const add = (cmd) => {
|
|
164
|
+
if (!seen.has(cmd)) {
|
|
165
|
+
seen.add(cmd);
|
|
166
|
+
cmds.push(cmd);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
for (const issue of report.issues) {
|
|
170
|
+
switch (issue.kind) {
|
|
171
|
+
case "daemon_unreachable":
|
|
172
|
+
add("`launchctl print gui/$UID/com.getrift.daemon` — check the daemon is loaded and not crash-looping.");
|
|
173
|
+
break;
|
|
174
|
+
case "daemon_auth_failed":
|
|
175
|
+
add("`onadit token issue` — re-issue an access token (the existing one is missing or rejected); do not restart the daemon for this.");
|
|
176
|
+
break;
|
|
177
|
+
case "config_missing":
|
|
178
|
+
add("`onadit onboard` — finish setup; there is no config for this command to read yet.");
|
|
179
|
+
break;
|
|
180
|
+
case "codex_auth_expired":
|
|
181
|
+
add("`codex login` — re-authenticate the codex CLI, then `onadit capture`.");
|
|
182
|
+
break;
|
|
183
|
+
case "codex_preflight_failed":
|
|
184
|
+
add("Codex capture probe failed (NOT an auth problem — do not re-run `codex login`). If it mentions a rejected model, set `codex_cli.model` in the Onadit config to a supported model; otherwise it is usually a transient backend/timeout — re-run `onadit capture`.");
|
|
185
|
+
break;
|
|
186
|
+
case "voyage_key_missing":
|
|
187
|
+
case "voyage_embed_errors":
|
|
188
|
+
add("`onadit onboard --reconfigure-voyage` — re-check the Voyage key (it will not be printed).");
|
|
189
|
+
break;
|
|
190
|
+
case "index_write_errors":
|
|
191
|
+
add("`onadit reindex` — only after confirming the cause; this rebuilds the index, it does not delete data.");
|
|
192
|
+
break;
|
|
193
|
+
case "capture_failed":
|
|
194
|
+
add("`onadit capture` — re-run capture and read the per-session output.");
|
|
195
|
+
break;
|
|
196
|
+
case "capture_quarantined":
|
|
197
|
+
case "capture_repairing":
|
|
198
|
+
// Onadit self-repairs these in the background, but a user who is
|
|
199
|
+
// explicitly assembling a repair prompt wants the manual escape hatch
|
|
200
|
+
// named — it is idempotent and non-destructive, so it is safe to run
|
|
201
|
+
// even while a background pass is in flight.
|
|
202
|
+
add("`onadit doctor repair capture-large-sessions` — summarize and save the oversized sessions Onadit had to skip; it reads them in safe chunks and does not delete or modify the originals.");
|
|
203
|
+
break;
|
|
204
|
+
default:
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return cmds;
|
|
209
|
+
}
|
|
210
|
+
function formatSeconds(seconds) {
|
|
211
|
+
if (seconds < 60)
|
|
212
|
+
return `${seconds}s`;
|
|
213
|
+
const minutes = Math.floor(seconds / 60);
|
|
214
|
+
if (minutes < 60)
|
|
215
|
+
return `${minutes}m`;
|
|
216
|
+
const hours = Math.floor(minutes / 60);
|
|
217
|
+
const remMin = minutes % 60;
|
|
218
|
+
if (hours < 24)
|
|
219
|
+
return remMin > 0 ? `${hours}h ${remMin}m` : `${hours}h`;
|
|
220
|
+
const days = Math.floor(hours / 24);
|
|
221
|
+
return `${days}d`;
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=repair-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repair-prompt.js","sourceRoot":"","sources":["../../../src/diagnostics/repair-prompt.ts"],"names":[],"mappings":"AAuCA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD,+BAA+B;IAC/B,wBAAwB;IACxB,QAAQ;CACT,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAwB,EACxB,MAAoB;IAEpB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC/C,MAAM,SAAS,GAAG,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;IAE3D,wEAAwE;IACxE,sEAAsE;IACtE,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AM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,GAAG,CAAC;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,OAAO,GAAG,EAAE,CAAC;IAC5B,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,GAAG,IAAI,GAAG,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bulk-ingest — Slice 19.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from the CLI command module. The bulk-ingest feature is
|
|
5
|
+
* implemented as a CLI command (src/cli/commands/bulk-ingest.ts) that
|
|
6
|
+
* calls the daemon's POST /ingest endpoint, reusing the same secure
|
|
7
|
+
* ingest pipeline (archive security, parser validation, extraction,
|
|
8
|
+
* quarantine) rather than duplicating it.
|
|
9
|
+
*/
|
|
10
|
+
export { makeBulkIngestCommand } from "../cli/commands/bulk-ingest.js";
|
|
11
|
+
//# sourceMappingURL=bulk-ingest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-ingest.d.ts","sourceRoot":"","sources":["../../../src/ingestion/bulk-ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bulk-ingest — Slice 19.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from the CLI command module. The bulk-ingest feature is
|
|
5
|
+
* implemented as a CLI command (src/cli/commands/bulk-ingest.ts) that
|
|
6
|
+
* calls the daemon's POST /ingest endpoint, reusing the same secure
|
|
7
|
+
* ingest pipeline (archive security, parser validation, extraction,
|
|
8
|
+
* quarantine) rather than duplicating it.
|
|
9
|
+
*/
|
|
10
|
+
export { makeBulkIngestCommand } from "../cli/commands/bulk-ingest.js";
|
|
11
|
+
//# sourceMappingURL=bulk-ingest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-ingest.js","sourceRoot":"","sources":["../../../src/ingestion/bulk-ingest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single source of truth for chunk MARKERS — how a row declares it is one
|
|
3
|
+
* piece of a larger logical document/conversation, and how readers recover the
|
|
4
|
+
* parent grouping. Every producer (indexer, save, ingest, rebuild) and every
|
|
5
|
+
* consumer (retrieval grouping, reconcile, dedup) imports from here, so there is
|
|
6
|
+
* exactly one marker contract.
|
|
7
|
+
*
|
|
8
|
+
* Representation:
|
|
9
|
+
* - Conversations carry explicit columns `parent_id`, `chunk_index`,
|
|
10
|
+
* `chunk_count` (all strings; empty = legacy/unchunked).
|
|
11
|
+
* - Documents carry `chunk_index` / `chunk_count` inside the existing
|
|
12
|
+
* `metadata` JSON; the parent key is the already-indexed `source_path`.
|
|
13
|
+
*
|
|
14
|
+
* The explicit `chunk_count` IS the marker: `chunk_count > 1` means "this row is
|
|
15
|
+
* part of a chunk set". A row WITHOUT that marker is never grouped — sharing a
|
|
16
|
+
* `source_path` or `idempotency_key` alone must not cause a collapse. Ordinals
|
|
17
|
+
* are stored explicitly (not parsed out of the row id), so completeness checks
|
|
18
|
+
* and honest "section k of N" display never treat the id as the source of truth.
|
|
19
|
+
*/
|
|
20
|
+
import type { TableName } from "../storage/tables.js";
|
|
21
|
+
export interface ChunkMarker {
|
|
22
|
+
/** Parent key value: `source_path` for docs, `parent_id` for conversations. */
|
|
23
|
+
parentId: string;
|
|
24
|
+
/** 0-based ordinal within the set. */
|
|
25
|
+
index: number;
|
|
26
|
+
/** Total chunks in the set (> 1 when this is genuinely chunked). */
|
|
27
|
+
count: number;
|
|
28
|
+
}
|
|
29
|
+
/** Separators for chunk row ids. Distinct per family for readability; ids are
|
|
30
|
+
* unique either way and are NOT load-bearing for ordering (use chunk_index). */
|
|
31
|
+
export declare const DOC_CHUNK_SEP = ":";
|
|
32
|
+
export declare const CONV_CHUNK_SEP = "::";
|
|
33
|
+
/** Read the chunk marker from a conversation row, or null if unchunked/legacy. */
|
|
34
|
+
export declare function readConversationChunkMarker(row: Record<string, unknown>): ChunkMarker | null;
|
|
35
|
+
/** Read the chunk marker from a structured-doc row, or null if unchunked/legacy. */
|
|
36
|
+
export declare function readDocChunkMarker(row: Record<string, unknown>): ChunkMarker | null;
|
|
37
|
+
/**
|
|
38
|
+
* Namespaced parent key for retrieval grouping, or `null` when the row carries
|
|
39
|
+
* NO explicit chunk marker (the flag-off / legacy case — never grouped).
|
|
40
|
+
*
|
|
41
|
+
* Namespacing guarantees mixed-vintage / cross-table rows can never collapse:
|
|
42
|
+
* - docs → `doc|<source_table>|<source_path>` (so `structured_docs` vs
|
|
43
|
+
* `structured_docs_local` with the same path stay separate)
|
|
44
|
+
* - convs → `conv|<source>|<parent_id>`
|
|
45
|
+
*/
|
|
46
|
+
export declare function parentKeyForRow(sourceTable: TableName, row: Record<string, unknown>): string | null;
|
|
47
|
+
/** True iff the row is part of a genuine chunk set (`chunk_count > 1`). */
|
|
48
|
+
export declare function isChunked(sourceTable: TableName, row: Record<string, unknown>): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Unified chunk-marker reader across the conversation and document families,
|
|
51
|
+
* or `null` for an unchunked/legacy row (no marker / `chunk_count <= 1`) and for
|
|
52
|
+
* digests (which never chunk). Lets the read-side (expand stitching) inspect a
|
|
53
|
+
* row's position in its set without re-deriving the per-family column vs metadata
|
|
54
|
+
* split. `parentId` is the raw column value (`parent_id` / `source_path`), not the
|
|
55
|
+
* namespaced retrieval key.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readChunkMarker(sourceTable: TableName, row: Record<string, unknown>): ChunkMarker | null;
|
|
58
|
+
/** Conversation chunk columns. count <= 1 → empty markers (matches seed/legacy). */
|
|
59
|
+
export declare function conversationChunkColumns(parentId: string, index: number, count: number): {
|
|
60
|
+
parent_id: string;
|
|
61
|
+
chunk_index: string;
|
|
62
|
+
chunk_count: string;
|
|
63
|
+
};
|
|
64
|
+
/** Merge chunk ordinals into a doc metadata object. count <= 1 → unchanged
|
|
65
|
+
* (NO `chunk_*` keys), so a single/legacy doc stays byte-identical. */
|
|
66
|
+
export declare function docChunkMetadata(base: Record<string, unknown>, index: number, count: number): Record<string, unknown>;
|
|
67
|
+
export declare function convChunkId(parentId: string, index: number): string;
|
|
68
|
+
export declare function docChunkId(fileId: string, index: number): string;
|
|
69
|
+
/** The largest declared `chunk_count` across a set of rows (≥ 1). */
|
|
70
|
+
export declare function expectedChunkCount(rows: Record<string, unknown>[]): number;
|
|
71
|
+
/**
|
|
72
|
+
* True iff the rows already indexed for a parent form a COMPLETE set. Used by
|
|
73
|
+
* save/ingest/reconcile dedup so a partially-written set (crash mid-append) is
|
|
74
|
+
* repaired rather than mistaken for "already indexed".
|
|
75
|
+
*
|
|
76
|
+
* Completeness is stricter than a row count: a chunked set is complete only when
|
|
77
|
+
* every chunk index `0 .. count-1` is present EXACTLY once and every row agrees
|
|
78
|
+
* on the same `chunk_count`. This rejects the degenerate set that a bare
|
|
79
|
+
* `rows.length >= count` check would wave through — e.g. a duplicated chunk 0
|
|
80
|
+
* with a missing chunk 1 (length 2, count 2, but broken). An unchunked set
|
|
81
|
+
* (`count <= 1`, all legacy/`/ingest`-job rows) keeps the legacy semantics: any
|
|
82
|
+
* existing row counts as complete, so this never changes flag-off behavior.
|
|
83
|
+
*/
|
|
84
|
+
export declare function chunkSetComplete(rows: Record<string, unknown>[]): boolean;
|
|
85
|
+
//# sourceMappingURL=chunk-meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-meta.d.ts","sourceRoot":"","sources":["../../../src/ingestion/chunk-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;iFACiF;AACjF,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,cAAc,OAAO,CAAC;AAgCnC,kFAAkF;AAClF,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,WAAW,GAAG,IAAI,CAMpB;AAED,oFAAoF;AACpF,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,WAAW,GAAG,IAAI,CAQpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,SAAS,EACtB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,MAAM,GAAG,IAAI,CAaf;AAED,2EAA2E;AAC3E,wBAAgB,SAAS,CACvB,WAAW,EAAE,SAAS,EACtB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,OAAO,CAET;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,SAAS,EACtB,GAAG,EAAE,MAAM,CAAC,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