@chances-ai/tools 3.2.1 → 3.2.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/builtins/bash.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAGpD,eAAO,MAAM,QAAQ,EAAE,IAqBtB,CAAC"}
1
+ {"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/builtins/bash.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAoLpD,eAAO,MAAM,QAAQ,EAAE,IAoDtB,CAAC"}
@@ -1,25 +1,219 @@
1
- import { spawn } from "node:child_process";
2
- import { str } from "./_shared.js";
1
+ import { mkdirSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { native } from "@chances-ai/native";
4
+ import { createId } from "@chances-ai/runtime";
5
+ import { optNum, str } from "./_shared.js";
6
+ /**
7
+ * `bash` runs a shell command in a real PTY when the native addon is
8
+ * loaded — programs see `isatty(stdout) === true`, signals propagate to
9
+ * the process group with a 100 ms grace before SIGKILL. When the addon is
10
+ * missing (binary not staged for the host platform yet) the facade falls
11
+ * back to `child_process.spawn`; the user-visible contract is the same,
12
+ * minus the PTY semantics.
13
+ *
14
+ * Output handling is modelled on claude-code's bash tool: ANSI codes are
15
+ * stripped before the model sees the body (they're tokens of noise for an
16
+ * LLM); when the stripped body would exceed `INLINE_OUTPUT_BYTES`, the
17
+ * full payload is persisted to a per-call file under
18
+ * `.chances/tool-results/` and the inline preview points at it. Per-call
19
+ * `timeout` defaults to 2 min and caps at 10 min (also claude-code
20
+ * defaults — long enough for builds and tests, short enough to fail loud
21
+ * on a hung command).
22
+ */
23
+ /** Default 2 min, max 10 min — claude-code's `BASH_DEFAULT_TIMEOUT_MS` /
24
+ * `BASH_MAX_TIMEOUT_MS` (timeouts.ts:2-39). The model can override per
25
+ * call via the `timeout` arg (in seconds). */
26
+ const DEFAULT_TIMEOUT_MS = 120_000;
27
+ const MAX_TIMEOUT_MS = 600_000;
28
+ /** Inline payload cap. Larger outputs get persisted; matches claude-code's
29
+ * `BASH_MAX_OUTPUT_LENGTH` default of 30 000 chars. */
30
+ const INLINE_OUTPUT_BYTES = 30_000;
31
+ /**
32
+ * Matches the ANSI escape families that show up in real tool output:
33
+ * - **CSI** (`ESC [ … final`) — colour SGR, cursor moves, clear codes,
34
+ * DEC private (`ESC [ ? 25 h`), SGR mouse (`ESC [ < 0 ; 10 ; 20 M`).
35
+ * The leading `[ -?]*` parameter-byte class covers `?`, `<`, `>`, `=`
36
+ * so private-mode and mouse forms strip cleanly.
37
+ * - **String controls** — DCS / OSC / SOS / PM / APC, all of the form
38
+ * `ESC <intro> … ST` where ST is either ST (`ESC \`) or BEL (`\x07`).
39
+ * Round 1 codex (NICE #8) flagged that DCS/PM/APC were uncovered;
40
+ * sixel and kitty-graphics output uses these and would leave binary
41
+ * payloads in model context if not stripped.
42
+ * - **Two-byte ESC sequences** (`ESC <single-final>`) — RIS (`ESC c`),
43
+ * DECSC (`ESC 7`), DECRC (`ESC 8`), DECPAM (`ESC =`), DECPNM (`ESC >`),
44
+ * IND/NEL/HTS/RI etc. The final-byte class `[ -~]` covers the full
45
+ * printable-ASCII range (0x20-0x7E) — ECMA-48's Fe + Fp + Fs final
46
+ * bytes plus intermediate bytes. Two empirical refinements:
47
+ * - Round 2 codex: `[@-_a-~]` dropped `ESC c` (RIS).
48
+ * - Smoke test after Round 2 fix: `[@-_a-~]` still dropped `ESC =`
49
+ * (DECPAM, 0x3D) because 0x3D sits in the Fp range. `[ -~]` is
50
+ * broad enough to cover everything legitimate; the risk of
51
+ * stripping a literal `ESC <printable>` from real text output
52
+ * is negligible (modern shells don't emit raw ESC followed by
53
+ * a printable text char outside of a control sequence).
54
+ *
55
+ * Still NOT exhaustive (e.g. C1 8-bit equivalents emitted as raw
56
+ * `\x9B`/`\x9D`/etc — vanishingly rare in modern UTF-8 PTY output),
57
+ * but a deliberate trade vs pulling a dep. If we see those in the
58
+ * wild, switch to a known-good stripper at that point.
59
+ */
60
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: stripping control codes is the point
61
+ const ANSI_RE = /\x1B\[[ -?]*[@-~]|\x1B[PX\]^_][\s\S]*?(?:\x07|\x1B\\)|\x1B[ -~]/g;
62
+ function stripAnsi(s) {
63
+ return s.replace(ANSI_RE, "");
64
+ }
65
+ /** PTY canonical mode emits `\r\n`; normalise to `\n` so downstream
66
+ * grep / diff against tool output behaves the way the model expects. */
67
+ function normaliseLineEndings(s) {
68
+ // Strip the carriage return that precedes a newline; leave bare \r
69
+ // alone since some programs (progress bars) use it standalone and the
70
+ // semantic is "redraw this line" — which the model can still reason
71
+ // about if it sees it.
72
+ return s.replace(/\r\n/g, "\n");
73
+ }
74
+ function cleanOutput(raw) {
75
+ return normaliseLineEndings(stripAnsi(raw));
76
+ }
77
+ function clampTimeoutMs(timeoutSec) {
78
+ if (timeoutSec === undefined)
79
+ return DEFAULT_TIMEOUT_MS;
80
+ const ms = Math.floor(timeoutSec * 1000);
81
+ if (!Number.isFinite(ms) || ms <= 0)
82
+ return DEFAULT_TIMEOUT_MS;
83
+ return Math.min(ms, MAX_TIMEOUT_MS);
84
+ }
85
+ /** Best-effort persistence — returns the absolute path on success, `null`
86
+ * when the filesystem rejects the write (e.g. read-only workspace). The
87
+ * tool still returns the inline preview either way, so persistence
88
+ * failure degrades to "the model only sees the head"; it does not fail
89
+ * the command.
90
+ *
91
+ * Persisted with restrictive POSIX permissions (0o700 dir, 0o600 file)
92
+ * so tool output — which can legitimately contain secrets pulled out of
93
+ * a failed build / env dump — isn't group/world-readable by default.
94
+ * Round 1 codex finding (SHOULD-FIX #6).
95
+ *
96
+ * **Windows caveat (Round 2 codex SHOULD-FIX).** Node's `fs` `mode` flag
97
+ * only affects the read-only bit on Windows (see node:fs docs); ACL-
98
+ * based per-user/group/other distinctions are not enforced via this
99
+ * argument. The persisted file ends up under the user's workspace,
100
+ * which typically inherits the user-profile ACL — but if the workspace
101
+ * is on a share with permissive ACLs the output may be readable by
102
+ * others. Pure-Windows hardening (e.g. an explicit DACL via
103
+ * `windows-sys::SetNamedSecurityInfoW`) is a follow-up; current
104
+ * audience is POSIX-first dev environments. */
105
+ function persistFullOutput(workspaceRoot, body) {
106
+ try {
107
+ const dir = join(workspaceRoot, ".chances", "tool-results", createId("bash"));
108
+ mkdirSync(dir, { recursive: true, mode: 0o700 });
109
+ const path = join(dir, "output.txt");
110
+ writeFileSync(path, body, { mode: 0o600 });
111
+ return path;
112
+ }
113
+ catch {
114
+ return null;
115
+ }
116
+ }
117
+ /** Format the final tool body. Layout when oversized:
118
+ * `<status prefix line, if any>`
119
+ * `[output truncated: showing first 30 KB of 123 KB; full output saved to <path>]`
120
+ * `<inline preview>`
121
+ *
122
+ * The truncation banner is the first thing after any status prefix so
123
+ * the model can tell at a glance whether it's looking at the full
124
+ * payload or a head.
125
+ *
126
+ * **`runtimeDropped` is the Rust layer's `outputTruncatedBytes`** —
127
+ * bytes dropped at the 64 MiB Rust ceiling BEFORE the JS layer ever
128
+ * sees them. The banner has to surface this honestly: if we said
129
+ * "full output saved to <path>" while the runtime already silently
130
+ * dropped 10 GB, the model would assume the persisted file is the
131
+ * whole story. Round 3 codex SHOULD-FIX. */
132
+ function formatBody(cleaned, workspaceRoot, runtimeDropped) {
133
+ if (cleaned.length <= INLINE_OUTPUT_BYTES && runtimeDropped === 0) {
134
+ return { body: cleaned, persistedPath: null, persistedSize: null };
135
+ }
136
+ const inlineBytes = INLINE_OUTPUT_BYTES;
137
+ const totalBytes = cleaned.length;
138
+ const head = cleaned.length > inlineBytes ? cleaned.slice(0, inlineBytes) : cleaned;
139
+ const headStr = (Math.min(inlineBytes, cleaned.length) / 1024).toFixed(0);
140
+ const totalStr = (totalBytes / 1024).toFixed(0);
141
+ // Caveat for the model if the runtime layer ALREADY dropped bytes —
142
+ // the persisted file isn't actually the full story in that case.
143
+ const runtimeNote = runtimeDropped > 0
144
+ ? `; runtime also dropped ${(runtimeDropped / (1024 * 1024)).toFixed(1)} MiB past the 64 MiB cap (NOT included in the persisted file)`
145
+ : "";
146
+ // If the cleaned body fits inline AND the only signal is runtime
147
+ // drop, we can return the inline body with just a one-line warning
148
+ // (no persistence needed — the cleaned body IS the full visible
149
+ // story, we just want the model to know it's incomplete).
150
+ if (cleaned.length <= inlineBytes) {
151
+ return {
152
+ body: `[runtime dropped ${(runtimeDropped / (1024 * 1024)).toFixed(1)} MiB past the 64 MiB cap]\n${cleaned}`,
153
+ persistedPath: null,
154
+ persistedSize: null,
155
+ };
156
+ }
157
+ const persistedPath = persistFullOutput(workspaceRoot, cleaned);
158
+ const banner = persistedPath
159
+ ? `[output truncated: showing first ${headStr} KB of ${totalStr} KB; full output saved to ${persistedPath}${runtimeNote}]`
160
+ : `[output truncated: showing first ${headStr} KB of ${totalStr} KB; persistence failed, remainder dropped${runtimeNote}]`;
161
+ return {
162
+ body: `${banner}\n${head}`,
163
+ persistedPath,
164
+ persistedSize: totalBytes,
165
+ };
166
+ }
3
167
  export const bashTool = {
4
168
  name: "bash",
5
- description: "Run a shell command in the workspace.",
169
+ description: "Run a shell command via a real PTY (ANSI passthrough at the runtime layer; output is stripped of escape codes before being returned to you to save tokens). Output is capped at 30 KB inline; longer outputs are persisted to .chances/tool-results/<id>/output.txt and the inline preview includes the path. Default timeout 120 s, max 600 s. Cancelled / timed-out runs return ok:false with a status prefix.",
6
170
  category: "shell",
7
- parameters: { type: "object", properties: { command: { type: "string" } }, required: ["command"] },
171
+ parameters: {
172
+ type: "object",
173
+ properties: {
174
+ command: { type: "string", description: "Shell command to execute" },
175
+ timeout: {
176
+ type: "number",
177
+ description: "Optional per-call timeout in seconds (default 120, max 600).",
178
+ },
179
+ },
180
+ required: ["command"],
181
+ },
8
182
  summarize: (args) => `bash: ${str(args, "command")}`,
9
183
  async execute(args, ctx) {
10
184
  const command = str(args, "command");
11
- return new Promise((resolveP) => {
12
- const child = spawn(command, { cwd: ctx.cwd, shell: true, signal: ctx.signal });
13
- let out = "";
14
- let err = "";
15
- child.stdout.on("data", (d) => (out += d.toString()));
16
- child.stderr.on("data", (d) => (err += d.toString()));
17
- child.on("error", (e) => resolveP({ ok: false, output: e.message }));
18
- child.on("close", (code) => {
19
- const body = [out, err].filter(Boolean).join("\n").slice(0, 60_000);
20
- resolveP({ ok: code === 0, output: body || `(exit ${code})` });
21
- });
185
+ const timeoutMs = clampTimeoutMs(optNum(args, "timeout"));
186
+ const result = await native.ptyRun({
187
+ command,
188
+ cwd: ctx.cwd,
189
+ signal: ctx.signal,
190
+ timeoutMs,
22
191
  });
192
+ const cleaned = cleanOutput(result.output);
193
+ const { body } = formatBody(cleaned, ctx.workspaceRoot, result.outputTruncatedBytes);
194
+ // Status prefix is what the model reads first — must be unambiguous.
195
+ // Order matters: cancel beats timeout beats non-zero exit, because a
196
+ // user-initiated cancel might race with a timeout and the user
197
+ // intent is the more informative attribution.
198
+ if (result.cancelled) {
199
+ return { ok: false, output: prefix("(cancelled)", body) };
200
+ }
201
+ if (result.timedOut) {
202
+ return {
203
+ ok: false,
204
+ output: prefix(`(timed out after ${(timeoutMs / 1000).toFixed(0)}s)`, body),
205
+ };
206
+ }
207
+ if (result.exitCode === 0) {
208
+ return { ok: true, output: body || "(no output)" };
209
+ }
210
+ return {
211
+ ok: false,
212
+ output: prefix(`(exit ${result.exitCode ?? "unknown"})`, body),
213
+ };
23
214
  },
24
215
  };
216
+ function prefix(status, body) {
217
+ return body.length === 0 ? status : `${status}\n${body}`;
218
+ }
25
219
  //# sourceMappingURL=bash.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash.js","sourceRoot":"","sources":["../../src/builtins/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,GAAG,EAAE,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AC;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAErF,qEAAqE;QACrE,qEAAqE;QACrE,+DAA+D;QAC/D,8CAA8C;QAC9C,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;YACrB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,CAAC;QAC5D,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YACpB,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,MAAM,CAAC,oBAAoB,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC;aAC5E,CAAC;QACJ,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,IAAI,aAAa,EAAE,CAAC;QACrD,CAAC;QACD,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,MAAM,CAAC,SAAS,MAAM,CAAC,QAAQ,IAAI,SAAS,GAAG,EAAE,IAAI,CAAC;SAC/D,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,SAAS,MAAM,CAAC,MAAc,EAAE,IAAY;IAC1C,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,IAAI,EAAE,CAAC;AAC3D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chances-ai/tools",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -14,9 +14,9 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@chances-ai/runtime": "3.2.1",
18
- "@chances-ai/config": "3.2.1",
19
- "@chances-ai/native": "3.2.1"
17
+ "@chances-ai/runtime": "3.2.2",
18
+ "@chances-ai/config": "3.2.2",
19
+ "@chances-ai/native": "3.2.2"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsc -b",