@dzhechkov/harness-core 0.3.125 → 0.3.127
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/.dz-manifest.json +62 -46
- package/README.md +3 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/parity.d.ts +67 -0
- package/dist/parity.d.ts.map +1 -0
- package/dist/parity.js +170 -0
- package/dist/parity.js.map +1 -0
- package/dist/release.d.ts +206 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +509 -0
- package/dist/release.js.map +1 -0
- package/dist/sign.d.ts.map +1 -1
- package/dist/sign.js +15 -7
- package/dist/sign.js.map +1 -1
- package/package.json +4 -4
- package/sbom.json +133 -93
- package/src/index.ts +42 -0
- package/src/parity.ts +211 -0
- package/src/release.ts +692 -0
- package/src/sign.ts +16 -7
package/src/sign.ts
CHANGED
|
@@ -113,23 +113,32 @@ export function checkManifestEntries(files: unknown): string | null {
|
|
|
113
113
|
return null;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Directory names that are NOT pack content and are excluded from BOTH walks. node_modules/.git:
|
|
118
|
+
* installed deps / VCS metadata. `.agentic-qe`/`.dz`: LOCAL RUNTIME STATE (learning DBs, RVF
|
|
119
|
+
* stores, witness keys) that background workers create inside pack cwds — gitignored, machine-
|
|
120
|
+
* specific, never shipped. Signing them made 19 packs verify green LOCALLY (files present, hashes
|
|
121
|
+
* match) and TAMPERED in CI (clean checkout lacks the gitignored state) — found live on GH run
|
|
122
|
+
* #103, 2026-07-19. State is not content; the walks must never see it.
|
|
123
|
+
*/
|
|
124
|
+
const EXCLUDED_DIRS = new Set(['node_modules', '.git', '.agentic-qe', '.dz']);
|
|
125
|
+
|
|
116
126
|
/** Every file under `root`, POSIX-relative, excluding the manifest and the SBOM themselves. */
|
|
117
127
|
export function listPackFiles(root: string): string[] {
|
|
118
128
|
const out: string[] = [];
|
|
119
129
|
const walk = (dir: string, rel: string): void => {
|
|
120
130
|
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
if (e.name === 'node_modules' || e.name === '.git') continue;
|
|
131
|
+
// Excluded dirs are unsigned territory BY DESIGN (see EXCLUDED_DIRS). The SIGN and VERIFY
|
|
132
|
+
// walks MUST share these exclusions: an asymmetry here false-TAMPERs every pnpm workspace
|
|
133
|
+
// pack whose node_modules holds symlinks (found live arming task #36 — 10 of 23 packs).
|
|
134
|
+
if (EXCLUDED_DIRS.has(e.name)) continue;
|
|
126
135
|
if (e.name === MANIFEST_NAME || e.name === SBOM_NAME) continue;
|
|
127
136
|
const abs = join(dir, e.name);
|
|
128
137
|
const r = rel ? rel + '/' + e.name : e.name;
|
|
129
138
|
if (e.isDirectory()) walk(abs, r);
|
|
130
139
|
// NOT else-isFile: a symlink (or other non-file) OUTSIDE the excluded dirs must stay VISIBLE to the
|
|
131
140
|
// verify sweep — it fails as "present but not signed" / "is a symlink" (R3-4: a smuggled symlink is a
|
|
132
|
-
// finding, not something to silently ignore). Only
|
|
141
|
+
// finding, not something to silently ignore). Only EXCLUDED_DIRS are exempt territory.
|
|
133
142
|
else out.push(r);
|
|
134
143
|
}
|
|
135
144
|
};
|
|
@@ -146,7 +155,7 @@ export function listSignablePackFiles(root: string): string[] {
|
|
|
146
155
|
const out: string[] = [];
|
|
147
156
|
const walk = (dir: string, rel: string): void => {
|
|
148
157
|
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
|
149
|
-
if (
|
|
158
|
+
if (EXCLUDED_DIRS.has(e.name)) continue;
|
|
150
159
|
if (e.name === MANIFEST_NAME || e.name === SBOM_NAME) continue;
|
|
151
160
|
const abs = join(dir, e.name);
|
|
152
161
|
const r = rel ? rel + '/' + e.name : e.name;
|