@cleocode/core 2026.9.3 → 2026.9.5
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/dist/dispatch/suggested-next.d.ts.map +1 -1
- package/dist/dispatch/suggested-next.js +7 -1
- package/dist/dispatch/suggested-next.js.map +1 -1
- package/dist/docs/export-document.js +84 -0
- package/dist/docs/export-document.js.map +2 -2
- package/dist/hygiene/validate-spawn-readiness.d.ts +88 -4
- package/dist/hygiene/validate-spawn-readiness.d.ts.map +1 -1
- package/dist/hygiene/validate-spawn-readiness.js +138 -16
- package/dist/hygiene/validate-spawn-readiness.js.map +1 -1
- package/dist/injection.d.ts.map +1 -1
- package/dist/injection.js +10 -2
- package/dist/injection.js.map +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/llm/plugin-facade.js +84 -0
- package/dist/llm/plugin-facade.js.map +2 -2
- package/dist/release/open.d.ts +11 -18
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +135 -7
- package/dist/release/open.js.map +1 -1
- package/dist/release/plan.d.ts +1 -6
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +1 -8
- package/dist/release/plan.js.map +1 -1
- package/dist/release/reconcile.d.ts +19 -1
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +110 -6
- package/dist/release/reconcile.js.map +1 -1
- package/dist/release/release-manifest.d.ts.map +1 -1
- package/dist/release/release-manifest.js +1 -3
- package/dist/release/release-manifest.js.map +1 -1
- package/dist/release/version.d.ts +48 -0
- package/dist/release/version.d.ts.map +1 -0
- package/dist/release/version.js +50 -0
- package/dist/release/version.js.map +1 -0
- package/dist/selfimprove/fix-gen.js +84 -0
- package/dist/selfimprove/fix-gen.js.map +2 -2
- package/dist/setup/sections/brain.d.ts +1 -1
- package/dist/setup/sections/brain.js +1 -1
- package/dist/system/bridge-mode.d.ts +1 -1
- package/dist/system/bridge-mode.js +1 -1
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +90 -27
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/heavy-tool-limit.d.ts +119 -0
- package/dist/tasks/heavy-tool-limit.d.ts.map +1 -1
- package/dist/tasks/heavy-tool-limit.js +205 -3
- package/dist/tasks/heavy-tool-limit.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +1 -1
- package/dist/tasks/index.js.map +1 -1
- package/dist/tasks/tool-cache.d.ts +153 -48
- package/dist/tasks/tool-cache.d.ts.map +1 -1
- package/dist/tasks/tool-cache.js +333 -97
- package/dist/tasks/tool-cache.js.map +1 -1
- package/package.json +13 -13
- package/templates/CLEO-INJECTION.md +6 -6
- package/templates/workflows/release-prepare.yml.tmpl +67 -2
- package/templates/workflows/release-publish.yml.tmpl +1 -1
- package/templates/workflows/release-rollback.yml.tmpl +18 -2
|
@@ -66,6 +66,17 @@ export interface LimitedCommand {
|
|
|
66
66
|
readonly confined: boolean;
|
|
67
67
|
/** Ceiling applied, in MiB; `null` when unconfined. */
|
|
68
68
|
readonly memoryMaxMb: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* The explicit transient-unit name this command runs under, or `null` when
|
|
71
|
+
* unconfined.
|
|
72
|
+
*
|
|
73
|
+
* Reported so a caller can stop or enumerate the scope. `suite-reaper.ts`
|
|
74
|
+
* already reaps via `systemctl --user stop <unitName>` and could never
|
|
75
|
+
* target a heavy-tool scope while the name was systemd's auto-generated one.
|
|
76
|
+
*
|
|
77
|
+
* @task T12221 (gh#1396)
|
|
78
|
+
*/
|
|
79
|
+
readonly unitName: string | null;
|
|
69
80
|
}
|
|
70
81
|
/**
|
|
71
82
|
* Memory ceiling for one heavy-tool invocation, in MiB.
|
|
@@ -98,6 +109,50 @@ export declare function resolveMemoryMaxMb(totalRamGib?: number, env?: NodeJS.Pr
|
|
|
98
109
|
export declare function cgroupConfinementAvailable(env?: NodeJS.ProcessEnv): boolean;
|
|
99
110
|
/** Reset the cached probe. Test-only. @internal */
|
|
100
111
|
export declare function _resetConfinementCache(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Build the transient-unit name a confined heavy tool runs under.
|
|
114
|
+
*
|
|
115
|
+
* `cleo-tool-<canonical>-<rootHash8>-<rand8>.scope`, e.g.
|
|
116
|
+
* `cleo-tool-test-3f9a21c4-b7e01d55.scope`. Each component earns its place:
|
|
117
|
+
*
|
|
118
|
+
* | Component | Defends against |
|
|
119
|
+
* |---------------|---------------------------------------------------|
|
|
120
|
+
* | `cleo-tool-` | *(legibility)* `systemctl --user list-units 'cleo-tool-*'` enumerates exactly CLEO's heavy-tool scopes, distinct from `cleo-agent-*`. |
|
|
121
|
+
* | `<canonical>` | *(legibility)* an operator sees WHICH tool is stuck without opening anything. |
|
|
122
|
+
* | `<rootHash8>` | two worktrees of one repo, and two projects on one host — both have different execution roots, so each gets its own namespace and either can be reaped without touching the other. |
|
|
123
|
+
* | `<rand8>` | two concurrent verifies of the same tool in the same tree, which differ in nothing else; and PID reuse, by not using the PID. |
|
|
124
|
+
*
|
|
125
|
+
* **Deliberately not the PID.** The PID is the component that makes systemd's
|
|
126
|
+
* auto-generated `run-p<pid>-i<id>` collide, and it defends nothing randomness
|
|
127
|
+
* does not. Including it out of familiarity would import the failure mode this
|
|
128
|
+
* name exists to remove.
|
|
129
|
+
*
|
|
130
|
+
* `rootHash8` is taken off the execution root — the same identity the cache key
|
|
131
|
+
* already uses (T12112 / gh#1220) — so the scope and the cache agree on what
|
|
132
|
+
* "the tree under test" means rather than each deciding separately.
|
|
133
|
+
*
|
|
134
|
+
* At ~38 characters of `[a-z0-9-]` this is far inside systemd's 256-byte unit
|
|
135
|
+
* name limit and uses only characters valid in a unit name.
|
|
136
|
+
*
|
|
137
|
+
* @param canonical - the heavy tool being run.
|
|
138
|
+
* @param executionRoot - absolute path of the tree the tool runs in.
|
|
139
|
+
* @returns a unit name ending in `.scope`.
|
|
140
|
+
*
|
|
141
|
+
* @task T12221 (gh#1396)
|
|
142
|
+
*/
|
|
143
|
+
export declare function buildToolScopeUnitName(canonical: CanonicalTool, executionRoot: string): string;
|
|
144
|
+
/**
|
|
145
|
+
* Is `cmd` a `systemd-run` invocation?
|
|
146
|
+
*
|
|
147
|
+
* Compares the basename so an absolute path (`/usr/bin/systemd-run`) is
|
|
148
|
+
* recognised as readily as the bare name a `testing.command` usually carries.
|
|
149
|
+
*
|
|
150
|
+
* @param cmd - the executable a resolved tool command starts with.
|
|
151
|
+
* @returns `true` when the command is itself systemd-run.
|
|
152
|
+
*
|
|
153
|
+
* @task T12221 (gh#1396)
|
|
154
|
+
*/
|
|
155
|
+
export declare function isSystemdRunCommand(cmd: string): boolean;
|
|
101
156
|
/**
|
|
102
157
|
* Wrap a heavy tool command so the kernel bounds its whole process tree.
|
|
103
158
|
*
|
|
@@ -130,6 +185,12 @@ export declare function withMemoryLimit(canonical: CanonicalTool, cmd: string, a
|
|
|
130
185
|
totalRamGib?: number;
|
|
131
186
|
env?: NodeJS.ProcessEnv;
|
|
132
187
|
available?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Tree the tool runs in, used for the unit name's `rootHash8`. Defaults to
|
|
190
|
+
* `process.cwd()` so existing callers keep working; the tool-cache passes
|
|
191
|
+
* the execution root it already resolved.
|
|
192
|
+
*/
|
|
193
|
+
executionRoot?: string;
|
|
133
194
|
}): LimitedCommand;
|
|
134
195
|
/**
|
|
135
196
|
* One sentence describing the memory bound a given tool runs under, for use in
|
|
@@ -157,4 +218,62 @@ export declare function withMemoryLimit(canonical: CanonicalTool, cmd: string, a
|
|
|
157
218
|
* @task T12116
|
|
158
219
|
*/
|
|
159
220
|
export declare function describeMemoryLimit(canonical: CanonicalTool, env?: NodeJS.ProcessEnv): string;
|
|
221
|
+
/**
|
|
222
|
+
* Decide whether a non-zero exit came from CLEO's own confinement wrapper
|
|
223
|
+
* failing to start, rather than from the wrapped tool running and failing.
|
|
224
|
+
*
|
|
225
|
+
* ## Why this cannot be done with the exit code
|
|
226
|
+
*
|
|
227
|
+
* `systemd-run --scope` is transparent on success: it exits with the WRAPPED
|
|
228
|
+
* command's status. Measured on systemd 259 — a scope that starts and runs
|
|
229
|
+
* `sh -c 'exit 7'` makes `systemd-run` exit `7`. When it cannot create the
|
|
230
|
+
* unit it exits `1` and the wrapped command never runs.
|
|
231
|
+
*
|
|
232
|
+
* `1` is also the exit code of a test suite with a failing test. So the two
|
|
233
|
+
* outcomes CLEO most needs to tell apart — "the harness never started" and
|
|
234
|
+
* "the suite ran and was red" — are identical in the exit code, and differ
|
|
235
|
+
* only in stderr. That is the whole of gh#1397: not a missing error code
|
|
236
|
+
* ({@link validateTool} has had `E_EVIDENCE_TOOL_UNAVAILABLE` all along) but a
|
|
237
|
+
* missing route into it.
|
|
238
|
+
*
|
|
239
|
+
* ## Scope of the claim
|
|
240
|
+
*
|
|
241
|
+
* Returns the matched diagnostic line so the caller can quote the real reason
|
|
242
|
+
* rather than paraphrase it.
|
|
243
|
+
*
|
|
244
|
+
* Gated on whether the spawned command was a `systemd-run` invocation AT ALL —
|
|
245
|
+
* NOT on whether CLEO added it. Those two were the same question until
|
|
246
|
+
* double-wrap detection landed; now a project that pins its own
|
|
247
|
+
* `systemd-run` test command is spawned unconfined by CLEO, and a failure of
|
|
248
|
+
* ITS wrapper still means the suite never ran. Keying on
|
|
249
|
+
* {@link LimitedCommand.confined} alone would have reported exactly the
|
|
250
|
+
* gh#1396 project's harness failures as red suites — the defect this function
|
|
251
|
+
* exists to remove, reintroduced by the fix for its sibling.
|
|
252
|
+
*
|
|
253
|
+
* This is a stderr match, so it is not airtight: a project whose own test
|
|
254
|
+
* output contained one of these strings verbatim AND exited non-zero would be
|
|
255
|
+
* misreported. That is judged acceptable against the alternative, which is the
|
|
256
|
+
* status quo of reporting every harness failure as a red suite. The markers
|
|
257
|
+
* are `systemd-run`'s, the check is gated on CLEO having wrapped the call, and
|
|
258
|
+
* the returned message is quoted rather than asserted.
|
|
259
|
+
*
|
|
260
|
+
* @param stderr - captured stderr from the spawn.
|
|
261
|
+
* @param viaSystemdRun - whether the spawned command was a systemd-run invocation,
|
|
262
|
+
* whether CLEO added it or the project pinned it.
|
|
263
|
+
* @returns the matched diagnostic line, or `null` when the wrapper started fine.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* confinementStartupFailure(
|
|
268
|
+
* 'Failed to start transient scope unit: Unit run-p1-i2.scope was already loaded.',
|
|
269
|
+
* true,
|
|
270
|
+
* );
|
|
271
|
+
* // => 'Failed to start transient scope unit: Unit run-p1-i2.scope was already loaded.'
|
|
272
|
+
* confinementStartupFailure('2 tests failed', true); // => null
|
|
273
|
+
* confinementStartupFailure('Failed to connect to bus', false); // => null (not systemd-run)
|
|
274
|
+
* ```
|
|
275
|
+
*
|
|
276
|
+
* @task T12116 (gh#1397)
|
|
277
|
+
*/
|
|
278
|
+
export declare function confinementStartupFailure(stderr: string, viaSystemdRun: boolean): string | null;
|
|
160
279
|
//# sourceMappingURL=heavy-tool-limit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heavy-tool-limit.d.ts","sourceRoot":"","sources":["../../src/tasks/heavy-tool-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;
|
|
1
|
+
{"version":3,"file":"heavy-tool-limit.d.ts","sourceRoot":"","sources":["../../src/tasks/heavy-tool-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,8EAA8E;AAC9E,eAAO,MAAM,4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I,GAAE;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACnB,GACL,cAAc,CAiGhB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,aAAa,EACxB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAaR;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAS/F"}
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
* @task T12116
|
|
47
47
|
*/
|
|
48
48
|
import { spawnSync } from 'node:child_process';
|
|
49
|
+
import { createHash, randomBytes } from 'node:crypto';
|
|
49
50
|
import { totalmem } from 'node:os';
|
|
50
51
|
import { isHeavyTool } from './heavy-tool-env.js';
|
|
51
52
|
/** Fraction of host RAM one heavy tool invocation may occupy. */
|
|
@@ -130,6 +131,57 @@ export function cgroupConfinementAvailable(env = process.env) {
|
|
|
130
131
|
export function _resetConfinementCache() {
|
|
131
132
|
_available = null;
|
|
132
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Build the transient-unit name a confined heavy tool runs under.
|
|
136
|
+
*
|
|
137
|
+
* `cleo-tool-<canonical>-<rootHash8>-<rand8>.scope`, e.g.
|
|
138
|
+
* `cleo-tool-test-3f9a21c4-b7e01d55.scope`. Each component earns its place:
|
|
139
|
+
*
|
|
140
|
+
* | Component | Defends against |
|
|
141
|
+
* |---------------|---------------------------------------------------|
|
|
142
|
+
* | `cleo-tool-` | *(legibility)* `systemctl --user list-units 'cleo-tool-*'` enumerates exactly CLEO's heavy-tool scopes, distinct from `cleo-agent-*`. |
|
|
143
|
+
* | `<canonical>` | *(legibility)* an operator sees WHICH tool is stuck without opening anything. |
|
|
144
|
+
* | `<rootHash8>` | two worktrees of one repo, and two projects on one host — both have different execution roots, so each gets its own namespace and either can be reaped without touching the other. |
|
|
145
|
+
* | `<rand8>` | two concurrent verifies of the same tool in the same tree, which differ in nothing else; and PID reuse, by not using the PID. |
|
|
146
|
+
*
|
|
147
|
+
* **Deliberately not the PID.** The PID is the component that makes systemd's
|
|
148
|
+
* auto-generated `run-p<pid>-i<id>` collide, and it defends nothing randomness
|
|
149
|
+
* does not. Including it out of familiarity would import the failure mode this
|
|
150
|
+
* name exists to remove.
|
|
151
|
+
*
|
|
152
|
+
* `rootHash8` is taken off the execution root — the same identity the cache key
|
|
153
|
+
* already uses (T12112 / gh#1220) — so the scope and the cache agree on what
|
|
154
|
+
* "the tree under test" means rather than each deciding separately.
|
|
155
|
+
*
|
|
156
|
+
* At ~38 characters of `[a-z0-9-]` this is far inside systemd's 256-byte unit
|
|
157
|
+
* name limit and uses only characters valid in a unit name.
|
|
158
|
+
*
|
|
159
|
+
* @param canonical - the heavy tool being run.
|
|
160
|
+
* @param executionRoot - absolute path of the tree the tool runs in.
|
|
161
|
+
* @returns a unit name ending in `.scope`.
|
|
162
|
+
*
|
|
163
|
+
* @task T12221 (gh#1396)
|
|
164
|
+
*/
|
|
165
|
+
export function buildToolScopeUnitName(canonical, executionRoot) {
|
|
166
|
+
const rootHash8 = createHash('sha256').update(executionRoot).digest('hex').slice(0, 8);
|
|
167
|
+
const rand8 = randomBytes(4).toString('hex');
|
|
168
|
+
return `cleo-tool-${canonical}-${rootHash8}-${rand8}.scope`;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Is `cmd` a `systemd-run` invocation?
|
|
172
|
+
*
|
|
173
|
+
* Compares the basename so an absolute path (`/usr/bin/systemd-run`) is
|
|
174
|
+
* recognised as readily as the bare name a `testing.command` usually carries.
|
|
175
|
+
*
|
|
176
|
+
* @param cmd - the executable a resolved tool command starts with.
|
|
177
|
+
* @returns `true` when the command is itself systemd-run.
|
|
178
|
+
*
|
|
179
|
+
* @task T12221 (gh#1396)
|
|
180
|
+
*/
|
|
181
|
+
export function isSystemdRunCommand(cmd) {
|
|
182
|
+
const base = cmd.split('/').pop() ?? cmd;
|
|
183
|
+
return base === 'systemd-run';
|
|
184
|
+
}
|
|
133
185
|
/**
|
|
134
186
|
* Wrap a heavy tool command so the kernel bounds its whole process tree.
|
|
135
187
|
*
|
|
@@ -164,18 +216,75 @@ export function withMemoryLimit(canonical, cmd, args, opts = {}) {
|
|
|
164
216
|
// the spawn deadline. Four independent literals agreeing by coincidence is
|
|
165
217
|
// how a fifth heavy tool gets a long deadline and no memory bound.
|
|
166
218
|
if (!isHeavyTool(canonical)) {
|
|
167
|
-
return { cmd, args, confined: false, memoryMaxMb: null };
|
|
219
|
+
return { cmd, args, confined: false, memoryMaxMb: null, unitName: null };
|
|
220
|
+
}
|
|
221
|
+
// gh#1396: do NOT wrap a command that already carries its own resource
|
|
222
|
+
// wrapper. `axiom-analytics` pins
|
|
223
|
+
//
|
|
224
|
+
// testing.command = "systemd-run --user --scope --quiet -p MemoryMax=8G \
|
|
225
|
+
// -p MemorySwapMax=0 -- env … pnpm exec vitest run"
|
|
226
|
+
//
|
|
227
|
+
// and `parseCommandString` splits on whitespace, so `cmd` is literally
|
|
228
|
+
// `systemd-run`. Prepending a second one nests two transient scopes, and
|
|
229
|
+
// `systemd-run --scope` execs its payload rather than forking — so the inner
|
|
230
|
+
// client regenerates a unit name the outer has already registered.
|
|
231
|
+
// Measured: nested 5/5 collide with
|
|
232
|
+
// "Unit run-p<pid>-i<id>.scope was already loaded or has a fragment file";
|
|
233
|
+
// a single invocation, 0/6.
|
|
234
|
+
//
|
|
235
|
+
// The collision is the symptom. The defect is the double wrap, and declining
|
|
236
|
+
// it is the rule this codebase has already adopted twice for exactly this
|
|
237
|
+
// shape: `heapCapApplied()` in `bin/cleo.js` does not re-exec when an
|
|
238
|
+
// operator's own `NODE_OPTIONS` already sets a heap cap, and
|
|
239
|
+
// `mergeNodeOptions()` lets an existing explicit value outrank our default.
|
|
240
|
+
// A project whose test command IS `systemd-run -p MemoryMax=8G` has made
|
|
241
|
+
// that same explicit choice, and a second cap it did not ask for is the
|
|
242
|
+
// thing to avoid, not merely the name clash.
|
|
243
|
+
//
|
|
244
|
+
// Deliberately systemd-run-SPECIFIC. `env`, `nice`, `taskset` and `timeout`
|
|
245
|
+
// are all plausible leading tokens too, but none of them imposes the cgroup
|
|
246
|
+
// memory bound this function exists to apply, so treating them as
|
|
247
|
+
// "already confined" would silently drop the ceiling. Detecting general
|
|
248
|
+
// intent would be guessing; this detects our own mechanism only.
|
|
249
|
+
if (isSystemdRunCommand(cmd)) {
|
|
250
|
+
return { cmd, args, confined: false, memoryMaxMb: null, unitName: null };
|
|
168
251
|
}
|
|
169
252
|
const available = opts.available ?? cgroupConfinementAvailable(env);
|
|
170
253
|
if (!available) {
|
|
171
|
-
return { cmd, args, confined: false, memoryMaxMb: null };
|
|
254
|
+
return { cmd, args, confined: false, memoryMaxMb: null, unitName: null };
|
|
172
255
|
}
|
|
173
256
|
const memoryMaxMb = resolveMemoryMaxMb(opts.totalRamGib ?? totalmem() / 1024 ** 3, env);
|
|
257
|
+
// CWD-OK: do NOT replace this with `resolveOrCwd(opts.executionRoot)`, which
|
|
258
|
+
// is what the project-root lint recommends. That helper falls back to
|
|
259
|
+
// `getProjectRoot()`, and `getProjectRoot()` DELIBERATELY collapses a git
|
|
260
|
+
// worktree to the main repo (paths.ts, step 2.5: "the canonical project root
|
|
261
|
+
// is the MAIN repo, not the worktree dir"). That is correct for locating
|
|
262
|
+
// state, and wrong here: every worktree of a repo would then hash to the same
|
|
263
|
+
// `rootHash8`, so two worktrees running `test` concurrently would build the
|
|
264
|
+
// same unit-name namespace — reintroducing a collision class inside the fix
|
|
265
|
+
// for a collision bug, and destroying the property this component exists to
|
|
266
|
+
// provide (see {@link buildToolScopeUnitName}).
|
|
267
|
+
//
|
|
268
|
+
// The production call site (`tool-cache.ts`) ALWAYS passes `executionRoot` —
|
|
269
|
+
// the same execution root the cache key uses — so this fallback is reached
|
|
270
|
+
// only by callers that do not identify a tree: tests, and any future
|
|
271
|
+
// in-process caller. For those, the process cwd is the best available answer
|
|
272
|
+
// and a wrong-but-unique namespace is harmless, whereas a collapsed one is
|
|
273
|
+
// not. Making `executionRoot` required would remove this line entirely and
|
|
274
|
+
// is the right follow-up.
|
|
275
|
+
const unitName = buildToolScopeUnitName(canonical, opts.executionRoot ?? process.cwd()); // CWD-OK: getProjectRoot() collapses worktrees to the main repo, which would give every worktree the same rootHash8 — see the note above
|
|
174
276
|
return {
|
|
175
277
|
cmd: 'systemd-run',
|
|
176
278
|
args: [
|
|
177
279
|
'--user',
|
|
178
280
|
'--scope',
|
|
281
|
+
// gh#1396: an EXPLICIT name. Without `--unit=` systemd generates
|
|
282
|
+
// `run-p<pid>-i<dbus-id>`, which is unstoppable by name (so
|
|
283
|
+
// `suite-reaper.ts` cannot target it) and collides outright when two
|
|
284
|
+
// systemd-run clients share a pid. `--scope` picks the unit TYPE and
|
|
285
|
+
// `--unit=` supplies its NAME; they are independent and compose, which
|
|
286
|
+
// the TSDoc here asserted otherwise for the whole life of this defect.
|
|
287
|
+
`--unit=${unitName}`,
|
|
179
288
|
'--quiet',
|
|
180
289
|
'--collect',
|
|
181
290
|
'-p',
|
|
@@ -191,6 +300,7 @@ export function withMemoryLimit(canonical, cmd, args, opts = {}) {
|
|
|
191
300
|
],
|
|
192
301
|
confined: true,
|
|
193
302
|
memoryMaxMb,
|
|
303
|
+
unitName,
|
|
194
304
|
};
|
|
195
305
|
}
|
|
196
306
|
/**
|
|
@@ -219,7 +329,10 @@ export function withMemoryLimit(canonical, cmd, args, opts = {}) {
|
|
|
219
329
|
* @task T12116
|
|
220
330
|
*/
|
|
221
331
|
export function describeMemoryLimit(canonical, env = process.env) {
|
|
222
|
-
|
|
332
|
+
// `executionRoot` is a stable sentinel, not a real path: this probe reads
|
|
333
|
+
// only `confined` and `memoryMaxMb` and discards the unit name, so making it
|
|
334
|
+
// read the process cwd would be a side effect with no consumer.
|
|
335
|
+
const limited = withMemoryLimit(canonical, 'probe', [], { env, executionRoot: 'probe' });
|
|
223
336
|
if (!limited.confined || limited.memoryMaxMb === null)
|
|
224
337
|
return '';
|
|
225
338
|
return (` This tool runs inside a memory-bounded systemd scope ` +
|
|
@@ -228,4 +341,93 @@ export function describeMemoryLimit(canonical, env = process.env) {
|
|
|
228
341
|
`though an external kill looks identical. Raise it with ${MEMORY_MAX_ENV}=<megabytes>, ` +
|
|
229
342
|
`reduce the tool's own worker count, or set ${DISABLE_ENV}=1 to run unconfined.`);
|
|
230
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* `systemd-run`'s own pre-exec failure diagnostics.
|
|
346
|
+
*
|
|
347
|
+
* Each of these is printed by `systemd-run` itself, BEFORE it execs the wrapped
|
|
348
|
+
* command, when it cannot create the transient unit. They are not produced by
|
|
349
|
+
* the tool being wrapped, because the tool never ran.
|
|
350
|
+
*
|
|
351
|
+
* Matched case-insensitively against the captured stderr. The list is
|
|
352
|
+
* deliberately narrow: every entry is a message `systemd-run` emits on the
|
|
353
|
+
* failure path, not a generic systemd string that could plausibly appear in a
|
|
354
|
+
* project's own test output.
|
|
355
|
+
*
|
|
356
|
+
* @task T12116 (gh#1397)
|
|
357
|
+
*/
|
|
358
|
+
const CONFINEMENT_STARTUP_MARKERS = [
|
|
359
|
+
'failed to start transient scope unit',
|
|
360
|
+
'failed to start transient service unit',
|
|
361
|
+
'failed to connect to bus',
|
|
362
|
+
'failed to create bus connection',
|
|
363
|
+
'interactive authentication required',
|
|
364
|
+
];
|
|
365
|
+
/**
|
|
366
|
+
* Decide whether a non-zero exit came from CLEO's own confinement wrapper
|
|
367
|
+
* failing to start, rather than from the wrapped tool running and failing.
|
|
368
|
+
*
|
|
369
|
+
* ## Why this cannot be done with the exit code
|
|
370
|
+
*
|
|
371
|
+
* `systemd-run --scope` is transparent on success: it exits with the WRAPPED
|
|
372
|
+
* command's status. Measured on systemd 259 — a scope that starts and runs
|
|
373
|
+
* `sh -c 'exit 7'` makes `systemd-run` exit `7`. When it cannot create the
|
|
374
|
+
* unit it exits `1` and the wrapped command never runs.
|
|
375
|
+
*
|
|
376
|
+
* `1` is also the exit code of a test suite with a failing test. So the two
|
|
377
|
+
* outcomes CLEO most needs to tell apart — "the harness never started" and
|
|
378
|
+
* "the suite ran and was red" — are identical in the exit code, and differ
|
|
379
|
+
* only in stderr. That is the whole of gh#1397: not a missing error code
|
|
380
|
+
* ({@link validateTool} has had `E_EVIDENCE_TOOL_UNAVAILABLE` all along) but a
|
|
381
|
+
* missing route into it.
|
|
382
|
+
*
|
|
383
|
+
* ## Scope of the claim
|
|
384
|
+
*
|
|
385
|
+
* Returns the matched diagnostic line so the caller can quote the real reason
|
|
386
|
+
* rather than paraphrase it.
|
|
387
|
+
*
|
|
388
|
+
* Gated on whether the spawned command was a `systemd-run` invocation AT ALL —
|
|
389
|
+
* NOT on whether CLEO added it. Those two were the same question until
|
|
390
|
+
* double-wrap detection landed; now a project that pins its own
|
|
391
|
+
* `systemd-run` test command is spawned unconfined by CLEO, and a failure of
|
|
392
|
+
* ITS wrapper still means the suite never ran. Keying on
|
|
393
|
+
* {@link LimitedCommand.confined} alone would have reported exactly the
|
|
394
|
+
* gh#1396 project's harness failures as red suites — the defect this function
|
|
395
|
+
* exists to remove, reintroduced by the fix for its sibling.
|
|
396
|
+
*
|
|
397
|
+
* This is a stderr match, so it is not airtight: a project whose own test
|
|
398
|
+
* output contained one of these strings verbatim AND exited non-zero would be
|
|
399
|
+
* misreported. That is judged acceptable against the alternative, which is the
|
|
400
|
+
* status quo of reporting every harness failure as a red suite. The markers
|
|
401
|
+
* are `systemd-run`'s, the check is gated on CLEO having wrapped the call, and
|
|
402
|
+
* the returned message is quoted rather than asserted.
|
|
403
|
+
*
|
|
404
|
+
* @param stderr - captured stderr from the spawn.
|
|
405
|
+
* @param viaSystemdRun - whether the spawned command was a systemd-run invocation,
|
|
406
|
+
* whether CLEO added it or the project pinned it.
|
|
407
|
+
* @returns the matched diagnostic line, or `null` when the wrapper started fine.
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* ```ts
|
|
411
|
+
* confinementStartupFailure(
|
|
412
|
+
* 'Failed to start transient scope unit: Unit run-p1-i2.scope was already loaded.',
|
|
413
|
+
* true,
|
|
414
|
+
* );
|
|
415
|
+
* // => 'Failed to start transient scope unit: Unit run-p1-i2.scope was already loaded.'
|
|
416
|
+
* confinementStartupFailure('2 tests failed', true); // => null
|
|
417
|
+
* confinementStartupFailure('Failed to connect to bus', false); // => null (not systemd-run)
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* @task T12116 (gh#1397)
|
|
421
|
+
*/
|
|
422
|
+
export function confinementStartupFailure(stderr, viaSystemdRun) {
|
|
423
|
+
if (!viaSystemdRun || stderr === '')
|
|
424
|
+
return null;
|
|
425
|
+
for (const line of stderr.split('\n')) {
|
|
426
|
+
const haystack = line.toLowerCase();
|
|
427
|
+
if (CONFINEMENT_STARTUP_MARKERS.some((m) => haystack.includes(m))) {
|
|
428
|
+
return line.trim();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
231
433
|
//# sourceMappingURL=heavy-tool-limit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heavy-tool-limit.js","sourceRoot":"","sources":["../../src/tasks/heavy-tool-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD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,CACjF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,2BAA2B,GAAsB;IACrD,sCAAsC;IACtC,wCAAwC;IACxC,0BAA0B;IAC1B,iCAAiC;IACjC,qCAAqC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAc,EAAE,aAAsB;IAC9E,IAAI,CAAC,aAAa,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACjD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,IAAI,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAClE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/tasks/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { type AppendSeverityAttestationOptions, appendSignedSeverityAttestation,
|
|
|
32
32
|
export { showTask, type TaskDetail, taskExists, taskShow, taskShowIvtrHistory, taskShowOperation, taskShowWithHistory, } from './show.js';
|
|
33
33
|
export { taskSyncLinks, taskSyncLinksRemove, taskSyncReconcile } from './sync-ops.js';
|
|
34
34
|
export { taskAnalyze, taskBatchValidate, taskBlockers, taskCancel, taskClaim, taskComplexityEstimate, taskDepends, taskDeps, taskDepsCycles, taskDepsOverview, taskDepsTree, taskDepsValidate, taskExport, taskHistory, taskImpact, taskImport, taskLint, taskNext, taskPromote, taskRelates, taskRelatesAdd, taskRelatesFind, taskRelatesRemove, taskReopen, taskReorder, taskReparent, taskRestore, taskSlice, taskStats, taskTree, taskUnarchive, taskUnclaim, } from './task-ops.js';
|
|
35
|
-
export { cacheEntryPath, captureDirtyFingerprint, captureHead, clearToolCache, computeCacheKey, type RunToolOptions, readCacheEntry, runToolCached, type ToolCacheEntry, type ToolRunResult, writeCacheEntry, } from './tool-cache.js';
|
|
35
|
+
export { cacheEntryPath, captureDirtyFingerprint, captureHead, clearToolCache, computeCacheKey, isEntryUsable, type RunToolOptions, readCacheEntry, runToolCached, TOOL_RUN_IDENTITY_FIELDS, type ToolCacheEntry, type ToolRunIdentity, type ToolRunResult, writeCacheEntry, } from './tool-cache.js';
|
|
36
36
|
export { type CanonicalTool, listValidToolNames, type ResolutionSource, type ResolvedToolCommand, type ResolveToolResult, resolveToolCommand, } from './tool-resolver.js';
|
|
37
37
|
export { type AcquireSlotOptions, acquireGlobalSlot, defaultMaxConcurrent, isHolderAlive, listSlotHolders, type ReleaseSlotFn, readHolder, reapOrphanedSlots, reapSlotIfOrphaned, resolveMaxConcurrent, type SlotHolder, semaphoreDir, } from './tool-semaphore.js';
|
|
38
38
|
export { taskUpdate, type UpdateTaskOptions, type UpdateTaskResult, updateTask } from './update.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,8BAA8B,EAC9B,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,OAAO,EACP,wB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uB,EACvB,WAAW,EACX,cAAc,EACd,eAAe,EACf,KAAK,cAAc,EACnB,cAAc,EACd,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,KAAK,aAAa,EAClB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,UAAU,EACf,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,4BAA4B,EAC5B,8BAA8B,EAC9B,qBAAqB,EACrB,QAAQ,EACR,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,OAAO,EACP,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cA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AAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,KAAK,aAAa,EAClB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,UAAU,EACf,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/tasks/index.js
CHANGED
|
@@ -42,7 +42,7 @@ export { showTask, taskExists, taskShow, taskShowIvtrHistory, taskShowOperation,
|
|
|
42
42
|
export { taskSyncLinks, taskSyncLinksRemove, taskSyncReconcile } from './sync-ops.js';
|
|
43
43
|
export { taskAnalyze, taskBatchValidate, taskBlockers, taskCancel, taskClaim, taskComplexityEstimate, taskDepends, taskDeps, taskDepsCycles, taskDepsOverview, taskDepsTree, taskDepsValidate, taskExport, taskHistory, taskImpact, taskImport, taskLint, taskNext, taskPromote, taskRelates, taskRelatesAdd, taskRelatesFind, taskRelatesRemove, taskReopen, taskReorder, taskReparent, taskRestore, taskSlice, taskStats, taskTree, taskUnarchive, taskUnclaim, } from './task-ops.js';
|
|
44
44
|
// Tool result cache + cross-process semaphore (T1534 / ADR-061)
|
|
45
|
-
export { cacheEntryPath, captureDirtyFingerprint, captureHead, clearToolCache, computeCacheKey, readCacheEntry, runToolCached, writeCacheEntry, } from './tool-cache.js';
|
|
45
|
+
export { cacheEntryPath, captureDirtyFingerprint, captureHead, clearToolCache, computeCacheKey, isEntryUsable, readCacheEntry, runToolCached, TOOL_RUN_IDENTITY_FIELDS, writeCacheEntry, } from './tool-cache.js';
|
|
46
46
|
// Project-agnostic tool resolution (T1534 / ADR-061)
|
|
47
47
|
export { listValidToolNames, resolveToolCommand, } from './tool-resolver.js';
|
|
48
48
|
// Cross-process global per-tool concurrency semaphore (T1534 / ADR-061)
|
package/dist/tasks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH,OAAO,EAGL,OAAO,EACP,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAIL,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EAIrB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,YAAY,EACZ,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,YAAY,EACZ,kBAAkB,EAClB,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,sEAAsE;AACtE,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACnF,kDAAkD;AAClD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,4EAA4E;AAC5E,OAAO,EAAiD,UAAU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AAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACvF,qEAAqE;AACrE,OAAO,EAEL,+BAA+B,EAC/B,wBAAwB,EACxB,8BAA8B,EAC9B,gBAAgB,EAChB,+BAA+B,GAEhC,MAAM,2BAA2B,CAAC;AACnC,oFAAoF;AACpF,OAAO,EACL,QAAQ,EAER,UAAU,EACV,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,uDAAuD;AACvD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,WAAW,EACX,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,WAAW,EACX,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,gEAAgE;AAChE,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH,OAAO,EAGL,OAAO,EACP,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,Y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