@uselemma/tracing 7.13.1 → 7.15.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/README.md +82 -26
- package/dist/client.d.ts +80 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +278 -127
- package/dist/client.js.map +1 -1
- package/dist/coding-agent-backlog.d.ts +81 -0
- package/dist/coding-agent-backlog.d.ts.map +1 -0
- package/dist/coding-agent-backlog.js +239 -0
- package/dist/coding-agent-backlog.js.map +1 -0
- package/dist/coding-agent-delivery.d.ts +31 -0
- package/dist/coding-agent-delivery.d.ts.map +1 -0
- package/dist/coding-agent-delivery.js +97 -0
- package/dist/coding-agent-delivery.js.map +1 -0
- package/dist/coding-agent-queue.d.ts +74 -0
- package/dist/coding-agent-queue.d.ts.map +1 -0
- package/dist/coding-agent-queue.js +230 -0
- package/dist/coding-agent-queue.js.map +1 -0
- package/dist/coding-agent.d.ts +14 -0
- package/dist/coding-agent.d.ts.map +1 -1
- package/dist/coding-agent.js +52 -15
- package/dist/coding-agent.js.map +1 -1
- package/dist/debug-delivery.d.ts +0 -2
- package/dist/debug-delivery.d.ts.map +1 -1
- package/dist/debug-delivery.js +0 -19
- package/dist/debug-delivery.js.map +1 -1
- package/dist/debug-mode.d.ts.map +1 -1
- package/dist/debug-mode.js +4 -4
- package/dist/debug-mode.js.map +1 -1
- package/dist/delivery.d.ts +108 -0
- package/dist/delivery.d.ts.map +1 -0
- package/dist/delivery.js +266 -0
- package/dist/delivery.js.map +1 -0
- package/dist/dropped-traces.d.ts +16 -0
- package/dist/dropped-traces.d.ts.map +1 -0
- package/dist/dropped-traces.js +46 -0
- package/dist/dropped-traces.js.map +1 -0
- package/dist/env.d.ts +8 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +18 -0
- package/dist/env.js.map +1 -0
- package/dist/error-message.d.ts +10 -0
- package/dist/error-message.d.ts.map +1 -1
- package/dist/error-message.js +14 -0
- package/dist/error-message.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/integration-client.d.ts +20 -0
- package/dist/integration-client.d.ts.map +1 -0
- package/dist/integration-client.js +47 -0
- package/dist/integration-client.js.map +1 -0
- package/dist/langchain-context.d.ts +7 -0
- package/dist/langchain-context.d.ts.map +1 -0
- package/dist/langchain-context.js +28 -0
- package/dist/langchain-context.js.map +1 -0
- package/dist/langchain-eviction.d.ts +42 -0
- package/dist/langchain-eviction.d.ts.map +1 -0
- package/dist/langchain-eviction.js +56 -0
- package/dist/langchain-eviction.js.map +1 -0
- package/dist/langchain.d.ts +31 -13
- package/dist/langchain.d.ts.map +1 -1
- package/dist/langchain.js +74 -109
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.d.ts +9 -11
- package/dist/mastra.d.ts.map +1 -1
- package/dist/mastra.js +40 -25
- package/dist/mastra.js.map +1 -1
- package/dist/openai-agents.d.ts +8 -0
- package/dist/openai-agents.d.ts.map +1 -1
- package/dist/openai-agents.js +17 -14
- package/dist/openai-agents.js.map +1 -1
- package/dist/serialize.d.ts +17 -0
- package/dist/serialize.d.ts.map +1 -0
- package/dist/serialize.js +143 -0
- package/dist/serialize.js.map +1 -0
- package/dist/stream-result.d.ts +33 -0
- package/dist/stream-result.d.ts.map +1 -0
- package/dist/stream-result.js +135 -0
- package/dist/stream-result.js.map +1 -0
- package/dist/vercel-ai-events.d.ts +308 -0
- package/dist/vercel-ai-events.d.ts.map +1 -0
- package/dist/vercel-ai-events.js +340 -0
- package/dist/vercel-ai-events.js.map +1 -0
- package/dist/vercel-ai-run.d.ts +171 -0
- package/dist/vercel-ai-run.d.ts.map +1 -0
- package/dist/vercel-ai-run.js +650 -0
- package/dist/vercel-ai-run.js.map +1 -0
- package/dist/vercel-ai.d.ts +36 -108
- package/dist/vercel-ai.d.ts.map +1 -1
- package/dist/vercel-ai.js +185 -882
- package/dist/vercel-ai.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/examples/vercel-ai-v6.ts +2 -2
- package/examples/vercel-ai-v7.ts +14 -16
- package/package.json +1 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapReturnedStream = wrapReturnedStream;
|
|
4
|
+
exports.holdTraceForStream = holdTraceForStream;
|
|
5
|
+
const debug_mode_1 = require("./debug-mode");
|
|
6
|
+
/**
|
|
7
|
+
* A callback's returned stream, wrapped so the trace can wait for it.
|
|
8
|
+
*
|
|
9
|
+
* Only a plain, unlocked `ReadableStream` and a native async generator are
|
|
10
|
+
* wrapped: every way of reading them goes through the wrapper, and the
|
|
11
|
+
* wrapper has the same type. Anything else, such as a `ReadableStream`
|
|
12
|
+
* subclass with its own methods or an object that is async iterable, comes
|
|
13
|
+
* back undefined, since a wrapper would either change its type or miss reads
|
|
14
|
+
* made through its own methods.
|
|
15
|
+
*/
|
|
16
|
+
function wrapReturnedStream(value) {
|
|
17
|
+
const kind = streamKind(value);
|
|
18
|
+
if (!kind)
|
|
19
|
+
return undefined;
|
|
20
|
+
let settle;
|
|
21
|
+
const ended = new Promise((resolve) => {
|
|
22
|
+
settle = resolve;
|
|
23
|
+
});
|
|
24
|
+
// Every exit path reports its outcome here; only the first one counts.
|
|
25
|
+
let finished = false;
|
|
26
|
+
const finish = (failure) => {
|
|
27
|
+
if (finished)
|
|
28
|
+
return;
|
|
29
|
+
finished = true;
|
|
30
|
+
settle(failure);
|
|
31
|
+
};
|
|
32
|
+
const stream = kind === "readable"
|
|
33
|
+
? readableEndingWith(value, finish)
|
|
34
|
+
: iterate(value, finish);
|
|
35
|
+
return { stream: stream, ended };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Keeps a callback trace open while the stream its callback returned is
|
|
39
|
+
* read, and sends it with `send` once the stream ends, marked failed if the
|
|
40
|
+
* stream failed. The stream isn't recorded as the root output. Undefined
|
|
41
|
+
* when `value` isn't a stream that can be wrapped.
|
|
42
|
+
*/
|
|
43
|
+
function holdTraceForStream(value, context, send) {
|
|
44
|
+
const wrapped = wrapReturnedStream(value);
|
|
45
|
+
if (!wrapped)
|
|
46
|
+
return undefined;
|
|
47
|
+
const sent = wrapped.ended.then((failure) => {
|
|
48
|
+
if (failure)
|
|
49
|
+
context.fail(failure.error);
|
|
50
|
+
return send();
|
|
51
|
+
});
|
|
52
|
+
(0, debug_mode_1.lemmaDebug)("client", "trace stays open until the returned stream ends", {
|
|
53
|
+
traceId: context.id,
|
|
54
|
+
});
|
|
55
|
+
return { stream: wrapped.stream, sent };
|
|
56
|
+
}
|
|
57
|
+
function streamKind(value) {
|
|
58
|
+
if (typeof value !== "object" || value === null)
|
|
59
|
+
return undefined;
|
|
60
|
+
try {
|
|
61
|
+
if (typeof ReadableStream !== "undefined" &&
|
|
62
|
+
Object.getPrototypeOf(value) === ReadableStream.prototype &&
|
|
63
|
+
!value.locked) {
|
|
64
|
+
return "readable";
|
|
65
|
+
}
|
|
66
|
+
if (Object.prototype.toString.call(value) === "[object AsyncGenerator]") {
|
|
67
|
+
return "generator";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// A proxy whose traps throw is not a stream this can wrap.
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
function readableEndingWith(source, finish) {
|
|
76
|
+
const reader = source.getReader();
|
|
77
|
+
return new ReadableStream({
|
|
78
|
+
async pull(controller) {
|
|
79
|
+
// A rejected pull errors the wrapper with the same reason.
|
|
80
|
+
const chunk = await reader.read().catch((error) => {
|
|
81
|
+
finish({ error });
|
|
82
|
+
throw error;
|
|
83
|
+
});
|
|
84
|
+
if (chunk.done) {
|
|
85
|
+
finish(undefined);
|
|
86
|
+
controller.close();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
controller.enqueue(chunk.value);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
async cancel(reason) {
|
|
93
|
+
finish(undefined);
|
|
94
|
+
await reader.cancel(reason);
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
// Reads from the source only when the caller reads.
|
|
98
|
+
{ highWaterMark: 0 });
|
|
99
|
+
}
|
|
100
|
+
function iterate(source, finish) {
|
|
101
|
+
let started = false;
|
|
102
|
+
const wrapper = (async function* () {
|
|
103
|
+
started = true;
|
|
104
|
+
try {
|
|
105
|
+
return yield* source;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
finish({ error });
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
finally {
|
|
112
|
+
finish(undefined);
|
|
113
|
+
}
|
|
114
|
+
})();
|
|
115
|
+
// A generator closed before its first read never runs its body, so the
|
|
116
|
+
// trace ends and the source closes here instead.
|
|
117
|
+
const close = wrapper.return;
|
|
118
|
+
const raise = wrapper.throw;
|
|
119
|
+
wrapper.return = async (value) => {
|
|
120
|
+
if (!started) {
|
|
121
|
+
finish(undefined);
|
|
122
|
+
await source.return(await value);
|
|
123
|
+
}
|
|
124
|
+
return close.call(wrapper, value);
|
|
125
|
+
};
|
|
126
|
+
wrapper.throw = async (error) => {
|
|
127
|
+
if (!started) {
|
|
128
|
+
finish({ error });
|
|
129
|
+
await source.return(undefined);
|
|
130
|
+
}
|
|
131
|
+
return raise.call(wrapper, error);
|
|
132
|
+
};
|
|
133
|
+
return wrapper;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=stream-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-result.js","sourceRoot":"","sources":["../src/stream-result.ts"],"names":[],"mappings":";;AAuBA,gDAmBC;AAQD,gDAeC;AAhED,6CAA0C;AAY1C;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAI,KAAQ;IAC5C,MAAM,I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,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI SDK 6 and 7 telemetry event shapes, and the pure functions that turn
|
|
3
|
+
* them into Lemma trace fields.
|
|
4
|
+
*/
|
|
5
|
+
import type { TraceContext } from "./client";
|
|
6
|
+
import type { IntegrationClientOptions } from "./integration-client";
|
|
7
|
+
import { type TokenUsage } from "./usage";
|
|
8
|
+
export type MaybePromise<T> = T | PromiseLike<T>;
|
|
9
|
+
export type VercelAIModelCallStartEvent = {
|
|
10
|
+
callId: string;
|
|
11
|
+
provider: string;
|
|
12
|
+
modelId: string;
|
|
13
|
+
messages?: unknown[];
|
|
14
|
+
tools?: ReadonlyArray<Record<string, unknown>>;
|
|
15
|
+
};
|
|
16
|
+
export type VercelAIModelCallEndEvent = {
|
|
17
|
+
callId: string;
|
|
18
|
+
provider: string;
|
|
19
|
+
modelId: string;
|
|
20
|
+
content: ReadonlyArray<unknown>;
|
|
21
|
+
finishReason?: string;
|
|
22
|
+
performance: {
|
|
23
|
+
responseTimeMs?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Token usage when the AI SDK / provider exposes it on the finish event.
|
|
27
|
+
* Not reliably present on all AI SDK versions today — extract when set.
|
|
28
|
+
*/
|
|
29
|
+
usage?: unknown;
|
|
30
|
+
};
|
|
31
|
+
export type VercelAIEndEvent = {
|
|
32
|
+
callId?: string;
|
|
33
|
+
text?: string;
|
|
34
|
+
content?: ReadonlyArray<unknown>;
|
|
35
|
+
functionId?: string;
|
|
36
|
+
metadata?: Record<string, unknown>;
|
|
37
|
+
runtimeContext?: Record<string, unknown>;
|
|
38
|
+
error?: unknown;
|
|
39
|
+
finishReason?: string;
|
|
40
|
+
/** Optional usage when a future AI SDK finish payload includes it. */
|
|
41
|
+
usage?: unknown;
|
|
42
|
+
totalUsage?: unknown;
|
|
43
|
+
};
|
|
44
|
+
export type VercelAIToolExecutionEndEvent = {
|
|
45
|
+
callId?: string;
|
|
46
|
+
toolCall: {
|
|
47
|
+
toolCallId?: string;
|
|
48
|
+
toolName: string;
|
|
49
|
+
input?: unknown;
|
|
50
|
+
};
|
|
51
|
+
toolExecutionMs?: number;
|
|
52
|
+
toolOutput: {
|
|
53
|
+
type: "tool-result";
|
|
54
|
+
output?: unknown;
|
|
55
|
+
} | {
|
|
56
|
+
type: "tool-error";
|
|
57
|
+
error?: unknown;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type VercelAIToolExecutionStartEvent = {
|
|
61
|
+
callId?: string;
|
|
62
|
+
toolCall: {
|
|
63
|
+
toolCallId?: string;
|
|
64
|
+
toolName: string;
|
|
65
|
+
input?: unknown;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type VercelAIStepStartEvent = {
|
|
69
|
+
callId: string;
|
|
70
|
+
provider: string;
|
|
71
|
+
modelId: string;
|
|
72
|
+
stepNumber: number;
|
|
73
|
+
/** AI SDK 7 `instructions`; `system` is the deprecated alias. */
|
|
74
|
+
instructions?: unknown;
|
|
75
|
+
system?: string;
|
|
76
|
+
messages?: unknown[];
|
|
77
|
+
tools?: unknown;
|
|
78
|
+
functionId?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
runtimeContext?: Record<string, unknown>;
|
|
81
|
+
};
|
|
82
|
+
export type VercelAIStepEndEvent = {
|
|
83
|
+
callId: string;
|
|
84
|
+
stepNumber: number;
|
|
85
|
+
model: VercelAIV6ModelInfo;
|
|
86
|
+
text?: string;
|
|
87
|
+
content?: ReadonlyArray<unknown>;
|
|
88
|
+
performance?: {
|
|
89
|
+
stepTimeMs?: number;
|
|
90
|
+
responseTimeMs?: number;
|
|
91
|
+
toolExecutionMs?: Readonly<Record<string, number>>;
|
|
92
|
+
};
|
|
93
|
+
toolCalls?: ReadonlyArray<{
|
|
94
|
+
toolCallId?: string;
|
|
95
|
+
toolName?: string;
|
|
96
|
+
input?: unknown;
|
|
97
|
+
}>;
|
|
98
|
+
error?: unknown;
|
|
99
|
+
finishReason?: string;
|
|
100
|
+
/** Optional usage when present on step end. */
|
|
101
|
+
usage?: unknown;
|
|
102
|
+
totalUsage?: unknown;
|
|
103
|
+
};
|
|
104
|
+
type VercelAIV6ModelInfo = {
|
|
105
|
+
provider: string;
|
|
106
|
+
modelId: string;
|
|
107
|
+
};
|
|
108
|
+
export type VercelAIV6StepStartEvent = {
|
|
109
|
+
stepNumber: number;
|
|
110
|
+
model: VercelAIV6ModelInfo;
|
|
111
|
+
instructions?: unknown;
|
|
112
|
+
system?: string;
|
|
113
|
+
messages?: unknown[];
|
|
114
|
+
tools?: unknown;
|
|
115
|
+
functionId?: string;
|
|
116
|
+
metadata?: Record<string, unknown>;
|
|
117
|
+
};
|
|
118
|
+
export type VercelAIV6StepFinishEvent = {
|
|
119
|
+
stepNumber: number;
|
|
120
|
+
model: VercelAIV6ModelInfo;
|
|
121
|
+
text?: string;
|
|
122
|
+
content?: ReadonlyArray<unknown>;
|
|
123
|
+
functionId?: string;
|
|
124
|
+
metadata?: Record<string, unknown>;
|
|
125
|
+
error?: unknown;
|
|
126
|
+
finishReason?: string;
|
|
127
|
+
/** Optional usage when present on step finish. */
|
|
128
|
+
usage?: unknown;
|
|
129
|
+
totalUsage?: unknown;
|
|
130
|
+
};
|
|
131
|
+
export type VercelAIStartEvent = {
|
|
132
|
+
/** AI SDK 7 only: the operation's ID, on every event of the run. */
|
|
133
|
+
callId?: string;
|
|
134
|
+
model: VercelAIV6ModelInfo;
|
|
135
|
+
/** AI SDK 6 only: the caller's signal, the one way v6 reveals an abort. */
|
|
136
|
+
abortSignal?: AbortSignal;
|
|
137
|
+
/** AI SDK 7 `instructions`; `system` is the deprecated alias. */
|
|
138
|
+
instructions?: unknown;
|
|
139
|
+
system?: string;
|
|
140
|
+
prompt?: string | unknown[];
|
|
141
|
+
messages?: unknown[];
|
|
142
|
+
tools?: unknown;
|
|
143
|
+
functionId?: string;
|
|
144
|
+
metadata?: Record<string, unknown>;
|
|
145
|
+
/**
|
|
146
|
+
* AI SDK 7 only: the call's runtime context, holding just the keys
|
|
147
|
+
* `telemetry.includeRuntimeContext` sets to `true`.
|
|
148
|
+
*/
|
|
149
|
+
runtimeContext?: Record<string, unknown>;
|
|
150
|
+
};
|
|
151
|
+
export type VercelAIV6FinishEvent = {
|
|
152
|
+
model: VercelAIV6ModelInfo;
|
|
153
|
+
text?: string;
|
|
154
|
+
content?: ReadonlyArray<unknown>;
|
|
155
|
+
functionId?: string;
|
|
156
|
+
metadata?: Record<string, unknown>;
|
|
157
|
+
error?: unknown;
|
|
158
|
+
finishReason?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Token usage when the AI SDK finish payload includes it. Often omitted on
|
|
161
|
+
* AI SDK 6 `experimental_telemetry` even when `generateText` returns tokens.
|
|
162
|
+
*/
|
|
163
|
+
usage?: unknown;
|
|
164
|
+
totalUsage?: unknown;
|
|
165
|
+
};
|
|
166
|
+
export type VercelAIV6ToolCallFinishEvent = {
|
|
167
|
+
toolCall: {
|
|
168
|
+
toolCallId?: string;
|
|
169
|
+
toolName: string;
|
|
170
|
+
input?: unknown;
|
|
171
|
+
};
|
|
172
|
+
durationMs?: number;
|
|
173
|
+
} & ({
|
|
174
|
+
success: true;
|
|
175
|
+
output?: unknown;
|
|
176
|
+
error?: never;
|
|
177
|
+
} | {
|
|
178
|
+
success: false;
|
|
179
|
+
output?: never;
|
|
180
|
+
error?: unknown;
|
|
181
|
+
});
|
|
182
|
+
/** Every terminal shape (v7 end, v6 finish, shutdown()) fits it. */
|
|
183
|
+
export type TerminalEvent = VercelAIEndEvent;
|
|
184
|
+
export declare function finishReasonError(event: {
|
|
185
|
+
finishReason?: string;
|
|
186
|
+
}): string | undefined;
|
|
187
|
+
type OutcomeEvent = {
|
|
188
|
+
text?: string;
|
|
189
|
+
content?: ReadonlyArray<unknown>;
|
|
190
|
+
error?: unknown;
|
|
191
|
+
finishReason?: string;
|
|
192
|
+
};
|
|
193
|
+
/** The assistant output a step, model call or run ended with. */
|
|
194
|
+
export declare function eventOutput(event: OutcomeEvent): unknown;
|
|
195
|
+
/**
|
|
196
|
+
* Output and error fields for an ended generation. A thrown error replaces
|
|
197
|
+
* the output; an "error" finish reason keeps the partial output.
|
|
198
|
+
*/
|
|
199
|
+
export declare function generationOutcome(event: OutcomeEvent): {
|
|
200
|
+
output: unknown;
|
|
201
|
+
llmOutputMessages: {
|
|
202
|
+
role: string;
|
|
203
|
+
content: {} | null;
|
|
204
|
+
}[] | undefined;
|
|
205
|
+
error: {} | undefined;
|
|
206
|
+
};
|
|
207
|
+
export declare function errorName(value: unknown): unknown;
|
|
208
|
+
/**
|
|
209
|
+
* Whether an error a call threw means the caller stopped it: fetch and the AI
|
|
210
|
+
* SDK raise `AbortError`, and Next.js aborts a disconnected request with
|
|
211
|
+
* `ResponseAborted`. A `TimeoutError` is a failure.
|
|
212
|
+
*/
|
|
213
|
+
export declare function isCallerStop(error: unknown): boolean;
|
|
214
|
+
/** AI SDK 7 calls onError with `{ callId, error }`. */
|
|
215
|
+
export declare function reportedError(event: unknown): unknown;
|
|
216
|
+
export declare function addMs(startedAt: Date, durationMs: number | undefined): Date;
|
|
217
|
+
export declare function subtractMs(endedAt: Date, durationMs: number | undefined): Date;
|
|
218
|
+
export declare function isV7StepStart(event: VercelAIStepStartEvent | VercelAIV6StepStartEvent): event is VercelAIStepStartEvent;
|
|
219
|
+
/** AI SDK 7 step results carry the operation's callId; v6 ones don't. */
|
|
220
|
+
export declare function isV7StepEnd(event: VercelAIStepEndEvent | VercelAIV6StepFinishEvent): event is VercelAIStepEndEvent;
|
|
221
|
+
export declare function toolOutput(event: VercelAIToolExecutionEndEvent): {
|
|
222
|
+
error: unknown;
|
|
223
|
+
status: "ERROR";
|
|
224
|
+
} | {
|
|
225
|
+
output: unknown;
|
|
226
|
+
};
|
|
227
|
+
export declare function v6ToolOutput(event: VercelAIV6ToolCallFinishEvent): {
|
|
228
|
+
error: unknown;
|
|
229
|
+
status: "ERROR";
|
|
230
|
+
} | {
|
|
231
|
+
output: unknown;
|
|
232
|
+
};
|
|
233
|
+
export declare function resolveDurationMs(startedAt: Date, endedAt: Date, reportedMs: number | undefined): number;
|
|
234
|
+
/** Prefer AI SDK 7 `instructions`; fall back to deprecated `system`. */
|
|
235
|
+
export declare function siblingSystem(event: unknown): string | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Use this event's instructions/system. If it has none, trust a leading
|
|
238
|
+
* system message instead of stamping a stale onStart playbook.
|
|
239
|
+
*/
|
|
240
|
+
export declare function resolveSystemForMessages(event: unknown, messages: unknown[] | undefined, fallbackSystem?: string): string | undefined;
|
|
241
|
+
/** Prepend a sibling `system` string onto a message list unless already present. */
|
|
242
|
+
export declare function withSystemMessage(system: string | undefined, messages: unknown[] | undefined): unknown[] | undefined;
|
|
243
|
+
/** Normalize v6 system/prompt/messages into a chat message list when possible. */
|
|
244
|
+
export declare function v6NormalizedMessages(event: VercelAIV6StepStartEvent | VercelAIStartEvent, fallbackSystem?: string): unknown[] | undefined;
|
|
245
|
+
export declare function v6Input(event: VercelAIV6StepStartEvent | VercelAIStartEvent, fallbackSystem?: string): string | unknown[] | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* Prefer the current user turn for the Lemma root input.
|
|
248
|
+
* Accepts a bare string, message array, or prompt/system start payload.
|
|
249
|
+
*/
|
|
250
|
+
export declare function rootTraceInput(input: unknown): unknown;
|
|
251
|
+
/** Any event that can open a run. */
|
|
252
|
+
export type RunStartEvent = VercelAIStartEvent | VercelAIStepStartEvent | VercelAIV6StepStartEvent | VercelAIModelCallStartEvent;
|
|
253
|
+
export declare function eventTraceInput(event?: RunStartEvent): string | unknown[] | undefined;
|
|
254
|
+
/** Any event that can start or end a run's managed trace. */
|
|
255
|
+
export type RunEvent = RunStartEvent | VercelAIV6FinishEvent | VercelAIEndEvent;
|
|
256
|
+
export declare function eventMetadata(event?: RunEvent): Record<string, unknown> | undefined;
|
|
257
|
+
export type Identity = {
|
|
258
|
+
threadId?: string;
|
|
259
|
+
userId?: string;
|
|
260
|
+
};
|
|
261
|
+
/** The threadId and userId in `sources`, under the configured keys. */
|
|
262
|
+
export declare function readIdentity(sources: Array<Record<string, unknown> | undefined>, options: Pick<VercelAIIntegrationOptions, "threadIdKey" | "userIdKey">): Identity;
|
|
263
|
+
/**
|
|
264
|
+
* The call's own threadId and userId, from the AI SDK 7 runtime context or
|
|
265
|
+
* AI SDK 6 telemetry metadata.
|
|
266
|
+
*/
|
|
267
|
+
export declare function eventIdentity(event: RunEvent | undefined, options: Pick<VercelAIIntegrationOptions, "threadIdKey" | "userIdKey">): Identity;
|
|
268
|
+
export declare function traceName(agentName: string | undefined, event?: RunEvent): string;
|
|
269
|
+
/** Extract usage from a finish/end event when the AI SDK exposes it. */
|
|
270
|
+
export declare function eventUsage(event: {
|
|
271
|
+
usage?: unknown;
|
|
272
|
+
totalUsage?: unknown;
|
|
273
|
+
}): TokenUsage | undefined;
|
|
274
|
+
export declare function withIntegrationAttrs(attributes?: Record<string, unknown>): Record<string, unknown>;
|
|
275
|
+
/** Key for events without a callId: AI SDK 6 runs and caller-side calls. */
|
|
276
|
+
export declare const UNKEYED_RUN: undefined;
|
|
277
|
+
/**
|
|
278
|
+
* The run an event belongs to. AI SDK 7 puts the operation's callId on every
|
|
279
|
+
* event; AI SDK 6 sends none, so its runs share one key.
|
|
280
|
+
*/
|
|
281
|
+
export declare function runKey(event: unknown): string | undefined;
|
|
282
|
+
export type VercelAIIntegrationOptions = IntegrationClientOptions & {
|
|
283
|
+
trace?: TraceContext;
|
|
284
|
+
agentName?: string;
|
|
285
|
+
generationName?: string | ((event: VercelAIModelCallEndEvent | VercelAIV6StepFinishEvent | VercelAIV6FinishEvent) => string);
|
|
286
|
+
toolName?: string | ((event: VercelAIToolExecutionEndEvent | VercelAIV6ToolCallFinishEvent) => string);
|
|
287
|
+
/**
|
|
288
|
+
* Metadata recorded on every trace. Its `threadId` and `userId` apply to
|
|
289
|
+
* calls that don't set their own: through `runtimeContext` on AI SDK v7,
|
|
290
|
+
* or `experimental_telemetry.metadata` on v6, which is also merged over
|
|
291
|
+
* this metadata.
|
|
292
|
+
*/
|
|
293
|
+
metadata?: Record<string, unknown>;
|
|
294
|
+
/**
|
|
295
|
+
* Key looked up for threadId in the call's `runtimeContext` or telemetry
|
|
296
|
+
* metadata, then in this integration's metadata. Default: `threadId`. On
|
|
297
|
+
* AI SDK v7, `telemetry.includeRuntimeContext` must set it to `true`.
|
|
298
|
+
*/
|
|
299
|
+
threadIdKey?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Key looked up for userId in the call's `runtimeContext` or telemetry
|
|
302
|
+
* metadata, then in this integration's metadata. Default: `userId`. On
|
|
303
|
+
* AI SDK v7, `telemetry.includeRuntimeContext` must set it to `true`.
|
|
304
|
+
*/
|
|
305
|
+
userIdKey?: string;
|
|
306
|
+
};
|
|
307
|
+
export {};
|
|
308
|
+
//# sourceMappingURL=vercel-ai-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-ai-events.d.ts","sourceRoot":"","sources":["../src/vercel-ai-events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAM/D,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEjD,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;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