@molecule/api-ai-decisions-kev 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +60 -60
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -3,15 +3,11 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-10-07T04:32:01.339Z
6
+ Generated: 2026-10-16T23:28:12.696Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-ai-decisions-kev
10
10
 
11
- > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
- > It is written to be read by coding agents as much as by people, and is generated from this
13
- > package's source — edit `src/index.ts` JSDoc, not this file.
14
-
15
11
  Kev decisions provider for molecule.dev — typed decisions from the
16
12
  open-weights Kev models on a `kev.serve` host you run.
17
13
 
@@ -23,6 +19,10 @@ generate no text. Its README recommends Kev-4B as the default. `kev.serve`
23
19
  speaks TypeSafe Jev's `/v1/systemone` protocol, so swapping to
24
20
  `@molecule/api-ai-decisions-jev`, `-laya` or `-jeff` is a one-line change.
25
21
 
22
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
23
+ > It is written to be read by coding agents as much as by people, and is generated from this
24
+ > package's source — edit `src/index.ts` JSDoc, not this file.
25
+
26
26
  ## Quick Start
27
27
 
28
28
  ```bash
@@ -104,26 +104,15 @@ interface KevConfig {
104
104
  }
105
105
  ```
106
106
 
107
- #### `PostOptions`
107
+ #### `WireQuestion`
108
108
 
109
- Options for {@link postSystemOne}.
109
+ One question as sent on the wire.
110
110
 
111
111
  ```typescript
112
- interface PostOptions {
113
- /** Full endpoint URL. */
114
- url: string
115
- /** Bearer token, if any. */
116
- apiKey?: string
117
- /** Extra headers resolved before the request (merged over the defaults). */
118
- headers?: () => Record<string, string> | Promise<Record<string, string>>
119
- /** Request body. */
120
- body: Record<string, unknown>
121
- /** Abort signal. */
122
- signal?: AbortSignal
123
- /** Label for error messages (`'Kev'`). */
124
- label: string
125
- /** Max retries on a retryable status (default 3). */
126
- maxRetries?: number
112
+ interface WireQuestion {
113
+ type: 'choice' | 'score' | 'noul'
114
+ instructions: string
115
+ criteria?: Record<string, string> | string[]
127
116
  }
128
117
  ```
129
118
 
@@ -141,18 +130,6 @@ interface WireAnswer {
141
130
  }
142
131
  ```
143
132
 
144
- #### `WireQuestion`
145
-
146
- One question as sent on the wire.
147
-
148
- ```typescript
149
- interface WireQuestion {
150
- type: 'choice' | 'score' | 'noul'
151
- instructions: string
152
- criteria?: Record<string, string> | string[]
153
- }
154
- ```
155
-
156
133
  #### `WireResponse`
157
134
 
158
135
  The response body (only the fields we read).
@@ -165,6 +142,29 @@ interface WireResponse {
165
142
  }
166
143
  ```
167
144
 
145
+ #### `PostOptions`
146
+
147
+ Options for {@link postSystemOne}.
148
+
149
+ ```typescript
150
+ interface PostOptions {
151
+ /** Full endpoint URL. */
152
+ url: string
153
+ /** Bearer token, if any. */
154
+ apiKey?: string
155
+ /** Extra headers resolved before the request (merged over the defaults). */
156
+ headers?: () => Record<string, string> | Promise<Record<string, string>>
157
+ /** Request body. */
158
+ body: Record<string, unknown>
159
+ /** Abort signal. */
160
+ signal?: AbortSignal
161
+ /** Label for error messages (`'Kev'`). */
162
+ label: string
163
+ /** Max retries on a retryable status (default 3). */
164
+ maxRetries?: number
165
+ }
166
+ ```
167
+
168
168
  ### Functions
169
169
 
170
170
  #### `createProvider(config)`
@@ -179,6 +179,18 @@ function createProvider(config?: KevConfig): AIDecisionsProvider
179
179
 
180
180
  **Returns:** An `AIDecisionsProvider` backed by a `kev.serve` host.
181
181
 
182
+ #### `toWireQuestions(questions)`
183
+
184
+ Converts the core's questions into wire questions (`yesNo` → `noul`).
185
+
186
+ ```typescript
187
+ function toWireQuestions(questions: Record<string, DecisionQuestion>): Record<string, WireQuestion>
188
+ ```
189
+
190
+ - `questions` — The questions keyed by id.
191
+
192
+ **Returns:** The wire `questions` object.
193
+
182
194
  #### `fromWireAnswer(id, question, wire, minConfidence)`
