@hallucination-studio/harness-engine 1.0.0-beta.16.565063c → 1.0.0-beta.17.412ec6e
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/README.md
CHANGED
|
@@ -74,13 +74,13 @@ Install into a custom skills directory:
|
|
|
74
74
|
npx @hallucination-studio/harness-engine install --path /path/to/skills
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Replace an existing installed
|
|
77
|
+
Replace an existing installed skill:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
npx @hallucination-studio/harness-engine install --local --force
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
Show where the
|
|
83
|
+
Show where the skill would be installed:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
86
|
npx @hallucination-studio/harness-engine where --local
|
|
@@ -104,8 +104,8 @@ prose with its concrete product style before substantial UI work.
|
|
|
104
104
|
|
|
105
105
|
## Update An Installed Skill Package
|
|
106
106
|
|
|
107
|
-
The `npx` installer installs or replaces the Codex
|
|
108
|
-
To update an already installed
|
|
107
|
+
The `npx` installer installs or replaces the `harness-engine` Codex skill.
|
|
108
|
+
To update an already installed skill, rerun `install` with `--force` in the same install location.
|
|
109
109
|
|
|
110
110
|
Replace the local skill install:
|
|
111
111
|
|
package/bin/install.js
CHANGED
|
@@ -5,8 +5,7 @@ const os = require("os");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
|
|
7
7
|
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
8
|
-
const
|
|
9
|
-
const BUNDLE_ENTRIES = [".codex-plugin", "skills"];
|
|
8
|
+
const SKILL_NAME = "harness-engine";
|
|
10
9
|
|
|
11
10
|
function printHelp() {
|
|
12
11
|
console.log(`harness-engine
|
|
@@ -19,7 +18,7 @@ Options:
|
|
|
19
18
|
--local Install into <cwd>/.codex/skills
|
|
20
19
|
--global Install into \${CODEX_HOME:-~/.codex}/skills
|
|
21
20
|
--path <dir> Install into a custom skills directory
|
|
22
|
-
--force Replace an existing installed
|
|
21
|
+
--force Replace an existing installed skill
|
|
23
22
|
-h, --help Show this help text
|
|
24
23
|
`);
|
|
25
24
|
}
|
|
@@ -98,25 +97,10 @@ function copyDir(sourceDir, targetDir) {
|
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
} else if (stat.isSymbolicLink()) {
|
|
106
|
-
fs.symlinkSync(fs.readlinkSync(sourcePath), targetPath);
|
|
107
|
-
} else {
|
|
108
|
-
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
|
|
109
|
-
fs.copyFileSync(sourcePath, targetPath);
|
|
110
|
-
fs.chmodSync(targetPath, fs.statSync(sourcePath).mode);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function assertBundleSources() {
|
|
115
|
-
for (const entry of BUNDLE_ENTRIES) {
|
|
116
|
-
const sourcePath = path.join(PACKAGE_ROOT, entry);
|
|
117
|
-
if (!fs.existsSync(sourcePath)) {
|
|
118
|
-
throw new Error(`Bundled plugin entry not found: ${sourcePath}`);
|
|
119
|
-
}
|
|
100
|
+
function assertSkillSource() {
|
|
101
|
+
const sourcePath = path.join(PACKAGE_ROOT, "skills", SKILL_NAME);
|
|
102
|
+
if (!fs.existsSync(sourcePath)) {
|
|
103
|
+
throw new Error(`Bundled skill not found: ${sourcePath}`);
|
|
120
104
|
}
|
|
121
105
|
}
|
|
122
106
|
|
|
@@ -132,24 +116,13 @@ function removeIfExists(targetPath, force, label) {
|
|
|
132
116
|
fs.rmSync(targetPath, { recursive: true, force: true });
|
|
133
117
|
}
|
|
134
118
|
|
|
135
|
-
function
|
|
136
|
-
|
|
119
|
+
function installSkill(destinationDir, force) {
|
|
120
|
+
assertSkillSource();
|
|
137
121
|
fs.mkdirSync(destinationDir, { recursive: true });
|
|
138
|
-
const
|
|
139
|
-
removeIfExists(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
for (const entry of BUNDLE_ENTRIES) {
|
|
143
|
-
copyEntry(path.join(PACKAGE_ROOT, entry), path.join(bundleTargetDir, entry));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Compatibility: older users invoke $harness-engine from a normal skills directory.
|
|
147
|
-
// Keep a top-level skill copy in place while the plugin root carries the bundle.
|
|
148
|
-
const compatTarget = path.join(destinationDir, "harness-engine");
|
|
149
|
-
removeIfExists(compatTarget, force, "Compatibility skill");
|
|
150
|
-
copyDir(path.join(PACKAGE_ROOT, "skills", "harness-engine"), compatTarget);
|
|
151
|
-
|
|
152
|
-
return bundleTargetDir;
|
|
122
|
+
const skillTarget = path.join(destinationDir, SKILL_NAME);
|
|
123
|
+
removeIfExists(skillTarget, force, "Skill");
|
|
124
|
+
copyDir(path.join(PACKAGE_ROOT, "skills", SKILL_NAME), skillTarget);
|
|
125
|
+
return skillTarget;
|
|
153
126
|
}
|
|
154
127
|
|
|
155
128
|
function main() {
|
|
@@ -170,7 +143,7 @@ function main() {
|
|
|
170
143
|
const destinationDir = resolveSkillsDir(args.mode, args.customPath);
|
|
171
144
|
|
|
172
145
|
if (args.command === "where") {
|
|
173
|
-
console.log(path.join(destinationDir,
|
|
146
|
+
console.log(path.join(destinationDir, SKILL_NAME));
|
|
174
147
|
return;
|
|
175
148
|
}
|
|
176
149
|
|
|
@@ -181,8 +154,8 @@ function main() {
|
|
|
181
154
|
}
|
|
182
155
|
|
|
183
156
|
try {
|
|
184
|
-
const installedPath =
|
|
185
|
-
console.log(`Installed ${
|
|
157
|
+
const installedPath = installSkill(destinationDir, args.force);
|
|
158
|
+
console.log(`Installed ${SKILL_NAME} skill to ${installedPath}`);
|
|
186
159
|
console.log("Invoke it in Codex with $harness-engine.");
|
|
187
160
|
} catch (error) {
|
|
188
161
|
console.error(`Install failed: ${error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hallucination-studio/harness-engine",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.17.412ec6e",
|
|
4
4
|
"description": "Install the harness-engine Codex skill for initializing and reconciling advanced repository harness docs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"bin",
|
|
22
|
-
".codex-plugin/**",
|
|
23
22
|
"skills/**/SKILL.md",
|
|
24
23
|
"skills/**/agents/**",
|
|
25
24
|
"skills/**/assets/**",
|
|
@@ -197,16 +197,15 @@ def test_pack_excludes_external_design_dependency(tmp_root):
|
|
|
197
197
|
pack_data = json.loads(result.stdout[json_start:].strip())
|
|
198
198
|
files = {item["path"] for item in pack_data[0]["files"]}
|
|
199
199
|
for required_path in [
|
|
200
|
-
".codex-plugin/plugin.json",
|
|
201
200
|
"skills/harness-engine/SKILL.md",
|
|
202
201
|
]:
|
|
203
202
|
if required_path not in files:
|
|
204
203
|
raise AssertionError(f"npm pack should include {required_path}")
|
|
205
204
|
forbidden_prefixes = [
|
|
205
|
+
".codex-plugin/",
|
|
206
206
|
"skills/google-design-style/",
|
|
207
207
|
"third_party/",
|
|
208
208
|
]
|
|
209
209
|
for file_path in files:
|
|
210
210
|
if any(file_path.startswith(prefix) for prefix in forbidden_prefixes):
|
|
211
211
|
raise AssertionError(f"npm pack should not include external design source or adapter: {file_path}")
|
|
212
|
-
|