@agentforge/core 0.16.83 → 0.16.85
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/dist/index.cjs +3 -2
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3546,13 +3546,14 @@ function createThreadConfig(config = {}) {
|
|
|
3546
3546
|
}
|
|
3547
3547
|
function createConversationConfig(config) {
|
|
3548
3548
|
const { userId, sessionId, metadata = {} } = config;
|
|
3549
|
-
const
|
|
3549
|
+
const hasSessionId = sessionId !== void 0 && sessionId.length > 0;
|
|
3550
|
+
const threadId = hasSessionId ? generateThreadId(`${userId}-${sessionId}`) : generateThreadId(userId);
|
|
3550
3551
|
return createThreadConfig({
|
|
3551
3552
|
threadId,
|
|
3552
3553
|
metadata: {
|
|
3553
3554
|
...metadata,
|
|
3554
3555
|
userId,
|
|
3555
|
-
sessionId
|
|
3556
|
+
...hasSessionId ? { sessionId } : {}
|
|
3556
3557
|
}
|
|
3557
3558
|
});
|
|
3558
3559
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -2351,6 +2351,7 @@ declare function withMetrics<State>(node: (state: State) => State | Promise<Stat
|
|
|
2351
2351
|
*
|
|
2352
2352
|
* Helpers for configuring and using LangSmith tracing with LangGraph.
|
|
2353
2353
|
*/
|
|
2354
|
+
|
|
2354
2355
|
/**
|
|
2355
2356
|
* LangSmith configuration options
|
|
2356
2357
|
*/
|
|
@@ -2379,7 +2380,7 @@ interface LangSmithConfig {
|
|
|
2379
2380
|
/**
|
|
2380
2381
|
* Additional metadata to include in all traces
|
|
2381
2382
|
*/
|
|
2382
|
-
metadata?:
|
|
2383
|
+
metadata?: JsonObject;
|
|
2383
2384
|
}
|
|
2384
2385
|
/**
|
|
2385
2386
|
* Configure LangSmith for tracing.
|
|
@@ -2423,7 +2424,7 @@ interface TracingOptions {
|
|
|
2423
2424
|
/**
|
|
2424
2425
|
* Additional metadata to include in the trace
|
|
2425
2426
|
*/
|
|
2426
|
-
metadata?:
|
|
2427
|
+
metadata?: JsonObject;
|
|
2427
2428
|
/**
|
|
2428
2429
|
* Tags to categorize the trace
|
|
2429
2430
|
*/
|
|
@@ -2914,7 +2915,7 @@ interface ThreadConfig {
|
|
|
2914
2915
|
/**
|
|
2915
2916
|
* Additional metadata for the thread
|
|
2916
2917
|
*/
|
|
2917
|
-
metadata?:
|
|
2918
|
+
metadata?: JsonObject;
|
|
2918
2919
|
}
|
|
2919
2920
|
/**
|
|
2920
2921
|
* Configuration for a conversation
|
|
@@ -2931,7 +2932,7 @@ interface ConversationConfig {
|
|
|
2931
2932
|
/**
|
|
2932
2933
|
* Additional metadata
|
|
2933
2934
|
*/
|
|
2934
|
-
metadata?:
|
|
2935
|
+
metadata?: JsonObject;
|
|
2935
2936
|
}
|
|
2936
2937
|
/**
|
|
2937
2938
|
* Generate a unique thread ID.
|
|
@@ -4333,7 +4334,7 @@ declare class CircuitBreaker {
|
|
|
4333
4334
|
private halfOpenAttempts;
|
|
4334
4335
|
constructor(options: CircuitBreakerOptions);
|
|
4335
4336
|
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
4336
|
-
wrap<TArgs extends
|
|
4337
|
+
wrap<TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => Promise<TReturn>): (...args: TArgs) => Promise<TReturn>;
|
|
4337
4338
|
private onSuccess;
|
|
4338
4339
|
private onFailure;
|
|
4339
4340
|
private recordCall;
|
|
@@ -4440,7 +4441,7 @@ declare class Profiler {
|
|
|
4440
4441
|
private includeStack;
|
|
4441
4442
|
private maxSamples;
|
|
4442
4443
|
constructor(options?: ProfilerOptions);
|
|
4443
|
-
profile<TArgs extends
|
|
4444
|
+
profile<TArgs extends unknown[], TReturn>(name: string, fn: (...args: TArgs) => Promise<TReturn>): (...args: TArgs) => Promise<TReturn>;
|
|
4444
4445
|
wrap<T>(name: string, promise: Promise<T>): Promise<T>;
|
|
4445
4446
|
private recordSample;
|
|
4446
4447
|
getReport(): ProfileReport;
|
package/dist/index.d.ts
CHANGED
|
@@ -2351,6 +2351,7 @@ declare function withMetrics<State>(node: (state: State) => State | Promise<Stat
|
|
|
2351
2351
|
*
|
|
2352
2352
|
* Helpers for configuring and using LangSmith tracing with LangGraph.
|
|
2353
2353
|
*/
|
|
2354
|
+
|
|
2354
2355
|
/**
|
|
2355
2356
|
* LangSmith configuration options
|
|
2356
2357
|
*/
|
|
@@ -2379,7 +2380,7 @@ interface LangSmithConfig {
|
|
|
2379
2380
|
/**
|
|
2380
2381
|
* Additional metadata to include in all traces
|
|
2381
2382
|
*/
|
|
2382
|
-
metadata?:
|
|
2383
|
+
metadata?: JsonObject;
|
|
2383
2384
|
}
|
|
2384
2385
|
/**
|
|
2385
2386
|
* Configure LangSmith for tracing.
|
|
@@ -2423,7 +2424,7 @@ interface TracingOptions {
|
|
|
2423
2424
|
/**
|
|
2424
2425
|
* Additional metadata to include in the trace
|
|
2425
2426
|
*/
|
|
2426
|
-
metadata?:
|
|
2427
|
+
metadata?: JsonObject;
|
|
2427
2428
|
/**
|
|
2428
2429
|
* Tags to categorize the trace
|
|
2429
2430
|
*/
|
|
@@ -2914,7 +2915,7 @@ interface ThreadConfig {
|
|
|
2914
2915
|
/**
|
|
2915
2916
|
* Additional metadata for the thread
|
|
2916
2917
|
*/
|
|
2917
|
-
metadata?:
|
|
2918
|
+
metadata?: JsonObject;
|
|
2918
2919
|
}
|
|
2919
2920
|
/**
|
|
2920
2921
|
* Configuration for a conversation
|
|
@@ -2931,7 +2932,7 @@ interface ConversationConfig {
|
|
|
2931
2932
|
/**
|
|
2932
2933
|
* Additional metadata
|
|
2933
2934
|
*/
|
|
2934
|
-
metadata?:
|
|
2935
|
+
metadata?: JsonObject;
|
|
2935
2936
|
}
|
|
2936
2937
|
/**
|
|
2937
2938
|
* Generate a unique thread ID.
|
|
@@ -4333,7 +4334,7 @@ declare class CircuitBreaker {
|
|
|
4333
4334
|
private halfOpenAttempts;
|
|
4334
4335
|
constructor(options: CircuitBreakerOptions);
|
|
4335
4336
|
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
4336
|
-
wrap<TArgs extends
|
|
4337
|
+
wrap<TArgs extends unknown[], TReturn>(fn: (...args: TArgs) => Promise<TReturn>): (...args: TArgs) => Promise<TReturn>;
|
|
4337
4338
|
private onSuccess;
|
|
4338
4339
|
private onFailure;
|
|
4339
4340
|
private recordCall;
|
|
@@ -4440,7 +4441,7 @@ declare class Profiler {
|
|
|
4440
4441
|
private includeStack;
|
|
4441
4442
|
private maxSamples;
|
|
4442
4443
|
constructor(options?: ProfilerOptions);
|
|
4443
|
-
profile<TArgs extends
|
|
4444
|
+
profile<TArgs extends unknown[], TReturn>(name: string, fn: (...args: TArgs) => Promise<TReturn>): (...args: TArgs) => Promise<TReturn>;
|
|
4444
4445
|
wrap<T>(name: string, promise: Promise<T>): Promise<T>;
|
|
4445
4446
|
private recordSample;
|
|
4446
4447
|
getReport(): ProfileReport;
|
package/dist/index.js
CHANGED
|
@@ -3370,13 +3370,14 @@ function createThreadConfig(config = {}) {
|
|
|
3370
3370
|
}
|
|
3371
3371
|
function createConversationConfig(config) {
|
|
3372
3372
|
const { userId, sessionId, metadata = {} } = config;
|
|
3373
|
-
const
|
|
3373
|
+
const hasSessionId = sessionId !== void 0 && sessionId.length > 0;
|
|
3374
|
+
const threadId = hasSessionId ? generateThreadId(`${userId}-${sessionId}`) : generateThreadId(userId);
|
|
3374
3375
|
return createThreadConfig({
|
|
3375
3376
|
threadId,
|
|
3376
3377
|
metadata: {
|
|
3377
3378
|
...metadata,
|
|
3378
3379
|
userId,
|
|
3379
|
-
sessionId
|
|
3380
|
+
...hasSessionId ? { sessionId } : {}
|
|
3380
3381
|
}
|
|
3381
3382
|
});
|
|
3382
3383
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge/core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.85",
|
|
4
4
|
"description": "Production-ready TypeScript agent framework built on LangGraph with orchestration, middleware, and typed abstractions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|