agent.libx.js 0.94.4 → 0.94.5
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 +1 -1
- package/dist/cli.js +12 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ agentx --resume <id> "…" # resume a specific session
|
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
- **Filesystem + Shell** — by default the CLI has **full real-filesystem access like Claude Code** (root `/` is the machine root, the launch dir is the working dir, absolute host paths and above-cwd reach both work) with a **real `/bin/sh`** (`Shell` tool) so the agent can run git, bun, node, curl, and any installed binary. Secrets (`.env`, `.ssh`, keys, `.git`) stay hidden by the jail; env secrets are scrubbed from the child shell. `--sandbox` instead operates over an in-memory copy of the working dir with a VFS-only `bash` — the real disk is never touched. `--boddb <dir>` runs over a **persistent database workspace** (a bod-db store at `<dir>` — `meta.db` tree + `files/` bytes) that survives across runs while the real disk stays untouched; DB-native by default, or add `--seed` to hydrate it from cwd on the first run. `--no-shell` forces the VFS bash in disk mode. (`/sandbox` shows the active mode.)
|
|
107
|
-
- **Sessions** — every conversation persists to `./.agent/sessions/<id>.json`; `--continue`/`--resume` (and `/sessions`, `/resume`) pick it back up, *with memory across turns* — a REPL turn sees the previous one. A global symlink index at `~/.agent/sessions/` enables cross-project lookup: `--resume 090715-
|
|
107
|
+
- **Sessions** — every conversation persists to `./.agent/sessions/<id>.json`; `--continue`/`--resume` (and `/sessions`, `/resume`) pick it back up, *with memory across turns* — a REPL turn sees the previous one. A global symlink index at `~/.agent/sessions/` enables cross-project lookup: `--resume 090715-myproject` resolves from any directory, and `/sessions all` lists every project's sessions in one picker.
|
|
108
108
|
- **Diffs** — every `Edit`/`Write`/`MultiEdit` renders a colorized `+/-` diff (TTY-gated; plain when piped).
|
|
109
109
|
- **Slash commands** — `/help /tools /model /compact /clear /sessions /resume /commands /init`; user-defined `./.agent/commands/<name>.md` are invokable directly as `/<name>` (the same registry the model's `SlashCommand` tool uses).
|
|
110
110
|
- **Project instructions** — `./AGENTS.md` (or `CLAUDE.md`) auto-loads into every run; `/init` scaffolds one.
|
package/dist/cli.js
CHANGED
|
@@ -6581,7 +6581,17 @@ var SessionStore = class {
|
|
|
6581
6581
|
const d = new Date(now5);
|
|
6582
6582
|
const p = (n, w = 2) => String(n).padStart(w, "0");
|
|
6583
6583
|
const slug2 = (cwd ?? process.cwd()).split("/").pop()?.replace(/[^A-Za-z0-9_-]/g, "") || "session";
|
|
6584
|
-
|
|
6584
|
+
let id = `${d.getFullYear()}${p(d.getMonth() + 1)}${p(d.getDate())}-${p(d.getHours())}${p(d.getMinutes())}${p(d.getSeconds())}-${slug2}`;
|
|
6585
|
+
if (existsSync5(this.dir) && existsSync5(join6(this.dir, `${id}.json`))) {
|
|
6586
|
+
for (let i = 2; i <= 99; i++) {
|
|
6587
|
+
const c = `${id}-${i}`;
|
|
6588
|
+
if (!existsSync5(join6(this.dir, `${c}.json`))) {
|
|
6589
|
+
id = c;
|
|
6590
|
+
break;
|
|
6591
|
+
}
|
|
6592
|
+
}
|
|
6593
|
+
}
|
|
6594
|
+
return id;
|
|
6585
6595
|
}
|
|
6586
6596
|
/** A session id must be one safe path segment — blocks `../`-style traversal via --resume/load/save. */
|
|
6587
6597
|
safeId(id) {
|
|
@@ -7771,7 +7781,7 @@ function applyKey(s, key, str) {
|
|
|
7771
7781
|
}
|
|
7772
7782
|
if (s.vim === "normal" && s.buf.length) return "none";
|
|
7773
7783
|
if (s.buf.length) return "cancel";
|
|
7774
|
-
if (wasEsc) return "rewind";
|
|
7784
|
+
if (wasEsc || key?.sequence === "\x1B\x1B") return "rewind";
|
|
7775
7785
|
s.prevEsc = true;
|
|
7776
7786
|
return "none";
|
|
7777
7787
|
// first Esc on empty → arm double-Esc
|