Commit Graph
6 Commits
Author SHA1 Message Date
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