Skip to content

UpCreate Issues111#330

Open
stomde wants to merge 92 commits intogithub:add-session-event-testsfrom
stomde:patch-3
Open

UpCreate Issues111#330
stomde wants to merge 92 commits intogithub:add-session-event-testsfrom
stomde:patch-3

Conversation

@stomde
Copy link
Copy Markdown

@stomde stomde commented Feb 2, 2026

Attach badges

SteveSandersonMS and others added 30 commits January 15, 2026 16:08
* Add session event subscription tests for all SDKs

- Rename .NET test from Should_SessionEvt_Subscribed to Should_Receive_Session_Events
- Add equivalent tests for Node.js, Python, and Go SDKs
- Add shared snapshot file for test replay

* Update session event tests to assert response content

- Change prompt to 'What is 100+200?'
- Assert assistant response contains '300'
- Regenerate snapshot file

* Fix formatting in session.test.ts
* Update @github/copilot to latest

* Update session types
* E2E infrastructure: skip writing snapshots on failure + update snapshots for extended thinking

* Update CLI to 0.0.383

* Regenerate types for session.usage_info and apply PR feedback
* Add sendAndWait API for non-blocking send with completion waiting

* Update CLI to 0.0.384 and regenerate snapshot

* Add sendAndWait for all languages

* Regenerate async permission handler snapshot

* Add PowerShell warm-up step for Windows CI runs
* Initial plan

* Add Go SDK submodule version tags to publish workflow

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add error handling for Go submodule tag creation

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add git fetch and error handling to Go tag step

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add conditional to Go tag step for clarity

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add robust tag existence check and creation verification

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Simplify Go tag creation logic

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Update .github/workflows/publish.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/publish.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: Adrien Friggeri <adrien@friggeri.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix formatting of code block in README
* add py.typed to support typing

* simplify path manipulation

* Apply ruff formatting

---------

Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
…ypes (github#35)

* Initial plan

* Add graceful error handling for unknown/malformed session events in Python SDK

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add unit tests for unknown/malformed session event handling

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Improve test specificity for exception types

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Revert broad error suppression - let parsing errors surface for visibility

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

* Use specific exception types in test instead of broad Exception

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

* Run Python formatter (ruff format)

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>
* Fix Go e2e tests not running in CI

Add ./... to go test commands to include tests in subdirectories like go/e2e/

* Simplify to single go test command

* Remove global timeout, rely on per-test 60s timeouts
* Initial plan

* Fix JSON-RPC read failures with large payloads (>64KB)

- Add _read_exact() method to handle short reads from pipes
- Update _read_message() to use _read_exact() for reliable large payload handling
- Add comprehensive unit tests for short read scenarios and large payloads

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

* Fix slice notation spacing for consistency

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

* Run Python formatter on test_jsonrpc.py

Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>
* Update @github/copilot to 0.0.387

* Regenerate session types

* Restore custom python session types
* Initial plan

* Add roles: all to issue-triage workflow to allow all users to trigger it

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
)

* Fix session event handler unsubscription and add tests

The unsubscribe function was failing due to invalid function pointer comparisons.
Refactored handler registration to use unique IDs for reliable cleanup.

Tests verify:
- Multiple handlers can be registered and all receive events
- Unsubscribing one handler doesn't affect others
- Calling unsubscribe multiple times is safe
- Handlers are called in registration order
- Concurrent subscribe/unsubscribe is safe

Co-authored-by: nathfavour <116535483+nathfavour@users.noreply.github.com>

* Fix abort test to use non-blocking send()

* Clean up "should abort a session"

* Add equivalent abort test improvements to Go, Python, and .NET

* Formatting

* More lint/format

* Update test_session.py

* Fix risk of flakiness

---------

Co-authored-by: nathfavour <116535483+nathfavour@users.noreply.github.com>
* Add config dir to session options

* add tests

* Use join
* Update some snapshots; remove redundant ones

