Skip to content

feat(unstable): expose typed session selector/capability fields for clients#26

Merged
ThomasK33 merged 6 commits intocoder:mainfrom
carsonfarmer:main-session-selector-typed-surface
Feb 27, 2026
Merged

feat(unstable): expose typed session selector/capability fields for clients#26
ThomasK33 merged 6 commits intocoder:mainfrom
carsonfarmer:main-session-selector-typed-surface

Conversation

@carsonfarmer
Copy link
Contributor

@carsonfarmer carsonfarmer commented Feb 25, 2026

Summary

This PR makes session selector metadata reliably available in the typed Go surface, so clients can distinguish config selectors by identity (id, name, etc.) instead of treating them as equivalent selects.

Key changes

  • Codegen fixes:
    • cmd/generate/internal/load/merge.go (+ tests): correctly promotes changed shared defs from unstable where needed.
    • cmd/generate/internal/emit/types.go: includes shared parent object fields on generated union variant structs.
  • Added JSON round-trip coverage for selector metadata:
    • unstable_types_test.go
  • Ran release flow for v0.10.8, committing regenerated schema/code outputs.
  • Updated tests/examples to match regenerated stable Agent interface (including SetSessionConfigOption).

Resulting typed surface improvements

  • SessionCapabilities now carries typed unstable markers (fork, list, resume).
  • NewSessionResponse includes typed optional configOptions and models.
  • UnstableResumeSessionResponse includes typed configOptions, models, and modes.
  • SessionConfigOptionSelect includes identity and UX metadata:
    • id, name, optional description, optional category
    • plus type, currentValue, options

Validation

  • gmake release VERSION=0.10.8 (includes version/gen/fmt/test/check)
  • go test ./...

Notes

  • No manual edits to generated files.
  • Changes are codegen/schema driven, then regenerated through the official flow.

@ThomasK33
Copy link
Member

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Member

Thanks for the PR, @carsonfarmer.

You’ll need to run make release VERSION=0.10.8, since the README.md file isn’t regenerated in this PR, and CI is failing as a result.

@carsonfarmer
Copy link
Contributor Author

You bet, and thanks for reviewing!

@ThomasK33
Copy link
Member

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 enabled auto-merge February 27, 2026 15:26
@ThomasK33 ThomasK33 added this pull request to the merge queue Feb 27, 2026
Merged via the queue into coder:main with commit 584abe6 Feb 27, 2026
1 check passed
@carsonfarmer carsonfarmer deleted the main-session-selector-typed-surface branch February 27, 2026 20:15
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.

2 participants