CopilotAtelier.psd1
|
@{ RootModule = 'CopilotAtelier.psm1' # Replaced at build time by GitVersion. ModuleVersion = '6.2.0' GUID = '67bbef0b-f4de-4c1b-bb5a-b34104beb5b7' Author = 'raandree' CompanyName = 'raandree' Copyright = '(c) raandree. All rights reserved.' Description = 'Portable GitHub Copilot customization library. Ships custom agents, auto-applied instructions, on-demand skills, prompt templates, and lifecycle hooks, and installs them into the well-known ~/.copilot discovery folders that VS Code, the GitHub Copilot CLI, and Claude Code read.' PowerShellVersion = '5.1' FunctionsToExport = @('Export-CopilotAtelierContributorProfile','Get-CopilotAtelierClientAdapter','Get-CopilotAtelierContributorProfile','Get-CopilotAtelierFootprint','Get-CopilotAtelierProfile','Get-CopilotAtelierSkillHealth','Get-CopilotAtelierVersion','Import-CopilotAtelierContributorProfile','Install-CopilotAtelier','Remove-CopilotAtelierContributorProfile','Set-CopilotAtelierContributorProfile','Test-CopilotAtelier','Uninstall-CopilotAtelier','Update-CopilotAtelier') CmdletsToExport = @() VariablesToExport = @() AliasesToExport = @() PrivateData = @{ PSData = @{ Tags = @( 'Copilot' 'GitHubCopilot' 'VSCode' 'Agents' 'Skills' 'Prompts' 'Instructions' 'Hooks' 'AI' 'Windows' 'Linux' 'MacOS' ) LicenseUri = 'https://github.com/raandree/CopilotAtelier/blob/main/LICENSE' ProjectUri = 'https://github.com/raandree/CopilotAtelier' IconUri = 'https://raw.githubusercontent.com/raandree/CopilotAtelier/main/assets/CA-glyph-on-light.png' Prerelease = 'preview0006' ReleaseNotes = '## [6.2.0-preview0006] - 2026-11-15 ### Added - Bind the client adapter''s runtime claim to the file it was proven on. The model-free cases C1 to C3 of [docs/client-adapter-evals.md](docs/client-adapter-evals.md) ran offline on Windows: the composed `software-engineer` variant in Copilot CLI 1.0.96, and the source profile in the runtime that VS Code 1.146.0 bundles for agent-host chats (1.0.108-0). The client contract commits each run as a receipt that names the cases, the SHA-256 of the file they ran on, the runtime and its version, the date, and each outcome; a new run replaces the whole receipt. `Get-CopilotAtelierClientAdapter` now also returns `ArtifactSha256`, `VerifiedRuntime`, `VerifiedCase`, `RuntimeReceipt`, and `RuntimeReceiptStatus`, and reports `RuntimeVerified` only for passed cases that ran on a runtime, at the receipt''s version, and only while the file a client loads still has that SHA-256; after an edit to the file a client loads it falls back to `StructurallyChecked`: any edit of the profile for VS Code, and for the Copilot CLI an edit that changes the composed variant, which a model bump does not. The Copilot CLI variant passed C1 to C3. The source profile failed C1 and C2 on the agent-host runtime, which ignores `argument-hint`, `agents`, and `handoffs` and so offers delegation without the profile''s `agents:` allow-list; the VS Code client therefore stays `StructurallyChecked`. [tests/ClientAdapterRuntime.Tests.ps1](tests/ClientAdapterRuntime.Tests.ps1) runs the cases again and re-checks the receipts on a machine with VS Code and the CLI. ### Changed - Stop emitting `target: github-copilot` in the Copilot CLI variant of a Custom agent. Copilot CLI 1.0.96 ignores the field and warns that it does when it loads the file, which failed case C1, and VS Code''s local chat does not filter agents on it. - Say what a hook receives for a Skill load and a file edit, verified offline on Windows in the Copilot SDK runtime that VS Code bundles (1.0.108-0) and in Copilot CLI 1.0.96: a `PreToolUse` or `PostToolUse` hook sees a `skill` call with the Skill''s name in `tool_input.skill` but neither its file nor its body, sees the file tools as `Read`, `Edit`, and `Write` with the path exactly as the model wrote it, and a failed call runs `PostToolUseFailure` instead. The help of `Get-CopilotAtelierSkillHealth`, the `changed-file-validation` Skill, and the [hooks README](com.github.copilot/hooks/README.md#tool-call-input-for-skill-and-file-tools) now carry this contract and what stays unverified, such as VS Code Local chats. No collector is added: Skill use still enters the report only through `-ObservationPath`, because every record needs the SHA-256 of the Skill body, and changed files are still collected by hand. ### Fixed - Make case C2 of the client adapter fail closed on delegation. C2 counted the delegation the agent-host runtime offers the VS Code client as unbounded only while that runtime warned that it ignores `agents:`, so a run without that warning would have passed C2 while `task`, `list_agents`, `read_agent`, and `write_agent` could reach any agent, and a runtime that withholds delegation, the safe behaviour, failed the suite on a missing `task`. Now C2 fails while any delegation tool is offered to that client, whatever the runtime warns, until a case can show the bound; a runtime that withholds delegation passes it; the agent-host runtime has an allow-list of offered tools, as the Copilot CLI has; and the smoke suite accepts no load warning but the one it expects of a client, matched in full, where before, on the VS Code client, a warning of any other kind passed as long as the expected notice came too, as a warning of its own or before it in the same string. `Get-CopilotAtelierClientAdapter` now reports `RuntimeVerified` only while every case of the bound receipt passed, so a failed C2 withholds the claim that another passed case would raise: before, any passed runtime case raised it, and the VS Code client stayed `StructurallyChecked` only because C1 failed too. `VerifiedCase` still lists the cases that passed, and `RuntimeReceipt` each outcome. One function, `Get-ClientAdapterCaseVerdict` in `tests/Helpers/ClientAdapterCase.ps1`, decides C1 and C2: the suite applies it to each run on a runtime and, in process, to the observation that each committed receipt now records, so a receipt that records an outcome its own observation refutes fails on every system, CI included. The receipt in `RuntimeReceipt` gains `Observation`; both receipts keep their outcomes, so the Copilot CLI client stays `RuntimeVerified` and the VS Code client `StructurallyChecked`. [docs/client-adapter-evals.md](docs/client-adapter-evals.md) now also says that a model bump retires only the VS Code receipt, because the Copilot CLI variant emits no model. ### Security - Relay exception texts as printable ASCII in two more places that a model reads: the two lines the ledger appender service writes to standard error about a connection it dropped, and the four exception texts, the two closure details of the interpreter (the reasons of the access check), and the path of the interpreter that the `HookContract` check of the containment verifier puts into its evidence. Both scripts already held their refusals and the texts about a wrapper to that rule, but these texts passed as they came: an exception''s text is localized .NET text that often holds a path, a reason of the access check can carry one, and a quoted program path may hold a tab and be of any length, so a carriage return could forge a second line and a tag character could carry a word that nobody sees. They now keep printable ASCII only, write one question mark for any other character, and stop at 200 characters, or at 1,000 for the closure details together and for the path, marking the cut (S-20, V-05, and W-03 in [`docs/SECURITY-REVIEW.md`](docs/SECURITY-REVIEW.md)). The review of 2026-10-14 traced no client text to the appender''s two lines, so for them this is hardening, not the fix of a reproduced attack, and at least 26 other exception texts of the verifier still pass as they come, most of them into its evidence. New in-process tests of `Test-OrdinalEqual`, `Test-UtcInstant`, and `Test-Acknowledgement`, the three functions of the S-04 and S-05 fixes, and the existing case of a stored line with a field name that only a culture folds into another, which runs `-Validate` without a pipe, are no longer skipped off Windows; the pull request''s CI is their first run on Ubuntu and macOS. Both scripts change, so re-pin the `verifier` and `ledgerAppender` digests in every containment profile that pins them, and refresh the deployed copy with `./Setup-CopilotSettings.ps1`. - Make the ledger client refuse an acknowledgement that replays a record identical to one already stored. The client now counts the records in the ledger sink before it sends and believes only a sequence after them. Before, a server of the appender''s own account could answer a second, identical record with the sequence and digest of the first, and the client reported it stored, so the client could not prove how many times a record was stored (S-19 in [`docs/SECURITY-REVIEW.md`](docs/SECURITY-REVIEW.md)). A client that cannot count the records, for example because the last line is half written or the sink cannot be opened, refuses before it sends anything; only a sink that does not exist counts as holding none. The client already read the sink after every send, so a contained run reads nothing it did not read before. Two limits remain: a record identical to the client''s that another writer appends after the count and before the client reads the ledger back is still believed, and the client waits for the answer without a deadline; and the client still cannot prove that a record was not stored more often than it was sent. The appender changes, so re-pin the `ledgerAppender` digest in every containment profile that pins it, and refresh the deployed copy with `./Setup-CopilotSettings.ps1`. - Measure the places PowerShell loads modules from in the `WritableRoots` check of the containment verifier. pwsh puts the account''s own module folder ahead of every folder a launcher names, and the verifier''s later commands auto-load modules from it, but the check measured only its escape set (S-18 in [`docs/SECURITY-REVIEW.md`](docs/SECURITY-REVIEW.md)). It now also measures every folder of the verifier''s own `PSModulePath`, the `Modules` folder of `$PSHOME`, and the folders of the user''s and of `$PSHOME`''s `powershell.config.json`, with each file that exists, because a `PSModulePath` key in either file chooses a module folder of the next start, and on Windows the two module folders that Windows PowerShell 5.1 adds to its own path, `WindowsPowerShell\Modules` in the account''s documents folder and in the program files folder, or, when the documents folder does not exist, the relative `WindowsPowerShell\Modules` that 5.1 then searches in its working directory, which the check reports unmeasured. It fails when this identity can write one of them or replace it, even inside a declared root: on Windows when it holds `DELETE` on the place, which the kernel also grants through `FILE_DELETE_CHILD` on the folder that holds it, and elsewhere when it can write that folder. A deployment whose run identity can write or replace its own module folder, as an account normally can, now fails `WritableRoots`, and so does one that declares the identity''s profile or documents folder as a writable root, until it closes them; one whose run identity has no documents folder is now unmeasured. To pass, create the `PowerShell` and `WindowsPowerShell` folders in the account''s documents folder empty, a `Modules` folder in each, and an empty `powershell.config.json` in `PowerShell` to pin the configuration too, or have an administrator re-own an existing tree recursively; have an administrator own them, turn off the access they inherit from the profile, g' } } } |