@cognipeer/agent-sdk 0.2.9 → 0.3.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/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -915,6 +915,7 @@ function createTraceSession(opts) {
|
|
|
915
915
|
const sessionId = generateSessionId();
|
|
916
916
|
const runtime = {
|
|
917
917
|
sessionId,
|
|
918
|
+
threadId: opts.tracing?.threadId,
|
|
918
919
|
startedAt: Date.now(),
|
|
919
920
|
resolvedConfig: cfg,
|
|
920
921
|
events: [],
|
|
@@ -949,6 +950,7 @@ async function startStreamingSession(session, agentRuntime) {
|
|
|
949
950
|
const startedAtIso = new Date(session.startedAt).toISOString();
|
|
950
951
|
const payload = {
|
|
951
952
|
sessionId: session.sessionId,
|
|
953
|
+
threadId: session.threadId,
|
|
952
954
|
startedAt: startedAtIso,
|
|
953
955
|
agent: agentInfo,
|
|
954
956
|
config: configSnapshot
|
|
@@ -1130,6 +1132,7 @@ async function finalizeTraceSession(session, params = {}) {
|
|
|
1130
1132
|
const initialStatus = params.status ? params.status : session.errors.length > 0 ? "error" : "success";
|
|
1131
1133
|
const buildPayload = (status2) => ({
|
|
1132
1134
|
sessionId: session.sessionId,
|
|
1135
|
+
threadId: session.threadId,
|
|
1133
1136
|
startedAt: startedAtIso,
|
|
1134
1137
|
endedAt: endedAtIso,
|
|
1135
1138
|
durationMs,
|