agent.libx.js 0.93.31 → 0.93.32
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/cli/cli.ts +4 -2
- package/dist/cli.js +8 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/cli/cli.ts
CHANGED
|
@@ -113,7 +113,7 @@ function parseReasoning(raw: string): ReasoningEffort {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
export function parseArgs(argv: string[]): Args {
|
|
116
|
-
const a: Args = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: undefined, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: 'text', duplex: false, voice: false };
|
|
116
|
+
const a: Args = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: undefined, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: 'text', duplex: false, voice: false, scratch: true };
|
|
117
117
|
const rest: string[] = [];
|
|
118
118
|
// read the value that follows a flag, failing loudly if it's missing (instead of a surprise default)
|
|
119
119
|
const val = (i: number, flag: string): string => { const v = argv[i]; if (v === undefined) throw new Error(`${flag} requires a value`); return v; };
|
|
@@ -142,6 +142,7 @@ export function parseArgs(argv: string[]): Args {
|
|
|
142
142
|
else if (x === '--yes' || x === '-y') a.yes = true;
|
|
143
143
|
else if (x === '--vfs' || x === '--sandbox') a.vfs = true;
|
|
144
144
|
else if (x === '--scratch') a.scratch = true;
|
|
145
|
+
else if (x === '--no-scratch') a.scratch = false;
|
|
145
146
|
else if (x === '--boddb') a.boddb = val(++i, x);
|
|
146
147
|
else if (x === '--seed') a.seed = true;
|
|
147
148
|
else if (x === '--shell') a.shell = true;
|
|
@@ -195,7 +196,8 @@ Flags:
|
|
|
195
196
|
--no-stream disable token streaming
|
|
196
197
|
(default: disk mode — full real filesystem access, like Claude Code)
|
|
197
198
|
--vfs, --sandbox sandbox mode: work over an in-memory copy of cwd — real disk is NEVER modified
|
|
198
|
-
--scratch
|
|
199
|
+
--no-scratch disable scratch (on by default): paginate oversized tool output → recoverable
|
|
200
|
+
scratch files (peek via Grep/Read/Ask) instead of a lossy crop
|
|
199
201
|
--boddb <dir> database-backed workspace: files live in a persistent bod-db store at <dir>,
|
|
200
202
|
surviving across runs — real disk is NEVER modified (DB-native; add --seed below)
|
|
201
203
|
--seed with --boddb: hydrate the store from cwd on the first run (empty DB) only
|
package/dist/cli.js
CHANGED
|
@@ -1620,7 +1620,7 @@ var init_tools_shell = __esm({
|
|
|
1620
1620
|
// cli/cli.ts
|
|
1621
1621
|
import { createInterface } from "readline/promises";
|
|
1622
1622
|
import { existsSync as existsSync8, readFileSync as readFileSync5, appendFileSync, mkdirSync as mkdirSync7, writeFileSync as writeFileSync6, readdirSync as readdirSync2, statSync as statSync3 } from "fs";
|
|
1623
|
-
import { homedir as homedir5, tmpdir } from "os";
|
|
1623
|
+
import { homedir as homedir5, tmpdir as tmpdir2 } from "os";
|
|
1624
1624
|
|
|
1625
1625
|
// cli/clipboard.ts
|
|
1626
1626
|
import { execFileSync } from "child_process";
|
|
@@ -5600,7 +5600,7 @@ function defaultOpenBrowser(url) {
|
|
|
5600
5600
|
import { randomUUID } from "crypto";
|
|
5601
5601
|
import { resolve, basename, join as join3 } from "path";
|
|
5602
5602
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
5603
|
-
import { platform, arch, release, userInfo, homedir } from "os";
|
|
5603
|
+
import { platform, arch, release, userInfo, homedir, tmpdir } from "os";
|
|
5604
5604
|
init_tools_shell();
|
|
5605
5605
|
import { BodDB as BodDB2 } from "@bod.ee/db";
|
|
5606
5606
|
var DEFAULT_TOOLS = ["bash", "Read", "Edit", "Write", "Grep", "Glob", "MultiEdit", "ApplyEdits", "RepoMap", "TodoWrite"];
|
|
@@ -5738,7 +5738,7 @@ Reference files in them by their mount path (the left side).`;
|
|
|
5738
5738
|
const jobs = new ShellJobRegistry({ cwd, killOnExit: true });
|
|
5739
5739
|
realShell = [makeRealShellTool({ cwd, registry: jobs }), ...makeShellJobTools(jobs)];
|
|
5740
5740
|
}
|
|
5741
|
-
const scratchDir = o.scratch ? o.scratchDir ?? `${cwd}/.agent/scratch` : void 0;
|
|
5741
|
+
const scratchDir = o.scratch ? o.scratchDir ?? (virtual ? `${cwd}/.agent/scratch` : `${tmpdir()}/agentx-scratch-${process.pid}`) : void 0;
|
|
5742
5742
|
const scratch = scratchDir ? new Scratch(fs, { dir: scratchDir }) : void 0;
|
|
5743
5743
|
return new Agent({
|
|
5744
5744
|
ai: o.ai,
|
|
@@ -7998,7 +7998,7 @@ function parseReasoning(raw) {
|
|
|
7998
7998
|
throw new Error(`invalid --reasoning: ${raw} (use off|low|medium|high or a token budget)`);
|
|
7999
7999
|
}
|
|
8000
8000
|
function parseArgs(argv) {
|
|
8001
|
-
const a = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: void 0, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: "text", duplex: false, voice: false };
|
|
8001
|
+
const a = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: void 0, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: "text", duplex: false, voice: false, scratch: true };
|
|
8002
8002
|
const rest = [];
|
|
8003
8003
|
const val = (i, flag) => {
|
|
8004
8004
|
const v = argv[i];
|
|
@@ -8026,6 +8026,7 @@ function parseArgs(argv) {
|
|
|
8026
8026
|
else if (x === "--yes" || x === "-y") a.yes = true;
|
|
8027
8027
|
else if (x === "--vfs" || x === "--sandbox") a.vfs = true;
|
|
8028
8028
|
else if (x === "--scratch") a.scratch = true;
|
|
8029
|
+
else if (x === "--no-scratch") a.scratch = false;
|
|
8029
8030
|
else if (x === "--boddb") a.boddb = val(++i, x);
|
|
8030
8031
|
else if (x === "--seed") a.seed = true;
|
|
8031
8032
|
else if (x === "--shell") a.shell = true;
|
|
@@ -8079,7 +8080,8 @@ Flags:
|
|
|
8079
8080
|
--no-stream disable token streaming
|
|
8080
8081
|
(default: disk mode \u2014 full real filesystem access, like Claude Code)
|
|
8081
8082
|
--vfs, --sandbox sandbox mode: work over an in-memory copy of cwd \u2014 real disk is NEVER modified
|
|
8082
|
-
--scratch
|
|
8083
|
+
--no-scratch disable scratch (on by default): paginate oversized tool output \u2192 recoverable
|
|
8084
|
+
scratch files (peek via Grep/Read/Ask) instead of a lossy crop
|
|
8083
8085
|
--boddb <dir> database-backed workspace: files live in a persistent bod-db store at <dir>,
|
|
8084
8086
|
surviving across runs \u2014 real disk is NEVER modified (DB-native; add --seed below)
|
|
8085
8087
|
--seed with --boddb: hydrate the store from cwd on the first run (empty DB) only
|
|
@@ -9086,7 +9088,7 @@ async function repl(args, ai, cfg, cwd) {
|
|
|
9086
9088
|
};
|
|
9087
9089
|
const pendingImages = [];
|
|
9088
9090
|
const grabClipboardAttachment = () => {
|
|
9089
|
-
const dir = join9(
|
|
9091
|
+
const dir = join9(tmpdir2(), "agentx-pasted");
|
|
9090
9092
|
try {
|
|
9091
9093
|
mkdirSync7(dir, { recursive: true });
|
|
9092
9094
|
} catch {
|