* Undo irrelevant changes

* Tidy

* Add missing snapshot
* feat: add skillDirectories and disabledSkills to all SDKs

Expose skill configuration options from CLI server to SDK clients:
- skillDirectories: directories to load skills from
- disabledSkills: list of skill names to disable

Updated SDKs:
- Node.js: SessionConfig, ResumeSessionConfig types and client
- Go: SessionConfig, ResumeSessionConfig structs and client
- .NET: SessionConfig, ResumeSessionConfig classes and client
- Python: SessionConfig, ResumeSessionConfig TypedDicts and client

* Add tests

* Add tests

* fix lint

* format python

* fix snapshots

* fix python formatting (again)

* Use a directory under workdir for skills

* update dotnet test

* hopefully fix tests

* Accidentally added file

* skip tests for now
* Re-enable skills tests for Node

* Re-enable them for .NET

* Re-enable and fix for Python

* Re-enable and fix Go tests

* Actually skip

* Formatting

* More formatting
* Use STJ's polymorphism support instead of custom converter

Also:
- Mark properties as required if they're required in the schema
- Mark reference types as nullable if they're optional in the schema
- Remove the suppression of CS8618, which is resulting in public types having incorrect nullable annotations
- Annotate enums so the NativeAOT-unfriendly non-generic enum converter isn't needed

* Address feedback

* Fix enum attribution
* Update CONTRIBUTING.md to clarify contribution types

Added a section outlining the types of contributions welcomed for the project, including bug fixes, SDK improvements, and documentation enhancements.

* Fix typo
* Cookbook: add landing page

- Central hub for all language cookbooks
- Links to 4 languages with 4 recipes each
- Quick-start commands for each language

* Cookbook(.NET): add 4 recipes with docs and runnable examples

Recipes:
- error-handling: try-catch patterns, specific error handling, timeouts
- multiple-sessions: manage independent conversations simultaneously
- managing-local-files: organize files by metadata with AI
- pr-visualization: interactive PR age chart CLI tool

Each recipe includes:
- Markdown documentation with code examples
- File-based app runnable example (.cs)
- PublishAot=false directive for compatibility

* Cookbook(Go): add 4 recipes with docs and runnable examples

Recipes:
- error-handling: defer cleanup, error wrapping, timeouts with context
- multiple-sessions: concurrent session management
- managing-local-files: organize files by metadata with AI
- pr-visualization: interactive PR age chart CLI tool with flag parsing

Each recipe includes:
- Markdown documentation with Go idiomatic code
- Standalone runnable example (.go)
- Proper error handling with defer patterns
- CLI flag support where applicable

* Cookbook(Node.js): add 4 recipes with docs and runnable examples

Recipes:
- error-handling: try-catch async patterns, error types
- multiple-sessions: concurrent session management
- managing-local-files: organize files by metadata with AI
- pr-visualization: interactive PR age chart CLI tool

Each recipe includes:
- Markdown documentation with TypeScript code
- Standalone runnable example (.ts)
- package.json with local SDK reference (file:../../..)
- npm scripts for easy execution
- ESM with top-level await support

* Cookbook(Python): add 4 recipes with docs and runnable examples

Recipes:
- error_handling: exception handling, context managers
- multiple_sessions: concurrent session management
- managing_local_files: organize files by metadata with AI
- pr_visualization: interactive PR age chart CLI tool

Each recipe includes:
- Markdown documentation with Python examples
- Standalone runnable example (.py)
- requirements.txt with local SDK (editable install)
- Shebang for direct execution
- PEP 8 naming conventions (snake_case)

* Cookbook: add persisting sessions links

* Node: add persisting sessions recipe

* Dotnet: add persisting sessions recipe

* Go: add persisting sessions recipe

* Python: add persisting sessions recipe

* Fixing some copilot sloppiness

* Formatting
* Update README title, description, and add demos folder

* Rename demos to examples and update README
* Move docs to correct folder

