{"owner":"microsoft","repo":"winget-cli","hasSkills":true,"totalSkillsCount":10,"totalTokensCount":6600,"categories":["anthropic-skill","root-instruction","plugin-manifest","copilot-instructions"],"hasMcp":false,"mcpConfig":null,"found":["tools/WinGetLogViewer/package.json","AGENTS.md","tools/WinGetLogViewer/language-configuration.json","tools/WinGetLogViewer/README.md",".github/copilot-instructions.md","tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json","tools/WinGetLogViewer/tsconfig.json","tools/CorrelationTestbed/Readme.md","schemas/JSON/packages/packages.schema.1.0.json","schemas/JSON/packages/packages.schema.2.0.json"],"skills":{"tools/WinGetLogViewer/package.json":"{\r\n  \"name\": \"winget-log-viewer\",\r\n  \"displayName\": \"WinGet Log Viewer\",\r\n  \"description\": \"Rich viewer for WinGet diagnostic log files with channel filtering, highlighting, and live follow mode.\",\r\n  \"version\": \"0.1.0\",\r\n  \"publisher\": \"microsoft\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/microsoft/winget-cli\"\r\n  },\r\n  \"license\": \"MIT\",\r\n  \"engines\": {\r\n    \"vscode\": \"^1.85.0\"\r\n  },\r\n  \"categories\": [\r\n    \"Other\"\r\n  ],\r\n  \"activationEvents\": [],\r\n  \"main\": \"./out/extension.js\",\r\n  \"contributes\": {\r\n    \"customEditors\": [\r\n      {\r\n        \"viewType\": \"wingetLogViewer.logViewer\",\r\n        \"displayName\": \"WinGet Log Viewer\",\r\n        \"selector\": [\r\n          {\r\n            \"filenamePattern\": \"WinGet-*.log\"\r\n          },\r\n          {\r\n            \"filenamePattern\": \"WinGetCOM-*.log\"\r\n          }\r\n        ],\r\n        \"priority\": \"default\"\r\n      }\r\n    ],\r\n    \"commands\": [\r\n      {\r\n        \"command\": \"wingetLogViewer.open\",\r\n        \"title\": \"Open in WinGet Log Viewer\",\r\n        \"category\": \"WinGet Log Viewer\"\r\n      }\r\n    ],\r\n    \"languages\": [\r\n      {\r\n        \"id\": \"winget-log\",\r\n        \"aliases\": [\r\n          \"WinGet Log\"\r\n        ],\r\n        \"filenamePatterns\": [\r\n          \"WinGet-*.log\",\r\n          \"WinGetCOM-*.log\"\r\n        ],\r\n        \"configuration\": \"./language-configuration.json\"\r\n      }\r\n    ],\r\n    \"grammars\": [\r\n      {\r\n        \"language\": \"winget-log\",\r\n        \"scopeName\": \"text.winget-log\",\r\n        \"path\": \"./syntaxes/winget-log.tmLanguage.json\"\r\n      }\r\n    ],\r\n    \"menus\": {\r\n      \"explorer/context\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ],\r\n      \"editor/title\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log && activeCustomEditorId != 'wingetLogViewer.logViewer'\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ]\r\n    }\r\n  },\r\n  \"scripts\": {\r\n    \"vscode:prepublish\": \"npm run compile\",\r\n    \"compile\": \"tsc -p ./\",\r\n    \"watch\": \"tsc -watch -p ./\",\r\n    \"pretest\": \"npm run compile\",\r\n    \"lint\": \"eslint src --ext ts\",\r\n    \"package\": \"vsce package\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@types/vscode\": \"^1.85.0\",\r\n    \"@types/node\": \"20.x\",\r\n    \"@vscode/vsce\": \"^3.9.2\",\r\n    \"typescript\": \"^5.3.0\"\r\n  }\r\n}\r\n","AGENTS.md":"# Agent instructions\n\nFollow `.github/copilot-instructions.md` for repository-specific development guidance.\n\n## Issues\n\nBefore filing a GitHub issue in this repository:\n\n1. Search existing open and closed issues for duplicates.\n2. Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\n3. For bugs, include the same information requested by the Bug Report form: relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\n4. For feature requests, include the same information requested by the Feature Request form: relevant area, description of the new feature or enhancement, and proposed technical implementation details when known.\n5. Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\n\n## Pull requests\n\nBefore opening a pull request:\n\n1. Review `CONTRIBUTING.md` and follow the repository PR template.\n2. Keep each PR focused on one logical change.\n3. Include or update tests and documentation when the change affects behavior, command output, user guidance, or public APIs.\n4. Summarize validation performed, or explain why validation was not run.\n","tools/WinGetLogViewer/language-configuration.json":"{\n  \"comments\": {},\n  \"brackets\": [],\n  \"autoClosingPairs\": [],\n  \"surroundingPairs\": []\n}\n","tools/WinGetLogViewer/README.md":"# WinGet Log Viewer\n\nA VS Code extension that makes reading WinGet diagnostic log files fast and pleasant.\n\n## Features\n\n### Rich log viewer (WebView editor)\nOpens automatically for `WinGet-*.log` and `WinGetCOM-*.log` files. Use the **\"Open in WinGet Log Viewer\"** command (or right-click any `.log` file in the Explorer) to open any log file in the viewer.\n\n**Channel color badges** — each of the nine WinGet channels gets a distinct color:\n\n| Channel | Description |\n|---------|-------------|\n| ❤️ `FAIL` | Failures / exceptions |\n| 💙 `CLI`  | CLI command handling |\n| 💜 `SQL`  | SQLite / index operations |\n| 🩵 `REPO` | Repository / source operations |\n| 💛 `YAML` | YAML manifest parsing |\n| 🤍 `CORE` | Core runtime |\n| 💚 `TEST` | Test infrastructure |\n| 🩶 `CONF` | Configuration / DSC |\n| 🧡 `WORK` | Workflow execution |\n\n**Subchannel detection** — when a sub-component routes its log lines through a parent channel, the original `[CHAN]` tag appears at the start of the message. The viewer detects this and renders it as a secondary subchannel badge.\n\n**Dynamic filters** — toggle individual channels and subchannels on/off with checkboxes. Use \"All\" / \"None\" quick links per section.\n\n**Quick text search** — type in the Search box to live-filter visible lines.\n\n**Severity highlighting** — rows that contain error/warning keywords get a colored left border and message highlighting.\n\n**Time delta** — enable \"Show time delta\" to see the elapsed time between consecutive visible lines (`+Xms` / `+Xs`). Great for spotting slow operations.\n\n**Jump to error** — use the ↑ Error / ↓ Error buttons to navigate between error and critical log lines.\n\n**Follow mode** — enable \"Follow (live tail)\" to auto-scroll as the log file grows on disk. New line count is shown briefly in the status bar.\n\n**Export filtered** — \"Copy visible lines\" sends all currently visible (filtered) raw log lines to the clipboard.\n\n**Wrap long lines** — enable \"Wrap long lines\" to prevent horizontal scrolling on very long messages.\n\n### Syntax highlighting (standard editor)\nWhen a WinGet log file is opened in VS Code's standard text editor, the TextMate grammar provides coloring for timestamps, channel badges, subchannels, and error/warning keywords — no additional setup required.\n\n## Log format\n\n```\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] message\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] [SUBCHAN] message    ← subchannel variant\n```\n\nWhere `<L>` is an optional single-letter severity marker: `V`=Verbose, `I`=Info, `W`=Warning, `E`=Error, `C`=Critical. Older log files without the marker are also supported.\n\n## Development\n\n### Prerequisites\n- Node.js 18+\n- VS Code 1.85+\n\n### Build\n\n```bash\ncd tools/WinGetLogViewer\nnpm install\nnpm run compile\n```\n\n### Run / Debug\n\n1. Open `tools/WinGetLogViewer/` as a workspace in VS Code.\n2. Press **F5** — this launches the Extension Development Host.\n3. Open any `WinGet-*.log` or `WinGetCOM-*.log` file; the viewer opens automatically.\n\n### Package\n\n```bash\nnpm run package\n```\n\nThis produces `winget-log-viewer-<version>.vsix`. Install it via **Extensions: Install from VSIX…** or:\n\n```bash\ncode --install-extension winget-log-viewer-0.1.0.vsix\n```\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| **Ctrl+F** (in viewer) | Focus the search box |\n\n## Roadmap / ideas\n\n- Per-session filter presets (save/restore named filter combinations)\n- Fold/collapse groups of lines by channel\n- Correlation ID linking (when GUIDs appear in messages)\n",".github/copilot-instructions.md":"# WinGet CLI Development Guide\r\n\r\n## Project Overview\r\n\r\nThis is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of:\r\n\r\n- **C++/WinRT client** (`src/AppInstallerCLI*`) - The main CLI and core logic\r\n- **COM API** (`src/Microsoft.Management.Deployment`) - Public Windows Runtime API for programmatic access\r\n- **PowerShell modules** (`src/PowerShell`) - Microsoft.WinGet.Client and Microsoft.WinGet.Configuration cmdlets\r\n- **Configuration system** - DSC-based system configuration using WinGet\r\n\r\n## Building, Testing, and Running\r\n\r\n### Initial Setup\r\n\r\nUse a configuration file in `.config` as in `winget configure .config/configuration.winget` (alternatives provided for other VS SKUs).\r\n\r\nManual steps:\r\n\r\n1. Install Visual Studio 2022 with required workloads (see `.vsconfig`)\r\n2. Install Windows SDK 10.0.26100: `winget install Microsoft.WindowsSDK.10.0.26100`\r\n3. Enable developer mode in Windows\r\n4. Run `vcpkg integrate install` from Developer Command Prompt\r\n\r\n### Building\r\n\r\nOpen `src\\AppInstallerCLI.sln` in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line.\r\n\r\nThe solution uses:\r\n- MSBuild\r\n- vcpkg for C++ dependencies\r\n- NuGet for C++ and .NET dependencies\r\n\r\nCI uses `/p:PreferredToolArchitecture=x64` to avoid 32-bit linker memory limits without changing the target architecture. Use the same setting for command-line Release builds.\r\n\r\n### Running/Debugging\r\n\r\n1. Deploy solution: Build > Deploy Solution\r\n2. Run from command line: `wingetdev`\r\n3. For debugging:\r\n   - Right-click `AppInstallerCLIPackage` > Properties > Debug tab\r\n   - Set Debugger type to \"Native Only\" for both Application and Background task processes\r\n   - Select \"Do not launch, but debug my code when it starts\"\r\n   - Press F5 and run `wingetdev` in a separate terminal\r\n\r\nEntry point: `src/AppInstallerCLI/main.cpp`\r\n\r\n### Testing\r\n\r\n#### C++ Unit Tests (Catch2)\r\nLocated in `AppInstallerCLITests` project. After building:\r\n\r\n```powershell\r\n# Run all tests\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe\r\n\r\n# Run specific test\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe TestName\r\n\r\n# Available options\r\nAppInstallerCLITests.exe --help\r\n```\r\n\r\n#### .NET Tests\r\n- `Microsoft.WinGet.UnitTests` - PowerShell module tests\r\n- `Microsoft.Management.Configuration.UnitTests` - Configuration system tests\r\n- `WinGetUtilInterop.UnitTests` - Interop layer tests\r\n\r\n#### E2E Tests\r\n`AppInstallerCLIE2ETests` project contains end-to-end integration tests.\r\n\r\n## Architecture\r\n\r\n### Core Components\r\n\r\n**AppInstallerCLICore** - Core CLI logic organized around:\r\n- **ExecutionContext**: State container that flows through workflows. Contains arguments, reporter, flags, and data (ExecutionContextData.h)\r\n- **Workflows**: Composable functions that take ExecutionContext and perform operations (e.g., InstallFlow, UpdateFlow, SearchFlow)\r\n- **Commands**: Parse arguments and orchestrate workflows\r\n- **Reporter**: Handles all user output (ExecutionReporter.h)\r\n\r\n**AppInstallerRepositoryCore** - Package source abstraction:\r\n- Interfaces for different source types (REST, SQLite index, Microsoft Store, composite)\r\n- Search, match, and correlation logic\r\n- Package version selection and dependencies\r\n\r\n**AppInstallerCommonCore** - Shared utilities:\r\n- Manifest parsing (YAML/JSON)\r\n- Settings and group policy\r\n- Telemetry and logging\r\n- HTTP client, downloader, archive handling\r\n\r\n**Microsoft.Management.Deployment** - COM API surface:\r\n- IDL definitions in `PackageManager.idl`\r\n- WinRT projections for external consumption\r\n- Used by PowerShell modules and third-party integrations\r\n\r\n**AppInstallerCLIPackage** - Dev MSIX package definition:\r\n- Models the release package definition as closely as possible.\r\n- Contains localized string resources at src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw\r\n\r\n### Key Patterns\r\n\r\n**Workflow Pattern**: Functions that operate on ExecutionContext:\r\n```cpp\r\nvoid WorkflowTask(Execution::Context& context)\r\n{\r\n    // Check if already terminated\r\n    AICLI_RETURN_IF_TERMINATED(context);\r\n\r\n    // Access data\r\n    auto& data = context.Get<Data::Installer>();\r\n\r\n    // Report to user\r\n    context.Reporter.Info() << \"Doing something\";\r\n\r\n    // Store data for next workflow\r\n    context.Add<Data::SomeResult>(result);\r\n\r\n    // Terminate on error\r\n    if (failed)\r\n    {\r\n        AICLI_TERMINATE_CONTEXT(HRESULT);\r\n    }\r\n}\r\n```\r\n\r\n**Source Composition**: Multiple package sources can be composed:\r\n- CompositeSource combines multiple sources with conflict resolution\r\n- Installed source tracks locally installed packages\r\n- Available sources provide packages to install\r\n\r\n**Manifest Schema**: Package manifests use versioned YAML schemas:\r\n- Schema definitions in `schemas/JSON/manifests/`\r\n- Parsing in `AppInstallerCommonCore/Manifest/`\r\n- Multi-file manifests: installer, locale, version, defaultLocale\r\n\r\n## Naming Conventions\r\n\r\n- **Namespace structure**: `AppInstaller::<Area>[::<Subarea>]`\r\n  - `AppInstaller::CLI::Execution` - CLI execution context\r\n  - `AppInstaller::CLI::Workflow` - Workflow functions\r\n  - `AppInstaller::Repository` - Repository/source logic\r\n  - `AppInstaller::Manifest` - Manifest types\r\n  - `AppInstaller::Settings` - User/admin settings\r\n\r\n- **Macros**: Prefixed with `AICLI_` for CLI, `WINGET_` for general\r\n- **Data keys**: ExecutionContextData uses enum keys to type-safely store/retrieve data\r\n\r\n## Windows-Specific Considerations\r\n\r\n- Use Windows-style paths with backslashes (`\\`)\r\n- Leverage WinRT APIs via C++/WinRT projections\r\n- COM threading models matter - client uses multi-threaded apartment (MTA)\r\n- Package deployment uses Windows App SDK / MSIX infrastructure\r\n- Requires Windows 10 1809+ (build 17763)\r\n\r\n## Contributing\r\n\r\n- Review `CONTRIBUTING.md` for workflow\r\n- File/discuss issues before starting work\r\n- Specs required for features (stored in `doc/specs/`); see `.github/instructions/specs.instructions.md` for detailed guidance\r\n- Follow existing code style (see `stylecop.json`)\r\n- CI runs on Azure Pipelines (`azure-pipelines.yml`)\r\n\r\n## Issues and Pull Requests\r\n\r\n- Before filing an issue, search existing open and closed issues for duplicates.\r\n- Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\r\n- Bug reports should include the form fields for relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\r\n- Feature requests should include the form fields for relevant area, feature or enhancement description, and proposed technical implementation details when known.\r\n- Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\r\n- Before opening a pull request, review `CONTRIBUTING.md`, follow the PR template, keep the change focused, and summarize validation performed.\r\n- AI assistance is allowed, but contributors are fully accountable for AI-assisted output as if they wrote it themselves.\r\n    - Unless explicitly directed otherwise, confirm with the user that they have reviewed the submission.\r\n\r\n## Useful Commands\r\n\r\n```powershell\r\n# Get WinGet client info\r\nwingetdev --info\r\n\r\n# Show experimental features\r\nwingetdev features\r\n\r\n# Check sources\r\nwingetdev source list\r\n```\r\n\r\n## Localization\r\n\r\n### Source of truth\r\n\r\nThe English resource file `src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw` is the only file contributors should edit for string changes. It feeds the Microsoft localization pipeline.\r\n\r\nThe files under `Localization\\Resources\\<locale>\\` are **automatically synced from Microsoft's internal localization system and must not be edited**. Any manual edits will be overwritten on the next sync.\r\n\r\nEvery string that could be misunderstood without context should have a `<comment>`.\r\n\r\n### Triggering retranslation\r\n\r\n- **Changing a string's `<value>`** automatically queues it for retranslation on the next localization sync.\r\n- **Changing only a `<comment>`** does NOT trigger retranslation. Comments improve future translations but do not fix existing ones.\r\n\r\nTo fix an existing bad translation, a bug has to be filed internally with the localization team.\r\n","tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json":"{\n  \"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n  \"name\": \"WinGet Log\",\n  \"scopeName\": \"text.winget-log\",\n  \"patterns\": [\n    { \"include\": \"#logLine\" }\n  ],\n  \"repository\": {\n    \"logLine\": {\n      \"comment\": \"Full log line: TIMESTAMP [<L>] [CHAN] [SUBCHAN] message\",\n      \"match\": \"^(\\\\d{2,4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{3})\\\\s+(?:(<[VIWEC]>)\\\\s+)?(\\\\[(FAIL|CLI |SQL |REPO|YAML|CORE|TEST|CONF|WORK)\\\\s*\\\\])(\\\\s+\\\\[([A-Z]{2,8})\\\\s*\\\\])?(.*)$\",\n      \"captures\": {\n        \"1\": { \"name\": \"constant.numeric.timestamp.winget-log\" },\n        \"2\": { \"name\": \"keyword.operator.level-marker.winget-log\" },\n        \"3\": { \"patterns\": [{ \"include\": \"#channelBadge\" }] },\n        \"6\": { \"name\": \"entity.name.type.subchannel.winget-log\" },\n        \"7\": { \"patterns\": [{ \"include\": \"#messageText\" }] }\n      }\n    },\n    \"channelBadge\": {\n      \"patterns\": [\n        { \"match\": \"\\\\[FAIL\\\\s*\\\\]\", \"name\": \"invalid.illegal.channel.fail.winget-log\" },\n        { \"match\": \"\\\\[CLI\\\\s*\\\\]\",  \"name\": \"support.function.channel.cli.winget-log\" },\n        { \"match\": \"\\\\[SQL\\\\s*\\\\]\",  \"name\": \"entity.name.function.channel.sql.winget-log\" },\n        { \"match\": \"\\\\[REPO\\\\s*\\\\]\", \"name\": \"support.class.channel.repo.winget-log\" },\n        { \"match\": \"\\\\[YAML\\\\s*\\\\]\", \"name\": \"constant.language.channel.yaml.winget-log\" },\n        { \"match\": \"\\\\[CORE\\\\s*\\\\]\", \"name\": \"comment.channel.core.winget-log\" },\n        { \"match\": \"\\\\[TEST\\\\s*\\\\]\", \"name\": \"markup.inserted.channel.test.winget-log\" },\n        { \"match\": \"\\\\[CONF\\\\s*\\\\]\", \"name\": \"keyword.control.channel.conf.winget-log\" },\n        { \"match\": \"\\\\[WORK\\\\s*\\\\]\", \"name\": \"variable.parameter.channel.work.winget-log\" }\n      ]\n    },\n    \"messageText\": {\n      \"patterns\": [\n        { \"match\": \"\\\\b(Error|Fail(ed|ure)?|Exception|HRESULT|0x[0-9a-fA-F]+)\\\\b\", \"name\": \"invalid.illegal.error-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Warn(ing)?|Deprecated)\\\\b\", \"name\": \"support.type.warning-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Verbose|Trace|Debug)\\\\b\", \"name\": \"comment.verbose-keyword.winget-log\" }\n      ]\n    }\n  }\n}\n","tools/WinGetLogViewer/tsconfig.json":"{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"outDir\": \"./out\",\n    \"rootDir\": \"./src\",\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n","tools/CorrelationTestbed/Readme.md":"# E2E correlation testing\nThis directory holds a few scripts and a test project, all centered around enabling end-to-end validation of our correlation between system artifacts and packages in external sources.\n\nThe test project uses the COM API to first install a package, then attempts to check for correlation in two ways (directions):\n1. When the remote package identity is known, the caller will usually look it up via that remote identity.  This path can enable additional information to be retrieved to make the correlation with.\n2. When listing all of the local packages, the remote identity must be determined for each one. We can use only data known locally to make the correlation.\n\nThe primary script, `Test-CorrelationInSandbox.ps1`, is based off of the sandbox test script in winget-pkgs (thanks to many people).  It sets up the sandbox and initial script to run there for each package to test, then waits for a sentinel file to be created in the output location.  The results of all of running the test project exe, as well as the ARP differences and winget logs are put in that output location, then the sandbox is destroyed for the next package to run.\n\n```\nTest-CorrelationInSandbox.ps1\n-- Required --\n[[-PackageIdentifiers] <string[]>] :: A set of package ids to test\n[[-Source] <string>] :: The name of the source that the packages are from, ex. \"winget\"\n\n-- Optional --\n[-ExePath <string>] :: Path to the test exe; defaults to the Release output location\n[-UseDev] :: Switch to use the local dev winget build\n[-DevPackagePath <string>] :: Path to the local dev *Release* winget build; defaults to the normal location\n[-ResultsPath <string>] :: Path to output the results to; defaults to a temp directory\n[-RegFileDirectory <string>] :: Path to a directory containing .reg files to insert before the test, creating noise for correlation\n[-MetadataCollection] :: Switch to enable collection of metadata\n[-WingetUtilPath <string>] :: Path to the WinGetUtil.dll to use; defaults to Debug build location\n```\n\nOnce testing is done, `Process-CorrelationResults.ps1` will take all of the results JSON files and put them into `results.csv` in the directory.  If any tests failed to run, they will be in `failed.csv`.  There are correlation columns in the CSV that can be averaged in Excel to get the correlation percentage.\n\n## Running a test\n### Setup\nFirst you must have built the test exe located in `InstallAndCheckCorrelation`. By default the Release x64 version is picked up by the script, so it is easiest to build that one.\n\nIf you want to run against the local dev build of the winget COM server, the default is again to use Release x64.  The sandbox will not run the debug build for unknown reasons currently.\n\n### Run the test pass\nRun the `Test-CorrelationInSandbox.ps1` script, then wait for a while since it is going to download and install every package serially, with a little bit of overhead in between.\n\nA simple example call is:\n```\nTest-CorrelationInSandbox.ps1 -PackageIdentifiers @(\"Microsoft.VisualStudioCode\") -Source winget\n```\nThis will use the latest version of winget available on github.  Adding `-UseDev` should be enough to use the local build instead if Release x64 is already deployed onto the host machine.\n\n### Collate the results\nRunning `Process-CorrelationResults.ps1` on the directory output at the end of `Test-CorrelationInSandbox.ps1` will place a CSV file with the results combined together.  These results can be inspected for correctness and an overall correlation score determined from the different correlation paths.","schemas/JSON/packages/packages.schema.1.0.json":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.1.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"WinGetVersion\", \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"Id\" ],\n              \"properties\": {\n                \"Id\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","schemas/JSON/packages/packages.schema.2.0.json":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.2.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(\\\\-preview)?$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"PackageIdentifier\" ],\n              \"properties\": {\n                \"PackageIdentifier\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                },\n\n                \"InitialOverrideArguments\": {\n                  \"description\": \"Override arguments used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                },\n\n                \"InitialCustomSwitches\": {\n                  \"description\": \"Additional custom switches used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"},"files":{"tools/WinGetLogViewer/package.json":"{\r\n  \"name\": \"winget-log-viewer\",\r\n  \"displayName\": \"WinGet Log Viewer\",\r\n  \"description\": \"Rich viewer for WinGet diagnostic log files with channel filtering, highlighting, and live follow mode.\",\r\n  \"version\": \"0.1.0\",\r\n  \"publisher\": \"microsoft\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/microsoft/winget-cli\"\r\n  },\r\n  \"license\": \"MIT\",\r\n  \"engines\": {\r\n    \"vscode\": \"^1.85.0\"\r\n  },\r\n  \"categories\": [\r\n    \"Other\"\r\n  ],\r\n  \"activationEvents\": [],\r\n  \"main\": \"./out/extension.js\",\r\n  \"contributes\": {\r\n    \"customEditors\": [\r\n      {\r\n        \"viewType\": \"wingetLogViewer.logViewer\",\r\n        \"displayName\": \"WinGet Log Viewer\",\r\n        \"selector\": [\r\n          {\r\n            \"filenamePattern\": \"WinGet-*.log\"\r\n          },\r\n          {\r\n            \"filenamePattern\": \"WinGetCOM-*.log\"\r\n          }\r\n        ],\r\n        \"priority\": \"default\"\r\n      }\r\n    ],\r\n    \"commands\": [\r\n      {\r\n        \"command\": \"wingetLogViewer.open\",\r\n        \"title\": \"Open in WinGet Log Viewer\",\r\n        \"category\": \"WinGet Log Viewer\"\r\n      }\r\n    ],\r\n    \"languages\": [\r\n      {\r\n        \"id\": \"winget-log\",\r\n        \"aliases\": [\r\n          \"WinGet Log\"\r\n        ],\r\n        \"filenamePatterns\": [\r\n          \"WinGet-*.log\",\r\n          \"WinGetCOM-*.log\"\r\n        ],\r\n        \"configuration\": \"./language-configuration.json\"\r\n      }\r\n    ],\r\n    \"grammars\": [\r\n      {\r\n        \"language\": \"winget-log\",\r\n        \"scopeName\": \"text.winget-log\",\r\n        \"path\": \"./syntaxes/winget-log.tmLanguage.json\"\r\n      }\r\n    ],\r\n    \"menus\": {\r\n      \"explorer/context\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ],\r\n      \"editor/title\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log && activeCustomEditorId != 'wingetLogViewer.logViewer'\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ]\r\n    }\r\n  },\r\n  \"scripts\": {\r\n    \"vscode:prepublish\": \"npm run compile\",\r\n    \"compile\": \"tsc -p ./\",\r\n    \"watch\": \"tsc -watch -p ./\",\r\n    \"pretest\": \"npm run compile\",\r\n    \"lint\": \"eslint src --ext ts\",\r\n    \"package\": \"vsce package\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@types/vscode\": \"^1.85.0\",\r\n    \"@types/node\": \"20.x\",\r\n    \"@vscode/vsce\": \"^3.9.2\",\r\n    \"typescript\": \"^5.3.0\"\r\n  }\r\n}\r\n","AGENTS.md":"# Agent instructions\n\nFollow `.github/copilot-instructions.md` for repository-specific development guidance.\n\n## Issues\n\nBefore filing a GitHub issue in this repository:\n\n1. Search existing open and closed issues for duplicates.\n2. Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\n3. For bugs, include the same information requested by the Bug Report form: relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\n4. For feature requests, include the same information requested by the Feature Request form: relevant area, description of the new feature or enhancement, and proposed technical implementation details when known.\n5. Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\n\n## Pull requests\n\nBefore opening a pull request:\n\n1. Review `CONTRIBUTING.md` and follow the repository PR template.\n2. Keep each PR focused on one logical change.\n3. Include or update tests and documentation when the change affects behavior, command output, user guidance, or public APIs.\n4. Summarize validation performed, or explain why validation was not run.\n","tools/WinGetLogViewer/language-configuration.json":"{\n  \"comments\": {},\n  \"brackets\": [],\n  \"autoClosingPairs\": [],\n  \"surroundingPairs\": []\n}\n","tools/WinGetLogViewer/README.md":"# WinGet Log Viewer\n\nA VS Code extension that makes reading WinGet diagnostic log files fast and pleasant.\n\n## Features\n\n### Rich log viewer (WebView editor)\nOpens automatically for `WinGet-*.log` and `WinGetCOM-*.log` files. Use the **\"Open in WinGet Log Viewer\"** command (or right-click any `.log` file in the Explorer) to open any log file in the viewer.\n\n**Channel color badges** — each of the nine WinGet channels gets a distinct color:\n\n| Channel | Description |\n|---------|-------------|\n| ❤️ `FAIL` | Failures / exceptions |\n| 💙 `CLI`  | CLI command handling |\n| 💜 `SQL`  | SQLite / index operations |\n| 🩵 `REPO` | Repository / source operations |\n| 💛 `YAML` | YAML manifest parsing |\n| 🤍 `CORE` | Core runtime |\n| 💚 `TEST` | Test infrastructure |\n| 🩶 `CONF` | Configuration / DSC |\n| 🧡 `WORK` | Workflow execution |\n\n**Subchannel detection** — when a sub-component routes its log lines through a parent channel, the original `[CHAN]` tag appears at the start of the message. The viewer detects this and renders it as a secondary subchannel badge.\n\n**Dynamic filters** — toggle individual channels and subchannels on/off with checkboxes. Use \"All\" / \"None\" quick links per section.\n\n**Quick text search** — type in the Search box to live-filter visible lines.\n\n**Severity highlighting** — rows that contain error/warning keywords get a colored left border and message highlighting.\n\n**Time delta** — enable \"Show time delta\" to see the elapsed time between consecutive visible lines (`+Xms` / `+Xs`). Great for spotting slow operations.\n\n**Jump to error** — use the ↑ Error / ↓ Error buttons to navigate between error and critical log lines.\n\n**Follow mode** — enable \"Follow (live tail)\" to auto-scroll as the log file grows on disk. New line count is shown briefly in the status bar.\n\n**Export filtered** — \"Copy visible lines\" sends all currently visible (filtered) raw log lines to the clipboard.\n\n**Wrap long lines** — enable \"Wrap long lines\" to prevent horizontal scrolling on very long messages.\n\n### Syntax highlighting (standard editor)\nWhen a WinGet log file is opened in VS Code's standard text editor, the TextMate grammar provides coloring for timestamps, channel badges, subchannels, and error/warning keywords — no additional setup required.\n\n## Log format\n\n```\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] message\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] [SUBCHAN] message    ← subchannel variant\n```\n\nWhere `<L>` is an optional single-letter severity marker: `V`=Verbose, `I`=Info, `W`=Warning, `E`=Error, `C`=Critical. Older log files without the marker are also supported.\n\n## Development\n\n### Prerequisites\n- Node.js 18+\n- VS Code 1.85+\n\n### Build\n\n```bash\ncd tools/WinGetLogViewer\nnpm install\nnpm run compile\n```\n\n### Run / Debug\n\n1. Open `tools/WinGetLogViewer/` as a workspace in VS Code.\n2. Press **F5** — this launches the Extension Development Host.\n3. Open any `WinGet-*.log` or `WinGetCOM-*.log` file; the viewer opens automatically.\n\n### Package\n\n```bash\nnpm run package\n```\n\nThis produces `winget-log-viewer-<version>.vsix`. Install it via **Extensions: Install from VSIX…** or:\n\n```bash\ncode --install-extension winget-log-viewer-0.1.0.vsix\n```\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| **Ctrl+F** (in viewer) | Focus the search box |\n\n## Roadmap / ideas\n\n- Per-session filter presets (save/restore named filter combinations)\n- Fold/collapse groups of lines by channel\n- Correlation ID linking (when GUIDs appear in messages)\n",".github/copilot-instructions.md":"# WinGet CLI Development Guide\r\n\r\n## Project Overview\r\n\r\nThis is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of:\r\n\r\n- **C++/WinRT client** (`src/AppInstallerCLI*`) - The main CLI and core logic\r\n- **COM API** (`src/Microsoft.Management.Deployment`) - Public Windows Runtime API for programmatic access\r\n- **PowerShell modules** (`src/PowerShell`) - Microsoft.WinGet.Client and Microsoft.WinGet.Configuration cmdlets\r\n- **Configuration system** - DSC-based system configuration using WinGet\r\n\r\n## Building, Testing, and Running\r\n\r\n### Initial Setup\r\n\r\nUse a configuration file in `.config` as in `winget configure .config/configuration.winget` (alternatives provided for other VS SKUs).\r\n\r\nManual steps:\r\n\r\n1. Install Visual Studio 2022 with required workloads (see `.vsconfig`)\r\n2. Install Windows SDK 10.0.26100: `winget install Microsoft.WindowsSDK.10.0.26100`\r\n3. Enable developer mode in Windows\r\n4. Run `vcpkg integrate install` from Developer Command Prompt\r\n\r\n### Building\r\n\r\nOpen `src\\AppInstallerCLI.sln` in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line.\r\n\r\nThe solution uses:\r\n- MSBuild\r\n- vcpkg for C++ dependencies\r\n- NuGet for C++ and .NET dependencies\r\n\r\nCI uses `/p:PreferredToolArchitecture=x64` to avoid 32-bit linker memory limits without changing the target architecture. Use the same setting for command-line Release builds.\r\n\r\n### Running/Debugging\r\n\r\n1. Deploy solution: Build > Deploy Solution\r\n2. Run from command line: `wingetdev`\r\n3. For debugging:\r\n   - Right-click `AppInstallerCLIPackage` > Properties > Debug tab\r\n   - Set Debugger type to \"Native Only\" for both Application and Background task processes\r\n   - Select \"Do not launch, but debug my code when it starts\"\r\n   - Press F5 and run `wingetdev` in a separate terminal\r\n\r\nEntry point: `src/AppInstallerCLI/main.cpp`\r\n\r\n### Testing\r\n\r\n#### C++ Unit Tests (Catch2)\r\nLocated in `AppInstallerCLITests` project. After building:\r\n\r\n```powershell\r\n# Run all tests\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe\r\n\r\n# Run specific test\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe TestName\r\n\r\n# Available options\r\nAppInstallerCLITests.exe --help\r\n```\r\n\r\n#### .NET Tests\r\n- `Microsoft.WinGet.UnitTests` - PowerShell module tests\r\n- `Microsoft.Management.Configuration.UnitTests` - Configuration system tests\r\n- `WinGetUtilInterop.UnitTests` - Interop layer tests\r\n\r\n#### E2E Tests\r\n`AppInstallerCLIE2ETests` project contains end-to-end integration tests.\r\n\r\n## Architecture\r\n\r\n### Core Components\r\n\r\n**AppInstallerCLICore** - Core CLI logic organized around:\r\n- **ExecutionContext**: State container that flows through workflows. Contains arguments, reporter, flags, and data (ExecutionContextData.h)\r\n- **Workflows**: Composable functions that take ExecutionContext and perform operations (e.g., InstallFlow, UpdateFlow, SearchFlow)\r\n- **Commands**: Parse arguments and orchestrate workflows\r\n- **Reporter**: Handles all user output (ExecutionReporter.h)\r\n\r\n**AppInstallerRepositoryCore** - Package source abstraction:\r\n- Interfaces for different source types (REST, SQLite index, Microsoft Store, composite)\r\n- Search, match, and correlation logic\r\n- Package version selection and dependencies\r\n\r\n**AppInstallerCommonCore** - Shared utilities:\r\n- Manifest parsing (YAML/JSON)\r\n- Settings and group policy\r\n- Telemetry and logging\r\n- HTTP client, downloader, archive handling\r\n\r\n**Microsoft.Management.Deployment** - COM API surface:\r\n- IDL definitions in `PackageManager.idl`\r\n- WinRT projections for external consumption\r\n- Used by PowerShell modules and third-party integrations\r\n\r\n**AppInstallerCLIPackage** - Dev MSIX package definition:\r\n- Models the release package definition as closely as possible.\r\n- Contains localized string resources at src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw\r\n\r\n### Key Patterns\r\n\r\n**Workflow Pattern**: Functions that operate on ExecutionContext:\r\n```cpp\r\nvoid WorkflowTask(Execution::Context& context)\r\n{\r\n    // Check if already terminated\r\n    AICLI_RETURN_IF_TERMINATED(context);\r\n\r\n    // Access data\r\n    auto& data = context.Get<Data::Installer>();\r\n\r\n    // Report to user\r\n    context.Reporter.Info() << \"Doing something\";\r\n\r\n    // Store data for next workflow\r\n    context.Add<Data::SomeResult>(result);\r\n\r\n    // Terminate on error\r\n    if (failed)\r\n    {\r\n        AICLI_TERMINATE_CONTEXT(HRESULT);\r\n    }\r\n}\r\n```\r\n\r\n**Source Composition**: Multiple package sources can be composed:\r\n- CompositeSource combines multiple sources with conflict resolution\r\n- Installed source tracks locally installed packages\r\n- Available sources provide packages to install\r\n\r\n**Manifest Schema**: Package manifests use versioned YAML schemas:\r\n- Schema definitions in `schemas/JSON/manifests/`\r\n- Parsing in `AppInstallerCommonCore/Manifest/`\r\n- Multi-file manifests: installer, locale, version, defaultLocale\r\n\r\n## Naming Conventions\r\n\r\n- **Namespace structure**: `AppInstaller::<Area>[::<Subarea>]`\r\n  - `AppInstaller::CLI::Execution` - CLI execution context\r\n  - `AppInstaller::CLI::Workflow` - Workflow functions\r\n  - `AppInstaller::Repository` - Repository/source logic\r\n  - `AppInstaller::Manifest` - Manifest types\r\n  - `AppInstaller::Settings` - User/admin settings\r\n\r\n- **Macros**: Prefixed with `AICLI_` for CLI, `WINGET_` for general\r\n- **Data keys**: ExecutionContextData uses enum keys to type-safely store/retrieve data\r\n\r\n## Windows-Specific Considerations\r\n\r\n- Use Windows-style paths with backslashes (`\\`)\r\n- Leverage WinRT APIs via C++/WinRT projections\r\n- COM threading models matter - client uses multi-threaded apartment (MTA)\r\n- Package deployment uses Windows App SDK / MSIX infrastructure\r\n- Requires Windows 10 1809+ (build 17763)\r\n\r\n## Contributing\r\n\r\n- Review `CONTRIBUTING.md` for workflow\r\n- File/discuss issues before starting work\r\n- Specs required for features (stored in `doc/specs/`); see `.github/instructions/specs.instructions.md` for detailed guidance\r\n- Follow existing code style (see `stylecop.json`)\r\n- CI runs on Azure Pipelines (`azure-pipelines.yml`)\r\n\r\n## Issues and Pull Requests\r\n\r\n- Before filing an issue, search existing open and closed issues for duplicates.\r\n- Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\r\n- Bug reports should include the form fields for relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\r\n- Feature requests should include the form fields for relevant area, feature or enhancement description, and proposed technical implementation details when known.\r\n- Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\r\n- Before opening a pull request, review `CONTRIBUTING.md`, follow the PR template, keep the change focused, and summarize validation performed.\r\n- AI assistance is allowed, but contributors are fully accountable for AI-assisted output as if they wrote it themselves.\r\n    - Unless explicitly directed otherwise, confirm with the user that they have reviewed the submission.\r\n\r\n## Useful Commands\r\n\r\n```powershell\r\n# Get WinGet client info\r\nwingetdev --info\r\n\r\n# Show experimental features\r\nwingetdev features\r\n\r\n# Check sources\r\nwingetdev source list\r\n```\r\n\r\n## Localization\r\n\r\n### Source of truth\r\n\r\nThe English resource file `src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw` is the only file contributors should edit for string changes. It feeds the Microsoft localization pipeline.\r\n\r\nThe files under `Localization\\Resources\\<locale>\\` are **automatically synced from Microsoft's internal localization system and must not be edited**. Any manual edits will be overwritten on the next sync.\r\n\r\nEvery string that could be misunderstood without context should have a `<comment>`.\r\n\r\n### Triggering retranslation\r\n\r\n- **Changing a string's `<value>`** automatically queues it for retranslation on the next localization sync.\r\n- **Changing only a `<comment>`** does NOT trigger retranslation. Comments improve future translations but do not fix existing ones.\r\n\r\nTo fix an existing bad translation, a bug has to be filed internally with the localization team.\r\n","tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json":"{\n  \"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n  \"name\": \"WinGet Log\",\n  \"scopeName\": \"text.winget-log\",\n  \"patterns\": [\n    { \"include\": \"#logLine\" }\n  ],\n  \"repository\": {\n    \"logLine\": {\n      \"comment\": \"Full log line: TIMESTAMP [<L>] [CHAN] [SUBCHAN] message\",\n      \"match\": \"^(\\\\d{2,4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{3})\\\\s+(?:(<[VIWEC]>)\\\\s+)?(\\\\[(FAIL|CLI |SQL |REPO|YAML|CORE|TEST|CONF|WORK)\\\\s*\\\\])(\\\\s+\\\\[([A-Z]{2,8})\\\\s*\\\\])?(.*)$\",\n      \"captures\": {\n        \"1\": { \"name\": \"constant.numeric.timestamp.winget-log\" },\n        \"2\": { \"name\": \"keyword.operator.level-marker.winget-log\" },\n        \"3\": { \"patterns\": [{ \"include\": \"#channelBadge\" }] },\n        \"6\": { \"name\": \"entity.name.type.subchannel.winget-log\" },\n        \"7\": { \"patterns\": [{ \"include\": \"#messageText\" }] }\n      }\n    },\n    \"channelBadge\": {\n      \"patterns\": [\n        { \"match\": \"\\\\[FAIL\\\\s*\\\\]\", \"name\": \"invalid.illegal.channel.fail.winget-log\" },\n        { \"match\": \"\\\\[CLI\\\\s*\\\\]\",  \"name\": \"support.function.channel.cli.winget-log\" },\n        { \"match\": \"\\\\[SQL\\\\s*\\\\]\",  \"name\": \"entity.name.function.channel.sql.winget-log\" },\n        { \"match\": \"\\\\[REPO\\\\s*\\\\]\", \"name\": \"support.class.channel.repo.winget-log\" },\n        { \"match\": \"\\\\[YAML\\\\s*\\\\]\", \"name\": \"constant.language.channel.yaml.winget-log\" },\n        { \"match\": \"\\\\[CORE\\\\s*\\\\]\", \"name\": \"comment.channel.core.winget-log\" },\n        { \"match\": \"\\\\[TEST\\\\s*\\\\]\", \"name\": \"markup.inserted.channel.test.winget-log\" },\n        { \"match\": \"\\\\[CONF\\\\s*\\\\]\", \"name\": \"keyword.control.channel.conf.winget-log\" },\n        { \"match\": \"\\\\[WORK\\\\s*\\\\]\", \"name\": \"variable.parameter.channel.work.winget-log\" }\n      ]\n    },\n    \"messageText\": {\n      \"patterns\": [\n        { \"match\": \"\\\\b(Error|Fail(ed|ure)?|Exception|HRESULT|0x[0-9a-fA-F]+)\\\\b\", \"name\": \"invalid.illegal.error-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Warn(ing)?|Deprecated)\\\\b\", \"name\": \"support.type.warning-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Verbose|Trace|Debug)\\\\b\", \"name\": \"comment.verbose-keyword.winget-log\" }\n      ]\n    }\n  }\n}\n","tools/WinGetLogViewer/tsconfig.json":"{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"outDir\": \"./out\",\n    \"rootDir\": \"./src\",\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n","tools/CorrelationTestbed/Readme.md":"# E2E correlation testing\nThis directory holds a few scripts and a test project, all centered around enabling end-to-end validation of our correlation between system artifacts and packages in external sources.\n\nThe test project uses the COM API to first install a package, then attempts to check for correlation in two ways (directions):\n1. When the remote package identity is known, the caller will usually look it up via that remote identity.  This path can enable additional information to be retrieved to make the correlation with.\n2. When listing all of the local packages, the remote identity must be determined for each one. We can use only data known locally to make the correlation.\n\nThe primary script, `Test-CorrelationInSandbox.ps1`, is based off of the sandbox test script in winget-pkgs (thanks to many people).  It sets up the sandbox and initial script to run there for each package to test, then waits for a sentinel file to be created in the output location.  The results of all of running the test project exe, as well as the ARP differences and winget logs are put in that output location, then the sandbox is destroyed for the next package to run.\n\n```\nTest-CorrelationInSandbox.ps1\n-- Required --\n[[-PackageIdentifiers] <string[]>] :: A set of package ids to test\n[[-Source] <string>] :: The name of the source that the packages are from, ex. \"winget\"\n\n-- Optional --\n[-ExePath <string>] :: Path to the test exe; defaults to the Release output location\n[-UseDev] :: Switch to use the local dev winget build\n[-DevPackagePath <string>] :: Path to the local dev *Release* winget build; defaults to the normal location\n[-ResultsPath <string>] :: Path to output the results to; defaults to a temp directory\n[-RegFileDirectory <string>] :: Path to a directory containing .reg files to insert before the test, creating noise for correlation\n[-MetadataCollection] :: Switch to enable collection of metadata\n[-WingetUtilPath <string>] :: Path to the WinGetUtil.dll to use; defaults to Debug build location\n```\n\nOnce testing is done, `Process-CorrelationResults.ps1` will take all of the results JSON files and put them into `results.csv` in the directory.  If any tests failed to run, they will be in `failed.csv`.  There are correlation columns in the CSV that can be averaged in Excel to get the correlation percentage.\n\n## Running a test\n### Setup\nFirst you must have built the test exe located in `InstallAndCheckCorrelation`. By default the Release x64 version is picked up by the script, so it is easiest to build that one.\n\nIf you want to run against the local dev build of the winget COM server, the default is again to use Release x64.  The sandbox will not run the debug build for unknown reasons currently.\n\n### Run the test pass\nRun the `Test-CorrelationInSandbox.ps1` script, then wait for a while since it is going to download and install every package serially, with a little bit of overhead in between.\n\nA simple example call is:\n```\nTest-CorrelationInSandbox.ps1 -PackageIdentifiers @(\"Microsoft.VisualStudioCode\") -Source winget\n```\nThis will use the latest version of winget available on github.  Adding `-UseDev` should be enough to use the local build instead if Release x64 is already deployed onto the host machine.\n\n### Collate the results\nRunning `Process-CorrelationResults.ps1` on the directory output at the end of `Test-CorrelationInSandbox.ps1` will place a CSV file with the results combined together.  These results can be inspected for correctness and an overall correlation score determined from the different correlation paths.","schemas/JSON/packages/packages.schema.1.0.json":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.1.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"WinGetVersion\", \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"Id\" ],\n              \"properties\": {\n                \"Id\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","schemas/JSON/packages/packages.schema.2.0.json":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.2.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(\\\\-preview)?$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"PackageIdentifier\" ],\n              \"properties\": {\n                \"PackageIdentifier\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                },\n\n                \"InitialOverrideArguments\": {\n                  \"description\": \"Override arguments used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                },\n\n                \"InitialCustomSwitches\": {\n                  \"description\": \"Additional custom switches used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agent instructions\n\nFollow `.github/copilot-instructions.md` for repository-specific development guidance.\n\n## Issues\n\nBefore filing a GitHub issue in this repository:\n\n1. Search existing open and closed issues for duplicates.\n2. Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\n3. For bugs, include the same information requested by the Bug Report form: relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\n4. For feature requests, include the same information requested by the Feature Request form: relevant area, description of the new feature or enhancement, and proposed technical implementation details when known.\n5. Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\n\n## Pull requests\n\nBefore opening a pull request:\n\n1. Review `CONTRIBUTING.md` and follow the repository PR template.\n2. Keep each PR focused on one logical change.\n3. Include or update tests and documentation when the change affects behavior, command output, user guidance, or public APIs.\n4. Summarize validation performed, or explain why validation was not run.\n","isInternal":false,"tokens":259,"sizeBytes":1312},{"name":"packages.schema.1.0.json","path":"schemas/JSON/packages/packages.schema.1.0.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/schemas/JSON/packages/packages.schema.1.0.json","title":"Packages Skill","category":"anthropic-skill","format":"json","content":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.1.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"WinGetVersion\", \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"Id\" ],\n              \"properties\": {\n                \"Id\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","frontmatter":{"$id":"https://aka.ms/winget-packages.schema.1.0.json","$schema":"https://json-schema.org/draft/2019-09/schema#","title":"winget Packages List Schema","description":"Describes a list of packages for batch installs","type":"object","required":["WinGetVersion","Sources"],"additionalProperties":true,"properties":{"WinGetVersion":{"description":"Version of winget that generated this file","type":"string","pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+$"},"CreationDate":{"description":"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)","type":"string","format":"date-time"},"Sources":{"description":"Sources from which each package comes from","type":"array","items":{"description":"A source and the list of packages to install from it","type":"object","required":["SourceDetails","Packages"],"additionalProperties":true,"properties":{"SourceDetails":{"description":"Details about this source","type":"object","required":["Name","Identifier","Argument","Type"],"additionalProperties":true,"properties":{"Name":{"description":"Name of the source","type":"string"},"Identifier":{"description":"Identifier for the source","type":"string"},"Argument":{"description":"Argument used to install the source","type":"string"},"Type":{"description":"Type of the source","type":"string"}}},"Packages":{"description":"Packages installed from this source","type":"array","minItems":1,"items":{"description":"A package to be installed from this source","type":"object","additionalProperties":true,"required":["Id"],"properties":{"Id":{"description":"Package ID","type":"string"},"Version":{"description":"Package version","type":"string"},"Channel":{"description":"Package channel","type":"string"},"Scope":{"description":"Required package scope","type":"string","enum":["user","machine"],"default":"user"}}}}}}}}},"isInternal":false,"tokens":648,"sizeBytes":3010},{"name":"packages.schema.2.0.json","path":"schemas/JSON/packages/packages.schema.2.0.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/schemas/JSON/packages/packages.schema.2.0.json","title":"Packages Skill","category":"anthropic-skill","format":"json","content":"{\n  \"$id\": \"https://aka.ms/winget-packages.schema.2.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(\\\\-preview)?$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"PackageIdentifier\" ],\n              \"properties\": {\n                \"PackageIdentifier\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                },\n\n                \"InitialOverrideArguments\": {\n                  \"description\": \"Override arguments used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                },\n\n                \"InitialCustomSwitches\": {\n                  \"description\": \"Additional custom switches used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n","frontmatter":{"$id":"https://aka.ms/winget-packages.schema.2.0.json","$schema":"https://json-schema.org/draft/2019-09/schema#","title":"winget Packages List Schema","description":"Describes a list of packages for batch installs","type":"object","required":["Sources"],"additionalProperties":true,"properties":{"WinGetVersion":{"description":"Version of winget that generated this file","type":"string","pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+(\\-preview)?$"},"CreationDate":{"description":"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)","type":"string","format":"date-time"},"Sources":{"description":"Sources from which each package comes from","type":"array","items":{"description":"A source and the list of packages to install from it","type":"object","required":["SourceDetails","Packages"],"additionalProperties":true,"properties":{"SourceDetails":{"description":"Details about this source","type":"object","required":["Name","Identifier","Argument","Type"],"additionalProperties":true,"properties":{"Name":{"description":"Name of the source","type":"string"},"Identifier":{"description":"Identifier for the source","type":"string"},"Argument":{"description":"Argument used to install the source","type":"string"},"Type":{"description":"Type of the source","type":"string"}}},"Packages":{"description":"Packages installed from this source","type":"array","minItems":1,"items":{"description":"A package to be installed from this source","type":"object","additionalProperties":true,"required":["PackageIdentifier"],"properties":{"PackageIdentifier":{"description":"Package ID","type":"string"},"Version":{"description":"Package version","type":"string"},"Channel":{"description":"Package channel","type":"string"},"Scope":{"description":"Required package scope","type":"string","enum":["user","machine"],"default":"user"},"InitialOverrideArguments":{"description":"Override arguments used when the package was initially installed; preserved on upgrade","type":"string"},"InitialCustomSwitches":{"description":"Additional custom switches used when the package was initially installed; preserved on upgrade","type":"string"}}}}}}}}},"isInternal":false,"tokens":722,"sizeBytes":3489},{"name":"language-configuration.json","path":"tools/WinGetLogViewer/language-configuration.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/WinGetLogViewer/language-configuration.json","title":"WinGetLogViewer Skill","category":"anthropic-skill","format":"json","content":"{\n  \"comments\": {},\n  \"brackets\": [],\n  \"autoClosingPairs\": [],\n  \"surroundingPairs\": []\n}\n","frontmatter":{"comments":{},"brackets":[],"autoClosingPairs":[],"surroundingPairs":[]},"isInternal":false,"tokens":28,"sizeBytes":91},{"name":"package.json","path":"tools/WinGetLogViewer/package.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/WinGetLogViewer/package.json","title":"winget-log-viewer","category":"anthropic-skill","format":"json","content":"{\r\n  \"name\": \"winget-log-viewer\",\r\n  \"displayName\": \"WinGet Log Viewer\",\r\n  \"description\": \"Rich viewer for WinGet diagnostic log files with channel filtering, highlighting, and live follow mode.\",\r\n  \"version\": \"0.1.0\",\r\n  \"publisher\": \"microsoft\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/microsoft/winget-cli\"\r\n  },\r\n  \"license\": \"MIT\",\r\n  \"engines\": {\r\n    \"vscode\": \"^1.85.0\"\r\n  },\r\n  \"categories\": [\r\n    \"Other\"\r\n  ],\r\n  \"activationEvents\": [],\r\n  \"main\": \"./out/extension.js\",\r\n  \"contributes\": {\r\n    \"customEditors\": [\r\n      {\r\n        \"viewType\": \"wingetLogViewer.logViewer\",\r\n        \"displayName\": \"WinGet Log Viewer\",\r\n        \"selector\": [\r\n          {\r\n            \"filenamePattern\": \"WinGet-*.log\"\r\n          },\r\n          {\r\n            \"filenamePattern\": \"WinGetCOM-*.log\"\r\n          }\r\n        ],\r\n        \"priority\": \"default\"\r\n      }\r\n    ],\r\n    \"commands\": [\r\n      {\r\n        \"command\": \"wingetLogViewer.open\",\r\n        \"title\": \"Open in WinGet Log Viewer\",\r\n        \"category\": \"WinGet Log Viewer\"\r\n      }\r\n    ],\r\n    \"languages\": [\r\n      {\r\n        \"id\": \"winget-log\",\r\n        \"aliases\": [\r\n          \"WinGet Log\"\r\n        ],\r\n        \"filenamePatterns\": [\r\n          \"WinGet-*.log\",\r\n          \"WinGetCOM-*.log\"\r\n        ],\r\n        \"configuration\": \"./language-configuration.json\"\r\n      }\r\n    ],\r\n    \"grammars\": [\r\n      {\r\n        \"language\": \"winget-log\",\r\n        \"scopeName\": \"text.winget-log\",\r\n        \"path\": \"./syntaxes/winget-log.tmLanguage.json\"\r\n      }\r\n    ],\r\n    \"menus\": {\r\n      \"explorer/context\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ],\r\n      \"editor/title\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log && activeCustomEditorId != 'wingetLogViewer.logViewer'\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ]\r\n    }\r\n  },\r\n  \"scripts\": {\r\n    \"vscode:prepublish\": \"npm run compile\",\r\n    \"compile\": \"tsc -p ./\",\r\n    \"watch\": \"tsc -watch -p ./\",\r\n    \"pretest\": \"npm run compile\",\r\n    \"lint\": \"eslint src --ext ts\",\r\n    \"package\": \"vsce package\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@types/vscode\": \"^1.85.0\",\r\n    \"@types/node\": \"20.x\",\r\n    \"@vscode/vsce\": \"^3.9.2\",\r\n    \"typescript\": \"^5.3.0\"\r\n  }\r\n}\r\n","frontmatter":{"name":"winget-log-viewer","displayName":"WinGet Log Viewer","description":"Rich viewer for WinGet diagnostic log files with channel filtering, highlighting, and live follow mode.","version":"0.1.0","publisher":"microsoft","repository":{"type":"git","url":"https://github.com/microsoft/winget-cli"},"license":"MIT","engines":{"vscode":"^1.85.0"},"categories":["Other"],"activationEvents":[],"main":"./out/extension.js","contributes":{"customEditors":[{"viewType":"wingetLogViewer.logViewer","displayName":"WinGet Log Viewer","selector":[{"filenamePattern":"WinGet-*.log"},{"filenamePattern":"WinGetCOM-*.log"}],"priority":"default"}],"commands":[{"command":"wingetLogViewer.open","title":"Open in WinGet Log Viewer","category":"WinGet Log Viewer"}],"languages":[{"id":"winget-log","aliases":["WinGet Log"],"filenamePatterns":["WinGet-*.log","WinGetCOM-*.log"],"configuration":"./language-configuration.json"}],"grammars":[{"language":"winget-log","scopeName":"text.winget-log","path":"./syntaxes/winget-log.tmLanguage.json"}],"menus":{"explorer/context":[{"command":"wingetLogViewer.open","when":"resourceExtname == .log","group":"navigation"}],"editor/title":[{"command":"wingetLogViewer.open","when":"resourceExtname == .log && activeCustomEditorId != 'wingetLogViewer.logViewer'","group":"navigation"}]}},"scripts":{"vscode:prepublish":"npm run compile","compile":"tsc -p ./","watch":"tsc -watch -p ./","pretest":"npm run compile","lint":"eslint src --ext ts","package":"vsce package"},"devDependencies":{"@types/vscode":"^1.85.0","@types/node":"20.x","@vscode/vsce":"^3.9.2","typescript":"^5.3.0"}},"isInternal":false,"tokens":637,"sizeBytes":2377},{"name":"winget-log.tmLanguage.json","path":"tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json","title":"WinGet Log","category":"anthropic-skill","format":"json","content":"{\n  \"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n  \"name\": \"WinGet Log\",\n  \"scopeName\": \"text.winget-log\",\n  \"patterns\": [\n    { \"include\": \"#logLine\" }\n  ],\n  \"repository\": {\n    \"logLine\": {\n      \"comment\": \"Full log line: TIMESTAMP [<L>] [CHAN] [SUBCHAN] message\",\n      \"match\": \"^(\\\\d{2,4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{3})\\\\s+(?:(<[VIWEC]>)\\\\s+)?(\\\\[(FAIL|CLI |SQL |REPO|YAML|CORE|TEST|CONF|WORK)\\\\s*\\\\])(\\\\s+\\\\[([A-Z]{2,8})\\\\s*\\\\])?(.*)$\",\n      \"captures\": {\n        \"1\": { \"name\": \"constant.numeric.timestamp.winget-log\" },\n        \"2\": { \"name\": \"keyword.operator.level-marker.winget-log\" },\n        \"3\": { \"patterns\": [{ \"include\": \"#channelBadge\" }] },\n        \"6\": { \"name\": \"entity.name.type.subchannel.winget-log\" },\n        \"7\": { \"patterns\": [{ \"include\": \"#messageText\" }] }\n      }\n    },\n    \"channelBadge\": {\n      \"patterns\": [\n        { \"match\": \"\\\\[FAIL\\\\s*\\\\]\", \"name\": \"invalid.illegal.channel.fail.winget-log\" },\n        { \"match\": \"\\\\[CLI\\\\s*\\\\]\",  \"name\": \"support.function.channel.cli.winget-log\" },\n        { \"match\": \"\\\\[SQL\\\\s*\\\\]\",  \"name\": \"entity.name.function.channel.sql.winget-log\" },\n        { \"match\": \"\\\\[REPO\\\\s*\\\\]\", \"name\": \"support.class.channel.repo.winget-log\" },\n        { \"match\": \"\\\\[YAML\\\\s*\\\\]\", \"name\": \"constant.language.channel.yaml.winget-log\" },\n        { \"match\": \"\\\\[CORE\\\\s*\\\\]\", \"name\": \"comment.channel.core.winget-log\" },\n        { \"match\": \"\\\\[TEST\\\\s*\\\\]\", \"name\": \"markup.inserted.channel.test.winget-log\" },\n        { \"match\": \"\\\\[CONF\\\\s*\\\\]\", \"name\": \"keyword.control.channel.conf.winget-log\" },\n        { \"match\": \"\\\\[WORK\\\\s*\\\\]\", \"name\": \"variable.parameter.channel.work.winget-log\" }\n      ]\n    },\n    \"messageText\": {\n      \"patterns\": [\n        { \"match\": \"\\\\b(Error|Fail(ed|ure)?|Exception|HRESULT|0x[0-9a-fA-F]+)\\\\b\", \"name\": \"invalid.illegal.error-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Warn(ing)?|Deprecated)\\\\b\", \"name\": \"support.type.warning-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Verbose|Trace|Debug)\\\\b\", \"name\": \"comment.verbose-keyword.winget-log\" }\n      ]\n    }\n  }\n}\n","frontmatter":{"$schema":"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json","name":"WinGet Log","scopeName":"text.winget-log","patterns":[{"include":"#logLine"}],"repository":{"logLine":{"comment":"Full log line: TIMESTAMP [<L>] [CHAN] [SUBCHAN] message","match":"^(\\d{2,4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3})\\s+(?:(<[VIWEC]>)\\s+)?(\\[(FAIL|CLI |SQL |REPO|YAML|CORE|TEST|CONF|WORK)\\s*\\])(\\s+\\[([A-Z]{2,8})\\s*\\])?(.*)$","captures":{"1":{"name":"constant.numeric.timestamp.winget-log"},"2":{"name":"keyword.operator.level-marker.winget-log"},"3":{"patterns":[{"include":"#channelBadge"}]},"6":{"name":"entity.name.type.subchannel.winget-log"},"7":{"patterns":[{"include":"#messageText"}]}}},"channelBadge":{"patterns":[{"match":"\\[FAIL\\s*\\]","name":"invalid.illegal.channel.fail.winget-log"},{"match":"\\[CLI\\s*\\]","name":"support.function.channel.cli.winget-log"},{"match":"\\[SQL\\s*\\]","name":"entity.name.function.channel.sql.winget-log"},{"match":"\\[REPO\\s*\\]","name":"support.class.channel.repo.winget-log"},{"match":"\\[YAML\\s*\\]","name":"constant.language.channel.yaml.winget-log"},{"match":"\\[CORE\\s*\\]","name":"comment.channel.core.winget-log"},{"match":"\\[TEST\\s*\\]","name":"markup.inserted.channel.test.winget-log"},{"match":"\\[CONF\\s*\\]","name":"keyword.control.channel.conf.winget-log"},{"match":"\\[WORK\\s*\\]","name":"variable.parameter.channel.work.winget-log"}]},"messageText":{"patterns":[{"match":"\\b(Error|Fail(ed|ure)?|Exception|HRESULT|0x[0-9a-fA-F]+)\\b","name":"invalid.illegal.error-keyword.winget-log"},{"match":"\\b(Warn(ing)?|Deprecated)\\b","name":"support.type.warning-keyword.winget-log"},{"match":"\\b(Verbose|Trace|Debug)\\b","name":"comment.verbose-keyword.winget-log"}]}}},"isInternal":false,"tokens":702,"sizeBytes":2133},{"name":"tsconfig.json","path":"tools/WinGetLogViewer/tsconfig.json","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/WinGetLogViewer/tsconfig.json","title":"WinGetLogViewer Skill","category":"anthropic-skill","format":"json","content":"{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"outDir\": \"./out\",\n    \"rootDir\": \"./src\",\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n","frontmatter":{"compilerOptions":{"module":"commonjs","target":"ES2020","lib":["ES2020"],"outDir":"./out","rootDir":"./src","sourceMap":true,"strict":true,"esModuleInterop":true,"skipLibCheck":true},"include":["src/**/*.ts"],"exclude":["node_modules",".vscode-test"]},"isInternal":false,"tokens":102,"sizeBytes":325},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"# WinGet CLI Development Guide\r\n\r\n## Project Overview\r\n\r\nThis is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of:\r\n\r\n- **C++/WinRT client** (`src/AppInstallerCLI*`) - The main CLI and core logic\r\n- **COM API** (`src/Microsoft.Management.Deployment`) - Public Windows Runtime API for programmatic access\r\n- **PowerShell modules** (`src/PowerShell`) - Microsoft.WinGet.Client and Microsoft.WinGet.Configuration cmdlets\r\n- **Configuration system** - DSC-based system configuration using WinGet\r\n\r\n## Building, Testing, and Running\r\n\r\n### Initial Setup\r\n\r\nUse a configuration file in `.config` as in `winget configure .config/configuration.winget` (alternatives provided for other VS SKUs).\r\n\r\nManual steps:\r\n\r\n1. Install Visual Studio 2022 with required workloads (see `.vsconfig`)\r\n2. Install Windows SDK 10.0.26100: `winget install Microsoft.WindowsSDK.10.0.26100`\r\n3. Enable developer mode in Windows\r\n4. Run `vcpkg integrate install` from Developer Command Prompt\r\n\r\n### Building\r\n\r\nOpen `src\\AppInstallerCLI.sln` in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line.\r\n\r\nThe solution uses:\r\n- MSBuild\r\n- vcpkg for C++ dependencies\r\n- NuGet for C++ and .NET dependencies\r\n\r\nCI uses `/p:PreferredToolArchitecture=x64` to avoid 32-bit linker memory limits without changing the target architecture. Use the same setting for command-line Release builds.\r\n\r\n### Running/Debugging\r\n\r\n1. Deploy solution: Build > Deploy Solution\r\n2. Run from command line: `wingetdev`\r\n3. For debugging:\r\n   - Right-click `AppInstallerCLIPackage` > Properties > Debug tab\r\n   - Set Debugger type to \"Native Only\" for both Application and Background task processes\r\n   - Select \"Do not launch, but debug my code when it starts\"\r\n   - Press F5 and run `wingetdev` in a separate terminal\r\n\r\nEntry point: `src/AppInstallerCLI/main.cpp`\r\n\r\n### Testing\r\n\r\n#### C++ Unit Tests (Catch2)\r\nLocated in `AppInstallerCLITests` project. After building:\r\n\r\n```powershell\r\n# Run all tests\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe\r\n\r\n# Run specific test\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe TestName\r\n\r\n# Available options\r\nAppInstallerCLITests.exe --help\r\n```\r\n\r\n#### .NET Tests\r\n- `Microsoft.WinGet.UnitTests` - PowerShell module tests\r\n- `Microsoft.Management.Configuration.UnitTests` - Configuration system tests\r\n- `WinGetUtilInterop.UnitTests` - Interop layer tests\r\n\r\n#### E2E Tests\r\n`AppInstallerCLIE2ETests` project contains end-to-end integration tests.\r\n\r\n## Architecture\r\n\r\n### Core Components\r\n\r\n**AppInstallerCLICore** - Core CLI logic organized around:\r\n- **ExecutionContext**: State container that flows through workflows. Contains arguments, reporter, flags, and data (ExecutionContextData.h)\r\n- **Workflows**: Composable functions that take ExecutionContext and perform operations (e.g., InstallFlow, UpdateFlow, SearchFlow)\r\n- **Commands**: Parse arguments and orchestrate workflows\r\n- **Reporter**: Handles all user output (ExecutionReporter.h)\r\n\r\n**AppInstallerRepositoryCore** - Package source abstraction:\r\n- Interfaces for different source types (REST, SQLite index, Microsoft Store, composite)\r\n- Search, match, and correlation logic\r\n- Package version selection and dependencies\r\n\r\n**AppInstallerCommonCore** - Shared utilities:\r\n- Manifest parsing (YAML/JSON)\r\n- Settings and group policy\r\n- Telemetry and logging\r\n- HTTP client, downloader, archive handling\r\n\r\n**Microsoft.Management.Deployment** - COM API surface:\r\n- IDL definitions in `PackageManager.idl`\r\n- WinRT projections for external consumption\r\n- Used by PowerShell modules and third-party integrations\r\n\r\n**AppInstallerCLIPackage** - Dev MSIX package definition:\r\n- Models the release package definition as closely as possible.\r\n- Contains localized string resources at src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw\r\n\r\n### Key Patterns\r\n\r\n**Workflow Pattern**: Functions that operate on ExecutionContext:\r\n```cpp\r\nvoid WorkflowTask(Execution::Context& context)\r\n{\r\n    // Check if already terminated\r\n    AICLI_RETURN_IF_TERMINATED(context);\r\n\r\n    // Access data\r\n    auto& data = context.Get<Data::Installer>();\r\n\r\n    // Report to user\r\n    context.Reporter.Info() << \"Doing something\";\r\n\r\n    // Store data for next workflow\r\n    context.Add<Data::SomeResult>(result);\r\n\r\n    // Terminate on error\r\n    if (failed)\r\n    {\r\n        AICLI_TERMINATE_CONTEXT(HRESULT);\r\n    }\r\n}\r\n```\r\n\r\n**Source Composition**: Multiple package sources can be composed:\r\n- CompositeSource combines multiple sources with conflict resolution\r\n- Installed source tracks locally installed packages\r\n- Available sources provide packages to install\r\n\r\n**Manifest Schema**: Package manifests use versioned YAML schemas:\r\n- Schema definitions in `schemas/JSON/manifests/`\r\n- Parsing in `AppInstallerCommonCore/Manifest/`\r\n- Multi-file manifests: installer, locale, version, defaultLocale\r\n\r\n## Naming Conventions\r\n\r\n- **Namespace structure**: `AppInstaller::<Area>[::<Subarea>]`\r\n  - `AppInstaller::CLI::Execution` - CLI execution context\r\n  - `AppInstaller::CLI::Workflow` - Workflow functions\r\n  - `AppInstaller::Repository` - Repository/source logic\r\n  - `AppInstaller::Manifest` - Manifest types\r\n  - `AppInstaller::Settings` - User/admin settings\r\n\r\n- **Macros**: Prefixed with `AICLI_` for CLI, `WINGET_` for general\r\n- **Data keys**: ExecutionContextData uses enum keys to type-safely store/retrieve data\r\n\r\n## Windows-Specific Considerations\r\n\r\n- Use Windows-style paths with backslashes (`\\`)\r\n- Leverage WinRT APIs via C++/WinRT projections\r\n- COM threading models matter - client uses multi-threaded apartment (MTA)\r\n- Package deployment uses Windows App SDK / MSIX infrastructure\r\n- Requires Windows 10 1809+ (build 17763)\r\n\r\n## Contributing\r\n\r\n- Review `CONTRIBUTING.md` for workflow\r\n- File/discuss issues before starting work\r\n- Specs required for features (stored in `doc/specs/`); see `.github/instructions/specs.instructions.md` for detailed guidance\r\n- Follow existing code style (see `stylecop.json`)\r\n- CI runs on Azure Pipelines (`azure-pipelines.yml`)\r\n\r\n## Issues and Pull Requests\r\n\r\n- Before filing an issue, search existing open and closed issues for duplicates.\r\n- Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\r\n- Bug reports should include the form fields for relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\r\n- Feature requests should include the form fields for relevant area, feature or enhancement description, and proposed technical implementation details when known.\r\n- Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\r\n- Before opening a pull request, review `CONTRIBUTING.md`, follow the PR template, keep the change focused, and summarize validation performed.\r\n- AI assistance is allowed, but contributors are fully accountable for AI-assisted output as if they wrote it themselves.\r\n    - Unless explicitly directed otherwise, confirm with the user that they have reviewed the submission.\r\n\r\n## Useful Commands\r\n\r\n```powershell\r\n# Get WinGet client info\r\nwingetdev --info\r\n\r\n# Show experimental features\r\nwingetdev features\r\n\r\n# Check sources\r\nwingetdev source list\r\n```\r\n\r\n## Localization\r\n\r\n### Source of truth\r\n\r\nThe English resource file `src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw` is the only file contributors should edit for string changes. It feeds the Microsoft localization pipeline.\r\n\r\nThe files under `Localization\\Resources\\<locale>\\` are **automatically synced from Microsoft's internal localization system and must not be edited**. Any manual edits will be overwritten on the next sync.\r\n\r\nEvery string that could be misunderstood without context should have a `<comment>`.\r\n\r\n### Triggering retranslation\r\n\r\n- **Changing a string's `<value>`** automatically queues it for retranslation on the next localization sync.\r\n- **Changing only a `<comment>`** does NOT trigger retranslation. Comments improve future translations but do not fix existing ones.\r\n\r\nTo fix an existing bad translation, a bug has to be filed internally with the localization team.\r\n","isInternal":false,"tokens":1829,"sizeBytes":8462},{"name":"Readme.md","path":"tools/CorrelationTestbed/Readme.md","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/CorrelationTestbed/Readme.md","title":"CorrelationTestbed Documentation","category":"plugin-manifest","format":"markdown","content":"# E2E correlation testing\nThis directory holds a few scripts and a test project, all centered around enabling end-to-end validation of our correlation between system artifacts and packages in external sources.\n\nThe test project uses the COM API to first install a package, then attempts to check for correlation in two ways (directions):\n1. When the remote package identity is known, the caller will usually look it up via that remote identity.  This path can enable additional information to be retrieved to make the correlation with.\n2. When listing all of the local packages, the remote identity must be determined for each one. We can use only data known locally to make the correlation.\n\nThe primary script, `Test-CorrelationInSandbox.ps1`, is based off of the sandbox test script in winget-pkgs (thanks to many people).  It sets up the sandbox and initial script to run there for each package to test, then waits for a sentinel file to be created in the output location.  The results of all of running the test project exe, as well as the ARP differences and winget logs are put in that output location, then the sandbox is destroyed for the next package to run.\n\n```\nTest-CorrelationInSandbox.ps1\n-- Required --\n[[-PackageIdentifiers] <string[]>] :: A set of package ids to test\n[[-Source] <string>] :: The name of the source that the packages are from, ex. \"winget\"\n\n-- Optional --\n[-ExePath <string>] :: Path to the test exe; defaults to the Release output location\n[-UseDev] :: Switch to use the local dev winget build\n[-DevPackagePath <string>] :: Path to the local dev *Release* winget build; defaults to the normal location\n[-ResultsPath <string>] :: Path to output the results to; defaults to a temp directory\n[-RegFileDirectory <string>] :: Path to a directory containing .reg files to insert before the test, creating noise for correlation\n[-MetadataCollection] :: Switch to enable collection of metadata\n[-WingetUtilPath <string>] :: Path to the WinGetUtil.dll to use; defaults to Debug build location\n```\n\nOnce testing is done, `Process-CorrelationResults.ps1` will take all of the results JSON files and put them into `results.csv` in the directory.  If any tests failed to run, they will be in `failed.csv`.  There are correlation columns in the CSV that can be averaged in Excel to get the correlation percentage.\n\n## Running a test\n### Setup\nFirst you must have built the test exe located in `InstallAndCheckCorrelation`. By default the Release x64 version is picked up by the script, so it is easiest to build that one.\n\nIf you want to run against the local dev build of the winget COM server, the default is again to use Release x64.  The sandbox will not run the debug build for unknown reasons currently.\n\n### Run the test pass\nRun the `Test-CorrelationInSandbox.ps1` script, then wait for a while since it is going to download and install every package serially, with a little bit of overhead in between.\n\nA simple example call is:\n```\nTest-CorrelationInSandbox.ps1 -PackageIdentifiers @(\"Microsoft.VisualStudioCode\") -Source winget\n```\nThis will use the latest version of winget available on github.  Adding `-UseDev` should be enough to use the local build instead if Release x64 is already deployed onto the host machine.\n\n### Collate the results\nRunning `Process-CorrelationResults.ps1` on the directory output at the end of `Test-CorrelationInSandbox.ps1` will place a CSV file with the results combined together.  These results can be inspected for correctness and an overall correlation score determined from the different correlation paths.","isInternal":false,"tokens":800,"sizeBytes":3575},{"name":"README.md","path":"tools/WinGetLogViewer/README.md","rawUrl":"https://raw.githubusercontent.com/microsoft/winget-cli/HEAD/tools/WinGetLogViewer/README.md","title":"WinGetLogViewer Documentation","category":"plugin-manifest","format":"markdown","content":"# WinGet Log Viewer\n\nA VS Code extension that makes reading WinGet diagnostic log files fast and pleasant.\n\n## Features\n\n### Rich log viewer (WebView editor)\nOpens automatically for `WinGet-*.log` and `WinGetCOM-*.log` files. Use the **\"Open in WinGet Log Viewer\"** command (or right-click any `.log` file in the Explorer) to open any log file in the viewer.\n\n**Channel color badges** — each of the nine WinGet channels gets a distinct color:\n\n| Channel | Description |\n|---------|-------------|\n| ❤️ `FAIL` | Failures / exceptions |\n| 💙 `CLI`  | CLI command handling |\n| 💜 `SQL`  | SQLite / index operations |\n| 🩵 `REPO` | Repository / source operations |\n| 💛 `YAML` | YAML manifest parsing |\n| 🤍 `CORE` | Core runtime |\n| 💚 `TEST` | Test infrastructure |\n| 🩶 `CONF` | Configuration / DSC |\n| 🧡 `WORK` | Workflow execution |\n\n**Subchannel detection** — when a sub-component routes its log lines through a parent channel, the original `[CHAN]` tag appears at the start of the message. The viewer detects this and renders it as a secondary subchannel badge.\n\n**Dynamic filters** — toggle individual channels and subchannels on/off with checkboxes. Use \"All\" / \"None\" quick links per section.\n\n**Quick text search** — type in the Search box to live-filter visible lines.\n\n**Severity highlighting** — rows that contain error/warning keywords get a colored left border and message highlighting.\n\n**Time delta** — enable \"Show time delta\" to see the elapsed time between consecutive visible lines (`+Xms` / `+Xs`). Great for spotting slow operations.\n\n**Jump to error** — use the ↑ Error / ↓ Error buttons to navigate between error and critical log lines.\n\n**Follow mode** — enable \"Follow (live tail)\" to auto-scroll as the log file grows on disk. New line count is shown briefly in the status bar.\n\n**Export filtered** — \"Copy visible lines\" sends all currently visible (filtered) raw log lines to the clipboard.\n\n**Wrap long lines** — enable \"Wrap long lines\" to prevent horizontal scrolling on very long messages.\n\n### Syntax highlighting (standard editor)\nWhen a WinGet log file is opened in VS Code's standard text editor, the TextMate grammar provides coloring for timestamps, channel badges, subchannels, and error/warning keywords — no additional setup required.\n\n## Log format\n\n```\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] message\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] [SUBCHAN] message    ← subchannel variant\n```\n\nWhere `<L>` is an optional single-letter severity marker: `V`=Verbose, `I`=Info, `W`=Warning, `E`=Error, `C`=Critical. Older log files without the marker are also supported.\n\n## Development\n\n### Prerequisites\n- Node.js 18+\n- VS Code 1.85+\n\n### Build\n\n```bash\ncd tools/WinGetLogViewer\nnpm install\nnpm run compile\n```\n\n### Run / Debug\n\n1. Open `tools/WinGetLogViewer/` as a workspace in VS Code.\n2. Press **F5** — this launches the Extension Development Host.\n3. Open any `WinGet-*.log` or `WinGetCOM-*.log` file; the viewer opens automatically.\n\n### Package\n\n```bash\nnpm run package\n```\n\nThis produces `winget-log-viewer-<version>.vsix`. Install it via **Extensions: Install from VSIX…** or:\n\n```bash\ncode --install-extension winget-log-viewer-0.1.0.vsix\n```\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| **Ctrl+F** (in viewer) | Focus the search box |\n\n## Roadmap / ideas\n\n- Per-session filter presets (save/restore named filter combinations)\n- Fold/collapse groups of lines by channel\n- Correlation ID linking (when GUIDs appear in messages)\n","isInternal":false,"tokens":873,"sizeBytes":3529}],"systemPromptSnippet":"<yakaai_skills repo=\"microsoft/winget-cli\">\n<!-- File: AGENTS.md (Tokens: ~259 | Category: root-instruction) -->\n# Agent instructions\n\nFollow `.github/copilot-instructions.md` for repository-specific development guidance.\n\n## Issues\n\nBefore filing a GitHub issue in this repository:\n\n1. Search existing open and closed issues for duplicates.\n2. Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\n3. For bugs, include the same information requested by the Bug Report form: relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\n4. For feature requests, include the same information requested by the Feature Request form: relevant area, description of the new feature or enhancement, and proposed technical implementation details when known.\n5. Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\n\n## Pull requests\n\nBefore opening a pull request:\n\n1. Review `CONTRIBUTING.md` and follow the repository PR template.\n2. Keep each PR focused on one logical change.\n3. Include or update tests and documentation when the change affects behavior, command output, user guidance, or public APIs.\n4. Summarize validation performed, or explain why validation was not run.\n\n<!-- File: schemas/JSON/packages/packages.schema.1.0.json (Tokens: ~648 | Category: anthropic-skill) -->\n{\n  \"$id\": \"https://aka.ms/winget-packages.schema.1.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"WinGetVersion\", \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"Id\" ],\n              \"properties\": {\n                \"Id\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n<!-- File: schemas/JSON/packages/packages.schema.2.0.json (Tokens: ~722 | Category: anthropic-skill) -->\n{\n  \"$id\": \"https://aka.ms/winget-packages.schema.2.0.json\",\n  \"$schema\": \"https://json-schema.org/draft/2019-09/schema#\",\n\n  \"title\": \"winget Packages List Schema\",\n  \"description\": \"Describes a list of packages for batch installs\",\n\n  \"type\": \"object\",\n  \"required\": [ \"Sources\" ],\n  \"additionalProperties\": true,\n\n  \"properties\": {\n    \"WinGetVersion\": {\n      \"description\": \"Version of winget that generated this file\",\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(\\\\-preview)?$\"\n    },\n\n    \"CreationDate\": {\n      \"description\": \"Date when this list was generated (ex. 2021-05-16T22:24:39.287-00:00)\",\n      \"type\": \"string\",\n      \"format\": \"date-time\"\n    },\n\n    \"Sources\": {\n      \"description\": \"Sources from which each package comes from\",\n      \"type\": \"array\",\n\n      \"items\": {\n        \"description\": \"A source and the list of packages to install from it\",\n        \"type\": \"object\",\n        \"required\": [ \"SourceDetails\", \"Packages\" ],\n        \"additionalProperties\": true,\n\n        \"properties\": {\n          \"SourceDetails\": {\n            \"description\": \"Details about this source\",\n            \"type\": \"object\",\n            \"required\": [ \"Name\", \"Identifier\", \"Argument\", \"Type\" ],\n            \"additionalProperties\": true,\n\n            \"properties\": {\n              \"Name\": {\n                \"description\": \"Name of the source\",\n                \"type\": \"string\"\n              },\n\n              \"Identifier\": {\n                \"description\": \"Identifier for the source\",\n                \"type\": \"string\"\n              },\n\n              \"Argument\": {\n                \"description\": \"Argument used to install the source\",\n                \"type\": \"string\"\n              },\n\n              \"Type\": {\n                \"description\": \"Type of the source\",\n                \"type\": \"string\"\n              }\n            }\n          },\n\n          \"Packages\": {\n            \"description\": \"Packages installed from this source\",\n            \"type\": \"array\",\n            \"minItems\": 1,\n\n            \"items\": {\n              \"description\": \"A package to be installed from this source\",\n              \"type\": \"object\",\n              \"additionalProperties\": true,\n              \"required\": [ \"PackageIdentifier\" ],\n              \"properties\": {\n                \"PackageIdentifier\": {\n                  \"description\": \"Package ID\",\n                  \"type\": \"string\"\n                },\n\n                \"Version\": {\n                  \"description\": \"Package version\",\n                  \"type\": \"string\"\n                },\n\n                \"Channel\": {\n                  \"description\": \"Package channel\",\n                  \"type\": \"string\"\n                },\n\n                \"Scope\": {\n                  \"description\": \"Required package scope\",\n                  \"type\": \"string\",\n                  \"enum\": [\n                    \"user\",\n                    \"machine\"\n                  ],\n                  \"default\": \"user\"\n                },\n\n                \"InitialOverrideArguments\": {\n                  \"description\": \"Override arguments used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                },\n\n                \"InitialCustomSwitches\": {\n                  \"description\": \"Additional custom switches used when the package was initially installed; preserved on upgrade\",\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n<!-- File: tools/WinGetLogViewer/language-configuration.json (Tokens: ~28 | Category: anthropic-skill) -->\n{\n  \"comments\": {},\n  \"brackets\": [],\n  \"autoClosingPairs\": [],\n  \"surroundingPairs\": []\n}\n\n<!-- File: tools/WinGetLogViewer/package.json (Tokens: ~637 | Category: anthropic-skill) -->\n{\r\n  \"name\": \"winget-log-viewer\",\r\n  \"displayName\": \"WinGet Log Viewer\",\r\n  \"description\": \"Rich viewer for WinGet diagnostic log files with channel filtering, highlighting, and live follow mode.\",\r\n  \"version\": \"0.1.0\",\r\n  \"publisher\": \"microsoft\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/microsoft/winget-cli\"\r\n  },\r\n  \"license\": \"MIT\",\r\n  \"engines\": {\r\n    \"vscode\": \"^1.85.0\"\r\n  },\r\n  \"categories\": [\r\n    \"Other\"\r\n  ],\r\n  \"activationEvents\": [],\r\n  \"main\": \"./out/extension.js\",\r\n  \"contributes\": {\r\n    \"customEditors\": [\r\n      {\r\n        \"viewType\": \"wingetLogViewer.logViewer\",\r\n        \"displayName\": \"WinGet Log Viewer\",\r\n        \"selector\": [\r\n          {\r\n            \"filenamePattern\": \"WinGet-*.log\"\r\n          },\r\n          {\r\n            \"filenamePattern\": \"WinGetCOM-*.log\"\r\n          }\r\n        ],\r\n        \"priority\": \"default\"\r\n      }\r\n    ],\r\n    \"commands\": [\r\n      {\r\n        \"command\": \"wingetLogViewer.open\",\r\n        \"title\": \"Open in WinGet Log Viewer\",\r\n        \"category\": \"WinGet Log Viewer\"\r\n      }\r\n    ],\r\n    \"languages\": [\r\n      {\r\n        \"id\": \"winget-log\",\r\n        \"aliases\": [\r\n          \"WinGet Log\"\r\n        ],\r\n        \"filenamePatterns\": [\r\n          \"WinGet-*.log\",\r\n          \"WinGetCOM-*.log\"\r\n        ],\r\n        \"configuration\": \"./language-configuration.json\"\r\n      }\r\n    ],\r\n    \"grammars\": [\r\n      {\r\n        \"language\": \"winget-log\",\r\n        \"scopeName\": \"text.winget-log\",\r\n        \"path\": \"./syntaxes/winget-log.tmLanguage.json\"\r\n      }\r\n    ],\r\n    \"menus\": {\r\n      \"explorer/context\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ],\r\n      \"editor/title\": [\r\n        {\r\n          \"command\": \"wingetLogViewer.open\",\r\n          \"when\": \"resourceExtname == .log && activeCustomEditorId != 'wingetLogViewer.logViewer'\",\r\n          \"group\": \"navigation\"\r\n        }\r\n      ]\r\n    }\r\n  },\r\n  \"scripts\": {\r\n    \"vscode:prepublish\": \"npm run compile\",\r\n    \"compile\": \"tsc -p ./\",\r\n    \"watch\": \"tsc -watch -p ./\",\r\n    \"pretest\": \"npm run compile\",\r\n    \"lint\": \"eslint src --ext ts\",\r\n    \"package\": \"vsce package\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@types/vscode\": \"^1.85.0\",\r\n    \"@types/node\": \"20.x\",\r\n    \"@vscode/vsce\": \"^3.9.2\",\r\n    \"typescript\": \"^5.3.0\"\r\n  }\r\n}\n\n<!-- File: tools/WinGetLogViewer/syntaxes/winget-log.tmLanguage.json (Tokens: ~702 | Category: anthropic-skill) -->\n{\n  \"$schema\": \"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json\",\n  \"name\": \"WinGet Log\",\n  \"scopeName\": \"text.winget-log\",\n  \"patterns\": [\n    { \"include\": \"#logLine\" }\n  ],\n  \"repository\": {\n    \"logLine\": {\n      \"comment\": \"Full log line: TIMESTAMP [<L>] [CHAN] [SUBCHAN] message\",\n      \"match\": \"^(\\\\d{2,4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{3})\\\\s+(?:(<[VIWEC]>)\\\\s+)?(\\\\[(FAIL|CLI |SQL |REPO|YAML|CORE|TEST|CONF|WORK)\\\\s*\\\\])(\\\\s+\\\\[([A-Z]{2,8})\\\\s*\\\\])?(.*)$\",\n      \"captures\": {\n        \"1\": { \"name\": \"constant.numeric.timestamp.winget-log\" },\n        \"2\": { \"name\": \"keyword.operator.level-marker.winget-log\" },\n        \"3\": { \"patterns\": [{ \"include\": \"#channelBadge\" }] },\n        \"6\": { \"name\": \"entity.name.type.subchannel.winget-log\" },\n        \"7\": { \"patterns\": [{ \"include\": \"#messageText\" }] }\n      }\n    },\n    \"channelBadge\": {\n      \"patterns\": [\n        { \"match\": \"\\\\[FAIL\\\\s*\\\\]\", \"name\": \"invalid.illegal.channel.fail.winget-log\" },\n        { \"match\": \"\\\\[CLI\\\\s*\\\\]\",  \"name\": \"support.function.channel.cli.winget-log\" },\n        { \"match\": \"\\\\[SQL\\\\s*\\\\]\",  \"name\": \"entity.name.function.channel.sql.winget-log\" },\n        { \"match\": \"\\\\[REPO\\\\s*\\\\]\", \"name\": \"support.class.channel.repo.winget-log\" },\n        { \"match\": \"\\\\[YAML\\\\s*\\\\]\", \"name\": \"constant.language.channel.yaml.winget-log\" },\n        { \"match\": \"\\\\[CORE\\\\s*\\\\]\", \"name\": \"comment.channel.core.winget-log\" },\n        { \"match\": \"\\\\[TEST\\\\s*\\\\]\", \"name\": \"markup.inserted.channel.test.winget-log\" },\n        { \"match\": \"\\\\[CONF\\\\s*\\\\]\", \"name\": \"keyword.control.channel.conf.winget-log\" },\n        { \"match\": \"\\\\[WORK\\\\s*\\\\]\", \"name\": \"variable.parameter.channel.work.winget-log\" }\n      ]\n    },\n    \"messageText\": {\n      \"patterns\": [\n        { \"match\": \"\\\\b(Error|Fail(ed|ure)?|Exception|HRESULT|0x[0-9a-fA-F]+)\\\\b\", \"name\": \"invalid.illegal.error-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Warn(ing)?|Deprecated)\\\\b\", \"name\": \"support.type.warning-keyword.winget-log\" },\n        { \"match\": \"\\\\b(Verbose|Trace|Debug)\\\\b\", \"name\": \"comment.verbose-keyword.winget-log\" }\n      ]\n    }\n  }\n}\n\n<!-- File: tools/WinGetLogViewer/tsconfig.json (Tokens: ~102 | Category: anthropic-skill) -->\n{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"target\": \"ES2020\",\n    \"lib\": [\"ES2020\"],\n    \"outDir\": \"./out\",\n    \"rootDir\": \"./src\",\n    \"sourceMap\": true,\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src/**/*.ts\"],\n  \"exclude\": [\"node_modules\", \".vscode-test\"]\n}\n\n<!-- File: .github/copilot-instructions.md (Tokens: ~1829 | Category: copilot-instructions) -->\n# WinGet CLI Development Guide\r\n\r\n## Project Overview\r\n\r\nThis is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of:\r\n\r\n- **C++/WinRT client** (`src/AppInstallerCLI*`) - The main CLI and core logic\r\n- **COM API** (`src/Microsoft.Management.Deployment`) - Public Windows Runtime API for programmatic access\r\n- **PowerShell modules** (`src/PowerShell`) - Microsoft.WinGet.Client and Microsoft.WinGet.Configuration cmdlets\r\n- **Configuration system** - DSC-based system configuration using WinGet\r\n\r\n## Building, Testing, and Running\r\n\r\n### Initial Setup\r\n\r\nUse a configuration file in `.config` as in `winget configure .config/configuration.winget` (alternatives provided for other VS SKUs).\r\n\r\nManual steps:\r\n\r\n1. Install Visual Studio 2022 with required workloads (see `.vsconfig`)\r\n2. Install Windows SDK 10.0.26100: `winget install Microsoft.WindowsSDK.10.0.26100`\r\n3. Enable developer mode in Windows\r\n4. Run `vcpkg integrate install` from Developer Command Prompt\r\n\r\n### Building\r\n\r\nOpen `src\\AppInstallerCLI.sln` in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line.\r\n\r\nThe solution uses:\r\n- MSBuild\r\n- vcpkg for C++ dependencies\r\n- NuGet for C++ and .NET dependencies\r\n\r\nCI uses `/p:PreferredToolArchitecture=x64` to avoid 32-bit linker memory limits without changing the target architecture. Use the same setting for command-line Release builds.\r\n\r\n### Running/Debugging\r\n\r\n1. Deploy solution: Build > Deploy Solution\r\n2. Run from command line: `wingetdev`\r\n3. For debugging:\r\n   - Right-click `AppInstallerCLIPackage` > Properties > Debug tab\r\n   - Set Debugger type to \"Native Only\" for both Application and Background task processes\r\n   - Select \"Do not launch, but debug my code when it starts\"\r\n   - Press F5 and run `wingetdev` in a separate terminal\r\n\r\nEntry point: `src/AppInstallerCLI/main.cpp`\r\n\r\n### Testing\r\n\r\n#### C++ Unit Tests (Catch2)\r\nLocated in `AppInstallerCLITests` project. After building:\r\n\r\n```powershell\r\n# Run all tests\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe\r\n\r\n# Run specific test\r\nsrc\\<ARCH>\\<Debug|Release>\\AppInstallerCLITests\\AppInstallerCLITests.exe TestName\r\n\r\n# Available options\r\nAppInstallerCLITests.exe --help\r\n```\r\n\r\n#### .NET Tests\r\n- `Microsoft.WinGet.UnitTests` - PowerShell module tests\r\n- `Microsoft.Management.Configuration.UnitTests` - Configuration system tests\r\n- `WinGetUtilInterop.UnitTests` - Interop layer tests\r\n\r\n#### E2E Tests\r\n`AppInstallerCLIE2ETests` project contains end-to-end integration tests.\r\n\r\n## Architecture\r\n\r\n### Core Components\r\n\r\n**AppInstallerCLICore** - Core CLI logic organized around:\r\n- **ExecutionContext**: State container that flows through workflows. Contains arguments, reporter, flags, and data (ExecutionContextData.h)\r\n- **Workflows**: Composable functions that take ExecutionContext and perform operations (e.g., InstallFlow, UpdateFlow, SearchFlow)\r\n- **Commands**: Parse arguments and orchestrate workflows\r\n- **Reporter**: Handles all user output (ExecutionReporter.h)\r\n\r\n**AppInstallerRepositoryCore** - Package source abstraction:\r\n- Interfaces for different source types (REST, SQLite index, Microsoft Store, composite)\r\n- Search, match, and correlation logic\r\n- Package version selection and dependencies\r\n\r\n**AppInstallerCommonCore** - Shared utilities:\r\n- Manifest parsing (YAML/JSON)\r\n- Settings and group policy\r\n- Telemetry and logging\r\n- HTTP client, downloader, archive handling\r\n\r\n**Microsoft.Management.Deployment** - COM API surface:\r\n- IDL definitions in `PackageManager.idl`\r\n- WinRT projections for external consumption\r\n- Used by PowerShell modules and third-party integrations\r\n\r\n**AppInstallerCLIPackage** - Dev MSIX package definition:\r\n- Models the release package definition as closely as possible.\r\n- Contains localized string resources at src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw\r\n\r\n### Key Patterns\r\n\r\n**Workflow Pattern**: Functions that operate on ExecutionContext:\r\n```cpp\r\nvoid WorkflowTask(Execution::Context& context)\r\n{\r\n    // Check if already terminated\r\n    AICLI_RETURN_IF_TERMINATED(context);\r\n\r\n    // Access data\r\n    auto& data = context.Get<Data::Installer>();\r\n\r\n    // Report to user\r\n    context.Reporter.Info() << \"Doing something\";\r\n\r\n    // Store data for next workflow\r\n    context.Add<Data::SomeResult>(result);\r\n\r\n    // Terminate on error\r\n    if (failed)\r\n    {\r\n        AICLI_TERMINATE_CONTEXT(HRESULT);\r\n    }\r\n}\r\n```\r\n\r\n**Source Composition**: Multiple package sources can be composed:\r\n- CompositeSource combines multiple sources with conflict resolution\r\n- Installed source tracks locally installed packages\r\n- Available sources provide packages to install\r\n\r\n**Manifest Schema**: Package manifests use versioned YAML schemas:\r\n- Schema definitions in `schemas/JSON/manifests/`\r\n- Parsing in `AppInstallerCommonCore/Manifest/`\r\n- Multi-file manifests: installer, locale, version, defaultLocale\r\n\r\n## Naming Conventions\r\n\r\n- **Namespace structure**: `AppInstaller::<Area>[::<Subarea>]`\r\n  - `AppInstaller::CLI::Execution` - CLI execution context\r\n  - `AppInstaller::CLI::Workflow` - Workflow functions\r\n  - `AppInstaller::Repository` - Repository/source logic\r\n  - `AppInstaller::Manifest` - Manifest types\r\n  - `AppInstaller::Settings` - User/admin settings\r\n\r\n- **Macros**: Prefixed with `AICLI_` for CLI, `WINGET_` for general\r\n- **Data keys**: ExecutionContextData uses enum keys to type-safely store/retrieve data\r\n\r\n## Windows-Specific Considerations\r\n\r\n- Use Windows-style paths with backslashes (`\\`)\r\n- Leverage WinRT APIs via C++/WinRT projections\r\n- COM threading models matter - client uses multi-threaded apartment (MTA)\r\n- Package deployment uses Windows App SDK / MSIX infrastructure\r\n- Requires Windows 10 1809+ (build 17763)\r\n\r\n## Contributing\r\n\r\n- Review `CONTRIBUTING.md` for workflow\r\n- File/discuss issues before starting work\r\n- Specs required for features (stored in `doc/specs/`); see `.github/instructions/specs.instructions.md` for detailed guidance\r\n- Follow existing code style (see `stylecop.json`)\r\n- CI runs on Azure Pipelines (`azure-pipelines.yml`)\r\n\r\n## Issues and Pull Requests\r\n\r\n- Before filing an issue, search existing open and closed issues for duplicates.\r\n- Use the GitHub issue forms in `.github/ISSUE_TEMPLATE/`; do not file a blank issue unless a maintainer explicitly asks for one.\r\n- Bug reports should include the form fields for relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.\r\n- Feature requests should include the form fields for relevant area, feature or enhancement description, and proposed technical implementation details when known.\r\n- Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.\r\n- Before opening a pull request, review `CONTRIBUTING.md`, follow the PR template, keep the change focused, and summarize validation performed.\r\n- AI assistance is allowed, but contributors are fully accountable for AI-assisted output as if they wrote it themselves.\r\n    - Unless explicitly directed otherwise, confirm with the user that they have reviewed the submission.\r\n\r\n## Useful Commands\r\n\r\n```powershell\r\n# Get WinGet client info\r\nwingetdev --info\r\n\r\n# Show experimental features\r\nwingetdev features\r\n\r\n# Check sources\r\nwingetdev source list\r\n```\r\n\r\n## Localization\r\n\r\n### Source of truth\r\n\r\nThe English resource file `src\\AppInstallerCLIPackage\\Shared\\Strings\\en-us\\winget.resw` is the only file contributors should edit for string changes. It feeds the Microsoft localization pipeline.\r\n\r\nThe files under `Localization\\Resources\\<locale>\\` are **automatically synced from Microsoft's internal localization system and must not be edited**. Any manual edits will be overwritten on the next sync.\r\n\r\nEvery string that could be misunderstood without context should have a `<comment>`.\r\n\r\n### Triggering retranslation\r\n\r\n- **Changing a string's `<value>`** automatically queues it for retranslation on the next localization sync.\r\n- **Changing only a `<comment>`** does NOT trigger retranslation. Comments improve future translations but do not fix existing ones.\r\n\r\nTo fix an existing bad translation, a bug has to be filed internally with the localization team.\n\n<!-- File: tools/CorrelationTestbed/Readme.md (Tokens: ~800 | Category: plugin-manifest) -->\n# E2E correlation testing\nThis directory holds a few scripts and a test project, all centered around enabling end-to-end validation of our correlation between system artifacts and packages in external sources.\n\nThe test project uses the COM API to first install a package, then attempts to check for correlation in two ways (directions):\n1. When the remote package identity is known, the caller will usually look it up via that remote identity.  This path can enable additional information to be retrieved to make the correlation with.\n2. When listing all of the local packages, the remote identity must be determined for each one. We can use only data known locally to make the correlation.\n\nThe primary script, `Test-CorrelationInSandbox.ps1`, is based off of the sandbox test script in winget-pkgs (thanks to many people).  It sets up the sandbox and initial script to run there for each package to test, then waits for a sentinel file to be created in the output location.  The results of all of running the test project exe, as well as the ARP differences and winget logs are put in that output location, then the sandbox is destroyed for the next package to run.\n\n```\nTest-CorrelationInSandbox.ps1\n-- Required --\n[[-PackageIdentifiers] <string[]>] :: A set of package ids to test\n[[-Source] <string>] :: The name of the source that the packages are from, ex. \"winget\"\n\n-- Optional --\n[-ExePath <string>] :: Path to the test exe; defaults to the Release output location\n[-UseDev] :: Switch to use the local dev winget build\n[-DevPackagePath <string>] :: Path to the local dev *Release* winget build; defaults to the normal location\n[-ResultsPath <string>] :: Path to output the results to; defaults to a temp directory\n[-RegFileDirectory <string>] :: Path to a directory containing .reg files to insert before the test, creating noise for correlation\n[-MetadataCollection] :: Switch to enable collection of metadata\n[-WingetUtilPath <string>] :: Path to the WinGetUtil.dll to use; defaults to Debug build location\n```\n\nOnce testing is done, `Process-CorrelationResults.ps1` will take all of the results JSON files and put them into `results.csv` in the directory.  If any tests failed to run, they will be in `failed.csv`.  There are correlation columns in the CSV that can be averaged in Excel to get the correlation percentage.\n\n## Running a test\n### Setup\nFirst you must have built the test exe located in `InstallAndCheckCorrelation`. By default the Release x64 version is picked up by the script, so it is easiest to build that one.\n\nIf you want to run against the local dev build of the winget COM server, the default is again to use Release x64.  The sandbox will not run the debug build for unknown reasons currently.\n\n### Run the test pass\nRun the `Test-CorrelationInSandbox.ps1` script, then wait for a while since it is going to download and install every package serially, with a little bit of overhead in between.\n\nA simple example call is:\n```\nTest-CorrelationInSandbox.ps1 -PackageIdentifiers @(\"Microsoft.VisualStudioCode\") -Source winget\n```\nThis will use the latest version of winget available on github.  Adding `-UseDev` should be enough to use the local build instead if Release x64 is already deployed onto the host machine.\n\n### Collate the results\nRunning `Process-CorrelationResults.ps1` on the directory output at the end of `Test-CorrelationInSandbox.ps1` will place a CSV file with the results combined together.  These results can be inspected for correctness and an overall correlation score determined from the different correlation paths.\n\n<!-- File: tools/WinGetLogViewer/README.md (Tokens: ~873 | Category: plugin-manifest) -->\n# WinGet Log Viewer\n\nA VS Code extension that makes reading WinGet diagnostic log files fast and pleasant.\n\n## Features\n\n### Rich log viewer (WebView editor)\nOpens automatically for `WinGet-*.log` and `WinGetCOM-*.log` files. Use the **\"Open in WinGet Log Viewer\"** command (or right-click any `.log` file in the Explorer) to open any log file in the viewer.\n\n**Channel color badges** — each of the nine WinGet channels gets a distinct color:\n\n| Channel | Description |\n|---------|-------------|\n| ❤️ `FAIL` | Failures / exceptions |\n| 💙 `CLI`  | CLI command handling |\n| 💜 `SQL`  | SQLite / index operations |\n| 🩵 `REPO` | Repository / source operations |\n| 💛 `YAML` | YAML manifest parsing |\n| 🤍 `CORE` | Core runtime |\n| 💚 `TEST` | Test infrastructure |\n| 🩶 `CONF` | Configuration / DSC |\n| 🧡 `WORK` | Workflow execution |\n\n**Subchannel detection** — when a sub-component routes its log lines through a parent channel, the original `[CHAN]` tag appears at the start of the message. The viewer detects this and renders it as a secondary subchannel badge.\n\n**Dynamic filters** — toggle individual channels and subchannels on/off with checkboxes. Use \"All\" / \"None\" quick links per section.\n\n**Quick text search** — type in the Search box to live-filter visible lines.\n\n**Severity highlighting** — rows that contain error/warning keywords get a colored left border and message highlighting.\n\n**Time delta** — enable \"Show time delta\" to see the elapsed time between consecutive visible lines (`+Xms` / `+Xs`). Great for spotting slow operations.\n\n**Jump to error** — use the ↑ Error / ↓ Error buttons to navigate between error and critical log lines.\n\n**Follow mode** — enable \"Follow (live tail)\" to auto-scroll as the log file grows on disk. New line count is shown briefly in the status bar.\n\n**Export filtered** — \"Copy visible lines\" sends all currently visible (filtered) raw log lines to the clipboard.\n\n**Wrap long lines** — enable \"Wrap long lines\" to prevent horizontal scrolling on very long messages.\n\n### Syntax highlighting (standard editor)\nWhen a WinGet log file is opened in VS Code's standard text editor, the TextMate grammar provides coloring for timestamps, channel badges, subchannels, and error/warning keywords — no additional setup required.\n\n## Log format\n\n```\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] message\nYYYY-MM-DD HH:MM:SS.mmm <L> [CHAN] [SUBCHAN] message    ← subchannel variant\n```\n\nWhere `<L>` is an optional single-letter severity marker: `V`=Verbose, `I`=Info, `W`=Warning, `E`=Error, `C`=Critical. Older log files without the marker are also supported.\n\n## Development\n\n### Prerequisites\n- Node.js 18+\n- VS Code 1.85+\n\n### Build\n\n```bash\ncd tools/WinGetLogViewer\nnpm install\nnpm run compile\n```\n\n### Run / Debug\n\n1. Open `tools/WinGetLogViewer/` as a workspace in VS Code.\n2. Press **F5** — this launches the Extension Development Host.\n3. Open any `WinGet-*.log` or `WinGetCOM-*.log` file; the viewer opens automatically.\n\n### Package\n\n```bash\nnpm run package\n```\n\nThis produces `winget-log-viewer-<version>.vsix`. Install it via **Extensions: Install from VSIX…** or:\n\n```bash\ncode --install-extension winget-log-viewer-0.1.0.vsix\n```\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| **Ctrl+F** (in viewer) | Focus the search box |\n\n## Roadmap / ideas\n\n- Per-session filter presets (save/restore named filter combinations)\n- Fold/collapse groups of lines by channel\n- Correlation ID linking (when GUIDs appear in messages)\n</yakaai_skills>"}