[v2] Redesign process and transport configuration APIs
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
まず dotnet/src/Client.cs と dotnet/src/FfiRuntimeHost.cs を確認し、次に #1930 と #1976 の下準備を踏まえて現在の動作を確認します。影響を受けるクライアントオプションとトランスポート抽象化を SDK 間で追跡し、ランタイム依存関係をすべて文書化します。完了条件は、SDK 間の動作をテストし、移行ドキュメントを作成し、必要に応じて統合されたランタイムのフォローアップにリンクすることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
Implement a coherent redesign of the boundary between client-wide options, out-of-process transports, and the in-process runtime.
These items are planned v2 work carried forward from #1934. Investigation should determine the correct implementation against the current code, not independently decide whether the work is desirable. If current architecture or completed work contradicts an item, document that evidence and ask maintainers to confirm the change in direction.
Why this work exists
Several CopilotClientOptions were originally implemented by lowering them to environment variables on a spawned CLI process. That is coherent for stdio/TCP clients that own an OS process, but not for an in-process FFI runtime loaded into a shared host process. A process has one ambient environment, so independently mutating it for multiple clients does not provide per-client configuration.
The original in-process implementation rejected some unsupported options while silently ignoring others. #1976 added substantial compatible forwarding and validation; preserve that groundwork and verify the current behavior while implementing the intended v2 API boundary.
Original option and behavior inventory
The complete environment-lowered inventory recorded in #1934 was:
| Option | Environment variable(s) | Original in-process behavior |
|---|---|---|
Environment |
Replaces the process environment block | Rejected |
Telemetry |
COPILOT_OTEL_ENABLED, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, COPILOT_OTEL_FILE_EXPORTER_PATH, COPILOT_OTEL_EXPORTER_TYPE, COPILOT_OTEL_SOURCE_NAME, OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT |
Rejected |
GitHubToken |
COPILOT_SDK_AUTH_TOKEN, plus --auth-token-env |
Silently ignored |
BaseDirectory |
COPILOT_HOME |
Silently ignored |
Mode == Empty |
COPILOT_DISABLE_KEYTAR=1 |
Silently ignored |
ConnectionToken |
COPILOT_CONNECTION_TOKEN |
TCP-only; not applicable in-process |
The following options were lowered to CLI arguments, but the original FFI host_start arguments were hardcoded to [entrypoint, "--embedded-host"] and did not forward them:
UseLoggedInUser→--no-auto-loginSessionIdleTimeoutSeconds→--session-idle-timeoutEnableRemoteSessions→--remoteLogLevel→--log-level
The original workaround was to configure the host process before constructing a client:
- set
COPILOT_SDK_AUTH_TOKENfor authentication - set
COPILOT_HOMEfor the base directory - set
COPILOT_DISABLE_KEYTAR=1for empty mode - set the corresponding
COPILOT_OTEL_*andOTEL_*variables for telemetry
This workaround is historical context, not the desired v2 API.
Required changes
- Remove client-level working-directory and environment options across SDKs, leaving process-scoped configuration on the applicable transport.
- In Rust, move
working_directory,env,env_remove,program, prefix/raw arguments, andextra_argsfromClientOptionsto the out-of-process transport. These remained onClientOptionsbecause moving them was breaking and the existing Rust transport units/structs were not declared with the#[non_exhaustive]/Defaultextensibility needed to add fields compatibly. - Make Rust's supplied process environment semantics consistent with the other SDKs. The intended behavior from #1934 is that a nonempty supplied environment replaces the inherited environment instead of adding to it.
- Rename shared "child process" connection abstractions to "out of process" where they also cover unrelated TCP processes. Unrelated-process TCP should reject path and argument settings at runtime where they do not apply.
- Replace settings lowered into environment variables or command-line arguments with coherent first-class runtime/server configuration where needed for stdio, TCP, and in-process operation. Environment variables may remain as compatibility overrides.
- Ensure the runtime consumes the
host_startenv_jsoncontract for host-side reads so configuration remains per client rather than ambient to the host process. - Validate settings that cannot apply to in-process or unrelated-process TCP connections, avoiding silent no-ops.
The first-class configuration and env_json work may not be possible without runtime changes. If runtime changes are required, file a single follow-up issue describing the complete runtime work and treat implementation of those runtime changes as out of scope for this SDK issue.
Implementation preparation
- Account for relevant groundwork already merged in #1930 and #1976.
- Confirm the present behavior of all environment- and argument-lowered options listed above.
- Define the consistent public API shape and migration path in every affected SDK.
- Link the single runtime follow-up if required.
- Separate compatible groundwork that can safely land in v1 from the breaking v2 API changes.
Historical context
- #1934
- #1901
- #1920
- #1929
- #1930
- #1976
- #1993
- Original .NET references in #1934:
dotnet/src/Client.cs(ValidateEnvironmentOptions, in-process startup, child-process environment construction,ApplyTelemetryEnvironment, and auth argument handling) anddotnet/src/FfiRuntimeHost.cs
Completion
Implement and test the required cross-SDK behavior, link the consolidated runtime follow-up where required, and document migration from every removed, moved, renamed, or behaviorally changed API. Any item not implemented requires documented contradictory evidence and explicit maintainer agreement.
- 主要言語
- TypeScript
- スター
- 10.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 64
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-sdk のほかの issue
-
Clarify SDK architecture and in-process runtime transport対応中かも @KalebCole が 4 日前に担当しました。 オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
github/copilot-sdk#2804 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Python ModelLimits drops max_output_tokens from model metadata対応中かも @HDMowri が 5 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2798 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
github/copilot-sdk#2793 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/copilot-sdk#2782 ·
メンテナーはふだん 1 日以内に返信
-
Rust: subagent lifecycle hooks are logged as unknown対応中かも @hackberry-lab が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
github/copilot-sdk#2781 ·
メンテナーはふだん 1 日以内に返信
github/copilot-sdk の issue をすべて見る
似ている issue
-
enhancement good first issue priority: low size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
streamplace/streamplace#1351 ·
メンテナーはふだん 2 日以内に返信
-
Link Checker Reportオープンautomated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
databendlabs/databend-docs#3511 ·
-
automated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100