@miller-tech/uap 1.191.0 → 1.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/deliver.d.ts.map +1 -1
- package/dist/cli/deliver.js +24 -0
- package/dist/cli/deliver.js.map +1 -1
- package/dist/delivery/deletion-notice.d.ts +51 -0
- package/dist/delivery/deletion-notice.d.ts.map +1 -0
- package/dist/delivery/deletion-notice.js +119 -0
- package/dist/delivery/deletion-notice.js.map +1 -0
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
- package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
- package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warn when a mission is asking deliver to DELETE files, which it cannot do.
|
|
3
|
+
*
|
|
4
|
+
* THE FAILURE THIS CATCHES
|
|
5
|
+
* The executor has no delete tool, and `run_bash` is off unless --allow-bash.
|
|
6
|
+
* So a model told to remove a file has exactly one move available: overwrite it
|
|
7
|
+
* with a stub. That is worse than failing, because it half-works.
|
|
8
|
+
*
|
|
9
|
+
* Observed live on 2026-08-10, in a run whose instruction began "Clean up nested
|
|
10
|
+
* architecture: remove src/rust-pg-ext/src/contracts.rs, cooccurrence.rs,
|
|
11
|
+
* hash.rs, slope.rs, sr_lookup…":
|
|
12
|
+
*
|
|
13
|
+
* r7 write_file contracts.rs -> refused (anti-gutting)
|
|
14
|
+
* r8 edit_file contracts.rs -> OK -> cargo check now FAILING
|
|
15
|
+
* r10 edit_file sr_lookup/mod.rs -> OK -> cargo check now FAILING
|
|
16
|
+
* r12 edit_file sr_lookup.rs -> refused (anti-gutting)
|
|
17
|
+
* Turn 1: 20% of gates (435s)
|
|
18
|
+
*
|
|
19
|
+
* The anti-gutting predicate only fires on files of 1500 bytes or more, so the
|
|
20
|
+
* SMALL files were successfully replaced with `// REMOVED` — breaking the build
|
|
21
|
+
* — while the large ones were refused, leaving the job half-done. Neither
|
|
22
|
+
* outcome can reach green, so the run burns its turns and leaves the tree worse
|
|
23
|
+
* than it found it.
|
|
24
|
+
*
|
|
25
|
+
* Deleting a file needs no convergence: there is nothing to author and nothing
|
|
26
|
+
* for a gate to judge. The project's own routing guidance already says so —
|
|
27
|
+
* "deleting or renaming files … are not gated — make them directly" — but
|
|
28
|
+
* nothing said it at the point where it matters, which is when a deletion
|
|
29
|
+
* mission is launched.
|
|
30
|
+
*
|
|
31
|
+
* ADVISORY, and narrow by construction. It fires only when a deletion verb is
|
|
32
|
+
* followed by an actual path, so "remove the unused import from src/a.rs" —
|
|
33
|
+
* an edit, whose object is the import — does not trigger it.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Paths the instruction asks to DELETE, in first-seen order.
|
|
37
|
+
*
|
|
38
|
+
* Only paths that exist under `projectRoot` are returned: a mission naming a
|
|
39
|
+
* file that is already gone needs no warning, and a path that never existed is
|
|
40
|
+
* more likely prose than a target.
|
|
41
|
+
*/
|
|
42
|
+
export declare function deletionTargets(instruction: string, projectRoot: string, exists?: (p: string) => boolean): string[];
|
|
43
|
+
/**
|
|
44
|
+
* The notice, or null when the mission is not asking for deletions.
|
|
45
|
+
*
|
|
46
|
+
* Says what deliver will DO if it proceeds, not merely that it should not —
|
|
47
|
+
* the stub-and-break outcome is the part a model needs to recognise, because
|
|
48
|
+
* overwriting the file is the move it will otherwise reach for.
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatDeletionNotice(targets: readonly string[]): string | null;
|
|
51
|
+
//# sourceMappingURL=deletion-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deletion-notice.d.ts","sourceRoot":"","sources":["../../src/delivery/deletion-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAkBH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAoB,GAC1C,MAAM,EAAE,CAmCV;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAgB9E"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warn when a mission is asking deliver to DELETE files, which it cannot do.
|
|
3
|
+
*
|
|
4
|
+
* THE FAILURE THIS CATCHES
|
|
5
|
+
* The executor has no delete tool, and `run_bash` is off unless --allow-bash.
|
|
6
|
+
* So a model told to remove a file has exactly one move available: overwrite it
|
|
7
|
+
* with a stub. That is worse than failing, because it half-works.
|
|
8
|
+
*
|
|
9
|
+
* Observed live on 2026-08-10, in a run whose instruction began "Clean up nested
|
|
10
|
+
* architecture: remove src/rust-pg-ext/src/contracts.rs, cooccurrence.rs,
|
|
11
|
+
* hash.rs, slope.rs, sr_lookup…":
|
|
12
|
+
*
|
|
13
|
+
* r7 write_file contracts.rs -> refused (anti-gutting)
|
|
14
|
+
* r8 edit_file contracts.rs -> OK -> cargo check now FAILING
|
|
15
|
+
* r10 edit_file sr_lookup/mod.rs -> OK -> cargo check now FAILING
|
|
16
|
+
* r12 edit_file sr_lookup.rs -> refused (anti-gutting)
|
|
17
|
+
* Turn 1: 20% of gates (435s)
|
|
18
|
+
*
|
|
19
|
+
* The anti-gutting predicate only fires on files of 1500 bytes or more, so the
|
|
20
|
+
* SMALL files were successfully replaced with `// REMOVED` — breaking the build
|
|
21
|
+
* — while the large ones were refused, leaving the job half-done. Neither
|
|
22
|
+
* outcome can reach green, so the run burns its turns and leaves the tree worse
|
|
23
|
+
* than it found it.
|
|
24
|
+
*
|
|
25
|
+
* Deleting a file needs no convergence: there is nothing to author and nothing
|
|
26
|
+
* for a gate to judge. The project's own routing guidance already says so —
|
|
27
|
+
* "deleting or renaming files … are not gated — make them directly" — but
|
|
28
|
+
* nothing said it at the point where it matters, which is when a deletion
|
|
29
|
+
* mission is launched.
|
|
30
|
+
*
|
|
31
|
+
* ADVISORY, and narrow by construction. It fires only when a deletion verb is
|
|
32
|
+
* followed by an actual path, so "remove the unused import from src/a.rs" —
|
|
33
|
+
* an edit, whose object is the import — does not trigger it.
|
|
34
|
+
*/
|
|
35
|
+
import { existsSync } from 'fs';
|
|
36
|
+
import { isAbsolute, join } from 'path';
|
|
37
|
+
import { mentionedPaths } from './scope-notice.js';
|
|
38
|
+
/** Verbs that mean "make this file cease to exist". */
|
|
39
|
+
const DELETE_VERB = /\b(?:delete|remove|drop|rm|get rid of)\b/gi;
|
|
40
|
+
/**
|
|
41
|
+
* Words that may sit between the verb and its object without changing it —
|
|
42
|
+
* articles and the noun for a file. Anything else (notably a preposition like
|
|
43
|
+
* "from" or "in") means the path is a LOCATION, not the thing being removed.
|
|
44
|
+
*/
|
|
45
|
+
const FILLER = new Set(['the', 'a', 'an', 'these', 'this', 'those', 'that',
|
|
46
|
+
'file', 'files', 'module', 'modules', 'now', 'also', 'old', 'unused',
|
|
47
|
+
'duplicate', 'dead', 'stale', 'legacy', 'redundant']);
|
|
48
|
+
/**
|
|
49
|
+
* Paths the instruction asks to DELETE, in first-seen order.
|
|
50
|
+
*
|
|
51
|
+
* Only paths that exist under `projectRoot` are returned: a mission naming a
|
|
52
|
+
* file that is already gone needs no warning, and a path that never existed is
|
|
53
|
+
* more likely prose than a target.
|
|
54
|
+
*/
|
|
55
|
+
export function deletionTargets(instruction, projectRoot, exists = existsSync) {
|
|
56
|
+
const known = new Set(mentionedPaths(instruction));
|
|
57
|
+
if (known.size === 0)
|
|
58
|
+
return [];
|
|
59
|
+
const out = [];
|
|
60
|
+
const seen = new Set();
|
|
61
|
+
for (const m of instruction.matchAll(DELETE_VERB)) {
|
|
62
|
+
// Walk forward from the verb: filler may intervene, a path ends the walk,
|
|
63
|
+
// and anything else means this verb governs something that is not a file.
|
|
64
|
+
const after = instruction.slice(m.index + m[0].length);
|
|
65
|
+
const tokens = after.split(/[\s,;]+/).filter(Boolean);
|
|
66
|
+
// No cap on how far to walk: the FILLER list is what discriminates, and
|
|
67
|
+
// any non-filler word ends the walk on the next line. A separate distance
|
|
68
|
+
// limit was indistinguishable by any test and could only cause a real
|
|
69
|
+
// target to be missed after a long run of adjectives.
|
|
70
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
71
|
+
const tok = tokens[i].replace(/^[*_`("']+/, '').replace(/[*_`)."',;:]+$/, '');
|
|
72
|
+
if (!tok)
|
|
73
|
+
continue;
|
|
74
|
+
if (known.has(tok)) {
|
|
75
|
+
// A comma-separated run after the verb is all one list of targets:
|
|
76
|
+
// "remove a.rs, b.rs, c.rs". Take every path until a non-path word.
|
|
77
|
+
for (let j = i; j < tokens.length; j++) {
|
|
78
|
+
const t = tokens[j].replace(/^[*_`("']+/, '').replace(/[*_`)."',;:]+$/, '');
|
|
79
|
+
if (!known.has(t))
|
|
80
|
+
break;
|
|
81
|
+
if (!seen.has(t)) {
|
|
82
|
+
seen.add(t);
|
|
83
|
+
out.push(t);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if (!FILLER.has(tok.toLowerCase()))
|
|
89
|
+
break; // the verb governs something else
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return out.filter((p) => !isAbsolute(p) && exists(join(projectRoot, p)));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The notice, or null when the mission is not asking for deletions.
|
|
96
|
+
*
|
|
97
|
+
* Says what deliver will DO if it proceeds, not merely that it should not —
|
|
98
|
+
* the stub-and-break outcome is the part a model needs to recognise, because
|
|
99
|
+
* overwriting the file is the move it will otherwise reach for.
|
|
100
|
+
*/
|
|
101
|
+
export function formatDeletionNotice(targets) {
|
|
102
|
+
if (targets.length === 0)
|
|
103
|
+
return null;
|
|
104
|
+
const list = targets.map((t) => ` - ${t}`).join('\n');
|
|
105
|
+
return [
|
|
106
|
+
'DELETION NOTICE — this task asks for files to be REMOVED, which this run cannot do.',
|
|
107
|
+
list,
|
|
108
|
+
'',
|
|
109
|
+
'There is no delete tool here, and the shell is unavailable unless the operator',
|
|
110
|
+
'enabled it. Overwriting a file with a stub is NOT deleting it: for a small file',
|
|
111
|
+
'the write succeeds and the build breaks on the missing module, and for a large',
|
|
112
|
+
'one it is refused as gutting — so the job ends half-done either way.',
|
|
113
|
+
'',
|
|
114
|
+
'Deleting a file needs no convergence and is NOT gated: do it directly with the',
|
|
115
|
+
'shell (`rm <path>`), remove the references that point at it, and verify with the',
|
|
116
|
+
"project's own build. Then use this run only for the parts that need authoring.",
|
|
117
|
+
].join('\n');
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=deletion-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deletion-notice.js","sourceRoot":"","sources":["../../src/delivery/deletion-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,uDAAuD;AACvD,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IACxE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ;IACpE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,W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