@cerebriline/core 4.100.274 → 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.
Files changed (76) hide show
  1. package/assets/prompt-templates/claude.md +7 -7
  2. package/assets/prompt-templates/deepseek.md +8 -8
  3. package/assets/prompt-templates/default.md +14 -14
  4. package/assets/prompt-templates/gemma.md +5 -5
  5. package/assets/prompt-templates/glm.md +9 -9
  6. package/assets/prompt-templates/kimi-k3.md +8 -8
  7. package/assets/prompt-templates/kimi.md +10 -10
  8. package/assets/prompt-templates/minimax-m3.1-flash.md +9 -8
  9. package/assets/prompt-templates/minimax.md +12 -10
  10. package/assets/prompt-templates/nemotron.md +9 -9
  11. package/assets/prompt-templates/qwen.md +9 -9
  12. package/dist/cloud/index.js +2 -2
  13. package/dist/document-reader-child.js +20 -20
  14. package/dist/extensions/browser/chrome-browser-driver.d.ts +50 -0
  15. package/dist/extensions/browser/chrome-render-driver.d.ts +36 -0
  16. package/dist/extensions/config/prompt-template-review.d.ts +1 -1
  17. package/dist/extensions/diagnostics/check-file-diagnostics.d.ts +99 -0
  18. package/dist/extensions/diagnostics/editor-diagnostics.d.ts +125 -0
  19. package/dist/extensions/diagnostics/render.d.ts +25 -0
  20. package/dist/extensions/diagnostics/types.d.ts +52 -0
  21. package/dist/extensions/lsp/lsp-connection.d.ts +138 -0
  22. package/dist/extensions/lsp/lsp-host.d.ts +134 -0
  23. package/dist/extensions/tools/ask-lsp.d.ts +1 -1
  24. package/dist/extensions/tools/browser.d.ts +1 -1
  25. package/dist/extensions/tools/check-file.d.ts +18 -3
  26. package/dist/extensions/tools/command-guard.d.ts +4 -3
  27. package/dist/extensions/tools/delimiter-balance.d.ts +50 -0
  28. package/dist/extensions/tools/edit-verification.d.ts +13 -4
  29. package/dist/extensions/tools/error-locations.d.ts +1 -1
  30. package/dist/extensions/tools/executors/awk-parser.d.ts +5 -0
  31. package/dist/extensions/tools/executors/awk.d.ts +14 -2
  32. package/dist/extensions/tools/executors/bash.d.ts +2 -0
  33. package/dist/extensions/tools/executors/document/formats.d.ts +4 -0
  34. package/dist/extensions/tools/executors/document/images.d.ts +6 -1
  35. package/dist/extensions/tools/executors/document/legacy.d.ts +9 -0
  36. package/dist/extensions/tools/executors/file-read.d.ts +15 -0
  37. package/dist/extensions/tools/executors/read-receipts.d.ts +10 -0
  38. package/dist/extensions/tools/executors/search.d.ts +2 -2
  39. package/dist/extensions/tools/executors/sed.d.ts +40 -0
  40. package/dist/extensions/tools/executors/unchanged-reads.d.ts +6 -0
  41. package/dist/extensions/tools/executors/web-fetch.d.ts +12 -0
  42. package/dist/extensions/tools/executors/whole-file.d.ts +7 -2
  43. package/dist/extensions/tools/helpers.d.ts +15 -1
  44. package/dist/extensions/tools/jev.d.ts +1 -1
  45. package/dist/extensions/tools/list-files.d.ts +17 -1
  46. package/dist/extensions/tools/media-endpoint.d.ts +16 -0
  47. package/dist/extensions/tools/model-tool-routing.d.ts +6 -0
  48. package/dist/extensions/tools/schemas.d.ts +12 -12
  49. package/dist/extensions/tools/task-progress.d.ts +2 -0
  50. package/dist/extensions/tools/team/agent-check.d.ts +15 -2
  51. package/dist/extensions/tools/team/agent-controls.d.ts +1 -1
  52. package/dist/extensions/tools/team/batch-report.d.ts +8 -0
  53. package/dist/extensions/tools/team/lead-agent-tools.d.ts +2 -2
  54. package/dist/extensions/tools/transform-image.d.ts +11 -0
  55. package/dist/hub/daemon/entry.js +718 -635
  56. package/dist/hub/index.js +703 -620
  57. package/dist/index.d.ts +9 -1
  58. package/dist/index.js +987 -874
  59. package/dist/remote/remote-helper-entry.js +2 -2
  60. package/dist/remote/remote-helper.js +2 -2
  61. package/dist/runtime/atomic/check-progress.d.ts +13 -0
  62. package/dist/runtime/atomic/file-revisions.d.ts +15 -1
  63. package/dist/runtime/atomic/oracle.d.ts +14 -0
  64. package/dist/runtime/atomic/page-check.d.ts +12 -2
  65. package/dist/runtime/atomic/plan-tool.d.ts +14 -2
  66. package/dist/runtime/atomic/protocol.d.ts +2 -0
  67. package/dist/runtime/atomic/restore-file-tool.d.ts +3 -3
  68. package/dist/runtime/atomic/snapshot.d.ts +15 -0
  69. package/dist/runtime/atomic/stalled-checks.d.ts +12 -4
  70. package/dist/runtime/atomic/transaction-controller.d.ts +10 -0
  71. package/dist/runtime/atomic/unparseable-change.d.ts +3 -1
  72. package/dist/runtime/safety/loop-detection.d.ts +15 -1
  73. package/dist/services/global-settings.d.ts +3 -3
  74. package/dist/services/retrieval/memory.d.ts +9 -0
  75. package/dist/services/sdd/sdd-engine.d.ts +14 -1
  76. package/package.json +11 -7
