glimmervoid 0.36.0 → 0.38.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/README.md +86 -84
- package/dist/bin/glimmervoid.js +54 -115
- package/dist/chunks/{adapters-BdnLyJjf.js → adapters-B-IkWl-r.js} +37 -15
- package/dist/chunks/adapters-Dt3vwxwY.js +1 -0
- package/dist/chunks/{agent-api-cli-DIqRLvu3.js → agent-api-cli-3hryuewm.js} +1 -1
- package/dist/chunks/{agent-api-cli-d-Bgsshx.js → agent-api-cli-BcZ9DLCF.js} +41 -12
- package/dist/chunks/{agent-api-core-BUC9WND7.js → agent-api-core--8WtU1xU.js} +88 -6
- package/dist/chunks/{agent-setup-cli-CH7EHsAX.js → agent-setup-cli-BixDoCkF.js} +2 -2
- package/dist/chunks/{config-CuZ16F9W.js → config-BHBZsCBc.js} +22 -16
- package/dist/chunks/config-store-DYj3wYgw.js +1 -0
- package/dist/chunks/{config-store-LqQ7MuyV.js → config-store-DbfMbz4j.js} +46 -69
- package/dist/chunks/{contracts-BLZAOP57.js → contracts-u40eJhaf.js} +66 -21
- package/dist/chunks/git-version-BpnTd8sU.js +139 -0
- package/dist/chunks/{grok-Ch4-35_r.js → grok-xFs6zIu4.js} +5 -1
- package/dist/chunks/guardrails-deps-Cb-ki4EU.js +70 -0
- package/dist/chunks/{sandbox-proxy-core-hnQgKR0T.js → guardrails-proxy-core-BI3rdY-m.js} +4 -4
- package/dist/chunks/{json-file-BaxGcB2R.js → json-file-CIJf0Cel.js} +190 -9
- package/dist/chunks/{knowledge-graph-cli-DD7QvcFd.js → knowledge-graph-cli-DcspNqhz.js} +1 -1
- package/dist/chunks/{loopback-post-DepQfdcM.js → loopback-post-DZK7YibD.js} +10 -10
- package/dist/chunks/{main-Rmo83Ow-.js → main-w01-P1oZ.js} +15186 -13134
- package/dist/chunks/{pair-cli-DzFeAmq5.js → pair-cli-BdoyrDCr.js} +2 -2
- package/dist/chunks/{remote-config-CPdSF2Xi.js → remote-config-61zJ0hME.js} +2 -2
- package/dist/chunks/{session-B8RhqQJe.js → session-8Pv0y1vz.js} +55 -9
- package/dist/chunks/{session-routes-DB5aDKsx.js → session-routes-D-GZC-Sy.js} +9 -9
- package/dist/chunks/{settings-cli-C2TY6hl-.js → settings-cli-DKJsm3AP.js} +3 -3
- package/dist/chunks/{ssh-sign-cli-C2nUwJC-.js → ssh-sign-cli-Dc2gOCwE.js} +2 -2
- package/dist/client/assets/index-BfqmOGgc.js +275 -0
- package/dist/client/assets/index-DxABp5yJ.css +1 -0
- package/dist/client/index.html +10 -3
- package/dist/scripts/postinstall-path-check.js +4 -4
- package/dist/server/index.js +1 -1
- package/dist/session/command-hook-relay.js +1 -1
- package/dist/session/{sandbox-open-launcher.js → guardrails-open-launcher.js} +10 -10
- package/dist/session/hook-relay.js +1 -1
- package/dist/session/statusline-relay.js +1 -1
- package/dist/session/visions-relay.js +7 -7
- package/package.json +4 -3
- package/scripts/recover-handoff.mjs +1 -1
- package/dist/chunks/adapters-BVozg-Lg.js +0 -1
- package/dist/chunks/config-store-tVmt_nfm.js +0 -1
- package/dist/chunks/git-version-CUcDtF5k.js +0 -58
- package/dist/chunks/sandbox-deps-CWiH1d1w.js +0 -70
- package/dist/client/assets/index-BIaSyXwH.css +0 -1
- package/dist/client/assets/index-Ddu7M4Ad.js +0 -259
package/dist/client/index.html
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<meta name="color-scheme" content="dark light">
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/assets/favicon-CKygeLwW.svg">
|
|
8
8
|
<title>Glimmervoid</title>
|
|
9
|
-
<style>html,body{background:var(--bg,#0a0810);height:100%;color:var(--text,#c8c0e0);font-family:var(--font-mono,"CommitMono", "Cascadia Code", "Fira Code", "Consolas", "Menlo", monospace);margin:0;padding:0}.app-shell{display:none}html:not([data-layout=phone]) .app-ready .app-shell{display:contents}.loading-screen{z-index:9999;background:#0a0810;flex-direction:column;justify-content:center;align-items:center;gap:20px;transition:opacity .3s;display:flex;position:fixed;inset:0}.loading-screen.fade-out{opacity:0;pointer-events:none}.loading-title{letter-spacing:.1em;color:#e8e0ff;text-transform:uppercase;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:20px;font-weight:700}.loading-title:before{content:"▸";color:#c084fc}.loading-status{color:#8276b0;letter-spacing:.04em;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:12px}.loading-spinner{border:2px solid #2a2440;border-top-color:#c084fc;border-radius:50%;width:28px;height:28px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.shutdown-screen{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();pointer-events:none;opacity:0;background:#0a081000;flex-direction:column;justify-content:center;align-items:center;gap:20px;transition:background .4s,-webkit-backdrop-filter .4s,backdrop-filter .4s,opacity .3s;display:flex;position:fixed;inset:0}.shutdown-screen.active{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);pointer-events:auto;opacity:1;background:#0a0810eb}.shutdown-status{color:#8276b0;letter-spacing:.04em;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:12px;transition:color .3s}.shutdown-screen.done .loading-spinner{opacity:.3;border-color:#2a2440;animation:none}.shutdown-screen.done .shutdown-status{color:#4a4268}</style>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<style>html,body{background:var(--bg,#0a0810);height:100%;color:var(--text,#c8c0e0);font-family:var(--font-mono,"CommitMono", "Cascadia Code", "Fira Code", "Consolas", "Menlo", monospace);margin:0;padding:0}.app-shell{display:none}html:not([data-layout=phone]) .app-ready .app-shell{display:contents}.loading-screen{z-index:9999;background:#0a0810;flex-direction:column;justify-content:center;align-items:center;gap:20px;transition:opacity .3s;display:flex;position:fixed;inset:0}.loading-screen.fade-out{opacity:0;pointer-events:none}.loading-title{letter-spacing:.1em;color:#e8e0ff;text-transform:uppercase;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:20px;font-weight:700}.loading-title:before{content:"▸";color:#c084fc}.loading-status{color:#8276b0;letter-spacing:.04em;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:12px}.loading-spinner{border:2px solid #2a2440;border-top-color:#c084fc;border-radius:50%;width:28px;height:28px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.shutdown-screen:not(.active) .loading-spinner{animation:none}.shutdown-screen{z-index:9999;-webkit-backdrop-filter:blur();backdrop-filter:blur();pointer-events:none;opacity:0;background:#0a081000;flex-direction:column;justify-content:center;align-items:center;gap:20px;transition:background .4s,-webkit-backdrop-filter .4s,backdrop-filter .4s,opacity .3s;display:flex;position:fixed;inset:0}.shutdown-screen.active{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);pointer-events:auto;opacity:1;background:#0a0810eb}.shutdown-status{color:#8276b0;letter-spacing:.04em;font-family:CommitMono,Cascadia Code,Fira Code,Consolas,Menlo,monospace;font-size:12px;transition:color .3s}.shutdown-screen.done .loading-spinner{opacity:.3;border-color:#2a2440;animation:none}.shutdown-screen.done .shutdown-status{color:#4a4268}</style>
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-BfqmOGgc.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DxABp5yJ.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div class="loading-screen" id="loading-screen">
|
|
@@ -70,6 +70,13 @@
|
|
|
70
70
|
<span class="update-banner-copy-status" id="update-banner-copy-status" role="status"></span>
|
|
71
71
|
<button class="update-banner-dismiss" id="update-banner-dismiss" type="button" aria-label="Dismiss update notice">×</button>
|
|
72
72
|
</div>
|
|
73
|
+
<div class="update-banner post-turn-leftovers-banner" id="post-turn-leftovers-banner" role="status" hidden>
|
|
74
|
+
<span class="update-banner-text" id="post-turn-leftovers-text"></span>
|
|
75
|
+
<code class="update-banner-cmd post-turn-leftovers-cmd" id="post-turn-leftovers-cmd"></code>
|
|
76
|
+
<button class="update-banner-copy" id="post-turn-leftovers-copy" type="button">Copy</button>
|
|
77
|
+
<span class="update-banner-copy-status" id="post-turn-leftovers-copy-status" role="status"></span>
|
|
78
|
+
<button class="update-banner-dismiss" id="post-turn-leftovers-dismiss" type="button" aria-label="Dismiss old report notice">×</button>
|
|
79
|
+
</div>
|
|
73
80
|
<div class="update-banner" id="telemetry-banner" role="status" hidden>
|
|
74
81
|
<span class="update-banner-text">Glimmervoid sends anonymous usage and error data to help improve it. No paths, prompts or terminal output.</span>
|
|
75
82
|
<a class="update-banner-link" id="telemetry-banner-settings" href="#settings/privacy/telemetry-enabled">Open settings</a>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as guardrailsInstallNotice, r as probeGuardrailsDependencies } from "../chunks/guardrails-deps-Cb-ki4EU.js";
|
|
2
2
|
import { n as npmGlobalBinDir, r as onPath, t as formatPathNotice } from "../chunks/path-doctor-C23VAqeu.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
//#region scripts/postinstall-path-check.ts
|
|
@@ -22,15 +22,15 @@ function printPathNotice() {
|
|
|
22
22
|
platform
|
|
23
23
|
})}\n\n`);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const notice =
|
|
25
|
+
function printGuardrailsNotice() {
|
|
26
|
+
const notice = guardrailsInstallNotice(probeGuardrailsDependencies());
|
|
27
27
|
if (notice !== null) process.stdout.write(`${notice}\n`);
|
|
28
28
|
}
|
|
29
29
|
try {
|
|
30
30
|
printPathNotice();
|
|
31
31
|
} catch {}
|
|
32
32
|
try {
|
|
33
|
-
|
|
33
|
+
printGuardrailsNotice();
|
|
34
34
|
} catch {}
|
|
35
35
|
//#endregion
|
|
36
36
|
export {};
|
package/dist/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as readStdin } from "../chunks/relay-stdin-CpHvLu6M.js";
|
|
2
|
-
import { t as postPayload } from "../chunks/loopback-post-
|
|
2
|
+
import { t as postPayload } from "../chunks/loopback-post-DZK7YibD.js";
|
|
3
3
|
import { n as sessionStartContextOutput } from "../chunks/refocus-core-BKQKllq7.js";
|
|
4
4
|
//#region session/command-hook-relay.ts
|
|
5
5
|
async function main(argv = process.argv.slice(2), stdin = process.stdin, stdout = process.stdout) {
|
|
@@ -4,14 +4,14 @@ import fs from "node:fs";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import tty from "node:tty";
|
|
6
6
|
import { FilesystemConfigSchema, SandboxManager } from "@anthropic-ai/sandbox-runtime";
|
|
7
|
-
//#region session/core/
|
|
7
|
+
//#region session/core/guardrails-terminal-core.ts
|
|
8
8
|
var RUNTIME_TERMINAL_FILTER = "(regex #\"^/dev/ttys\")";
|
|
9
9
|
var RUNTIME_TERMINAL_FILTER_COUNT = 2;
|
|
10
10
|
var TERMINAL_PATH_SHAPE = /^\/dev\/ttys\d+$/;
|
|
11
11
|
function confineToOwnTerminal(argv, ownTerminalPath) {
|
|
12
12
|
if (!TERMINAL_PATH_SHAPE.test(ownTerminalPath)) return {
|
|
13
13
|
ok: false,
|
|
14
|
-
reason: `${ownTerminalPath} is not a pseudo-terminal the
|
|
14
|
+
reason: `${ownTerminalPath} is not a pseudo-terminal the guardrails can be confined to`
|
|
15
15
|
};
|
|
16
16
|
const filterCount = argv.reduce((count, word) => count + word.split(RUNTIME_TERMINAL_FILTER).length - 1, 0);
|
|
17
17
|
if (filterCount !== RUNTIME_TERMINAL_FILTER_COUNT) return {
|
|
@@ -25,7 +25,7 @@ function confineToOwnTerminal(argv, ownTerminalPath) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
//#region session/
|
|
28
|
+
//#region session/guardrails-open-launcher.ts
|
|
29
29
|
var FORWARDED_SIGNALS = [
|
|
30
30
|
"SIGINT",
|
|
31
31
|
"SIGTERM",
|
|
@@ -72,7 +72,7 @@ function ownTerminalPath() {
|
|
|
72
72
|
if (ownName === void 0) throw new Error("the launcher terminal is not a pseudo-terminal under /dev");
|
|
73
73
|
return path.join(DEVICE_FOLDER, ownName);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function guardrailsArgv(argv, { runtimeConfig, isAnyTerminalAllowed }) {
|
|
76
76
|
if (runtimeConfig.allowPty !== true || isAnyTerminalAllowed || process.platform !== "darwin") return argv;
|
|
77
77
|
const confinement = confineToOwnTerminal(argv, ownTerminalPath());
|
|
78
78
|
if (!confinement.ok) throw new Error(confinement.reason);
|
|
@@ -82,9 +82,9 @@ function exitCodeFor(code, signal) {
|
|
|
82
82
|
if (signal === null) return code ?? 0;
|
|
83
83
|
return FORWARDED_SIGNALS.some((forwarded) => forwarded === signal) ? 0 : 1;
|
|
84
84
|
}
|
|
85
|
-
async function
|
|
85
|
+
async function launchInOpenNetworkGuardrails() {
|
|
86
86
|
const [policyPath, ...command] = process.argv.slice(2);
|
|
87
|
-
if (!policyPath || command.length === 0) throw new Error("usage:
|
|
87
|
+
if (!policyPath || command.length === 0) throw new Error("usage: guardrails-open-launcher <policy file> <command> [arguments]");
|
|
88
88
|
const openPolicy = readOpenPolicy(policyPath);
|
|
89
89
|
const dependencies = SandboxManager.checkDependencies();
|
|
90
90
|
const dependencyProblems = [...dependencies.errors, ...dependencies.warnings];
|
|
@@ -109,7 +109,7 @@ async function launchInOpenNetworkSandbox() {
|
|
|
109
109
|
exitWhenInterrupted();
|
|
110
110
|
throw wrapFailure;
|
|
111
111
|
});
|
|
112
|
-
const [shell, ...shellArgs] =
|
|
112
|
+
const [shell, ...shellArgs] = guardrailsArgv(wrapped.argv, openPolicy);
|
|
113
113
|
if (!shell || shellArgs.at(-1) === commandLine) throw new Error("the sandbox runtime returned the command unwrapped");
|
|
114
114
|
exitWhenInterrupted();
|
|
115
115
|
child = spawn(shell, shellArgs, {
|
|
@@ -117,7 +117,7 @@ async function launchInOpenNetworkSandbox() {
|
|
|
117
117
|
env: wrapped.env
|
|
118
118
|
});
|
|
119
119
|
child.on("error", (error) => {
|
|
120
|
-
console.error(`
|
|
120
|
+
console.error(`guardrails launcher: ${error.message}`);
|
|
121
121
|
process.exit(1);
|
|
122
122
|
});
|
|
123
123
|
child.on("exit", (code, signal) => {
|
|
@@ -125,8 +125,8 @@ async function launchInOpenNetworkSandbox() {
|
|
|
125
125
|
process.exit(exitCodeFor(code, signal));
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
console.error(`
|
|
128
|
+
launchInOpenNetworkGuardrails().catch((error) => {
|
|
129
|
+
console.error(`guardrails launcher: ${errorMessage(error)}`);
|
|
130
130
|
process.exit(1);
|
|
131
131
|
});
|
|
132
132
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as readStdin } from "../chunks/relay-stdin-CpHvLu6M.js";
|
|
2
2
|
import { r as decideRelayPost } from "../chunks/hook-relay-core-DA_bz2KA.js";
|
|
3
|
-
import { n as postToLoopback } from "../chunks/loopback-post-
|
|
3
|
+
import { n as postToLoopback } from "../chunks/loopback-post-DZK7YibD.js";
|
|
4
4
|
//#region session/hook-relay.ts
|
|
5
5
|
async function main(argv = process.argv.slice(2), stdin = process.stdin, env = process.env) {
|
|
6
6
|
const [event] = argv;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as spawn } from "../chunks/child-process-safe-CbQnyh7D.js";
|
|
2
2
|
import { t as readStdin } from "../chunks/relay-stdin-CpHvLu6M.js";
|
|
3
|
-
import { t as postPayload } from "../chunks/loopback-post-
|
|
3
|
+
import { t as postPayload } from "../chunks/loopback-post-DZK7YibD.js";
|
|
4
4
|
import { n as isRecord } from "../chunks/coerce-NSst8oRP.js";
|
|
5
5
|
import { n as parseJsonRecord } from "../chunks/json-core-dfa_7Fak.js";
|
|
6
6
|
//#region session/statusline-relay.ts
|
|
@@ -5,7 +5,7 @@ import { r as nextBackoffMs } from "../chunks/backoff-DjVpfHk7.js";
|
|
|
5
5
|
import { n as unrefTimer } from "../chunks/timer-deps-u2DAQLok.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import os from "node:os";
|
|
8
|
-
import WebSocket from "ws";
|
|
8
|
+
import WebSocket$1 from "ws";
|
|
9
9
|
//#region server/visions/core/visions-lsp-core.ts
|
|
10
10
|
var HEADER_END = "\r\n\r\n";
|
|
11
11
|
var CONTENT_LENGTH_RE = /^content-length:\s*(\d+)\s*$/i;
|
|
@@ -343,7 +343,7 @@ function mirrorFailureDetail(update) {
|
|
|
343
343
|
return "";
|
|
344
344
|
}
|
|
345
345
|
function sendWsFrame(ws, decision) {
|
|
346
|
-
if (!ws || ws.readyState !== WebSocket.OPEN) return false;
|
|
346
|
+
if (!ws || ws.readyState !== WebSocket$1.OPEN) return false;
|
|
347
347
|
if (!decision.send) return false;
|
|
348
348
|
ws.send(decision.serialized);
|
|
349
349
|
return true;
|
|
@@ -433,7 +433,7 @@ function createRelay({ argv = process.argv.slice(2), env = process.env, stdin =
|
|
|
433
433
|
function connect() {
|
|
434
434
|
if (isStopping) return;
|
|
435
435
|
const port = currentPort();
|
|
436
|
-
const socket = new WebSocket(`ws://127.0.0.1:${port}/visions`);
|
|
436
|
+
const socket = new WebSocket$1(`ws://127.0.0.1:${port}/visions`);
|
|
437
437
|
ws = socket;
|
|
438
438
|
socket.on("open", () => {
|
|
439
439
|
if (ws !== socket) return;
|
|
@@ -473,7 +473,7 @@ function createRelay({ argv = process.argv.slice(2), env = process.env, stdin =
|
|
|
473
473
|
for (const id of [...pendingCodeActionById.keys()]) settleCodeAction(id, null);
|
|
474
474
|
}
|
|
475
475
|
function forwardCodeAction(id, params) {
|
|
476
|
-
if (!sendWsJson(ws, daemonRequest(id,
|
|
476
|
+
if (!sendWsJson(ws, daemonRequest(id, CODE_ACTION_METHOD, params))) {
|
|
477
477
|
writeEditorMessage(responseMessage(id, null));
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
@@ -521,7 +521,7 @@ function createRelay({ argv = process.argv.slice(2), env = process.env, stdin =
|
|
|
521
521
|
settleCodeAction(msg.id, msg.result);
|
|
522
522
|
return;
|
|
523
523
|
}
|
|
524
|
-
if (msg.type === "lsp-request" && msg.method ===
|
|
524
|
+
if (msg.type === "lsp-request" && msg.method === APPLY_EDIT_METHOD) forwardApplyEdit(msg.id, msg.params);
|
|
525
525
|
}
|
|
526
526
|
function updateMirror(method, params) {
|
|
527
527
|
const documentParams = asDocumentParams(params);
|
|
@@ -582,7 +582,7 @@ function createRelay({ argv = process.argv.slice(2), env = process.env, stdin =
|
|
|
582
582
|
return false;
|
|
583
583
|
}
|
|
584
584
|
function handleRequest(id, method, params) {
|
|
585
|
-
if (method ===
|
|
585
|
+
if (method === CODE_ACTION_METHOD) {
|
|
586
586
|
forwardCodeAction(id, params);
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
@@ -633,4 +633,4 @@ function main() {
|
|
|
633
633
|
}
|
|
634
634
|
if (process.argv[1] === import.meta.filename) main();
|
|
635
635
|
//#endregion
|
|
636
|
-
export {
|
|
636
|
+
export { CODE_ACTION_TIMEOUT_MS, SYNC_KIND_INCREMENTAL, createRelay, readConfiguredPort, resolvePortPlan, sendWsFrame, sendWsJson };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glimmervoid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Mission control for coding agents: run and supervise Claude Code, Codex and Grok sessions in parallel git worktrees from one local browser dashboard",
|
|
5
5
|
"main": "dist/server/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"factory:run": "node test/factory/run.ts",
|
|
58
58
|
"lint": "biome check . --max-diagnostics=none",
|
|
59
59
|
"test": "node --import ./tests/helpers/isolate-home.ts --test \"tests/**/*.test.ts\"",
|
|
60
|
+
"test:files": "node --import ./tests/helpers/isolate-home.ts --test",
|
|
60
61
|
"typecheck": "tsc --project tsconfig.json && tsc --project tsconfig.public.json && tsc --project tsconfig.browser-harness.json",
|
|
61
62
|
"test:browser": "node test/browser/harness.ts",
|
|
62
63
|
"site:capture": "node test/site-capture/capture.ts",
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
"@xterm/addon-webgl": "^0.19.0",
|
|
81
82
|
"@xterm/headless": "^6.0.0",
|
|
82
83
|
"@xterm/xterm": "^6.0.0",
|
|
83
|
-
"cc-safety-net": "2.6.
|
|
84
|
+
"cc-safety-net": "2.6.12",
|
|
84
85
|
"express": "^5.3.0",
|
|
85
86
|
"node-pty": "^1.1.0",
|
|
86
87
|
"ws": "^8.22.0",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"@biomejs/biome": "^2.5.15",
|
|
94
95
|
"@tailwindcss/vite": "^4.3.3",
|
|
95
96
|
"@types/node": "^26.6.5",
|
|
96
|
-
"playwright-core": "1.64.
|
|
97
|
+
"playwright-core": "1.64.1",
|
|
97
98
|
"tailwindcss": "^4.3.3",
|
|
98
99
|
"typescript": "^7.0.2",
|
|
99
100
|
"vite": "^8.3.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { a as describeAgentResolvability, l as listAgentIds, d as setCustomAgents } from "./adapters-BdnLyJjf.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { s as loadConfigFile } from "./config-store-LqQ7MuyV.js";
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { r as execFileSync } from "./child-process-safe-CbQnyh7D.js";
|
|
2
|
-
//#region server/git/core/git-version-core.ts
|
|
3
|
-
var NEW_WORK_ISOLATION_FLOOR = Object.freeze({
|
|
4
|
-
major: 2,
|
|
5
|
-
minor: 48
|
|
6
|
-
});
|
|
7
|
-
var NEW_WORK_ISOLATION_FLOOR_LABEL = `${NEW_WORK_ISOLATION_FLOOR.major}.${NEW_WORK_ISOLATION_FLOOR.minor}`;
|
|
8
|
-
var WHOLE_RANGE_CONSEQUENCE = "a team re-review cannot single out the author's new work and reviews the whole pull request range";
|
|
9
|
-
var GIT_UPDATE_HINT = `Update git to ${NEW_WORK_ISOLATION_FLOOR_LABEL} or newer`;
|
|
10
|
-
var UNKNOWN_GIT_VERSION = Object.freeze({
|
|
11
|
-
version: null,
|
|
12
|
-
isTooOldToIsolateNewWork: false
|
|
13
|
-
});
|
|
14
|
-
function gitVersionReport(versionOutput) {
|
|
15
|
-
const match = /^git version (\d+)\.(\d+)(?:\.(\d+))?/.exec(versionOutput?.trim() ?? "");
|
|
16
|
-
if (!match) return UNKNOWN_GIT_VERSION;
|
|
17
|
-
const [, major = "", minor = "", patch] = match;
|
|
18
|
-
const isBelowFloorMajor = Number(major) < NEW_WORK_ISOLATION_FLOOR.major;
|
|
19
|
-
const isBelowFloorMinor = Number(major) === NEW_WORK_ISOLATION_FLOOR.major && Number(minor) < NEW_WORK_ISOLATION_FLOOR.minor;
|
|
20
|
-
return {
|
|
21
|
-
version: [
|
|
22
|
-
major,
|
|
23
|
-
minor,
|
|
24
|
-
patch
|
|
25
|
-
].filter((part) => part !== void 0).join("."),
|
|
26
|
-
isTooOldToIsolateNewWork: isBelowFloorMajor || isBelowFloorMinor
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function gitBootWarning(report) {
|
|
30
|
-
if (!report.isTooOldToIsolateNewWork) return null;
|
|
31
|
-
return `[git] git ${report.version} is older than ${NEW_WORK_ISOLATION_FLOOR_LABEL}, so ${WHOLE_RANGE_CONSEQUENCE}. ${GIT_UPDATE_HINT}.`;
|
|
32
|
-
}
|
|
33
|
-
function gitDoctorRows(report) {
|
|
34
|
-
const versionRow = ["git", report.version ?? "unknown"];
|
|
35
|
-
if (!report.isTooOldToIsolateNewWork) return [versionRow];
|
|
36
|
-
return [versionRow, ["hint", `${GIT_UPDATE_HINT}: on an older one ${WHOLE_RANGE_CONSEQUENCE}`]];
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region server/git/git-version.ts
|
|
40
|
-
function readGitVersionOutput() {
|
|
41
|
-
return execFileSync("git", ["--version"], {
|
|
42
|
-
encoding: "utf8",
|
|
43
|
-
timeout: 3e3
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function probeGitVersion({ readVersionOutput = readGitVersionOutput } = {}) {
|
|
47
|
-
try {
|
|
48
|
-
return gitVersionReport(readVersionOutput());
|
|
49
|
-
} catch {
|
|
50
|
-
return gitVersionReport(null);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function warnWhenGitIsTooOld({ probe = probeGitVersion, log = console } = {}) {
|
|
54
|
-
const warning = gitBootWarning(probe());
|
|
55
|
-
if (warning !== null) log.warn(warning);
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
export { warnWhenGitIsTooOld as n, gitDoctorRows as r, probeGitVersion as t };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { i as execSync } from "./child-process-safe-CbQnyh7D.js";
|
|
2
|
-
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
3
|
-
//#region server/sandbox/core/sandbox-deps-core.ts
|
|
4
|
-
var LINUX_SANDBOX_BINARIES = Object.freeze([
|
|
5
|
-
"bwrap",
|
|
6
|
-
"socat",
|
|
7
|
-
"rg"
|
|
8
|
-
]);
|
|
9
|
-
var NO_SANDBOX_BINARIES = Object.freeze([]);
|
|
10
|
-
var SANDBOX_INSTALL_HINT = "Install bubblewrap, socat and ripgrep, for example: sudo apt install bubblewrap socat ripgrep";
|
|
11
|
-
var SANDBOXED_WORK = "guarded sessions and factory checks";
|
|
12
|
-
function requiredSandboxBinaries(platform) {
|
|
13
|
-
return platform === "linux" ? LINUX_SANDBOX_BINARIES : NO_SANDBOX_BINARIES;
|
|
14
|
-
}
|
|
15
|
-
function sandboxDependencyReport({ platform, binariesOnPath }) {
|
|
16
|
-
const requiredBinaries = requiredSandboxBinaries(platform);
|
|
17
|
-
const missingBinaries = requiredBinaries.filter((binary) => !binariesOnPath.has(binary));
|
|
18
|
-
return {
|
|
19
|
-
platform,
|
|
20
|
-
requiredBinaries,
|
|
21
|
-
missingBinaries,
|
|
22
|
-
installHint: missingBinaries.length > 0 ? SANDBOX_INSTALL_HINT : null
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function namesList(names) {
|
|
26
|
-
if (names.length <= 1) return names.join("");
|
|
27
|
-
return `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
|
|
28
|
-
}
|
|
29
|
-
function missingBinariesPhrase(report) {
|
|
30
|
-
return `${namesList(report.missingBinaries)} ${report.missingBinaries.length === 1 ? "is" : "are"} not on PATH`;
|
|
31
|
-
}
|
|
32
|
-
function sandboxSpawnRefusal(report) {
|
|
33
|
-
if (report.missingBinaries.length === 0) return null;
|
|
34
|
-
return `not started: the guardrails need ${namesList(report.requiredBinaries)}, and ${missingBinariesPhrase(report)}. ${report.installHint}`;
|
|
35
|
-
}
|
|
36
|
-
function sandboxBootWarning(report) {
|
|
37
|
-
if (report.missingBinaries.length === 0) return null;
|
|
38
|
-
return `[guardrails] ${missingBinariesPhrase(report)}, so ${SANDBOXED_WORK} will refuse to start. ${report.installHint}`;
|
|
39
|
-
}
|
|
40
|
-
function sandboxDoctorRows(report) {
|
|
41
|
-
if (report.requiredBinaries.length === 0) return [["guardrails", `nothing to check on ${report.platform}`]];
|
|
42
|
-
const binaryRows = report.requiredBinaries.map((binary) => [binary, report.missingBinaries.includes(binary) ? "MISSING" : "found"]);
|
|
43
|
-
if (report.installHint === null) return binaryRows;
|
|
44
|
-
return [...binaryRows, ["hint", report.installHint]];
|
|
45
|
-
}
|
|
46
|
-
function sandboxInstallNotice(report) {
|
|
47
|
-
if (report.installHint === null) return null;
|
|
48
|
-
return `glimmervoid: ${missingBinariesPhrase(report)}; ${SANDBOXED_WORK} need ${namesList(report.requiredBinaries)}. ${report.installHint}`;
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region server/sandbox/sandbox-deps.ts
|
|
52
|
-
function probeSandboxDependencies({ platform = process.platform, exec = execSync } = {}) {
|
|
53
|
-
return sandboxDependencyReport({
|
|
54
|
-
platform,
|
|
55
|
-
binariesOnPath: new Set(requiredSandboxBinaries(platform).filter((binary) => resolvePathCommandMatches(binary, {
|
|
56
|
-
platform,
|
|
57
|
-
exec
|
|
58
|
-
}).length > 0))
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function checkSandboxDependencies({ probe = probeSandboxDependencies, log = console } = {}) {
|
|
62
|
-
const report = probe();
|
|
63
|
-
const warning = sandboxBootWarning(report);
|
|
64
|
-
if (warning !== null) log.warn(warning);
|
|
65
|
-
const refusal = sandboxSpawnRefusal(report);
|
|
66
|
-
return () => refusal;
|
|
67
|
-
}
|
|
68
|
-
var allowSandboxedSpawn = () => null;
|
|
69
|
-
//#endregion
|
|
70
|
-
export { sandboxInstallNotice as a, sandboxDoctorRows as i, checkSandboxDependencies as n, probeSandboxDependencies as r, allowSandboxedSpawn as t };
|