@@ -535,7 +535,7 @@ or removing a command fails until the table changes in the same commit.
535535| `toolchains.resolvePins` | Validate a captured local document and find the nearest ancestor directory pin, retaining dormant and legacy entries without probing or writing |
536536| `toolchains.editPins` | Apply one bounded batch of directory pin edits to a captured local document without writing native files |
537537| `toolchains.catalogState` | Validate machine-wide SDK registrations and optional workspace project-code trust without a project |
538- | `toolchains.editCatalog` | Merge confirmed machine-wide SDK registrations, defaults and explicit workspace project-code trust |
538+ | `toolchains.editCatalog` | Merge confirmed machine-wide SDK registrations, defaults, explicit workspace project-code trust and trusted location changes |
539539| `toolchains.pinStoragePlan` | Declare bounded workspace-native pin and ignore sources |
540540| `toolchains.decodePinDocument` | Validate a complete native source or supply the absent-source default |
541541| `toolchains.editPinSources` | Plan deterministic pin and Git ignore source edits without native I/O |
@@ -7758,27 +7758,41 @@ applies first, then a trusted location containing it: `state` is `trusted`, `dis
77587758`unknown` when the user has not been asked. `location` is the trusted location that trusts the
77597759workspace, else `null`. `offeredLocation` is the parent folder a trust prompt may offer to trust
77607760with the workspace, or `null` when that parent is a filesystem root (`/`, a drive, a UNC share).
7761+ A filesystem root is never a trusted location: a document listing one (no edit writes it) is
7762+ rejected at `trustedLocations`, so its workspaces stay in safe mode rather than every project
7763+ on the volume being trusted.
77617764The two newer lists are written only once used, so a document without them stays readable by
77627765hosts that predate them.
77637766Native clients resolve the relative path below their platform user-preference directory,
77647767never below a workspace, SDK, installed package or application bundle. Reading an absent
77657768source returns `{version:1,tools:{}}` and must not create a directory or file.
77667769
7767- `toolchains.editCatalog` accepts `{document:string|null,platform,filesystemCaseSensitive?,edits?,workspaceTrust?}`,
7768- where at least one of a nonempty `edits` array of `{tool,homes:[absoluteHome],defaultHome:string|null}`
7769- or `workspaceTrust:{workspace,trusted,location?}` is required. Each tool edit replaces only that tool's
7770+ `toolchains.editCatalog` accepts `{document:string|null,platform,filesystemCaseSensitive?,edits?,workspaceTrust?,trustedLocations?}`,
7771+ where at least one of a nonempty `edits` array of `{tool,homes:[absoluteHome],defaultHome:string|null}`,
7772+ `workspaceTrust:{workspace,trusted,location?}` or `trustedLocations:{add?:[absolutePath],remove?:[absolutePath]}`
7773+ is required. Each tool edit replaces only that tool's
77707774registrations and default; other tools, dormant plugins and the trust lists remain intact.
77717775`workspaceTrust` records one decision on one normalized workspace root, preserving `tools` and
77727776other decisions: `trusted: true` moves it to `trustedWorkspaces`, `trusted: false` to
77737777`distrustedWorkspaces` (safe mode), and `location: true` also adds its `offeredLocation` to
77747778`trustedLocations`; `location` with `trusted: false`, or without an offered location, rejects at
7775- `workspaceTrust.location`. At most
7779+ `workspaceTrust.location`.
7780+ `trustedLocations` changes the trusted folders on their own, for a settings page without an
7781+ open workspace, and applies after `workspaceTrust` when both are present. Paths are normalized
7782+ and matched by platform case identity: `remove` drops each named folder, a folder that is not
7783+ trusted changes nothing, and `add` keeps the recorded spelling of a folder already trusted.
7784+ `add` and `remove` cannot both be empty or name one folder. Adding a filesystem root (`/`, a
7785+ drive, a UNC share) rejects with `plugin.toolchain.rootLocation` at `trustedLocations.add`.
7786+ Workspace decisions are untouched: a workspace kept in safe mode stays there inside a newly
7787+ trusted location.
7788+ An edit that would leave `trustedWorkspaces`, `distrustedWorkspaces` or `trustedLocations`
7789+ longer than 256 entries rejects with `plugin.toolchain.trustListFull` at that list's name. At most
7776779064 tools and 32 distinct homes per tool are accepted. Native platform path normalization
77777791and case identity apply before deduplication. A selected default is registered if needed;
77787792null clears only the default. Empty registrations plus null remove the tool entry.
77797793The result is `{status:"ok",edit:{changed,document:string|null,catalog}}`; unchanged edits
77807794return a null replacement and must not create a source. Invalid shapes, duplicate JSON keys,
7781- unknown fields, relative homes, aliases and oversized documents reject with
7795+ unknown fields, relative homes or paths , aliases and oversized documents reject with
77827796`plugin.toolchain.invalidDocument`. The schema is
77837797[`toolchain-global-v1.schema.json`](toolchain-global-v1.schema.json); cross-client vectors
77847798are in `rust/fixtures/toolchain-global-catalog.json`.
0 commit comments