command-code 1.21.0 → 1.23.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # command-code
2
2
 
3
+ ## 1.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat: Add Gemini 3.7 Flash
8
+
9
+ ## 1.22.0
10
+
11
+ ### Minor Changes
12
+
13
+ - feat(tools): merge read_multiple_files into read_file #3580
14
+
3
15
  ## 1.21.0
4
16
 
5
17
  - feat: add grok 4.6
@@ -35,8 +35,8 @@ These ship with Command Code and are always available. They're read-only - you c
35
35
  | **Agent** | **When it runs** | **Tools** |
36
36
  | --------- | ---------------- | --------- |
37
37
  | **General** | The default when no other agent fits. Research and multi-step tasks. | All tools |
38
- | **Explore** | Codebase search and understanding that touches many files. | Read-only: `read_file`, `read_directory`, `read_multiple_files`, `grep` |
39
- | **Plan** | Designing an approach and weighing trade-offs. | `read_file`, `read_multiple_files` |
38
+ | **Explore** | Codebase search and understanding that touches many files. | Read-only: `read_file`, `read_directory`, `grep` |
39
+ | **Plan** | Designing an approach and weighing trade-offs. | `read_file` |
40
40
 
41
41
  When Command Code delegates without naming an agent, the task goes to **General**.
42
42
 
@@ -188,7 +188,7 @@ An agent is a Markdown file. The front matter configures it; the body is the sys
188
188
  ---
189
189
  name: code-reviewer
190
190
  description: Use after writing code to review a diff for bugs and security issues.
191
- tools: read_file, read_multiple_files, grep, glob
191
+ tools: read_file, grep, glob
192
192
  model: claude-sonnet-5
193
193
  ---
194
194
 
@@ -255,7 +255,7 @@ Common ids by category:
255
255
 
256
256
  | **Category** | **Tool ids** |
257
257
  | ------------ | ------------ |
258
- | Read-only | `read_file`, `read_directory`, `read_multiple_files`, `grep` |
258
+ | Read-only | `read_file`, `read_directory`, `grep` |
259
259
  | Edit | `edit_file`, `write_file` |
260
260
  | Execution | `shell_command`, `run_command`, `kill_shell` |
261
261
  | Search | `web_search`, `web_fetch` |
@@ -63,7 +63,8 @@ The model catalog — every id `/model`, `--model`, `model:effort` shorthand, an
63
63
 
64
64
  | Id (use EXACTLY this) | Name | Context | Efforts | $/1M in/out · cache read | Min plan | Best for |
65
65
  |---|---|---|---|---|---|---|
66
- | `google/gemini-3.6-flash` | Gemini 3.6 Flash | 1M | low, medium, high | $1.5/$7.5 · cache $0.15 | Pro and above | higher-quality coding & agentic workflows, fewer tokens |
66
+ | `google/gemini-3.7-flash` | Gemini 3.7 Flash | 1.05M | low, medium, high | $0.75/$3.75 · cache $0.075 (write $0.04167) | GOAT and above | higher-quality coding & agentic workflows, fewer tokens |
67
+ | `google/gemini-3.6-flash` | Gemini 3.6 Flash | 1M | low, medium, high | $1.5/$7.5 · cache $0.15 | Pro and above | previous Gemini Flash, still fast & capable |
67
68
  | `google/gemini-3.5-flash` | Gemini 3.5 Flash | 1M | low, medium, high | $1.5/$9 · cache $0.15 | Pro and above | Pro-level coding proficiency, parallel agentic execution |
68
69
  | `google/gemini-3.5-flash-lite` | Gemini 3.5 Flash Lite | 1M | low, medium, high | $0.3/$2.5 · cache $0.03 | Pro and above | upgraded agentic capabilities, ideal for subagents |
69
70
  | `google/gemini-3.1-flash-lite` | Gemini 3.1 Flash Lite | 1M | low, medium, high | $0.25/$1.5 · cache $0.03 | Pro and above | high-volume workhorse model with implicit caching |
@@ -200,7 +200,7 @@ Use the friendly names, or the exact tool names the model sees:
200
200
  | Friendly | Covers |
201
201
  | :----------- | :----------------------------------------------------------- |
202
202
  | `Shell` | `shell_command`, `monitor_command`, `kill_shell` |
203
- | `Read` | `read_file`, `read_multiple_files`, `read_directory`, `glob`, `grep` |
203
+ | `Read` | `read_file`, `read_directory`, `glob`, `grep` |
204
204
  | `Edit` | `edit_file`, `write_file` |
205
205
  | `Write` | `write_file` |
206
206
  | `WebFetch` | `web_fetch` |
@@ -467,7 +467,7 @@ The reasoning behind the behavior, so you don't reverse-engineer it:
467
467
 
468
468
  Documented edges of the current engine:
469
469
 
470
- - **Wildcard `include` patterns in `read_multiple_files` expand inside the tool**, so an exact-file deny rule (`Read(.env)`) can't match a wildcard include (`*.env`) before expansion. Directory-tree rules (`Read(//etc/**)`) still cover this, because the tool's `targetDirectory` is matched as a touched path.
470
+ - **Wildcard patterns in a multi-file `read_file` call expand inside the tool**, so an exact-file deny rule (`Read(.env)`) can't match a wildcard entry (`*.env`) before expansion. Directory-tree rules (`Read(//etc/**)`) still cover this, because the call's `target_directory` (or the first absolute entry) is matched as a touched path.
471
471
  - **No strict read allowlist:** `allow: ["Read(src/**)"]` doesn't deny reads outside `src/**` - reads are free by default; only `ask`/`deny` restrict them. A deny-everything-not-listed read mode is out of scope as a separate change.