@@ -9,9 +9,23 @@ export declare function getEditorSizeError(input: EditFileInput): string | null;
9
9
  */
10
10
  export declare class TimeoutError extends Error {
11
11
  readonly timeoutMs: number;
12
- constructor(message: string, timeoutMs: number);
12
+ /**
13
+ * What the work printed before it was stopped, when there is any. A
14
+ * timeout dropped it: the test runner's FAIL line printed before it hung
15
+ * was exactly what the model needed (automaticum audit 2026-11-08,
16
+ * readers 8).
17
+ */
18
+ readonly output?: string;
19
+ constructor(message: string, timeoutMs: number, output?: string);
13
20
  }
14
21
  export declare function withTimeout<T>(promise: Promise<T>, ms: number, message: string): Promise<T>;
22
+ /**
23
+ * What a writing tool's timeout means: the call was abandoned, not stopped,
24
+ * so the files may hold some or all of its changes. "Failed" read as
25
+ * "nothing happened", and the model ran the same edit again over a file
26
+ * that already had it (automaticum audit 2026-11-08, outside scope).
27
+ */
28
+ export declare function abandonedWriteMessage(tool: string, timeoutMs: number): string;
15
29
  export declare function formatReadFileQuery(request: ReadFileRequest): string;
16
30
  export declare function getReadFileRangeError(request: ReadFileRequest): string | null;
17
31
  /**
@@ -196,7 +196,7 @@ export declare function listJevModels(endpoint: Pick<JevEndpoint, "apiKey" | "ba
196
196
  export declare function jevConfidence(answer: JevAnswer): number;
197
197
  /** Cut a state part to its ceiling, keeping the head and the tail. */
198
198
  export declare function boundJevText(text: string, max?: number): string;
