@jabezpauls/agentbox 0.1.13 → 0.1.14
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/agentbox.mjs +24 -17
- package/package.json +1 -1
package/dist/agentbox.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// agentbox-cli v0.1.
|
|
2
|
+
// agentbox-cli v0.1.14
|
|
3
3
|
import { createRequire as __agentboxCreateRequire } from "node:module";
|
|
4
4
|
const require = __agentboxCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -3868,7 +3868,7 @@ function parseSize(raw2) {
|
|
|
3868
3868
|
}
|
|
3869
3869
|
|
|
3870
3870
|
// src/version.ts
|
|
3871
|
-
var VERSION = true ? "v0.1.
|
|
3871
|
+
var VERSION = true ? "v0.1.14" : "0.0.0-dev";
|
|
3872
3872
|
var STANDALONE = typeof __AGENTBOX_STANDALONE__ === "boolean" && __AGENTBOX_STANDALONE__;
|
|
3873
3873
|
var MIN_NODE_MAJOR = 20;
|
|
3874
3874
|
function nodeMajor(version = process.versions.node) {
|
|
@@ -11746,9 +11746,19 @@ function unitDir(env = process.env, home2 = os9.homedir()) {
|
|
|
11746
11746
|
const xdg = env.XDG_CONFIG_HOME;
|
|
11747
11747
|
return path26.join(xdg && path26.isAbsolute(xdg) ? xdg : path26.join(home2, ".config"), "systemd", "user");
|
|
11748
11748
|
}
|
|
11749
|
-
function
|
|
11750
|
-
|
|
11751
|
-
|
|
11749
|
+
function runningAsSea() {
|
|
11750
|
+
try {
|
|
11751
|
+
const sea = process.getBuiltinModule?.("node:sea");
|
|
11752
|
+
return typeof sea?.isSea === "function" && sea.isSea();
|
|
11753
|
+
} catch {
|
|
11754
|
+
return false;
|
|
11755
|
+
}
|
|
11756
|
+
}
|
|
11757
|
+
function isStandalone(execPath, script, sea = runningAsSea()) {
|
|
11758
|
+
return sea || script === void 0 || path26.resolve(script) === path26.resolve(execPath);
|
|
11759
|
+
}
|
|
11760
|
+
function execStart(execPath = process.execPath, script = process.argv[1], sea = runningAsSea()) {
|
|
11761
|
+
return isStandalone(execPath, script, sea) ? [execPath, "node", "run"] : [execPath, path26.resolve(script), "node", "run"];
|
|
11752
11762
|
}
|
|
11753
11763
|
function quote(arg) {
|
|
11754
11764
|
return `"${arg.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/%/g, "%%")}"`;
|
|
@@ -11822,11 +11832,8 @@ function regExe(env = process.env) {
|
|
|
11822
11832
|
const root = env.SystemRoot && path27.win32.isAbsolute(env.SystemRoot) ? env.SystemRoot : "C:\\Windows";
|
|
11823
11833
|
return path27.win32.join(root, "System32", "reg.exe");
|
|
11824
11834
|
}
|
|
11825
|
-
function
|
|
11826
|
-
|
|
11827
|
-
}
|
|
11828
|
-
function guiExecutable(execPath = process.execPath, script = process.argv[1]) {
|
|
11829
|
-
if (!standalone(execPath, script)) {
|
|
11835
|
+
function guiExecutable(execPath = process.execPath, script = process.argv[1], sea = runningAsSea()) {
|
|
11836
|
+
if (!isStandalone(execPath, script, sea)) {
|
|
11830
11837
|
return {
|
|
11831
11838
|
problem: "the Windows sign-in entry needs the standalone agentbox.exe and agentbox-node.exe (this is agentbox.mjs under Node, which would open a console window at every sign-in); run `agentbox node run` yourself, or install the standalone executables"
|
|
11832
11839
|
};
|
|
@@ -11838,8 +11845,8 @@ function guiExecutable(execPath = process.execPath, script = process.argv[1]) {
|
|
|
11838
11845
|
function runEntry(gui) {
|
|
11839
11846
|
return `"${gui}" node supervise`;
|
|
11840
11847
|
}
|
|
11841
|
-
function runCommandLine(execPath = process.execPath, script = process.argv[1]) {
|
|
11842
|
-
if (!
|
|
11848
|
+
function runCommandLine(execPath = process.execPath, script = process.argv[1], sea = runningAsSea()) {
|
|
11849
|
+
if (!isStandalone(execPath, script, sea)) return [execPath, path27.resolve(script), "node", "run"];
|
|
11843
11850
|
const dir = path27.dirname(execPath);
|
|
11844
11851
|
const exe = path27.basename(execPath).toLowerCase() === GUI_EXE ? path27.join(dir, CONSOLE_EXE) : execPath;
|
|
11845
11852
|
return [exe, "node", "run"];
|
|
@@ -12760,15 +12767,15 @@ async function runNode(o) {
|
|
|
12760
12767
|
if (checking || o.checkUpdates === false) return;
|
|
12761
12768
|
checking = true;
|
|
12762
12769
|
try {
|
|
12763
|
-
const
|
|
12770
|
+
const standalone = execStart().length === 3;
|
|
12764
12771
|
const gui = path30.join(path30.dirname(process.execPath), GUI_EXE);
|
|
12765
12772
|
const report = await checkForUpdate({
|
|
12766
12773
|
policy: policy.policy.updates,
|
|
12767
12774
|
running: o.version,
|
|
12768
12775
|
// Only the standalone executable replaces itself; agentbox.mjs under Node does not.
|
|
12769
|
-
nodePath:
|
|
12776
|
+
nodePath: standalone ? process.execPath : null,
|
|
12770
12777
|
// Windows: the windowless copy beside it, which the sign-in entry starts.
|
|
12771
|
-
...win &&
|
|
12778
|
+
...win && standalone && fs22.existsSync(gui) ? { nodeGuiPath: gui } : {},
|
|
12772
12779
|
...fs22.existsSync(herdrBin) ? { herdr: { path: herdrBin, version: HERDR_VERSION } } : {},
|
|
12773
12780
|
...installedClaude(claude) ? { claude: { path: claude.bin, version: installedClaude(claude), versionFile: claude.versionFile } } : {},
|
|
12774
12781
|
// Agents live in herdr: herdr and Claude Code are replaced only while none runs.
|
|
@@ -14392,12 +14399,12 @@ function nodeCredentials(env, platform = process.platform) {
|
|
|
14392
14399
|
}
|
|
14393
14400
|
return candidates.find((f) => fs26.existsSync(f)) ?? null;
|
|
14394
14401
|
}
|
|
14395
|
-
function signedUpdatesOnly(env, platform = process.platform,
|
|
14402
|
+
function signedUpdatesOnly(env, platform = process.platform, standalone = STANDALONE) {
|
|
14396
14403
|
const creds = nodeCredentials(env, platform);
|
|
14397
14404
|
if (creds) {
|
|
14398
14405
|
return `this machine is joined to a box as a node (${creds}), so agentbox here updates only from signed releases, never from a box: the node checks for them itself (\`updates\` in its policy.json), or see https://github.com/jabezpauls/agentbox/releases`;
|
|
14399
14406
|
}
|
|
14400
|
-
if (
|
|
14407
|
+
if (standalone) {
|
|
14401
14408
|
return "this is the standalone agentbox, which updates only from signed releases, never from a box; download the latest from https://github.com/jabezpauls/agentbox/releases";
|
|
14402
14409
|
}
|
|
14403
14410
|
return null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jabezpauls/agentbox",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.14",
|
|
5
5
|
"description": "agentbox from your own machine: sign in, attach, move files, mount the workspace.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/jabezpauls/agentbox/blob/main/docs/cli.md",
|