| 120 | 120 | | return { ...marketplace, plugins: marketplace.plugins.map((p) => ({ ...p, source: `./${PUBLISHED}` })) }; |
| 121 | 121 | | } |
| 122 | 122 | | |
| 123 | | − | export function readme(version) { |
| 123 | + | /** |
| 124 | + | * The oldest g1t CLI the plugin's hooks work with: the CLI contract's |
| 125 | + | * minimum_version, which the hooks' MIN_CLI keeps to. |
| 126 | + | */ |
| 127 | + | export function minimumCli(root = ROOT) { |
| 128 | + | return readJson(root, `${SOURCE}/test/cli-contract.json`).minimum_version; |
| 129 | + | } |
| 130 | + | |
| 131 | + | export function readme(version, cli = minimumCli()) { |
| 124 | 132 | | return `# g1t plugins |
| 125 | 133 | | |
| 126 | 134 | | g1t's plugin marketplace for Claude Code and Codex. Choose your client below. |
| ⋯ |
| 138 | 146 | | |
| 139 | 147 | | Then start Claude Code again, run \`/mcp\` and sign **plugin:g1t:g1t** in. |
| 140 | 148 | | The plugin's hooks need the [g1t CLI](https://docs.g1t.sh/guides/cli/) |
| 141 | | − | 0.3.2 or later and Node 18 or later. |
| 149 | + | ${cli} or later and Node 18 or later. |
| 142 | 150 | | |
| 143 | 151 | | The guide, with what each hook records and never records and how to opt |
| 144 | 152 | | out: https://docs.g1t.sh/guides/claude-code-plugin/ |
| ⋯ |
| 209 | 217 | | mkdirSync(join(out, ".agents/plugins"), { recursive: true }); |
| 210 | 218 | | writeFileSync(join(out, ".agents/plugins/marketplace.json"), JSON.stringify(codexMarketplace(), null, 2) + "\n"); |
| 211 | 219 | | for (const name of CODEX_FILES) cpSync(join(root, CODEX_SOURCE, name), join(out, CODEX_PUBLISHED, name), { recursive: true }); |
| 212 | | − | writeFileSync(join(out, "README.md"), readme(version) + ` |
| 220 | + | writeFileSync(join(out, "README.md"), readme(version, minimumCli(root)) + ` |
| 213 | 221 | | ## Codex |
| 214 | 222 | | |
| 215 | 223 | | Add this marketplace with: |