@getrift/rift 0.1.0-beta.2 → 0.1.0-beta.20
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.md +35 -9
- package/dist/src/auth/keychain.d.ts +9 -0
- package/dist/src/auth/keychain.d.ts.map +1 -1
- package/dist/src/auth/keychain.js +37 -0
- package/dist/src/auth/keychain.js.map +1 -1
- package/dist/src/capture/auto-capture.d.ts +7 -0
- package/dist/src/capture/auto-capture.d.ts.map +1 -1
- package/dist/src/capture/auto-capture.js +82 -15
- package/dist/src/capture/auto-capture.js.map +1 -1
- package/dist/src/capture/auto-repair.d.ts +110 -0
- package/dist/src/capture/auto-repair.d.ts.map +1 -0
- package/dist/src/capture/auto-repair.js +269 -0
- package/dist/src/capture/auto-repair.js.map +1 -0
- package/dist/src/capture/codex-cli-triage-provider.d.ts.map +1 -1
- package/dist/src/capture/codex-cli-triage-provider.js +4 -3
- package/dist/src/capture/codex-cli-triage-provider.js.map +1 -1
- package/dist/src/capture/observability.d.ts +42 -0
- package/dist/src/capture/observability.d.ts.map +1 -1
- package/dist/src/capture/observability.js +45 -4
- package/dist/src/capture/observability.js.map +1 -1
- package/dist/src/capture/recover-quarantine.d.ts +260 -0
- package/dist/src/capture/recover-quarantine.d.ts.map +1 -0
- package/dist/src/capture/recover-quarantine.js +522 -0
- package/dist/src/capture/recover-quarantine.js.map +1 -0
- package/dist/src/cli/commands/backfill.d.ts.map +1 -1
- package/dist/src/cli/commands/backfill.js +5 -2
- package/dist/src/cli/commands/backfill.js.map +1 -1
- 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 +184 -0
- package/dist/src/cli/commands/capture-recover.js.map +1 -0
- package/dist/src/cli/commands/capture.d.ts.map +1 -1
- package/dist/src/cli/commands/capture.js +96 -5
- package/dist/src/cli/commands/capture.js.map +1 -1
- 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 +242 -0
- package/dist/src/cli/commands/doctor.js.map +1 -0
- package/dist/src/cli/commands/feedback.d.ts +12 -0
- package/dist/src/cli/commands/feedback.d.ts.map +1 -1
- package/dist/src/cli/commands/feedback.js +93 -4
- package/dist/src/cli/commands/feedback.js.map +1 -1
- package/dist/src/cli/commands/mcp-install.js +5 -2
- package/dist/src/cli/commands/mcp-install.js.map +1 -1
- package/dist/src/cli/commands/menubar.d.ts +30 -0
- package/dist/src/cli/commands/menubar.d.ts.map +1 -0
- package/dist/src/cli/commands/menubar.js +180 -0
- package/dist/src/cli/commands/menubar.js.map +1 -0
- package/dist/src/cli/commands/onboard.d.ts +129 -0
- package/dist/src/cli/commands/onboard.d.ts.map +1 -1
- package/dist/src/cli/commands/onboard.js +752 -171
- package/dist/src/cli/commands/onboard.js.map +1 -1
- package/dist/src/cli/commands/rebuild.d.ts.map +1 -1
- package/dist/src/cli/commands/rebuild.js +6 -3
- package/dist/src/cli/commands/rebuild.js.map +1 -1
- package/dist/src/cli/commands/reconcile.d.ts.map +1 -1
- package/dist/src/cli/commands/reconcile.js +12 -0
- package/dist/src/cli/commands/reconcile.js.map +1 -1
- package/dist/src/cli/commands/review.d.ts.map +1 -1
- package/dist/src/cli/commands/review.js +22 -7
- package/dist/src/cli/commands/review.js.map +1 -1
- package/dist/src/cli/commands/search.d.ts +2 -0
- package/dist/src/cli/commands/search.d.ts.map +1 -1
- package/dist/src/cli/commands/search.js +34 -4
- package/dist/src/cli/commands/search.js.map +1 -1
- package/dist/src/cli/commands/status.d.ts +9 -7
- package/dist/src/cli/commands/status.d.ts.map +1 -1
- package/dist/src/cli/commands/status.js +113 -12
- package/dist/src/cli/commands/status.js.map +1 -1
- package/dist/src/cli/commands/token-issue.d.ts.map +1 -1
- package/dist/src/cli/commands/token-issue.js +9 -1
- package/dist/src/cli/commands/token-issue.js.map +1 -1
- package/dist/src/cli/commands/triage.d.ts.map +1 -1
- package/dist/src/cli/commands/triage.js +7 -5
- package/dist/src/cli/commands/triage.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts +80 -0
- package/dist/src/cli/commands/update.d.ts.map +1 -0
- package/dist/src/cli/commands/update.js +378 -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 +27 -0
- package/dist/src/cli/default-config-path.js.map +1 -0
- package/dist/src/cli/feedback/feedback-config.d.ts +46 -0
- package/dist/src/cli/feedback/feedback-config.d.ts.map +1 -1
- package/dist/src/cli/feedback/feedback-config.js +130 -4
- package/dist/src/cli/feedback/feedback-config.js.map +1 -1
- package/dist/src/cli/feedback/feedback-history.d.ts +7 -0
- package/dist/src/cli/feedback/feedback-history.d.ts.map +1 -1
- package/dist/src/cli/feedback/feedback-history.js +39 -9
- package/dist/src/cli/feedback/feedback-history.js.map +1 -1
- package/dist/src/cli/feedback/feedback-payload.d.ts +22 -1
- package/dist/src/cli/feedback/feedback-payload.d.ts.map +1 -1
- package/dist/src/cli/feedback/feedback-payload.js.map +1 -1
- package/dist/src/cli/feedback/feedback-relay.d.ts +2 -2
- package/dist/src/cli/feedback/feedback-relay.d.ts.map +1 -1
- package/dist/src/cli/feedback/feedback-relay.js.map +1 -1
- 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 +67 -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/http-client.d.ts +93 -1
- package/dist/src/cli/http-client.d.ts.map +1 -1
- package/dist/src/cli/http-client.js +254 -6
- package/dist/src/cli/http-client.js.map +1 -1
- package/dist/src/cli/index.d.ts.map +1 -1
- package/dist/src/cli/index.js +29 -6
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/postinstall-menubar.d.ts +22 -0
- package/dist/src/cli/postinstall-menubar.d.ts.map +1 -0
- package/dist/src/cli/postinstall-menubar.js +39 -0
- package/dist/src/cli/postinstall-menubar.js.map +1 -0
- package/dist/src/cli/status/friend-header.d.ts +8 -1
- package/dist/src/cli/status/friend-header.d.ts.map +1 -1
- package/dist/src/cli/status/friend-header.js +334 -26
- package/dist/src/cli/status/friend-header.js.map +1 -1
- 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/config/schema.d.ts +79 -0
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +44 -0
- package/dist/src/config/schema.js.map +1 -1
- 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 +75 -0
- package/dist/src/diagnostics/codex-preflight.js.map +1 -0
- package/dist/src/diagnostics/doctor.d.ts +106 -0
- package/dist/src/diagnostics/doctor.d.ts.map +1 -0
- package/dist/src/diagnostics/doctor.js +334 -0
- package/dist/src/diagnostics/doctor.js.map +1 -0
- package/dist/src/diagnostics/notify.d.ts +90 -0
- package/dist/src/diagnostics/notify.d.ts.map +1 -0
- package/dist/src/diagnostics/notify.js +177 -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/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.map +1 -1
- package/dist/src/ingestion/inbox-watcher.js +34 -50
- package/dist/src/ingestion/inbox-watcher.js.map +1 -1
- package/dist/src/ingestion/indexer.d.ts +7 -0
- package/dist/src/ingestion/indexer.d.ts.map +1 -1
- package/dist/src/ingestion/indexer.js +36 -2
- package/dist/src/ingestion/indexer.js.map +1 -1
- package/dist/src/ingestion/metadata-extraction.d.ts +8 -5
- package/dist/src/ingestion/metadata-extraction.d.ts.map +1 -1
- package/dist/src/ingestion/metadata-extraction.js +24 -5
- package/dist/src/ingestion/metadata-extraction.js.map +1 -1
- 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/jobs/handlers/compact.d.ts.map +1 -1
- package/dist/src/jobs/handlers/compact.js +30 -4
- package/dist/src/jobs/handlers/compact.js.map +1 -1
- 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.map +1 -1
- package/dist/src/jobs/handlers/ingest.js +295 -41
- package/dist/src/jobs/handlers/ingest.js.map +1 -1
- package/dist/src/jobs/handlers/reconcile.d.ts +28 -0
- package/dist/src/jobs/handlers/reconcile.d.ts.map +1 -1
- package/dist/src/jobs/handlers/reconcile.js +145 -19
- package/dist/src/jobs/handlers/reconcile.js.map +1 -1
- package/dist/src/jobs/handlers/reindex.d.ts.map +1 -1
- package/dist/src/jobs/handlers/reindex.js +13 -2
- package/dist/src/jobs/handlers/reindex.js.map +1 -1
- package/dist/src/jobs/handlers/save.d.ts.map +1 -1
- package/dist/src/jobs/handlers/save.js +57 -3
- package/dist/src/jobs/handlers/save.js.map +1 -1
- package/dist/src/jobs/queue.d.ts +51 -1
- package/dist/src/jobs/queue.d.ts.map +1 -1
- package/dist/src/jobs/queue.js +466 -26
- package/dist/src/jobs/queue.js.map +1 -1
- package/dist/src/jobs/worker-entry.d.ts.map +1 -1
- package/dist/src/jobs/worker-entry.js +35 -7
- package/dist/src/jobs/worker-entry.js.map +1 -1
- package/dist/src/jobs/worker-process.d.ts +11 -0
- package/dist/src/jobs/worker-process.d.ts.map +1 -1
- package/dist/src/jobs/worker-process.js +37 -4
- package/dist/src/jobs/worker-process.js.map +1 -1
- package/dist/src/main.js +199 -46
- package/dist/src/main.js.map +1 -1
- package/dist/src/mcp/errors.d.ts.map +1 -1
- package/dist/src/mcp/errors.js +20 -1
- package/dist/src/mcp/errors.js.map +1 -1
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +43 -3
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/mcp/tools/context-pack.d.ts.map +1 -1
- package/dist/src/mcp/tools/context-pack.js +164 -23
- package/dist/src/mcp/tools/context-pack.js.map +1 -1
- package/dist/src/mcp/tools/search.d.ts +6 -2
- package/dist/src/mcp/tools/search.d.ts.map +1 -1
- package/dist/src/mcp/tools/search.js +35 -4
- package/dist/src/mcp/tools/search.js.map +1 -1
- 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 +351 -0
- package/dist/src/observability/onboarding-metric.js.map +1 -0
- package/dist/src/observability/tool-usage-stats.d.ts +77 -4
- package/dist/src/observability/tool-usage-stats.d.ts.map +1 -1
- package/dist/src/observability/tool-usage-stats.js +112 -32
- package/dist/src/observability/tool-usage-stats.js.map +1 -1
- package/dist/src/observability/tool-usage.d.ts +100 -7
- package/dist/src/observability/tool-usage.d.ts.map +1 -1
- package/dist/src/observability/tool-usage.js +196 -33
- package/dist/src/observability/tool-usage.js.map +1 -1
- 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/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/codex-cli-metadata-extraction.d.ts +1 -0
- package/dist/src/providers/codex-cli-metadata-extraction.d.ts.map +1 -1
- package/dist/src/providers/codex-cli-metadata-extraction.js +6 -2
- package/dist/src/providers/codex-cli-metadata-extraction.js.map +1 -1
- 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 +39 -0
- package/dist/src/providers/codex-cli-runner.d.ts.map +1 -1
- package/dist/src/providers/codex-cli-runner.js +234 -48
- package/dist/src/providers/codex-cli-runner.js.map +1 -1
- package/dist/src/providers/conversation-generation.d.ts.map +1 -1
- package/dist/src/providers/conversation-generation.js +43 -6
- package/dist/src/providers/conversation-generation.js.map +1 -1
- package/dist/src/providers/ollama-embed.d.ts +2 -1
- package/dist/src/providers/ollama-embed.d.ts.map +1 -1
- package/dist/src/providers/ollama-embed.js +1 -0
- package/dist/src/providers/ollama-embed.js.map +1 -1
- package/dist/src/providers/openai-metadata-extraction.d.ts +3 -3
- package/dist/src/providers/openai-metadata-extraction.d.ts.map +1 -1
- package/dist/src/providers/openai-metadata-extraction.js +18 -3
- package/dist/src/providers/openai-metadata-extraction.js.map +1 -1
- 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/stub.d.ts +2 -0
- package/dist/src/providers/stub.d.ts.map +1 -1
- package/dist/src/providers/stub.js +2 -0
- package/dist/src/providers/stub.js.map +1 -1
- package/dist/src/providers/types.d.ts +11 -0
- package/dist/src/providers/types.d.ts.map +1 -1
- package/dist/src/providers/voyage.d.ts +2 -1
- package/dist/src/providers/voyage.d.ts.map +1 -1
- package/dist/src/providers/voyage.js +1 -0
- package/dist/src/providers/voyage.js.map +1 -1
- package/dist/src/retrieval/compact.d.ts +116 -2
- package/dist/src/retrieval/compact.d.ts.map +1 -1
- package/dist/src/retrieval/compact.js +158 -5
- package/dist/src/retrieval/compact.js.map +1 -1
- package/dist/src/retrieval/context-pack.d.ts +114 -0
- package/dist/src/retrieval/context-pack.d.ts.map +1 -1
- package/dist/src/retrieval/context-pack.js +292 -8
- package/dist/src/retrieval/context-pack.js.map +1 -1
- 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/git-state.d.ts +53 -0
- package/dist/src/retrieval/git-state.d.ts.map +1 -0
- package/dist/src/retrieval/git-state.js +174 -0
- package/dist/src/retrieval/git-state.js.map +1 -0
- package/dist/src/retrieval/lexical.d.ts.map +1 -1
- package/dist/src/retrieval/lexical.js +19 -3
- package/dist/src/retrieval/lexical.js.map +1 -1
- 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/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/vector.d.ts.map +1 -1
- package/dist/src/retrieval/vector.js +11 -2
- package/dist/src/retrieval/vector.js.map +1 -1
- package/dist/src/server/app.d.ts.map +1 -1
- package/dist/src/server/app.js +92 -11
- package/dist/src/server/app.js.map +1 -1
- package/dist/src/server/routes/compact.d.ts.map +1 -1
- package/dist/src/server/routes/compact.js +4 -1
- package/dist/src/server/routes/compact.js.map +1 -1
- package/dist/src/server/routes/context.d.ts +1 -1
- package/dist/src/server/routes/context.d.ts.map +1 -1
- package/dist/src/server/routes/context.js +2 -1
- package/dist/src/server/routes/context.js.map +1 -1
- package/dist/src/server/routes/conversations-search.d.ts.map +1 -1
- package/dist/src/server/routes/conversations-search.js +28 -3
- package/dist/src/server/routes/conversations-search.js.map +1 -1
- 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 +339 -3
- package/dist/src/server/routes/friend-status.d.ts.map +1 -1
- package/dist/src/server/routes/friend-status.js +447 -13
- package/dist/src/server/routes/friend-status.js.map +1 -1
- package/dist/src/server/routes/ingest.d.ts.map +1 -1
- package/dist/src/server/routes/ingest.js +5 -2
- package/dist/src/server/routes/ingest.js.map +1 -1
- package/dist/src/server/routes/mcp-usage.d.ts +5 -4
- package/dist/src/server/routes/mcp-usage.d.ts.map +1 -1
- package/dist/src/server/routes/mcp-usage.js.map +1 -1
- package/dist/src/server/routes/reconcile.d.ts.map +1 -1
- package/dist/src/server/routes/reconcile.js +20 -1
- package/dist/src/server/routes/reconcile.js.map +1 -1
- package/dist/src/server/routes/reindex.d.ts.map +1 -1
- package/dist/src/server/routes/reindex.js +4 -1
- package/dist/src/server/routes/reindex.js.map +1 -1
- package/dist/src/server/routes/save.d.ts.map +1 -1
- package/dist/src/server/routes/save.js +4 -1
- package/dist/src/server/routes/save.js.map +1 -1
- package/dist/src/server/routes/search.d.ts +1 -1
- package/dist/src/server/routes/search.d.ts.map +1 -1
- package/dist/src/server/routes/search.js +253 -29
- package/dist/src/server/routes/search.js.map +1 -1
- package/dist/src/server/routes/triage.d.ts.map +1 -1
- package/dist/src/server/routes/triage.js +4 -1
- package/dist/src/server/routes/triage.js.map +1 -1
- package/dist/src/storage/rebuild.d.ts +35 -1
- package/dist/src/storage/rebuild.d.ts.map +1 -1
- package/dist/src/storage/rebuild.js +288 -64
- package/dist/src/storage/rebuild.js.map +1 -1
- package/dist/src/storage/tables.d.ts +29 -0
- package/dist/src/storage/tables.d.ts.map +1 -1
- package/dist/src/storage/tables.js +32 -1
- package/dist/src/storage/tables.js.map +1 -1
- package/operator/swiftbar/render-menu.py +524 -0
- package/operator/swiftbar/rift.10s.sh +176 -0
- package/package.json +9 -3
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Background self-repair for oversized Codex CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Auto-capture parks sessions larger than `capture.codex_cli.max_session_bytes`
|
|
5
|
+
* in `data/quarantine/` rather than failing (see `auto-capture.ts`). Recovery
|
|
6
|
+
* — chunked summarize + one `/save` per session — already exists in
|
|
7
|
+
* `recover-quarantine.ts` and is reachable manually via
|
|
8
|
+
* `rift doctor repair capture-large-sessions`.
|
|
9
|
+
*
|
|
10
|
+
* This module makes that recovery happen ON ITS OWN so a friend never has to
|
|
11
|
+
* run the repair command. The daemon calls `maybeRunAutoRepair` after each
|
|
12
|
+
* capture run; it:
|
|
13
|
+
*
|
|
14
|
+
* 1. Reuses `runRecoverQuarantine` verbatim (no second recovery path), so
|
|
15
|
+
* idempotency and regrown-session replacement are preserved.
|
|
16
|
+
* 2. Bounds work with a per-session retry budget persisted to
|
|
17
|
+
* `data/quarantine-repair-budget.json`. A session that fails
|
|
18
|
+
* `MAX_AUTO_REPAIR_ATTEMPTS` times is no longer auto-attempted — it is
|
|
19
|
+
* surfaced to the user as a manual-fallback warning instead of being
|
|
20
|
+
* retried forever. The budget is keyed by `<sessionId>:<fingerprint>`,
|
|
21
|
+
* so a session that grows (new fingerprint) gets a fresh budget, exactly
|
|
22
|
+
* as recovery treats it as new work.
|
|
23
|
+
* 3. Never runs two repairs at once (a module-level in-flight guard), so an
|
|
24
|
+
* overlapping capture tick cannot launch a duplicate concurrent repair.
|
|
25
|
+
*
|
|
26
|
+
* The recovery itself is long (one Codex CLI call per chunk per session), so
|
|
27
|
+
* the daemon fires this without awaiting it — status/doctor reads stay fast.
|
|
28
|
+
*/
|
|
29
|
+
import fs from "node:fs";
|
|
30
|
+
import path from "node:path";
|
|
31
|
+
import { z } from "zod";
|
|
32
|
+
import { atomicWrite } from "../storage/atomic.js";
|
|
33
|
+
import { listParkedOversizedSessions, runRecoverQuarantine, } from "./recover-quarantine.js";
|
|
34
|
+
/**
|
|
35
|
+
* How many times a single parked session (at one fingerprint) is auto-retried
|
|
36
|
+
* before Rift stops and asks the user to run the manual repair. Low on purpose:
|
|
37
|
+
* the daemon retries roughly once per capture tick (hourly), so three attempts
|
|
38
|
+
* spans a few hours before declaring "could not save automatically", and the
|
|
39
|
+
* manual `rift doctor repair` path is always available regardless of budget.
|
|
40
|
+
*/
|
|
41
|
+
export const MAX_AUTO_REPAIR_ATTEMPTS = 3;
|
|
42
|
+
/**
|
|
43
|
+
* How long to stop attempting auto-repair after a pass fails ONLY because
|
|
44
|
+
* saving was down (Voyage revoked/outage — the save handler needs a valid
|
|
45
|
+
* Voyage key). This is an infrastructure backoff, distinct from the
|
|
46
|
+
* per-session retry budget: a save outage is not any one session's fault, so
|
|
47
|
+
* it must not exhaust a session (see `applyBudgetFromReport`), but it also
|
|
48
|
+
* shouldn't make the daemon re-summarize every parked session via Codex on
|
|
49
|
+
* every hourly tick for the whole outage. The cooldown bounds that cost to one
|
|
50
|
+
* pass per window; it is cleared early the moment a save succeeds. Sized to a
|
|
51
|
+
* few default capture ticks (interval default is 1h).
|
|
52
|
+
*/
|
|
53
|
+
export const SAVE_FAILURE_COOLDOWN_MS = 6 * 60 * 60 * 1000;
|
|
54
|
+
const REPAIR_BUDGET_FILE = "quarantine-repair-budget.json";
|
|
55
|
+
const RepairBudgetEntrySchema = z.object({
|
|
56
|
+
/** Failed auto-repair attempts for this session+fingerprint. */
|
|
57
|
+
attempts: z.number().int().nonnegative(),
|
|
58
|
+
last_attempt_at: z.string(),
|
|
59
|
+
last_error: z.string().optional(),
|
|
60
|
+
});
|
|
61
|
+
const RepairBudgetSchema = z.object({
|
|
62
|
+
sessions: z.record(z.string(), RepairBudgetEntrySchema).default({}),
|
|
63
|
+
/**
|
|
64
|
+
* ISO timestamp until which auto-repair backs off because saving recently
|
|
65
|
+
* failed (infrastructure, not a session fault). Absent when not cooling down.
|
|
66
|
+
*/
|
|
67
|
+
save_blocked_until: z.string().optional(),
|
|
68
|
+
});
|
|
69
|
+
/** Budget key — fingerprint-scoped so a regrown session retries fresh. */
|
|
70
|
+
function budgetKey(sessionId, fingerprint) {
|
|
71
|
+
return `${sessionId}:${fingerprint}`;
|
|
72
|
+
}
|
|
73
|
+
export function loadRepairBudget(dataDir) {
|
|
74
|
+
const file = path.join(dataDir, REPAIR_BUDGET_FILE);
|
|
75
|
+
if (!fs.existsSync(file))
|
|
76
|
+
return { sessions: {} };
|
|
77
|
+
let raw;
|
|
78
|
+
try {
|
|
79
|
+
raw = JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return { sessions: {} };
|
|
83
|
+
}
|
|
84
|
+
const parsed = RepairBudgetSchema.safeParse(raw);
|
|
85
|
+
return parsed.success ? parsed.data : { sessions: {} };
|
|
86
|
+
}
|
|
87
|
+
export async function saveRepairBudget(dataDir, budget) {
|
|
88
|
+
const file = path.join(dataDir, REPAIR_BUDGET_FILE);
|
|
89
|
+
await atomicWrite(file, JSON.stringify(budget, null, 2));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Clear the global save-infra cooldown. Call this whenever ANY daemon save
|
|
93
|
+
* succeeds — a normal capture save proves the Voyage/save path is healthy
|
|
94
|
+
* again, which `maybeRunAutoRepair` can't observe on its own (it returns early
|
|
95
|
+
* while cooled down, so it never reaches a save to learn saving works). Without
|
|
96
|
+
* this, recovery would idle for up to the full cooldown window after an outage
|
|
97
|
+
* clears. Cheap and best-effort: a no-op (no write) when no cooldown is set.
|
|
98
|
+
*/
|
|
99
|
+
export async function clearSaveFailureCooldown(dataDir) {
|
|
100
|
+
const budget = loadRepairBudget(dataDir);
|
|
101
|
+
if (budget.save_blocked_until === undefined)
|
|
102
|
+
return;
|
|
103
|
+
delete budget.save_blocked_until;
|
|
104
|
+
try {
|
|
105
|
+
await saveRepairBudget(dataDir, budget);
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// best-effort
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Split the parked-oversized sessions into "Rift is still saving these" vs.
|
|
113
|
+
* "Rift gave up and the user must save these manually", using the retry
|
|
114
|
+
* budget. Drives the honest friend-facing status copy. Pure read — no IO
|
|
115
|
+
* beyond loading the quarantine records, recovery state, and budget.
|
|
116
|
+
*/
|
|
117
|
+
export function classifyParkedOversizedSessions(deps, maxAttempts = MAX_AUTO_REPAIR_ATTEMPTS) {
|
|
118
|
+
const parkedRecords = listParkedOversizedSessions(deps);
|
|
119
|
+
if (parkedRecords.length === 0) {
|
|
120
|
+
return { parked: 0, repairing: 0, failed: 0 };
|
|
121
|
+
}
|
|
122
|
+
const budget = loadRepairBudget(deps.dataDir);
|
|
123
|
+
let repairing = 0;
|
|
124
|
+
let failed = 0;
|
|
125
|
+
for (const record of parkedRecords) {
|
|
126
|
+
const entry = budget.sessions[budgetKey(record.session_id, record.fingerprint)];
|
|
127
|
+
if (entry && entry.attempts >= maxAttempts)
|
|
128
|
+
failed += 1;
|
|
129
|
+
else
|
|
130
|
+
repairing += 1;
|
|
131
|
+
}
|
|
132
|
+
return { parked: parkedRecords.length, repairing, failed };
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Module-level in-flight guard. A daemon is a single process, so a boolean
|
|
136
|
+
* flag is enough to ensure a long-running repair started by one capture tick
|
|
137
|
+
* is never duplicated by the next tick (or by the startup run overlapping the
|
|
138
|
+
* first interval). Reset in `finally` so a thrown repair doesn't wedge it.
|
|
139
|
+
*/
|
|
140
|
+
let repairInFlight = false;
|
|
141
|
+
/** Test-only: whether a background repair is currently running. */
|
|
142
|
+
export function isAutoRepairInFlight() {
|
|
143
|
+
return repairInFlight;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Run a background recovery pass over parked oversized sessions, if any are
|
|
147
|
+
* still within their retry budget and no repair is already running.
|
|
148
|
+
*
|
|
149
|
+
* Returns the recovery report, or null when nothing was attempted (already
|
|
150
|
+
* running, or no repairable sessions). Updates the retry budget from the
|
|
151
|
+
* report: a recovered session's budget entry is cleared, a failed session's
|
|
152
|
+
* attempt count is incremented (and exhausts after `maxAttempts`).
|
|
153
|
+
*/
|
|
154
|
+
export async function maybeRunAutoRepair(deps) {
|
|
155
|
+
const log = deps.log ?? (() => { });
|
|
156
|
+
const maxAttempts = deps.maxAttempts ?? MAX_AUTO_REPAIR_ATTEMPTS;
|
|
157
|
+
const dataDir = deps.recover.dataDir;
|
|
158
|
+
if (repairInFlight) {
|
|
159
|
+
log("auto-repair: a repair is already running — skipping this tick");
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
const budget = loadRepairBudget(dataDir);
|
|
163
|
+
// Infrastructure backoff: a recent pass failed only because saving was down
|
|
164
|
+
// (Voyage). Don't re-summarize via Codex until the cooldown expires — a save
|
|
165
|
+
// outage that re-runs every tick is pure wasted cost. Cleared early when a
|
|
166
|
+
// save succeeds (see applyBudgetFromReport).
|
|
167
|
+
const nowMs = (deps.recover.now ? deps.recover.now() : new Date()).getTime();
|
|
168
|
+
const blockedUntilMs = budget.save_blocked_until
|
|
169
|
+
? Date.parse(budget.save_blocked_until)
|
|
170
|
+
: NaN;
|
|
171
|
+
if (!Number.isNaN(blockedUntilMs) && nowMs < blockedUntilMs) {
|
|
172
|
+
log(`auto-repair: saving recently failed — backing off until ${budget.save_blocked_until}`);
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
// Only attempt sessions still within budget. Exhausted ones are surfaced as
|
|
176
|
+
// a manual-fallback warning, not retried. Pass `deps.recover` so a caller
|
|
177
|
+
// that overrides `quarantineDir` is honored here too (not just inside
|
|
178
|
+
// `runRecoverQuarantine`), keeping the precheck and the recovery in sync.
|
|
179
|
+
const repairable = listParkedOversizedSessions(deps.recover).filter((record) => (budget.sessions[budgetKey(record.session_id, record.fingerprint)]?.attempts ?? 0) <
|
|
180
|
+
maxAttempts);
|
|
181
|
+
if (repairable.length === 0)
|
|
182
|
+
return null;
|
|
183
|
+
const repairableKeys = new Set(repairable.map((record) => budgetKey(record.session_id, record.fingerprint)));
|
|
184
|
+
repairInFlight = true;
|
|
185
|
+
log(`auto-repair: recovering ${repairable.length} parked Codex session${repairable.length === 1 ? "" : "s"} in the background`);
|
|
186
|
+
try {
|
|
187
|
+
const report = await runRecoverQuarantine({
|
|
188
|
+
...deps.recover,
|
|
189
|
+
skipSession: (record) => !repairableKeys.has(budgetKey(record.session_id, record.fingerprint)),
|
|
190
|
+
});
|
|
191
|
+
await applyBudgetFromReport(dataDir, report, deps.recover.now);
|
|
192
|
+
log(`auto-repair: ${report.recovered} recovered, ${report.failed + report.missing_source} could not be saved`);
|
|
193
|
+
return report;
|
|
194
|
+
}
|
|
195
|
+
finally {
|
|
196
|
+
repairInFlight = false;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Fold a recovery report into the retry budget: clear successes, increment
|
|
201
|
+
* failures. Re-reads the budget under the in-flight guard so it overlays the
|
|
202
|
+
* freshest on-disk value. Best-effort persistence — a budget write failure
|
|
203
|
+
* just means a session may get one extra attempt next tick, never a crash.
|
|
204
|
+
*/
|
|
205
|
+
async function applyBudgetFromReport(dataDir, report, now) {
|
|
206
|
+
const budget = loadRepairBudget(dataDir);
|
|
207
|
+
const nowDate = now ? now() : new Date();
|
|
208
|
+
const nowIso = nowDate.toISOString();
|
|
209
|
+
let changed = false;
|
|
210
|
+
for (const result of report.results) {
|
|
211
|
+
const key = budgetKey(result.session_id, result.fingerprint);
|
|
212
|
+
if (result.outcome === "recovered") {
|
|
213
|
+
if (budget.sessions[key]) {
|
|
214
|
+
delete budget.sessions[key];
|
|
215
|
+
changed = true;
|
|
216
|
+
}
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
// Only SESSION-LOCAL failures count against the budget: a chunk that won't
|
|
220
|
+
// summarize, or a session that parses to nothing. These are intrinsic to
|
|
221
|
+
// this session — retrying forever won't help, so cap them.
|
|
222
|
+
//
|
|
223
|
+
// A `save_failed` is deliberately NOT budgeted: the save path needs Voyage
|
|
224
|
+
// (the queue's save handler throws "save requires VOYAGE_API_KEY"), so a
|
|
225
|
+
// missing/revoked key or a Voyage outage makes EVERY session's save fail —
|
|
226
|
+
// an infrastructure problem, not the session's fault. Budgeting it would
|
|
227
|
+
// exhaust a session during the outage and then refuse to self-repair once
|
|
228
|
+
// the key is fixed, breaking the whole point of background recovery. Left
|
|
229
|
+
// un-budgeted, the session stays "repairing" and is retried on the next
|
|
230
|
+
// tick, so it self-heals the moment saving works again. (`missing_source`
|
|
231
|
+
// never reaches here — `listParkedOversizedSessions` already excludes a
|
|
232
|
+
// session whose jsonl is gone, so it's neither attempted nor classified.)
|
|
233
|
+
if (result.outcome === "failed" &&
|
|
234
|
+
(result.reason === "summarize_failed" || result.reason === "empty_session")) {
|
|
235
|
+
const prior = budget.sessions[key];
|
|
236
|
+
budget.sessions[key] = {
|
|
237
|
+
attempts: (prior?.attempts ?? 0) + 1,
|
|
238
|
+
last_attempt_at: nowIso,
|
|
239
|
+
...(result.error ? { last_error: result.error } : {}),
|
|
240
|
+
};
|
|
241
|
+
changed = true;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Global save-infra cooldown. A save success proves the path works → clear
|
|
245
|
+
// any cooldown immediately. Otherwise, if this pass failed only because
|
|
246
|
+
// saving was down, start (or refresh) the backoff so we don't re-summarize
|
|
247
|
+
// every tick during a Voyage outage.
|
|
248
|
+
const anyRecovered = report.results.some((r) => r.outcome === "recovered");
|
|
249
|
+
const anySaveFailed = report.results.some((r) => r.outcome === "failed" && r.reason === "save_failed");
|
|
250
|
+
if (anyRecovered) {
|
|
251
|
+
if (budget.save_blocked_until !== undefined) {
|
|
252
|
+
delete budget.save_blocked_until;
|
|
253
|
+
changed = true;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
else if (anySaveFailed) {
|
|
257
|
+
budget.save_blocked_until = new Date(nowDate.getTime() + SAVE_FAILURE_COOLDOWN_MS).toISOString();
|
|
258
|
+
changed = true;
|
|
259
|
+
}
|
|
260
|
+
if (changed) {
|
|
261
|
+
try {
|
|
262
|
+
await saveRepairBudget(dataDir, budget);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
// best-effort
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=auto-repair.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-repair.js","sourceRoot":"","sources":["../../../src/capture/auto-repair.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO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I,CAAC,CAAC,MAAM,KAAK,aAAa,CAC5D,CAAC;IACF,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,MAAM,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC,kBAAkB,CAAC;YACjC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;IACH,CAAC;SAAM,IAAI,aAAa,EAAE,CAAC;QACzB,MAAM,CAAC,kBAAkB,GAAG,IAAI,IAAI,CAClC,OAAO,CAAC,OAAO,EAAE,GAAG,wBAAwB,CAC7C,CAAC,WAAW,EAAE,CAAC;QAChB,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,CAAC;YACH,MAAM,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1C,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-cli-triage-provider.d.ts","sourceRoot":"","sources":["../../../src/capture/codex-cli-triage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"codex-cli-triage-provider.d.ts","sourceRoot":"","sources":["../../../src/capture/codex-cli-triage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAAM,mBAAmB,CAAC;AAiD3B,qBAAa,sBAAuB,YAAW,2BAA2B;IAEtE,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE;QACxB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;KACf;IAGR,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAIzC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAKjD,cAAc,CAClB,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC;YA+BxC,SAAS;CAoCxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TRIAGE_VERSION, } from "./triage-provider.js";
|
|
2
2
|
import { scoreHistoricalTriage, } from "./triage-lane.js";
|
|
3
|
-
import {
|
|
3
|
+
import { CODEX_CLI_OVERRIDE_PROVIDER } from "../providers/operator-overrides.js";
|
|
4
4
|
import { runCodexCliJson } from "../providers/codex-cli-runner.js";
|
|
5
5
|
const TRIAGE_PROMPT = `You are a triage classifier for a personal knowledge base. Given a conversation between a user and an AI assistant, decide whether it should be saved to long-term memory.
|
|
6
6
|
|
|
@@ -67,7 +67,7 @@ export class CodexCliTriageProvider {
|
|
|
67
67
|
summary: parsed.summary,
|
|
68
68
|
topics: parsed.topics,
|
|
69
69
|
rationale: parsed.rationale,
|
|
70
|
-
model:
|
|
70
|
+
model: parsed.model,
|
|
71
71
|
provider: CODEX_CLI_OVERRIDE_PROVIDER,
|
|
72
72
|
version: TRIAGE_VERSION,
|
|
73
73
|
score_breakdown: scoring.debug.score_breakdown,
|
|
@@ -78,7 +78,7 @@ export class CodexCliTriageProvider {
|
|
|
78
78
|
}
|
|
79
79
|
async runPrompt(input) {
|
|
80
80
|
const prompt = `${TRIAGE_PROMPT}${input.content}`;
|
|
81
|
-
const { output } = await runCodexCliJson({
|
|
81
|
+
const { output, model } = await runCodexCliJson({
|
|
82
82
|
prompt,
|
|
83
83
|
schema: TRIAGE_OUTPUT_SCHEMA,
|
|
84
84
|
...(this.options.cwd ? { cwd: this.options.cwd } : {}),
|
|
@@ -103,6 +103,7 @@ export class CodexCliTriageProvider {
|
|
|
103
103
|
summary: String(output.summary ?? ""),
|
|
104
104
|
topics: Array.isArray(output.topics) ? output.topics.map(String) : [],
|
|
105
105
|
rationale: String(output.rationale ?? ""),
|
|
106
|
+
model,
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-cli-triage-provider.js","sourceRoot":"","sources":["../../../src/capture/codex-cli-triage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,
|
|
1
|
+
{"version":3,"file":"codex-cli-triage-provider.js","sourceRoot":"","sources":["../../../src/capture/codex-cli-triage-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,GAEtB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,aAAa,GAAG;;;;;;;;;;CAUrB,CAAC;AAEF,MAAM,oBAAoB,GAAG;IAC3B,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC;IACtE,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;SACpC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;SACX;QACD,OAAO,EAAE,EAA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CAAC,UAAU,GAAG,CAAC;YACrB,MAAM,CAAC,UAAU,GAAG,CAAC,EACrB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,iDAAiD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAChG,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;YACrC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;YACrE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;YACzC,KAAK;SACN,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -6,6 +6,17 @@ export interface AutoCaptureRunError {
|
|
|
6
6
|
source?: AutoCaptureSource;
|
|
7
7
|
error: string;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Who initiated a capture run. `daemon` = the scheduled hourly loop;
|
|
11
|
+
* `manual` = a `rift capture` invocation; `onboard` = the first-capture pass
|
|
12
|
+
* inside `rift onboard`. Only `daemon` runs represent the scheduled loop's
|
|
13
|
+
* health; `manual`/`onboard` are ad-hoc runs that prove "capture works now"
|
|
14
|
+
* without speaking for the daemon. Optional on the record because rows
|
|
15
|
+
* written before this field existed carry no trigger — every reader MUST
|
|
16
|
+
* treat a missing trigger as `daemon` (the daemon was the only writer then).
|
|
17
|
+
* See `summarizeAutoCaptureRuns` here and the friend-status route.
|
|
18
|
+
*/
|
|
19
|
+
export type AutoCaptureTrigger = "daemon" | "manual" | "onboard";
|
|
9
20
|
export interface AutoCaptureRunRecord {
|
|
10
21
|
timestamp: string;
|
|
11
22
|
enabled_sources: AutoCaptureSource[];
|
|
@@ -15,6 +26,14 @@ export interface AutoCaptureRunRecord {
|
|
|
15
26
|
counts_by_source: Partial<Record<AutoCaptureSource, CaptureSourceCounts>>;
|
|
16
27
|
errors: AutoCaptureRunError[];
|
|
17
28
|
run_error?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Why preflight failed, when `preflight_ok` is false. Recorded here rather
|
|
31
|
+
* than in `errors[]` so a probe failure never inflates the conversation-
|
|
32
|
+
* failure count. Absent on legacy rows and on healthy runs.
|
|
33
|
+
*/
|
|
34
|
+
preflight_error?: string;
|
|
35
|
+
/** Who ran this capture. Absent on legacy rows → read as `daemon`. */
|
|
36
|
+
trigger?: AutoCaptureTrigger;
|
|
18
37
|
}
|
|
19
38
|
export interface AutoCaptureSourceSuccess {
|
|
20
39
|
timestamp: string;
|
|
@@ -24,7 +43,15 @@ export interface AutoCaptureSourceSuccess {
|
|
|
24
43
|
new: number;
|
|
25
44
|
}
|
|
26
45
|
export interface AutoCaptureRunSummary {
|
|
46
|
+
/** Newest run of any trigger — drives the "last capture" freshness line. */
|
|
27
47
|
last_run: AutoCaptureRunRecord | null;
|
|
48
|
+
/**
|
|
49
|
+
* Newest run that came from the daemon's scheduled loop (legacy untagged
|
|
50
|
+
* rows count as daemon). Tracked separately from `last_run` so a manual
|
|
51
|
+
* success can refresh status WITHOUT laundering a still-failing scheduled
|
|
52
|
+
* loop: the daemon's own health stays observable here.
|
|
53
|
+
*/
|
|
54
|
+
last_daemon_run: AutoCaptureRunRecord | null;
|
|
28
55
|
last_success_by_source: Partial<Record<AutoCaptureSource, AutoCaptureSourceSuccess | null>>;
|
|
29
56
|
}
|
|
30
57
|
export declare function autoCaptureRunsPath(dataDir: string): string;
|
|
@@ -33,9 +60,24 @@ export declare function buildAutoCaptureRunRecord(opts: {
|
|
|
33
60
|
enabledSources: AutoCaptureSource[];
|
|
34
61
|
durationMs: number;
|
|
35
62
|
report: CaptureReport;
|
|
63
|
+
/** Daemon loop vs. a manual `rift capture`. */
|
|
64
|
+
trigger: AutoCaptureTrigger;
|
|
36
65
|
}): AutoCaptureRunRecord;
|
|
37
66
|
export declare function appendAutoCaptureRunRecord(dataDir: string, record: AutoCaptureRunRecord, maxLines?: number): Promise<void>;
|
|
38
67
|
export declare function readAutoCaptureRunRecords(dataDir: string): AutoCaptureRunRecord[];
|
|
68
|
+
/**
|
|
69
|
+
* Whether a recorded run failed, across ALL three failure shapes:
|
|
70
|
+
* - `run_ok: false` — the loop threw (daemon catch-all path).
|
|
71
|
+
* - `preflight_ok: false` — e.g. an expired `codex login`. Recorded with
|
|
72
|
+
* `run_ok: true` because the run completed; this is the COMMON real
|
|
73
|
+
* failure, so a `run_ok`-only check would miss it and let a manual
|
|
74
|
+
* success launder the daemon green.
|
|
75
|
+
* - `errors.length > 0` — the run completed but hit per-session errors.
|
|
76
|
+
* Mirrors how diagnostics treats a live capture as broken
|
|
77
|
+
* (`last_errors > 0` OR `codex.last_preflight_ok === false`), so the
|
|
78
|
+
* daemon's own latest outcome is judged by the same bar.
|
|
79
|
+
*/
|
|
80
|
+
export declare function autoCaptureRunFailed(record: AutoCaptureRunRecord): boolean;
|
|
39
81
|
export declare function summarizeAutoCaptureRuns(records: AutoCaptureRunRecord[], sources?: AutoCaptureSource[]): AutoCaptureRunSummary;
|
|
40
82
|
export declare function readAutoCaptureRunSummary(dataDir: string, sources?: AutoCaptureSource[]): AutoCaptureRunSummary;
|
|
41
83
|
export declare function formatAutoCaptureSummary(summary: AutoCaptureRunSummary): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../../src/capture/observability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAChE,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,M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E,iBAAiB,EAAiC,GAC1D,qBAAqB,CAyCvB;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iBAAiB,EAAiC,GAC1D,qBAAqB,CAEvB;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAW/E"}
|
|
@@ -11,8 +11,10 @@ export function buildAutoCaptureRunRecord(opts) {
|
|
|
11
11
|
return {
|
|
12
12
|
timestamp: opts.timestamp,
|
|
13
13
|
enabled_sources: opts.enabledSources,
|
|
14
|
-
// If runAutoCapture returned a report, the run completed.
|
|
15
|
-
//
|
|
14
|
+
// If runAutoCapture returned a report, the run completed. run_ok: false
|
|
15
|
+
// is only written by the daemon's catch-all path (a thrown run); both
|
|
16
|
+
// the daemon and the manual command reach this builder on a completed
|
|
17
|
+
// run, distinguished by `trigger`.
|
|
16
18
|
run_ok: true,
|
|
17
19
|
preflight_ok: opts.report.preflight_ok,
|
|
18
20
|
duration_ms: opts.durationMs,
|
|
@@ -22,12 +24,21 @@ export function buildAutoCaptureRunRecord(opts) {
|
|
|
22
24
|
...(err.source ? { source: err.source } : {}),
|
|
23
25
|
error: err.error,
|
|
24
26
|
})),
|
|
27
|
+
...(opts.report.preflight_error
|
|
28
|
+
? { preflight_error: opts.report.preflight_error }
|
|
29
|
+
: {}),
|
|
30
|
+
trigger: opts.trigger,
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
33
|
export async function appendAutoCaptureRunRecord(dataDir, record, maxLines = AUTO_CAPTURE_RUNS_MAX_LINES) {
|
|
28
34
|
const filePath = autoCaptureRunsPath(dataDir);
|
|
29
|
-
//
|
|
30
|
-
//
|
|
35
|
+
// Two writers now: the daemon's scheduled loop and a manual `rift capture`
|
|
36
|
+
// (tagged via `record.trigger`). The final write is atomic, but the
|
|
37
|
+
// read/modify/write is not locked, so a daemon tick firing in the exact
|
|
38
|
+
// same window as a manual run could drop one row. That's an acceptable
|
|
39
|
+
// loss for an append-only health log (no correctness impact, just a
|
|
40
|
+
// missed observability line) and far cheaper than a file lock; revisit
|
|
41
|
+
// only if a third concurrent writer appears.
|
|
31
42
|
const lines = fs.existsSync(filePath)
|
|
32
43
|
? fs.readFileSync(filePath, "utf-8").split("\n").filter(Boolean)
|
|
33
44
|
: [];
|
|
@@ -45,6 +56,21 @@ export function readAutoCaptureRunRecords(dataDir) {
|
|
|
45
56
|
.filter(Boolean)
|
|
46
57
|
.map((line) => JSON.parse(line));
|
|
47
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether a recorded run failed, across ALL three failure shapes:
|
|
61
|
+
* - `run_ok: false` — the loop threw (daemon catch-all path).
|
|
62
|
+
* - `preflight_ok: false` — e.g. an expired `codex login`. Recorded with
|
|
63
|
+
* `run_ok: true` because the run completed; this is the COMMON real
|
|
64
|
+
* failure, so a `run_ok`-only check would miss it and let a manual
|
|
65
|
+
* success launder the daemon green.
|
|
66
|
+
* - `errors.length > 0` — the run completed but hit per-session errors.
|
|
67
|
+
* Mirrors how diagnostics treats a live capture as broken
|
|
68
|
+
* (`last_errors > 0` OR `codex.last_preflight_ok === false`), so the
|
|
69
|
+
* daemon's own latest outcome is judged by the same bar.
|
|
70
|
+
*/
|
|
71
|
+
export function autoCaptureRunFailed(record) {
|
|
72
|
+
return !record.run_ok || !record.preflight_ok || record.errors.length > 0;
|
|
73
|
+
}
|
|
48
74
|
export function summarizeAutoCaptureRuns(records, sources = DEFAULT_AUTO_CAPTURE_SOURCES) {
|
|
49
75
|
const lastSuccess = {};
|
|
50
76
|
for (const source of sources) {
|
|
@@ -66,8 +92,23 @@ export function summarizeAutoCaptureRuns(records, sources = DEFAULT_AUTO_CAPTURE
|
|
|
66
92
|
};
|
|
67
93
|
}
|
|
68
94
|
}
|
|
95
|
+
// Walk back to the newest daemon-triggered (or legacy untagged) run. This
|
|
96
|
+
// is what keeps an ad-hoc success from masking a failing scheduled loop:
|
|
97
|
+
// `last_run` reflects the freshest capture of any kind, while this stays
|
|
98
|
+
// pinned to the daemon's own latest outcome. `manual` AND `onboard` runs
|
|
99
|
+
// are ad-hoc and excluded here — only `daemon` (or a legacy untagged row,
|
|
100
|
+
// written when the daemon was the sole writer) speaks for the loop.
|
|
101
|
+
let lastDaemonRun = null;
|
|
102
|
+
for (let i = records.length - 1; i >= 0; i--) {
|
|
103
|
+
const record = records[i];
|
|
104
|
+
if (record && (record.trigger === "daemon" || record.trigger === undefined)) {
|
|
105
|
+
lastDaemonRun = record;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
69
109
|
return {
|
|
70
110
|
last_run: records.at(-1) ?? null,
|
|
111
|
+
last_daemon_run: lastDaemonRun,
|
|
71
112
|
last_success_by_source: lastSuccess,
|
|
72
113
|
};
|
|
73
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.js","sourceRoot":"","sources":["../../../src/capture/observability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAChE,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"observability.js","sourceRoot":"","sources":["../../../src/capture/observability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAChE,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;AA8DhD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