@anvia/core 1.0.0-rc.4 → 1.0.0-rc.6
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 +46 -3
- package/dist/agent/index.d.ts +41 -13
- package/dist/agent/index.js +17 -27
- package/dist/{interactions-csssHYcN.d.ts → agent/interactions/index.d.ts} +3 -55
- package/dist/agent/interactions/index.js +20 -0
- package/dist/agent/interactions/index.js.map +1 -0
- package/dist/{agent-CXScUOpX.d.ts → agent-BK3jud9q.d.ts} +10 -10
- package/dist/{chunk-VKYZZXP5.js → chunk-7O45T5F2.js} +2 -2
- package/dist/{chunk-AI5JMUW7.js → chunk-7OCVDT2X.js} +2 -2
- package/dist/{chunk-FXAIYTRE.js → chunk-7YAH2F3J.js} +3 -3
- package/dist/{chunk-RFHQY2IO.js → chunk-BAEFBTOW.js} +2 -2
- package/dist/chunk-BEU6FCTN.js +164 -0
- package/dist/chunk-BEU6FCTN.js.map +1 -0
- package/dist/{chunk-ZCPOIDAQ.js → chunk-BOCJCECN.js} +4 -4
- package/dist/{chunk-PK5LKOFL.js → chunk-G5OACQEI.js} +4 -66
- package/dist/chunk-G5OACQEI.js.map +1 -0
- package/dist/{chunk-GQL5KRAH.js → chunk-H7BI3BSP.js} +2 -2
- package/dist/{chunk-D2ECOWN5.js → chunk-HT4P3SSG.js} +66 -8
- package/dist/chunk-HT4P3SSG.js.map +1 -0
- package/dist/{chunk-BEYBU7VJ.js → chunk-HVHTVGPP.js} +2 -2
- package/dist/{chunk-J2W63PJI.js → chunk-JXZTTNCR.js} +3 -3
- package/dist/{chunk-KFR4CDGK.js → chunk-QXQQ2DBM.js} +2 -2
- package/dist/{chunk-5GXSQYQT.js → chunk-QXSVVYQK.js} +324 -191
- package/dist/chunk-QXSVVYQK.js.map +1 -0
- package/dist/{chunk-XYTPYUGB.js → chunk-RZDI7B6Z.js} +7 -5
- package/dist/{chunk-XYTPYUGB.js.map → chunk-RZDI7B6Z.js.map} +1 -1
- package/dist/chunk-SROQA7I7.js +69 -0
- package/dist/chunk-SROQA7I7.js.map +1 -0
- package/dist/{chunk-FN7HLLAZ.js → chunk-UBE4WH6G.js} +2 -1
- package/dist/chunk-UBE4WH6G.js.map +1 -0
- package/dist/{chunk-TRQ3XRFD.js → chunk-VGJRXUPT.js} +33 -1
- package/dist/chunk-VGJRXUPT.js.map +1 -0
- package/dist/{chunk-GKDERULJ.js → chunk-YXLDR2O4.js} +2 -2
- package/dist/{client-DvUatElp.d.ts → client-BdQ_QZsY.d.ts} +2 -2
- package/dist/completion/index.d.ts +3 -3
- package/dist/completion/index.js +8 -4
- package/dist/{dynamic-tools-AEBOTgu1.d.ts → dynamic-tools--Aw37H9d.d.ts} +3 -3
- package/dist/embeddings/index.js +2 -2
- package/dist/evals/index.d.ts +8 -7
- package/dist/evals/index.js +7 -6
- package/dist/evals/index.js.map +1 -1
- package/dist/extractor/index.d.ts +1 -1
- package/dist/extractor/index.js +5 -4
- package/dist/guardrails/index.d.ts +4 -4
- package/dist/image-generation/index.d.ts +1 -1
- package/dist/image-generation/index.js +2 -2
- package/dist/index.d.ts +17 -16
- package/dist/index.js +24 -29
- package/dist/internal/agent.d.ts +12 -11
- package/dist/internal/agent.js +13 -11
- package/dist/internal/agent.js.map +1 -1
- package/dist/mcp/index.d.ts +4 -4
- package/dist/mcp/index.js +7 -6
- package/dist/memory/index.d.ts +3 -3
- package/dist/memory/index.js +5 -4
- package/dist/{message-schema-B2M7AYzR.d.ts → message-schema-_sP_RKhh.d.ts} +18 -2
- package/dist/middleware-QZsbz7Hf.d.ts +56 -0
- package/dist/observability/index.d.ts +9 -8
- package/dist/observability/index.js +5 -4
- package/dist/pipeline/index.d.ts +13 -12
- package/dist/pipeline/index.js +6 -5
- package/dist/pipeline/index.js.map +1 -1
- package/dist/skills/index.d.ts +4 -4
- package/dist/skills/index.js +7 -6
- package/dist/speech-generation/index.d.ts +1 -1
- package/dist/speech-generation/index.js +2 -2
- package/dist/{text-C_6eKrbC.d.ts → text-DTg1a8Mg.d.ts} +1 -1
- package/dist/{think-tool-D8frXxwV.d.ts → think-tool-C0n_dF2K.d.ts} +2 -2
- package/dist/tool/index.d.ts +8 -7
- package/dist/tool/index.js +6 -5
- package/dist/{tool-r62gf3QY.d.ts → tool-xHM_GmzT.d.ts} +1 -1
- package/dist/transcription/index.d.ts +1 -1
- package/dist/transcription/index.js +2 -2
- package/dist/{types-CElwurHZ.d.ts → types-2DBdXArn.d.ts} +8 -5
- package/dist/{types-DbolvLtZ.d.ts → types-B1KL4w14.d.ts} +1 -1
- package/dist/{types-C3gv9EX6.d.ts → types-D0Y2ZWS3.d.ts} +1 -1
- package/dist/{types-CIPaIbZo.d.ts → types-D7A6CIGt.d.ts} +1 -1
- package/dist/{types-D9rKQ_as.d.ts → types-DboZvHR_.d.ts} +8 -1
- package/dist/{types-RT3cuyRk.d.ts → types-Dyp7arZQ.d.ts} +1 -1
- package/dist/vector-store/index.d.ts +4 -4
- package/dist/vector-store/index.js +5 -4
- package/package.json +6 -2
- package/dist/chunk-5GXSQYQT.js.map +0 -1
- package/dist/chunk-D2ECOWN5.js.map +0 -1
- package/dist/chunk-FN7HLLAZ.js.map +0 -1
- package/dist/chunk-PK5LKOFL.js.map +0 -1
- package/dist/chunk-TRQ3XRFD.js.map +0 -1
- /package/dist/{chunk-VKYZZXP5.js.map → chunk-7O45T5F2.js.map} +0 -0
- /package/dist/{chunk-AI5JMUW7.js.map → chunk-7OCVDT2X.js.map} +0 -0
- /package/dist/{chunk-FXAIYTRE.js.map → chunk-7YAH2F3J.js.map} +0 -0
- /package/dist/{chunk-RFHQY2IO.js.map → chunk-BAEFBTOW.js.map} +0 -0
- /package/dist/{chunk-ZCPOIDAQ.js.map → chunk-BOCJCECN.js.map} +0 -0
- /package/dist/{chunk-GQL5KRAH.js.map → chunk-H7BI3BSP.js.map} +0 -0
- /package/dist/{chunk-BEYBU7VJ.js.map → chunk-HVHTVGPP.js.map} +0 -0
- /package/dist/{chunk-J2W63PJI.js.map → chunk-JXZTTNCR.js.map} +0 -0
- /package/dist/{chunk-KFR4CDGK.js.map → chunk-QXQQ2DBM.js.map} +0 -0
- /package/dist/{chunk-GKDERULJ.js.map → chunk-YXLDR2O4.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as RetrySetting } from '../retry-CjvSlKGW.js';
|
|
2
|
-
import {
|
|
2
|
+
import { c as CompletionModel, J as JsonObject, U as Usage, h as CompletionResult } from '../types-DboZvHR_.js';
|
|
3
3
|
import { Z as ZodSchema } from '../zod-schema-C7F4clpm.js';
|
|
4
4
|
import '../model-call-options-CZkSw_xN.js';
|
|
5
5
|
import 'zod';
|
package/dist/extractor/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExtractionError,
|
|
3
3
|
extract
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-BOCJCECN.js";
|
|
5
5
|
import "../chunk-MGNTXGTX.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-HT4P3SSG.js";
|
|
7
|
+
import "../chunk-G5OACQEI.js";
|
|
8
|
+
import "../chunk-SROQA7I7.js";
|
|
9
|
+
import "../chunk-UBE4WH6G.js";
|
|
9
10
|
export {
|
|
10
11
|
ExtractionError,
|
|
11
12
|
extract
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as allow, f as appendGuardrailPolicies, b as block, d as defineGuardrailPolicy, c as defineInputGuardrail, e as defineOutputGuardrail, g as guardrails, h as hasEnforcedOutputGuardrails, n as normalizeGuardrailPolicies } from '../text-
|
|
2
|
-
import { c as GuardrailPolicy, g as InputGuardrailContext, j as InputGuardrailRunResult, i as OutputGuardrailContext, k as OutputGuardrailRunResult } from '../types-
|
|
3
|
-
export { l as GuardrailActionBase, m as GuardrailActionName, n as GuardrailAllow, o as GuardrailBlock, G as GuardrailBoundary, p as GuardrailCommonActions, a as GuardrailDecisionRecord, b as GuardrailMode, d as GuardrailPolicyInput, e as GuardrailPolicyOptions, q as GuardrailRunContext, I as InputGuardrail, f as InputGuardrailActions, r as InputGuardrailResult, s as InputGuardrailRewrite, O as OutputGuardrail, h as OutputGuardrailActions, t as OutputGuardrailResult, u as OutputGuardrailRewrite } from '../types-
|
|
4
|
-
import '../types-
|
|
1
|
+
export { a as allow, f as appendGuardrailPolicies, b as block, d as defineGuardrailPolicy, c as defineInputGuardrail, e as defineOutputGuardrail, g as guardrails, h as hasEnforcedOutputGuardrails, n as normalizeGuardrailPolicies } from '../text-DTg1a8Mg.js';
|
|
2
|
+
import { c as GuardrailPolicy, g as InputGuardrailContext, j as InputGuardrailRunResult, i as OutputGuardrailContext, k as OutputGuardrailRunResult } from '../types-D7A6CIGt.js';
|
|
3
|
+
export { l as GuardrailActionBase, m as GuardrailActionName, n as GuardrailAllow, o as GuardrailBlock, G as GuardrailBoundary, p as GuardrailCommonActions, a as GuardrailDecisionRecord, b as GuardrailMode, d as GuardrailPolicyInput, e as GuardrailPolicyOptions, q as GuardrailRunContext, I as InputGuardrail, f as InputGuardrailActions, r as InputGuardrailResult, s as InputGuardrailRewrite, O as OutputGuardrail, h as OutputGuardrailActions, t as OutputGuardrailResult, u as OutputGuardrailRewrite } from '../types-D7A6CIGt.js';
|
|
4
|
+
import '../types-DboZvHR_.js';
|
|
5
5
|
import '../model-call-options-CZkSw_xN.js';
|
|
6
6
|
import '../type-utils-CtHVDRn_.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { M as ModelCallOptions } from '../model-call-options-CZkSw_xN.js';
|
|
2
2
|
import { b as RetrySetting } from '../retry-CjvSlKGW.js';
|
|
3
3
|
export { R as RetryContext, a as RetryOptions } from '../retry-CjvSlKGW.js';
|
|
4
|
-
import { J as JsonObject } from '../types-
|
|
4
|
+
import { J as JsonObject } from '../types-DboZvHR_.js';
|
|
5
5
|
|
|
6
6
|
type ImageGenerationRequest = {
|
|
7
7
|
prompt: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
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-
|
|
2
|
-
export { AgentRunBlockedError, AgentRunCancelledError, AgentStreamClosedError, AgentToolSuspensionError, MaxTurnsError } from './agent/index.js';
|
|
3
|
-
export { A as
|
|
4
|
-
export { A as AgentBlockedResult, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentLifecycle, h as AgentMemoryCompactionEvent, i as AgentPrompt, j as AgentResponse, k as AgentResult, l as AgentRunOptions, m as AgentRunSettings, n as AgentStartEvent, o as AgentSteerInput, p as AgentSteerReceipt, q as AgentStepFinishEvent, r as AgentStream, s as AgentStreamEvent, t as AgentSuspendedResult, u as AgentToolCallDeltaEvent, v as AgentToolFinishEvent, w as AgentToolStartEvent } from './types-CElwurHZ.js';
|
|
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-BK3jud9q.js';
|
|
2
|
+
export { AgentRunBlockedError, AgentRunCancelledError, AgentStreamClosedError, AgentStructuredOutputError, AgentStructuredOutputFormat, AgentStructuredOutputPhase, AgentToolSuspensionError, MaxTurnsError } from './agent/index.js';
|
|
3
|
+
export { A as AgentBlockedResult, a as AgentChildStreamEvent, b as AgentDeltaEvent, c as AgentErrorEvent, d as AgentErrorStreamEvent, e as AgentFinishEvent, f as AgentInput, g as AgentLifecycle, h as AgentMemoryCompactionEvent, i as AgentPrompt, j as AgentResponse, k as AgentResult, l as AgentRunOptions, m as AgentRunSettings, n as AgentStartEvent, o as AgentSteerInput, p as AgentSteerReceipt, q as AgentStepFinishEvent, r as AgentStream, s as AgentStreamEvent, t as AgentSuspendedResult, u as AgentToolCallDeltaEvent, v as AgentToolFinishEvent, w as AgentToolStartEvent } from './types-2DBdXArn.js';
|
|
5
4
|
export { M as ModelCallOptions } from './model-call-options-CZkSw_xN.js';
|
|
6
5
|
export { R as RetryContext, a as RetryOptions, b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
7
|
-
export { A as AssistantContentPart, a as AssistantGenerationMetadata, b as AssistantMessage, C as
|
|
8
|
-
export { C as CompletionBaseOptions, a as CompletionInput, G as GenerateCompletionOptions,
|
|
9
|
-
export { a as allow, b as block, d as defineGuardrailPolicy, c as defineInputGuardrail, e as defineOutputGuardrail, g as guardrails } from './text-
|
|
10
|
-
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-
|
|
6
|
+
export { A as AssistantContentPart, a as AssistantGenerationMetadata, b as AssistantMessage, C as CompletionFinishReason, c as CompletionModel, d as CompletionModelInfo, e as CompletionModelStreamEvent, f as CompletionRequest, g as CompletionResponse, h as CompletionResult, i as CompletionSource, j as CompletionStreamEvent, k as CompletionTool, l as ContextUsage, D as Document, F as FileData, m as FilePart, I as ImageDetail, n as ImagePart, J as JsonObject, o as JsonPrimitive, p as JsonValue, M as Message, q as ModelContextLimits, P as ProviderTool, r as ProviderToolCall, R as ReasoningContentType, s as ReasoningDetail, t as ReasoningPart, S as SystemMessage, T as TextPart, u as ToolCallPart, v as ToolChoice, w as ToolDefinition, x as ToolMessage, y as ToolResultContentPart, z as ToolResultOutput, B as ToolResultPart, U as Usage, E as UserContentPart, G as UserMessage, H as calculateContextUsage, K as getAssistantGenerationMetadata, L as isProviderTool, N as resolveModelContextLimits, O as withContextUsage } from './types-DboZvHR_.js';
|
|
7
|
+
export { C as CompletionBaseOptions, a as CompletionInput, b as CompletionStructuredOutputError, c as CompletionStructuredOutputPhase, G as GenerateCompletionOptions, d as GenerateStructuredCompletionOptions, M as MessageMetadataSchema, S as StreamCompletionOptions, e as StreamStructuredCompletionOptions, f as createMessageSchema, g as generateCompletion, i as isJsonValue, h as isMessage, m as messageSchema, j as messagesSchema, p as parseMessage, k as parseMessages, s as streamCompletion } from './message-schema-_sP_RKhh.js';
|
|
8
|
+
export { a as allow, b as block, d as defineGuardrailPolicy, c as defineInputGuardrail, e as defineOutputGuardrail, g as guardrails } from './text-DTg1a8Mg.js';
|
|
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-D7A6CIGt.js';
|
|
11
10
|
export { GenerateImageOptions, GeneratedImage, ImageGenerationModel, ImageGenerationRequest, ImageGenerationResult, generateImage } from './image-generation/index.js';
|
|
12
11
|
export { MemoryCompactionConflictError, MemoryCompactionError, createMemoryScopeKey, createSummaryMemoryCompactor, isMemoryCompactionMessage } from './memory/index.js';
|
|
13
|
-
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 MemoryCompactionSnapshot, l as MemoryCompactionSnapshotOptions, m as MemoryCompactor, n as MemoryCompactorInput, o as MemoryCompactorResult, p as MemoryConversation, q as MemoryConversationGetOptions, r as MemoryConversationListOptions, s as MemoryConversationMessage, t as MemoryConversationSummary, u as MemoryErrorOptions, v as MemoryInspector, w as MemoryLoadOptions, x as MemoryOptions, y as MemorySavePolicy, z as MemoryScope, A as MemoryScopeKeyOptions, B as MemoryScopeKeyResolver, D as MemoryStore } from './types-
|
|
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 MemoryCompactionSnapshot, l as MemoryCompactionSnapshotOptions, m as MemoryCompactor, n as MemoryCompactorInput, o as MemoryCompactorResult, p as MemoryConversation, q as MemoryConversationGetOptions, r as MemoryConversationListOptions, s as MemoryConversationMessage, t as MemoryConversationSummary, u as MemoryErrorOptions, v as MemoryInspector, w as MemoryLoadOptions, x as MemoryOptions, y as MemorySavePolicy, z as MemoryScope, A as MemoryScopeKeyOptions, B as MemoryScopeKeyResolver, D as MemoryStore } from './types-B1KL4w14.js';
|
|
14
13
|
export { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
15
14
|
export { loadSkills, skill } from './skills/index.js';
|
|
16
|
-
export { S as SkillValidationError } from './types-
|
|
15
|
+
export { S as SkillValidationError } from './types-Dyp7arZQ.js';
|
|
17
16
|
export { GenerateSpeechOptions, SpeechGenerationModel, SpeechGenerationRequest, SpeechGenerationResult, generateSpeech } from './speech-generation/index.js';
|
|
18
|
-
export { C as CreateToolOptions, c as createQuestionTool, a as createThinkTool, b as createTool } from './think-tool-
|
|
19
|
-
export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, c as ToolCallContext, d as ToolCallStreamEvent, e as ToolRequiresApproval } from './tool-
|
|
17
|
+
export { C as CreateToolOptions, c as createQuestionTool, a as createThinkTool, b as createTool } from './think-tool-C0n_dF2K.js';
|
|
18
|
+
export { A as AnyTool, T as Tool, a as ToolApprovalContext, b as ToolApprovalRequirement, c as ToolCallContext, d as ToolCallStreamEvent, e as ToolRequiresApproval } from './tool-xHM_GmzT.js';
|
|
19
|
+
export { A as AgentMiddleware, C as CompletionRequestMiddlewareArgs, a as CompletionRequestMiddlewareResult, b as CompletionResponseMiddlewareArgs, c as CompletionResponseMiddlewareResult, T as ToolInputMiddlewareArgs, d as ToolInputMiddlewareResult, e as ToolOutputMiddlewareArgs, f as ToolOutputMiddlewareResult, g as ToolResultMiddlewareArgs, h as createMiddleware } from './middleware-QZsbz7Hf.js';
|
|
20
20
|
export { TranscribeOptions, TranscriptionAudio, TranscriptionModel, TranscriptionRequest, TranscriptionResult, transcribe } from './transcription/index.js';
|
|
21
|
-
import './client-
|
|
21
|
+
import './client-BdQ_QZsY.js';
|
|
22
22
|
import 'node:child_process';
|
|
23
23
|
import 'node:stream';
|
|
24
24
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
25
25
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
26
26
|
import '@modelcontextprotocol/sdk/shared/transport.js';
|
|
27
|
-
import './dynamic-tools
|
|
27
|
+
import './dynamic-tools--Aw37H9d.js';
|
|
28
28
|
import './types-Cr4uiYo5.js';
|
|
29
|
-
import './types-
|
|
30
|
-
import './
|
|
29
|
+
import './types-D0Y2ZWS3.js';
|
|
30
|
+
import './agent/interactions/index.js';
|
|
31
31
|
import 'zod';
|
|
32
|
+
import './type-utils-CtHVDRn_.js';
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSpeech
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7OCVDT2X.js";
|
|
4
4
|
import {
|
|
5
5
|
transcribe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YXLDR2O4.js";
|
|
7
7
|
import {
|
|
8
8
|
generateImage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HVHTVGPP.js";
|
|
10
10
|
import {
|
|
11
11
|
createMemoryScopeKey
|
|
12
12
|
} from "./chunk-QOUPWOGW.js";
|
|
@@ -14,47 +14,44 @@ import {
|
|
|
14
14
|
SkillValidationError,
|
|
15
15
|
loadSkills,
|
|
16
16
|
skill
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BAEFBTOW.js";
|
|
18
18
|
import {
|
|
19
19
|
Agent,
|
|
20
|
-
agentContinuationSchema,
|
|
21
|
-
agentInteractionRequestSchema,
|
|
22
|
-
agentInteractionResponseSchema,
|
|
23
20
|
createVectorContext,
|
|
24
|
-
isVectorContext
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} from "./chunk-5GXSQYQT.js";
|
|
29
|
-
import "./chunk-FXAIYTRE.js";
|
|
21
|
+
isVectorContext
|
|
22
|
+
} from "./chunk-QXSVVYQK.js";
|
|
23
|
+
import "./chunk-BEU6FCTN.js";
|
|
24
|
+
import "./chunk-7YAH2F3J.js";
|
|
30
25
|
import {
|
|
31
26
|
MemoryCompactionConflictError,
|
|
32
27
|
MemoryCompactionError,
|
|
33
28
|
createSummaryMemoryCompactor,
|
|
34
29
|
isMemoryCompactionMessage
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-QXQQ2DBM.js";
|
|
31
|
+
import "./chunk-7O45T5F2.js";
|
|
37
32
|
import "./chunk-YK4WAAS4.js";
|
|
38
33
|
import "./chunk-CQNNSZPG.js";
|
|
39
34
|
import {
|
|
40
35
|
createMiddleware,
|
|
41
36
|
createQuestionTool,
|
|
42
37
|
createThinkTool
|
|
43
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JXZTTNCR.js";
|
|
44
39
|
import {
|
|
45
40
|
createTool
|
|
46
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RZDI7B6Z.js";
|
|
47
42
|
import {
|
|
48
43
|
AgentRunBlockedError,
|
|
49
44
|
AgentRunCancelledError,
|
|
50
45
|
AgentStreamClosedError,
|
|
46
|
+
AgentStructuredOutputError,
|
|
51
47
|
AgentToolSuspensionError,
|
|
52
48
|
MaxTurnsError
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-VGJRXUPT.js";
|
|
50
|
+
import "./chunk-H7BI3BSP.js";
|
|
55
51
|
import "./chunk-3RM57ZT2.js";
|
|
56
52
|
import "./chunk-MGNTXGTX.js";
|
|
57
53
|
import {
|
|
54
|
+
CompletionStructuredOutputError,
|
|
58
55
|
Usage,
|
|
59
56
|
calculateContextUsage,
|
|
60
57
|
generateCompletion,
|
|
@@ -63,17 +60,19 @@ import {
|
|
|
63
60
|
resolveModelContextLimits,
|
|
64
61
|
streamCompletion,
|
|
65
62
|
withContextUsage
|
|
66
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-HT4P3SSG.js";
|
|
67
64
|
import {
|
|
68
65
|
createMessageSchema,
|
|
69
|
-
isJsonValue,
|
|
70
66
|
isMessage,
|
|
71
67
|
messageSchema,
|
|
72
68
|
messagesSchema,
|
|
73
69
|
parseMessage,
|
|
74
70
|
parseMessages
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import
|
|
71
|
+
} from "./chunk-G5OACQEI.js";
|
|
72
|
+
import {
|
|
73
|
+
isJsonValue
|
|
74
|
+
} from "./chunk-SROQA7I7.js";
|
|
75
|
+
import "./chunk-UBE4WH6G.js";
|
|
77
76
|
import {
|
|
78
77
|
allow,
|
|
79
78
|
block,
|
|
@@ -87,15 +86,14 @@ export {
|
|
|
87
86
|
AgentRunBlockedError,
|
|
88
87
|
AgentRunCancelledError,
|
|
89
88
|
AgentStreamClosedError,
|
|
89
|
+
AgentStructuredOutputError,
|
|
90
90
|
AgentToolSuspensionError,
|
|
91
|
+
CompletionStructuredOutputError,
|
|
91
92
|
MaxTurnsError,
|
|
92
93
|
MemoryCompactionConflictError,
|
|
93
94
|
MemoryCompactionError,
|
|
94
95
|
SkillValidationError,
|
|
95
96
|
Usage,
|
|
96
|
-
agentContinuationSchema,
|
|
97
|
-
agentInteractionRequestSchema,
|
|
98
|
-
agentInteractionResponseSchema,
|
|
99
97
|
allow,
|
|
100
98
|
block,
|
|
101
99
|
calculateContextUsage,
|
|
@@ -123,9 +121,6 @@ export {
|
|
|
123
121
|
loadSkills,
|
|
124
122
|
messageSchema,
|
|
125
123
|
messagesSchema,
|
|
126
|
-
parseAgentContinuation,
|
|
127
|
-
parseAgentInteractionRequest,
|
|
128
|
-
parseAgentInteractionResponse,
|
|
129
124
|
parseMessage,
|
|
130
125
|
parseMessages,
|
|
131
126
|
resolveModelContextLimits,
|
package/dist/internal/agent.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { R as ResolvedAgentOptions, A as Agent } from '../agent-
|
|
2
|
-
import {
|
|
3
|
-
import { T as ToolIndex } from '../dynamic-tools
|
|
4
|
-
import { A as AnyTool } from '../tool-
|
|
5
|
-
import { e as MemoryCompactionInfo } from '../types-
|
|
1
|
+
import { R as ResolvedAgentOptions, A as Agent } from '../agent-BK3jud9q.js';
|
|
2
|
+
import { c as CompletionModel, P as ProviderTool, M as Message, U as Usage, g as CompletionResponse, y as ToolResultContentPart } from '../types-DboZvHR_.js';
|
|
3
|
+
import { T as ToolIndex } from '../dynamic-tools--Aw37H9d.js';
|
|
4
|
+
import { A as AnyTool } from '../tool-xHM_GmzT.js';
|
|
5
|
+
import { e as MemoryCompactionInfo } from '../types-B1KL4w14.js';
|
|
6
6
|
import '../retry-CjvSlKGW.js';
|
|
7
7
|
import '../zod-schema-C7F4clpm.js';
|
|
8
8
|
import 'zod';
|
|
9
|
-
import '../types-
|
|
9
|
+
import '../types-D7A6CIGt.js';
|
|
10
10
|
import '../type-utils-CtHVDRn_.js';
|
|
11
|
-
import '../client-
|
|
11
|
+
import '../client-BdQ_QZsY.js';
|
|
12
12
|
import 'node:child_process';
|
|
13
13
|
import 'node:stream';
|
|
14
14
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
15
15
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
16
16
|
import '@modelcontextprotocol/sdk/shared/transport.js';
|
|
17
|
-
import '../types-
|
|
18
|
-
import '../interactions
|
|
19
|
-
import '../
|
|
17
|
+
import '../types-2DBdXArn.js';
|
|
18
|
+
import '../agent/interactions/index.js';
|
|
19
|
+
import '../middleware-QZsbz7Hf.js';
|
|
20
|
+
import '../types-Dyp7arZQ.js';
|
|
20
21
|
import '../types-Cr4uiYo5.js';
|
|
21
22
|
import '../model-call-options-CZkSw_xN.js';
|
|
22
|
-
import '../types-
|
|
23
|
+
import '../types-D0Y2ZWS3.js';
|
|
23
24
|
|
|
24
25
|
declare function createResolvedAgent<Output = string, M extends CompletionModel = CompletionModel, ContextDocument = unknown>(options: ResolvedAgentOptions<Output, M, ContextDocument>): Agent<Output, M, ContextDocument>;
|
|
25
26
|
declare function getResolvedAgentOptions<Output, M extends CompletionModel, ContextDocument>(agent: Agent<Output, M, ContextDocument>): ResolvedAgentOptions<Output, M, ContextDocument>;
|
package/dist/internal/agent.js
CHANGED
|
@@ -4,21 +4,23 @@ import {
|
|
|
4
4
|
getAgentToolState,
|
|
5
5
|
markResolvedAgentOptions,
|
|
6
6
|
withInternalAgentRunOptions
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-QXSVVYQK.js";
|
|
8
|
+
import "../chunk-BEU6FCTN.js";
|
|
9
|
+
import "../chunk-7YAH2F3J.js";
|
|
10
|
+
import "../chunk-QXQQ2DBM.js";
|
|
11
|
+
import "../chunk-7O45T5F2.js";
|
|
11
12
|
import "../chunk-YK4WAAS4.js";
|
|
12
13
|
import "../chunk-CQNNSZPG.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-JXZTTNCR.js";
|
|
15
|
+
import "../chunk-RZDI7B6Z.js";
|
|
16
|
+
import "../chunk-VGJRXUPT.js";
|
|
17
|
+
import "../chunk-H7BI3BSP.js";
|
|
17
18
|
import "../chunk-3RM57ZT2.js";
|
|
18
19
|
import "../chunk-MGNTXGTX.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-HT4P3SSG.js";
|
|
21
|
+
import "../chunk-G5OACQEI.js";
|
|
22
|
+
import "../chunk-SROQA7I7.js";
|
|
23
|
+
import "../chunk-UBE4WH6G.js";
|
|
22
24
|
import "../chunk-AZB6N7P4.js";
|
|
23
25
|
|
|
24
26
|
// src/agent/resolved-agent.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/agent/resolved-agent.ts"],"sourcesContent":["import type { CompletionModel } from \"../completion\";\nimport { Agent } from \"./agent\";\nimport { markResolvedAgentOptions } from \"./resolve-options\";\nimport { getAgentToolState } from \"./tool-state\";\nimport type { ResolvedAgentOptions } from \"./types\";\n\nexport function createResolvedAgent<\n Output = string,\n M extends CompletionModel = CompletionModel,\n ContextDocument = unknown,\n>(options: ResolvedAgentOptions<Output, M, ContextDocument>): Agent<Output, M, ContextDocument> {\n return new Agent(markResolvedAgentOptions(options));\n}\n\nexport function getResolvedAgentOptions<Output, M extends CompletionModel, ContextDocument>(\n agent: Agent<Output, M, ContextDocument>,\n): ResolvedAgentOptions<Output, M, ContextDocument> {\n const toolState = getAgentToolState(agent);\n return {\n id: agent.id,\n name: agent.name,\n description: agent.description,\n model: agent.model,\n instructions: agent.instructions,\n context: [...agent.context],\n temperature: agent.temperature,\n maxTokens: agent.maxTokens,\n providerOptions: agent.providerOptions,\n retries: agent.retries,\n tools: [...toolState.configuredTools],\n mcpServers: [...agent.mcpServers],\n providerTools: [...toolState.providerTools],\n toolIndexes: [...toolState.toolIndexes],\n toolChoice: agent.toolChoice,\n defaultMaxTurns: agent.defaultMaxTurns,\n lifecycle: agent.lifecycle,\n outputSchema: agent.outputSchema,\n observability: agent.observability,\n guardrails: [...agent.guardrails],\n middlewares: [...agent.middlewares],\n memory: agent.memory,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/agent/resolved-agent.ts"],"sourcesContent":["import type { CompletionModel } from \"../completion\";\nimport { Agent } from \"./agent\";\nimport { markResolvedAgentOptions } from \"./resolve-options\";\nimport { getAgentToolState } from \"./tool-state\";\nimport type { ResolvedAgentOptions } from \"./types\";\n\nexport function createResolvedAgent<\n Output = string,\n M extends CompletionModel = CompletionModel,\n ContextDocument = unknown,\n>(options: ResolvedAgentOptions<Output, M, ContextDocument>): Agent<Output, M, ContextDocument> {\n return new Agent(markResolvedAgentOptions(options));\n}\n\nexport function getResolvedAgentOptions<Output, M extends CompletionModel, ContextDocument>(\n agent: Agent<Output, M, ContextDocument>,\n): ResolvedAgentOptions<Output, M, ContextDocument> {\n const toolState = getAgentToolState(agent);\n return {\n id: agent.id,\n name: agent.name,\n description: agent.description,\n model: agent.model,\n instructions: agent.instructions,\n context: [...agent.context],\n temperature: agent.temperature,\n maxTokens: agent.maxTokens,\n providerOptions: agent.providerOptions,\n retries: agent.retries,\n tools: [...toolState.configuredTools],\n mcpServers: [...agent.mcpServers],\n providerTools: [...toolState.providerTools],\n toolIndexes: [...toolState.toolIndexes],\n toolChoice: agent.toolChoice,\n defaultMaxTurns: agent.defaultMaxTurns,\n lifecycle: agent.lifecycle,\n outputSchema: agent.outputSchema,\n observability: agent.observability,\n guardrails: [...agent.guardrails],\n middlewares: [...agent.middlewares],\n memory: agent.memory,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,SAAS,oBAId,SAA8F;AAC9F,SAAO,IAAI,MAAM,yBAAyB,OAAO,CAAC;AACpD;AAEO,SAAS,wBACd,OACkD;AAClD,QAAM,YAAY,kBAAkB,KAAK;AACzC,SAAO;AAAA,IACL,IAAI,MAAM;AAAA,IACV,MAAM,MAAM;AAAA,IACZ,aAAa,MAAM;AAAA,IACnB,OAAO,MAAM;AAAA,IACb,cAAc,MAAM;AAAA,IACpB,SAAS,CAAC,GAAG,MAAM,OAAO;AAAA,IAC1B,aAAa,MAAM;AAAA,IACnB,WAAW,MAAM;AAAA,IACjB,iBAAiB,MAAM;AAAA,IACvB,SAAS,MAAM;AAAA,IACf,OAAO,CAAC,GAAG,UAAU,eAAe;AAAA,IACpC,YAAY,CAAC,GAAG,MAAM,UAAU;AAAA,IAChC,eAAe,CAAC,GAAG,UAAU,aAAa;AAAA,IAC1C,aAAa,CAAC,GAAG,UAAU,WAAW;AAAA,IACtC,YAAY,MAAM;AAAA,IAClB,iBAAiB,MAAM;AAAA,IACvB,WAAW,MAAM;AAAA,IACjB,cAAc,MAAM;AAAA,IACpB,eAAe,MAAM;AAAA,IACrB,YAAY,CAAC,GAAG,MAAM,UAAU;AAAA,IAChC,aAAa,CAAC,GAAG,MAAM,WAAW;AAAA,IAClC,QAAQ,MAAM;AAAA,EAChB;AACF;","names":[]}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { M as McpClient, a as McpServer, b as McpClientGroupConnectOptions, c as McpTool } from '../client-
|
|
2
|
-
export { d as McpClientOptions, e as McpClientTransport, f as McpConnectOptions, g as McpCustomTransport, h as McpServerInfo, i as McpStdioTransport, j as McpStreamableHttpTransport, k as McpTransport } from '../client-
|
|
1
|
+
import { M as McpClient, a as McpServer, b as McpClientGroupConnectOptions, c as McpTool } from '../client-BdQ_QZsY.js';
|
|
2
|
+
export { d as McpClientOptions, e as McpClientTransport, f as McpConnectOptions, g as McpCustomTransport, h as McpServerInfo, i as McpStdioTransport, j as McpStreamableHttpTransport, k as McpTransport } from '../client-BdQ_QZsY.js';
|
|
3
3
|
import 'node:child_process';
|
|
4
4
|
import 'node:stream';
|
|
5
5
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
6
6
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
7
7
|
import '@modelcontextprotocol/sdk/shared/transport.js';
|
|
8
|
-
import '../types-
|
|
8
|
+
import '../types-DboZvHR_.js';
|
|
9
9
|
import '../model-call-options-CZkSw_xN.js';
|
|
10
|
-
import '../tool-
|
|
10
|
+
import '../tool-xHM_GmzT.js';
|
|
11
11
|
|
|
12
12
|
declare class McpClientGroup {
|
|
13
13
|
#private;
|
package/dist/mcp/index.js
CHANGED
|
@@ -2,14 +2,15 @@ import {
|
|
|
2
2
|
McpClient,
|
|
3
3
|
McpClientGroup,
|
|
4
4
|
isMcpTool
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7YAH2F3J.js";
|
|
6
6
|
import "../chunk-CQNNSZPG.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-JXZTTNCR.js";
|
|
8
|
+
import "../chunk-RZDI7B6Z.js";
|
|
9
|
+
import "../chunk-H7BI3BSP.js";
|
|
10
10
|
import "../chunk-3RM57ZT2.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-G5OACQEI.js";
|
|
12
|
+
import "../chunk-SROQA7I7.js";
|
|
13
|
+
import "../chunk-UBE4WH6G.js";
|
|
13
14
|
export {
|
|
14
15
|
McpClient,
|
|
15
16
|
McpClientGroup,
|
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as Message, U as Usage } from '../types-
|
|
2
|
-
import { a as CreateSummaryMemoryCompactorOptions, m as MemoryCompactor, f as MemoryCompactionMessage, C as CreateMemoryScopeKeyOptions } from '../types-
|
|
3
|
-
export { M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionSnapshot, l as MemoryCompactionSnapshotOptions, n as MemoryCompactorInput, o as MemoryCompactorResult, p as MemoryConversation, q as MemoryConversationGetOptions, r as MemoryConversationListOptions, s as MemoryConversationMessage, t as MemoryConversationSummary, u as MemoryErrorOptions, v as MemoryInspector, w as MemoryLoadOptions, x as MemoryOptions, y as MemorySavePolicy, z as MemoryScope, A as MemoryScopeKeyOptions, B as MemoryScopeKeyResolver, D as MemoryStore } from '../types-
|
|
1
|
+
import { M as Message, U as Usage } from '../types-DboZvHR_.js';
|
|
2
|
+
import { a as CreateSummaryMemoryCompactorOptions, m as MemoryCompactor, f as MemoryCompactionMessage, C as CreateMemoryScopeKeyOptions } from '../types-B1KL4w14.js';
|
|
3
|
+
export { M as MemoryAppendOptions, b as MemoryClearOptions, c as MemoryCompactionCapability, d as MemoryCompactionConflictRetryOptions, e as MemoryCompactionInfo, g as MemoryCompactionMetadata, h as MemoryCompactionOptions, i as MemoryCompactionReplacePrefixOptions, j as MemoryCompactionReplacePrefixResult, k as MemoryCompactionSnapshot, l as MemoryCompactionSnapshotOptions, n as MemoryCompactorInput, o as MemoryCompactorResult, p as MemoryConversation, q as MemoryConversationGetOptions, r as MemoryConversationListOptions, s as MemoryConversationMessage, t as MemoryConversationSummary, u as MemoryErrorOptions, v as MemoryInspector, w as MemoryLoadOptions, x as MemoryOptions, y as MemorySavePolicy, z as MemoryScope, A as MemoryScopeKeyOptions, B as MemoryScopeKeyResolver, D as MemoryStore } from '../types-B1KL4w14.js';
|
|
4
4
|
import '../model-call-options-CZkSw_xN.js';
|
|
5
5
|
import '../retry-CjvSlKGW.js';
|
|
6
6
|
|
package/dist/memory/index.js
CHANGED
|
@@ -6,10 +6,11 @@ import {
|
|
|
6
6
|
MemoryCompactionError,
|
|
7
7
|
createSummaryMemoryCompactor,
|
|
8
8
|
isMemoryCompactionMessage
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-QXQQ2DBM.js";
|
|
10
|
+
import "../chunk-HT4P3SSG.js";
|
|
11
|
+
import "../chunk-G5OACQEI.js";
|
|
12
|
+
import "../chunk-SROQA7I7.js";
|
|
13
|
+
import "../chunk-UBE4WH6G.js";
|
|
13
14
|
export {
|
|
14
15
|
MemoryCompactionConflictError,
|
|
15
16
|
MemoryCompactionError,
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { b as RetrySetting } from './retry-CjvSlKGW.js';
|
|
2
2
|
import { Z as ZodSchema } from './zod-schema-C7F4clpm.js';
|
|
3
|
-
import {
|
|
3
|
+
import { c as CompletionModel, M as Message, D as Document, k as CompletionTool, v as ToolChoice, J as JsonObject, U as Usage, g as CompletionResponse, X as StreamingCompletionModel, h as CompletionResult, j as CompletionStreamEvent, p as JsonValue } from './types-DboZvHR_.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
+
type CompletionStructuredOutputPhase = "truncated" | "parse" | "schema";
|
|
7
|
+
declare class CompletionStructuredOutputError extends Error {
|
|
8
|
+
readonly phase: CompletionStructuredOutputPhase;
|
|
9
|
+
readonly outputLength: number;
|
|
10
|
+
readonly usage: Usage;
|
|
11
|
+
readonly finishReason: CompletionResponse["finishReason"];
|
|
12
|
+
readonly providerFinishReason: string | undefined;
|
|
13
|
+
constructor(options: {
|
|
14
|
+
phase: CompletionStructuredOutputPhase;
|
|
15
|
+
outputLength: number;
|
|
16
|
+
usage: Usage;
|
|
17
|
+
finishReason?: CompletionResponse["finishReason"];
|
|
18
|
+
providerFinishReason?: string | undefined;
|
|
19
|
+
cause?: unknown;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
6
22
|
type CompletionInput = {
|
|
7
23
|
prompt: string;
|
|
8
24
|
messages?: never;
|
|
@@ -49,4 +65,4 @@ declare function parseMessage(value: unknown): Message;
|
|
|
49
65
|
declare function parseMessages(value: unknown): Message[];
|
|
50
66
|
declare function isMessage(value: unknown): value is Message;
|
|
51
67
|
|
|
52
|
-
export { type CompletionBaseOptions as C, type GenerateCompletionOptions as G, type MessageMetadataSchema as M, type StreamCompletionOptions as S, type CompletionInput as a,
|
|
68
|
+
export { type CompletionBaseOptions as C, type GenerateCompletionOptions as G, type MessageMetadataSchema as M, type StreamCompletionOptions as S, type CompletionInput as a, CompletionStructuredOutputError as b, type CompletionStructuredOutputPhase as c, type GenerateStructuredCompletionOptions as d, type StreamStructuredCompletionOptions as e, createMessageSchema as f, generateCompletion as g, isMessage as h, isJsonValue as i, messagesSchema as j, parseMessages as k, isStreamingCompletionModel as l, messageSchema as m, parseMessage as p, streamCompletion as s };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { f as CompletionRequest, g as CompletionResponse, p as JsonValue, y as ToolResultContentPart } from './types-DboZvHR_.js';
|
|
2
|
+
import { M as MaybePromise } from './type-utils-CtHVDRn_.js';
|
|
3
|
+
|
|
4
|
+
type CompletionRequestMiddlewareArgs = {
|
|
5
|
+
turn: number;
|
|
6
|
+
request: CompletionRequest;
|
|
7
|
+
originalRequest: CompletionRequest;
|
|
8
|
+
};
|
|
9
|
+
type CompletionRequestMiddlewareResult = {
|
|
10
|
+
request: CompletionRequest;
|
|
11
|
+
} | undefined;
|
|
12
|
+
type CompletionResponseMiddlewareArgs<RawResponse = unknown> = {
|
|
13
|
+
turn: number;
|
|
14
|
+
request: CompletionRequest;
|
|
15
|
+
response: CompletionResponse<RawResponse>;
|
|
16
|
+
originalResponse: CompletionResponse<RawResponse>;
|
|
17
|
+
};
|
|
18
|
+
type CompletionResponseMiddlewareResult<RawResponse = unknown> = {
|
|
19
|
+
response: CompletionResponse<RawResponse>;
|
|
20
|
+
} | undefined;
|
|
21
|
+
type ToolInputMiddlewareArgs = {
|
|
22
|
+
toolName: string;
|
|
23
|
+
args: string;
|
|
24
|
+
originalArgs: string;
|
|
25
|
+
turn: number;
|
|
26
|
+
toolCallId?: string | undefined;
|
|
27
|
+
internalCallId: string;
|
|
28
|
+
};
|
|
29
|
+
type ToolInputMiddlewareResult = {
|
|
30
|
+
args: JsonValue | string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
type ToolResultMiddlewareArgs = {
|
|
33
|
+
toolName: string;
|
|
34
|
+
args: string;
|
|
35
|
+
result: string;
|
|
36
|
+
originalResult: string;
|
|
37
|
+
structuredResult?: readonly ToolResultContentPart[] | undefined;
|
|
38
|
+
originalStructuredResult?: readonly ToolResultContentPart[] | undefined;
|
|
39
|
+
turn: number;
|
|
40
|
+
toolCallId?: string | undefined;
|
|
41
|
+
internalCallId: string;
|
|
42
|
+
};
|
|
43
|
+
type ToolOutputMiddlewareArgs = ToolResultMiddlewareArgs;
|
|
44
|
+
type ToolOutputMiddlewareResult = string | {
|
|
45
|
+
result?: string | undefined;
|
|
46
|
+
structuredResult?: readonly ToolResultContentPart[] | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
interface AgentMiddleware<RawResponse = unknown> {
|
|
49
|
+
onCompletionRequest?(args: CompletionRequestMiddlewareArgs): MaybePromise<CompletionRequestMiddlewareResult>;
|
|
50
|
+
onCompletionResponse?(args: CompletionResponseMiddlewareArgs<RawResponse>): MaybePromise<CompletionResponseMiddlewareResult<RawResponse>>;
|
|
51
|
+
onToolInput?(args: ToolInputMiddlewareArgs): MaybePromise<ToolInputMiddlewareResult>;
|
|
52
|
+
onToolOutput?(args: ToolOutputMiddlewareArgs): MaybePromise<ToolOutputMiddlewareResult>;
|
|
53
|
+
}
|
|
54
|
+
declare function createMiddleware<RawResponse = unknown>(middleware: AgentMiddleware<RawResponse>): AgentMiddleware<RawResponse>;
|
|
55
|
+
|
|
56
|
+
export { type AgentMiddleware as A, type CompletionRequestMiddlewareArgs as C, type ToolInputMiddlewareArgs as T, type CompletionRequestMiddlewareResult as a, type CompletionResponseMiddlewareArgs as b, type CompletionResponseMiddlewareResult as c, type ToolInputMiddlewareResult as d, type ToolOutputMiddlewareArgs as e, type ToolOutputMiddlewareResult as f, type ToolResultMiddlewareArgs as g, createMiddleware as h };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export { x as AgentGenerationEndArgs, y as AgentGenerationErrorArgs, z as AgentGenerationModelInfo, B as AgentGenerationObserver, C as AgentGenerationStartArgs, D as AgentGenerationUpdateArgs, E as AgentObservabilityOptions, F as AgentObserver, G as AgentObserverErrorPolicy, H as AgentObserverMap, I as AgentObserverTraceInfo, J as AgentRunEndArgs, K as AgentRunErrorArgs, L as AgentRunEventArgs, M as AgentRunObserver, N as AgentRunPromptRef, O as AgentRunStartArgs, P as AgentToolEndArgs, Q as AgentToolErrorArgs, R as AgentToolObserver, S as AgentToolStartArgs, T as AgentToolStreamEventArgs, U as AgentToolSuspendedArgs, V as AgentTraceInfo, W as AgentTraceOptions } from '../types-
|
|
2
|
-
import '../interactions
|
|
3
|
-
import '../types-D9rKQ_as.js';
|
|
4
|
-
import '../model-call-options-CZkSw_xN.js';
|
|
5
|
-
import '../type-utils-CtHVDRn_.js';
|
|
1
|
+
export { x as AgentGenerationEndArgs, y as AgentGenerationErrorArgs, z as AgentGenerationModelInfo, B as AgentGenerationObserver, C as AgentGenerationStartArgs, D as AgentGenerationUpdateArgs, E as AgentObservabilityOptions, F as AgentObserver, G as AgentObserverErrorPolicy, H as AgentObserverMap, I as AgentObserverTraceInfo, J as AgentRunEndArgs, K as AgentRunErrorArgs, L as AgentRunEventArgs, M as AgentRunObserver, N as AgentRunPromptRef, O as AgentRunStartArgs, P as AgentToolEndArgs, Q as AgentToolErrorArgs, R as AgentToolObserver, S as AgentToolStartArgs, T as AgentToolStreamEventArgs, U as AgentToolSuspendedArgs, V as AgentTraceInfo, W as AgentTraceOptions } from '../types-2DBdXArn.js';
|
|
2
|
+
import '../agent/interactions/index.js';
|
|
6
3
|
import 'zod';
|
|
4
|
+
import '../types-DboZvHR_.js';
|
|
5
|
+
import '../model-call-options-CZkSw_xN.js';
|
|
7
6
|
import '../retry-CjvSlKGW.js';
|
|
8
|
-
import '../types-
|
|
9
|
-
import '../
|
|
10
|
-
import '../
|
|
7
|
+
import '../types-D7A6CIGt.js';
|
|
8
|
+
import '../type-utils-CtHVDRn_.js';
|
|
9
|
+
import '../types-B1KL4w14.js';
|
|
10
|
+
import '../tool-xHM_GmzT.js';
|
|
11
|
+
import '../middleware-QZsbz7Hf.js';
|
|
11
12
|
|
|
12
13
|
type AgentObserverFailure = {
|
|
13
14
|
readonly observer: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentObserverDispatchError
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7O45T5F2.js";
|
|
4
4
|
import "../chunk-MGNTXGTX.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-HT4P3SSG.js";
|
|
6
|
+
import "../chunk-G5OACQEI.js";
|
|
7
|
+
import "../chunk-SROQA7I7.js";
|
|
8
|
+
import "../chunk-UBE4WH6G.js";
|
|
8
9
|
export {
|
|
9
10
|
AgentObserverDispatchError
|
|
10
11
|
};
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { t as AgentSuspendedResult, f as AgentInput, m as AgentRunSettings } from '../types-
|
|
2
|
-
import { A as Agent } from '../agent-
|
|
3
|
-
import { J as JsonObject,
|
|
1
|
+
import { t as AgentSuspendedResult, f as AgentInput, m as AgentRunSettings } from '../types-2DBdXArn.js';
|
|
2
|
+
import { A as Agent } from '../agent-BK3jud9q.js';
|
|
3
|
+
import { J as JsonObject, c as CompletionModel } from '../types-DboZvHR_.js';
|
|
4
4
|
import { ExtractOptions } from '../extractor/index.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
import '../interactions
|
|
7
|
-
import '../type-utils-CtHVDRn_.js';
|
|
6
|
+
import '../agent/interactions/index.js';
|
|
8
7
|
import '../retry-CjvSlKGW.js';
|
|
9
|
-
import '../types-
|
|
10
|
-
import '../
|
|
11
|
-
import '../
|
|
8
|
+
import '../types-D7A6CIGt.js';
|
|
9
|
+
import '../type-utils-CtHVDRn_.js';
|
|
10
|
+
import '../types-B1KL4w14.js';
|
|
11
|
+
import '../tool-xHM_GmzT.js';
|
|
12
|
+
import '../middleware-QZsbz7Hf.js';
|
|
12
13
|
import '../zod-schema-C7F4clpm.js';
|
|
13
|
-
import '../client-
|
|
14
|
+
import '../client-BdQ_QZsY.js';
|
|
14
15
|
import 'node:child_process';
|
|
15
16
|
import 'node:stream';
|
|
16
17
|
import '@modelcontextprotocol/sdk/client/auth.js';
|
|
17
18
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
18
19
|
import '@modelcontextprotocol/sdk/shared/transport.js';
|
|
19
|
-
import '../types-
|
|
20
|
-
import '../dynamic-tools
|
|
20
|
+
import '../types-Dyp7arZQ.js';
|
|
21
|
+
import '../dynamic-tools--Aw37H9d.js';
|
|
21
22
|
import '../types-Cr4uiYo5.js';
|
|
22
23
|
import '../model-call-options-CZkSw_xN.js';
|
|
23
|
-
import '../types-
|
|
24
|
+
import '../types-D0Y2ZWS3.js';
|
|
24
25
|
|
|
25
26
|
declare class PipelineAgentSuspensionError extends Error {
|
|
26
27
|
readonly result: AgentSuspendedResult;
|
package/dist/pipeline/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunBlockedError
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VGJRXUPT.js";
|
|
4
4
|
import {
|
|
5
5
|
mapWithConcurrency
|
|
6
6
|
} from "../chunk-3RM57ZT2.js";
|
|
7
7
|
import {
|
|
8
8
|
extract
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-BOCJCECN.js";
|
|
10
10
|
import "../chunk-MGNTXGTX.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-HT4P3SSG.js";
|
|
12
|
+
import "../chunk-G5OACQEI.js";
|
|
13
|
+
import "../chunk-SROQA7I7.js";
|
|
13
14
|
import {
|
|
14
15
|
abortError,
|
|
15
16
|
throwIfAborted
|
|
16
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-UBE4WH6G.js";
|
|
17
18
|
|
|
18
19
|
// src/pipeline/errors.ts
|
|
19
20
|
var PipelineAgentSuspensionError = class extends Error {
|