Commit Graph
8 Commits
Author SHA1 Message Date
Saim Shafique 5a0a7b81a3 fix: route OpenCode 2.x built-in Claude Agent provider through the proxy (#6816) 2026-11-15 10:51:24 +00:00
ci-check 09bda56094 fix: opencode 2.x native install writes the shim dir instead of the bare package name (#3976)
OpenCode 2.x resolves a bare plugin package name through the package main field (dist/index.js, the CLI — no default export), so the entry form the installer wrote for 2.x hosts ("billion-context" under the plugins key) never loads: Plugin must export a default definition / on 2.2.5 a TypeError at /reload. Verified against the real @opencode/cli 2.1.0 binary (Linux): plural+bare does load there, but both field reports are Windows and the dir-shim form is proven on all four combinations (Linux/Windows x 2.1.0/2.2.5), so the installer now writes the shim dir (<configDir>/plugins/billion-context/index.js re-exporting this install dist/agent/opencode-native.js) for every 2.x host and any dev build; 1.x npm installs keep the portable bare name. Legacy bare entries in a 2.x config migrate automatically; a stale shim is regenerated to point at the current root; update messages read the shim target to tell npm-root installs from checkouts. README en/zh + clients docs en/zh: manual-install instructions split by host generation.
2026-11-09 12:24:45 +08:00
ework-agent 104b2a66bf Merge remote-tracking branch 'origin/master' into 2026-09-30_port-zones
# Conflicts:
#	CONFIGURATION.md
#	CONFIGURATION.zh-CN.md
#	tests/plugin-install-opencode.test.ts
2026-09-29 23:45:30 +08:00
ework-agent 7814015151 fix(opencode): key-aware "plugins present" note + hermetic version probe in tests
Found while verifying #1670 on a machine whose PATH shadows opencode v2
(a stray node_modules/.bin walk by npm test): the idempotent-rerun note
was the hardcoded string "plugin present", but tests build the
expectation from pickPluginKey(detectOpencodeMajor()) — so any host with
opencode 2.x failed three install tests. The note now names the effective
key ("plugin present" / "plugins present"), and the v1-shaped dev-form
e2e pins BILI_CLIENT_BIN to an unresolvable path (probe fails soft to
major 1) so it never depends on the host binary. The e2e-registry v2
stub assertion follows the new wording.
2026-09-29 17:50:13 +08:00
ework-agent 8e987ee0eb test: harden all recursive rmSync teardowns with retry options (#1646)
Bare rmSync(dir, {recursive, force}) in test teardowns throws ENOTEMPTY on
loaded CI runners when a spawned child recreates entries between readdir and
rmdir (observed: issue1086-chain T3 on ubuntu-latest Node 22, run
36520549393). Node's rimraf only retries transient errors when maxRetries is
set, so a shared tests/tmp-rm.ts rmrf() with maxRetries:10/retryDelay:50 now
replaces all 354 bare recursive teardown calls across 91 test files, matching
the precedent already at issue1086-chain-self-exemption.test.ts:663. Orphaned
named rmSync imports dropped where no longer used. Test-only change.
2026-09-29 14:52:46 +08:00
Sisyphus d052bbff4c fix: opencode plugin install/remove preserves foreign entries verbatim (#1002)
- applyOpencodePluginEntry now operates on the RAW plugin value: object
  entries ({package, options}), map-form plugins with per-key options and
  odd scalars survive install in form and position; a strings-only
  projection is never written back
- 'plugin present' short-circuits BEFORE any write — an idempotent
  install no longer rewrites (and mangles) the key
- opencodeRemove drops the key only when NOTHING raw survives, and keeps
  map form; foreign entries are no longer collapsed to bare keys
- backup re-snapshots on every write whose pre-write bytes differ from
  bili's own last output (.bili-last sidecar hash): user edits refresh
  the backup, bili's consecutive writes do not — the install→upgrade→
  remove restore chain still yields the user's pre-install value
- codex/omp write paths funnel through the same writeConfigText discipline

Fixes #1002
2026-09-19 20:51:51 +08:00
Sisyphus 0b1ca14aa5 fix(plugin): stop freezing a stale MCP origin into opencode installs (Fixes #926) 2026-09-18 16:39:14 +08:00
Sisyphus bdc894b6b5 feat: standard npm install path for the opencode native plugin (Refs #925)
- package.json: explicit exports { ".": dist/index.js, "./server":
  dist/agent/opencode-native.js } — opencode's loader tries <pkg>/server
  first (verified in the shipped @opencode/cli 2.0.7 binary), so the bare
  name no longer falls back to main and runs the CLI in-host
- plugin install opencode: origin-aware — npm installs (package root under
  node_modules) write the bare package name (host-managed via Npm.add,
  portable config); checkout/dev installs keep the local shim dir and say
  so in the output; remove/status handle both forms; re-run migrates
- tests: 8 new cases (origin table, both forms fresh/migrate/idempotent,
  full install/remove/status e2e); docs EN+ZH
2026-09-18 16:00:07 +08:00