spec-first
Advanced tools
+1
-1
| { | ||
| "name": "spec-first", | ||
| "version": "1.11.1", | ||
| "version": "1.11.2", | ||
| "description": "AI Coding Harness for Claude Code and Codex — turns one-off AI coding chats into a repo-backed, verifiable engineering loop for spec-driven development. Scripts prepare facts; LLMs decide; evidence stays in your repo.", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
@@ -377,3 +377,3 @@ const fs = require('node:fs'); | ||
| function renderHooksJsonTemplate(projectRoot) { | ||
| const commandPath = path.join(projectRoot, SESSION_START_RELATIVE_PATH); | ||
| const commandPath = formatSessionStartCommand(projectRoot); | ||
| const managed = JSON.parse(fs.readFileSync(HOOKS_JSON_TEMPLATE_PATH, 'utf8').replace( | ||
@@ -530,4 +530,16 @@ JSON.stringify(SESSION_START_COMMAND_PLACEHOLDER), | ||
| function formatSessionStartCommand(projectRoot) { | ||
| return `bash ${shellQuote(normalizeSessionStartCommandPath(projectRoot))}`; | ||
| } | ||
| function normalizeSessionStartCommandPath(projectRoot) { | ||
| return path.join(projectRoot, SESSION_START_RELATIVE_PATH).replace(/\\/g, '/'); | ||
| } | ||
| function shellQuote(value) { | ||
| return `'${String(value).replace(/'/g, "'\\''")}'`; | ||
| } | ||
| function isManagedSessionStartEntry(entry, projectRoot) { | ||
| const expectedCommand = path.join(projectRoot, SESSION_START_RELATIVE_PATH); | ||
| const expectedCommand = formatSessionStartCommand(projectRoot); | ||
| return Boolean(entry && Array.isArray(entry.hooks) && entry.hooks.some((hook) => ( | ||
@@ -537,3 +549,6 @@ hook | ||
| && typeof hook.command === 'string' | ||
| && (hook.command === expectedCommand || hook.command.includes(SESSION_START_RELATIVE_PATH)) | ||
| && ( | ||
| hook.command === expectedCommand | ||
| || hook.command.replace(/\\/g, '/').includes(SESSION_START_RELATIVE_PATH) | ||
| ) | ||
| ))); | ||
@@ -543,3 +558,3 @@ } | ||
| function isCurrentManagedSessionStartEntry(entry, projectRoot) { | ||
| const expectedCommand = path.join(projectRoot, SESSION_START_RELATIVE_PATH); | ||
| const expectedCommand = formatSessionStartCommand(projectRoot); | ||
| return Boolean(entry && Array.isArray(entry.hooks) && entry.hooks.some((hook) => ( | ||
@@ -546,0 +561,0 @@ hook |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
4656389
0.01%40679
0.03%