@cydm/pie 2.7.6 → 2.7.8

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.
@@ -4,7 +4,7 @@ import {
4
4
  disposeModelTransports,
5
5
  streamSimple,
6
6
  validateToolArguments
7
- } from "./chunk-ZF5FHTES.js";
7
+ } from "./chunk-2FEDB5GR.js";
8
8
 
9
9
  // ../../packages/agent-core/src/agent-loop.ts
10
10
  function createLoopErrorMessage(error, config, signal) {
@@ -6,8 +6,8 @@ import {
6
6
  bindToolCallerIdentity,
7
7
  createToolCallerIdentity,
8
8
  getToolCallerIdentity
9
- } from "./chunk-5YWEUFLM.js";
10
- import "./chunk-ZF5FHTES.js";
9
+ } from "./chunk-W5B3OXHQ.js";
10
+ import "./chunk-2FEDB5GR.js";
11
11
  import "./chunk-XXGYUYXI.js";
12
12
  import "./chunk-LZQXQOPJ.js";
13
13
  export {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
2
  import {
3
3
  EventStream
4
- } from "./chunk-ZF5FHTES.js";
4
+ } from "./chunk-2FEDB5GR.js";
5
5
  import "./chunk-XXGYUYXI.js";
6
6
  import "./chunk-LZQXQOPJ.js";
7
7
 
@@ -94,6 +94,15 @@ function createTestStreamFnFromSequenceEnv(value = process.env.PIE_TEST_MOCK_STR
94
94
  return async (model, context, options) => {
95
95
  const step = steps[Math.min(callIndex, steps.length - 1)];
96
96
  assertSystemPromptIncludes(context.systemPrompt, callIndex);
97
+ const capturePath = process.env.PIE_TEST_MOCK_CAPTURE_CONTEXT;
98
+ if (capturePath) {
99
+ try {
100
+ const captured = context.messages.map((message) => ({ role: message.role, content: message.content }));
101
+ const fs = await import("node:fs");
102
+ fs.appendFileSync(capturePath, JSON.stringify({ callIndex, messages: captured }) + "\n");
103
+ } catch {
104
+ }
105
+ }
97
106
  callIndex += 1;
98
107
  const stream = new EventStream(
99
108
  (event) => event.type === "done" || event.type === "error",