harness-everything 0.16.5 → 0.17.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +29 -0
- package/ci/mechanism-2ai-workspace-fingerprint-batch.test.js +11 -1
- package/ci/mechanism-2am-openai-packaged-helper-runtime.test.js +28 -0
- package/ci/mechanism-2an-environment-detection-readonly.test.js +113 -0
- package/ci/mechanism-2an-workflow-obligations.test.js +201 -0
- package/docs/workflows/environment-detection.md +15 -7
- package/environment-detection/SKILL.md +15 -16
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/kernel-router.js +14 -3
- package/harness-everything/scripts/self-heal.js +30 -8
- package/hooks/scripts/lib/workflow-obligations.js +316 -0
- package/hooks/scripts/lib/workflow-runtime.js +1 -1
- package/hooks/scripts/workflow-disposition.js +97 -5
- package/hooks/scripts/workflow-stop-gate.js +12 -4
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/lib/workflow-obligations.js +316 -0
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +1 -1
- package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +97 -5
- package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +12 -4
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/environment-detection/SKILL.md +15 -16
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +14 -3
- package/plugins/harness-everything/skills/harness-everything/scripts/self-heal.js +30 -8
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Self-healing installation audit for Harness OS.
|
|
4
4
|
*
|
|
5
|
-
* Audits the six platform integration touchpoints in the current workspace
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* Audits the six platform integration touchpoints in the current workspace.
|
|
6
|
+
* Read-only callers use --check. Repair mode is explicit: only a direct run
|
|
7
|
+
* without --check may delegate to the idempotent installer.
|
|
8
|
+
*
|
|
9
|
+
* environment-detection uses the read-only path; ordinary Discover/preflight
|
|
10
|
+
* must never backfill hooks or advisory files as a side effect.
|
|
11
11
|
*
|
|
12
12
|
* Usage:
|
|
13
13
|
* node self-heal.js Audit and repair anything missing.
|
|
@@ -24,7 +24,26 @@ const fs = require('fs');
|
|
|
24
24
|
const path = require('path');
|
|
25
25
|
const { execSync } = require('child_process');
|
|
26
26
|
const { getHarnessRoot, requireWorkspace } = require('./runtime-paths');
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
function resolveLocalRuntime(checkOnly) {
|
|
29
|
+
try {
|
|
30
|
+
const { getWorkspaceRoot, isHarnessRepo } = requireWorkspace();
|
|
31
|
+
return { getWorkspaceRoot, isHarnessRepo, harnessSourceDir: getHarnessRoot() };
|
|
32
|
+
} catch (err) {
|
|
33
|
+
const message = err && err.message ? err.message : String(err);
|
|
34
|
+
if (!/Harness runtime root not found/.test(message)) throw err;
|
|
35
|
+
|
|
36
|
+
if (checkOnly) {
|
|
37
|
+
console.log('[Harness Self-Heal Audit]');
|
|
38
|
+
console.log(' SKIPPED Local repair runtime unavailable on this distribution surface.');
|
|
39
|
+
console.log('\nRead-only audit skipped; no workspace files were changed.');
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.error('Cannot repair: local Harness installer/runtime is unavailable on this distribution surface.');
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
28
47
|
|
|
29
48
|
const MARKER = 'Harness OS Guidance (Advisory)';
|
|
30
49
|
const HOOK_ID = 'harness:pre:bootstrap';
|
|
@@ -194,8 +213,11 @@ function main() {
|
|
|
194
213
|
const checkOnly = process.argv.includes('--check');
|
|
195
214
|
const forceSelf = process.argv.includes('--force-self');
|
|
196
215
|
|
|
216
|
+
const runtime = resolveLocalRuntime(checkOnly);
|
|
217
|
+
if (!runtime) return;
|
|
218
|
+
|
|
219
|
+
const { getWorkspaceRoot, isHarnessRepo, harnessSourceDir } = runtime;
|
|
197
220
|
const workspaceRoot = getWorkspaceRoot();
|
|
198
|
-
const harnessSourceDir = getHarnessRoot();
|
|
199
221
|
const installerPath = path.join(harnessSourceDir, 'scripts', 'installer.js');
|
|
200
222
|
|
|
201
223
|
console.log(`Workspace: ${workspaceRoot}`);
|