Commit graph

325 commits

Author SHA1 Message Date
Kit Langton
fce074726f refactor(core): migrate ConfigPermission.Info to Effect Schema canonical
Follow-up to #23716. Moves ConfigPermission.Info from zod-first (with a
preprocess hack) to Effect Schema canonical using Schema.StructWithRest +
Schema.decodeTo, and deletes the now-unused ZodPreprocess plumbing.

Core change: rule precedence in `Permission.fromConfig` now sorts top-level
keys so wildcard permissions (e.g. `*`, `mcp_*`) come before specific
ones (e.g. `bash`, `edit`). Combined with `findLast` in evaluate(),
this gives the intuitive semantic 'specific tool rules override the `*`
fallback' regardless of the user's JSON key order. This silently fixes the
previously-broken case `{bash: "allow", "*": "deny"}` (which under
the old semantics denied bash because `*` came last).

Once rule precedence no longer depends on JSON insertion order, the
`__originalKeys` + ZodPreprocess hack can go — StructWithRest's natural
canonicalisation is fine because fromConfig sorts anyway.

- src/config/permission.ts: rewrite. InputObject is StructWithRest with known
  permission keys (read/edit/bash/... as Rule, todowrite/webfetch/... as
  Action-only for type narrowing) + Record rest. Schema.decodeTo normalises
  the Action shorthand into { "*": action }. .zod is derived — walker
  already carries the decodeTo transform.
- src/config/config.ts, src/config/agent.ts: reference ConfigPermission.Info
  directly instead of via Schema.Any + ZodOverride. The Effect decoder now
  applies the permission transform at load time.
- src/permission/index.ts: fromConfig sorts wildcards-before-specifics at
  top level. Sub-pattern order inside a tool key is preserved (documented
  `*` first, specifics after).
- src/util/effect-zod.ts: delete ZodPreprocess symbol, its walkUncached
  branch, and the TODO comment. Zero remaining consumers.
- test/permission/next.test.ts: 6 new tests pinning the new semantics —
  order-independent precedence, wildcard-as-fallback, sub-pattern order
  preservation, canonical documented-example regression guard.
- test/config/config.test.ts: updated the "preserves key order" test to
  reflect the new canonical output shape (declaration-order known fields,
  then input-order rest keys). Behavioural guarantees live in the new
  permission tests.
- test/util/effect-zod.test.ts: delete the ZodPreprocess describe block
  (~115 lines of tests for the now-removed feature).

SDK diff vs dev:
- Removed `__originalKeys?: Array<string>` (internal leak).
- Catchall cleaned up (no unrelated `Array<string>`).
- Known-field types preserved (autocomplete + narrowing).
- Only shape change: PermissionConfig union order swap (commutative).

