Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion dist/commands/installer-hosts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commands/installer-hosts.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion dist/commitlore.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions installer/canonical-artifact.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"tsconfig.json",
"src"
],
"sha256": "1d11f0bdafe983a545bf070830f32f1afcf6b437a7d154e6413f73651293fb75"
"sha256": "364e3a605e5bb03ee036ab86cadbc9e6200c7d7e11c089c3d6d9e6e502ca20b5"
},
"artifact": {
"sha256": "997d93d4667f50c81db815da8f0a0858cd5f63752d1cd1bbb9e3a2464fffc433",
"sha256": "2e853534b045f2a421ab6e87c65e840ce5fa7fbf09ad84af655acbeff9f2f8a0",
"files": [
{
"path": "dist/cli.d.ts",
Expand Down Expand Up @@ -470,11 +470,11 @@
},
{
"path": "dist/commands/installer-hosts.js",
"sha256": "7861b16a068b507213a73c46c2f3b78cacd0e2de43870d74c38b28d826744707"
"sha256": "d3c1f45c65979b97b91459b6d26ad5050d4ce5a7fd09088a24a139d9e7b75cae"
},
{
"path": "dist/commands/installer-hosts.js.map",
"sha256": "65094d7209b453bb3553024aa3681531ccb845f57b57605078ae3a6b661adb8b"
"sha256": "152ccd3a597ea139249897719054eb110788f82025490b89ca8cbd947ae49c63"
},
{
"path": "dist/commands/mcp.d.ts",
Expand Down Expand Up @@ -586,7 +586,7 @@
},
{
"path": "dist/commitlore.mjs",
"sha256": "7dc734bebd046ff5e30277d17807673107fba5254637113772ab834dd9d98b15"
"sha256": "8691137a115d0e25304b5e6db6319f8c89ff2336caecedea8d784cbdad34f19d"
},
{
"path": "dist/core/agent-configs.d.ts",
Expand Down
29 changes: 28 additions & 1 deletion src/commands/installer-hosts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,39 @@ const claudePluginHost = (): HostResult => {
: { host, requested: true, outcome: 'failed', healthy: false, detail: 'claude plugin install failed — run manually: claude plugin marketplace update commitlore && claude plugin install commitlore@commitlore' };
};

/**
* The Codex plugin layer, which the MCP registration does not cover (#697).
*
* `install.ps1` ran `plugin install-codex`; `install.sh` carried the same step
* behind a function nothing called, so Windows installed the plugin and macOS
* and Linux did not. The shell's dead copy was what made them look alike, and a
* test asserting the string was present in both files passed on presence rather
* than reachability.
*
* Putting it here rather than back in either shell is what makes the two agree
* by construction: both installers delegate host wiring to this command, which
* is why the shell block was dead in the first place. The Claude plugin is
* handled the same way, for the same reason.
*
* Reported beside the MCP result rather than folded into it — the registration
* can be healthy while the plugin is not, and saying so is the difference
* between a host that works and one that was asked to.
*/
const codexPluginOutcome = (wrapper: string): string => {
const result = spawnSync(wrapper, ['plugin', 'install-codex'], { stdio: 'ignore', shell: false, timeout: 60_000 });
return result.status === 0 ? 'plugin installed' : 'plugin step failed — run: commitlore plugin install-codex';
};

export const inspectAndApplyHosts = async (options: Options): Promise<HostSummary> => {
const requested: Array<Promise<HostResult>> = [];
const notDetected: string[] = [];
const home = options.home;
if (hasCommand('codex')) {
requested.push(cliHost('codex', options.wrapper));
requested.push(
cliHost('codex', options.wrapper).then((result) =>
result.healthy ? { ...result, detail: `${result.detail}; ${codexPluginOutcome(options.wrapper)}` } : result,
),
);
} else if (existsSync(join(home, '.codex'))) {
requested.push(tomlHost(join(home, '.codex', 'config.toml'), options.wrapper));
} else notDetected.push('codex');
Expand Down
Loading