199
- export declare const JEV_TOOL_DESCRIPTION = "Get a calibrated confidence score from Jev, an external scoring model, before acting on something you are not sure of. Jev reads the context you give it and answers typed questions with probabilities; it writes no text and cannot explain itself.\n\nUse it when you are unsure:\n- whether you understood the user's request \u2014 ask whether the request is ambiguous, or which of your readings it means;\n- whether a fact your answer rests on is supported by what you have read \u2014 put the source text in the context and ask whether it states the claim;\n- which approach, option or file to choose;\n- how complex the task is, before deciding to escalate or delegate it.\n\nArguments:\n- `context` \u2014 the situation, in plain text: what the user asked, what you found, what you are deciding. Only what the questions need; unrelated text makes the answers worse.\n- `questions` \u2014 1 to 10, all asked in one call. Each has an `id`, a `kind` and a `question`:\n - `yes_no` \u2014 a yes/no question. Returns the probability of yes.\n - `choice` \u2014 pick one of `options` (2 to 50). Include a \"none of these\" option when that is possible: a choice always picks something.\n - `score` \u2014 rate on `levels` (2 to 10, lowest first).\n Set `high_stakes: true` on a question whose wrong answer is costly; it must clear a higher bar.\n\nEach answer comes back as confident or unsure against the user's confidence floor. Act on a confident answer. On an unsure one, verify it yourself or ask the user \u2014 do not treat it as settled. Jev is weak at arithmetic, counting and multi-step reasoning, so check those in code, and ask one property per question rather than one broad question.";
199
+ export declare const JEV_TOOL_DESCRIPTION: string;
200
200
  export declare const JEV_TOOL_INPUT_SCHEMA: {
201
201
  readonly type: "object";
202
202
  readonly properties: {
@@ -38,7 +38,7 @@ import { type AgentTool } from "@cerebriline/shared";
38
38
  * and it reaches for `ls` for exactly the same reason.
39
39
  */
40
40
  export declare const LIST_FILES_TOOL_NAME = "list_files";
41
- export declare const LIST_FILES_TOOL_DESCRIPTION = "List the files in the workspace. Use this to find out what exists \u2014 do not run `ls`, `dir`, `find` or `Get-ChildItem` through `run_commands` to look around, because this is scoped to the workspace and those are not.\n\nTwo ways to ask:\n- `path` \u2014 list what is directly inside one directory. Omit it to list the workspace root.\n- `pattern` \u2014 a glob searched across the whole workspace, e.g. `**/*.html`, `src/**/*.ts`, `**/config.*`. Use this when you know part of a name but not where it lives.\n\nResults are limited to the workspace folders the user opened, and directories the user's settings exclude from search \u2014 `node_modules`, `.git`, build output \u2014 are left out. A path outside the workspace is refused rather than listed.\n\nThis tells you which files exist, not what is in them. To find files by their contents use `search_codebase`, which reports the line each match is on and is the right way to locate the part of a file worth reading.";
41
+ export declare const LIST_FILES_TOOL_DESCRIPTION = "List the files in the workspace. Use this to find out what exists \u2014 do not run `ls`, `dir`, `find` or `Get-ChildItem` through `run_commands` to look around, because this is scoped to the workspace and those are not.\n\nTwo ways to ask:\n- `path` \u2014 list what is directly inside one directory. Omit it to list the workspace root.\n- `pattern` \u2014 a glob searched across the whole workspace, e.g. `**/*.html`, `src/**/*.ts`, `**/config.*`. Use this when you know part of a name but not where it lives.\n\nResults are limited to the workspace folders the user opened. A `pattern` search does not enter the directories the user's settings exclude from search \u2014 `node_modules`, `.git` and the like \u2014 unless the pattern names one (`node_modules/**/package.json`); a `path` listing shows them, marked. A link to a directory is listed as one and searched through. A path outside the workspace is refused rather than listed.\n\nThis tells you which files exist, not what is in them. To find files by their contents use `search_codebase`, which reports the line each match is on and is the right way to locate the part of a file worth reading.";
42
42
  export declare const LIST_FILES_TOOL_INPUT_SCHEMA: {
43
43
  readonly type: "object";
44
44
  readonly properties: {
@@ -59,9 +59,18 @@ export declare const LIST_FILES_TOOL_INPUT_SCHEMA: {
59
59
  };
60
60
  export interface DirectoryEntry {
61
61
  name: string;
62
+ /** What it is, through a symbolic link: a link to a directory is one. */
62
63
  kind: "file" | "directory";
63
64
  /** Bytes, when the host could say cheaply. */
64
65
  size?: number;
66
+ /**
67
+ * A symbolic link, and where it points. Listed as a 60-byte file, a link
68
+ * to a directory hid everything behind it (automaticum audit 2026-11-08,
69
+ * readers 28).
70
+ */
71
+ link?: string;
72
+ /** A directory a pattern search does not enter unless it names it. */
73
+ excluded?: true;
65
74
  }
66
75
  /**
67
76
  * The workspace operations this tool needs.
@@ -104,6 +113,13 @@ export declare function normalizeMaxResults(value: unknown): number;
104
113
  export declare function renderDirectory(displayPath: string, entries: DirectoryEntry[], limit: number): string;
105
114
  /** Render a glob search, as paths relative to the root they were found under. */
106
115
  export declare function renderMatches(pattern: string, absolutePaths: string[], roots: string[], limit: number, readPaths?: string[]): string;
116
+ /**
117
+ * A glob as the workspace-relative pattern it means: `./src/*.ts` is
118
+ * `src/*.ts`, which is what a model writing `./` intends (readers 11).
119
+ */
120
+ export declare function normalizeGlob(pattern: string): string;
121
+ /** Excluded directory names a pattern spells out, which it then searches. */
122
+ export declare function namedExcludedDirectories(pattern: string): Set<string>;
107
123
  /**
108
124
  * Translate a glob into a regular expression over slash-separated paths.
109
125
  *
@@ -171,6 +171,22 @@ export declare class MediaRequestTimeoutError extends Error {
171
171
  readonly timeoutMs: number;
172
172
  constructor(timeoutMs: number);
173
173
  }
174
+ /**
175
+ * What a media call's failure was, in words: the limit, a cancel, the file
176
+ * it could not save, or the endpoint it could not reach.
177
+ *
178
+ * Every failure was "could not reach the endpoint", a disk that would not
179
+ * take the file included, and a cancel was "stopped (the limit is N s)"
180
+ * (automaticum audit 2026-11-08, rest M10).
181
+ */
182
+ export declare function describeMediaFailure(error: unknown, options: {
183
+ /** "The transcription", "Image generation". */
184
+ what: string;
185
+ /** "speech-to-text", "image". */
186
+ endpoint: string;
187
+ timeoutMs: number;
188
+ signal?: AbortSignal;
189
+ }): string;
174
190
  /**
175
191
  * One media request, waited out while the engine is busy.
176
192
  *
@@ -15,6 +15,12 @@ export interface ToolRoutingRule {
15
15
  * When omitted/empty, the rule is not constrained by model ID.
16
16
  */
17
17
  modelIdIncludes?: string[];
18
+ /**
19
+ * A case-insensitive regular expression the model ID must match, for a
20
+ * rule a substring cannot state. Both this and `modelIdIncludes` must
21
+ * match when both are given.
22
+ */
23
+ modelIdPattern?: string;
18
24
  /**
19
25
  * Case-insensitive substrings that must match the provider ID.
20
26
  * When omitted/empty, the rule is not constrained by provider ID.
@@ -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>;
@@ -191,6 +191,8 @@ export declare class TaskProgressTracker {
191
191
  private untrackedEdits;
192
192
  /** A reminder waiting for the turn's tool calls to finish. */
193
193
  private pending;
194
+ /** The calls that queued the untracked-edit nudge {@link pending} holds. */
195
+ private readonly pendingFrom;
194
196
  private readonly reminderInterval;
195
197
  private readonly writeInterval;
196
198
  private readonly onUpdate;
@@ -73,11 +73,24 @@ export declare const AGENT_CHECK_MAX_IDENTICAL_FAILS = 3;
73
73
  * after which the agent is let finish and the check counts as not run.
74
74
  */
75
75
  export declare const AGENT_CHECK_MAX_UNRESOLVED = 2;
76
- /** Whether a failed run says the shell never found the program. */
76
+ /**
77
+ * Whether a failed run says the shell never found the check's program.
78
+ *
79
+ * That is a statement about where the check runs, not about the agent's work.
80
+ * In swarm wlafh five of six fixers were sent back to work by it, spent 11 to
81
+ * 18 iterations on the environment, and three changed the host to get past it
82
+ * (the user's PATH, a hard link in `~/.local/bin`, a re-created program).
83
+ *
84
+ * Only the check's own program: exit 127 from a typo inside the agent's
85
+ * test script was blamed on the environment and recorded as not run,
86
+ * which hid the failure (automaticum audit 2026-11-08, rest C3).
87
+ */
77
88
  export declare function checkCommandUnresolved(verdict: {
78
89
  exitCode: number | null;
79
90
  output: string;
80
- }): boolean;
91
+ },
92
+ /** The check's command line; without it any program not found counts. */
93
+ command?: string): boolean;
81
94
  /** The reason a check is not run when the agent has no sandboxed shell. */
82
95
  export declare const AGENT_CHECK_NO_SANDBOX = "no command sandbox";
83
96
  /**
@@ -52,4 +52,4 @@ export declare function maxIterationsOf(input: unknown): number | undefined;
52
52
  */
53
53
  export declare const AGENT_SANDBOX_ROLE_NOTE = "How agents work: each runs in its own sandboxed copy of the workspace, so any number may read and edit the same files at once -- there is no concurrency problem to avoid, and no reason to forbid edits. Your files stay unchanged: each agent's edits come back to you as revisions. You are the synthesizer, and nothing merges on its own: read each report, inspect its revisions (`read_files` with `revision`), apply what is right (`restore_file`), reconcile agents that disagree, and verify the result yourself. ";
54
54
  /** What a spawn tool's description says about the two controls. */
55
- export declare const AGENT_CONTROLS_NOTE = "Agents run without an iteration cap; you are told every 60 iterations of a long-running one, so you can check on it with `agents_status`. A configured agent whose file sets a cap stops at it and waits for you with its work kept: `resume_agent(agent_ids?)` continues it, or `stop_agents` takes its work as it is. An agent the loop guard stops for sending the same call again waits for you the same way, reported as looping with the call it repeated: resume it with `instructions` saying what to do instead, or restart it. Per agent, or for the whole call (an agent's own wins): `check: {command, expect, must?}` is its oracle, and it is deterministic: when it says it is done, `command` runs in its own sandboxed copy of the workspace and must exit 0 with output matching the regex `expect` (`must: \"not_match\"`: not matching); on a fail it is shown the output and keeps working. It judges only that agent's own copy -- not the merged result, which is yours to check -- and a call-level check applies to every agent of the call: give it per agent to those whose edits it measures, never to review or analysis agents, which cannot pass it. It is told its check up front. Its report gives `iterations`/`maxIterations`, `stopReason` (`iteration_cap` or `loop_guard`) when either ended it, and `oracle` {status, exitCode, output}. ";
55
+ export declare const AGENT_CONTROLS_NOTE = "Agents run without an iteration cap; you are told every 60 iterations of a long-running one, so you can check on it with `agents_status`. A configured agent whose file sets a cap stops at it and waits for you with its work kept: `resume_agent(agent_ids?)` continues it, or `stop_agents` takes its work as it is. An agent the loop guard stops for sending the same call again waits for you the same way, reported as looping with the call it repeated: resume it with `instructions` saying what to do instead, or restart it. Per agent, or for the whole call (an agent's own wins): `check: {command, expect, must?}` is its oracle, and it is deterministic: when it says it is done, `command` runs in its own sandboxed copy of the workspace and must exit 0 with output matching the regex `expect` (`must: \"not_match\"`: not matching); on a fail it is shown the output and keeps working. It judges only that agent's own copy -- not the merged result, which is yours to check -- and a call-level check applies to every agent of the call: give it per agent to those whose edits it measures, never to review or analysis agents, which cannot pass it. It is told its check up front. Its report gives `iterations`/`maxIterations`, `stopReason` when something other than the agent ended it (`iteration_cap`: its cap; `loop_guard`: it repeated a call; `supervisor`: it was struggling; `wrap_up`: it was stopped gracefully and its last turn was a report), and `oracle` {status, exitCode, output}. ";
@@ -79,9 +79,17 @@ export interface SpawnBatchIndexEntry {
79
79
  }
80
80
  export interface SpawnBatchSummary {
81
81
  total: number;
82
+ /** Ran to the end; how many of those failed their check is `checkFailed`. */
82
83
  completed: number;
83
84
  errored: number;
84
85
  cancelled: number;
86
+ /**
87
+ * Agents whose check failed, whatever their status: a completed agent
88
+ * with a failed check has not done its task (rest M3).
89
+ */
90
+ checkFailed: number;
91
+ /** Agents whose check could not run; their work is unverified. */
92
+ checkNotRun: number;
85
93
  /** Stopped at the iteration cap and waiting on you; see `agents`. */
86
94
  awaitingLead: number;
87
95
  /** Per configured type, or per name with its `-<n>` copy suffix dropped. */
@@ -71,8 +71,8 @@ export declare const RESTART_AGENT_DESCRIPTION = "Start an agent over from its o
71
71
  export declare const RESUME_AGENT_DESCRIPTION = "Continue agents that are waiting for you (awaiting_lead): stopped at their iteration cap, by the loop guard for repeating the same call, or by the struggle supervisor for grinding on after being told to commit a SUMMARY. Each carries on from where it stopped, with its transcript and its changes. One call takes several: `agent_ids`, or leave it out for every agent waiting on you. `extra_iterations` defaults to the cap each was spawned with (60 -> 120 -> 180). `instructions` are added as they resume -- for a looping agent, say what to do instead of the call it repeated; for a struggling one, what to settle for. To take the work as it is instead, stop_agents; to start over, restart_agent.";
72
72
  export declare const RETRY_FAILED_DESCRIPTION = "Run a round's failed and cancelled agents again, each from the task it was originally given (and any revised instructions from a restart), with the same check, sampler and cap. `agent_ids` limits it to some of them. The round reports again when they finish. Infrastructure trouble never fails an agent -- it is retried on its own -- so what this reruns failed on its task: consider restart_agent with instructions for one that will fail the same way again.";
73
73
  export declare const MESSAGE_AGENTS_DESCRIPTION = "Leave a message for running agents. Each reads it at its next turn, between tool calls, and carries on with it in mind. Use it to pass on a change of plan, a constraint, or an answer.";
74
- export declare const STOP_AGENTS_DESCRIPTION = "Stop agents. A last resort: its task ends unfinished, and is lost unless you run it again. Slowness and a full server are not reasons to stop one: the harness paces agents and retries refusals, the PolyKV server frees KV cells on its own, and while an agent compacts its throughput drops to zero for minutes -- that is progress, not a hang (agents_status shows each agent's phase). To free KV cells, compact_agents; to move an agent off a slow node, requeue_agent; to change its course, message_agents. The rest of its round carries on. By default the stop is graceful: the agent finishes the step it is in, then gets one turn with no tools to report what it changed, found and verified, and where it stopped -- its report reaches you as its result, marked as partial work, and its file changes are kept. That takes as long as its step plus one reply, minutes on a slow node or a looping model. `immediate: true` ends it at once, with its file changes and no report -- also the way to end one already stopping gracefully. An agent waiting on you (at its cap, looping, struggling) is ended where it stopped, after the same report turn unless `immediate`.";
75
- export declare const COMPACT_AGENTS_DESCRIPTION = "Compact running agents' context, giving their KV cells back without stopping them -- what to do instead of stop_agents when a PolyKV node is short of cells. Each compacts before its next model request: a summary call during which its throughput is zero, often for minutes, and after which it carries on with a summary in place of its detailed history. Rarely needed: agents compact on their own when their node's KV pressure reaches its threshold (0.85 unless configured), and the server frees cells itself. Use it only on agents holding a large share of a node's cells while the node's pressure is near its threshold -- agents_status shows both. An agent already compacting, or waiting on you, is left as it is.";
74
+ export declare const STOP_AGENTS_DESCRIPTION = "Stop agents. A last resort: its task ends unfinished, and is lost unless you run it again. Slowness and a full server are not reasons to stop one: the harness paces agents and retries refusals, the PolyKV server frees KV cells on its own, and while an agent compacts its throughput drops to zero for minutes -- that is progress, not a hang, until agents_status says it has run too long (it shows each agent's phase). To free KV cells, compact_agents; to move an agent off a slow node, requeue_agent; to change its course, message_agents. The rest of its round carries on. By default the stop is graceful: the agent finishes the step it is in, then gets one turn with no tools to report what it changed, found and verified, and where it stopped -- its report reaches you as its result, marked as partial work, and its file changes are kept. That takes as long as its step plus one reply, minutes on a slow node or a looping model. `immediate: true` ends it at once, with its file changes and no report -- also the way to end one already stopping gracefully. An agent waiting on you (at its cap, looping, struggling) is ended where it stopped, after the same report turn unless `immediate`.";
75
+ export declare const COMPACT_AGENTS_DESCRIPTION = "Compact running agents' context, giving their KV cells back without stopping them -- what to do instead of stop_agents when a PolyKV node is short of cells. Each compacts before its next model request: a summary call during which its throughput is zero, often for minutes, and after which it carries on with a summary in place of its detailed history. Rarely needed: an agent compacts on its own when its own KV pressure on the node reaches the threshold (0.85 unless configured; the node's pressure where the server reports none per agent) or when its context window fills, and the server frees cells itself. Use it only on agents holding a large share of a node's cells while the node's pressure is near its threshold -- agents_status shows both. An agent already compacting, or waiting on you, is left as it is.";
76
76
  export interface LeadAgentToolsOptions {
77
77
  sessionId: string;
78
78
  /** What each tool did, in words: the side turn reports it to the lead. */
@@ -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. */