bare-agent 0.39.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.
@@ -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.39.0 | Node.js >= 18 | zero required deps (`bareguard >=0.9.0 <0.14.0` optional peer for governance) | Apache 2.0
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/index.d.ts CHANGED
@@ -1,3 +1,57 @@
1
+ /**
2
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
3
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
4
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
5
+ */
6
+ export type ToolDef = import("./types").ToolDef;
7
+ /**
8
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
9
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
10
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
11
+ */
12
+ export type ToolCall = import("./types").ToolCall;
13
+ /**
14
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
15
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
16
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
17
+ */
18
+ export type Message = import("./types").Message;
19
+ /**
20
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
21
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
22
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
23
+ */
24
+ export type Provider = import("./types").Provider;
25
+ /**
26
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
27
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
28
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
29
+ */
30
+ export type GenerateResult = import("./types").GenerateResult;
31
+ /**
32
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
33
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
34
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
35
+ */
36
+ export type Usage = import("./types").Usage;
37
+ /**
38
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
39
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
40
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
41
+ */
42
+ export type RunMetrics = import("./types").RunMetrics;
43
+ /**
44
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
45
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
46
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
47
+ */
48
+ export type Store = import("./types").Store;
49
+ /**
50
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
51
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
52
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
53
+ */
54
+ export type Ctx = import("./types").Ctx;
1
55
  import { Loop } from "./src/loop";
2
56
  import { Planner } from "./src/planner";
3
57
  import { Evaluator } from "./src/evaluator";
package/index.js CHANGED
@@ -1,5 +1,20 @@
1
1
  'use strict';
2
2
 
3
+ /**
4
+ * Re-export the shared cross-cutting type shapes so adopters can name them when
5
+ * annotating their own wiring (tools arrays, providers, ctx, metrics). Declared
6
+ * in `types/index.d.ts`; surfaced here on the root entry so `types` resolves them.
7
+ * @typedef {import('./types').ToolDef} ToolDef
8
+ * @typedef {import('./types').ToolCall} ToolCall
9
+ * @typedef {import('./types').Message} Message
10
+ * @typedef {import('./types').Provider} Provider
11
+ * @typedef {import('./types').GenerateResult} GenerateResult
12
+ * @typedef {import('./types').Usage} Usage
13
+ * @typedef {import('./types').RunMetrics} RunMetrics
14
+ * @typedef {import('./types').Store} Store
15
+ * @typedef {import('./types').Ctx} Ctx
16
+ */
17
+
3
18
  const { Loop } = require('./src/loop');
4
19
  const { Planner } = require('./src/planner');
5
20
  const { Evaluator } = require('./src/evaluator');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-agent",
3
- "version": "0.39.0",
3
+ "version": "0.41.0",
4
4
  "files": [
5
5
  "index.js",
6
6
  "index.d.ts",
@@ -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
- return this._parse(out.text);
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
  /**
@@ -1,6 +1,7 @@
1
1
  export type Message = import("../types").Message;
2
2
  export type ToolDef = import("../types").ToolDef;
3
3
  export type GenerateResult = import("../types").GenerateResult;
4
+ export type ParsedEnvelope = import("./provider-clipipe-tools.js").ParsedEnvelope;
4
5
  export type CLIPipeOptions = {
5
6
  /**
6
7
  * - CLI command to spawn (required).
@@ -142,11 +143,11 @@ export class CLIPipeProvider {
142
143
  toolProtocol: {
143
144
  name: string;
144
145
  turnArgs(systemPrompt: string): string[];
145
- parseResult(stdout: string): ParsedEnvelope;
146
+ parseResult(stdout: string): import("./provider-clipipe-tools").ParsedEnvelope;
146
147
  probe: {
147
148
  system: string;
148
149
  user: string;
149
- isCapable: (parsed: ParsedEnvelope) => boolean;
150
+ isCapable: (parsed: import("./provider-clipipe-tools").ParsedEnvelope) => boolean;
150
151
  };
151
152
  } | null;
152
153
  probeCapability: boolean;
@@ -8,6 +8,12 @@ const { createBridge, resolveSessionError, runSession } = require('./provider-cl
8
8
  /** @typedef {import('../types').Message} Message */
9
9
  /** @typedef {import('../types').ToolDef} ToolDef */
10
10
  /** @typedef {import('../types').GenerateResult} GenerateResult */
11
+ // `toolProtocol`'s inferred type references ParsedEnvelope, which is declared in
12
+ // provider-clipipe-tools.js. Without this alias the name is not in scope when tsc
13
+ // emits this file's .d.ts, so the declaration shipped a bare `ParsedEnvelope` that
14
+ // adopters could not resolve (TS2304) — invisible here because our own tsconfig
15
+ // sets skipLibCheck.
16
+ /** @typedef {import('./provider-clipipe-tools.js').ParsedEnvelope} ParsedEnvelope */
11
17
 
12
18
  /**
13
19
  * @typedef {object} CLIPipeOptions