pi-braid-providers 1.0.4 → 1.0.6

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/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # pi-braid-providers
2
2
 
3
+ ```bash
4
+ pi install npm:pi-braid-providers
5
+ ```
6
+
7
+ One command, no clone, no build: `pi install` registers the package with pi and installs it under pi's npm directory.
8
+
3
9
  Additional LLM providers for `pi-coding-agent`, built on a generalized **API key ring** for multi-key rotation and self-healing.
4
10
 
5
11
  The `providers` workspace registers providers into pi at session start. The key-ring machinery that both the agent loop and direct extension LLM calls use ships here; the provider itself is the **`agent-zero`** setup: the multi-vendor gateway that proxies Venice's models, configured from a catalog file resolved at runtime.
@@ -51,6 +57,12 @@ Or register the workspace in `~/.pi/agent/settings.json`:
51
57
  }
52
58
  ```
53
59
 
60
+ ## Pre-send payload guard
61
+
62
+ | Setting | Default | Effect | Read cadence |
63
+ | ------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
64
+ | `braid.context.presendGuard.enabled` | `true` | When enabled, if an estimated request exceeds 90% of a known model context window, oversized strings that can be flushed are written losslessly to disk and replaced by stubs. `false` skips the guard; unknown windows are not guessed. | Re-read at use time for every provider request. |
65
+
54
66
  ## What this does not do
55
67
 
56
68
  - It does not ship a provider catalog. The `agent-zero` model list and gateway URL are read from a
@@ -193,13 +205,13 @@ external consumer imports the package, never the other way round.
193
205
 
194
206
  `formatRingHealth(routes, freshness)` and `summarizeRouteHealth(routes, freshness)`
195
207
  turn a report into the `ring_health` tool's text and its `details` payload.
196
- Both take the death window the caller resolved
197
- (`braid.providers.probeFreshnessMs`, the same value the router's death gate is
198
- built with) and mark a recorded death `(expired)` when that gate would no
199
- longer act on it: an age at or past the window, a death with no recorded time,
200
- or any death while the window is switched off. The age rule is the gate's own
201
- predicate (`deathInForce` in `virtual-router.ts`), so the surface and the
202
- router cannot disagree about which deaths act.
208
+
209
+ - `braid.providers.probeFreshnessMs` (default `900000` ms, 15 minutes) controls
210
+ how long a recorded unavailable probe or shape-death result can steer routing.
211
+ `0` or less disables probe steering. The ring-health renderers receive the
212
+ same resolved window and mark a death `(expired)` when the router's
213
+ `deathInForce` predicate would no longer act on it, its timestamp is absent,
214
+ or the window is off.
203
215
 
204
216
  ## Disabling the provider
205
217
 
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "pi-braid-providers",
3
+ "version": "1.0.6",
4
+ "sha": "752d2e6e9b45037a8ebcc17f3d6f90c905b2c71c",
5
+ "shaShort": "752d2e6",
6
+ "branch": "detached",
7
+ "dirty": false,
8
+ "packedAt": "2026-10-19T11:29:20.919Z"
9
+ }
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "pi-braid-providers",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "LLM provider for pi-coding-agent: Venice models via the agent-zero gateway, with a multi-key ring",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "*.ts",
8
8
  "README.md",
9
- "LICENSE"
9
+ "LICENSE",
10
+ "build-info.json"
10
11
  ],
12
+ "exports": {
13
+ ".": "./index.ts"
14
+ },
11
15
  "keywords": [
12
16
  "pi-package",
13
17
  "pi",
@@ -27,6 +31,8 @@
27
31
  "typecheck": "tsc --noEmit",
28
32
  "test": "node test/provider-race.test.mjs && node test/route-table.test.mjs && node test/probe.test.mjs && node test/route-state.test.mjs && node test/ring-health.test.mjs && node test/rotation-engine.test.mjs && node test/route-failback.test.mjs && node test/providers-log.test.mjs && node test/key-ring-log.test.mjs && node test/key-ring-feedback.test.mjs && node test/key-ring-exhausted.test.mjs && node test/key-ring-hammer.test.mjs && node test/key-ring-cas-veto.test.mjs && node test/key-ring-selfheal.test.mjs && node test/ring-provider.test.mjs && node test/fallback-policy.test.mjs && node test/presend-guard.test.mjs && node test/venice-catalog.test.mjs && node test/waf-sanitize.test.mjs && node test/venice-direct-route.test.mjs && node test/venice-catalog-gen.test.mjs && node test/venice-catalog-cost.test.mjs && node test/route-walk-classes.test.mjs && node test/waf-repeat-rotation.test.mjs && node test/waf-marker-retryability.test.mjs && node test/route-usable.test.mjs && node test/virtual-router.test.mjs && node test/outage-watch.test.mjs && node test/failure-translation.test.mjs && node test/state-paths.test.mjs",
29
33
  "publish:local": "node ../core/scripts/publish-local.mjs providers",
34
+ "prepack": "node ../core/scripts/pack-provenance.mjs write",
35
+ "postpack": "node ../core/scripts/pack-provenance.mjs remove",
30
36
  "clean": "rm -rf node_modules package-lock.json",
31
37
  "reinstall": "npm run clean && npm install"
32
38
  },
@@ -35,8 +41,8 @@
35
41
  "@earendil-works/pi-ai": "^1.2.0"
36
42
  },
37
43
  "peerDependencies": {
38
- "@earendil-works/pi-ai": "*",
39
- "@earendil-works/pi-coding-agent": "*"
44
+ "@earendil-works/pi-ai": "^1.2.0",
45
+ "@earendil-works/pi-coding-agent": "^1.2.0"
40
46
  },
41
47
  "author": "kifirkin",
42
48
  "license": "MIT",