@crewhaus/spec-patch 0.2.4 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +56 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -195,6 +195,34 @@ export const OPTIMIZABLE_PATHS = Object.freeze({
195
195
  Object.freeze(["agent", "model_pool", "policy"]),
196
196
  Object.freeze(["agent", "model_pool", "routing"]),
197
197
  Object.freeze(["agent", "model_pool", "learning"]),
198
+ // 0.3.0 memory release (design §7.5, PR 20) — the memory/continuity
199
+ // QUALITY knobs, registered on the five emit-wired memory shapes (cli,
200
+ // channel, managed, research, crew — mirrored below with a pointer to
201
+ // this table). Every one is a scalar that survives lower() 1:1, with its
202
+ // bounds owned by the spec schema (+ the compiler's lower-time floors),
203
+ // so an out-of-bounds patch fails applySpecPatch's re-parse:
204
+ // memory.recallK int 1..50 — facts fused into recall
205
+ // memory.autoCaptureThreshold int >= 1 — capture sensitivity
206
+ // memory.ttl duration string ("90d"; >= 1h floor) —
207
+ // the fact-forgetting horizon
208
+ // memory.wiki.recallK int 1..50 — wiki hits fused into recall
209
+ // memory.dream.budget_usd number >= 0 — dream model-phase spend
210
+ // cap (0 = deterministic only)
211
+ // continuity.focusMaxChars int >= 1 (default 4096) — hard cap on
212
+ // the volatile tail block (token cost vs
213
+ // plan/ledger completeness)
214
+ // Deliberately EXCLUDED — the optimizer tunes quality, never semantics:
215
+ // thredz.* (credentials), memory.backend (store flip), memory.dream.every
216
+ // + .mode (side-effecting schedule / model-spend switch), continuity
217
+ // .proof/.scope/.enabled (behavioral switches), compaction
218
+ // .preserve_user_messages (safety), learning.sources (allowlist =
219
+ // security).
220
+ Object.freeze(["memory", "recallK"]),
221
+ Object.freeze(["memory", "autoCaptureThreshold"]),
222
+ Object.freeze(["memory", "ttl"]),
223
+ Object.freeze(["memory", "wiki", "recallK"]),
224
+ Object.freeze(["memory", "dream", "budget_usd"]),
225
+ Object.freeze(["continuity", "focusMaxChars"]),
198
226
  ]),
199
227
  workflow: Object.freeze([
200
228
  Object.freeze(["steps"]),
@@ -211,6 +239,13 @@ export const OPTIMIZABLE_PATHS = Object.freeze({
211
239
  Object.freeze(["agent", "model_pool", "policy"]),
212
240
  Object.freeze(["agent", "model_pool", "routing"]),
213
241
  Object.freeze(["agent", "model_pool", "learning"]),
242
+ // 0.3.0 memory/continuity quality knobs — types/bounds at the cli entry.
243
+ Object.freeze(["memory", "recallK"]),
244
+ Object.freeze(["memory", "autoCaptureThreshold"]),
245
+ Object.freeze(["memory", "ttl"]),
246
+ Object.freeze(["memory", "wiki", "recallK"]),
247
+ Object.freeze(["memory", "dream", "budget_usd"]),
248
+ Object.freeze(["continuity", "focusMaxChars"]),
214
249
  ]),
215
250
  graph: Object.freeze([
216
251
  Object.freeze(["nodes"]),
@@ -225,6 +260,13 @@ export const OPTIMIZABLE_PATHS = Object.freeze({
225
260
  Object.freeze(["agent", "model_pool", "policy"]),
226
261
  Object.freeze(["agent", "model_pool", "routing"]),
227
262
  Object.freeze(["agent", "model_pool", "learning"]),
263
+ // 0.3.0 memory/continuity quality knobs — types/bounds at the cli entry.
264
+ Object.freeze(["memory", "recallK"]),
265
+ Object.freeze(["memory", "autoCaptureThreshold"]),
266
+ Object.freeze(["memory", "ttl"]),
267
+ Object.freeze(["memory", "wiki", "recallK"]),
268
+ Object.freeze(["memory", "dream", "budget_usd"]),
269
+ Object.freeze(["continuity", "focusMaxChars"]),
228
270
  ]),
229
271
  pipeline: Object.freeze([
230
272
  Object.freeze(["agent", "instructions"]),
@@ -238,6 +280,13 @@ export const OPTIMIZABLE_PATHS = Object.freeze({
238
280
  Object.freeze(["failure_taxonomy"]),
239
281
  Object.freeze(["chains"]),
240
282
  Object.freeze(["transaction_policy"]),
283
+ // 0.3.0 memory/continuity quality knobs — types/bounds at the cli entry.
284
+ Object.freeze(["memory", "recallK"]),
285
+ Object.freeze(["memory", "autoCaptureThreshold"]),
286
+ Object.freeze(["memory", "ttl"]),
287
+ Object.freeze(["memory", "wiki", "recallK"]),
288
+ Object.freeze(["memory", "dream", "budget_usd"]),
289
+ Object.freeze(["continuity", "focusMaxChars"]),
241
290
  ]) /* whole-role replacement */,
242
291
  research: Object.freeze([
243
292
  Object.freeze(["agent", "instructions"]),
@@ -245,6 +294,13 @@ export const OPTIMIZABLE_PATHS = Object.freeze({
245
294
  Object.freeze(["retrieve", "maxDepth"]),
246
295
  Object.freeze(["chains"]),
247
296
  Object.freeze(["transaction_policy"]),
297
+ // 0.3.0 memory/continuity quality knobs — types/bounds at the cli entry.
298
+ Object.freeze(["memory", "recallK"]),
299
+ Object.freeze(["memory", "autoCaptureThreshold"]),
300
+ Object.freeze(["memory", "ttl"]),
301
+ Object.freeze(["memory", "wiki", "recallK"]),
302
+ Object.freeze(["memory", "dream", "budget_usd"]),
303
+ Object.freeze(["continuity", "focusMaxChars"]),
248
304
  ]),
249
305
  batch: Object.freeze([
250
306
  Object.freeze(["agent", "instructions"]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewhaus/spec-patch",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Pillar-2 patch infrastructure — apply a SpecPatch to a YAML source preserving comments and key order via the yaml CST. Drives the active eval optimizer's spec-level mutation loop.",
6
6
  "main": "dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "test": "bun test src"
16
16
  },
17
17
  "dependencies": {
18
- "@crewhaus/errors": "0.2.4",
19
- "@crewhaus/spec": "0.2.4",
18
+ "@crewhaus/errors": "0.3.0",
19
+ "@crewhaus/spec": "0.3.0",
20
20
  "yaml": "^2.6.0",
21
21
  "zod": "^3.23.8"
22
22
  },