@github/copilot
Advanced tools
@@ -29,3 +29,3 @@ --- | ||
| - [Set environment variables in Copilot's environment](#setting-environment-variables-in-copilots-environment) | ||
| - [Disable or customize the agent's firewall](https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent). | ||
| - [Disable or customize the agent's firewall](https://docs.github.com/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent). | ||
@@ -36,3 +36,3 @@ ## Customizing Copilot's development environment with Copilot setup steps | ||
| A `copilot-setup-steps.yml` file looks like a normal GitHub Actions workflow file, but must contain a single `copilot-setup-steps` job. The steps in this job will be executed in GitHub Actions before Copilot starts working. For more information on GitHub Actions workflow files, see [Workflow syntax for GitHub Actions](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions). | ||
| A `copilot-setup-steps.yml` file looks like a normal GitHub Actions workflow file, but must contain a single `copilot-setup-steps` job. The steps in this job will be executed in GitHub Actions before Copilot starts working. For more information on GitHub Actions workflow files, see [Workflow syntax for GitHub Actions](https://docs.github.com/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions). | ||
@@ -85,3 +85,3 @@ > [!NOTE] | ||
| For more information on these options, see [Workflow syntax for GitHub Actions](https://docs.github.com/en/enterprise-cloud@latest/actions/writing-workflows/workflow-syntax-for-github-actions#jobs). | ||
| For more information on these options, see [Workflow syntax for GitHub Actions](https://docs.github.com/enterprise-cloud@latest/actions/writing-workflows/workflow-syntax-for-github-actions#jobs). | ||
@@ -92,5 +92,5 @@ Any value that is set for the `fetch-depth` option of the `actions/checkout` action will be overridden to allow the agent to rollback commits upon request, while mitigating security risks. For more information, see [`actions/checkout/README.md`](https://github.com/actions/checkout/blob/main/README.md). | ||
| Once you have merged the yml file into your default branch, you can manually run the workflow from the repository's **Actions** tab at any time to check that everything works as expected. For more information, see [Manually running a workflow](https://docs.github.com/en/enterprise-cloud@latest/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow). | ||
| Once you have merged the yml file into your default branch, you can manually run the workflow from the repository's **Actions** tab at any time to check that everything works as expected. For more information, see [Manually running a workflow](https://docs.github.com/enterprise-cloud@latest/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow). | ||
| When Copilot starts work, your setup steps will be run, and updates will show in the session logs. See [Tracking GitHub Copilot's sessions](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/tracking-copilots-sessions). | ||
| When Copilot starts work, your setup steps will be run, and updates will show in the session logs. See [Tracking GitHub Copilot's sessions](https://docs.github.com/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/tracking-copilots-sessions). | ||
@@ -132,5 +132,5 @@ If any setup step fails by returning a non-zero exit code, Copilot will skip the remaining setup steps and begin working with the current state of its development environment. | ||
| By default, Copilot works in a standard GitHub Actions runner. You can upgrade to larger runners for better performance (CPU and memory), more disk space and advanced features like Azure private networking. For more information, see [Larger runners](https://docs.github.com/en/enterprise-cloud@latest/actions/using-github-hosted-runners/using-larger-runners/about-larger-runners). | ||
| By default, Copilot works in a standard GitHub Actions runner. You can upgrade to larger runners for better performance (CPU and memory), more disk space and advanced features like Azure private networking. For more information, see [Larger runners](https://docs.github.com/enterprise-cloud@latest/actions/using-github-hosted-runners/using-larger-runners/about-larger-runners). | ||
| 1. Set up larger runners for your organization. For more information, see [Managing larger runners](https://docs.github.com/en/enterprise-cloud@latest/actions/using-github-hosted-runners/managing-larger-runners). | ||
| 1. Set up larger runners for your organization. For more information, see [Managing larger runners](https://docs.github.com/enterprise-cloud@latest/actions/using-github-hosted-runners/managing-larger-runners). | ||
@@ -143,3 +143,3 @@ 2. If you are using larger runners with Azure private networking, configure your Azure private network to allow outbound access to the hosts required for Copilot cloud agent: | ||
| - `api.enterprise.githubcopilot.com` (if you expect Copilot Enterprise users to use Copilot cloud agent in your repository) | ||
| - If you are using the OpenAI Codex third-party agent (for more information, see [About third-party agents](https://docs.github.com/en/enterprise-cloud@latest/copilot/concepts/agents/about-third-party-agents)): | ||
| - If you are using the OpenAI Codex third-party agent (for more information, see [About third-party agents](https://docs.github.com/enterprise-cloud@latest/copilot/concepts/agents/about-third-party-agents)): | ||
| - `npmjs.org` | ||
@@ -151,3 +151,3 @@ - `npmjs.com` | ||
| 3. Use a `copilot-setup-steps.yml` file in your repository to configure Copilot cloud agent to run on your chosen runners. Set the `runs-on` step of the `copilot-setup-steps` job to the label and/or group for the larger runners you want Copilot to use. For more information on specifying larger runners with `runs-on`, see [Running jobs on larger runners](https://docs.github.com/en/enterprise-cloud@latest/actions/using-github-hosted-runners/running-jobs-on-larger-runners). | ||
| 3. Use a `copilot-setup-steps.yml` file in your repository to configure Copilot cloud agent to run on your chosen runners. Set the `runs-on` step of the `copilot-setup-steps` job to the label and/or group for the larger runners you want Copilot to use. For more information on specifying larger runners with `runs-on`, see [Running jobs on larger runners](https://docs.github.com/enterprise-cloud@latest/actions/using-github-hosted-runners/running-jobs-on-larger-runners). | ||
@@ -171,3 +171,3 @@ ```yaml | ||
| We recommend that you only use Copilot cloud agent with ephemeral, single-use runners that are not reused for multiple jobs. Most customers set this up using ARC (Actions Runner Controller) or the GitHub Actions Runner Scale Set Client. For more information, see [Self-hosted runners reference](https://docs.github.com/en/enterprise-cloud@latest/actions/reference/runners/self-hosted-runners#supported-autoscaling-solutions). | ||
| We recommend that you only use Copilot cloud agent with ephemeral, single-use runners that are not reused for multiple jobs. Most customers set this up using ARC (Actions Runner Controller) or the GitHub Actions Runner Scale Set Client. For more information, see [Self-hosted runners reference](https://docs.github.com/enterprise-cloud@latest/actions/reference/runners/self-hosted-runners#supported-autoscaling-solutions). | ||
@@ -179,3 +179,3 @@ > [!NOTE] | ||
| You must configure your firewall to allow connections to the [standard hosts required for GitHub Actions self-hosted runners](https://docs.github.com/en/enterprise-cloud@latest/actions/reference/runners/self-hosted-runners#accessible-domains-by-function), plus the following hosts: | ||
| You must configure your firewall to allow connections to the [standard hosts required for GitHub Actions self-hosted runners](https://docs.github.com/enterprise-cloud@latest/actions/reference/runners/self-hosted-runners#accessible-domains-by-function), plus the following hosts: | ||
| - `uploads.github.com` | ||
@@ -186,3 +186,3 @@ - `user-images.githubusercontent.com` | ||
| - `api.enterprise.githubcopilot.com` (if you expect Copilot Enterprise users to use Copilot cloud agent in your repository) | ||
| - If you are using the OpenAI Codex third-party agent (for more information, see [About third-party agents](https://docs.github.com/en/enterprise-cloud@latest/copilot/concepts/agents/about-third-party-agents)): | ||
| - If you are using the OpenAI Codex third-party agent (for more information, see [About third-party agents](https://docs.github.com/enterprise-cloud@latest/copilot/concepts/agents/about-third-party-agents)): | ||
| - `npmjs.org` | ||
@@ -194,3 +194,3 @@ - `npmjs.com` | ||
| 2. Disable Copilot cloud agent's integrated firewall in your repository settings. The firewall is not compatible with self-hosted runners. Unless this is disabled, use of Copilot cloud agent will be blocked. For more information, see [Customizing or disabling the firewall for GitHub Copilot cloud agent](https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent). | ||
| 2. Disable Copilot cloud agent's integrated firewall in your repository settings. The firewall is not compatible with self-hosted runners. Unless this is disabled, use of Copilot cloud agent will be blocked. For more information, see [Customizing or disabling the firewall for GitHub Copilot cloud agent](https://docs.github.com/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent). | ||
@@ -218,3 +218,3 @@ 3. In your `copilot-setup-steps.yml` file, set the `runs-on` attribute to your ARC-managed scale set name: | ||
| You can set these environment variables by following the [instructions below](#setting-environment-variables-in-copilots-environment), or by setting them on the runner directly, for example with a custom runner image. For more information on building a custom image, see [Actions Runner Controller](https://docs.github.com/en/enterprise-cloud@latest/actions/concepts/runners/actions-runner-controller#creating-your-own-runner-image). | ||
| You can set these environment variables by following the [instructions below](#setting-environment-variables-in-copilots-environment), or by setting them on the runner directly, for example with a custom runner image. For more information on building a custom image, see [Actions Runner Controller](https://docs.github.com/enterprise-cloud@latest/actions/concepts/runners/actions-runner-controller#creating-your-own-runner-image). | ||
@@ -227,3 +227,3 @@ ## Switching Copilot to a Windows development environment | ||
| Copilot cloud agent's integrated firewall is not compatible with Windows, so we recommend that you only use self-hosted runners or larger GitHub-hosted runners with Azure private networking where you can implement your own network controls. For more information on runners with Azure private networking, see [About Azure private networking for GitHub-hosted runners in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/configuring-settings/configuring-private-networking-for-hosted-compute-products/about-azure-private-networking-for-github-hosted-runners-in-your-enterprise). | ||
| Copilot cloud agent's integrated firewall is not compatible with Windows, so we recommend that you only use self-hosted runners or larger GitHub-hosted runners with Azure private networking where you can implement your own network controls. For more information on runners with Azure private networking, see [About Azure private networking for GitHub-hosted runners in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/configuring-settings/configuring-private-networking-for-hosted-compute-products/about-azure-private-networking-for-github-hosted-runners-in-your-enterprise). | ||
@@ -267,2 +267,2 @@ To use Windows with self-hosted runners, follow the instructions in the [Using self-hosted GitHub Actions runners](#using-self-hosted-github-actions-runners) section above, using the label for your Windows runners. To use Windows with larger GitHub-hosted runners, follow the instructions in the [Upgrading to larger runners](#upgrading-to-larger-github-hosted-github-actions-runners) section above, using the label for your Windows runners. | ||
| - [Customizing or disabling the firewall for GitHub Copilot cloud agent](https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent) | ||
| - [Customizing or disabling the firewall for GitHub Copilot cloud agent](https://docs.github.com/enterprise-cloud@latest/copilot/customizing-copilot/customizing-or-disabling-the-firewall-for-copilot-coding-agent) |
| name: research | ||
| displayName: Research Agent | ||
| description: > | ||
| Staff software engineer and software research specialist that provides exhaustive, | ||
| meticulously researched answers about codebases, APIs, libraries, and software | ||
| architecture using GitHub's search and exploration tools. | ||
| Research subagent that executes thorough searches based on main agent instructions. | ||
| Searches GitHub repos, fetches files, verifies claims, and reports detailed findings | ||
| with citations. Designed to work autonomously within a research workflow. | ||
| model: claude-sonnet-4.6 | ||
| tools: | ||
| # GitHub MCP tools (using short 'github/' prefix which maps to 'github-mcp-server/') | ||
| - github/get_me # IMPORTANT: Use this first to understand user context and org | ||
| - github/get_me # USE THIS FIRST to understand org/repo context | ||
| - github/get_file_contents | ||
@@ -26,7 +26,5 @@ - github/search_code | ||
| - web_search | ||
| - task | ||
| - grep | ||
| - glob | ||
| - view | ||
| - create | ||
| promptParts: | ||
@@ -38,4 +36,11 @@ includeAISafety: true | ||
| prompt: | | ||
| You are a staff software engineer and software research specialist. Your purpose is to provide exhaustive, meticulously researched answers about codebases, APIs, libraries, and software architecture. | ||
| You are a research specialist subagent responsible for executing detailed searches based on instructions from the main agent orchestrating a research project. Your job is to: | ||
| 1. **Follow the main agent's search instructions precisely** | ||
| 2. **Search to discover, fetch to investigate** — use searches only to find repos and paths, then read files directly | ||
| 3. **Fetch and read relevant files** to verify claims | ||
| 4. **Report back with detailed findings** including all citations | ||
| You receive specific search instructions from the main agent. Execute those instructions and report comprehensive results. | ||
| **Environment Context:** | ||
@@ -45,343 +50,84 @@ - Current working directory: {{cwd}} | ||
| **Critical: No User Interaction** | ||
| ## Critical: Work Autonomously | ||
| **NEVER ask the user clarifying questions.** You must work autonomously with: | ||
| - The research query you were given | ||
| - The tools available to you | ||
| - Your best judgment when information is ambiguous | ||
| You work completely autonomously: | ||
| - Call `github/get_me` first to understand the user's org and identity context | ||
| - Follow the main agent's search instructions exactly | ||
| - Do NOT ask questions (to user or main agent) | ||
| - Make reasonable assumptions if details are unclear | ||
| - Report what you found and any gaps/uncertainties | ||
| If something is unclear, make reasonable assumptions and note them in your Confidence Assessment. Do NOT use ask_user or any tool that prompts for user input. | ||
| ## Search Execution Principles | ||
| **Save Your Report** | ||
| ### 1. Search vs. Fetch Strategy | ||
| When your research is complete, save the full report to the following path using the `create` tool: | ||
| `{{reportPath}}` | ||
| This is mandatory. The report must be saved as a markdown file so it can be shared later. | ||
| After saving the report, provide a concise summary of your key findings to the user. Include the file path where the report was saved so they can open it. | ||
| **Adapt Response to Query Intent** | ||
| Before researching, identify the query type and adapt your response accordingly: | ||
| **Query Type 1: Process/How-to Questions** | ||
| Examples: "How do I raise rate limits?", "How do I get access to X?", "What's the process for Y?" | ||
| **Focus on:** | ||
| - Steps and procedures | ||
| - Who to contact or where to go | ||
| - Policies, runbooks, documentation links | ||
| - Prerequisites and requirements | ||
| **Code/diagrams:** Only include if directly relevant to completing the process | ||
| **Structure:** Step-by-step guidance with links to relevant docs/people/systems | ||
| **Query Type 2: Conceptual/Explanatory Questions** | ||
| Examples: "What is X?", "Why does Y work this way?", "What's the difference between A and B?" | ||
| **Focus on:** | ||
| - Clear explanation of the concept | ||
| - Context, background, and history | ||
| - Trade-offs and design decisions | ||
| - How it relates to other concepts | ||
| **Code/diagrams:** Only include if they clarify the concept | ||
| **Structure:** Narrative explanation with supporting evidence | ||
| **Query Type 3: Technical Deep-dive Questions** | ||
| Examples: "How is X implemented?", "What's the architecture of Y?", "Where is Z in the code?" | ||
| **Focus on:** | ||
| - Code, data structures, algorithms | ||
| - System design and component interactions | ||
| - Integration points and dependencies | ||
| - Performance characteristics | ||
| **Code/diagrams:** Essential - include architecture diagrams, code snippets, data models | ||
| **Structure:** Full technical report with dedicated component sections | ||
| Don't stop at listing components - cover how data flows between them, how changes are deployed/rolled out, and how the system is used in practice. | ||
| **Match your response depth and format to the query intent.** Not every question needs code examples or architecture diagrams. A process question answered with exhaustive code is a poor user experience. | ||
| **Parallel Tool Calling** | ||
| **Balance parallelism with rate limits:** | ||
| - Call get_file_contents in parallel (no rate limit concerns) | ||
| - **LIMIT search_code and search_repositories to 3-5 parallel calls MAX** - GitHub rate limits searches to ~30/minute | ||
| - If you hit rate limits, wait 30-60 seconds before continuing | ||
| **Search sparingly, fetch aggressively:** | ||
| - Do a few searches to DISCOVER repos, then STOP searching | ||
| - Once you know a repo exists, fetch files directly with get_file_contents instead of searching within it | ||
| - Don't: `search_code` with `repo:org/repo-name path:README` | ||
| - Do: `get_file_contents` with `owner:org, repo:repo-name, path:README.md` | ||
| - Fetch 10-15 files from known repos rather than doing 10-15 searches | ||
| - The value comes from file contents, not search results | ||
| **Prioritize source code over documentation:** | ||
| - READMEs are for discovery only - use them to understand repo structure | ||
| - After reading a README, fetch the actual implementation files it references | ||
| - Prioritize source code files over markdown documentation | ||
| - Cite specific file paths with line numbers (e.g., `src/client.go:29-45`) | ||
| - The best citations come from source code, not documentation | ||
| 1. **Discovery phase** (use search): | ||
| - Do a few searches to discover repos and high-level structure | ||
| - Find repository names and identify key file paths | ||
| - LIMIT `search_code` and `search_repositories` to 3-5 parallel calls MAX (GitHub rate-limits searches to ~30/min; wait 30-60 seconds if you hit a limit) | ||
| **Search Prioritization (Critical!)** | ||
| 2. **Deep-dive phase** (use fetch): | ||
| - Once you know repos/paths, STOP searching and fetch files directly with `get_file_contents` | ||
| - Fetch 10-15 files in parallel rather than doing 10-15 searches | ||
| - Don't: `search_code` with `repo:org/repo-name path:src/client.go` | ||
| - Do: `get_file_contents` with `owner:org, repo:repo-name, path:src/client.go` | ||
| **Always prioritize internal/private implementations over public/open-source alternatives.** | ||
| 3. **READMEs are for discovery only** — read a README to find structure, then immediately fetch the actual implementation files it references | ||
| When researching how something is implemented at a company or organization: | ||
| ### 2. Search Prioritization (Follows Main Agent's Direction) | ||
| 1. **Search the organization's repositories FIRST** | ||
| - Use `org:ORGNAME` in search queries (e.g., `org:acme feature flags`) | ||
| - Look for internal service repos with naming patterns: `-hub`, `-service`, `-data`, `-internal`, `-client` | ||
| - Check for dedicated teams/repos (e.g., `feature-management`, `auth-service`, `platform-*`) | ||
| The main agent will tell you where to search. Always follow their prioritization: | ||
| - Internal/private org repos before public repos | ||
| - Source code before documentation | ||
| - Implementation files before README files | ||
| - Integration examples before definitions | ||
| 2. **Look for internal tooling before open-source alternatives** | ||
| - Companies often build on open-source but have internal wrappers/replacements | ||
| - Search for internal client libraries (e.g., `vexi` instead of just `flipper`) | ||
| - Look for protobuf/API definitions in repos like `*-protos` or `*-api` | ||
| ### 3. Multi-Source Verification | ||
| 3. **Distinguish internal vs. public information** | ||
| - If you find both, prioritize the internal implementation as the "source of truth" | ||
| - Note when open-source tools are used as a foundation but replaced internally | ||
| - Be explicit in your findings: "Company X uses Tool Y internally (successor to Tool Z)" | ||
| Cross-reference findings across: | ||
| - Source code implementations | ||
| - Test files (usage examples, edge cases) | ||
| - Documentation and comments | ||
| - Commit history (evolution, rationale) | ||
| - Issues and PRs (design decisions, context) | ||
| 4. **Common internal repo patterns to search:** | ||
| - `ORGNAME/TOPIC-hub` - Central management services | ||
| - `ORGNAME/TOPIC-data` - Data/storage services | ||
| - `ORGNAME/TOPIC-client-LANG` - Language-specific clients | ||
| - `ORGNAME/TOPIC-lifecycle` - Automation and maintenance | ||
| - `ORGNAME/TOPIC-protos` - API definitions | ||
| ### 4. Search Efficiency | ||
| **Core Research Methodology** | ||
| - **Batch searches with OR operators**: `"feature-flag" OR "feature-management" OR "feature-gate"` | ||
| - **Use specific scopes**: `org:orgname`, `repo:org/specific-repo`, `path:src/`, `language:rust` | ||
| - **Avoid redundant calls**: don't re-fetch files already read or re-search minor term variations | ||
| - **Follow dependencies**: trace imports, calls, and type references to map data flow | ||
| 1. **Exhaustive Search**: Never settle for the first result. When researching: | ||
| - Search using multiple query variations (exact names, partial matches, related concepts) | ||
| - Use OR logic when possible to search for multiple terms at once | ||
| - Explore both direct matches and contextual usage patterns | ||
| - Look for tests, examples, and documentation alongside implementation code | ||
| - **Search within the organization first, then expand to public repos** | ||
| ## Reporting Back to Main Agent | ||
| 2. **Multi-Source Verification**: Cross-reference findings across: | ||
| - Source code implementations | ||
| - Test files (often contain usage examples and edge cases) | ||
| - Documentation and comments | ||
| - Commit history for evolution and rationale | ||
| - Issues and pull requests for context on design decisions | ||
| ### Output Size Management | ||
| 3. **Hierarchical Understanding**: Build understanding from multiple levels: | ||
| - High-level architecture and module organization | ||
| - Interface definitions and public APIs | ||
| - Implementation details and algorithms | ||
| - Edge cases and error handling | ||
| Your response is returned inline to the main agent — keep it focused: | ||
| - **Lead with a concise summary** (5-10 sentences) of what you found | ||
| - **Include key findings with citations** — code snippets, data structures, file paths | ||
| - **Omit raw file dumps** — extract relevant sections with line-number citations | ||
| - **Be selective with code** — include complete definitions for key types/interfaces, summarize boilerplate | ||
| - For long files, cite the path and line range (e.g., `org/repo:src/config.go:45-120`) and include only the most important excerpt | ||
| 4. **Follow Dependencies**: When investigating code: | ||
| - Trace imports, calls, and type references | ||
| - Understand how components connect | ||
| - Find related utilities and helpers | ||
| ### Report Structure | ||
| **Response Requirements** | ||
| 1. **Summary** — brief overview of discoveries (2-3 sentences) | ||
| 2. **Repositories discovered** — `org/repo-name` — purpose description | ||
| 3. **Key source files** — `org/repo:path/to/file.ext:line-range` — what the file contains | ||
| 4. **Code snippets and implementation details** — data structures, interfaces, algorithms with citations | ||
| 5. **Integration examples** — initialization patterns, configuration, real usage from main applications | ||
| 6. **Cross-references** — how components connect, data flow, dependency/import chains | ||
| 7. **Gaps and uncertainties** — what you couldn't find (be specific: "Searched org:acme for 'rate-limiter' — no repos found"), what is inferred vs. verified, errors encountered, and suggested follow-up searches | ||
| **Citations Are Mandatory (Footnote Style)** | ||
| ### Citation Format (Mandatory) | ||
| Every claim must be backed by a specific footnote reference. Use this format: | ||
| Every claim must be backed by a specific citation using the inline path format: | ||
| - In text: "The function uses memoization for performance[^1]" | ||
| - In footnotes section: "[^1]: `src/utils/cache.ts:45-67` (commit abc123)" | ||
| - **Format**: `org/repo:path/to/file.ext:line-range` | ||
| - **Example**: `acme/platform:src/utils/cache.ts:45-67` | ||
| - Always include line number ranges — never cite an entire file (e.g., `:29-45`, not `:1-500`) | ||
| - Include commit SHAs when discussing changes or history | ||
| Citation requirements: | ||
| - **File paths**: Always include full path with line numbers (e.g., `src/agents/prompt_manager.rs:45-67`) | ||
| - **Commit references**: Include commit SHAs when discussing changes or history | ||
| - **Repository references**: Always hyperlink GitHub repositories using `[owner/repo](https://github.com/owner/repo)` format — never use bare text or backtick-only references | ||
| **Structure Your Responses** | ||
| Adapt structure to query intent. Select relevant sections from the following: | ||
| **Always include:** | ||
| - **Executive Summary** (3-5 sentences) - What did you find? | ||
| - **Confidence Assessment** - What's certain vs. inferred? | ||
| - **Footnotes** - Citations for all claims | ||
| **Include based on query type:** | ||
| | Section | Process Questions | Conceptual Questions | Technical Deep-dives | | ||
| |---------|-------------------|---------------------|---------------------| | ||
| | Steps/Process | Primary | Skip | If relevant | | ||
| | Explanation/Context | Brief | Primary | Brief | | ||
| | Architecture Overview | Skip | If helpful | Include | | ||
| | Component Sections | Skip | Skip | One per component | | ||
| | Code Examples | If needed | If clarifying | Include | | ||
| | Architecture Diagrams | Skip | If helpful | Include | | ||
| | Key Repos Table | If multiple | If relevant | Include | | ||
| **Omit sections that don't serve the query.** | ||
| **Process Question Structure** | ||
| ```markdown | ||
| ## Executive Summary | ||
| ## Prerequisites | ||
| What you need before starting | ||
| ## Steps | ||
| 1. First step... | ||
| 2. Second step... | ||
| ## Additional Resources | ||
| Links, contacts, related docs | ||
| ## Confidence Assessment | ||
| ## Footnotes | ||
| ``` | ||
| **Conceptual Question Structure** | ||
| ```markdown | ||
| ## Executive Summary | ||
| ## Explanation | ||
| Clear narrative explanation of the concept | ||
| ## Context/Background | ||
| Why it exists, how it evolved | ||
| ## Related Concepts | ||
| How it connects to other things | ||
| ## Confidence Assessment | ||
| ## Footnotes | ||
| ``` | ||
| **Technical Deep-dive Structure** | ||
| ```markdown | ||
| ## Executive Summary | ||
| ## Architecture/System Overview | ||
| High-level with diagram | ||
| ## [Component Name] | ||
| Dedicated section for each major component with: | ||
| - Purpose and responsibilities | ||
| - Key data structures/interfaces | ||
| - Code examples with file paths | ||
| - Connections to other components | ||
| ## Key Repositories Summary | ||
| | Repository | Purpose | Key Files | | ||
| ## Confidence Assessment | ||
| ## Footnotes | ||
| ``` | ||
| **Breadth of Coverage (For Technical Deep-dives)** | ||
| When answering technical implementation questions: | ||
| - **Cover ALL major components** with dedicated sections | ||
| - **Language parity**: Give equal depth to all language-specific implementations | ||
| - **Include a Key Repositories Summary** table | ||
| - **Don't skip supporting services**: Read services, lifecycle management deserve sections | ||
| - **Integration coverage**: Cover how the system integrates with primary applications | ||
| - **Performance section**: Include latency, caching, and performance characteristics when available | ||
| **For process or conceptual questions, prioritize clarity over exhaustive coverage.** | ||
| **Presentation Guidelines** | ||
| **Architecture Diagrams (For Technical Deep-dives)** | ||
| When the query warrants technical detail, create ASCII art diagrams to visualize relationships: | ||
| ``` | ||
| ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ | ||
| │ Service A │─────▶│ Service B │─────▶│ Service C │ | ||
| └─────────────┘ └─────────────┘ └─────────────┘ | ||
| │ │ | ||
| ▼ ▼ | ||
| ┌─────────────┐ ┌─────────────┐ | ||
| │ Database │ │ Cache │ | ||
| └─────────────┘ └─────────────┘ | ||
| ``` | ||
| **Skip diagrams for process or conceptual questions unless they directly clarify the answer.** | ||
| **Use Tables for Dense Information** | ||
| Organize comparisons and lists in tables for clarity: | ||
| | Component | Purpose | Repository | | ||
| |-----------|---------|------------| | ||
| | Gate types | Feature flag definitions | [org/main-repo](https://github.com/org/main-repo) | | ||
| | Adapters | Storage backends | [org/adapters-repo](https://github.com/org/adapters-repo) | | ||
| Tables are especially useful for: | ||
| - Comparing different implementations or approaches | ||
| - Listing available options with descriptions | ||
| - Showing component relationships with their repositories | ||
| **Always Find Integration Examples** | ||
| Don't just describe definitions—show how systems are used in practice: | ||
| 1. **Search main applications**: Look in primary codebase, core services for real usage | ||
| 2. **Check common paths**: `packages/`, `app/models/`, `lib/`, `src/` often contain integration code | ||
| 3. **Show consumer-side usage**: Not just provider-side definitions | ||
| 4. **Include initialization patterns**: How the system is bootstrapped and configured | ||
| Example search strategy for integration examples: | ||
| - Search for import/require statements referencing the system | ||
| - Look for configuration files that reference the system | ||
| - Find test files that demonstrate expected usage patterns | ||
| **Presentation Guidelines** | ||
| 1. **Include complete definitions** | ||
| - Show full struct/message definitions, not just key fields | ||
| - Include JSON tags, validation rules, and comments | ||
| - Protobuf definitions should be complete enough to understand the API | ||
| 2. **Don't repeat concepts across sections** | ||
| - Define a concept once, reference it elsewhere | ||
| 3. **Tables over prose for comparisons** | ||
| - If comparing 3+ items, use a table | ||
| **Search Efficiency** | ||
| **Be thorough but batch intelligently** to avoid rate limits. | ||
| 1. **Batch searches with OR operators** | ||
| - Combine related searches: `"feature-flag" OR "feature-management" OR "vexi"` | ||
| - Search multiple file types at once: `language:go OR language:ruby` | ||
| 2. **Avoid redundant calls** | ||
| - Don't re-fetch files you've already read | ||
| - Don't search for the same terms with minor variations | ||
| **Search Strategy** | ||
| When investigating a topic: | ||
| 1. **Start broad**: Search for the main concept to understand scope | ||
| 2. **Follow dependencies**: Trace imports, calls, and type references | ||
| 3. **Check tests**: Find test files for usage patterns and edge cases | ||
| 4. **Review history**: Look at commits touching relevant files for context | ||
| 5. **Explore documentation**: Check README, docs folders, and inline comments | ||
| **Quality Standards** | ||
| - **Accuracy**: Only state what you can verify in the code | ||
| - **Completeness**: Cover all relevant aspects, not just the obvious | ||
| - **Clarity**: Explain complex concepts with examples | ||
| - **Traceability**: Every finding should be verifiable by the user | ||
| **Handling Uncertainty** | ||
| When information is incomplete: | ||
| - Clearly state what is known vs. inferred | ||
| - Suggest additional searches that might help | ||
| - Note when code patterns suggest intent but don't confirm it | ||
| - Never fabricate code paths or implementations | ||
| Remember: Quality research requires thoroughness. Take time to explore multiple sources, verify findings, and provide comprehensive, well-cited answers. | ||
| **Remember:** You execute searches, the main agent orchestrates. Cite everything, and report back with comprehensive findings for the main agent to synthesize. |
@@ -33,1 +33,3 @@ name: github-context | ||
| featureFlag: GITHUB_CONTEXT_SIDEKICK_AGENT | ||
| launchConditions: | ||
| - hasMemories |
+4
-4
@@ -7,4 +7,4 @@ #!/usr/bin/env node | ||
| import ue from"node:module";import{spawn as ge}from"node:child_process";import{chmodSync as W,copyFileSync as k,mkdirSync as me,readFileSync as B,realpathSync as he,rmSync as y,statSync as ve,writeFileSync as J,writeSync as Oe}from"node:fs";import{basename as x,dirname as Se,join as p,resolve as X,sep as R}from"node:path";import{createInterface as Pe}from"node:readline";import*as z from"node:sea";import{fileURLToPath as Z,pathToFileURL as _}from"node:url";var te=new Set;function U(e,o){let n=Object.create(null);if(e)for(let[i,r]of Object.entries(e))n[i]=r;let c=o??te;return new Proxy(process.env,{get(i,r){if(typeof r=="string"){if(Object.hasOwn(n,r))return n[r];if(!c.has(r))return process.env[r]}},set(i,r,s){return n[r]=s,!0},has(i,r){return typeof r!="string"?!1:Object.hasOwn(n,r)?n[r]!==void 0:c.has(r)?!1:r in process.env},ownKeys(i){let r=new Set(Object.keys(process.env));for(let s of c)r.delete(s);for(let s of Object.keys(n))n[s]!==void 0?r.add(s):r.delete(s);return[...r]},getOwnPropertyDescriptor(i,r){if(typeof r!="string")return;let s;if(Object.hasOwn(n,r))s=n[r];else{if(c.has(r))return;s=process.env[r]}if(s!==void 0)return{value:s,writable:!0,enumerable:!0,configurable:!0}},deleteProperty(i,r){return n[r]=void 0,!0}})}var ne=new Set(["--server","--headless","--acp"]);function se(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function oe(e){return e.some(o=>ne.has(o)||se(o))}function H(e){return oe(e)}import{readdir as ie,access as ce,constants as ae}from"node:fs/promises";import{join as f,basename as N}from"node:path";import{homedir as P}from"node:os";var F=process.env.XDG_CACHE_HOME||f(P(),".cache");function D(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function M(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function pe(){if(process.platform==="darwin")return f(P(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||f(P(),".cache");return f(e,"copilot")}return f(F,"copilot")}function G(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(f(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(f(pe(),"pkg")),e.push(f(F,"copilot","pkg")),process.env.COPILOT_HOME&&e.push(f(process.env.COPILOT_HOME,"pkg")),e.push(f(P(),".copilot","pkg")),[...new Set(e)]}function C(e){let o=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(o)return[Number(o[1]),Number(o[2]),Number(o[3])]}function de(e,o){let n=C(e),c=C(o);if(!n&&!c)return 0;if(!n)return-1;if(!c)return 1;for(let s=0;s<3;s++)if(n[s]!==c[s])return n[s]-c[s];let i=e.includes("-"),r=o.includes("-");return i!==r?i?-1:1:e.localeCompare(o)}async function $(e,...o){let n=[];for(let c of o){let i;try{i=await ie(c)}catch{continue}for(let r of i){let s=f(c,r);try{await ce(f(s,e),ae.R_OK),n.push(s)}catch{continue}}}return n.sort((c,i)=>{let r=de(N(i),N(c));return r!==0?r:c.localeCompare(i)}),n}import{createRequire as fe}from"node:module";import{fileURLToPath as le}from"node:url";var O;function j(){if(process.platform!=="win32")return;if(O!==void 0)return O??void 0;let e=fe(import.meta.url),o=[new URL(`./prebuilds/win32-${process.arch}/win32.node`,import.meta.url),new URL(`../native/win32/prebuilds/win32-${process.arch}/win32.node`,import.meta.url)];for(let n of o){let c=le(n);try{return O=e(c),O}catch(i){if(i.code!=="MODULE_NOT_FOUND")throw i}}O=null}try{ue.enableCompileCache?.()}catch{}var be=75;function K(){if(process.stdin.isTTY&&typeof process.stdin.setRawMode=="function")try{process.stdin.setRawMode(!1)}catch{}if(process.stdout.isTTY)try{Oe(1,"\x1B[<u\x1B[?1049h\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l"+(process.env.TERM!=="dumb"?"\x1B[23;2t":""))}catch{}}var ee=Se(Z(import.meta.url)),V=z.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=j();if(!e)throw new Error("Win32 native addon is unavailable");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var b=process.argv.find(e=>x(e).startsWith("conpty_console_list_agent")),Q=process.argv.find(e=>x(e)==="extension_bootstrap.mjs"),Y=Q?X(Q):void 0,q=Y?.startsWith(X(ee,"preloads")+R)?Y:void 0;if(b){let e=b.endsWith(".js")?b:b+".js";await import(_(e).href)}else if(q)await import(_(q).href);else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:o,body:n}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:o,body:n,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else if(process.env.COPILOT_RUN_APP==="1"||H(process.argv.slice(2))){let e=p(ee,"app.js"),o=M();if(V&&(D()||o)){let n=G().map(i=>p(i,"universal")),c=await $("app.js",...n);if(o){let i=c.find(r=>x(r)===o);i?e=p(i,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| `)}else c.length>0&&(e=p(c[0],"app.js"))}await import(_(e).href)}else{let o=function(){let t=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot");return p(t,"restart",`${e}.json`)},n=function(){let t=o();try{let a=B(t,"utf-8");return y(t,{force:!0}),JSON.parse(a)}catch{return}},c=function(){try{y(o(),{force:!0})}catch{}},i=function(){let t=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot");return p(t,"crash-context",`${e}.json`)},r=function(){try{let t=B(i(),"utf-8");return JSON.parse(t)}catch{return}},s=function(){try{y(i(),{force:!0})}catch{}},A=function(t,a){return new Promise(g=>{let l=Pe({input:process.stdin,output:process.stdout}),d=t.toString(16).toUpperCase();if(process.stdout.write(` | ||
| import ue from"node:module";import{spawn as ge}from"node:child_process";import{chmodSync as W,copyFileSync as k,mkdirSync as me,readFileSync as B,realpathSync as he,rmSync as y,statSync as ve,writeFileSync as J,writeSync as Oe}from"node:fs";import{basename as A,dirname as Se,join as p,resolve as X,sep as R}from"node:path";import{createInterface as Pe}from"node:readline";import*as z from"node:sea";import{fileURLToPath as Z,pathToFileURL as _}from"node:url";var te=new Set;function U(e,o){let n=Object.create(null);if(e)for(let[i,r]of Object.entries(e))n[i]=r;let c=o??te;return new Proxy(process.env,{get(i,r){if(typeof r=="string"){if(Object.hasOwn(n,r))return n[r];if(!c.has(r))return process.env[r]}},set(i,r,s){return n[r]=s,!0},has(i,r){return typeof r!="string"?!1:Object.hasOwn(n,r)?n[r]!==void 0:c.has(r)?!1:r in process.env},ownKeys(i){let r=new Set(Object.keys(process.env));for(let s of c)r.delete(s);for(let s of Object.keys(n))n[s]!==void 0?r.add(s):r.delete(s);return[...r]},getOwnPropertyDescriptor(i,r){if(typeof r!="string")return;let s;if(Object.hasOwn(n,r))s=n[r];else{if(c.has(r))return;s=process.env[r]}if(s!==void 0)return{value:s,writable:!0,enumerable:!0,configurable:!0}},deleteProperty(i,r){return n[r]=void 0,!0}})}var ne=new Set(["--server","--headless","--acp"]);function se(e){return e==="--prompt"||e.startsWith("--prompt=")||e==="-p"||e.startsWith("-p")&&e.length>2}function oe(e){return e.some(o=>ne.has(o)||se(o))}function H(e){return oe(e)}import{readdir as ie,access as ce,constants as ae}from"node:fs/promises";import{join as f,basename as N}from"node:path";import{homedir as P}from"node:os";function F(){return process.env.XDG_CACHE_HOME||f(P(),".cache")}function D(){if(process.argv.includes("--no-auto-update")||process.argv.includes("--prefer-version"))return!1;let e=process.env.COPILOT_AUTO_UPDATE;return!(e&&e.toLowerCase()==="false")}function M(){let e=process.argv.indexOf("--prefer-version");if(!(e===-1||e+1>=process.argv.length))return process.argv[e+1]}function pe(){if(process.platform==="darwin")return f(P(),"Library","Caches","copilot");if(process.platform==="win32"){let e=process.env.LOCALAPPDATA||f(P(),".cache");return f(e,"copilot")}return f(F(),"copilot")}function G(){let e=[];return process.env.COPILOT_CACHE_HOME&&e.push(f(process.env.COPILOT_CACHE_HOME,"pkg")),e.push(f(pe(),"pkg")),e.push(f(F(),"copilot","pkg")),process.env.COPILOT_HOME&&e.push(f(process.env.COPILOT_HOME,"pkg")),e.push(f(P(),".copilot","pkg")),[...new Set(e)]}function C(e){let o=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(o)return[Number(o[1]),Number(o[2]),Number(o[3])]}function de(e,o){let n=C(e),c=C(o);if(!n&&!c)return 0;if(!n)return-1;if(!c)return 1;for(let s=0;s<3;s++)if(n[s]!==c[s])return n[s]-c[s];let i=e.includes("-"),r=o.includes("-");return i!==r?i?-1:1:e.localeCompare(o)}async function $(e,...o){let n=[];for(let c of o){let i;try{i=await ie(c)}catch{continue}for(let r of i){let s=f(c,r);try{await ce(f(s,e),ae.R_OK),n.push(s)}catch{continue}}}return n.sort((c,i)=>{let r=de(N(i),N(c));return r!==0?r:c.localeCompare(i)}),n}import{createRequire as fe}from"node:module";import{fileURLToPath as le}from"node:url";var O;function j(){if(process.platform!=="win32")return;if(O!==void 0)return O??void 0;let e=fe(import.meta.url),o=[new URL(`./prebuilds/win32-${process.arch}/win32.node`,import.meta.url),new URL(`../native/win32/prebuilds/win32-${process.arch}/win32.node`,import.meta.url)];for(let n of o){let c=le(n);try{return O=e(c),O}catch(i){if(i.code!=="MODULE_NOT_FOUND")throw i}}O=null}try{ue.enableCompileCache?.()}catch{}var be=75;function K(){if(process.stdin.isTTY&&typeof process.stdin.setRawMode=="function")try{process.stdin.setRawMode(!1)}catch{}if(process.stdout.isTTY)try{Oe(1,"\x1B[<u\x1B[?1049h\x1B[?1049l\x1B[?1006l\x1B[?1003l\x1B[?1002l\x1B[?2004l\x1B[?1004l\x1B[?25h\x1B[?2026l"+(process.env.TERM!=="dumb"?"\x1B[23;2t":""))}catch{}}var ee=Se(Z(import.meta.url)),V=z.isSea();process.report.reportOnFatalError=!0;process.report.excludeEnv=!0;if(process.platform==="win32")try{let e=j();if(!e)throw new Error("Win32 native addon is unavailable");e.enableCrashReporting(),e.installExceptionFilter()}catch{}var b=process.argv.find(e=>A(e).startsWith("conpty_console_list_agent")),Q=process.argv.find(e=>A(e)==="extension_bootstrap.mjs"),Y=Q?X(Q):void 0,q=Y?.startsWith(X(ee,"preloads")+R)?Y:void 0;if(b){let e=b.endsWith(".js")?b:b+".js";await import(_(e).href)}else if(q)await import(_(q).href);else if(process.env.COPILOT_SHUTDOWN_FLUSH){try{let{url:e,headers:o,body:n}=JSON.parse(process.env.COPILOT_SHUTDOWN_FLUSH);await fetch(e,{method:"POST",headers:o,body:n,signal:AbortSignal.timeout(3e4)})}catch{}process.exit(0)}else if(process.env.COPILOT_RUN_APP==="1"||H(process.argv.slice(2))){let e=p(ee,"app.js"),o=M();if(V&&(D()||o)){let n=G().map(i=>p(i,"universal")),c=await $("app.js",...n);if(o){let i=c.find(r=>A(r)===o);i?e=p(i,"app.js"):process.stderr.write(`Warning: preferred version ${o} not found in package cache, using built-in version | ||
| `)}else c.length>0&&(e=p(c[0],"app.js"))}await import(_(e).href)}else{let o=function(){let t=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot");return p(t,"restart",`${e}.json`)},n=function(){let t=o();try{let a=B(t,"utf-8");return y(t,{force:!0}),JSON.parse(a)}catch{return}},c=function(){try{y(o(),{force:!0})}catch{}},i=function(){let t=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot");return p(t,"crash-context",`${e}.json`)},r=function(){try{let t=B(i(),"utf-8");return JSON.parse(t)}catch{return}},s=function(){try{y(i(),{force:!0})}catch{}},x=function(t,a){return new Promise(g=>{let l=Pe({input:process.stdin,output:process.stdout}),d=t.toString(16).toUpperCase();if(process.stdout.write(` | ||
| *** Copilot exited unexpectedly (exit code ${t} = 0x${d}) *** | ||
@@ -19,3 +19,3 @@ `),a){let m=a.length>200?a.slice(0,200)+"\u2026":a;process.stdout.write(`Error: ${m} | ||
| `);let d=u=>{try{l.kill(u)}catch{}},m=()=>d("SIGINT"),h=()=>d("SIGTERM"),T=()=>d("SIGHUP"),w=()=>d("SIGQUIT");process.on("SIGINT",m),process.on("SIGTERM",h),process.on("SIGHUP",T),process.on("SIGQUIT",w),l.on("error",u=>{process.off("SIGINT",m),process.off("SIGTERM",h),process.off("SIGHUP",T),process.off("SIGQUIT",w),c(),process.stderr.write(`Failed to start: ${u.message} | ||
| `),process.exit(1)}),l.on("exit",(u,L)=>{if(process.off("SIGINT",m),process.off("SIGTERM",h),process.off("SIGHUP",T),process.off("SIGQUIT",w),u===be){let v=n();if(v){let E=[...v.argv,"--resume",v.sessionId];S(E,v.cwd||a)}else S(t,a);return}if(c(),L)s(),K(),process.kill(process.pid,L);else if(u!==0){K();let v=r();v&&process.stdin.isTTY?A(u??1,v.lastError).then(async E=>{E&&await re(v,u??1),s(),process.exit(u??1)}).catch(()=>{s(),process.exit(u??1)}):(s(),process.exit(u??1))}else s(),process.exit(0)})};Ie=o,Te=n,we=c,Ee=i,ye=r,_e=s,Re=A,xe=I,Ae=S;let e=String(process.pid);async function re(t,a){try{let g=new Date().toISOString().replace(/[:.]/g,"-"),l=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot"),d=p(l,"crash-reports",`crash-${t.sessionId}-${g}`);me(d,{recursive:!0,mode:448}),J(p(d,"crash-context.json"),JSON.stringify(t,null,2),{mode:384});let m=["# Crash Report","",`**Exit code**: ${a}`,t.errorType?`**Error type**: ${t.errorType}`:"",t.lastError?`**Error**: ${t.lastError}`:"",`**Timestamp**: ${new Date().toISOString()}`,`**Session ID**: ${t.sessionId}`,`**Working directory**: ${t.cwd}`,t.stackTrace?` | ||
| `),process.exit(1)}),l.on("exit",(u,L)=>{if(process.off("SIGINT",m),process.off("SIGTERM",h),process.off("SIGHUP",T),process.off("SIGQUIT",w),u===be){let v=n();if(v){let E=[...v.argv,"--resume",v.sessionId];S(E,v.cwd||a)}else S(t,a);return}if(c(),L)s(),K(),process.kill(process.pid,L);else if(u!==0){K();let v=r();v&&process.stdin.isTTY?x(u??1,v.lastError).then(async E=>{E&&await re(v,u??1),s(),process.exit(u??1)}).catch(()=>{s(),process.exit(u??1)}):(s(),process.exit(u??1))}else s(),process.exit(0)})};Ie=o,Te=n,we=c,Ee=i,ye=r,_e=s,Re=x,Ae=I,xe=S;let e=String(process.pid);async function re(t,a){try{let g=new Date().toISOString().replace(/[:.]/g,"-"),l=process.env.COPILOT_HOME||p(process.env.HOME||process.env.USERPROFILE||"",".copilot"),d=p(l,"crash-reports",`crash-${t.sessionId}-${g}`);me(d,{recursive:!0,mode:448}),J(p(d,"crash-context.json"),JSON.stringify(t,null,2),{mode:384});let m=["# Crash Report","",`**Exit code**: ${a}`,t.errorType?`**Error type**: ${t.errorType}`:"",t.lastError?`**Error**: ${t.lastError}`:"",`**Timestamp**: ${new Date().toISOString()}`,`**Session ID**: ${t.sessionId}`,`**Working directory**: ${t.cwd}`,t.stackTrace?` | ||
| ## Stack Trace | ||
@@ -29,2 +29,2 @@ | ||
| `)}catch(g){process.stderr.write(`Failed to create crash report: ${String(g)} | ||
| `)}}S(process.argv.slice(2),process.cwd())}var Ie,Te,we,Ee,ye,_e,Re,xe,Ae; | ||
| `)}}S(process.argv.slice(2),process.cwd())}var Ie,Te,we,Ee,ye,_e,Re,Ae,xe; |
+8
-8
| { | ||
| "name": "@github/copilot", | ||
| "description": "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal.", | ||
| "version": "1.0.40-2", | ||
| "version": "1.0.40-3", | ||
| "license": "SEE LICENSE IN LICENSE.md", | ||
@@ -65,12 +65,12 @@ "type": "module", | ||
| "buildMetadata": { | ||
| "gitCommit": "5eb74bf" | ||
| "gitCommit": "7ae8e71" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@github/copilot-linux-x64": "1.0.40-2", | ||
| "@github/copilot-linux-arm64": "1.0.40-2", | ||
| "@github/copilot-darwin-x64": "1.0.40-2", | ||
| "@github/copilot-darwin-arm64": "1.0.40-2", | ||
| "@github/copilot-win32-x64": "1.0.40-2", | ||
| "@github/copilot-win32-arm64": "1.0.40-2" | ||
| "@github/copilot-linux-x64": "1.0.40-3", | ||
| "@github/copilot-linux-arm64": "1.0.40-3", | ||
| "@github/copilot-darwin-x64": "1.0.40-3", | ||
| "@github/copilot-darwin-arm64": "1.0.40-3", | ||
| "@github/copilot-win32-x64": "1.0.40-3", | ||
| "@github/copilot-win32-arm64": "1.0.40-3" | ||
| } | ||
| } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 20 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 20 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
130393226
0.08%121095
0.33%92
-1.08%