@jarkkojs/readseek-api 0.10.6 → 0.11.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.
- package/README.md +14 -5
- package/dist/argv.d.ts +74 -39
- package/dist/client-output.d.ts +273 -20
- package/dist/client.d.ts +39 -128
- package/dist/contract.d.ts +30 -30
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1515 -1677
- package/dist/process.d.ts +3 -2
- package/dist/validation.d.ts +3 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ platform binary; plugins declare both packages directly.
|
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
buildShowStructureArgs,
|
|
25
25
|
resolveReadSeekBinaryFromPackages,
|
|
26
26
|
resolveReadSeekBinaryOverride,
|
|
27
27
|
runReadSeekNodeKdl,
|
|
@@ -29,13 +29,22 @@ import {
|
|
|
29
29
|
|
|
30
30
|
const binary =
|
|
31
31
|
resolveReadSeekBinaryOverride() ?? resolveReadSeekBinaryFromPackages();
|
|
32
|
-
const args =
|
|
32
|
+
const args = buildShowStructureArgs({ path: "src/index.ts", depth: 2 });
|
|
33
33
|
const result = await runReadSeekNodeKdl(binary, args);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
The API follows the CLI's verb–object grammar: `showContent`, `showStructure`,
|
|
37
|
+
`showMetadata`, `showAssets`, `findNodes`, `findText`, `findDefinitions`,
|
|
38
|
+
`findReferences`, `checkSyntax`, `checkRules`, `generateCaption`, `detectObjects`,
|
|
39
|
+
`recognizeText`, `editText`, and `renameSymbol`. Selection uses `at`.
|
|
40
|
+
|
|
41
|
+
Document content and asset results include usable cached image paths. There is no
|
|
42
|
+
separate extraction step or destination argument. Cache population is an internal
|
|
43
|
+
write; reading never invokes inference. Syntax checks return diagnostics even
|
|
44
|
+
when the native process exits 1 (findings); exit 2 is a failure.
|
|
45
|
+
|
|
46
|
+
This is a breaking contract: legacy `inspect`/`extract` methods, selectable facets,
|
|
47
|
+
and old command names are removed, not aliased.
|
|
39
48
|
|
|
40
49
|
## Licensing
|
|
41
50
|
|
package/dist/argv.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type GitScope, type
|
|
2
|
-
export declare const
|
|
1
|
+
import { type GitScope, type VisionLevel } from "./contract.ts";
|
|
2
|
+
export declare const DEFAULT_STRUCTURE_DEPTH = 1;
|
|
3
3
|
export declare function buildLineLocation(line: number, column?: number): string;
|
|
4
4
|
export type GitScopeInput = {
|
|
5
5
|
gitScope?: GitScope;
|
|
@@ -12,20 +12,6 @@ export type ApplyPlanHashInput = {
|
|
|
12
12
|
flagOrder?: ApplyPlanHashOrder;
|
|
13
13
|
};
|
|
14
14
|
export declare function appendApplyAndPlanHash(args: string[], input: ApplyPlanHashInput): string[];
|
|
15
|
-
export type InspectArgsInput = {
|
|
16
|
-
path: string;
|
|
17
|
-
selector?: string;
|
|
18
|
-
select?: InspectFacet | InspectFacet[] | string;
|
|
19
|
-
query?: string;
|
|
20
|
-
end?: number;
|
|
21
|
-
limit?: number;
|
|
22
|
-
depth?: number;
|
|
23
|
-
language?: string;
|
|
24
|
-
visionMode?: VisionMode;
|
|
25
|
-
visionLevel?: VisionLevel;
|
|
26
|
-
stdinName?: string;
|
|
27
|
-
readseekDir?: string;
|
|
28
|
-
};
|
|
29
15
|
declare const SELECTOR_KINDS: readonly ["line", "hash", "symbol", "page", "node", "asset"];
|
|
30
16
|
type SelectorKind = (typeof SELECTOR_KINDS)[number];
|
|
31
17
|
type ParsedSelector = {
|
|
@@ -35,56 +21,105 @@ type ParsedSelector = {
|
|
|
35
21
|
};
|
|
36
22
|
/** Mirrors core::ParseSelector so wrappers reject the same selectors natively. */
|
|
37
23
|
export declare function parseSelector(text: string): ParsedSelector;
|
|
38
|
-
export
|
|
39
|
-
export type ExtractArgsInput = {
|
|
24
|
+
export type AccessArgsInput = {
|
|
40
25
|
path: string;
|
|
41
|
-
selector: string;
|
|
42
|
-
output: string;
|
|
43
26
|
stdinName?: string;
|
|
44
27
|
readseekDir?: string;
|
|
45
28
|
};
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
29
|
+
export type ShowContentArgsInput = AccessArgsInput & {
|
|
30
|
+
at?: string;
|
|
31
|
+
end?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
language?: string;
|
|
34
|
+
noAnchors?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type ShowStructureArgsInput = AccessArgsInput & {
|
|
37
|
+
at?: string;
|
|
38
|
+
depth?: number;
|
|
39
|
+
kind?: string;
|
|
40
|
+
outline?: boolean;
|
|
41
|
+
language?: string;
|
|
42
|
+
};
|
|
43
|
+
export type ShowMetadataArgsInput = AccessArgsInput & {
|
|
44
|
+
language?: string;
|
|
45
|
+
};
|
|
46
|
+
export type ShowAssetsArgsInput = AccessArgsInput & {
|
|
47
|
+
at?: string;
|
|
48
|
+
};
|
|
49
|
+
export type CheckSyntaxArgsInput = AccessArgsInput & {
|
|
50
|
+
language?: string;
|
|
51
|
+
};
|
|
52
|
+
export type VisionArgsInput = AccessArgsInput & {
|
|
53
|
+
at?: string;
|
|
54
|
+
level?: VisionLevel;
|
|
55
|
+
};
|
|
56
|
+
export type GenerateCaptionArgsInput = VisionArgsInput & {
|
|
57
|
+
include?: ("text" | "objects")[];
|
|
58
|
+
};
|
|
59
|
+
export type DetectObjectsArgsInput = VisionArgsInput;
|
|
60
|
+
export type RecognizeTextArgsInput = VisionArgsInput;
|
|
61
|
+
export type FindNodesArgsInput = AccessArgsInput & GitScopeInput & {
|
|
62
|
+
pattern?: string;
|
|
63
|
+
context?: string;
|
|
64
|
+
selector?: string;
|
|
65
|
+
rule?: string;
|
|
50
66
|
language?: string;
|
|
51
67
|
limit?: number;
|
|
68
|
+
noAnchors?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export type FindTextArgsInput = {
|
|
71
|
+
path: string;
|
|
72
|
+
text: string;
|
|
73
|
+
limit?: number;
|
|
52
74
|
} & GitScopeInput;
|
|
53
|
-
export
|
|
54
|
-
export type DefArgsInput = {
|
|
75
|
+
export type FindDefinitionsArgsInput = {
|
|
55
76
|
path: string;
|
|
56
77
|
name: string;
|
|
57
78
|
language?: string;
|
|
79
|
+
noAnchors?: boolean;
|
|
58
80
|
} & GitScopeInput;
|
|
59
|
-
export
|
|
60
|
-
export type RefsArgsInput = {
|
|
81
|
+
export type FindReferencesArgsInput = {
|
|
61
82
|
path: string;
|
|
62
83
|
name?: string;
|
|
63
|
-
|
|
64
|
-
line?: number;
|
|
65
|
-
column?: number;
|
|
84
|
+
at?: string;
|
|
66
85
|
language?: string;
|
|
86
|
+
noAnchors?: boolean;
|
|
87
|
+
} & GitScopeInput;
|
|
88
|
+
export type CheckRulesArgsInput = {
|
|
89
|
+
path: string;
|
|
90
|
+
rules: string;
|
|
67
91
|
} & GitScopeInput;
|
|
68
|
-
export
|
|
69
|
-
export type EditArgsInput = {
|
|
92
|
+
export type EditTextArgsInput = {
|
|
70
93
|
path: string;
|
|
71
94
|
apply?: boolean;
|
|
72
95
|
planHash?: string;
|
|
73
96
|
language?: string;
|
|
74
97
|
requestFromStdin?: boolean;
|
|
75
98
|
flagOrder?: ApplyPlanHashOrder;
|
|
76
|
-
};
|
|
77
|
-
export
|
|
78
|
-
export type RenameArgsInput = {
|
|
99
|
+
} & GitScopeInput;
|
|
100
|
+
export type RenameSymbolArgsInput = {
|
|
79
101
|
path: string;
|
|
80
102
|
to: string;
|
|
81
|
-
|
|
82
|
-
column?: number;
|
|
103
|
+
at: string;
|
|
83
104
|
workspace?: string;
|
|
84
105
|
apply?: boolean;
|
|
85
106
|
planHash?: string;
|
|
86
107
|
language?: string;
|
|
87
108
|
flagOrder?: ApplyPlanHashOrder;
|
|
88
109
|
} & GitScopeInput;
|
|
89
|
-
export declare function
|
|
110
|
+
export declare function buildShowContentArgs(input: ShowContentArgsInput): string[];
|
|
111
|
+
export declare function buildShowStructureArgs(input: ShowStructureArgsInput): string[];
|
|
112
|
+
export declare function buildShowMetadataArgs(input: ShowMetadataArgsInput): string[];
|
|
113
|
+
export declare function buildShowAssetsArgs(input: ShowAssetsArgsInput): string[];
|
|
114
|
+
export declare function buildCheckSyntaxArgs(input: CheckSyntaxArgsInput): string[];
|
|
115
|
+
export declare function buildGenerateCaptionArgs(input: GenerateCaptionArgsInput): string[];
|
|
116
|
+
export declare function buildDetectObjectsArgs(input: DetectObjectsArgsInput): string[];
|
|
117
|
+
export declare function buildRecognizeTextArgs(input: RecognizeTextArgsInput): string[];
|
|
118
|
+
export declare function buildFindNodesArgs(input: FindNodesArgsInput): string[];
|
|
119
|
+
export declare function buildFindTextArgs(input: FindTextArgsInput): string[];
|
|
120
|
+
export declare function buildFindDefinitionsArgs(input: FindDefinitionsArgsInput): string[];
|
|
121
|
+
export declare function buildFindReferencesArgs(input: FindReferencesArgsInput): string[];
|
|
122
|
+
export declare function buildCheckRulesArgs(input: CheckRulesArgsInput): string[];
|
|
123
|
+
export declare function buildEditTextArgs(input: EditTextArgsInput): string[];
|
|
124
|
+
export declare function buildRenameSymbolArgs(input: RenameSymbolArgsInput): string[];
|
|
90
125
|
export {};
|
package/dist/client-output.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare const ReadOutput: import("@sinclair/typebox").TObject<{
|
|
|
16
16
|
hash: import("@sinclair/typebox").TString;
|
|
17
17
|
text: import("@sinclair/typebox").TString;
|
|
18
18
|
}>>;
|
|
19
|
+
truncated: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
19
20
|
}>;
|
|
20
21
|
declare const SymbolOutput: import("@sinclair/typebox").TObject<{
|
|
21
22
|
kind: import("@sinclair/typebox").TString;
|
|
@@ -28,7 +29,7 @@ declare const SymbolOutput: import("@sinclair/typebox").TObject<{
|
|
|
28
29
|
start_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
30
|
end_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
31
|
}>;
|
|
31
|
-
declare const
|
|
32
|
+
declare const StructureNode: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
32
33
|
kind: import("@sinclair/typebox").TString;
|
|
33
34
|
name: import("@sinclair/typebox").TString;
|
|
34
35
|
start_line: import("@sinclair/typebox").TInteger;
|
|
@@ -37,7 +38,7 @@ declare const MapNode: import("@sinclair/typebox").TRecursive<import("@sinclair/
|
|
|
37
38
|
end_anchor: import("@sinclair/typebox").TString;
|
|
38
39
|
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
39
40
|
}>>;
|
|
40
|
-
declare const
|
|
41
|
+
declare const StructureOutput: import("@sinclair/typebox").TObject<{
|
|
41
42
|
file: import("@sinclair/typebox").TString;
|
|
42
43
|
language: import("@sinclair/typebox").TString;
|
|
43
44
|
line_count: import("@sinclair/typebox").TInteger;
|
|
@@ -165,11 +166,6 @@ declare const DetectedObject: import("@sinclair/typebox").TObject<{
|
|
|
165
166
|
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
166
167
|
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
167
168
|
}>;
|
|
168
|
-
declare const PreparedImage: import("@sinclair/typebox").TObject<{
|
|
169
|
-
mime: import("@sinclair/typebox").TString;
|
|
170
|
-
encoding: import("@sinclair/typebox").TLiteral<"base64">;
|
|
171
|
-
data: import("@sinclair/typebox").TString;
|
|
172
|
-
}>;
|
|
173
169
|
declare const ImageDetection: import("@sinclair/typebox").TObject<{
|
|
174
170
|
kind: import("@sinclair/typebox").TLiteral<"image">;
|
|
175
171
|
type: import("@sinclair/typebox").TString;
|
|
@@ -179,8 +175,6 @@ declare const ImageDetection: import("@sinclair/typebox").TObject<{
|
|
|
179
175
|
width: import("@sinclair/typebox").TInteger;
|
|
180
176
|
height: import("@sinclair/typebox").TInteger;
|
|
181
177
|
animated: import("@sinclair/typebox").TBoolean;
|
|
182
|
-
encoding: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"base64">>;
|
|
183
|
-
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
184
178
|
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
185
179
|
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
186
180
|
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
@@ -207,8 +201,6 @@ declare const Detection: import("@sinclair/typebox").TUnion<[import("@sinclair/t
|
|
|
207
201
|
width: import("@sinclair/typebox").TInteger;
|
|
208
202
|
height: import("@sinclair/typebox").TInteger;
|
|
209
203
|
animated: import("@sinclair/typebox").TBoolean;
|
|
210
|
-
encoding: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"base64">>;
|
|
211
|
-
data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
212
204
|
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
213
205
|
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
214
206
|
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
@@ -240,7 +232,7 @@ declare const Identifier: import("@sinclair/typebox").TObject<{
|
|
|
240
232
|
start_byte: import("@sinclair/typebox").TInteger;
|
|
241
233
|
end_byte: import("@sinclair/typebox").TInteger;
|
|
242
234
|
}>;
|
|
243
|
-
declare const
|
|
235
|
+
declare const CursorEnvelope: import("@sinclair/typebox").TObject<{
|
|
244
236
|
file: import("@sinclair/typebox").TString;
|
|
245
237
|
language: import("@sinclair/typebox").TString;
|
|
246
238
|
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -372,8 +364,8 @@ declare const DefEnvelope: import("@sinclair/typebox").TObject<{
|
|
|
372
364
|
export type ReadSeekHashline = Static<typeof Hashline>;
|
|
373
365
|
export type ReadSeekReadOutput = Static<typeof ReadOutput>;
|
|
374
366
|
export type ReadSeekSymbol = Static<typeof SymbolOutput>;
|
|
375
|
-
export type
|
|
376
|
-
export type
|
|
367
|
+
export type ReadSeekStructureNode = Static<typeof StructureNode>;
|
|
368
|
+
export type ReadSeekStructureOutput = Static<typeof StructureOutput>;
|
|
377
369
|
export type ReadSeekSearchCapture = Static<typeof SearchCapture>;
|
|
378
370
|
export type ReadSeekSearchMatch = Static<typeof SearchMatch>;
|
|
379
371
|
export type ReadSeekSearchFileOutput = Static<typeof SearchFileOutput>;
|
|
@@ -394,12 +386,11 @@ export type ReadSeekCheckOutput = {
|
|
|
394
386
|
};
|
|
395
387
|
export type ReadSeekOcrText = string;
|
|
396
388
|
export type ReadSeekDetectedObject = Static<typeof DetectedObject>;
|
|
397
|
-
export type ReadSeekPreparedImage = Static<typeof PreparedImage>;
|
|
398
389
|
export type ReadSeekDocumentCache = Static<typeof DocumentCache>;
|
|
399
390
|
export type ReadSeekDetection = Static<typeof Detection>;
|
|
400
391
|
export type ReadSeekImageDetection = Static<typeof ImageDetection>;
|
|
401
392
|
export type IdentifierOutput = Static<typeof Identifier>;
|
|
402
|
-
export type
|
|
393
|
+
export type ReadSeekCursorOutput = Static<typeof CursorEnvelope>;
|
|
403
394
|
export type EditOutput = Static<typeof EditOutputSchema>;
|
|
404
395
|
export type RenameConflict = Static<typeof RenameConflictSchema>;
|
|
405
396
|
export type RenameEdit = Static<typeof RenameEditSchema>;
|
|
@@ -407,19 +398,281 @@ export type RenameFileOutput = Static<typeof RenameFileOutputSchema>;
|
|
|
407
398
|
export type RenameOutput = Static<typeof RenameOutputSchema>;
|
|
408
399
|
export type DefLocation = Static<typeof DefEnvelope>["locations"][number];
|
|
409
400
|
export declare function parseReadOutput(value: unknown): ReadSeekReadOutput;
|
|
410
|
-
export declare function
|
|
401
|
+
export declare function parseStructureOutput(value: unknown): ReadSeekStructureOutput;
|
|
411
402
|
export declare function parseSearchOutput(value: unknown): ReadSeekSearchOutput;
|
|
412
403
|
export declare function parseRefsOutput(value: unknown): ReadSeekReference[];
|
|
413
404
|
export declare function parseCheckOutput(value: unknown): ReadSeekCheckOutput;
|
|
414
405
|
/** The CLI distinguishes the detected kinds by which fields it emits. */
|
|
415
406
|
export declare function parseDetectOutput(value: unknown): ReadSeekDetection;
|
|
416
|
-
export declare function parseImageContent(value: unknown): ReadSeekImageDetection;
|
|
417
407
|
export declare function parseTextContent(value: unknown): ReadSeekReadOutput;
|
|
418
408
|
export declare function parseDocumentCache(value: unknown): ReadSeekDocumentCache;
|
|
419
|
-
export declare function
|
|
409
|
+
export declare function parseCursorOutput(value: unknown): ReadSeekCursorOutput;
|
|
420
410
|
/** PDF inspection reports its own document envelope instead of a metadata node. */
|
|
421
|
-
export declare function
|
|
411
|
+
export declare function parsePdfMetadata(value: unknown): ReadSeekDetection | undefined;
|
|
422
412
|
export declare function parseEditOutput(value: unknown): EditOutput;
|
|
423
413
|
export declare function parseRenameOutput(value: unknown): RenameOutput;
|
|
424
414
|
export declare function parseDefOutput(value: unknown): DefLocation[];
|
|
415
|
+
declare const ImageDescriptor: import("@sinclair/typebox").TObject<{
|
|
416
|
+
inferred: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
417
|
+
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
418
|
+
level: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
419
|
+
task: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
420
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
421
|
+
kind: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"image">>;
|
|
422
|
+
content_identity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
423
|
+
path: import("@sinclair/typebox").TString;
|
|
424
|
+
mime: import("@sinclair/typebox").TString;
|
|
425
|
+
width: import("@sinclair/typebox").TInteger;
|
|
426
|
+
height: import("@sinclair/typebox").TInteger;
|
|
427
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
428
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
429
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
430
|
+
label: import("@sinclair/typebox").TString;
|
|
431
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
432
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
433
|
+
}>>>;
|
|
434
|
+
}>;
|
|
435
|
+
declare const DocumentNode: import("@sinclair/typebox").TObject<{
|
|
436
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
437
|
+
destination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
438
|
+
bbox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
439
|
+
x: import("@sinclair/typebox").TNumber;
|
|
440
|
+
y: import("@sinclair/typebox").TNumber;
|
|
441
|
+
width: import("@sinclair/typebox").TNumber;
|
|
442
|
+
height: import("@sinclair/typebox").TNumber;
|
|
443
|
+
}>>;
|
|
444
|
+
id: import("@sinclair/typebox").TString;
|
|
445
|
+
kind: import("@sinclair/typebox").TString;
|
|
446
|
+
parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
447
|
+
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
448
|
+
level: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
449
|
+
column: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
450
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
451
|
+
}>;
|
|
452
|
+
declare const DocumentAsset: import("@sinclair/typebox").TObject<{
|
|
453
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
454
|
+
destination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
455
|
+
bbox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
456
|
+
x: import("@sinclair/typebox").TNumber;
|
|
457
|
+
y: import("@sinclair/typebox").TNumber;
|
|
458
|
+
width: import("@sinclair/typebox").TNumber;
|
|
459
|
+
height: import("@sinclair/typebox").TNumber;
|
|
460
|
+
}>>;
|
|
461
|
+
id: import("@sinclair/typebox").TString;
|
|
462
|
+
kind: import("@sinclair/typebox").TString;
|
|
463
|
+
mime: import("@sinclair/typebox").TString;
|
|
464
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
465
|
+
content_identity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
466
|
+
bytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
467
|
+
}>;
|
|
468
|
+
declare const DocumentVision: import("@sinclair/typebox").TObject<{
|
|
469
|
+
inferred: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
470
|
+
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
471
|
+
level: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
472
|
+
task: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
473
|
+
asset_id: import("@sinclair/typebox").TString;
|
|
474
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
475
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
476
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
477
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
478
|
+
label: import("@sinclair/typebox").TString;
|
|
479
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
480
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
481
|
+
}>>>;
|
|
482
|
+
caption_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
483
|
+
objects_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
484
|
+
ocr_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
485
|
+
}>;
|
|
486
|
+
declare const DocumentOutput: import("@sinclair/typebox").TObject<{
|
|
487
|
+
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
488
|
+
format: import("@sinclair/typebox").TString;
|
|
489
|
+
source: import("@sinclair/typebox").TString;
|
|
490
|
+
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
491
|
+
pages: import("@sinclair/typebox").TInteger;
|
|
492
|
+
nodes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
493
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
494
|
+
destination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
495
|
+
bbox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
496
|
+
x: import("@sinclair/typebox").TNumber;
|
|
497
|
+
y: import("@sinclair/typebox").TNumber;
|
|
498
|
+
width: import("@sinclair/typebox").TNumber;
|
|
499
|
+
height: import("@sinclair/typebox").TNumber;
|
|
500
|
+
}>>;
|
|
501
|
+
id: import("@sinclair/typebox").TString;
|
|
502
|
+
kind: import("@sinclair/typebox").TString;
|
|
503
|
+
parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
504
|
+
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
505
|
+
level: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
506
|
+
column: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
507
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
508
|
+
}>>;
|
|
509
|
+
assets: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
510
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
511
|
+
destination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
512
|
+
bbox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
513
|
+
x: import("@sinclair/typebox").TNumber;
|
|
514
|
+
y: import("@sinclair/typebox").TNumber;
|
|
515
|
+
width: import("@sinclair/typebox").TNumber;
|
|
516
|
+
height: import("@sinclair/typebox").TNumber;
|
|
517
|
+
}>>;
|
|
518
|
+
id: import("@sinclair/typebox").TString;
|
|
519
|
+
kind: import("@sinclair/typebox").TString;
|
|
520
|
+
mime: import("@sinclair/typebox").TString;
|
|
521
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
522
|
+
content_identity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
523
|
+
bytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
524
|
+
}>>;
|
|
525
|
+
vision: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
526
|
+
inferred: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
527
|
+
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
528
|
+
level: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
529
|
+
task: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
530
|
+
asset_id: import("@sinclair/typebox").TString;
|
|
531
|
+
mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
532
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
533
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
534
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
535
|
+
label: import("@sinclair/typebox").TString;
|
|
536
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
537
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
538
|
+
}>>>;
|
|
539
|
+
caption_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
540
|
+
objects_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
541
|
+
ocr_requested: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
542
|
+
}>>;
|
|
543
|
+
}>;
|
|
544
|
+
declare const TextSearchOutput: import("@sinclair/typebox").TObject<{
|
|
545
|
+
text: import("@sinclair/typebox").TString;
|
|
546
|
+
mode: import("@sinclair/typebox").TLiteral<"literal">;
|
|
547
|
+
total_matches: import("@sinclair/typebox").TInteger;
|
|
548
|
+
returned_matches: import("@sinclair/typebox").TInteger;
|
|
549
|
+
truncated: import("@sinclair/typebox").TBoolean;
|
|
550
|
+
results: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
551
|
+
file: import("@sinclair/typebox").TString;
|
|
552
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
553
|
+
matches: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
554
|
+
line: import("@sinclair/typebox").TInteger;
|
|
555
|
+
column: import("@sinclair/typebox").TInteger;
|
|
556
|
+
text: import("@sinclair/typebox").TString;
|
|
557
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
558
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
559
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
560
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
561
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
562
|
+
line: import("@sinclair/typebox").TInteger;
|
|
563
|
+
hash: import("@sinclair/typebox").TString;
|
|
564
|
+
text: import("@sinclair/typebox").TString;
|
|
565
|
+
}>>;
|
|
566
|
+
}>>;
|
|
567
|
+
}>>;
|
|
568
|
+
documents: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
569
|
+
file: import("@sinclair/typebox").TString;
|
|
570
|
+
content_hash: import("@sinclair/typebox").TString;
|
|
571
|
+
hits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
572
|
+
node_id: import("@sinclair/typebox").TString;
|
|
573
|
+
kind: import("@sinclair/typebox").TString;
|
|
574
|
+
snippet: import("@sinclair/typebox").TString;
|
|
575
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
576
|
+
}>>;
|
|
577
|
+
}>>;
|
|
578
|
+
}>;
|
|
579
|
+
declare const RulesOutput: import("@sinclair/typebox").TObject<{
|
|
580
|
+
complete: import("@sinclair/typebox").TBoolean;
|
|
581
|
+
check_count: import("@sinclair/typebox").TInteger;
|
|
582
|
+
file_count: import("@sinclair/typebox").TInteger;
|
|
583
|
+
violation_count: import("@sinclair/typebox").TInteger;
|
|
584
|
+
diagnostics: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
585
|
+
name: import("@sinclair/typebox").TString;
|
|
586
|
+
message: import("@sinclair/typebox").TString;
|
|
587
|
+
path: import("@sinclair/typebox").TString;
|
|
588
|
+
language: import("@sinclair/typebox").TString;
|
|
589
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
590
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
591
|
+
line: import("@sinclair/typebox").TInteger;
|
|
592
|
+
column: import("@sinclair/typebox").TInteger;
|
|
593
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
594
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
595
|
+
}>>;
|
|
596
|
+
}>;
|
|
597
|
+
export type ReadSeekImageDescriptor = Static<typeof ImageDescriptor>;
|
|
598
|
+
export type ReadSeekDocumentNode = Static<typeof DocumentNode>;
|
|
599
|
+
export type ReadSeekDocumentAsset = Static<typeof DocumentAsset>;
|
|
600
|
+
export type ReadSeekDocumentVision = Static<typeof DocumentVision>;
|
|
601
|
+
export type ReadSeekDocumentOutput = Static<typeof DocumentOutput>;
|
|
602
|
+
export type ReadSeekTextSearchOutput = Static<typeof TextSearchOutput>;
|
|
603
|
+
export type ReadSeekRulesOutput = Static<typeof RulesOutput>;
|
|
604
|
+
export interface ReadSeekSourceContentOutput {
|
|
605
|
+
metadata: ReadSeekDetection;
|
|
606
|
+
content: ReadSeekReadOutput | ReadSeekImageDescriptor;
|
|
607
|
+
cursor?: ReadSeekCursorOutput;
|
|
608
|
+
}
|
|
609
|
+
export type ReadSeekContentOutput = ReadSeekSourceContentOutput | ReadSeekDocumentOutput;
|
|
610
|
+
export type ReadSeekStructureOutputEnvelope = {
|
|
611
|
+
metadata?: ReadSeekDetection;
|
|
612
|
+
structure: ReadSeekStructureOutput;
|
|
613
|
+
} | ReadSeekDocumentOutput;
|
|
614
|
+
export declare function parseDocumentOutput(value: unknown): ReadSeekDocumentOutput;
|
|
615
|
+
export declare function parseContentOutput(value: unknown): ReadSeekContentOutput;
|
|
616
|
+
export declare function parseStructureEnvelope(value: unknown): ReadSeekStructureOutputEnvelope;
|
|
617
|
+
export declare function parseTextSearchOutput(value: unknown): ReadSeekTextSearchOutput;
|
|
618
|
+
export declare function parseRulesOutput(value: unknown): ReadSeekRulesOutput;
|
|
619
|
+
declare const SourceAssetsOutput: import("@sinclair/typebox").TObject<{
|
|
620
|
+
file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
621
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
622
|
+
kind: import("@sinclair/typebox").TLiteral<"source">;
|
|
623
|
+
type: import("@sinclair/typebox").TString;
|
|
624
|
+
file: import("@sinclair/typebox").TString;
|
|
625
|
+
language: import("@sinclair/typebox").TString;
|
|
626
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
627
|
+
supported: import("@sinclair/typebox").TBoolean;
|
|
628
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
629
|
+
syntax: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
630
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
631
|
+
kind: import("@sinclair/typebox").TLiteral<"image">;
|
|
632
|
+
type: import("@sinclair/typebox").TString;
|
|
633
|
+
file: import("@sinclair/typebox").TString;
|
|
634
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
635
|
+
format: import("@sinclair/typebox").TString;
|
|
636
|
+
width: import("@sinclair/typebox").TInteger;
|
|
637
|
+
height: import("@sinclair/typebox").TInteger;
|
|
638
|
+
animated: import("@sinclair/typebox").TBoolean;
|
|
639
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
640
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
641
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
642
|
+
label: import("@sinclair/typebox").TString;
|
|
643
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
644
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
645
|
+
}>>>;
|
|
646
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
647
|
+
kind: import("@sinclair/typebox").TLiteral<"text">;
|
|
648
|
+
type: import("@sinclair/typebox").TString;
|
|
649
|
+
file: import("@sinclair/typebox").TString;
|
|
650
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
651
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
652
|
+
kind: import("@sinclair/typebox").TLiteral<"pdf">;
|
|
653
|
+
type: import("@sinclair/typebox").TLiteral<"application/pdf">;
|
|
654
|
+
file: import("@sinclair/typebox").TString;
|
|
655
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
656
|
+
format: import("@sinclair/typebox").TLiteral<"pdf">;
|
|
657
|
+
pages: import("@sinclair/typebox").TInteger;
|
|
658
|
+
}>]>>;
|
|
659
|
+
assets: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
660
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
661
|
+
destination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
662
|
+
bbox: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
663
|
+
x: import("@sinclair/typebox").TNumber;
|
|
664
|
+
y: import("@sinclair/typebox").TNumber;
|
|
665
|
+
width: import("@sinclair/typebox").TNumber;
|
|
666
|
+
height: import("@sinclair/typebox").TNumber;
|
|
667
|
+
}>>;
|
|
668
|
+
id: import("@sinclair/typebox").TString;
|
|
669
|
+
kind: import("@sinclair/typebox").TString;
|
|
670
|
+
mime: import("@sinclair/typebox").TString;
|
|
671
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
672
|
+
content_identity: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
673
|
+
bytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
674
|
+
}>>;
|
|
675
|
+
}>;
|
|
676
|
+
export type ReadSeekAssetsOutput = ReadSeekDocumentOutput | Static<typeof SourceAssetsOutput>;
|
|
677
|
+
export declare function parseAssetsOutput(value: unknown): ReadSeekAssetsOutput;
|
|
425
678
|
export {};
|