Commit Graph

115 Commits

Author SHA1 Message Date
Kit Langton d6abb56f58 test(tool): pin every tool's parameters schema before migration
Pre-migration safety net for the upcoming tool-by-tool zod\u2192Schema
conversion. Every tool's parameters schema now has:

1. A JSON Schema snapshot (`z.toJSONSchema` with `io: "input"`) \u2014 this
   captures exactly what the LLM sees at tool registration time, so any
   drift caused by a future migration fails the snapshot.
2. Parse-accept/parse-reject assertions per tool pinning the
   user-visible behavioural contract (required fields, refinement
   bounds, enum membership, default values).

To make the snapshots possible without standing up each tool's full
Effect runtime, every tool file now exports its parameters schema as
`Parameters` at module scope:

- 9 tools already had a module-level const \u2014 just added `export`, and
  standardised the name to `Parameters` (uppercase) where it was
  previously `parameters`.
- 9 tools had their schema inline inside `Tool.define` \u2014 hoisted to
  module scope under the same `Parameters` name and wired back through.

Zero behaviour change: Tool.define still sees the same schema, runtime
validation path is identical, SDK (types.gen.ts + openapi.json) is
byte-identical, and the full 2054-test suite passes.

18 JSON Schema snapshots and 43 explicit parse/reject assertions for the
18 built-in tools (apply_patch, bash, codesearch, edit, glob, grep,
invalid, lsp, multiedit, plan, question, read, skill, task, todo,
webfetch, websearch, write).
2026-04-18 00:01:50 -04:00
Kit Langton 5011465c81 feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
Kit Langton 343a564183 feat: unwrap 11 util namespaces to flat exports + barrel (#22739) 2026-04-15 23:15:58 -04:00
Aiden Cline 307251bf3c fix: bash memory usage (#22660) 2026-04-15 20:09:06 -05:00
Kit Langton 3d6f90cb53 feat: add oxlint with correctness defaults (#22682) 2026-04-15 20:45:19 -04:00
Dax be9432a893 shared package (#22626) 2026-04-15 14:26:20 +00:00
Kit Langton 4f967d5bc0 improve bash timeout retry hint (#22390) 2026-04-14 12:55:03 -04:00
Kit Langton 5ee7edaf9e refactor(tool): make Tool.Info init effectful (#21989) 2026-04-11 12:33:17 -04:00
opencode-agent[bot] 19ae8c88b0 chore: generate 2026-04-11 03:13:03 +00:00
Kit Langton 3dd09147c2 refactor(tool): Tool.Context.metadata returns Effect (#21972) 2026-04-10 23:12:04 -04:00
Kit Langton c5fb6281f0 refactor(tool): Tool.Def.execute returns Effect, rename defineEffect → define (#21961) 2026-04-10 22:36:02 -04:00
opencode-agent[bot] 59d08683ea chore: generate 2026-04-10 17:27:31 +00:00
Kit Langton f7514d9eca refactor(tool): convert bash to defineEffect with ChildProcessSpawner (#21895) 2026-04-10 13:26:31 -04:00
Dax 463318486f core: refactor tool system to remove agent context from initialization (#21052) 2026-04-07 19:48:12 -04:00
opencode-agent[bot] 854484babf chore: generate 2026-04-01 23:49:44 +00:00
Kit Langton e4ff1ea778 refactor(bash): use Effect ChildProcess for bash tool execution (#20496) 2026-04-01 19:48:47 -04:00
Luke Parker b234370080 feat(windows): add first-class pwsh/powershell support (#16069) 2026-03-30 13:10:01 +10:00
Aiden Cline 15a8c22a26 tweak: adjust bash tool description to increase cache hit rates between projects (#19487) 2026-03-27 23:53:36 -05:00
Kit Langton 5dfe86dcb1 refactor(truncation): effectify TruncateService, delete Scheduler (#17957) 2026-03-17 21:59:54 -04:00
Luke Parker 4ab35d2c5c fix(electron): hide Windows background consoles (#16842)
Co-authored-by: Brendan Allan <git@brendonovich.dev>
2026-03-11 13:33:06 +10:00
Dax 2f2856e20a refactor(opencode): replace Bun shell in core flows (#16286) 2026-03-09 15:19:50 -04:00
Erik Demaine 0042a07052 fix: Windows path support and canonicalization (#13671)
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-02-23 10:10:27 +10:00
Erik Demaine a74fedd23b fix(desktop): change detection on Windows, especially Cygwin (#13659)
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-02-23 09:49:05 +10:00
opencode-agent[bot] 2d7c9c9692 chore: generate 2026-02-18 20:15:14 +00:00
Helge Tesdal 1aa18c6cd6 feat(plugin): pass sessionID and callID to shell.env hook input (#13662) 2026-02-18 14:14:18 -06:00
Tyler Gannon a30696f9bf feat(plugin): add shell.env hook for manipulating environment in tools and shell (#12012) 2026-02-03 15:18:41 -06:00
Aiden Cline 188cc24bfc chore: cleanup external_dir perm logic (#11845) 2026-02-02 16:43:55 -06:00
Patrick Schiel e7ff7143b6 fix: handle redirected_statement treesitter node in bash permissions (#6737) 2026-01-30 16:11:45 -06:00
Aiden Cline 3b7c347b2e tweak: bash tool, ensure cat will trigger external_directory perm 2026-01-22 10:26:06 -06:00
Dillon Mulroy fa79736b87 fix: check worktree for external_directory permission in subdirs (#7811) 2026-01-11 14:17:36 -06:00
Aiden Cline 1b82511fbd feat: write truncated tool outputs to files (#7239) 2026-01-07 17:25:00 -06:00
Dax Raad 4956ee3ebd tui: add escape key handling to permission dialogs for better keyboard navigation 2026-01-02 18:48:26 -05:00
Aiden Cline 7aa1dbe873 test: fix bash test 2026-01-01 17:53:20 -06:00
Aiden Cline 76186d19f3 fix: ensure new permissions changes work for special case bash commands like rm, cd, etc 2026-01-01 17:27:23 -06:00
Dax 351ddeed91 Permission rework (#6319)
Co-authored-by: Github Action <action@github.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
2026-01-01 17:54:11 -05:00
Didier Durand 8b708242f1 chore: fix various typos (#6429) 2025-12-30 09:42:04 -06:00
Dax fed4776451 LLM cleanup (#5462)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2025-12-14 21:11:30 -05:00
Aiden Cline 15caecdb45 shell tweaks, better handling for windows (#5455)
Co-authored-by: GitHub Action <action@github.com>
2025-12-12 16:11:07 -06:00
Aiden Cline 4e92f54415 tweak: bash tool, try to prevent the cd spam 2025-12-11 14:58:46 -06:00
Aiden Cline 4f5abe387d tweak: bash tool deny msg 2025-12-11 14:46:58 -06:00
Aiden Cline 552ee81455 tweak: add OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS 2025-12-09 17:28:34 -06:00
Aiden Cline 8a9c7a4ef3 add OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT 2025-12-09 15:44:56 -06:00
GitHub Action 9c938eec73 chore: format code 2025-12-07 19:08:48 +00:00
secretninjaman 238b907dd8 fix: use basename for shell detection to support non-standard paths (#5205)
Co-authored-by: Ayato French <a@ayatofrench.com>
2025-12-07 13:08:26 -06:00
Aiden Cline 75a4dcbce8 tweak: make bash give agent more awareness of cwd, bump default timeout, drop max timeout (#5140) 2025-12-06 23:55:07 -06:00
Shantur Rathore ba417d80b1 tweak: bash tool improve output metadata for agent consumption, fix small timeout issue (#5131) 2025-12-05 13:56:56 -06:00
Shantur Rathore a607f33552 tweak: bash tool messages regarding timeouts and truncation more clear for agent (#5066) 2025-12-04 11:33:00 -06:00
Aiden Cline 27ae341684 fix bash tool wsl 2025-11-23 12:29:15 -06:00
Aiden Cline adf7df0d5c tweak: bash tool behavior w/ /bin/zsh 2025-11-21 16:30:00 -06:00
Ivan Starkov b5d0c56b4c fix: make bash tool respect $SHELL (#3494)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
2025-11-21 14:33:04 -06:00