* Move demos and examples
* Moving files into the correct locations

* Fixing paths from move
- Update README SDK paths to point to cookbook/
- Add Quick Links section with Getting Started, Cookbook, and Samples
- Rename demos to samples and move to root level
- Remove duplicate cookbook/examples folder
- Add AI Powered YouTube Content Generator video to samples
* feat: add status, auth, and models metadata APIs to all SDKs

Add three new methods to query CLI metadata:
- getStatus/get_status/GetStatus/GetStatusAsync - CLI version and protocol info
- getAuthStatus/get_auth_status/GetAuthStatus/GetAuthStatusAsync - Auth state
- listModels/list_models/ListModels/ListModelsAsync - Available models with metadata

Implements github#61

Bump protocol version to 2 to match copilot-agent-runtime.

* bump dependency on cli

* Update protocol version, add tests, synchronize session events

* call test.sh properly
Copilot AI and others added 24 commits January 29, 2026 17:59
…github#259)

* Initial plan

* Optimize CI workflow: remove push trigger and add path-based filtering

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Fix composite action outputs and step references

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Remove accidentally committed files

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Address code review feedback: remove redundant condition and add workflow files to filters

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Fix comment capitalization for SDK names

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Split into separate workflows per SDK with native path filtering

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
…b#237)

* feat(auth): add githubToken and useLoggedInUser options to all SDK clients

Enable SDK clients to customize authentication when spawning the CLI server.

Node.js:
- Add githubToken and useLoggedInUser options to CopilotClientOptions
- Set COPILOT_SDK_AUTH_TOKEN env var and pass --auth-token-env flag
- Pass --no-auto-login when useLoggedInUser is false
- Default useLoggedInUser to false when githubToken is provided

Python:
- Add github_token and use_logged_in_user options
- Same behavior as Node.js SDK

Go:
- Add GithubToken and UseLoggedInUser fields to ClientOptions
- Same behavior as Node.js SDK

.NET:
- Add GithubToken and UseLoggedInUser properties to CopilotClientOptions
- Same behavior as Node.js SDK

All SDKs include validation to prevent use with cliUrl (external server)
and tests for the new options.

* Potential fix for pull request finding 'Unnecessarily complex Boolean expression'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ithub#269)

* feat(auth): add githubToken and useLoggedInUser options to all SDK clients

Enable SDK clients to customize authentication when spawning the CLI server.

Node.js:
- Add githubToken and useLoggedInUser options to CopilotClientOptions
- Set COPILOT_SDK_AUTH_TOKEN env var and pass --auth-token-env flag
- Pass --no-auto-login when useLoggedInUser is false
- Default useLoggedInUser to false when githubToken is provided

Python:
- Add github_token and use_logged_in_user options
- Same behavior as Node.js SDK

Go:
- Add GithubToken and UseLoggedInUser fields to ClientOptions
- Same behavior as Node.js SDK

.NET:
- Add GithubToken and UseLoggedInUser properties to CopilotClientOptions
- Same behavior as Node.js SDK

All SDKs include validation to prevent use with cliUrl (external server)
and tests for the new options.

* feat: add hooks and user input handlers to all SDKs with e2e tests

- Add preToolUse, postToolUse, and other hook callbacks to Node.js, Python, Go, .NET SDKs
- Add requestUserInput callback (ask_user) to all SDKs
- Fix .NET SDK bug: StreamJsonRpc requires explicit = null defaults for optional parameters
- Add e2e tests for hooks (4 tests) and ask-user (3 tests) in all SDKs
- Create shared test snapshots for consistent LLM responses across SDKs
* Add lsp config for dotnet.

* fix: add rootPath for C# LSP in subdirectory

* fix: remove explicit rollForward to allow patch version updates

* Add support for golang lsp.

* Update to simplified config.

* Update to new format.
)

Update all SDK documentation with new features from PRs github#237 and github#269:

