bareloop 0.51.0 → 0.52.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/src/config.js CHANGED
@@ -10,6 +10,7 @@
10
10
  // Shape (unknown fields are kept, never dropped):
11
11
  // { "monthlyLimitUsd": <number > 0>, // absent = no limit, no check
12
12
  // "learningHints": true|false, // absent = true (ON by default; only false turns it off): the planner is handed cross-run learnings (src/learn.js); the tally is kept either way
13
+ // "carryNote": true|false, // absent = true (ON by default; only false turns it off): a step/fix worker is handed a code-written, facts-only note of what earlier workers of the same run looked at, searched and changed (src/carrynote.js); off = the worker prompt is exactly as before
13
14
  // "keys": { "<ENV NAME>": { "shape": "<shape id>", "baseUrl": "http(s)://…", "legacyMaxTokens": true|false } },
14
15
  // "models": { "<ENV NAME>": [ { "model": "<id>", "use": true|false, "inPerM": n, "outPerM": n } ] } }
15
16
  // An older file's `keys.<ENV>.{name,priceInPerM,priceOutPerM}` is tolerated and read as ONE model
@@ -130,6 +131,7 @@ export function modelsProblem(list) {
130
131
  function docProblem(doc) {
131
132
  // monthlyLimitUsd is NOT judged here: `monthlyLimitOf` (src/monthly.js) owns its read-time sentence
132
133
  if (doc.learningHints !== undefined && typeof doc.learningHints !== 'boolean') return 'learningHints must be true or false';
134
+ if (doc.carryNote !== undefined && typeof doc.carryNote !== 'boolean') return 'carryNote must be true or false';
133
135
  if (doc.keys !== undefined) {
134
136
  if (doc.keys === null || typeof doc.keys !== 'object' || Array.isArray(doc.keys)) return 'keys must be an object of key variable names';
135
137
  for (const [env, row] of Object.entries(doc.keys)) {
@@ -158,7 +160,7 @@ function docProblem(doc) {
158
160
  * `keys` merges per key variable name, then per field; `models.<ENV>` is REPLACED WHOLE (`null`
159
161
  * clears it). Validated before anything is written; nothing is written on a refusal.
160
162
  *
161
- * Patch fields understood: `monthlyLimitUsd` (finite > 0), `learningHints` (true | false), `keys.<ENV>.{shape,baseUrl,legacyMaxTokens}`,
163
+ * Patch fields understood: `monthlyLimitUsd` (finite > 0), `learningHints` (true | false), `carryNote` (true | false), `keys.<ENV>.{shape,baseUrl,legacyMaxTokens}`,
162
164
  * `models.<ENV>` (a list judged by {@link modelsProblem}). The first write of a row's `models` list
163
165
  * removes that row's older `name` / `priceInPerM` / `priceOutPerM` in the SAME write (never two
164
166
  * sources); a retired top-level `anthropicBalanceNote` is dropped on any write. Any other field is
@@ -179,6 +181,7 @@ export function updateConfig(patch, opts = {}) {
179
181
  throw new ConfigError('monthlyLimitUsd must be a number above 0 (remove the limit to have none)');
180
182
  }
181
183
  if (k === 'learningHints' && typeof v !== 'boolean') throw new ConfigError('learningHints must be true or false');
184
+ if (k === 'carryNote' && typeof v !== 'boolean') throw new ConfigError('carryNote must be true or false');
182
185
  next[k] = v;
183
186
  }
184
187
  delete next.anthropicBalanceNote;