Skip to content

refactor(core): migrate accounts and load file agents#30309

Open
thdxr wants to merge 1 commit into
devfrom
refactor/core-account-file-agents
Open

refactor(core): migrate accounts and load file agents#30309
thdxr wants to merge 1 commit into
devfrom
refactor/core-account-file-agents

Conversation

@thdxr
Copy link
Copy Markdown
Member

@thdxr thdxr commented Jun 2, 2026

Summary

  • move the account service implementation, storage access, OAuth flow, and token refresh handling into @opencode-ai/core/account, then switch opencode consumers and tests to the core service
  • load Markdown-backed agents from configured {agent,agents}/**/*.md directories in ConfigAgentPlugin using the same ConfigAgent.Info schema as JSON agent entries
  • provide filesystem access to config-agent plugin bootstrapping and add gray-matter for frontmatter parsing

Validation

  • cd packages/core && bunx prettier --check "src/account.ts" "src/account/sql.ts" "src/config/plugin/agent.ts" "src/plugin/boot.ts" "test/account.test.ts" "test/config/agent.test.ts" "package.json"
  • cd packages/core && bun typecheck
  • cd packages/core && bun test test/account.test.ts test/config/agent.test.ts
  • cd packages/opencode && bunx prettier --check "src/cli/cmd/account.ts" "src/config/config.ts" "src/effect/app-runtime.ts" "src/server/routes/instance/httpapi/groups/experimental.ts" "src/server/routes/instance/httpapi/handlers/experimental.ts" "src/server/routes/instance/httpapi/server.ts" "src/share/share-next.ts" "test/cli/error.test.ts" "test/config/config.test.ts" "test/fake/account.ts" "test/share/share-next.test.ts"
  • cd packages/opencode && bun typecheck
  • cd packages/opencode && bun test test/cli/error.test.ts test/config/config.test.ts test/share/share-next.test.ts
  • bun turbo typecheck (pre-push hook)

Known Failure

  • cd packages/core && bun test test/location-layer.test.ts currently fails during database setup with SQLiteError: table 'permission' already exists, before reaching the changed plugin behavior.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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