@sebastiantuyu/agest 0.3.3-next.3 → 0.3.3-next.4

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,4 +1,5 @@
1
1
  import { computeCost } from "../pricing";
2
+ import { logger } from "../logger";
2
3
  /**
3
4
  * Creates a LangChain callback handler that records every LLM and tool
4
5
  * invocation as a `TimelineEvent`. Returns a handle whose `drain()` method
@@ -15,7 +16,9 @@ export async function createTracingHandle(baselineMs) {
15
16
  try {
16
17
  ({ BaseCallbackHandler } = await import("@langchain/core/callbacks/base"));
17
18
  }
18
- catch {
19
+ catch (err) {
20
+ logger.debug(`[agest] tracing disabled: could not load @langchain/core/callbacks/base — ` +
21
+ `install @langchain/core as a peer to capture per-scene cost/timeline. (${err.message})`);
19
22
  return { callbacks: [], drain: () => ({ events: [] }) };
20
23
  }
21
24
  const events = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebastiantuyu/agest",
3
- "version": "0.3.3-next.3",
3
+ "version": "0.3.3-next.4",
4
4
  "description": "A testing library for agents",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,5 +58,13 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@supercharge/promise-pool": "3.3.0"
61
+ },
62
+ "peerDependencies": {
63
+ "@langchain/core": ">=0.3.0 <2.0.0"
64
+ },
65
+ "peerDependenciesMeta": {
66
+ "@langchain/core": {
67
+ "optional": true
68
+ }
61
69
  }
62
70
  }