voidmachine 5.0.0 → 5.0.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "VoidCorp universal craftsman skills (void-tdd, void-typescript-strict, void-hexagonal-architecture, void-domain-driven-design, void-functional, void-code-review, void-api-and-interface-design, void-source-driven-development, void-context, void-learn, void-decide, void-claude-md, void-observability, void-security-guidance, ...) plus 12 PreToolUse enforcement hooks (tdd-guard, no-any, protect-sensitive-files, block-dangerous-bash, no-ai-design-slop, ...) and PostToolUse/SessionStart lifecycle hooks (incl. trim-large-output token frugality), five read-only critics including doctrine-critic, native architecture/security/QA specialists, and the void-graph, void-doctor and void-audit gestures, which are skills like everything else.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "VoidCorp",
|
|
@@ -7914,7 +7914,7 @@ function projectPath(root, path2) {
|
|
|
7914
7914
|
const relativePath = relative(resolve2(root), absolute).replaceAll("\\", "/");
|
|
7915
7915
|
return relativePath === ".." || relativePath.startsWith("../") || isAbsolute(relativePath) ? void 0 : relativePath;
|
|
7916
7916
|
}
|
|
7917
|
-
function protectedReason(path2, root) {
|
|
7917
|
+
function protectedReason(path2, root, shellWrite) {
|
|
7918
7918
|
if (root !== void 0) {
|
|
7919
7919
|
const relativePath = projectPath(root, path2);
|
|
7920
7920
|
if (relativePath !== void 0 && !isCoOwned(relativePath) && manifestOwnedPaths(root).has(relativePath)) {
|
|
@@ -7930,7 +7930,10 @@ function protectedReason(path2, root) {
|
|
|
7930
7930
|
return "private key / certificate";
|
|
7931
7931
|
}
|
|
7932
7932
|
if (/(?:\.npmrc|\.netrc|\.pgpass)$/.test(base)) return "credential file";
|
|
7933
|
-
|
|
7933
|
+
const sourceTest = /\.(?:test|spec)\.(?:[cm]?[jt]s|[jt]sx)$/.test(base);
|
|
7934
|
+
if (!base.endsWith(".md") && (!sourceTest || shellWrite) && /(?:secret|credential)/.test(base)) {
|
|
7935
|
+
return sourceTest && shellWrite ? "credential-named source test with unavailable shell content; use Write/Edit or apply_patch" : "credential file";
|
|
7936
|
+
}
|
|
7934
7937
|
if ((/* @__PURE__ */ new Set([
|
|
7935
7938
|
"package-lock.json",
|
|
7936
7939
|
"pnpm-lock.yaml",
|
|
@@ -7948,7 +7951,7 @@ function protectedReason(path2, root) {
|
|
|
7948
7951
|
}
|
|
7949
7952
|
function protectedFile(paths, options = {}) {
|
|
7950
7953
|
for (const path2 of paths) {
|
|
7951
|
-
const reason = protectedReason(path2, options.root);
|
|
7954
|
+
const reason = protectedReason(path2, options.root, options.shellWritePaths?.includes(path2) ?? false);
|
|
7952
7955
|
if (reason !== void 0) {
|
|
7953
7956
|
const learn = reason.includes("void-learn") ? " Use void-learn to capture the missing harness capability." : "";
|
|
7954
7957
|
return block("PROTECTED_FILE", `refusing to edit ${path2}.${learn}`, [`${path2}: ${reason}`]);
|
|
@@ -7972,6 +7975,7 @@ var HIGH_CONFIDENCE = [
|
|
|
7972
7975
|
var GENERIC_ASSIGNMENT = /(?:_KEY|_SECRET|_TOKEN|_PASSWORD|_PASSWD|_APIKEY)["' ]*[:=]\s*["']([A-Za-z0-9+/=_-]{24,})["']/i;
|
|
7973
7976
|
var PLACEHOLDER = /process\.env|import\.meta\.env|xxx|changeme|example|redacted|your[-_]|<[a-z]|placeholder|todo/i;
|
|
7974
7977
|
var EXEMPT_PATH = /\.(?:test|spec)\.|\/__tests__\/|\/__fixtures__\/|\/fixtures\/|\/__generated__\//;
|
|
7978
|
+
var CREDENTIAL_SOURCE_TEST = /(?:secret|credential)[^/]*\.(?:test|spec)\.(?:[cm]?[jt]s|[jt]sx)$/i;
|
|
7975
7979
|
function lineHasSecret(line) {
|
|
7976
7980
|
if (line.includes("allow-secret-pattern:")) return false;
|
|
7977
7981
|
if (HIGH_CONFIDENCE.some((pattern2) => pattern2.test(line))) return true;
|
|
@@ -7986,7 +7990,8 @@ function lineHasSecret(line) {
|
|
|
7986
7990
|
function secretContent(edits) {
|
|
7987
7991
|
const evidence = [];
|
|
7988
7992
|
for (const edit of edits) {
|
|
7989
|
-
|
|
7993
|
+
const path2 = edit.path.replaceAll("\\", "/");
|
|
7994
|
+
if (EXEMPT_PATH.test(path2) && !CREDENTIAL_SOURCE_TEST.test(path2)) continue;
|
|
7990
7995
|
edit.addedContent.split(/\r?\n/).forEach((line, index) => {
|
|
7991
7996
|
if (lineHasSecret(line)) evidence.push(`${edit.path}:${index + 1}`);
|
|
7992
7997
|
});
|
|
@@ -8876,7 +8881,8 @@ function evaluateRule(rule, rawInput, options) {
|
|
|
8876
8881
|
if (rule === "protected-file") {
|
|
8877
8882
|
if (productSetting(env, "ALLOW_SECRET_EDIT") === "1") return allow("OVERRIDE", "one-shot override");
|
|
8878
8883
|
const ownership = options.source === "checked-out" ? {} : { root: options.root };
|
|
8879
|
-
|
|
8884
|
+
const shellWritePaths = call.tool === "Bash" || call.tool === "shell" ? shellWriteTargets(call.command) : [];
|
|
8885
|
+
return protectedFile(call.edits.map((edit) => edit.path), { ...ownership, shellWritePaths });
|
|
8880
8886
|
}
|
|
8881
8887
|
if (rule === "secret-content") return secretContent(call.edits);
|
|
8882
8888
|
if (rule === "control-character") return controlCharacter(call.edits);
|
package/dist/main.js
CHANGED
|
@@ -67817,7 +67817,7 @@ async function recordSpecialistRequests(root, missionId, envelopes, planHash) {
|
|
|
67817
67817
|
init_esm_shims();
|
|
67818
67818
|
|
|
67819
67819
|
// package.json
|
|
67820
|
-
var version2 = "5.0.
|
|
67820
|
+
var version2 = "5.0.1";
|
|
67821
67821
|
|
|
67822
67822
|
// src/lib/runs/verify.ts
|
|
67823
67823
|
var MAX_CAPTURE_BYTES = 64 * 1024;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voidmachine",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "void-machine CLI — install an opinionated engineering doctrine on any project; render deterministic project health. Run via `npx voidmachine`; command: void-machine (alias vm).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Folpe @ VoidCorp",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"ws": "8.21.0",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
60
|
"zod": "^4.6.5",
|
|
61
|
-
"@voidcorp/harness-graph": "5.0.
|
|
62
|
-
"@voidcorp/hook-runner": "0.0.0",
|
|
61
|
+
"@voidcorp/harness-graph": "5.0.1",
|
|
63
62
|
"@voidcorp/void-machine": "0.0.0",
|
|
63
|
+
"@voidcorp/hook-runner": "0.0.0",
|
|
64
64
|
"@voidcorp/mission-engine": "0.0.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|