@nitra/cursor 1.27.1 → 1.27.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
@@ -4,11 +4,22 @@
4
4
 
5
5
  Формат — [Keep a Changelog](https://keepachangelog.com/uk/1.1.0/), нумерація — [SemVer](https://semver.org/lang/uk/).
6
6
 
7
+ ## [1.27.2] - 2026-05-26
8
+
9
+ ### Changed
10
+
11
+ - **`package.json#dependencies`**: `@anthropic-ai/claude-code` (^1.0.0) → `@anthropic-ai/claude-agent-sdk` (^0.3.0). У claude-code v2.x пакет реструктуризовано в CLI-only (бінарі через optionalDependencies, без `sdk.mjs`); SDK з функцією `query` винесли в окремий пакет `@anthropic-ai/claude-agent-sdk`. Сигнатура `query({ prompt, options })` і поля `options.cwd/maxTurns/allowedTools` зберігаються.
12
+ - **`scripts/coverage-fix.mjs`**: дзеркальна заміна імпорту `@anthropic-ai/claude-code` → `@anthropic-ai/claude-agent-sdk`. Тіло споживача без змін.
13
+
14
+ ### Fixed
15
+
16
+ - **ADR Stop-hook у Node v26 / Zed**: `capture-decisions.sh` спавнить bare `claude -p` як subprocess. PATH у Zed Claude Agent-сесіях має `node_modules/.bin` попереду `/opt/homebrew/bin`, тож резолвив локальний `@anthropic-ai/claude-code@1.0.128`, який краш-падає на старті під Node 26 (`TypeError: Cannot read properties of undefined (reading 'prototype')` у bundled google-auth-library коді, який припускає, що `require('stream')` повертає клас зі `.prototype`). Хук фіксував `empty response from LLM CLI` і виходив без створення чернетки. Після зняття v1-залежності з канона `node_modules/.bin/claude` shadow зникає, subprocess резолвить системний `claude` (homebrew або інший global) — той працює під Node 26 без правок.
17
+
7
18
  ## [1.27.1] - 2026-05-26
8
19
 
9
20
  ### Changed
10
21
 
11
- - Додано workspace-level `vitest.config.js` baseline і follow-up правки для Vitest/Stryker coverage-концернів після переходу тестового правила на Vitest runner.
22
+ - Стилістичні правки бенчмарк-артефактів `benchmarks/runner-comparison/` (форматування таблиць, code blocks) після ручного `bun run lint` у dev-репо. Без змін у поведінці rules чи правила `test`.
12
23
 
13
24
  ## [1.27.0] - 2026-05-26
14
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/cursor",
3
- "version": "1.27.1",
3
+ "version": "1.27.2",
4
4
  "description": "CLI для завантаження cursor-правил (префікс n-) у локальний репозиторій",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,7 +50,7 @@
50
50
  "rename-yaml-extensions": "bun ./bin/n-cursor.js rename-yaml-extensions"
51
51
  },
52
52
  "dependencies": {
53
- "@anthropic-ai/claude-code": "^1.0.0",
53
+ "@anthropic-ai/claude-agent-sdk": "^0.3.0",
54
54
  "@anthropic-ai/sdk": "^0.54.0",
55
55
  "oxc-parser": "^0.128.0",
56
56
  "picomatch": "^4.0.4",
@@ -4,7 +4,7 @@
4
4
  * (file, line, оригінальний код, вижилий варіант, тип мутації) і самостійно
5
5
  * знаходить або створює відповідні test-файли.
6
6
  *
7
- * Залежить від `@anthropic-ai/claude-code` (dependencies у npm/package.json).
7
+ * Залежить від `@anthropic-ai/claude-agent-sdk` (dependencies у npm/package.json).
8
8
  */
9
9
  import { readFile } from 'node:fs/promises'
10
10
  import { join } from 'node:path'
@@ -30,9 +30,9 @@ export async function fixSurvivedMutants(survived, projectRoot) {
30
30
  const prompt = await buildFixPrompt(survived, projectRoot)
31
31
  console.log(`\n🤖 coverage --fix: запускаю агента для ${totalMutants} вижилих мутантів...\n`)
32
32
 
33
- // Dynamic import: @anthropic-ai/claude-code завантажується лише при --fix,
33
+ // Dynamic import: @anthropic-ai/claude-agent-sdk завантажується лише при --fix,
34
34
  // щоб не гальмувати звичайний coverage-прогін за відсутності пакету.
35
- const { query } = await import('@anthropic-ai/claude-code')
35
+ const { query } = await import('@anthropic-ai/claude-agent-sdk')
36
36
 
37
37
  for await (const msg of query({
38
38
  prompt,