@aperant/framework 0.8.7 → 0.9.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/CHANGELOG.md +74 -0
- package/agents/apt-pr-review-fixer.md +9 -4
- package/dist/cli/commands/init.mjs +140 -22
- package/dist/cli/commands/init.mjs.map +1 -1
- package/dist/cli/commands/toolchain-detect.d.mts.map +1 -1
- package/dist/cli/commands/toolchain-detect.mjs +44 -0
- package/dist/cli/commands/toolchain-detect.mjs.map +1 -1
- package/dist/cli/commands/triage.d.mts.map +1 -1
- package/dist/cli/commands/triage.mjs +346 -13
- package/dist/cli/commands/triage.mjs.map +1 -1
- package/dist/cli/commands/uninstall.d.mts.map +1 -1
- package/dist/cli/commands/uninstall.mjs +11 -8
- package/dist/cli/commands/uninstall.mjs.map +1 -1
- package/dist/cli/install/runtime-detect.d.mts +26 -0
- package/dist/cli/install/runtime-detect.d.mts.map +1 -1
- package/dist/cli/install/runtime-detect.mjs +27 -0
- package/dist/cli/install/runtime-detect.mjs.map +1 -1
- package/dist/cli/util/aperant-section.d.mts +12 -0
- package/dist/cli/util/aperant-section.d.mts.map +1 -1
- package/dist/cli/util/aperant-section.mjs +12 -0
- package/dist/cli/util/aperant-section.mjs.map +1 -1
- package/dist/cli/util/copy.d.mts +27 -0
- package/dist/cli/util/copy.d.mts.map +1 -1
- package/dist/cli/util/copy.mjs +49 -5
- package/dist/cli/util/copy.mjs.map +1 -1
- package/dist/cli/verify-proof/idl/index.d.mts +12 -1
- package/dist/cli/verify-proof/idl/index.d.mts.map +1 -1
- package/dist/cli/verify-proof/idl/index.mjs +50 -1
- package/dist/cli/verify-proof/idl/index.mjs.map +1 -1
- package/dist/cli/verify-proof/resolver.d.mts.map +1 -1
- package/dist/cli/verify-proof/resolver.mjs +51 -1
- package/dist/cli/verify-proof/resolver.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/apt-pr-review-fixer.md +9 -4
- package/dist/plugin/skills/apt-pr-review/SKILL.md +52 -15
- package/dist/plugin/skills/apt-setup/SKILL.md +7 -6
- package/dist/plugin/skills/apt-triage/SKILL.md +8 -6
- package/dist/plugin/skills/apt-update/SKILL.md +1 -1
- package/package.json +1 -1
- package/skills/apt-pr-review/SKILL.md +52 -15
- package/skills/apt-setup/SKILL.md +7 -6
- package/skills/apt-triage/SKILL.md +8 -6
- package/skills/apt-update/SKILL.md +1 -1
- package/src/cli/commands/init.mjs +144 -19
- package/src/cli/commands/toolchain-detect.mjs +44 -0
- package/src/cli/commands/triage.mjs +352 -11
- package/src/cli/commands/uninstall.mjs +11 -8
- package/src/cli/install/runtime-detect.mjs +27 -0
- package/src/cli/util/aperant-section.mjs +14 -0
- package/src/cli/util/copy.mjs +53 -8
- package/src/cli/verify-proof/idl/index.mjs +49 -11
- package/src/cli/verify-proof/resolver.mjs +49 -2
|
@@ -42,6 +42,18 @@ export function detectInstalledRuntimes(targetDir: string): RuntimeDescriptor[];
|
|
|
42
42
|
* capitalized form of `id`. Use for runtimes
|
|
43
43
|
* whose product branding differs from the
|
|
44
44
|
* internal id (C58: `kilo` → "Kilo Code").
|
|
45
|
+
* @property {string|null} nativeInstructionFile
|
|
46
|
+
* The root-level instruction file this
|
|
47
|
+
* runtime's native CLI reads (e.g. `claude`
|
|
48
|
+
* reads `CLAUDE.md`, `codex` reads
|
|
49
|
+
* `AGENTS.md`). `init` stamps the
|
|
50
|
+
* `<!-- APT:framework-* -->` managed block
|
|
51
|
+
* into every distinct non-null target for the
|
|
52
|
+
* selected runtimes. `null` means the runtime
|
|
53
|
+
* installs to its own surface (e.g. cursor →
|
|
54
|
+
* `.cursor/rules`), NOT a root `.md` — `init`
|
|
55
|
+
* skips null entries. Nullable by design, not
|
|
56
|
+
* a future-work placeholder (ID-01).
|
|
45
57
|
*/
|
|
46
58
|
/** @type {RuntimeDescriptor[]} */
|
|
47
59
|
export const RUNTIMES: RuntimeDescriptor[];
|
|
@@ -82,5 +94,19 @@ export type RuntimeDescriptor = {
|
|
|
82
94
|
* internal id (C58: `kilo` → "Kilo Code").
|
|
83
95
|
*/
|
|
84
96
|
displayLabel?: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The root-level instruction file this
|
|
99
|
+
* runtime's native CLI reads (e.g. `claude`
|
|
100
|
+
* reads `CLAUDE.md`, `codex` reads
|
|
101
|
+
* `AGENTS.md`). `init` stamps the
|
|
102
|
+
* `<!-- APT:framework-* -->` managed block
|
|
103
|
+
* into every distinct non-null target for the
|
|
104
|
+
* selected runtimes. `null` means the runtime
|
|
105
|
+
* installs to its own surface (e.g. cursor →
|
|
106
|
+
* `.cursor/rules`), NOT a root `.md` — `init`
|
|
107
|
+
* skips null entries. Nullable by design, not
|
|
108
|
+
* a future-work placeholder (ID-01).
|
|
109
|
+
*/
|
|
110
|
+
nativeInstructionFile: string | null;
|
|
85
111
|
};
|
|
86
112
|
//# sourceMappingURL=runtime-detect.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-detect.d.mts","sourceRoot":"","sources":["../../../src/cli/install/runtime-detect.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-detect.d.mts","sourceRoot":"","sources":["../../../src/cli/install/runtime-detect.mjs"],"names":[],"mappings":"AAuLA;;;;;GAKG;AACH,+BAHW,MAAM,GACJ,iBAAiB,GAAC,IAAI,CAIlC;AAED;;;;;;;;;GASG;AACH,2CAHW,MAAM,GACJ,MAAM,EAAE,CAcpB;AAED;;;;;;GAMG;AACH,mDAHW,MAAM,GACJ,iBAAiB,EAAE,CAc/B;AAxND;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,kCAAkC;AAClC,uBADW,iBAAiB,EAAE,CA8H5B;AAEF,0BAA0B;AAC1B,0BADW,GAAG,CAAC,MAAM,CAAC,CACuC;;;;;QA/J/C,MAAM;;;;UACN,MAAM;;;;;iBACN,MAAM;;;;;;aAEN,MAAM,EAAE;;;;;;;WAGR,MAAM,GAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;2BASX,MAAM,GAAC,IAAI"}
|
|
@@ -34,6 +34,18 @@ import { MANIFEST_FILENAME } from './manifest.mjs';
|
|
|
34
34
|
* capitalized form of `id`. Use for runtimes
|
|
35
35
|
* whose product branding differs from the
|
|
36
36
|
* internal id (C58: `kilo` → "Kilo Code").
|
|
37
|
+
* @property {string|null} nativeInstructionFile
|
|
38
|
+
* The root-level instruction file this
|
|
39
|
+
* runtime's native CLI reads (e.g. `claude`
|
|
40
|
+
* reads `CLAUDE.md`, `codex` reads
|
|
41
|
+
* `AGENTS.md`). `init` stamps the
|
|
42
|
+
* `<!-- APT:framework-* -->` managed block
|
|
43
|
+
* into every distinct non-null target for the
|
|
44
|
+
* selected runtimes. `null` means the runtime
|
|
45
|
+
* installs to its own surface (e.g. cursor →
|
|
46
|
+
* `.cursor/rules`), NOT a root `.md` — `init`
|
|
47
|
+
* skips null entries. Nullable by design, not
|
|
48
|
+
* a future-work placeholder (ID-01).
|
|
37
49
|
*/
|
|
38
50
|
/** @type {RuntimeDescriptor[]} */
|
|
39
51
|
export const RUNTIMES = Object.freeze([
|
|
@@ -43,6 +55,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
43
55
|
installRoot: '.claude',
|
|
44
56
|
markers: ['.claude/settings.json', '.claude/settings.local.json'],
|
|
45
57
|
cliId: 'claude-code',
|
|
58
|
+
nativeInstructionFile: 'CLAUDE.md',
|
|
46
59
|
},
|
|
47
60
|
{
|
|
48
61
|
id: 'codex',
|
|
@@ -50,6 +63,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
50
63
|
installRoot: '.agents',
|
|
51
64
|
markers: ['.codex/config.toml'],
|
|
52
65
|
cliId: 'codex',
|
|
66
|
+
nativeInstructionFile: 'AGENTS.md',
|
|
53
67
|
},
|
|
54
68
|
{
|
|
55
69
|
id: 'cursor',
|
|
@@ -57,6 +71,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
57
71
|
installRoot: '.cursor',
|
|
58
72
|
markers: ['.cursor/settings.json'],
|
|
59
73
|
cliId: 'cursor',
|
|
74
|
+
nativeInstructionFile: null,
|
|
60
75
|
},
|
|
61
76
|
{
|
|
62
77
|
id: 'gemini',
|
|
@@ -64,6 +79,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
64
79
|
installRoot: '.gemini',
|
|
65
80
|
markers: ['.gemini/settings.json'],
|
|
66
81
|
cliId: 'gemini-cli',
|
|
82
|
+
nativeInstructionFile: 'GEMINI.md',
|
|
67
83
|
},
|
|
68
84
|
{
|
|
69
85
|
id: 'opencode',
|
|
@@ -71,6 +87,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
71
87
|
installRoot: '.opencode',
|
|
72
88
|
markers: ['.opencode/config.json'],
|
|
73
89
|
cliId: 'opencode',
|
|
90
|
+
nativeInstructionFile: 'AGENTS.md',
|
|
74
91
|
},
|
|
75
92
|
{
|
|
76
93
|
id: 'pi',
|
|
@@ -78,6 +95,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
78
95
|
installRoot: '.pi',
|
|
79
96
|
markers: ['.pi/settings.json', '.pi/skills', '.pi/prompts'],
|
|
80
97
|
cliId: 'pi',
|
|
98
|
+
nativeInstructionFile: null,
|
|
81
99
|
},
|
|
82
100
|
{
|
|
83
101
|
id: 'kilo',
|
|
@@ -89,6 +107,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
89
107
|
// migration per spec ID-01). `--kilocode` is also accepted as a
|
|
90
108
|
// deprecated alias of `--kilo` at the CLI flag parser layer.
|
|
91
109
|
displayLabel: 'Kilo Code',
|
|
110
|
+
nativeInstructionFile: null,
|
|
92
111
|
},
|
|
93
112
|
{
|
|
94
113
|
id: 'copilot',
|
|
@@ -96,6 +115,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
96
115
|
installRoot: '.github/copilot',
|
|
97
116
|
markers: ['.github/copilot-instructions.md'],
|
|
98
117
|
cliId: 'copilot',
|
|
118
|
+
nativeInstructionFile: null,
|
|
99
119
|
},
|
|
100
120
|
{
|
|
101
121
|
id: 'antigravity',
|
|
@@ -103,6 +123,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
103
123
|
installRoot: '.antigravity',
|
|
104
124
|
markers: ['.antigravity/config.json'],
|
|
105
125
|
cliId: 'antigravity',
|
|
126
|
+
nativeInstructionFile: null,
|
|
106
127
|
},
|
|
107
128
|
{
|
|
108
129
|
id: 'windsurf',
|
|
@@ -110,6 +131,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
110
131
|
installRoot: '.windsurf',
|
|
111
132
|
markers: ['.windsurfrules'],
|
|
112
133
|
cliId: 'windsurf',
|
|
134
|
+
nativeInstructionFile: null,
|
|
113
135
|
},
|
|
114
136
|
{
|
|
115
137
|
id: 'augment',
|
|
@@ -117,6 +139,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
117
139
|
installRoot: '.augment',
|
|
118
140
|
markers: ['.augment/config.json'],
|
|
119
141
|
cliId: 'augment',
|
|
142
|
+
nativeInstructionFile: null,
|
|
120
143
|
},
|
|
121
144
|
{
|
|
122
145
|
id: 'trae',
|
|
@@ -124,6 +147,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
124
147
|
installRoot: '.trae',
|
|
125
148
|
markers: ['.trae/config.json'],
|
|
126
149
|
cliId: 'trae',
|
|
150
|
+
nativeInstructionFile: null,
|
|
127
151
|
},
|
|
128
152
|
{
|
|
129
153
|
id: 'qwen',
|
|
@@ -131,6 +155,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
131
155
|
installRoot: '.qwen',
|
|
132
156
|
markers: ['.qwen/config.json'],
|
|
133
157
|
cliId: 'qwen',
|
|
158
|
+
nativeInstructionFile: null,
|
|
134
159
|
},
|
|
135
160
|
{
|
|
136
161
|
id: 'cline',
|
|
@@ -138,6 +163,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
138
163
|
installRoot: '.cline',
|
|
139
164
|
markers: ['.cline/config.json'],
|
|
140
165
|
cliId: 'cline',
|
|
166
|
+
nativeInstructionFile: null,
|
|
141
167
|
},
|
|
142
168
|
{
|
|
143
169
|
id: 'codebuddy',
|
|
@@ -145,6 +171,7 @@ export const RUNTIMES = Object.freeze([
|
|
|
145
171
|
installRoot: '.codebuddy',
|
|
146
172
|
markers: ['.codebuddy/config.json'],
|
|
147
173
|
cliId: 'codebuddy',
|
|
174
|
+
nativeInstructionFile: null,
|
|
148
175
|
},
|
|
149
176
|
]);
|
|
150
177
|
/** @type {Set<string>} */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-detect.mjs","sourceRoot":"","sources":["../../../src/cli/install/runtime-detect.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD
|
|
1
|
+
{"version":3,"file":"runtime-detect.mjs","sourceRoot":"","sources":["../../../src/cli/install/runtime-detect.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,kCAAkC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC;QACC,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;QACjE,KAAK,EAAE,aAAa;QACpB,qBAAqB,EAAE,WAAW;KAClC;IACD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YAAY,CAAC;YAAE,SAAQ;QACvC,IAAI,CAAC;YACJ,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE;gBAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjD,CAAC;QAAC,MAAM,CAAC;YACR,0DAA0D;QAC3D,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC"}
|
|
@@ -31,4 +31,16 @@ export function buildAptSection({ canonicalRoot, targetDir, cli }: {
|
|
|
31
31
|
* @returns {string[]} Row IDs in file order, e.g. `['/apt', '/apt:quick', …]`.
|
|
32
32
|
*/
|
|
33
33
|
export function extractAptSectionRowIds(text: string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Matches the full APT managed block (start marker through end marker,
|
|
36
|
+
* inclusive). Exported so callers in the same package can reference a
|
|
37
|
+
* single source rather than inlining duplicate regex literals.
|
|
38
|
+
*
|
|
39
|
+
* `APT_SECTION_RE` — no trailing newline; used for in-place replace.
|
|
40
|
+
* `APT_SECTION_STRIP_RE` — includes optional trailing newline; used for
|
|
41
|
+
* strip operations that want to remove the newline
|
|
42
|
+
* the block was preceded/followed by.
|
|
43
|
+
*/
|
|
44
|
+
export const APT_SECTION_RE: RegExp;
|
|
45
|
+
export const APT_SECTION_STRIP_RE: RegExp;
|
|
34
46
|
//# sourceMappingURL=aperant-section.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aperant-section.d.mts","sourceRoot":"","sources":["../../../src/cli/util/aperant-section.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aperant-section.d.mts","sourceRoot":"","sources":["../../../src/cli/util/aperant-section.mjs"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;GAeG;AACH,mEAXG;IAAqB,aAAa,EAA1B,MAAM;IAGO,SAAS,EAAtB,MAAM;IACQ,GAAG;CAGzB,GAAU,MAAM,CAqClB;AAED;;;;;;;;;;GAUG;AACH,8CAHW,MAAM,GACJ,MAAM,EAAE,CAoBpB;AA5HD;;;;;;;;;GASG;AACH,oCAA8F;AAC9F,0CACoE"}
|
|
@@ -20,6 +20,18 @@ import { getTrustedSkillSources } from '../config/load.mjs';
|
|
|
20
20
|
import { discoverSkills } from '../route/skill-discover.mjs';
|
|
21
21
|
const SECTION_START = '<!-- APT:framework-start -->';
|
|
22
22
|
const SECTION_END = '<!-- APT:framework-end -->';
|
|
23
|
+
/**
|
|
24
|
+
* Matches the full APT managed block (start marker through end marker,
|
|
25
|
+
* inclusive). Exported so callers in the same package can reference a
|
|
26
|
+
* single source rather than inlining duplicate regex literals.
|
|
27
|
+
*
|
|
28
|
+
* `APT_SECTION_RE` — no trailing newline; used for in-place replace.
|
|
29
|
+
* `APT_SECTION_STRIP_RE` — includes optional trailing newline; used for
|
|
30
|
+
* strip operations that want to remove the newline
|
|
31
|
+
* the block was preceded/followed by.
|
|
32
|
+
*/
|
|
33
|
+
export const APT_SECTION_RE = /<!-- APT:framework-start -->[\s\S]*?<!-- APT:framework-end -->/;
|
|
34
|
+
export const APT_SECTION_STRIP_RE = /<!-- APT:framework-start -->[\s\S]*?<!-- APT:framework-end -->\n?/;
|
|
23
35
|
const SECTION_HEADING = '## Aperant Framework';
|
|
24
36
|
const APPENDIX_REL_PATH = ['templates', 'aperant-claude-md-appendix.md'];
|
|
25
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aperant-section.mjs","sourceRoot":"","sources":["../../../src/cli/util/aperant-section.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D,MAAM,aAAa,GAAG,8BAA8B,CAAA;AACpD,MAAM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I,CAAC,CAAA;IAEvE,OAAO,GAAG,aAAa,KAAK,IAAI,KAAK,WAAW,EAAE,CAAA;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAI;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAA;IAC5F,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAA;IACrB,2EAA2E;IAC3E,kFAAkF;IAClF,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAA;IACxD,MAAM,GAAG,GAAG,EAAE,CAAA;IACd,0EAA0E;IAC1E,sEAAsE;IACtE,uEAAuE;IACvE,sEAAsE;IACtE,MAAM,KAAK,GAAG,wCAAwC,CAAA;IACtD,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3B,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACd,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC"}
|
package/dist/cli/util/copy.d.mts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
export function copyDirRecursive(src: any, dest: any): void;
|
|
2
|
+
/**
|
|
3
|
+
* Preflight-only sibling of `injectInstructionFile`. Runs the same
|
|
4
|
+
* foreign-row defensive check against `filePath` but NEVER writes — used by
|
|
5
|
+
* the multi-target init flow to check every instruction target up-front so a
|
|
6
|
+
* single aborting target leaves NO file partially written (US-03 / AC3).
|
|
7
|
+
*
|
|
8
|
+
* Returns the same status vocabulary as `injectInstructionFile` minus the
|
|
9
|
+
* write side-effect: `'created'` (file absent → would be appended-to),
|
|
10
|
+
* `'updated'` (markers present, no foreign rows → would be replaced),
|
|
11
|
+
* `'aborted-foreign-rows'` (markers present with rows not in the generated
|
|
12
|
+
* set → init must abort). `force` short-circuits the foreign-row gate exactly
|
|
13
|
+
* as the writer does.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} filePath
|
|
16
|
+
* @param {Object} opts
|
|
17
|
+
* @param {string} opts.aptSection Output of buildAptSection().
|
|
18
|
+
* @param {boolean} [opts.force=false]
|
|
19
|
+
* Bypass the foreign-row check.
|
|
20
|
+
* @returns {{ status: 'created' | 'updated' | 'aborted-foreign-rows', foreignRowIds?: string[] }}
|
|
21
|
+
*/
|
|
22
|
+
export function checkInstructionFile(filePath: string, { aptSection, force }: {
|
|
23
|
+
aptSection: string;
|
|
24
|
+
force?: boolean | undefined;
|
|
25
|
+
}): {
|
|
26
|
+
status: "created" | "updated" | "aborted-foreign-rows";
|
|
27
|
+
foreignRowIds?: string[];
|
|
28
|
+
};
|
|
2
29
|
/**
|
|
3
30
|
* Write the (already-generated) APT section into `filePath`. Creates the
|
|
4
31
|
* file if missing; replaces the section in-place if the markers are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.d.mts","sourceRoot":"","sources":["../../../src/cli/util/copy.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"copy.d.mts","sourceRoot":"","sources":["../../../src/cli/util/copy.mjs"],"names":[],"mappings":"AAsCA,4DAWC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+CAPW,MAAM,yBAEd;IAAqB,UAAU,EAAvB,MAAM;IACS,KAAK;CAE5B,GAAU;IAAE,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,sBAAsB,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAgBhG;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,gDARW,MAAM,yBAEd;IAAqB,UAAU,EAAvB,MAAM;IAES,KAAK;CAE5B,GAAU;IAAE,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,sBAAsB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAqBlH"}
|
package/dist/cli/util/copy.mjs
CHANGED
|
@@ -12,7 +12,20 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, } from 'node:fs';
|
|
14
14
|
import { join } from 'node:path';
|
|
15
|
-
import { extractAptSectionRowIds } from './aperant-section.mjs';
|
|
15
|
+
import { APT_SECTION_RE, extractAptSectionRowIds } from './aperant-section.mjs';
|
|
16
|
+
/**
|
|
17
|
+
* Return the row IDs present in `existing` that are NOT present in
|
|
18
|
+
* `aptSection`. An empty array means no foreign rows (safe to overwrite).
|
|
19
|
+
*
|
|
20
|
+
* @param {string} existing Current on-disk file contents.
|
|
21
|
+
* @param {string} aptSection Output of buildAptSection().
|
|
22
|
+
* @returns {string[]}
|
|
23
|
+
*/
|
|
24
|
+
function computeForeignRowIds(existing, aptSection) {
|
|
25
|
+
const existingIds = new Set(extractAptSectionRowIds(existing));
|
|
26
|
+
const generatedIds = new Set(extractAptSectionRowIds(aptSection));
|
|
27
|
+
return [...existingIds].filter((id) => !generatedIds.has(id));
|
|
28
|
+
}
|
|
16
29
|
export function copyDirRecursive(src, dest) {
|
|
17
30
|
mkdirSync(dest, { recursive: true });
|
|
18
31
|
for (const entry of readdirSync(src, { withFileTypes: true })) {
|
|
@@ -26,6 +39,39 @@ export function copyDirRecursive(src, dest) {
|
|
|
26
39
|
}
|
|
27
40
|
}
|
|
28
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Preflight-only sibling of `injectInstructionFile`. Runs the same
|
|
44
|
+
* foreign-row defensive check against `filePath` but NEVER writes — used by
|
|
45
|
+
* the multi-target init flow to check every instruction target up-front so a
|
|
46
|
+
* single aborting target leaves NO file partially written (US-03 / AC3).
|
|
47
|
+
*
|
|
48
|
+
* Returns the same status vocabulary as `injectInstructionFile` minus the
|
|
49
|
+
* write side-effect: `'created'` (file absent → would be appended-to),
|
|
50
|
+
* `'updated'` (markers present, no foreign rows → would be replaced),
|
|
51
|
+
* `'aborted-foreign-rows'` (markers present with rows not in the generated
|
|
52
|
+
* set → init must abort). `force` short-circuits the foreign-row gate exactly
|
|
53
|
+
* as the writer does.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} filePath
|
|
56
|
+
* @param {Object} opts
|
|
57
|
+
* @param {string} opts.aptSection Output of buildAptSection().
|
|
58
|
+
* @param {boolean} [opts.force=false]
|
|
59
|
+
* Bypass the foreign-row check.
|
|
60
|
+
* @returns {{ status: 'created' | 'updated' | 'aborted-foreign-rows', foreignRowIds?: string[] }}
|
|
61
|
+
*/
|
|
62
|
+
export function checkInstructionFile(filePath, { aptSection, force = false }) {
|
|
63
|
+
const existing = existsSync(filePath) ? readFileSync(filePath, 'utf-8') : '';
|
|
64
|
+
if (existing.includes('<!-- APT:framework-start -->')) {
|
|
65
|
+
if (!force) {
|
|
66
|
+
const foreignRowIds = computeForeignRowIds(existing, aptSection);
|
|
67
|
+
if (foreignRowIds.length > 0) {
|
|
68
|
+
return { status: 'aborted-foreign-rows', foreignRowIds };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return { status: 'updated' };
|
|
72
|
+
}
|
|
73
|
+
return { status: 'created' };
|
|
74
|
+
}
|
|
29
75
|
/**
|
|
30
76
|
* Write the (already-generated) APT section into `filePath`. Creates the
|
|
31
77
|
* file if missing; replaces the section in-place if the markers are
|
|
@@ -50,14 +96,12 @@ export function injectInstructionFile(filePath, { aptSection, force = false }) {
|
|
|
50
96
|
const existing = existsSync(filePath) ? readFileSync(filePath, 'utf-8') : '';
|
|
51
97
|
if (existing.includes('<!-- APT:framework-start -->')) {
|
|
52
98
|
if (!force) {
|
|
53
|
-
const
|
|
54
|
-
const generatedIds = new Set(extractAptSectionRowIds(aptSection));
|
|
55
|
-
const foreignRowIds = [...existingIds].filter((id) => !generatedIds.has(id));
|
|
99
|
+
const foreignRowIds = computeForeignRowIds(existing, aptSection);
|
|
56
100
|
if (foreignRowIds.length > 0) {
|
|
57
101
|
return { status: 'aborted-foreign-rows', written: false, foreignRowIds };
|
|
58
102
|
}
|
|
59
103
|
}
|
|
60
|
-
const updated = existing.replace(
|
|
104
|
+
const updated = existing.replace(APT_SECTION_RE, aptSection);
|
|
61
105
|
writeFileSync(filePath, updated, 'utf-8');
|
|
62
106
|
return { status: 'updated', written: true };
|
|
63
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.mjs","sourceRoot":"","sources":["../../../src/cli/util/copy.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACN,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/
|
|
1
|
+
{"version":3,"file":"copy.mjs","sourceRoot":"","sources":["../../../src/cli/util/copy.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACN,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/E;;;;;;;GAOG;AACH,SAAS,oBAAoB,CAAC,QAAQ,EAAE,UAAU;IACjD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC9D,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAA;IACjE,OAAO,CAAC,GAAG,WAAW,CAA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M,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AAC5C,CAAC"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const ASSERTION_VERBS: readonly ["assert_visible", "assert_text", "assert_output", "assert_network"];
|
|
2
|
+
export const ASYNC_VERBS: readonly ["trigger", "await_signal"];
|
|
3
|
+
export const EVIDENCE_VERBS: readonly ["screenshot", "record_video", "capture_logs", "dump_state", "dom_dump"];
|
|
4
|
+
export const IDL_VERB_ARGS: Readonly<Record<string, {
|
|
5
|
+
readonly required: readonly string[];
|
|
6
|
+
readonly optional: readonly string[];
|
|
7
|
+
}>>;
|
|
8
|
+
export const IDL_VERB_NAMES: readonly string[];
|
|
9
|
+
export const INTERACTION_VERBS: readonly ["click", "type", "key", "navigate", "select", "upload_file", "drag_drop", "swipe", "switch_context", "execute_js", "wait_for_event", "wait_for_idle"];
|
|
10
|
+
export const isVerbResult: typeof import("@aperant/framework/driver-sdk").isVerbResult;
|
|
11
|
+
export const LIFECYCLE_VERBS: readonly ["launch", "teardown"];
|
|
12
|
+
export const validateVerbArgs: typeof import("@aperant/framework/driver-sdk").validateVerbArgs;
|
|
2
13
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/cli/verify-proof/idl/index.mjs"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/cli/verify-proof/idl/index.mjs"],"names":[],"mappings":"AAoDA,4GAAmD;AACnD,+DAA2C;AAC3C,+GAAiD;AACjD;;;IAA+C;AAC/C,+CAAiD;AACjD,gMAAuD;AACvD,uFAA6C;AAC7C,8DAAmD;AACnD,+FAAqD"}
|
|
@@ -8,6 +8,55 @@
|
|
|
8
8
|
* refactor of every callsite.
|
|
9
9
|
*
|
|
10
10
|
* If you add a verb, edit packages/framework/src/driver-sdk/idl.ts.
|
|
11
|
+
*
|
|
12
|
+
* Defense-in-depth (issue #248). `@aperant/framework/driver-sdk` resolves
|
|
13
|
+
* via the package `exports` map to `dist/driver-sdk/index.js`. A *static*
|
|
14
|
+
* `export … from '@aperant/framework/driver-sdk'` here made this barrel —
|
|
15
|
+
* and therefore the whole apt-tools CLI, since `dispatch.mjs` eagerly
|
|
16
|
+
* imports `driver-doctor.mjs` which imports this barrel — crash at
|
|
17
|
+
* module-resolution time with an opaque `ERR_MODULE_NOT_FOUND` when the
|
|
18
|
+
* dist was not built (e.g. a CI step that skipped `pnpm build`), before
|
|
19
|
+
* any command body could run. Resolving the registry via a *dynamic*
|
|
20
|
+
* `await import()` wrapped in try/catch keeps that dependency off the
|
|
21
|
+
* hard module-link path: dist present (tests, post-build CI, published
|
|
22
|
+
* tarball) → the REAL registry values are re-exported unchanged; dist
|
|
23
|
+
* absent → empty/no-op fallbacks let the CLI load (so commands that don't
|
|
24
|
+
* touch the IDL registry, like `route`, still run) instead of crashing.
|
|
11
25
|
*/
|
|
12
|
-
|
|
26
|
+
/** @type {typeof import('@aperant/framework/driver-sdk')} */
|
|
27
|
+
let _sdk;
|
|
28
|
+
try {
|
|
29
|
+
_sdk = await import('@aperant/framework/driver-sdk');
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
// Only the intended "dist not built" condition degrades. A corrupt or
|
|
33
|
+
// partially-written dist (SyntaxError, broken transitive load) raises a
|
|
34
|
+
// different code and MUST surface, not be masked into an empty registry.
|
|
35
|
+
if (err?.code !== 'ERR_MODULE_NOT_FOUND')
|
|
36
|
+
throw err;
|
|
37
|
+
// dist/driver-sdk absent — degrade to empty registry so module load
|
|
38
|
+
// does not crash. Any code path that actually needs a verb registry
|
|
39
|
+
// (driver-doctor, the bundled drivers) requires a built dist anyway;
|
|
40
|
+
// commands that don't (e.g. `route`) keep working.
|
|
41
|
+
_sdk = {
|
|
42
|
+
ASSERTION_VERBS: [],
|
|
43
|
+
ASYNC_VERBS: [],
|
|
44
|
+
EVIDENCE_VERBS: [],
|
|
45
|
+
IDL_VERB_ARGS: {},
|
|
46
|
+
IDL_VERB_NAMES: [],
|
|
47
|
+
INTERACTION_VERBS: [],
|
|
48
|
+
isVerbResult: () => false,
|
|
49
|
+
LIFECYCLE_VERBS: [],
|
|
50
|
+
validateVerbArgs: () => ({ ok: true, errors: [] }),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export const ASSERTION_VERBS = _sdk.ASSERTION_VERBS;
|
|
54
|
+
export const ASYNC_VERBS = _sdk.ASYNC_VERBS;
|
|
55
|
+
export const EVIDENCE_VERBS = _sdk.EVIDENCE_VERBS;
|
|
56
|
+
export const IDL_VERB_ARGS = _sdk.IDL_VERB_ARGS;
|
|
57
|
+
export const IDL_VERB_NAMES = _sdk.IDL_VERB_NAMES;
|
|
58
|
+
export const INTERACTION_VERBS = _sdk.INTERACTION_VERBS;
|
|
59
|
+
export const isVerbResult = _sdk.isVerbResult;
|
|
60
|
+
export const LIFECYCLE_VERBS = _sdk.LIFECYCLE_VERBS;
|
|
61
|
+
export const validateVerbArgs = _sdk.validateVerbArgs;
|
|
13
62
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/cli/verify-proof/idl/index.mjs"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/cli/verify-proof/idl/index.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6DAA6D;AAC7D,IAAI,IAAI,CAAA;AACR,IAAI,CAAC;IACJ,IAAI,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAA;AACrD,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACd,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,IAAI,GAAG,EAAE,IAAI,KAAK,sBAAsB;QAAE,MAAM,GAAG,CAAA;IACnD,oEAAoE;IACpE,oEAAoE;IACpE,qEAAqE;IACrE,mDAAmD;IACnD,IAAI,GAAG;QACN,eAAe,EAAE,EAAE;QACnB,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,EAAE;QAClB,aAAa,EAAE,EAAE;QACjB,cAAc,EAAE,EAAE;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK;QACzB,eAAe,EAAE,EAAE;QACnB,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;KAClD,CAAA;AACF,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;AAC3C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAA;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;AACjD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAA;AACvD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAA;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.mts","sourceRoot":"","sources":["../../../src/cli/verify-proof/resolver.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolver.d.mts","sourceRoot":"","sources":["../../../src/cli/verify-proof/resolver.mjs"],"names":[],"mappings":"AAyFA;;;;;;;GAOG;AACH,sCALW,cAAc,GA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AAO,+BAA+B,EAAE,cAAc;kCACtD,OAAO,sBAAsB,EAAE,mBAAmB"}
|
|
@@ -29,11 +29,61 @@
|
|
|
29
29
|
*
|
|
30
30
|
* Existing `resolveDriver()` and `scoreDriver()` exports are unchanged.
|
|
31
31
|
*/
|
|
32
|
-
import { UnsatisfiedRequiredCapabilityError } from '@aperant/framework/driver-sdk';
|
|
33
32
|
/**
|
|
34
33
|
* @typedef {import('@aperant/framework/driver-sdk').DriverManifest} DriverManifest
|
|
35
34
|
* @typedef {import('./runtime-detect.mjs').RuntimeCapabilities} RuntimeCapabilities
|
|
36
35
|
*/
|
|
36
|
+
/**
|
|
37
|
+
* Defense-in-depth (issue #248). The driver-sdk error class lives in
|
|
38
|
+
* `@aperant/framework/driver-sdk`, whose `exports` map resolves to
|
|
39
|
+
* `dist/driver-sdk/index.js`. An eager *static* top-level
|
|
40
|
+
* `import { UnsatisfiedRequiredCapabilityError } from '@aperant/framework/driver-sdk'`
|
|
41
|
+
* made the WHOLE apt-tools CLI crash at module-resolution time when the
|
|
42
|
+
* dist was not built (e.g. a CI step that skipped `pnpm build`): the
|
|
43
|
+
* static import is resolved at module-link, so an opaque
|
|
44
|
+
* `ERR_MODULE_NOT_FOUND` was raised before any command body — or any
|
|
45
|
+
* `--no-fail` downgrade in run-route-eval.mjs — could run.
|
|
46
|
+
*
|
|
47
|
+
* We instead resolve the class via a *dynamic* `await import()` that is
|
|
48
|
+
* wrapped in try/catch. Dynamic import is still evaluated at module
|
|
49
|
+
* load (top-level await), but its failure is now swallowable rather than
|
|
50
|
+
* a hard link-time crash:
|
|
51
|
+
* - dist present (tests, post-build CI, published tarball) → the REAL
|
|
52
|
+
* class is bound, so any thrown error stays
|
|
53
|
+
* `instanceof UnsatisfiedRequiredCapabilityError` for every consumer
|
|
54
|
+
* (including the resolver suites that import the class from the same
|
|
55
|
+
* `@aperant/framework/driver-sdk` ESM specifier);
|
|
56
|
+
* - dist absent → we fall back to a structurally identical local class
|
|
57
|
+
* (same `.name` / `.capability` / `.attempts` shape, which
|
|
58
|
+
* `detect-runtime.mjs` inspects via `.attempts`) so the CLI degrades
|
|
59
|
+
* to a clear, catchable error instead of crashing at load.
|
|
60
|
+
*
|
|
61
|
+
* `resolveDriver` stays fully synchronous — the class is already bound by
|
|
62
|
+
* the time any importer of this module finishes linking.
|
|
63
|
+
*
|
|
64
|
+
* @type {new (message: string, capability?: string, attempts?: ReadonlyArray<{driver_id: string, reason: string}>) => Error}
|
|
65
|
+
*/
|
|
66
|
+
let UnsatisfiedRequiredCapabilityError;
|
|
67
|
+
try {
|
|
68
|
+
;
|
|
69
|
+
({ UnsatisfiedRequiredCapabilityError } = await import('@aperant/framework/driver-sdk'));
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
// Only the intended "dist not built" condition degrades. A corrupt or
|
|
73
|
+
// partially-written dist (SyntaxError, broken transitive load) raises a
|
|
74
|
+
// different code and MUST surface, not be masked into a silent fallback.
|
|
75
|
+
if (err?.code !== 'ERR_MODULE_NOT_FOUND')
|
|
76
|
+
throw err;
|
|
77
|
+
// dist/driver-sdk absent — degrade instead of crashing the CLI.
|
|
78
|
+
UnsatisfiedRequiredCapabilityError = class UnsatisfiedRequiredCapabilityError extends Error {
|
|
79
|
+
constructor(message, capability, attempts = []) {
|
|
80
|
+
super(message);
|
|
81
|
+
this.name = 'UnsatisfiedRequiredCapabilityError';
|
|
82
|
+
this.capability = capability;
|
|
83
|
+
this.attempts = attempts;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
37
87
|
const STABILITY_RANK = { ga: 3, beta: 2, experimental: 1 };
|
|
38
88
|
const LOCALITY_RANK = { bundled: 3, user: 2, registry: 1 };
|
|
39
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.mjs","sourceRoot":"","sources":["../../../src/cli/verify-proof/resolver.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8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AAO,CAAA;IACjC,CAAC;IACD,IAAI,IAAI,KAAK,UAAU;QAAE,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IAC3D,OAAO,MAAM,CAAA;AACd,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aperant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "AI coding framework — composable skills for planning, executing, verifying, and reviewing code with any LLM provider. Works as Claude Code commands, Codex tasks, or programmatically.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Mikalsen AI",
|
|
@@ -71,9 +71,14 @@ The only valid reasons to skip a finding:
|
|
|
71
71
|
|
|
72
72
|
## Coordination Protocol
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
**Fixers run SEQUENTIALLY, never concurrently (FRAMEWORK-BUG-006).** At most one fixer touches the
|
|
75
|
+
shared worktree at any moment — the orchestrator spawns fixer-1, waits for it to return and audits it,
|
|
76
|
+
THEN spawns fixer-2, and so on. You are the ONLY fixer touching this worktree right now. `[PARALLEL_FIXERS]`
|
|
77
|
+
is always `false`; do NOT assume a sibling fixer is editing, staging, or committing at the same time.
|
|
78
|
+
Concurrent `git add`/`git commit` against a shared index either sweeps another fixer's staged files
|
|
79
|
+
into your commit or clobbers their working-tree edits — which is exactly the race this rule prevents.
|
|
80
|
+
|
|
81
|
+
1. **Only edit files in your `[FIX_ASSIGNMENT]`** — do NOT touch files outside your assigned group (the grouping keeps fixes scoped and the history clean)
|
|
77
82
|
2. **If a finding spans files across groups** — fix only the parts in your group, note the cross-group dependency in your report
|
|
78
83
|
3. **If you discover NEW issues** while fixing — note them in your report but do NOT fix them (they aren't validated)
|
|
79
84
|
|
|
@@ -89,7 +94,7 @@ Findings with severity `critical`:
|
|
|
89
94
|
|
|
90
95
|
## Report Format
|
|
91
96
|
|
|
92
|
-
Write to `[REVIEW_DIR]/iterations/[N]/fixes-applied-[FIXER_NAME].md` (BUG-030 canonical naming — the audit gate resolves `fixes-applied-${FIXER_NAME}.md` ahead of the legacy `fixes-applied.md
|
|
97
|
+
Write to `[REVIEW_DIR]/iterations/[N]/fixes-applied-[FIXER_NAME].md` (BUG-030 canonical naming — the audit gate resolves `fixes-applied-${FIXER_NAME}.md` ahead of the legacy `fixes-applied.md`. Each fixer owns its own report file; this per-fixer path stays correct now that fixers run sequentially — FRAMEWORK-BUG-006):
|
|
93
98
|
|
|
94
99
|
```markdown
|
|
95
100
|
# Fix Report — Iteration [N]
|