@jarkkojs/readseek-api 0.9.16 → 0.10.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 -4
- package/bin/readseek.cjs +8 -2
- package/dist/argv.d.ts +30 -24
- package/dist/client-output.d.ts +425 -0
- package/dist/client.d.ts +30 -256
- package/dist/contract.d.ts +15 -21
- package/dist/edit-plan.d.ts +1 -0
- package/dist/{json.d.ts → error.d.ts} +0 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +1054 -767
- package/dist/kdl.d.ts +7 -0
- package/dist/output-kdl.d.ts +1 -0
- package/dist/process-bun.d.ts +1 -1
- package/dist/process-node.d.ts +1 -1
- package/dist/process.d.ts +3 -1
- package/dist/validation.d.ts +0 -7
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -9,22 +9,32 @@ bounded Node/Bun process runners.
|
|
|
9
9
|
npm install @jarkkojs/readseek-api
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
Linux platform packages supply `bin/readseek.AppImage`; macOS and Windows supply
|
|
13
|
+
native executables. The `readseek` CLI and Node/Bun runners set
|
|
14
|
+
`APPIMAGE_EXTRACT_AND_RUN=1` for Linux child processes, so FUSE is not required.
|
|
15
|
+
Custom process launchers should pass `readSeekProcessEnvironment()` as their
|
|
16
|
+
child environment. Linux payload packages do not expose a separate CLI; use
|
|
17
|
+
`@jarkkojs/readseek-api`.
|
|
18
|
+
|
|
12
19
|
## Example
|
|
13
20
|
|
|
14
21
|
```ts
|
|
15
22
|
import {
|
|
16
|
-
|
|
23
|
+
buildInspectArgs,
|
|
17
24
|
resolveReadSeekBinaryFromPackages,
|
|
18
25
|
resolveReadSeekBinaryOverride,
|
|
19
|
-
|
|
26
|
+
runReadSeekNodeKdl,
|
|
20
27
|
} from "@jarkkojs/readseek-api";
|
|
21
28
|
|
|
22
29
|
const binary =
|
|
23
30
|
resolveReadSeekBinaryOverride() ?? resolveReadSeekBinaryFromPackages();
|
|
24
|
-
const args =
|
|
25
|
-
const result = await
|
|
31
|
+
const args = buildInspectArgs({ path: "src/index.ts", select: "map" });
|
|
32
|
+
const result = await runReadSeekNodeKdl(binary, args);
|
|
26
33
|
```
|
|
27
34
|
|
|
35
|
+
For PDF assets, `buildExtractArgs` requires an `asset:ID` selector and destination
|
|
36
|
+
file path. It rejects `"-"` as the destination so binary data is never returned
|
|
37
|
+
on stdout.
|
|
28
38
|
|
|
29
39
|
## Licensing
|
|
30
40
|
|
package/bin/readseek.cjs
CHANGED
|
@@ -20,7 +20,8 @@ function resolveBinary() {
|
|
|
20
20
|
`unsupported platform: ${platform}; supported platforms: ${Object.keys(packages).join(', ')}`
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
const binaryName = process.platform === '
|
|
23
|
+
const binaryName = process.platform === 'linux' ? 'readseek.AppImage'
|
|
24
|
+
: process.platform === 'win32' ? 'readseek.exe' : 'readseek';
|
|
24
25
|
|
|
25
26
|
let packageDir;
|
|
26
27
|
try {
|
|
@@ -45,7 +46,12 @@ function resolveBinary() {
|
|
|
45
46
|
try {
|
|
46
47
|
const binary = resolveBinary();
|
|
47
48
|
const args = process.argv.slice(2);
|
|
48
|
-
execFileSync(binary, args, {
|
|
49
|
+
execFileSync(binary, args, {
|
|
50
|
+
stdio: 'inherit',
|
|
51
|
+
env: process.platform === 'linux'
|
|
52
|
+
? { ...process.env, APPIMAGE_EXTRACT_AND_RUN: '1' }
|
|
53
|
+
: process.env,
|
|
54
|
+
});
|
|
49
55
|
} catch (err) {
|
|
50
56
|
if (typeof err.status === 'number') {
|
|
51
57
|
process.exit(err.status);
|
package/dist/argv.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const DEFAULT_DIGEST_MAP_DEPTH = 1;
|
|
1
|
+
import { type GitScope, type InspectFacet, type VisionLevel, type VisionMode } from "./contract.ts";
|
|
2
|
+
export declare const DEFAULT_INSPECT_MAP_DEPTH = 1;
|
|
4
3
|
export declare function buildLineLocation(line: number, column?: number): string;
|
|
5
|
-
export
|
|
4
|
+
export type GitScopeInput = {
|
|
5
|
+
gitScope?: GitScope;
|
|
6
|
+
};
|
|
7
|
+
export declare function appendGitScopeArgs(args: string[], input: GitScopeInput): string[];
|
|
6
8
|
export type ApplyPlanHashOrder = "plan-hash-first" | "apply-first";
|
|
7
9
|
export type ApplyPlanHashInput = {
|
|
8
10
|
apply?: boolean;
|
|
@@ -10,10 +12,11 @@ export type ApplyPlanHashInput = {
|
|
|
10
12
|
flagOrder?: ApplyPlanHashOrder;
|
|
11
13
|
};
|
|
12
14
|
export declare function appendApplyAndPlanHash(args: string[], input: ApplyPlanHashInput): string[];
|
|
13
|
-
export type
|
|
15
|
+
export type InspectArgsInput = {
|
|
14
16
|
path: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
selector?: string;
|
|
18
|
+
select?: InspectFacet | InspectFacet[] | string;
|
|
19
|
+
query?: string;
|
|
17
20
|
end?: number;
|
|
18
21
|
limit?: number;
|
|
19
22
|
depth?: number;
|
|
@@ -23,33 +26,36 @@ export type DigestArgsInput = {
|
|
|
23
26
|
stdinName?: string;
|
|
24
27
|
readseekDir?: string;
|
|
25
28
|
};
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
declare const SELECTOR_KINDS: readonly ["line", "hash", "symbol", "page", "node", "asset"];
|
|
30
|
+
type SelectorKind = (typeof SELECTOR_KINDS)[number];
|
|
31
|
+
type ParsedSelector = {
|
|
32
|
+
kind: SelectorKind;
|
|
33
|
+
value: string;
|
|
34
|
+
column?: number;
|
|
35
|
+
};
|
|
36
|
+
/** Mirrors core::ParseSelector so wrappers reject the same selectors natively. */
|
|
37
|
+
export declare function parseSelector(text: string): ParsedSelector;
|
|
38
|
+
export declare function buildInspectArgs(input: InspectArgsInput): string[];
|
|
39
|
+
export type ExtractArgsInput = {
|
|
28
40
|
path: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
depth?: number;
|
|
33
|
-
outline?: boolean;
|
|
34
|
-
visionMode?: VisionAnalysisMode;
|
|
35
|
-
visionLevel?: VisionLevel;
|
|
36
|
-
format?: "json" | "plain";
|
|
41
|
+
selector: string;
|
|
42
|
+
output: string;
|
|
43
|
+
stdinName?: string;
|
|
37
44
|
readseekDir?: string;
|
|
38
45
|
};
|
|
39
|
-
export declare function
|
|
46
|
+
export declare function buildExtractArgs(input: ExtractArgsInput): string[];
|
|
40
47
|
export type SearchArgsInput = {
|
|
41
48
|
path: string;
|
|
42
49
|
pattern: string;
|
|
43
50
|
language?: string;
|
|
44
51
|
limit?: number;
|
|
45
|
-
} &
|
|
52
|
+
} & GitScopeInput;
|
|
46
53
|
export declare function buildSearchArgs(input: SearchArgsInput): string[];
|
|
47
54
|
export type DefArgsInput = {
|
|
48
55
|
path: string;
|
|
49
56
|
name: string;
|
|
50
57
|
language?: string;
|
|
51
|
-
|
|
52
|
-
} & GitSelectionInput;
|
|
58
|
+
} & GitScopeInput;
|
|
53
59
|
export declare function buildDefArgs(input: DefArgsInput): string[];
|
|
54
60
|
export type RefsArgsInput = {
|
|
55
61
|
path: string;
|
|
@@ -58,8 +64,7 @@ export type RefsArgsInput = {
|
|
|
58
64
|
line?: number;
|
|
59
65
|
column?: number;
|
|
60
66
|
language?: string;
|
|
61
|
-
|
|
62
|
-
} & GitSelectionInput;
|
|
67
|
+
} & GitScopeInput;
|
|
63
68
|
export declare function buildRefsArgs(input: RefsArgsInput): string[];
|
|
64
69
|
export type EditArgsInput = {
|
|
65
70
|
path: string;
|
|
@@ -80,5 +85,6 @@ export type RenameArgsInput = {
|
|
|
80
85
|
planHash?: string;
|
|
81
86
|
language?: string;
|
|
82
87
|
flagOrder?: ApplyPlanHashOrder;
|
|
83
|
-
} &
|
|
88
|
+
} & GitScopeInput;
|
|
84
89
|
export declare function buildRenameArgs(input: RenameArgsInput): string[];
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
|
+
declare const Hashline: import("@sinclair/typebox").TObject<{
|
|
3
|
+
line: import("@sinclair/typebox").TInteger;
|
|
4
|
+
hash: import("@sinclair/typebox").TString;
|
|
5
|
+
text: import("@sinclair/typebox").TString;
|
|
6
|
+
}>;
|
|
7
|
+
declare const ReadOutput: import("@sinclair/typebox").TObject<{
|
|
8
|
+
file: import("@sinclair/typebox").TString;
|
|
9
|
+
language: import("@sinclair/typebox").TString;
|
|
10
|
+
line_count: import("@sinclair/typebox").TInteger;
|
|
11
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
12
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
13
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
14
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
15
|
+
line: import("@sinclair/typebox").TInteger;
|
|
16
|
+
hash: import("@sinclair/typebox").TString;
|
|
17
|
+
text: import("@sinclair/typebox").TString;
|
|
18
|
+
}>>;
|
|
19
|
+
}>;
|
|
20
|
+
declare const SymbolOutput: import("@sinclair/typebox").TObject<{
|
|
21
|
+
kind: import("@sinclair/typebox").TString;
|
|
22
|
+
name: import("@sinclair/typebox").TString;
|
|
23
|
+
qualified_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
25
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
26
|
+
start_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
27
|
+
end_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
|
+
start_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
end_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
+
}>;
|
|
31
|
+
declare const MapNode: import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
32
|
+
kind: import("@sinclair/typebox").TString;
|
|
33
|
+
name: import("@sinclair/typebox").TString;
|
|
34
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
35
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
36
|
+
start_anchor: import("@sinclair/typebox").TString;
|
|
37
|
+
end_anchor: import("@sinclair/typebox").TString;
|
|
38
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
39
|
+
}>>;
|
|
40
|
+
declare const MapOutput: import("@sinclair/typebox").TObject<{
|
|
41
|
+
file: import("@sinclair/typebox").TString;
|
|
42
|
+
language: import("@sinclair/typebox").TString;
|
|
43
|
+
line_count: import("@sinclair/typebox").TInteger;
|
|
44
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
45
|
+
root: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TObject<{
|
|
46
|
+
kind: import("@sinclair/typebox").TString;
|
|
47
|
+
name: import("@sinclair/typebox").TString;
|
|
48
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
49
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
50
|
+
start_anchor: import("@sinclair/typebox").TString;
|
|
51
|
+
end_anchor: import("@sinclair/typebox").TString;
|
|
52
|
+
children: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TThis>;
|
|
53
|
+
}>>>;
|
|
54
|
+
symbols: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
55
|
+
kind: import("@sinclair/typebox").TString;
|
|
56
|
+
name: import("@sinclair/typebox").TString;
|
|
57
|
+
qualified_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
58
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
59
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
60
|
+
start_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
61
|
+
end_hash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
+
start_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
63
|
+
end_anchor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
|
+
}>>;
|
|
65
|
+
}>;
|
|
66
|
+
declare const SearchCapture: import("@sinclair/typebox").TObject<{
|
|
67
|
+
start_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
68
|
+
end_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
69
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
70
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
71
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
72
|
+
start_hash: import("@sinclair/typebox").TString;
|
|
73
|
+
end_hash: import("@sinclair/typebox").TString;
|
|
74
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
75
|
+
line: import("@sinclair/typebox").TInteger;
|
|
76
|
+
hash: import("@sinclair/typebox").TString;
|
|
77
|
+
text: import("@sinclair/typebox").TString;
|
|
78
|
+
}>>;
|
|
79
|
+
name: import("@sinclair/typebox").TString;
|
|
80
|
+
}>;
|
|
81
|
+
declare const SearchMatch: import("@sinclair/typebox").TObject<{
|
|
82
|
+
captures: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
83
|
+
start_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
84
|
+
end_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
85
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
86
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
87
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
88
|
+
start_hash: import("@sinclair/typebox").TString;
|
|
89
|
+
end_hash: import("@sinclair/typebox").TString;
|
|
90
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
91
|
+
line: import("@sinclair/typebox").TInteger;
|
|
92
|
+
hash: import("@sinclair/typebox").TString;
|
|
93
|
+
text: import("@sinclair/typebox").TString;
|
|
94
|
+
}>>;
|
|
95
|
+
name: import("@sinclair/typebox").TString;
|
|
96
|
+
}>>;
|
|
97
|
+
start_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
98
|
+
end_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
99
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
100
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
101
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
102
|
+
start_hash: import("@sinclair/typebox").TString;
|
|
103
|
+
end_hash: import("@sinclair/typebox").TString;
|
|
104
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
105
|
+
line: import("@sinclair/typebox").TInteger;
|
|
106
|
+
hash: import("@sinclair/typebox").TString;
|
|
107
|
+
text: import("@sinclair/typebox").TString;
|
|
108
|
+
}>>;
|
|
109
|
+
pattern_index: import("@sinclair/typebox").TInteger;
|
|
110
|
+
}>;
|
|
111
|
+
declare const SearchFileOutput: import("@sinclair/typebox").TObject<{
|
|
112
|
+
file: import("@sinclair/typebox").TString;
|
|
113
|
+
language: import("@sinclair/typebox").TString;
|
|
114
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
115
|
+
matches: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
116
|
+
captures: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
117
|
+
start_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
118
|
+
end_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
119
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
120
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
121
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
122
|
+
start_hash: import("@sinclair/typebox").TString;
|
|
123
|
+
end_hash: import("@sinclair/typebox").TString;
|
|
124
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
125
|
+
line: import("@sinclair/typebox").TInteger;
|
|
126
|
+
hash: import("@sinclair/typebox").TString;
|
|
127
|
+
text: import("@sinclair/typebox").TString;
|
|
128
|
+
}>>;
|
|
129
|
+
name: import("@sinclair/typebox").TString;
|
|
130
|
+
}>>;
|
|
131
|
+
start_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
132
|
+
end_byte: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
133
|
+
text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
134
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
135
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
136
|
+
start_hash: import("@sinclair/typebox").TString;
|
|
137
|
+
end_hash: import("@sinclair/typebox").TString;
|
|
138
|
+
hashlines: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
139
|
+
line: import("@sinclair/typebox").TInteger;
|
|
140
|
+
hash: import("@sinclair/typebox").TString;
|
|
141
|
+
text: import("@sinclair/typebox").TString;
|
|
142
|
+
}>>;
|
|
143
|
+
pattern_index: import("@sinclair/typebox").TInteger;
|
|
144
|
+
}>>;
|
|
145
|
+
}>;
|
|
146
|
+
declare const RefsEnvelope: import("@sinclair/typebox").TObject<{
|
|
147
|
+
references: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
148
|
+
file: import("@sinclair/typebox").TString;
|
|
149
|
+
line: import("@sinclair/typebox").TInteger;
|
|
150
|
+
column: import("@sinclair/typebox").TInteger;
|
|
151
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
152
|
+
text: import("@sinclair/typebox").TString;
|
|
153
|
+
symbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
154
|
+
qualified_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
155
|
+
}>>;
|
|
156
|
+
}>>;
|
|
157
|
+
}>;
|
|
158
|
+
declare const Diagnostic: import("@sinclair/typebox").TObject<{
|
|
159
|
+
kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"error">, import("@sinclair/typebox").TLiteral<"missing">]>;
|
|
160
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
161
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
162
|
+
}>;
|
|
163
|
+
declare const DetectedObject: import("@sinclair/typebox").TObject<{
|
|
164
|
+
label: import("@sinclair/typebox").TString;
|
|
165
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
166
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
167
|
+
}>;
|
|
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
|
+
declare const ImageDetection: import("@sinclair/typebox").TObject<{
|
|
174
|
+
kind: import("@sinclair/typebox").TLiteral<"image">;
|
|
175
|
+
type: import("@sinclair/typebox").TString;
|
|
176
|
+
file: import("@sinclair/typebox").TString;
|
|
177
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
178
|
+
format: import("@sinclair/typebox").TString;
|
|
179
|
+
width: import("@sinclair/typebox").TInteger;
|
|
180
|
+
height: import("@sinclair/typebox").TInteger;
|
|
181
|
+
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
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
185
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
186
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
187
|
+
label: import("@sinclair/typebox").TString;
|
|
188
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
189
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
190
|
+
}>>>;
|
|
191
|
+
}>;
|
|
192
|
+
declare const Detection: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
193
|
+
kind: import("@sinclair/typebox").TLiteral<"source">;
|
|
194
|
+
type: import("@sinclair/typebox").TString;
|
|
195
|
+
file: import("@sinclair/typebox").TString;
|
|
196
|
+
language: import("@sinclair/typebox").TString;
|
|
197
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
198
|
+
supported: import("@sinclair/typebox").TBoolean;
|
|
199
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
200
|
+
syntax: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
201
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
202
|
+
kind: import("@sinclair/typebox").TLiteral<"image">;
|
|
203
|
+
type: import("@sinclair/typebox").TString;
|
|
204
|
+
file: import("@sinclair/typebox").TString;
|
|
205
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
206
|
+
format: import("@sinclair/typebox").TString;
|
|
207
|
+
width: import("@sinclair/typebox").TInteger;
|
|
208
|
+
height: import("@sinclair/typebox").TInteger;
|
|
209
|
+
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
|
+
ocr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
213
|
+
caption: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
214
|
+
objects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
215
|
+
label: import("@sinclair/typebox").TString;
|
|
216
|
+
/** Pixel-space [xmin, ymin, xmax, ymax] in the source image's resolution. */
|
|
217
|
+
bbox: import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TInteger]>;
|
|
218
|
+
}>>>;
|
|
219
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
220
|
+
kind: import("@sinclair/typebox").TLiteral<"text">;
|
|
221
|
+
type: import("@sinclair/typebox").TString;
|
|
222
|
+
file: import("@sinclair/typebox").TString;
|
|
223
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
224
|
+
}>, import("@sinclair/typebox").TObject<{
|
|
225
|
+
kind: import("@sinclair/typebox").TLiteral<"pdf">;
|
|
226
|
+
type: import("@sinclair/typebox").TLiteral<"application/pdf">;
|
|
227
|
+
file: import("@sinclair/typebox").TString;
|
|
228
|
+
mime: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
229
|
+
format: import("@sinclair/typebox").TLiteral<"pdf">;
|
|
230
|
+
pages: import("@sinclair/typebox").TInteger;
|
|
231
|
+
}>]>;
|
|
232
|
+
declare const DocumentCache: import("@sinclair/typebox").TObject<{
|
|
233
|
+
content_hash: import("@sinclair/typebox").TString;
|
|
234
|
+
state: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"built">, import("@sinclair/typebox").TLiteral<"reused">]>;
|
|
235
|
+
}>;
|
|
236
|
+
declare const Identifier: import("@sinclair/typebox").TObject<{
|
|
237
|
+
text: import("@sinclair/typebox").TString;
|
|
238
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
239
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
240
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
241
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
242
|
+
}>;
|
|
243
|
+
declare const IdentifyEnvelope: import("@sinclair/typebox").TObject<{
|
|
244
|
+
file: import("@sinclair/typebox").TString;
|
|
245
|
+
language: import("@sinclair/typebox").TString;
|
|
246
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
247
|
+
line_count: import("@sinclair/typebox").TInteger;
|
|
248
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
249
|
+
line: import("@sinclair/typebox").TInteger;
|
|
250
|
+
column: import("@sinclair/typebox").TInteger;
|
|
251
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
252
|
+
identifier: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
253
|
+
text: import("@sinclair/typebox").TString;
|
|
254
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
255
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
256
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
257
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
258
|
+
}>>;
|
|
259
|
+
symbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
260
|
+
name: import("@sinclair/typebox").TString;
|
|
261
|
+
kind: import("@sinclair/typebox").TString;
|
|
262
|
+
qualified_name: import("@sinclair/typebox").TString;
|
|
263
|
+
start_line: import("@sinclair/typebox").TInteger;
|
|
264
|
+
end_line: import("@sinclair/typebox").TInteger;
|
|
265
|
+
}>>;
|
|
266
|
+
}>;
|
|
267
|
+
declare const EditOutputSchema: import("@sinclair/typebox").TObject<{
|
|
268
|
+
file: import("@sinclair/typebox").TString;
|
|
269
|
+
before_hash: import("@sinclair/typebox").TString;
|
|
270
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
271
|
+
plan_hash: import("@sinclair/typebox").TString;
|
|
272
|
+
applied: import("@sinclair/typebox").TBoolean;
|
|
273
|
+
changed: import("@sinclair/typebox").TBoolean;
|
|
274
|
+
edit_count: import("@sinclair/typebox").TInteger;
|
|
275
|
+
before_content: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
276
|
+
content: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
277
|
+
}>;
|
|
278
|
+
declare const RenameConflictSchema: import("@sinclair/typebox").TObject<{
|
|
279
|
+
line: import("@sinclair/typebox").TInteger;
|
|
280
|
+
column: import("@sinclair/typebox").TInteger;
|
|
281
|
+
reason: import("@sinclair/typebox").TString;
|
|
282
|
+
}>;
|
|
283
|
+
declare const RenameEditSchema: import("@sinclair/typebox").TObject<{
|
|
284
|
+
line: import("@sinclair/typebox").TInteger;
|
|
285
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
286
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
287
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
288
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
289
|
+
occurrence: import("@sinclair/typebox").TString;
|
|
290
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
291
|
+
text: import("@sinclair/typebox").TString;
|
|
292
|
+
}>;
|
|
293
|
+
declare const RenameFileOutputSchema: import("@sinclair/typebox").TObject<{
|
|
294
|
+
file: import("@sinclair/typebox").TString;
|
|
295
|
+
language: import("@sinclair/typebox").TString;
|
|
296
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
297
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
298
|
+
conflicts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
299
|
+
line: import("@sinclair/typebox").TInteger;
|
|
300
|
+
column: import("@sinclair/typebox").TInteger;
|
|
301
|
+
reason: import("@sinclair/typebox").TString;
|
|
302
|
+
}>>;
|
|
303
|
+
edits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
304
|
+
line: import("@sinclair/typebox").TInteger;
|
|
305
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
306
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
307
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
308
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
309
|
+
occurrence: import("@sinclair/typebox").TString;
|
|
310
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
311
|
+
text: import("@sinclair/typebox").TString;
|
|
312
|
+
}>>;
|
|
313
|
+
}>;
|
|
314
|
+
declare const RenameOutputSchema: import("@sinclair/typebox").TObject<{
|
|
315
|
+
file: import("@sinclair/typebox").TString;
|
|
316
|
+
language: import("@sinclair/typebox").TString;
|
|
317
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
318
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
319
|
+
old_name: import("@sinclair/typebox").TString;
|
|
320
|
+
new_name: import("@sinclair/typebox").TString;
|
|
321
|
+
plan_hash: import("@sinclair/typebox").TString;
|
|
322
|
+
applied: import("@sinclair/typebox").TBoolean;
|
|
323
|
+
conflicts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
324
|
+
line: import("@sinclair/typebox").TInteger;
|
|
325
|
+
column: import("@sinclair/typebox").TInteger;
|
|
326
|
+
reason: import("@sinclair/typebox").TString;
|
|
327
|
+
}>>;
|
|
328
|
+
edits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
329
|
+
line: import("@sinclair/typebox").TInteger;
|
|
330
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
331
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
332
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
333
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
334
|
+
occurrence: import("@sinclair/typebox").TString;
|
|
335
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
336
|
+
text: import("@sinclair/typebox").TString;
|
|
337
|
+
}>>;
|
|
338
|
+
others: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
339
|
+
file: import("@sinclair/typebox").TString;
|
|
340
|
+
language: import("@sinclair/typebox").TString;
|
|
341
|
+
engine: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
342
|
+
file_hash: import("@sinclair/typebox").TString;
|
|
343
|
+
conflicts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
344
|
+
line: import("@sinclair/typebox").TInteger;
|
|
345
|
+
column: import("@sinclair/typebox").TInteger;
|
|
346
|
+
reason: import("@sinclair/typebox").TString;
|
|
347
|
+
}>>;
|
|
348
|
+
edits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
349
|
+
line: import("@sinclair/typebox").TInteger;
|
|
350
|
+
start_column: import("@sinclair/typebox").TInteger;
|
|
351
|
+
end_column: import("@sinclair/typebox").TInteger;
|
|
352
|
+
start_byte: import("@sinclair/typebox").TInteger;
|
|
353
|
+
end_byte: import("@sinclair/typebox").TInteger;
|
|
354
|
+
occurrence: import("@sinclair/typebox").TString;
|
|
355
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
356
|
+
text: import("@sinclair/typebox").TString;
|
|
357
|
+
}>>;
|
|
358
|
+
}>>;
|
|
359
|
+
}>;
|
|
360
|
+
declare const DefEnvelope: import("@sinclair/typebox").TObject<{
|
|
361
|
+
locations: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
362
|
+
file: import("@sinclair/typebox").TString;
|
|
363
|
+
line: import("@sinclair/typebox").TInteger;
|
|
364
|
+
column: import("@sinclair/typebox").TInteger;
|
|
365
|
+
line_hash: import("@sinclair/typebox").TString;
|
|
366
|
+
text: import("@sinclair/typebox").TString;
|
|
367
|
+
kind: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
368
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
369
|
+
qualified_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
370
|
+
}>>;
|
|
371
|
+
}>;
|
|
372
|
+
export type ReadSeekHashline = Static<typeof Hashline>;
|
|
373
|
+
export type ReadSeekReadOutput = Static<typeof ReadOutput>;
|
|
374
|
+
export type ReadSeekSymbol = Static<typeof SymbolOutput>;
|
|
375
|
+
export type ReadSeekMapNode = Static<typeof MapNode>;
|
|
376
|
+
export type ReadSeekMapOutput = Static<typeof MapOutput>;
|
|
377
|
+
export type ReadSeekSearchCapture = Static<typeof SearchCapture>;
|
|
378
|
+
export type ReadSeekSearchMatch = Static<typeof SearchMatch>;
|
|
379
|
+
export type ReadSeekSearchFileOutput = Static<typeof SearchFileOutput>;
|
|
380
|
+
export interface ReadSeekSearchOutput extends Array<ReadSeekSearchFileOutput> {
|
|
381
|
+
returned_matches?: number;
|
|
382
|
+
truncated?: boolean;
|
|
383
|
+
byte_basis?: string;
|
|
384
|
+
}
|
|
385
|
+
export type ReadSeekReference = Omit<Static<typeof RefsEnvelope>["references"][number], "symbol"> & {
|
|
386
|
+
enclosingSymbol?: string;
|
|
387
|
+
};
|
|
388
|
+
export type ReadSeekDiagnostic = Static<typeof Diagnostic>;
|
|
389
|
+
export type ReadSeekCheckOutput = {
|
|
390
|
+
file_hash?: string;
|
|
391
|
+
errorCount: number;
|
|
392
|
+
missingCount: number;
|
|
393
|
+
diagnostics: ReadSeekDiagnostic[];
|
|
394
|
+
};
|
|
395
|
+
export type ReadSeekOcrText = string;
|
|
396
|
+
export type ReadSeekDetectedObject = Static<typeof DetectedObject>;
|
|
397
|
+
export type ReadSeekPreparedImage = Static<typeof PreparedImage>;
|
|
398
|
+
export type ReadSeekDocumentCache = Static<typeof DocumentCache>;
|
|
399
|
+
export type ReadSeekDetection = Static<typeof Detection>;
|
|
400
|
+
export type ReadSeekImageDetection = Static<typeof ImageDetection>;
|
|
401
|
+
export type IdentifierOutput = Static<typeof Identifier>;
|
|
402
|
+
export type IdentifyOutput = Static<typeof IdentifyEnvelope>;
|
|
403
|
+
export type EditOutput = Static<typeof EditOutputSchema>;
|
|
404
|
+
export type RenameConflict = Static<typeof RenameConflictSchema>;
|
|
405
|
+
export type RenameEdit = Static<typeof RenameEditSchema>;
|
|
406
|
+
export type RenameFileOutput = Static<typeof RenameFileOutputSchema>;
|
|
407
|
+
export type RenameOutput = Static<typeof RenameOutputSchema>;
|
|
408
|
+
export type DefLocation = Static<typeof DefEnvelope>["locations"][number];
|
|
409
|
+
export declare function parseReadOutput(value: unknown): ReadSeekReadOutput;
|
|
410
|
+
export declare function parseMapOutput(value: unknown): ReadSeekMapOutput;
|
|
411
|
+
export declare function parseSearchOutput(value: unknown): ReadSeekSearchOutput;
|
|
412
|
+
export declare function parseRefsOutput(value: unknown): ReadSeekReference[];
|
|
413
|
+
export declare function parseCheckOutput(value: unknown): ReadSeekCheckOutput;
|
|
414
|
+
/** The CLI distinguishes the detected kinds by which fields it emits. */
|
|
415
|
+
export declare function parseDetectOutput(value: unknown): ReadSeekDetection;
|
|
416
|
+
export declare function parseImageContent(value: unknown): ReadSeekImageDetection;
|
|
417
|
+
export declare function parseTextContent(value: unknown): ReadSeekReadOutput;
|
|
418
|
+
export declare function parseDocumentCache(value: unknown): ReadSeekDocumentCache;
|
|
419
|
+
export declare function parseIdentifyOutput(value: unknown): IdentifyOutput;
|
|
420
|
+
/** PDF inspection reports its own document envelope instead of a metadata node. */
|
|
421
|
+
export declare function parsePdfInspectMetadata(value: unknown): ReadSeekDetection | undefined;
|
|
422
|
+
export declare function parseEditOutput(value: unknown): EditOutput;
|
|
423
|
+
export declare function parseRenameOutput(value: unknown): RenameOutput;
|
|
424
|
+
export declare function parseDefOutput(value: unknown): DefLocation[];
|
|
425
|
+
export {};
|