[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-microsoft-copilot-sdk":3,"mdc-zs7x0-key":48,"related-repo-microsoft-copilot-sdk":12236,"related-org-microsoft-copilot-sdk":12344},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":31,"repoUrl":32,"updatedAt":33,"license":34,"forks":35,"topics":36,"repo":43,"sourceUrl":46,"mdContent":47},"copilot-sdk","build applications with GitHub Copilot SDK","Build applications powered by GitHub Copilot using the Copilot SDK. Use when creating programmatic integrations with Copilot across Node.js\u002FTypeScript, Python, Go, or .NET. Covers session management, custom tools, streaming, hooks, MCP servers, BYOK providers, session persistence, custom agents, skills, and deployment patterns. Requires GitHub Copilot CLI installed and a GitHub Copilot subscription (unless using BYOK).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"microsoft","Microsoft","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fmicrosoft.png",[12,16,19,22,25,28],{"name":13,"slug":14,"type":15},"Copilot","copilot","tag",{"name":17,"slug":18,"type":15},".NET","net",{"name":20,"slug":21,"type":15},"TypeScript","typescript",{"name":23,"slug":24,"type":15},"Python","python",{"name":26,"slug":27,"type":15},"SDK","sdk",{"name":29,"slug":30,"type":15},"Go","go",2804,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills","2026-07-07T06:53:48.628262",null,315,[37,38,39,40,41,27,42],"agent-skills","agents","azure","foundry","mcp","skills",{"repoUrl":32,"stars":31,"forks":35,"topics":44,"description":45},[37,38,39,40,41,27,42],"Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fskills\u002Ftree\u002FHEAD\u002F.github\u002Fskills\u002Fcopilot-sdk","---\nname: copilot-sdk\ndescription: Build applications powered by GitHub Copilot using the Copilot SDK. Use when creating programmatic integrations with Copilot across Node.js\u002FTypeScript, Python, Go, or .NET. Covers session management, custom tools, streaming, hooks, MCP servers, BYOK providers, session persistence, custom agents, skills, and deployment patterns. Requires GitHub Copilot CLI installed and a GitHub Copilot subscription (unless using BYOK).\n---\n\n# GitHub Copilot SDK\n\nBuild applications that programmatically interact with GitHub Copilot. The SDK wraps the Copilot CLI via JSON-RPC, providing session management, custom tools, hooks, MCP server integration, and streaming across Node.js, Python, Go, and .NET.\n\n## Prerequisites\n\n- **GitHub Copilot CLI** installed and authenticated (`copilot --version`)\n- **GitHub Copilot subscription** (Individual, Business, or Enterprise) — not required for BYOK\n- **Runtime:** Node.js 18+ \u002F Python 3.8+ \u002F Go 1.21+ \u002F .NET 8.0+\n\n## Installation\n\n| Language | Package | Install |\n|----------|---------|---------|\n| Node.js | `@github\u002Fcopilot-sdk` | `npm install @github\u002Fcopilot-sdk` |\n| Python | `github-copilot-sdk` | `pip install github-copilot-sdk` |\n| Go | `github.com\u002Fgithub\u002Fcopilot-sdk\u002Fgo` | `go get github.com\u002Fgithub\u002Fcopilot-sdk\u002Fgo` |\n| .NET | `GitHub.Copilot.SDK` | `dotnet add package GitHub.Copilot.SDK` |\n\n## Architecture\n\nThe SDK communicates with the Copilot CLI via JSON-RPC over stdio (default) or TCP. The CLI manages model calls, tool execution, session state, and MCP server lifecycle.\n\n```\nYour App → SDK Client → [stdio\u002FTCP] → Copilot CLI → Model Provider\n                                          ↕\n                                     MCP Servers\n```\n\n**Transport modes:**\n\n| Mode | Description | Use Case |\n|------|-------------|----------|\n| **Stdio** (default) | CLI as subprocess via pipes | Local dev, single process |\n| **TCP** | CLI as network server | Multi-client, backend services |\n\n---\n\n## Core Pattern: Client → Session → Message\n\nAll SDK usage follows: create a client, create a session, send messages.\n\n### Node.js \u002F TypeScript\n\n```typescript\nimport { CopilotClient } from \"@github\u002Fcopilot-sdk\";\n\nconst client = new CopilotClient();\nconst session = await client.createSession({ model: \"gpt-4.1\" });\n\nconst response = await session.sendAndWait({ prompt: \"What is 2 + 2?\" });\nconsole.log(response?.data.content);\n\nawait client.stop();\n```\n\n### Python\n\n```python\nimport asyncio\nfrom copilot import CopilotClient\n\nasync def main():\n    client = CopilotClient()\n    await client.start()\n    session = await client.create_session({\"model\": \"gpt-4.1\"})\n    response = await session.send_and_wait({\"prompt\": \"What is 2 + 2?\"})\n    print(response.data.content)\n    await client.stop()\n\nasyncio.run(main())\n```\n\n### Go\n\n```go\nclient := copilot.NewClient(nil)\nif err := client.Start(ctx); err != nil { log.Fatal(err) }\ndefer client.Stop()\n\nsession, _ := client.CreateSession(ctx, &copilot.SessionConfig{Model: \"gpt-4.1\"})\nresponse, _ := session.SendAndWait(ctx, copilot.MessageOptions{Prompt: \"What is 2 + 2?\"})\nfmt.Println(*response.Data.Content)\n```\n\n### .NET\n\n```csharp\nawait using var client = new CopilotClient();\nawait using var session = await client.CreateSessionAsync(new SessionConfig { Model = \"gpt-4.1\" });\nvar response = await session.SendAndWaitAsync(new MessageOptions { Prompt = \"What is 2 + 2?\" });\nConsole.WriteLine(response?.Data.Content);\n```\n\n---\n\n## Streaming Responses\n\nEnable real-time output by setting `streaming: true` and subscribing to delta events.\n\n### Node.js\n\n```typescript\nconst session = await client.createSession({ model: \"gpt-4.1\", streaming: true });\n\nsession.on(\"assistant.message_delta\", (event) => {\n    process.stdout.write(event.data.deltaContent);\n});\nsession.on(\"session.idle\", () => console.log());\n\nawait session.sendAndWait({ prompt: \"Tell me a joke\" });\n```\n\n### Python\n\n```python\nfrom copilot.generated.session_events import SessionEventType\n\nsession = await client.create_session({\"model\": \"gpt-4.1\", \"streaming\": True})\n\ndef handle_event(event):\n    if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:\n        sys.stdout.write(event.data.delta_content)\n        sys.stdout.flush()\n    if event.type == SessionEventType.SESSION_IDLE:\n        print()\n\nsession.on(handle_event)\nawait session.send_and_wait({\"prompt\": \"Tell me a joke\"})\n```\n\n### Event Subscription\n\n| Method | Description |\n|--------|-------------|\n| `on(handler)` | Subscribe to all events; returns unsubscribe function |\n| `on(eventType, handler)` | Subscribe to specific event type (Node.js only) |\n\nCall the returned function to unsubscribe. In .NET, call `.Dispose()` on the returned disposable.\n\n---\n\n## Custom Tools\n\nDefine tools that Copilot can call to extend its capabilities.\n\n### Node.js\n\n```typescript\nimport { CopilotClient, defineTool } from \"@github\u002Fcopilot-sdk\";\n\nconst getWeather = defineTool(\"get_weather\", {\n    description: \"Get the current weather for a city\",\n    parameters: {\n        type: \"object\",\n        properties: { city: { type: \"string\", description: \"The city name\" } },\n        required: [\"city\"],\n    },\n    handler: async ({ city }) => ({ city, temperature: \"72°F\", condition: \"sunny\" }),\n});\n\nconst session = await client.createSession({\n    model: \"gpt-4.1\",\n    tools: [getWeather],\n});\n```\n\n### Python\n\n```python\nfrom copilot.tools import define_tool\nfrom pydantic import BaseModel, Field\n\nclass GetWeatherParams(BaseModel):\n    city: str = Field(description=\"The city name\")\n\n@define_tool(description=\"Get the current weather for a city\")\nasync def get_weather(params: GetWeatherParams) -> dict:\n    return {\"city\": params.city, \"temperature\": \"72°F\", \"condition\": \"sunny\"}\n\nsession = await client.create_session({\"model\": \"gpt-4.1\", \"tools\": [get_weather]})\n```\n\n### Go\n\n```go\ntype WeatherParams struct {\n    City string `json:\"city\" jsonschema:\"The city name\"`\n}\n\ngetWeather := copilot.DefineTool(\"get_weather\", \"Get weather for a city\",\n    func(params WeatherParams, inv copilot.ToolInvocation) (WeatherResult, error) {\n        return WeatherResult{City: params.City, Temperature: \"72°F\"}, nil\n    },\n)\n\nsession, _ := client.CreateSession(ctx, &copilot.SessionConfig{\n    Model: \"gpt-4.1\",\n    Tools: []copilot.Tool{getWeather},\n})\n```\n\n### .NET\n\n```csharp\nusing Microsoft.Extensions.AI;\nusing System.ComponentModel;\n\nvar getWeather = AIFunctionFactory.Create(\n    ([Description(\"The city name\")] string city) => new { city, temperature = \"72°F\" },\n    \"get_weather\", \"Get the current weather for a city\");\n\nawait using var session = await client.CreateSessionAsync(new SessionConfig {\n    Model = \"gpt-4.1\", Tools = [getWeather],\n});\n```\n\n### Tool Requirements\n\n- Handler must return JSON-serializable data (not `undefined`)\n- Parameters must follow JSON Schema format\n- Tool description should clearly state when the tool should be used\n\n---\n\n## Hooks\n\nIntercept and customize session behavior at key lifecycle points.\n\n| Hook | Trigger | Use Case |\n|------|---------|----------|\n| `onPreToolUse` | Before tool executes | Permission control, argument modification |\n| `onPostToolUse` | After tool executes | Result transformation, logging, redaction |\n| `onUserPromptSubmitted` | User sends message | Prompt modification, filtering, context injection |\n| `onSessionStart` | Session begins (new or resumed) | Add context, configure session |\n| `onSessionEnd` | Session ends | Cleanup, analytics, metrics |\n| `onErrorOccurred` | Error happens | Custom error handling, retry logic, monitoring |\n\n### Pre-Tool Use Hook\n\nControl tool permissions, modify arguments, or inject context before tool execution.\n\n```typescript\nconst session = await client.createSession({\n    hooks: {\n        onPreToolUse: async (input) => {\n            if ([\"shell\", \"bash\"].includes(input.toolName)) {\n                return { permissionDecision: \"deny\", permissionDecisionReason: \"Shell access not permitted\" };\n            }\n            return { permissionDecision: \"allow\" };\n        },\n    },\n});\n```\n\n**Input fields:** `timestamp`, `cwd`, `toolName`, `toolArgs`\n\n**Output fields:**\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `permissionDecision` | `\"allow\"` \\| `\"deny\"` \\| `\"ask\"` | Whether to allow the tool call |\n| `permissionDecisionReason` | string | Explanation for deny\u002Fask |\n| `modifiedArgs` | object | Modified arguments to pass |\n| `additionalContext` | string | Extra context for conversation |\n| `suppressOutput` | boolean | Hide tool output from conversation |\n\n### Post-Tool Use Hook\n\nTransform results, redact sensitive data, or log tool activity after execution.\n\n```typescript\nhooks: {\n    onPostToolUse: async (input) => {\n        \u002F\u002F Redact sensitive data from results\n        if (typeof input.toolResult === \"string\") {\n            let redacted = input.toolResult;\n            for (const pattern of SENSITIVE_PATTERNS) {\n                redacted = redacted.replace(pattern, \"[REDACTED]\");\n            }\n            if (redacted !== input.toolResult) {\n                return { modifiedResult: redacted };\n            }\n        }\n        return null; \u002F\u002F Pass through unchanged\n    },\n}\n```\n\n**Output fields:** `modifiedResult`, `additionalContext`, `suppressOutput`\n\n### User Prompt Submitted Hook\n\nModify or enhance user prompts before processing. Useful for prompt templates, context injection, and input validation.\n\n```typescript\nhooks: {\n    onUserPromptSubmitted: async (input) => {\n        return {\n            modifiedPrompt: `[User from engineering team] ${input.prompt}`,\n            additionalContext: \"Follow company coding standards.\",\n        };\n    },\n}\n```\n\n**Output fields:** `modifiedPrompt`, `additionalContext`, `suppressOutput`\n\n### Session Lifecycle Hooks\n\n```typescript\nhooks: {\n    onSessionStart: async (input, invocation) => {\n        \u002F\u002F input.source: \"startup\" | \"resume\" | \"new\"\n        console.log(`Session ${invocation.sessionId} started (${input.source})`);\n        return { additionalContext: \"Project uses TypeScript and React.\" };\n    },\n    onSessionEnd: async (input, invocation) => {\n        \u002F\u002F input.reason: \"complete\" | \"error\" | \"abort\" | \"timeout\" | \"user_exit\"\n        await recordMetrics({ sessionId: invocation.sessionId, reason: input.reason });\n        return null;\n    },\n}\n```\n\n### Error Handling Hook\n\n```typescript\nhooks: {\n    onErrorOccurred: async (input) => {\n        \u002F\u002F input.errorContext: \"model_call\" | \"tool_execution\" | \"system\" | \"user_input\"\n        \u002F\u002F input.recoverable: boolean\n        if (input.errorContext === \"model_call\" && input.error.includes(\"rate\")) {\n            return { errorHandling: \"retry\", retryCount: 3, userNotification: \"Rate limited. Retrying...\" };\n        }\n        return null; \u002F\u002F Default error handling\n    },\n}\n```\n\n**Output fields:** `suppressOutput`, `errorHandling` (`\"retry\"` | `\"skip\"` | `\"abort\"`), `retryCount`, `userNotification`\n\n### Python Hook Example\n\n```python\nasync def on_pre_tool_use(input_data, invocation):\n    if input_data[\"toolName\"] in [\"shell\", \"bash\"]:\n        return {\"permissionDecision\": \"deny\", \"permissionDecisionReason\": \"Not permitted\"}\n    return {\"permissionDecision\": \"allow\"}\n\nsession = await client.create_session({\n    \"hooks\": {\"on_pre_tool_use\": on_pre_tool_use}\n})\n```\n\n### Go Hook Example\n\n```go\nsession, _ := client.CreateSession(ctx, &copilot.SessionConfig{\n    Hooks: &copilot.SessionHooks{\n        OnPreToolUse: func(input copilot.PreToolUseHookInput, inv copilot.HookInvocation) (*copilot.PreToolUseHookOutput, error) {\n            return &copilot.PreToolUseHookOutput{PermissionDecision: \"allow\"}, nil\n        },\n    },\n})\n```\n\n---\n\n## MCP Server Integration\n\nConnect to MCP (Model Context Protocol) servers for pre-built tool capabilities.\n\n### Local Stdio Server\n\n```typescript\nconst session = await client.createSession({\n    mcpServers: {\n        filesystem: {\n            type: \"local\",\n            command: \"npx\",\n            args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fallowed\u002Fpath\"],\n            tools: [\"*\"],\n            env: { DEBUG: \"true\" },\n            cwd: \".\u002Fservers\",\n            timeout: 30000,\n        },\n    },\n});\n```\n\n### Remote HTTP Server\n\n```typescript\nconst session = await client.createSession({\n    mcpServers: {\n        github: {\n            type: \"http\",\n            url: \"https:\u002F\u002Fapi.githubcopilot.com\u002Fmcp\u002F\",\n            headers: { Authorization: \"Bearer ${TOKEN}\" },\n            tools: [\"*\"],\n        },\n    },\n});\n```\n\n### MCP Config Fields\n\n**Local\u002FStdio:**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `type` | `\"local\"` | No | Defaults to local |\n| `command` | string | Yes | Executable path |\n| `args` | string[] | Yes | Command arguments |\n| `env` | object | No | Environment variables |\n| `cwd` | string | No | Working directory |\n| `tools` | string[] | No | `[\"*\"]` for all, `[]` for none |\n| `timeout` | number | No | Timeout in milliseconds |\n\n**Remote HTTP:**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `type` | `\"http\"` | Yes | Server type |\n| `url` | string | Yes | Server URL |\n| `headers` | object | No | HTTP headers |\n| `tools` | string[] | No | Tool filter |\n| `timeout` | number | No | Timeout in ms |\n\n### MCP Debugging\n\nTest MCP servers independently before integrating:\n\n```bash\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}' | \u002Fpath\u002Fto\u002Fyour\u002Fmcp-server\n```\n\nUse the MCP Inspector for interactive debugging:\n\n```bash\nnpx @modelcontextprotocol\u002Finspector \u002Fpath\u002Fto\u002Fyour\u002Fmcp-server\n```\n\n**Common MCP issues:**\n- Tools not appearing → Set `tools: [\"*\"]` and verify server responds to `tools\u002Flist`\n- Server not starting → Use absolute command paths, check `cwd`\n- Stdout pollution → Debug output must go to stderr, not stdout\n\n---\n\n## Authentication\n\n### Methods (Priority Order)\n\n1. **Explicit token** — `githubToken` in constructor\n2. **HMAC key** — `CAPI_HMAC_KEY` or `COPILOT_HMAC_KEY` env vars\n3. **Direct API token** — `GITHUB_COPILOT_API_TOKEN` with `COPILOT_API_URL`\n4. **Environment variables** — `COPILOT_GITHUB_TOKEN` → `GH_TOKEN` → `GITHUB_TOKEN`\n5. **Stored OAuth** — From `copilot auth login`\n6. **GitHub CLI** — `gh auth` credentials\n\n### Programmatic Token\n\n```typescript\nconst client = new CopilotClient({ githubToken: process.env.GITHUB_TOKEN });\n```\n\n### OAuth GitHub App\n\nFor multi-user apps where users sign in with GitHub:\n\n```typescript\nconst client = new CopilotClient({\n    githubToken: userAccessToken,    \u002F\u002F gho_ or ghu_ token from OAuth flow\n    useLoggedInUser: false,          \u002F\u002F Don't use stored CLI credentials\n});\n```\n\n**Supported token types:** `gho_` (OAuth), `ghu_` (GitHub App), `github_pat_` (fine-grained PAT).\n**Not supported:** `ghp_` (classic PAT — deprecated).\n\n### Disable Auto-Login\n\nPrevent the SDK from using stored credentials:\n\n```typescript\nconst client = new CopilotClient({ useLoggedInUser: false });\n```\n\n---\n\n## BYOK (Bring Your Own Key)\n\nUse your own API keys — no Copilot subscription required. The CLI acts as agent runtime only.\n\n### Provider Configurations\n\n**OpenAI:**\n```typescript\nprovider: { type: \"openai\", baseUrl: \"https:\u002F\u002Fapi.openai.com\u002Fv1\", apiKey: process.env.OPENAI_API_KEY }\n```\n\n**Azure AI Foundry (OpenAI-compatible):**\n```typescript\nprovider: {\n    type: \"openai\",\n    baseUrl: \"https:\u002F\u002Fyour-resource.openai.azure.com\u002Fopenai\u002Fv1\u002F\",\n    apiKey: process.env.FOUNDRY_API_KEY,\n    wireApi: \"responses\",  \u002F\u002F Use \"responses\" for GPT-5 series, \"completions\" for others\n}\n```\n\n**Azure OpenAI (native endpoint):**\n```typescript\nprovider: {\n    type: \"azure\",\n    baseUrl: \"https:\u002F\u002Fmy-resource.openai.azure.com\",  \u002F\u002F Just the host — no \u002Fopenai\u002Fv1\n    apiKey: process.env.AZURE_OPENAI_KEY,\n    azure: { apiVersion: \"2024-10-21\" },\n}\n```\n\n**Anthropic:**\n```typescript\nprovider: { type: \"anthropic\", baseUrl: \"https:\u002F\u002Fapi.anthropic.com\", apiKey: process.env.ANTHROPIC_API_KEY }\n```\n\n**Ollama (local):**\n```typescript\nprovider: { type: \"openai\", baseUrl: \"http:\u002F\u002Flocalhost:11434\u002Fv1\" }\n```\n\n### Provider Config Reference\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `type` | `\"openai\"` \\| `\"azure\"` \\| `\"anthropic\"` | Provider type |\n| `baseUrl` | string | **Required.** API endpoint URL |\n| `apiKey` | string | API key (optional for local providers) |\n| `bearerToken` | string | Bearer token auth (takes precedence over apiKey) |\n| `wireApi` | `\"completions\"` \\| `\"responses\"` | API format (default: `\"completions\"`) |\n| `azure.apiVersion` | string | Azure API version (default: `\"2024-10-21\"`) |\n\n### Azure Managed Identity with BYOK\n\nUse `DefaultAzureCredential` to get short-lived bearer tokens for Azure deployments:\n\n```python\nfrom azure.identity import DefaultAzureCredential\nfrom copilot import CopilotClient, ProviderConfig, SessionConfig\n\ncredential = DefaultAzureCredential()\ntoken = credential.get_token(\"https:\u002F\u002Fcognitiveservices.azure.com\u002F.default\").token\n\nsession = await client.create_session(SessionConfig(\n    model=\"gpt-4.1\",\n    provider=ProviderConfig(\n        type=\"openai\",\n        base_url=f\"{foundry_url}\u002Fopenai\u002Fv1\u002F\",\n        bearer_token=token,\n        wire_api=\"responses\",\n    ),\n))\n```\n\n> **Note:** Bearer tokens expire (~1 hour). For long-running apps, refresh the token before each new session. The SDK does not auto-refresh tokens.\n\n### BYOK Limitations\n\n- **Static credentials only** — no native Entra ID, OIDC, or managed identity support\n- **No auto-refresh** — expired tokens require creating a new session\n- **Keys not persisted** — must re-provide `provider` config on session resume\n- **Model availability** — limited to what your provider offers\n\n---\n\n## Session Persistence\n\nResume sessions across restarts by providing your own session ID.\n\n```typescript\n\u002F\u002F Create with explicit ID\nconst session = await client.createSession({\n    sessionId: \"user-123-task-456\",\n    model: \"gpt-4.1\",\n});\n\n\u002F\u002F Resume later (even from a different client instance)\nconst resumed = await client.resumeSession(\"user-123-task-456\");\nawait resumed.sendAndWait({ prompt: \"What did we discuss?\" });\n```\n\n### Session Management\n\n```typescript\nconst sessions = await client.listSessions();           \u002F\u002F List all\nconst lastId = await client.getLastSessionId();          \u002F\u002F Get most recent\nawait client.deleteSession(\"user-123-task-456\");         \u002F\u002F Delete from storage\nawait session.destroy();                                 \u002F\u002F Destroy active session\n```\n\n### Resume Options\n\nWhen resuming, you can reconfigure: `model`, `systemMessage`, `availableTools`, `excludedTools`, `provider` (required for BYOK), `reasoningEffort`, `streaming`, `mcpServers`, `customAgents`, `skillDirectories`, `infiniteSessions`.\n\n### Session ID Best Practices\n\n| Pattern | Example | Use Case |\n|---------|---------|----------|\n| `user-{userId}-{taskId}` | `user-alice-pr-review-42` | Multi-user apps |\n| `tenant-{tenantId}-{workflow}` | `tenant-acme-onboarding` | Multi-tenant SaaS |\n| `{userId}-{taskType}-{timestamp}` | `alice-deploy-1706932800` | Time-based cleanup |\n\n### What Gets Persisted\n\nSession state is saved to `~\u002F.copilot\u002Fsession-state\u002F{sessionId}\u002F`:\n\n| Data | Persisted? | Notes |\n|------|------------|-------|\n| Conversation history | ✅ Yes | Full message thread |\n| Tool call results | ✅ Yes | Cached for context |\n| Agent planning state | ✅ Yes | `plan.md` file |\n| Session artifacts | ✅ Yes | In `files\u002F` directory |\n| Provider\u002FAPI keys | ❌ No | Must re-provide on resume |\n| In-memory tool state | ❌ No | Design tools to be stateless |\n\n### Infinite Sessions\n\nFor long-running workflows that may exceed context limits, enable auto-compaction:\n\n```typescript\nconst session = await client.createSession({\n    infiniteSessions: {\n        enabled: true,\n        backgroundCompactionThreshold: 0.80,  \u002F\u002F Start background compaction at 80%\n        bufferExhaustionThreshold: 0.95,       \u002F\u002F Block and compact at 95%\n    },\n});\n```\n\n> Thresholds are context utilization ratios (0.0–1.0), not absolute token counts.\n\n---\n\n## Custom Agents\n\nDefine specialized AI personas:\n\n```typescript\nconst session = await client.createSession({\n    customAgents: [{\n        name: \"pr-reviewer\",\n        displayName: \"PR Reviewer\",\n        description: \"Reviews pull requests for best practices\",\n        prompt: \"You are an expert code reviewer. Focus on security, performance, and maintainability.\",\n    }],\n});\n```\n\n---\n\n## System Message\n\nControl AI behavior and personality:\n\n```typescript\nconst session = await client.createSession({\n    systemMessage: { content: \"You are a helpful assistant. Always be concise.\" },\n});\n```\n\n---\n\n## Skills Integration\n\nLoad skill directories to extend Copilot's capabilities:\n\n```typescript\nconst session = await client.createSession({\n    skillDirectories: [\".\u002Fskills\u002Fcode-review\", \".\u002Fskills\u002Fdocumentation\"],\n    disabledSkills: [\"experimental-feature\"],\n});\n```\n\nSkills can be combined with custom agents and MCP servers:\n\n```typescript\nconst session = await client.createSession({\n    skillDirectories: [\".\u002Fskills\u002Fsecurity\"],\n    customAgents: [{ name: \"auditor\", prompt: \"Focus on OWASP Top 10.\" }],\n    mcpServers: { postgres: { type: \"local\", command: \"npx\", args: [\"-y\", \"@modelcontextprotocol\u002Fserver-postgres\"], tools: [\"*\"] } },\n});\n```\n\n---\n\n## Permission & Input Handlers\n\nHandle tool permissions and user input requests programmatically. The SDK uses a **deny-by-default** permission model — all permission requests are denied unless you provide a handler.\n\n```typescript\nconst session = await client.createSession({\n    onPermissionRequest: async (request) => {\n        if (request.kind === \"shell\") {\n            return { approved: request.command.startsWith(\"git\") };\n        }\n        return { approved: true };\n    },\n    onUserInputRequest: async (request) => {\n        return { response: \"yes\" };\n    },\n});\n```\n\n### Token Usage Tracking\n\nSubscribe to usage events instead of using CLI `\u002Fusage`:\n\n```typescript\nsession.on(\"assistant.usage\", (event) => {\n    console.log(\"Tokens:\", { input: event.data.inputTokens, output: event.data.outputTokens });\n});\n```\n\n---\n\n## Deployment Patterns\n\n### Local CLI (Default)\n\nSDK auto-spawns CLI as subprocess. Simplest setup — zero configuration.\n\n```typescript\nconst client = new CopilotClient(); \u002F\u002F Auto-manages CLI process\n```\n\n### External CLI Server (Backend Services)\n\nRun CLI in headless mode, connect SDK over TCP:\n\n```bash\ncopilot --headless --port 4321\n```\n\n```typescript\nconst client = new CopilotClient({ cliUrl: \"localhost:4321\" });\n```\n\n**Multi-client support:** Multiple SDK clients can share one CLI server.\n\n### Bundled CLI (Desktop Apps)\n\nShip CLI binary with your app:\n\n```typescript\nconst client = new CopilotClient({ cliPath: path.join(__dirname, \"vendor\", \"copilot\") });\n```\n\n### Docker Compose\n\n```yaml\nservices:\n  copilot-cli:\n    image: ghcr.io\u002Fgithub\u002Fcopilot-cli:latest\n    command: [\"--headless\", \"--port\", \"4321\"]\n    environment:\n      - COPILOT_GITHUB_TOKEN=${COPILOT_GITHUB_TOKEN}\n    volumes:\n      - session-data:\u002Froot\u002F.copilot\u002Fsession-state\n  api:\n    build: .\n    environment:\n      - CLI_URL=copilot-cli:4321\n    depends_on: [copilot-cli]\nvolumes:\n  session-data:\n```\n\n### Session Isolation Patterns\n\n| Pattern | Isolation | Resources | Best For |\n|---------|-----------|-----------|----------|\n| **CLI per user** | Complete | High | Multi-tenant SaaS, compliance |\n| **Shared CLI + session IDs** | Logical | Low | Internal tools |\n| **Shared sessions** | None | Low | Team collaboration (requires locking) |\n\n### Production Checklist\n\n- Session cleanup: periodic deletion of expired sessions\n- Health checks: ping CLI server, restart if unresponsive\n- Persistent storage: mount `~\u002F.copilot\u002Fsession-state\u002F` for containers\n- Secret management: use Vault\u002FK8s Secrets for tokens\n- Session locking: Redis or similar for shared session access\n- Graceful shutdown: drain active sessions before stopping CLI\n\n---\n\n## Client Configuration\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `cliPath` | string | Auto-detected | Path to Copilot CLI executable |\n| `cliUrl` | string | — | URL of external CLI server |\n| `githubToken` | string | — | GitHub token for auth |\n| `useLoggedInUser` | boolean | `true` | Use stored CLI credentials |\n| `logLevel` | string | `\"none\"` | `\"none\"` \\| `\"error\"` \\| `\"warning\"` \\| `\"info\"` \\| `\"debug\"` |\n| `autoRestart` | boolean | `true` | Auto-restart CLI on crash |\n| `useStdio` | boolean | `true` | Use stdio transport |\n\n## Session Configuration\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `model` | string | Model to use (e.g., `\"gpt-4.1\"`, `\"claude-sonnet-4\"`) |\n| `sessionId` | string | Custom ID for resumable sessions |\n| `streaming` | boolean | Enable streaming responses |\n| `tools` | Tool[] | Custom tools |\n| `mcpServers` | object | MCP server configurations |\n| `hooks` | object | Session hooks |\n| `provider` | object | BYOK provider config |\n| `customAgents` | object[] | Custom agent definitions |\n| `systemMessage` | object | System message override |\n| `skillDirectories` | string[] | Directories to load skills from |\n| `disabledSkills` | string[] | Skills to disable |\n| `reasoningEffort` | string | Reasoning effort level |\n| `availableTools` | string[] | Restrict available tools |\n| `excludedTools` | string[] | Exclude specific tools |\n| `infiniteSessions` | object | Auto-compaction config |\n| `workingDirectory` | string | Working directory |\n\n---\n\n## SDK vs CLI Feature Comparison\n\n### ✅ Available in SDK\n\nSession management, messaging (`send`\u002F`sendAndWait`\u002F`abort`), message history (`getMessages`), custom tools, tool permission hooks, MCP servers (local + HTTP), streaming, model selection, BYOK providers, custom agents, system message, skills, infinite sessions, permission handlers, 40+ event types.\n\n### ❌ CLI-Only Features\n\nSession export (`--share`), slash commands, interactive UI, terminal rendering, YOLO mode, login\u002Flogout flows, `\u002Fcompact` (use `infiniteSessions` instead), `\u002Fusage` (use usage events), `\u002Freview`, `\u002Fdelegate`.\n\n**Workarounds:**\n- Session export → Collect events manually with `session.on()` + `session.getMessages()`\n- Permission control → Use `onPermissionRequest` handler instead of `--allow-all-paths`\n- Context compaction → Use `infiniteSessions` config instead of `\u002Fcompact`\n\n---\n\n## Debugging\n\nEnable debug logging:\n\n```typescript\nconst client = new CopilotClient({ logLevel: \"debug\" });\n```\n\nCustom log directory:\n\n```typescript\nconst client = new CopilotClient({ cliArgs: [\"--log-dir\", \"\u002Fpath\u002Fto\u002Flogs\"] });\n```\n\n### Common Issues\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| `CLI not found` | CLI not installed or not in PATH | Install CLI or set `cliPath` |\n| `Not authenticated` | No valid credentials | Run `copilot auth login` or provide `githubToken` |\n| `Session not found` | Using session after `destroy()` | Check `listSessions()` for valid IDs |\n| `Connection refused` | CLI process crashed | Enable `autoRestart: true`, check port conflicts |\n| MCP tools missing | Server init failure or tools not enabled | Set `tools: [\"*\"]`, test server independently |\n\n### Connection State\n\n```typescript\nconsole.log(\"State:\", client.getState());  \u002F\u002F \"connected\" after start()\nclient.on(\"stateChange\", (state) => console.log(\"Changed to:\", state));\n```\n\n---\n\n## Key API Summary\n\n| Language | Client | Session Create | Send | Resume | Stop |\n|----------|--------|---------------|------|--------|------|\n| Node.js | `new CopilotClient()` | `client.createSession()` | `session.sendAndWait()` | `client.resumeSession()` | `client.stop()` |\n| Python | `CopilotClient()` | `client.create_session()` | `session.send_and_wait()` | `client.resume_session()` | `client.stop()` |\n| Go | `copilot.NewClient(nil)` | `client.CreateSession()` | `session.SendAndWait()` | `client.ResumeSession()` | `client.Stop()` |\n| .NET | `new CopilotClient()` | `client.CreateSessionAsync()` | `session.SendAndWaitAsync()` | `client.ResumeSessionAsync()` | `client.DisposeAsync()` |\n\n## References\n\n- [GitHub Copilot SDK](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot-sdk)\n- [Copilot CLI Installation](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fhow-tos\u002Fset-up\u002Finstall-copilot-cli)\n- [MCP Protocol Specification](https:\u002F\u002Fmodelcontextprotocol.io)\n- [MCP Servers Directory](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fservers)\n- [GitHub MCP Server](https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgithub-mcp-server)\n",{"data":49,"body":50},{"name":4,"description":6},{"type":51,"children":52},"root",[53,62,68,75,120,126,259,265,270,282,290,361,365,371,376,383,746,750,855,859,922,926,967,970,976,989,994,1371,1376,1485,1491,1546,1559,1562,1568,1573,1578,2133,2138,2230,2235,2351,2356,2441,2447,2472,2475,2481,2486,2644,2650,2655,2976,3013,3021,3173,3179,3184,3564,3590,3596,3601,3770,3796,3802,4173,4179,4464,4520,4526,4595,4601,4660,4663,4669,4674,4680,5045,5051,5291,5297,5305,5536,5544,5702,5708,5713,5754,5759,5782,5790,5827,5830,5836,5842,5974,5980,6061,6067,6072,6177,6224,6230,6235,6298,6301,6307,6312,6318,6326,6435,6443,6600,6608,6775,6783,6888,6896,6967,6973,7171,7177,7190,7315,7329,7335,7385,7388,7394,7399,7657,7663,7845,7851,7933,7939,8043,8049,8061,8206,8212,8217,8373,8381,8384,8390,8395,8608,8611,8617,8622,8725,8728,8734,8739,8891,8896,9236,9239,9245,9257,9592,9598,9610,9805,9808,9814,9820,9825,9868,9874,9879,9908,9980,9990,9996,10001,10116,10122,10391,10397,10505,10511,10552,10555,10561,10815,10821,11199,11202,11208,11214,11249,11255,11304,11312,11370,11373,11379,11384,11456,11461,11558,11564,11743,11749,11914,11917,11923,12170,12176,12230],{"type":54,"tag":55,"props":56,"children":58},"element","h1",{"id":57},"github-copilot-sdk",[59],{"type":60,"value":61},"text","GitHub Copilot SDK",{"type":54,"tag":63,"props":64,"children":65},"p",{},[66],{"type":60,"value":67},"Build applications that programmatically interact with GitHub Copilot. The SDK wraps the Copilot CLI via JSON-RPC, providing session management, custom tools, hooks, MCP server integration, and streaming across Node.js, Python, Go, and .NET.",{"type":54,"tag":69,"props":70,"children":72},"h2",{"id":71},"prerequisites",[73],{"type":60,"value":74},"Prerequisites",{"type":54,"tag":76,"props":77,"children":78},"ul",{},[79,100,110],{"type":54,"tag":80,"props":81,"children":82},"li",{},[83,89,91,98],{"type":54,"tag":84,"props":85,"children":86},"strong",{},[87],{"type":60,"value":88},"GitHub Copilot CLI",{"type":60,"value":90}," installed and authenticated (",{"type":54,"tag":92,"props":93,"children":95},"code",{"className":94},[],[96],{"type":60,"value":97},"copilot --version",{"type":60,"value":99},")",{"type":54,"tag":80,"props":101,"children":102},{},[103,108],{"type":54,"tag":84,"props":104,"children":105},{},[106],{"type":60,"value":107},"GitHub Copilot subscription",{"type":60,"value":109}," (Individual, Business, or Enterprise) — not required for BYOK",{"type":54,"tag":80,"props":111,"children":112},{},[113,118],{"type":54,"tag":84,"props":114,"children":115},{},[116],{"type":60,"value":117},"Runtime:",{"type":60,"value":119}," Node.js 18+ \u002F Python 3.8+ \u002F Go 1.21+ \u002F .NET 8.0+",{"type":54,"tag":69,"props":121,"children":123},{"id":122},"installation",[124],{"type":60,"value":125},"Installation",{"type":54,"tag":127,"props":128,"children":129},"table",{},[130,154],{"type":54,"tag":131,"props":132,"children":133},"thead",{},[134],{"type":54,"tag":135,"props":136,"children":137},"tr",{},[138,144,149],{"type":54,"tag":139,"props":140,"children":141},"th",{},[142],{"type":60,"value":143},"Language",{"type":54,"tag":139,"props":145,"children":146},{},[147],{"type":60,"value":148},"Package",{"type":54,"tag":139,"props":150,"children":151},{},[152],{"type":60,"value":153},"Install",{"type":54,"tag":155,"props":156,"children":157},"tbody",{},[158,185,209,234],{"type":54,"tag":135,"props":159,"children":160},{},[161,167,176],{"type":54,"tag":162,"props":163,"children":164},"td",{},[165],{"type":60,"value":166},"Node.js",{"type":54,"tag":162,"props":168,"children":169},{},[170],{"type":54,"tag":92,"props":171,"children":173},{"className":172},[],[174],{"type":60,"value":175},"@github\u002Fcopilot-sdk",{"type":54,"tag":162,"props":177,"children":178},{},[179],{"type":54,"tag":92,"props":180,"children":182},{"className":181},[],[183],{"type":60,"value":184},"npm install @github\u002Fcopilot-sdk",{"type":54,"tag":135,"props":186,"children":187},{},[188,192,200],{"type":54,"tag":162,"props":189,"children":190},{},[191],{"type":60,"value":23},{"type":54,"tag":162,"props":193,"children":194},{},[195],{"type":54,"tag":92,"props":196,"children":198},{"className":197},[],[199],{"type":60,"value":57},{"type":54,"tag":162,"props":201,"children":202},{},[203],{"type":54,"tag":92,"props":204,"children":206},{"className":205},[],[207],{"type":60,"value":208},"pip install github-copilot-sdk",{"type":54,"tag":135,"props":210,"children":211},{},[212,216,225],{"type":54,"tag":162,"props":213,"children":214},{},[215],{"type":60,"value":29},{"type":54,"tag":162,"props":217,"children":218},{},[219],{"type":54,"tag":92,"props":220,"children":222},{"className":221},[],[223],{"type":60,"value":224},"github.com\u002Fgithub\u002Fcopilot-sdk\u002Fgo",{"type":54,"tag":162,"props":226,"children":227},{},[228],{"type":54,"tag":92,"props":229,"children":231},{"className":230},[],[232],{"type":60,"value":233},"go get github.com\u002Fgithub\u002Fcopilot-sdk\u002Fgo",{"type":54,"tag":135,"props":235,"children":236},{},[237,241,250],{"type":54,"tag":162,"props":238,"children":239},{},[240],{"type":60,"value":17},{"type":54,"tag":162,"props":242,"children":243},{},[244],{"type":54,"tag":92,"props":245,"children":247},{"className":246},[],[248],{"type":60,"value":249},"GitHub.Copilot.SDK",{"type":54,"tag":162,"props":251,"children":252},{},[253],{"type":54,"tag":92,"props":254,"children":256},{"className":255},[],[257],{"type":60,"value":258},"dotnet add package GitHub.Copilot.SDK",{"type":54,"tag":69,"props":260,"children":262},{"id":261},"architecture",[263],{"type":60,"value":264},"Architecture",{"type":54,"tag":63,"props":266,"children":267},{},[268],{"type":60,"value":269},"The SDK communicates with the Copilot CLI via JSON-RPC over stdio (default) or TCP. The CLI manages model calls, tool execution, session state, and MCP server lifecycle.",{"type":54,"tag":271,"props":272,"children":276},"pre",{"className":273,"code":275,"language":60},[274],"language-text","Your App → SDK Client → [stdio\u002FTCP] → Copilot CLI → Model Provider\n                                          ↕\n                                     MCP Servers\n",[277],{"type":54,"tag":92,"props":278,"children":280},{"__ignoreMap":279},"",[281],{"type":60,"value":275},{"type":54,"tag":63,"props":283,"children":284},{},[285],{"type":54,"tag":84,"props":286,"children":287},{},[288],{"type":60,"value":289},"Transport modes:",{"type":54,"tag":127,"props":291,"children":292},{},[293,314],{"type":54,"tag":131,"props":294,"children":295},{},[296],{"type":54,"tag":135,"props":297,"children":298},{},[299,304,309],{"type":54,"tag":139,"props":300,"children":301},{},[302],{"type":60,"value":303},"Mode",{"type":54,"tag":139,"props":305,"children":306},{},[307],{"type":60,"value":308},"Description",{"type":54,"tag":139,"props":310,"children":311},{},[312],{"type":60,"value":313},"Use Case",{"type":54,"tag":155,"props":315,"children":316},{},[317,340],{"type":54,"tag":135,"props":318,"children":319},{},[320,330,335],{"type":54,"tag":162,"props":321,"children":322},{},[323,328],{"type":54,"tag":84,"props":324,"children":325},{},[326],{"type":60,"value":327},"Stdio",{"type":60,"value":329}," (default)",{"type":54,"tag":162,"props":331,"children":332},{},[333],{"type":60,"value":334},"CLI as subprocess via pipes",{"type":54,"tag":162,"props":336,"children":337},{},[338],{"type":60,"value":339},"Local dev, single process",{"type":54,"tag":135,"props":341,"children":342},{},[343,351,356],{"type":54,"tag":162,"props":344,"children":345},{},[346],{"type":54,"tag":84,"props":347,"children":348},{},[349],{"type":60,"value":350},"TCP",{"type":54,"tag":162,"props":352,"children":353},{},[354],{"type":60,"value":355},"CLI as network server",{"type":54,"tag":162,"props":357,"children":358},{},[359],{"type":60,"value":360},"Multi-client, backend services",{"type":54,"tag":362,"props":363,"children":364},"hr",{},[],{"type":54,"tag":69,"props":366,"children":368},{"id":367},"core-pattern-client-session-message",[369],{"type":60,"value":370},"Core Pattern: Client → Session → Message",{"type":54,"tag":63,"props":372,"children":373},{},[374],{"type":60,"value":375},"All SDK usage follows: create a client, create a session, send messages.",{"type":54,"tag":377,"props":378,"children":380},"h3",{"id":379},"nodejs-typescript",[381],{"type":60,"value":382},"Node.js \u002F TypeScript",{"type":54,"tag":271,"props":384,"children":387},{"className":385,"code":386,"language":21,"meta":279,"style":279},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { CopilotClient } from \"@github\u002Fcopilot-sdk\";\n\nconst client = new CopilotClient();\nconst session = await client.createSession({ model: \"gpt-4.1\" });\n\nconst response = await session.sendAndWait({ prompt: \"What is 2 + 2?\" });\nconsole.log(response?.data.content);\n\nawait client.stop();\n",[388],{"type":54,"tag":92,"props":389,"children":390},{"__ignoreMap":279},[391,445,455,494,577,585,662,708,716],{"type":54,"tag":392,"props":393,"children":396},"span",{"class":394,"line":395},"line",1,[397,403,409,415,420,425,430,435,440],{"type":54,"tag":392,"props":398,"children":400},{"style":399},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[401],{"type":60,"value":402},"import",{"type":54,"tag":392,"props":404,"children":406},{"style":405},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[407],{"type":60,"value":408}," {",{"type":54,"tag":392,"props":410,"children":412},{"style":411},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[413],{"type":60,"value":414}," CopilotClient",{"type":54,"tag":392,"props":416,"children":417},{"style":405},[418],{"type":60,"value":419}," }",{"type":54,"tag":392,"props":421,"children":422},{"style":399},[423],{"type":60,"value":424}," from",{"type":54,"tag":392,"props":426,"children":427},{"style":405},[428],{"type":60,"value":429}," \"",{"type":54,"tag":392,"props":431,"children":433},{"style":432},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[434],{"type":60,"value":175},{"type":54,"tag":392,"props":436,"children":437},{"style":405},[438],{"type":60,"value":439},"\"",{"type":54,"tag":392,"props":441,"children":442},{"style":405},[443],{"type":60,"value":444},";\n",{"type":54,"tag":392,"props":446,"children":448},{"class":394,"line":447},2,[449],{"type":54,"tag":392,"props":450,"children":452},{"emptyLinePlaceholder":451},true,[453],{"type":60,"value":454},"\n",{"type":54,"tag":392,"props":456,"children":458},{"class":394,"line":457},3,[459,465,470,475,480,485,490],{"type":54,"tag":392,"props":460,"children":462},{"style":461},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[463],{"type":60,"value":464},"const",{"type":54,"tag":392,"props":466,"children":467},{"style":411},[468],{"type":60,"value":469}," client ",{"type":54,"tag":392,"props":471,"children":472},{"style":405},[473],{"type":60,"value":474},"=",{"type":54,"tag":392,"props":476,"children":477},{"style":405},[478],{"type":60,"value":479}," new",{"type":54,"tag":392,"props":481,"children":483},{"style":482},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[484],{"type":60,"value":414},{"type":54,"tag":392,"props":486,"children":487},{"style":411},[488],{"type":60,"value":489},"()",{"type":54,"tag":392,"props":491,"children":492},{"style":405},[493],{"type":60,"value":444},{"type":54,"tag":392,"props":495,"children":497},{"class":394,"line":496},4,[498,502,507,511,516,521,526,531,536,541,547,552,556,561,565,569,573],{"type":54,"tag":392,"props":499,"children":500},{"style":461},[501],{"type":60,"value":464},{"type":54,"tag":392,"props":503,"children":504},{"style":411},[505],{"type":60,"value":506}," session ",{"type":54,"tag":392,"props":508,"children":509},{"style":405},[510],{"type":60,"value":474},{"type":54,"tag":392,"props":512,"children":513},{"style":399},[514],{"type":60,"value":515}," await",{"type":54,"tag":392,"props":517,"children":518},{"style":411},[519],{"type":60,"value":520}," client",{"type":54,"tag":392,"props":522,"children":523},{"style":405},[524],{"type":60,"value":525},".",{"type":54,"tag":392,"props":527,"children":528},{"style":482},[529],{"type":60,"value":530},"createSession",{"type":54,"tag":392,"props":532,"children":533},{"style":411},[534],{"type":60,"value":535},"(",{"type":54,"tag":392,"props":537,"children":538},{"style":405},[539],{"type":60,"value":540},"{",{"type":54,"tag":392,"props":542,"children":544},{"style":543},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[545],{"type":60,"value":546}," model",{"type":54,"tag":392,"props":548,"children":549},{"style":405},[550],{"type":60,"value":551},":",{"type":54,"tag":392,"props":553,"children":554},{"style":405},[555],{"type":60,"value":429},{"type":54,"tag":392,"props":557,"children":558},{"style":432},[559],{"type":60,"value":560},"gpt-4.1",{"type":54,"tag":392,"props":562,"children":563},{"style":405},[564],{"type":60,"value":439},{"type":54,"tag":392,"props":566,"children":567},{"style":405},[568],{"type":60,"value":419},{"type":54,"tag":392,"props":570,"children":571},{"style":411},[572],{"type":60,"value":99},{"type":54,"tag":392,"props":574,"children":575},{"style":405},[576],{"type":60,"value":444},{"type":54,"tag":392,"props":578,"children":580},{"class":394,"line":579},5,[581],{"type":54,"tag":392,"props":582,"children":583},{"emptyLinePlaceholder":451},[584],{"type":60,"value":454},{"type":54,"tag":392,"props":586,"children":588},{"class":394,"line":587},6,[589,593,598,602,606,611,615,620,624,628,633,637,641,646,650,654,658],{"type":54,"tag":392,"props":590,"children":591},{"style":461},[592],{"type":60,"value":464},{"type":54,"tag":392,"props":594,"children":595},{"style":411},[596],{"type":60,"value":597}," response ",{"type":54,"tag":392,"props":599,"children":600},{"style":405},[601],{"type":60,"value":474},{"type":54,"tag":392,"props":603,"children":604},{"style":399},[605],{"type":60,"value":515},{"type":54,"tag":392,"props":607,"children":608},{"style":411},[609],{"type":60,"value":610}," session",{"type":54,"tag":392,"props":612,"children":613},{"style":405},[614],{"type":60,"value":525},{"type":54,"tag":392,"props":616,"children":617},{"style":482},[618],{"type":60,"value":619},"sendAndWait",{"type":54,"tag":392,"props":621,"children":622},{"style":411},[623],{"type":60,"value":535},{"type":54,"tag":392,"props":625,"children":626},{"style":405},[627],{"type":60,"value":540},{"type":54,"tag":392,"props":629,"children":630},{"style":543},[631],{"type":60,"value":632}," prompt",{"type":54,"tag":392,"props":634,"children":635},{"style":405},[636],{"type":60,"value":551},{"type":54,"tag":392,"props":638,"children":639},{"style":405},[640],{"type":60,"value":429},{"type":54,"tag":392,"props":642,"children":643},{"style":432},[644],{"type":60,"value":645},"What is 2 + 2?",{"type":54,"tag":392,"props":647,"children":648},{"style":405},[649],{"type":60,"value":439},{"type":54,"tag":392,"props":651,"children":652},{"style":405},[653],{"type":60,"value":419},{"type":54,"tag":392,"props":655,"children":656},{"style":411},[657],{"type":60,"value":99},{"type":54,"tag":392,"props":659,"children":660},{"style":405},[661],{"type":60,"value":444},{"type":54,"tag":392,"props":663,"children":665},{"class":394,"line":664},7,[666,671,675,680,685,690,695,699,704],{"type":54,"tag":392,"props":667,"children":668},{"style":411},[669],{"type":60,"value":670},"console",{"type":54,"tag":392,"props":672,"children":673},{"style":405},[674],{"type":60,"value":525},{"type":54,"tag":392,"props":676,"children":677},{"style":482},[678],{"type":60,"value":679},"log",{"type":54,"tag":392,"props":681,"children":682},{"style":411},[683],{"type":60,"value":684},"(response",{"type":54,"tag":392,"props":686,"children":687},{"style":405},[688],{"type":60,"value":689},"?.",{"type":54,"tag":392,"props":691,"children":692},{"style":411},[693],{"type":60,"value":694},"data",{"type":54,"tag":392,"props":696,"children":697},{"style":405},[698],{"type":60,"value":525},{"type":54,"tag":392,"props":700,"children":701},{"style":411},[702],{"type":60,"value":703},"content)",{"type":54,"tag":392,"props":705,"children":706},{"style":405},[707],{"type":60,"value":444},{"type":54,"tag":392,"props":709,"children":711},{"class":394,"line":710},8,[712],{"type":54,"tag":392,"props":713,"children":714},{"emptyLinePlaceholder":451},[715],{"type":60,"value":454},{"type":54,"tag":392,"props":717,"children":719},{"class":394,"line":718},9,[720,725,729,733,738,742],{"type":54,"tag":392,"props":721,"children":722},{"style":399},[723],{"type":60,"value":724},"await",{"type":54,"tag":392,"props":726,"children":727},{"style":411},[728],{"type":60,"value":520},{"type":54,"tag":392,"props":730,"children":731},{"style":405},[732],{"type":60,"value":525},{"type":54,"tag":392,"props":734,"children":735},{"style":482},[736],{"type":60,"value":737},"stop",{"type":54,"tag":392,"props":739,"children":740},{"style":411},[741],{"type":60,"value":489},{"type":54,"tag":392,"props":743,"children":744},{"style":405},[745],{"type":60,"value":444},{"type":54,"tag":377,"props":747,"children":748},{"id":24},[749],{"type":60,"value":23},{"type":54,"tag":271,"props":751,"children":754},{"className":752,"code":753,"language":24,"meta":279,"style":279},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import asyncio\nfrom copilot import CopilotClient\n\nasync def main():\n    client = CopilotClient()\n    await client.start()\n    session = await client.create_session({\"model\": \"gpt-4.1\"})\n    response = await session.send_and_wait({\"prompt\": \"What is 2 + 2?\"})\n    print(response.data.content)\n    await client.stop()\n\nasyncio.run(main())\n",[755],{"type":54,"tag":92,"props":756,"children":757},{"__ignoreMap":279},[758,766,774,781,789,797,805,813,821,829,838,846],{"type":54,"tag":392,"props":759,"children":760},{"class":394,"line":395},[761],{"type":54,"tag":392,"props":762,"children":763},{},[764],{"type":60,"value":765},"import asyncio\n",{"type":54,"tag":392,"props":767,"children":768},{"class":394,"line":447},[769],{"type":54,"tag":392,"props":770,"children":771},{},[772],{"type":60,"value":773},"from copilot import CopilotClient\n",{"type":54,"tag":392,"props":775,"children":776},{"class":394,"line":457},[777],{"type":54,"tag":392,"props":778,"children":779},{"emptyLinePlaceholder":451},[780],{"type":60,"value":454},{"type":54,"tag":392,"props":782,"children":783},{"class":394,"line":496},[784],{"type":54,"tag":392,"props":785,"children":786},{},[787],{"type":60,"value":788},"async def main():\n",{"type":54,"tag":392,"props":790,"children":791},{"class":394,"line":579},[792],{"type":54,"tag":392,"props":793,"children":794},{},[795],{"type":60,"value":796},"    client = CopilotClient()\n",{"type":54,"tag":392,"props":798,"children":799},{"class":394,"line":587},[800],{"type":54,"tag":392,"props":801,"children":802},{},[803],{"type":60,"value":804},"    await client.start()\n",{"type":54,"tag":392,"props":806,"children":807},{"class":394,"line":664},[808],{"type":54,"tag":392,"props":809,"children":810},{},[811],{"type":60,"value":812},"    session = await client.create_session({\"model\": \"gpt-4.1\"})\n",{"type":54,"tag":392,"props":814,"children":815},{"class":394,"line":710},[816],{"type":54,"tag":392,"props":817,"children":818},{},[819],{"type":60,"value":820},"    response = await session.send_and_wait({\"prompt\": \"What is 2 + 2?\"})\n",{"type":54,"tag":392,"props":822,"children":823},{"class":394,"line":718},[824],{"type":54,"tag":392,"props":825,"children":826},{},[827],{"type":60,"value":828},"    print(response.data.content)\n",{"type":54,"tag":392,"props":830,"children":832},{"class":394,"line":831},10,[833],{"type":54,"tag":392,"props":834,"children":835},{},[836],{"type":60,"value":837},"    await client.stop()\n",{"type":54,"tag":392,"props":839,"children":841},{"class":394,"line":840},11,[842],{"type":54,"tag":392,"props":843,"children":844},{"emptyLinePlaceholder":451},[845],{"type":60,"value":454},{"type":54,"tag":392,"props":847,"children":849},{"class":394,"line":848},12,[850],{"type":54,"tag":392,"props":851,"children":852},{},[853],{"type":60,"value":854},"asyncio.run(main())\n",{"type":54,"tag":377,"props":856,"children":857},{"id":30},[858],{"type":60,"value":29},{"type":54,"tag":271,"props":860,"children":863},{"className":861,"code":862,"language":30,"meta":279,"style":279},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","client := copilot.NewClient(nil)\nif err := client.Start(ctx); err != nil { log.Fatal(err) }\ndefer client.Stop()\n\nsession, _ := client.CreateSession(ctx, &copilot.SessionConfig{Model: \"gpt-4.1\"})\nresponse, _ := session.SendAndWait(ctx, copilot.MessageOptions{Prompt: \"What is 2 + 2?\"})\nfmt.Println(*response.Data.Content)\n",[864],{"type":54,"tag":92,"props":865,"children":866},{"__ignoreMap":279},[867,875,883,891,898,906,914],{"type":54,"tag":392,"props":868,"children":869},{"class":394,"line":395},[870],{"type":54,"tag":392,"props":871,"children":872},{},[873],{"type":60,"value":874},"client := copilot.NewClient(nil)\n",{"type":54,"tag":392,"props":876,"children":877},{"class":394,"line":447},[878],{"type":54,"tag":392,"props":879,"children":880},{},[881],{"type":60,"value":882},"if err := client.Start(ctx); err != nil { log.Fatal(err) }\n",{"type":54,"tag":392,"props":884,"children":885},{"class":394,"line":457},[886],{"type":54,"tag":392,"props":887,"children":888},{},[889],{"type":60,"value":890},"defer client.Stop()\n",{"type":54,"tag":392,"props":892,"children":893},{"class":394,"line":496},[894],{"type":54,"tag":392,"props":895,"children":896},{"emptyLinePlaceholder":451},[897],{"type":60,"value":454},{"type":54,"tag":392,"props":899,"children":900},{"class":394,"line":579},[901],{"type":54,"tag":392,"props":902,"children":903},{},[904],{"type":60,"value":905},"session, _ := client.CreateSession(ctx, &copilot.SessionConfig{Model: \"gpt-4.1\"})\n",{"type":54,"tag":392,"props":907,"children":908},{"class":394,"line":587},[909],{"type":54,"tag":392,"props":910,"children":911},{},[912],{"type":60,"value":913},"response, _ := session.SendAndWait(ctx, copilot.MessageOptions{Prompt: \"What is 2 + 2?\"})\n",{"type":54,"tag":392,"props":915,"children":916},{"class":394,"line":664},[917],{"type":54,"tag":392,"props":918,"children":919},{},[920],{"type":60,"value":921},"fmt.Println(*response.Data.Content)\n",{"type":54,"tag":377,"props":923,"children":924},{"id":18},[925],{"type":60,"value":17},{"type":54,"tag":271,"props":927,"children":931},{"className":928,"code":929,"language":930,"meta":279,"style":279},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","await using var client = new CopilotClient();\nawait using var session = await client.CreateSessionAsync(new SessionConfig { Model = \"gpt-4.1\" });\nvar response = await session.SendAndWaitAsync(new MessageOptions { Prompt = \"What is 2 + 2?\" });\nConsole.WriteLine(response?.Data.Content);\n","csharp",[932],{"type":54,"tag":92,"props":933,"children":934},{"__ignoreMap":279},[935,943,951,959],{"type":54,"tag":392,"props":936,"children":937},{"class":394,"line":395},[938],{"type":54,"tag":392,"props":939,"children":940},{},[941],{"type":60,"value":942},"await using var client = new CopilotClient();\n",{"type":54,"tag":392,"props":944,"children":945},{"class":394,"line":447},[946],{"type":54,"tag":392,"props":947,"children":948},{},[949],{"type":60,"value":950},"await using var session = await client.CreateSessionAsync(new SessionConfig { Model = \"gpt-4.1\" });\n",{"type":54,"tag":392,"props":952,"children":953},{"class":394,"line":457},[954],{"type":54,"tag":392,"props":955,"children":956},{},[957],{"type":60,"value":958},"var response = await session.SendAndWaitAsync(new MessageOptions { Prompt = \"What is 2 + 2?\" });\n",{"type":54,"tag":392,"props":960,"children":961},{"class":394,"line":496},[962],{"type":54,"tag":392,"props":963,"children":964},{},[965],{"type":60,"value":966},"Console.WriteLine(response?.Data.Content);\n",{"type":54,"tag":362,"props":968,"children":969},{},[],{"type":54,"tag":69,"props":971,"children":973},{"id":972},"streaming-responses",[974],{"type":60,"value":975},"Streaming Responses",{"type":54,"tag":63,"props":977,"children":978},{},[979,981,987],{"type":60,"value":980},"Enable real-time output by setting ",{"type":54,"tag":92,"props":982,"children":984},{"className":983},[],[985],{"type":60,"value":986},"streaming: true",{"type":60,"value":988}," and subscribing to delta events.",{"type":54,"tag":377,"props":990,"children":992},{"id":991},"nodejs",[993],{"type":60,"value":166},{"type":54,"tag":271,"props":995,"children":997},{"className":385,"code":996,"language":21,"meta":279,"style":279},"const session = await client.createSession({ model: \"gpt-4.1\", streaming: true });\n\nsession.on(\"assistant.message_delta\", (event) => {\n    process.stdout.write(event.data.deltaContent);\n});\nsession.on(\"session.idle\", () => console.log());\n\nawait session.sendAndWait({ prompt: \"Tell me a joke\" });\n",[998],{"type":54,"tag":92,"props":999,"children":1000},{"__ignoreMap":279},[1001,1092,1099,1162,1221,1237,1304,1311],{"type":54,"tag":392,"props":1002,"children":1003},{"class":394,"line":395},[1004,1008,1012,1016,1020,1024,1028,1032,1036,1040,1044,1048,1052,1056,1060,1065,1070,1074,1080,1084,1088],{"type":54,"tag":392,"props":1005,"children":1006},{"style":461},[1007],{"type":60,"value":464},{"type":54,"tag":392,"props":1009,"children":1010},{"style":411},[1011],{"type":60,"value":506},{"type":54,"tag":392,"props":1013,"children":1014},{"style":405},[1015],{"type":60,"value":474},{"type":54,"tag":392,"props":1017,"children":1018},{"style":399},[1019],{"type":60,"value":515},{"type":54,"tag":392,"props":1021,"children":1022},{"style":411},[1023],{"type":60,"value":520},{"type":54,"tag":392,"props":1025,"children":1026},{"style":405},[1027],{"type":60,"value":525},{"type":54,"tag":392,"props":1029,"children":1030},{"style":482},[1031],{"type":60,"value":530},{"type":54,"tag":392,"props":1033,"children":1034},{"style":411},[1035],{"type":60,"value":535},{"type":54,"tag":392,"props":1037,"children":1038},{"style":405},[1039],{"type":60,"value":540},{"type":54,"tag":392,"props":1041,"children":1042},{"style":543},[1043],{"type":60,"value":546},{"type":54,"tag":392,"props":1045,"children":1046},{"style":405},[1047],{"type":60,"value":551},{"type":54,"tag":392,"props":1049,"children":1050},{"style":405},[1051],{"type":60,"value":429},{"type":54,"tag":392,"props":1053,"children":1054},{"style":432},[1055],{"type":60,"value":560},{"type":54,"tag":392,"props":1057,"children":1058},{"style":405},[1059],{"type":60,"value":439},{"type":54,"tag":392,"props":1061,"children":1062},{"style":405},[1063],{"type":60,"value":1064},",",{"type":54,"tag":392,"props":1066,"children":1067},{"style":543},[1068],{"type":60,"value":1069}," streaming",{"type":54,"tag":392,"props":1071,"children":1072},{"style":405},[1073],{"type":60,"value":551},{"type":54,"tag":392,"props":1075,"children":1077},{"style":1076},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1078],{"type":60,"value":1079}," true",{"type":54,"tag":392,"props":1081,"children":1082},{"style":405},[1083],{"type":60,"value":419},{"type":54,"tag":392,"props":1085,"children":1086},{"style":411},[1087],{"type":60,"value":99},{"type":54,"tag":392,"props":1089,"children":1090},{"style":405},[1091],{"type":60,"value":444},{"type":54,"tag":392,"props":1093,"children":1094},{"class":394,"line":447},[1095],{"type":54,"tag":392,"props":1096,"children":1097},{"emptyLinePlaceholder":451},[1098],{"type":60,"value":454},{"type":54,"tag":392,"props":1100,"children":1101},{"class":394,"line":457},[1102,1107,1111,1116,1120,1124,1129,1133,1137,1142,1148,1152,1157],{"type":54,"tag":392,"props":1103,"children":1104},{"style":411},[1105],{"type":60,"value":1106},"session",{"type":54,"tag":392,"props":1108,"children":1109},{"style":405},[1110],{"type":60,"value":525},{"type":54,"tag":392,"props":1112,"children":1113},{"style":482},[1114],{"type":60,"value":1115},"on",{"type":54,"tag":392,"props":1117,"children":1118},{"style":411},[1119],{"type":60,"value":535},{"type":54,"tag":392,"props":1121,"children":1122},{"style":405},[1123],{"type":60,"value":439},{"type":54,"tag":392,"props":1125,"children":1126},{"style":432},[1127],{"type":60,"value":1128},"assistant.message_delta",{"type":54,"tag":392,"props":1130,"children":1131},{"style":405},[1132],{"type":60,"value":439},{"type":54,"tag":392,"props":1134,"children":1135},{"style":405},[1136],{"type":60,"value":1064},{"type":54,"tag":392,"props":1138,"children":1139},{"style":405},[1140],{"type":60,"value":1141}," (",{"type":54,"tag":392,"props":1143,"children":1145},{"style":1144},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1146],{"type":60,"value":1147},"event",{"type":54,"tag":392,"props":1149,"children":1150},{"style":405},[1151],{"type":60,"value":99},{"type":54,"tag":392,"props":1153,"children":1154},{"style":461},[1155],{"type":60,"value":1156}," =>",{"type":54,"tag":392,"props":1158,"children":1159},{"style":405},[1160],{"type":60,"value":1161}," {\n",{"type":54,"tag":392,"props":1163,"children":1164},{"class":394,"line":496},[1165,1170,1174,1179,1183,1188,1192,1196,1200,1204,1208,1213,1217],{"type":54,"tag":392,"props":1166,"children":1167},{"style":411},[1168],{"type":60,"value":1169},"    process",{"type":54,"tag":392,"props":1171,"children":1172},{"style":405},[1173],{"type":60,"value":525},{"type":54,"tag":392,"props":1175,"children":1176},{"style":411},[1177],{"type":60,"value":1178},"stdout",{"type":54,"tag":392,"props":1180,"children":1181},{"style":405},[1182],{"type":60,"value":525},{"type":54,"tag":392,"props":1184,"children":1185},{"style":482},[1186],{"type":60,"value":1187},"write",{"type":54,"tag":392,"props":1189,"children":1190},{"style":543},[1191],{"type":60,"value":535},{"type":54,"tag":392,"props":1193,"children":1194},{"style":411},[1195],{"type":60,"value":1147},{"type":54,"tag":392,"props":1197,"children":1198},{"style":405},[1199],{"type":60,"value":525},{"type":54,"tag":392,"props":1201,"children":1202},{"style":411},[1203],{"type":60,"value":694},{"type":54,"tag":392,"props":1205,"children":1206},{"style":405},[1207],{"type":60,"value":525},{"type":54,"tag":392,"props":1209,"children":1210},{"style":411},[1211],{"type":60,"value":1212},"deltaContent",{"type":54,"tag":392,"props":1214,"children":1215},{"style":543},[1216],{"type":60,"value":99},{"type":54,"tag":392,"props":1218,"children":1219},{"style":405},[1220],{"type":60,"value":444},{"type":54,"tag":392,"props":1222,"children":1223},{"class":394,"line":579},[1224,1229,1233],{"type":54,"tag":392,"props":1225,"children":1226},{"style":405},[1227],{"type":60,"value":1228},"}",{"type":54,"tag":392,"props":1230,"children":1231},{"style":411},[1232],{"type":60,"value":99},{"type":54,"tag":392,"props":1234,"children":1235},{"style":405},[1236],{"type":60,"value":444},{"type":54,"tag":392,"props":1238,"children":1239},{"class":394,"line":587},[1240,1244,1248,1252,1256,1260,1265,1269,1273,1278,1282,1287,1291,1295,1300],{"type":54,"tag":392,"props":1241,"children":1242},{"style":411},[1243],{"type":60,"value":1106},{"type":54,"tag":392,"props":1245,"children":1246},{"style":405},[1247],{"type":60,"value":525},{"type":54,"tag":392,"props":1249,"children":1250},{"style":482},[1251],{"type":60,"value":1115},{"type":54,"tag":392,"props":1253,"children":1254},{"style":411},[1255],{"type":60,"value":535},{"type":54,"tag":392,"props":1257,"children":1258},{"style":405},[1259],{"type":60,"value":439},{"type":54,"tag":392,"props":1261,"children":1262},{"style":432},[1263],{"type":60,"value":1264},"session.idle",{"type":54,"tag":392,"props":1266,"children":1267},{"style":405},[1268],{"type":60,"value":439},{"type":54,"tag":392,"props":1270,"children":1271},{"style":405},[1272],{"type":60,"value":1064},{"type":54,"tag":392,"props":1274,"children":1275},{"style":405},[1276],{"type":60,"value":1277}," ()",{"type":54,"tag":392,"props":1279,"children":1280},{"style":461},[1281],{"type":60,"value":1156},{"type":54,"tag":392,"props":1283,"children":1284},{"style":411},[1285],{"type":60,"value":1286}," console",{"type":54,"tag":392,"props":1288,"children":1289},{"style":405},[1290],{"type":60,"value":525},{"type":54,"tag":392,"props":1292,"children":1293},{"style":482},[1294],{"type":60,"value":679},{"type":54,"tag":392,"props":1296,"children":1297},{"style":411},[1298],{"type":60,"value":1299},"())",{"type":54,"tag":392,"props":1301,"children":1302},{"style":405},[1303],{"type":60,"value":444},{"type":54,"tag":392,"props":1305,"children":1306},{"class":394,"line":664},[1307],{"type":54,"tag":392,"props":1308,"children":1309},{"emptyLinePlaceholder":451},[1310],{"type":60,"value":454},{"type":54,"tag":392,"props":1312,"children":1313},{"class":394,"line":710},[1314,1318,1322,1326,1330,1334,1338,1342,1346,1350,1355,1359,1363,1367],{"type":54,"tag":392,"props":1315,"children":1316},{"style":399},[1317],{"type":60,"value":724},{"type":54,"tag":392,"props":1319,"children":1320},{"style":411},[1321],{"type":60,"value":610},{"type":54,"tag":392,"props":1323,"children":1324},{"style":405},[1325],{"type":60,"value":525},{"type":54,"tag":392,"props":1327,"children":1328},{"style":482},[1329],{"type":60,"value":619},{"type":54,"tag":392,"props":1331,"children":1332},{"style":411},[1333],{"type":60,"value":535},{"type":54,"tag":392,"props":1335,"children":1336},{"style":405},[1337],{"type":60,"value":540},{"type":54,"tag":392,"props":1339,"children":1340},{"style":543},[1341],{"type":60,"value":632},{"type":54,"tag":392,"props":1343,"children":1344},{"style":405},[1345],{"type":60,"value":551},{"type":54,"tag":392,"props":1347,"children":1348},{"style":405},[1349],{"type":60,"value":429},{"type":54,"tag":392,"props":1351,"children":1352},{"style":432},[1353],{"type":60,"value":1354},"Tell me a joke",{"type":54,"tag":392,"props":1356,"children":1357},{"style":405},[1358],{"type":60,"value":439},{"type":54,"tag":392,"props":1360,"children":1361},{"style":405},[1362],{"type":60,"value":419},{"type":54,"tag":392,"props":1364,"children":1365},{"style":411},[1366],{"type":60,"value":99},{"type":54,"tag":392,"props":1368,"children":1369},{"style":405},[1370],{"type":60,"value":444},{"type":54,"tag":377,"props":1372,"children":1374},{"id":1373},"python-1",[1375],{"type":60,"value":23},{"type":54,"tag":271,"props":1377,"children":1379},{"className":752,"code":1378,"language":24,"meta":279,"style":279},"from copilot.generated.session_events import SessionEventType\n\nsession = await client.create_session({\"model\": \"gpt-4.1\", \"streaming\": True})\n\ndef handle_event(event):\n    if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:\n        sys.stdout.write(event.data.delta_content)\n        sys.stdout.flush()\n    if event.type == SessionEventType.SESSION_IDLE:\n        print()\n\nsession.on(handle_event)\nawait session.send_and_wait({\"prompt\": \"Tell me a joke\"})\n",[1380],{"type":54,"tag":92,"props":1381,"children":1382},{"__ignoreMap":279},[1383,1391,1398,1406,1413,1421,1429,1437,1445,1453,1461,1468,1476],{"type":54,"tag":392,"props":1384,"children":1385},{"class":394,"line":395},[1386],{"type":54,"tag":392,"props":1387,"children":1388},{},[1389],{"type":60,"value":1390},"from copilot.generated.session_events import SessionEventType\n",{"type":54,"tag":392,"props":1392,"children":1393},{"class":394,"line":447},[1394],{"type":54,"tag":392,"props":1395,"children":1396},{"emptyLinePlaceholder":451},[1397],{"type":60,"value":454},{"type":54,"tag":392,"props":1399,"children":1400},{"class":394,"line":457},[1401],{"type":54,"tag":392,"props":1402,"children":1403},{},[1404],{"type":60,"value":1405},"session = await client.create_session({\"model\": \"gpt-4.1\", \"streaming\": True})\n",{"type":54,"tag":392,"props":1407,"children":1408},{"class":394,"line":496},[1409],{"type":54,"tag":392,"props":1410,"children":1411},{"emptyLinePlaceholder":451},[1412],{"type":60,"value":454},{"type":54,"tag":392,"props":1414,"children":1415},{"class":394,"line":579},[1416],{"type":54,"tag":392,"props":1417,"children":1418},{},[1419],{"type":60,"value":1420},"def handle_event(event):\n",{"type":54,"tag":392,"props":1422,"children":1423},{"class":394,"line":587},[1424],{"type":54,"tag":392,"props":1425,"children":1426},{},[1427],{"type":60,"value":1428},"    if event.type == SessionEventType.ASSISTANT_MESSAGE_DELTA:\n",{"type":54,"tag":392,"props":1430,"children":1431},{"class":394,"line":664},[1432],{"type":54,"tag":392,"props":1433,"children":1434},{},[1435],{"type":60,"value":1436},"        sys.stdout.write(event.data.delta_content)\n",{"type":54,"tag":392,"props":1438,"children":1439},{"class":394,"line":710},[1440],{"type":54,"tag":392,"props":1441,"children":1442},{},[1443],{"type":60,"value":1444},"        sys.stdout.flush()\n",{"type":54,"tag":392,"props":1446,"children":1447},{"class":394,"line":718},[1448],{"type":54,"tag":392,"props":1449,"children":1450},{},[1451],{"type":60,"value":1452},"    if event.type == SessionEventType.SESSION_IDLE:\n",{"type":54,"tag":392,"props":1454,"children":1455},{"class":394,"line":831},[1456],{"type":54,"tag":392,"props":1457,"children":1458},{},[1459],{"type":60,"value":1460},"        print()\n",{"type":54,"tag":392,"props":1462,"children":1463},{"class":394,"line":840},[1464],{"type":54,"tag":392,"props":1465,"children":1466},{"emptyLinePlaceholder":451},[1467],{"type":60,"value":454},{"type":54,"tag":392,"props":1469,"children":1470},{"class":394,"line":848},[1471],{"type":54,"tag":392,"props":1472,"children":1473},{},[1474],{"type":60,"value":1475},"session.on(handle_event)\n",{"type":54,"tag":392,"props":1477,"children":1479},{"class":394,"line":1478},13,[1480],{"type":54,"tag":392,"props":1481,"children":1482},{},[1483],{"type":60,"value":1484},"await session.send_and_wait({\"prompt\": \"Tell me a joke\"})\n",{"type":54,"tag":377,"props":1486,"children":1488},{"id":1487},"event-subscription",[1489],{"type":60,"value":1490},"Event Subscription",{"type":54,"tag":127,"props":1492,"children":1493},{},[1494,1509],{"type":54,"tag":131,"props":1495,"children":1496},{},[1497],{"type":54,"tag":135,"props":1498,"children":1499},{},[1500,1505],{"type":54,"tag":139,"props":1501,"children":1502},{},[1503],{"type":60,"value":1504},"Method",{"type":54,"tag":139,"props":1506,"children":1507},{},[1508],{"type":60,"value":308},{"type":54,"tag":155,"props":1510,"children":1511},{},[1512,1529],{"type":54,"tag":135,"props":1513,"children":1514},{},[1515,1524],{"type":54,"tag":162,"props":1516,"children":1517},{},[1518],{"type":54,"tag":92,"props":1519,"children":1521},{"className":1520},[],[1522],{"type":60,"value":1523},"on(handler)",{"type":54,"tag":162,"props":1525,"children":1526},{},[1527],{"type":60,"value":1528},"Subscribe to all events; returns unsubscribe function",{"type":54,"tag":135,"props":1530,"children":1531},{},[1532,1541],{"type":54,"tag":162,"props":1533,"children":1534},{},[1535],{"type":54,"tag":92,"props":1536,"children":1538},{"className":1537},[],[1539],{"type":60,"value":1540},"on(eventType, handler)",{"type":54,"tag":162,"props":1542,"children":1543},{},[1544],{"type":60,"value":1545},"Subscribe to specific event type (Node.js only)",{"type":54,"tag":63,"props":1547,"children":1548},{},[1549,1551,1557],{"type":60,"value":1550},"Call the returned function to unsubscribe. In .NET, call ",{"type":54,"tag":92,"props":1552,"children":1554},{"className":1553},[],[1555],{"type":60,"value":1556},".Dispose()",{"type":60,"value":1558}," on the returned disposable.",{"type":54,"tag":362,"props":1560,"children":1561},{},[],{"type":54,"tag":69,"props":1563,"children":1565},{"id":1564},"custom-tools",[1566],{"type":60,"value":1567},"Custom Tools",{"type":54,"tag":63,"props":1569,"children":1570},{},[1571],{"type":60,"value":1572},"Define tools that Copilot can call to extend its capabilities.",{"type":54,"tag":377,"props":1574,"children":1576},{"id":1575},"nodejs-1",[1577],{"type":60,"value":166},{"type":54,"tag":271,"props":1579,"children":1581},{"className":385,"code":1580,"language":21,"meta":279,"style":279},"import { CopilotClient, defineTool } from \"@github\u002Fcopilot-sdk\";\n\nconst getWeather = defineTool(\"get_weather\", {\n    description: \"Get the current weather for a city\",\n    parameters: {\n        type: \"object\",\n        properties: { city: { type: \"string\", description: \"The city name\" } },\n        required: [\"city\"],\n    },\n    handler: async ({ city }) => ({ city, temperature: \"72°F\", condition: \"sunny\" }),\n});\n\nconst session = await client.createSession({\n    model: \"gpt-4.1\",\n    tools: [getWeather],\n});\n",[1582],{"type":54,"tag":92,"props":1583,"children":1584},{"__ignoreMap":279},[1585,1633,1640,1685,1715,1731,1760,1846,1885,1893,2004,2019,2026,2066,2095,2117],{"type":54,"tag":392,"props":1586,"children":1587},{"class":394,"line":395},[1588,1592,1596,1600,1604,1609,1613,1617,1621,1625,1629],{"type":54,"tag":392,"props":1589,"children":1590},{"style":399},[1591],{"type":60,"value":402},{"type":54,"tag":392,"props":1593,"children":1594},{"style":405},[1595],{"type":60,"value":408},{"type":54,"tag":392,"props":1597,"children":1598},{"style":411},[1599],{"type":60,"value":414},{"type":54,"tag":392,"props":1601,"children":1602},{"style":405},[1603],{"type":60,"value":1064},{"type":54,"tag":392,"props":1605,"children":1606},{"style":411},[1607],{"type":60,"value":1608}," defineTool",{"type":54,"tag":392,"props":1610,"children":1611},{"style":405},[1612],{"type":60,"value":419},{"type":54,"tag":392,"props":1614,"children":1615},{"style":399},[1616],{"type":60,"value":424},{"type":54,"tag":392,"props":1618,"children":1619},{"style":405},[1620],{"type":60,"value":429},{"type":54,"tag":392,"props":1622,"children":1623},{"style":432},[1624],{"type":60,"value":175},{"type":54,"tag":392,"props":1626,"children":1627},{"style":405},[1628],{"type":60,"value":439},{"type":54,"tag":392,"props":1630,"children":1631},{"style":405},[1632],{"type":60,"value":444},{"type":54,"tag":392,"props":1634,"children":1635},{"class":394,"line":447},[1636],{"type":54,"tag":392,"props":1637,"children":1638},{"emptyLinePlaceholder":451},[1639],{"type":60,"value":454},{"type":54,"tag":392,"props":1641,"children":1642},{"class":394,"line":457},[1643,1647,1652,1656,1660,1664,1668,1673,1677,1681],{"type":54,"tag":392,"props":1644,"children":1645},{"style":461},[1646],{"type":60,"value":464},{"type":54,"tag":392,"props":1648,"children":1649},{"style":411},[1650],{"type":60,"value":1651}," getWeather ",{"type":54,"tag":392,"props":1653,"children":1654},{"style":405},[1655],{"type":60,"value":474},{"type":54,"tag":392,"props":1657,"children":1658},{"style":482},[1659],{"type":60,"value":1608},{"type":54,"tag":392,"props":1661,"children":1662},{"style":411},[1663],{"type":60,"value":535},{"type":54,"tag":392,"props":1665,"children":1666},{"style":405},[1667],{"type":60,"value":439},{"type":54,"tag":392,"props":1669,"children":1670},{"style":432},[1671],{"type":60,"value":1672},"get_weather",{"type":54,"tag":392,"props":1674,"children":1675},{"style":405},[1676],{"type":60,"value":439},{"type":54,"tag":392,"props":1678,"children":1679},{"style":405},[1680],{"type":60,"value":1064},{"type":54,"tag":392,"props":1682,"children":1683},{"style":405},[1684],{"type":60,"value":1161},{"type":54,"tag":392,"props":1686,"children":1687},{"class":394,"line":496},[1688,1693,1697,1701,1706,1710],{"type":54,"tag":392,"props":1689,"children":1690},{"style":543},[1691],{"type":60,"value":1692},"    description",{"type":54,"tag":392,"props":1694,"children":1695},{"style":405},[1696],{"type":60,"value":551},{"type":54,"tag":392,"props":1698,"children":1699},{"style":405},[1700],{"type":60,"value":429},{"type":54,"tag":392,"props":1702,"children":1703},{"style":432},[1704],{"type":60,"value":1705},"Get the current weather for a city",{"type":54,"tag":392,"props":1707,"children":1708},{"style":405},[1709],{"type":60,"value":439},{"type":54,"tag":392,"props":1711,"children":1712},{"style":405},[1713],{"type":60,"value":1714},",\n",{"type":54,"tag":392,"props":1716,"children":1717},{"class":394,"line":579},[1718,1723,1727],{"type":54,"tag":392,"props":1719,"children":1720},{"style":543},[1721],{"type":60,"value":1722},"    parameters",{"type":54,"tag":392,"props":1724,"children":1725},{"style":405},[1726],{"type":60,"value":551},{"type":54,"tag":392,"props":1728,"children":1729},{"style":405},[1730],{"type":60,"value":1161},{"type":54,"tag":392,"props":1732,"children":1733},{"class":394,"line":587},[1734,1739,1743,1747,1752,1756],{"type":54,"tag":392,"props":1735,"children":1736},{"style":543},[1737],{"type":60,"value":1738},"        type",{"type":54,"tag":392,"props":1740,"children":1741},{"style":405},[1742],{"type":60,"value":551},{"type":54,"tag":392,"props":1744,"children":1745},{"style":405},[1746],{"type":60,"value":429},{"type":54,"tag":392,"props":1748,"children":1749},{"style":432},[1750],{"type":60,"value":1751},"object",{"type":54,"tag":392,"props":1753,"children":1754},{"style":405},[1755],{"type":60,"value":439},{"type":54,"tag":392,"props":1757,"children":1758},{"style":405},[1759],{"type":60,"value":1714},{"type":54,"tag":392,"props":1761,"children":1762},{"class":394,"line":664},[1763,1768,1772,1776,1781,1785,1789,1794,1798,1802,1807,1811,1815,1820,1824,1828,1833,1837,1841],{"type":54,"tag":392,"props":1764,"children":1765},{"style":543},[1766],{"type":60,"value":1767},"        properties",{"type":54,"tag":392,"props":1769,"children":1770},{"style":405},[1771],{"type":60,"value":551},{"type":54,"tag":392,"props":1773,"children":1774},{"style":405},[1775],{"type":60,"value":408},{"type":54,"tag":392,"props":1777,"children":1778},{"style":543},[1779],{"type":60,"value":1780}," city",{"type":54,"tag":392,"props":1782,"children":1783},{"style":405},[1784],{"type":60,"value":551},{"type":54,"tag":392,"props":1786,"children":1787},{"style":405},[1788],{"type":60,"value":408},{"type":54,"tag":392,"props":1790,"children":1791},{"style":543},[1792],{"type":60,"value":1793}," type",{"type":54,"tag":392,"props":1795,"children":1796},{"style":405},[1797],{"type":60,"value":551},{"type":54,"tag":392,"props":1799,"children":1800},{"style":405},[1801],{"type":60,"value":429},{"type":54,"tag":392,"props":1803,"children":1804},{"style":432},[1805],{"type":60,"value":1806},"string",{"type":54,"tag":392,"props":1808,"children":1809},{"style":405},[1810],{"type":60,"value":439},{"type":54,"tag":392,"props":1812,"children":1813},{"style":405},[1814],{"type":60,"value":1064},{"type":54,"tag":392,"props":1816,"children":1817},{"style":543},[1818],{"type":60,"value":1819}," description",{"type":54,"tag":392,"props":1821,"children":1822},{"style":405},[1823],{"type":60,"value":551},{"type":54,"tag":392,"props":1825,"children":1826},{"style":405},[1827],{"type":60,"value":429},{"type":54,"tag":392,"props":1829,"children":1830},{"style":432},[1831],{"type":60,"value":1832},"The city name",{"type":54,"tag":392,"props":1834,"children":1835},{"style":405},[1836],{"type":60,"value":439},{"type":54,"tag":392,"props":1838,"children":1839},{"style":405},[1840],{"type":60,"value":419},{"type":54,"tag":392,"props":1842,"children":1843},{"style":405},[1844],{"type":60,"value":1845}," },\n",{"type":54,"tag":392,"props":1847,"children":1848},{"class":394,"line":710},[1849,1854,1858,1863,1867,1872,1876,1881],{"type":54,"tag":392,"props":1850,"children":1851},{"style":543},[1852],{"type":60,"value":1853},"        required",{"type":54,"tag":392,"props":1855,"children":1856},{"style":405},[1857],{"type":60,"value":551},{"type":54,"tag":392,"props":1859,"children":1860},{"style":411},[1861],{"type":60,"value":1862}," [",{"type":54,"tag":392,"props":1864,"children":1865},{"style":405},[1866],{"type":60,"value":439},{"type":54,"tag":392,"props":1868,"children":1869},{"style":432},[1870],{"type":60,"value":1871},"city",{"type":54,"tag":392,"props":1873,"children":1874},{"style":405},[1875],{"type":60,"value":439},{"type":54,"tag":392,"props":1877,"children":1878},{"style":411},[1879],{"type":60,"value":1880},"]",{"type":54,"tag":392,"props":1882,"children":1883},{"style":405},[1884],{"type":60,"value":1714},{"type":54,"tag":392,"props":1886,"children":1887},{"class":394,"line":718},[1888],{"type":54,"tag":392,"props":1889,"children":1890},{"style":405},[1891],{"type":60,"value":1892},"    },\n",{"type":54,"tag":392,"props":1894,"children":1895},{"class":394,"line":831},[1896,1901,1905,1910,1915,1919,1924,1928,1932,1936,1940,1944,1949,1953,1957,1962,1966,1970,1975,1979,1983,1988,1992,1996,2000],{"type":54,"tag":392,"props":1897,"children":1898},{"style":482},[1899],{"type":60,"value":1900},"    handler",{"type":54,"tag":392,"props":1902,"children":1903},{"style":405},[1904],{"type":60,"value":551},{"type":54,"tag":392,"props":1906,"children":1907},{"style":461},[1908],{"type":60,"value":1909}," async",{"type":54,"tag":392,"props":1911,"children":1912},{"style":405},[1913],{"type":60,"value":1914}," ({",{"type":54,"tag":392,"props":1916,"children":1917},{"style":1144},[1918],{"type":60,"value":1780},{"type":54,"tag":392,"props":1920,"children":1921},{"style":405},[1922],{"type":60,"value":1923}," })",{"type":54,"tag":392,"props":1925,"children":1926},{"style":461},[1927],{"type":60,"value":1156},{"type":54,"tag":392,"props":1929,"children":1930},{"style":411},[1931],{"type":60,"value":1141},{"type":54,"tag":392,"props":1933,"children":1934},{"style":405},[1935],{"type":60,"value":540},{"type":54,"tag":392,"props":1937,"children":1938},{"style":411},[1939],{"type":60,"value":1780},{"type":54,"tag":392,"props":1941,"children":1942},{"style":405},[1943],{"type":60,"value":1064},{"type":54,"tag":392,"props":1945,"children":1946},{"style":543},[1947],{"type":60,"value":1948}," temperature",{"type":54,"tag":392,"props":1950,"children":1951},{"style":405},[1952],{"type":60,"value":551},{"type":54,"tag":392,"props":1954,"children":1955},{"style":405},[1956],{"type":60,"value":429},{"type":54,"tag":392,"props":1958,"children":1959},{"style":432},[1960],{"type":60,"value":1961},"72°F",{"type":54,"tag":392,"props":1963,"children":1964},{"style":405},[1965],{"type":60,"value":439},{"type":54,"tag":392,"props":1967,"children":1968},{"style":405},[1969],{"type":60,"value":1064},{"type":54,"tag":392,"props":1971,"children":1972},{"style":543},[1973],{"type":60,"value":1974}," condition",{"type":54,"tag":392,"props":1976,"children":1977},{"style":405},[1978],{"type":60,"value":551},{"type":54,"tag":392,"props":1980,"children":1981},{"style":405},[1982],{"type":60,"value":429},{"type":54,"tag":392,"props":1984,"children":1985},{"style":432},[1986],{"type":60,"value":1987},"sunny",{"type":54,"tag":392,"props":1989,"children":1990},{"style":405},[1991],{"type":60,"value":439},{"type":54,"tag":392,"props":1993,"children":1994},{"style":405},[1995],{"type":60,"value":419},{"type":54,"tag":392,"props":1997,"children":1998},{"style":411},[1999],{"type":60,"value":99},{"type":54,"tag":392,"props":2001,"children":2002},{"style":405},[2003],{"type":60,"value":1714},{"type":54,"tag":392,"props":2005,"children":2006},{"class":394,"line":840},[2007,2011,2015],{"type":54,"tag":392,"props":2008,"children":2009},{"style":405},[2010],{"type":60,"value":1228},{"type":54,"tag":392,"props":2012,"children":2013},{"style":411},[2014],{"type":60,"value":99},{"type":54,"tag":392,"props":2016,"children":2017},{"style":405},[2018],{"type":60,"value":444},{"type":54,"tag":392,"props":2020,"children":2021},{"class":394,"line":848},[2022],{"type":54,"tag":392,"props":2023,"children":2024},{"emptyLinePlaceholder":451},[2025],{"type":60,"value":454},{"type":54,"tag":392,"props":2027,"children":2028},{"class":394,"line":1478},[2029,2033,2037,2041,2045,2049,2053,2057,2061],{"type":54,"tag":392,"props":2030,"children":2031},{"style":461},[2032],{"type":60,"value":464},{"type":54,"tag":392,"props":2034,"children":2035},{"style":411},[2036],{"type":60,"value":506},{"type":54,"tag":392,"props":2038,"children":2039},{"style":405},[2040],{"type":60,"value":474},{"type":54,"tag":392,"props":2042,"children":2043},{"style":399},[2044],{"type":60,"value":515},{"type":54,"tag":392,"props":2046,"children":2047},{"style":411},[2048],{"type":60,"value":520},{"type":54,"tag":392,"props":2050,"children":2051},{"style":405},[2052],{"type":60,"value":525},{"type":54,"tag":392,"props":2054,"children":2055},{"style":482},[2056],{"type":60,"value":530},{"type":54,"tag":392,"props":2058,"children":2059},{"style":411},[2060],{"type":60,"value":535},{"type":54,"tag":392,"props":2062,"children":2063},{"style":405},[2064],{"type":60,"value":2065},"{\n",{"type":54,"tag":392,"props":2067,"children":2069},{"class":394,"line":2068},14,[2070,2075,2079,2083,2087,2091],{"type":54,"tag":392,"props":2071,"children":2072},{"style":543},[2073],{"type":60,"value":2074},"    model",{"type":54,"tag":392,"props":2076,"children":2077},{"style":405},[2078],{"type":60,"value":551},{"type":54,"tag":392,"props":2080,"children":2081},{"style":405},[2082],{"type":60,"value":429},{"type":54,"tag":392,"props":2084,"children":2085},{"style":432},[2086],{"type":60,"value":560},{"type":54,"tag":392,"props":2088,"children":2089},{"style":405},[2090],{"type":60,"value":439},{"type":54,"tag":392,"props":2092,"children":2093},{"style":405},[2094],{"type":60,"value":1714},{"type":54,"tag":392,"props":2096,"children":2098},{"class":394,"line":2097},15,[2099,2104,2108,2113],{"type":54,"tag":392,"props":2100,"children":2101},{"style":543},[2102],{"type":60,"value":2103},"    tools",{"type":54,"tag":392,"props":2105,"children":2106},{"style":405},[2107],{"type":60,"value":551},{"type":54,"tag":392,"props":2109,"children":2110},{"style":411},[2111],{"type":60,"value":2112}," [getWeather]",{"type":54,"tag":392,"props":2114,"children":2115},{"style":405},[2116],{"type":60,"value":1714},{"type":54,"tag":392,"props":2118,"children":2120},{"class":394,"line":2119},16,[2121,2125,2129],{"type":54,"tag":392,"props":2122,"children":2123},{"style":405},[2124],{"type":60,"value":1228},{"type":54,"tag":392,"props":2126,"children":2127},{"style":411},[2128],{"type":60,"value":99},{"type":54,"tag":392,"props":2130,"children":2131},{"style":405},[2132],{"type":60,"value":444},{"type":54,"tag":377,"props":2134,"children":2136},{"id":2135},"python-2",[2137],{"type":60,"value":23},{"type":54,"tag":271,"props":2139,"children":2141},{"className":752,"code":2140,"language":24,"meta":279,"style":279},"from copilot.tools import define_tool\nfrom pydantic import BaseModel, Field\n\nclass GetWeatherParams(BaseModel):\n    city: str = Field(description=\"The city name\")\n\n@define_tool(description=\"Get the current weather for a city\")\nasync def get_weather(params: GetWeatherParams) -> dict:\n    return {\"city\": params.city, \"temperature\": \"72°F\", \"condition\": \"sunny\"}\n\nsession = await client.create_session({\"model\": \"gpt-4.1\", \"tools\": [get_weather]})\n",[2142],{"type":54,"tag":92,"props":2143,"children":2144},{"__ignoreMap":279},[2145,2153,2161,2168,2176,2184,2191,2199,2207,2215,2222],{"type":54,"tag":392,"props":2146,"children":2147},{"class":394,"line":395},[2148],{"type":54,"tag":392,"props":2149,"children":2150},{},[2151],{"type":60,"value":2152},"from copilot.tools import define_tool\n",{"type":54,"tag":392,"props":2154,"children":2155},{"class":394,"line":447},[2156],{"type":54,"tag":392,"props":2157,"children":2158},{},[2159],{"type":60,"value":2160},"from pydantic import BaseModel, Field\n",{"type":54,"tag":392,"props":2162,"children":2163},{"class":394,"line":457},[2164],{"type":54,"tag":392,"props":2165,"children":2166},{"emptyLinePlaceholder":451},[2167],{"type":60,"value":454},{"type":54,"tag":392,"props":2169,"children":2170},{"class":394,"line":496},[2171],{"type":54,"tag":392,"props":2172,"children":2173},{},[2174],{"type":60,"value":2175},"class GetWeatherParams(BaseModel):\n",{"type":54,"tag":392,"props":2177,"children":2178},{"class":394,"line":579},[2179],{"type":54,"tag":392,"props":2180,"children":2181},{},[2182],{"type":60,"value":2183},"    city: str = Field(description=\"The city name\")\n",{"type":54,"tag":392,"props":2185,"children":2186},{"class":394,"line":587},[2187],{"type":54,"tag":392,"props":2188,"children":2189},{"emptyLinePlaceholder":451},[2190],{"type":60,"value":454},{"type":54,"tag":392,"props":2192,"children":2193},{"class":394,"line":664},[2194],{"type":54,"tag":392,"props":2195,"children":2196},{},[2197],{"type":60,"value":2198},"@define_tool(description=\"Get the current weather for a city\")\n",{"type":54,"tag":392,"props":2200,"children":2201},{"class":394,"line":710},[2202],{"type":54,"tag":392,"props":2203,"children":2204},{},[2205],{"type":60,"value":2206},"async def get_weather(params: GetWeatherParams) -> dict:\n",{"type":54,"tag":392,"props":2208,"children":2209},{"class":394,"line":718},[2210],{"type":54,"tag":392,"props":2211,"children":2212},{},[2213],{"type":60,"value":2214},"    return {\"city\": params.city, \"temperature\": \"72°F\", \"condition\": \"sunny\"}\n",{"type":54,"tag":392,"props":2216,"children":2217},{"class":394,"line":831},[2218],{"type":54,"tag":392,"props":2219,"children":2220},{"emptyLinePlaceholder":451},[2221],{"type":60,"value":454},{"type":54,"tag":392,"props":2223,"children":2224},{"class":394,"line":840},[2225],{"type":54,"tag":392,"props":2226,"children":2227},{},[2228],{"type":60,"value":2229},"session = await client.create_session({\"model\": \"gpt-4.1\", \"tools\": [get_weather]})\n",{"type":54,"tag":377,"props":2231,"children":2233},{"id":2232},"go-1",[2234],{"type":60,"value":29},{"type":54,"tag":271,"props":2236,"children":2238},{"className":861,"code":2237,"language":30,"meta":279,"style":279},"type WeatherParams struct {\n    City string `json:\"city\" jsonschema:\"The city name\"`\n}\n\ngetWeather := copilot.DefineTool(\"get_weather\", \"Get weather for a city\",\n    func(params WeatherParams, inv copilot.ToolInvocation) (WeatherResult, error) {\n        return WeatherResult{City: params.City, Temperature: \"72°F\"}, nil\n    },\n)\n\nsession, _ := client.CreateSession(ctx, &copilot.SessionConfig{\n    Model: \"gpt-4.1\",\n    Tools: []copilot.Tool{getWeather},\n})\n",[2239],{"type":54,"tag":92,"props":2240,"children":2241},{"__ignoreMap":279},[2242,2250,2258,2266,2273,2281,2289,2297,2304,2312,2319,2327,2335,2343],{"type":54,"tag":392,"props":2243,"children":2244},{"class":394,"line":395},[2245],{"type":54,"tag":392,"props":2246,"children":2247},{},[2248],{"type":60,"value":2249},"type WeatherParams struct {\n",{"type":54,"tag":392,"props":2251,"children":2252},{"class":394,"line":447},[2253],{"type":54,"tag":392,"props":2254,"children":2255},{},[2256],{"type":60,"value":2257},"    City string `json:\"city\" jsonschema:\"The city name\"`\n",{"type":54,"tag":392,"props":2259,"children":2260},{"class":394,"line":457},[2261],{"type":54,"tag":392,"props":2262,"children":2263},{},[2264],{"type":60,"value":2265},"}\n",{"type":54,"tag":392,"props":2267,"children":2268},{"class":394,"line":496},[2269],{"type":54,"tag":392,"props":2270,"children":2271},{"emptyLinePlaceholder":451},[2272],{"type":60,"value":454},{"type":54,"tag":392,"props":2274,"children":2275},{"class":394,"line":579},[2276],{"type":54,"tag":392,"props":2277,"children":2278},{},[2279],{"type":60,"value":2280},"getWeather := copilot.DefineTool(\"get_weather\", \"Get weather for a city\",\n",{"type":54,"tag":392,"props":2282,"children":2283},{"class":394,"line":587},[2284],{"type":54,"tag":392,"props":2285,"children":2286},{},[2287],{"type":60,"value":2288},"    func(params WeatherParams, inv copilot.ToolInvocation) (WeatherResult, error) {\n",{"type":54,"tag":392,"props":2290,"children":2291},{"class":394,"line":664},[2292],{"type":54,"tag":392,"props":2293,"children":2294},{},[2295],{"type":60,"value":2296},"        return WeatherResult{City: params.City, Temperature: \"72°F\"}, nil\n",{"type":54,"tag":392,"props":2298,"children":2299},{"class":394,"line":710},[2300],{"type":54,"tag":392,"props":2301,"children":2302},{},[2303],{"type":60,"value":1892},{"type":54,"tag":392,"props":2305,"children":2306},{"class":394,"line":718},[2307],{"type":54,"tag":392,"props":2308,"children":2309},{},[2310],{"type":60,"value":2311},")\n",{"type":54,"tag":392,"props":2313,"children":2314},{"class":394,"line":831},[2315],{"type":54,"tag":392,"props":2316,"children":2317},{"emptyLinePlaceholder":451},[2318],{"type":60,"value":454},{"type":54,"tag":392,"props":2320,"children":2321},{"class":394,"line":840},[2322],{"type":54,"tag":392,"props":2323,"children":2324},{},[2325],{"type":60,"value":2326},"session, _ := client.CreateSession(ctx, &copilot.SessionConfig{\n",{"type":54,"tag":392,"props":2328,"children":2329},{"class":394,"line":848},[2330],{"type":54,"tag":392,"props":2331,"children":2332},{},[2333],{"type":60,"value":2334},"    Model: \"gpt-4.1\",\n",{"type":54,"tag":392,"props":2336,"children":2337},{"class":394,"line":1478},[2338],{"type":54,"tag":392,"props":2339,"children":2340},{},[2341],{"type":60,"value":2342},"    Tools: []copilot.Tool{getWeather},\n",{"type":54,"tag":392,"props":2344,"children":2345},{"class":394,"line":2068},[2346],{"type":54,"tag":392,"props":2347,"children":2348},{},[2349],{"type":60,"value":2350},"})\n",{"type":54,"tag":377,"props":2352,"children":2354},{"id":2353},"net-1",[2355],{"type":60,"value":17},{"type":54,"tag":271,"props":2357,"children":2359},{"className":928,"code":2358,"language":930,"meta":279,"style":279},"using Microsoft.Extensions.AI;\nusing System.ComponentModel;\n\nvar getWeather = AIFunctionFactory.Create(\n    ([Description(\"The city name\")] string city) => new { city, temperature = \"72°F\" },\n    \"get_weather\", \"Get the current weather for a city\");\n\nawait using var session = await client.CreateSessionAsync(new SessionConfig {\n    Model = \"gpt-4.1\", Tools = [getWeather],\n});\n",[2360],{"type":54,"tag":92,"props":2361,"children":2362},{"__ignoreMap":279},[2363,2371,2379,2386,2394,2402,2410,2417,2425,2433],{"type":54,"tag":392,"props":2364,"children":2365},{"class":394,"line":395},[2366],{"type":54,"tag":392,"props":2367,"children":2368},{},[2369],{"type":60,"value":2370},"using Microsoft.Extensions.AI;\n",{"type":54,"tag":392,"props":2372,"children":2373},{"class":394,"line":447},[2374],{"type":54,"tag":392,"props":2375,"children":2376},{},[2377],{"type":60,"value":2378},"using System.ComponentModel;\n",{"type":54,"tag":392,"props":2380,"children":2381},{"class":394,"line":457},[2382],{"type":54,"tag":392,"props":2383,"children":2384},{"emptyLinePlaceholder":451},[2385],{"type":60,"value":454},{"type":54,"tag":392,"props":2387,"children":2388},{"class":394,"line":496},[2389],{"type":54,"tag":392,"props":2390,"children":2391},{},[2392],{"type":60,"value":2393},"var getWeather = AIFunctionFactory.Create(\n",{"type":54,"tag":392,"props":2395,"children":2396},{"class":394,"line":579},[2397],{"type":54,"tag":392,"props":2398,"children":2399},{},[2400],{"type":60,"value":2401},"    ([Description(\"The city name\")] string city) => new { city, temperature = \"72°F\" },\n",{"type":54,"tag":392,"props":2403,"children":2404},{"class":394,"line":587},[2405],{"type":54,"tag":392,"props":2406,"children":2407},{},[2408],{"type":60,"value":2409},"    \"get_weather\", \"Get the current weather for a city\");\n",{"type":54,"tag":392,"props":2411,"children":2412},{"class":394,"line":664},[2413],{"type":54,"tag":392,"props":2414,"children":2415},{"emptyLinePlaceholder":451},[2416],{"type":60,"value":454},{"type":54,"tag":392,"props":2418,"children":2419},{"class":394,"line":710},[2420],{"type":54,"tag":392,"props":2421,"children":2422},{},[2423],{"type":60,"value":2424},"await using var session = await client.CreateSessionAsync(new SessionConfig {\n",{"type":54,"tag":392,"props":2426,"children":2427},{"class":394,"line":718},[2428],{"type":54,"tag":392,"props":2429,"children":2430},{},[2431],{"type":60,"value":2432},"    Model = \"gpt-4.1\", Tools = [getWeather],\n",{"type":54,"tag":392,"props":2434,"children":2435},{"class":394,"line":831},[2436],{"type":54,"tag":392,"props":2437,"children":2438},{},[2439],{"type":60,"value":2440},"});\n",{"type":54,"tag":377,"props":2442,"children":2444},{"id":2443},"tool-requirements",[2445],{"type":60,"value":2446},"Tool Requirements",{"type":54,"tag":76,"props":2448,"children":2449},{},[2450,2462,2467],{"type":54,"tag":80,"props":2451,"children":2452},{},[2453,2455,2461],{"type":60,"value":2454},"Handler must return JSON-serializable data (not ",{"type":54,"tag":92,"props":2456,"children":2458},{"className":2457},[],[2459],{"type":60,"value":2460},"undefined",{"type":60,"value":99},{"type":54,"tag":80,"props":2463,"children":2464},{},[2465],{"type":60,"value":2466},"Parameters must follow JSON Schema format",{"type":54,"tag":80,"props":2468,"children":2469},{},[2470],{"type":60,"value":2471},"Tool description should clearly state when the tool should be used",{"type":54,"tag":362,"props":2473,"children":2474},{},[],{"type":54,"tag":69,"props":2476,"children":2478},{"id":2477},"hooks",[2479],{"type":60,"value":2480},"Hooks",{"type":54,"tag":63,"props":2482,"children":2483},{},[2484],{"type":60,"value":2485},"Intercept and customize session behavior at key lifecycle points.",{"type":54,"tag":127,"props":2487,"children":2488},{},[2489,2509],{"type":54,"tag":131,"props":2490,"children":2491},{},[2492],{"type":54,"tag":135,"props":2493,"children":2494},{},[2495,2500,2505],{"type":54,"tag":139,"props":2496,"children":2497},{},[2498],{"type":60,"value":2499},"Hook",{"type":54,"tag":139,"props":2501,"children":2502},{},[2503],{"type":60,"value":2504},"Trigger",{"type":54,"tag":139,"props":2506,"children":2507},{},[2508],{"type":60,"value":313},{"type":54,"tag":155,"props":2510,"children":2511},{},[2512,2534,2556,2578,2600,2622],{"type":54,"tag":135,"props":2513,"children":2514},{},[2515,2524,2529],{"type":54,"tag":162,"props":2516,"children":2517},{},[2518],{"type":54,"tag":92,"props":2519,"children":2521},{"className":2520},[],[2522],{"type":60,"value":2523},"onPreToolUse",{"type":54,"tag":162,"props":2525,"children":2526},{},[2527],{"type":60,"value":2528},"Before tool executes",{"type":54,"tag":162,"props":2530,"children":2531},{},[2532],{"type":60,"value":2533},"Permission control, argument modification",{"type":54,"tag":135,"props":2535,"children":2536},{},[2537,2546,2551],{"type":54,"tag":162,"props":2538,"children":2539},{},[2540],{"type":54,"tag":92,"props":2541,"children":2543},{"className":2542},[],[2544],{"type":60,"value":2545},"onPostToolUse",{"type":54,"tag":162,"props":2547,"children":2548},{},[2549],{"type":60,"value":2550},"After tool executes",{"type":54,"tag":162,"props":2552,"children":2553},{},[2554],{"type":60,"value":2555},"Result transformation, logging, redaction",{"type":54,"tag":135,"props":2557,"children":2558},{},[2559,2568,2573],{"type":54,"tag":162,"props":2560,"children":2561},{},[2562],{"type":54,"tag":92,"props":2563,"children":2565},{"className":2564},[],[2566],{"type":60,"value":2567},"onUserPromptSubmitted",{"type":54,"tag":162,"props":2569,"children":2570},{},[2571],{"type":60,"value":2572},"User sends message",{"type":54,"tag":162,"props":2574,"children":2575},{},[2576],{"type":60,"value":2577},"Prompt modification, filtering, context injection",{"type":54,"tag":135,"props":2579,"children":2580},{},[2581,2590,2595],{"type":54,"tag":162,"props":2582,"children":2583},{},[2584],{"type":54,"tag":92,"props":2585,"children":2587},{"className":2586},[],[2588],{"type":60,"value":2589},"onSessionStart",{"type":54,"tag":162,"props":2591,"children":2592},{},[2593],{"type":60,"value":2594},"Session begins (new or resumed)",{"type":54,"tag":162,"props":2596,"children":2597},{},[2598],{"type":60,"value":2599},"Add context, configure session",{"type":54,"tag":135,"props":2601,"children":2602},{},[2603,2612,2617],{"type":54,"tag":162,"props":2604,"children":2605},{},[2606],{"type":54,"tag":92,"props":2607,"children":2609},{"className":2608},[],[2610],{"type":60,"value":2611},"onSessionEnd",{"type":54,"tag":162,"props":2613,"children":2614},{},[2615],{"type":60,"value":2616},"Session ends",{"type":54,"tag":162,"props":2618,"children":2619},{},[2620],{"type":60,"value":2621},"Cleanup, analytics, metrics",{"type":54,"tag":135,"props":2623,"children":2624},{},[2625,2634,2639],{"type":54,"tag":162,"props":2626,"children":2627},{},[2628],{"type":54,"tag":92,"props":2629,"children":2631},{"className":2630},[],[2632],{"type":60,"value":2633},"onErrorOccurred",{"type":54,"tag":162,"props":2635,"children":2636},{},[2637],{"type":60,"value":2638},"Error happens",{"type":54,"tag":162,"props":2640,"children":2641},{},[2642],{"type":60,"value":2643},"Custom error handling, retry logic, monitoring",{"type":54,"tag":377,"props":2645,"children":2647},{"id":2646},"pre-tool-use-hook",[2648],{"type":60,"value":2649},"Pre-Tool Use Hook",{"type":54,"tag":63,"props":2651,"children":2652},{},[2653],{"type":60,"value":2654},"Control tool permissions, modify arguments, or inject context before tool execution.",{"type":54,"tag":271,"props":2656,"children":2658},{"className":385,"code":2657,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    hooks: {\n        onPreToolUse: async (input) => {\n            if ([\"shell\", \"bash\"].includes(input.toolName)) {\n                return { permissionDecision: \"deny\", permissionDecisionReason: \"Shell access not permitted\" };\n            }\n            return { permissionDecision: \"allow\" };\n        },\n    },\n});\n",[2659],{"type":54,"tag":92,"props":2660,"children":2661},{"__ignoreMap":279},[2662,2701,2717,2754,2836,2901,2909,2946,2954,2961],{"type":54,"tag":392,"props":2663,"children":2664},{"class":394,"line":395},[2665,2669,2673,2677,2681,2685,2689,2693,2697],{"type":54,"tag":392,"props":2666,"children":2667},{"style":461},[2668],{"type":60,"value":464},{"type":54,"tag":392,"props":2670,"children":2671},{"style":411},[2672],{"type":60,"value":506},{"type":54,"tag":392,"props":2674,"children":2675},{"style":405},[2676],{"type":60,"value":474},{"type":54,"tag":392,"props":2678,"children":2679},{"style":399},[2680],{"type":60,"value":515},{"type":54,"tag":392,"props":2682,"children":2683},{"style":411},[2684],{"type":60,"value":520},{"type":54,"tag":392,"props":2686,"children":2687},{"style":405},[2688],{"type":60,"value":525},{"type":54,"tag":392,"props":2690,"children":2691},{"style":482},[2692],{"type":60,"value":530},{"type":54,"tag":392,"props":2694,"children":2695},{"style":411},[2696],{"type":60,"value":535},{"type":54,"tag":392,"props":2698,"children":2699},{"style":405},[2700],{"type":60,"value":2065},{"type":54,"tag":392,"props":2702,"children":2703},{"class":394,"line":447},[2704,2709,2713],{"type":54,"tag":392,"props":2705,"children":2706},{"style":543},[2707],{"type":60,"value":2708},"    hooks",{"type":54,"tag":392,"props":2710,"children":2711},{"style":405},[2712],{"type":60,"value":551},{"type":54,"tag":392,"props":2714,"children":2715},{"style":405},[2716],{"type":60,"value":1161},{"type":54,"tag":392,"props":2718,"children":2719},{"class":394,"line":457},[2720,2725,2729,2733,2737,2742,2746,2750],{"type":54,"tag":392,"props":2721,"children":2722},{"style":482},[2723],{"type":60,"value":2724},"        onPreToolUse",{"type":54,"tag":392,"props":2726,"children":2727},{"style":405},[2728],{"type":60,"value":551},{"type":54,"tag":392,"props":2730,"children":2731},{"style":461},[2732],{"type":60,"value":1909},{"type":54,"tag":392,"props":2734,"children":2735},{"style":405},[2736],{"type":60,"value":1141},{"type":54,"tag":392,"props":2738,"children":2739},{"style":1144},[2740],{"type":60,"value":2741},"input",{"type":54,"tag":392,"props":2743,"children":2744},{"style":405},[2745],{"type":60,"value":99},{"type":54,"tag":392,"props":2747,"children":2748},{"style":461},[2749],{"type":60,"value":1156},{"type":54,"tag":392,"props":2751,"children":2752},{"style":405},[2753],{"type":60,"value":1161},{"type":54,"tag":392,"props":2755,"children":2756},{"class":394,"line":496},[2757,2762,2767,2771,2776,2780,2784,2788,2793,2797,2801,2805,2810,2814,2818,2822,2827,2832],{"type":54,"tag":392,"props":2758,"children":2759},{"style":399},[2760],{"type":60,"value":2761},"            if",{"type":54,"tag":392,"props":2763,"children":2764},{"style":543},[2765],{"type":60,"value":2766}," ([",{"type":54,"tag":392,"props":2768,"children":2769},{"style":405},[2770],{"type":60,"value":439},{"type":54,"tag":392,"props":2772,"children":2773},{"style":432},[2774],{"type":60,"value":2775},"shell",{"type":54,"tag":392,"props":2777,"children":2778},{"style":405},[2779],{"type":60,"value":439},{"type":54,"tag":392,"props":2781,"children":2782},{"style":405},[2783],{"type":60,"value":1064},{"type":54,"tag":392,"props":2785,"children":2786},{"style":405},[2787],{"type":60,"value":429},{"type":54,"tag":392,"props":2789,"children":2790},{"style":432},[2791],{"type":60,"value":2792},"bash",{"type":54,"tag":392,"props":2794,"children":2795},{"style":405},[2796],{"type":60,"value":439},{"type":54,"tag":392,"props":2798,"children":2799},{"style":543},[2800],{"type":60,"value":1880},{"type":54,"tag":392,"props":2802,"children":2803},{"style":405},[2804],{"type":60,"value":525},{"type":54,"tag":392,"props":2806,"children":2807},{"style":482},[2808],{"type":60,"value":2809},"includes",{"type":54,"tag":392,"props":2811,"children":2812},{"style":543},[2813],{"type":60,"value":535},{"type":54,"tag":392,"props":2815,"children":2816},{"style":411},[2817],{"type":60,"value":2741},{"type":54,"tag":392,"props":2819,"children":2820},{"style":405},[2821],{"type":60,"value":525},{"type":54,"tag":392,"props":2823,"children":2824},{"style":411},[2825],{"type":60,"value":2826},"toolName",{"type":54,"tag":392,"props":2828,"children":2829},{"style":543},[2830],{"type":60,"value":2831},")) ",{"type":54,"tag":392,"props":2833,"children":2834},{"style":405},[2835],{"type":60,"value":2065},{"type":54,"tag":392,"props":2837,"children":2838},{"class":394,"line":579},[2839,2844,2848,2853,2857,2861,2866,2870,2874,2879,2883,2887,2892,2896],{"type":54,"tag":392,"props":2840,"children":2841},{"style":399},[2842],{"type":60,"value":2843},"                return",{"type":54,"tag":392,"props":2845,"children":2846},{"style":405},[2847],{"type":60,"value":408},{"type":54,"tag":392,"props":2849,"children":2850},{"style":543},[2851],{"type":60,"value":2852}," permissionDecision",{"type":54,"tag":392,"props":2854,"children":2855},{"style":405},[2856],{"type":60,"value":551},{"type":54,"tag":392,"props":2858,"children":2859},{"style":405},[2860],{"type":60,"value":429},{"type":54,"tag":392,"props":2862,"children":2863},{"style":432},[2864],{"type":60,"value":2865},"deny",{"type":54,"tag":392,"props":2867,"children":2868},{"style":405},[2869],{"type":60,"value":439},{"type":54,"tag":392,"props":2871,"children":2872},{"style":405},[2873],{"type":60,"value":1064},{"type":54,"tag":392,"props":2875,"children":2876},{"style":543},[2877],{"type":60,"value":2878}," permissionDecisionReason",{"type":54,"tag":392,"props":2880,"children":2881},{"style":405},[2882],{"type":60,"value":551},{"type":54,"tag":392,"props":2884,"children":2885},{"style":405},[2886],{"type":60,"value":429},{"type":54,"tag":392,"props":2888,"children":2889},{"style":432},[2890],{"type":60,"value":2891},"Shell access not permitted",{"type":54,"tag":392,"props":2893,"children":2894},{"style":405},[2895],{"type":60,"value":439},{"type":54,"tag":392,"props":2897,"children":2898},{"style":405},[2899],{"type":60,"value":2900}," };\n",{"type":54,"tag":392,"props":2902,"children":2903},{"class":394,"line":587},[2904],{"type":54,"tag":392,"props":2905,"children":2906},{"style":405},[2907],{"type":60,"value":2908},"            }\n",{"type":54,"tag":392,"props":2910,"children":2911},{"class":394,"line":664},[2912,2917,2921,2925,2929,2933,2938,2942],{"type":54,"tag":392,"props":2913,"children":2914},{"style":399},[2915],{"type":60,"value":2916},"            return",{"type":54,"tag":392,"props":2918,"children":2919},{"style":405},[2920],{"type":60,"value":408},{"type":54,"tag":392,"props":2922,"children":2923},{"style":543},[2924],{"type":60,"value":2852},{"type":54,"tag":392,"props":2926,"children":2927},{"style":405},[2928],{"type":60,"value":551},{"type":54,"tag":392,"props":2930,"children":2931},{"style":405},[2932],{"type":60,"value":429},{"type":54,"tag":392,"props":2934,"children":2935},{"style":432},[2936],{"type":60,"value":2937},"allow",{"type":54,"tag":392,"props":2939,"children":2940},{"style":405},[2941],{"type":60,"value":439},{"type":54,"tag":392,"props":2943,"children":2944},{"style":405},[2945],{"type":60,"value":2900},{"type":54,"tag":392,"props":2947,"children":2948},{"class":394,"line":710},[2949],{"type":54,"tag":392,"props":2950,"children":2951},{"style":405},[2952],{"type":60,"value":2953},"        },\n",{"type":54,"tag":392,"props":2955,"children":2956},{"class":394,"line":718},[2957],{"type":54,"tag":392,"props":2958,"children":2959},{"style":405},[2960],{"type":60,"value":1892},{"type":54,"tag":392,"props":2962,"children":2963},{"class":394,"line":831},[2964,2968,2972],{"type":54,"tag":392,"props":2965,"children":2966},{"style":405},[2967],{"type":60,"value":1228},{"type":54,"tag":392,"props":2969,"children":2970},{"style":411},[2971],{"type":60,"value":99},{"type":54,"tag":392,"props":2973,"children":2974},{"style":405},[2975],{"type":60,"value":444},{"type":54,"tag":63,"props":2977,"children":2978},{},[2979,2984,2986,2992,2994,3000,3001,3006,3007],{"type":54,"tag":84,"props":2980,"children":2981},{},[2982],{"type":60,"value":2983},"Input fields:",{"type":60,"value":2985}," ",{"type":54,"tag":92,"props":2987,"children":2989},{"className":2988},[],[2990],{"type":60,"value":2991},"timestamp",{"type":60,"value":2993},", ",{"type":54,"tag":92,"props":2995,"children":2997},{"className":2996},[],[2998],{"type":60,"value":2999},"cwd",{"type":60,"value":2993},{"type":54,"tag":92,"props":3002,"children":3004},{"className":3003},[],[3005],{"type":60,"value":2826},{"type":60,"value":2993},{"type":54,"tag":92,"props":3008,"children":3010},{"className":3009},[],[3011],{"type":60,"value":3012},"toolArgs",{"type":54,"tag":63,"props":3014,"children":3015},{},[3016],{"type":54,"tag":84,"props":3017,"children":3018},{},[3019],{"type":60,"value":3020},"Output fields:",{"type":54,"tag":127,"props":3022,"children":3023},{},[3024,3044],{"type":54,"tag":131,"props":3025,"children":3026},{},[3027],{"type":54,"tag":135,"props":3028,"children":3029},{},[3030,3035,3040],{"type":54,"tag":139,"props":3031,"children":3032},{},[3033],{"type":60,"value":3034},"Field",{"type":54,"tag":139,"props":3036,"children":3037},{},[3038],{"type":60,"value":3039},"Type",{"type":54,"tag":139,"props":3041,"children":3042},{},[3043],{"type":60,"value":308},{"type":54,"tag":155,"props":3045,"children":3046},{},[3047,3088,3109,3130,3151],{"type":54,"tag":135,"props":3048,"children":3049},{},[3050,3059,3083],{"type":54,"tag":162,"props":3051,"children":3052},{},[3053],{"type":54,"tag":92,"props":3054,"children":3056},{"className":3055},[],[3057],{"type":60,"value":3058},"permissionDecision",{"type":54,"tag":162,"props":3060,"children":3061},{},[3062,3068,3070,3076,3077],{"type":54,"tag":92,"props":3063,"children":3065},{"className":3064},[],[3066],{"type":60,"value":3067},"\"allow\"",{"type":60,"value":3069}," | ",{"type":54,"tag":92,"props":3071,"children":3073},{"className":3072},[],[3074],{"type":60,"value":3075},"\"deny\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":3078,"children":3080},{"className":3079},[],[3081],{"type":60,"value":3082},"\"ask\"",{"type":54,"tag":162,"props":3084,"children":3085},{},[3086],{"type":60,"value":3087},"Whether to allow the tool call",{"type":54,"tag":135,"props":3089,"children":3090},{},[3091,3100,3104],{"type":54,"tag":162,"props":3092,"children":3093},{},[3094],{"type":54,"tag":92,"props":3095,"children":3097},{"className":3096},[],[3098],{"type":60,"value":3099},"permissionDecisionReason",{"type":54,"tag":162,"props":3101,"children":3102},{},[3103],{"type":60,"value":1806},{"type":54,"tag":162,"props":3105,"children":3106},{},[3107],{"type":60,"value":3108},"Explanation for deny\u002Fask",{"type":54,"tag":135,"props":3110,"children":3111},{},[3112,3121,3125],{"type":54,"tag":162,"props":3113,"children":3114},{},[3115],{"type":54,"tag":92,"props":3116,"children":3118},{"className":3117},[],[3119],{"type":60,"value":3120},"modifiedArgs",{"type":54,"tag":162,"props":3122,"children":3123},{},[3124],{"type":60,"value":1751},{"type":54,"tag":162,"props":3126,"children":3127},{},[3128],{"type":60,"value":3129},"Modified arguments to pass",{"type":54,"tag":135,"props":3131,"children":3132},{},[3133,3142,3146],{"type":54,"tag":162,"props":3134,"children":3135},{},[3136],{"type":54,"tag":92,"props":3137,"children":3139},{"className":3138},[],[3140],{"type":60,"value":3141},"additionalContext",{"type":54,"tag":162,"props":3143,"children":3144},{},[3145],{"type":60,"value":1806},{"type":54,"tag":162,"props":3147,"children":3148},{},[3149],{"type":60,"value":3150},"Extra context for conversation",{"type":54,"tag":135,"props":3152,"children":3153},{},[3154,3163,3168],{"type":54,"tag":162,"props":3155,"children":3156},{},[3157],{"type":54,"tag":92,"props":3158,"children":3160},{"className":3159},[],[3161],{"type":60,"value":3162},"suppressOutput",{"type":54,"tag":162,"props":3164,"children":3165},{},[3166],{"type":60,"value":3167},"boolean",{"type":54,"tag":162,"props":3169,"children":3170},{},[3171],{"type":60,"value":3172},"Hide tool output from conversation",{"type":54,"tag":377,"props":3174,"children":3176},{"id":3175},"post-tool-use-hook",[3177],{"type":60,"value":3178},"Post-Tool Use Hook",{"type":54,"tag":63,"props":3180,"children":3181},{},[3182],{"type":60,"value":3183},"Transform results, redact sensitive data, or log tool activity after execution.",{"type":54,"tag":271,"props":3185,"children":3187},{"className":385,"code":3186,"language":21,"meta":279,"style":279},"hooks: {\n    onPostToolUse: async (input) => {\n        \u002F\u002F Redact sensitive data from results\n        if (typeof input.toolResult === \"string\") {\n            let redacted = input.toolResult;\n            for (const pattern of SENSITIVE_PATTERNS) {\n                redacted = redacted.replace(pattern, \"[REDACTED]\");\n            }\n            if (redacted !== input.toolResult) {\n                return { modifiedResult: redacted };\n            }\n        }\n        return null; \u002F\u002F Pass through unchanged\n    },\n}\n",[3188],{"type":54,"tag":92,"props":3189,"children":3190},{"__ignoreMap":279},[3191,3207,3243,3252,3309,3343,3382,3441,3448,3489,3517,3524,3532,3550,3557],{"type":54,"tag":392,"props":3192,"children":3193},{"class":394,"line":395},[3194,3199,3203],{"type":54,"tag":392,"props":3195,"children":3197},{"style":3196},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[3198],{"type":60,"value":2477},{"type":54,"tag":392,"props":3200,"children":3201},{"style":405},[3202],{"type":60,"value":551},{"type":54,"tag":392,"props":3204,"children":3205},{"style":405},[3206],{"type":60,"value":1161},{"type":54,"tag":392,"props":3208,"children":3209},{"class":394,"line":447},[3210,3215,3219,3223,3227,3231,3235,3239],{"type":54,"tag":392,"props":3211,"children":3212},{"style":3196},[3213],{"type":60,"value":3214},"    onPostToolUse",{"type":54,"tag":392,"props":3216,"children":3217},{"style":405},[3218],{"type":60,"value":551},{"type":54,"tag":392,"props":3220,"children":3221},{"style":461},[3222],{"type":60,"value":1909},{"type":54,"tag":392,"props":3224,"children":3225},{"style":405},[3226],{"type":60,"value":1141},{"type":54,"tag":392,"props":3228,"children":3229},{"style":1144},[3230],{"type":60,"value":2741},{"type":54,"tag":392,"props":3232,"children":3233},{"style":405},[3234],{"type":60,"value":99},{"type":54,"tag":392,"props":3236,"children":3237},{"style":461},[3238],{"type":60,"value":1156},{"type":54,"tag":392,"props":3240,"children":3241},{"style":405},[3242],{"type":60,"value":1161},{"type":54,"tag":392,"props":3244,"children":3245},{"class":394,"line":457},[3246],{"type":54,"tag":392,"props":3247,"children":3249},{"style":3248},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[3250],{"type":60,"value":3251},"        \u002F\u002F Redact sensitive data from results\n",{"type":54,"tag":392,"props":3253,"children":3254},{"class":394,"line":496},[3255,3260,3264,3269,3274,3278,3283,3288,3292,3296,3300,3305],{"type":54,"tag":392,"props":3256,"children":3257},{"style":399},[3258],{"type":60,"value":3259},"        if",{"type":54,"tag":392,"props":3261,"children":3262},{"style":543},[3263],{"type":60,"value":1141},{"type":54,"tag":392,"props":3265,"children":3266},{"style":405},[3267],{"type":60,"value":3268},"typeof",{"type":54,"tag":392,"props":3270,"children":3271},{"style":411},[3272],{"type":60,"value":3273}," input",{"type":54,"tag":392,"props":3275,"children":3276},{"style":405},[3277],{"type":60,"value":525},{"type":54,"tag":392,"props":3279,"children":3280},{"style":411},[3281],{"type":60,"value":3282},"toolResult",{"type":54,"tag":392,"props":3284,"children":3285},{"style":405},[3286],{"type":60,"value":3287}," ===",{"type":54,"tag":392,"props":3289,"children":3290},{"style":405},[3291],{"type":60,"value":429},{"type":54,"tag":392,"props":3293,"children":3294},{"style":432},[3295],{"type":60,"value":1806},{"type":54,"tag":392,"props":3297,"children":3298},{"style":405},[3299],{"type":60,"value":439},{"type":54,"tag":392,"props":3301,"children":3302},{"style":543},[3303],{"type":60,"value":3304},") ",{"type":54,"tag":392,"props":3306,"children":3307},{"style":405},[3308],{"type":60,"value":2065},{"type":54,"tag":392,"props":3310,"children":3311},{"class":394,"line":579},[3312,3317,3322,3327,3331,3335,3339],{"type":54,"tag":392,"props":3313,"children":3314},{"style":461},[3315],{"type":60,"value":3316},"            let",{"type":54,"tag":392,"props":3318,"children":3319},{"style":411},[3320],{"type":60,"value":3321}," redacted",{"type":54,"tag":392,"props":3323,"children":3324},{"style":405},[3325],{"type":60,"value":3326}," =",{"type":54,"tag":392,"props":3328,"children":3329},{"style":411},[3330],{"type":60,"value":3273},{"type":54,"tag":392,"props":3332,"children":3333},{"style":405},[3334],{"type":60,"value":525},{"type":54,"tag":392,"props":3336,"children":3337},{"style":411},[3338],{"type":60,"value":3282},{"type":54,"tag":392,"props":3340,"children":3341},{"style":405},[3342],{"type":60,"value":444},{"type":54,"tag":392,"props":3344,"children":3345},{"class":394,"line":587},[3346,3351,3355,3359,3364,3369,3374,3378],{"type":54,"tag":392,"props":3347,"children":3348},{"style":399},[3349],{"type":60,"value":3350},"            for",{"type":54,"tag":392,"props":3352,"children":3353},{"style":543},[3354],{"type":60,"value":1141},{"type":54,"tag":392,"props":3356,"children":3357},{"style":461},[3358],{"type":60,"value":464},{"type":54,"tag":392,"props":3360,"children":3361},{"style":411},[3362],{"type":60,"value":3363}," pattern",{"type":54,"tag":392,"props":3365,"children":3366},{"style":405},[3367],{"type":60,"value":3368}," of",{"type":54,"tag":392,"props":3370,"children":3371},{"style":411},[3372],{"type":60,"value":3373}," SENSITIVE_PATTERNS",{"type":54,"tag":392,"props":3375,"children":3376},{"style":543},[3377],{"type":60,"value":3304},{"type":54,"tag":392,"props":3379,"children":3380},{"style":405},[3381],{"type":60,"value":2065},{"type":54,"tag":392,"props":3383,"children":3384},{"class":394,"line":664},[3385,3390,3394,3398,3402,3407,3411,3416,3420,3424,3429,3433,3437],{"type":54,"tag":392,"props":3386,"children":3387},{"style":411},[3388],{"type":60,"value":3389},"                redacted",{"type":54,"tag":392,"props":3391,"children":3392},{"style":405},[3393],{"type":60,"value":3326},{"type":54,"tag":392,"props":3395,"children":3396},{"style":411},[3397],{"type":60,"value":3321},{"type":54,"tag":392,"props":3399,"children":3400},{"style":405},[3401],{"type":60,"value":525},{"type":54,"tag":392,"props":3403,"children":3404},{"style":482},[3405],{"type":60,"value":3406},"replace",{"type":54,"tag":392,"props":3408,"children":3409},{"style":543},[3410],{"type":60,"value":535},{"type":54,"tag":392,"props":3412,"children":3413},{"style":411},[3414],{"type":60,"value":3415},"pattern",{"type":54,"tag":392,"props":3417,"children":3418},{"style":405},[3419],{"type":60,"value":1064},{"type":54,"tag":392,"props":3421,"children":3422},{"style":405},[3423],{"type":60,"value":429},{"type":54,"tag":392,"props":3425,"children":3426},{"style":432},[3427],{"type":60,"value":3428},"[REDACTED]",{"type":54,"tag":392,"props":3430,"children":3431},{"style":405},[3432],{"type":60,"value":439},{"type":54,"tag":392,"props":3434,"children":3435},{"style":543},[3436],{"type":60,"value":99},{"type":54,"tag":392,"props":3438,"children":3439},{"style":405},[3440],{"type":60,"value":444},{"type":54,"tag":392,"props":3442,"children":3443},{"class":394,"line":710},[3444],{"type":54,"tag":392,"props":3445,"children":3446},{"style":405},[3447],{"type":60,"value":2908},{"type":54,"tag":392,"props":3449,"children":3450},{"class":394,"line":718},[3451,3455,3459,3464,3469,3473,3477,3481,3485],{"type":54,"tag":392,"props":3452,"children":3453},{"style":399},[3454],{"type":60,"value":2761},{"type":54,"tag":392,"props":3456,"children":3457},{"style":543},[3458],{"type":60,"value":1141},{"type":54,"tag":392,"props":3460,"children":3461},{"style":411},[3462],{"type":60,"value":3463},"redacted",{"type":54,"tag":392,"props":3465,"children":3466},{"style":405},[3467],{"type":60,"value":3468}," !==",{"type":54,"tag":392,"props":3470,"children":3471},{"style":411},[3472],{"type":60,"value":3273},{"type":54,"tag":392,"props":3474,"children":3475},{"style":405},[3476],{"type":60,"value":525},{"type":54,"tag":392,"props":3478,"children":3479},{"style":411},[3480],{"type":60,"value":3282},{"type":54,"tag":392,"props":3482,"children":3483},{"style":543},[3484],{"type":60,"value":3304},{"type":54,"tag":392,"props":3486,"children":3487},{"style":405},[3488],{"type":60,"value":2065},{"type":54,"tag":392,"props":3490,"children":3491},{"class":394,"line":831},[3492,3496,3500,3505,3509,3513],{"type":54,"tag":392,"props":3493,"children":3494},{"style":399},[3495],{"type":60,"value":2843},{"type":54,"tag":392,"props":3497,"children":3498},{"style":405},[3499],{"type":60,"value":408},{"type":54,"tag":392,"props":3501,"children":3502},{"style":543},[3503],{"type":60,"value":3504}," modifiedResult",{"type":54,"tag":392,"props":3506,"children":3507},{"style":405},[3508],{"type":60,"value":551},{"type":54,"tag":392,"props":3510,"children":3511},{"style":411},[3512],{"type":60,"value":3321},{"type":54,"tag":392,"props":3514,"children":3515},{"style":405},[3516],{"type":60,"value":2900},{"type":54,"tag":392,"props":3518,"children":3519},{"class":394,"line":840},[3520],{"type":54,"tag":392,"props":3521,"children":3522},{"style":405},[3523],{"type":60,"value":2908},{"type":54,"tag":392,"props":3525,"children":3526},{"class":394,"line":848},[3527],{"type":54,"tag":392,"props":3528,"children":3529},{"style":405},[3530],{"type":60,"value":3531},"        }\n",{"type":54,"tag":392,"props":3533,"children":3534},{"class":394,"line":1478},[3535,3540,3545],{"type":54,"tag":392,"props":3536,"children":3537},{"style":399},[3538],{"type":60,"value":3539},"        return",{"type":54,"tag":392,"props":3541,"children":3542},{"style":405},[3543],{"type":60,"value":3544}," null;",{"type":54,"tag":392,"props":3546,"children":3547},{"style":3248},[3548],{"type":60,"value":3549}," \u002F\u002F Pass through unchanged\n",{"type":54,"tag":392,"props":3551,"children":3552},{"class":394,"line":2068},[3553],{"type":54,"tag":392,"props":3554,"children":3555},{"style":405},[3556],{"type":60,"value":1892},{"type":54,"tag":392,"props":3558,"children":3559},{"class":394,"line":2097},[3560],{"type":54,"tag":392,"props":3561,"children":3562},{"style":405},[3563],{"type":60,"value":2265},{"type":54,"tag":63,"props":3565,"children":3566},{},[3567,3571,3572,3578,3579,3584,3585],{"type":54,"tag":84,"props":3568,"children":3569},{},[3570],{"type":60,"value":3020},{"type":60,"value":2985},{"type":54,"tag":92,"props":3573,"children":3575},{"className":3574},[],[3576],{"type":60,"value":3577},"modifiedResult",{"type":60,"value":2993},{"type":54,"tag":92,"props":3580,"children":3582},{"className":3581},[],[3583],{"type":60,"value":3141},{"type":60,"value":2993},{"type":54,"tag":92,"props":3586,"children":3588},{"className":3587},[],[3589],{"type":60,"value":3162},{"type":54,"tag":377,"props":3591,"children":3593},{"id":3592},"user-prompt-submitted-hook",[3594],{"type":60,"value":3595},"User Prompt Submitted Hook",{"type":54,"tag":63,"props":3597,"children":3598},{},[3599],{"type":60,"value":3600},"Modify or enhance user prompts before processing. Useful for prompt templates, context injection, and input validation.",{"type":54,"tag":271,"props":3602,"children":3604},{"className":385,"code":3603,"language":21,"meta":279,"style":279},"hooks: {\n    onUserPromptSubmitted: async (input) => {\n        return {\n            modifiedPrompt: `[User from engineering team] ${input.prompt}`,\n            additionalContext: \"Follow company coding standards.\",\n        };\n    },\n}\n",[3605],{"type":54,"tag":92,"props":3606,"children":3607},{"__ignoreMap":279},[3608,3623,3659,3670,3719,3748,3756,3763],{"type":54,"tag":392,"props":3609,"children":3610},{"class":394,"line":395},[3611,3615,3619],{"type":54,"tag":392,"props":3612,"children":3613},{"style":3196},[3614],{"type":60,"value":2477},{"type":54,"tag":392,"props":3616,"children":3617},{"style":405},[3618],{"type":60,"value":551},{"type":54,"tag":392,"props":3620,"children":3621},{"style":405},[3622],{"type":60,"value":1161},{"type":54,"tag":392,"props":3624,"children":3625},{"class":394,"line":447},[3626,3631,3635,3639,3643,3647,3651,3655],{"type":54,"tag":392,"props":3627,"children":3628},{"style":3196},[3629],{"type":60,"value":3630},"    onUserPromptSubmitted",{"type":54,"tag":392,"props":3632,"children":3633},{"style":405},[3634],{"type":60,"value":551},{"type":54,"tag":392,"props":3636,"children":3637},{"style":461},[3638],{"type":60,"value":1909},{"type":54,"tag":392,"props":3640,"children":3641},{"style":405},[3642],{"type":60,"value":1141},{"type":54,"tag":392,"props":3644,"children":3645},{"style":1144},[3646],{"type":60,"value":2741},{"type":54,"tag":392,"props":3648,"children":3649},{"style":405},[3650],{"type":60,"value":99},{"type":54,"tag":392,"props":3652,"children":3653},{"style":461},[3654],{"type":60,"value":1156},{"type":54,"tag":392,"props":3656,"children":3657},{"style":405},[3658],{"type":60,"value":1161},{"type":54,"tag":392,"props":3660,"children":3661},{"class":394,"line":457},[3662,3666],{"type":54,"tag":392,"props":3663,"children":3664},{"style":399},[3665],{"type":60,"value":3539},{"type":54,"tag":392,"props":3667,"children":3668},{"style":405},[3669],{"type":60,"value":1161},{"type":54,"tag":392,"props":3671,"children":3672},{"class":394,"line":496},[3673,3678,3682,3687,3692,3697,3701,3705,3710,3715],{"type":54,"tag":392,"props":3674,"children":3675},{"style":543},[3676],{"type":60,"value":3677},"            modifiedPrompt",{"type":54,"tag":392,"props":3679,"children":3680},{"style":405},[3681],{"type":60,"value":551},{"type":54,"tag":392,"props":3683,"children":3684},{"style":405},[3685],{"type":60,"value":3686}," `",{"type":54,"tag":392,"props":3688,"children":3689},{"style":432},[3690],{"type":60,"value":3691},"[User from engineering team] ",{"type":54,"tag":392,"props":3693,"children":3694},{"style":405},[3695],{"type":60,"value":3696},"${",{"type":54,"tag":392,"props":3698,"children":3699},{"style":411},[3700],{"type":60,"value":2741},{"type":54,"tag":392,"props":3702,"children":3703},{"style":405},[3704],{"type":60,"value":525},{"type":54,"tag":392,"props":3706,"children":3707},{"style":411},[3708],{"type":60,"value":3709},"prompt",{"type":54,"tag":392,"props":3711,"children":3712},{"style":405},[3713],{"type":60,"value":3714},"}`",{"type":54,"tag":392,"props":3716,"children":3717},{"style":405},[3718],{"type":60,"value":1714},{"type":54,"tag":392,"props":3720,"children":3721},{"class":394,"line":579},[3722,3727,3731,3735,3740,3744],{"type":54,"tag":392,"props":3723,"children":3724},{"style":543},[3725],{"type":60,"value":3726},"            additionalContext",{"type":54,"tag":392,"props":3728,"children":3729},{"style":405},[3730],{"type":60,"value":551},{"type":54,"tag":392,"props":3732,"children":3733},{"style":405},[3734],{"type":60,"value":429},{"type":54,"tag":392,"props":3736,"children":3737},{"style":432},[3738],{"type":60,"value":3739},"Follow company coding standards.",{"type":54,"tag":392,"props":3741,"children":3742},{"style":405},[3743],{"type":60,"value":439},{"type":54,"tag":392,"props":3745,"children":3746},{"style":405},[3747],{"type":60,"value":1714},{"type":54,"tag":392,"props":3749,"children":3750},{"class":394,"line":587},[3751],{"type":54,"tag":392,"props":3752,"children":3753},{"style":405},[3754],{"type":60,"value":3755},"        };\n",{"type":54,"tag":392,"props":3757,"children":3758},{"class":394,"line":664},[3759],{"type":54,"tag":392,"props":3760,"children":3761},{"style":405},[3762],{"type":60,"value":1892},{"type":54,"tag":392,"props":3764,"children":3765},{"class":394,"line":710},[3766],{"type":54,"tag":392,"props":3767,"children":3768},{"style":405},[3769],{"type":60,"value":2265},{"type":54,"tag":63,"props":3771,"children":3772},{},[3773,3777,3778,3784,3785,3790,3791],{"type":54,"tag":84,"props":3774,"children":3775},{},[3776],{"type":60,"value":3020},{"type":60,"value":2985},{"type":54,"tag":92,"props":3779,"children":3781},{"className":3780},[],[3782],{"type":60,"value":3783},"modifiedPrompt",{"type":60,"value":2993},{"type":54,"tag":92,"props":3786,"children":3788},{"className":3787},[],[3789],{"type":60,"value":3141},{"type":60,"value":2993},{"type":54,"tag":92,"props":3792,"children":3794},{"className":3793},[],[3795],{"type":60,"value":3162},{"type":54,"tag":377,"props":3797,"children":3799},{"id":3798},"session-lifecycle-hooks",[3800],{"type":60,"value":3801},"Session Lifecycle Hooks",{"type":54,"tag":271,"props":3803,"children":3805},{"className":385,"code":3804,"language":21,"meta":279,"style":279},"hooks: {\n    onSessionStart: async (input, invocation) => {\n        \u002F\u002F input.source: \"startup\" | \"resume\" | \"new\"\n        console.log(`Session ${invocation.sessionId} started (${input.source})`);\n        return { additionalContext: \"Project uses TypeScript and React.\" };\n    },\n    onSessionEnd: async (input, invocation) => {\n        \u002F\u002F input.reason: \"complete\" | \"error\" | \"abort\" | \"timeout\" | \"user_exit\"\n        await recordMetrics({ sessionId: invocation.sessionId, reason: input.reason });\n        return null;\n    },\n}\n",[3806],{"type":54,"tag":92,"props":3807,"children":3808},{"__ignoreMap":279},[3809,3824,3869,3877,3971,4008,4015,4059,4067,4147,4159,4166],{"type":54,"tag":392,"props":3810,"children":3811},{"class":394,"line":395},[3812,3816,3820],{"type":54,"tag":392,"props":3813,"children":3814},{"style":3196},[3815],{"type":60,"value":2477},{"type":54,"tag":392,"props":3817,"children":3818},{"style":405},[3819],{"type":60,"value":551},{"type":54,"tag":392,"props":3821,"children":3822},{"style":405},[3823],{"type":60,"value":1161},{"type":54,"tag":392,"props":3825,"children":3826},{"class":394,"line":447},[3827,3832,3836,3840,3844,3848,3852,3857,3861,3865],{"type":54,"tag":392,"props":3828,"children":3829},{"style":3196},[3830],{"type":60,"value":3831},"    onSessionStart",{"type":54,"tag":392,"props":3833,"children":3834},{"style":405},[3835],{"type":60,"value":551},{"type":54,"tag":392,"props":3837,"children":3838},{"style":461},[3839],{"type":60,"value":1909},{"type":54,"tag":392,"props":3841,"children":3842},{"style":405},[3843],{"type":60,"value":1141},{"type":54,"tag":392,"props":3845,"children":3846},{"style":1144},[3847],{"type":60,"value":2741},{"type":54,"tag":392,"props":3849,"children":3850},{"style":405},[3851],{"type":60,"value":1064},{"type":54,"tag":392,"props":3853,"children":3854},{"style":1144},[3855],{"type":60,"value":3856}," invocation",{"type":54,"tag":392,"props":3858,"children":3859},{"style":405},[3860],{"type":60,"value":99},{"type":54,"tag":392,"props":3862,"children":3863},{"style":461},[3864],{"type":60,"value":1156},{"type":54,"tag":392,"props":3866,"children":3867},{"style":405},[3868],{"type":60,"value":1161},{"type":54,"tag":392,"props":3870,"children":3871},{"class":394,"line":457},[3872],{"type":54,"tag":392,"props":3873,"children":3874},{"style":3248},[3875],{"type":60,"value":3876},"        \u002F\u002F input.source: \"startup\" | \"resume\" | \"new\"\n",{"type":54,"tag":392,"props":3878,"children":3879},{"class":394,"line":496},[3880,3885,3889,3893,3897,3902,3907,3911,3916,3920,3925,3929,3934,3938,3942,3946,3951,3955,3959,3963,3967],{"type":54,"tag":392,"props":3881,"children":3882},{"style":411},[3883],{"type":60,"value":3884},"        console",{"type":54,"tag":392,"props":3886,"children":3887},{"style":405},[3888],{"type":60,"value":525},{"type":54,"tag":392,"props":3890,"children":3891},{"style":482},[3892],{"type":60,"value":679},{"type":54,"tag":392,"props":3894,"children":3895},{"style":543},[3896],{"type":60,"value":535},{"type":54,"tag":392,"props":3898,"children":3899},{"style":405},[3900],{"type":60,"value":3901},"`",{"type":54,"tag":392,"props":3903,"children":3904},{"style":432},[3905],{"type":60,"value":3906},"Session ",{"type":54,"tag":392,"props":3908,"children":3909},{"style":405},[3910],{"type":60,"value":3696},{"type":54,"tag":392,"props":3912,"children":3913},{"style":411},[3914],{"type":60,"value":3915},"invocation",{"type":54,"tag":392,"props":3917,"children":3918},{"style":405},[3919],{"type":60,"value":525},{"type":54,"tag":392,"props":3921,"children":3922},{"style":411},[3923],{"type":60,"value":3924},"sessionId",{"type":54,"tag":392,"props":3926,"children":3927},{"style":405},[3928],{"type":60,"value":1228},{"type":54,"tag":392,"props":3930,"children":3931},{"style":432},[3932],{"type":60,"value":3933}," started (",{"type":54,"tag":392,"props":3935,"children":3936},{"style":405},[3937],{"type":60,"value":3696},{"type":54,"tag":392,"props":3939,"children":3940},{"style":411},[3941],{"type":60,"value":2741},{"type":54,"tag":392,"props":3943,"children":3944},{"style":405},[3945],{"type":60,"value":525},{"type":54,"tag":392,"props":3947,"children":3948},{"style":411},[3949],{"type":60,"value":3950},"source",{"type":54,"tag":392,"props":3952,"children":3953},{"style":405},[3954],{"type":60,"value":1228},{"type":54,"tag":392,"props":3956,"children":3957},{"style":432},[3958],{"type":60,"value":99},{"type":54,"tag":392,"props":3960,"children":3961},{"style":405},[3962],{"type":60,"value":3901},{"type":54,"tag":392,"props":3964,"children":3965},{"style":543},[3966],{"type":60,"value":99},{"type":54,"tag":392,"props":3968,"children":3969},{"style":405},[3970],{"type":60,"value":444},{"type":54,"tag":392,"props":3972,"children":3973},{"class":394,"line":579},[3974,3978,3982,3987,3991,3995,4000,4004],{"type":54,"tag":392,"props":3975,"children":3976},{"style":399},[3977],{"type":60,"value":3539},{"type":54,"tag":392,"props":3979,"children":3980},{"style":405},[3981],{"type":60,"value":408},{"type":54,"tag":392,"props":3983,"children":3984},{"style":543},[3985],{"type":60,"value":3986}," additionalContext",{"type":54,"tag":392,"props":3988,"children":3989},{"style":405},[3990],{"type":60,"value":551},{"type":54,"tag":392,"props":3992,"children":3993},{"style":405},[3994],{"type":60,"value":429},{"type":54,"tag":392,"props":3996,"children":3997},{"style":432},[3998],{"type":60,"value":3999},"Project uses TypeScript and React.",{"type":54,"tag":392,"props":4001,"children":4002},{"style":405},[4003],{"type":60,"value":439},{"type":54,"tag":392,"props":4005,"children":4006},{"style":405},[4007],{"type":60,"value":2900},{"type":54,"tag":392,"props":4009,"children":4010},{"class":394,"line":587},[4011],{"type":54,"tag":392,"props":4012,"children":4013},{"style":405},[4014],{"type":60,"value":1892},{"type":54,"tag":392,"props":4016,"children":4017},{"class":394,"line":664},[4018,4023,4027,4031,4035,4039,4043,4047,4051,4055],{"type":54,"tag":392,"props":4019,"children":4020},{"style":3196},[4021],{"type":60,"value":4022},"    onSessionEnd",{"type":54,"tag":392,"props":4024,"children":4025},{"style":405},[4026],{"type":60,"value":551},{"type":54,"tag":392,"props":4028,"children":4029},{"style":461},[4030],{"type":60,"value":1909},{"type":54,"tag":392,"props":4032,"children":4033},{"style":405},[4034],{"type":60,"value":1141},{"type":54,"tag":392,"props":4036,"children":4037},{"style":1144},[4038],{"type":60,"value":2741},{"type":54,"tag":392,"props":4040,"children":4041},{"style":405},[4042],{"type":60,"value":1064},{"type":54,"tag":392,"props":4044,"children":4045},{"style":1144},[4046],{"type":60,"value":3856},{"type":54,"tag":392,"props":4048,"children":4049},{"style":405},[4050],{"type":60,"value":99},{"type":54,"tag":392,"props":4052,"children":4053},{"style":461},[4054],{"type":60,"value":1156},{"type":54,"tag":392,"props":4056,"children":4057},{"style":405},[4058],{"type":60,"value":1161},{"type":54,"tag":392,"props":4060,"children":4061},{"class":394,"line":710},[4062],{"type":54,"tag":392,"props":4063,"children":4064},{"style":3248},[4065],{"type":60,"value":4066},"        \u002F\u002F input.reason: \"complete\" | \"error\" | \"abort\" | \"timeout\" | \"user_exit\"\n",{"type":54,"tag":392,"props":4068,"children":4069},{"class":394,"line":718},[4070,4075,4080,4084,4088,4093,4097,4101,4105,4109,4113,4118,4122,4126,4130,4135,4139,4143],{"type":54,"tag":392,"props":4071,"children":4072},{"style":399},[4073],{"type":60,"value":4074},"        await",{"type":54,"tag":392,"props":4076,"children":4077},{"style":482},[4078],{"type":60,"value":4079}," recordMetrics",{"type":54,"tag":392,"props":4081,"children":4082},{"style":543},[4083],{"type":60,"value":535},{"type":54,"tag":392,"props":4085,"children":4086},{"style":405},[4087],{"type":60,"value":540},{"type":54,"tag":392,"props":4089,"children":4090},{"style":543},[4091],{"type":60,"value":4092}," sessionId",{"type":54,"tag":392,"props":4094,"children":4095},{"style":405},[4096],{"type":60,"value":551},{"type":54,"tag":392,"props":4098,"children":4099},{"style":411},[4100],{"type":60,"value":3856},{"type":54,"tag":392,"props":4102,"children":4103},{"style":405},[4104],{"type":60,"value":525},{"type":54,"tag":392,"props":4106,"children":4107},{"style":411},[4108],{"type":60,"value":3924},{"type":54,"tag":392,"props":4110,"children":4111},{"style":405},[4112],{"type":60,"value":1064},{"type":54,"tag":392,"props":4114,"children":4115},{"style":543},[4116],{"type":60,"value":4117}," reason",{"type":54,"tag":392,"props":4119,"children":4120},{"style":405},[4121],{"type":60,"value":551},{"type":54,"tag":392,"props":4123,"children":4124},{"style":411},[4125],{"type":60,"value":3273},{"type":54,"tag":392,"props":4127,"children":4128},{"style":405},[4129],{"type":60,"value":525},{"type":54,"tag":392,"props":4131,"children":4132},{"style":411},[4133],{"type":60,"value":4134},"reason",{"type":54,"tag":392,"props":4136,"children":4137},{"style":405},[4138],{"type":60,"value":419},{"type":54,"tag":392,"props":4140,"children":4141},{"style":543},[4142],{"type":60,"value":99},{"type":54,"tag":392,"props":4144,"children":4145},{"style":405},[4146],{"type":60,"value":444},{"type":54,"tag":392,"props":4148,"children":4149},{"class":394,"line":831},[4150,4154],{"type":54,"tag":392,"props":4151,"children":4152},{"style":399},[4153],{"type":60,"value":3539},{"type":54,"tag":392,"props":4155,"children":4156},{"style":405},[4157],{"type":60,"value":4158}," null;\n",{"type":54,"tag":392,"props":4160,"children":4161},{"class":394,"line":840},[4162],{"type":54,"tag":392,"props":4163,"children":4164},{"style":405},[4165],{"type":60,"value":1892},{"type":54,"tag":392,"props":4167,"children":4168},{"class":394,"line":848},[4169],{"type":54,"tag":392,"props":4170,"children":4171},{"style":405},[4172],{"type":60,"value":2265},{"type":54,"tag":377,"props":4174,"children":4176},{"id":4175},"error-handling-hook",[4177],{"type":60,"value":4178},"Error Handling Hook",{"type":54,"tag":271,"props":4180,"children":4182},{"className":385,"code":4181,"language":21,"meta":279,"style":279},"hooks: {\n    onErrorOccurred: async (input) => {\n        \u002F\u002F input.errorContext: \"model_call\" | \"tool_execution\" | \"system\" | \"user_input\"\n        \u002F\u002F input.recoverable: boolean\n        if (input.errorContext === \"model_call\" && input.error.includes(\"rate\")) {\n            return { errorHandling: \"retry\", retryCount: 3, userNotification: \"Rate limited. Retrying...\" };\n        }\n        return null; \u002F\u002F Default error handling\n    },\n}\n",[4183],{"type":54,"tag":92,"props":4184,"children":4185},{"__ignoreMap":279},[4186,4201,4237,4245,4253,4345,4427,4434,4450,4457],{"type":54,"tag":392,"props":4187,"children":4188},{"class":394,"line":395},[4189,4193,4197],{"type":54,"tag":392,"props":4190,"children":4191},{"style":3196},[4192],{"type":60,"value":2477},{"type":54,"tag":392,"props":4194,"children":4195},{"style":405},[4196],{"type":60,"value":551},{"type":54,"tag":392,"props":4198,"children":4199},{"style":405},[4200],{"type":60,"value":1161},{"type":54,"tag":392,"props":4202,"children":4203},{"class":394,"line":447},[4204,4209,4213,4217,4221,4225,4229,4233],{"type":54,"tag":392,"props":4205,"children":4206},{"style":3196},[4207],{"type":60,"value":4208},"    onErrorOccurred",{"type":54,"tag":392,"props":4210,"children":4211},{"style":405},[4212],{"type":60,"value":551},{"type":54,"tag":392,"props":4214,"children":4215},{"style":461},[4216],{"type":60,"value":1909},{"type":54,"tag":392,"props":4218,"children":4219},{"style":405},[4220],{"type":60,"value":1141},{"type":54,"tag":392,"props":4222,"children":4223},{"style":1144},[4224],{"type":60,"value":2741},{"type":54,"tag":392,"props":4226,"children":4227},{"style":405},[4228],{"type":60,"value":99},{"type":54,"tag":392,"props":4230,"children":4231},{"style":461},[4232],{"type":60,"value":1156},{"type":54,"tag":392,"props":4234,"children":4235},{"style":405},[4236],{"type":60,"value":1161},{"type":54,"tag":392,"props":4238,"children":4239},{"class":394,"line":457},[4240],{"type":54,"tag":392,"props":4241,"children":4242},{"style":3248},[4243],{"type":60,"value":4244},"        \u002F\u002F input.errorContext: \"model_call\" | \"tool_execution\" | \"system\" | \"user_input\"\n",{"type":54,"tag":392,"props":4246,"children":4247},{"class":394,"line":496},[4248],{"type":54,"tag":392,"props":4249,"children":4250},{"style":3248},[4251],{"type":60,"value":4252},"        \u002F\u002F input.recoverable: boolean\n",{"type":54,"tag":392,"props":4254,"children":4255},{"class":394,"line":579},[4256,4260,4264,4268,4272,4277,4281,4285,4290,4294,4299,4303,4307,4312,4316,4320,4324,4328,4333,4337,4341],{"type":54,"tag":392,"props":4257,"children":4258},{"style":399},[4259],{"type":60,"value":3259},{"type":54,"tag":392,"props":4261,"children":4262},{"style":543},[4263],{"type":60,"value":1141},{"type":54,"tag":392,"props":4265,"children":4266},{"style":411},[4267],{"type":60,"value":2741},{"type":54,"tag":392,"props":4269,"children":4270},{"style":405},[4271],{"type":60,"value":525},{"type":54,"tag":392,"props":4273,"children":4274},{"style":411},[4275],{"type":60,"value":4276},"errorContext",{"type":54,"tag":392,"props":4278,"children":4279},{"style":405},[4280],{"type":60,"value":3287},{"type":54,"tag":392,"props":4282,"children":4283},{"style":405},[4284],{"type":60,"value":429},{"type":54,"tag":392,"props":4286,"children":4287},{"style":432},[4288],{"type":60,"value":4289},"model_call",{"type":54,"tag":392,"props":4291,"children":4292},{"style":405},[4293],{"type":60,"value":439},{"type":54,"tag":392,"props":4295,"children":4296},{"style":405},[4297],{"type":60,"value":4298}," &&",{"type":54,"tag":392,"props":4300,"children":4301},{"style":411},[4302],{"type":60,"value":3273},{"type":54,"tag":392,"props":4304,"children":4305},{"style":405},[4306],{"type":60,"value":525},{"type":54,"tag":392,"props":4308,"children":4309},{"style":411},[4310],{"type":60,"value":4311},"error",{"type":54,"tag":392,"props":4313,"children":4314},{"style":405},[4315],{"type":60,"value":525},{"type":54,"tag":392,"props":4317,"children":4318},{"style":482},[4319],{"type":60,"value":2809},{"type":54,"tag":392,"props":4321,"children":4322},{"style":543},[4323],{"type":60,"value":535},{"type":54,"tag":392,"props":4325,"children":4326},{"style":405},[4327],{"type":60,"value":439},{"type":54,"tag":392,"props":4329,"children":4330},{"style":432},[4331],{"type":60,"value":4332},"rate",{"type":54,"tag":392,"props":4334,"children":4335},{"style":405},[4336],{"type":60,"value":439},{"type":54,"tag":392,"props":4338,"children":4339},{"style":543},[4340],{"type":60,"value":2831},{"type":54,"tag":392,"props":4342,"children":4343},{"style":405},[4344],{"type":60,"value":2065},{"type":54,"tag":392,"props":4346,"children":4347},{"class":394,"line":587},[4348,4352,4356,4361,4365,4369,4374,4378,4382,4387,4391,4397,4401,4406,4410,4414,4419,4423],{"type":54,"tag":392,"props":4349,"children":4350},{"style":399},[4351],{"type":60,"value":2916},{"type":54,"tag":392,"props":4353,"children":4354},{"style":405},[4355],{"type":60,"value":408},{"type":54,"tag":392,"props":4357,"children":4358},{"style":543},[4359],{"type":60,"value":4360}," errorHandling",{"type":54,"tag":392,"props":4362,"children":4363},{"style":405},[4364],{"type":60,"value":551},{"type":54,"tag":392,"props":4366,"children":4367},{"style":405},[4368],{"type":60,"value":429},{"type":54,"tag":392,"props":4370,"children":4371},{"style":432},[4372],{"type":60,"value":4373},"retry",{"type":54,"tag":392,"props":4375,"children":4376},{"style":405},[4377],{"type":60,"value":439},{"type":54,"tag":392,"props":4379,"children":4380},{"style":405},[4381],{"type":60,"value":1064},{"type":54,"tag":392,"props":4383,"children":4384},{"style":543},[4385],{"type":60,"value":4386}," retryCount",{"type":54,"tag":392,"props":4388,"children":4389},{"style":405},[4390],{"type":60,"value":551},{"type":54,"tag":392,"props":4392,"children":4394},{"style":4393},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[4395],{"type":60,"value":4396}," 3",{"type":54,"tag":392,"props":4398,"children":4399},{"style":405},[4400],{"type":60,"value":1064},{"type":54,"tag":392,"props":4402,"children":4403},{"style":543},[4404],{"type":60,"value":4405}," userNotification",{"type":54,"tag":392,"props":4407,"children":4408},{"style":405},[4409],{"type":60,"value":551},{"type":54,"tag":392,"props":4411,"children":4412},{"style":405},[4413],{"type":60,"value":429},{"type":54,"tag":392,"props":4415,"children":4416},{"style":432},[4417],{"type":60,"value":4418},"Rate limited. Retrying...",{"type":54,"tag":392,"props":4420,"children":4421},{"style":405},[4422],{"type":60,"value":439},{"type":54,"tag":392,"props":4424,"children":4425},{"style":405},[4426],{"type":60,"value":2900},{"type":54,"tag":392,"props":4428,"children":4429},{"class":394,"line":664},[4430],{"type":54,"tag":392,"props":4431,"children":4432},{"style":405},[4433],{"type":60,"value":3531},{"type":54,"tag":392,"props":4435,"children":4436},{"class":394,"line":710},[4437,4441,4445],{"type":54,"tag":392,"props":4438,"children":4439},{"style":399},[4440],{"type":60,"value":3539},{"type":54,"tag":392,"props":4442,"children":4443},{"style":405},[4444],{"type":60,"value":3544},{"type":54,"tag":392,"props":4446,"children":4447},{"style":3248},[4448],{"type":60,"value":4449}," \u002F\u002F Default error handling\n",{"type":54,"tag":392,"props":4451,"children":4452},{"class":394,"line":718},[4453],{"type":54,"tag":392,"props":4454,"children":4455},{"style":405},[4456],{"type":60,"value":1892},{"type":54,"tag":392,"props":4458,"children":4459},{"class":394,"line":831},[4460],{"type":54,"tag":392,"props":4461,"children":4462},{"style":405},[4463],{"type":60,"value":2265},{"type":54,"tag":63,"props":4465,"children":4466},{},[4467,4471,4472,4477,4478,4484,4485,4491,4492,4498,4499,4505,4507,4513,4514],{"type":54,"tag":84,"props":4468,"children":4469},{},[4470],{"type":60,"value":3020},{"type":60,"value":2985},{"type":54,"tag":92,"props":4473,"children":4475},{"className":4474},[],[4476],{"type":60,"value":3162},{"type":60,"value":2993},{"type":54,"tag":92,"props":4479,"children":4481},{"className":4480},[],[4482],{"type":60,"value":4483},"errorHandling",{"type":60,"value":1141},{"type":54,"tag":92,"props":4486,"children":4488},{"className":4487},[],[4489],{"type":60,"value":4490},"\"retry\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":4493,"children":4495},{"className":4494},[],[4496],{"type":60,"value":4497},"\"skip\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":4500,"children":4502},{"className":4501},[],[4503],{"type":60,"value":4504},"\"abort\"",{"type":60,"value":4506},"), ",{"type":54,"tag":92,"props":4508,"children":4510},{"className":4509},[],[4511],{"type":60,"value":4512},"retryCount",{"type":60,"value":2993},{"type":54,"tag":92,"props":4515,"children":4517},{"className":4516},[],[4518],{"type":60,"value":4519},"userNotification",{"type":54,"tag":377,"props":4521,"children":4523},{"id":4522},"python-hook-example",[4524],{"type":60,"value":4525},"Python Hook Example",{"type":54,"tag":271,"props":4527,"children":4529},{"className":752,"code":4528,"language":24,"meta":279,"style":279},"async def on_pre_tool_use(input_data, invocation):\n    if input_data[\"toolName\"] in [\"shell\", \"bash\"]:\n        return {\"permissionDecision\": \"deny\", \"permissionDecisionReason\": \"Not permitted\"}\n    return {\"permissionDecision\": \"allow\"}\n\nsession = await client.create_session({\n    \"hooks\": {\"on_pre_tool_use\": on_pre_tool_use}\n})\n",[4530],{"type":54,"tag":92,"props":4531,"children":4532},{"__ignoreMap":279},[4533,4541,4549,4557,4565,4572,4580,4588],{"type":54,"tag":392,"props":4534,"children":4535},{"class":394,"line":395},[4536],{"type":54,"tag":392,"props":4537,"children":4538},{},[4539],{"type":60,"value":4540},"async def on_pre_tool_use(input_data, invocation):\n",{"type":54,"tag":392,"props":4542,"children":4543},{"class":394,"line":447},[4544],{"type":54,"tag":392,"props":4545,"children":4546},{},[4547],{"type":60,"value":4548},"    if input_data[\"toolName\"] in [\"shell\", \"bash\"]:\n",{"type":54,"tag":392,"props":4550,"children":4551},{"class":394,"line":457},[4552],{"type":54,"tag":392,"props":4553,"children":4554},{},[4555],{"type":60,"value":4556},"        return {\"permissionDecision\": \"deny\", \"permissionDecisionReason\": \"Not permitted\"}\n",{"type":54,"tag":392,"props":4558,"children":4559},{"class":394,"line":496},[4560],{"type":54,"tag":392,"props":4561,"children":4562},{},[4563],{"type":60,"value":4564},"    return {\"permissionDecision\": \"allow\"}\n",{"type":54,"tag":392,"props":4566,"children":4567},{"class":394,"line":579},[4568],{"type":54,"tag":392,"props":4569,"children":4570},{"emptyLinePlaceholder":451},[4571],{"type":60,"value":454},{"type":54,"tag":392,"props":4573,"children":4574},{"class":394,"line":587},[4575],{"type":54,"tag":392,"props":4576,"children":4577},{},[4578],{"type":60,"value":4579},"session = await client.create_session({\n",{"type":54,"tag":392,"props":4581,"children":4582},{"class":394,"line":664},[4583],{"type":54,"tag":392,"props":4584,"children":4585},{},[4586],{"type":60,"value":4587},"    \"hooks\": {\"on_pre_tool_use\": on_pre_tool_use}\n",{"type":54,"tag":392,"props":4589,"children":4590},{"class":394,"line":710},[4591],{"type":54,"tag":392,"props":4592,"children":4593},{},[4594],{"type":60,"value":2350},{"type":54,"tag":377,"props":4596,"children":4598},{"id":4597},"go-hook-example",[4599],{"type":60,"value":4600},"Go Hook Example",{"type":54,"tag":271,"props":4602,"children":4604},{"className":861,"code":4603,"language":30,"meta":279,"style":279},"session, _ := client.CreateSession(ctx, &copilot.SessionConfig{\n    Hooks: &copilot.SessionHooks{\n        OnPreToolUse: func(input copilot.PreToolUseHookInput, inv copilot.HookInvocation) (*copilot.PreToolUseHookOutput, error) {\n            return &copilot.PreToolUseHookOutput{PermissionDecision: \"allow\"}, nil\n        },\n    },\n})\n",[4605],{"type":54,"tag":92,"props":4606,"children":4607},{"__ignoreMap":279},[4608,4615,4623,4631,4639,4646,4653],{"type":54,"tag":392,"props":4609,"children":4610},{"class":394,"line":395},[4611],{"type":54,"tag":392,"props":4612,"children":4613},{},[4614],{"type":60,"value":2326},{"type":54,"tag":392,"props":4616,"children":4617},{"class":394,"line":447},[4618],{"type":54,"tag":392,"props":4619,"children":4620},{},[4621],{"type":60,"value":4622},"    Hooks: &copilot.SessionHooks{\n",{"type":54,"tag":392,"props":4624,"children":4625},{"class":394,"line":457},[4626],{"type":54,"tag":392,"props":4627,"children":4628},{},[4629],{"type":60,"value":4630},"        OnPreToolUse: func(input copilot.PreToolUseHookInput, inv copilot.HookInvocation) (*copilot.PreToolUseHookOutput, error) {\n",{"type":54,"tag":392,"props":4632,"children":4633},{"class":394,"line":496},[4634],{"type":54,"tag":392,"props":4635,"children":4636},{},[4637],{"type":60,"value":4638},"            return &copilot.PreToolUseHookOutput{PermissionDecision: \"allow\"}, nil\n",{"type":54,"tag":392,"props":4640,"children":4641},{"class":394,"line":579},[4642],{"type":54,"tag":392,"props":4643,"children":4644},{},[4645],{"type":60,"value":2953},{"type":54,"tag":392,"props":4647,"children":4648},{"class":394,"line":587},[4649],{"type":54,"tag":392,"props":4650,"children":4651},{},[4652],{"type":60,"value":1892},{"type":54,"tag":392,"props":4654,"children":4655},{"class":394,"line":664},[4656],{"type":54,"tag":392,"props":4657,"children":4658},{},[4659],{"type":60,"value":2350},{"type":54,"tag":362,"props":4661,"children":4662},{},[],{"type":54,"tag":69,"props":4664,"children":4666},{"id":4665},"mcp-server-integration",[4667],{"type":60,"value":4668},"MCP Server Integration",{"type":54,"tag":63,"props":4670,"children":4671},{},[4672],{"type":60,"value":4673},"Connect to MCP (Model Context Protocol) servers for pre-built tool capabilities.",{"type":54,"tag":377,"props":4675,"children":4677},{"id":4676},"local-stdio-server",[4678],{"type":60,"value":4679},"Local Stdio Server",{"type":54,"tag":271,"props":4681,"children":4683},{"className":385,"code":4682,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    mcpServers: {\n        filesystem: {\n            type: \"local\",\n            command: \"npx\",\n            args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fallowed\u002Fpath\"],\n            tools: [\"*\"],\n            env: { DEBUG: \"true\" },\n            cwd: \".\u002Fservers\",\n            timeout: 30000,\n        },\n    },\n});\n",[4684],{"type":54,"tag":92,"props":4685,"children":4686},{"__ignoreMap":279},[4687,4726,4742,4758,4787,4816,4887,4924,4966,4995,5016,5023,5030],{"type":54,"tag":392,"props":4688,"children":4689},{"class":394,"line":395},[4690,4694,4698,4702,4706,4710,4714,4718,4722],{"type":54,"tag":392,"props":4691,"children":4692},{"style":461},[4693],{"type":60,"value":464},{"type":54,"tag":392,"props":4695,"children":4696},{"style":411},[4697],{"type":60,"value":506},{"type":54,"tag":392,"props":4699,"children":4700},{"style":405},[4701],{"type":60,"value":474},{"type":54,"tag":392,"props":4703,"children":4704},{"style":399},[4705],{"type":60,"value":515},{"type":54,"tag":392,"props":4707,"children":4708},{"style":411},[4709],{"type":60,"value":520},{"type":54,"tag":392,"props":4711,"children":4712},{"style":405},[4713],{"type":60,"value":525},{"type":54,"tag":392,"props":4715,"children":4716},{"style":482},[4717],{"type":60,"value":530},{"type":54,"tag":392,"props":4719,"children":4720},{"style":411},[4721],{"type":60,"value":535},{"type":54,"tag":392,"props":4723,"children":4724},{"style":405},[4725],{"type":60,"value":2065},{"type":54,"tag":392,"props":4727,"children":4728},{"class":394,"line":447},[4729,4734,4738],{"type":54,"tag":392,"props":4730,"children":4731},{"style":543},[4732],{"type":60,"value":4733},"    mcpServers",{"type":54,"tag":392,"props":4735,"children":4736},{"style":405},[4737],{"type":60,"value":551},{"type":54,"tag":392,"props":4739,"children":4740},{"style":405},[4741],{"type":60,"value":1161},{"type":54,"tag":392,"props":4743,"children":4744},{"class":394,"line":457},[4745,4750,4754],{"type":54,"tag":392,"props":4746,"children":4747},{"style":543},[4748],{"type":60,"value":4749},"        filesystem",{"type":54,"tag":392,"props":4751,"children":4752},{"style":405},[4753],{"type":60,"value":551},{"type":54,"tag":392,"props":4755,"children":4756},{"style":405},[4757],{"type":60,"value":1161},{"type":54,"tag":392,"props":4759,"children":4760},{"class":394,"line":496},[4761,4766,4770,4774,4779,4783],{"type":54,"tag":392,"props":4762,"children":4763},{"style":543},[4764],{"type":60,"value":4765},"            type",{"type":54,"tag":392,"props":4767,"children":4768},{"style":405},[4769],{"type":60,"value":551},{"type":54,"tag":392,"props":4771,"children":4772},{"style":405},[4773],{"type":60,"value":429},{"type":54,"tag":392,"props":4775,"children":4776},{"style":432},[4777],{"type":60,"value":4778},"local",{"type":54,"tag":392,"props":4780,"children":4781},{"style":405},[4782],{"type":60,"value":439},{"type":54,"tag":392,"props":4784,"children":4785},{"style":405},[4786],{"type":60,"value":1714},{"type":54,"tag":392,"props":4788,"children":4789},{"class":394,"line":579},[4790,4795,4799,4803,4808,4812],{"type":54,"tag":392,"props":4791,"children":4792},{"style":543},[4793],{"type":60,"value":4794},"            command",{"type":54,"tag":392,"props":4796,"children":4797},{"style":405},[4798],{"type":60,"value":551},{"type":54,"tag":392,"props":4800,"children":4801},{"style":405},[4802],{"type":60,"value":429},{"type":54,"tag":392,"props":4804,"children":4805},{"style":432},[4806],{"type":60,"value":4807},"npx",{"type":54,"tag":392,"props":4809,"children":4810},{"style":405},[4811],{"type":60,"value":439},{"type":54,"tag":392,"props":4813,"children":4814},{"style":405},[4815],{"type":60,"value":1714},{"type":54,"tag":392,"props":4817,"children":4818},{"class":394,"line":587},[4819,4824,4828,4832,4836,4841,4845,4849,4853,4858,4862,4866,4870,4875,4879,4883],{"type":54,"tag":392,"props":4820,"children":4821},{"style":543},[4822],{"type":60,"value":4823},"            args",{"type":54,"tag":392,"props":4825,"children":4826},{"style":405},[4827],{"type":60,"value":551},{"type":54,"tag":392,"props":4829,"children":4830},{"style":411},[4831],{"type":60,"value":1862},{"type":54,"tag":392,"props":4833,"children":4834},{"style":405},[4835],{"type":60,"value":439},{"type":54,"tag":392,"props":4837,"children":4838},{"style":432},[4839],{"type":60,"value":4840},"-y",{"type":54,"tag":392,"props":4842,"children":4843},{"style":405},[4844],{"type":60,"value":439},{"type":54,"tag":392,"props":4846,"children":4847},{"style":405},[4848],{"type":60,"value":1064},{"type":54,"tag":392,"props":4850,"children":4851},{"style":405},[4852],{"type":60,"value":429},{"type":54,"tag":392,"props":4854,"children":4855},{"style":432},[4856],{"type":60,"value":4857},"@modelcontextprotocol\u002Fserver-filesystem",{"type":54,"tag":392,"props":4859,"children":4860},{"style":405},[4861],{"type":60,"value":439},{"type":54,"tag":392,"props":4863,"children":4864},{"style":405},[4865],{"type":60,"value":1064},{"type":54,"tag":392,"props":4867,"children":4868},{"style":405},[4869],{"type":60,"value":429},{"type":54,"tag":392,"props":4871,"children":4872},{"style":432},[4873],{"type":60,"value":4874},"\u002Fallowed\u002Fpath",{"type":54,"tag":392,"props":4876,"children":4877},{"style":405},[4878],{"type":60,"value":439},{"type":54,"tag":392,"props":4880,"children":4881},{"style":411},[4882],{"type":60,"value":1880},{"type":54,"tag":392,"props":4884,"children":4885},{"style":405},[4886],{"type":60,"value":1714},{"type":54,"tag":392,"props":4888,"children":4889},{"class":394,"line":664},[4890,4895,4899,4903,4907,4912,4916,4920],{"type":54,"tag":392,"props":4891,"children":4892},{"style":543},[4893],{"type":60,"value":4894},"            tools",{"type":54,"tag":392,"props":4896,"children":4897},{"style":405},[4898],{"type":60,"value":551},{"type":54,"tag":392,"props":4900,"children":4901},{"style":411},[4902],{"type":60,"value":1862},{"type":54,"tag":392,"props":4904,"children":4905},{"style":405},[4906],{"type":60,"value":439},{"type":54,"tag":392,"props":4908,"children":4909},{"style":432},[4910],{"type":60,"value":4911},"*",{"type":54,"tag":392,"props":4913,"children":4914},{"style":405},[4915],{"type":60,"value":439},{"type":54,"tag":392,"props":4917,"children":4918},{"style":411},[4919],{"type":60,"value":1880},{"type":54,"tag":392,"props":4921,"children":4922},{"style":405},[4923],{"type":60,"value":1714},{"type":54,"tag":392,"props":4925,"children":4926},{"class":394,"line":710},[4927,4932,4936,4940,4945,4949,4953,4958,4962],{"type":54,"tag":392,"props":4928,"children":4929},{"style":543},[4930],{"type":60,"value":4931},"            env",{"type":54,"tag":392,"props":4933,"children":4934},{"style":405},[4935],{"type":60,"value":551},{"type":54,"tag":392,"props":4937,"children":4938},{"style":405},[4939],{"type":60,"value":408},{"type":54,"tag":392,"props":4941,"children":4942},{"style":543},[4943],{"type":60,"value":4944}," DEBUG",{"type":54,"tag":392,"props":4946,"children":4947},{"style":405},[4948],{"type":60,"value":551},{"type":54,"tag":392,"props":4950,"children":4951},{"style":405},[4952],{"type":60,"value":429},{"type":54,"tag":392,"props":4954,"children":4955},{"style":432},[4956],{"type":60,"value":4957},"true",{"type":54,"tag":392,"props":4959,"children":4960},{"style":405},[4961],{"type":60,"value":439},{"type":54,"tag":392,"props":4963,"children":4964},{"style":405},[4965],{"type":60,"value":1845},{"type":54,"tag":392,"props":4967,"children":4968},{"class":394,"line":718},[4969,4974,4978,4982,4987,4991],{"type":54,"tag":392,"props":4970,"children":4971},{"style":543},[4972],{"type":60,"value":4973},"            cwd",{"type":54,"tag":392,"props":4975,"children":4976},{"style":405},[4977],{"type":60,"value":551},{"type":54,"tag":392,"props":4979,"children":4980},{"style":405},[4981],{"type":60,"value":429},{"type":54,"tag":392,"props":4983,"children":4984},{"style":432},[4985],{"type":60,"value":4986},".\u002Fservers",{"type":54,"tag":392,"props":4988,"children":4989},{"style":405},[4990],{"type":60,"value":439},{"type":54,"tag":392,"props":4992,"children":4993},{"style":405},[4994],{"type":60,"value":1714},{"type":54,"tag":392,"props":4996,"children":4997},{"class":394,"line":831},[4998,5003,5007,5012],{"type":54,"tag":392,"props":4999,"children":5000},{"style":543},[5001],{"type":60,"value":5002},"            timeout",{"type":54,"tag":392,"props":5004,"children":5005},{"style":405},[5006],{"type":60,"value":551},{"type":54,"tag":392,"props":5008,"children":5009},{"style":4393},[5010],{"type":60,"value":5011}," 30000",{"type":54,"tag":392,"props":5013,"children":5014},{"style":405},[5015],{"type":60,"value":1714},{"type":54,"tag":392,"props":5017,"children":5018},{"class":394,"line":840},[5019],{"type":54,"tag":392,"props":5020,"children":5021},{"style":405},[5022],{"type":60,"value":2953},{"type":54,"tag":392,"props":5024,"children":5025},{"class":394,"line":848},[5026],{"type":54,"tag":392,"props":5027,"children":5028},{"style":405},[5029],{"type":60,"value":1892},{"type":54,"tag":392,"props":5031,"children":5032},{"class":394,"line":1478},[5033,5037,5041],{"type":54,"tag":392,"props":5034,"children":5035},{"style":405},[5036],{"type":60,"value":1228},{"type":54,"tag":392,"props":5038,"children":5039},{"style":411},[5040],{"type":60,"value":99},{"type":54,"tag":392,"props":5042,"children":5043},{"style":405},[5044],{"type":60,"value":444},{"type":54,"tag":377,"props":5046,"children":5048},{"id":5047},"remote-http-server",[5049],{"type":60,"value":5050},"Remote HTTP Server",{"type":54,"tag":271,"props":5052,"children":5054},{"className":385,"code":5053,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    mcpServers: {\n        github: {\n            type: \"http\",\n            url: \"https:\u002F\u002Fapi.githubcopilot.com\u002Fmcp\u002F\",\n            headers: { Authorization: \"Bearer ${TOKEN}\" },\n            tools: [\"*\"],\n        },\n    },\n});\n",[5055],{"type":54,"tag":92,"props":5056,"children":5057},{"__ignoreMap":279},[5058,5097,5112,5128,5156,5185,5227,5262,5269,5276],{"type":54,"tag":392,"props":5059,"children":5060},{"class":394,"line":395},[5061,5065,5069,5073,5077,5081,5085,5089,5093],{"type":54,"tag":392,"props":5062,"children":5063},{"style":461},[5064],{"type":60,"value":464},{"type":54,"tag":392,"props":5066,"children":5067},{"style":411},[5068],{"type":60,"value":506},{"type":54,"tag":392,"props":5070,"children":5071},{"style":405},[5072],{"type":60,"value":474},{"type":54,"tag":392,"props":5074,"children":5075},{"style":399},[5076],{"type":60,"value":515},{"type":54,"tag":392,"props":5078,"children":5079},{"style":411},[5080],{"type":60,"value":520},{"type":54,"tag":392,"props":5082,"children":5083},{"style":405},[5084],{"type":60,"value":525},{"type":54,"tag":392,"props":5086,"children":5087},{"style":482},[5088],{"type":60,"value":530},{"type":54,"tag":392,"props":5090,"children":5091},{"style":411},[5092],{"type":60,"value":535},{"type":54,"tag":392,"props":5094,"children":5095},{"style":405},[5096],{"type":60,"value":2065},{"type":54,"tag":392,"props":5098,"children":5099},{"class":394,"line":447},[5100,5104,5108],{"type":54,"tag":392,"props":5101,"children":5102},{"style":543},[5103],{"type":60,"value":4733},{"type":54,"tag":392,"props":5105,"children":5106},{"style":405},[5107],{"type":60,"value":551},{"type":54,"tag":392,"props":5109,"children":5110},{"style":405},[5111],{"type":60,"value":1161},{"type":54,"tag":392,"props":5113,"children":5114},{"class":394,"line":457},[5115,5120,5124],{"type":54,"tag":392,"props":5116,"children":5117},{"style":543},[5118],{"type":60,"value":5119},"        github",{"type":54,"tag":392,"props":5121,"children":5122},{"style":405},[5123],{"type":60,"value":551},{"type":54,"tag":392,"props":5125,"children":5126},{"style":405},[5127],{"type":60,"value":1161},{"type":54,"tag":392,"props":5129,"children":5130},{"class":394,"line":496},[5131,5135,5139,5143,5148,5152],{"type":54,"tag":392,"props":5132,"children":5133},{"style":543},[5134],{"type":60,"value":4765},{"type":54,"tag":392,"props":5136,"children":5137},{"style":405},[5138],{"type":60,"value":551},{"type":54,"tag":392,"props":5140,"children":5141},{"style":405},[5142],{"type":60,"value":429},{"type":54,"tag":392,"props":5144,"children":5145},{"style":432},[5146],{"type":60,"value":5147},"http",{"type":54,"tag":392,"props":5149,"children":5150},{"style":405},[5151],{"type":60,"value":439},{"type":54,"tag":392,"props":5153,"children":5154},{"style":405},[5155],{"type":60,"value":1714},{"type":54,"tag":392,"props":5157,"children":5158},{"class":394,"line":579},[5159,5164,5168,5172,5177,5181],{"type":54,"tag":392,"props":5160,"children":5161},{"style":543},[5162],{"type":60,"value":5163},"            url",{"type":54,"tag":392,"props":5165,"children":5166},{"style":405},[5167],{"type":60,"value":551},{"type":54,"tag":392,"props":5169,"children":5170},{"style":405},[5171],{"type":60,"value":429},{"type":54,"tag":392,"props":5173,"children":5174},{"style":432},[5175],{"type":60,"value":5176},"https:\u002F\u002Fapi.githubcopilot.com\u002Fmcp\u002F",{"type":54,"tag":392,"props":5178,"children":5179},{"style":405},[5180],{"type":60,"value":439},{"type":54,"tag":392,"props":5182,"children":5183},{"style":405},[5184],{"type":60,"value":1714},{"type":54,"tag":392,"props":5186,"children":5187},{"class":394,"line":587},[5188,5193,5197,5201,5206,5210,5214,5219,5223],{"type":54,"tag":392,"props":5189,"children":5190},{"style":543},[5191],{"type":60,"value":5192},"            headers",{"type":54,"tag":392,"props":5194,"children":5195},{"style":405},[5196],{"type":60,"value":551},{"type":54,"tag":392,"props":5198,"children":5199},{"style":405},[5200],{"type":60,"value":408},{"type":54,"tag":392,"props":5202,"children":5203},{"style":543},[5204],{"type":60,"value":5205}," Authorization",{"type":54,"tag":392,"props":5207,"children":5208},{"style":405},[5209],{"type":60,"value":551},{"type":54,"tag":392,"props":5211,"children":5212},{"style":405},[5213],{"type":60,"value":429},{"type":54,"tag":392,"props":5215,"children":5216},{"style":432},[5217],{"type":60,"value":5218},"Bearer ${TOKEN}",{"type":54,"tag":392,"props":5220,"children":5221},{"style":405},[5222],{"type":60,"value":439},{"type":54,"tag":392,"props":5224,"children":5225},{"style":405},[5226],{"type":60,"value":1845},{"type":54,"tag":392,"props":5228,"children":5229},{"class":394,"line":664},[5230,5234,5238,5242,5246,5250,5254,5258],{"type":54,"tag":392,"props":5231,"children":5232},{"style":543},[5233],{"type":60,"value":4894},{"type":54,"tag":392,"props":5235,"children":5236},{"style":405},[5237],{"type":60,"value":551},{"type":54,"tag":392,"props":5239,"children":5240},{"style":411},[5241],{"type":60,"value":1862},{"type":54,"tag":392,"props":5243,"children":5244},{"style":405},[5245],{"type":60,"value":439},{"type":54,"tag":392,"props":5247,"children":5248},{"style":432},[5249],{"type":60,"value":4911},{"type":54,"tag":392,"props":5251,"children":5252},{"style":405},[5253],{"type":60,"value":439},{"type":54,"tag":392,"props":5255,"children":5256},{"style":411},[5257],{"type":60,"value":1880},{"type":54,"tag":392,"props":5259,"children":5260},{"style":405},[5261],{"type":60,"value":1714},{"type":54,"tag":392,"props":5263,"children":5264},{"class":394,"line":710},[5265],{"type":54,"tag":392,"props":5266,"children":5267},{"style":405},[5268],{"type":60,"value":2953},{"type":54,"tag":392,"props":5270,"children":5271},{"class":394,"line":718},[5272],{"type":54,"tag":392,"props":5273,"children":5274},{"style":405},[5275],{"type":60,"value":1892},{"type":54,"tag":392,"props":5277,"children":5278},{"class":394,"line":831},[5279,5283,5287],{"type":54,"tag":392,"props":5280,"children":5281},{"style":405},[5282],{"type":60,"value":1228},{"type":54,"tag":392,"props":5284,"children":5285},{"style":411},[5286],{"type":60,"value":99},{"type":54,"tag":392,"props":5288,"children":5289},{"style":405},[5290],{"type":60,"value":444},{"type":54,"tag":377,"props":5292,"children":5294},{"id":5293},"mcp-config-fields",[5295],{"type":60,"value":5296},"MCP Config Fields",{"type":54,"tag":63,"props":5298,"children":5299},{},[5300],{"type":54,"tag":84,"props":5301,"children":5302},{},[5303],{"type":60,"value":5304},"Local\u002FStdio:",{"type":54,"tag":127,"props":5306,"children":5307},{},[5308,5331],{"type":54,"tag":131,"props":5309,"children":5310},{},[5311],{"type":54,"tag":135,"props":5312,"children":5313},{},[5314,5318,5322,5327],{"type":54,"tag":139,"props":5315,"children":5316},{},[5317],{"type":60,"value":3034},{"type":54,"tag":139,"props":5319,"children":5320},{},[5321],{"type":60,"value":3039},{"type":54,"tag":139,"props":5323,"children":5324},{},[5325],{"type":60,"value":5326},"Required",{"type":54,"tag":139,"props":5328,"children":5329},{},[5330],{"type":60,"value":308},{"type":54,"tag":155,"props":5332,"children":5333},{},[5334,5365,5391,5419,5444,5468,5510],{"type":54,"tag":135,"props":5335,"children":5336},{},[5337,5346,5355,5360],{"type":54,"tag":162,"props":5338,"children":5339},{},[5340],{"type":54,"tag":92,"props":5341,"children":5343},{"className":5342},[],[5344],{"type":60,"value":5345},"type",{"type":54,"tag":162,"props":5347,"children":5348},{},[5349],{"type":54,"tag":92,"props":5350,"children":5352},{"className":5351},[],[5353],{"type":60,"value":5354},"\"local\"",{"type":54,"tag":162,"props":5356,"children":5357},{},[5358],{"type":60,"value":5359},"No",{"type":54,"tag":162,"props":5361,"children":5362},{},[5363],{"type":60,"value":5364},"Defaults to local",{"type":54,"tag":135,"props":5366,"children":5367},{},[5368,5377,5381,5386],{"type":54,"tag":162,"props":5369,"children":5370},{},[5371],{"type":54,"tag":92,"props":5372,"children":5374},{"className":5373},[],[5375],{"type":60,"value":5376},"command",{"type":54,"tag":162,"props":5378,"children":5379},{},[5380],{"type":60,"value":1806},{"type":54,"tag":162,"props":5382,"children":5383},{},[5384],{"type":60,"value":5385},"Yes",{"type":54,"tag":162,"props":5387,"children":5388},{},[5389],{"type":60,"value":5390},"Executable path",{"type":54,"tag":135,"props":5392,"children":5393},{},[5394,5403,5410,5414],{"type":54,"tag":162,"props":5395,"children":5396},{},[5397],{"type":54,"tag":92,"props":5398,"children":5400},{"className":5399},[],[5401],{"type":60,"value":5402},"args",{"type":54,"tag":162,"props":5404,"children":5405},{},[5406,5407],{"type":60,"value":1806},{"type":54,"tag":392,"props":5408,"children":5409},{},[],{"type":54,"tag":162,"props":5411,"children":5412},{},[5413],{"type":60,"value":5385},{"type":54,"tag":162,"props":5415,"children":5416},{},[5417],{"type":60,"value":5418},"Command arguments",{"type":54,"tag":135,"props":5420,"children":5421},{},[5422,5431,5435,5439],{"type":54,"tag":162,"props":5423,"children":5424},{},[5425],{"type":54,"tag":92,"props":5426,"children":5428},{"className":5427},[],[5429],{"type":60,"value":5430},"env",{"type":54,"tag":162,"props":5432,"children":5433},{},[5434],{"type":60,"value":1751},{"type":54,"tag":162,"props":5436,"children":5437},{},[5438],{"type":60,"value":5359},{"type":54,"tag":162,"props":5440,"children":5441},{},[5442],{"type":60,"value":5443},"Environment variables",{"type":54,"tag":135,"props":5445,"children":5446},{},[5447,5455,5459,5463],{"type":54,"tag":162,"props":5448,"children":5449},{},[5450],{"type":54,"tag":92,"props":5451,"children":5453},{"className":5452},[],[5454],{"type":60,"value":2999},{"type":54,"tag":162,"props":5456,"children":5457},{},[5458],{"type":60,"value":1806},{"type":54,"tag":162,"props":5460,"children":5461},{},[5462],{"type":60,"value":5359},{"type":54,"tag":162,"props":5464,"children":5465},{},[5466],{"type":60,"value":5467},"Working directory",{"type":54,"tag":135,"props":5469,"children":5470},{},[5471,5480,5487,5491],{"type":54,"tag":162,"props":5472,"children":5473},{},[5474],{"type":54,"tag":92,"props":5475,"children":5477},{"className":5476},[],[5478],{"type":60,"value":5479},"tools",{"type":54,"tag":162,"props":5481,"children":5482},{},[5483,5484],{"type":60,"value":1806},{"type":54,"tag":392,"props":5485,"children":5486},{},[],{"type":54,"tag":162,"props":5488,"children":5489},{},[5490],{"type":60,"value":5359},{"type":54,"tag":162,"props":5492,"children":5493},{},[5494,5500,5502,5508],{"type":54,"tag":92,"props":5495,"children":5497},{"className":5496},[],[5498],{"type":60,"value":5499},"[\"*\"]",{"type":60,"value":5501}," for all, ",{"type":54,"tag":92,"props":5503,"children":5505},{"className":5504},[],[5506],{"type":60,"value":5507},"[]",{"type":60,"value":5509}," for none",{"type":54,"tag":135,"props":5511,"children":5512},{},[5513,5522,5527,5531],{"type":54,"tag":162,"props":5514,"children":5515},{},[5516],{"type":54,"tag":92,"props":5517,"children":5519},{"className":5518},[],[5520],{"type":60,"value":5521},"timeout",{"type":54,"tag":162,"props":5523,"children":5524},{},[5525],{"type":60,"value":5526},"number",{"type":54,"tag":162,"props":5528,"children":5529},{},[5530],{"type":60,"value":5359},{"type":54,"tag":162,"props":5532,"children":5533},{},[5534],{"type":60,"value":5535},"Timeout in milliseconds",{"type":54,"tag":63,"props":5537,"children":5538},{},[5539],{"type":54,"tag":84,"props":5540,"children":5541},{},[5542],{"type":60,"value":5543},"Remote HTTP:",{"type":54,"tag":127,"props":5545,"children":5546},{},[5547,5569],{"type":54,"tag":131,"props":5548,"children":5549},{},[5550],{"type":54,"tag":135,"props":5551,"children":5552},{},[5553,5557,5561,5565],{"type":54,"tag":139,"props":5554,"children":5555},{},[5556],{"type":60,"value":3034},{"type":54,"tag":139,"props":5558,"children":5559},{},[5560],{"type":60,"value":3039},{"type":54,"tag":139,"props":5562,"children":5563},{},[5564],{"type":60,"value":5326},{"type":54,"tag":139,"props":5566,"children":5567},{},[5568],{"type":60,"value":308},{"type":54,"tag":155,"props":5570,"children":5571},{},[5572,5601,5626,5651,5678],{"type":54,"tag":135,"props":5573,"children":5574},{},[5575,5583,5592,5596],{"type":54,"tag":162,"props":5576,"children":5577},{},[5578],{"type":54,"tag":92,"props":5579,"children":5581},{"className":5580},[],[5582],{"type":60,"value":5345},{"type":54,"tag":162,"props":5584,"children":5585},{},[5586],{"type":54,"tag":92,"props":5587,"children":5589},{"className":5588},[],[5590],{"type":60,"value":5591},"\"http\"",{"type":54,"tag":162,"props":5593,"children":5594},{},[5595],{"type":60,"value":5385},{"type":54,"tag":162,"props":5597,"children":5598},{},[5599],{"type":60,"value":5600},"Server type",{"type":54,"tag":135,"props":5602,"children":5603},{},[5604,5613,5617,5621],{"type":54,"tag":162,"props":5605,"children":5606},{},[5607],{"type":54,"tag":92,"props":5608,"children":5610},{"className":5609},[],[5611],{"type":60,"value":5612},"url",{"type":54,"tag":162,"props":5614,"children":5615},{},[5616],{"type":60,"value":1806},{"type":54,"tag":162,"props":5618,"children":5619},{},[5620],{"type":60,"value":5385},{"type":54,"tag":162,"props":5622,"children":5623},{},[5624],{"type":60,"value":5625},"Server URL",{"type":54,"tag":135,"props":5627,"children":5628},{},[5629,5638,5642,5646],{"type":54,"tag":162,"props":5630,"children":5631},{},[5632],{"type":54,"tag":92,"props":5633,"children":5635},{"className":5634},[],[5636],{"type":60,"value":5637},"headers",{"type":54,"tag":162,"props":5639,"children":5640},{},[5641],{"type":60,"value":1751},{"type":54,"tag":162,"props":5643,"children":5644},{},[5645],{"type":60,"value":5359},{"type":54,"tag":162,"props":5647,"children":5648},{},[5649],{"type":60,"value":5650},"HTTP headers",{"type":54,"tag":135,"props":5652,"children":5653},{},[5654,5662,5669,5673],{"type":54,"tag":162,"props":5655,"children":5656},{},[5657],{"type":54,"tag":92,"props":5658,"children":5660},{"className":5659},[],[5661],{"type":60,"value":5479},{"type":54,"tag":162,"props":5663,"children":5664},{},[5665,5666],{"type":60,"value":1806},{"type":54,"tag":392,"props":5667,"children":5668},{},[],{"type":54,"tag":162,"props":5670,"children":5671},{},[5672],{"type":60,"value":5359},{"type":54,"tag":162,"props":5674,"children":5675},{},[5676],{"type":60,"value":5677},"Tool filter",{"type":54,"tag":135,"props":5679,"children":5680},{},[5681,5689,5693,5697],{"type":54,"tag":162,"props":5682,"children":5683},{},[5684],{"type":54,"tag":92,"props":5685,"children":5687},{"className":5686},[],[5688],{"type":60,"value":5521},{"type":54,"tag":162,"props":5690,"children":5691},{},[5692],{"type":60,"value":5526},{"type":54,"tag":162,"props":5694,"children":5695},{},[5696],{"type":60,"value":5359},{"type":54,"tag":162,"props":5698,"children":5699},{},[5700],{"type":60,"value":5701},"Timeout in ms",{"type":54,"tag":377,"props":5703,"children":5705},{"id":5704},"mcp-debugging",[5706],{"type":60,"value":5707},"MCP Debugging",{"type":54,"tag":63,"props":5709,"children":5710},{},[5711],{"type":60,"value":5712},"Test MCP servers independently before integrating:",{"type":54,"tag":271,"props":5714,"children":5717},{"className":5715,"code":5716,"language":2792,"meta":279,"style":279},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","echo '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}' | \u002Fpath\u002Fto\u002Fyour\u002Fmcp-server\n",[5718],{"type":54,"tag":92,"props":5719,"children":5720},{"__ignoreMap":279},[5721],{"type":54,"tag":392,"props":5722,"children":5723},{"class":394,"line":395},[5724,5729,5734,5739,5744,5749],{"type":54,"tag":392,"props":5725,"children":5726},{"style":482},[5727],{"type":60,"value":5728},"echo",{"type":54,"tag":392,"props":5730,"children":5731},{"style":405},[5732],{"type":60,"value":5733}," '",{"type":54,"tag":392,"props":5735,"children":5736},{"style":432},[5737],{"type":60,"value":5738},"{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}",{"type":54,"tag":392,"props":5740,"children":5741},{"style":405},[5742],{"type":60,"value":5743},"'",{"type":54,"tag":392,"props":5745,"children":5746},{"style":405},[5747],{"type":60,"value":5748}," |",{"type":54,"tag":392,"props":5750,"children":5751},{"style":3196},[5752],{"type":60,"value":5753}," \u002Fpath\u002Fto\u002Fyour\u002Fmcp-server\n",{"type":54,"tag":63,"props":5755,"children":5756},{},[5757],{"type":60,"value":5758},"Use the MCP Inspector for interactive debugging:",{"type":54,"tag":271,"props":5760,"children":5762},{"className":5715,"code":5761,"language":2792,"meta":279,"style":279},"npx @modelcontextprotocol\u002Finspector \u002Fpath\u002Fto\u002Fyour\u002Fmcp-server\n",[5763],{"type":54,"tag":92,"props":5764,"children":5765},{"__ignoreMap":279},[5766],{"type":54,"tag":392,"props":5767,"children":5768},{"class":394,"line":395},[5769,5773,5778],{"type":54,"tag":392,"props":5770,"children":5771},{"style":3196},[5772],{"type":60,"value":4807},{"type":54,"tag":392,"props":5774,"children":5775},{"style":432},[5776],{"type":60,"value":5777}," @modelcontextprotocol\u002Finspector",{"type":54,"tag":392,"props":5779,"children":5780},{"style":432},[5781],{"type":60,"value":5753},{"type":54,"tag":63,"props":5783,"children":5784},{},[5785],{"type":54,"tag":84,"props":5786,"children":5787},{},[5788],{"type":60,"value":5789},"Common MCP issues:",{"type":54,"tag":76,"props":5791,"children":5792},{},[5793,5812,5822],{"type":54,"tag":80,"props":5794,"children":5795},{},[5796,5798,5804,5806],{"type":60,"value":5797},"Tools not appearing → Set ",{"type":54,"tag":92,"props":5799,"children":5801},{"className":5800},[],[5802],{"type":60,"value":5803},"tools: [\"*\"]",{"type":60,"value":5805}," and verify server responds to ",{"type":54,"tag":92,"props":5807,"children":5809},{"className":5808},[],[5810],{"type":60,"value":5811},"tools\u002Flist",{"type":54,"tag":80,"props":5813,"children":5814},{},[5815,5817],{"type":60,"value":5816},"Server not starting → Use absolute command paths, check ",{"type":54,"tag":92,"props":5818,"children":5820},{"className":5819},[],[5821],{"type":60,"value":2999},{"type":54,"tag":80,"props":5823,"children":5824},{},[5825],{"type":60,"value":5826},"Stdout pollution → Debug output must go to stderr, not stdout",{"type":54,"tag":362,"props":5828,"children":5829},{},[],{"type":54,"tag":69,"props":5831,"children":5833},{"id":5832},"authentication",[5834],{"type":60,"value":5835},"Authentication",{"type":54,"tag":377,"props":5837,"children":5839},{"id":5838},"methods-priority-order",[5840],{"type":60,"value":5841},"Methods (Priority Order)",{"type":54,"tag":5843,"props":5844,"children":5845},"ol",{},[5846,5864,5889,5912,5941,5957],{"type":54,"tag":80,"props":5847,"children":5848},{},[5849,5854,5856,5862],{"type":54,"tag":84,"props":5850,"children":5851},{},[5852],{"type":60,"value":5853},"Explicit token",{"type":60,"value":5855}," — ",{"type":54,"tag":92,"props":5857,"children":5859},{"className":5858},[],[5860],{"type":60,"value":5861},"githubToken",{"type":60,"value":5863}," in constructor",{"type":54,"tag":80,"props":5865,"children":5866},{},[5867,5872,5873,5879,5881,5887],{"type":54,"tag":84,"props":5868,"children":5869},{},[5870],{"type":60,"value":5871},"HMAC key",{"type":60,"value":5855},{"type":54,"tag":92,"props":5874,"children":5876},{"className":5875},[],[5877],{"type":60,"value":5878},"CAPI_HMAC_KEY",{"type":60,"value":5880}," or ",{"type":54,"tag":92,"props":5882,"children":5884},{"className":5883},[],[5885],{"type":60,"value":5886},"COPILOT_HMAC_KEY",{"type":60,"value":5888}," env vars",{"type":54,"tag":80,"props":5890,"children":5891},{},[5892,5897,5898,5904,5906],{"type":54,"tag":84,"props":5893,"children":5894},{},[5895],{"type":60,"value":5896},"Direct API token",{"type":60,"value":5855},{"type":54,"tag":92,"props":5899,"children":5901},{"className":5900},[],[5902],{"type":60,"value":5903},"GITHUB_COPILOT_API_TOKEN",{"type":60,"value":5905}," with ",{"type":54,"tag":92,"props":5907,"children":5909},{"className":5908},[],[5910],{"type":60,"value":5911},"COPILOT_API_URL",{"type":54,"tag":80,"props":5913,"children":5914},{},[5915,5919,5920,5926,5928,5934,5935],{"type":54,"tag":84,"props":5916,"children":5917},{},[5918],{"type":60,"value":5443},{"type":60,"value":5855},{"type":54,"tag":92,"props":5921,"children":5923},{"className":5922},[],[5924],{"type":60,"value":5925},"COPILOT_GITHUB_TOKEN",{"type":60,"value":5927}," → ",{"type":54,"tag":92,"props":5929,"children":5931},{"className":5930},[],[5932],{"type":60,"value":5933},"GH_TOKEN",{"type":60,"value":5927},{"type":54,"tag":92,"props":5936,"children":5938},{"className":5937},[],[5939],{"type":60,"value":5940},"GITHUB_TOKEN",{"type":54,"tag":80,"props":5942,"children":5943},{},[5944,5949,5951],{"type":54,"tag":84,"props":5945,"children":5946},{},[5947],{"type":60,"value":5948},"Stored OAuth",{"type":60,"value":5950}," — From ",{"type":54,"tag":92,"props":5952,"children":5954},{"className":5953},[],[5955],{"type":60,"value":5956},"copilot auth login",{"type":54,"tag":80,"props":5958,"children":5959},{},[5960,5965,5966,5972],{"type":54,"tag":84,"props":5961,"children":5962},{},[5963],{"type":60,"value":5964},"GitHub CLI",{"type":60,"value":5855},{"type":54,"tag":92,"props":5967,"children":5969},{"className":5968},[],[5970],{"type":60,"value":5971},"gh auth",{"type":60,"value":5973}," credentials",{"type":54,"tag":377,"props":5975,"children":5977},{"id":5976},"programmatic-token",[5978],{"type":60,"value":5979},"Programmatic Token",{"type":54,"tag":271,"props":5981,"children":5983},{"className":385,"code":5982,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ githubToken: process.env.GITHUB_TOKEN });\n",[5984],{"type":54,"tag":92,"props":5985,"children":5986},{"__ignoreMap":279},[5987],{"type":54,"tag":392,"props":5988,"children":5989},{"class":394,"line":395},[5990,5994,5998,6002,6006,6010,6014,6018,6023,6027,6032,6036,6040,6044,6049,6053,6057],{"type":54,"tag":392,"props":5991,"children":5992},{"style":461},[5993],{"type":60,"value":464},{"type":54,"tag":392,"props":5995,"children":5996},{"style":411},[5997],{"type":60,"value":469},{"type":54,"tag":392,"props":5999,"children":6000},{"style":405},[6001],{"type":60,"value":474},{"type":54,"tag":392,"props":6003,"children":6004},{"style":405},[6005],{"type":60,"value":479},{"type":54,"tag":392,"props":6007,"children":6008},{"style":482},[6009],{"type":60,"value":414},{"type":54,"tag":392,"props":6011,"children":6012},{"style":411},[6013],{"type":60,"value":535},{"type":54,"tag":392,"props":6015,"children":6016},{"style":405},[6017],{"type":60,"value":540},{"type":54,"tag":392,"props":6019,"children":6020},{"style":543},[6021],{"type":60,"value":6022}," githubToken",{"type":54,"tag":392,"props":6024,"children":6025},{"style":405},[6026],{"type":60,"value":551},{"type":54,"tag":392,"props":6028,"children":6029},{"style":411},[6030],{"type":60,"value":6031}," process",{"type":54,"tag":392,"props":6033,"children":6034},{"style":405},[6035],{"type":60,"value":525},{"type":54,"tag":392,"props":6037,"children":6038},{"style":411},[6039],{"type":60,"value":5430},{"type":54,"tag":392,"props":6041,"children":6042},{"style":405},[6043],{"type":60,"value":525},{"type":54,"tag":392,"props":6045,"children":6046},{"style":411},[6047],{"type":60,"value":6048},"GITHUB_TOKEN ",{"type":54,"tag":392,"props":6050,"children":6051},{"style":405},[6052],{"type":60,"value":1228},{"type":54,"tag":392,"props":6054,"children":6055},{"style":411},[6056],{"type":60,"value":99},{"type":54,"tag":392,"props":6058,"children":6059},{"style":405},[6060],{"type":60,"value":444},{"type":54,"tag":377,"props":6062,"children":6064},{"id":6063},"oauth-github-app",[6065],{"type":60,"value":6066},"OAuth GitHub App",{"type":54,"tag":63,"props":6068,"children":6069},{},[6070],{"type":60,"value":6071},"For multi-user apps where users sign in with GitHub:",{"type":54,"tag":271,"props":6073,"children":6075},{"className":385,"code":6074,"language":21,"meta":279,"style":279},"const client = new CopilotClient({\n    githubToken: userAccessToken,    \u002F\u002F gho_ or ghu_ token from OAuth flow\n    useLoggedInUser: false,          \u002F\u002F Don't use stored CLI credentials\n});\n",[6076],{"type":54,"tag":92,"props":6077,"children":6078},{"__ignoreMap":279},[6079,6110,6136,6162],{"type":54,"tag":392,"props":6080,"children":6081},{"class":394,"line":395},[6082,6086,6090,6094,6098,6102,6106],{"type":54,"tag":392,"props":6083,"children":6084},{"style":461},[6085],{"type":60,"value":464},{"type":54,"tag":392,"props":6087,"children":6088},{"style":411},[6089],{"type":60,"value":469},{"type":54,"tag":392,"props":6091,"children":6092},{"style":405},[6093],{"type":60,"value":474},{"type":54,"tag":392,"props":6095,"children":6096},{"style":405},[6097],{"type":60,"value":479},{"type":54,"tag":392,"props":6099,"children":6100},{"style":482},[6101],{"type":60,"value":414},{"type":54,"tag":392,"props":6103,"children":6104},{"style":411},[6105],{"type":60,"value":535},{"type":54,"tag":392,"props":6107,"children":6108},{"style":405},[6109],{"type":60,"value":2065},{"type":54,"tag":392,"props":6111,"children":6112},{"class":394,"line":447},[6113,6118,6122,6127,6131],{"type":54,"tag":392,"props":6114,"children":6115},{"style":543},[6116],{"type":60,"value":6117},"    githubToken",{"type":54,"tag":392,"props":6119,"children":6120},{"style":405},[6121],{"type":60,"value":551},{"type":54,"tag":392,"props":6123,"children":6124},{"style":411},[6125],{"type":60,"value":6126}," userAccessToken",{"type":54,"tag":392,"props":6128,"children":6129},{"style":405},[6130],{"type":60,"value":1064},{"type":54,"tag":392,"props":6132,"children":6133},{"style":3248},[6134],{"type":60,"value":6135},"    \u002F\u002F gho_ or ghu_ token from OAuth flow\n",{"type":54,"tag":392,"props":6137,"children":6138},{"class":394,"line":457},[6139,6144,6148,6153,6157],{"type":54,"tag":392,"props":6140,"children":6141},{"style":543},[6142],{"type":60,"value":6143},"    useLoggedInUser",{"type":54,"tag":392,"props":6145,"children":6146},{"style":405},[6147],{"type":60,"value":551},{"type":54,"tag":392,"props":6149,"children":6150},{"style":1076},[6151],{"type":60,"value":6152}," false",{"type":54,"tag":392,"props":6154,"children":6155},{"style":405},[6156],{"type":60,"value":1064},{"type":54,"tag":392,"props":6158,"children":6159},{"style":3248},[6160],{"type":60,"value":6161},"          \u002F\u002F Don't use stored CLI credentials\n",{"type":54,"tag":392,"props":6163,"children":6164},{"class":394,"line":496},[6165,6169,6173],{"type":54,"tag":392,"props":6166,"children":6167},{"style":405},[6168],{"type":60,"value":1228},{"type":54,"tag":392,"props":6170,"children":6171},{"style":411},[6172],{"type":60,"value":99},{"type":54,"tag":392,"props":6174,"children":6175},{"style":405},[6176],{"type":60,"value":444},{"type":54,"tag":63,"props":6178,"children":6179},{},[6180,6185,6186,6192,6194,6200,6202,6208,6210,6215,6216,6222],{"type":54,"tag":84,"props":6181,"children":6182},{},[6183],{"type":60,"value":6184},"Supported token types:",{"type":60,"value":2985},{"type":54,"tag":92,"props":6187,"children":6189},{"className":6188},[],[6190],{"type":60,"value":6191},"gho_",{"type":60,"value":6193}," (OAuth), ",{"type":54,"tag":92,"props":6195,"children":6197},{"className":6196},[],[6198],{"type":60,"value":6199},"ghu_",{"type":60,"value":6201}," (GitHub App), ",{"type":54,"tag":92,"props":6203,"children":6205},{"className":6204},[],[6206],{"type":60,"value":6207},"github_pat_",{"type":60,"value":6209}," (fine-grained PAT).\n",{"type":54,"tag":84,"props":6211,"children":6212},{},[6213],{"type":60,"value":6214},"Not supported:",{"type":60,"value":2985},{"type":54,"tag":92,"props":6217,"children":6219},{"className":6218},[],[6220],{"type":60,"value":6221},"ghp_",{"type":60,"value":6223}," (classic PAT — deprecated).",{"type":54,"tag":377,"props":6225,"children":6227},{"id":6226},"disable-auto-login",[6228],{"type":60,"value":6229},"Disable Auto-Login",{"type":54,"tag":63,"props":6231,"children":6232},{},[6233],{"type":60,"value":6234},"Prevent the SDK from using stored credentials:",{"type":54,"tag":271,"props":6236,"children":6238},{"className":385,"code":6237,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ useLoggedInUser: false });\n",[6239],{"type":54,"tag":92,"props":6240,"children":6241},{"__ignoreMap":279},[6242],{"type":54,"tag":392,"props":6243,"children":6244},{"class":394,"line":395},[6245,6249,6253,6257,6261,6265,6269,6273,6278,6282,6286,6290,6294],{"type":54,"tag":392,"props":6246,"children":6247},{"style":461},[6248],{"type":60,"value":464},{"type":54,"tag":392,"props":6250,"children":6251},{"style":411},[6252],{"type":60,"value":469},{"type":54,"tag":392,"props":6254,"children":6255},{"style":405},[6256],{"type":60,"value":474},{"type":54,"tag":392,"props":6258,"children":6259},{"style":405},[6260],{"type":60,"value":479},{"type":54,"tag":392,"props":6262,"children":6263},{"style":482},[6264],{"type":60,"value":414},{"type":54,"tag":392,"props":6266,"children":6267},{"style":411},[6268],{"type":60,"value":535},{"type":54,"tag":392,"props":6270,"children":6271},{"style":405},[6272],{"type":60,"value":540},{"type":54,"tag":392,"props":6274,"children":6275},{"style":543},[6276],{"type":60,"value":6277}," useLoggedInUser",{"type":54,"tag":392,"props":6279,"children":6280},{"style":405},[6281],{"type":60,"value":551},{"type":54,"tag":392,"props":6283,"children":6284},{"style":1076},[6285],{"type":60,"value":6152},{"type":54,"tag":392,"props":6287,"children":6288},{"style":405},[6289],{"type":60,"value":419},{"type":54,"tag":392,"props":6291,"children":6292},{"style":411},[6293],{"type":60,"value":99},{"type":54,"tag":392,"props":6295,"children":6296},{"style":405},[6297],{"type":60,"value":444},{"type":54,"tag":362,"props":6299,"children":6300},{},[],{"type":54,"tag":69,"props":6302,"children":6304},{"id":6303},"byok-bring-your-own-key",[6305],{"type":60,"value":6306},"BYOK (Bring Your Own Key)",{"type":54,"tag":63,"props":6308,"children":6309},{},[6310],{"type":60,"value":6311},"Use your own API keys — no Copilot subscription required. The CLI acts as agent runtime only.",{"type":54,"tag":377,"props":6313,"children":6315},{"id":6314},"provider-configurations",[6316],{"type":60,"value":6317},"Provider Configurations",{"type":54,"tag":63,"props":6319,"children":6320},{},[6321],{"type":54,"tag":84,"props":6322,"children":6323},{},[6324],{"type":60,"value":6325},"OpenAI:",{"type":54,"tag":271,"props":6327,"children":6329},{"className":385,"code":6328,"language":21,"meta":279,"style":279},"provider: { type: \"openai\", baseUrl: \"https:\u002F\u002Fapi.openai.com\u002Fv1\", apiKey: process.env.OPENAI_API_KEY }\n",[6330],{"type":54,"tag":92,"props":6331,"children":6332},{"__ignoreMap":279},[6333],{"type":54,"tag":392,"props":6334,"children":6335},{"class":394,"line":395},[6336,6341,6345,6349,6353,6357,6361,6366,6370,6374,6379,6383,6387,6392,6396,6400,6405,6409,6413,6417,6421,6425,6430],{"type":54,"tag":392,"props":6337,"children":6338},{"style":3196},[6339],{"type":60,"value":6340},"provider",{"type":54,"tag":392,"props":6342,"children":6343},{"style":405},[6344],{"type":60,"value":551},{"type":54,"tag":392,"props":6346,"children":6347},{"style":405},[6348],{"type":60,"value":408},{"type":54,"tag":392,"props":6350,"children":6351},{"style":3196},[6352],{"type":60,"value":1793},{"type":54,"tag":392,"props":6354,"children":6355},{"style":405},[6356],{"type":60,"value":551},{"type":54,"tag":392,"props":6358,"children":6359},{"style":405},[6360],{"type":60,"value":429},{"type":54,"tag":392,"props":6362,"children":6363},{"style":432},[6364],{"type":60,"value":6365},"openai",{"type":54,"tag":392,"props":6367,"children":6368},{"style":405},[6369],{"type":60,"value":439},{"type":54,"tag":392,"props":6371,"children":6372},{"style":405},[6373],{"type":60,"value":1064},{"type":54,"tag":392,"props":6375,"children":6376},{"style":3196},[6377],{"type":60,"value":6378}," baseUrl",{"type":54,"tag":392,"props":6380,"children":6381},{"style":405},[6382],{"type":60,"value":551},{"type":54,"tag":392,"props":6384,"children":6385},{"style":405},[6386],{"type":60,"value":429},{"type":54,"tag":392,"props":6388,"children":6389},{"style":432},[6390],{"type":60,"value":6391},"https:\u002F\u002Fapi.openai.com\u002Fv1",{"type":54,"tag":392,"props":6393,"children":6394},{"style":405},[6395],{"type":60,"value":439},{"type":54,"tag":392,"props":6397,"children":6398},{"style":405},[6399],{"type":60,"value":1064},{"type":54,"tag":392,"props":6401,"children":6402},{"style":3196},[6403],{"type":60,"value":6404}," apiKey",{"type":54,"tag":392,"props":6406,"children":6407},{"style":405},[6408],{"type":60,"value":551},{"type":54,"tag":392,"props":6410,"children":6411},{"style":411},[6412],{"type":60,"value":6031},{"type":54,"tag":392,"props":6414,"children":6415},{"style":405},[6416],{"type":60,"value":525},{"type":54,"tag":392,"props":6418,"children":6419},{"style":411},[6420],{"type":60,"value":5430},{"type":54,"tag":392,"props":6422,"children":6423},{"style":405},[6424],{"type":60,"value":525},{"type":54,"tag":392,"props":6426,"children":6427},{"style":411},[6428],{"type":60,"value":6429},"OPENAI_API_KEY",{"type":54,"tag":392,"props":6431,"children":6432},{"style":405},[6433],{"type":60,"value":6434}," }\n",{"type":54,"tag":63,"props":6436,"children":6437},{},[6438],{"type":54,"tag":84,"props":6439,"children":6440},{},[6441],{"type":60,"value":6442},"Azure AI Foundry (OpenAI-compatible):",{"type":54,"tag":271,"props":6444,"children":6446},{"className":385,"code":6445,"language":21,"meta":279,"style":279},"provider: {\n    type: \"openai\",\n    baseUrl: \"https:\u002F\u002Fyour-resource.openai.azure.com\u002Fopenai\u002Fv1\u002F\",\n    apiKey: process.env.FOUNDRY_API_KEY,\n    wireApi: \"responses\",  \u002F\u002F Use \"responses\" for GPT-5 series, \"completions\" for others\n}\n",[6447],{"type":54,"tag":92,"props":6448,"children":6449},{"__ignoreMap":279},[6450,6465,6493,6522,6559,6593],{"type":54,"tag":392,"props":6451,"children":6452},{"class":394,"line":395},[6453,6457,6461],{"type":54,"tag":392,"props":6454,"children":6455},{"style":3196},[6456],{"type":60,"value":6340},{"type":54,"tag":392,"props":6458,"children":6459},{"style":405},[6460],{"type":60,"value":551},{"type":54,"tag":392,"props":6462,"children":6463},{"style":405},[6464],{"type":60,"value":1161},{"type":54,"tag":392,"props":6466,"children":6467},{"class":394,"line":447},[6468,6473,6477,6481,6485,6489],{"type":54,"tag":392,"props":6469,"children":6470},{"style":3196},[6471],{"type":60,"value":6472},"    type",{"type":54,"tag":392,"props":6474,"children":6475},{"style":405},[6476],{"type":60,"value":551},{"type":54,"tag":392,"props":6478,"children":6479},{"style":405},[6480],{"type":60,"value":429},{"type":54,"tag":392,"props":6482,"children":6483},{"style":432},[6484],{"type":60,"value":6365},{"type":54,"tag":392,"props":6486,"children":6487},{"style":405},[6488],{"type":60,"value":439},{"type":54,"tag":392,"props":6490,"children":6491},{"style":405},[6492],{"type":60,"value":1714},{"type":54,"tag":392,"props":6494,"children":6495},{"class":394,"line":457},[6496,6501,6505,6509,6514,6518],{"type":54,"tag":392,"props":6497,"children":6498},{"style":3196},[6499],{"type":60,"value":6500},"    baseUrl",{"type":54,"tag":392,"props":6502,"children":6503},{"style":405},[6504],{"type":60,"value":551},{"type":54,"tag":392,"props":6506,"children":6507},{"style":405},[6508],{"type":60,"value":429},{"type":54,"tag":392,"props":6510,"children":6511},{"style":432},[6512],{"type":60,"value":6513},"https:\u002F\u002Fyour-resource.openai.azure.com\u002Fopenai\u002Fv1\u002F",{"type":54,"tag":392,"props":6515,"children":6516},{"style":405},[6517],{"type":60,"value":439},{"type":54,"tag":392,"props":6519,"children":6520},{"style":405},[6521],{"type":60,"value":1714},{"type":54,"tag":392,"props":6523,"children":6524},{"class":394,"line":496},[6525,6530,6534,6538,6542,6546,6550,6555],{"type":54,"tag":392,"props":6526,"children":6527},{"style":3196},[6528],{"type":60,"value":6529},"    apiKey",{"type":54,"tag":392,"props":6531,"children":6532},{"style":405},[6533],{"type":60,"value":551},{"type":54,"tag":392,"props":6535,"children":6536},{"style":411},[6537],{"type":60,"value":6031},{"type":54,"tag":392,"props":6539,"children":6540},{"style":405},[6541],{"type":60,"value":525},{"type":54,"tag":392,"props":6543,"children":6544},{"style":411},[6545],{"type":60,"value":5430},{"type":54,"tag":392,"props":6547,"children":6548},{"style":405},[6549],{"type":60,"value":525},{"type":54,"tag":392,"props":6551,"children":6552},{"style":411},[6553],{"type":60,"value":6554},"FOUNDRY_API_KEY",{"type":54,"tag":392,"props":6556,"children":6557},{"style":405},[6558],{"type":60,"value":1714},{"type":54,"tag":392,"props":6560,"children":6561},{"class":394,"line":579},[6562,6567,6571,6575,6580,6584,6588],{"type":54,"tag":392,"props":6563,"children":6564},{"style":3196},[6565],{"type":60,"value":6566},"    wireApi",{"type":54,"tag":392,"props":6568,"children":6569},{"style":405},[6570],{"type":60,"value":551},{"type":54,"tag":392,"props":6572,"children":6573},{"style":405},[6574],{"type":60,"value":429},{"type":54,"tag":392,"props":6576,"children":6577},{"style":432},[6578],{"type":60,"value":6579},"responses",{"type":54,"tag":392,"props":6581,"children":6582},{"style":405},[6583],{"type":60,"value":439},{"type":54,"tag":392,"props":6585,"children":6586},{"style":405},[6587],{"type":60,"value":1064},{"type":54,"tag":392,"props":6589,"children":6590},{"style":3248},[6591],{"type":60,"value":6592},"  \u002F\u002F Use \"responses\" for GPT-5 series, \"completions\" for others\n",{"type":54,"tag":392,"props":6594,"children":6595},{"class":394,"line":587},[6596],{"type":54,"tag":392,"props":6597,"children":6598},{"style":405},[6599],{"type":60,"value":2265},{"type":54,"tag":63,"props":6601,"children":6602},{},[6603],{"type":54,"tag":84,"props":6604,"children":6605},{},[6606],{"type":60,"value":6607},"Azure OpenAI (native endpoint):",{"type":54,"tag":271,"props":6609,"children":6611},{"className":385,"code":6610,"language":21,"meta":279,"style":279},"provider: {\n    type: \"azure\",\n    baseUrl: \"https:\u002F\u002Fmy-resource.openai.azure.com\",  \u002F\u002F Just the host — no \u002Fopenai\u002Fv1\n    apiKey: process.env.AZURE_OPENAI_KEY,\n    azure: { apiVersion: \"2024-10-21\" },\n}\n",[6612],{"type":54,"tag":92,"props":6613,"children":6614},{"__ignoreMap":279},[6615,6630,6657,6690,6726,6768],{"type":54,"tag":392,"props":6616,"children":6617},{"class":394,"line":395},[6618,6622,6626],{"type":54,"tag":392,"props":6619,"children":6620},{"style":3196},[6621],{"type":60,"value":6340},{"type":54,"tag":392,"props":6623,"children":6624},{"style":405},[6625],{"type":60,"value":551},{"type":54,"tag":392,"props":6627,"children":6628},{"style":405},[6629],{"type":60,"value":1161},{"type":54,"tag":392,"props":6631,"children":6632},{"class":394,"line":447},[6633,6637,6641,6645,6649,6653],{"type":54,"tag":392,"props":6634,"children":6635},{"style":3196},[6636],{"type":60,"value":6472},{"type":54,"tag":392,"props":6638,"children":6639},{"style":405},[6640],{"type":60,"value":551},{"type":54,"tag":392,"props":6642,"children":6643},{"style":405},[6644],{"type":60,"value":429},{"type":54,"tag":392,"props":6646,"children":6647},{"style":432},[6648],{"type":60,"value":39},{"type":54,"tag":392,"props":6650,"children":6651},{"style":405},[6652],{"type":60,"value":439},{"type":54,"tag":392,"props":6654,"children":6655},{"style":405},[6656],{"type":60,"value":1714},{"type":54,"tag":392,"props":6658,"children":6659},{"class":394,"line":457},[6660,6664,6668,6672,6677,6681,6685],{"type":54,"tag":392,"props":6661,"children":6662},{"style":3196},[6663],{"type":60,"value":6500},{"type":54,"tag":392,"props":6665,"children":6666},{"style":405},[6667],{"type":60,"value":551},{"type":54,"tag":392,"props":6669,"children":6670},{"style":405},[6671],{"type":60,"value":429},{"type":54,"tag":392,"props":6673,"children":6674},{"style":432},[6675],{"type":60,"value":6676},"https:\u002F\u002Fmy-resource.openai.azure.com",{"type":54,"tag":392,"props":6678,"children":6679},{"style":405},[6680],{"type":60,"value":439},{"type":54,"tag":392,"props":6682,"children":6683},{"style":405},[6684],{"type":60,"value":1064},{"type":54,"tag":392,"props":6686,"children":6687},{"style":3248},[6688],{"type":60,"value":6689},"  \u002F\u002F Just the host — no \u002Fopenai\u002Fv1\n",{"type":54,"tag":392,"props":6691,"children":6692},{"class":394,"line":496},[6693,6697,6701,6705,6709,6713,6717,6722],{"type":54,"tag":392,"props":6694,"children":6695},{"style":3196},[6696],{"type":60,"value":6529},{"type":54,"tag":392,"props":6698,"children":6699},{"style":405},[6700],{"type":60,"value":551},{"type":54,"tag":392,"props":6702,"children":6703},{"style":411},[6704],{"type":60,"value":6031},{"type":54,"tag":392,"props":6706,"children":6707},{"style":405},[6708],{"type":60,"value":525},{"type":54,"tag":392,"props":6710,"children":6711},{"style":411},[6712],{"type":60,"value":5430},{"type":54,"tag":392,"props":6714,"children":6715},{"style":405},[6716],{"type":60,"value":525},{"type":54,"tag":392,"props":6718,"children":6719},{"style":411},[6720],{"type":60,"value":6721},"AZURE_OPENAI_KEY",{"type":54,"tag":392,"props":6723,"children":6724},{"style":405},[6725],{"type":60,"value":1714},{"type":54,"tag":392,"props":6727,"children":6728},{"class":394,"line":579},[6729,6734,6738,6742,6747,6751,6755,6760,6764],{"type":54,"tag":392,"props":6730,"children":6731},{"style":3196},[6732],{"type":60,"value":6733},"    azure",{"type":54,"tag":392,"props":6735,"children":6736},{"style":405},[6737],{"type":60,"value":551},{"type":54,"tag":392,"props":6739,"children":6740},{"style":405},[6741],{"type":60,"value":408},{"type":54,"tag":392,"props":6743,"children":6744},{"style":3196},[6745],{"type":60,"value":6746}," apiVersion",{"type":54,"tag":392,"props":6748,"children":6749},{"style":405},[6750],{"type":60,"value":551},{"type":54,"tag":392,"props":6752,"children":6753},{"style":405},[6754],{"type":60,"value":429},{"type":54,"tag":392,"props":6756,"children":6757},{"style":432},[6758],{"type":60,"value":6759},"2024-10-21",{"type":54,"tag":392,"props":6761,"children":6762},{"style":405},[6763],{"type":60,"value":439},{"type":54,"tag":392,"props":6765,"children":6766},{"style":405},[6767],{"type":60,"value":1845},{"type":54,"tag":392,"props":6769,"children":6770},{"class":394,"line":587},[6771],{"type":54,"tag":392,"props":6772,"children":6773},{"style":405},[6774],{"type":60,"value":2265},{"type":54,"tag":63,"props":6776,"children":6777},{},[6778],{"type":54,"tag":84,"props":6779,"children":6780},{},[6781],{"type":60,"value":6782},"Anthropic:",{"type":54,"tag":271,"props":6784,"children":6786},{"className":385,"code":6785,"language":21,"meta":279,"style":279},"provider: { type: \"anthropic\", baseUrl: \"https:\u002F\u002Fapi.anthropic.com\", apiKey: process.env.ANTHROPIC_API_KEY }\n",[6787],{"type":54,"tag":92,"props":6788,"children":6789},{"__ignoreMap":279},[6790],{"type":54,"tag":392,"props":6791,"children":6792},{"class":394,"line":395},[6793,6797,6801,6805,6809,6813,6817,6822,6826,6830,6834,6838,6842,6847,6851,6855,6859,6863,6867,6871,6875,6879,6884],{"type":54,"tag":392,"props":6794,"children":6795},{"style":3196},[6796],{"type":60,"value":6340},{"type":54,"tag":392,"props":6798,"children":6799},{"style":405},[6800],{"type":60,"value":551},{"type":54,"tag":392,"props":6802,"children":6803},{"style":405},[6804],{"type":60,"value":408},{"type":54,"tag":392,"props":6806,"children":6807},{"style":3196},[6808],{"type":60,"value":1793},{"type":54,"tag":392,"props":6810,"children":6811},{"style":405},[6812],{"type":60,"value":551},{"type":54,"tag":392,"props":6814,"children":6815},{"style":405},[6816],{"type":60,"value":429},{"type":54,"tag":392,"props":6818,"children":6819},{"style":432},[6820],{"type":60,"value":6821},"anthropic",{"type":54,"tag":392,"props":6823,"children":6824},{"style":405},[6825],{"type":60,"value":439},{"type":54,"tag":392,"props":6827,"children":6828},{"style":405},[6829],{"type":60,"value":1064},{"type":54,"tag":392,"props":6831,"children":6832},{"style":3196},[6833],{"type":60,"value":6378},{"type":54,"tag":392,"props":6835,"children":6836},{"style":405},[6837],{"type":60,"value":551},{"type":54,"tag":392,"props":6839,"children":6840},{"style":405},[6841],{"type":60,"value":429},{"type":54,"tag":392,"props":6843,"children":6844},{"style":432},[6845],{"type":60,"value":6846},"https:\u002F\u002Fapi.anthropic.com",{"type":54,"tag":392,"props":6848,"children":6849},{"style":405},[6850],{"type":60,"value":439},{"type":54,"tag":392,"props":6852,"children":6853},{"style":405},[6854],{"type":60,"value":1064},{"type":54,"tag":392,"props":6856,"children":6857},{"style":3196},[6858],{"type":60,"value":6404},{"type":54,"tag":392,"props":6860,"children":6861},{"style":405},[6862],{"type":60,"value":551},{"type":54,"tag":392,"props":6864,"children":6865},{"style":411},[6866],{"type":60,"value":6031},{"type":54,"tag":392,"props":6868,"children":6869},{"style":405},[6870],{"type":60,"value":525},{"type":54,"tag":392,"props":6872,"children":6873},{"style":411},[6874],{"type":60,"value":5430},{"type":54,"tag":392,"props":6876,"children":6877},{"style":405},[6878],{"type":60,"value":525},{"type":54,"tag":392,"props":6880,"children":6881},{"style":411},[6882],{"type":60,"value":6883},"ANTHROPIC_API_KEY",{"type":54,"tag":392,"props":6885,"children":6886},{"style":405},[6887],{"type":60,"value":6434},{"type":54,"tag":63,"props":6889,"children":6890},{},[6891],{"type":54,"tag":84,"props":6892,"children":6893},{},[6894],{"type":60,"value":6895},"Ollama (local):",{"type":54,"tag":271,"props":6897,"children":6899},{"className":385,"code":6898,"language":21,"meta":279,"style":279},"provider: { type: \"openai\", baseUrl: \"http:\u002F\u002Flocalhost:11434\u002Fv1\" }\n",[6900],{"type":54,"tag":92,"props":6901,"children":6902},{"__ignoreMap":279},[6903],{"type":54,"tag":392,"props":6904,"children":6905},{"class":394,"line":395},[6906,6910,6914,6918,6922,6926,6930,6934,6938,6942,6946,6950,6954,6959,6963],{"type":54,"tag":392,"props":6907,"children":6908},{"style":3196},[6909],{"type":60,"value":6340},{"type":54,"tag":392,"props":6911,"children":6912},{"style":405},[6913],{"type":60,"value":551},{"type":54,"tag":392,"props":6915,"children":6916},{"style":405},[6917],{"type":60,"value":408},{"type":54,"tag":392,"props":6919,"children":6920},{"style":3196},[6921],{"type":60,"value":1793},{"type":54,"tag":392,"props":6923,"children":6924},{"style":405},[6925],{"type":60,"value":551},{"type":54,"tag":392,"props":6927,"children":6928},{"style":405},[6929],{"type":60,"value":429},{"type":54,"tag":392,"props":6931,"children":6932},{"style":432},[6933],{"type":60,"value":6365},{"type":54,"tag":392,"props":6935,"children":6936},{"style":405},[6937],{"type":60,"value":439},{"type":54,"tag":392,"props":6939,"children":6940},{"style":405},[6941],{"type":60,"value":1064},{"type":54,"tag":392,"props":6943,"children":6944},{"style":3196},[6945],{"type":60,"value":6378},{"type":54,"tag":392,"props":6947,"children":6948},{"style":405},[6949],{"type":60,"value":551},{"type":54,"tag":392,"props":6951,"children":6952},{"style":405},[6953],{"type":60,"value":429},{"type":54,"tag":392,"props":6955,"children":6956},{"style":432},[6957],{"type":60,"value":6958},"http:\u002F\u002Flocalhost:11434\u002Fv1",{"type":54,"tag":392,"props":6960,"children":6961},{"style":405},[6962],{"type":60,"value":439},{"type":54,"tag":392,"props":6964,"children":6965},{"style":405},[6966],{"type":60,"value":6434},{"type":54,"tag":377,"props":6968,"children":6970},{"id":6969},"provider-config-reference",[6971],{"type":60,"value":6972},"Provider Config Reference",{"type":54,"tag":127,"props":6974,"children":6975},{},[6976,6994],{"type":54,"tag":131,"props":6977,"children":6978},{},[6979],{"type":54,"tag":135,"props":6980,"children":6981},{},[6982,6986,6990],{"type":54,"tag":139,"props":6983,"children":6984},{},[6985],{"type":60,"value":3034},{"type":54,"tag":139,"props":6987,"children":6988},{},[6989],{"type":60,"value":3039},{"type":54,"tag":139,"props":6991,"children":6992},{},[6993],{"type":60,"value":308},{"type":54,"tag":155,"props":6995,"children":6996},{},[6997,7036,7062,7083,7104,7143],{"type":54,"tag":135,"props":6998,"children":6999},{},[7000,7008,7031],{"type":54,"tag":162,"props":7001,"children":7002},{},[7003],{"type":54,"tag":92,"props":7004,"children":7006},{"className":7005},[],[7007],{"type":60,"value":5345},{"type":54,"tag":162,"props":7009,"children":7010},{},[7011,7017,7018,7024,7025],{"type":54,"tag":92,"props":7012,"children":7014},{"className":7013},[],[7015],{"type":60,"value":7016},"\"openai\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":7019,"children":7021},{"className":7020},[],[7022],{"type":60,"value":7023},"\"azure\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":7026,"children":7028},{"className":7027},[],[7029],{"type":60,"value":7030},"\"anthropic\"",{"type":54,"tag":162,"props":7032,"children":7033},{},[7034],{"type":60,"value":7035},"Provider type",{"type":54,"tag":135,"props":7037,"children":7038},{},[7039,7048,7052],{"type":54,"tag":162,"props":7040,"children":7041},{},[7042],{"type":54,"tag":92,"props":7043,"children":7045},{"className":7044},[],[7046],{"type":60,"value":7047},"baseUrl",{"type":54,"tag":162,"props":7049,"children":7050},{},[7051],{"type":60,"value":1806},{"type":54,"tag":162,"props":7053,"children":7054},{},[7055,7060],{"type":54,"tag":84,"props":7056,"children":7057},{},[7058],{"type":60,"value":7059},"Required.",{"type":60,"value":7061}," API endpoint URL",{"type":54,"tag":135,"props":7063,"children":7064},{},[7065,7074,7078],{"type":54,"tag":162,"props":7066,"children":7067},{},[7068],{"type":54,"tag":92,"props":7069,"children":7071},{"className":7070},[],[7072],{"type":60,"value":7073},"apiKey",{"type":54,"tag":162,"props":7075,"children":7076},{},[7077],{"type":60,"value":1806},{"type":54,"tag":162,"props":7079,"children":7080},{},[7081],{"type":60,"value":7082},"API key (optional for local providers)",{"type":54,"tag":135,"props":7084,"children":7085},{},[7086,7095,7099],{"type":54,"tag":162,"props":7087,"children":7088},{},[7089],{"type":54,"tag":92,"props":7090,"children":7092},{"className":7091},[],[7093],{"type":60,"value":7094},"bearerToken",{"type":54,"tag":162,"props":7096,"children":7097},{},[7098],{"type":60,"value":1806},{"type":54,"tag":162,"props":7100,"children":7101},{},[7102],{"type":60,"value":7103},"Bearer token auth (takes precedence over apiKey)",{"type":54,"tag":135,"props":7105,"children":7106},{},[7107,7116,7132],{"type":54,"tag":162,"props":7108,"children":7109},{},[7110],{"type":54,"tag":92,"props":7111,"children":7113},{"className":7112},[],[7114],{"type":60,"value":7115},"wireApi",{"type":54,"tag":162,"props":7117,"children":7118},{},[7119,7125,7126],{"type":54,"tag":92,"props":7120,"children":7122},{"className":7121},[],[7123],{"type":60,"value":7124},"\"completions\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":7127,"children":7129},{"className":7128},[],[7130],{"type":60,"value":7131},"\"responses\"",{"type":54,"tag":162,"props":7133,"children":7134},{},[7135,7137,7142],{"type":60,"value":7136},"API format (default: ",{"type":54,"tag":92,"props":7138,"children":7140},{"className":7139},[],[7141],{"type":60,"value":7124},{"type":60,"value":99},{"type":54,"tag":135,"props":7144,"children":7145},{},[7146,7155,7159],{"type":54,"tag":162,"props":7147,"children":7148},{},[7149],{"type":54,"tag":92,"props":7150,"children":7152},{"className":7151},[],[7153],{"type":60,"value":7154},"azure.apiVersion",{"type":54,"tag":162,"props":7156,"children":7157},{},[7158],{"type":60,"value":1806},{"type":54,"tag":162,"props":7160,"children":7161},{},[7162,7164,7170],{"type":60,"value":7163},"Azure API version (default: ",{"type":54,"tag":92,"props":7165,"children":7167},{"className":7166},[],[7168],{"type":60,"value":7169},"\"2024-10-21\"",{"type":60,"value":99},{"type":54,"tag":377,"props":7172,"children":7174},{"id":7173},"azure-managed-identity-with-byok",[7175],{"type":60,"value":7176},"Azure Managed Identity with BYOK",{"type":54,"tag":63,"props":7178,"children":7179},{},[7180,7182,7188],{"type":60,"value":7181},"Use ",{"type":54,"tag":92,"props":7183,"children":7185},{"className":7184},[],[7186],{"type":60,"value":7187},"DefaultAzureCredential",{"type":60,"value":7189}," to get short-lived bearer tokens for Azure deployments:",{"type":54,"tag":271,"props":7191,"children":7193},{"className":752,"code":7192,"language":24,"meta":279,"style":279},"from azure.identity import DefaultAzureCredential\nfrom copilot import CopilotClient, ProviderConfig, SessionConfig\n\ncredential = DefaultAzureCredential()\ntoken = credential.get_token(\"https:\u002F\u002Fcognitiveservices.azure.com\u002F.default\").token\n\nsession = await client.create_session(SessionConfig(\n    model=\"gpt-4.1\",\n    provider=ProviderConfig(\n        type=\"openai\",\n        base_url=f\"{foundry_url}\u002Fopenai\u002Fv1\u002F\",\n        bearer_token=token,\n        wire_api=\"responses\",\n    ),\n))\n",[7194],{"type":54,"tag":92,"props":7195,"children":7196},{"__ignoreMap":279},[7197,7205,7213,7220,7228,7236,7243,7251,7259,7267,7275,7283,7291,7299,7307],{"type":54,"tag":392,"props":7198,"children":7199},{"class":394,"line":395},[7200],{"type":54,"tag":392,"props":7201,"children":7202},{},[7203],{"type":60,"value":7204},"from azure.identity import DefaultAzureCredential\n",{"type":54,"tag":392,"props":7206,"children":7207},{"class":394,"line":447},[7208],{"type":54,"tag":392,"props":7209,"children":7210},{},[7211],{"type":60,"value":7212},"from copilot import CopilotClient, ProviderConfig, SessionConfig\n",{"type":54,"tag":392,"props":7214,"children":7215},{"class":394,"line":457},[7216],{"type":54,"tag":392,"props":7217,"children":7218},{"emptyLinePlaceholder":451},[7219],{"type":60,"value":454},{"type":54,"tag":392,"props":7221,"children":7222},{"class":394,"line":496},[7223],{"type":54,"tag":392,"props":7224,"children":7225},{},[7226],{"type":60,"value":7227},"credential = DefaultAzureCredential()\n",{"type":54,"tag":392,"props":7229,"children":7230},{"class":394,"line":579},[7231],{"type":54,"tag":392,"props":7232,"children":7233},{},[7234],{"type":60,"value":7235},"token = credential.get_token(\"https:\u002F\u002Fcognitiveservices.azure.com\u002F.default\").token\n",{"type":54,"tag":392,"props":7237,"children":7238},{"class":394,"line":587},[7239],{"type":54,"tag":392,"props":7240,"children":7241},{"emptyLinePlaceholder":451},[7242],{"type":60,"value":454},{"type":54,"tag":392,"props":7244,"children":7245},{"class":394,"line":664},[7246],{"type":54,"tag":392,"props":7247,"children":7248},{},[7249],{"type":60,"value":7250},"session = await client.create_session(SessionConfig(\n",{"type":54,"tag":392,"props":7252,"children":7253},{"class":394,"line":710},[7254],{"type":54,"tag":392,"props":7255,"children":7256},{},[7257],{"type":60,"value":7258},"    model=\"gpt-4.1\",\n",{"type":54,"tag":392,"props":7260,"children":7261},{"class":394,"line":718},[7262],{"type":54,"tag":392,"props":7263,"children":7264},{},[7265],{"type":60,"value":7266},"    provider=ProviderConfig(\n",{"type":54,"tag":392,"props":7268,"children":7269},{"class":394,"line":831},[7270],{"type":54,"tag":392,"props":7271,"children":7272},{},[7273],{"type":60,"value":7274},"        type=\"openai\",\n",{"type":54,"tag":392,"props":7276,"children":7277},{"class":394,"line":840},[7278],{"type":54,"tag":392,"props":7279,"children":7280},{},[7281],{"type":60,"value":7282},"        base_url=f\"{foundry_url}\u002Fopenai\u002Fv1\u002F\",\n",{"type":54,"tag":392,"props":7284,"children":7285},{"class":394,"line":848},[7286],{"type":54,"tag":392,"props":7287,"children":7288},{},[7289],{"type":60,"value":7290},"        bearer_token=token,\n",{"type":54,"tag":392,"props":7292,"children":7293},{"class":394,"line":1478},[7294],{"type":54,"tag":392,"props":7295,"children":7296},{},[7297],{"type":60,"value":7298},"        wire_api=\"responses\",\n",{"type":54,"tag":392,"props":7300,"children":7301},{"class":394,"line":2068},[7302],{"type":54,"tag":392,"props":7303,"children":7304},{},[7305],{"type":60,"value":7306},"    ),\n",{"type":54,"tag":392,"props":7308,"children":7309},{"class":394,"line":2097},[7310],{"type":54,"tag":392,"props":7311,"children":7312},{},[7313],{"type":60,"value":7314},"))\n",{"type":54,"tag":7316,"props":7317,"children":7318},"blockquote",{},[7319],{"type":54,"tag":63,"props":7320,"children":7321},{},[7322,7327],{"type":54,"tag":84,"props":7323,"children":7324},{},[7325],{"type":60,"value":7326},"Note:",{"type":60,"value":7328}," Bearer tokens expire (~1 hour). For long-running apps, refresh the token before each new session. The SDK does not auto-refresh tokens.",{"type":54,"tag":377,"props":7330,"children":7332},{"id":7331},"byok-limitations",[7333],{"type":60,"value":7334},"BYOK Limitations",{"type":54,"tag":76,"props":7336,"children":7337},{},[7338,7348,7358,7375],{"type":54,"tag":80,"props":7339,"children":7340},{},[7341,7346],{"type":54,"tag":84,"props":7342,"children":7343},{},[7344],{"type":60,"value":7345},"Static credentials only",{"type":60,"value":7347}," — no native Entra ID, OIDC, or managed identity support",{"type":54,"tag":80,"props":7349,"children":7350},{},[7351,7356],{"type":54,"tag":84,"props":7352,"children":7353},{},[7354],{"type":60,"value":7355},"No auto-refresh",{"type":60,"value":7357}," — expired tokens require creating a new session",{"type":54,"tag":80,"props":7359,"children":7360},{},[7361,7366,7368,7373],{"type":54,"tag":84,"props":7362,"children":7363},{},[7364],{"type":60,"value":7365},"Keys not persisted",{"type":60,"value":7367}," — must re-provide ",{"type":54,"tag":92,"props":7369,"children":7371},{"className":7370},[],[7372],{"type":60,"value":6340},{"type":60,"value":7374}," config on session resume",{"type":54,"tag":80,"props":7376,"children":7377},{},[7378,7383],{"type":54,"tag":84,"props":7379,"children":7380},{},[7381],{"type":60,"value":7382},"Model availability",{"type":60,"value":7384}," — limited to what your provider offers",{"type":54,"tag":362,"props":7386,"children":7387},{},[],{"type":54,"tag":69,"props":7389,"children":7391},{"id":7390},"session-persistence",[7392],{"type":60,"value":7393},"Session Persistence",{"type":54,"tag":63,"props":7395,"children":7396},{},[7397],{"type":60,"value":7398},"Resume sessions across restarts by providing your own session ID.",{"type":54,"tag":271,"props":7400,"children":7402},{"className":385,"code":7401,"language":21,"meta":279,"style":279},"\u002F\u002F Create with explicit ID\nconst session = await client.createSession({\n    sessionId: \"user-123-task-456\",\n    model: \"gpt-4.1\",\n});\n\n\u002F\u002F Resume later (even from a different client instance)\nconst resumed = await client.resumeSession(\"user-123-task-456\");\nawait resumed.sendAndWait({ prompt: \"What did we discuss?\" });\n",[7403],{"type":54,"tag":92,"props":7404,"children":7405},{"__ignoreMap":279},[7406,7414,7453,7482,7509,7524,7531,7539,7596],{"type":54,"tag":392,"props":7407,"children":7408},{"class":394,"line":395},[7409],{"type":54,"tag":392,"props":7410,"children":7411},{"style":3248},[7412],{"type":60,"value":7413},"\u002F\u002F Create with explicit ID\n",{"type":54,"tag":392,"props":7415,"children":7416},{"class":394,"line":447},[7417,7421,7425,7429,7433,7437,7441,7445,7449],{"type":54,"tag":392,"props":7418,"children":7419},{"style":461},[7420],{"type":60,"value":464},{"type":54,"tag":392,"props":7422,"children":7423},{"style":411},[7424],{"type":60,"value":506},{"type":54,"tag":392,"props":7426,"children":7427},{"style":405},[7428],{"type":60,"value":474},{"type":54,"tag":392,"props":7430,"children":7431},{"style":399},[7432],{"type":60,"value":515},{"type":54,"tag":392,"props":7434,"children":7435},{"style":411},[7436],{"type":60,"value":520},{"type":54,"tag":392,"props":7438,"children":7439},{"style":405},[7440],{"type":60,"value":525},{"type":54,"tag":392,"props":7442,"children":7443},{"style":482},[7444],{"type":60,"value":530},{"type":54,"tag":392,"props":7446,"children":7447},{"style":411},[7448],{"type":60,"value":535},{"type":54,"tag":392,"props":7450,"children":7451},{"style":405},[7452],{"type":60,"value":2065},{"type":54,"tag":392,"props":7454,"children":7455},{"class":394,"line":457},[7456,7461,7465,7469,7474,7478],{"type":54,"tag":392,"props":7457,"children":7458},{"style":543},[7459],{"type":60,"value":7460},"    sessionId",{"type":54,"tag":392,"props":7462,"children":7463},{"style":405},[7464],{"type":60,"value":551},{"type":54,"tag":392,"props":7466,"children":7467},{"style":405},[7468],{"type":60,"value":429},{"type":54,"tag":392,"props":7470,"children":7471},{"style":432},[7472],{"type":60,"value":7473},"user-123-task-456",{"type":54,"tag":392,"props":7475,"children":7476},{"style":405},[7477],{"type":60,"value":439},{"type":54,"tag":392,"props":7479,"children":7480},{"style":405},[7481],{"type":60,"value":1714},{"type":54,"tag":392,"props":7483,"children":7484},{"class":394,"line":496},[7485,7489,7493,7497,7501,7505],{"type":54,"tag":392,"props":7486,"children":7487},{"style":543},[7488],{"type":60,"value":2074},{"type":54,"tag":392,"props":7490,"children":7491},{"style":405},[7492],{"type":60,"value":551},{"type":54,"tag":392,"props":7494,"children":7495},{"style":405},[7496],{"type":60,"value":429},{"type":54,"tag":392,"props":7498,"children":7499},{"style":432},[7500],{"type":60,"value":560},{"type":54,"tag":392,"props":7502,"children":7503},{"style":405},[7504],{"type":60,"value":439},{"type":54,"tag":392,"props":7506,"children":7507},{"style":405},[7508],{"type":60,"value":1714},{"type":54,"tag":392,"props":7510,"children":7511},{"class":394,"line":579},[7512,7516,7520],{"type":54,"tag":392,"props":7513,"children":7514},{"style":405},[7515],{"type":60,"value":1228},{"type":54,"tag":392,"props":7517,"children":7518},{"style":411},[7519],{"type":60,"value":99},{"type":54,"tag":392,"props":7521,"children":7522},{"style":405},[7523],{"type":60,"value":444},{"type":54,"tag":392,"props":7525,"children":7526},{"class":394,"line":587},[7527],{"type":54,"tag":392,"props":7528,"children":7529},{"emptyLinePlaceholder":451},[7530],{"type":60,"value":454},{"type":54,"tag":392,"props":7532,"children":7533},{"class":394,"line":664},[7534],{"type":54,"tag":392,"props":7535,"children":7536},{"style":3248},[7537],{"type":60,"value":7538},"\u002F\u002F Resume later (even from a different client instance)\n",{"type":54,"tag":392,"props":7540,"children":7541},{"class":394,"line":710},[7542,7546,7551,7555,7559,7563,7567,7572,7576,7580,7584,7588,7592],{"type":54,"tag":392,"props":7543,"children":7544},{"style":461},[7545],{"type":60,"value":464},{"type":54,"tag":392,"props":7547,"children":7548},{"style":411},[7549],{"type":60,"value":7550}," resumed ",{"type":54,"tag":392,"props":7552,"children":7553},{"style":405},[7554],{"type":60,"value":474},{"type":54,"tag":392,"props":7556,"children":7557},{"style":399},[7558],{"type":60,"value":515},{"type":54,"tag":392,"props":7560,"children":7561},{"style":411},[7562],{"type":60,"value":520},{"type":54,"tag":392,"props":7564,"children":7565},{"style":405},[7566],{"type":60,"value":525},{"type":54,"tag":392,"props":7568,"children":7569},{"style":482},[7570],{"type":60,"value":7571},"resumeSession",{"type":54,"tag":392,"props":7573,"children":7574},{"style":411},[7575],{"type":60,"value":535},{"type":54,"tag":392,"props":7577,"children":7578},{"style":405},[7579],{"type":60,"value":439},{"type":54,"tag":392,"props":7581,"children":7582},{"style":432},[7583],{"type":60,"value":7473},{"type":54,"tag":392,"props":7585,"children":7586},{"style":405},[7587],{"type":60,"value":439},{"type":54,"tag":392,"props":7589,"children":7590},{"style":411},[7591],{"type":60,"value":99},{"type":54,"tag":392,"props":7593,"children":7594},{"style":405},[7595],{"type":60,"value":444},{"type":54,"tag":392,"props":7597,"children":7598},{"class":394,"line":718},[7599,7603,7608,7612,7616,7620,7624,7628,7632,7636,7641,7645,7649,7653],{"type":54,"tag":392,"props":7600,"children":7601},{"style":399},[7602],{"type":60,"value":724},{"type":54,"tag":392,"props":7604,"children":7605},{"style":411},[7606],{"type":60,"value":7607}," resumed",{"type":54,"tag":392,"props":7609,"children":7610},{"style":405},[7611],{"type":60,"value":525},{"type":54,"tag":392,"props":7613,"children":7614},{"style":482},[7615],{"type":60,"value":619},{"type":54,"tag":392,"props":7617,"children":7618},{"style":411},[7619],{"type":60,"value":535},{"type":54,"tag":392,"props":7621,"children":7622},{"style":405},[7623],{"type":60,"value":540},{"type":54,"tag":392,"props":7625,"children":7626},{"style":543},[7627],{"type":60,"value":632},{"type":54,"tag":392,"props":7629,"children":7630},{"style":405},[7631],{"type":60,"value":551},{"type":54,"tag":392,"props":7633,"children":7634},{"style":405},[7635],{"type":60,"value":429},{"type":54,"tag":392,"props":7637,"children":7638},{"style":432},[7639],{"type":60,"value":7640},"What did we discuss?",{"type":54,"tag":392,"props":7642,"children":7643},{"style":405},[7644],{"type":60,"value":439},{"type":54,"tag":392,"props":7646,"children":7647},{"style":405},[7648],{"type":60,"value":419},{"type":54,"tag":392,"props":7650,"children":7651},{"style":411},[7652],{"type":60,"value":99},{"type":54,"tag":392,"props":7654,"children":7655},{"style":405},[7656],{"type":60,"value":444},{"type":54,"tag":377,"props":7658,"children":7660},{"id":7659},"session-management",[7661],{"type":60,"value":7662},"Session Management",{"type":54,"tag":271,"props":7664,"children":7666},{"className":385,"code":7665,"language":21,"meta":279,"style":279},"const sessions = await client.listSessions();           \u002F\u002F List all\nconst lastId = await client.getLastSessionId();          \u002F\u002F Get most recent\nawait client.deleteSession(\"user-123-task-456\");         \u002F\u002F Delete from storage\nawait session.destroy();                                 \u002F\u002F Destroy active session\n",[7667],{"type":54,"tag":92,"props":7668,"children":7669},{"__ignoreMap":279},[7670,7717,7763,7812],{"type":54,"tag":392,"props":7671,"children":7672},{"class":394,"line":395},[7673,7677,7682,7686,7690,7694,7698,7703,7707,7712],{"type":54,"tag":392,"props":7674,"children":7675},{"style":461},[7676],{"type":60,"value":464},{"type":54,"tag":392,"props":7678,"children":7679},{"style":411},[7680],{"type":60,"value":7681}," sessions ",{"type":54,"tag":392,"props":7683,"children":7684},{"style":405},[7685],{"type":60,"value":474},{"type":54,"tag":392,"props":7687,"children":7688},{"style":399},[7689],{"type":60,"value":515},{"type":54,"tag":392,"props":7691,"children":7692},{"style":411},[7693],{"type":60,"value":520},{"type":54,"tag":392,"props":7695,"children":7696},{"style":405},[7697],{"type":60,"value":525},{"type":54,"tag":392,"props":7699,"children":7700},{"style":482},[7701],{"type":60,"value":7702},"listSessions",{"type":54,"tag":392,"props":7704,"children":7705},{"style":411},[7706],{"type":60,"value":489},{"type":54,"tag":392,"props":7708,"children":7709},{"style":405},[7710],{"type":60,"value":7711},";",{"type":54,"tag":392,"props":7713,"children":7714},{"style":3248},[7715],{"type":60,"value":7716},"           \u002F\u002F List all\n",{"type":54,"tag":392,"props":7718,"children":7719},{"class":394,"line":447},[7720,7724,7729,7733,7737,7741,7745,7750,7754,7758],{"type":54,"tag":392,"props":7721,"children":7722},{"style":461},[7723],{"type":60,"value":464},{"type":54,"tag":392,"props":7725,"children":7726},{"style":411},[7727],{"type":60,"value":7728}," lastId ",{"type":54,"tag":392,"props":7730,"children":7731},{"style":405},[7732],{"type":60,"value":474},{"type":54,"tag":392,"props":7734,"children":7735},{"style":399},[7736],{"type":60,"value":515},{"type":54,"tag":392,"props":7738,"children":7739},{"style":411},[7740],{"type":60,"value":520},{"type":54,"tag":392,"props":7742,"children":7743},{"style":405},[7744],{"type":60,"value":525},{"type":54,"tag":392,"props":7746,"children":7747},{"style":482},[7748],{"type":60,"value":7749},"getLastSessionId",{"type":54,"tag":392,"props":7751,"children":7752},{"style":411},[7753],{"type":60,"value":489},{"type":54,"tag":392,"props":7755,"children":7756},{"style":405},[7757],{"type":60,"value":7711},{"type":54,"tag":392,"props":7759,"children":7760},{"style":3248},[7761],{"type":60,"value":7762},"          \u002F\u002F Get most recent\n",{"type":54,"tag":392,"props":7764,"children":7765},{"class":394,"line":457},[7766,7770,7774,7778,7783,7787,7791,7795,7799,7803,7807],{"type":54,"tag":392,"props":7767,"children":7768},{"style":399},[7769],{"type":60,"value":724},{"type":54,"tag":392,"props":7771,"children":7772},{"style":411},[7773],{"type":60,"value":520},{"type":54,"tag":392,"props":7775,"children":7776},{"style":405},[7777],{"type":60,"value":525},{"type":54,"tag":392,"props":7779,"children":7780},{"style":482},[7781],{"type":60,"value":7782},"deleteSession",{"type":54,"tag":392,"props":7784,"children":7785},{"style":411},[7786],{"type":60,"value":535},{"type":54,"tag":392,"props":7788,"children":7789},{"style":405},[7790],{"type":60,"value":439},{"type":54,"tag":392,"props":7792,"children":7793},{"style":432},[7794],{"type":60,"value":7473},{"type":54,"tag":392,"props":7796,"children":7797},{"style":405},[7798],{"type":60,"value":439},{"type":54,"tag":392,"props":7800,"children":7801},{"style":411},[7802],{"type":60,"value":99},{"type":54,"tag":392,"props":7804,"children":7805},{"style":405},[7806],{"type":60,"value":7711},{"type":54,"tag":392,"props":7808,"children":7809},{"style":3248},[7810],{"type":60,"value":7811},"         \u002F\u002F Delete from storage\n",{"type":54,"tag":392,"props":7813,"children":7814},{"class":394,"line":496},[7815,7819,7823,7827,7832,7836,7840],{"type":54,"tag":392,"props":7816,"children":7817},{"style":399},[7818],{"type":60,"value":724},{"type":54,"tag":392,"props":7820,"children":7821},{"style":411},[7822],{"type":60,"value":610},{"type":54,"tag":392,"props":7824,"children":7825},{"style":405},[7826],{"type":60,"value":525},{"type":54,"tag":392,"props":7828,"children":7829},{"style":482},[7830],{"type":60,"value":7831},"destroy",{"type":54,"tag":392,"props":7833,"children":7834},{"style":411},[7835],{"type":60,"value":489},{"type":54,"tag":392,"props":7837,"children":7838},{"style":405},[7839],{"type":60,"value":7711},{"type":54,"tag":392,"props":7841,"children":7842},{"style":3248},[7843],{"type":60,"value":7844},"                                 \u002F\u002F Destroy active session\n",{"type":54,"tag":377,"props":7846,"children":7848},{"id":7847},"resume-options",[7849],{"type":60,"value":7850},"Resume Options",{"type":54,"tag":63,"props":7852,"children":7853},{},[7854,7856,7862,7863,7869,7870,7876,7877,7883,7884,7889,7891,7897,7898,7904,7905,7911,7912,7918,7919,7925,7926,7932],{"type":60,"value":7855},"When resuming, you can reconfigure: ",{"type":54,"tag":92,"props":7857,"children":7859},{"className":7858},[],[7860],{"type":60,"value":7861},"model",{"type":60,"value":2993},{"type":54,"tag":92,"props":7864,"children":7866},{"className":7865},[],[7867],{"type":60,"value":7868},"systemMessage",{"type":60,"value":2993},{"type":54,"tag":92,"props":7871,"children":7873},{"className":7872},[],[7874],{"type":60,"value":7875},"availableTools",{"type":60,"value":2993},{"type":54,"tag":92,"props":7878,"children":7880},{"className":7879},[],[7881],{"type":60,"value":7882},"excludedTools",{"type":60,"value":2993},{"type":54,"tag":92,"props":7885,"children":7887},{"className":7886},[],[7888],{"type":60,"value":6340},{"type":60,"value":7890}," (required for BYOK), ",{"type":54,"tag":92,"props":7892,"children":7894},{"className":7893},[],[7895],{"type":60,"value":7896},"reasoningEffort",{"type":60,"value":2993},{"type":54,"tag":92,"props":7899,"children":7901},{"className":7900},[],[7902],{"type":60,"value":7903},"streaming",{"type":60,"value":2993},{"type":54,"tag":92,"props":7906,"children":7908},{"className":7907},[],[7909],{"type":60,"value":7910},"mcpServers",{"type":60,"value":2993},{"type":54,"tag":92,"props":7913,"children":7915},{"className":7914},[],[7916],{"type":60,"value":7917},"customAgents",{"type":60,"value":2993},{"type":54,"tag":92,"props":7920,"children":7922},{"className":7921},[],[7923],{"type":60,"value":7924},"skillDirectories",{"type":60,"value":2993},{"type":54,"tag":92,"props":7927,"children":7929},{"className":7928},[],[7930],{"type":60,"value":7931},"infiniteSessions",{"type":60,"value":525},{"type":54,"tag":377,"props":7934,"children":7936},{"id":7935},"session-id-best-practices",[7937],{"type":60,"value":7938},"Session ID Best Practices",{"type":54,"tag":127,"props":7940,"children":7941},{},[7942,7962],{"type":54,"tag":131,"props":7943,"children":7944},{},[7945],{"type":54,"tag":135,"props":7946,"children":7947},{},[7948,7953,7958],{"type":54,"tag":139,"props":7949,"children":7950},{},[7951],{"type":60,"value":7952},"Pattern",{"type":54,"tag":139,"props":7954,"children":7955},{},[7956],{"type":60,"value":7957},"Example",{"type":54,"tag":139,"props":7959,"children":7960},{},[7961],{"type":60,"value":313},{"type":54,"tag":155,"props":7963,"children":7964},{},[7965,7991,8017],{"type":54,"tag":135,"props":7966,"children":7967},{},[7968,7977,7986],{"type":54,"tag":162,"props":7969,"children":7970},{},[7971],{"type":54,"tag":92,"props":7972,"children":7974},{"className":7973},[],[7975],{"type":60,"value":7976},"user-{userId}-{taskId}",{"type":54,"tag":162,"props":7978,"children":7979},{},[7980],{"type":54,"tag":92,"props":7981,"children":7983},{"className":7982},[],[7984],{"type":60,"value":7985},"user-alice-pr-review-42",{"type":54,"tag":162,"props":7987,"children":7988},{},[7989],{"type":60,"value":7990},"Multi-user apps",{"type":54,"tag":135,"props":7992,"children":7993},{},[7994,8003,8012],{"type":54,"tag":162,"props":7995,"children":7996},{},[7997],{"type":54,"tag":92,"props":7998,"children":8000},{"className":7999},[],[8001],{"type":60,"value":8002},"tenant-{tenantId}-{workflow}",{"type":54,"tag":162,"props":8004,"children":8005},{},[8006],{"type":54,"tag":92,"props":8007,"children":8009},{"className":8008},[],[8010],{"type":60,"value":8011},"tenant-acme-onboarding",{"type":54,"tag":162,"props":8013,"children":8014},{},[8015],{"type":60,"value":8016},"Multi-tenant SaaS",{"type":54,"tag":135,"props":8018,"children":8019},{},[8020,8029,8038],{"type":54,"tag":162,"props":8021,"children":8022},{},[8023],{"type":54,"tag":92,"props":8024,"children":8026},{"className":8025},[],[8027],{"type":60,"value":8028},"{userId}-{taskType}-{timestamp}",{"type":54,"tag":162,"props":8030,"children":8031},{},[8032],{"type":54,"tag":92,"props":8033,"children":8035},{"className":8034},[],[8036],{"type":60,"value":8037},"alice-deploy-1706932800",{"type":54,"tag":162,"props":8039,"children":8040},{},[8041],{"type":60,"value":8042},"Time-based cleanup",{"type":54,"tag":377,"props":8044,"children":8046},{"id":8045},"what-gets-persisted",[8047],{"type":60,"value":8048},"What Gets Persisted",{"type":54,"tag":63,"props":8050,"children":8051},{},[8052,8054,8060],{"type":60,"value":8053},"Session state is saved to ",{"type":54,"tag":92,"props":8055,"children":8057},{"className":8056},[],[8058],{"type":60,"value":8059},"~\u002F.copilot\u002Fsession-state\u002F{sessionId}\u002F",{"type":60,"value":551},{"type":54,"tag":127,"props":8062,"children":8063},{},[8064,8085],{"type":54,"tag":131,"props":8065,"children":8066},{},[8067],{"type":54,"tag":135,"props":8068,"children":8069},{},[8070,8075,8080],{"type":54,"tag":139,"props":8071,"children":8072},{},[8073],{"type":60,"value":8074},"Data",{"type":54,"tag":139,"props":8076,"children":8077},{},[8078],{"type":60,"value":8079},"Persisted?",{"type":54,"tag":139,"props":8081,"children":8082},{},[8083],{"type":60,"value":8084},"Notes",{"type":54,"tag":155,"props":8086,"children":8087},{},[8088,8106,8123,8146,8171,8189],{"type":54,"tag":135,"props":8089,"children":8090},{},[8091,8096,8101],{"type":54,"tag":162,"props":8092,"children":8093},{},[8094],{"type":60,"value":8095},"Conversation history",{"type":54,"tag":162,"props":8097,"children":8098},{},[8099],{"type":60,"value":8100},"✅ Yes",{"type":54,"tag":162,"props":8102,"children":8103},{},[8104],{"type":60,"value":8105},"Full message thread",{"type":54,"tag":135,"props":8107,"children":8108},{},[8109,8114,8118],{"type":54,"tag":162,"props":8110,"children":8111},{},[8112],{"type":60,"value":8113},"Tool call results",{"type":54,"tag":162,"props":8115,"children":8116},{},[8117],{"type":60,"value":8100},{"type":54,"tag":162,"props":8119,"children":8120},{},[8121],{"type":60,"value":8122},"Cached for context",{"type":54,"tag":135,"props":8124,"children":8125},{},[8126,8131,8135],{"type":54,"tag":162,"props":8127,"children":8128},{},[8129],{"type":60,"value":8130},"Agent planning state",{"type":54,"tag":162,"props":8132,"children":8133},{},[8134],{"type":60,"value":8100},{"type":54,"tag":162,"props":8136,"children":8137},{},[8138,8144],{"type":54,"tag":92,"props":8139,"children":8141},{"className":8140},[],[8142],{"type":60,"value":8143},"plan.md",{"type":60,"value":8145}," file",{"type":54,"tag":135,"props":8147,"children":8148},{},[8149,8154,8158],{"type":54,"tag":162,"props":8150,"children":8151},{},[8152],{"type":60,"value":8153},"Session artifacts",{"type":54,"tag":162,"props":8155,"children":8156},{},[8157],{"type":60,"value":8100},{"type":54,"tag":162,"props":8159,"children":8160},{},[8161,8163,8169],{"type":60,"value":8162},"In ",{"type":54,"tag":92,"props":8164,"children":8166},{"className":8165},[],[8167],{"type":60,"value":8168},"files\u002F",{"type":60,"value":8170}," directory",{"type":54,"tag":135,"props":8172,"children":8173},{},[8174,8179,8184],{"type":54,"tag":162,"props":8175,"children":8176},{},[8177],{"type":60,"value":8178},"Provider\u002FAPI keys",{"type":54,"tag":162,"props":8180,"children":8181},{},[8182],{"type":60,"value":8183},"❌ No",{"type":54,"tag":162,"props":8185,"children":8186},{},[8187],{"type":60,"value":8188},"Must re-provide on resume",{"type":54,"tag":135,"props":8190,"children":8191},{},[8192,8197,8201],{"type":54,"tag":162,"props":8193,"children":8194},{},[8195],{"type":60,"value":8196},"In-memory tool state",{"type":54,"tag":162,"props":8198,"children":8199},{},[8200],{"type":60,"value":8183},{"type":54,"tag":162,"props":8202,"children":8203},{},[8204],{"type":60,"value":8205},"Design tools to be stateless",{"type":54,"tag":377,"props":8207,"children":8209},{"id":8208},"infinite-sessions",[8210],{"type":60,"value":8211},"Infinite Sessions",{"type":54,"tag":63,"props":8213,"children":8214},{},[8215],{"type":60,"value":8216},"For long-running workflows that may exceed context limits, enable auto-compaction:",{"type":54,"tag":271,"props":8218,"children":8220},{"className":385,"code":8219,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    infiniteSessions: {\n        enabled: true,\n        backgroundCompactionThreshold: 0.80,  \u002F\u002F Start background compaction at 80%\n        bufferExhaustionThreshold: 0.95,       \u002F\u002F Block and compact at 95%\n    },\n});\n",[8221],{"type":54,"tag":92,"props":8222,"children":8223},{"__ignoreMap":279},[8224,8263,8279,8299,8325,8351,8358],{"type":54,"tag":392,"props":8225,"children":8226},{"class":394,"line":395},[8227,8231,8235,8239,8243,8247,8251,8255,8259],{"type":54,"tag":392,"props":8228,"children":8229},{"style":461},[8230],{"type":60,"value":464},{"type":54,"tag":392,"props":8232,"children":8233},{"style":411},[8234],{"type":60,"value":506},{"type":54,"tag":392,"props":8236,"children":8237},{"style":405},[8238],{"type":60,"value":474},{"type":54,"tag":392,"props":8240,"children":8241},{"style":399},[8242],{"type":60,"value":515},{"type":54,"tag":392,"props":8244,"children":8245},{"style":411},[8246],{"type":60,"value":520},{"type":54,"tag":392,"props":8248,"children":8249},{"style":405},[8250],{"type":60,"value":525},{"type":54,"tag":392,"props":8252,"children":8253},{"style":482},[8254],{"type":60,"value":530},{"type":54,"tag":392,"props":8256,"children":8257},{"style":411},[8258],{"type":60,"value":535},{"type":54,"tag":392,"props":8260,"children":8261},{"style":405},[8262],{"type":60,"value":2065},{"type":54,"tag":392,"props":8264,"children":8265},{"class":394,"line":447},[8266,8271,8275],{"type":54,"tag":392,"props":8267,"children":8268},{"style":543},[8269],{"type":60,"value":8270},"    infiniteSessions",{"type":54,"tag":392,"props":8272,"children":8273},{"style":405},[8274],{"type":60,"value":551},{"type":54,"tag":392,"props":8276,"children":8277},{"style":405},[8278],{"type":60,"value":1161},{"type":54,"tag":392,"props":8280,"children":8281},{"class":394,"line":457},[8282,8287,8291,8295],{"type":54,"tag":392,"props":8283,"children":8284},{"style":543},[8285],{"type":60,"value":8286},"        enabled",{"type":54,"tag":392,"props":8288,"children":8289},{"style":405},[8290],{"type":60,"value":551},{"type":54,"tag":392,"props":8292,"children":8293},{"style":1076},[8294],{"type":60,"value":1079},{"type":54,"tag":392,"props":8296,"children":8297},{"style":405},[8298],{"type":60,"value":1714},{"type":54,"tag":392,"props":8300,"children":8301},{"class":394,"line":496},[8302,8307,8311,8316,8320],{"type":54,"tag":392,"props":8303,"children":8304},{"style":543},[8305],{"type":60,"value":8306},"        backgroundCompactionThreshold",{"type":54,"tag":392,"props":8308,"children":8309},{"style":405},[8310],{"type":60,"value":551},{"type":54,"tag":392,"props":8312,"children":8313},{"style":4393},[8314],{"type":60,"value":8315}," 0.80",{"type":54,"tag":392,"props":8317,"children":8318},{"style":405},[8319],{"type":60,"value":1064},{"type":54,"tag":392,"props":8321,"children":8322},{"style":3248},[8323],{"type":60,"value":8324},"  \u002F\u002F Start background compaction at 80%\n",{"type":54,"tag":392,"props":8326,"children":8327},{"class":394,"line":579},[8328,8333,8337,8342,8346],{"type":54,"tag":392,"props":8329,"children":8330},{"style":543},[8331],{"type":60,"value":8332},"        bufferExhaustionThreshold",{"type":54,"tag":392,"props":8334,"children":8335},{"style":405},[8336],{"type":60,"value":551},{"type":54,"tag":392,"props":8338,"children":8339},{"style":4393},[8340],{"type":60,"value":8341}," 0.95",{"type":54,"tag":392,"props":8343,"children":8344},{"style":405},[8345],{"type":60,"value":1064},{"type":54,"tag":392,"props":8347,"children":8348},{"style":3248},[8349],{"type":60,"value":8350},"       \u002F\u002F Block and compact at 95%\n",{"type":54,"tag":392,"props":8352,"children":8353},{"class":394,"line":587},[8354],{"type":54,"tag":392,"props":8355,"children":8356},{"style":405},[8357],{"type":60,"value":1892},{"type":54,"tag":392,"props":8359,"children":8360},{"class":394,"line":664},[8361,8365,8369],{"type":54,"tag":392,"props":8362,"children":8363},{"style":405},[8364],{"type":60,"value":1228},{"type":54,"tag":392,"props":8366,"children":8367},{"style":411},[8368],{"type":60,"value":99},{"type":54,"tag":392,"props":8370,"children":8371},{"style":405},[8372],{"type":60,"value":444},{"type":54,"tag":7316,"props":8374,"children":8375},{},[8376],{"type":54,"tag":63,"props":8377,"children":8378},{},[8379],{"type":60,"value":8380},"Thresholds are context utilization ratios (0.0–1.0), not absolute token counts.",{"type":54,"tag":362,"props":8382,"children":8383},{},[],{"type":54,"tag":69,"props":8385,"children":8387},{"id":8386},"custom-agents",[8388],{"type":60,"value":8389},"Custom Agents",{"type":54,"tag":63,"props":8391,"children":8392},{},[8393],{"type":60,"value":8394},"Define specialized AI personas:",{"type":54,"tag":271,"props":8396,"children":8398},{"className":385,"code":8397,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    customAgents: [{\n        name: \"pr-reviewer\",\n        displayName: \"PR Reviewer\",\n        description: \"Reviews pull requests for best practices\",\n        prompt: \"You are an expert code reviewer. Focus on security, performance, and maintainability.\",\n    }],\n});\n",[8399],{"type":54,"tag":92,"props":8400,"children":8401},{"__ignoreMap":279},[8402,8441,8461,8490,8519,8548,8577,8593],{"type":54,"tag":392,"props":8403,"children":8404},{"class":394,"line":395},[8405,8409,8413,8417,8421,8425,8429,8433,8437],{"type":54,"tag":392,"props":8406,"children":8407},{"style":461},[8408],{"type":60,"value":464},{"type":54,"tag":392,"props":8410,"children":8411},{"style":411},[8412],{"type":60,"value":506},{"type":54,"tag":392,"props":8414,"children":8415},{"style":405},[8416],{"type":60,"value":474},{"type":54,"tag":392,"props":8418,"children":8419},{"style":399},[8420],{"type":60,"value":515},{"type":54,"tag":392,"props":8422,"children":8423},{"style":411},[8424],{"type":60,"value":520},{"type":54,"tag":392,"props":8426,"children":8427},{"style":405},[8428],{"type":60,"value":525},{"type":54,"tag":392,"props":8430,"children":8431},{"style":482},[8432],{"type":60,"value":530},{"type":54,"tag":392,"props":8434,"children":8435},{"style":411},[8436],{"type":60,"value":535},{"type":54,"tag":392,"props":8438,"children":8439},{"style":405},[8440],{"type":60,"value":2065},{"type":54,"tag":392,"props":8442,"children":8443},{"class":394,"line":447},[8444,8449,8453,8457],{"type":54,"tag":392,"props":8445,"children":8446},{"style":543},[8447],{"type":60,"value":8448},"    customAgents",{"type":54,"tag":392,"props":8450,"children":8451},{"style":405},[8452],{"type":60,"value":551},{"type":54,"tag":392,"props":8454,"children":8455},{"style":411},[8456],{"type":60,"value":1862},{"type":54,"tag":392,"props":8458,"children":8459},{"style":405},[8460],{"type":60,"value":2065},{"type":54,"tag":392,"props":8462,"children":8463},{"class":394,"line":457},[8464,8469,8473,8477,8482,8486],{"type":54,"tag":392,"props":8465,"children":8466},{"style":543},[8467],{"type":60,"value":8468},"        name",{"type":54,"tag":392,"props":8470,"children":8471},{"style":405},[8472],{"type":60,"value":551},{"type":54,"tag":392,"props":8474,"children":8475},{"style":405},[8476],{"type":60,"value":429},{"type":54,"tag":392,"props":8478,"children":8479},{"style":432},[8480],{"type":60,"value":8481},"pr-reviewer",{"type":54,"tag":392,"props":8483,"children":8484},{"style":405},[8485],{"type":60,"value":439},{"type":54,"tag":392,"props":8487,"children":8488},{"style":405},[8489],{"type":60,"value":1714},{"type":54,"tag":392,"props":8491,"children":8492},{"class":394,"line":496},[8493,8498,8502,8506,8511,8515],{"type":54,"tag":392,"props":8494,"children":8495},{"style":543},[8496],{"type":60,"value":8497},"        displayName",{"type":54,"tag":392,"props":8499,"children":8500},{"style":405},[8501],{"type":60,"value":551},{"type":54,"tag":392,"props":8503,"children":8504},{"style":405},[8505],{"type":60,"value":429},{"type":54,"tag":392,"props":8507,"children":8508},{"style":432},[8509],{"type":60,"value":8510},"PR Reviewer",{"type":54,"tag":392,"props":8512,"children":8513},{"style":405},[8514],{"type":60,"value":439},{"type":54,"tag":392,"props":8516,"children":8517},{"style":405},[8518],{"type":60,"value":1714},{"type":54,"tag":392,"props":8520,"children":8521},{"class":394,"line":579},[8522,8527,8531,8535,8540,8544],{"type":54,"tag":392,"props":8523,"children":8524},{"style":543},[8525],{"type":60,"value":8526},"        description",{"type":54,"tag":392,"props":8528,"children":8529},{"style":405},[8530],{"type":60,"value":551},{"type":54,"tag":392,"props":8532,"children":8533},{"style":405},[8534],{"type":60,"value":429},{"type":54,"tag":392,"props":8536,"children":8537},{"style":432},[8538],{"type":60,"value":8539},"Reviews pull requests for best practices",{"type":54,"tag":392,"props":8541,"children":8542},{"style":405},[8543],{"type":60,"value":439},{"type":54,"tag":392,"props":8545,"children":8546},{"style":405},[8547],{"type":60,"value":1714},{"type":54,"tag":392,"props":8549,"children":8550},{"class":394,"line":587},[8551,8556,8560,8564,8569,8573],{"type":54,"tag":392,"props":8552,"children":8553},{"style":543},[8554],{"type":60,"value":8555},"        prompt",{"type":54,"tag":392,"props":8557,"children":8558},{"style":405},[8559],{"type":60,"value":551},{"type":54,"tag":392,"props":8561,"children":8562},{"style":405},[8563],{"type":60,"value":429},{"type":54,"tag":392,"props":8565,"children":8566},{"style":432},[8567],{"type":60,"value":8568},"You are an expert code reviewer. Focus on security, performance, and maintainability.",{"type":54,"tag":392,"props":8570,"children":8571},{"style":405},[8572],{"type":60,"value":439},{"type":54,"tag":392,"props":8574,"children":8575},{"style":405},[8576],{"type":60,"value":1714},{"type":54,"tag":392,"props":8578,"children":8579},{"class":394,"line":664},[8580,8585,8589],{"type":54,"tag":392,"props":8581,"children":8582},{"style":405},[8583],{"type":60,"value":8584},"    }",{"type":54,"tag":392,"props":8586,"children":8587},{"style":411},[8588],{"type":60,"value":1880},{"type":54,"tag":392,"props":8590,"children":8591},{"style":405},[8592],{"type":60,"value":1714},{"type":54,"tag":392,"props":8594,"children":8595},{"class":394,"line":710},[8596,8600,8604],{"type":54,"tag":392,"props":8597,"children":8598},{"style":405},[8599],{"type":60,"value":1228},{"type":54,"tag":392,"props":8601,"children":8602},{"style":411},[8603],{"type":60,"value":99},{"type":54,"tag":392,"props":8605,"children":8606},{"style":405},[8607],{"type":60,"value":444},{"type":54,"tag":362,"props":8609,"children":8610},{},[],{"type":54,"tag":69,"props":8612,"children":8614},{"id":8613},"system-message",[8615],{"type":60,"value":8616},"System Message",{"type":54,"tag":63,"props":8618,"children":8619},{},[8620],{"type":60,"value":8621},"Control AI behavior and personality:",{"type":54,"tag":271,"props":8623,"children":8625},{"className":385,"code":8624,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    systemMessage: { content: \"You are a helpful assistant. Always be concise.\" },\n});\n",[8626],{"type":54,"tag":92,"props":8627,"children":8628},{"__ignoreMap":279},[8629,8668,8710],{"type":54,"tag":392,"props":8630,"children":8631},{"class":394,"line":395},[8632,8636,8640,8644,8648,8652,8656,8660,8664],{"type":54,"tag":392,"props":8633,"children":8634},{"style":461},[8635],{"type":60,"value":464},{"type":54,"tag":392,"props":8637,"children":8638},{"style":411},[8639],{"type":60,"value":506},{"type":54,"tag":392,"props":8641,"children":8642},{"style":405},[8643],{"type":60,"value":474},{"type":54,"tag":392,"props":8645,"children":8646},{"style":399},[8647],{"type":60,"value":515},{"type":54,"tag":392,"props":8649,"children":8650},{"style":411},[8651],{"type":60,"value":520},{"type":54,"tag":392,"props":8653,"children":8654},{"style":405},[8655],{"type":60,"value":525},{"type":54,"tag":392,"props":8657,"children":8658},{"style":482},[8659],{"type":60,"value":530},{"type":54,"tag":392,"props":8661,"children":8662},{"style":411},[8663],{"type":60,"value":535},{"type":54,"tag":392,"props":8665,"children":8666},{"style":405},[8667],{"type":60,"value":2065},{"type":54,"tag":392,"props":8669,"children":8670},{"class":394,"line":447},[8671,8676,8680,8684,8689,8693,8697,8702,8706],{"type":54,"tag":392,"props":8672,"children":8673},{"style":543},[8674],{"type":60,"value":8675},"    systemMessage",{"type":54,"tag":392,"props":8677,"children":8678},{"style":405},[8679],{"type":60,"value":551},{"type":54,"tag":392,"props":8681,"children":8682},{"style":405},[8683],{"type":60,"value":408},{"type":54,"tag":392,"props":8685,"children":8686},{"style":543},[8687],{"type":60,"value":8688}," content",{"type":54,"tag":392,"props":8690,"children":8691},{"style":405},[8692],{"type":60,"value":551},{"type":54,"tag":392,"props":8694,"children":8695},{"style":405},[8696],{"type":60,"value":429},{"type":54,"tag":392,"props":8698,"children":8699},{"style":432},[8700],{"type":60,"value":8701},"You are a helpful assistant. Always be concise.",{"type":54,"tag":392,"props":8703,"children":8704},{"style":405},[8705],{"type":60,"value":439},{"type":54,"tag":392,"props":8707,"children":8708},{"style":405},[8709],{"type":60,"value":1845},{"type":54,"tag":392,"props":8711,"children":8712},{"class":394,"line":457},[8713,8717,8721],{"type":54,"tag":392,"props":8714,"children":8715},{"style":405},[8716],{"type":60,"value":1228},{"type":54,"tag":392,"props":8718,"children":8719},{"style":411},[8720],{"type":60,"value":99},{"type":54,"tag":392,"props":8722,"children":8723},{"style":405},[8724],{"type":60,"value":444},{"type":54,"tag":362,"props":8726,"children":8727},{},[],{"type":54,"tag":69,"props":8729,"children":8731},{"id":8730},"skills-integration",[8732],{"type":60,"value":8733},"Skills Integration",{"type":54,"tag":63,"props":8735,"children":8736},{},[8737],{"type":60,"value":8738},"Load skill directories to extend Copilot's capabilities:",{"type":54,"tag":271,"props":8740,"children":8742},{"className":385,"code":8741,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    skillDirectories: [\".\u002Fskills\u002Fcode-review\", \".\u002Fskills\u002Fdocumentation\"],\n    disabledSkills: [\"experimental-feature\"],\n});\n",[8743],{"type":54,"tag":92,"props":8744,"children":8745},{"__ignoreMap":279},[8746,8785,8839,8876],{"type":54,"tag":392,"props":8747,"children":8748},{"class":394,"line":395},[8749,8753,8757,8761,8765,8769,8773,8777,8781],{"type":54,"tag":392,"props":8750,"children":8751},{"style":461},[8752],{"type":60,"value":464},{"type":54,"tag":392,"props":8754,"children":8755},{"style":411},[8756],{"type":60,"value":506},{"type":54,"tag":392,"props":8758,"children":8759},{"style":405},[8760],{"type":60,"value":474},{"type":54,"tag":392,"props":8762,"children":8763},{"style":399},[8764],{"type":60,"value":515},{"type":54,"tag":392,"props":8766,"children":8767},{"style":411},[8768],{"type":60,"value":520},{"type":54,"tag":392,"props":8770,"children":8771},{"style":405},[8772],{"type":60,"value":525},{"type":54,"tag":392,"props":8774,"children":8775},{"style":482},[8776],{"type":60,"value":530},{"type":54,"tag":392,"props":8778,"children":8779},{"style":411},[8780],{"type":60,"value":535},{"type":54,"tag":392,"props":8782,"children":8783},{"style":405},[8784],{"type":60,"value":2065},{"type":54,"tag":392,"props":8786,"children":8787},{"class":394,"line":447},[8788,8793,8797,8801,8805,8810,8814,8818,8822,8827,8831,8835],{"type":54,"tag":392,"props":8789,"children":8790},{"style":543},[8791],{"type":60,"value":8792},"    skillDirectories",{"type":54,"tag":392,"props":8794,"children":8795},{"style":405},[8796],{"type":60,"value":551},{"type":54,"tag":392,"props":8798,"children":8799},{"style":411},[8800],{"type":60,"value":1862},{"type":54,"tag":392,"props":8802,"children":8803},{"style":405},[8804],{"type":60,"value":439},{"type":54,"tag":392,"props":8806,"children":8807},{"style":432},[8808],{"type":60,"value":8809},".\u002Fskills\u002Fcode-review",{"type":54,"tag":392,"props":8811,"children":8812},{"style":405},[8813],{"type":60,"value":439},{"type":54,"tag":392,"props":8815,"children":8816},{"style":405},[8817],{"type":60,"value":1064},{"type":54,"tag":392,"props":8819,"children":8820},{"style":405},[8821],{"type":60,"value":429},{"type":54,"tag":392,"props":8823,"children":8824},{"style":432},[8825],{"type":60,"value":8826},".\u002Fskills\u002Fdocumentation",{"type":54,"tag":392,"props":8828,"children":8829},{"style":405},[8830],{"type":60,"value":439},{"type":54,"tag":392,"props":8832,"children":8833},{"style":411},[8834],{"type":60,"value":1880},{"type":54,"tag":392,"props":8836,"children":8837},{"style":405},[8838],{"type":60,"value":1714},{"type":54,"tag":392,"props":8840,"children":8841},{"class":394,"line":457},[8842,8847,8851,8855,8859,8864,8868,8872],{"type":54,"tag":392,"props":8843,"children":8844},{"style":543},[8845],{"type":60,"value":8846},"    disabledSkills",{"type":54,"tag":392,"props":8848,"children":8849},{"style":405},[8850],{"type":60,"value":551},{"type":54,"tag":392,"props":8852,"children":8853},{"style":411},[8854],{"type":60,"value":1862},{"type":54,"tag":392,"props":8856,"children":8857},{"style":405},[8858],{"type":60,"value":439},{"type":54,"tag":392,"props":8860,"children":8861},{"style":432},[8862],{"type":60,"value":8863},"experimental-feature",{"type":54,"tag":392,"props":8865,"children":8866},{"style":405},[8867],{"type":60,"value":439},{"type":54,"tag":392,"props":8869,"children":8870},{"style":411},[8871],{"type":60,"value":1880},{"type":54,"tag":392,"props":8873,"children":8874},{"style":405},[8875],{"type":60,"value":1714},{"type":54,"tag":392,"props":8877,"children":8878},{"class":394,"line":496},[8879,8883,8887],{"type":54,"tag":392,"props":8880,"children":8881},{"style":405},[8882],{"type":60,"value":1228},{"type":54,"tag":392,"props":8884,"children":8885},{"style":411},[8886],{"type":60,"value":99},{"type":54,"tag":392,"props":8888,"children":8889},{"style":405},[8890],{"type":60,"value":444},{"type":54,"tag":63,"props":8892,"children":8893},{},[8894],{"type":60,"value":8895},"Skills can be combined with custom agents and MCP servers:",{"type":54,"tag":271,"props":8897,"children":8899},{"className":385,"code":8898,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    skillDirectories: [\".\u002Fskills\u002Fsecurity\"],\n    customAgents: [{ name: \"auditor\", prompt: \"Focus on OWASP Top 10.\" }],\n    mcpServers: { postgres: { type: \"local\", command: \"npx\", args: [\"-y\", \"@modelcontextprotocol\u002Fserver-postgres\"], tools: [\"*\"] } },\n});\n",[8900],{"type":54,"tag":92,"props":8901,"children":8902},{"__ignoreMap":279},[8903,8942,8978,9056,9221],{"type":54,"tag":392,"props":8904,"children":8905},{"class":394,"line":395},[8906,8910,8914,8918,8922,8926,8930,8934,8938],{"type":54,"tag":392,"props":8907,"children":8908},{"style":461},[8909],{"type":60,"value":464},{"type":54,"tag":392,"props":8911,"children":8912},{"style":411},[8913],{"type":60,"value":506},{"type":54,"tag":392,"props":8915,"children":8916},{"style":405},[8917],{"type":60,"value":474},{"type":54,"tag":392,"props":8919,"children":8920},{"style":399},[8921],{"type":60,"value":515},{"type":54,"tag":392,"props":8923,"children":8924},{"style":411},[8925],{"type":60,"value":520},{"type":54,"tag":392,"props":8927,"children":8928},{"style":405},[8929],{"type":60,"value":525},{"type":54,"tag":392,"props":8931,"children":8932},{"style":482},[8933],{"type":60,"value":530},{"type":54,"tag":392,"props":8935,"children":8936},{"style":411},[8937],{"type":60,"value":535},{"type":54,"tag":392,"props":8939,"children":8940},{"style":405},[8941],{"type":60,"value":2065},{"type":54,"tag":392,"props":8943,"children":8944},{"class":394,"line":447},[8945,8949,8953,8957,8961,8966,8970,8974],{"type":54,"tag":392,"props":8946,"children":8947},{"style":543},[8948],{"type":60,"value":8792},{"type":54,"tag":392,"props":8950,"children":8951},{"style":405},[8952],{"type":60,"value":551},{"type":54,"tag":392,"props":8954,"children":8955},{"style":411},[8956],{"type":60,"value":1862},{"type":54,"tag":392,"props":8958,"children":8959},{"style":405},[8960],{"type":60,"value":439},{"type":54,"tag":392,"props":8962,"children":8963},{"style":432},[8964],{"type":60,"value":8965},".\u002Fskills\u002Fsecurity",{"type":54,"tag":392,"props":8967,"children":8968},{"style":405},[8969],{"type":60,"value":439},{"type":54,"tag":392,"props":8971,"children":8972},{"style":411},[8973],{"type":60,"value":1880},{"type":54,"tag":392,"props":8975,"children":8976},{"style":405},[8977],{"type":60,"value":1714},{"type":54,"tag":392,"props":8979,"children":8980},{"class":394,"line":457},[8981,8985,8989,8993,8997,9002,9006,9010,9015,9019,9023,9027,9031,9035,9040,9044,9048,9052],{"type":54,"tag":392,"props":8982,"children":8983},{"style":543},[8984],{"type":60,"value":8448},{"type":54,"tag":392,"props":8986,"children":8987},{"style":405},[8988],{"type":60,"value":551},{"type":54,"tag":392,"props":8990,"children":8991},{"style":411},[8992],{"type":60,"value":1862},{"type":54,"tag":392,"props":8994,"children":8995},{"style":405},[8996],{"type":60,"value":540},{"type":54,"tag":392,"props":8998,"children":8999},{"style":543},[9000],{"type":60,"value":9001}," name",{"type":54,"tag":392,"props":9003,"children":9004},{"style":405},[9005],{"type":60,"value":551},{"type":54,"tag":392,"props":9007,"children":9008},{"style":405},[9009],{"type":60,"value":429},{"type":54,"tag":392,"props":9011,"children":9012},{"style":432},[9013],{"type":60,"value":9014},"auditor",{"type":54,"tag":392,"props":9016,"children":9017},{"style":405},[9018],{"type":60,"value":439},{"type":54,"tag":392,"props":9020,"children":9021},{"style":405},[9022],{"type":60,"value":1064},{"type":54,"tag":392,"props":9024,"children":9025},{"style":543},[9026],{"type":60,"value":632},{"type":54,"tag":392,"props":9028,"children":9029},{"style":405},[9030],{"type":60,"value":551},{"type":54,"tag":392,"props":9032,"children":9033},{"style":405},[9034],{"type":60,"value":429},{"type":54,"tag":392,"props":9036,"children":9037},{"style":432},[9038],{"type":60,"value":9039},"Focus on OWASP Top 10.",{"type":54,"tag":392,"props":9041,"children":9042},{"style":405},[9043],{"type":60,"value":439},{"type":54,"tag":392,"props":9045,"children":9046},{"style":405},[9047],{"type":60,"value":419},{"type":54,"tag":392,"props":9049,"children":9050},{"style":411},[9051],{"type":60,"value":1880},{"type":54,"tag":392,"props":9053,"children":9054},{"style":405},[9055],{"type":60,"value":1714},{"type":54,"tag":392,"props":9057,"children":9058},{"class":394,"line":496},[9059,9063,9067,9071,9076,9080,9084,9088,9092,9096,9100,9104,9108,9113,9117,9121,9125,9129,9133,9138,9142,9146,9150,9154,9158,9162,9166,9171,9175,9179,9183,9188,9192,9196,9200,9204,9208,9213,9217],{"type":54,"tag":392,"props":9060,"children":9061},{"style":543},[9062],{"type":60,"value":4733},{"type":54,"tag":392,"props":9064,"children":9065},{"style":405},[9066],{"type":60,"value":551},{"type":54,"tag":392,"props":9068,"children":9069},{"style":405},[9070],{"type":60,"value":408},{"type":54,"tag":392,"props":9072,"children":9073},{"style":543},[9074],{"type":60,"value":9075}," postgres",{"type":54,"tag":392,"props":9077,"children":9078},{"style":405},[9079],{"type":60,"value":551},{"type":54,"tag":392,"props":9081,"children":9082},{"style":405},[9083],{"type":60,"value":408},{"type":54,"tag":392,"props":9085,"children":9086},{"style":543},[9087],{"type":60,"value":1793},{"type":54,"tag":392,"props":9089,"children":9090},{"style":405},[9091],{"type":60,"value":551},{"type":54,"tag":392,"props":9093,"children":9094},{"style":405},[9095],{"type":60,"value":429},{"type":54,"tag":392,"props":9097,"children":9098},{"style":432},[9099],{"type":60,"value":4778},{"type":54,"tag":392,"props":9101,"children":9102},{"style":405},[9103],{"type":60,"value":439},{"type":54,"tag":392,"props":9105,"children":9106},{"style":405},[9107],{"type":60,"value":1064},{"type":54,"tag":392,"props":9109,"children":9110},{"style":543},[9111],{"type":60,"value":9112}," command",{"type":54,"tag":392,"props":9114,"children":9115},{"style":405},[9116],{"type":60,"value":551},{"type":54,"tag":392,"props":9118,"children":9119},{"style":405},[9120],{"type":60,"value":429},{"type":54,"tag":392,"props":9122,"children":9123},{"style":432},[9124],{"type":60,"value":4807},{"type":54,"tag":392,"props":9126,"children":9127},{"style":405},[9128],{"type":60,"value":439},{"type":54,"tag":392,"props":9130,"children":9131},{"style":405},[9132],{"type":60,"value":1064},{"type":54,"tag":392,"props":9134,"children":9135},{"style":543},[9136],{"type":60,"value":9137}," args",{"type":54,"tag":392,"props":9139,"children":9140},{"style":405},[9141],{"type":60,"value":551},{"type":54,"tag":392,"props":9143,"children":9144},{"style":411},[9145],{"type":60,"value":1862},{"type":54,"tag":392,"props":9147,"children":9148},{"style":405},[9149],{"type":60,"value":439},{"type":54,"tag":392,"props":9151,"children":9152},{"style":432},[9153],{"type":60,"value":4840},{"type":54,"tag":392,"props":9155,"children":9156},{"style":405},[9157],{"type":60,"value":439},{"type":54,"tag":392,"props":9159,"children":9160},{"style":405},[9161],{"type":60,"value":1064},{"type":54,"tag":392,"props":9163,"children":9164},{"style":405},[9165],{"type":60,"value":429},{"type":54,"tag":392,"props":9167,"children":9168},{"style":432},[9169],{"type":60,"value":9170},"@modelcontextprotocol\u002Fserver-postgres",{"type":54,"tag":392,"props":9172,"children":9173},{"style":405},[9174],{"type":60,"value":439},{"type":54,"tag":392,"props":9176,"children":9177},{"style":411},[9178],{"type":60,"value":1880},{"type":54,"tag":392,"props":9180,"children":9181},{"style":405},[9182],{"type":60,"value":1064},{"type":54,"tag":392,"props":9184,"children":9185},{"style":543},[9186],{"type":60,"value":9187}," tools",{"type":54,"tag":392,"props":9189,"children":9190},{"style":405},[9191],{"type":60,"value":551},{"type":54,"tag":392,"props":9193,"children":9194},{"style":411},[9195],{"type":60,"value":1862},{"type":54,"tag":392,"props":9197,"children":9198},{"style":405},[9199],{"type":60,"value":439},{"type":54,"tag":392,"props":9201,"children":9202},{"style":432},[9203],{"type":60,"value":4911},{"type":54,"tag":392,"props":9205,"children":9206},{"style":405},[9207],{"type":60,"value":439},{"type":54,"tag":392,"props":9209,"children":9210},{"style":411},[9211],{"type":60,"value":9212},"] ",{"type":54,"tag":392,"props":9214,"children":9215},{"style":405},[9216],{"type":60,"value":1228},{"type":54,"tag":392,"props":9218,"children":9219},{"style":405},[9220],{"type":60,"value":1845},{"type":54,"tag":392,"props":9222,"children":9223},{"class":394,"line":579},[9224,9228,9232],{"type":54,"tag":392,"props":9225,"children":9226},{"style":405},[9227],{"type":60,"value":1228},{"type":54,"tag":392,"props":9229,"children":9230},{"style":411},[9231],{"type":60,"value":99},{"type":54,"tag":392,"props":9233,"children":9234},{"style":405},[9235],{"type":60,"value":444},{"type":54,"tag":362,"props":9237,"children":9238},{},[],{"type":54,"tag":69,"props":9240,"children":9242},{"id":9241},"permission-input-handlers",[9243],{"type":60,"value":9244},"Permission & Input Handlers",{"type":54,"tag":63,"props":9246,"children":9247},{},[9248,9250,9255],{"type":60,"value":9249},"Handle tool permissions and user input requests programmatically. The SDK uses a ",{"type":54,"tag":84,"props":9251,"children":9252},{},[9253],{"type":60,"value":9254},"deny-by-default",{"type":60,"value":9256}," permission model — all permission requests are denied unless you provide a handler.",{"type":54,"tag":271,"props":9258,"children":9260},{"className":385,"code":9259,"language":21,"meta":279,"style":279},"const session = await client.createSession({\n    onPermissionRequest: async (request) => {\n        if (request.kind === \"shell\") {\n            return { approved: request.command.startsWith(\"git\") };\n        }\n        return { approved: true };\n    },\n    onUserInputRequest: async (request) => {\n        return { response: \"yes\" };\n    },\n});\n",[9261],{"type":54,"tag":92,"props":9262,"children":9263},{"__ignoreMap":279},[9264,9303,9340,9388,9456,9463,9490,9497,9533,9570,9577],{"type":54,"tag":392,"props":9265,"children":9266},{"class":394,"line":395},[9267,9271,9275,9279,9283,9287,9291,9295,9299],{"type":54,"tag":392,"props":9268,"children":9269},{"style":461},[9270],{"type":60,"value":464},{"type":54,"tag":392,"props":9272,"children":9273},{"style":411},[9274],{"type":60,"value":506},{"type":54,"tag":392,"props":9276,"children":9277},{"style":405},[9278],{"type":60,"value":474},{"type":54,"tag":392,"props":9280,"children":9281},{"style":399},[9282],{"type":60,"value":515},{"type":54,"tag":392,"props":9284,"children":9285},{"style":411},[9286],{"type":60,"value":520},{"type":54,"tag":392,"props":9288,"children":9289},{"style":405},[9290],{"type":60,"value":525},{"type":54,"tag":392,"props":9292,"children":9293},{"style":482},[9294],{"type":60,"value":530},{"type":54,"tag":392,"props":9296,"children":9297},{"style":411},[9298],{"type":60,"value":535},{"type":54,"tag":392,"props":9300,"children":9301},{"style":405},[9302],{"type":60,"value":2065},{"type":54,"tag":392,"props":9304,"children":9305},{"class":394,"line":447},[9306,9311,9315,9319,9323,9328,9332,9336],{"type":54,"tag":392,"props":9307,"children":9308},{"style":482},[9309],{"type":60,"value":9310},"    onPermissionRequest",{"type":54,"tag":392,"props":9312,"children":9313},{"style":405},[9314],{"type":60,"value":551},{"type":54,"tag":392,"props":9316,"children":9317},{"style":461},[9318],{"type":60,"value":1909},{"type":54,"tag":392,"props":9320,"children":9321},{"style":405},[9322],{"type":60,"value":1141},{"type":54,"tag":392,"props":9324,"children":9325},{"style":1144},[9326],{"type":60,"value":9327},"request",{"type":54,"tag":392,"props":9329,"children":9330},{"style":405},[9331],{"type":60,"value":99},{"type":54,"tag":392,"props":9333,"children":9334},{"style":461},[9335],{"type":60,"value":1156},{"type":54,"tag":392,"props":9337,"children":9338},{"style":405},[9339],{"type":60,"value":1161},{"type":54,"tag":392,"props":9341,"children":9342},{"class":394,"line":457},[9343,9347,9351,9355,9359,9364,9368,9372,9376,9380,9384],{"type":54,"tag":392,"props":9344,"children":9345},{"style":399},[9346],{"type":60,"value":3259},{"type":54,"tag":392,"props":9348,"children":9349},{"style":543},[9350],{"type":60,"value":1141},{"type":54,"tag":392,"props":9352,"children":9353},{"style":411},[9354],{"type":60,"value":9327},{"type":54,"tag":392,"props":9356,"children":9357},{"style":405},[9358],{"type":60,"value":525},{"type":54,"tag":392,"props":9360,"children":9361},{"style":411},[9362],{"type":60,"value":9363},"kind",{"type":54,"tag":392,"props":9365,"children":9366},{"style":405},[9367],{"type":60,"value":3287},{"type":54,"tag":392,"props":9369,"children":9370},{"style":405},[9371],{"type":60,"value":429},{"type":54,"tag":392,"props":9373,"children":9374},{"style":432},[9375],{"type":60,"value":2775},{"type":54,"tag":392,"props":9377,"children":9378},{"style":405},[9379],{"type":60,"value":439},{"type":54,"tag":392,"props":9381,"children":9382},{"style":543},[9383],{"type":60,"value":3304},{"type":54,"tag":392,"props":9385,"children":9386},{"style":405},[9387],{"type":60,"value":2065},{"type":54,"tag":392,"props":9389,"children":9390},{"class":394,"line":496},[9391,9395,9399,9404,9408,9413,9417,9421,9425,9430,9434,9438,9443,9447,9451],{"type":54,"tag":392,"props":9392,"children":9393},{"style":399},[9394],{"type":60,"value":2916},{"type":54,"tag":392,"props":9396,"children":9397},{"style":405},[9398],{"type":60,"value":408},{"type":54,"tag":392,"props":9400,"children":9401},{"style":543},[9402],{"type":60,"value":9403}," approved",{"type":54,"tag":392,"props":9405,"children":9406},{"style":405},[9407],{"type":60,"value":551},{"type":54,"tag":392,"props":9409,"children":9410},{"style":411},[9411],{"type":60,"value":9412}," request",{"type":54,"tag":392,"props":9414,"children":9415},{"style":405},[9416],{"type":60,"value":525},{"type":54,"tag":392,"props":9418,"children":9419},{"style":411},[9420],{"type":60,"value":5376},{"type":54,"tag":392,"props":9422,"children":9423},{"style":405},[9424],{"type":60,"value":525},{"type":54,"tag":392,"props":9426,"children":9427},{"style":482},[9428],{"type":60,"value":9429},"startsWith",{"type":54,"tag":392,"props":9431,"children":9432},{"style":543},[9433],{"type":60,"value":535},{"type":54,"tag":392,"props":9435,"children":9436},{"style":405},[9437],{"type":60,"value":439},{"type":54,"tag":392,"props":9439,"children":9440},{"style":432},[9441],{"type":60,"value":9442},"git",{"type":54,"tag":392,"props":9444,"children":9445},{"style":405},[9446],{"type":60,"value":439},{"type":54,"tag":392,"props":9448,"children":9449},{"style":543},[9450],{"type":60,"value":3304},{"type":54,"tag":392,"props":9452,"children":9453},{"style":405},[9454],{"type":60,"value":9455},"};\n",{"type":54,"tag":392,"props":9457,"children":9458},{"class":394,"line":579},[9459],{"type":54,"tag":392,"props":9460,"children":9461},{"style":405},[9462],{"type":60,"value":3531},{"type":54,"tag":392,"props":9464,"children":9465},{"class":394,"line":587},[9466,9470,9474,9478,9482,9486],{"type":54,"tag":392,"props":9467,"children":9468},{"style":399},[9469],{"type":60,"value":3539},{"type":54,"tag":392,"props":9471,"children":9472},{"style":405},[9473],{"type":60,"value":408},{"type":54,"tag":392,"props":9475,"children":9476},{"style":543},[9477],{"type":60,"value":9403},{"type":54,"tag":392,"props":9479,"children":9480},{"style":405},[9481],{"type":60,"value":551},{"type":54,"tag":392,"props":9483,"children":9484},{"style":1076},[9485],{"type":60,"value":1079},{"type":54,"tag":392,"props":9487,"children":9488},{"style":405},[9489],{"type":60,"value":2900},{"type":54,"tag":392,"props":9491,"children":9492},{"class":394,"line":664},[9493],{"type":54,"tag":392,"props":9494,"children":9495},{"style":405},[9496],{"type":60,"value":1892},{"type":54,"tag":392,"props":9498,"children":9499},{"class":394,"line":710},[9500,9505,9509,9513,9517,9521,9525,9529],{"type":54,"tag":392,"props":9501,"children":9502},{"style":482},[9503],{"type":60,"value":9504},"    onUserInputRequest",{"type":54,"tag":392,"props":9506,"children":9507},{"style":405},[9508],{"type":60,"value":551},{"type":54,"tag":392,"props":9510,"children":9511},{"style":461},[9512],{"type":60,"value":1909},{"type":54,"tag":392,"props":9514,"children":9515},{"style":405},[9516],{"type":60,"value":1141},{"type":54,"tag":392,"props":9518,"children":9519},{"style":1144},[9520],{"type":60,"value":9327},{"type":54,"tag":392,"props":9522,"children":9523},{"style":405},[9524],{"type":60,"value":99},{"type":54,"tag":392,"props":9526,"children":9527},{"style":461},[9528],{"type":60,"value":1156},{"type":54,"tag":392,"props":9530,"children":9531},{"style":405},[9532],{"type":60,"value":1161},{"type":54,"tag":392,"props":9534,"children":9535},{"class":394,"line":718},[9536,9540,9544,9549,9553,9557,9562,9566],{"type":54,"tag":392,"props":9537,"children":9538},{"style":399},[9539],{"type":60,"value":3539},{"type":54,"tag":392,"props":9541,"children":9542},{"style":405},[9543],{"type":60,"value":408},{"type":54,"tag":392,"props":9545,"children":9546},{"style":543},[9547],{"type":60,"value":9548}," response",{"type":54,"tag":392,"props":9550,"children":9551},{"style":405},[9552],{"type":60,"value":551},{"type":54,"tag":392,"props":9554,"children":9555},{"style":405},[9556],{"type":60,"value":429},{"type":54,"tag":392,"props":9558,"children":9559},{"style":432},[9560],{"type":60,"value":9561},"yes",{"type":54,"tag":392,"props":9563,"children":9564},{"style":405},[9565],{"type":60,"value":439},{"type":54,"tag":392,"props":9567,"children":9568},{"style":405},[9569],{"type":60,"value":2900},{"type":54,"tag":392,"props":9571,"children":9572},{"class":394,"line":831},[9573],{"type":54,"tag":392,"props":9574,"children":9575},{"style":405},[9576],{"type":60,"value":1892},{"type":54,"tag":392,"props":9578,"children":9579},{"class":394,"line":840},[9580,9584,9588],{"type":54,"tag":392,"props":9581,"children":9582},{"style":405},[9583],{"type":60,"value":1228},{"type":54,"tag":392,"props":9585,"children":9586},{"style":411},[9587],{"type":60,"value":99},{"type":54,"tag":392,"props":9589,"children":9590},{"style":405},[9591],{"type":60,"value":444},{"type":54,"tag":377,"props":9593,"children":9595},{"id":9594},"token-usage-tracking",[9596],{"type":60,"value":9597},"Token Usage Tracking",{"type":54,"tag":63,"props":9599,"children":9600},{},[9601,9603,9609],{"type":60,"value":9602},"Subscribe to usage events instead of using CLI ",{"type":54,"tag":92,"props":9604,"children":9606},{"className":9605},[],[9607],{"type":60,"value":9608},"\u002Fusage",{"type":60,"value":551},{"type":54,"tag":271,"props":9611,"children":9613},{"className":385,"code":9612,"language":21,"meta":279,"style":279},"session.on(\"assistant.usage\", (event) => {\n    console.log(\"Tokens:\", { input: event.data.inputTokens, output: event.data.outputTokens });\n});\n",[9614],{"type":54,"tag":92,"props":9615,"children":9616},{"__ignoreMap":279},[9617,9673,9790],{"type":54,"tag":392,"props":9618,"children":9619},{"class":394,"line":395},[9620,9624,9628,9632,9636,9640,9645,9649,9653,9657,9661,9665,9669],{"type":54,"tag":392,"props":9621,"children":9622},{"style":411},[9623],{"type":60,"value":1106},{"type":54,"tag":392,"props":9625,"children":9626},{"style":405},[9627],{"type":60,"value":525},{"type":54,"tag":392,"props":9629,"children":9630},{"style":482},[9631],{"type":60,"value":1115},{"type":54,"tag":392,"props":9633,"children":9634},{"style":411},[9635],{"type":60,"value":535},{"type":54,"tag":392,"props":9637,"children":9638},{"style":405},[9639],{"type":60,"value":439},{"type":54,"tag":392,"props":9641,"children":9642},{"style":432},[9643],{"type":60,"value":9644},"assistant.usage",{"type":54,"tag":392,"props":9646,"children":9647},{"style":405},[9648],{"type":60,"value":439},{"type":54,"tag":392,"props":9650,"children":9651},{"style":405},[9652],{"type":60,"value":1064},{"type":54,"tag":392,"props":9654,"children":9655},{"style":405},[9656],{"type":60,"value":1141},{"type":54,"tag":392,"props":9658,"children":9659},{"style":1144},[9660],{"type":60,"value":1147},{"type":54,"tag":392,"props":9662,"children":9663},{"style":405},[9664],{"type":60,"value":99},{"type":54,"tag":392,"props":9666,"children":9667},{"style":461},[9668],{"type":60,"value":1156},{"type":54,"tag":392,"props":9670,"children":9671},{"style":405},[9672],{"type":60,"value":1161},{"type":54,"tag":392,"props":9674,"children":9675},{"class":394,"line":447},[9676,9681,9685,9689,9693,9697,9702,9706,9710,9714,9718,9722,9727,9731,9735,9739,9744,9748,9753,9757,9761,9765,9769,9773,9778,9782,9786],{"type":54,"tag":392,"props":9677,"children":9678},{"style":411},[9679],{"type":60,"value":9680},"    console",{"type":54,"tag":392,"props":9682,"children":9683},{"style":405},[9684],{"type":60,"value":525},{"type":54,"tag":392,"props":9686,"children":9687},{"style":482},[9688],{"type":60,"value":679},{"type":54,"tag":392,"props":9690,"children":9691},{"style":543},[9692],{"type":60,"value":535},{"type":54,"tag":392,"props":9694,"children":9695},{"style":405},[9696],{"type":60,"value":439},{"type":54,"tag":392,"props":9698,"children":9699},{"style":432},[9700],{"type":60,"value":9701},"Tokens:",{"type":54,"tag":392,"props":9703,"children":9704},{"style":405},[9705],{"type":60,"value":439},{"type":54,"tag":392,"props":9707,"children":9708},{"style":405},[9709],{"type":60,"value":1064},{"type":54,"tag":392,"props":9711,"children":9712},{"style":405},[9713],{"type":60,"value":408},{"type":54,"tag":392,"props":9715,"children":9716},{"style":543},[9717],{"type":60,"value":3273},{"type":54,"tag":392,"props":9719,"children":9720},{"style":405},[9721],{"type":60,"value":551},{"type":54,"tag":392,"props":9723,"children":9724},{"style":411},[9725],{"type":60,"value":9726}," event",{"type":54,"tag":392,"props":9728,"children":9729},{"style":405},[9730],{"type":60,"value":525},{"type":54,"tag":392,"props":9732,"children":9733},{"style":411},[9734],{"type":60,"value":694},{"type":54,"tag":392,"props":9736,"children":9737},{"style":405},[9738],{"type":60,"value":525},{"type":54,"tag":392,"props":9740,"children":9741},{"style":411},[9742],{"type":60,"value":9743},"inputTokens",{"type":54,"tag":392,"props":9745,"children":9746},{"style":405},[9747],{"type":60,"value":1064},{"type":54,"tag":392,"props":9749,"children":9750},{"style":543},[9751],{"type":60,"value":9752}," output",{"type":54,"tag":392,"props":9754,"children":9755},{"style":405},[9756],{"type":60,"value":551},{"type":54,"tag":392,"props":9758,"children":9759},{"style":411},[9760],{"type":60,"value":9726},{"type":54,"tag":392,"props":9762,"children":9763},{"style":405},[9764],{"type":60,"value":525},{"type":54,"tag":392,"props":9766,"children":9767},{"style":411},[9768],{"type":60,"value":694},{"type":54,"tag":392,"props":9770,"children":9771},{"style":405},[9772],{"type":60,"value":525},{"type":54,"tag":392,"props":9774,"children":9775},{"style":411},[9776],{"type":60,"value":9777},"outputTokens",{"type":54,"tag":392,"props":9779,"children":9780},{"style":405},[9781],{"type":60,"value":419},{"type":54,"tag":392,"props":9783,"children":9784},{"style":543},[9785],{"type":60,"value":99},{"type":54,"tag":392,"props":9787,"children":9788},{"style":405},[9789],{"type":60,"value":444},{"type":54,"tag":392,"props":9791,"children":9792},{"class":394,"line":457},[9793,9797,9801],{"type":54,"tag":392,"props":9794,"children":9795},{"style":405},[9796],{"type":60,"value":1228},{"type":54,"tag":392,"props":9798,"children":9799},{"style":411},[9800],{"type":60,"value":99},{"type":54,"tag":392,"props":9802,"children":9803},{"style":405},[9804],{"type":60,"value":444},{"type":54,"tag":362,"props":9806,"children":9807},{},[],{"type":54,"tag":69,"props":9809,"children":9811},{"id":9810},"deployment-patterns",[9812],{"type":60,"value":9813},"Deployment Patterns",{"type":54,"tag":377,"props":9815,"children":9817},{"id":9816},"local-cli-default",[9818],{"type":60,"value":9819},"Local CLI (Default)",{"type":54,"tag":63,"props":9821,"children":9822},{},[9823],{"type":60,"value":9824},"SDK auto-spawns CLI as subprocess. Simplest setup — zero configuration.",{"type":54,"tag":271,"props":9826,"children":9828},{"className":385,"code":9827,"language":21,"meta":279,"style":279},"const client = new CopilotClient(); \u002F\u002F Auto-manages CLI process\n",[9829],{"type":54,"tag":92,"props":9830,"children":9831},{"__ignoreMap":279},[9832],{"type":54,"tag":392,"props":9833,"children":9834},{"class":394,"line":395},[9835,9839,9843,9847,9851,9855,9859,9863],{"type":54,"tag":392,"props":9836,"children":9837},{"style":461},[9838],{"type":60,"value":464},{"type":54,"tag":392,"props":9840,"children":9841},{"style":411},[9842],{"type":60,"value":469},{"type":54,"tag":392,"props":9844,"children":9845},{"style":405},[9846],{"type":60,"value":474},{"type":54,"tag":392,"props":9848,"children":9849},{"style":405},[9850],{"type":60,"value":479},{"type":54,"tag":392,"props":9852,"children":9853},{"style":482},[9854],{"type":60,"value":414},{"type":54,"tag":392,"props":9856,"children":9857},{"style":411},[9858],{"type":60,"value":489},{"type":54,"tag":392,"props":9860,"children":9861},{"style":405},[9862],{"type":60,"value":7711},{"type":54,"tag":392,"props":9864,"children":9865},{"style":3248},[9866],{"type":60,"value":9867}," \u002F\u002F Auto-manages CLI process\n",{"type":54,"tag":377,"props":9869,"children":9871},{"id":9870},"external-cli-server-backend-services",[9872],{"type":60,"value":9873},"External CLI Server (Backend Services)",{"type":54,"tag":63,"props":9875,"children":9876},{},[9877],{"type":60,"value":9878},"Run CLI in headless mode, connect SDK over TCP:",{"type":54,"tag":271,"props":9880,"children":9882},{"className":5715,"code":9881,"language":2792,"meta":279,"style":279},"copilot --headless --port 4321\n",[9883],{"type":54,"tag":92,"props":9884,"children":9885},{"__ignoreMap":279},[9886],{"type":54,"tag":392,"props":9887,"children":9888},{"class":394,"line":395},[9889,9893,9898,9903],{"type":54,"tag":392,"props":9890,"children":9891},{"style":3196},[9892],{"type":60,"value":14},{"type":54,"tag":392,"props":9894,"children":9895},{"style":432},[9896],{"type":60,"value":9897}," --headless",{"type":54,"tag":392,"props":9899,"children":9900},{"style":432},[9901],{"type":60,"value":9902}," --port",{"type":54,"tag":392,"props":9904,"children":9905},{"style":4393},[9906],{"type":60,"value":9907}," 4321\n",{"type":54,"tag":271,"props":9909,"children":9911},{"className":385,"code":9910,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ cliUrl: \"localhost:4321\" });\n",[9912],{"type":54,"tag":92,"props":9913,"children":9914},{"__ignoreMap":279},[9915],{"type":54,"tag":392,"props":9916,"children":9917},{"class":394,"line":395},[9918,9922,9926,9930,9934,9938,9942,9946,9951,9955,9959,9964,9968,9972,9976],{"type":54,"tag":392,"props":9919,"children":9920},{"style":461},[9921],{"type":60,"value":464},{"type":54,"tag":392,"props":9923,"children":9924},{"style":411},[9925],{"type":60,"value":469},{"type":54,"tag":392,"props":9927,"children":9928},{"style":405},[9929],{"type":60,"value":474},{"type":54,"tag":392,"props":9931,"children":9932},{"style":405},[9933],{"type":60,"value":479},{"type":54,"tag":392,"props":9935,"children":9936},{"style":482},[9937],{"type":60,"value":414},{"type":54,"tag":392,"props":9939,"children":9940},{"style":411},[9941],{"type":60,"value":535},{"type":54,"tag":392,"props":9943,"children":9944},{"style":405},[9945],{"type":60,"value":540},{"type":54,"tag":392,"props":9947,"children":9948},{"style":543},[9949],{"type":60,"value":9950}," cliUrl",{"type":54,"tag":392,"props":9952,"children":9953},{"style":405},[9954],{"type":60,"value":551},{"type":54,"tag":392,"props":9956,"children":9957},{"style":405},[9958],{"type":60,"value":429},{"type":54,"tag":392,"props":9960,"children":9961},{"style":432},[9962],{"type":60,"value":9963},"localhost:4321",{"type":54,"tag":392,"props":9965,"children":9966},{"style":405},[9967],{"type":60,"value":439},{"type":54,"tag":392,"props":9969,"children":9970},{"style":405},[9971],{"type":60,"value":419},{"type":54,"tag":392,"props":9973,"children":9974},{"style":411},[9975],{"type":60,"value":99},{"type":54,"tag":392,"props":9977,"children":9978},{"style":405},[9979],{"type":60,"value":444},{"type":54,"tag":63,"props":9981,"children":9982},{},[9983,9988],{"type":54,"tag":84,"props":9984,"children":9985},{},[9986],{"type":60,"value":9987},"Multi-client support:",{"type":60,"value":9989}," Multiple SDK clients can share one CLI server.",{"type":54,"tag":377,"props":9991,"children":9993},{"id":9992},"bundled-cli-desktop-apps",[9994],{"type":60,"value":9995},"Bundled CLI (Desktop Apps)",{"type":54,"tag":63,"props":9997,"children":9998},{},[9999],{"type":60,"value":10000},"Ship CLI binary with your app:",{"type":54,"tag":271,"props":10002,"children":10004},{"className":385,"code":10003,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ cliPath: path.join(__dirname, \"vendor\", \"copilot\") });\n",[10005],{"type":54,"tag":92,"props":10006,"children":10007},{"__ignoreMap":279},[10008],{"type":54,"tag":392,"props":10009,"children":10010},{"class":394,"line":395},[10011,10015,10019,10023,10027,10031,10035,10039,10044,10048,10053,10057,10062,10067,10071,10075,10080,10084,10088,10092,10096,10100,10104,10108,10112],{"type":54,"tag":392,"props":10012,"children":10013},{"style":461},[10014],{"type":60,"value":464},{"type":54,"tag":392,"props":10016,"children":10017},{"style":411},[10018],{"type":60,"value":469},{"type":54,"tag":392,"props":10020,"children":10021},{"style":405},[10022],{"type":60,"value":474},{"type":54,"tag":392,"props":10024,"children":10025},{"style":405},[10026],{"type":60,"value":479},{"type":54,"tag":392,"props":10028,"children":10029},{"style":482},[10030],{"type":60,"value":414},{"type":54,"tag":392,"props":10032,"children":10033},{"style":411},[10034],{"type":60,"value":535},{"type":54,"tag":392,"props":10036,"children":10037},{"style":405},[10038],{"type":60,"value":540},{"type":54,"tag":392,"props":10040,"children":10041},{"style":543},[10042],{"type":60,"value":10043}," cliPath",{"type":54,"tag":392,"props":10045,"children":10046},{"style":405},[10047],{"type":60,"value":551},{"type":54,"tag":392,"props":10049,"children":10050},{"style":411},[10051],{"type":60,"value":10052}," path",{"type":54,"tag":392,"props":10054,"children":10055},{"style":405},[10056],{"type":60,"value":525},{"type":54,"tag":392,"props":10058,"children":10059},{"style":482},[10060],{"type":60,"value":10061},"join",{"type":54,"tag":392,"props":10063,"children":10064},{"style":411},[10065],{"type":60,"value":10066},"(__dirname",{"type":54,"tag":392,"props":10068,"children":10069},{"style":405},[10070],{"type":60,"value":1064},{"type":54,"tag":392,"props":10072,"children":10073},{"style":405},[10074],{"type":60,"value":429},{"type":54,"tag":392,"props":10076,"children":10077},{"style":432},[10078],{"type":60,"value":10079},"vendor",{"type":54,"tag":392,"props":10081,"children":10082},{"style":405},[10083],{"type":60,"value":439},{"type":54,"tag":392,"props":10085,"children":10086},{"style":405},[10087],{"type":60,"value":1064},{"type":54,"tag":392,"props":10089,"children":10090},{"style":405},[10091],{"type":60,"value":429},{"type":54,"tag":392,"props":10093,"children":10094},{"style":432},[10095],{"type":60,"value":14},{"type":54,"tag":392,"props":10097,"children":10098},{"style":405},[10099],{"type":60,"value":439},{"type":54,"tag":392,"props":10101,"children":10102},{"style":411},[10103],{"type":60,"value":3304},{"type":54,"tag":392,"props":10105,"children":10106},{"style":405},[10107],{"type":60,"value":1228},{"type":54,"tag":392,"props":10109,"children":10110},{"style":411},[10111],{"type":60,"value":99},{"type":54,"tag":392,"props":10113,"children":10114},{"style":405},[10115],{"type":60,"value":444},{"type":54,"tag":377,"props":10117,"children":10119},{"id":10118},"docker-compose",[10120],{"type":60,"value":10121},"Docker Compose",{"type":54,"tag":271,"props":10123,"children":10127},{"className":10124,"code":10125,"language":10126,"meta":279,"style":279},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","services:\n  copilot-cli:\n    image: ghcr.io\u002Fgithub\u002Fcopilot-cli:latest\n    command: [\"--headless\", \"--port\", \"4321\"]\n    environment:\n      - COPILOT_GITHUB_TOKEN=${COPILOT_GITHUB_TOKEN}\n    volumes:\n      - session-data:\u002Froot\u002F.copilot\u002Fsession-state\n  api:\n    build: .\n    environment:\n      - CLI_URL=copilot-cli:4321\n    depends_on: [copilot-cli]\nvolumes:\n  session-data:\n","yaml",[10128],{"type":54,"tag":92,"props":10129,"children":10130},{"__ignoreMap":279},[10131,10144,10156,10173,10241,10253,10266,10278,10290,10302,10319,10330,10342,10367,10379],{"type":54,"tag":392,"props":10132,"children":10133},{"class":394,"line":395},[10134,10139],{"type":54,"tag":392,"props":10135,"children":10136},{"style":543},[10137],{"type":60,"value":10138},"services",{"type":54,"tag":392,"props":10140,"children":10141},{"style":405},[10142],{"type":60,"value":10143},":\n",{"type":54,"tag":392,"props":10145,"children":10146},{"class":394,"line":447},[10147,10152],{"type":54,"tag":392,"props":10148,"children":10149},{"style":543},[10150],{"type":60,"value":10151},"  copilot-cli",{"type":54,"tag":392,"props":10153,"children":10154},{"style":405},[10155],{"type":60,"value":10143},{"type":54,"tag":392,"props":10157,"children":10158},{"class":394,"line":457},[10159,10164,10168],{"type":54,"tag":392,"props":10160,"children":10161},{"style":543},[10162],{"type":60,"value":10163},"    image",{"type":54,"tag":392,"props":10165,"children":10166},{"style":405},[10167],{"type":60,"value":551},{"type":54,"tag":392,"props":10169,"children":10170},{"style":432},[10171],{"type":60,"value":10172}," ghcr.io\u002Fgithub\u002Fcopilot-cli:latest\n",{"type":54,"tag":392,"props":10174,"children":10175},{"class":394,"line":496},[10176,10181,10185,10189,10193,10198,10202,10206,10210,10215,10219,10223,10227,10232,10236],{"type":54,"tag":392,"props":10177,"children":10178},{"style":543},[10179],{"type":60,"value":10180},"    command",{"type":54,"tag":392,"props":10182,"children":10183},{"style":405},[10184],{"type":60,"value":551},{"type":54,"tag":392,"props":10186,"children":10187},{"style":405},[10188],{"type":60,"value":1862},{"type":54,"tag":392,"props":10190,"children":10191},{"style":405},[10192],{"type":60,"value":439},{"type":54,"tag":392,"props":10194,"children":10195},{"style":432},[10196],{"type":60,"value":10197},"--headless",{"type":54,"tag":392,"props":10199,"children":10200},{"style":405},[10201],{"type":60,"value":439},{"type":54,"tag":392,"props":10203,"children":10204},{"style":405},[10205],{"type":60,"value":1064},{"type":54,"tag":392,"props":10207,"children":10208},{"style":405},[10209],{"type":60,"value":429},{"type":54,"tag":392,"props":10211,"children":10212},{"style":432},[10213],{"type":60,"value":10214},"--port",{"type":54,"tag":392,"props":10216,"children":10217},{"style":405},[10218],{"type":60,"value":439},{"type":54,"tag":392,"props":10220,"children":10221},{"style":405},[10222],{"type":60,"value":1064},{"type":54,"tag":392,"props":10224,"children":10225},{"style":405},[10226],{"type":60,"value":429},{"type":54,"tag":392,"props":10228,"children":10229},{"style":432},[10230],{"type":60,"value":10231},"4321",{"type":54,"tag":392,"props":10233,"children":10234},{"style":405},[10235],{"type":60,"value":439},{"type":54,"tag":392,"props":10237,"children":10238},{"style":405},[10239],{"type":60,"value":10240},"]\n",{"type":54,"tag":392,"props":10242,"children":10243},{"class":394,"line":579},[10244,10249],{"type":54,"tag":392,"props":10245,"children":10246},{"style":543},[10247],{"type":60,"value":10248},"    environment",{"type":54,"tag":392,"props":10250,"children":10251},{"style":405},[10252],{"type":60,"value":10143},{"type":54,"tag":392,"props":10254,"children":10255},{"class":394,"line":587},[10256,10261],{"type":54,"tag":392,"props":10257,"children":10258},{"style":405},[10259],{"type":60,"value":10260},"      -",{"type":54,"tag":392,"props":10262,"children":10263},{"style":432},[10264],{"type":60,"value":10265}," COPILOT_GITHUB_TOKEN=${COPILOT_GITHUB_TOKEN}\n",{"type":54,"tag":392,"props":10267,"children":10268},{"class":394,"line":664},[10269,10274],{"type":54,"tag":392,"props":10270,"children":10271},{"style":543},[10272],{"type":60,"value":10273},"    volumes",{"type":54,"tag":392,"props":10275,"children":10276},{"style":405},[10277],{"type":60,"value":10143},{"type":54,"tag":392,"props":10279,"children":10280},{"class":394,"line":710},[10281,10285],{"type":54,"tag":392,"props":10282,"children":10283},{"style":405},[10284],{"type":60,"value":10260},{"type":54,"tag":392,"props":10286,"children":10287},{"style":432},[10288],{"type":60,"value":10289}," session-data:\u002Froot\u002F.copilot\u002Fsession-state\n",{"type":54,"tag":392,"props":10291,"children":10292},{"class":394,"line":718},[10293,10298],{"type":54,"tag":392,"props":10294,"children":10295},{"style":543},[10296],{"type":60,"value":10297},"  api",{"type":54,"tag":392,"props":10299,"children":10300},{"style":405},[10301],{"type":60,"value":10143},{"type":54,"tag":392,"props":10303,"children":10304},{"class":394,"line":831},[10305,10310,10314],{"type":54,"tag":392,"props":10306,"children":10307},{"style":543},[10308],{"type":60,"value":10309},"    build",{"type":54,"tag":392,"props":10311,"children":10312},{"style":405},[10313],{"type":60,"value":551},{"type":54,"tag":392,"props":10315,"children":10316},{"style":4393},[10317],{"type":60,"value":10318}," .\n",{"type":54,"tag":392,"props":10320,"children":10321},{"class":394,"line":840},[10322,10326],{"type":54,"tag":392,"props":10323,"children":10324},{"style":543},[10325],{"type":60,"value":10248},{"type":54,"tag":392,"props":10327,"children":10328},{"style":405},[10329],{"type":60,"value":10143},{"type":54,"tag":392,"props":10331,"children":10332},{"class":394,"line":848},[10333,10337],{"type":54,"tag":392,"props":10334,"children":10335},{"style":405},[10336],{"type":60,"value":10260},{"type":54,"tag":392,"props":10338,"children":10339},{"style":432},[10340],{"type":60,"value":10341}," CLI_URL=copilot-cli:4321\n",{"type":54,"tag":392,"props":10343,"children":10344},{"class":394,"line":1478},[10345,10350,10354,10358,10363],{"type":54,"tag":392,"props":10346,"children":10347},{"style":543},[10348],{"type":60,"value":10349},"    depends_on",{"type":54,"tag":392,"props":10351,"children":10352},{"style":405},[10353],{"type":60,"value":551},{"type":54,"tag":392,"props":10355,"children":10356},{"style":405},[10357],{"type":60,"value":1862},{"type":54,"tag":392,"props":10359,"children":10360},{"style":432},[10361],{"type":60,"value":10362},"copilot-cli",{"type":54,"tag":392,"props":10364,"children":10365},{"style":405},[10366],{"type":60,"value":10240},{"type":54,"tag":392,"props":10368,"children":10369},{"class":394,"line":2068},[10370,10375],{"type":54,"tag":392,"props":10371,"children":10372},{"style":543},[10373],{"type":60,"value":10374},"volumes",{"type":54,"tag":392,"props":10376,"children":10377},{"style":405},[10378],{"type":60,"value":10143},{"type":54,"tag":392,"props":10380,"children":10381},{"class":394,"line":2097},[10382,10387],{"type":54,"tag":392,"props":10383,"children":10384},{"style":543},[10385],{"type":60,"value":10386},"  session-data",{"type":54,"tag":392,"props":10388,"children":10389},{"style":405},[10390],{"type":60,"value":10143},{"type":54,"tag":377,"props":10392,"children":10394},{"id":10393},"session-isolation-patterns",[10395],{"type":60,"value":10396},"Session Isolation Patterns",{"type":54,"tag":127,"props":10398,"children":10399},{},[10400,10425],{"type":54,"tag":131,"props":10401,"children":10402},{},[10403],{"type":54,"tag":135,"props":10404,"children":10405},{},[10406,10410,10415,10420],{"type":54,"tag":139,"props":10407,"children":10408},{},[10409],{"type":60,"value":7952},{"type":54,"tag":139,"props":10411,"children":10412},{},[10413],{"type":60,"value":10414},"Isolation",{"type":54,"tag":139,"props":10416,"children":10417},{},[10418],{"type":60,"value":10419},"Resources",{"type":54,"tag":139,"props":10421,"children":10422},{},[10423],{"type":60,"value":10424},"Best For",{"type":54,"tag":155,"props":10426,"children":10427},{},[10428,10454,10480],{"type":54,"tag":135,"props":10429,"children":10430},{},[10431,10439,10444,10449],{"type":54,"tag":162,"props":10432,"children":10433},{},[10434],{"type":54,"tag":84,"props":10435,"children":10436},{},[10437],{"type":60,"value":10438},"CLI per user",{"type":54,"tag":162,"props":10440,"children":10441},{},[10442],{"type":60,"value":10443},"Complete",{"type":54,"tag":162,"props":10445,"children":10446},{},[10447],{"type":60,"value":10448},"High",{"type":54,"tag":162,"props":10450,"children":10451},{},[10452],{"type":60,"value":10453},"Multi-tenant SaaS, compliance",{"type":54,"tag":135,"props":10455,"children":10456},{},[10457,10465,10470,10475],{"type":54,"tag":162,"props":10458,"children":10459},{},[10460],{"type":54,"tag":84,"props":10461,"children":10462},{},[10463],{"type":60,"value":10464},"Shared CLI + session IDs",{"type":54,"tag":162,"props":10466,"children":10467},{},[10468],{"type":60,"value":10469},"Logical",{"type":54,"tag":162,"props":10471,"children":10472},{},[10473],{"type":60,"value":10474},"Low",{"type":54,"tag":162,"props":10476,"children":10477},{},[10478],{"type":60,"value":10479},"Internal tools",{"type":54,"tag":135,"props":10481,"children":10482},{},[10483,10491,10496,10500],{"type":54,"tag":162,"props":10484,"children":10485},{},[10486],{"type":54,"tag":84,"props":10487,"children":10488},{},[10489],{"type":60,"value":10490},"Shared sessions",{"type":54,"tag":162,"props":10492,"children":10493},{},[10494],{"type":60,"value":10495},"None",{"type":54,"tag":162,"props":10497,"children":10498},{},[10499],{"type":60,"value":10474},{"type":54,"tag":162,"props":10501,"children":10502},{},[10503],{"type":60,"value":10504},"Team collaboration (requires locking)",{"type":54,"tag":377,"props":10506,"children":10508},{"id":10507},"production-checklist",[10509],{"type":60,"value":10510},"Production Checklist",{"type":54,"tag":76,"props":10512,"children":10513},{},[10514,10519,10524,10537,10542,10547],{"type":54,"tag":80,"props":10515,"children":10516},{},[10517],{"type":60,"value":10518},"Session cleanup: periodic deletion of expired sessions",{"type":54,"tag":80,"props":10520,"children":10521},{},[10522],{"type":60,"value":10523},"Health checks: ping CLI server, restart if unresponsive",{"type":54,"tag":80,"props":10525,"children":10526},{},[10527,10529,10535],{"type":60,"value":10528},"Persistent storage: mount ",{"type":54,"tag":92,"props":10530,"children":10532},{"className":10531},[],[10533],{"type":60,"value":10534},"~\u002F.copilot\u002Fsession-state\u002F",{"type":60,"value":10536}," for containers",{"type":54,"tag":80,"props":10538,"children":10539},{},[10540],{"type":60,"value":10541},"Secret management: use Vault\u002FK8s Secrets for tokens",{"type":54,"tag":80,"props":10543,"children":10544},{},[10545],{"type":60,"value":10546},"Session locking: Redis or similar for shared session access",{"type":54,"tag":80,"props":10548,"children":10549},{},[10550],{"type":60,"value":10551},"Graceful shutdown: drain active sessions before stopping CLI",{"type":54,"tag":362,"props":10553,"children":10554},{},[],{"type":54,"tag":69,"props":10556,"children":10558},{"id":10557},"client-configuration",[10559],{"type":60,"value":10560},"Client Configuration",{"type":54,"tag":127,"props":10562,"children":10563},{},[10564,10588],{"type":54,"tag":131,"props":10565,"children":10566},{},[10567],{"type":54,"tag":135,"props":10568,"children":10569},{},[10570,10575,10579,10584],{"type":54,"tag":139,"props":10571,"children":10572},{},[10573],{"type":60,"value":10574},"Option",{"type":54,"tag":139,"props":10576,"children":10577},{},[10578],{"type":60,"value":3039},{"type":54,"tag":139,"props":10580,"children":10581},{},[10582],{"type":60,"value":10583},"Default",{"type":54,"tag":139,"props":10585,"children":10586},{},[10587],{"type":60,"value":308},{"type":54,"tag":155,"props":10589,"children":10590},{},[10591,10617,10643,10667,10696,10757,10786],{"type":54,"tag":135,"props":10592,"children":10593},{},[10594,10603,10607,10612],{"type":54,"tag":162,"props":10595,"children":10596},{},[10597],{"type":54,"tag":92,"props":10598,"children":10600},{"className":10599},[],[10601],{"type":60,"value":10602},"cliPath",{"type":54,"tag":162,"props":10604,"children":10605},{},[10606],{"type":60,"value":1806},{"type":54,"tag":162,"props":10608,"children":10609},{},[10610],{"type":60,"value":10611},"Auto-detected",{"type":54,"tag":162,"props":10613,"children":10614},{},[10615],{"type":60,"value":10616},"Path to Copilot CLI executable",{"type":54,"tag":135,"props":10618,"children":10619},{},[10620,10629,10633,10638],{"type":54,"tag":162,"props":10621,"children":10622},{},[10623],{"type":54,"tag":92,"props":10624,"children":10626},{"className":10625},[],[10627],{"type":60,"value":10628},"cliUrl",{"type":54,"tag":162,"props":10630,"children":10631},{},[10632],{"type":60,"value":1806},{"type":54,"tag":162,"props":10634,"children":10635},{},[10636],{"type":60,"value":10637},"—",{"type":54,"tag":162,"props":10639,"children":10640},{},[10641],{"type":60,"value":10642},"URL of external CLI server",{"type":54,"tag":135,"props":10644,"children":10645},{},[10646,10654,10658,10662],{"type":54,"tag":162,"props":10647,"children":10648},{},[10649],{"type":54,"tag":92,"props":10650,"children":10652},{"className":10651},[],[10653],{"type":60,"value":5861},{"type":54,"tag":162,"props":10655,"children":10656},{},[10657],{"type":60,"value":1806},{"type":54,"tag":162,"props":10659,"children":10660},{},[10661],{"type":60,"value":10637},{"type":54,"tag":162,"props":10663,"children":10664},{},[10665],{"type":60,"value":10666},"GitHub token for auth",{"type":54,"tag":135,"props":10668,"children":10669},{},[10670,10679,10683,10691],{"type":54,"tag":162,"props":10671,"children":10672},{},[10673],{"type":54,"tag":92,"props":10674,"children":10676},{"className":10675},[],[10677],{"type":60,"value":10678},"useLoggedInUser",{"type":54,"tag":162,"props":10680,"children":10681},{},[10682],{"type":60,"value":3167},{"type":54,"tag":162,"props":10684,"children":10685},{},[10686],{"type":54,"tag":92,"props":10687,"children":10689},{"className":10688},[],[10690],{"type":60,"value":4957},{"type":54,"tag":162,"props":10692,"children":10693},{},[10694],{"type":60,"value":10695},"Use stored CLI credentials",{"type":54,"tag":135,"props":10697,"children":10698},{},[10699,10708,10712,10721],{"type":54,"tag":162,"props":10700,"children":10701},{},[10702],{"type":54,"tag":92,"props":10703,"children":10705},{"className":10704},[],[10706],{"type":60,"value":10707},"logLevel",{"type":54,"tag":162,"props":10709,"children":10710},{},[10711],{"type":60,"value":1806},{"type":54,"tag":162,"props":10713,"children":10714},{},[10715],{"type":54,"tag":92,"props":10716,"children":10718},{"className":10717},[],[10719],{"type":60,"value":10720},"\"none\"",{"type":54,"tag":162,"props":10722,"children":10723},{},[10724,10729,10730,10736,10737,10743,10744,10750,10751],{"type":54,"tag":92,"props":10725,"children":10727},{"className":10726},[],[10728],{"type":60,"value":10720},{"type":60,"value":3069},{"type":54,"tag":92,"props":10731,"children":10733},{"className":10732},[],[10734],{"type":60,"value":10735},"\"error\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":10738,"children":10740},{"className":10739},[],[10741],{"type":60,"value":10742},"\"warning\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":10745,"children":10747},{"className":10746},[],[10748],{"type":60,"value":10749},"\"info\"",{"type":60,"value":3069},{"type":54,"tag":92,"props":10752,"children":10754},{"className":10753},[],[10755],{"type":60,"value":10756},"\"debug\"",{"type":54,"tag":135,"props":10758,"children":10759},{},[10760,10769,10773,10781],{"type":54,"tag":162,"props":10761,"children":10762},{},[10763],{"type":54,"tag":92,"props":10764,"children":10766},{"className":10765},[],[10767],{"type":60,"value":10768},"autoRestart",{"type":54,"tag":162,"props":10770,"children":10771},{},[10772],{"type":60,"value":3167},{"type":54,"tag":162,"props":10774,"children":10775},{},[10776],{"type":54,"tag":92,"props":10777,"children":10779},{"className":10778},[],[10780],{"type":60,"value":4957},{"type":54,"tag":162,"props":10782,"children":10783},{},[10784],{"type":60,"value":10785},"Auto-restart CLI on crash",{"type":54,"tag":135,"props":10787,"children":10788},{},[10789,10798,10802,10810],{"type":54,"tag":162,"props":10790,"children":10791},{},[10792],{"type":54,"tag":92,"props":10793,"children":10795},{"className":10794},[],[10796],{"type":60,"value":10797},"useStdio",{"type":54,"tag":162,"props":10799,"children":10800},{},[10801],{"type":60,"value":3167},{"type":54,"tag":162,"props":10803,"children":10804},{},[10805],{"type":54,"tag":92,"props":10806,"children":10808},{"className":10807},[],[10809],{"type":60,"value":4957},{"type":54,"tag":162,"props":10811,"children":10812},{},[10813],{"type":60,"value":10814},"Use stdio transport",{"type":54,"tag":69,"props":10816,"children":10818},{"id":10817},"session-configuration",[10819],{"type":60,"value":10820},"Session Configuration",{"type":54,"tag":127,"props":10822,"children":10823},{},[10824,10842],{"type":54,"tag":131,"props":10825,"children":10826},{},[10827],{"type":54,"tag":135,"props":10828,"children":10829},{},[10830,10834,10838],{"type":54,"tag":139,"props":10831,"children":10832},{},[10833],{"type":60,"value":10574},{"type":54,"tag":139,"props":10835,"children":10836},{},[10837],{"type":60,"value":3039},{"type":54,"tag":139,"props":10839,"children":10840},{},[10841],{"type":60,"value":308},{"type":54,"tag":155,"props":10843,"children":10844},{},[10845,10879,10899,10919,10943,10963,10983,11003,11026,11046,11069,11093,11113,11136,11159,11179],{"type":54,"tag":135,"props":10846,"children":10847},{},[10848,10856,10860],{"type":54,"tag":162,"props":10849,"children":10850},{},[10851],{"type":54,"tag":92,"props":10852,"children":10854},{"className":10853},[],[10855],{"type":60,"value":7861},{"type":54,"tag":162,"props":10857,"children":10858},{},[10859],{"type":60,"value":1806},{"type":54,"tag":162,"props":10861,"children":10862},{},[10863,10865,10871,10872,10878],{"type":60,"value":10864},"Model to use (e.g., ",{"type":54,"tag":92,"props":10866,"children":10868},{"className":10867},[],[10869],{"type":60,"value":10870},"\"gpt-4.1\"",{"type":60,"value":2993},{"type":54,"tag":92,"props":10873,"children":10875},{"className":10874},[],[10876],{"type":60,"value":10877},"\"claude-sonnet-4\"",{"type":60,"value":99},{"type":54,"tag":135,"props":10880,"children":10881},{},[10882,10890,10894],{"type":54,"tag":162,"props":10883,"children":10884},{},[10885],{"type":54,"tag":92,"props":10886,"children":10888},{"className":10887},[],[10889],{"type":60,"value":3924},{"type":54,"tag":162,"props":10891,"children":10892},{},[10893],{"type":60,"value":1806},{"type":54,"tag":162,"props":10895,"children":10896},{},[10897],{"type":60,"value":10898},"Custom ID for resumable sessions",{"type":54,"tag":135,"props":10900,"children":10901},{},[10902,10910,10914],{"type":54,"tag":162,"props":10903,"children":10904},{},[10905],{"type":54,"tag":92,"props":10906,"children":10908},{"className":10907},[],[10909],{"type":60,"value":7903},{"type":54,"tag":162,"props":10911,"children":10912},{},[10913],{"type":60,"value":3167},{"type":54,"tag":162,"props":10915,"children":10916},{},[10917],{"type":60,"value":10918},"Enable streaming responses",{"type":54,"tag":135,"props":10920,"children":10921},{},[10922,10930,10938],{"type":54,"tag":162,"props":10923,"children":10924},{},[10925],{"type":54,"tag":92,"props":10926,"children":10928},{"className":10927},[],[10929],{"type":60,"value":5479},{"type":54,"tag":162,"props":10931,"children":10932},{},[10933,10935],{"type":60,"value":10934},"Tool",{"type":54,"tag":392,"props":10936,"children":10937},{},[],{"type":54,"tag":162,"props":10939,"children":10940},{},[10941],{"type":60,"value":10942},"Custom tools",{"type":54,"tag":135,"props":10944,"children":10945},{},[10946,10954,10958],{"type":54,"tag":162,"props":10947,"children":10948},{},[10949],{"type":54,"tag":92,"props":10950,"children":10952},{"className":10951},[],[10953],{"type":60,"value":7910},{"type":54,"tag":162,"props":10955,"children":10956},{},[10957],{"type":60,"value":1751},{"type":54,"tag":162,"props":10959,"children":10960},{},[10961],{"type":60,"value":10962},"MCP server configurations",{"type":54,"tag":135,"props":10964,"children":10965},{},[10966,10974,10978],{"type":54,"tag":162,"props":10967,"children":10968},{},[10969],{"type":54,"tag":92,"props":10970,"children":10972},{"className":10971},[],[10973],{"type":60,"value":2477},{"type":54,"tag":162,"props":10975,"children":10976},{},[10977],{"type":60,"value":1751},{"type":54,"tag":162,"props":10979,"children":10980},{},[10981],{"type":60,"value":10982},"Session hooks",{"type":54,"tag":135,"props":10984,"children":10985},{},[10986,10994,10998],{"type":54,"tag":162,"props":10987,"children":10988},{},[10989],{"type":54,"tag":92,"props":10990,"children":10992},{"className":10991},[],[10993],{"type":60,"value":6340},{"type":54,"tag":162,"props":10995,"children":10996},{},[10997],{"type":60,"value":1751},{"type":54,"tag":162,"props":10999,"children":11000},{},[11001],{"type":60,"value":11002},"BYOK provider config",{"type":54,"tag":135,"props":11004,"children":11005},{},[11006,11014,11021],{"type":54,"tag":162,"props":11007,"children":11008},{},[11009],{"type":54,"tag":92,"props":11010,"children":11012},{"className":11011},[],[11013],{"type":60,"value":7917},{"type":54,"tag":162,"props":11015,"children":11016},{},[11017,11018],{"type":60,"value":1751},{"type":54,"tag":392,"props":11019,"children":11020},{},[],{"type":54,"tag":162,"props":11022,"children":11023},{},[11024],{"type":60,"value":11025},"Custom agent definitions",{"type":54,"tag":135,"props":11027,"children":11028},{},[11029,11037,11041],{"type":54,"tag":162,"props":11030,"children":11031},{},[11032],{"type":54,"tag":92,"props":11033,"children":11035},{"className":11034},[],[11036],{"type":60,"value":7868},{"type":54,"tag":162,"props":11038,"children":11039},{},[11040],{"type":60,"value":1751},{"type":54,"tag":162,"props":11042,"children":11043},{},[11044],{"type":60,"value":11045},"System message override",{"type":54,"tag":135,"props":11047,"children":11048},{},[11049,11057,11064],{"type":54,"tag":162,"props":11050,"children":11051},{},[11052],{"type":54,"tag":92,"props":11053,"children":11055},{"className":11054},[],[11056],{"type":60,"value":7924},{"type":54,"tag":162,"props":11058,"children":11059},{},[11060,11061],{"type":60,"value":1806},{"type":54,"tag":392,"props":11062,"children":11063},{},[],{"type":54,"tag":162,"props":11065,"children":11066},{},[11067],{"type":60,"value":11068},"Directories to load skills from",{"type":54,"tag":135,"props":11070,"children":11071},{},[11072,11081,11088],{"type":54,"tag":162,"props":11073,"children":11074},{},[11075],{"type":54,"tag":92,"props":11076,"children":11078},{"className":11077},[],[11079],{"type":60,"value":11080},"disabledSkills",{"type":54,"tag":162,"props":11082,"children":11083},{},[11084,11085],{"type":60,"value":1806},{"type":54,"tag":392,"props":11086,"children":11087},{},[],{"type":54,"tag":162,"props":11089,"children":11090},{},[11091],{"type":60,"value":11092},"Skills to disable",{"type":54,"tag":135,"props":11094,"children":11095},{},[11096,11104,11108],{"type":54,"tag":162,"props":11097,"children":11098},{},[11099],{"type":54,"tag":92,"props":11100,"children":11102},{"className":11101},[],[11103],{"type":60,"value":7896},{"type":54,"tag":162,"props":11105,"children":11106},{},[11107],{"type":60,"value":1806},{"type":54,"tag":162,"props":11109,"children":11110},{},[11111],{"type":60,"value":11112},"Reasoning effort level",{"type":54,"tag":135,"props":11114,"children":11115},{},[11116,11124,11131],{"type":54,"tag":162,"props":11117,"children":11118},{},[11119],{"type":54,"tag":92,"props":11120,"children":11122},{"className":11121},[],[11123],{"type":60,"value":7875},{"type":54,"tag":162,"props":11125,"children":11126},{},[11127,11128],{"type":60,"value":1806},{"type":54,"tag":392,"props":11129,"children":11130},{},[],{"type":54,"tag":162,"props":11132,"children":11133},{},[11134],{"type":60,"value":11135},"Restrict available tools",{"type":54,"tag":135,"props":11137,"children":11138},{},[11139,11147,11154],{"type":54,"tag":162,"props":11140,"children":11141},{},[11142],{"type":54,"tag":92,"props":11143,"children":11145},{"className":11144},[],[11146],{"type":60,"value":7882},{"type":54,"tag":162,"props":11148,"children":11149},{},[11150,11151],{"type":60,"value":1806},{"type":54,"tag":392,"props":11152,"children":11153},{},[],{"type":54,"tag":162,"props":11155,"children":11156},{},[11157],{"type":60,"value":11158},"Exclude specific tools",{"type":54,"tag":135,"props":11160,"children":11161},{},[11162,11170,11174],{"type":54,"tag":162,"props":11163,"children":11164},{},[11165],{"type":54,"tag":92,"props":11166,"children":11168},{"className":11167},[],[11169],{"type":60,"value":7931},{"type":54,"tag":162,"props":11171,"children":11172},{},[11173],{"type":60,"value":1751},{"type":54,"tag":162,"props":11175,"children":11176},{},[11177],{"type":60,"value":11178},"Auto-compaction config",{"type":54,"tag":135,"props":11180,"children":11181},{},[11182,11191,11195],{"type":54,"tag":162,"props":11183,"children":11184},{},[11185],{"type":54,"tag":92,"props":11186,"children":11188},{"className":11187},[],[11189],{"type":60,"value":11190},"workingDirectory",{"type":54,"tag":162,"props":11192,"children":11193},{},[11194],{"type":60,"value":1806},{"type":54,"tag":162,"props":11196,"children":11197},{},[11198],{"type":60,"value":5467},{"type":54,"tag":362,"props":11200,"children":11201},{},[],{"type":54,"tag":69,"props":11203,"children":11205},{"id":11204},"sdk-vs-cli-feature-comparison",[11206],{"type":60,"value":11207},"SDK vs CLI Feature Comparison",{"type":54,"tag":377,"props":11209,"children":11211},{"id":11210},"available-in-sdk",[11212],{"type":60,"value":11213},"✅ Available in SDK",{"type":54,"tag":63,"props":11215,"children":11216},{},[11217,11219,11225,11227,11232,11233,11239,11241,11247],{"type":60,"value":11218},"Session management, messaging (",{"type":54,"tag":92,"props":11220,"children":11222},{"className":11221},[],[11223],{"type":60,"value":11224},"send",{"type":60,"value":11226},"\u002F",{"type":54,"tag":92,"props":11228,"children":11230},{"className":11229},[],[11231],{"type":60,"value":619},{"type":60,"value":11226},{"type":54,"tag":92,"props":11234,"children":11236},{"className":11235},[],[11237],{"type":60,"value":11238},"abort",{"type":60,"value":11240},"), message history (",{"type":54,"tag":92,"props":11242,"children":11244},{"className":11243},[],[11245],{"type":60,"value":11246},"getMessages",{"type":60,"value":11248},"), custom tools, tool permission hooks, MCP servers (local + HTTP), streaming, model selection, BYOK providers, custom agents, system message, skills, infinite sessions, permission handlers, 40+ event types.",{"type":54,"tag":377,"props":11250,"children":11252},{"id":11251},"cli-only-features",[11253],{"type":60,"value":11254},"❌ CLI-Only Features",{"type":54,"tag":63,"props":11256,"children":11257},{},[11258,11260,11266,11268,11274,11276,11281,11283,11288,11290,11296,11297,11303],{"type":60,"value":11259},"Session export (",{"type":54,"tag":92,"props":11261,"children":11263},{"className":11262},[],[11264],{"type":60,"value":11265},"--share",{"type":60,"value":11267},"), slash commands, interactive UI, terminal rendering, YOLO mode, login\u002Flogout flows, ",{"type":54,"tag":92,"props":11269,"children":11271},{"className":11270},[],[11272],{"type":60,"value":11273},"\u002Fcompact",{"type":60,"value":11275}," (use ",{"type":54,"tag":92,"props":11277,"children":11279},{"className":11278},[],[11280],{"type":60,"value":7931},{"type":60,"value":11282}," instead), ",{"type":54,"tag":92,"props":11284,"children":11286},{"className":11285},[],[11287],{"type":60,"value":9608},{"type":60,"value":11289}," (use usage events), ",{"type":54,"tag":92,"props":11291,"children":11293},{"className":11292},[],[11294],{"type":60,"value":11295},"\u002Freview",{"type":60,"value":2993},{"type":54,"tag":92,"props":11298,"children":11300},{"className":11299},[],[11301],{"type":60,"value":11302},"\u002Fdelegate",{"type":60,"value":525},{"type":54,"tag":63,"props":11305,"children":11306},{},[11307],{"type":54,"tag":84,"props":11308,"children":11309},{},[11310],{"type":60,"value":11311},"Workarounds:",{"type":54,"tag":76,"props":11313,"children":11314},{},[11315,11334,11353],{"type":54,"tag":80,"props":11316,"children":11317},{},[11318,11320,11326,11328],{"type":60,"value":11319},"Session export → Collect events manually with ",{"type":54,"tag":92,"props":11321,"children":11323},{"className":11322},[],[11324],{"type":60,"value":11325},"session.on()",{"type":60,"value":11327}," + ",{"type":54,"tag":92,"props":11329,"children":11331},{"className":11330},[],[11332],{"type":60,"value":11333},"session.getMessages()",{"type":54,"tag":80,"props":11335,"children":11336},{},[11337,11339,11345,11347],{"type":60,"value":11338},"Permission control → Use ",{"type":54,"tag":92,"props":11340,"children":11342},{"className":11341},[],[11343],{"type":60,"value":11344},"onPermissionRequest",{"type":60,"value":11346}," handler instead of ",{"type":54,"tag":92,"props":11348,"children":11350},{"className":11349},[],[11351],{"type":60,"value":11352},"--allow-all-paths",{"type":54,"tag":80,"props":11354,"children":11355},{},[11356,11358,11363,11365],{"type":60,"value":11357},"Context compaction → Use ",{"type":54,"tag":92,"props":11359,"children":11361},{"className":11360},[],[11362],{"type":60,"value":7931},{"type":60,"value":11364}," config instead of ",{"type":54,"tag":92,"props":11366,"children":11368},{"className":11367},[],[11369],{"type":60,"value":11273},{"type":54,"tag":362,"props":11371,"children":11372},{},[],{"type":54,"tag":69,"props":11374,"children":11376},{"id":11375},"debugging",[11377],{"type":60,"value":11378},"Debugging",{"type":54,"tag":63,"props":11380,"children":11381},{},[11382],{"type":60,"value":11383},"Enable debug logging:",{"type":54,"tag":271,"props":11385,"children":11387},{"className":385,"code":11386,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ logLevel: \"debug\" });\n",[11388],{"type":54,"tag":92,"props":11389,"children":11390},{"__ignoreMap":279},[11391],{"type":54,"tag":392,"props":11392,"children":11393},{"class":394,"line":395},[11394,11398,11402,11406,11410,11414,11418,11422,11427,11431,11435,11440,11444,11448,11452],{"type":54,"tag":392,"props":11395,"children":11396},{"style":461},[11397],{"type":60,"value":464},{"type":54,"tag":392,"props":11399,"children":11400},{"style":411},[11401],{"type":60,"value":469},{"type":54,"tag":392,"props":11403,"children":11404},{"style":405},[11405],{"type":60,"value":474},{"type":54,"tag":392,"props":11407,"children":11408},{"style":405},[11409],{"type":60,"value":479},{"type":54,"tag":392,"props":11411,"children":11412},{"style":482},[11413],{"type":60,"value":414},{"type":54,"tag":392,"props":11415,"children":11416},{"style":411},[11417],{"type":60,"value":535},{"type":54,"tag":392,"props":11419,"children":11420},{"style":405},[11421],{"type":60,"value":540},{"type":54,"tag":392,"props":11423,"children":11424},{"style":543},[11425],{"type":60,"value":11426}," logLevel",{"type":54,"tag":392,"props":11428,"children":11429},{"style":405},[11430],{"type":60,"value":551},{"type":54,"tag":392,"props":11432,"children":11433},{"style":405},[11434],{"type":60,"value":429},{"type":54,"tag":392,"props":11436,"children":11437},{"style":432},[11438],{"type":60,"value":11439},"debug",{"type":54,"tag":392,"props":11441,"children":11442},{"style":405},[11443],{"type":60,"value":439},{"type":54,"tag":392,"props":11445,"children":11446},{"style":405},[11447],{"type":60,"value":419},{"type":54,"tag":392,"props":11449,"children":11450},{"style":411},[11451],{"type":60,"value":99},{"type":54,"tag":392,"props":11453,"children":11454},{"style":405},[11455],{"type":60,"value":444},{"type":54,"tag":63,"props":11457,"children":11458},{},[11459],{"type":60,"value":11460},"Custom log directory:",{"type":54,"tag":271,"props":11462,"children":11464},{"className":385,"code":11463,"language":21,"meta":279,"style":279},"const client = new CopilotClient({ cliArgs: [\"--log-dir\", \"\u002Fpath\u002Fto\u002Flogs\"] });\n",[11465],{"type":54,"tag":92,"props":11466,"children":11467},{"__ignoreMap":279},[11468],{"type":54,"tag":392,"props":11469,"children":11470},{"class":394,"line":395},[11471,11475,11479,11483,11487,11491,11495,11499,11504,11508,11512,11516,11521,11525,11529,11533,11538,11542,11546,11550,11554],{"type":54,"tag":392,"props":11472,"children":11473},{"style":461},[11474],{"type":60,"value":464},{"type":54,"tag":392,"props":11476,"children":11477},{"style":411},[11478],{"type":60,"value":469},{"type":54,"tag":392,"props":11480,"children":11481},{"style":405},[11482],{"type":60,"value":474},{"type":54,"tag":392,"props":11484,"children":11485},{"style":405},[11486],{"type":60,"value":479},{"type":54,"tag":392,"props":11488,"children":11489},{"style":482},[11490],{"type":60,"value":414},{"type":54,"tag":392,"props":11492,"children":11493},{"style":411},[11494],{"type":60,"value":535},{"type":54,"tag":392,"props":11496,"children":11497},{"style":405},[11498],{"type":60,"value":540},{"type":54,"tag":392,"props":11500,"children":11501},{"style":543},[11502],{"type":60,"value":11503}," cliArgs",{"type":54,"tag":392,"props":11505,"children":11506},{"style":405},[11507],{"type":60,"value":551},{"type":54,"tag":392,"props":11509,"children":11510},{"style":411},[11511],{"type":60,"value":1862},{"type":54,"tag":392,"props":11513,"children":11514},{"style":405},[11515],{"type":60,"value":439},{"type":54,"tag":392,"props":11517,"children":11518},{"style":432},[11519],{"type":60,"value":11520},"--log-dir",{"type":54,"tag":392,"props":11522,"children":11523},{"style":405},[11524],{"type":60,"value":439},{"type":54,"tag":392,"props":11526,"children":11527},{"style":405},[11528],{"type":60,"value":1064},{"type":54,"tag":392,"props":11530,"children":11531},{"style":405},[11532],{"type":60,"value":429},{"type":54,"tag":392,"props":11534,"children":11535},{"style":432},[11536],{"type":60,"value":11537},"\u002Fpath\u002Fto\u002Flogs",{"type":54,"tag":392,"props":11539,"children":11540},{"style":405},[11541],{"type":60,"value":439},{"type":54,"tag":392,"props":11543,"children":11544},{"style":411},[11545],{"type":60,"value":9212},{"type":54,"tag":392,"props":11547,"children":11548},{"style":405},[11549],{"type":60,"value":1228},{"type":54,"tag":392,"props":11551,"children":11552},{"style":411},[11553],{"type":60,"value":99},{"type":54,"tag":392,"props":11555,"children":11556},{"style":405},[11557],{"type":60,"value":444},{"type":54,"tag":377,"props":11559,"children":11561},{"id":11560},"common-issues",[11562],{"type":60,"value":11563},"Common Issues",{"type":54,"tag":127,"props":11565,"children":11566},{},[11567,11588],{"type":54,"tag":131,"props":11568,"children":11569},{},[11570],{"type":54,"tag":135,"props":11571,"children":11572},{},[11573,11578,11583],{"type":54,"tag":139,"props":11574,"children":11575},{},[11576],{"type":60,"value":11577},"Issue",{"type":54,"tag":139,"props":11579,"children":11580},{},[11581],{"type":60,"value":11582},"Cause",{"type":54,"tag":139,"props":11584,"children":11585},{},[11586],{"type":60,"value":11587},"Solution",{"type":54,"tag":155,"props":11589,"children":11590},{},[11591,11618,11652,11688,11718],{"type":54,"tag":135,"props":11592,"children":11593},{},[11594,11603,11608],{"type":54,"tag":162,"props":11595,"children":11596},{},[11597],{"type":54,"tag":92,"props":11598,"children":11600},{"className":11599},[],[11601],{"type":60,"value":11602},"CLI not found",{"type":54,"tag":162,"props":11604,"children":11605},{},[11606],{"type":60,"value":11607},"CLI not installed or not in PATH",{"type":54,"tag":162,"props":11609,"children":11610},{},[11611,11613],{"type":60,"value":11612},"Install CLI or set ",{"type":54,"tag":92,"props":11614,"children":11616},{"className":11615},[],[11617],{"type":60,"value":10602},{"type":54,"tag":135,"props":11619,"children":11620},{},[11621,11630,11635],{"type":54,"tag":162,"props":11622,"children":11623},{},[11624],{"type":54,"tag":92,"props":11625,"children":11627},{"className":11626},[],[11628],{"type":60,"value":11629},"Not authenticated",{"type":54,"tag":162,"props":11631,"children":11632},{},[11633],{"type":60,"value":11634},"No valid credentials",{"type":54,"tag":162,"props":11636,"children":11637},{},[11638,11640,11645,11647],{"type":60,"value":11639},"Run ",{"type":54,"tag":92,"props":11641,"children":11643},{"className":11642},[],[11644],{"type":60,"value":5956},{"type":60,"value":11646}," or provide ",{"type":54,"tag":92,"props":11648,"children":11650},{"className":11649},[],[11651],{"type":60,"value":5861},{"type":54,"tag":135,"props":11653,"children":11654},{},[11655,11664,11675],{"type":54,"tag":162,"props":11656,"children":11657},{},[11658],{"type":54,"tag":92,"props":11659,"children":11661},{"className":11660},[],[11662],{"type":60,"value":11663},"Session not found",{"type":54,"tag":162,"props":11665,"children":11666},{},[11667,11669],{"type":60,"value":11668},"Using session after ",{"type":54,"tag":92,"props":11670,"children":11672},{"className":11671},[],[11673],{"type":60,"value":11674},"destroy()",{"type":54,"tag":162,"props":11676,"children":11677},{},[11678,11680,11686],{"type":60,"value":11679},"Check ",{"type":54,"tag":92,"props":11681,"children":11683},{"className":11682},[],[11684],{"type":60,"value":11685},"listSessions()",{"type":60,"value":11687}," for valid IDs",{"type":54,"tag":135,"props":11689,"children":11690},{},[11691,11700,11705],{"type":54,"tag":162,"props":11692,"children":11693},{},[11694],{"type":54,"tag":92,"props":11695,"children":11697},{"className":11696},[],[11698],{"type":60,"value":11699},"Connection refused",{"type":54,"tag":162,"props":11701,"children":11702},{},[11703],{"type":60,"value":11704},"CLI process crashed",{"type":54,"tag":162,"props":11706,"children":11707},{},[11708,11710,11716],{"type":60,"value":11709},"Enable ",{"type":54,"tag":92,"props":11711,"children":11713},{"className":11712},[],[11714],{"type":60,"value":11715},"autoRestart: true",{"type":60,"value":11717},", check port conflicts",{"type":54,"tag":135,"props":11719,"children":11720},{},[11721,11726,11731],{"type":54,"tag":162,"props":11722,"children":11723},{},[11724],{"type":60,"value":11725},"MCP tools missing",{"type":54,"tag":162,"props":11727,"children":11728},{},[11729],{"type":60,"value":11730},"Server init failure or tools not enabled",{"type":54,"tag":162,"props":11732,"children":11733},{},[11734,11736,11741],{"type":60,"value":11735},"Set ",{"type":54,"tag":92,"props":11737,"children":11739},{"className":11738},[],[11740],{"type":60,"value":5803},{"type":60,"value":11742},", test server independently",{"type":54,"tag":377,"props":11744,"children":11746},{"id":11745},"connection-state",[11747],{"type":60,"value":11748},"Connection State",{"type":54,"tag":271,"props":11750,"children":11752},{"className":385,"code":11751,"language":21,"meta":279,"style":279},"console.log(\"State:\", client.getState());  \u002F\u002F \"connected\" after start()\nclient.on(\"stateChange\", (state) => console.log(\"Changed to:\", state));\n",[11753],{"type":54,"tag":92,"props":11754,"children":11755},{"__ignoreMap":279},[11756,11818],{"type":54,"tag":392,"props":11757,"children":11758},{"class":394,"line":395},[11759,11763,11767,11771,11775,11779,11784,11788,11792,11796,11800,11805,11809,11813],{"type":54,"tag":392,"props":11760,"children":11761},{"style":411},[11762],{"type":60,"value":670},{"type":54,"tag":392,"props":11764,"children":11765},{"style":405},[11766],{"type":60,"value":525},{"type":54,"tag":392,"props":11768,"children":11769},{"style":482},[11770],{"type":60,"value":679},{"type":54,"tag":392,"props":11772,"children":11773},{"style":411},[11774],{"type":60,"value":535},{"type":54,"tag":392,"props":11776,"children":11777},{"style":405},[11778],{"type":60,"value":439},{"type":54,"tag":392,"props":11780,"children":11781},{"style":432},[11782],{"type":60,"value":11783},"State:",{"type":54,"tag":392,"props":11785,"children":11786},{"style":405},[11787],{"type":60,"value":439},{"type":54,"tag":392,"props":11789,"children":11790},{"style":405},[11791],{"type":60,"value":1064},{"type":54,"tag":392,"props":11793,"children":11794},{"style":411},[11795],{"type":60,"value":520},{"type":54,"tag":392,"props":11797,"children":11798},{"style":405},[11799],{"type":60,"value":525},{"type":54,"tag":392,"props":11801,"children":11802},{"style":482},[11803],{"type":60,"value":11804},"getState",{"type":54,"tag":392,"props":11806,"children":11807},{"style":411},[11808],{"type":60,"value":1299},{"type":54,"tag":392,"props":11810,"children":11811},{"style":405},[11812],{"type":60,"value":7711},{"type":54,"tag":392,"props":11814,"children":11815},{"style":3248},[11816],{"type":60,"value":11817},"  \u002F\u002F \"connected\" after start()\n",{"type":54,"tag":392,"props":11819,"children":11820},{"class":394,"line":447},[11821,11826,11830,11834,11838,11842,11847,11851,11855,11859,11864,11868,11872,11876,11880,11884,11888,11892,11897,11901,11905,11910],{"type":54,"tag":392,"props":11822,"children":11823},{"style":411},[11824],{"type":60,"value":11825},"client",{"type":54,"tag":392,"props":11827,"children":11828},{"style":405},[11829],{"type":60,"value":525},{"type":54,"tag":392,"props":11831,"children":11832},{"style":482},[11833],{"type":60,"value":1115},{"type":54,"tag":392,"props":11835,"children":11836},{"style":411},[11837],{"type":60,"value":535},{"type":54,"tag":392,"props":11839,"children":11840},{"style":405},[11841],{"type":60,"value":439},{"type":54,"tag":392,"props":11843,"children":11844},{"style":432},[11845],{"type":60,"value":11846},"stateChange",{"type":54,"tag":392,"props":11848,"children":11849},{"style":405},[11850],{"type":60,"value":439},{"type":54,"tag":392,"props":11852,"children":11853},{"style":405},[11854],{"type":60,"value":1064},{"type":54,"tag":392,"props":11856,"children":11857},{"style":405},[11858],{"type":60,"value":1141},{"type":54,"tag":392,"props":11860,"children":11861},{"style":1144},[11862],{"type":60,"value":11863},"state",{"type":54,"tag":392,"props":11865,"children":11866},{"style":405},[11867],{"type":60,"value":99},{"type":54,"tag":392,"props":11869,"children":11870},{"style":461},[11871],{"type":60,"value":1156},{"type":54,"tag":392,"props":11873,"children":11874},{"style":411},[11875],{"type":60,"value":1286},{"type":54,"tag":392,"props":11877,"children":11878},{"style":405},[11879],{"type":60,"value":525},{"type":54,"tag":392,"props":11881,"children":11882},{"style":482},[11883],{"type":60,"value":679},{"type":54,"tag":392,"props":11885,"children":11886},{"style":411},[11887],{"type":60,"value":535},{"type":54,"tag":392,"props":11889,"children":11890},{"style":405},[11891],{"type":60,"value":439},{"type":54,"tag":392,"props":11893,"children":11894},{"style":432},[11895],{"type":60,"value":11896},"Changed to:",{"type":54,"tag":392,"props":11898,"children":11899},{"style":405},[11900],{"type":60,"value":439},{"type":54,"tag":392,"props":11902,"children":11903},{"style":405},[11904],{"type":60,"value":1064},{"type":54,"tag":392,"props":11906,"children":11907},{"style":411},[11908],{"type":60,"value":11909}," state))",{"type":54,"tag":392,"props":11911,"children":11912},{"style":405},[11913],{"type":60,"value":444},{"type":54,"tag":362,"props":11915,"children":11916},{},[],{"type":54,"tag":69,"props":11918,"children":11920},{"id":11919},"key-api-summary",[11921],{"type":60,"value":11922},"Key API Summary",{"type":54,"tag":127,"props":11924,"children":11925},{},[11926,11961],{"type":54,"tag":131,"props":11927,"children":11928},{},[11929],{"type":54,"tag":135,"props":11930,"children":11931},{},[11932,11936,11941,11946,11951,11956],{"type":54,"tag":139,"props":11933,"children":11934},{},[11935],{"type":60,"value":143},{"type":54,"tag":139,"props":11937,"children":11938},{},[11939],{"type":60,"value":11940},"Client",{"type":54,"tag":139,"props":11942,"children":11943},{},[11944],{"type":60,"value":11945},"Session Create",{"type":54,"tag":139,"props":11947,"children":11948},{},[11949],{"type":60,"value":11950},"Send",{"type":54,"tag":139,"props":11952,"children":11953},{},[11954],{"type":60,"value":11955},"Resume",{"type":54,"tag":139,"props":11957,"children":11958},{},[11959],{"type":60,"value":11960},"Stop",{"type":54,"tag":155,"props":11962,"children":11963},{},[11964,12016,12067,12119],{"type":54,"tag":135,"props":11965,"children":11966},{},[11967,11971,11980,11989,11998,12007],{"type":54,"tag":162,"props":11968,"children":11969},{},[11970],{"type":60,"value":166},{"type":54,"tag":162,"props":11972,"children":11973},{},[11974],{"type":54,"tag":92,"props":11975,"children":11977},{"className":11976},[],[11978],{"type":60,"value":11979},"new CopilotClient()",{"type":54,"tag":162,"props":11981,"children":11982},{},[11983],{"type":54,"tag":92,"props":11984,"children":11986},{"className":11985},[],[11987],{"type":60,"value":11988},"client.createSession()",{"type":54,"tag":162,"props":11990,"children":11991},{},[11992],{"type":54,"tag":92,"props":11993,"children":11995},{"className":11994},[],[11996],{"type":60,"value":11997},"session.sendAndWait()",{"type":54,"tag":162,"props":11999,"children":12000},{},[12001],{"type":54,"tag":92,"props":12002,"children":12004},{"className":12003},[],[12005],{"type":60,"value":12006},"client.resumeSession()",{"type":54,"tag":162,"props":12008,"children":12009},{},[12010],{"type":54,"tag":92,"props":12011,"children":12013},{"className":12012},[],[12014],{"type":60,"value":12015},"client.stop()",{"type":54,"tag":135,"props":12017,"children":12018},{},[12019,12023,12032,12041,12050,12059],{"type":54,"tag":162,"props":12020,"children":12021},{},[12022],{"type":60,"value":23},{"type":54,"tag":162,"props":12024,"children":12025},{},[12026],{"type":54,"tag":92,"props":12027,"children":12029},{"className":12028},[],[12030],{"type":60,"value":12031},"CopilotClient()",{"type":54,"tag":162,"props":12033,"children":12034},{},[12035],{"type":54,"tag":92,"props":12036,"children":12038},{"className":12037},[],[12039],{"type":60,"value":12040},"client.create_session()",{"type":54,"tag":162,"props":12042,"children":12043},{},[12044],{"type":54,"tag":92,"props":12045,"children":12047},{"className":12046},[],[12048],{"type":60,"value":12049},"session.send_and_wait()",{"type":54,"tag":162,"props":12051,"children":12052},{},[12053],{"type":54,"tag":92,"props":12054,"children":12056},{"className":12055},[],[12057],{"type":60,"value":12058},"client.resume_session()",{"type":54,"tag":162,"props":12060,"children":12061},{},[12062],{"type":54,"tag":92,"props":12063,"children":12065},{"className":12064},[],[12066],{"type":60,"value":12015},{"type":54,"tag":135,"props":12068,"children":12069},{},[12070,12074,12083,12092,12101,12110],{"type":54,"tag":162,"props":12071,"children":12072},{},[12073],{"type":60,"value":29},{"type":54,"tag":162,"props":12075,"children":12076},{},[12077],{"type":54,"tag":92,"props":12078,"children":12080},{"className":12079},[],[12081],{"type":60,"value":12082},"copilot.NewClient(nil)",{"type":54,"tag":162,"props":12084,"children":12085},{},[12086],{"type":54,"tag":92,"props":12087,"children":12089},{"className":12088},[],[12090],{"type":60,"value":12091},"client.CreateSession()",{"type":54,"tag":162,"props":12093,"children":12094},{},[12095],{"type":54,"tag":92,"props":12096,"children":12098},{"className":12097},[],[12099],{"type":60,"value":12100},"session.SendAndWait()",{"type":54,"tag":162,"props":12102,"children":12103},{},[12104],{"type":54,"tag":92,"props":12105,"children":12107},{"className":12106},[],[12108],{"type":60,"value":12109},"client.ResumeSession()",{"type":54,"tag":162,"props":12111,"children":12112},{},[12113],{"type":54,"tag":92,"props":12114,"children":12116},{"className":12115},[],[12117],{"type":60,"value":12118},"client.Stop()",{"type":54,"tag":135,"props":12120,"children":12121},{},[12122,12126,12134,12143,12152,12161],{"type":54,"tag":162,"props":12123,"children":12124},{},[12125],{"type":60,"value":17},{"type":54,"tag":162,"props":12127,"children":12128},{},[12129],{"type":54,"tag":92,"props":12130,"children":12132},{"className":12131},[],[12133],{"type":60,"value":11979},{"type":54,"tag":162,"props":12135,"children":12136},{},[12137],{"type":54,"tag":92,"props":12138,"children":12140},{"className":12139},[],[12141],{"type":60,"value":12142},"client.CreateSessionAsync()",{"type":54,"tag":162,"props":12144,"children":12145},{},[12146],{"type":54,"tag":92,"props":12147,"children":12149},{"className":12148},[],[12150],{"type":60,"value":12151},"session.SendAndWaitAsync()",{"type":54,"tag":162,"props":12153,"children":12154},{},[12155],{"type":54,"tag":92,"props":12156,"children":12158},{"className":12157},[],[12159],{"type":60,"value":12160},"client.ResumeSessionAsync()",{"type":54,"tag":162,"props":12162,"children":12163},{},[12164],{"type":54,"tag":92,"props":12165,"children":12167},{"className":12166},[],[12168],{"type":60,"value":12169},"client.DisposeAsync()",{"type":54,"tag":69,"props":12171,"children":12173},{"id":12172},"references",[12174],{"type":60,"value":12175},"References",{"type":54,"tag":76,"props":12177,"children":12178},{},[12179,12190,12200,12210,12220],{"type":54,"tag":80,"props":12180,"children":12181},{},[12182],{"type":54,"tag":12183,"props":12184,"children":12188},"a",{"href":12185,"rel":12186},"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fcopilot-sdk",[12187],"nofollow",[12189],{"type":60,"value":61},{"type":54,"tag":80,"props":12191,"children":12192},{},[12193],{"type":54,"tag":12183,"props":12194,"children":12197},{"href":12195,"rel":12196},"https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fhow-tos\u002Fset-up\u002Finstall-copilot-cli",[12187],[12198],{"type":60,"value":12199},"Copilot CLI Installation",{"type":54,"tag":80,"props":12201,"children":12202},{},[12203],{"type":54,"tag":12183,"props":12204,"children":12207},{"href":12205,"rel":12206},"https:\u002F\u002Fmodelcontextprotocol.io",[12187],[12208],{"type":60,"value":12209},"MCP Protocol Specification",{"type":54,"tag":80,"props":12211,"children":12212},{},[12213],{"type":54,"tag":12183,"props":12214,"children":12217},{"href":12215,"rel":12216},"https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fservers",[12187],[12218],{"type":60,"value":12219},"MCP Servers Directory",{"type":54,"tag":80,"props":12221,"children":12222},{},[12223],{"type":54,"tag":12183,"props":12224,"children":12227},{"href":12225,"rel":12226},"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgithub-mcp-server",[12187],[12228],{"type":60,"value":12229},"GitHub MCP Server",{"type":54,"tag":12231,"props":12232,"children":12233},"style",{},[12234],{"type":60,"value":12235},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":12237,"total":12343},[12238,12253,12274,12289,12304,12315,12328],{"slug":12239,"name":12239,"fn":12240,"description":12241,"org":12242,"tags":12243,"stars":31,"repoUrl":32,"updatedAt":12252},"azure-ai-agents-persistent-dotnet","build AI agents with Azure .NET SDK","Azure AI Agents Persistent SDK for .NET. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools. Use for agent CRUD, conversation threads, streaming responses, function calling, file search, and code interpreter. Triggers: \"PersistentAgentsClient\", \"persistent agents\", \"agent threads\", \"agent runs\", \"streaming agents\", \"function calling agents .NET\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12244,12245,12247,12249],{"name":17,"slug":18,"type":15},{"name":12246,"slug":38,"type":15},"Agents",{"name":12248,"slug":39,"type":15},"Azure",{"name":12250,"slug":12251,"type":15},"LLM","llm","2026-07-03T16:32:10.297433",{"slug":12254,"name":12254,"fn":12255,"description":12256,"org":12257,"tags":12258,"stars":31,"repoUrl":32,"updatedAt":12273},"azure-ai-anomalydetector-java","build anomaly detection applications with Java","Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate\u002Fmultivariate anomaly detection, time-series analysis, or AI-powered monitoring.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12259,12262,12263,12266,12269,12270],{"name":12260,"slug":12261,"type":15},"Analytics","analytics",{"name":12248,"slug":39,"type":15},{"name":12264,"slug":12265,"type":15},"Data Analysis","data-analysis",{"name":12267,"slug":12268,"type":15},"Java","java",{"name":9,"slug":8,"type":15},{"name":12271,"slug":12272,"type":15},"Monitoring","monitoring","2026-05-13T06:14:16.261754",{"slug":12275,"name":12275,"fn":12276,"description":12277,"org":12278,"tags":12279,"stars":31,"repoUrl":32,"updatedAt":12288},"azure-ai-contentsafety-java","build content moderation applications with Azure AI","Build content moderation applications with Azure AI Content Safety SDK for Java. Use when implementing text\u002Fimage analysis, blocklist management, or harm detection for hate, violence, sexual content, and self-harm.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12280,12283,12284,12285],{"name":12281,"slug":12282,"type":15},"AI Infrastructure","ai-infrastructure",{"name":12248,"slug":39,"type":15},{"name":12267,"slug":12268,"type":15},{"name":12286,"slug":12287,"type":15},"Security","security","2026-07-07T06:53:31.293235",{"slug":12290,"name":12290,"fn":12291,"description":12292,"org":12293,"tags":12294,"stars":31,"repoUrl":32,"updatedAt":12303},"azure-ai-contentsafety-py","detect harmful content with Azure AI Content Safety","Azure AI Content Safety SDK for Python. Use for detecting harmful content in text and images with multi-severity classification.\nTriggers: \"azure-ai-contentsafety\", \"ContentSafetyClient\", \"content moderation\", \"harmful content\", \"text analysis\", \"image analysis\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12295,12296,12299,12300,12301,12302],{"name":12248,"slug":39,"type":15},{"name":12297,"slug":12298,"type":15},"Compliance","compliance",{"name":12250,"slug":12251,"type":15},{"name":9,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":12286,"slug":12287,"type":15},"2026-07-18T05:14:23.017504",{"slug":12305,"name":12305,"fn":12306,"description":12307,"org":12308,"tags":12309,"stars":31,"repoUrl":32,"updatedAt":12314},"azure-ai-language-conversations-py","implement conversational language understanding with Python","Implement Conversational Language Understanding (CLU) using the azure-ai-language-conversations Python SDK. Use when working with ConversationAnalysisClient to analyze conversation intent and entities, building NLP features, or integrating language understanding into applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12310,12311,12312,12313],{"name":12260,"slug":12261,"type":15},{"name":12248,"slug":39,"type":15},{"name":12250,"slug":12251,"type":15},{"name":23,"slug":24,"type":15},"2026-07-31T05:54:29.068751",{"slug":12316,"name":12316,"fn":12317,"description":12318,"org":12319,"tags":12320,"stars":31,"repoUrl":32,"updatedAt":12327},"azure-ai-translation-text-py","translate text using Azure AI services","Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications.\nTriggers: \"text translation\", \"translator\", \"translate text\", \"transliterate\", \"TextTranslationClient\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12321,12324,12325,12326],{"name":12322,"slug":12323,"type":15},"API Development","api-development",{"name":12248,"slug":39,"type":15},{"name":9,"slug":8,"type":15},{"name":23,"slug":24,"type":15},"2026-07-18T05:14:16.988376",{"slug":12329,"name":12329,"fn":12330,"description":12331,"org":12332,"tags":12333,"stars":31,"repoUrl":32,"updatedAt":12342},"azure-ai-vision-imageanalysis-py","analyze images with Azure AI Vision","Azure AI Vision Image Analysis SDK for captions, tags, objects, OCR, people detection, and smart cropping. Use for computer vision and image understanding tasks.\nTriggers: \"image analysis\", \"computer vision\", \"OCR\", \"object detection\", \"ImageAnalysisClient\", \"image caption\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12334,12335,12338,12341],{"name":12248,"slug":39,"type":15},{"name":12336,"slug":12337,"type":15},"Computer Vision","computer-vision",{"name":12339,"slug":12340,"type":15},"Images","images",{"name":23,"slug":24,"type":15},"2026-07-18T05:14:18.007737",38,{"items":12345,"total":12478},[12346,12368,12375,12384,12391,12400,12407,12414,12421,12436,12455,12466],{"slug":12347,"name":12347,"fn":12348,"description":12349,"org":12350,"tags":12351,"stars":12365,"repoUrl":12366,"updatedAt":12367},"rushstack-best-practices","manage Rush monorepos with best practices","Provides best practices and guidance for working with Rush monorepos. Use when the user is working in a Rush-based repository, asks about Rush commands (install, update, build, rebuild), needs help with project selection, dependency management, build caching, subspace configuration, or troubleshooting Rush-specific issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12352,12355,12358,12359,12362],{"name":12353,"slug":12354,"type":15},"Engineering","engineering",{"name":12356,"slug":12357,"type":15},"Local Development","local-development",{"name":9,"slug":8,"type":15},{"name":12360,"slug":12361,"type":15},"Project Management","project-management",{"name":12363,"slug":12364,"type":15},"Rush","rush",6484,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Frushstack","2026-04-06T18:34:44.965032",{"slug":12239,"name":12239,"fn":12240,"description":12241,"org":12369,"tags":12370,"stars":31,"repoUrl":32,"updatedAt":12252},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12371,12372,12373,12374],{"name":17,"slug":18,"type":15},{"name":12246,"slug":38,"type":15},{"name":12248,"slug":39,"type":15},{"name":12250,"slug":12251,"type":15},{"slug":12254,"name":12254,"fn":12255,"description":12256,"org":12376,"tags":12377,"stars":31,"repoUrl":32,"updatedAt":12273},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12378,12379,12380,12381,12382,12383],{"name":12260,"slug":12261,"type":15},{"name":12248,"slug":39,"type":15},{"name":12264,"slug":12265,"type":15},{"name":12267,"slug":12268,"type":15},{"name":9,"slug":8,"type":15},{"name":12271,"slug":12272,"type":15},{"slug":12275,"name":12275,"fn":12276,"description":12277,"org":12385,"tags":12386,"stars":31,"repoUrl":32,"updatedAt":12288},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12387,12388,12389,12390],{"name":12281,"slug":12282,"type":15},{"name":12248,"slug":39,"type":15},{"name":12267,"slug":12268,"type":15},{"name":12286,"slug":12287,"type":15},{"slug":12290,"name":12290,"fn":12291,"description":12292,"org":12392,"tags":12393,"stars":31,"repoUrl":32,"updatedAt":12303},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12394,12395,12396,12397,12398,12399],{"name":12248,"slug":39,"type":15},{"name":12297,"slug":12298,"type":15},{"name":12250,"slug":12251,"type":15},{"name":9,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"name":12286,"slug":12287,"type":15},{"slug":12305,"name":12305,"fn":12306,"description":12307,"org":12401,"tags":12402,"stars":31,"repoUrl":32,"updatedAt":12314},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12403,12404,12405,12406],{"name":12260,"slug":12261,"type":15},{"name":12248,"slug":39,"type":15},{"name":12250,"slug":12251,"type":15},{"name":23,"slug":24,"type":15},{"slug":12316,"name":12316,"fn":12317,"description":12318,"org":12408,"tags":12409,"stars":31,"repoUrl":32,"updatedAt":12327},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12410,12411,12412,12413],{"name":12322,"slug":12323,"type":15},{"name":12248,"slug":39,"type":15},{"name":9,"slug":8,"type":15},{"name":23,"slug":24,"type":15},{"slug":12329,"name":12329,"fn":12330,"description":12331,"org":12415,"tags":12416,"stars":31,"repoUrl":32,"updatedAt":12342},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12417,12418,12419,12420],{"name":12248,"slug":39,"type":15},{"name":12336,"slug":12337,"type":15},{"name":12339,"slug":12340,"type":15},{"name":23,"slug":24,"type":15},{"slug":12422,"name":12422,"fn":12423,"description":12424,"org":12425,"tags":12426,"stars":31,"repoUrl":32,"updatedAt":12435},"azure-appconfiguration-java","manage configuration with Azure App Configuration","Azure App Configuration SDK for Java. Centralized application configuration management with key-value settings, feature flags, and snapshots.\nTriggers: \"ConfigurationClient java\", \"app configuration java\", \"feature flag java\", \"configuration setting java\", \"azure config java\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12427,12428,12431,12434],{"name":12248,"slug":39,"type":15},{"name":12429,"slug":12430,"type":15},"Configuration","configuration",{"name":12432,"slug":12433,"type":15},"Feature Flags","feature-flags",{"name":12267,"slug":12268,"type":15},"2026-07-03T16:32:01.278468",{"slug":12437,"name":12437,"fn":12438,"description":12439,"org":12440,"tags":12441,"stars":31,"repoUrl":32,"updatedAt":12454},"azure-cosmos-rust","build applications with Azure Cosmos DB","Azure Cosmos DB library for Rust (NoSQL API). Document CRUD, containers, and globally distributed data.\nTriggers: \"cosmos db rust\", \"CosmosClient rust\", \"document crud rust\", \"NoSQL rust\", \"partition key rust\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12442,12445,12448,12451],{"name":12443,"slug":12444,"type":15},"Cosmos DB","cosmos-db",{"name":12446,"slug":12447,"type":15},"Database","database",{"name":12449,"slug":12450,"type":15},"NoSQL","nosql",{"name":12452,"slug":12453,"type":15},"Rust","rust","2026-07-31T05:54:27.021432",{"slug":12456,"name":12456,"fn":12438,"description":12457,"org":12458,"tags":12459,"stars":31,"repoUrl":32,"updatedAt":12465},"azure-cosmos-ts","Azure Cosmos DB JavaScript\u002FTypeScript SDK (@azure\u002Fcosmos) for data plane operations. Use for CRUD operations on documents, queries, bulk operations, and container management. Triggers: \"Cosmos DB\", \"@azure\u002Fcosmos\", \"CosmosClient\", \"document CRUD\", \"NoSQL queries\", \"bulk operations\", \"partition key\", \"container.items\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12460,12461,12462,12463,12464],{"name":12443,"slug":12444,"type":15},{"name":12446,"slug":12447,"type":15},{"name":9,"slug":8,"type":15},{"name":12449,"slug":12450,"type":15},{"name":20,"slug":21,"type":15},"2026-07-03T16:31:19.368382",{"slug":12467,"name":12467,"fn":12468,"description":12469,"org":12470,"tags":12471,"stars":31,"repoUrl":32,"updatedAt":12477},"azure-data-tables-java","build table storage applications with Java","Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[12472,12473,12474,12475,12476],{"name":12248,"slug":39,"type":15},{"name":12443,"slug":12444,"type":15},{"name":12446,"slug":12447,"type":15},{"name":12267,"slug":12268,"type":15},{"name":12449,"slug":12450,"type":15},"2026-05-13T06:14:17.582229",267]