472
472
  - **Shell path args aren't external-dir gated:** `cat /outside/file` follows shell rules and the mode, not the workspace boundary. Gate it with `deny: ["Shell(cat /outside/*)"]`-style rules.
473
473
  - **An allow rule never matches an opaque command:** if the parser can't fully understand a command, it can still be deny/ask-matched against the raw string, but never auto-allows - it prompts.
@@ -290,6 +290,7 @@ Valid model ids (the /model catalog — use these EXACT ids):
290
290
  - stepfun/Step-3.5-Flash
291
291
  - tencent/hy3-paid
292
292
  - tencent/Hy3
293
+ - google/gemini-3.7-flash
293
294
  - google/gemini-3.6-flash
294
295
  - google/gemini-3.5-flash
295
296
  - google/gemini-3.5-flash-lite
@@ -29,9 +29,14 @@ Read a file as a bounded, line-numbered window. Read-only; never prompts.
29
29
 
30
30
  | Parameter | Type | Required | Description |
31
31
  | --- | --- | --- | --- |
32
- | `file_path` | string | yes | Absolute path, inside the workspace. |
33
- | `offset` | number | no | 1-indexed start line. |
34
- | `limit` | number | no | Max lines to read (default 2000). |
32
+ | `file_path` | string | yes* | Absolute path, inside the workspace. May also be a single glob pattern. |
33
+ | `paths` | string[] | yes* | Read many files at once: absolute paths and/or glob patterns. \*Either `file_path` or `paths` is required. |
34
+ | `offset` | number | no | 1-indexed start line (single-file reads). |
35
+ | `limit` | number | no | Max lines to read (default 2000, single-file reads). |
36
+ | `exclude` | string[] | no | Multi-file reads: glob patterns to skip. |
37
+ | `target_directory` | string | no | Multi-file reads: base directory for relative patterns (default: cwd). |
38
+ | `default_exclude` | boolean | no | Multi-file reads: skip `node_modules`, `dist`, `build`, `.git`, coverage, logs, … (default `true`). |
39
+ | `git_ignore` | boolean | no | Multi-file reads: respect `.gitignore` (default `true`). |
35
40
 
36
41
  What it does beyond "read a file":
37
42
 
@@ -41,19 +46,19 @@ What it does beyond "read a file":
41
46
  - **Efficient**: memory-capped streaming reads, and re-reading an unchanged file returns a dedup stub instead of burning context.
42
47
  - **Honest about safety**: device and stream paths (`/dev/zero`, `/dev/stdin`, `/proc/<pid>/fd/*`, …) are blocked; every read is recorded in the session's read ledger, which the write tools check later.
43
48
 
44
- ### `read_multiple_files`
49
+ #### Multi-file reads
45
50
 
46
- Bulk-read files by glob, concatenated with `// File: <path>` headers.
51
+ Pass `paths` (or a single glob pattern in `file_path`) and the contents come back concatenated under `// File: <path> (<type>)` headers, preceded by a `Read X/Y files` summary:
47
52
 
48
- | Parameter | Type | Required | Description |
49
- | --- | --- | --- | --- |
50
- | `include` | string[] | yes | Glob patterns to read. |
51
- | `exclude` | string[] | no | Glob patterns to skip. |
52
- | `defaultExclude` | boolean | no | Skip `node_modules`, `dist`, `build`, `.git`, coverage, logs, (default `true`). |
53
- | `gitIgnore` | boolean | no | Respect `.gitignore` (default `true`). |
54
- | `targetDirectory` | string | no | Base directory (default: cwd). |
53
+ ```json
54
+ {"paths": ["/repo/src/index.ts", "/repo/src/**/*.test.ts"]}
55
+ ```
56
+
57
+ `file_path` and `paths` are two separate fields on purpose rather than one union-typed field: providers translate JSON-Schema unions inconsistently — Gemini rejects a function declaration whose parameter sets `any_of` alongside `description`/`items`, failing the whole request. `paths` satisfies the schema's `file_path` requirement through the tool's `requiredAlternatives`, so a multi-file call needs no placeholder.
58
+
59
+ Literal paths are read as named; glob patterns are filtered by `exclude`, the default exclusions and `.gitignore`. Binary files are noted with their type and size instead of being inlined. Per-file errors are reported inline and never fail the whole call; every match is boundary-checked individually (symlink and `..` escapes are dropped); and an aggregate ~100 KB cap (one tool-output budget) reports exactly which files were skipped, so a wide glob narrows instead of flooding the context.
55
60
 
56
- Per-file errors are reported inline and never fail the whole call; every match is boundary-checked individually (symlink and `..` escapes are dropped); an aggregate 1 MB cap reports exactly which files were skipped.
61
+ This absorbed the former `read_multiple_files` tool one tool schema instead of two keeps roughly 540 tokens out of every request (~1,685 → ~1,147), and models no longer have to choose between two near-identical read tools. Calls that still arrive under the old name are rewritten to `read_file` (its `include` renames onto `paths`, and `targetDirectory` / `gitIgnore` / `defaultExclude` onto the merged schema's snake_case options), so nothing breaks mid-conversation.
57
62
 
58
63
  ### `read_directory`
59
64