pi-ast-sgrep 2.0.2 → 2.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.
Files changed (53) hide show
  1. package/README.md +16 -19
  2. package/dist/code-mode.d.ts +1 -1
  3. package/dist/code-mode.js +1 -1
  4. package/dist/codemode/connector.d.ts +18 -3
  5. package/dist/codemode/connector.js +85 -31
  6. package/dist/codemode/dispatch.d.ts +13 -1
  7. package/dist/codemode/dispatch.js +87 -24
  8. package/dist/codemode/guest-api.d.ts +16 -0
  9. package/dist/codemode/guest-api.js +194 -0
  10. package/dist/codemode/guest-worker.mjs +287 -0
  11. package/dist/codemode/index.d.ts +4 -3
  12. package/dist/codemode/index.js +4 -3
  13. package/dist/codemode/native.d.ts +1 -1
  14. package/dist/codemode/native.js +1 -1
  15. package/dist/codemode/runner.d.ts +13 -9
  16. package/dist/codemode/runner.js +411 -213
  17. package/dist/codemode/session-pool.d.ts +6 -1
  18. package/dist/codemode/session-pool.js +125 -32
  19. package/dist/codemode/types.d.ts +42 -2
  20. package/dist/codemode/types.js +40 -15
  21. package/dist/codemode/worker.d.ts +1 -1
  22. package/dist/codemode/worker.js +25 -2
  23. package/dist/host/commands.d.ts +6 -0
  24. package/dist/host/commands.js +49 -0
  25. package/dist/host/results.d.ts +123 -0
  26. package/dist/host/results.js +126 -0
  27. package/dist/host/tools.d.ts +28 -0
  28. package/dist/host/tools.js +802 -0
  29. package/dist/index.d.ts +7 -34
  30. package/dist/index.js +5 -543
  31. package/dist/runtime/config.d.ts +36 -0
  32. package/dist/runtime/config.js +98 -0
  33. package/dist/runtime/freshness.d.ts +43 -0
  34. package/dist/runtime/freshness.js +446 -0
  35. package/dist/runtime/index-health.d.ts +16 -0
  36. package/dist/runtime/index-health.js +111 -0
  37. package/dist/runtime/runtime.d.ts +48 -0
  38. package/dist/runtime/runtime.js +265 -0
  39. package/dist/runtime/sqlite.d.ts +15 -0
  40. package/dist/runtime/sqlite.js +63 -0
  41. package/dist/runtime/types.d.ts +55 -0
  42. package/dist/runtime/types.js +25 -0
  43. package/dist/ui/card.d.ts +66 -0
  44. package/dist/ui/card.js +375 -0
  45. package/dist/ui/present.d.ts +89 -0
  46. package/dist/ui/present.js +391 -0
  47. package/package.json +8 -7
  48. package/dist/codemode/sandbox-worker.d.ts +0 -1
  49. package/dist/codemode/sandbox-worker.js +0 -204
  50. package/dist/present.d.ts +0 -70
  51. package/dist/present.js +0 -260
  52. package/dist/runtime.d.ts +0 -137
  53. package/dist/runtime.js +0 -799
