Skip to content

feat(core): expose server API in Code Mode#35629

Open
rekram1-node wants to merge 3 commits into
v2from
code-mode-opencode
Open

feat(core): expose server API in Code Mode#35629
rekram1-node wants to merge 3 commits into
v2from
code-mode-opencode

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • derive the running server API document directly from OpenApi.fromApi(Api) and pass it to the Code Mode OpenAPI adapter
  • expose the returned subtree under tools.opencode in the existing execute runtime
  • pass the server Basic authorization header through OpenAPI.fromSpec and resolve generated requests against the server's dynamically bound address

Testing

  • bun typecheck in packages/core
  • bun typecheck in packages/server
  • bun test test/session-runner-tool-registry.test.ts in packages/core (18 passed)
  • started serve --stdio --port 0 with explicit credentials and verified authenticated GET /api/health

@rekram1-node rekram1-node changed the title feat(core): expose OpenCode API in Code Mode feat(core): expose server API in Code Mode Jul 7, 2026
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