- Add githubToken and useLoggedInUser client options for authentication
- Add onUserInputRequest handler for enabling ask_user tool
- Add hooks configuration for session lifecycle events
- Add User Input Requests section with examples
- Add Session Hooks section documenting all available hooks:
  - onPreToolUse, onPostToolUse, onUserPromptSubmitted
  - onSessionStart, onSessionEnd, onErrorOccurred
* Initial plan

* Add paths-ignore filters to all SDK test workflows

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Remove .txt from paths-ignore to allow dependency files

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Add overloaded on() method that accepts an event type string as the first
argument, enabling type-safe event subscriptions:

  session.on('assistant.message', (event) => {
    // event is typed as SessionEventPayload<'assistant.message'>
    console.log(event.data.content);
  });

The original on(handler) signature remains supported for wildcard subscriptions.

Changes:
- Add SessionEventType, SessionEventPayload, TypedSessionEventHandler types
- Update CopilotSession.on() with typed overload
- Update _dispatchEvent() to dispatch to typed handlers
- Export new types from index.ts
- Update documentation with new usage patterns
* Initial plan

* Update dependabot.yaml to include node, python, go, and dotnet dependencies

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
* honor ClientOptions.UseStdio = false

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* honor empty ClientOptions.Env

* fic nil options
Bumps [githubnext/gh-aw](https://github.com/githubnext/gh-aw) from 0.37.31 to 0.38.2.
- [Release notes](https://github.com/githubnext/gh-aw/releases)
- [Changelog](https://github.com/githubnext/gh-aw/blob/main/CHANGELOG.md)
- [Commits](github/gh-aw@v0.37.31...v0.38.2)

---
updated-dependencies:
- dependency-name: githubnext/gh-aw
  dependency-version: 0.38.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.0.3 to 25.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [openai](https://github.com/openai/openai-node) from 6.15.0 to 6.17.0.
- [Release notes](https://github.com/openai/openai-node/releases)
- [Changelog](https://github.com/openai/openai-node/blob/master/CHANGELOG.md)
- [Commits](openai/openai-node@v6.15.0...v6.17.0)

---
updated-dependencies:
- dependency-name: openai
  dependency-version: 6.17.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github#303)

* Initial plan

* Update SDK test workflows to use paths with ! character instead of paths-ignore

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
* feat: add reasoning_effort support to all SDK clients

- Add reasoningEffort to SessionConfig and ResumeSessionConfig
- Extend ModelCapabilities.supports with reasoningEffort flag
- Add supportedReasoningEfforts and defaultReasoningEffort to ModelInfo
- Update session create/resume to pass reasoningEffort to server

* docs: add reasoningEffort documentation to SDK READMEs

Document the new reasoningEffort/reasoning_effort option in SessionConfig
for all SDK clients (Node.js, Python, Go, .NET).

* trigger CI
…nder concurrency (github#300)

* Initial plan

* Add caching for list_models to prevent rate limiting

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Fix linting: remove quotes from type annotation

* Fix race condition in list_models caching and add missing test decorator

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Return copies of cached models list and improve test robustness

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

* Add list_models caching across all SDK languages (nodejs, dotnet, go)

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: Adrien Friggeri <adrien@friggeri.net>
It has been migrated to awesome-copilot
…ol call (github#307)

Co-authored-by: Jimmy Pan <jimmypan@amazon.com>
…b#325)

* Initial plan

* Change SessionConfig model field from Literal to str

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Attach badges
@stomde stomde requested a review from a team as a code owner February 2, 2026 20:55
@stomde
Copy link
Copy Markdown
Author

stomde commented Feb 2, 2026

In tym then..../*true to it's name shitty stomawoke dahhhh 🤟🤗🫣

@stomde stomde closed this Feb 2, 2026
@stomde stomde reopened this Apr 11, 2026
@stomde stomde changed the base branch from main to add-session-event-tests April 11, 2026 12:07
@stomde stomde mentioned this pull request Apr 11, 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.