Skip to content

feat: add :client-name to session config (upstream PR #510)#21

Merged
krukow merged 2 commits intomainfrom
feat/client-name-upstream-510
Feb 20, 2026
Merged

feat: add :client-name to session config (upstream PR #510)#21
krukow merged 2 commits intomainfrom
feat/client-name-upstream-510

Conversation

@krukow
Copy link
Collaborator

@krukow krukow commented Feb 20, 2026

Summary

Port upstream copilot-sdk PR #510: add :client-name as an optional field to SessionConfig and ResumeSessionConfig.

This allows SDK consumers to identify their application, which is included in the User-Agent header for API requests.

Usage

(copilot/create-session client {:client-name "my-app" :model "gpt-5.2"})
(copilot/resume-session client session-id {:client-name "my-app"})

Changes

  • specs.clj: ::client-name spec, added to both session-config-keys and resume-session-config-keys
  • client.clj: Forward :client-name in build-create-session-params and build-resume-session-params; updated docstrings
  • integration_test.clj: 3 wire format tests (forwarded on create, forwarded on resume, omitted when not set)
  • API.md: Added to session config table
  • CHANGELOG.md: Entry under [Unreleased]

Testing

  • 84 tests, 249 assertions, 0 failures
  • Doc validation passes

krukow and others added 2 commits February 20, 2026 07:38
Add :client-name as an optional field to SessionConfig and
ResumeSessionConfig. This allows SDK consumers to identify their
application, which is included in the User-Agent header for API
requests.

The CLI server protocol already supports clientName on both
session.create and session.resume requests — this change exposes
it through the Clojure SDK API.

Changes:
- specs.clj: ::client-name spec, added to both config key sets
- client.clj: forward :client-name in wire param builders, docstrings
- integration_test.clj: 3 wire format tests (create, resume, omission)
- API.md: added to session config table
- CHANGELOG.md: entry under [Unreleased]

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 06:56
@krukow krukow enabled auto-merge February 20, 2026 06:56
@krukow krukow merged commit eb0e718 into main Feb 20, 2026
3 checks passed
@krukow krukow deleted the feat/client-name-upstream-510 branch February 20, 2026 06:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Ports upstream copilot-sdk PR #510 by adding optional :client-name to session create/resume config so consumers can identify their application (forwarded on the wire as clientName, used for User-Agent attribution upstream).

Changes:

  • Add ::client-name spec and allow :client-name in both session config specs.
  • Forward :client-name through build-create-session-params / build-resume-session-params and document it in docstrings.
  • Add integration tests + API docs + changelog entry for the new option.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/github/copilot_sdk/integration_test.clj Adds wire-format assertions that clientName is forwarded/omitted appropriately.
src/github/copilot_sdk/specs.clj Defines ::client-name and includes it in allowed session/resume config keys.
src/github/copilot_sdk/client.clj Includes :client-name in session.create/session.resume params and updates docstrings.
doc/reference/API.md Documents :client-name in the create-session config table.
CHANGELOG.md Notes the new option under [Unreleased].
.gitignore Ignores update.sh.

@github-actions github-actions bot mentioned this pull request Feb 20, 2026
github-actions bot pushed a commit that referenced this pull request Feb 20, 2026
Add two missing topics to doc/getting-started.md:

- Permission model: explain deny-by-default, show approve-all usage,
  link to Permission Handling section in API Reference
- :client-name option: show how to identify an application in session config

Both features were added in merged PRs (#18 and #21) but were not
reflected in the getting-started tutorial.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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