@cerebriline/core 4.100.276 → 4.100.277
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/assets/prompt-templates/default.md +1 -1
- package/dist/cloud/index.js +2 -2
- package/dist/extensions/browser/chrome-browser-driver.d.ts +50 -0
- package/dist/extensions/browser/chrome-render-driver.d.ts +36 -0
- package/dist/extensions/diagnostics/check-file-diagnostics.d.ts +99 -0
- package/dist/extensions/diagnostics/editor-diagnostics.d.ts +125 -0
- package/dist/extensions/diagnostics/render.d.ts +25 -0
- package/dist/extensions/diagnostics/types.d.ts +52 -0
- package/dist/extensions/lsp/lsp-connection.d.ts +138 -0
- package/dist/extensions/lsp/lsp-host.d.ts +134 -0
- package/dist/extensions/tools/schemas.d.ts +12 -12
- package/dist/extensions/tools/transform-image.d.ts +11 -0
- package/dist/hub/daemon/entry.js +184 -184
- package/dist/hub/index.js +165 -165
- package/dist/index.d.ts +8 -0
- package/dist/index.js +841 -814
- package/dist/remote/remote-helper-entry.js +2 -2
- package/dist/remote/remote-helper.js +2 -2
- package/dist/services/global-settings.d.ts +3 -3
- package/package.json +11 -7
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostics as an editor keeps them, in the shape every host hands over.
|
|
3
|
+
*
|
|
4
|
+
* The extension reads them from VS Code (its proto `FileDiagnostics`), the
|
|
5
|
+
* CLI and automaticum's runner from the language servers they start. The
|
|
6
|
+
* tools that read them -- `check_file`, the post-edit report -- are shared,
|
|
7
|
+
* so the shape is core's: a named severity rather than either side's number
|
|
8
|
+
* (VS Code's proto counts errors from 0, LSP from 1).
|
|
9
|
+
*/
|
|
10
|
+
export type DiagnosticSeverityName = "error" | "warning" | "information" | "hint";
|
|
11
|
+
export interface DiagnosticPosition {
|
|
12
|
+
/** 0-based, as LSP has it. */
|
|
13
|
+
line: number;
|
|
14
|
+
/** 0-based. */
|
|
15
|
+
character: number;
|
|
16
|
+
}
|
|
17
|
+
export interface HostDiagnostic {
|
|
18
|
+
message: string;
|
|
19
|
+
severity: DiagnosticSeverityName;
|
|
20
|
+
range?: {
|
|
21
|
+
start?: DiagnosticPosition;
|
|
22
|
+
end?: DiagnosticPosition;
|
|
23
|
+
};
|
|
24
|
+
/** The producer, as the editor names it: "ts", "eslint", "css". */
|
|
25
|
+
source?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface HostFileDiagnostics {
|
|
28
|
+
filePath: string;
|
|
29
|
+
diagnostics: HostDiagnostic[];
|
|
30
|
+
/**
|
|
31
|
+
* The file changed after its server last reported on it, so what is held
|
|
32
|
+
* describes an older text. A reader waiting for the server to settle keeps
|
|
33
|
+
* waiting while this is set. Hosts that cannot tell leave it out.
|
|
34
|
+
*/
|
|
35
|
+
pending?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Reads every file's current diagnostics. */
|
|
38
|
+
export type ReadDiagnostics = () => Promise<HostFileDiagnostics[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Hands a server the file as it is on disk now (`save`: as just written), so
|
|
41
|
+
* its next diagnostics are about that text. The editor does this itself; a
|
|
42
|
+
* host that starts its own servers has to. Resolves to something truthy when
|
|
43
|
+
* a server holds the file.
|
|
44
|
+
*/
|
|
45
|
+
export type TouchDocument = (filePath: string, options?: {
|
|
46
|
+
save?: boolean;
|
|
47
|
+
}) => Promise<unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* A file's text, as the host reads its disk. Injected where a host wants its
|
|
50
|
+
* own view -- a sandbox, a test's fake disk -- and defaulted to the real one.
|
|
51
|
+
*/
|
|
52
|
+
export type ReadText = (filePath: string) => Promise<string>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { HostDiagnostic } from "../diagnostics/types";
|
|
2
|
+
export interface LspServerSpec {
|
|
3
|
+
/** How the server is named in status and errors. Defaults to `command`. */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** The executable: a name looked up on PATH, or a full path. */
|
|
6
|
+
command: string;
|
|
7
|
+
args: string[];
|
|
8
|
+
/** Languages this server answers for, as LSP language ids. */
|
|
9
|
+
languages: string[];
|
|
10
|
+
/**
|
|
11
|
+
* The file whose existence says the server is installed. Defaults to
|
|
12
|
+
* `command` (looked up on PATH when it has no directory in it). A server
|
|
13
|
+
* started as `node <script>` names its script here.
|
|
14
|
+
*/
|
|
15
|
+
probe?: string;
|
|
16
|
+
/** Added to the environment the server starts with. */
|
|
17
|
+
env?: Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* Server-specific `initializationOptions`.
|
|
20
|
+
*
|
|
21
|
+
* Needed because a server is not always self-sufficient:
|
|
22
|
+
* `typescript-language-server` refuses to start unless it can find a
|
|
23
|
+
* TypeScript installation, and it looks in the workspace. A workspace with
|
|
24
|
+
* no `node_modules` -- which is most of the ones a model is asked to fix --
|
|
25
|
+
* gets "Could not find a valid TypeScript installation. Exiting."
|
|
26
|
+
*/
|
|
27
|
+
initializationOptions?: Record<string, unknown> | (() => Record<string, unknown> | undefined);
|
|
28
|
+
/**
|
|
29
|
+
* The settings an editor would hold for this server: sent once with
|
|
30
|
+
* `workspace/didChangeConfiguration` and read back for every
|
|
31
|
+
* `workspace/configuration` the server asks. A section nobody set answers
|
|
32
|
+
* an empty object, never null -- see `LspConnection.setting`.
|
|
33
|
+
*/
|
|
34
|
+
settings?: Record<string, unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* A diagnostic's producer as the editor names it, by what the server
|
|
37
|
+
* reports: VS Code labels what tsserver reports "ts", where the server
|
|
38
|
+
* says "typescript".
|
|
39
|
+
*/
|
|
40
|
+
sources?: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
/** The name a spec goes by. */
|
|
43
|
+
export declare function serverName(spec: LspServerSpec): string;
|
|
44
|
+
export declare function fileUri(filePath: string): string;
|
|
45
|
+
export declare function uriToPath(uri: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* A diagnostic as the editor keeps it, from what a server sent: a position,
|
|
48
|
+
* a named severity, the message and the producer. LSP leaves the severity
|
|
49
|
+
* to the client when it is absent; VS Code treats that as an error.
|
|
50
|
+
*/
|
|
51
|
+
export declare function normalizeLspDiagnostic(raw: unknown): HostDiagnostic;
|
|
52
|
+
export interface LspConnectionOptions {
|
|
53
|
+
onError?: (message: string, error: unknown) => void;
|
|
54
|
+
/** Every `textDocument/publishDiagnostics`, the path decoded. */
|
|
55
|
+
onDiagnostics?: (filePath: string, diagnostics: HostDiagnostic[]) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* One server process and the conversation with it.
|
|
59
|
+
*
|
|
60
|
+
* Requests are correlated by id. A message with a `method` is the server's,
|
|
61
|
+
* whether or not it has an id: with one it is a request and is answered, and
|
|
62
|
+
* only a message without a `method` is a response to one of ours. A server
|
|
63
|
+
* that dies takes its pending requests with it rather than leaving them
|
|
64
|
+
* hanging until the timeout.
|
|
65
|
+
*/
|
|
66
|
+
export declare class LspConnection {
|
|
67
|
+
readonly spec: LspServerSpec;
|
|
68
|
+
private readonly rootPath;
|
|
69
|
+
private child;
|
|
70
|
+
private buffer;
|
|
71
|
+
private nextId;
|
|
72
|
+
private readonly pending;
|
|
73
|
+
/** What the server holds open, by URI: the text it was last sent. */
|
|
74
|
+
private readonly documents;
|
|
75
|
+
private initializing;
|
|
76
|
+
private failure;
|
|
77
|
+
private pullRefused;
|
|
78
|
+
/** What the server said it can do, from its `initialize` answer. */
|
|
79
|
+
capabilities: Record<string, unknown>;
|
|
80
|
+
private readonly onError?;
|
|
81
|
+
private readonly onDiagnostics?;
|
|
82
|
+
constructor(spec: LspServerSpec, rootPath: string, options?: LspConnectionOptions | ((message: string, error: unknown) => void));
|
|
83
|
+
/** Whether the server has been started and is still running. */
|
|
84
|
+
get started(): boolean;
|
|
85
|
+
/** Why the server is not available, once it has failed. */
|
|
86
|
+
get failed(): Error | undefined;
|
|
87
|
+
/** Started once, on the first question, and shared by every one after it. */
|
|
88
|
+
ready(): Promise<void>;
|
|
89
|
+
private start;
|
|
90
|
+
private fail;
|
|
91
|
+
private consume;
|
|
92
|
+
private dispatch;
|
|
93
|
+
/**
|
|
94
|
+
* A request of the server's own, answered as an editor answers it.
|
|
95
|
+
*
|
|
96
|
+
* Left unanswered, some servers wait for the answer before doing anything
|
|
97
|
+
* else.
|
|
98
|
+
*/
|
|
99
|
+
private answer;
|
|
100
|
+
/**
|
|
101
|
+
* A section of the settings, as an editor answers: an object, empty for a
|
|
102
|
+
* section nobody set. Never null: the CSS validator reads properties off
|
|
103
|
+
* what it is given ("Cannot read properties of null (reading
|
|
104
|
+
* 'validProperties')"), and the HTML server validates a page's `<style>`
|
|
105
|
+
* through it, so a null aborts the whole page's validation -- and a page
|
|
106
|
+
* whose script does not parse then reports no diagnostics at all.
|
|
107
|
+
*/
|
|
108
|
+
setting(section: string | undefined): unknown;
|
|
109
|
+
private send;
|
|
110
|
+
notify(method: string, params: unknown): void;
|
|
111
|
+
request(method: string, params: unknown, timeoutMs?: number): Promise<unknown>;
|
|
112
|
+
/**
|
|
113
|
+
* Make the server hold the file as it is now.
|
|
114
|
+
*
|
|
115
|
+
* Opened the first time; after that, sent whole as a change, with the next
|
|
116
|
+
* version, when it differs from what the server holds. A second `didOpen`
|
|
117
|
+
* for a document already open is a protocol error that servers answer by
|
|
118
|
+
* ignoring it -- and then answering from the old text, which is exactly
|
|
119
|
+
* the "the model edits, then asks" case. Returns whether the server was
|
|
120
|
+
* told anything.
|
|
121
|
+
*/
|
|
122
|
+
syncDocument(filePath: string, text: string, languageId: string): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Tell the server the file was written. Some servers check only on save:
|
|
125
|
+
* rust-analyzer's type errors come from `cargo check` on `didSave`.
|
|
126
|
+
*/
|
|
127
|
+
documentSaved(filePath: string): void;
|
|
128
|
+
/** Whether this server answers `textDocument/diagnostic` when asked. */
|
|
129
|
+
get pullsDiagnostics(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Diagnostics asked for, from a server that answers only when asked
|
|
132
|
+
* (csharp-ls). Undefined when the server does not pull, or answered with
|
|
133
|
+
* something other than a full report.
|
|
134
|
+
*/
|
|
135
|
+
pullDiagnostics(filePath: string): Promise<HostDiagnostic[] | undefined>;
|
|
136
|
+
private label;
|
|
137
|
+
dispose(): Promise<void>;
|
|
138
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { HostFileDiagnostics } from "../diagnostics/types";
|
|
2
|
+
import type { CodeIntelProvider } from "../tools/ask-lsp";
|
|
3
|
+
import { type LspServerSpec } from "./lsp-connection";
|
|
4
|
+
/**
|
|
5
|
+
* The language servers of a host that has no editor to ask.
|
|
6
|
+
*
|
|
7
|
+
* In the extension, `ask_lsp`, `check_file` and the post-edit report read VS
|
|
8
|
+
* Code, which already runs a server for every language in the workspace. A
|
|
9
|
+
* terminal runs none, so this resolves a server per language, starts it on
|
|
10
|
+
* the first question about a file of it, keeps it for the session, and keeps
|
|
11
|
+
* what it publishes as the editor keeps it.
|
|
12
|
+
*
|
|
13
|
+
* The tools' contract is what makes this tractable: an operation that cannot
|
|
14
|
+
* be answered returns nothing, and the tool says so plainly. So a language
|
|
15
|
+
* with no server installed is a quiet "no answer" rather than an error -- the
|
|
16
|
+
* same outcome the extension produces for a language whose extension the user
|
|
17
|
+
* never installed.
|
|
18
|
+
*/
|
|
19
|
+
/** LSP language ids, by the extension that implies them. */
|
|
20
|
+
export declare const LANGUAGE_BY_EXTENSION: Readonly<Record<string, string>>;
|
|
21
|
+
export declare function languageIdFor(filePath: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* A TypeScript installation this machine already has, for servers that need one.
|
|
24
|
+
*
|
|
25
|
+
* Only the globally installed one is considered: a workspace that has its own
|
|
26
|
+
* is found by the server without help, and this exists for the case where there
|
|
27
|
+
* is nothing to find. `tsserver.js` rather than the package root, because the
|
|
28
|
+
* 7.x `typescript` package is a native wrapper that ships no `tsserver` at all
|
|
29
|
+
* and would otherwise be handed over as if it were usable.
|
|
30
|
+
*/
|
|
31
|
+
export declare function findGlobalTypescriptLib(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* What VS Code's HTML extension hands its server, and what it answers when
|
|
34
|
+
* the server asks: the script and the style of a page are checked as
|
|
35
|
+
* JavaScript and CSS. The server's script mode reads
|
|
36
|
+
* `js/ts.implicitProjectConfig` with no guard, so it is given VS Code's
|
|
37
|
+
* defaults rather than left to fail.
|
|
38
|
+
*/
|
|
39
|
+
export declare const HTML_SERVER_SETTINGS: Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* The servers this host will try, and what each one answers for.
|
|
42
|
+
*
|
|
43
|
+
* Resolution is by what is actually on the machine: the first spec whose
|
|
44
|
+
* command exists and whose language list covers the file wins. Nothing is
|
|
45
|
+
* installed on demand -- a host that pulled down a language server mid-turn
|
|
46
|
+
* would be a surprise, and the tools degrade honestly without one. A host
|
|
47
|
+
* with its own install prefix (automaticum's runner) passes its own specs.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_LSP_SERVERS: LspServerSpec[];
|
|
50
|
+
/**
|
|
51
|
+
* Whether a command can be run, without running it.
|
|
52
|
+
*
|
|
53
|
+
* A PATH walk rather than `which`: spawning a shell to ask about ten servers
|
|
54
|
+
* costs more than reading ten directories, and this runs before the first
|
|
55
|
+
* question is answered.
|
|
56
|
+
*/
|
|
57
|
+
export declare function commandExists(command: string): boolean;
|
|
58
|
+
/** Whether a spec's server is on this machine. */
|
|
59
|
+
export declare function isServerInstalled(spec: LspServerSpec): boolean;
|
|
60
|
+
export interface HtmlServerTypescriptGap {
|
|
61
|
+
/** Where the server reads TypeScript's `lib.*.d.ts` from. */
|
|
62
|
+
expected: string;
|
|
63
|
+
/** A TypeScript beside the server that would fill it, if there is one. */
|
|
64
|
+
typescript?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Whether the HTML server of `vscode-langservers-extracted` will find
|
|
68
|
+
* TypeScript's library files.
|
|
69
|
+
*
|
|
70
|
+
* Its bundle (4.10.0) computes them as `<prefix>/node_modules/node_modules/
|
|
71
|
+
* typescript/lib` -- one `node_modules` too many -- so in a normal install
|
|
72
|
+
* they are never there, and a page's script is checked with no types: hover
|
|
73
|
+
* says `any`. Nothing the client sends changes the path. Returns the gap, or
|
|
74
|
+
* nothing when the server is not that one or the files are there.
|
|
75
|
+
*/
|
|
76
|
+
export declare function findHtmlServerTypescriptGap(spec: LspServerSpec): HtmlServerTypescriptGap | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Fill the gap with a link to the TypeScript beside the server.
|
|
79
|
+
*
|
|
80
|
+
* Writes into the server's install prefix, so it is never done implicitly: a
|
|
81
|
+
* host calls this when its owner has said so (automaticum's image does the
|
|
82
|
+
* same at build time). Returns whether the link now exists.
|
|
83
|
+
*/
|
|
84
|
+
export declare function repairHtmlServerTypescript(gap: HtmlServerTypescriptGap): boolean;
|
|
85
|
+
/** The languages of a workspace's files, looked for at most `limit` entries deep. */
|
|
86
|
+
export declare function workspaceLanguages(root: string, limit?: number): string[];
|
|
87
|
+
export interface LspServerStatus {
|
|
88
|
+
server: string;
|
|
89
|
+
languages: string[];
|
|
90
|
+
installed: boolean;
|
|
91
|
+
started?: boolean;
|
|
92
|
+
failed?: string;
|
|
93
|
+
/** Something the server needs that this machine lacks. */
|
|
94
|
+
warning?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface LspHostOptions {
|
|
97
|
+
/** The workspace root the servers start in. */
|
|
98
|
+
cwd: string;
|
|
99
|
+
/** Tried in order; the first installed one for a language wins. */
|
|
100
|
+
servers?: LspServerSpec[];
|
|
101
|
+
onError?: (message: string, error: unknown) => void;
|
|
102
|
+
/** Whether a spec's server is installed. Defaults to a PATH/probe check. */
|
|
103
|
+
isInstalled?: (spec: LspServerSpec) => boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface LspHost {
|
|
106
|
+
/** `ask_lsp`'s host half. */
|
|
107
|
+
provider: CodeIntelProvider;
|
|
108
|
+
/**
|
|
109
|
+
* Hand the file's server the file as it is on disk (`save`: as just
|
|
110
|
+
* written). Undefined when no server answers for it or it cannot be read.
|
|
111
|
+
*/
|
|
112
|
+
touch(filePath: string, options?: {
|
|
113
|
+
save?: boolean;
|
|
114
|
+
}): Promise<{
|
|
115
|
+
languageId: string;
|
|
116
|
+
} | undefined>;
|
|
117
|
+
/** Whether an installed server answers for this file's language. */
|
|
118
|
+
serves(filePath: string): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Every file a server has reported on, with `pending` set when the file
|
|
121
|
+
* changed after the server last reported on it.
|
|
122
|
+
*/
|
|
123
|
+
readDiagnostics(): Promise<HostFileDiagnostics[]>;
|
|
124
|
+
/** Start the servers for these languages (default: the workspace's) now. */
|
|
125
|
+
prewarm(languages?: string[]): string[];
|
|
126
|
+
/** Which server answers for which language, and in what state. */
|
|
127
|
+
status(): LspServerStatus[];
|
|
128
|
+
dispose(): Promise<void>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The session's language servers, behind `ask_lsp`, `check_file` and the
|
|
132
|
+
* post-edit report.
|
|
133
|
+
*/
|
|
134
|
+
export declare function createLspHost(options: LspHostOptions): LspHost;
|
|
@@ -27,7 +27,7 @@ export declare const ReadFileRequestSchema: z.ZodObject<{
|
|
|
27
27
|
path: z.ZodString;
|
|
28
28
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
29
29
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
30
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
30
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
31
31
|
}, z.core.$strip>;
|
|
32
32
|
/**
|
|
33
33
|
* Schema for read_files tool input
|
|
@@ -37,7 +37,7 @@ export declare const ReadFilesInputSchema: z.ZodObject<{
|
|
|
37
37
|
path: z.ZodString;
|
|
38
38
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
39
39
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
40
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
40
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
41
41
|
}, z.core.$strip>>;
|
|
42
42
|
}, z.core.$strip>;
|
|
43
43
|
/**
|
|
@@ -48,13 +48,13 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
48
48
|
path: z.ZodString;
|
|
49
49
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
50
50
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
51
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
51
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
52
52
|
}, z.core.$strip>>;
|
|
53
53
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
54
54
|
path: z.ZodString;
|
|
55
55
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
56
56
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
57
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
57
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
58
58
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
59
59
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
60
60
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -83,7 +83,7 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
83
83
|
path: z.ZodString;
|
|
84
84
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
85
85
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
86
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
86
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
87
87
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
88
88
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
89
89
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -113,7 +113,7 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
113
113
|
path: z.ZodString;
|
|
114
114
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
115
115
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
116
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
116
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
117
117
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
118
118
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
119
119
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -144,7 +144,7 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
144
144
|
path: z.ZodString;
|
|
145
145
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
146
146
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
147
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
147
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
148
148
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
149
149
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
150
150
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -181,7 +181,7 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
181
181
|
path: z.ZodString;
|
|
182
182
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
183
183
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
184
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
184
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
185
185
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
186
186
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
187
187
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -212,7 +212,7 @@ export declare const ReadFilesInputUnionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
212
212
|
path: z.ZodString;
|
|
213
213
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
214
214
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
215
|
-
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
215
|
+
line_numbers: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
216
216
|
}, z.core.$strip>, z.ZodPipe<z.ZodObject<{
|
|
217
217
|
start_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
218
218
|
end_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -649,7 +649,7 @@ export declare const EditFileInputSchema: z.ZodObject<{
|
|
|
649
649
|
end_column: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
650
650
|
insert_column: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
651
651
|
occurrence: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
652
|
-
replace_all: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
652
|
+
replace_all: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
653
653
|
}, z.core.$strip>;
|
|
654
654
|
/**
|
|
655
655
|
* The editor's arguments as the model is shown them and writes them.
|
|
@@ -671,7 +671,7 @@ export declare const EditorToolInputSchema: z.ZodObject<{
|
|
|
671
671
|
end_column: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
672
672
|
insert_line: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
673
673
|
insert_column: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
674
|
-
replace_all: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean>>>;
|
|
674
|
+
replace_all: z.ZodOptional<z.ZodNullable<z.ZodPreprocess<z.ZodBoolean, unknown>>>;
|
|
675
675
|
file_path: z.ZodString;
|
|
676
676
|
}, z.core.$strip>;
|
|
677
677
|
export type EditorToolInput = z.infer<typeof EditorToolInputSchema>;
|
|
@@ -820,7 +820,7 @@ export declare const GrepInputUnionSchema: z.ZodPreprocess<z.ZodObject<{
|
|
|
820
820
|
context: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
821
821
|
max_count: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
822
822
|
paths: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>]>>;
|
|
823
|
-
}, z.core.$strip
|
|
823
|
+
}, z.core.$strip>, unknown>;
|
|
824
824
|
export declare const SedInputUnionSchema: z.ZodObject<{
|
|
825
825
|
script: z.ZodString;
|
|
826
826
|
in_place: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -94,6 +94,17 @@ export interface TransformSpec {
|
|
|
94
94
|
/** Painted under the image, over the whole result. */
|
|
95
95
|
background?: string;
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* `planTransform`'s text, for the page to run.
|
|
99
|
+
*
|
|
100
|
+
* Bound to the name in the page (`var planTransform = (...)`) rather than
|
|
101
|
+
* pasted as a declaration: a minified build renames the function -- the
|
|
102
|
+
* published 4.100.276 bundle has it as `function BK(...)` -- and a page that
|
|
103
|
+
* then calls `planTransform(...)` throws "planTransform is not defined",
|
|
104
|
+
* draws nothing, and every `transform_image` call reports a valid image as
|
|
105
|
+
* unreadable. As an expression its own name no longer matters.
|
|
106
|
+
*/
|
|
107
|
+
export declare function planTransformSource(): string;
|
|
97
108
|
/** The page that draws one image at its new size. */
|
|
98
109
|
export declare function buildTransformDocument(sourceUrl: string, spec: TransformSpec): string;
|
|
99
110
|
/** One image, drawn at a new size by the host's browser. */
|