Skip to content

refactor: rename leftover OPENCODE_* env, flatten packages/sdk, drop dead IDE caller - #2593

Merged
yanyihan-xiaomi merged 6 commits into
mainfrom
chore/opencode-leftovers-sdk-flat
Sep 30, 2026
Merged

yanyihan-xiaomi merged 6 commits into
mainfrom
chore/opencode-leftovers-sdk-flat

Conversation

@yanyihan-xiaomi

Copy link
Copy Markdown
Collaborator

Summary

  • Rename leftover OPENCODE_* → MIMOCODE_* (SDK CONFIG_CONTENT, build defines MIGRATIONS/WORKER_PATH/LIBC, ACP README question-tool flag). Keep genuine opencode surfaces (MIMOCODE_ENABLE_OPENCODE_SKILLS, models.dev OPENCODE_API_KEY fixtures).
  • Flatten packages/sdk/js → packages/sdk and delete the unused committed openapi.json snapshot (no in-repo reader; codegen uses a private temp schema).
  • Remove dead OPENCODE_CALLER / alreadyInstalled() and the sst-dev.opencode install surface in a separate commit.
  • Land local prefs: oxlint $schema → local node_modules copy; drop CLAUDE.md symlink.
  • Fix stale packages/sdk/script/build.ts generate cwd (../../opencode → ../cli) left by the earlier packages/cli rename, and align publish README/LICENSE paths after the flatten.

Verification

  • bun ci — PASS (frozen lockfile)
  • root bun typecheck — PASS
  • bun test test/ide/ide.test.ts test/config/config.test.ts — PASS (96; ide re-checked 7 pass after caller removal)
  • residual scans for renamed env defines, OPENCODE_CALLER, packages/sdk/js — empty outside historical docs
  • Independent review of f40c76ac..b6ae3cac — no critical findings

Point oxlint $schema at the local node_modules copy and remove the
CLAUDE.md → AGENTS.md symlink. Start the opencode-env-and-sdk-flat
feature document on this branch.
SDK server helpers now write MIMOCODE_CONFIG_CONTENT (the name the CLI
actually reads). Build defines OPENCODE_MIGRATIONS/WORKER_PATH/LIBC
become MIMOCODE_*, and the ACP README documents the real
MIMOCODE_ENABLE_QUESTION_TOOL flag. True opencode surfaces
(ENABLE_OPENCODE_SKILLS, models.dev OPENCODE_API_KEY fixtures) stay;
OPENCODE_CALLER is deferred for a follow-up removal.
Drop the unused committed openapi.json snapshot (no in-repo reader;
codegen uses a private temp schema). Promote the JS package to
packages/sdk so workspaces, tsconfigs, and scripts no longer need the
nested js/ path. Also fix the stale build.ts cwd (../../opencode →
../cli) left over from the packages/cli rename.
Match packages/plugin/script/publish.ts depth. Finalize the
opencode-env-and-sdk-flat feature document (delivered).
No in-repo IDE extension sets OPENCODE_CALLER any more. Drop
alreadyInstalled(), the sst-dev.opencode install path, and unused Ide
errors/event. Keep TERM_PROGRAM/GIT_ASKPASS ide() detection.

Separate from the rename-only commits so the env rename stays a pure
symbol rename.
Final delivery does not need a durable spec.
@yanyihan-xiaomi
yanyihan-xiaomi merged commit 698f0f2 into main Sep 30, 2026
6 checks passed
@yanyihan-xiaomi
yanyihan-xiaomi deleted the chore/opencode-leftovers-sdk-flat branch September 30, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant