@getrift/rift 0.1.0-beta.20 → 0.1.0-beta.22
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 +7 -3
- package/dist/src/capture/auto-capture.d.ts +105 -4
- package/dist/src/capture/auto-capture.d.ts.map +1 -1
- package/dist/src/capture/auto-capture.js +313 -34
- package/dist/src/capture/auto-capture.js.map +1 -1
- 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 +88 -0
- package/dist/src/capture/claude-cli-triage-provider.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 +1 -33
- package/dist/src/capture/codex-cli-triage-provider.js.map +1 -1
- 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 +30 -0
- package/dist/src/capture/observability.d.ts.map +1 -1
- package/dist/src/capture/observability.js +29 -0
- package/dist/src/capture/observability.js.map +1 -1
- package/dist/src/capture/sources.d.ts +41 -3
- package/dist/src/capture/sources.d.ts.map +1 -1
- package/dist/src/capture/sources.js +43 -1
- package/dist/src/capture/sources.js.map +1 -1
- package/dist/src/capture/triage-classification.d.ts +69 -0
- package/dist/src/capture/triage-classification.d.ts.map +1 -0
- package/dist/src/capture/triage-classification.js +62 -0
- package/dist/src/capture/triage-classification.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.d.ts +1 -1
- package/dist/src/capture/triage.d.ts.map +1 -1
- package/dist/src/capture/triage.js +8 -6
- package/dist/src/capture/triage.js.map +1 -1
- package/dist/src/cli/commands/capture.d.ts.map +1 -1
- package/dist/src/cli/commands/capture.js +72 -17
- package/dist/src/cli/commands/capture.js.map +1 -1
- 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/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/menubar.d.ts +50 -0
- package/dist/src/cli/commands/menubar.d.ts.map +1 -1
- package/dist/src/cli/commands/menubar.js +224 -16
- package/dist/src/cli/commands/menubar.js.map +1 -1
- package/dist/src/cli/commands/onboard.d.ts +36 -7
- package/dist/src/cli/commands/onboard.d.ts.map +1 -1
- package/dist/src/cli/commands/onboard.js +256 -53
- package/dist/src/cli/commands/onboard.js.map +1 -1
- package/dist/src/cli/commands/status.d.ts.map +1 -1
- package/dist/src/cli/commands/status.js +16 -0
- package/dist/src/cli/commands/status.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts +34 -1
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +179 -2
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/index.d.ts.map +1 -1
- package/dist/src/cli/index.js +4 -0
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/postinstall-menubar.d.ts.map +1 -1
- package/dist/src/cli/postinstall-menubar.js +14 -0
- package/dist/src/cli/postinstall-menubar.js.map +1 -1
- package/dist/src/cli/status/friend-header.d.ts +18 -0
- package/dist/src/cli/status/friend-header.d.ts.map +1 -1
- package/dist/src/cli/status/friend-header.js +137 -0
- package/dist/src/cli/status/friend-header.js.map +1 -1
- package/dist/src/cli/status/local-signals.d.ts +41 -0
- package/dist/src/cli/status/local-signals.d.ts.map +1 -1
- package/dist/src/cli/status/local-signals.js +48 -0
- package/dist/src/cli/status/local-signals.js.map +1 -1
- package/dist/src/config/schema.d.ts +220 -14
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +82 -7
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/diagnostics/claude-preflight.d.ts +34 -0
- package/dist/src/diagnostics/claude-preflight.d.ts.map +1 -0
- package/dist/src/diagnostics/claude-preflight.js +89 -0
- package/dist/src/diagnostics/claude-preflight.js.map +1 -0
- package/dist/src/diagnostics/codex-preflight.d.ts +1 -1
- package/dist/src/diagnostics/codex-preflight.d.ts.map +1 -1
- package/dist/src/diagnostics/codex-preflight.js +14 -0
- package/dist/src/diagnostics/codex-preflight.js.map +1 -1
- package/dist/src/diagnostics/doctor.d.ts +9 -1
- package/dist/src/diagnostics/doctor.d.ts.map +1 -1
- package/dist/src/diagnostics/doctor.js +57 -2
- package/dist/src/diagnostics/doctor.js.map +1 -1
- 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 +243 -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/indexer.d.ts.map +1 -1
- package/dist/src/ingestion/indexer.js +41 -32
- package/dist/src/ingestion/indexer.js.map +1 -1
- package/dist/src/jobs/handlers/compact.d.ts.map +1 -1
- package/dist/src/jobs/handlers/compact.js +9 -4
- package/dist/src/jobs/handlers/compact.js.map +1 -1
- package/dist/src/jobs/handlers/ingest.d.ts.map +1 -1
- package/dist/src/jobs/handlers/ingest.js +60 -30
- package/dist/src/jobs/handlers/ingest.js.map +1 -1
- package/dist/src/jobs/handlers/reconcile.d.ts.map +1 -1
- package/dist/src/jobs/handlers/reconcile.js +128 -45
- package/dist/src/jobs/handlers/reconcile.js.map +1 -1
- package/dist/src/jobs/handlers/save.d.ts.map +1 -1
- package/dist/src/jobs/handlers/save.js +122 -72
- package/dist/src/jobs/handlers/save.js.map +1 -1
- package/dist/src/jobs/types.d.ts +1 -1
- package/dist/src/main.js +26 -15
- package/dist/src/main.js.map +1 -1
- package/dist/src/mcp/server.d.ts.map +1 -1
- package/dist/src/mcp/server.js +10 -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 +7 -1
- package/dist/src/mcp/tools/context-pack.js.map +1 -1
- package/dist/src/mcp/tools/conversations-search.d.ts +1 -1
- package/dist/src/mcp/tools/conversations-search.d.ts.map +1 -1
- package/dist/src/mcp/tools/conversations-search.js +7 -1
- package/dist/src/mcp/tools/conversations-search.js.map +1 -1
- 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 +7 -2
- package/dist/src/mcp/tools/save.d.ts.map +1 -1
- package/dist/src/mcp/tools/save.js +7 -2
- package/dist/src/mcp/tools/save.js.map +1 -1
- package/dist/src/mcp/tools/search.d.ts.map +1 -1
- package/dist/src/mcp/tools/search.js +7 -1
- package/dist/src/mcp/tools/search.js.map +1 -1
- 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.map +1 -1
- package/dist/src/observability/rift-context.js +3 -0
- package/dist/src/observability/rift-context.js.map +1 -1
- package/dist/src/observability/tool-usage-stats.d.ts +13 -0
- package/dist/src/observability/tool-usage-stats.d.ts.map +1 -1
- package/dist/src/observability/tool-usage-stats.js +15 -0
- package/dist/src/observability/tool-usage-stats.js.map +1 -1
- package/dist/src/observability/tool-usage.d.ts +56 -0
- package/dist/src/observability/tool-usage.d.ts.map +1 -1
- package/dist/src/observability/tool-usage.js +86 -0
- package/dist/src/observability/tool-usage.js.map +1 -1
- 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 +120 -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/codex-cli-metadata-extraction.d.ts.map +1 -1
- package/dist/src/providers/codex-cli-metadata-extraction.js +1 -40
- package/dist/src/providers/codex-cli-metadata-extraction.js.map +1 -1
- package/dist/src/providers/codex-cli-runner.d.ts +7 -0
- package/dist/src/providers/codex-cli-runner.d.ts.map +1 -1
- package/dist/src/providers/codex-cli-runner.js +131 -5
- package/dist/src/providers/codex-cli-runner.js.map +1 -1
- package/dist/src/providers/conversation-generation.d.ts +10 -0
- package/dist/src/providers/conversation-generation.d.ts.map +1 -1
- package/dist/src/providers/conversation-generation.js +54 -13
- package/dist/src/providers/conversation-generation.js.map +1 -1
- package/dist/src/providers/openai-metadata-extraction.d.ts +48 -1
- package/dist/src/providers/openai-metadata-extraction.d.ts.map +1 -1
- package/dist/src/providers/openai-metadata-extraction.js +51 -2
- package/dist/src/providers/openai-metadata-extraction.js.map +1 -1
- package/dist/src/providers/types.d.ts +1 -1
- package/dist/src/providers/types.d.ts.map +1 -1
- package/dist/src/providers/types.js +4 -0
- package/dist/src/providers/types.js.map +1 -1
- package/dist/src/retrieval/compact.d.ts +81 -0
- package/dist/src/retrieval/compact.d.ts.map +1 -1
- package/dist/src/retrieval/compact.js +248 -8
- package/dist/src/retrieval/compact.js.map +1 -1
- package/dist/src/retrieval/context-pack.d.ts.map +1 -1
- package/dist/src/retrieval/context-pack.js +28 -14
- package/dist/src/retrieval/context-pack.js.map +1 -1
- 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/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/lexical.d.ts.map +1 -1
- package/dist/src/retrieval/lexical.js +1 -3
- package/dist/src/retrieval/lexical.js.map +1 -1
- 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 +119 -0
- package/dist/src/retrieval/receipt.js.map +1 -0
- package/dist/src/retrieval/reranker.d.ts +12 -2
- package/dist/src/retrieval/reranker.d.ts.map +1 -1
- package/dist/src/retrieval/reranker.js +11 -4
- package/dist/src/retrieval/reranker.js.map +1 -1
- package/dist/src/retrieval/stitch-chunks.d.ts +73 -0
- package/dist/src/retrieval/stitch-chunks.d.ts.map +1 -0
- package/dist/src/retrieval/stitch-chunks.js +106 -0
- package/dist/src/retrieval/stitch-chunks.js.map +1 -0
- package/dist/src/server/app.d.ts.map +1 -1
- package/dist/src/server/app.js +17 -1
- package/dist/src/server/app.js.map +1 -1
- package/dist/src/server/routes/conversations-search.d.ts.map +1 -1
- package/dist/src/server/routes/conversations-search.js +12 -3
- package/dist/src/server/routes/conversations-search.js.map +1 -1
- package/dist/src/server/routes/friend-status.d.ts +44 -5
- package/dist/src/server/routes/friend-status.d.ts.map +1 -1
- package/dist/src/server/routes/friend-status.js +74 -6
- package/dist/src/server/routes/friend-status.js.map +1 -1
- package/dist/src/server/routes/mcp-usage.d.ts +9 -6
- 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/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 +3 -3
- package/dist/src/server/routes/save.d.ts.map +1 -1
- package/dist/src/server/routes/save.js +6 -2
- package/dist/src/server/routes/save.js.map +1 -1
- package/dist/src/server/routes/search.d.ts.map +1 -1
- package/dist/src/server/routes/search.js +19 -7
- package/dist/src/server/routes/search.js.map +1 -1
- 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/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/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/rebuild.d.ts.map +1 -1
- package/dist/src/storage/rebuild.js +44 -27
- package/dist/src/storage/rebuild.js.map +1 -1
- package/dist/src/storage/tables.d.ts +41 -0
- package/dist/src/storage/tables.d.ts.map +1 -1
- package/dist/src/storage/tables.js +64 -1
- package/dist/src/storage/tables.js.map +1 -1
- package/operator/swiftbar/render-menu.py +57 -15
- package/package.json +5 -3
|
@@ -125,7 +125,7 @@ export declare const ScanSchema: z.ZodObject<{
|
|
|
125
125
|
}, {
|
|
126
126
|
interval_seconds?: number | undefined;
|
|
127
127
|
}>;
|
|
128
|
-
export declare const CaptureSourceEnum: z.ZodEnum<["claude_code", "codex_cli"]>;
|
|
128
|
+
export declare const CaptureSourceEnum: z.ZodEnum<["claude_code", "codex_cli", "cursor_composer"]>;
|
|
129
129
|
export declare const CaptureCodexCliSchema: z.ZodObject<{
|
|
130
130
|
/**
|
|
131
131
|
* Maximum Codex session size, in bytes, eligible for auto-capture triage.
|
|
@@ -140,6 +140,48 @@ export declare const CaptureCodexCliSchema: z.ZodObject<{
|
|
|
140
140
|
}, {
|
|
141
141
|
max_session_bytes?: number | undefined;
|
|
142
142
|
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Triage worker selector. Triage (the auto-capture classifier) is the one AI
|
|
145
|
+
* task a fresh user is forced through to get capture working, so it is the
|
|
146
|
+
* first capability made provider-selectable. `codex_cli` (the default) keeps
|
|
147
|
+
* existing installs byte-for-byte unchanged; `claude_code` routes triage
|
|
148
|
+
* through the locally-authenticated `claude` CLI instead, so a Claude Code
|
|
149
|
+
* user can run capture without installing/authing Codex.
|
|
150
|
+
*
|
|
151
|
+
* Scope is deliberately triage-only: metadata extraction, digest, and
|
|
152
|
+
* embeddings still resolve via their own gates (enrichment.ai_metadata,
|
|
153
|
+
* local_generation, embedding.provider) and are unaffected by this field.
|
|
154
|
+
*/
|
|
155
|
+
export declare const TRIAGE_PROVIDER_VALUES: readonly ["codex_cli", "claude_code"];
|
|
156
|
+
export type TriageProviderName = (typeof TRIAGE_PROVIDER_VALUES)[number];
|
|
157
|
+
export declare const CaptureTriageSchema: z.ZodObject<{
|
|
158
|
+
/**
|
|
159
|
+
* Which local AI worker classifies captured conversations. Defaults to
|
|
160
|
+
* `codex_cli`; set to `claude_code` to triage via the `claude` CLI. Like
|
|
161
|
+
* Codex, the selected worker is an egress path (conversation content is sent
|
|
162
|
+
* to the worker on the operator's own subscription — no Rift-held API key).
|
|
163
|
+
*/
|
|
164
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
165
|
+
}, "strict", z.ZodTypeAny, {
|
|
166
|
+
provider: "claude_code" | "codex_cli";
|
|
167
|
+
}, {
|
|
168
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
export declare const CaptureCursorSchema: z.ZodObject<{
|
|
171
|
+
/**
|
|
172
|
+
* Maximum native-Cursor session size, in bytes, eligible for auto-capture
|
|
173
|
+
* triage. Cursor sessions live in a shared `state.vscdb` (no file to stat),
|
|
174
|
+
* so the guard measures the PARSED transcript before triage; anything larger
|
|
175
|
+
* is parked as a TERMINAL oversized record (no triage, no save) and is not
|
|
176
|
+
* auto-recoverable — remediation is raise-this-limit or split the session.
|
|
177
|
+
* Default lives in `DEFAULT_CURSOR_MAX_SESSION_BYTES` (4 MB).
|
|
178
|
+
*/
|
|
179
|
+
max_session_bytes: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
}, "strict", z.ZodTypeAny, {
|
|
181
|
+
max_session_bytes?: number | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
max_session_bytes?: number | undefined;
|
|
184
|
+
}>;
|
|
143
185
|
export declare const CaptureSchema: z.ZodObject<{
|
|
144
186
|
/** Enable automatic capture of supported local CLI conversations. */
|
|
145
187
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -150,7 +192,7 @@ export declare const CaptureSchema: z.ZodObject<{
|
|
|
150
192
|
* Defaults to both supported live CLI sources. First-run watermarking
|
|
151
193
|
* prevents historical backlog ingestion on enablement.
|
|
152
194
|
*/
|
|
153
|
-
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude_code", "codex_cli"]>, "atleastone">>;
|
|
195
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude_code", "codex_cli", "cursor_composer"]>, "atleastone">>;
|
|
154
196
|
/** Per-source overrides for the codex_cli auto-capture path. */
|
|
155
197
|
codex_cli: z.ZodOptional<z.ZodObject<{
|
|
156
198
|
/**
|
|
@@ -166,20 +208,66 @@ export declare const CaptureSchema: z.ZodObject<{
|
|
|
166
208
|
}, {
|
|
167
209
|
max_session_bytes?: number | undefined;
|
|
168
210
|
}>>;
|
|
211
|
+
/** Per-source overrides for the native Cursor auto-capture path. */
|
|
212
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
213
|
+
/**
|
|
214
|
+
* Maximum native-Cursor session size, in bytes, eligible for auto-capture
|
|
215
|
+
* triage. Cursor sessions live in a shared `state.vscdb` (no file to stat),
|
|
216
|
+
* so the guard measures the PARSED transcript before triage; anything larger
|
|
217
|
+
* is parked as a TERMINAL oversized record (no triage, no save) and is not
|
|
218
|
+
* auto-recoverable — remediation is raise-this-limit or split the session.
|
|
219
|
+
* Default lives in `DEFAULT_CURSOR_MAX_SESSION_BYTES` (4 MB).
|
|
220
|
+
*/
|
|
221
|
+
max_session_bytes: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
}, "strict", z.ZodTypeAny, {
|
|
223
|
+
max_session_bytes?: number | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
max_session_bytes?: number | undefined;
|
|
226
|
+
}>>;
|
|
227
|
+
/**
|
|
228
|
+
* Which AI worker backs triage. Optional (not defaulted) so a config that
|
|
229
|
+
* predates this field still loads; absent reads as `codex_cli` at the
|
|
230
|
+
* resolution site, preserving the prior hardcoded default.
|
|
231
|
+
*/
|
|
232
|
+
triage: z.ZodOptional<z.ZodObject<{
|
|
233
|
+
/**
|
|
234
|
+
* Which local AI worker classifies captured conversations. Defaults to
|
|
235
|
+
* `codex_cli`; set to `claude_code` to triage via the `claude` CLI. Like
|
|
236
|
+
* Codex, the selected worker is an egress path (conversation content is sent
|
|
237
|
+
* to the worker on the operator's own subscription — no Rift-held API key).
|
|
238
|
+
*/
|
|
239
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
240
|
+
}, "strict", z.ZodTypeAny, {
|
|
241
|
+
provider: "claude_code" | "codex_cli";
|
|
242
|
+
}, {
|
|
243
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
244
|
+
}>>;
|
|
169
245
|
}, "strict", z.ZodTypeAny, {
|
|
170
246
|
interval_seconds: number;
|
|
171
247
|
enabled: boolean;
|
|
172
|
-
sources: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]];
|
|
248
|
+
sources: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]];
|
|
173
249
|
codex_cli?: {
|
|
174
250
|
max_session_bytes?: number | undefined;
|
|
175
251
|
} | undefined;
|
|
252
|
+
cursor?: {
|
|
253
|
+
max_session_bytes?: number | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
triage?: {
|
|
256
|
+
provider: "claude_code" | "codex_cli";
|
|
257
|
+
} | undefined;
|
|
176
258
|
}, {
|
|
177
259
|
codex_cli?: {
|
|
178
260
|
max_session_bytes?: number | undefined;
|
|
179
261
|
} | undefined;
|
|
180
262
|
interval_seconds?: number | undefined;
|
|
181
263
|
enabled?: boolean | undefined;
|
|
182
|
-
sources?: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]] | undefined;
|
|
264
|
+
sources?: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]] | undefined;
|
|
265
|
+
cursor?: {
|
|
266
|
+
max_session_bytes?: number | undefined;
|
|
267
|
+
} | undefined;
|
|
268
|
+
triage?: {
|
|
269
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
270
|
+
} | undefined;
|
|
183
271
|
}>;
|
|
184
272
|
export declare const LocalGenerationSchema: z.ZodEffects<z.ZodObject<{
|
|
185
273
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -294,18 +382,59 @@ export declare const CodexCliSchema: z.ZodObject<{
|
|
|
294
382
|
* the daemon makes a metadata-only npm version check — no content, no key, no
|
|
295
383
|
* machine info.)
|
|
296
384
|
*
|
|
297
|
-
* It flips to true only when the user explicitly opts into
|
|
298
|
-
* (`rift onboard --enable-codex-enrichment
|
|
299
|
-
* (Ollama) enrichment has its own explicit
|
|
300
|
-
* and is unaffected by this gate. The
|
|
301
|
-
* still force-disables regardless, for
|
|
385
|
+
* It flips to true only when the user explicitly opts into AI enrichment
|
|
386
|
+
* (`rift onboard --enable-codex-enrichment` or `--enable-claude-enrichment`,
|
|
387
|
+
* which persist this flag). Local (Ollama) enrichment has its own explicit
|
|
388
|
+
* opt-in via `local_generation.enabled` and is unaffected by this gate. The
|
|
389
|
+
* `RIFT_DISABLE_AI_METADATA` env override still force-disables regardless, for
|
|
390
|
+
* the activation benchmark.
|
|
302
391
|
*/
|
|
392
|
+
/**
|
|
393
|
+
* Metadata-extraction worker selector — the metadata-capability analogue of
|
|
394
|
+
* `capture.triage.provider`. This is deliberately nested UNDER `metadata`
|
|
395
|
+
* (not a flat `enrichment.provider`) because `enrichment` is a namespace that
|
|
396
|
+
* spans more than one capability: a flat provider would conflate metadata with
|
|
397
|
+
* the future digest worker and re-create the global-worker ambiguity we avoid
|
|
398
|
+
* elsewhere. Capability-level routing (`enrichment.metadata.provider`, later
|
|
399
|
+
* `enrichment.digest.provider`) keeps each capability independently selectable.
|
|
400
|
+
*
|
|
401
|
+
* `codex_cli` (the default) preserves today's behavior byte-for-byte. It only
|
|
402
|
+
* takes effect when `ai_metadata` is true — the gate above makes ZERO AI calls
|
|
403
|
+
* regardless of this value when enrichment is off. `claude_code` routes
|
|
404
|
+
* metadata through the `claude` CLI on the operator's subscription; if that CLI
|
|
405
|
+
* is missing or a run fails, extraction falls back to deterministic basic
|
|
406
|
+
* metadata (never blocks import). NOTE: selecting `claude_code` leaves digests/
|
|
407
|
+
* compaction OFF — there is no Claude digest worker yet and we do NOT silently
|
|
408
|
+
* borrow Codex for it; that ships with a dedicated `enrichment.digest.provider`.
|
|
409
|
+
*/
|
|
410
|
+
export declare const ENRICHMENT_METADATA_PROVIDER_VALUES: readonly ["codex_cli", "claude_code"];
|
|
411
|
+
export type EnrichmentMetadataProviderName = (typeof ENRICHMENT_METADATA_PROVIDER_VALUES)[number];
|
|
412
|
+
export declare const EnrichmentMetadataSchema: z.ZodObject<{
|
|
413
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
414
|
+
}, "strict", z.ZodTypeAny, {
|
|
415
|
+
provider: "claude_code" | "codex_cli";
|
|
416
|
+
}, {
|
|
417
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
418
|
+
}>;
|
|
303
419
|
export declare const EnrichmentSchema: z.ZodObject<{
|
|
304
420
|
ai_metadata: z.ZodDefault<z.ZodBoolean>;
|
|
421
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
423
|
+
}, "strict", z.ZodTypeAny, {
|
|
424
|
+
provider: "claude_code" | "codex_cli";
|
|
425
|
+
}, {
|
|
426
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
427
|
+
}>>;
|
|
305
428
|
}, "strict", z.ZodTypeAny, {
|
|
306
429
|
ai_metadata: boolean;
|
|
430
|
+
metadata?: {
|
|
431
|
+
provider: "claude_code" | "codex_cli";
|
|
432
|
+
} | undefined;
|
|
307
433
|
}, {
|
|
308
434
|
ai_metadata?: boolean | undefined;
|
|
435
|
+
metadata?: {
|
|
436
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
437
|
+
} | undefined;
|
|
309
438
|
}>;
|
|
310
439
|
export declare const ConfigSchema: z.ZodObject<{
|
|
311
440
|
sources: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -436,7 +565,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
436
565
|
* Defaults to both supported live CLI sources. First-run watermarking
|
|
437
566
|
* prevents historical backlog ingestion on enablement.
|
|
438
567
|
*/
|
|
439
|
-
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude_code", "codex_cli"]>, "atleastone">>;
|
|
568
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude_code", "codex_cli", "cursor_composer"]>, "atleastone">>;
|
|
440
569
|
/** Per-source overrides for the codex_cli auto-capture path. */
|
|
441
570
|
codex_cli: z.ZodOptional<z.ZodObject<{
|
|
442
571
|
/**
|
|
@@ -452,20 +581,66 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
452
581
|
}, {
|
|
453
582
|
max_session_bytes?: number | undefined;
|
|
454
583
|
}>>;
|
|
584
|
+
/** Per-source overrides for the native Cursor auto-capture path. */
|
|
585
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
586
|
+
/**
|
|
587
|
+
* Maximum native-Cursor session size, in bytes, eligible for auto-capture
|
|
588
|
+
* triage. Cursor sessions live in a shared `state.vscdb` (no file to stat),
|
|
589
|
+
* so the guard measures the PARSED transcript before triage; anything larger
|
|
590
|
+
* is parked as a TERMINAL oversized record (no triage, no save) and is not
|
|
591
|
+
* auto-recoverable — remediation is raise-this-limit or split the session.
|
|
592
|
+
* Default lives in `DEFAULT_CURSOR_MAX_SESSION_BYTES` (4 MB).
|
|
593
|
+
*/
|
|
594
|
+
max_session_bytes: z.ZodOptional<z.ZodNumber>;
|
|
595
|
+
}, "strict", z.ZodTypeAny, {
|
|
596
|
+
max_session_bytes?: number | undefined;
|
|
597
|
+
}, {
|
|
598
|
+
max_session_bytes?: number | undefined;
|
|
599
|
+
}>>;
|
|
600
|
+
/**
|
|
601
|
+
* Which AI worker backs triage. Optional (not defaulted) so a config that
|
|
602
|
+
* predates this field still loads; absent reads as `codex_cli` at the
|
|
603
|
+
* resolution site, preserving the prior hardcoded default.
|
|
604
|
+
*/
|
|
605
|
+
triage: z.ZodOptional<z.ZodObject<{
|
|
606
|
+
/**
|
|
607
|
+
* Which local AI worker classifies captured conversations. Defaults to
|
|
608
|
+
* `codex_cli`; set to `claude_code` to triage via the `claude` CLI. Like
|
|
609
|
+
* Codex, the selected worker is an egress path (conversation content is sent
|
|
610
|
+
* to the worker on the operator's own subscription — no Rift-held API key).
|
|
611
|
+
*/
|
|
612
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
613
|
+
}, "strict", z.ZodTypeAny, {
|
|
614
|
+
provider: "claude_code" | "codex_cli";
|
|
615
|
+
}, {
|
|
616
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
617
|
+
}>>;
|
|
455
618
|
}, "strict", z.ZodTypeAny, {
|
|
456
619
|
interval_seconds: number;
|
|
457
620
|
enabled: boolean;
|
|
458
|
-
sources: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]];
|
|
621
|
+
sources: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]];
|
|
459
622
|
codex_cli?: {
|
|
460
623
|
max_session_bytes?: number | undefined;
|
|
461
624
|
} | undefined;
|
|
625
|
+
cursor?: {
|
|
626
|
+
max_session_bytes?: number | undefined;
|
|
627
|
+
} | undefined;
|
|
628
|
+
triage?: {
|
|
629
|
+
provider: "claude_code" | "codex_cli";
|
|
630
|
+
} | undefined;
|
|
462
631
|
}, {
|
|
463
632
|
codex_cli?: {
|
|
464
633
|
max_session_bytes?: number | undefined;
|
|
465
634
|
} | undefined;
|
|
466
635
|
interval_seconds?: number | undefined;
|
|
467
636
|
enabled?: boolean | undefined;
|
|
468
|
-
sources?: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]] | undefined;
|
|
637
|
+
sources?: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]] | undefined;
|
|
638
|
+
cursor?: {
|
|
639
|
+
max_session_bytes?: number | undefined;
|
|
640
|
+
} | undefined;
|
|
641
|
+
triage?: {
|
|
642
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
643
|
+
} | undefined;
|
|
469
644
|
}>>;
|
|
470
645
|
codex_cli: z.ZodOptional<z.ZodObject<{
|
|
471
646
|
/**
|
|
@@ -520,10 +695,23 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
520
695
|
}>>;
|
|
521
696
|
enrichment: z.ZodOptional<z.ZodObject<{
|
|
522
697
|
ai_metadata: z.ZodDefault<z.ZodBoolean>;
|
|
698
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
699
|
+
provider: z.ZodDefault<z.ZodEnum<["codex_cli", "claude_code"]>>;
|
|
700
|
+
}, "strict", z.ZodTypeAny, {
|
|
701
|
+
provider: "claude_code" | "codex_cli";
|
|
702
|
+
}, {
|
|
703
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
704
|
+
}>>;
|
|
523
705
|
}, "strict", z.ZodTypeAny, {
|
|
524
706
|
ai_metadata: boolean;
|
|
707
|
+
metadata?: {
|
|
708
|
+
provider: "claude_code" | "codex_cli";
|
|
709
|
+
} | undefined;
|
|
525
710
|
}, {
|
|
526
711
|
ai_metadata?: boolean | undefined;
|
|
712
|
+
metadata?: {
|
|
713
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
714
|
+
} | undefined;
|
|
527
715
|
}>>;
|
|
528
716
|
request_limits: z.ZodDefault<z.ZodObject<{
|
|
529
717
|
json_body_limit_bytes: z.ZodDefault<z.ZodNumber>;
|
|
@@ -598,10 +786,16 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
598
786
|
capture: {
|
|
599
787
|
interval_seconds: number;
|
|
600
788
|
enabled: boolean;
|
|
601
|
-
sources: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]];
|
|
789
|
+
sources: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]];
|
|
602
790
|
codex_cli?: {
|
|
603
791
|
max_session_bytes?: number | undefined;
|
|
604
792
|
} | undefined;
|
|
793
|
+
cursor?: {
|
|
794
|
+
max_session_bytes?: number | undefined;
|
|
795
|
+
} | undefined;
|
|
796
|
+
triage?: {
|
|
797
|
+
provider: "claude_code" | "codex_cli";
|
|
798
|
+
} | undefined;
|
|
605
799
|
};
|
|
606
800
|
request_limits: {
|
|
607
801
|
json_body_limit_bytes: number;
|
|
@@ -632,6 +826,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
632
826
|
} | undefined;
|
|
633
827
|
enrichment?: {
|
|
634
828
|
ai_metadata: boolean;
|
|
829
|
+
metadata?: {
|
|
830
|
+
provider: "claude_code" | "codex_cli";
|
|
831
|
+
} | undefined;
|
|
635
832
|
} | undefined;
|
|
636
833
|
}, {
|
|
637
834
|
sources: {
|
|
@@ -680,7 +877,13 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
680
877
|
} | undefined;
|
|
681
878
|
interval_seconds?: number | undefined;
|
|
682
879
|
enabled?: boolean | undefined;
|
|
683
|
-
sources?: ["claude_code" | "codex_cli", ...("claude_code" | "codex_cli")[]] | undefined;
|
|
880
|
+
sources?: ["claude_code" | "codex_cli" | "cursor_composer", ...("claude_code" | "codex_cli" | "cursor_composer")[]] | undefined;
|
|
881
|
+
cursor?: {
|
|
882
|
+
max_session_bytes?: number | undefined;
|
|
883
|
+
} | undefined;
|
|
884
|
+
triage?: {
|
|
885
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
886
|
+
} | undefined;
|
|
684
887
|
} | undefined;
|
|
685
888
|
local_generation?: {
|
|
686
889
|
mode?: "strict_local_only" | undefined;
|
|
@@ -692,6 +895,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
692
895
|
} | undefined;
|
|
693
896
|
enrichment?: {
|
|
694
897
|
ai_metadata?: boolean | undefined;
|
|
898
|
+
metadata?: {
|
|
899
|
+
provider?: "claude_code" | "codex_cli" | undefined;
|
|
900
|
+
} | undefined;
|
|
695
901
|
} | undefined;
|
|
696
902
|
request_limits?: {
|
|
697
903
|
json_body_limit_bytes?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/config/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,cAAc,+BAA6B,CAAC;AACzD,eAAO,MAAM,QAAQ,wCAAsC,CAAC;AAC5D,eAAO,MAAM,SAAS,8CAA4C,CAAC;AAInE,eAAO,MAAM,eAAe;;;;;;IAOxB;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDH,CAAC;AAE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TO_CAPTURE_SOURCE_VALUES, } from "../capture/sources.js";
|
|
4
4
|
// --- Enums ---
|
|
5
5
|
export const ExtractionEnum = z.enum(["cloud", "local"]);
|
|
6
6
|
export const ModeEnum = z.enum(["watch", "scheduled_scan"]);
|
|
@@ -103,7 +103,11 @@ export const ScanSchema = z.object({
|
|
|
103
103
|
/** Scan interval in seconds. Default: 604800 (7 days / weekly). */
|
|
104
104
|
interval_seconds: z.number().int().positive().default(604_800),
|
|
105
105
|
}).strict();
|
|
106
|
-
|
|
106
|
+
// Sources accepted in `capture.sources`. Built from the scheduled-eligible set,
|
|
107
|
+
// which now includes `cursor_composer` (Cursor scheduling slice): adding it here
|
|
108
|
+
// is the deliberate, persisted opt-in for native Cursor capture. It is NOT a
|
|
109
|
+
// default (see DEFAULT_AUTO_CAPTURE_SOURCES), so a fresh config never enables it.
|
|
110
|
+
export const CaptureSourceEnum = z.enum(SCHEDULED_AUTO_CAPTURE_SOURCE_VALUES);
|
|
107
111
|
export const CaptureCodexCliSchema = z.object({
|
|
108
112
|
/**
|
|
109
113
|
* Maximum Codex session size, in bytes, eligible for auto-capture triage.
|
|
@@ -114,6 +118,39 @@ export const CaptureCodexCliSchema = z.object({
|
|
|
114
118
|
*/
|
|
115
119
|
max_session_bytes: z.number().int().positive().optional(),
|
|
116
120
|
}).strict();
|
|
121
|
+
/**
|
|
122
|
+
* Triage worker selector. Triage (the auto-capture classifier) is the one AI
|
|
123
|
+
* task a fresh user is forced through to get capture working, so it is the
|
|
124
|
+
* first capability made provider-selectable. `codex_cli` (the default) keeps
|
|
125
|
+
* existing installs byte-for-byte unchanged; `claude_code` routes triage
|
|
126
|
+
* through the locally-authenticated `claude` CLI instead, so a Claude Code
|
|
127
|
+
* user can run capture without installing/authing Codex.
|
|
128
|
+
*
|
|
129
|
+
* Scope is deliberately triage-only: metadata extraction, digest, and
|
|
130
|
+
* embeddings still resolve via their own gates (enrichment.ai_metadata,
|
|
131
|
+
* local_generation, embedding.provider) and are unaffected by this field.
|
|
132
|
+
*/
|
|
133
|
+
export const TRIAGE_PROVIDER_VALUES = ["codex_cli", "claude_code"];
|
|
134
|
+
export const CaptureTriageSchema = z.object({
|
|
135
|
+
/**
|
|
136
|
+
* Which local AI worker classifies captured conversations. Defaults to
|
|
137
|
+
* `codex_cli`; set to `claude_code` to triage via the `claude` CLI. Like
|
|
138
|
+
* Codex, the selected worker is an egress path (conversation content is sent
|
|
139
|
+
* to the worker on the operator's own subscription — no Rift-held API key).
|
|
140
|
+
*/
|
|
141
|
+
provider: z.enum(TRIAGE_PROVIDER_VALUES).default("codex_cli"),
|
|
142
|
+
}).strict();
|
|
143
|
+
export const CaptureCursorSchema = z.object({
|
|
144
|
+
/**
|
|
145
|
+
* Maximum native-Cursor session size, in bytes, eligible for auto-capture
|
|
146
|
+
* triage. Cursor sessions live in a shared `state.vscdb` (no file to stat),
|
|
147
|
+
* so the guard measures the PARSED transcript before triage; anything larger
|
|
148
|
+
* is parked as a TERMINAL oversized record (no triage, no save) and is not
|
|
149
|
+
* auto-recoverable — remediation is raise-this-limit or split the session.
|
|
150
|
+
* Default lives in `DEFAULT_CURSOR_MAX_SESSION_BYTES` (4 MB).
|
|
151
|
+
*/
|
|
152
|
+
max_session_bytes: z.number().int().positive().optional(),
|
|
153
|
+
}).strict();
|
|
117
154
|
export const CaptureSchema = z.object({
|
|
118
155
|
/** Enable automatic capture of supported local CLI conversations. */
|
|
119
156
|
enabled: z.boolean().default(false),
|
|
@@ -127,6 +164,14 @@ export const CaptureSchema = z.object({
|
|
|
127
164
|
sources: z.array(CaptureSourceEnum).nonempty().default(DEFAULT_AUTO_CAPTURE_SOURCES),
|
|
128
165
|
/** Per-source overrides for the codex_cli auto-capture path. */
|
|
129
166
|
codex_cli: CaptureCodexCliSchema.optional(),
|
|
167
|
+
/** Per-source overrides for the native Cursor auto-capture path. */
|
|
168
|
+
cursor: CaptureCursorSchema.optional(),
|
|
169
|
+
/**
|
|
170
|
+
* Which AI worker backs triage. Optional (not defaulted) so a config that
|
|
171
|
+
* predates this field still loads; absent reads as `codex_cli` at the
|
|
172
|
+
* resolution site, preserving the prior hardcoded default.
|
|
173
|
+
*/
|
|
174
|
+
triage: CaptureTriageSchema.optional(),
|
|
130
175
|
}).strict();
|
|
131
176
|
export const LocalGenerationSchema = z
|
|
132
177
|
.object({
|
|
@@ -218,14 +263,44 @@ export const CodexCliSchema = z
|
|
|
218
263
|
* the daemon makes a metadata-only npm version check — no content, no key, no
|
|
219
264
|
* machine info.)
|
|
220
265
|
*
|
|
221
|
-
* It flips to true only when the user explicitly opts into
|
|
222
|
-
* (`rift onboard --enable-codex-enrichment
|
|
223
|
-
* (Ollama) enrichment has its own explicit
|
|
224
|
-
* and is unaffected by this gate. The
|
|
225
|
-
* still force-disables regardless, for
|
|
266
|
+
* It flips to true only when the user explicitly opts into AI enrichment
|
|
267
|
+
* (`rift onboard --enable-codex-enrichment` or `--enable-claude-enrichment`,
|
|
268
|
+
* which persist this flag). Local (Ollama) enrichment has its own explicit
|
|
269
|
+
* opt-in via `local_generation.enabled` and is unaffected by this gate. The
|
|
270
|
+
* `RIFT_DISABLE_AI_METADATA` env override still force-disables regardless, for
|
|
271
|
+
* the activation benchmark.
|
|
226
272
|
*/
|
|
273
|
+
/**
|
|
274
|
+
* Metadata-extraction worker selector — the metadata-capability analogue of
|
|
275
|
+
* `capture.triage.provider`. This is deliberately nested UNDER `metadata`
|
|
276
|
+
* (not a flat `enrichment.provider`) because `enrichment` is a namespace that
|
|
277
|
+
* spans more than one capability: a flat provider would conflate metadata with
|
|
278
|
+
* the future digest worker and re-create the global-worker ambiguity we avoid
|
|
279
|
+
* elsewhere. Capability-level routing (`enrichment.metadata.provider`, later
|
|
280
|
+
* `enrichment.digest.provider`) keeps each capability independently selectable.
|
|
281
|
+
*
|
|
282
|
+
* `codex_cli` (the default) preserves today's behavior byte-for-byte. It only
|
|
283
|
+
* takes effect when `ai_metadata` is true — the gate above makes ZERO AI calls
|
|
284
|
+
* regardless of this value when enrichment is off. `claude_code` routes
|
|
285
|
+
* metadata through the `claude` CLI on the operator's subscription; if that CLI
|
|
286
|
+
* is missing or a run fails, extraction falls back to deterministic basic
|
|
287
|
+
* metadata (never blocks import). NOTE: selecting `claude_code` leaves digests/
|
|
288
|
+
* compaction OFF — there is no Claude digest worker yet and we do NOT silently
|
|
289
|
+
* borrow Codex for it; that ships with a dedicated `enrichment.digest.provider`.
|
|
290
|
+
*/
|
|
291
|
+
export const ENRICHMENT_METADATA_PROVIDER_VALUES = [
|
|
292
|
+
"codex_cli",
|
|
293
|
+
"claude_code",
|
|
294
|
+
];
|
|
295
|
+
export const EnrichmentMetadataSchema = z
|
|
296
|
+
.object({
|
|
297
|
+
provider: z.enum(ENRICHMENT_METADATA_PROVIDER_VALUES).default("codex_cli"),
|
|
298
|
+
})
|
|
299
|
+
.strict();
|
|
227
300
|
export const EnrichmentSchema = z.object({
|
|
228
301
|
ai_metadata: z.boolean().default(false),
|
|
302
|
+
// Optional: absent → Codex (default), preserving every pre-existing config.
|
|
303
|
+
metadata: EnrichmentMetadataSchema.optional(),
|
|
229
304
|
}).strict();
|
|
230
305
|
// --- Top-level schema ---
|
|
231
306
|
export const ConfigSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,GACrC,MAAM,uBAAuB,CAAC;AAE/B,gBAAgB;AAEhB,MAAM,CAAC,MAAM,cAAc,GAAG,CA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EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;CACjC,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classification of a recorded Claude Code `preflight_error` (the capture-triage
|
|
3
|
+
* probe failure) into a coarse class that drives honest, CLAUDE-SPECIFIC
|
|
4
|
+
* doctor/status copy — the Claude analogue of `codex-preflight.ts`.
|
|
5
|
+
*
|
|
6
|
+
* The string we classify is the runner's OWN leak-free error (see
|
|
7
|
+
* `claude-cli-runner.ts`): a canned `classifyClaudeStderr` phrase, the
|
|
8
|
+
* "No compatible Claude Code CLI found …" aggregate, the "was not found …"
|
|
9
|
+
* message, or a timeout. Those are structural phrases the runner emits — never
|
|
10
|
+
* raw stderr, prompt, or model output (the runner already stripped those). So we
|
|
11
|
+
* only ever pattern-match Rift's own wording here; nothing user-content-bearing
|
|
12
|
+
* reaches this module.
|
|
13
|
+
*
|
|
14
|
+
* Why a separate worker: when capture triage runs through `claude` instead of
|
|
15
|
+
* `codex`, "run codex login" is wrong advice. A Claude user needs Claude-shaped
|
|
16
|
+
* remedies — sign into `claude`, upgrade an old CLI that lacks `--safe-mode`, or
|
|
17
|
+
* point `RIFT_CLAUDE_CLI_PATH` past a wrapper. These classes encode exactly the
|
|
18
|
+
* failure buckets the runner can produce.
|
|
19
|
+
*/
|
|
20
|
+
export type ClaudePreflightErrorClass = "missing" | "incompatible" | "wrapper" | "auth" | "rate_limit" | "network" | "timeout" | "unknown";
|
|
21
|
+
export declare function classifyClaudePreflightError(error: string | null | undefined): ClaudePreflightErrorClass;
|
|
22
|
+
/**
|
|
23
|
+
* A short, leak-free, human summary for a class. Deliberately canned (no raw
|
|
24
|
+
* stderr, no file paths, no prompt/session content) so SwiftBar/doctor can
|
|
25
|
+
* surface it without parsing or redacting raw `claude` output.
|
|
26
|
+
*/
|
|
27
|
+
export declare function summarizeClaudePreflightClass(cls: ClaudePreflightErrorClass): string;
|
|
28
|
+
/**
|
|
29
|
+
* The single concrete remedy for a class — shown as the doctor `nextAction` and
|
|
30
|
+
* the status `Next:` line. Claude-shaped (never "codex login"), and it always
|
|
31
|
+
* ends by pointing back at `rift capture` so the user can re-verify.
|
|
32
|
+
*/
|
|
33
|
+
export declare function claudePreflightNextAction(cls: ClaudePreflightErrorClass): string;
|
|
34
|
+
//# sourceMappingURL=claude-preflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-preflight.d.ts","sourceRoot":"","sources":["../../../src/diagnostics/claude-preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,cAAc,GACd,SAAS,GACT,MAAM,GACN,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,yBAAyB,CA2D3B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,yBAAyB,GAC7B,MAAM,CAmBR;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,yBAAyB,GAC7B,MAAM,CAkBR"}
|