@agentforge/core 0.16.84 → 0.16.86
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 +5 -4
- package/dist/index.d.ts +5 -4
- 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.
|
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.
|
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.86",
|
|
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",
|