throughline 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@ shipped to npm but were not individually tagged on GitHub.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.8.2] — 2026-07-20
14
+
15
+ ### Fixed
16
+
17
+ - Windows native Codex hook commands now prefix quoted Node executables with the
18
+ PowerShell call operator `&`. POSIX command strings are unchanged, and the
19
+ existing managed-hook detector continues to recognize the canonical commands.
20
+
21
+ ## [0.8.1] — 2026-07-19
22
+
13
23
  ### Fixed
14
24
 
15
25
  - **Native factory diagnostics now report the database compatibility label from
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "throughline",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "description": "Claude Code hooks plugin for structured context compression (/clear-safe persistent memory)",
6
6
  "keywords": [
@@ -101,22 +101,30 @@ export function resolveCodexHookNodePath({
101
101
  export function buildCodexStopHookCommand({
102
102
  nodePath = resolveCodexHookNodePath(),
103
103
  cliScriptPath = join(PACKAGE_ROOT, 'bin', 'throughline.mjs'),
104
+ platform = process.platform,
104
105
  } = {}) {
105
- return `${quoteCommandPath(nodePath)} ${quoteCommandPath(cliScriptPath)} codex-hook stop`;
106
+ return buildCodexHookCommand('stop', { nodePath, cliScriptPath, platform });
106
107
  }
107
108
 
108
109
  export function buildCodexUserPromptSubmitHookCommand({
109
110
  nodePath = resolveCodexHookNodePath(),
110
111
  cliScriptPath = join(PACKAGE_ROOT, 'bin', 'throughline.mjs'),
112
+ platform = process.platform,
111
113
  } = {}) {
112
- return `${quoteCommandPath(nodePath)} ${quoteCommandPath(cliScriptPath)} codex-hook user-prompt-submit`;
114
+ return buildCodexHookCommand('user-prompt-submit', { nodePath, cliScriptPath, platform });
113
115
  }
114
116
 
115
117
  export function buildCodexPostToolUseHookCommand({
116
118
  nodePath = resolveCodexHookNodePath(),
117
119
  cliScriptPath = join(PACKAGE_ROOT, 'bin', 'throughline.mjs'),
120
+ platform = process.platform,
118
121
  } = {}) {
119
- return `${quoteCommandPath(nodePath)} ${quoteCommandPath(cliScriptPath)} codex-hook post-tool-use`;
122
+ return buildCodexHookCommand('post-tool-use', { nodePath, cliScriptPath, platform });
123
+ }
124
+
125
+ function buildCodexHookCommand(event, { nodePath, cliScriptPath, platform }) {
126
+ const prefix = platform === 'win32' ? '& ' : '';
127
+ return `${prefix}${quoteCommandPath(nodePath)} ${quoteCommandPath(cliScriptPath)} codex-hook ${event}`;
120
128
  }
121
129
 
122
130
  export function isThroughlineCodexHookCommand(command) {
@@ -8,6 +8,7 @@ import {
8
8
  buildCodexPostToolUseHookCommand,
9
9
  buildCodexStopHookCommand,
10
10
  buildCodexUserPromptSubmitHookCommand,
11
+ isThroughlineCodexHookCommand,
11
12
  resolveCodexHookNodePath,
12
13
  run,
13
14
  resolveThroughlineOnPath,
@@ -141,6 +142,27 @@ test('global install registers Codex session hooks and enables hooks features',
141
142
  }
142
143
  });
143
144
 
145
+ test('Codex hook builders use the PowerShell call operator on Windows only', () => {
146
+ const options = {
147
+ nodePath: String.raw`C:\Program Files\nodejs\node.exe`,
148
+ cliScriptPath: String.raw`C:\Users\Kite\App Data\Roaming\npm\node_modules\throughline\bin\throughline.mjs`,
149
+ };
150
+ assert.equal(
151
+ buildCodexStopHookCommand({ ...options, platform: 'win32' }),
152
+ String.raw`& "C:\Program Files\nodejs\node.exe" "C:\Users\Kite\App Data\Roaming\npm\node_modules\throughline\bin\throughline.mjs" codex-hook stop`,
153
+ );
154
+ assert.equal(
155
+ buildCodexUserPromptSubmitHookCommand({ ...options, platform: 'win32' }),
156
+ String.raw`& "C:\Program Files\nodejs\node.exe" "C:\Users\Kite\App Data\Roaming\npm\node_modules\throughline\bin\throughline.mjs" codex-hook user-prompt-submit`,
157
+ );
158
+ assert.equal(
159
+ buildCodexPostToolUseHookCommand({ ...options, platform: 'win32' }),
160
+ String.raw`& "C:\Program Files\nodejs\node.exe" "C:\Users\Kite\App Data\Roaming\npm\node_modules\throughline\bin\throughline.mjs" codex-hook post-tool-use`,
161
+ );
162
+ assert.equal(buildCodexStopHookCommand({ ...options, platform: 'linux' }).startsWith('& '), false);
163
+ assert.equal(isThroughlineCodexHookCommand(buildCodexStopHookCommand({ ...options, platform: 'win32' })), true);
164
+ });
165
+
144
166
  test('global install copies Throughline Codex skill to ~/.codex/skills/', async () => {
145
167
  const home = makeTempHome();
146
168
  if (home.resolved !== home.dir) {