Repository navigation
Commit ba7228e
committed
feat: build one Agent Plugins package for several clients
The codex target builds an Agent Plugins package with one client profile
and one marketplace, and the agent-plugins target builds packages with
none. Codex, Copilot, VS Code and Cursor all read the format, so a plugin
built once can serve them all, given each client's marketplace file and
client-only files.
Add `clients` to the agent-plugins target (DEVPLAT-1558, ADR 0002):
- `clients: { codex: {}, copilot: {} }` writes each client's marketplace:
Codex .agents/plugins/marketplace.json, Copilot
.github/plugin/marketplace.json. `clients.<client>.manifest` and
`plugins.<name>.clients.<client>.entry` are deep-merged into them. The
shared `entry` and target `manifest` are config errors on agent-plugins
that name the client-scoped field instead.
- Client-only kinds a listed client loads are selected by default and
written to its extension directory: Copilot agents go to
com.github.copilot/agents/, with .md, .markdown and .mdc renamed to
NAME.agent.md. Any other file in agents/, or two files that land on
the same path, fail the build.
- A client-only kind that no listed client loads stays a config error,
and the message names the client that would load it. A file of such a
kind that arrives another way, such as additionalFiles, fails the
build. Client names are checked strictly, a client set to undefined
counts as not listed, and `clients` is rejected on other targets.
- validate checks each client marketplace present: entries, including
structured local Codex sources, must point at a package whose
plugin.json has the same name. Copilot needs a marketplace owner, and
its agents need NAME.agent.md names and valid frontmatter.
- src/package-clients.ts holds each client's namespace, marketplace,
file placement and validation, with citations to the client docs.
- The engine gains two optional hooks, clientMarketplaces and placeFile.
Other targets don't set them, and Glean's claude, cursor and codex
output is byte-identical (191 files).
Verified end to end with the Glean plugin: Copilot CLI 1.0.100 and Codex
0.160.1 both install it from their marketplace in the same output.1 parent 9ca5066 commit ba7228e
13 files changed
Lines changed: 1407 additions & 78 deletions
File tree
- docs/adr
- skills/authoring-pluginpack-config
- src
- targets
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
78 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
0 commit comments