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/CHANGELOG.md +15 -0
- package/README.md +12 -0
- package/bareloop.context.md +11 -3
- package/package.json +2 -2
- package/src/authorscout.js +2 -2
- package/src/carrynote.js +262 -0
- package/src/carrystore.js +220 -0
- package/src/config.js +4 -1
- package/src/panel/index.html +289 -181
- package/src/panel/server.js +47 -3
- package/src/planrun.js +21 -5
- package/src/replay.js +28 -3
- package/src/run.js +5 -2
- package/src/tools.js +17 -0
- package/src/userrun.js +3 -0
- package/types/carrynote.d.ts +134 -0
- package/types/carrystore.d.ts +69 -0
- package/types/config.d.ts +1 -1
- package/types/planrun.d.ts +5 -1
- package/types/replay.d.ts +1 -0
- package/types/run.d.ts +5 -1
- package/types/tools.d.ts +8 -0
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;
|