@dereekb/openrouter 14.8.0 → 14.10.0

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
@@ -14,6 +14,7 @@ queue drained by a sweeper the app mounts on a schedule it already runs.
14
14
  | Entry | Purpose |
15
15
  |---|---|
16
16
  | `@dereekb/openrouter` | Config types, request builder, `callModel` wrapper, deferred-tool helpers, embeddings, **decisions**. Pure — no I/O. |
17
+ | `@dereekb/openrouter/decision` | The decision layer WITHOUT `@openrouter/sdk`: questions, validation, the request body, the answer reader, model ids. See [below](#loading-without-the-sdk). |
17
18
  | `@dereekb/openrouter/firebase` | The `OpenRouterPrompt`, `OpenRouterPromptVersion` and `OpenRouterRunTask` models. |
18
19
  | `@dereekb/openrouter/firebase-server` | Prompt service, run-task queue + sweep, Firestore `StateAccessor`, server actions. |
19
20
 
@@ -142,6 +143,25 @@ an answer is only reproducible against the model that gave it, which is the same
142
143
  The reply reports the model that actually served it (`typesafe/jev-1.13-20260917`), so read `result.model`
143
144
  rather than assuming the slug you asked for.
144
145
 
146
+ ### Loading without the SDK
147
+
148
+ The root entry re-exports SDK values (`callModel`, `responsesSend`, `systemOneCreate`, …), so importing
149
+ ANY value from `@dereekb/openrouter` evaluates `@openrouter/sdk` — a real cold-start cost, and one a test
150
+ runner that isolates each spec file pays once per file. `@dereekb/openrouter/decision` carries everything a
151
+ decision is built from and read with, and loads nothing under `@openrouter/sdk`:
152
+
153
+ - `openRouterChoiceQuestion` / `openRouterScoreQuestion` / `openRouterNoulQuestion`, the answer and
154
+ confidence helpers, and `validateOpenRouterDecisionQuestions`;
155
+ - `openRouterDecisionRequest`, `openRouterDecisionRequestBody` (the `/systemone` body, wire mapping
156
+ included), `readOpenRouterDecisionAnswers` and its `OpenRouterDecisionAnswerFaultError`,
157
+ `openRouterRunUsageFromDecisionsUsage`, `validateOpenRouterDecisionRequest`;
158
+ - the model config and the model ids, `isOpenRouterSystemOneModelId` among them.
159
+
160
+ What it does NOT carry is `openRouterDecision` — the transport, and the one `systemOneCreate` caller. A
161
+ consumer that owns its transport (its own timeout, retry policy or error shape) builds the body here, sends
162
+ it through its own lazily-loaded client, and reads the reply here. The two entries share one built chunk,
163
+ so a class has one identity whichever entry it was imported through.
164
+
145
165
  ### Where a decision lives
146
166
 
147
167
  A decision prompt is an ordinary `OpenRouterPrompt` whose version carries `q` (questions) instead of
package/decision.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/decision";
@@ -0,0 +1,2 @@
1
+ export { D as DEFAULT_OPENROUTER_PDF_PARSER_ENGINE, a as DEFAULT_OPENROUTER_SYSTEM_ONE_MODEL_ID, O as OPENROUTER_DECISION_CHOICE_OPTIONS_MAX, b as OPENROUTER_DECISION_CONFIDENCE_HIGH, c as OPENROUTER_DECISION_CONFIDENCE_MEDIUM, d as OPENROUTER_DECISION_DISTRIBUTION_SUM_TOLERANCE, e as OPENROUTER_DECISION_SCORE_LEVELS_MAX, f as OPENROUTER_DECISION_SCORE_LEVELS_MIN, g as OPENROUTER_JEV_1_13_MODEL_ID, h as OPENROUTER_JEV_LATEST_MODEL_ID, i as OPENROUTER_JEV_PREVIEW_MODEL_ID, j as OPENROUTER_SYSTEM_ONE_MODEL_NAMESPACE, k as OpenRouterDecisionAnswerFaultError, l as OpenRouterDecisionDeclarationError, m as asOpenRouterDecisionConfidenceBand, n as isBlankOpenRouterDecisionEntry, o as isOpenRouterSystemOneModelId, p as mapOpenRouterDecisionChoiceRows, q as mergeOpenRouterModelConfig, r as openRouterChoiceQuestion, s as openRouterDecisionChoiceOptionNames, t as openRouterDecisionChoiceRanking, u as openRouterDecisionRequest, v as openRouterDecisionRequestBody, w as openRouterDecisionStatePaths, x as openRouterDecisionWireQuestion, y as openRouterFileParserPlugin, z as openRouterFileSearchTool, A as openRouterNoulQuestion, B as openRouterProviderPinnedTo, C as openRouterRunUsageFromDecisionsUsage, E as openRouterScoreQuestion, F as readOpenRouterDecisionAnswers, G as splitOpenRouterDecisionModelConfig, H as validateOpenRouterDecisionQuestions, I as validateOpenRouterDecisionRequest, J as validateOpenRouterModelConfig } from './openrouter.decision.esm.js';
2
+ import '@dereekb/util';
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/openrouter/firebase",
3
- "version": "14.8.0",
3
+ "version": "14.10.0",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "peerDependencies": {
7
- "@dereekb/date": "14.8.0",
8
- "@dereekb/firebase": "14.8.0",
9
- "@dereekb/model": "14.8.0",
10
- "@dereekb/openrouter": "14.8.0",
11
- "@dereekb/rxjs": "14.8.0",
12
- "@dereekb/util": "14.8.0",
7
+ "@dereekb/date": "14.10.0",
8
+ "@dereekb/firebase": "14.10.0",
9
+ "@dereekb/model": "14.10.0",
10
+ "@dereekb/openrouter": "14.10.0",
11
+ "@dereekb/rxjs": "14.10.0",
12
+ "@dereekb/util": "14.10.0",
13
13
  "arktype": "^2.2.0"
14
14
  },
15
15
  "exports": {
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@dereekb/openrouter/firebase-server",
3
- "version": "14.8.0",
3
+ "version": "14.10.0",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "peerDependencies": {
7
- "@dereekb/analytics": "14.8.0",
8
- "@dereekb/date": "14.8.0",
9
- "@dereekb/firebase": "14.8.0",
10
- "@dereekb/firebase-server": "14.8.0",
11
- "@dereekb/model": "14.8.0",
12
- "@dereekb/nestjs": "14.8.0",
13
- "@dereekb/openrouter": "14.8.0",
14
- "@dereekb/rxjs": "14.8.0",
15
- "@dereekb/util": "14.8.0",
7
+ "@dereekb/analytics": "14.10.0",
8
+ "@dereekb/date": "14.10.0",
9
+ "@dereekb/firebase": "14.10.0",
10
+ "@dereekb/firebase-server": "14.10.0",
11
+ "@dereekb/model": "14.10.0",
12
+ "@dereekb/nestjs": "14.10.0",
13
+ "@dereekb/openrouter": "14.10.0",
14
+ "@dereekb/rxjs": "14.10.0",
15
+ "@dereekb/util": "14.10.0",
16
16
  "@nestjs/common": "^12.0.1",
17
17
  "@nestjs/config": "^12.0.0",
18
18
  "@openrouter/sdk": "^1.3.8",
@@ -23,7 +23,7 @@
23
23
  "make-error": "^1.3.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@dereekb/nestjs": "14.8.0",
26
+ "@dereekb/nestjs": "14.10.0",
27
27
  "@nestjs/testing": "^12.0.1"
28
28
  },
29
29
  "exports": {