[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BEBM4PGHMSCBQGYDGXJEY":3,"skill-same:01M69BEBM4PGHMSCBQGYDGXJEY":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":7,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M69BEBM4PGHMSCBQGYDGXJEY","copilot-sdk-gpt55","Copilot SDK GPT-5.5 集成",null,"","microsoft\u002FAKS-Lab-GitHubCopilot","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BE5H0TP45ZP79NQ2WN8PK",10,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcopilot-sdk-gpt55\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[30,31,32,33],"sdk","copilot","copilot sdk","copilot sdk gpt55","2026-11-10 10:12:30",false,"# Skill: GitHub Copilot SDK on `gpt-5.5`\n\n> Reflects the actual `agent-framework[github-copilot]` 1.3.x API installed in this repo. Earlier `GitHubCopilotChatClient` \u002F `ChatAgent(client=...)` syntax is **not** valid here.\n\n## The two imports\n\n```python\nfrom agent_framework.github import GitHubCopilotAgent, GitHubCopilotOptions\nfrom copilot.generated.rpc import PermissionDecisionApproveOnce\nfrom copilot.session import PermissionRequestResult\n\nfrom src.shared.copilot import build_copilot_client\n```\n\n## The one builder shape\n\n```python\ndef _approve_all(_request: object, _context: dict[str, str]) -> PermissionRequestResult:\n    return PermissionDecisionApproveOnce()\n\n\nasync def build_agent(settings: Settings) -> _RunnableAgent:\n    agent = GitHubCopilotAgent(\n        instructions=SYSTEM_PROMPT,\n        client=build_copilot_client(),\n        name=\"\u003Cname>\",\n        description=\"...\",\n        tools=list(TOOLS),                       # local @tool functions, NEVER MCP\n        default_options=GitHubCopilotOptions(\n            model=settings.copilot_model,        # default \"gpt-5.5\"\n            timeout=settings.copilot_timeout_seconds,\n            on_permission_request=_approve_all,  # MANDATORY — see §Permissions\n            mcp_servers={                        # specialists only; orchestrator omits this\n                \"\u003Ckey>\": {\n                    \"type\": \"http\",\n                    \"url\": settings.\u003Cwhich>_mcp_url,\n                    \"tools\": [\"*\"],\n                    \"timeout\": int(settings.copilot_timeout_seconds * 1000),\n                },\n            },\n        ),\n    )\n    return _RunnableAgent(agent=agent)\n```\n\n`_RunnableAgent` is a `@dataclass(frozen=True)` adapter exposing `async def run(self, message: str) -> AgentResponse[None]`. The shared `make_app` calls `.run(req.goal)` on it.\n\n## Permissions (do NOT skip)\n\nThe Copilot SDK runs every tool call through a permission gate. The handler must return `PermissionDecisionApproveOnce()`. Without a handler, every call returns:\n\n> `Permission denied and could not request permission from user`\n\nThis bug is silent — the LLM faithfully reports \"all specialists rejected the request\" with zero stack trace. Always wire `on_permission_request=_approve_all` for both MCP tools (specialists) and `@tool` function tools (orchestrator).\n\n## Tool signatures — flat scalars, not Pydantic\n\nThe SDK injects tool arguments as a raw `dict` and does **not** marshal them into Pydantic models. A signature like `async def ask_inventory(req: _AskRequest)` raises `'dict' object has no attribute 'goal'` at call time.\n\n✅ Correct:\n```python\n@tool(name=\"ask_inventory\", description=\"...\")\nasync def ask_inventory(goal: str) -> str:\n    \"\"\"...Args: goal: ... Returns: ...\"\"\"\n```\n\n❌ Wrong:\n```python\n@tool(...)\nasync def ask_inventory(req: _AskRequest) -> str: ...\n```\n\nPydantic models stay valid for `models.py` (process-boundary types) and FastMCP `@mcp.tool()` (the MCP server itself does marshal).\n\n## MCP wiring\n\nMCP is configured **inside `GitHubCopilotOptions(mcp_servers={...})`**, not via the legacy `MCPStreamableHTTPTool` class. If a generated file imports `MCPStreamableHTTPTool`, reject it. Specialist `tools.py` should expose an empty `TOOLS: list[FunctionTool] = []` — every external call is an MCP tool.\n\n## Authentication\n\n- Local dev: fine-grained PAT in `GITHUB_TOKEN`. `build_copilot_client()` passes it explicitly to `CopilotClient(github_token=..., use_logged_in_user=False)`. `docker-compose.yml` fails fast (`${GITHUB_TOKEN:?...}`) if it's not exported — required even for `docker compose ps` \u002F `down`.\n- AKS: Key Vault → Secrets Store CSI → `GITHUB_TOKEN` env. Pod SA is federated to a UAMI (Workload Identity).\n- ACA: Key Vault `secretref` → `GITHUB_TOKEN`. Container app uses a UAMI.\n\n## Timeouts (hard rules)\n\nThree separate timeouts must all be sized for chained tool calls:\n\n| Knob | Where | Min value | Reason |\n|---|---|---|---|\n| `GitHubCopilotOptions.timeout` | per-agent | **120 s** | Orchestrator may chain 4 sequential `ask_*` tool calls (10–25 s each). 30 s is too tight and surfaces as `Timeout after 30.0s waiting for session.idle`. |\n| `mcp_servers[*].timeout` | specialist agents | `int(seconds * 1000)` | The Copilot SDK's `MCPHTTPServerConfig.timeout` is milliseconds, not seconds. |\n| `A2AClient` httpx timeout | orchestrator | `connect=10, read=120, write=30, pool=10` | An A2A POST `\u002Finvoke` waits on the peer's full LLM run. 30 s read surfaces as `httpx.ReadTimeout`. |\n\nThe lab default is `ZAVA_COPILOT_TIMEOUT_SECONDS=120` (set in `docker-compose.yml::x-agent-env`).\n\n## Container runtime gotcha\n\nThe Copilot SDK extracts its bundled Node CLI into `$HOME\u002F.cache` on first call. A non-root container whose `HOME` defaults to `\u002Fapp` (root-owned) fails with:\n\n```\nFailed to extract bundled package: Error: EACCES: permission denied, mkdir '\u002Fapp\u002F.cache'\n```\n\nFix in the runtime stage of `src\u002FDockerfile.base`:\n\n```dockerfile\nENV HOME=\u002Fhome\u002Fzava XDG_CACHE_HOME=\u002Fhome\u002Fzava\u002F.cache\nRUN useradd --uid 10001 --home \u002Fhome\u002Fzava ... \\\n && mkdir -p \u002Fhome\u002Fzava\u002F.cache \u002Fapp \\\n && chown -R 10001:10001 \u002Fhome\u002Fzava \u002Fapp\n```\n\n## Forbidden in this repo\n\n| ❌ Do not import | Reason |\n|---|---|\n| `GitHubCopilotChatClient` | Does not exist in agent-framework 1.3.x — only `GitHubCopilotAgent` |\n| `ChatAgent(client=GitHubCopilotChatClient(...))` | Old API |\n| `MCPStreamableHTTPTool` | MCP is wired via `GitHubCopilotOptions(mcp_servers=...)` |\n| `OpenAIChatClient`, `AzureOpenAIChatClient` | Repo is Copilot-only |\n| Anything reading `OPENAI_API_KEY` | Same |\n\nIf a generated file contains any of these, reject it.\n\n## Logging fields\n\nEvery `agent.run.*` log line must bind:\n\n- `agent.name`\n- `agent.run_id`\n- `agent.span_id`\n\nUse `structlog.contextvars.bind_contextvars(...)` in the FastAPI request scope (the shared `make_app` does this for you).\n",{},"main","44e33846404c95b38ed9c99d06617cd89dce5467",".github\u002Fskills\u002Fcopilot-sdk-gpt55",31,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-10-29 09:47:55",{"source":9,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add microsoft\u002FAKS-Lab-GitHubCopilot --skill copilot-sdk-gpt55",{"tool":53,"command":54},"bunx","bunx skills add microsoft\u002FAKS-Lab-GitHubCopilot --skill copilot-sdk-gpt55",{"tool":56,"command":57},"pnpm","pnpm dlx skills add microsoft\u002FAKS-Lab-GitHubCopilot --skill copilot-sdk-gpt55","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcopilot-sdk-gpt55\u002FSKILL.md",true,[],[62,74,88,98,112,124],{"skillNo":63,"name":64,"nameZh":65,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":66,"categories":67,"keywords":72,"publishedAt":34},"01M69BEGJ4FRHZF5ZJE0P0YXXD","pydantic-contracts","Pydantic 数据契约验证","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpydantic-contracts\u002FSKILL.md",[68,69],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":70,"categoryName":71,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BT7QVANT4709358VEJK53E","代码实现",[73],"pydantic contracts",{"skillNo":75,"name":76,"nameZh":77,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":78,"categories":79,"keywords":84,"publishedAt":34},"01M69BEEX9ND3CTPWKTR76427M","mcp-server-skeleton","MCP 服务端框架搭建","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmcp-server-skeleton\u002FSKILL.md",[80,83],{"categoryNo":81,"categoryName":82,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[85,86,87],"MCP","mcp server","mcp server skeleton",{"skillNo":89,"name":90,"nameZh":91,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":92,"categories":93,"keywords":96,"publishedAt":34},"01M69BEDDG27MZ3HJA3VYZAF0B","maf-agent-skeleton","MAF 智能体框架搭建","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fmaf-agent-skeleton\u002FSKILL.md",[94,95],{"categoryNo":81,"categoryName":82,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[97],"maf agent skeleton",{"skillNo":99,"name":100,"nameZh":101,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":102,"categories":103,"keywords":110,"publishedAt":34},"01M69BEA91P1628K12AAXRHEG3","aks-helm","AKS Helm 应用部署","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Faks-helm\u002FSKILL.md",[104,107],{"categoryNo":105,"categoryName":106,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":108,"categoryName":109,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSTR9076S7ETYWTQVVK45G","云原生计算与容器编排",[111],"aks helm",{"skillNo":113,"name":114,"nameZh":115,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":116,"categories":117,"keywords":122,"publishedAt":34},"01M69BE8V5PBXCRGERWC0Y62RG","aca-bicep","ACA Bicep 部署模板","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Faca-bicep\u002FSKILL.md",[118,119],{"categoryNo":108,"categoryName":109,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":120,"categoryName":121,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BT9F3Z67AB1M6CHA8X75WW","云架构师",[123],"aca bicep",{"skillNo":125,"name":126,"nameZh":127,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":34},"01M69BE7K6CSG8HPMWJ11D86Q9","a2a-loopback-tests","A2A 回环测试","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FAKS-Lab-GitHubCopilot\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fa2a-loopback-tests\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":134,"categoryName":135,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[137,138],"a2a","a2a loopback tests"]