mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 23:33:29 +00:00
Merge branch 'feat/ai-extraction-routes' into feat/ai-jobs-stored-text
Brings in the extraction routes and the capability re-check at the wire (`aiEgressRefusal`), so the jobs and stored-text work can share it. Conflicts in the document routes, the fenced chat, the auto-read toggle and its contract text resolve to the extraction branch: those files no longer call the per-pick document consent helper.
This commit is contained in:
commit
f158f01f18
57 files changed
+3158
-676
No files matched your search
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
import { z } from "zod/v4";
|
||||
|
||||
import type { AiCapabilityState } from "@/lib/ai/capabilities/types";
|
||||
|
||||
/** Max facts a single document may stage / confirm. A dense letter is ~40. */
|
||||
export const INBOUND_MAX_FACTS = 120;
|
||||
|
||||
@@ -840,6 +842,12 @@ export interface DocumentAiCapabilityDto {
|
||||
* - null: no read is available (see `reason`).
|
||||
*/
|
||||
egress: DocumentEgressClass | null;
|
||||
/**
|
||||
* The `documentAi` capability for this record. When it is closed by
|
||||
* anything other than a missing provider or a missing consent receipt,
|
||||
* `available` is false with a null `reason`, and this says why.
|
||||
*/
|
||||
ai: AiCapabilityState;
|
||||
}
|
||||
|
||||
// ─── AI assist / summary / index (Document vault P2) ────────────────────────
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* The DTO types the routes return + the UI consumes are derived here so the
|
||||
* three layers agree on one shape.
|
||||
*/
|
||||
import type { AiCapabilityState } from "@/lib/ai/capabilities/types";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
import type { WrittenOutcome } from "@/lib/outcome/written-outcome";
|
||||
@@ -258,6 +259,12 @@ export interface OcrCapabilityDto {
|
||||
reason: "no-provider" | "enable-local-ocr" | null;
|
||||
/** Whether PDF uploads are accepted (Anthropic vision provider only). */
|
||||
pdfSupported: boolean;
|
||||
/**
|
||||
* The `labsOcr` capability for this record. When it is closed by anything
|
||||
* other than a missing provider or a missing consent receipt, `available`
|
||||
* is false with a null `reason`, and this says why.
|
||||
*/
|
||||
ai: AiCapabilityState;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user