Skip to content

Add client plugin customizations to automations - #474

Merged
Connor Peet (connor4312) merged 1 commit into
mainfrom
connor4312/automation-customizations
Oct 1, 2026
Merged

Connor Peet (connor4312) merged 1 commit into
mainfrom
connor4312/automation-customizations

Conversation

@connor4312

Copy link
Copy Markdown
Member

Automations usually run when no client is connected, so there's no active client to supply plugins. A user can set up an automation on a machine with their plugins installed, but later runs can't use those skills, agents, prompts, or rules. This PR lets an automation carry its own copies of client plugins. Client tools are out of scope.

Protocol changes

  • AutomationSessionTemplate.customizations?: ClientPluginCustomization[]: the client plugins each run should get, in the same shape clients publish in activeClients[].customizations.
  • The host copies plugins when the automation is saved. On automation/createRequested or automation/updateRequested, the host copies every entry that is new or whose uri or nonce changed, reading virtual://… contents from the dispatching client with the existing server→client resource* requests. If any copy fails, the whole action is rejected.
  • Unchanged entries keep their existing copy. Entries with the same id, uri, and nonce aren't re-copied, so a client that can't serve a plugin can still edit the rest of the definition by sending back the template it received.
  • AutomationEntry.customizations?: PluginCustomization[]: the host-owned copies, matched to template entries by id. Each has a host uri clients can browse, plus children and load. Every run session receives them in SessionState.customizations with no clientId.
  • Copies belong to one automation. Hosts may store identical copies (same uri and nonce) once and share them, which clients can't observe. Copies are never refreshed automatically: a client sends a new nonce to pick up local changes, so unattended runs use exactly what the user saved.
  • AutomationCapabilities.customizations: {}: capability hosts advertise to show they support this.
  • No reducer changes, because automation/set already carries the full entry.

Rust generator fix

The new round-trip fixture showed that Rust dropped "type": "plugin" when serializing a plugin outside the Customization union. This already affected activeClients[].customizations today. ClientPluginCustomization now keeps its type field, and AutomationEntry.customizations gets a serde helper (following the existing running-tool-call helper) that puts it back. This PR includes a Rust-only fix changelog fragment for it.

Other changes

  • Documentation: added a Customizations section with a sequence diagram to docs/guide/automations.md, and updated the action docs.
  • Fixtures: new round-trip fixture 050-automation-customizations-snapshot.json, and 043-automation-capabilities.json now includes the new capability.
  • Changelog fragments for both changes.

Validation

  • npm run generate and npm run test pass (451 tests, 100% branch coverage on types/reducers.ts).
  • Go, Rust (tests and clippy), Swift, and Kotlin client suites pass, including the new fixture.
  • .NET: 549 of 550 pass. The one failure is RealSocketTypeScriptConformanceTests, which couldn't start node inside the .NET container, so it's an environment issue rather than this change.

Automations run when no client is connected, so client-published plugins
(skills, agents, prompts, rules) were unavailable to runs.
`AutomationSessionTemplate.customizations` now lists client plugins that
the host captures from the dispatching client when the definition is
saved; `AutomationEntry.customizations` reports the host-owned copies that
every run session receives. Support is advertised by
`AutomationCapabilities.customizations`.

Also fixes the Rust generator dropping the `"type": "plugin"`
discriminant on standalone plugin lists (`ClientPluginCustomization` and
`AutomationEntry.customizations`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) force-pushed the connor4312/automation-customizations branch from 0d9ec38 to dad81ed Compare September 30, 2026 21:03
Connor Peet (connor4312) added a commit to microsoft/vscode that referenced this pull request Sep 30, 2026
Syncs microsoft/agent-host-protocol#474 (rebased onto c02ad7ef) which adds
AutomationSessionTemplate.customizations, AutomationEntry.customizations and
the automations.customizations capability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312
Connor Peet (connor4312) marked this pull request as ready for review September 30, 2026 21:22
@connor4312
Connor Peet (connor4312) force-pushed the connor4312/automation-customizations branch 2 times, most recently from e9dacb4 to 0d9ec38 Compare October 1, 2026 16:52
@connor4312
Connor Peet (connor4312) merged commit 9f94039 into main Oct 1, 2026
16 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/automation-customizations branch October 1, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants