From 0759cb473d73c546ffe43afd5c0275945b59ac8a Mon Sep 17 00:00:00 2001 From: Adam Hainsworth-Potter Date: Tue, 5 May 2026 08:21:04 +0100 Subject: [PATCH 1/2] Fix Propulsion hook plugin root path --- hooks/hooks.json | 4 +++- tests/codex-hook.test.js | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/hooks/hooks.json b/hooks/hooks.json index 1668310..ef959fa 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -6,7 +6,9 @@ "hooks": [ { "type": "command", - "command": "./hooks/run-hook.cmd session-start" + "command": "\"${CODEX_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start", + "timeout": 10, + "statusMessage": "Loading Propulsion workflow" } ] } diff --git a/tests/codex-hook.test.js b/tests/codex-hook.test.js index 09d74b8..ca70fab 100644 --- a/tests/codex-hook.test.js +++ b/tests/codex-hook.test.js @@ -17,7 +17,7 @@ describe('Codex Propulsion bootstrap guidance', () => { ); }); - test('registers a compact plugin-local session-start hook matcher', async () => { + test('registers a plugin-root session-start hook matcher', async () => { const config = await readJson('hooks/hooks.json'); expect(config.hooks.SessionStart).toEqual([ @@ -26,13 +26,42 @@ describe('Codex Propulsion bootstrap guidance', () => { hooks: [ { type: 'command', - command: './hooks/run-hook.cmd session-start', + command: + '"${CODEX_PLUGIN_ROOT}/hooks/run-hook.cmd" session-start', + timeout: 10, + statusMessage: 'Loading Propulsion workflow', }, ], }, ]); }); + test('runs configured hook command from outside the plugin cwd', async () => { + const config = await readJson('hooks/hooks.json'); + const command = config.hooks.SessionStart[0].hooks[0].command; + + const result = Bun.spawnSync({ + cmd: ['sh', '-c', command], + cwd: '/private/tmp', + env: { + ...process.env, + CODEX_PLUGIN_ROOT: process.cwd(), + }, + stdout: 'pipe', + stderr: 'pipe', + }); + + expect(result.exitCode).toBe(0); + + const output = new TextDecoder().decode(result.stdout).trim(); + const payload = JSON.parse(output); + + expect(payload.hookSpecificOutput).toEqual({ + hookEventName: 'SessionStart', + additionalContext: PROPULSION_BOOTSTRAP_GUIDANCE, + }); + }); + test('prints Codex SessionStart additional context as parseable JSON', async () => { const result = Bun.spawnSync({ cmd: ['./hooks/run-hook.cmd', 'session-start'], From 1852fbbb28c1c50dd87a9f83023c23671059ed39 Mon Sep 17 00:00:00 2001 From: Adam Hainsworth-Potter Date: Tue, 5 May 2026 09:22:31 +0100 Subject: [PATCH 2/2] Bump version --- .codex-plugin/plugin.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index e9fbdc2..166b797 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "propulsion", - "version": "1.0.3", + "version": "1.0.4", "description": "Opinionated agentic coding workflow that guides software work from exploration and planning through execution and review.", "author": { "name": "Moon Pixels" diff --git a/package.json b/package.json index e20b758..06e1d4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "propulsion", - "version": "1.0.3", + "version": "1.0.4", "main": "./index.mjs", "exports": "./index.mjs", "scripts": {