NCBM
0d71923472
tools: run batch continuations where their parent ran
2026-11-02 14:52:57 +08:00
NCBM
2729f12d26
tools: answer a call's shape before the confirm prompt
2026-11-02 14:34:30 +08:00
NCBM
5c13d10989
tools: model batch steps as nested executions
2026-11-02 14:21:26 +08:00
NCBM
7d6e367143
tools: keep tool output whole and let the request-prep pass cap it
...
run_argv, run_argv_batch, fetch, fetch_local, and the vcs tools now return
their output whole, so the request-prep cap trims it on the wire and names
its document. A fetched page or a long log reads on from the tool message,
with no re-fetch and no re-run.
The run_argv_batch run budget stays as an execution guard: it stops a
runaway batch from spawning further huge-output steps.
Co-authored-by: CommandCodeBot <noreply@commandcode.ai >
2026-10-29 14:13:36 +08:00
NCBM
6e69e5046c
test: cover the modifier combinations
...
Pins the parameter arithmetic on a few shapes (shift, alt, ctrl, shift+ctrl,
ctrl+alt), the Alt-without-a-CSI-form case, Ctrl+Space as NUL, and the three
combinations that stay errors (`<s-a>`, `<c-tab>`, `<c-s-tab>`).
2026-10-24 02:08:57 +08:00
NCBM
dbb68e7273
test: cover the key markers and the keys line
...
Pins the markers that used to be unreachable (s-tab, home, bs, pgup, f5, a
repeat, a literal `<`), the two shapes of a wrong marker (unknown name, bad
repeat) coming back as an error from the tool instead of being typed, and the
pretty line naming the keys it sent.
2026-10-24 02:03:40 +08:00
NCBM
bd1053a3bc
core/config: document default truncate_token everywhere
2026-08-11 19:42:10 +08:00
NCBM
df8f6bf959
core/tools: rename run_command_batch to run_argv_batch (steps/argv keys)
2026-08-04 21:40:25 +08:00
NCBM
d698fbf06f
core/tools: rename run_command to run_argv (argv param)
2026-08-04 21:38:20 +08:00
NCBM
23f7b4e299
core/tools: clear argv error when run_command gets a string
2026-08-04 20:35:22 +08:00
NCBM
12c8adda3a
test/tools: catalog, grants, and async tool helpers
2026-07-24 14:57:03 +08:00
NCBM
a677e06af4
core/tools: add ask_into_pty for human-local PTY input
...
Prompt the human (optional no-echo secret) and write only to the PTY.
Tool results never include the answer so secrets stay off external APIs.
Empty/Ctrl-C cancel without writing; submit defaults to trailing newline.
2026-07-20 02:47:19 +08:00
NCBM
f51d11d46f
core/tools/process: add run_command_batch with pipe_out and mix_stderr
2026-07-19 02:46:21 +08:00
NCBM
edd54a427c
core/tools/process: drop host TTY restore; rely on CSI sanitize only
2026-07-18 16:26:23 +08:00
NCBM
896dc98d20
core/tools/process: skip host TTY restore when no PTY closed
2026-07-18 16:14:19 +08:00
NCBM
29230af911
core/tools/process: split write_pty (literal) vs write_pty_keys
2026-07-18 15:46:11 +08:00
NCBM
4ff03d8135
core/tools/process: host TTY restore, sanitize read_pty CSI, write_pty key escapes
2026-07-18 15:20:36 +08:00
NCBM
fbba2c2a14
core/tools+test: make process and path checks Windows-portable
...
Use sys.executable for process tests; normalize denylist/glob paths; skip readline when missing.
2026-07-15 20:20:25 +08:00
NCBM
c466d09173
core/process: cross-platform PTY via backend and pywinpty
...
POSIX openpty/fork and Windows ConPTY; win32 marker dep plus typings stub.
2026-07-15 20:01:43 +08:00
NCBM
0dc5c876ee
core/process+cli: PTY hardening and config/log polish
...
Mark PTY master FD non-inheritable; run read_pty/close_pty via to_thread;
close_all PTY sessions on chat exit. Add --log-level; clearer invalid
TOML errors. Keep export/status free of provider secrets.
2026-07-15 13:48:58 +08:00
NCBM
5c13e06427
ci/lint: per-file ignores for tests in ruff and basedpyright
...
Relax ANN/ARG/PLR/C901 and related rules under tests/**; silence noisy
basedpyright reports for test fakes and private helpers.
2026-07-15 10:35:30 +08:00
NCBM
4f1e99fa4b
core/tools/process: timeout partial output, per-session PTY budget
...
run_command keeps stdout/stderr on timeout with timed_out=true;
open_pty uses shlex.join; PTY output budget is per-session.
2026-07-14 20:07:07 +08:00
NCBM
a634021a80
core/cli: interactive continue prompts for loop and PTY limits
...
on_limit raises tool-round allowance; PTY session/budget limits can
prompt to raise; MaxRoundsEvent.continued marks extended runs.
2026-07-14 19:53:34 +08:00
NCBM
1b53b415b6
core/tools/process: harden PTY sessions for agents
...
Structured alive/exit_code/data reads; until= wait; SIGTERM then
SIGKILL; exec-fail marker; session limit, idle TTL, output budget.
2026-07-14 19:47:32 +08:00
NCBM
73c11cee36
core/tools/process: run_command stdin/env and write_pty
...
Optional stdin and env overlay for run_command; write_pty for
interactive PTY input.
2026-07-14 19:36:46 +08:00
NCBM
f45af76c9b
test/tools: cover workspace, file, run_command and PTY
2026-07-14 18:20:32 +08:00