Commit Graph
9 Commits
Author SHA1 Message Date
MohammadAminDHM 6286b7c2f1 fix(opencode): address review findings T01-T15 on the V2 plugin surface
P0: spawnCommand() replaces shell:true (cmd-shim routing with /d /s /c, quoted argv, windowsVerbatimArguments); permission.ask no longer auto-approves formatter/test shell prefixes; detached spawns register the error listener before resolving.

P1: loadToolModule probes .js then .ts for dist and source layouts; V2 setup() tests via mock ctx; installer recognizes every historical plugin registration (./plugins and plugins/ecc-hooks.*) via shared isOpenCodeHookConfigRegistration(); ecc-universal ./plugins export repointed to the live dist/plugins/ecc-hooks.js; opencode.json drops the file-path plugin entry OpenCode 2.x ignores, docs updated.

P2: setup() rolls back registrations and releases the directory guard on mid-setup failure; prettier non-zero exits reported as warn; subscription errors discriminated against abort; disposals awaited without unhandled rejections; windowsHide on all spawns; TROUBLESHOOTING curl passes location[directory].

Tests: opencode-plugin-hooks 22/22 (new T01/T02/T03/T05/T10/T11/T13/T14 coverage), build-opencode 11/11 (new T08 export test), hook-consent 12/12, install-executor 26/26, install-lifecycle 73/73, plugin-manifest 71/71.
2026-11-03 18:59:18 +03:30
MohammadAminDHM 03cfca273b fix(opencode): migrate hooks plugin to V2 API and stop duplicate registrations
OpenCode 2.x only runs V2 plugin definitions ({ id, setup(ctx) }); the V1
function-export form failed schema validation at load with
"PluginModule.LoadError: Plugin must export a default definition with an id
and an effect or setup function".

- Rewrite .opencode/plugins/ecc-hooks.ts as a native V2 plugin: V1 hook keys
  now register on their V2 domains (ctx.tool.hook execute.before/after,
  ctx.shell.hook create.before, ctx.permission.hook evaluate,
  ctx.session.hook compaction, ctx.event.subscribe for file/session/todo
  events, ctx.tool.transform for custom tools). Windows-safe: replaces Bun
  dollar-shell and grep with child_process.spawn + fs; every callback is
  try/catch wrapped and every domain registration is guarded so a missing
  capability degrades instead of crashing setup.
- Stop registering the same plugin id three times: OpenCode scans root-level
  plugin files AND loads the directory through index.ts, so the directory
  form of the plugin config produced two red "Duplicate plugin ID:
  ecc-hooks" entries in the TUI panel. Config now points directly at
  ./plugins/ecc-hooks.ts and plugins/index.ts becomes an inert distinct-id
  stub (kept on disk because install/uninstall plans and consent safety
  tests reference it).
- Document the failure modes and the /api/plugin plus "opencode plugin list"
  diagnostic playbook in TROUBLESHOOTING.md; align .opencode/README.md.

Verified: hook-consent, opencode-hook-consent-safety, install-lifecycle,
install-executor, harness-adapter-compliance tests pass (197 assertions);
check-hooks-schema-keys, validate-install-manifests, validate-hooks and
unicode-safety CI validators pass.
2026-11-03 16:58:51 +03:30
Zhengyu Chenandhaelyra 90606c8315 docs: correct MODULE_NOT_FOUND plugin cache path (#3586)
* docs: correct MODULE_NOT_FOUND plugin cache path

Point the install command at cache/ecc/ecc/<version>.
The cache/ecc directory itself has no package.json.

* docs: explain the MODULE_NOT_FOUND version placeholder

Tell readers to replace <version> with the version from claude plugin list
before running the install command.

* docs: quote plugin cache version placeholder

---------

Co-authored-by: haelyra <49814733+haelyra@users.noreply.github.com>
2026-10-20 17:28:23 -04:00
Affaan Mustafa c05b2d6614 chore: retire the Everything Claude Code name, ECC only (#3330)
* chore: retire the Everything Claude Code name, ECC only

Replace the expanded product name and the everything-claude-code slug
with ECC across READMEs, translated docs, harness folders, skills,
commands, scripts and examples. Repo URLs now point at affaan-m/ECC.

Rename repo-internal artifacts to ecc forms (ecc-conventions skill,
ecc-guardrails, ecc-research-playbook, ecc-team-config, ecc-instincts
with ecc-* ids) and update .claude/ecc-tools.json.

Legacy install ids, plugin dirs, package names and MCP prefixes stay
where existing installs resolve against them. The codex global-state
check and harness-audit repo detection accept the new name first and
the legacy one as a fallback. The Discord bot prefers ~/GitHub/ECC and
falls back to the nested legacy checkout path.

Refresh the skill-triggers registryDigest for the changed skill text.

* fix(ecc-tools): drop managed paths to the removed Claude repo skill

.claude/skills/<repo-skill>/SKILL.md was deleted in #2770 but stayed listed in
ecc-tools.json and the team config. Remove those entries and point the Claude
Code adapter at the existing .agents/skills/ecc-conventions/SKILL.md.
2026-10-01 17:50:41 -05:00
Shanujan Sureshandhaelyra 591ab5cbd3 fix(opencode): don't crash the whole session when plugins/lib is missing (#2538)
* fix(opencode): don't crash the whole session when plugins/lib is missing (#2530)

* fix: address review feedback (trailing newlines, symptom wording)

* fix(opencode): also lazy-load the store in ecc-hooks.ts plugin entrypoint

* test(opencode): add regression coverage for missing/present plugins/lib in ecc-hooks

* fix(opencode): guard diagnostic log() against unhandled rejection; tighten test assertion

* fix(opencode): only publish store after init succeeds; scrub loader errors from warning; catch sync log throws

* fix(opencode): scrub raw loader error from changed-files tool; add tool-level regression tests

* fix(ci): make OpenCode checks cross-platform

---------

Co-authored-by: haelyra <49814733+haelyra@users.noreply.github.com>
2026-07-28 21:37:41 -04:00
Affaan Mustafa 181bc26b29 docs: add ecc recovery guidance for wiped setups 2026-04-09 18:13:07 -07:00
Affaan Mustafa 1346f83b08 fix: shorten plugin slug to ecc 2026-04-05 14:31:30 -07:00
Affaan Mustafa 5644415767 docs: tighten troubleshooting safety guidance 2026-03-10 19:15:12 -07:00
Pangerkumzuk Longkumer b7bafb40cb docs: add comprehensive troubleshooting guide (fixes #326)
Added a comprehensive troubleshooting guide for the Everything Claude Code (ECC) plugin, covering common issues, symptoms, causes, and solutions.
2026-03-10 19:15:12 -07:00