@molecule/api-ai-tools 1.10.5 → 1.10.7
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 +149 -2
- package/dist/browser-probe.d.ts +82 -0
- package/dist/browser-probe.d.ts.map +1 -0
- package/dist/browser-probe.js +526 -0
- package/dist/command-position.d.ts.map +1 -1
- package/dist/command-position.js +51 -7
- package/dist/cut-run.d.ts +7 -0
- package/dist/cut-run.d.ts.map +1 -1
- package/dist/cut-run.js +10 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/inline-script.d.ts +11 -1
- package/dist/inline-script.d.ts.map +1 -1
- package/dist/inline-script.js +50 -6
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +15 -3
- package/dist/server-command.d.ts +16 -0
- package/dist/server-command.d.ts.map +1 -1
- package/dist/server-command.js +37 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +52 -4
- package/dist/trace-artifacts.d.ts +70 -6
- package/dist/trace-artifacts.d.ts.map +1 -1
- package/dist/trace-artifacts.js +610 -53
- package/package.json +1 -1
package/dist/cut-run.js
CHANGED
|
@@ -397,6 +397,7 @@ export function cutRunFacts(result) {
|
|
|
397
397
|
noun: c.noun === 'tests' ? 'tests' : 'files',
|
|
398
398
|
doing: typeof c.doing === 'string' && c.doing ? c.doing : null,
|
|
399
399
|
inlineScript: typeof c.inlineScript === 'string' && c.inlineScript ? c.inlineScript : null,
|
|
400
|
+
browserProbe: typeof c.browserProbe === 'string' && c.browserProbe ? c.browserProbe : null,
|
|
400
401
|
};
|
|
401
402
|
}
|
|
402
403
|
/**
|
|
@@ -430,11 +431,15 @@ export function cutRunSentence(run) {
|
|
|
430
431
|
? // An inline local-file program finished in milliseconds or is stuck; backgrounding it only
|
|
431
432
|
// moves the hang (xr-molecule-flash-m200 +03:45). The full rewrite advice rides the error.
|
|
432
433
|
'do not run it in the background — the transform is stuck, not slow'
|
|
433
|
-
: run.
|
|
434
|
-
?
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
:
|
|
434
|
+
: run.browserProbe
|
|
435
|
+
? // A leaked browser is a live handle: the process never ends, and a background task has no
|
|
436
|
+
// exit to wait for either (xr-molecule-flash-m257 +15:34). The close is the fix.
|
|
437
|
+
`do not run it in the background — the browser (\`${run.browserProbe}\`) is never closed, so it would hang there too; close it in a \`finally\` block, or let the Playwright runner's browser fixture own it`
|
|
438
|
+
: run.background
|
|
439
|
+
? run.stoppedBy === 'command-timeout'
|
|
440
|
+
? `drop the \`timeout\` prefix and send it again — in the background a run is bounded by \`wait_for_task\` and the turn's deadline, not by this tool's ceiling, so the bound you wrote is what killed it`
|
|
441
|
+
: 'send it again when you are ready'
|
|
442
|
+
: 'run it in the background (run_in_background + wait_for_task)';
|
|
438
443
|
const missing = run.ran !== null && run.total !== null ? run.total - run.ran : null;
|
|
439
444
|
const lead = missing !== null
|
|
440
445
|
? `Ran ${run.ran} of ${run.total} ${run.noun} in ${run.seconds} s and was stopped by ${by} — the ${missing} it never reached ${missing === 1 ? 'has' : 'have'} not run; ${background}`
|
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
export * from './backends/local.js';
|
|
133
133
|
export * from './backends/sandbox.js';
|
|
134
134
|
export * from './browser-guard.js';
|
|
135
|
+
export * from './browser-probe.js';
|
|
135
136
|
export * from './command-position.js';
|
|
136
137
|
export * from './cut-run.js';
|
|
137
138
|
export * from './failure-kind.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
export * from './backends/local.js';
|
|
133
133
|
export * from './backends/sandbox.js';
|
|
134
134
|
export * from './browser-guard.js';
|
|
135
|
+
export * from './browser-probe.js';
|
|
135
136
|
export * from './command-position.js';
|
|
136
137
|
export * from './cut-run.js';
|
|
137
138
|
export * from './failure-kind.js';
|
package/dist/inline-script.d.ts
CHANGED
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
* a short budget ({@link INLINE_SCRIPT_BUDGET_MS}), and a cut says what happened: a runaway
|
|
16
16
|
* transform, not slow work ({@link inlineScriptRunawaySentence}).
|
|
17
17
|
*
|
|
18
|
+
* The short budget needs the WHOLE command to be that shape. xr-molecule-flash-m254 (+12:48)
|
|
19
|
+
* chained the m200 heredoc with `node …/smoke.mjs | tail -25` — a Playwright walk whose import
|
|
20
|
+
* lives inside the file — and the walk was stopped after 20 s while the result blamed the python
|
|
21
|
+
* transform. Every statement must be proven local ({@link LOCAL_UTILITY}) before the budget applies.
|
|
22
|
+
*
|
|
18
23
|
* @module
|
|
19
24
|
*/
|
|
20
25
|
/**
|
|
@@ -29,7 +34,12 @@ export declare const INLINE_SCRIPT_BUDGET_MS = 20000;
|
|
|
29
34
|
* The interpreter of an INLINE program that only reads and writes local files — the shape that gets
|
|
30
35
|
* {@link INLINE_SCRIPT_BUDGET_MS} instead of the tool's command budget.
|
|
31
36
|
*
|
|
32
|
-
*
|
|
37
|
+
* EVERY statement of the command must be proven local, not just one of them: each is either an
|
|
38
|
+
* inline interpreter program or a plain file utility ({@link LOCAL_UTILITY}). A statement that runs
|
|
39
|
+
* a script FILE (`node smoke.mjs`, `python3 x.py`, `bash x.sh`) or names a program this module does
|
|
40
|
+
* not know can do anything at all, so the command keeps the full budget.
|
|
41
|
+
*
|
|
42
|
+
* An inline program with any external effect keeps the full budget too: no network, install, test
|
|
33
43
|
* runner, build or server verb may appear anywhere in the command ({@link EXTERNAL_EFFECT}), and
|
|
34
44
|
* the command must not be a suite run or a foreground server (the platform's own classifiers).
|
|
35
45
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-script.d.ts","sourceRoot":"","sources":["../src/inline-script.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"inline-script.d.ts","sourceRoot":"","sources":["../src/inline-script.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAoF7C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAcvE;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOxF"}
|
package/dist/inline-script.js
CHANGED
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
* a short budget ({@link INLINE_SCRIPT_BUDGET_MS}), and a cut says what happened: a runaway
|
|
16
16
|
* transform, not slow work ({@link inlineScriptRunawaySentence}).
|
|
17
17
|
*
|
|
18
|
+
* The short budget needs the WHOLE command to be that shape. xr-molecule-flash-m254 (+12:48)
|
|
19
|
+
* chained the m200 heredoc with `node …/smoke.mjs | tail -25` — a Playwright walk whose import
|
|
20
|
+
* lives inside the file — and the walk was stopped after 20 s while the result blamed the python
|
|
21
|
+
* transform. Every statement must be proven local ({@link LOCAL_UTILITY}) before the budget applies.
|
|
22
|
+
*
|
|
18
23
|
* @module
|
|
19
24
|
*/
|
|
20
25
|
import { commandSegments } from './command-position.js';
|
|
@@ -56,7 +61,36 @@ const HEREDOC = /^<<-?\s*['"]?[A-Za-z_]/;
|
|
|
56
61
|
* the long budget and the old advice). That is the safe direction: this list must never shrink the
|
|
57
62
|
* budget of a command that reaches outside the box.
|
|
58
63
|
*/
|
|
59
|
-
const EXTERNAL_EFFECT = /\b(?:curl|wget|aria2c|rsync|scp|sftp|ftp|ssh|urllib3?|httpx|aiohttp|axios|requests|fetch|XMLHttpRequest|socket|net\.connect|https?:\/\/|npm|npx|pnpm|yarn|bun|pip3?|conda|cargo|gem|composer|playwright|vitest|jest|hurl|vite|tsc|webpack|esbuild|rollup|docker|cmake|gradle|mvn|make|subprocess|Popen|child_process|execSync|spawnSync|git|psql|mysql|mongosh?|redis-cli|sqlite3)\b|\bos\.system\b|\b(?:http\.server|flask|fastapi|uvicorn|gunicorn)\b/i;
|
|
64
|
+
const EXTERNAL_EFFECT = /\b(?:curl|wget|aria2c|rsync|scp|sftp|ftp|ssh|urllib3?|httpx|aiohttp|axios|requests|fetch|XMLHttpRequest|socket|net\.connect|https?:\/\/|npm|npx|pnpm|yarn|bun|pip3?|conda|cargo|gem|composer|playwright|vitest|jest|hurl|vite|tsc|webpack|esbuild|rollup|docker|cmake|gradle|mvn|make|subprocess|Popen|child_process|execSync|spawnSync|git|psql|mysql|mongosh?|redis-cli|sqlite3)\b|\bos\.system\b|\b(?:http\.server|flask|fastapi|uvicorn|gunicorn)\b|\/dev\/(?:tcp|udp)/i;
|
|
65
|
+
/**
|
|
66
|
+
* The only OTHER programs a proven-local inline program may share its command with: plain file
|
|
67
|
+
* utilities (`cd app && python3 - <<'EOF' … EOF`, `… EOF | tail -25`).
|
|
68
|
+
*
|
|
69
|
+
* xr-molecule-flash-m254 (+12:48) ran `python3 - <<'EOF' … EOF` and then, in the same command,
|
|
70
|
+
* `node /workspace/.mol-scratch/smoke.mjs | tail -25` — the agent's Playwright UI walk. The
|
|
71
|
+
* heredoc alone is local, so the whole chain got the 20 s budget, the walk was stopped, and the
|
|
72
|
+
* result blamed the python transform. A script FILE can do anything (the `playwright` import is
|
|
73
|
+
* inside it, not in the command text), so a statement that runs one — or any program this set does
|
|
74
|
+
* not list — means the command is not proven local and keeps the full budget.
|
|
75
|
+
*
|
|
76
|
+
* Every program here reads and writes local files and nothing else.
|
|
77
|
+
*/
|
|
78
|
+
const LOCAL_UTILITY = new Set([
|
|
79
|
+
'cat',
|
|
80
|
+
'cd',
|
|
81
|
+
'cp',
|
|
82
|
+
'echo',
|
|
83
|
+
'grep',
|
|
84
|
+
'head',
|
|
85
|
+
'ls',
|
|
86
|
+
'mkdir',
|
|
87
|
+
'mv',
|
|
88
|
+
'rm',
|
|
89
|
+
'sort',
|
|
90
|
+
'tail',
|
|
91
|
+
'test',
|
|
92
|
+
'wc',
|
|
93
|
+
]);
|
|
60
94
|
/**
|
|
61
95
|
* Whether one parsed statement runs an interpreter program written inline.
|
|
62
96
|
*
|
|
@@ -78,7 +112,12 @@ function inlineProgram(segment) {
|
|
|
78
112
|
* The interpreter of an INLINE program that only reads and writes local files — the shape that gets
|
|
79
113
|
* {@link INLINE_SCRIPT_BUDGET_MS} instead of the tool's command budget.
|
|
80
114
|
*
|
|
81
|
-
*
|
|
115
|
+
* EVERY statement of the command must be proven local, not just one of them: each is either an
|
|
116
|
+
* inline interpreter program or a plain file utility ({@link LOCAL_UTILITY}). A statement that runs
|
|
117
|
+
* a script FILE (`node smoke.mjs`, `python3 x.py`, `bash x.sh`) or names a program this module does
|
|
118
|
+
* not know can do anything at all, so the command keeps the full budget.
|
|
119
|
+
*
|
|
120
|
+
* An inline program with any external effect keeps the full budget too: no network, install, test
|
|
82
121
|
* runner, build or server verb may appear anywhere in the command ({@link EXTERNAL_EFFECT}), and
|
|
83
122
|
* the command must not be a suite run or a foreground server (the platform's own classifiers).
|
|
84
123
|
*
|
|
@@ -92,12 +131,17 @@ export function inlineLocalScriptCommand(command) {
|
|
|
92
131
|
return null;
|
|
93
132
|
if (isSuiteRunCommand(command) || startsServerProgram(command))
|
|
94
133
|
return null;
|
|
134
|
+
let interpreter = null;
|
|
95
135
|
for (const segment of commandSegments(command)) {
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
|
|
136
|
+
const inline = inlineProgram(segment);
|
|
137
|
+
if (inline !== null) {
|
|
138
|
+
interpreter ??= inline;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (!LOCAL_UTILITY.has(segment.program))
|
|
142
|
+
return null;
|
|
99
143
|
}
|
|
100
|
-
return
|
|
144
|
+
return interpreter;
|
|
101
145
|
}
|
|
102
146
|
/**
|
|
103
147
|
* What a cut inline program's result says instead of the background advice: the work never was
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA8V1C,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -85,7 +85,7 @@ export const TOOL_SCHEMAS = {
|
|
|
85
85
|
},
|
|
86
86
|
edit_file: {
|
|
87
87
|
name: 'edit_file',
|
|
88
|
-
description: 'Make targeted search-and-replace edits to a file. Preferred over write_file for small changes. Each old_string must match exactly once in the file, unless that replacement sets replace_all to change every occurrence (a rename, a repeated call). The result shows each edited region as it now reads, with line numbers, so there is no need to re-read the file to check an edit. Independent calls go in ONE response: edits to different files you already know how to make go together in the same response, one edit_file call per file. Only a call that needs another call’s result waits for it.',
|
|
88
|
+
description: 'Make targeted search-and-replace edits to a file. Preferred over write_file for small changes. Send exactly ONE edit form: either a nonempty replacements array (every edit, in order) or a single top-level old_string/new_string pair — never both, and the two forms are not merged. Each old_string must match exactly once in the file, unless that replacement sets replace_all to change every occurrence (a rename, a repeated call). The result shows each edited region as it now reads, with line numbers, so there is no need to re-read the file to check an edit. Independent calls go in ONE response: edits to different files you already know how to make go together in the same response, one edit_file call per file. Only a call that needs another call’s result waits for it.',
|
|
89
89
|
parameters: {
|
|
90
90
|
type: 'object',
|
|
91
91
|
properties: {
|
|
@@ -95,7 +95,7 @@ export const TOOL_SCHEMAS = {
|
|
|
95
95
|
},
|
|
96
96
|
replacements: {
|
|
97
97
|
type: 'array',
|
|
98
|
-
description: '
|
|
98
|
+
description: 'Batch edit form: search-and-replace operations applied sequentially. Use this OR the top-level old_string/new_string pair, never both.',
|
|
99
99
|
items: {
|
|
100
100
|
type: 'object',
|
|
101
101
|
properties: {
|
|
@@ -115,8 +115,20 @@ export const TOOL_SCHEMAS = {
|
|
|
115
115
|
required: ['old_string', 'new_string'],
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
|
+
old_string: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Single-edit form: exact string to find. Must match exactly once in the file. Send with new_string, and without replacements.',
|
|
121
|
+
},
|
|
122
|
+
new_string: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Single-edit form: replacement for the top-level old_string. Send with old_string, and without replacements.',
|
|
125
|
+
},
|
|
126
|
+
replace_all: {
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
description: 'Single-edit form: replace every occurrence of the top-level old_string instead of requiring exactly one (default false).',
|
|
129
|
+
},
|
|
118
130
|
},
|
|
119
|
-
required: ['path'
|
|
131
|
+
required: ['path'],
|
|
120
132
|
},
|
|
121
133
|
},
|
|
122
134
|
search_files: {
|
package/dist/server-command.d.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
19
|
+
import { type ForegroundBrowserProbe } from './browser-probe.js';
|
|
19
20
|
/**
|
|
20
21
|
* A background launch: a single `&` (not `&&`, not a `2>&1`) or an explicit detacher. A
|
|
21
22
|
* backgrounded launch never holds the tool, so every reading here stops at it.
|
|
@@ -56,6 +57,21 @@ export interface ForegroundServer {
|
|
|
56
57
|
* @returns The serving program, or null when the command starts no server in the foreground.
|
|
57
58
|
*/
|
|
58
59
|
export declare function foregroundServerCommand(command: string, readScript: (path: string) => Promise<string>): Promise<ForegroundServer | null>;
|
|
60
|
+
/**
|
|
61
|
+
* A FOREGROUND command that directly runs a standalone script which launches a browser and never
|
|
62
|
+
* closes it — the same never-returns lifecycle class as {@link foregroundServerCommand}, read from
|
|
63
|
+
* the script's SOURCE by {@link standaloneBrowserLeak}.
|
|
64
|
+
*
|
|
65
|
+
* The boundaries are the server preflight's, so the two readers cannot disagree about what they are
|
|
66
|
+
* allowed to touch: a backgrounded launch, a test runner and a test file are left alone, and a
|
|
67
|
+
* script the backend will not answer for is a command this reading cannot classify, never a
|
|
68
|
+
* refusal. A Playwright suite is owned by its runner's browser fixture and is never read here.
|
|
69
|
+
*
|
|
70
|
+
* @param command - The command as the executor sent it.
|
|
71
|
+
* @param readScript - Reads a script file the command names (`backend.readFile`).
|
|
72
|
+
* @returns The leaked probe's variable and script path, or null when the command is not one.
|
|
73
|
+
*/
|
|
74
|
+
export declare function foregroundBrowserProbe(command: string, readScript: (path: string) => Promise<string>): Promise<ForegroundBrowserProbe | null>;
|
|
59
75
|
/**
|
|
60
76
|
* The refusal for a foreground command that starts a server: why it would never return, and the
|
|
61
77
|
* two shapes that do work — a background launch, or a probe of the API already running.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-command.d.ts","sourceRoot":"","sources":["../src/server-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"server-command.d.ts","sourceRoot":"","sources":["../src/server-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,sBAAsB,EAAyB,MAAM,oBAAoB,CAAA;AAKvF;;;GAGG;AACH,eAAO,MAAM,YAAY,QAA6C,CAAA;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QACmP,CAAA;AAmF9Q;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAC5C,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmBlC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAC5C,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAiBxC;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAO5F;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAG0B,CAAA"}
|
package/dist/server-command.js
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
19
|
+
import { standaloneBrowserLeak } from './browser-probe.js';
|
|
19
20
|
import { commandSegments } from './command-position.js';
|
|
20
21
|
import { withoutHeredocs } from './suite-overlap.js';
|
|
21
22
|
/**
|
|
@@ -157,6 +158,42 @@ export async function foregroundServerCommand(command, readScript) {
|
|
|
157
158
|
}
|
|
158
159
|
return null;
|
|
159
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* A FOREGROUND command that directly runs a standalone script which launches a browser and never
|
|
163
|
+
* closes it — the same never-returns lifecycle class as {@link foregroundServerCommand}, read from
|
|
164
|
+
* the script's SOURCE by {@link standaloneBrowserLeak}.
|
|
165
|
+
*
|
|
166
|
+
* The boundaries are the server preflight's, so the two readers cannot disagree about what they are
|
|
167
|
+
* allowed to touch: a backgrounded launch, a test runner and a test file are left alone, and a
|
|
168
|
+
* script the backend will not answer for is a command this reading cannot classify, never a
|
|
169
|
+
* refusal. A Playwright suite is owned by its runner's browser fixture and is never read here.
|
|
170
|
+
*
|
|
171
|
+
* @param command - The command as the executor sent it.
|
|
172
|
+
* @param readScript - Reads a script file the command names (`backend.readFile`).
|
|
173
|
+
* @returns The leaked probe's variable and script path, or null when the command is not one.
|
|
174
|
+
*/
|
|
175
|
+
export async function foregroundBrowserProbe(command, readScript) {
|
|
176
|
+
const text = withoutHeredocs(command);
|
|
177
|
+
if (BACKGROUNDED.test(text))
|
|
178
|
+
return null;
|
|
179
|
+
for (const segment of commandSegments(text)) {
|
|
180
|
+
const script = scriptPath(segment);
|
|
181
|
+
if (script === null)
|
|
182
|
+
continue;
|
|
183
|
+
let source;
|
|
184
|
+
try {
|
|
185
|
+
source = await readScript(script);
|
|
186
|
+
}
|
|
187
|
+
catch (_error) {
|
|
188
|
+
// A script the backend cannot read is not classified: the refusal must never be a guess.
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
const leak = standaloneBrowserLeak(source);
|
|
192
|
+
if (leak !== null)
|
|
193
|
+
return { ...leak, script };
|
|
194
|
+
}
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
160
197
|
/**
|
|
161
198
|
* The refusal for a foreground command that starts a server: why it would never return, and the
|
|
162
199
|
* two shapes that do work — a background launch, or a probe of the API already running.
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAgO9C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAahG;AAkaD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA8HnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAEA,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,QAI6C,CAAA;AA2DlF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUhE;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAoBpF;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,CAAC,GACxE,qBAAqB,CAkBvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiCxB;AA2GD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,CAm4FxF"}
|
package/dist/tools.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import { posix } from 'path';
|
|
10
|
+
import { browserProbeOverBudgetAdvice, browserProbeRefusal } from './browser-probe.js';
|
|
10
11
|
import { commandCutRun, CUT_AT_BUDGET, cutRunSentence, suiteRunExitCode, suiteSummary, } from './cut-run.js';
|
|
11
12
|
import { addChangeSpan, changedSpan, countLines, renderEditExcerpt, renderSmallFile, } from './edit-excerpt.js';
|
|
12
13
|
import { INLINE_SCRIPT_BUDGET_MS, inlineLocalScriptCommand, inlineScriptRunawaySentence, } from './inline-script.js';
|
|
@@ -14,7 +15,7 @@ import { guardToolExecute, missingParamError, ToolInputError } from './input-nor
|
|
|
14
15
|
import { diffLineCount } from './line-diff.js';
|
|
15
16
|
import { pipelineExitCodeNote } from './pipeline-exit-note.js';
|
|
16
17
|
import { TOOL_SCHEMAS } from './schemas.js';
|
|
17
|
-
import { foregroundServerCommand, SERVER_OVER_BUDGET_ADVICE, serverCommandRefusal, startsServerProgram, } from './server-command.js';
|
|
18
|
+
import { foregroundBrowserProbe, foregroundServerCommand, SERVER_OVER_BUDGET_ADVICE, serverCommandRefusal, startsServerProgram, } from './server-command.js';
|
|
18
19
|
import { leadingSleepPeek } from './sleep-peek.js';
|
|
19
20
|
/**
|
|
20
21
|
* Total waiting, per background task, after which wait_for_task reports it
|
|
@@ -1797,6 +1798,27 @@ export function buildTools(backend, config) {
|
|
|
1797
1798
|
const argErr = pathArgError(input.path, 'edit_file');
|
|
1798
1799
|
if (argErr)
|
|
1799
1800
|
return { error: argErr };
|
|
1801
|
+
// The batch and the single top-level pair are EXCLUSIVE forms. A call that
|
|
1802
|
+
// carried a nonempty batch AND either top-level string used to apply the
|
|
1803
|
+
// batch and silently discard the pair, so the executor believed both edits
|
|
1804
|
+
// landed (xr-molecule-flash-m257 +06:08). Refuse BEFORE resolving, reading or
|
|
1805
|
+
// writing the file: which form wins, and where the pair would sit in the
|
|
1806
|
+
// batch order, cannot be inferred — and merging the two would silently apply
|
|
1807
|
+
// an overlap the model never asked the tool to resolve.
|
|
1808
|
+
const hasBatch = Array.isArray(input.replacements) && input.replacements.length > 0;
|
|
1809
|
+
const hasTopLevelEdit = input.old_string !== undefined || input.new_string !== undefined;
|
|
1810
|
+
if (hasBatch && hasTopLevelEdit) {
|
|
1811
|
+
// Name the edit that would have vanished (its first line) so the model
|
|
1812
|
+
// recognises it in the re-sent call.
|
|
1813
|
+
const head = typeof input.old_string === 'string'
|
|
1814
|
+
? input.old_string.split('\n')[0].trim().slice(0, 80)
|
|
1815
|
+
: '';
|
|
1816
|
+
return {
|
|
1817
|
+
error: 'Nothing changed: edit_file received both edit formats' +
|
|
1818
|
+
(head ? ` (the top-level edit starts "${head}")` : '') +
|
|
1819
|
+
'. Put EVERY edit, including the top-level old_string/new_string pair, in replacements, in the intended order — or send only the top-level pair with no replacements array. Never mix the two.',
|
|
1820
|
+
};
|
|
1821
|
+
}
|
|
1800
1822
|
const path = await resolveWrite(input.path);
|
|
1801
1823
|
// Support both formats: { replacements: [...] } (batch) and { old_string, new_string } (single, backwards-compatible)
|
|
1802
1824
|
let replacements = input.replacements;
|
|
@@ -2543,6 +2565,20 @@ export function buildTools(backend, config) {
|
|
|
2543
2565
|
error: serverCommandRefusal(server, Math.max(1, Math.round((commandBudgetMs ?? 290_000) / 1000))),
|
|
2544
2566
|
};
|
|
2545
2567
|
}
|
|
2568
|
+
// The same never-returns class, one handle lower: a standalone script that launches a
|
|
2569
|
+
// browser and never closes it. X1 xr-molecule-flash-m257 (+10:44 → +15:34) ran a 30-line
|
|
2570
|
+
// `fav-probe.mjs` whose `const browser = await chromium.launch()` had no `close()`; Chromium
|
|
2571
|
+
// is a live handle, so Node never exited. Behind `| tail` it printed nothing, the tool
|
|
2572
|
+
// waited its whole 290 s budget, and the over-budget message then advised "run it in the
|
|
2573
|
+
// background" — which only moves the hang. The source reading is narrow and closed-world
|
|
2574
|
+
// (browser-probe.ts): an alias, a helper, a context/page disposal or any other cleanup path
|
|
2575
|
+
// is left alone.
|
|
2576
|
+
const browserProbe = await foregroundBrowserProbe(rawCommand, (path) => backend.readFile(path));
|
|
2577
|
+
if (browserProbe) {
|
|
2578
|
+
return {
|
|
2579
|
+
error: browserProbeRefusal(browserProbe, Math.max(1, Math.round((commandBudgetMs ?? 290_000) / 1000)), /\|\s*(?:tail|head)\b/.test(rawCommand)),
|
|
2580
|
+
};
|
|
2581
|
+
}
|
|
2546
2582
|
}
|
|
2547
2583
|
// A Playwright run of a suite whose config records no trace gets one recorded anyway
|
|
2548
2584
|
// (`diagnosisTraceCommand`, trace-artifacts.ts): the failing tests' own network log is what
|
|
@@ -2956,6 +2992,16 @@ export function buildTools(backend, config) {
|
|
|
2956
2992
|
// what the result quotes is still the sanitized, truncated text.
|
|
2957
2993
|
`${result.stdout}\n${result.stderr}`);
|
|
2958
2994
|
if (cut) {
|
|
2995
|
+
// A probe that wrote its own script and then ran it is only readable NOW: the preflight
|
|
2996
|
+
// read a file that did not exist yet (m257's `fav-probe.mjs` was written in an earlier
|
|
2997
|
+
// turn, but a `cat > probe.mjs <<EOF … && node probe.mjs` is the same seam). Re-read it
|
|
2998
|
+
// before falling back to "run a smaller unit", which is advice about the wrong axis —
|
|
2999
|
+
// and would send a leaked handle to the background, where it hangs just the same.
|
|
3000
|
+
const cutBrowserProbe = inlineScript === null && !startsServerProgram(command) && !isSuiteRunCommand(command)
|
|
3001
|
+
? await foregroundBrowserProbe(command, (path) => backend.readFile(path))
|
|
3002
|
+
: null;
|
|
3003
|
+
if (cutBrowserProbe !== null)
|
|
3004
|
+
cut.browserProbe = cutBrowserProbe.variable;
|
|
2959
3005
|
const cutLead = cutRunSentence(cut);
|
|
2960
3006
|
return {
|
|
2961
3007
|
stdout,
|
|
@@ -2979,9 +3025,11 @@ export function buildTools(backend, config) {
|
|
|
2979
3025
|
? inlineScriptRunawaySentence(inlineScript, cut.seconds)
|
|
2980
3026
|
: startsServerProgram(command)
|
|
2981
3027
|
? SERVER_OVER_BUDGET_ADVICE
|
|
2982
|
-
:
|
|
2983
|
-
?
|
|
2984
|
-
:
|
|
3028
|
+
: cutBrowserProbe !== null
|
|
3029
|
+
? browserProbeOverBudgetAdvice(cutBrowserProbe)
|
|
3030
|
+
: isSuiteRunCommand(command)
|
|
3031
|
+
? SUITE_OVER_BUDGET_ADVICE
|
|
3032
|
+
: SPLIT_WORK_ADVICE),
|
|
2985
3033
|
};
|
|
2986
3034
|
}
|
|
2987
3035
|
// A pipeline reports its LAST stage's code: `tsc | head` says 0 beside a printed type
|
|
@@ -181,6 +181,13 @@ export interface TraceContextEvidence {
|
|
|
181
181
|
* selector. xr-molecule-flash-m169 (+13:09) spent its fix rounds on the wrong component and on a
|
|
182
182
|
* markup detail while `GET /api/tags` was returning the missing "trending" and `PopularTags`
|
|
183
183
|
* sliced the response to its first 20 entries (the m99 top-N class, in the frontend).
|
|
184
|
+
*
|
|
185
|
+
* The text must be a value the response held, never a substring of one: a whole JSON string or
|
|
186
|
+
* number value, or a word bounded by non-alphanumerics. A text of 2 characters or fewer, or one
|
|
187
|
+
* made of digits only, must be a whole JSON value. xr-molecule-flash-m208's pagination assertion
|
|
188
|
+
* waited for "2" and the raw substring hit `pag1792394785820` in a tags response, so the note led
|
|
189
|
+
* with a response that had nothing to do with the failure; when no response holds the text that
|
|
190
|
+
* way, the field is absent and the note leads with its next finding.
|
|
184
191
|
*/
|
|
185
192
|
export interface TraceMissingText {
|
|
186
193
|
/** The text the assertion waited for (`trending`). */
|
|
@@ -256,6 +263,27 @@ export interface TraceHiddenBox {
|
|
|
256
263
|
/** True when the element has no text and no element children at all. */
|
|
257
264
|
empty?: true;
|
|
258
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* One method+path a test's page sent many times — the trace of a render loop.
|
|
268
|
+
*
|
|
269
|
+
* Counted over EVERY network entry the failing page recorded, before the trace reader's per-trace
|
|
270
|
+
* cap and its method+path+status dedupe, because those two bounds are exactly what hid m215's
|
|
271
|
+
* 2,106-request loop: the note could only ever see four of them.
|
|
272
|
+
*/
|
|
273
|
+
interface TraceRequestRepeat {
|
|
274
|
+
/** The HTTP method (`GET`). */
|
|
275
|
+
method: string;
|
|
276
|
+
/** The path, query and fragment dropped (`/api/articles/test-article-1`). */
|
|
277
|
+
path: string;
|
|
278
|
+
/** How many times the page sent it in this test. */
|
|
279
|
+
count: number;
|
|
280
|
+
/** The last response status recorded. */
|
|
281
|
+
status?: number;
|
|
282
|
+
/** The browser's resource type (`fetch`, `xhr`, `document`). */
|
|
283
|
+
type?: string;
|
|
284
|
+
/** How long the repeated requests spanned, on the trace's own clock (ms). */
|
|
285
|
+
ms?: number;
|
|
286
|
+
}
|
|
259
287
|
/** What one trace says: the test it belongs to, the requests it made, and its console lines. */
|
|
260
288
|
export interface TraceArtifact {
|
|
261
289
|
/** The failure's spec file, relative to the run's directory, when the trace names one. */
|
|
@@ -348,6 +376,15 @@ export interface TraceArtifact {
|
|
|
348
376
|
* leaving the run to probe computed styles (xr-molecule-flash-m197).
|
|
349
377
|
*/
|
|
350
378
|
hiddenBox?: TraceHiddenBox;
|
|
379
|
+
/**
|
|
380
|
+
* The method+path groups this test's page sent {@link TRACE_NOTE_LOOP_REPEATS} times or more,
|
|
381
|
+
* most-repeated first — a render loop the note leads with (xr-molecule-flash-m215: 2,106
|
|
382
|
+
* `GET /api/articles/<slug>` in one test, printed as four identical `→ 200` lines). Counted over
|
|
383
|
+
* every network entry of the failing page, not the capped {@link TraceArtifact.requests} list.
|
|
384
|
+
*
|
|
385
|
+
* Absent when no group reached the threshold, and on traces read before this field existed.
|
|
386
|
+
*/
|
|
387
|
+
repeated?: TraceRequestRepeat[];
|
|
351
388
|
}
|
|
352
389
|
/** How many traces one read reports, newest first. */
|
|
353
390
|
export declare const MAX_TRACE_ARTIFACTS = 12;
|
|
@@ -366,6 +403,17 @@ export declare const MAX_TRACED_BODY_CHARS = 300;
|
|
|
366
403
|
export declare const MAX_TRACE_NOTE_TESTS = 5;
|
|
367
404
|
/** How many requests the note names per test. */
|
|
368
405
|
export declare const MAX_TRACE_NOTE_REQUESTS = 4;
|
|
406
|
+
/**
|
|
407
|
+
* How many times ONE test may send the same method+path before the note calls it a render loop.
|
|
408
|
+
*
|
|
409
|
+
* xr-molecule-flash-m215 (+27:27 → +29:42): an Editor effect with `[seeded, slug, t]` in its
|
|
410
|
+
* dependency list re-fetched `GET /api/articles/<slug>` 2,106 times in one test. The trace reader
|
|
411
|
+
* caps and de-duplicates its request list, so the note printed four identical `→ 200` lines and
|
|
412
|
+
* the run patched the component's seeding, rebuilt and re-ran before unzipping the trace by hand.
|
|
413
|
+
* Twenty is far above the retries a correct page makes (a few on a flaky call) and far below any
|
|
414
|
+
* render loop.
|
|
415
|
+
*/
|
|
416
|
+
export declare const TRACE_NOTE_LOOP_REPEATS = 20;
|
|
369
417
|
/** How long a URL the note prints, before the middle is cut. */
|
|
370
418
|
export declare const TRACE_NOTE_URL_CHARS = 96;
|
|
371
419
|
/** How much of the sent body the note prints — enough to see a `{"data":…}` wrapper. */
|
|
@@ -511,6 +559,17 @@ export interface TraceRunReport {
|
|
|
511
559
|
* Empty when the caller could not read the app's config.
|
|
512
560
|
*/
|
|
513
561
|
authEndpoints?: readonly string[];
|
|
562
|
+
/**
|
|
563
|
+
* The app source files whose code sends a repeated request, read by the caller from the
|
|
564
|
+
* project (`app/src/**`) before this note is written. A loop's sentence names the component to
|
|
565
|
+
* read instead of leaving the run to search for it (xr-molecule-flash-m215's `Editor.tsx`).
|
|
566
|
+
* Empty when the caller could not read the app or no file states the path.
|
|
567
|
+
*/
|
|
568
|
+
callSites?: readonly {
|
|
569
|
+
method: string;
|
|
570
|
+
path: string;
|
|
571
|
+
file: string;
|
|
572
|
+
}[];
|
|
514
573
|
}
|
|
515
574
|
/**
|
|
516
575
|
* Whether a request PATH asks the app to mint a credential — a login, a registration, a token
|
|
@@ -624,12 +683,16 @@ export declare function hiddenBoxNote(items: readonly TraceArtifact[]): string |
|
|
|
624
683
|
* config names; the traces add what their own requests show) and never assumed to be `/api`.
|
|
625
684
|
*
|
|
626
685
|
* A 401/403 on the app's own origin is answered from the request's own credential record instead
|
|
627
|
-
* ({@link authRefusalSentence}):
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
* xr-molecule-flash-
|
|
686
|
+
* ({@link authRefusalSentence}): a header the API then refused moves the answer to the server. No
|
|
687
|
+
* header is read together with the trace's session evidence — the failing test's identity, a
|
|
688
|
+
* credential exchange it answered 2xx, a request the client already attached a token to — and only
|
|
689
|
+
* positive evidence may prescribe the client's token wiring; otherwise the sentence is
|
|
690
|
+
* observational and, for a navigation failure, names the URL transition and the route guard
|
|
691
|
+
* (xr-molecule-flash-m221: a signed-out redirect test's `GET /api/articles/feed → 401` sent the
|
|
692
|
+
* model into replacing a working HTTP client, which lost the session token for ~28 minutes). The
|
|
693
|
+
* handler sentence is kept for the rest — 404/422/500 — and dropped when every failure was a
|
|
694
|
+
* credential refusal, because a trace that proves the header was never sent cannot be explained by
|
|
695
|
+
* the handler. xr-molecule-flash-m148 (+29:18) hit this exactly: six local walks read
|
|
633
696
|
* `POST …/favorite → 401 {"errors":{"token":["is missing"]}}` as a handler bug.
|
|
634
697
|
*
|
|
635
698
|
* A credential EXCHANGE (a login/registration/token endpoint, read from the app's auth config, the
|
|
@@ -703,4 +766,5 @@ export declare function diagnosisTraceCommand(args: {
|
|
|
703
766
|
cwd: string;
|
|
704
767
|
readFile: (path: string) => Promise<string>;
|
|
705
768
|
}): Promise<DiagnosisTraceRewrite>;
|
|
769
|
+
export {};
|
|
706
770
|
//# sourceMappingURL=trace-artifacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-artifacts.d.ts","sourceRoot":"","sources":["../src/trace-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,iEAAiE;AACjE,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,iGAAiG;IACjG,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAA;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