Expose and serialize allowAllMcpServerInstructions in TypeScript SDK
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- api, testing-qa
调研方向
从 dist/types.d.ts 和 dist/client.js 开始,然后跟踪生成的 RPC 类型以及 CopilotClient.createSession() 的请求路径,包括 resume 或 update 处理。使用同一个未列入 allowlist 的 MCP server fixture 进行并排测试和线级断言。完成的标准是:省略和 false 会让 canary 保持隐藏,而 true 会将其暴露,并且工具在所有情况下都可用。
由索引模型根据 Issue 内容生成。
描述
Problem
The Copilot runtime protocol supports allowAllMcpServerInstructions, but TypeScript SDK 1.0.11 does not provide a working SessionConfig path for it.
The generated RPC types contain the field, and the runtime describes it as including instructions from every MCP server instead of only allowlisted servers. However:
dist/types.d.tsdoes not expose it onSessionConfigBase.CopilotClient.createSession()indist/client.jsdoes not serialize it into thesession.createrequest.- A consumer adding the property at runtime therefore has no effect.
This prevents evaluation harnesses and other SDK consumers from explicitly testing or enabling instructions from a non-allowlisted MCP server.
Controlled reproduction
A one-turn probe used a temporary MCP server whose unique canary existed only in server-level initialization instructions. The tool description did not contain the canary, and the prompt prohibited tool calls.
- Stock SDK: agent returned
NO_MCP_INSTRUCTION_CANARY(18,924 tokens, 1 turn, 0 tool calls). - Consumer supplied
allowAllMcpServerInstructions: truewithout changing SDK serialization: same negative result. - Temporary SDK wiring that serialized the field into
session.create, together with the consumer option: agent returned the exact instruction canary (19,028 tokens, 1 turn, 0 tool calls).
This isolates the missing SDK forwarding from model variance and MCP tool selection.
Requested behavior
- Add
allowAllMcpServerInstructions?: booleanto the public TypeScript session configuration shared by create/resume paths as appropriate. - Serialize it to the runtime request and ensure resumed or updated sessions honor the same policy.
- Preserve the secure default: omitted or
falsemust continue to exclude instructions from non-allowlisted servers.
Required side-by-side tests
Please cover both policy states using the same non-allowlisted MCP server fixture:
- Disallowed: omitted and explicit
falsedo not expose the server instruction canary. - Allowed: explicit
trueexposes the exact canary. - The server's tools remain available in both states, proving the assertion concerns instruction visibility rather than MCP startup.
- Wire-level tests assert both
falseandtrueare serialized correctly where supplied.
The allow/disallow behavior should remain explicit rather than changing the default globally.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 131
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
apache/flink-agents#1152 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
jenkinsci/blueocean-plugin#5417 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/eo-graphs#75 ·