Skip to content

feat(opencode): add question ask and wait endpoints#29173

Open
rekram1-node wants to merge 4 commits into
devfrom
question-endpoint
Open

feat(opencode): add question ask and wait endpoints#29173
rekram1-node wants to merge 4 commits into
devfrom
question-endpoint

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

@rekram1-node rekram1-node commented May 25, 2026

What does this PR do?

Adds question API endpoints so external clients can create a question request and wait for the result without managing event bus state.

  • POST /question creates a question request and returns its id
  • GET /question/:requestID/wait waits for answered/rejected result
  • Completed results are kept in memory for 30 minutes so repeated waits can reconnect
  • Regenerates the JS SDK

How did you verify your code works?

  • bun test test/question/question.test.ts --timeout 30000
  • bun typecheck from packages/opencode
  • bun typecheck from packages/sdk/js

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