@jigging/jig 0.1.0-alpha.10 → 0.1.0-alpha.12
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 +28 -11
- package/bin/jig +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +29 -2
- package/dist/project/author.d.ts +8 -6
- package/libexec/agent/claude-agent-acp.js +119 -119
- package/libexec/agent/openai-agent-worker.js +165 -168
- package/libexec/agent/pi-acp.js +69 -69
- package/libexec/agent/pi-agent-launcher.js +2 -15
- package/libexec/evaluator/project-authoring-1.schema.json +10 -15
- package/libexec/evaluator/project-evaluator-sdk.bundle.js +29 -2
- package/libexec/evaluator/project-evaluator-worker.js +61 -56
- package/libexec/installed-cli.js +1902 -1540
- package/libexec/linux-rootless-supervisor.js +16 -13
- package/libexec/preparation/bun-native-preparation-worker.js +1 -9
- package/package.json +3 -12
|
@@ -3,16 +3,7 @@
|
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
4
|
import { randomBytes } from "crypto";
|
|
5
5
|
import { closeSync, readFileSync, statSync, writeSync } from "fs";
|
|
6
|
-
import {
|
|
7
|
-
link,
|
|
8
|
-
mkdir,
|
|
9
|
-
open,
|
|
10
|
-
readFile,
|
|
11
|
-
rmdir,
|
|
12
|
-
stat,
|
|
13
|
-
unlink,
|
|
14
|
-
writeFile
|
|
15
|
-
} from "fs/promises";
|
|
6
|
+
import { link, mkdir, open, readFile, rmdir, stat, unlink, writeFile } from "fs/promises";
|
|
16
7
|
import { connect } from "net";
|
|
17
8
|
import { posix } from "path";
|
|
18
9
|
var POLICY = Object.freeze(["--no-env-file", "--no-install", "--config=/dev/null"]);
|
|
@@ -113,7 +104,11 @@ async function superviseConnected(control, startupDeadlineUnixMs) {
|
|
|
113
104
|
`);
|
|
114
105
|
if (stopReason !== undefined)
|
|
115
106
|
throw new Error(`rootless launch stopped during setup: ${stopReason}`);
|
|
116
|
-
safeSend(control, {
|
|
107
|
+
safeSend(control, {
|
|
108
|
+
type: "prepared",
|
|
109
|
+
runCgroup,
|
|
110
|
+
supervisorPid: process.pid
|
|
111
|
+
});
|
|
117
112
|
await admission;
|
|
118
113
|
if (stopReason !== undefined)
|
|
119
114
|
throw new Error(`rootless launch stopped before spawn: ${stopReason}`);
|
|
@@ -230,7 +225,11 @@ async function innerMain(command) {
|
|
|
230
225
|
if (!nullDevice.isCharacterDevice() || !entropyDevice.isCharacterDevice() || (nullDevice.mode & 511) !== 438 || (entropyDevice.mode & 511) !== 438) {
|
|
231
226
|
throw new Error("rootless private devices do not satisfy the required projection");
|
|
232
227
|
}
|
|
233
|
-
const child = spawn(command[0], command.slice(1), {
|
|
228
|
+
const child = spawn(command[0], command.slice(1), {
|
|
229
|
+
cwd: "/work",
|
|
230
|
+
env: process.env,
|
|
231
|
+
stdio: "inherit"
|
|
232
|
+
});
|
|
234
233
|
const exit = await childClose(child);
|
|
235
234
|
if (exit.signal !== null)
|
|
236
235
|
process.kill(process.pid, exit.signal);
|
|
@@ -505,7 +504,11 @@ async function readCounters(path) {
|
|
|
505
504
|
return result;
|
|
506
505
|
}
|
|
507
506
|
function emptyEvidence() {
|
|
508
|
-
return Object.freeze({
|
|
507
|
+
return Object.freeze({
|
|
508
|
+
cpuStat: Object.freeze({}),
|
|
509
|
+
memoryEvents: Object.freeze({}),
|
|
510
|
+
pidsEvents: Object.freeze({})
|
|
511
|
+
});
|
|
509
512
|
}
|
|
510
513
|
async function exists(path) {
|
|
511
514
|
try {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/internal/bun-native-preparation-worker.ts
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
|
-
import {
|
|
5
|
-
copyFile,
|
|
6
|
-
lstat,
|
|
7
|
-
mkdir,
|
|
8
|
-
opendir,
|
|
9
|
-
readFile,
|
|
10
|
-
rm,
|
|
11
|
-
writeFile
|
|
12
|
-
} from "fs/promises";
|
|
4
|
+
import { copyFile, lstat, mkdir, opendir, readFile, rm, writeFile } from "fs/promises";
|
|
13
5
|
import { dirname, join } from "path";
|
|
14
6
|
|
|
15
7
|
// src/internal/bun-native-lock-policy.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jigging/jig",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.12",
|
|
4
4
|
"description": "A local, secure host for admitted FLOW packages",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -66,16 +66,6 @@
|
|
|
66
66
|
"LICENSE",
|
|
67
67
|
"THIRD_PARTY_NOTICES"
|
|
68
68
|
],
|
|
69
|
-
"scripts": {
|
|
70
|
-
"verify:build-bun": "bun -e \"if (Bun.version !== '1.3.3' || Bun.revision !== '274e01c737e85f8142070a9745b43a2ba09fce4c') throw new Error('Jig must be built with exact Bun 1.3.3 revision 274e01c737e85f8142070a9745b43a2ba09fce4c')\"",
|
|
71
|
-
"build": "bun run verify:build-bun && bun run clean && mkdir -p bin libexec/agent libexec/evaluator libexec/preparation && cp scripts/installed-jig.sh bin/jig && chmod 755 bin/jig && bun node_modules/typescript/bin/tsc -p tsconfig.json && bun build src/index.ts --target=bun --format=esm --outfile=dist/index.js && bun build src/installed-cli.ts --target=bun --format=esm --outfile=libexec/installed-cli.js && bun build src/internal/linux-rootless-supervisor.ts --target=bun --format=esm --outfile=libexec/linux-rootless-supervisor.js && bun build src/internal/project-evaluator-worker.ts --target=bun --format=esm --outfile=libexec/evaluator/project-evaluator-worker.js && bun build src/internal/openai-agent-worker.ts --target=bun --format=esm --outfile=libexec/agent/openai-agent-worker.js && bun build src/internal/codex-agent-launcher.ts --target=bun --format=esm --outfile=libexec/agent/codex-agent-launcher.js && cp node_modules/@agentclientprotocol/codex-acp/dist/index.js libexec/agent/codex-acp.js && cp node_modules/@agentclientprotocol/codex-acp/LICENSE libexec/agent/codex-acp.LICENSE && cp support/codex-requirements.toml libexec/agent/codex-requirements.toml && bun build src/internal/claude-agent-launcher.ts --target=bun --format=esm --outfile=libexec/agent/claude-agent-launcher.js && bun build node_modules/@agentclientprotocol/claude-agent-acp/dist/index.js --target=bun --format=esm --outfile=libexec/agent/claude-agent-acp.js && cp node_modules/@agentclientprotocol/claude-agent-acp/LICENSE libexec/agent/claude-agent-acp.LICENSE && cp node_modules/@anthropic-ai/claude-agent-sdk/LICENSE.md libexec/agent/claude-agent-sdk.LICENSE && bun build src/internal/pi-agent-launcher.ts --target=bun --format=esm --outfile=libexec/agent/pi-agent-launcher.js && bun build node_modules/pi-acp/dist/index.js --target=bun --format=esm --outfile=libexec/agent/pi-acp.js && cp node_modules/pi-acp/LICENSE libexec/agent/pi-acp.LICENSE && bun build src/internal/bun-native-preparation-worker.ts --target=bun --format=esm --outfile=libexec/preparation/bun-native-preparation-worker.js && bun build src/project/evaluator-sdk-entry.ts --target=bun --format=esm --outfile=libexec/evaluator/project-evaluator-sdk.bundle.js && cp ../../docs/jig/spec/machine/project-authoring-1.schema.json libexec/evaluator/project-authoring-1.schema.json && cp node_modules/openai/LICENSE libexec/agent/openai.LICENSE",
|
|
72
|
-
"clean": "bun -e \"import { rm } from 'node:fs/promises'; for (const path of ['dist', 'bin', 'libexec']) await rm(path, { recursive: true, force: true })\"",
|
|
73
|
-
"prepack": "bun run build",
|
|
74
|
-
"test": "bun test",
|
|
75
|
-
"test:package": "bun run build && bun test/package-smoke.ts",
|
|
76
|
-
"test:linux-rootless:proof-host": "bun run build && JIG_LINUX_ROOTLESS_HOSTILE=1 bun test test/linux-rootless-delegation-hostile.test.ts --timeout 30000 && JIG_LINUX_ROOTLESS_HOSTILE=1 bun test test/linux-rootless-run.test.ts --timeout 30000 && JIG_LINUX_ROOTLESS_HOSTILE=1 bun test test/bun-native-preparation.test.ts --timeout 120000 && JIG_LINUX_ROOTLESS_HOSTILE=1 bun test test/private-foreground.test.ts --timeout 30000 && JIG_LINUX_ROOTLESS_HOSTILE=1 bun test test/root-agent-run-lifecycle.test.ts --timeout 180000",
|
|
77
|
-
"check": "bun run build && bun test"
|
|
78
|
-
},
|
|
79
69
|
"dependencies": {
|
|
80
70
|
"@oven/bun-linux-x64-baseline": "1.3.3"
|
|
81
71
|
},
|
|
@@ -83,6 +73,7 @@
|
|
|
83
73
|
"@agentclientprotocol/claude-agent-acp": "0.73.0",
|
|
84
74
|
"@agentclientprotocol/codex-acp": "1.8.0",
|
|
85
75
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
76
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.257",
|
|
86
77
|
"@types/node": "24.13.3",
|
|
87
78
|
"openai": "7.9.0",
|
|
88
79
|
"pi-acp": "0.0.33",
|
|
@@ -90,4 +81,4 @@
|
|
|
90
81
|
"yaml": "2.9.0",
|
|
91
82
|
"zod": "4.3.6"
|
|
92
83
|
}
|
|
93
|
-
}
|
|
84
|
+
}
|