183
195
 
184
196
  Converts one wire answer into the core's answer for `question`.
@@ -226,26 +238,22 @@ function postSystemOne(opts: PostOptions): Promise<WireResponse>
226
238
 
227
239
  **Returns:** The parsed response body.
228
240
 
229
- #### `toWireQuestions(questions)`
241
+ ### Constants
230
242
 
231
- Converts the core's questions into wire questions (`yesNo` → `noul`).
243
+ #### `DEFAULT_KEV_URL`
244
+
245
+ `kev.serve`'s default bind (`--port` defaults to 8008; its README examples use 8009).
232
246
 
233
247
  ```typescript
234
- function toWireQuestions(questions: Record<string, DecisionQuestion>): Record<string, WireQuestion>
248
+ const DEFAULT_KEV_URL: 'http://localhost:8008'
235
249
  ```
236
250
 
237
- - `questions` — The questions keyed by id.
238
-
239
- **Returns:** The wire `questions` object.
240
-
241
- ### Constants
242
-
243
- #### `aiDecisionsKevSecretDefinitions`
251
+ #### `DEFAULT_KEV_MODEL`
244
252
 
245
- Secret definitions used by the Kev decisions bond.
253
+ The model id `kev.serve` documents; any string is echoed back, none selects a checkpoint.
246
254
 
247
255
  ```typescript
248
- const aiDecisionsKevSecretDefinitions: SecretDefinition[]
256
+ const DEFAULT_KEV_MODEL: 'kev-latest'
249
257
  ```
250
258
 
251
259
  #### `DEFAULT_KEV_MAX_OPTIONS`
@@ -256,14 +264,6 @@ Most `choice` options or `score` levels `kev.serve` accepts (`MAX_OPTIONS` in `k
256
264
  const DEFAULT_KEV_MAX_OPTIONS: 255
257
265
  ```
258
266
 
259
- #### `DEFAULT_KEV_MODEL`
260
-
261
- The model id `kev.serve` documents; any string is echoed back, none selects a checkpoint.
262
-
263
- ```typescript
264
- const DEFAULT_KEV_MODEL: 'kev-latest'
265
- ```
266
-
267
267
  #### `DEFAULT_KEV_TIMEOUT_MS`
268
268
 
269
269
  Default per-call timeout: room for a scale-to-zero cold start (~35 s on Modal).
@@ -272,20 +272,20 @@ Default per-call timeout: room for a scale-to-zero cold start (~35 s on Modal).
272
272
  const DEFAULT_KEV_TIMEOUT_MS: 120000
273
273
  ```
274
274
 
275
- #### `DEFAULT_KEV_URL`
275
+ #### `provider`
276
276
 
277
- `kev.serve`'s default bind (`--port` defaults to 8008; its README examples use 8009).
277
+ The provider implementation — lazy, so env vars are read on first use.
278
278
 
279
279
  ```typescript
280
- const DEFAULT_KEV_URL: 'http://localhost:8008'
280
+ const provider: AIDecisionsProvider
281
281
  ```
282
282
 
283
- #### `provider`
283
+ #### `aiDecisionsKevSecretDefinitions`
284
284
 
285
- The provider implementation — lazy, so env vars are read on first use.
285
+ Secret definitions used by the Kev decisions bond.
286
286
 
287
287
  ```typescript
288
- const provider: AIDecisionsProvider
288
+ const aiDecisionsKevSecretDefinitions: SecretDefinition[]
289
289
  ```
290
290
 
291
291
  ## Core Interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-decisions-kev",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Kev decisions provider for molecule.dev — typed choice/score/yes-no answers from the open-weights Kev models (Qwen-based, 0.8B–27B) on your own kev.serve host",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,11 +35,11 @@
35
35
  "@molecule/api-secrets": "^1.0.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@molecule/api-ai-decisions": "1.1.1",
38
+ "@molecule/api-ai-decisions": "1.1.2",
39
39
  "@molecule/api-secrets": "1.0.2",
40
- "@types/node": "26.1.2",
40
+ "@types/node": "26.6.5",
41
41
  "typescript": "6.0.3",
42
- "vitest": "4.1.11"
42
+ "vitest": "4.1.12"
43
43
  },
44
44
  "repository": {
45
45
  "type": "git",