@cueai/omni-reader-mcp 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { type RepresentationIntent } from "./protocol.js";
1
2
  export type JournalState = "CREATED" | "GRANT_PENDING" | "GRANT_ISSUED" | "UPLOADING" | "PROCESSING" | "RESULT_READY" | "ACK_PENDING" | "CLEANUP_PENDING" | "COMPLETED" | "FAILED" | "CANCELED" | "EXPIRED";
2
3
  export type JournalProgressUnit = "page" | "sheet" | "slide" | "frame" | "segment";
3
4
  export type JournalCleanupState = "not_created" | "in_use" | "pending" | "deleted";
@@ -7,11 +8,20 @@ export interface JournalProgress {
7
8
  readonly completed: number;
8
9
  readonly total: number;
9
10
  }
11
+ export type JournalSourceKind = "local" | "url";
12
+ export type JournalDetail = "text" | "grounded" | "layout";
13
+ export type JournalGroundingSchemaVersion = "none" | "omni.grounding.v1";
14
+ export type JournalBundleProtocolVersion = "none" | "omni.result_bundle.v1";
10
15
  export interface JournalRecord {
11
16
  readonly clientRequestId: string;
12
- readonly requestHash: string;
17
+ readonly requestIdentityHmac: string | null;
18
+ readonly sourceLocatorHmac: string | null;
19
+ readonly requestHash: string | null;
13
20
  readonly sourceLocatorHash: string | null;
14
- readonly sourceKind: "local" | "url";
21
+ readonly sourceKind: JournalSourceKind;
22
+ readonly detail: JournalDetail;
23
+ readonly groundingSchemaVersion: JournalGroundingSchemaVersion;
24
+ readonly bundleProtocolVersion: JournalBundleProtocolVersion;
15
25
  readonly operationId: string | null;
16
26
  readonly operationToken: string | null;
17
27
  readonly uploadUrl: string | null;
@@ -61,6 +71,7 @@ export interface OperationJournalOptions {
61
71
  readonly rootDirectory?: string;
62
72
  readonly now?: () => Date;
63
73
  }
74
+ export declare const LEGACY_RECOVERY_FAILURE_CODE = "SOURCE_FACTS_NOT_RECOVERABLE";
64
75
  /**
65
76
  * Rename with a Windows fallback. Node's rename() rejects replacing an
66
77
  * existing destination on Windows with EPERM instead of overwriting
@@ -72,12 +83,15 @@ export declare function renameWithFallback(sourcePath: string, destinationPath:
72
83
  export declare class OperationJournal {
73
84
  #private;
74
85
  constructor(options?: OperationJournalOptions);
75
- beginIntent(clientRequestId: string, requestHash: string, sourceKind?: "local" | "url", sourceLocatorHash?: string | null): Promise<JournalRecord>;
86
+ requestIdentityHmac(canonicalIdentityJson: string): Promise<string>;
87
+ sourceLocatorHmac(sourceLocator: string): Promise<string>;
88
+ beginIntent(clientRequestId: string, canonicalIdentityJson: string, sourceKind?: JournalSourceKind, sourceLocator?: string | null, representation?: RepresentationIntent): Promise<JournalRecord>;
89
+ migrateLegacyRecord(clientRequestId: string, canonicalIdentityJson: string, sourceLocator?: string | null): Promise<JournalRecord | null>;
76
90
  transition(clientRequestId: string, expectedState: JournalState, nextState: JournalState, patch: JournalPatch): Promise<JournalRecord>;
77
91
  loadByRequestId(clientRequestId: string): Promise<JournalRecord | null>;
78
92
  loadByOperationId(operationId: string): Promise<JournalRecord | null>;
79
- loadLatestByRequestHash(requestHash: string): Promise<JournalRecord | null>;
80
- loadLatestBySourceLocatorHash(sourceLocatorHash: string): Promise<JournalRecord | null>;
93
+ loadLatestByRequestIdentityHmac(requestIdentityHmac: string): Promise<JournalRecord | null>;
94
+ loadLatestBySourceLocatorHmac(sourceLocatorHmac: string): Promise<JournalRecord | null>;
81
95
  listRecoverable(): Promise<JournalRecord[]>;
82
96
  begin(clientRequestId: string, requestHash: string): Promise<JournalRecord>;
83
97
  markGrantIssued(clientRequestId: string, fields: IssuedGrantJournalFields): Promise<JournalRecord>;