Files
Julius Brussee 82864c8f4c feat: ship Caveman 2.0.0 — engine, proxy, SDKs, unified CLI
Single-commit port of the Caveman 2 tree onto the original repo history
(candidate caveman-2@88878a4 applied over main@3098342). No unrelated-history
merge; original history untouched.

Preserved v1 surfaces:
- skills/caveman/SKILL.md byte-for-byte, plus plugin mirror and caveman.skill zip
- legacy CI (Node 18/20/22 installer + Python 3.11 suites) alongside engine-ci
- cli/install.js compatibility shim forwarding to bin/install.js
- .codex/config.toml ships both hooks and codex_hooks for older Codex (#617)
- README Trendshift + Skills.sh badges and local star-history asset
- v1.10.0-pinned curl installs; benchmarks/tmp-starcharts ignore rules

Fixed for public same-repo release:
- SECURITY.md vulnerability reporting points at this repository
- release-binaries.yml publishes to this repo via job-scoped GITHUB_TOKEN
  (cross-repo PAT removed); binary-release environment still gates signing
- packages/cli/PUBLISHING.md rewritten for packages/ layout and same-repo flow
- profile-contract and provider-catalog lanes skip lane-scope gates on
  initial import so the launch PR can gate on their real validation steps
- ANNOUNCEMENT.md network claim corrected: compression is local; requests
  still go to the provider you configured

Caveman 2 stays opt-in: bin-v1.0.0 binaries and @caveman-ai/cli publish
separately after this lands and soaks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLvb5QniwYjmcawyssQNw9
2026-08-11 16:46:10 +02:00

37 lines
1.3 KiB
JavaScript

import assert from "node:assert/strict";
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import test from "node:test";
import { killProcessTree, portableInvocation } from "../../../agents/delegate/portable-process.mjs";
test("delegate unwraps Windows pi shim and preserves task bytes", () => {
const root = mkdtempSync(join(tmpdir(), "cave-delegate-win-"));
const bin = join(root, "bin");
const pkg = join(root, "pkg");
mkdirSync(bin);
mkdirSync(pkg);
const shim = join(bin, "pi.CMD");
const script = join(pkg, "cli.js");
writeFileSync(shim, '@echo off\r\nendLocal & "%_prog%" "%dp0%\\..\\pkg\\cli.js" %*\r\n');
writeFileSync(script, "");
assert.deepEqual(portableInvocation("pi", ["x&y", "%PATH%"], "win32", {
Path: bin,
PATHEXT: ".EXE;.CMD",
}), { command: process.execPath, args: [script, "x&y", "%PATH%"] });
});
test("delegate kills Windows worker descendants", () => {
const calls = [];
killProcessTree({ pid: 75, kill: () => calls.push("fallback") }, "win32", (command, args, options) => {
calls.push([command, args, options]);
return { status: 0 };
});
assert.deepEqual(calls, [[
"taskkill.exe",
["/pid", "75", "/t", "/f"],
{ stdio: "ignore", windowsHide: true },
]]);
});