@anvia/core 1.3.2 → 1.5.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 +30 -6
- package/dist/agent/agent.js +14 -14
- package/dist/agent/index.d.ts +5 -5
- package/dist/agent/index.js +17 -17
- package/dist/agent/resolve-options.js +5 -5
- package/dist/agent/resolved-agent.js +15 -15
- package/dist/agent/team/agent-team.js +17 -17
- package/dist/agent/team/index.js +17 -17
- package/dist/agent/tool-catalog.js +4 -4
- package/dist/{agent-D3iyrJQb.d.ts → agent-BUc18r6A.d.ts} +6 -2
- package/dist/{chunk-T4UW4SUK.js → chunk-35GMQS3R.js} +3 -3
- package/dist/{chunk-A3DGCDGF.js → chunk-AYN34XVW.js} +11 -11
- package/dist/{chunk-ZGDUEOSH.js → chunk-DXW37JLZ.js} +4 -4
- package/dist/{chunk-4BDSO4PQ.js → chunk-F4BOW76L.js} +2 -2
- package/dist/{chunk-GE46NHN4.js → chunk-FGOVEUVK.js} +37 -27
- package/dist/chunk-FGOVEUVK.js.map +1 -0
- package/dist/{chunk-VKRGWGA4.js → chunk-I7YCEQXT.js} +3 -3
- package/dist/{chunk-IYDGPF3C.js → chunk-MTJDYC6T.js} +3 -3
- package/dist/{chunk-KRUDSNFN.js → chunk-UEUSJ3UQ.js} +8 -8
- package/dist/{chunk-WCWSPU74.js → chunk-UYODZ7OE.js} +3 -3
- package/dist/{chunk-K4IBS7VB.js → chunk-WLUWRBQ4.js} +22 -8
- package/dist/chunk-WLUWRBQ4.js.map +1 -0
- package/dist/{chunk-JWD43K7W.js → chunk-XAVSWLX5.js} +4 -4
- package/dist/{chunk-KNZNSNP4.js → chunk-ZQC6M22O.js} +2 -2
- package/dist/evals/index.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -22
- package/dist/internal/agent-runtime/agent-run.js +10 -10
- package/dist/internal/agent-runtime/memory.js +1 -1
- package/dist/internal/agent-runtime/retrieval.js +2 -2
- package/dist/internal/agent-runtime/tool-execution.js +4 -4
- package/dist/internal/agent.d.ts +3 -3
- package/dist/internal/agent.js +15 -15
- package/dist/internal/team-runtime/run.js +16 -16
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/index.js +1 -1
- package/dist/memory/options.js +1 -1
- package/dist/{middleware-DORuwSy-.d.ts → middleware-BxzML2hK.d.ts} +1 -1
- package/dist/observability/index.d.ts +2 -2
- package/dist/pipeline/index.d.ts +3 -3
- package/dist/pipeline/index.js +2 -2
- package/dist/pipeline/pipeline.js +2 -2
- package/dist/redaction/index.d.ts +39 -0
- package/dist/redaction/index.js +139 -0
- package/dist/redaction/index.js.map +1 -0
- package/dist/skills/index.js +4 -4
- package/dist/skills/load.js +4 -4
- package/dist/skills/tools.js +4 -4
- package/dist/tool/dynamic-tools.js +3 -3
- package/dist/tool/index.d.ts +2 -2
- package/dist/tool/index.js +6 -6
- package/dist/{types-DhWxTobb.d.ts → types-B8KBVXuH.d.ts} +20 -5
- package/dist/vector-store/index.js +5 -5
- package/package.json +5 -1
- package/dist/chunk-GE46NHN4.js.map +0 -1
- package/dist/chunk-K4IBS7VB.js.map +0 -1
- /package/dist/{chunk-T4UW4SUK.js.map → chunk-35GMQS3R.js.map} +0 -0
- /package/dist/{chunk-A3DGCDGF.js.map → chunk-AYN34XVW.js.map} +0 -0
- /package/dist/{chunk-ZGDUEOSH.js.map → chunk-DXW37JLZ.js.map} +0 -0
- /package/dist/{chunk-4BDSO4PQ.js.map → chunk-F4BOW76L.js.map} +0 -0
- /package/dist/{chunk-VKRGWGA4.js.map → chunk-I7YCEQXT.js.map} +0 -0
- /package/dist/{chunk-IYDGPF3C.js.map → chunk-MTJDYC6T.js.map} +0 -0
- /package/dist/{chunk-KRUDSNFN.js.map → chunk-UEUSJ3UQ.js.map} +0 -0
- /package/dist/{chunk-WCWSPU74.js.map → chunk-UYODZ7OE.js.map} +0 -0
- /package/dist/{chunk-JWD43K7W.js.map → chunk-XAVSWLX5.js.map} +0 -0
- /package/dist/{chunk-KNZNSNP4.js.map → chunk-ZQC6M22O.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InMemoryVectorStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XAVSWLX5.js";
|
|
4
4
|
import {
|
|
5
5
|
retrieveDocuments
|
|
6
6
|
} from "./chunk-HAAGSIZH.js";
|
|
@@ -108,4 +108,4 @@ export {
|
|
|
108
108
|
createToolIndex,
|
|
109
109
|
isToolIndex
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=chunk-
|
|
111
|
+
//# sourceMappingURL=chunk-F4BOW76L.js.map
|
|
@@ -162,7 +162,7 @@ var AgentRunMemory = class {
|
|
|
162
162
|
snapshot.messages,
|
|
163
163
|
incomingMessages,
|
|
164
164
|
options.trigger.afterTokens,
|
|
165
|
-
options.retention
|
|
165
|
+
options.retention,
|
|
166
166
|
options.tokenCounter,
|
|
167
167
|
force
|
|
168
168
|
);
|
|
@@ -249,7 +249,7 @@ var AgentRunMemory = class {
|
|
|
249
249
|
throw new MemoryCompactionConflictError(maxAttempts, usage);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
async function selectCompactionPrefix(messages, incomingMessages, afterTokens,
|
|
252
|
+
async function selectCompactionPrefix(messages, incomingMessages, afterTokens, retention, tokenCounter, force) {
|
|
253
253
|
const originalTokenCount = await countTokens(tokenCounter, messages);
|
|
254
254
|
const incomingTokenCount = incomingMessages.length === 0 ? 0 : await countTokens(tokenCounter, incomingMessages);
|
|
255
255
|
const none = {
|
|
@@ -264,31 +264,42 @@ async function selectCompactionPrefix(messages, incomingMessages, afterTokens, r
|
|
|
264
264
|
const userMessageIndexes = messages.flatMap(
|
|
265
265
|
(message, index) => message.role === "user" ? [index] : []
|
|
266
266
|
);
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
267
|
+
let compactedMessageCount;
|
|
268
|
+
let retainedTokenCount;
|
|
269
|
+
if (retention.recentTurns !== void 0) {
|
|
270
|
+
if (userMessageIndexes.length <= retention.recentTurns) {
|
|
271
|
+
return none;
|
|
272
|
+
}
|
|
273
|
+
compactedMessageCount = retention.recentTurns === 0 ? messages.length : userMessageIndexes[userMessageIndexes.length - retention.recentTurns] ?? 0;
|
|
274
|
+
retainedTokenCount = await countTokens(tokenCounter, messages.slice(compactedMessageCount));
|
|
275
|
+
} else {
|
|
276
|
+
if (userMessageIndexes.length <= 1) {
|
|
277
|
+
return none;
|
|
278
|
+
}
|
|
279
|
+
const tailTokenCounts = /* @__PURE__ */ new Map();
|
|
280
|
+
const countTail = async (messageIndex) => {
|
|
281
|
+
const cached = tailTokenCounts.get(messageIndex);
|
|
282
|
+
if (cached !== void 0) return cached;
|
|
283
|
+
const count = await countTokens(tokenCounter, messages.slice(messageIndex));
|
|
284
|
+
tailTokenCounts.set(messageIndex, count);
|
|
285
|
+
return count;
|
|
286
|
+
};
|
|
287
|
+
let lower = 0;
|
|
288
|
+
let upper = userMessageIndexes.length - 1;
|
|
289
|
+
let retainedBoundary = upper;
|
|
290
|
+
while (lower <= upper) {
|
|
291
|
+
const middle = Math.floor((lower + upper) / 2);
|
|
292
|
+
const candidate = userMessageIndexes[middle] ?? 0;
|
|
293
|
+
if (await countTail(candidate) <= retention.recentTokens) {
|
|
294
|
+
retainedBoundary = middle;
|
|
295
|
+
upper = middle - 1;
|
|
296
|
+
} else {
|
|
297
|
+
lower = middle + 1;
|
|
298
|
+
}
|
|
289
299
|
}
|
|
300
|
+
compactedMessageCount = userMessageIndexes[retainedBoundary] ?? 0;
|
|
301
|
+
retainedTokenCount = tailTokenCounts.get(compactedMessageCount) ?? await countTokens(tokenCounter, messages.slice(compactedMessageCount));
|
|
290
302
|
}
|
|
291
|
-
const compactedMessageCount = userMessageIndexes[retainedBoundary] ?? 0;
|
|
292
303
|
if (compactedMessageCount === 0) {
|
|
293
304
|
return none;
|
|
294
305
|
}
|
|
@@ -296,7 +307,6 @@ async function selectCompactionPrefix(messages, incomingMessages, afterTokens, r
|
|
|
296
307
|
tokenCounter,
|
|
297
308
|
messages.slice(0, compactedMessageCount)
|
|
298
309
|
);
|
|
299
|
-
const retainedTokenCount = tailTokenCounts.get(compactedMessageCount) ?? await countTokens(tokenCounter, messages.slice(compactedMessageCount));
|
|
300
310
|
return {
|
|
301
311
|
compactedMessageCount,
|
|
302
312
|
originalTokenCount,
|
|
@@ -339,4 +349,4 @@ function isEmptyUsage(usage) {
|
|
|
339
349
|
export {
|
|
340
350
|
AgentRunMemory
|
|
341
351
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
352
|
+
//# sourceMappingURL=chunk-FGOVEUVK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/internal/agent-runtime/memory.ts"],"sourcesContent":["import type { Agent } from \"../../agent/agent\";\nimport type { AgentMemory } from \"../../agent/types\";\nimport { type Message as MessageType, Usage } from \"../../completion/index\";\nimport {\n createMemoryCompactionSummary,\n cumulativeCompactedMessageCount,\n} from \"../../memory/compaction\";\nimport { MemoryCompactionConflictError, MemoryCompactionError } from \"../../memory/errors\";\nimport type {\n MemoryCompactionInfo,\n MemoryCompactionResult,\n MemorySavePolicy,\n MemoryScope,\n MemoryTokenCounter,\n} from \"../../memory/types\";\nimport { throwIfAborted } from \"../abort\";\n\nexport type MemoryPreparation = {\n history: MessageType[];\n usage: ReturnType<typeof Usage.empty>;\n compaction?: MemoryCompactionInfo | undefined;\n originalTokenCount?: number | undefined;\n};\n\ntype MemoryAgent = Pick<Agent, \"memory\">;\n\nexport class AgentRunMemory {\n constructor(\n private readonly agent: MemoryAgent,\n private readonly memoryScope: MemoryScope | undefined,\n private readonly initialHistory: MessageType[],\n ) {}\n\n memoryPolicy(): MemorySavePolicy | undefined {\n return this.memory()?.savePolicy;\n }\n\n pendingTurnMessages(newMessages: MessageType[]): MessageType[] {\n return this.memoryPolicy() === \"turn\" ? [...newMessages] : [];\n }\n\n async prepareHistory(\n runId: string,\n incomingMessages: readonly MessageType[],\n abortSignal?: AbortSignal | undefined,\n ): Promise<MemoryPreparation> {\n const memory = this.memory();\n if (memory === undefined || this.memoryScope === undefined) {\n return {\n history: this.initialHistory,\n usage: Usage.empty(),\n };\n }\n\n const preparation = await this.prepareStoredHistory(\n memory,\n runId,\n incomingMessages,\n abortSignal,\n );\n const memoryHistory = preparation.history;\n const chatHistory = [...memoryHistory, ...this.initialHistory];\n return {\n ...preparation,\n history: chatHistory,\n };\n }\n\n async compact(\n runId: string,\n abortSignal?: AbortSignal | undefined,\n ): Promise<MemoryCompactionResult> {\n const memory = this.memory();\n const scope = this.memoryScope;\n if (memory === undefined || scope === undefined) {\n throw new TypeError(\"Manual memory compaction requires an Agent with configured memory.\");\n }\n if (memory.compaction === undefined || memory.store.compaction === undefined) {\n throw new TypeError(\"Manual memory compaction requires a configured compaction policy.\");\n }\n const preparation = await this.prepareStoredHistory(memory, runId, [], abortSignal, true);\n if (preparation.compaction !== undefined) {\n return { type: \"compacted\", ...preparation.compaction };\n }\n return {\n type: \"skipped\",\n reason: \"nothing_to_compact\",\n originalMessageCount: preparation.history.length,\n originalTokenCount:\n preparation.originalTokenCount ??\n (await countTokens(memory.compaction.tokenCounter, preparation.history)),\n };\n }\n\n async commitAcceptedInput(runId: string, messages: MessageType[]): Promise<void> {\n const memory = this.memory();\n if (\n memory === undefined ||\n this.memoryScope === undefined ||\n memory.savePolicy !== \"message\" ||\n messages.length === 0\n ) {\n return;\n }\n\n await memory.store.append({\n scope: this.memoryScope,\n runId,\n turn: 1,\n messages,\n });\n }\n\n async commitMessages(\n runId: string,\n turn: number,\n messages: MessageType[],\n pendingTurnMessages: MessageType[],\n ): Promise<void> {\n const memory = this.memory();\n if (memory === undefined || this.memoryScope === undefined || messages.length === 0) {\n return;\n }\n if (memory.savePolicy === \"message\") {\n await memory.store.append({\n scope: this.memoryScope,\n runId,\n turn,\n messages,\n });\n } else if (memory.savePolicy === \"turn\") {\n pendingTurnMessages.push(...messages);\n }\n }\n\n async commitCompletedTurn(\n runId: string,\n turn: number,\n pendingTurnMessages: MessageType[],\n ): Promise<void> {\n const memory = this.memory();\n if (\n memory === undefined ||\n this.memoryScope === undefined ||\n memory.savePolicy !== \"turn\" ||\n pendingTurnMessages.length === 0\n ) {\n return;\n }\n await memory.store.append({\n scope: this.memoryScope,\n runId,\n turn,\n messages: [...pendingTurnMessages],\n });\n pendingTurnMessages.length = 0;\n }\n\n async commitCompletedRun(\n runId: string,\n turn: number,\n newMessages: MessageType[],\n pendingTurnMessages: MessageType[],\n ): Promise<void> {\n await this.commitCompletedTurn(runId, turn, pendingTurnMessages);\n const memory = this.memory();\n if (memory === undefined || this.memoryScope === undefined || memory.savePolicy !== \"run\") {\n return;\n }\n await memory.store.append({\n scope: this.memoryScope,\n runId,\n turn,\n messages: [...newMessages],\n });\n }\n\n async recordError(runId: string, error: unknown, newMessages: MessageType[]): Promise<void> {\n const memory = this.memory();\n if (memory === undefined || this.memoryScope === undefined) {\n return;\n }\n await memory.store.recordError?.({\n scope: this.memoryScope,\n runId,\n error,\n messages: [...newMessages],\n });\n }\n\n private memory(): AgentMemory | undefined {\n return this.memoryScope === undefined ? undefined : this.agent.memory;\n }\n\n private async prepareStoredHistory(\n memory: AgentMemory,\n runId: string,\n incomingMessages: readonly MessageType[],\n abortSignal?: AbortSignal | undefined,\n force = false,\n ): Promise<MemoryPreparation> {\n const scope = this.memoryScope;\n if (scope === undefined) {\n return { history: [], usage: Usage.empty() };\n }\n const options = memory.compaction;\n const capability = memory.store.compaction;\n if (options === undefined || capability === undefined) {\n return {\n history: await memory.store.load({ scope }),\n usage: Usage.empty(),\n };\n }\n\n let usage = Usage.empty();\n const maxAttempts = options.conflictRetries === false ? 1 : options.conflictRetries.maxAttempts;\n for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {\n throwIfAborted(abortSignal);\n const snapshot = await capability.snapshot({ scope });\n throwIfAborted(abortSignal);\n const selection = await selectCompactionPrefix(\n snapshot.messages,\n incomingMessages,\n options.trigger.afterTokens,\n options.retention,\n options.tokenCounter,\n force,\n );\n throwIfAborted(abortSignal);\n const compactedMessageCount = selection.compactedMessageCount;\n if (compactedMessageCount === 0) {\n return {\n history: snapshot.messages,\n usage,\n originalTokenCount: selection.originalTokenCount,\n };\n }\n\n const prefix = snapshot.messages.slice(0, compactedMessageCount);\n let result: Awaited<ReturnType<typeof options.compactor>>;\n try {\n result = await options.compactor({\n scope,\n messages: prefix,\n abortSignal,\n });\n } catch (error) {\n throw remappedCompactorError(error, usage);\n }\n if (result.usage !== undefined) {\n usage = Usage.add(usage, result.usage);\n }\n if (typeof result?.summary !== \"string\") {\n throw new MemoryCompactionError(\"Memory compactor must return a summary string.\", {\n usage,\n });\n }\n const summaryText = result.summary.trim();\n if (summaryText.length === 0) {\n throw new MemoryCompactionError(\"Memory compactor returned an empty summary.\", {\n usage,\n });\n }\n const summary = createMemoryCompactionSummary(\n summaryText,\n cumulativeCompactedMessageCount(prefix),\n );\n const retained = snapshot.messages.slice(compactedMessageCount);\n let resultTokenCount: number;\n try {\n resultTokenCount = await countTokens(options.tokenCounter, [summary, ...retained]);\n } catch (error) {\n throw remappedCompactorError(error, usage);\n }\n throwIfAborted(abortSignal);\n let replacement: Awaited<ReturnType<typeof capability.replacePrefix>>;\n try {\n replacement = await capability.replacePrefix({\n scope,\n revision: snapshot.revision,\n messageCount: compactedMessageCount,\n replacement: summary,\n runId: `memory-compaction:${runId}:${attempt}`,\n });\n } catch (error) {\n throw new MemoryCompactionError(\"Memory compaction prefix replacement failed.\", {\n cause: error,\n usage,\n });\n }\n if (replacement.status === \"committed\") {\n return {\n history: [summary, ...retained],\n usage,\n compaction: {\n originalMessageCount: snapshot.messages.length,\n compactedMessageCount,\n retainedMessageCount: retained.length,\n originalTokenCount: selection.originalTokenCount,\n compactedTokenCount: selection.compactedTokenCount,\n retainedTokenCount: selection.retainedTokenCount,\n resultTokenCount,\n attempts: attempt,\n usage,\n },\n };\n }\n throwIfAborted(abortSignal);\n }\n\n throw new MemoryCompactionConflictError(maxAttempts, usage);\n }\n}\n\ntype CompactionSelection = {\n compactedMessageCount: number;\n originalTokenCount: number;\n compactedTokenCount: number;\n retainedTokenCount: number;\n};\n\nasync function selectCompactionPrefix(\n messages: readonly MessageType[],\n incomingMessages: readonly MessageType[],\n afterTokens: number,\n retention:\n | { recentTurns: number; recentTokens?: undefined }\n | { recentTokens: number; recentTurns?: undefined },\n tokenCounter: MemoryTokenCounter,\n force: boolean,\n): Promise<CompactionSelection> {\n const originalTokenCount = await countTokens(tokenCounter, messages);\n const incomingTokenCount =\n incomingMessages.length === 0 ? 0 : await countTokens(tokenCounter, incomingMessages);\n const none = {\n compactedMessageCount: 0,\n originalTokenCount,\n compactedTokenCount: 0,\n retainedTokenCount: originalTokenCount,\n };\n if (!force && originalTokenCount + incomingTokenCount <= afterTokens) {\n return none;\n }\n const userMessageIndexes = messages.flatMap((message, index) =>\n message.role === \"user\" ? [index] : [],\n );\n let compactedMessageCount: number;\n let retainedTokenCount: number;\n if (retention.recentTurns !== undefined) {\n if (userMessageIndexes.length <= retention.recentTurns) {\n return none;\n }\n compactedMessageCount =\n retention.recentTurns === 0\n ? messages.length\n : (userMessageIndexes[userMessageIndexes.length - retention.recentTurns] ?? 0);\n retainedTokenCount = await countTokens(tokenCounter, messages.slice(compactedMessageCount));\n } else {\n if (userMessageIndexes.length <= 1) {\n return none;\n }\n\n // Legacy token retention still keeps complete user-led turns. The newest turn is always kept\n // even when it alone exceeds the budget. Find the earliest fitting tail logarithmically.\n const tailTokenCounts = new Map<number, number>();\n const countTail = async (messageIndex: number): Promise<number> => {\n const cached = tailTokenCounts.get(messageIndex);\n if (cached !== undefined) return cached;\n const count = await countTokens(tokenCounter, messages.slice(messageIndex));\n tailTokenCounts.set(messageIndex, count);\n return count;\n };\n let lower = 0;\n let upper = userMessageIndexes.length - 1;\n let retainedBoundary = upper;\n while (lower <= upper) {\n const middle = Math.floor((lower + upper) / 2);\n const candidate = userMessageIndexes[middle] ?? 0;\n if ((await countTail(candidate)) <= retention.recentTokens) {\n retainedBoundary = middle;\n upper = middle - 1;\n } else {\n lower = middle + 1;\n }\n }\n compactedMessageCount = userMessageIndexes[retainedBoundary] ?? 0;\n retainedTokenCount =\n tailTokenCounts.get(compactedMessageCount) ??\n (await countTokens(tokenCounter, messages.slice(compactedMessageCount)));\n }\n if (compactedMessageCount === 0) {\n return none;\n }\n const compactedTokenCount = await countTokens(\n tokenCounter,\n messages.slice(0, compactedMessageCount),\n );\n return {\n compactedMessageCount,\n originalTokenCount,\n compactedTokenCount,\n retainedTokenCount,\n };\n}\n\nasync function countTokens(\n tokenCounter: MemoryTokenCounter,\n messages: readonly MessageType[],\n): Promise<number> {\n let count: number;\n try {\n count = await tokenCounter(messages);\n } catch (error) {\n throw new MemoryCompactionError(\"Memory token counter failed.\", { cause: error });\n }\n if (!Number.isSafeInteger(count) || count < 0) {\n throw new MemoryCompactionError(\"Memory token counter must return a nonnegative safe integer.\");\n }\n return count;\n}\n\nfunction remappedCompactorError(error: unknown, usage: ReturnType<typeof Usage.empty>): Error {\n if (error instanceof MemoryCompactionError) {\n const mergedUsage =\n error.usage === undefined\n ? usage\n : isEmptyUsage(usage)\n ? error.usage\n : Usage.add(usage, error.usage);\n if (mergedUsage === error.usage || (error.usage === undefined && isEmptyUsage(usage))) {\n return error;\n }\n return new MemoryCompactionError(error.message, {\n cause: error,\n usage: mergedUsage,\n });\n }\n return new MemoryCompactionError(\"Memory compactor failed.\", {\n cause: error,\n usage,\n });\n}\n\nfunction isEmptyUsage(usage: ReturnType<typeof Usage.empty>): boolean {\n return (\n usage.inputTokens === 0 &&\n usage.outputTokens === 0 &&\n usage.totalTokens === 0 &&\n usage.cachedInputTokens === 0 &&\n usage.cacheCreationInputTokens === 0\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0BO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,aACA,gBACjB;AAHiB;AACA;AACA;AAAA,EAChB;AAAA,EAHgB;AAAA,EACA;AAAA,EACA;AAAA,EAGnB,eAA6C;AAC3C,WAAO,KAAK,OAAO,GAAG;AAAA,EACxB;AAAA,EAEA,oBAAoB,aAA2C;AAC7D,WAAO,KAAK,aAAa,MAAM,SAAS,CAAC,GAAG,WAAW,IAAI,CAAC;AAAA,EAC9D;AAAA,EAEA,MAAM,eACJ,OACA,kBACA,aAC4B;AAC5B,UAAM,SAAS,KAAK,OAAO;AAC3B,QAAI,WAAW,UAAa,KAAK,gBAAgB,QAAW;AAC1D,aAAO;AAAA,QACL,SAAS,KAAK;AAAA,QACd,OAAO,MAAM,MAAM;AAAA,MACrB;AAAA,IACF;AAEA,UAAM,cAAc,MAAM,KAAK;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,UAAM,gBAAgB,YAAY;AAClC,UAAM,cAAc,CAAC,GAAG,eAAe,GAAG,KAAK,cAAc;AAC7D,WAAO;AAAA,MACL,GAAG;AAAA,MACH,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,MAAM,QACJ,OACA,aACiC;AACjC,UAAM,SAAS,KAAK,OAAO;AAC3B,UAAM,QAAQ,KAAK;AACnB,QAAI,WAAW,UAAa,UAAU,QAAW;AAC/C,YAAM,IAAI,UAAU,oEAAoE;AAAA,IAC1F;AACA,QAAI,OAAO,eAAe,UAAa,OAAO,MAAM,eAAe,QAAW;AAC5E,YAAM,IAAI,UAAU,mEAAmE;AAAA,IACzF;AACA,UAAM,cAAc,MAAM,KAAK,qBAAqB,QAAQ,OAAO,CAAC,GAAG,aAAa,IAAI;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A,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,eAAe,YACb,cACA,UACiB;AACjB,MAAI;AACJ,MAAI;AACF,YAAQ,MAAM,aAAa,QAAQ;AAAA,EACrC,SAAS,OAAO;AACd,UAAM,IAAI,sBAAsB,gCAAgC,EAAE,OAAO,MAAM,CAAC;AAAA,EAClF;AACA,MAAI,CAAC,OAAO,cAAc,KAAK,KAAK,QAAQ,GAAG;AAC7C,UAAM,IAAI,sBAAsB,8DAA8D;AAAA,EAChG;AACA,SAAO;AACT;AAEA,SAAS,uBAAuB,OAAgB,OAA8C;AAC5F,MAAI,iBAAiB,uBAAuB;AAC1C,UAAM,cACJ,MAAM,UAAU,SACZ,QACA,aAAa,KAAK,IAChB,MAAM,QACN,MAAM,IAAI,OAAO,MAAM,KAAK;AACpC,QAAI,gBAAgB,MAAM,SAAU,MAAM,UAAU,UAAa,aAAa,KAAK,GAAI;AACrF,aAAO;AAAA,IACT;AACA,WAAO,IAAI,sBAAsB,MAAM,SAAS;AAAA,MAC9C,OAAO;AAAA,MACP,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,SAAO,IAAI,sBAAsB,4BAA4B;AAAA,IAC3D,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AAEA,SAAS,aAAa,OAAgD;AACpE,SACE,MAAM,gBAAgB,KACtB,MAAM,iBAAiB,KACvB,MAAM,gBAAgB,KACtB,MAAM,sBAAsB,KAC5B,MAAM,6BAA6B;AAEvC;","names":[]}
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
createResolvedAgent,
|
|
21
21
|
getResolvedAgentOptions
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MTJDYC6T.js";
|
|
23
23
|
import {
|
|
24
24
|
AgentRun
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-AYN34XVW.js";
|
|
26
26
|
import {
|
|
27
27
|
withInternalAgentRunOptions
|
|
28
28
|
} from "./chunk-KITX3HDN.js";
|
|
@@ -619,4 +619,4 @@ var TeamRun = class {
|
|
|
619
619
|
export {
|
|
620
620
|
TeamRun
|
|
621
621
|
};
|
|
622
|
-
//# sourceMappingURL=chunk-
|
|
622
|
+
//# sourceMappingURL=chunk-I7YCEQXT.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Agent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UEUSJ3UQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getAgentToolState
|
|
6
6
|
} from "./chunk-A7BXVZXZ.js";
|
|
7
7
|
import {
|
|
8
8
|
markResolvedAgentOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UYODZ7OE.js";
|
|
10
10
|
|
|
11
11
|
// src/agent/resolved-agent.ts
|
|
12
12
|
function createResolvedAgent(options) {
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
createResolvedAgent,
|
|
46
46
|
getResolvedAgentOptions
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-MTJDYC6T.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRun
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AYN34XVW.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeMemoryScope
|
|
6
|
+
} from "./chunk-LAIATEUB.js";
|
|
4
7
|
import {
|
|
5
8
|
AgentRunMemory
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FGOVEUVK.js";
|
|
7
10
|
import {
|
|
8
11
|
assertNonnegativeSafeInteger
|
|
9
12
|
} from "./chunk-NPJ2T3L5.js";
|
|
10
|
-
import {
|
|
11
|
-
normalizeMemoryScope
|
|
12
|
-
} from "./chunk-LAIATEUB.js";
|
|
13
13
|
import {
|
|
14
14
|
prepareAgentTools
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZQC6M22O.js";
|
|
16
16
|
import {
|
|
17
17
|
getRegisteredAgentTool,
|
|
18
18
|
registerAgentToolState
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-GLMYZ6OA.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveAgentOptions
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UYODZ7OE.js";
|
|
26
26
|
import {
|
|
27
27
|
cloneFrozenPlainData,
|
|
28
28
|
snapshotAgentContext,
|
|
@@ -155,4 +155,4 @@ var Agent = class {
|
|
|
155
155
|
export {
|
|
156
156
|
Agent
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
158
|
+
//# sourceMappingURL=chunk-UEUSJ3UQ.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveMemoryOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WLUWRBQ4.js";
|
|
4
4
|
import {
|
|
5
5
|
appendGuardrailPolicies
|
|
6
6
|
} from "./chunk-6BTJC3ES.js";
|
|
7
7
|
import {
|
|
8
8
|
isToolIndex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-F4BOW76L.js";
|
|
10
10
|
import {
|
|
11
11
|
isMcpTool
|
|
12
12
|
} from "./chunk-PLDJCCVL.js";
|
|
@@ -109,4 +109,4 @@ export {
|
|
|
109
109
|
resolveAgentOptions,
|
|
110
110
|
markResolvedAgentOptions
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-UYODZ7OE.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
assertNonnegativeInteger,
|
|
2
3
|
assertPositiveInteger
|
|
3
4
|
} from "./chunk-ZPJFXRQZ.js";
|
|
4
5
|
|
|
@@ -10,10 +11,25 @@ function resolveMemoryOptions(options = {}) {
|
|
|
10
11
|
if (options.compaction !== void 0) {
|
|
11
12
|
const afterTokens = options.compaction.trigger.afterTokens;
|
|
12
13
|
assertPositiveInteger(afterTokens, "compaction.trigger.afterTokens");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const configuredRetention = options.compaction.retention;
|
|
15
|
+
const recentTurns = configuredRetention?.recentTurns;
|
|
16
|
+
const recentTokens = configuredRetention?.recentTokens;
|
|
17
|
+
if (recentTurns !== void 0 && recentTokens !== void 0) {
|
|
18
|
+
throw new TypeError(
|
|
19
|
+
"compaction.retention must specify either recentTurns or recentTokens, not both."
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
let retention;
|
|
23
|
+
if (recentTokens !== void 0) {
|
|
24
|
+
assertPositiveInteger(recentTokens, "compaction.retention.recentTokens");
|
|
25
|
+
if (recentTokens >= afterTokens) {
|
|
26
|
+
throw new RangeError("compaction.retention.recentTokens must be less than afterTokens.");
|
|
27
|
+
}
|
|
28
|
+
retention = { recentTokens };
|
|
29
|
+
} else {
|
|
30
|
+
const resolvedRecentTurns = recentTurns ?? 1;
|
|
31
|
+
assertNonnegativeInteger(resolvedRecentTurns, "compaction.retention.recentTurns");
|
|
32
|
+
retention = { recentTurns: resolvedRecentTurns };
|
|
17
33
|
}
|
|
18
34
|
const tokenCounter = options.compaction.tokenCounter ?? estimateMemoryTokens;
|
|
19
35
|
if (typeof tokenCounter !== "function") {
|
|
@@ -30,9 +46,7 @@ function resolveMemoryOptions(options = {}) {
|
|
|
30
46
|
trigger: {
|
|
31
47
|
afterTokens
|
|
32
48
|
},
|
|
33
|
-
retention
|
|
34
|
-
recentTokens
|
|
35
|
-
},
|
|
49
|
+
retention,
|
|
36
50
|
tokenCounter,
|
|
37
51
|
compactor: options.compaction.compactor,
|
|
38
52
|
conflictRetries
|
|
@@ -52,4 +66,4 @@ export {
|
|
|
52
66
|
resolveMemoryOptions,
|
|
53
67
|
estimateMemoryTokens
|
|
54
68
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-WLUWRBQ4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/memory/options.ts"],"sourcesContent":["import type { Message } from \"../completion/types\";\nimport { assertNonnegativeInteger, assertPositiveInteger } from \"./assert\";\nimport type {\n MemoryCompactionConflictRetryOptions,\n MemoryCompactor,\n MemoryOptions,\n MemorySavePolicy,\n MemoryTokenCounter,\n} from \"./types\";\n\ntype ResolvedMemoryOptions = {\n savePolicy: MemorySavePolicy;\n compaction?:\n | {\n trigger: { afterTokens: number };\n retention:\n | { recentTurns: number; recentTokens?: undefined }\n | { recentTokens: number; recentTurns?: undefined };\n tokenCounter: MemoryTokenCounter;\n compactor: MemoryCompactor;\n conflictRetries: false | MemoryCompactionConflictRetryOptions;\n }\n | undefined;\n};\n\nexport function resolveMemoryOptions(options: MemoryOptions = {}): ResolvedMemoryOptions {\n const resolved: ResolvedMemoryOptions = {\n savePolicy: options.savePolicy ?? \"message\",\n };\n if (options.compaction !== undefined) {\n const afterTokens = options.compaction.trigger.afterTokens;\n assertPositiveInteger(afterTokens, \"compaction.trigger.afterTokens\");\n const configuredRetention = options.compaction.retention;\n const recentTurns = configuredRetention?.recentTurns;\n const recentTokens = configuredRetention?.recentTokens;\n if (recentTurns !== undefined && recentTokens !== undefined) {\n throw new TypeError(\n \"compaction.retention must specify either recentTurns or recentTokens, not both.\",\n );\n }\n let retention: NonNullable<ResolvedMemoryOptions[\"compaction\"]>[\"retention\"];\n if (recentTokens !== undefined) {\n assertPositiveInteger(recentTokens, \"compaction.retention.recentTokens\");\n if (recentTokens >= afterTokens) {\n throw new RangeError(\"compaction.retention.recentTokens must be less than afterTokens.\");\n }\n retention = { recentTokens };\n } else {\n const resolvedRecentTurns = recentTurns ?? 1;\n assertNonnegativeInteger(resolvedRecentTurns, \"compaction.retention.recentTurns\");\n retention = { recentTurns: resolvedRecentTurns };\n }\n const tokenCounter = options.compaction.tokenCounter ?? estimateMemoryTokens;\n if (typeof tokenCounter !== \"function\") {\n throw new TypeError(\"compaction.tokenCounter must be a function.\");\n }\n if (typeof options.compaction.compactor !== \"function\") {\n throw new TypeError(\"compaction.compactor must be a function.\");\n }\n const conflictRetries = options.compaction.conflictRetries ?? false;\n if (conflictRetries !== false) {\n assertPositiveInteger(conflictRetries.maxAttempts, \"compaction.conflictRetries.maxAttempts\");\n }\n resolved.compaction = {\n trigger: {\n afterTokens,\n },\n retention,\n tokenCounter,\n compactor: options.compaction.compactor,\n conflictRetries,\n };\n }\n return resolved;\n}\n\n/** Lightweight provider-neutral estimate used when no model-specific counter is supplied. */\nexport function estimateMemoryTokens(messages: readonly Message[]): number {\n const characters = messages.reduce(\n (total, message) =>\n total + JSON.stringify({ role: message.role, content: message.content }).length,\n 0,\n );\n return messages.length === 0 ? 0 : Math.max(messages.length, Math.ceil(characters / 4));\n}\n"],"mappings":";;;;;;AAyBO,SAAS,qBAAqB,UAAyB,CAAC,GAA0B;AACvF,QAAM,WAAkC;AAAA,IACtC,YAAY,QAAQ,cAAc;AAAA,EACpC;AACA,MAAI,QAAQ,eAAe,QAAW;AACpC,UAAM,cAAc,QAAQ,WAAW,QAAQ;AAC/C,0BAAsB,aAAa,gCAAgC;AACnE,UAAM,sBAAsB,QAAQ,WAAW;AAC/C,UAAM,cAAc,qBAAqB;AACzC,UAAM,eAAe,qBAAqB;AAC1C,QAAI,gBAAgB,UAAa,iBAAiB,QAAW;AAC3D,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,QAAI;AACJ,QAAI,iBAAiB,QAAW;AAC9B,4BAAsB,cAAc,mCAAmC;AACvE,UAAI,gBAAgB,aAAa;AAC/B,cAAM,IAAI,WAAW,kEAAkE;AAAA,MACzF;AACA,kBAAY,EAAE,aAAa;AAAA,IAC7B,OAAO;AACL,YAAM,sBAAsB,eAAe;AAC3C,+BAAyB,qBAAqB,kCAAkC;AAChF,kBAAY,EAAE,aAAa,oBAAoB;AAAA,IACjD;AACA,UAAM,eAAe,QAAQ,WAAW,gBAAgB;AACxD,QAAI,OAAO,iBAAiB,YAAY;AACtC,YAAM,IAAI,UAAU,6CAA6C;AAAA,IACnE;AACA,QAAI,OAAO,QAAQ,WAAW,cAAc,YAAY;AACtD,YAAM,IAAI,UAAU,0CAA0C;AAAA,IAChE;AACA,UAAM,kBAAkB,QAAQ,WAAW,mBAAmB;AAC9D,QAAI,oBAAoB,OAAO;AAC7B,4BAAsB,gBAAgB,aAAa,wCAAwC;AAAA,IAC7F;AACA,aAAS,aAAa;AAAA,MACpB,SAAS;AAAA,QACP;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,QAAQ,WAAW;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAGO,SAAS,qBAAqB,UAAsC;AACzE,QAAM,aAAa,SAAS;AAAA,IAC1B,CAAC,OAAO,YACN,QAAQ,KAAK,UAAU,EAAE,MAAM,QAAQ,MAAM,SAAS,QAAQ,QAAQ,CAAC,EAAE;AAAA,IAC3E;AAAA,EACF;AACA,SAAO,SAAS,WAAW,IAAI,IAAI,KAAK,IAAI,SAAS,QAAQ,KAAK,KAAK,aAAa,CAAC,CAAC;AACxF;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchesVectorFilter
|
|
3
|
+
} from "./chunk-5WLIHNNJ.js";
|
|
1
4
|
import {
|
|
2
5
|
LshIndex
|
|
3
6
|
} from "./chunk-ESOFEAYK.js";
|
|
4
7
|
import {
|
|
5
8
|
retrieveDocuments
|
|
6
9
|
} from "./chunk-HAAGSIZH.js";
|
|
7
|
-
import {
|
|
8
|
-
matchesVectorFilter
|
|
9
|
-
} from "./chunk-5WLIHNNJ.js";
|
|
10
10
|
import {
|
|
11
11
|
cosineSimilarity
|
|
12
12
|
} from "./chunk-7F53DOML.js";
|
|
@@ -233,4 +233,4 @@ export {
|
|
|
233
233
|
InMemoryVectorStore,
|
|
234
234
|
createVectorSearchTool
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=chunk-
|
|
236
|
+
//# sourceMappingURL=chunk-XAVSWLX5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isToolIndex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4BOW76L.js";
|
|
4
4
|
import {
|
|
5
5
|
isMcpTool
|
|
6
6
|
} from "./chunk-PLDJCCVL.js";
|
|
@@ -165,4 +165,4 @@ function snapshotToolIndex(index) {
|
|
|
165
165
|
export {
|
|
166
166
|
prepareAgentTools
|
|
167
167
|
};
|
|
168
|
-
//# sourceMappingURL=chunk-
|
|
168
|
+
//# sourceMappingURL=chunk-ZQC6M22O.js.map
|
package/dist/evals/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { U as Usage, J as JsonObject, d as CompletionModel, M as Message } from '../types-DYqZKDA8.js';
|
|
2
2
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
3
|
-
import { Z as AgentRunPromptRef, g as AgentInteractionOutcome, n as AgentResponse, o as AgentRunOptions, l as AgentOutcome } from '../middleware-
|
|
3
|
+
import { Z as AgentRunPromptRef, g as AgentInteractionOutcome, n as AgentResponse, o as AgentRunOptions, l as AgentOutcome } from '../middleware-BxzML2hK.js';
|
|
4
4
|
import { AgentInteractionRequest, AgentInteractionResponse } from '../agent/interactions/index.js';
|
|
5
5
|
import { E as EmbeddingModel } from '../types-Cr4uiYo5.js';
|
|
6
6
|
import '../model-call-options-CZkSw_xN.js';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import '../types-CqiX-4_C.js';
|
|
9
9
|
import '../retry-CjvSlKGW.js';
|
|
10
|
-
import '../types-
|
|
10
|
+
import '../types-B8KBVXuH.js';
|
|
11
11
|
import '../tool-D_jV3cRZ.js';
|
|
12
12
|
|
|
13
13
|
type EvalOutcomeOptions = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-
|
|
1
|
+
export { A as Agent, a as AgentContextInput, b as AgentMemory, c as AgentMemoryOptions, d as AgentOptions, e as AgentToolInput, f as AgentToolOptions, C as CreateHybridVectorContextOptions, g as CreateVectorContextOptions, V as VectorContext, h as VectorContextBaseOptions, i as createVectorContext, j as isVectorContext } from './agent-BUc18r6A.js';
|
|
2
2
|
export { AgentRunBlockedError, AgentRunCancelledError, AgentStreamClosedError, AgentStructuredOutputError, AgentStructuredOutputFormat, AgentStructuredOutputPhase, AgentTeam, AgentTeamEvent, AgentTeamInteraction, AgentTeamInteractionError, AgentTeamLimitError, AgentTeamLimits, AgentTeamMember, AgentTeamMemberStatus, AgentTeamMemberSummary, AgentTeamMessage, AgentTeamOptions, AgentTeamOutcome, AgentTeamRunOptions, AgentTeamSpawnRule, AgentTeamStream, AgentToolSuspensionError, MaxTurnsError } from './agent/index.js';
|
|
3
|
-
export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentMiddleware, l as AgentOutcome, m as AgentPrompt, n as AgentResponse, o as AgentRunOptions, p as AgentRunSettings, q as AgentStartEvent, r as AgentSteerInput, s as AgentSteerReceipt, t as AgentStepFinishEvent, u as AgentStream, v as AgentStreamEvent, w as AgentToolCallDeltaEvent, x as AgentToolFinishEvent, y as AgentToolStartEvent, C as CompletionRequestMiddlewareArgs, z as CompletionRequestMiddlewareResult, B as CompletionResponseMiddlewareArgs, D as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, E as ToolInputMiddlewareResult, F as ToolOutputMiddlewareArgs, G as ToolOutputMiddlewareResult, H as ToolResultMiddlewareArgs, I as createMiddleware } from './middleware-
|
|
3
|
+
export { A as AgentBlockedOutcome, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentInteractionOutcome, h as AgentLifecycle, i as AgentMemoryCompactionEvent, j as AgentMemoryCompactionOptions, k as AgentMiddleware, l as AgentOutcome, m as AgentPrompt, n as AgentResponse, o as AgentRunOptions, p as AgentRunSettings, q as AgentStartEvent, r as AgentSteerInput, s as AgentSteerReceipt, t as AgentStepFinishEvent, u as AgentStream, v as AgentStreamEvent, w as AgentToolCallDeltaEvent, x as AgentToolFinishEvent, y as AgentToolStartEvent, C as CompletionRequestMiddlewareArgs, z as CompletionRequestMiddlewareResult, B as CompletionResponseMiddlewareArgs, D as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, E as ToolInputMiddlewareResult, F as ToolOutputMiddlewareArgs, G as ToolOutputMiddlewareResult, H as ToolResultMiddlewareArgs, I as createMiddleware } from './middleware-BxzML2hK.js';
|
|
4
4
|
export { M as ModelCallOptions } from './model-call-options-CZkSw_xN.js';
|
|
5
5
|
export { R as RetryContext, a as RetryOptions, b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
6
6
|
export { C as COMPLETION_PROVIDER_OUTPUT_ERROR_CODE, a as CompletionBaseOptions, b as CompletionInput, c as CompletionProviderOutputError, d as CompletionProviderOutputErrorKind, e as CompletionProviderOutputErrorOptions, f as CompletionStructuredOutputError, g as CompletionStructuredOutputPhase, G as GenerateCompletionOptions, h as GenerateStructuredCompletionOptions, M as MessageMetadataSchema, R as REASONING_EFFORT_CONTROL_ID, i as ReasoningEffortControls, S as StandardJSONSchemaV1, j as StandardSchemaV1, k as StreamCompletionOptions, l as StreamStructuredCompletionOptions, m as createMessageSchema, n as defineCompletionModelControls, o as generateCompletion, p as isJsonValue, q as isMessage, r as isStandardSchema, s as messageSchema, t as messagesSchema, u as parseMessage, v as parseMessages, w as streamCompletion } from './provider-output-error-CQD0MWey.js';
|
|
@@ -9,7 +9,7 @@ export { a as allow, b as block, d as defineGuardrailPolicy, c as defineInputGua
|
|
|
9
9
|
export { G as GuardrailBoundary, a as GuardrailDecisionRecord, b as GuardrailMode, c as GuardrailPolicy, d as GuardrailPolicyInput, e as GuardrailPolicyOptions, I as InputGuardrail, f as InputGuardrailActions, g as InputGuardrailContext, O as OutputGuardrail, h as OutputGuardrailActions, i as OutputGuardrailContext } from './types-CqiX-4_C.js';
|
|
10
10
|
export { GenerateImageOptions, GeneratedImage, ImageGenerationModel, ImageGenerationRequest, ImageGenerationResult, generateImage } from './image-generation/index.js';
|
|
11
11
|
export { MemoryCompactionConflictError, MemoryCompactionError, createMemoryScopeKey, createSummaryMemoryCompactor, estimateMemoryTokens, isMemoryCompactionMessage } from './memory/index.js';
|
|
12
|
-
export { C as CreateMemoryScopeKeyOptions, a as CreateSummaryMemoryCompactorOptions, M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, f as MemoryCompactionMessage, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionResult, l as
|
|
12
|
+
export { C as CreateMemoryScopeKeyOptions, a as CreateSummaryMemoryCompactorOptions, M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, f as MemoryCompactionMessage, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionResult, l as MemoryCompactionRetention, m as MemoryCompactionSnapshot, n as MemoryCompactionSnapshotOptions, o as MemoryCompactor, p as MemoryCompactorInput, q as MemoryCompactorResult, r as MemoryConversation, s as MemoryConversationGetOptions, t as MemoryConversationListOptions, u as MemoryConversationMessage, v as MemoryConversationSummary, w as MemoryErrorOptions, x as MemoryInspector, y as MemoryLoadOptions, z as MemoryOptions, A as MemorySavePolicy, B as MemoryScope, D as MemoryScopeKeyOptions, E as MemoryScopeKeyResolver, F as MemoryStore, G as MemoryTokenCounter } from './types-B8KBVXuH.js';
|
|
13
13
|
export { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
14
14
|
export { loadSkills, skill } from './skills/index.js';
|
|
15
15
|
export { S as SkillValidationError } from './types-Cu2tEf3V.js';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
transcribe
|
|
4
4
|
} from "./chunk-HTI7DZJM.js";
|
|
5
5
|
import "./chunk-SC4SUIEY.js";
|
|
6
|
+
import "./chunk-5M6GTA3T.js";
|
|
7
|
+
import "./chunk-WXR5CWSC.js";
|
|
6
8
|
import "./chunk-HTI343NP.js";
|
|
7
9
|
import {
|
|
8
10
|
loadSkills
|
|
@@ -15,18 +17,16 @@ import "./chunk-LJGQ6VQB.js";
|
|
|
15
17
|
import {
|
|
16
18
|
SkillValidationError
|
|
17
19
|
} from "./chunk-B5JQDR33.js";
|
|
18
|
-
import "./chunk-5M6GTA3T.js";
|
|
19
|
-
import "./chunk-WXR5CWSC.js";
|
|
20
20
|
import {
|
|
21
21
|
generateSpeech
|
|
22
22
|
} from "./chunk-SYULMZGL.js";
|
|
23
23
|
import "./chunk-NMPDZTBM.js";
|
|
24
|
+
import "./chunk-V4OZ7ISA.js";
|
|
24
25
|
import "./chunk-4ITAV7YA.js";
|
|
25
26
|
import {
|
|
26
27
|
createMemoryScopeKey
|
|
27
28
|
} from "./chunk-2XSMGVBG.js";
|
|
28
29
|
import "./chunk-GDJNOZ47.js";
|
|
29
|
-
import "./chunk-V4OZ7ISA.js";
|
|
30
30
|
import "./chunk-RA4YVN43.js";
|
|
31
31
|
import "./chunk-4UUIGAIX.js";
|
|
32
32
|
import {
|
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
import "./chunk-53TPAXYR.js";
|
|
36
36
|
import {
|
|
37
37
|
AgentTeam
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-35GMQS3R.js";
|
|
39
39
|
import "./chunk-X6WS3XWL.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-I7YCEQXT.js";
|
|
41
41
|
import "./chunk-PIMD4DYG.js";
|
|
42
42
|
import "./chunk-FSBDE6RF.js";
|
|
43
43
|
import "./chunk-3TAQXJBC.js";
|
|
@@ -46,34 +46,36 @@ import {
|
|
|
46
46
|
AgentTeamInteractionError,
|
|
47
47
|
AgentTeamLimitError
|
|
48
48
|
} from "./chunk-ENZ2XX27.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-MTJDYC6T.js";
|
|
50
50
|
import {
|
|
51
51
|
Agent
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
52
|
+
} from "./chunk-UEUSJ3UQ.js";
|
|
53
|
+
import "./chunk-AYN34XVW.js";
|
|
54
|
+
import "./chunk-B57NNDEF.js";
|
|
55
|
+
import "./chunk-LAIATEUB.js";
|
|
56
|
+
import "./chunk-FGOVEUVK.js";
|
|
55
57
|
import "./chunk-GDY2Z2SZ.js";
|
|
56
58
|
import "./chunk-KITX3HDN.js";
|
|
57
59
|
import "./chunk-NPJ2T3L5.js";
|
|
58
60
|
import "./chunk-YWRXOPHC.js";
|
|
59
61
|
import "./chunk-SXE4J43E.js";
|
|
60
|
-
import "./chunk-B57NNDEF.js";
|
|
61
62
|
import "./chunk-5I2NVRHC.js";
|
|
62
63
|
import "./chunk-5IURMWFN.js";
|
|
63
|
-
import "./chunk-LAIATEUB.js";
|
|
64
64
|
import "./chunk-2NLINXRF.js";
|
|
65
65
|
import "./chunk-JMJFK3A4.js";
|
|
66
|
+
import {
|
|
67
|
+
createMiddleware
|
|
68
|
+
} from "./chunk-4AW2633B.js";
|
|
66
69
|
import {
|
|
67
70
|
createQuestionTool
|
|
68
71
|
} from "./chunk-T3ZOZEAB.js";
|
|
69
72
|
import {
|
|
70
73
|
createThinkTool
|
|
71
74
|
} from "./chunk-6E6ABRJ6.js";
|
|
72
|
-
import {
|
|
73
|
-
createMiddleware
|
|
74
|
-
} from "./chunk-4AW2633B.js";
|
|
75
75
|
import "./chunk-YNA3UR42.js";
|
|
76
76
|
import "./chunk-H3H74RWJ.js";
|
|
77
|
+
import "./chunk-MJCMKZFP.js";
|
|
78
|
+
import "./chunk-EZR5AV3J.js";
|
|
77
79
|
import {
|
|
78
80
|
createSummaryMemoryCompactor,
|
|
79
81
|
isMemoryCompactionMessage
|
|
@@ -82,12 +84,10 @@ import {
|
|
|
82
84
|
MemoryCompactionConflictError,
|
|
83
85
|
MemoryCompactionError
|
|
84
86
|
} from "./chunk-LQJ4KHMY.js";
|
|
85
|
-
import "./chunk-MJCMKZFP.js";
|
|
86
|
-
import "./chunk-EZR5AV3J.js";
|
|
87
87
|
import "./chunk-OJF67RNM.js";
|
|
88
88
|
import "./chunk-FAPIZJS2.js";
|
|
89
89
|
import "./chunk-7LBPRXZP.js";
|
|
90
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-ZQC6M22O.js";
|
|
91
91
|
import "./chunk-A7BXVZXZ.js";
|
|
92
92
|
import "./chunk-TP3MCUXS.js";
|
|
93
93
|
import {
|
|
@@ -98,10 +98,10 @@ import "./chunk-NF6WBPFG.js";
|
|
|
98
98
|
import "./chunk-LBYJPMHC.js";
|
|
99
99
|
import "./chunk-KFAVEL5F.js";
|
|
100
100
|
import "./chunk-GLMYZ6OA.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-UYODZ7OE.js";
|
|
102
102
|
import {
|
|
103
103
|
estimateMemoryTokens
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-WLUWRBQ4.js";
|
|
105
105
|
import "./chunk-ZPJFXRQZ.js";
|
|
106
106
|
import "./chunk-MEN4AFDZ.js";
|
|
107
107
|
import "./chunk-VZ5ZZBNX.js";
|
|
@@ -118,12 +118,12 @@ import {
|
|
|
118
118
|
block
|
|
119
119
|
} from "./chunk-MT3BLVYN.js";
|
|
120
120
|
import "./chunk-ZXLCTQUX.js";
|
|
121
|
-
import "./chunk-
|
|
122
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-F4BOW76L.js";
|
|
122
|
+
import "./chunk-XAVSWLX5.js";
|
|
123
|
+
import "./chunk-5WLIHNNJ.js";
|
|
123
124
|
import "./chunk-QHGYCYV6.js";
|
|
124
125
|
import "./chunk-ESOFEAYK.js";
|
|
125
126
|
import "./chunk-HAAGSIZH.js";
|
|
126
|
-
import "./chunk-5WLIHNNJ.js";
|
|
127
127
|
import "./chunk-PJNE75WC.js";
|
|
128
128
|
import "./chunk-PLDJCCVL.js";
|
|
129
129
|
import "./chunk-3J2CSVPR.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRun
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-AYN34XVW.js";
|
|
4
|
+
import "../../chunk-B57NNDEF.js";
|
|
5
|
+
import "../../chunk-LAIATEUB.js";
|
|
6
|
+
import "../../chunk-FGOVEUVK.js";
|
|
5
7
|
import "../../chunk-GDY2Z2SZ.js";
|
|
6
8
|
import "../../chunk-KITX3HDN.js";
|
|
7
9
|
import "../../chunk-NPJ2T3L5.js";
|
|
8
10
|
import "../../chunk-YWRXOPHC.js";
|
|
9
11
|
import "../../chunk-SXE4J43E.js";
|
|
10
|
-
import "../../chunk-B57NNDEF.js";
|
|
11
12
|
import "../../chunk-5I2NVRHC.js";
|
|
12
13
|
import "../../chunk-5IURMWFN.js";
|
|
13
|
-
import "../../chunk-LAIATEUB.js";
|
|
14
14
|
import "../../chunk-2NLINXRF.js";
|
|
15
15
|
import "../../chunk-JMJFK3A4.js";
|
|
16
|
+
import "../../chunk-4AW2633B.js";
|
|
16
17
|
import "../../chunk-T3ZOZEAB.js";
|
|
17
18
|
import "../../chunk-6E6ABRJ6.js";
|
|
18
|
-
import "../../chunk-4AW2633B.js";
|
|
19
19
|
import "../../chunk-YNA3UR42.js";
|
|
20
20
|
import "../../chunk-H3H74RWJ.js";
|
|
21
|
-
import "../../chunk-E44DRLUL.js";
|
|
22
|
-
import "../../chunk-LQJ4KHMY.js";
|
|
23
21
|
import "../../chunk-MJCMKZFP.js";
|
|
24
22
|
import "../../chunk-EZR5AV3J.js";
|
|
23
|
+
import "../../chunk-E44DRLUL.js";
|
|
24
|
+
import "../../chunk-LQJ4KHMY.js";
|
|
25
25
|
import "../../chunk-OJF67RNM.js";
|
|
26
26
|
import "../../chunk-FAPIZJS2.js";
|
|
27
27
|
import "../../chunk-7LBPRXZP.js";
|
|
@@ -39,12 +39,12 @@ import "../../chunk-6TAWRKFK.js";
|
|
|
39
39
|
import "../../chunk-6BTJC3ES.js";
|
|
40
40
|
import "../../chunk-MT3BLVYN.js";
|
|
41
41
|
import "../../chunk-ZXLCTQUX.js";
|
|
42
|
-
import "../../chunk-
|
|
43
|
-
import "../../chunk-
|
|
42
|
+
import "../../chunk-F4BOW76L.js";
|
|
43
|
+
import "../../chunk-XAVSWLX5.js";
|
|
44
|
+
import "../../chunk-5WLIHNNJ.js";
|
|
44
45
|
import "../../chunk-QHGYCYV6.js";
|
|
45
46
|
import "../../chunk-ESOFEAYK.js";
|
|
46
47
|
import "../../chunk-HAAGSIZH.js";
|
|
47
|
-
import "../../chunk-5WLIHNNJ.js";
|
|
48
48
|
import "../../chunk-PJNE75WC.js";
|
|
49
49
|
import "../../chunk-PLDJCCVL.js";
|
|
50
50
|
import "../../chunk-3J2CSVPR.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
fetchToolDefinitions
|
|
4
4
|
} from "../../chunk-GDY2Z2SZ.js";
|
|
5
5
|
import "../../chunk-A7BXVZXZ.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-XAVSWLX5.js";
|
|
7
|
+
import "../../chunk-5WLIHNNJ.js";
|
|
7
8
|
import "../../chunk-QHGYCYV6.js";
|
|
8
9
|
import "../../chunk-ESOFEAYK.js";
|
|
9
10
|
import "../../chunk-HAAGSIZH.js";
|
|
10
|
-
import "../../chunk-5WLIHNNJ.js";
|
|
11
11
|
import "../../chunk-ERN7P6Q4.js";
|
|
12
12
|
import "../../chunk-7F53DOML.js";
|
|
13
13
|
import "../../chunk-HHMLE3TZ.js";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
import "../../chunk-5IURMWFN.js";
|
|
5
5
|
import "../../chunk-2NLINXRF.js";
|
|
6
6
|
import "../../chunk-JMJFK3A4.js";
|
|
7
|
+
import "../../chunk-4AW2633B.js";
|
|
7
8
|
import "../../chunk-T3ZOZEAB.js";
|
|
8
9
|
import "../../chunk-6E6ABRJ6.js";
|
|
9
|
-
import "../../chunk-4AW2633B.js";
|
|
10
10
|
import "../../chunk-OJF67RNM.js";
|
|
11
11
|
import "../../chunk-FAPIZJS2.js";
|
|
12
12
|
import "../../chunk-7LBPRXZP.js";
|
|
@@ -15,12 +15,12 @@ import "../../chunk-6RQYWZI3.js";
|
|
|
15
15
|
import "../../chunk-NF6WBPFG.js";
|
|
16
16
|
import "../../chunk-LBYJPMHC.js";
|
|
17
17
|
import "../../chunk-KFAVEL5F.js";
|
|
18
|
-
import "../../chunk-
|
|
19
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-F4BOW76L.js";
|
|
19
|
+
import "../../chunk-XAVSWLX5.js";
|
|
20
|
+
import "../../chunk-5WLIHNNJ.js";
|
|
20
21
|
import "../../chunk-QHGYCYV6.js";
|
|
21
22
|
import "../../chunk-ESOFEAYK.js";
|
|
22
23
|
import "../../chunk-HAAGSIZH.js";
|
|
23
|
-
import "../../chunk-5WLIHNNJ.js";
|
|
24
24
|
import "../../chunk-PJNE75WC.js";
|
|
25
25
|
import "../../chunk-PLDJCCVL.js";
|
|
26
26
|
import "../../chunk-3J2CSVPR.js";
|