@7n/llm-lib 2.13.3 → 2.13.5

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
@@ -1,10 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.13.5] - 2026-07-30
4
+
5
+ ### Fixed
6
+
7
+ - обмежено git-reconcile remediation точним failing scope та заборонено LLM full gates
8
+
9
+ ## [2.13.4] - 2026-07-29
10
+
11
+ ### Changed
12
+
13
+ - release: @7n/llm-lib@2.13.3, @7n/rules-lang-js@0.24.2, @7n/rules@1.57.4; fix(llm-lib): підтягнути піни платформних napi-пакетів до опублікованої 2.13.2 (#294); fix(js/eslint): guard identity tagged-template tags from LLM autofix (#293)
14
+
3
15
  ## [2.13.3] - 2026-07-29
4
16
 
5
17
  ### Fixed
6
18
 
7
- - align @7n/llm-lib native addon optionalDependencies pin (2.9.7 2.13.2) CI lint-repo was calling a stale native resolveModel binary that didn't support N_LOCAL_*_MODEL env-key selectors
19
+ - Піни платформних napi-пакетів (`optionalDependencies` + версії `llm-lib/packages/*`) підтягнуто до опублікованої 2.13.2: git застряг на 2.9.7 (збірки до уніфікації model resolution), через що install монорепо тягнув несумісний prebuilt addon 42 фейли повного `bun run test` і червоний Lint repo-wide
8
20
 
9
21
  ## [2.13.2] - 2026-07-29
10
22
 
package/lib/acp.mjs CHANGED
@@ -24,14 +24,24 @@ import { loadNative } from './internal/native.mjs'
24
24
  * @param {string} prompt промпт
25
25
  * @param {string} cwd робочий каталог сесії агента (каталог проєкту-викликача)
26
26
  * @param {{
27
- * tier?: 'min' | 'avg' | 'max', mode?: 'interactive',
28
- * native?: { oneShotAcp: (kind: string, prompt: string, cwd: string, tier?: string) => Promise<string> }
27
+ * tier?: 'min' | 'avg' | 'max', mode?: 'interactive', denyCommandFragments?: string[],
28
+ * native?: {
29
+ * oneShotAcp: (kind: string, prompt: string, cwd: string, tier?: string) => Promise<string>,
30
+ * oneShotAcpGuarded?: (kind: string, prompt: string, cwd: string, tier: string, denyCommandFragments: string[]) => Promise<string>
31
+ * }
29
32
  * }} [options] тир + інжект `native` для тестів (той самий 4-й аргумент, що й раніше — сумісність зі старим `{ native }`-викликом збережена)
30
33
  * @returns {Promise<string>} повний текст відповіді до кінця ходу
31
34
  */
32
- export function runAcpAgent(kind, prompt, cwd, { tier, mode, native } = {}) {
35
+ export function runAcpAgent(kind, prompt, cwd, { tier, mode, native, denyCommandFragments = [] } = {}) {
33
36
  if (!tier && mode !== 'interactive') throw new TypeError('runAcpAgent: передай tier або явно mode:"interactive"')
34
37
  if (tier && mode) throw new TypeError('runAcpAgent: tier і mode взаємовиключні')
35
38
  const nativeImpl = native ?? loadNative()
39
+ if (denyCommandFragments.length > 0) {
40
+ if (!tier) throw new TypeError('runAcpAgent: denyCommandFragments потребує tier')
41
+ if (typeof nativeImpl.oneShotAcpGuarded !== 'function') {
42
+ throw new TypeError('runAcpAgent: native не підтримує denyCommandFragments')
43
+ }
44
+ return nativeImpl.oneShotAcpGuarded(kind, prompt, cwd, tier, denyCommandFragments)
45
+ }
36
46
  return nativeImpl.oneShotAcp(kind, prompt, cwd, tier)
37
47
  }
package/lib/docs/acp.md CHANGED
@@ -3,9 +3,9 @@ type: JS Module
3
3
  title: acp.mjs
4
4
  resource: llm-lib/lib/acp.mjs
5
5
  docgen:
6
- crc: 022452f4
7
- model: openai-codex/gpt-5.4-mini
8
- tier: cloud-min
6
+ crc: 966e3fea
7
+ model: omlx/gemma-4-e4b-it-OptiQ-4bit
8
+ tier: local-min
9
9
  score: 80
10
10
  ---
11
11
 
@@ -34,7 +34,7 @@ Rust сам резолвить tier→env/args/post-session-config з пресе
34
34
 
35
35
  ## Сценарії використання
36
36
 
37
- - `llm-lib/tests/acp.test.mjs` (runAcpAgent; getAcpPresets (smoke через реально збудований napi-аддон)) — interactive mode делегує kind/prompt/cwd у native.oneShotAcp і віддає його результат; без tier або interactive mode — fail-closed; tier прокидається в native.oneShotAcp четвертим аргументом; kind
37
+ - `llm-lib/tests/acp.test.mjs` (runAcpAgent; getAcpPresets (smoke через реально збудований napi-аддон)) — interactive mode делегує kind/prompt/cwd у native.oneShotAcp і віддає його результат; без tier або interactive mode — fail-closed; tier прокидається в native.oneShotAcp четвертим аргументом; denyCommandFragments йде через guarded native boundary; denyCommandFragments fail-closed зі старим native addon; ще 1
38
38
 
39
39
  ## Гарантії поведінки
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7n/llm-lib",
3
- "version": "2.13.3",
3
+ "version": "2.13.5",
4
4
  "description": "Тонкий шар роботи з LLM (локальні omlx + хмарні провайдери) поверх pi: model tiers, one-shot, agentic-раннери, write-guard, trace, telemetry, prompt-budget",
5
5
  "keywords": [
6
6
  "nitra",
@@ -56,8 +56,8 @@
56
56
  "access": "public"
57
57
  },
58
58
  "optionalDependencies": {
59
- "@7n/llm-lib-darwin-arm64": "2.13.2",
60
- "@7n/llm-lib-linux-x64": "2.13.2"
59
+ "@7n/llm-lib-darwin-arm64": "2.13.5",
60
+ "@7n/llm-lib-linux-x64": "2.13.5"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@earendil-works/pi-ai": "~0.80.10",