package/dist/present.d.ts DELETED
@@ -1,70 +0,0 @@
1
- /** Neat asgrep tool chrome for the Pi TUI and the model-visible content. */
2
- export type PresentTheme = {
3
- bold(text: string): string;
4
- fg(role: string, text: string): string;
5
- };
6
- export type HitLike = {
7
- file?: unknown;
8
- path?: unknown;
9
- ref?: unknown;
10
- symbol?: unknown;
11
- kind?: unknown;
12
- preview?: unknown;
13
- start_line?: unknown;
14
- line?: unknown;
15
- lines?: unknown;
16
- };
17
- export type EnvelopeLike = {
18
- ok?: unknown;
19
- hits?: unknown;
20
- count?: unknown;
21
- total?: unknown;
22
- status?: unknown;
23
- index_status?: unknown;
24
- counts?: unknown;
25
- backend?: unknown;
26
- [key: string]: unknown;
27
- };
28
- export declare const ASGREP_PROMPT_SNIPPET = "Search this repo by intent, symbol, callers, defs, pattern, or chain (in-process asgrep; use without being asked)";
29
- export declare const ASGREP_PROMPT_GUIDELINES: readonly ["For any code lookup (find a function, callers, defs, intent, structural pattern, or imports), call asgrep or asgrep_search immediately. Do not wait for the user to mention ast-sgrep.", "Prefer the asgrep Code Mode tool when you need more than one lookup, filtering, or parallel work. Write JavaScript that calls asgrep.search / semantic / chain / defs / callers / imports / indexStatus / indexRepo and return a small shaped value.", "Use grep only for exact log strings, filenames, or config keys. Use Pi write/edit to change files; asgrep does not mutate source."];
30
- export declare function formatSearchCall(params: {
31
- query?: string;
32
- mode?: string;
33
- limit?: number;
34
- excerptLines?: number;
35
- }, theme?: PresentTheme): string;
36
- export declare function formatIndexCall(force: boolean, theme?: PresentTheme): string;
37
- export declare function formatStatusCall(theme?: PresentTheme): string;
38
- export declare function formatCodemodeCall(code: string, theme?: PresentTheme): string;
39
- export declare function formatSearchResult(response: EnvelopeLike, meta: {
40
- command: string;
41
- query?: string;
42
- mode?: string;
43
- activationMs?: number;
44
- backend?: string;
45
- }, theme?: PresentTheme): string;
46
- export declare function formatStatusResult(response: EnvelopeLike, theme?: PresentTheme): string;
47
- export declare function formatIndexResult(command: string, response: EnvelopeLike, theme?: PresentTheme): string;
48
- /** Local stand-in so we do not take a pi-tui dependency. Over-counts wide glyphs rather than under-count. */
49
- export declare function visibleWidth(text: string): number;
50
- export declare function truncateToWidth(text: string, maxWidth: number, ellipsis?: string): string;
51
- export declare function formatCodemodeResult(value: unknown, meta?: {
52
- stats?: {
53
- calls: number;
54
- batchedCalls: number;
55
- parallelSpawnCalls: number;
56
- stickyCalls?: number;
57
- waves: number;
58
- };
59
- wallMs?: number;
60
- backend?: string;
61
- }, theme?: PresentTheme): string;
62
- /** Minimal pi-tui Text stand-in so we do not take a TUI package dependency. */
63
- export declare class AsgrepText {
64
- #private;
65
- constructor(text?: string);
66
- setText(text: string): void;
67
- invalidate(): void;
68
- render(width: number): string[];
69
- }
70
- export declare function presentText(formatted: string, last: unknown): AsgrepText;
package/dist/present.js DELETED
@@ -1,260 +0,0 @@
1
- /** Neat asgrep tool chrome for the Pi TUI and the model-visible content. */
2
- export const ASGREP_PROMPT_SNIPPET = "Search this repo by intent, symbol, callers, defs, pattern, or chain (in-process asgrep; use without being asked)";
3
- export const ASGREP_PROMPT_GUIDELINES = [
4
- "For any code lookup (find a function, callers, defs, intent, structural pattern, or imports), call asgrep or asgrep_search immediately. Do not wait for the user to mention ast-sgrep.",
5
- "Prefer the asgrep Code Mode tool when you need more than one lookup, filtering, or parallel work. Write JavaScript that calls asgrep.search / semantic / chain / defs / callers / imports / indexStatus / indexRepo and return a small shaped value.",
6
- "Use grep only for exact log strings, filenames, or config keys. Use Pi write/edit to change files; asgrep does not mutate source.",
7
- ];
8
- function paint(theme, role, text, bold = false) {
9
- const body = bold && theme ? theme.bold(text) : text;
10
- return theme ? theme.fg(role, body) : body;
11
- }
12
- function hitLocation(hit) {
13
- const file = String(hit.file ?? hit.path ?? "");
14
- const line = hit.start_line ?? hit.line ?? hit.lines;
15
- if (typeof line === "number")
16
- return `${file}:${line}`;
17
- if (typeof line === "string" && line.length > 0)
18
- return `${file}:${line}`;
19
- if (typeof hit.ref === "string" && hit.ref.length > 0)
20
- return hit.ref;
21
- return file || "?";
22
- }
23
- function hitLabel(hit) {
24
- const symbol = typeof hit.symbol === "string" ? hit.symbol : "";
25
- const kind = typeof hit.kind === "string" ? hit.kind : "";
26
- const preview = typeof hit.preview === "string" ? hit.preview.replace(/\s+/g, " ").trim() : "";
27
- return [symbol, kind, preview && preview.length < 80 ? preview : ""].filter(Boolean).join(" ");
28
- }
29
- function header(theme, verb, bits) {
30
- return [paint(theme, "toolTitle", "asgrep", true), paint(theme, "accent", verb), ...bits.filter((bit) => Boolean(bit))].join(" · ");
31
- }
32
- export function formatSearchCall(params, theme) {
33
- return header(theme, "search", [
34
- params.query ? JSON.stringify(params.query) : undefined,
35
- params.mode ?? "natural",
36
- params.limit !== undefined ? `limit ${params.limit}` : undefined,
37
- params.excerptLines ? `excerpt ${params.excerptLines}` : undefined,
38
- ]);
39
- }
40
- export function formatIndexCall(force, theme) {
41
- return header(theme, force ? "reindex" : "index", []);
42
- }
43
- export function formatStatusCall(theme) {
44
- return header(theme, "status", []);
45
- }
46
- export function formatCodemodeCall(code, theme) {
47
- const preview = code.trim().replace(/\s+/g, " ").slice(0, 80);
48
- return header(theme, "codemode", [`${preview}${code.trim().length > 80 ? "…" : ""}`]);
49
- }
50
- export function formatSearchResult(response, meta, theme) {
51
- const hits = Array.isArray(response.hits) ? response.hits : [];
52
- const title = header(theme, meta.command, [
53
- meta.query ? JSON.stringify(meta.query) : undefined,
54
- meta.mode,
55
- `${hits.length} hit${hits.length === 1 ? "" : "s"}`,
56
- meta.activationMs !== undefined ? `${meta.activationMs < 10 ? meta.activationMs.toFixed(2) : meta.activationMs.toFixed(1)}ms` : undefined,
57
- meta.backend,
58
- ]);
59
- const rows = hits.slice(0, 24).map((hit) => {
60
- const loc = hitLocation(hit);
61
- const label = hitLabel(hit);
62
- return paint(theme, "toolOutput", label ? ` ${loc} ${label}` : ` ${loc}`);
63
- });
64
- if (hits.length > 24) {
65
- rows.push(paint(theme, "muted", ` … ${hits.length - 24} more`));
66
- }
67
- return [title, ...rows].join("\n");
68
- }
69
- export function formatStatusResult(response, theme) {
70
- const state = typeof response.status === "string" ? response.status
71
- : typeof response.index_status === "string" ? response.index_status
72
- : response.ok ? "ok" : "failed";
73
- const counts = response.counts && typeof response.counts === "object"
74
- ? Object.entries(response.counts).map(([key, value]) => `${key}=${String(value)}`).join(" ")
75
- : "";
76
- const backend = typeof response.backend === "string" ? response.backend : "";
77
- const title = header(theme, "status", [state, counts, backend]);
78
- return title;
79
- }
80
- export function formatIndexResult(command, response, theme) {
81
- const count = typeof response.count === "number" ? response.count
82
- : typeof response.total === "number" ? response.total
83
- : undefined;
84
- const tail = count === undefined ? "done" : `${count} file${count === 1 ? "" : "s"}`;
85
- return header(theme, command, [tail]);
86
- }
87
- function ansiLengthAt(text, index) {
88
- if (text.charCodeAt(index) !== 0x1b)
89
- return 0;
90
- const next = text[index + 1];
91
- if (next === "[") {
92
- let cursor = index + 2;
93
- while (cursor < text.length) {
94
- const code = text.charCodeAt(cursor);
95
- if (code >= 0x40 && code <= 0x7e)
96
- return cursor - index + 1;
97
- cursor += 1;
98
- }
99
- return text.length - index;
100
- }
101
- if (next === "]") {
102
- let cursor = index + 2;
103
- while (cursor < text.length) {
104
- if (text.charCodeAt(cursor) === 0x07)
105
- return cursor - index + 1;
106
- if (text.charCodeAt(cursor) === 0x1b && text[cursor + 1] === "\\")
107
- return cursor - index + 2;
108
- cursor += 1;
109
- }
110
- return text.length - index;
111
- }
112
- if (next === "P" || next === "X" || next === "^" || next === "_") {
113
- let cursor = index + 2;
114
- while (cursor < text.length) {
115
- if (text.charCodeAt(cursor) === 0x1b && text[cursor + 1] === "\\")
116
- return cursor - index + 2;
117
- cursor += 1;
118
- }
119
- return text.length - index;
120
- }
121
- return Math.min(2, text.length - index);
122
- }
123
- function cellWidthAt(text, index) {
124
- const code = text.charCodeAt(index);
125
- if (code === 0x09)
126
- return { width: 3, length: 1 };
127
- if (code >= 0xd800 && code <= 0xdbff)
128
- return { width: 2, length: 2 };
129
- if (code <= 0x1f || (code >= 0x7f && code <= 0x9f))
130
- return { width: 0, length: 1 };
131
- if (code <= 0x7e)
132
- return { width: 1, length: 1 };
133
- return { width: 2, length: 1 };
134
- }
135
- /** Local stand-in so we do not take a pi-tui dependency. Over-counts wide glyphs rather than under-count. */
136
- export function visibleWidth(text) {
137
- let width = 0;
138
- for (let index = 0; index < text.length;) {
139
- const ansi = ansiLengthAt(text, index);
140
- if (ansi > 0) {
141
- index += ansi;
142
- continue;
143
- }
144
- const cell = cellWidthAt(text, index);
145
- width += cell.width;
146
- index += cell.length;
147
- }
148
- return width;
149
- }
150
- export function truncateToWidth(text, maxWidth, ellipsis = "...") {
151
- const limit = Math.max(0, maxWidth);
152
- if (limit <= 0)
153
- return "";
154
- if (visibleWidth(text) <= limit)
155
- return text;
156
- const ellipsisWidth = visibleWidth(ellipsis);
157
- if (ellipsisWidth >= limit)
158
- return ellipsis.slice(0, limit);
159
- const budget = limit - ellipsisWidth;
160
- let kept = "";
161
- let width = 0;
162
- for (let index = 0; index < text.length;) {
163
- const ansi = ansiLengthAt(text, index);
164
- if (ansi > 0) {
165
- kept += text.slice(index, index + ansi);
166
- index += ansi;
167
- continue;
168
- }
169
- const cell = cellWidthAt(text, index);
170
- if (width + cell.width > budget)
171
- break;
172
- kept += text.slice(index, index + cell.length);
173
- width += cell.width;
174
- index += cell.length;
175
- }
176
- return `${kept}${ellipsis}`;
177
- }
178
- function compactValue(value) {
179
- if (value === null || value === undefined)
180
- return String(value);
181
- if (typeof value !== "object")
182
- return String(value);
183
- if (Array.isArray(value))
184
- return `${value.length} item${value.length === 1 ? "" : "s"}`;
185
- const json = JSON.stringify(value);
186
- return json.length <= 80 ? json : `${json.slice(0, 79)}…`;
187
- }
188
- export function formatCodemodeResult(value, meta = {}, theme) {
189
- if (value && typeof value === "object" && Array.isArray(value.hits)) {
190
- const searchMeta = { command: "codemode" };
191
- if (meta.wallMs !== undefined)
192
- searchMeta.activationMs = meta.wallMs;
193
- if (meta.backend !== undefined)
194
- searchMeta.backend = meta.backend;
195
- return formatSearchResult(value, searchMeta, theme);
196
- }
197
- const bits = [];
198
- if (value && typeof value === "object") {
199
- const record = value;
200
- if (typeof record.hit_count === "number")
201
- bits.push(`${record.hit_count} hit${record.hit_count === 1 ? "" : "s"}`);
202
- else if (typeof record.node_count === "number")
203
- bits.push(`${record.node_count} node${record.node_count === 1 ? "" : "s"}`);
204
- }
205
- if (meta.backend === "napi")
206
- bits.push("in-process");
207
- else if (meta.backend === "cli")
208
- bits.push("cli-sticky");
209
- if (meta.stats && meta.stats.calls > 0) {
210
- const via = (meta.stats.stickyCalls ?? 0) > 0
211
- ? `native ${meta.stats.stickyCalls}`
212
- : meta.stats.batchedCalls > 0
213
- ? `batched ${meta.stats.batchedCalls}`
214
- : meta.stats.parallelSpawnCalls > 0
215
- ? `parallel-spawn ${meta.stats.parallelSpawnCalls}`
216
- : `${meta.stats.calls} call${meta.stats.calls === 1 ? "" : "s"}`;
217
- bits.push(via);
218
- if (meta.stats.waves > 1)
219
- bits.push(`${meta.stats.waves} waves`);
220
- }
221
- if (meta.wallMs !== undefined)
222
- bits.push(`${meta.wallMs}ms`);
223
- const title = header(theme, "codemode", bits);
224
- if (value && typeof value === "object" && !Array.isArray(value)) {
225
- const rows = Object.entries(value).slice(0, 16).map(([key, entry]) => paint(theme, "toolOutput", ` ${key}: ${compactValue(entry)}`));
226
- return [title, ...rows].join("\n");
227
- }
228
- if (Array.isArray(value)) {
229
- return [title, paint(theme, "toolOutput", ` ${value.length} value${value.length === 1 ? "" : "s"}`)].join("\n");
230
- }
231
- return `${title}\n${paint(theme, "toolOutput", ` ${compactValue(value)}`)}`;
232
- }
233
- /** Minimal pi-tui Text stand-in so we do not take a TUI package dependency. */
234
- export class AsgrepText {
235
- #text;
236
- constructor(text = "") {
237
- this.#text = text;
238
- }
239
- setText(text) {
240
- this.#text = text;
241
- }
242
- invalidate() { }
243
- render(width) {
244
- const maxWidth = Math.max(1, width);
245
- if (this.#text.length === 0)
246
- return [""];
247
- return this.#text.split("\n").map((line) => truncateToWidth(line, maxWidth));
248
- }
249
- }
250
- export function presentText(formatted, last) {
251
- if (last instanceof AsgrepText) {
252
- last.setText(formatted);
253
- return last;
254
- }
255
- if (last && typeof last === "object" && last !== null && "setText" in last && typeof last.setText === "function") {
256
- last.setText(formatted);
257
- return last;
258
- }
259
- return new AsgrepText(formatted);
260
- }
package/dist/runtime.d.ts DELETED
@@ -1,137 +0,0 @@
1
- import { type FSWatcher } from "node:fs";
2
- import { resolveBinary } from "ast-sgrep";
3
- export declare const RUNTIME_VERSION = "2.0.0";
4
- export declare const MACHINE_SCHEMA_VERSION = "1.0.0";
5
- export declare const CONFIG_SCHEMA_VERSION: 1;
6
- export declare const INDEX_FORMAT_VERSION: 12;
7
- export declare const DEFAULT_TIMEOUT_MS = 30000;
8
- export declare const DEFAULT_MAX_OUTPUT_BYTES: number;
9
- export declare const DEFAULT_REFRESH_INTERVAL_MS = 30000;
10
- export interface RuntimeConfig {
11
- schemaVersion?: typeof CONFIG_SCHEMA_VERSION;
12
- binaryPath?: string;
13
- root?: string;
14
- allowOutsideProject?: boolean;
15
- timeoutMs?: number;
16
- maxOutputBytes?: number;
17
- refreshIntervalMs?: number;
18
- env?: Readonly<Record<string, string>>;
19
- }
20
- export interface LegacyRuntimeConfig extends Omit<RuntimeConfig, "schemaVersion" | "timeoutMs" | "maxOutputBytes" | "refreshIntervalMs"> {
21
- schemaVersion?: 0;
22
- timeout?: number;
23
- maxOutput?: number;
24
- refreshInterval?: number;
25
- }
26
- export type RuntimeConfigInput = RuntimeConfig | LegacyRuntimeConfig;
27
- export interface ConfigSources {
28
- explicitProjectConfig?: RuntimeConfigInput;
29
- projectSettings?: RuntimeConfigInput;
30
- globalSettings?: RuntimeConfigInput;
31
- environment?: NodeJS.ProcessEnv;
32
- defaults?: RuntimeConfigInput;
33
- }
34
- export interface RuntimeContext {
35
- cwd: string;
36
- }
37
- export interface RunOptions {
38
- signal?: AbortSignal;
39
- timeoutMs?: number;
40
- env?: Readonly<Record<string, string>>;
41
- }
42
- export interface ExecOptions {
43
- cwd: string;
44
- env: NodeJS.ProcessEnv;
45
- signal?: AbortSignal;
46
- timeout?: number;
47
- }
48
- export interface ExecResult {
49
- stdout: string;
50
- stderr: string;
51
- code?: number | null;
52
- exitCode?: number | null;
53
- signal?: string | null;
54
- }
55
- export interface PiExec {
56
- exec(command: string, args: readonly string[], options: ExecOptions): Promise<ExecResult>;
57
- }
58
- export interface MachineEnvelope {
59
- tool: "asgrep";
60
- schema_version: string;
61
- ok: boolean;
62
- version?: string;
63
- machine_schema_version?: string;
64
- [key: string]: unknown;
65
- }
66
- export declare class RuntimeError extends Error {
67
- readonly code: string;
68
- readonly details: Readonly<Record<string, unknown>>;
69
- constructor(code: string, message: string, details?: Readonly<Record<string, unknown>>);
70
- }
71
- /** Convert schema 0/unversioned settings without mutating the rollback source. */
72
- export declare function migrateConfig(input?: RuntimeConfigInput): RuntimeConfig;
73
- /** Serialize current settings for a schema-0 rollback without mutating the current value. */
74
- export declare function rollbackConfig(input: RuntimeConfig): LegacyRuntimeConfig;
75
- /** Merge each setting independently, from the documented lowest to highest priority. */
76
- export declare function resolveConfig(sources?: ConfigSources): Required<Pick<RuntimeConfig, "timeoutMs" | "maxOutputBytes">> & RuntimeConfig;
77
- export declare function resolveRuntimeRoot(projectCwd: string, requestedRoot?: string, allowOutsideProject?: boolean): Promise<string>;
78
- type BinaryResolver = typeof resolveBinary;
79
- export interface RuntimeDependencies {
80
- resolveBinary?: BinaryResolver;
81
- }
82
- export interface FreshnessRuntime {
83
- run(args: readonly string[], context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
84
- resolveRoot(context: RuntimeContext): Promise<string>;
85
- inspectIndexCompatibility?(context: RuntimeContext): Promise<IndexHealth>;
86
- rebuildIncompatibleIndex?(context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
87
- /** Absolute database path whose SQLite/derived writes are owned by this runtime. */
88
- resolveIndexPath?(root: string): string;
89
- /**
90
- * Optional warm native call (session sticky pool). When present, freshness
91
- * prefers this over cold `run` for status/index — same Searcher as Code Mode.
92
- */
93
- nativeCall?(tool: string, args: Record<string, unknown>, context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
94
- /** Enable low-latency external filesystem change detection for real runtimes. */
95
- watchExternalChanges?: boolean;
96
- }
97
- export interface FreshnessCoordinatorOptions {
98
- refreshIntervalMs?: number;
99
- now?: () => number;
100
- watchFactory?: FreshnessWatchFactory;
101
- }
102
- export type FreshnessWatchFactory = (root: string, options: {
103
- recursive: true;
104
- persistent: false;
105
- encoding: "utf8";
106
- }, listener: (eventType: "rename" | "change", filename: string | null) => void) => FSWatcher;
107
- export type IndexHealth = "ready" | "missing" | "incompatible";
108
- export declare class FreshnessCoordinator {
109
- #private;
110
- constructor(options?: FreshnessCoordinatorOptions);
111
- markAffectedPath(path: string, cwd: string): void;
112
- markRootDirty(root: string): void;
113
- ensureFresh(runtime: FreshnessRuntime, context: RuntimeContext, options?: RunOptions): Promise<string>;
114
- shutdown(): void;
115
- }
116
- export declare class AstSgrepRuntime {
117
- #private;
118
- private readonly pi;
119
- readonly watchExternalChanges = true;
120
- readonly config: ReturnType<typeof resolveConfig>;
121
- constructor(pi: PiExec, sources?: ConfigSources, dependencies?: RuntimeDependencies);
122
- resolveRoot(context: RuntimeContext): Promise<string>;
123
- resolveIndexPath(root: string): string;
124
- inspectIndexCompatibility(context: RuntimeContext): Promise<IndexHealth>;
125
- rebuildIncompatibleIndex(context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
126
- run(args: readonly string[], context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
127
- /** Absolute path to the native binary (for sticky serve / stdin batch spawn). */
128
- resolveBinaryPath(options?: {
129
- env?: NodeJS.ProcessEnv;
130
- }): string;
131
- /** Merged process env for native Code Mode workers. */
132
- nativeEnv(options?: {
133
- env?: NodeJS.ProcessEnv;
134
- }): NodeJS.ProcessEnv;
135
- checkCompatibility(context: RuntimeContext, options?: RunOptions): Promise<MachineEnvelope>;
136
- }
137
- export {};