Skip to content

Add Autopilot objective state RPC across all SDKs - #2506

Draft
aymenfurter wants to merge 4 commits into
mainfrom
aymenfurter-microsoft-agent-runtime-compatibility
Draft

Add Autopilot objective state RPC across all SDKs#2506
aymenfurter wants to merge 4 commits into
mainfrom
aymenfurter-microsoft-agent-runtime-compatibility

Conversation

@aymenfurter

Copy link
Copy Markdown
Contributor

Important

Draft: Merge is blocked until the containing Copilot CLI release is pinned and the generated sources are refreshed.

Summary

Add generated bindings for the experimental session.autopilotObjective.getState RPC across TypeScript, Python, Go, .NET, Rust, and Java.

The result contains the objective text, lifecycle status, turn count, optional pause or completion details, and credit consumption. Exact nano-AIU values use decimal strings to prevent precision loss. A null state means that the session has no objective.

This follows the existing direct generated session-RPC pattern used by the agent, compaction, and history APIs. It does not add a handwritten workflow wrapper.

Test coverage

  • Dispatch, session-ID injection, and serialization tests in all six SDKs.
  • Coverage for active, paused, completed, capped, uncapped, and empty states.
  • One shared replay E2E scenario across all six SDKs.
  • The E2E test uses a compatible CLI build and does not call a model.

Compatibility

Older CLI versions return JSON-RPC error -32601. The SDK propagates this error and does not convert it to an empty state.

This PR does not add an objective setter or wrap the built-in Autopilot command because no typed public RPC exists for that operation.

Before merge

  • Pin the containing Copilot CLI release.
  • Regenerate all six SDKs from the released schema.
  • Confirm that code generation produces no additional diff.
  • Run the complete test suite against the released CLI.

Aymen Furter and others added 4 commits September 3, 2026 12:45
Generate the experimental session.autopilotObjective.getState API for all SDK languages and add focused contract coverage for nullable state, lifecycle statuses, optional fields, and exact nano-AIU strings. Keep runtime pins unchanged until the upstream change is published in a CLI release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Consolidate generated RPC tests into the established language-specific suites, align credit fixtures, and verify required and optional fields plus session-scoped dispatch.

Use the shared Rust replay context and correct its invocation count.

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