harnessed 5.0.1 → 5.0.2
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/dist/cli.mjs +8 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/manifests/tools/playwright-cli.yaml +32 -25
- package/manifests/tools/webapp-testing.yaml +3 -22
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA4Gb,CAAA;;;ACzGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"5.0.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA4Gb,CAAA;;;ACzGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"5.0.2\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"README-en.md\",\n \"README-zh.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup && node ./scripts/build-hooks.mjs\",\n \"build:hooks\": \"node ./scripts/build-hooks.mjs\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"test:codex-live\": \"node ./scripts/codex-live/run.mjs\",\n \"bench\": \"vitest bench --run\",\n \"bench:runtime\": \"node scripts/benchmark-runtime.mjs\",\n \"test:runtime-channels\": \"node scripts/runtime-channel-smoke.mjs\",\n \"test:docs\": \"node --test tests/docs/install-channels.contract.mjs\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"undici\": \"^8.12.1\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"esbuild\": \"0.27.7\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
|
|
@@ -23,33 +23,40 @@ spec:
|
|
|
23
23
|
idempotent_check: "playwright-cli --version | grep -Fx '0.1.22'"
|
|
24
24
|
verify:
|
|
25
25
|
# npm-cli runs this in neutralCwd, outside the user's project.
|
|
26
|
-
#
|
|
26
|
+
# Read-only metadata verification; never start a browser or daemon here.
|
|
27
27
|
cmd: |
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if grep -q '^### Error' "$session/close.log"; then close_status=1; fi
|
|
40
|
-
rm -f "$session/render.log" "$session/close.log"
|
|
41
|
-
rmdir "$session"
|
|
42
|
-
if [ "$status" -eq 0 ]; then status=$close_status; fi
|
|
43
|
-
exit "$status"
|
|
28
|
+
node -e '
|
|
29
|
+
const spawnSync = require("node:child_process").spawnSync;
|
|
30
|
+
function run(args) {
|
|
31
|
+
const windows = process.platform === "win32";
|
|
32
|
+
const result = spawnSync(windows ? process.env.COMSPEC || "cmd.exe" : "playwright-cli", windows ? ["/d", "/s", "/c", "playwright-cli", ...args] : args, { encoding: "utf8", windowsHide: true, shell: false, stdio: ["ignore", "pipe", "pipe"], timeout: 15000, maxBuffer: 262144, env: { ...process.env, NO_UPDATE_NOTIFIER: "1" } });
|
|
33
|
+
if (result.error) throw result.error;
|
|
34
|
+
process.stdout.write(result.stdout);
|
|
35
|
+
process.stderr.write(result.stderr);
|
|
36
|
+
if (result.status !== 0) process.exit(result.status || 1);
|
|
37
|
+
if (/^### Error/m.test(result.stdout)) throw new Error("Playwright CLI reported an error");
|
|
38
|
+
return result.stdout;
|
|
44
39
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
if (run(["--version"]).trim() !== "0.1.22") throw new Error("Expected playwright-cli 0.1.22");
|
|
41
|
+
const dryRun = run(["install-browser", "chromium", "--dry-run"]);
|
|
42
|
+
if (!/\(playwright chromium v\d+\)/.test(dryRun) || !/^\s*Install location:\s*\S.*$/m.test(dryRun)) throw new Error("Chromium installation metadata is missing");
|
|
43
|
+
const listed = run(["install-browser", "chromium", "--list"]);
|
|
44
|
+
const installed = listed.split(/(?=^Playwright version:\s*\S)/m).some(block => {
|
|
45
|
+
if (!/^Playwright version:\s*\S/.test(block)) return false;
|
|
46
|
+
let section = "";
|
|
47
|
+
let chromium = false;
|
|
48
|
+
let cli = false;
|
|
49
|
+
for (const line of block.split(/\r?\n/)) {
|
|
50
|
+
if (/^\s*Browsers:\s*$/.test(line)) section = "browsers";
|
|
51
|
+
else if (/^\s*References:\s*$/.test(line)) section = "references";
|
|
52
|
+
else if (/^\s*[A-Za-z][A-Za-z ]*:\s*$/.test(line)) section = "";
|
|
53
|
+
else if (section === "browsers" && /(?:^|[\/\x5c])chromium-\d+(?=$|[\/\x5c\s])/.test(line)) chromium = true;
|
|
54
|
+
else if (section === "references" && /(?:^|[\/\x5c])@playwright[\/\x5c]cli(?=$|[\/\x5c\s])/.test(line)) cli = true;
|
|
55
|
+
}
|
|
56
|
+
return chromium && cli;
|
|
57
|
+
});
|
|
58
|
+
if (!installed) throw new Error("No installed Chromium browser reference from @playwright/cli");
|
|
59
|
+
'
|
|
53
60
|
timeout_ms: 60000
|
|
54
61
|
expected_exit_code: 0
|
|
55
62
|
uninstall:
|
|
@@ -12,10 +12,10 @@ metadata:
|
|
|
12
12
|
license: anthropics-official
|
|
13
13
|
license_source: anthropics-official
|
|
14
14
|
notice: |
|
|
15
|
-
Official anthropics/skills webapp-testing skill; license provenance uses the schema anthropics-official carve-out
|
|
15
|
+
Official anthropics/skills webapp-testing skill; license provenance uses the schema anthropics-official carve-out.
|
|
16
16
|
L2 installs only the skill and scripts/with_server.py, independently of gstack.
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Setup verifies readable nonempty same-root resources without executing Python.
|
|
18
|
+
Python and Playwright are runtime/project prerequisites, not installed by setup. Python Playwright is a project-level dependency; no pip install, browser download or project package changes.
|
|
19
19
|
spec:
|
|
20
20
|
type: cc-skill-pack
|
|
21
21
|
component_type: command
|
|
@@ -34,7 +34,6 @@ spec:
|
|
|
34
34
|
const fs = require("node:fs");
|
|
35
35
|
const path = require("node:path");
|
|
36
36
|
const home = require("node:os").homedir();
|
|
37
|
-
const spawnSync = require("node:child_process").spawnSync;
|
|
38
37
|
const platform = process.env.HARNESSED_PLATFORM;
|
|
39
38
|
const codex = platform ? platform === "codex" : Boolean(process.env.CODEX_HOME || process.env.CODEX_SESSION_ID);
|
|
40
39
|
const codexHome = path.resolve(process.env.CODEX_HOME || path.join(home, ".codex"));
|
|
@@ -49,24 +48,6 @@ spec:
|
|
|
49
48
|
const info = fs.statSync(file);
|
|
50
49
|
if (!info.isFile() || info.size === 0) throw new Error("Required resource is empty or not a file: " + file);
|
|
51
50
|
}
|
|
52
|
-
const env = Object.fromEntries(["PATH", "SystemRoot", "WINDIR", "TEMP", "TMP"].map(key => [key, process.env[key]]).filter(pair => pair[1] !== undefined));
|
|
53
|
-
const options = { cwd: root, env, encoding: "utf8", windowsHide: true, shell: false, stdio: ["ignore", "pipe", "pipe"], timeout: 5000, maxBuffer: 262144 };
|
|
54
|
-
const flags = ["-I", "-B", "-S"];
|
|
55
|
-
let python;
|
|
56
|
-
for (const [binary, prefix] of [["python", []], ["python3", []], ["py", ["-3"]]]) {
|
|
57
|
-
const probe = spawnSync(binary, [...prefix, ...flags, "-c", "import sys; assert sys.version_info >= (3, 8); print(\"HARNESSED_PYTHON_OK\")"], options);
|
|
58
|
-
if (!probe.error && probe.status === 0 && probe.stdout.trim() === "HARNESSED_PYTHON_OK") {
|
|
59
|
-
python = [binary, prefix];
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (!python) throw new Error("Python 3.8+ is required for helper --help; install an interpreter explicitly, not project dependencies");
|
|
64
|
-
const result = spawnSync(python[0], [...python[1], ...flags, path.join(root, "scripts", "with_server.py"), "--help"], options);
|
|
65
|
-
if (result.error) throw result.error;
|
|
66
|
-
process.stdout.write(result.stdout);
|
|
67
|
-
process.stderr.write(result.stderr);
|
|
68
|
-
if (result.status !== 0) process.exit(result.status || 1);
|
|
69
|
-
if (!["usage:", "--server", "--port", "--timeout"].every(text => result.stdout.includes(text))) throw new Error("with_server.py did not return the expected help output");
|
|
70
51
|
'
|
|
71
52
|
timeout_ms: 30000
|
|
72
53
|
expected_exit_code: 0
|