@7n/llm-lib 2.8.1 → 2.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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.8.2] - 2026-07-19
4
+
5
+ ### Changed
6
+
7
+ - fix(llm-lib): `getRegistry()` — перехід на `ModelRuntime.create()` + `new ModelRegistry(runtime)` замість застарілого `ModelRegistry.create(AuthStorage.create())`, сумісного з `@earendil-works/pi-coding-agent@0.80.10`
8
+
3
9
  ## [2.8.1] - 2026-07-18
4
10
 
5
11
  ### Changed
@@ -3,7 +3,7 @@ type: JS Module
3
3
  title: one-shot.mjs
4
4
  resource: llm-lib/lib/one-shot.mjs
5
5
  docgen:
6
- crc: 68779501
6
+ crc: 3b62f8db
7
7
  model: omlx/gemma-4-e4b-it-OptiQ-4bit
8
8
  ---
9
9
 
@@ -3,7 +3,7 @@ type: JS Module
3
3
  title: registry.mjs
4
4
  resource: llm-lib/lib/internal/registry.mjs
5
5
  docgen:
6
- crc: d8f39754
6
+ crc: a37ca8f0
7
7
  ---
8
8
 
9
9
  ## Огляд
@@ -34,7 +34,8 @@ let _registry = null
34
34
  */
35
35
  export async function getRegistry() {
36
36
  if (_registry) return _registry
37
- const { ModelRegistry, AuthStorage } = await import('@earendil-works/pi-coding-agent')
38
- _registry = ModelRegistry.create(AuthStorage.create())
37
+ const { ModelRegistry, ModelRuntime } = await import('@earendil-works/pi-coding-agent')
38
+ const runtime = await ModelRuntime.create()
39
+ _registry = new ModelRegistry(runtime)
39
40
  return _registry
40
41
  }
package/lib/one-shot.mjs CHANGED
@@ -6,8 +6,8 @@
6
6
  * Для не-agent consumers (генерація/judge доків, класифікація, ADR-normalize):
7
7
  * «messages → текст», без write-tool, без агентного циклу. Реалізовано як
8
8
  * `createAgentSession({ noTools: 'all' })` + `session.prompt` (агент без tools =
9
- * plain completion) — перевикористовує той самий ModelRegistry/AuthStorage,
10
- * що й agent-fix, замість окремого raw-pi-ai streaming-плюмбінгу.
9
+ * plain completion) — перевикористовує той самий ModelRegistry (lazy singleton
10
+ * getRegistry()), що й agent-fix, замість окремого raw-pi-ai streaming-плюмбінгу.
11
11
  *
12
12
  * Pi вантажиться lazy (top-level import модуля pi-free). Повертає structured
13
13
  * `{ content, usage, error, model, caller }`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7n/llm-lib",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Тонкий шар роботи з LLM (локальні omlx + хмарні провайдери) поверх pi: model tiers, one-shot, agentic-раннери, write-guard, trace, telemetry, prompt-budget",
5
5
  "keywords": [
6
6
  "nitra",
@@ -53,8 +53,8 @@
53
53
  "access": "public"
54
54
  },
55
55
  "optionalDependencies": {
56
- "@7n/llm-lib-darwin-arm64": "2.8.1",
57
- "@7n/llm-lib-linux-x64": "2.8.1"
56
+ "@7n/llm-lib-darwin-arm64": "2.8.2",
57
+ "@7n/llm-lib-linux-x64": "2.8.2"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@earendil-works/pi-ai": "~0.80.10",
@@ -68,6 +68,10 @@
68
68
  "optional": true
69
69
  }
70
70
  },
71
+ "devDependencies": {
72
+ "@earendil-works/pi-ai": "~0.80.10",
73
+ "@earendil-works/pi-coding-agent": "~0.80.10"
74
+ },
71
75
  "engines": {
72
76
  "bun": ">=1.3",
73
77
  "node": ">=24"