@tangle-network/agent-knowledge 5.0.4 → 6.0.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - Renamed the verified research entry point to `runVerifiedResearchLoop` and removed the old two-agent function, option, result, round, and module names.
8
+ - Updated `@tangle-network/agent-eval` to `0.129.0` and `@tangle-network/agent-interface` to `0.34.0`.
9
+
3
10
  ## 5.0.4
4
11
 
5
12
  ### Changed
package/README.md CHANGED
@@ -9,7 +9,7 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent-
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval@0.128.2
12
+ pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval@0.129.0
13
13
  ```
14
14
 
15
15
  Requires Node.js 20.19 or later.
@@ -270,7 +270,7 @@ Those choices stay in the application or in `@tangle-network/agent-runtime`.
270
270
  ## More detail
271
271
 
272
272
  - [Architecture and data model](docs/architecture.md)
273
- - [Two-agent research comparison](docs/two-agent-research-ab.md)
273
+ - [Verified research comparison](docs/verified-research-ab.md)
274
274
  - [Changelog](CHANGELOG.md)
275
275
 
276
276
  ## License
@@ -20,7 +20,7 @@ import {
20
20
  scoreKnowledgeBenchmarkArtifact,
21
21
  scoreMemoryBenchmarkArtifact,
22
22
  summarizeKnowledgeBenchmarkCampaign
23
- } from "../chunk-EYIA5PLQ.js";
23
+ } from "../chunk-PVCSESAF.js";
24
24
  import "../chunk-DQ3PDMDP.js";
25
25
  import "../chunk-YMKHCTS2.js";
26
26
  export {
@@ -17,7 +17,7 @@ import {
17
17
  runBoundedMemoryLifecycle,
18
18
  scoreMemoryBenchmarkArtifact,
19
19
  sleepForMemoryRecovery
20
- } from "./chunk-EYIA5PLQ.js";
20
+ } from "./chunk-PVCSESAF.js";
21
21
  import {
22
22
  sha256,
23
23
  stableId
@@ -195,6 +195,9 @@ function applySessionStickyRetrievalHoldout(hits, config, ctx = {}) {
195
195
  return result;
196
196
  }
197
197
  function toOffPolicyTrajectory(events, options) {
198
+ if (options.qHatChosen === void 0 !== (options.vHatTarget === void 0)) {
199
+ throw new Error("qHatChosen and vHatTarget must be supplied together");
200
+ }
198
201
  const groups = /* @__PURE__ */ new Map();
199
202
  let unattributableEvents = 0;
200
203
  for (const event of events) {
@@ -279,12 +282,15 @@ function toOffPolicyTrajectory(events, options) {
279
282
  `no reward for session ${summary.sessionIdHash}: filter events to scored sessions before converting`
280
283
  );
281
284
  }
285
+ const qHatChosen = options.qHatChosen?.(summary);
286
+ const vHatTarget = options.vHatTarget?.(summary);
282
287
  trajectories.push({
283
288
  runId,
284
289
  reward,
285
290
  behaviorProb,
286
291
  targetProb: options.targetProb?.(summary) ?? (summary.droppedId === null ? 1 : 0),
287
- qHat: options.qHat?.(summary) ?? null
292
+ ...options.qHatChosen === void 0 ? {} : { qHatChosen: qHatChosen ?? null },
293
+ ...options.vHatTarget === void 0 ? {} : { vHatTarget: vHatTarget ?? null }
288
294
  });
289
295
  sessions.push(summary);
290
296
  }
@@ -5434,4 +5440,4 @@ export {
5434
5440
  AgentMemoryHitSchema,
5435
5441
  AgentMemoryWriteInputSchema
5436
5442
  };
5437
- //# sourceMappingURL=chunk-LMR53POQ.js.map
5443
+ //# sourceMappingURL=chunk-46YPZHAX.js.map