feat(opencode): add single session status endpoint#29421
Closed
YOMXXX wants to merge 1 commit into
Closed
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundPR #29244:
PR #29165:
Both of these PRs appear to be closely related or potentially duplicating the work in the current PR #29421. You may want to review their status and see if they're addressing the same issue #29166 or if they're alternative approaches. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #29166
Type of change
What does this PR do?
Adds
GET /session/:sessionID/statusfor clients that need one session's runtime status without fetching and filtering the full/session/statusmap.The endpoint follows the existing
/session/:sessionID/...resource shape and delegates toSessionStatus.get(sessionID), so idle sessions return{ "type": "idle" }. The OpenAPI scenario and generated JS SDK were updated; the v2 SDK now exposessession.getStatus(...).How did you verify your code works?
PATH="$HOME/.bun/bin:$PATH" bun test test/server/httpapi-session.test.ts -t "serves read routes"PATH="$HOME/.bun/bin:$PATH" bun test test/server/httpapi-session.test.tsPATH="$HOME/.bun/bin:$PATH" bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skipPATH="$HOME/.bun/bin:$PATH" bun run test:httpapiPATH="$HOME/.bun/bin:$PATH" bun typecheckfrompackages/opencodePATH="$HOME/.bun/bin:$PATH" bun typecheckfrompackages/sdk/jsgit diff --checkPATH="$HOME/.bun/bin:$PATH" bun ./packages/sdk/js/script/build.tsI also ran
.husky/pre-push; it failed in the unrelated@opencode-ai/console-supportpackage because local dependencies/types such as@solidjs/meta,@solidjs/router,solid-js,vite, and generated@opencode-ai/console-core/...modules were missing. Theopencodeand SDK checks above passed.Screenshots / recordings
N/A - HTTP API and SDK change only.
Checklist