Safety audit: no config, test, or doc in the repo (including all 16
translations) exercises the pattern where specifics come before wildcards
at the top level. The only configs whose behaviour changes are ones that
were silently broken.
2026-04-21 17:38:24 -04:00
Aiden Cline
c6c56ac2cf
tweak: rename tail_tokens -> preserve_recent_tokens (#23491) 2026-04-20 01:06:29 -05:00
opencode-agent[bot]
29f05cb1ee chore: generate 2026-04-19 23:48:44 +00:00
opencode-agent[bot]
a92c75e5f4 chore: generate 2026-04-18 01:21:01 +00:00
opencode-agent[bot]
cf0a53c501 chore: generate 2026-04-18 00:29:26 +00:00
opencode-agent[bot]
ed0f022502 chore: generate 2026-04-17 20:50:37 +00:00
opencode-agent[bot]
54435325b6 chore: generate 2026-04-17 20:26:43 +00:00
James Long
a8c78fc005
fix(core): add historical sync on workspace connect (#23121) 2026-04-17 13:30:09 -04:00
opencode-agent[bot]
cb425ac927 chore: generate 2026-04-17 13:53:11 +00:00
James Long
7605acff65
refactor(core): move server routes around to clarify workspacing (#23031) 2026-04-17 02:06:20 -04:00
opencode-agent[bot]
dc38f22bd8 chore: generate 2026-04-17 02:34:07 +00:00
opencode-agent[bot]
7341718f92 chore: generate 2026-04-16 07:15:05 +00:00
opencode-agent[bot]
64cc4623b5 chore: generate 2026-04-16 02:08:47 +00:00
opencode-agent[bot]
3b75f16119 chore: generate 2026-04-15 21:29:10 +00:00
James Long
af20191d1c
feat(core): sync routes, refactor proxy, session restore, and more syncing (#22518) 2026-04-15 10:18:48 -04:00
opencode-agent[bot]
4ed3afea84 chore: generate 2026-04-14 20:58:35 +00:00
opencode-agent[bot]
85674f4bfd chore: generate 2026-04-14 19:45:10 +00:00
James Long
b22add292c
refactor(core): publish sync events to global event stream (#22347) 2026-04-13 16:51:59 -04:00
opencode-agent[bot]
329fcb040b chore: generate 2026-04-13 17:37:41 +00:00
opencode-agent[bot]
7164662be2 chore: generate 2026-04-13 14:18:05 +00:00
opencode-agent[bot]
17b2900884 chore: generate 2026-04-12 00:58:05 +00:00
opencode-agent[bot]
4c4eef46f1 chore: generate 2026-04-11 22:15:53 +00:00
opencode-agent[bot]
cb1e5d9e41 chore: generate 2026-04-11 20:56:22 +00:00
opencode-agent[bot]
2e340d976f chore: generate
Some checks failed
generate / generate (push) Waiting to run
nix-eval / nix-eval (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / version (push) Waiting to run
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-4vcpu-ubuntu-2404 target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-4vcpu-windows-2025 target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-8vcpu-ubuntu-2404-arm target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-tauri (map[host:macos-latest target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-tauri (map[host:macos-latest target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-tauri (map[host:windows-2025 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:macos-latest platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:macos-latest platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
storybook / storybook build (push) Waiting to run
test / unit (linux) (push) Waiting to run
test / unit (windows) (push) Waiting to run
test / e2e (linux) (push) Waiting to run
test / e2e (windows) (push) Waiting to run
typecheck / typecheck (push) Waiting to run
docs-locale-sync / sync-locales (push) Has been cancelled
2026-04-11 03:53:48 +00:00
opencode-agent[bot]
b898c6d0ea chore: generate 2026-04-11 02:04:02 +00:00
opencode-agent[bot]
57f9397677 chore: generate 2026-04-11 01:48:25 +00:00
James Long
180ded6a27
rector(core,tui): handle workspace state in project context, add workspace status, improve ui (#21896) 2026-04-10 13:03:20 -04:00
James Long
42206da1f8
refactor(tui): switch to global events and start passing workspace param (#21719) 2026-04-10 10:47:27 -04:00
opencode-agent[bot]
bbe4a04f9f chore: generate 2026-04-09 20:29:48 +00:00
opencode-agent[bot]
35b44df94a chore: generate 2026-04-09 20:05:05 +00:00
opencode-agent[bot]
f73e4d5d31 chore: generate 2026-04-09 16:47:02 +00:00
Aiden Cline
4961d72c0f
tweak: separate ModelsDev.Model and Config model schemas (#21561) 2026-04-08 15:55:14 -05:00
Aiden Cline
039c60170d
fix: ensure that /providers list and shell endpoints are correctly typed in sdk and openapi schema (#21543) 2026-04-08 12:56:15 -05:00
opencode-agent[bot]
0788a535e2 chore: generate 2026-04-07 23:49:25 +00:00
opencode-agent[bot]
6a5aae9a84 chore: generate 2026-04-07 14:14:07 +00:00
MC
eaa272ef7f
fix: show clear error when Cloudflare provider env vars are missing (#20399)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-04-06 05:26:04 +00:00
opencode-agent[bot]
6253ef0c27 chore: generate 2026-04-04 23:26:37 +00:00
opencode-agent[bot]
985663620f chore: generate 2026-04-04 23:07:01 +00:00
opencode-agent[bot]
a4e75a0794 chore: generate 2026-04-03 14:56:44 +00:00
Aiden Cline
510a1e8140
ignore: fix typecheck in dev (#20702) 2026-04-02 15:38:30 +00:00
opencode-agent[bot]
159ede2d5c chore: generate 2026-04-02 15:19:26 +00:00
opencode-agent[bot]
57a5236e71 chore: generate 2026-04-02 15:01:45 +00:00
opencode-agent[bot]
9b09a7e766 chore: generate 2026-03-31 23:15:56 +00:00
James Long
a76be695c7
refactor(core): split out instance and route through workspaces (#19335) 2026-03-27 11:51:21 -04:00
opencode-agent[bot]
21023337fa chore: generate 2026-03-27 14:01:28 +00:00
opencode-agent[bot]
1d363fa19f chore: generate 2026-03-26 14:16:07 +00:00
Aiden Cline
77fc88c8ad
chore: remove dead code for todoread tool (#19128) 2026-03-25 16:21:42 +00:00
opencode-agent[bot]
fac0dd8862 chore: generate 2026-03-25 15:40:53 +00:00
opencode-agent[bot]
971383661a chore: generate 2026-03-25 14:48:44 +00:00
James Long
b0017bf1b9
feat(core): initial implementation of syncing (#17814) 2026-03-25 10:47:40 -04:00