bare-agent 0.40.0 → 0.41.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/bareagent.context.md +1 -1
- package/package.json +1 -1
- package/src/evaluator.d.ts +7 -0
- package/src/evaluator.js +10 -1
package/bareagent.context.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# bareagent — Integration Guide
|
|
2
2
|
|
|
3
3
|
> For AI assistants and developers wiring bareagent into a project.
|
|
4
|
-
> v0.
|
|
4
|
+
> v0.41.0 | Node.js >= 18 | zero required deps (`bareguard >=0.9.0 <0.14.0` optional peer for governance) | Apache 2.0
|
|
5
5
|
>
|
|
6
6
|
> Full human guide with composition examples, design philosophy, and recipes: [Usage Guide](docs/archive/usage-guide.md)
|
|
7
7
|
|
package/package.json
CHANGED
package/src/evaluator.d.ts
CHANGED
|
@@ -29,6 +29,13 @@ export type Verdict = {
|
|
|
29
29
|
* - Concrete fixes (rubric may populate; [] otherwise).
|
|
30
30
|
*/
|
|
31
31
|
suggestions: string[];
|
|
32
|
+
/**
|
|
33
|
+
* - Rubric path only: `true` when the grader requested a pinned
|
|
34
|
+
* `temperature: 0` (its determinism knob) but the model rejected it and the provider silently retried at
|
|
35
|
+
* the model's DEFAULT (BA-10). Carries the fact the way `recurse` does — the grader ran non-deterministic;
|
|
36
|
+
* the caller decides what to do. Absent/`false` for predicate (no LLM) and agentic (no pinned temperature).
|
|
37
|
+
*/
|
|
38
|
+
temperatureDropped?: boolean | undefined;
|
|
32
39
|
};
|
|
33
40
|
export type EvaluatorOptions = {
|
|
34
41
|
/**
|
package/src/evaluator.js
CHANGED
|
@@ -20,6 +20,10 @@ const { Loop } = require('./loop');
|
|
|
20
20
|
* @property {number|null} score - 0–10 for the rubric path; null for predicate (pass/fail only).
|
|
21
21
|
* @property {string} critique - Why it failed / what to improve. '' when satisfied with no notes.
|
|
22
22
|
* @property {string[]} suggestions - Concrete fixes (rubric may populate; [] otherwise).
|
|
23
|
+
* @property {boolean} [temperatureDropped] - Rubric path only: `true` when the grader requested a pinned
|
|
24
|
+
* `temperature: 0` (its determinism knob) but the model rejected it and the provider silently retried at
|
|
25
|
+
* the model's DEFAULT (BA-10). Carries the fact the way `recurse` does — the grader ran non-deterministic;
|
|
26
|
+
* the caller decides what to do. Absent/`false` for predicate (no LLM) and agentic (no pinned temperature).
|
|
23
27
|
*/
|
|
24
28
|
|
|
25
29
|
/**
|
|
@@ -199,7 +203,12 @@ class Evaluator {
|
|
|
199
203
|
await opts.onLlmResult({ usage: out?.usage || null, model: (out && out.model) || this.provider.model || null, kind: 'evaluate' });
|
|
200
204
|
}
|
|
201
205
|
|
|
202
|
-
|
|
206
|
+
const verdict = this._parse(out.text);
|
|
207
|
+
// BA-10 honest receipt (mirrors recurse.js:900): the grader pinned `temperature: 0` for determinism. If
|
|
208
|
+
// the model rejected it, the provider ran at its DEFAULT and set `temperatureDropped`. Surface it so the
|
|
209
|
+
// caller is not silently handed a verdict from a non-deterministic grade — carry the fact, do not decide.
|
|
210
|
+
if (out.temperatureDropped === true) verdict.temperatureDropped = true;
|
|
211
|
+
return verdict;
|
|
203
212
|
}
|
|
204
213
|
|
|
205
214
|
/**
|