@anvia/core 0.1.5 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +7 -7
- package/dist/agent/index.js +4 -2
- package/dist/{agent-wBc0uM9_.d.ts → agent-ufaeGoaz.d.ts} +15 -5
- package/dist/audio-generation/index.d.ts +1 -1
- package/dist/{chunk-MQVFDXPC.js → chunk-4F7RVGFR.js} +17 -1
- package/dist/chunk-4F7RVGFR.js.map +1 -0
- package/dist/{chunk-CP47FBJV.js → chunk-6GJDBBDC.js} +1 -1
- package/dist/chunk-6GJDBBDC.js.map +1 -0
- package/dist/{chunk-5OVEPVTH.js → chunk-DO4XW2ZB.js} +77 -7
- package/dist/chunk-DO4XW2ZB.js.map +1 -0
- package/dist/{chunk-BT3I6O56.js → chunk-OD6TY44B.js} +1 -1
- package/dist/chunk-OD6TY44B.js.map +1 -0
- package/dist/{chunk-Q234327P.js → chunk-QAPEP4ON.js} +2 -2
- package/dist/{chunk-FHSSO753.js → chunk-QSIIO4YN.js} +3 -3
- package/dist/{chunk-WZTPK5HV.js → chunk-RLA7SST2.js} +12 -4
- package/dist/chunk-RLA7SST2.js.map +1 -0
- package/dist/chunk-RTOGIJH2.js +345 -0
- package/dist/chunk-RTOGIJH2.js.map +1 -0
- package/dist/{chunk-X2LR54ZO.js → chunk-V5EETE3U.js} +6 -2
- package/dist/chunk-V5EETE3U.js.map +1 -0
- package/dist/completion/index.d.ts +2 -2
- package/dist/completion/index.js +1 -1
- package/dist/evals/index.d.ts +4 -4
- package/dist/evals/index.js +6 -6
- package/dist/extractor/index.d.ts +4 -4
- package/dist/extractor/index.js +5 -5
- package/dist/image-generation/index.d.ts +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +24 -22
- package/dist/loaders/index.d.ts +1 -1
- package/dist/mcp/index.d.ts +4 -4
- package/dist/mcp/index.js +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/{middleware-2iCGCsB6.d.ts → middleware-CKsY_zZE.d.ts} +2 -2
- package/dist/observability/index.d.ts +10 -2
- package/dist/observability/index.js +1 -1
- package/dist/pipeline/index.d.ts +88 -13
- package/dist/pipeline/index.js +1 -1
- package/dist/skills/index.d.ts +4 -4
- package/dist/skills/index.js +2 -2
- package/dist/tool/index.d.ts +5 -5
- package/dist/tool/index.js +2 -2
- package/dist/{tool-DiWtAf_Q.d.ts → tool-FEHplpd9.d.ts} +1 -1
- package/dist/transcription/index.d.ts +1 -1
- package/dist/{types-BrxLd7ay.d.ts → types-BM8-Y8Hy.d.ts} +3 -0
- package/dist/{types-21n32ltl.d.ts → types-CW3K1MJm.d.ts} +1 -1
- package/dist/{types-ChJoZ0OH.d.ts → types-DNHlpDG_.d.ts} +2 -2
- package/dist/vector-store/index.d.ts +20 -3
- package/dist/vector-store/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5OVEPVTH.js.map +0 -1
- package/dist/chunk-BT3I6O56.js.map +0 -1
- package/dist/chunk-CP47FBJV.js.map +0 -1
- package/dist/chunk-FI2BTRT5.js +0 -86
- package/dist/chunk-FI2BTRT5.js.map +0 -1
- package/dist/chunk-MQVFDXPC.js.map +0 -1
- package/dist/chunk-WZTPK5HV.js.map +0 -1
- package/dist/chunk-X2LR54ZO.js.map +0 -1
- /package/dist/{chunk-Q234327P.js.map → chunk-QAPEP4ON.js.map} +0 -0
- /package/dist/{chunk-FHSSO753.js.map → chunk-QSIIO4YN.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
connectMcp,
|
|
7
7
|
mcp
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RLA7SST2.js";
|
|
9
9
|
import {
|
|
10
10
|
ModelListingError
|
|
11
11
|
} from "./chunk-WJT22R3T.js";
|
|
12
12
|
import {
|
|
13
13
|
createObserver
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OD6TY44B.js";
|
|
15
15
|
import {
|
|
16
16
|
Pipeline,
|
|
17
17
|
PipelineBuilder
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RTOGIJH2.js";
|
|
19
19
|
import {
|
|
20
20
|
SkillValidationError,
|
|
21
21
|
loadSkills,
|
|
@@ -34,25 +34,25 @@ import {
|
|
|
34
34
|
llmScore,
|
|
35
35
|
runEvalSuite,
|
|
36
36
|
semanticSimilarity
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QAPEP4ON.js";
|
|
38
38
|
import {
|
|
39
39
|
ExtractionError,
|
|
40
40
|
Extractor,
|
|
41
41
|
ExtractorBuilder
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QSIIO4YN.js";
|
|
43
43
|
import {
|
|
44
44
|
createThinkTool,
|
|
45
45
|
createToolIndex,
|
|
46
46
|
createToolMiddleware,
|
|
47
47
|
embedTools,
|
|
48
48
|
isDynamicToolIndex
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-V5EETE3U.js";
|
|
50
50
|
import {
|
|
51
51
|
InMemoryVectorIndex,
|
|
52
52
|
InMemoryVectorStore,
|
|
53
53
|
createVectorSearchTool,
|
|
54
54
|
vectorFilter
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-4F7RVGFR.js";
|
|
56
56
|
import {
|
|
57
57
|
Agent,
|
|
58
58
|
AgentBuilder,
|
|
@@ -63,10 +63,11 @@ import {
|
|
|
63
63
|
PromptRequest,
|
|
64
64
|
cancelPrompt,
|
|
65
65
|
createHook,
|
|
66
|
+
requestToolApproval,
|
|
66
67
|
runControl,
|
|
67
68
|
skipTool,
|
|
68
69
|
toolCallControl
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-DO4XW2ZB.js";
|
|
70
71
|
import {
|
|
71
72
|
resolveMemoryOptions
|
|
72
73
|
} from "./chunk-XXT2UCAR.js";
|
|
@@ -85,6 +86,20 @@ import {
|
|
|
85
86
|
import {
|
|
86
87
|
toReadableStream
|
|
87
88
|
} from "./chunk-XUUY2L2D.js";
|
|
89
|
+
import {
|
|
90
|
+
AssistantContent,
|
|
91
|
+
CompletionCapabilityError,
|
|
92
|
+
CompletionRequestBuilder,
|
|
93
|
+
Message,
|
|
94
|
+
ToolContent,
|
|
95
|
+
Usage,
|
|
96
|
+
UserContent,
|
|
97
|
+
assertCompletionRequestSupported,
|
|
98
|
+
formatDocument,
|
|
99
|
+
normalizeDocuments,
|
|
100
|
+
reasoningDisplayText,
|
|
101
|
+
textFromAssistantContent
|
|
102
|
+
} from "./chunk-6GJDBBDC.js";
|
|
88
103
|
import {
|
|
89
104
|
angularDistance,
|
|
90
105
|
chebyshevDistance,
|
|
@@ -100,20 +115,6 @@ import {
|
|
|
100
115
|
ImageGenerationRequestBuilder,
|
|
101
116
|
imageGenerationRequest
|
|
102
117
|
} from "./chunk-B24Q2ZYM.js";
|
|
103
|
-
import {
|
|
104
|
-
AssistantContent,
|
|
105
|
-
CompletionCapabilityError,
|
|
106
|
-
CompletionRequestBuilder,
|
|
107
|
-
Message,
|
|
108
|
-
ToolContent,
|
|
109
|
-
Usage,
|
|
110
|
-
UserContent,
|
|
111
|
-
assertCompletionRequestSupported,
|
|
112
|
-
formatDocument,
|
|
113
|
-
normalizeDocuments,
|
|
114
|
-
reasoningDisplayText,
|
|
115
|
-
textFromAssistantContent
|
|
116
|
-
} from "./chunk-CP47FBJV.js";
|
|
117
118
|
export {
|
|
118
119
|
Agent,
|
|
119
120
|
AgentBuilder,
|
|
@@ -180,6 +181,7 @@ export {
|
|
|
180
181
|
normalizeDocuments,
|
|
181
182
|
parseToolArgs,
|
|
182
183
|
reasoningDisplayText,
|
|
184
|
+
requestToolApproval,
|
|
183
185
|
resolveMemoryOptions,
|
|
184
186
|
runControl,
|
|
185
187
|
runEvalSuite,
|
package/dist/loaders/index.d.ts
CHANGED
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as McpConnection, c as McpServer, d as McpStdioOptions, b as McpHttpOptions } from '../types-
|
|
2
|
-
export { M as McpClient, e as McpToolCallContent, f as McpToolCallResult, g as McpToolDefinition } from '../types-
|
|
1
|
+
import { a as McpConnection, c as McpServer, d as McpStdioOptions, b as McpHttpOptions } from '../types-DNHlpDG_.js';
|
|
2
|
+
export { M as McpClient, e as McpToolCallContent, f as McpToolCallResult, g as McpToolDefinition } from '../types-DNHlpDG_.js';
|
|
3
3
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
4
4
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
5
|
-
import '../types-
|
|
6
|
-
import '../tool-
|
|
5
|
+
import '../types-BM8-Y8Hy.js';
|
|
6
|
+
import '../tool-FEHplpd9.js';
|
|
7
7
|
|
|
8
8
|
declare function connectMcp(connection: McpConnection): Promise<McpServer>;
|
|
9
9
|
|
package/dist/mcp/index.js
CHANGED
package/dist/memory/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { q as ToolDefinition } from './types-
|
|
2
|
+
import { q as ToolDefinition } from './types-BM8-Y8Hy.js';
|
|
3
3
|
import { VectorMetadata, EmbeddingModel, EmbeddedDocument } from './embeddings/index.js';
|
|
4
4
|
import { VectorSearchIndex } from './vector-store/index.js';
|
|
5
|
-
import { A as AnyTool, d as ToolCallContext } from './tool-
|
|
5
|
+
import { A as AnyTool, d as ToolCallContext } from './tool-FEHplpd9.js';
|
|
6
6
|
|
|
7
7
|
type ZodSchema<T = unknown> = z.ZodType<T>;
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Message, d as CompletionRequest, e as CompletionResponse, n as ToolCall, U as Usage } from '../types-
|
|
2
|
-
import { e as ToolCallStreamEvent } from '../tool-
|
|
1
|
+
import { M as Message, d as CompletionRequest, J as JsonObject, c as CompletionModelCapabilities, e as CompletionResponse, n as ToolCall, q as ToolDefinition, U as Usage } from '../types-BM8-Y8Hy.js';
|
|
2
|
+
import { e as ToolCallStreamEvent } from '../tool-FEHplpd9.js';
|
|
3
3
|
|
|
4
4
|
type AgentTraceInfo = {
|
|
5
5
|
traceId?: string | undefined;
|
|
@@ -37,6 +37,12 @@ type AgentRunErrorArgs = {
|
|
|
37
37
|
type AgentGenerationStartArgs = {
|
|
38
38
|
turn: number;
|
|
39
39
|
request: CompletionRequest;
|
|
40
|
+
providerRequest?: JsonObject | undefined;
|
|
41
|
+
modelInfo?: {
|
|
42
|
+
provider: string;
|
|
43
|
+
defaultModel: string;
|
|
44
|
+
capabilities?: CompletionModelCapabilities | undefined;
|
|
45
|
+
};
|
|
40
46
|
};
|
|
41
47
|
type AgentGenerationEndArgs<RawResponse = unknown> = {
|
|
42
48
|
turn: number;
|
|
@@ -54,6 +60,8 @@ type AgentToolStartArgs = {
|
|
|
54
60
|
args: string;
|
|
55
61
|
internalCallId: string;
|
|
56
62
|
toolCallId?: string | undefined;
|
|
63
|
+
toolDefinition?: ToolDefinition | undefined;
|
|
64
|
+
toolMetadata?: JsonObject | undefined;
|
|
57
65
|
};
|
|
58
66
|
type AgentToolEndArgs = AgentToolStartArgs & {
|
|
59
67
|
result: string;
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as CompletionModel } from '../types-
|
|
2
|
-
import { A as Agent } from '../agent-
|
|
1
|
+
import { J as JsonObject, b as CompletionModel } from '../types-BM8-Y8Hy.js';
|
|
2
|
+
import { A as Agent } from '../agent-ufaeGoaz.js';
|
|
3
3
|
import { Extractor } from '../extractor/index.js';
|
|
4
4
|
import '../memory/index.js';
|
|
5
5
|
import '../observability/index.js';
|
|
6
|
-
import '../tool-
|
|
7
|
-
import '../middleware-
|
|
6
|
+
import '../tool-FEHplpd9.js';
|
|
7
|
+
import '../middleware-CKsY_zZE.js';
|
|
8
8
|
import 'zod';
|
|
9
9
|
import '../embeddings/index.js';
|
|
10
10
|
import '../vector-store/index.js';
|
|
@@ -21,32 +21,107 @@ type AwaitedOutput<Op> = Op extends PipelineOp<unknown, infer Output> ? Awaited<
|
|
|
21
21
|
type ParallelOutput<Branches extends Record<string, PipelineOp<unknown, unknown>>> = {
|
|
22
22
|
[Key in keyof Branches]: AwaitedOutput<Branches[Key]>;
|
|
23
23
|
};
|
|
24
|
+
type PipelineMetadata = {
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
metadata?: JsonObject | undefined;
|
|
29
|
+
};
|
|
30
|
+
type PipelineStageMetadata = {
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
metadata?: JsonObject | undefined;
|
|
35
|
+
};
|
|
36
|
+
type PipelineStageKind = "input" | "step" | "pipeline" | "parallel" | "branch" | "agent" | "extractor" | "output";
|
|
37
|
+
type PipelineGraphNode = {
|
|
38
|
+
id: string;
|
|
39
|
+
kind: PipelineStageKind;
|
|
40
|
+
label: string;
|
|
41
|
+
description?: string | undefined;
|
|
42
|
+
metadata?: JsonObject | undefined;
|
|
43
|
+
agentId?: string | undefined;
|
|
44
|
+
agentName?: string | undefined;
|
|
45
|
+
pipelineId?: string | undefined;
|
|
46
|
+
branchKey?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
type PipelineGraphEdge = {
|
|
49
|
+
id: string;
|
|
50
|
+
source: string;
|
|
51
|
+
target: string;
|
|
52
|
+
label?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
type PipelineGraph = PipelineMetadata & {
|
|
55
|
+
id: string;
|
|
56
|
+
nodes: PipelineGraphNode[];
|
|
57
|
+
edges: PipelineGraphEdge[];
|
|
58
|
+
};
|
|
59
|
+
type PipelineRunEvent = {
|
|
60
|
+
type: "stage_started";
|
|
61
|
+
node: PipelineGraphNode;
|
|
62
|
+
} | {
|
|
63
|
+
type: "stage_completed";
|
|
64
|
+
node: PipelineGraphNode;
|
|
65
|
+
durationMs: number;
|
|
66
|
+
} | {
|
|
67
|
+
type: "stage_failed";
|
|
68
|
+
node: PipelineGraphNode;
|
|
69
|
+
durationMs: number;
|
|
70
|
+
error: unknown;
|
|
71
|
+
};
|
|
72
|
+
type PipelineRunObserver = {
|
|
73
|
+
onEvent(event: PipelineRunEvent): void | Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
type PipelineRunOptions = {
|
|
76
|
+
observer?: PipelineRunObserver | undefined;
|
|
77
|
+
};
|
|
78
|
+
type PipelineRunContext = {
|
|
79
|
+
observer?: PipelineRunObserver | undefined;
|
|
80
|
+
};
|
|
81
|
+
type PipelineExecutor<Input, Output> = (input: Input, context: PipelineRunContext) => Output | Promise<Output>;
|
|
82
|
+
type PipelineBuilderState = {
|
|
83
|
+
graph: PipelineGraph;
|
|
84
|
+
terminalNodeId: string;
|
|
85
|
+
terminalNodeIds: string[];
|
|
86
|
+
nextNodeIndex: number;
|
|
87
|
+
nextEdgeIndex: number;
|
|
88
|
+
};
|
|
24
89
|
/** Runnable pipeline returned by `PipelineBuilder.build()`. */
|
|
25
90
|
declare class Pipeline<Input, Output> implements PipelineOp<Input, Awaited<Output>> {
|
|
26
91
|
private readonly executor;
|
|
27
|
-
|
|
92
|
+
private readonly pipelineGraph;
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly name: string | undefined;
|
|
95
|
+
readonly description: string | undefined;
|
|
96
|
+
readonly metadata: JsonObject | undefined;
|
|
97
|
+
constructor(executor: PipelineExecutor<Input, Output>, pipelineGraph?: PipelineGraph);
|
|
28
98
|
/** Run one input through the built pipeline and return the final stage output. */
|
|
29
|
-
run(input: Input): Promise<Awaited<Output>>;
|
|
99
|
+
run(input: Input, options?: PipelineRunOptions): Promise<Awaited<Output>>;
|
|
30
100
|
/** Run many inputs through the same pipeline with bounded concurrency. */
|
|
31
101
|
batch<I extends Iterable<Input>>(inputs: I, options: PipelineBatchOptions): Promise<Array<Awaited<Output>>>;
|
|
102
|
+
graph(): PipelineGraph;
|
|
32
103
|
}
|
|
33
104
|
/** Builds a typed pipeline from an original input type to an inferred output type. */
|
|
34
105
|
declare class PipelineBuilder<Input, Output = Input> {
|
|
35
106
|
private readonly executor;
|
|
36
|
-
|
|
107
|
+
private readonly state;
|
|
108
|
+
constructor();
|
|
109
|
+
constructor(metadata: PipelineMetadata);
|
|
110
|
+
constructor(executor: (input: Input) => Output | Promise<Output>);
|
|
111
|
+
constructor(executor: PipelineExecutor<Input, Output>, state: PipelineBuilderState);
|
|
37
112
|
/** Add a synchronous or asynchronous transform stage. */
|
|
38
|
-
step<Next>(fn: (input: Awaited<Output>) => Next | Promise<Next
|
|
113
|
+
step<Next>(fn: (input: Awaited<Output>) => Next | Promise<Next>, metadata?: PipelineStageMetadata): PipelineBuilder<Input, Awaited<Next>>;
|
|
39
114
|
/** Compose another pipeline operation after the current stage. */
|
|
40
|
-
use<Next>(op: PipelineOp<Awaited<Output>, Next
|
|
115
|
+
use<Next>(op: PipelineOp<Awaited<Output>, Next>, metadata?: PipelineStageMetadata): PipelineBuilder<Input, Awaited<Next>>;
|
|
41
116
|
/** Run named branch operations concurrently from the current value. */
|
|
42
|
-
parallel<Branches extends Record<string, PipelineOp<Awaited<Output>, unknown>>>(branches: Branches): PipelineBuilder<Input, ParallelOutput<Branches>>;
|
|
117
|
+
parallel<Branches extends Record<string, PipelineOp<Awaited<Output>, unknown>>>(branches: Branches, metadata?: PipelineStageMetadata): PipelineBuilder<Input, ParallelOutput<Branches>>;
|
|
43
118
|
/** Send the current value to an agent as text and continue with the agent output. */
|
|
44
|
-
prompt(agent: Agent<CompletionModel
|
|
119
|
+
prompt(agent: Agent<CompletionModel>, metadata?: PipelineStageMetadata): PipelineBuilder<Input, string>;
|
|
45
120
|
/** Send the current value to an extractor as text and continue with typed schema data. */
|
|
46
|
-
extract<T>(extractor: Extractor<T, CompletionModel
|
|
121
|
+
extract<T>(extractor: Extractor<T, CompletionModel>, metadata?: PipelineStageMetadata): PipelineBuilder<Input, T>;
|
|
47
122
|
/** Finish the builder and return a runnable pipeline. */
|
|
48
123
|
build(): Pipeline<Input, Awaited<Output>>;
|
|
49
124
|
private runStep;
|
|
50
125
|
}
|
|
51
126
|
|
|
52
|
-
export { Pipeline, type PipelineBatchOptions, PipelineBuilder, type PipelineOp };
|
|
127
|
+
export { Pipeline, type PipelineBatchOptions, PipelineBuilder, type PipelineGraph, type PipelineGraphEdge, type PipelineGraphNode, type PipelineMetadata, type PipelineOp, type PipelineRunEvent, type PipelineRunObserver, type PipelineRunOptions, type PipelineStageKind, type PipelineStageMetadata };
|
package/dist/pipeline/index.js
CHANGED
package/dist/skills/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as SkillLoader, b as SkillSet } from '../types-
|
|
2
|
-
export { S as Skill, c as SkillValidationError, d as SkillValidationIssue } from '../types-
|
|
3
|
-
import '../tool-
|
|
4
|
-
import '../types-
|
|
1
|
+
import { a as SkillLoader, b as SkillSet } from '../types-CW3K1MJm.js';
|
|
2
|
+
export { S as Skill, c as SkillValidationError, d as SkillValidationIssue } from '../types-CW3K1MJm.js';
|
|
3
|
+
import '../tool-FEHplpd9.js';
|
|
4
|
+
import '../types-BM8-Y8Hy.js';
|
|
5
5
|
|
|
6
6
|
declare function loadSkills(loaders: SkillLoader | SkillLoader[]): Promise<SkillSet>;
|
|
7
7
|
|
package/dist/skills/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
loadSkills,
|
|
4
4
|
skill
|
|
5
5
|
} from "../chunk-2VCWYCPV.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-V5EETE3U.js";
|
|
7
|
+
import "../chunk-4F7RVGFR.js";
|
|
8
8
|
import "../chunk-YK4WAAS4.js";
|
|
9
9
|
import "../chunk-3H7FVGHU.js";
|
|
10
10
|
import "../chunk-445TT5Q5.js";
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Z as ZodSchema } from '../middleware-
|
|
3
|
-
export { D as DynamicToolIndex, E as EmbedToolsOptions, T as ToolMiddleware, a as ToolResultMiddlewareArgs, b as ToolSearchDocument, c as ToolSet, d as createToolIndex, e as createToolMiddleware, f as embedTools, i as isDynamicToolIndex } from '../middleware-
|
|
4
|
-
import { b as ToolApprovalPolicy, d as ToolCallContext, T as Tool } from '../tool-
|
|
5
|
-
export { A as AnyTool, a as ToolApprovalContext, c as ToolApprovalRunContext, e as ToolCallStreamEvent, p as parseToolArgs, s as serializeToolOutput } from '../tool-
|
|
6
|
-
import '../types-
|
|
2
|
+
import { Z as ZodSchema } from '../middleware-CKsY_zZE.js';
|
|
3
|
+
export { D as DynamicToolIndex, E as EmbedToolsOptions, T as ToolMiddleware, a as ToolResultMiddlewareArgs, b as ToolSearchDocument, c as ToolSet, d as createToolIndex, e as createToolMiddleware, f as embedTools, i as isDynamicToolIndex } from '../middleware-CKsY_zZE.js';
|
|
4
|
+
import { b as ToolApprovalPolicy, d as ToolCallContext, T as Tool } from '../tool-FEHplpd9.js';
|
|
5
|
+
export { A as AnyTool, a as ToolApprovalContext, c as ToolApprovalRunContext, e as ToolCallStreamEvent, p as parseToolArgs, s as serializeToolOutput } from '../tool-FEHplpd9.js';
|
|
6
|
+
import '../types-BM8-Y8Hy.js';
|
|
7
7
|
import '../embeddings/index.js';
|
|
8
8
|
import '../vector-store/index.js';
|
|
9
9
|
|
package/dist/tool/index.js
CHANGED
|
@@ -205,6 +205,9 @@ interface CompletionModel<RawResponse = unknown> {
|
|
|
205
205
|
readonly provider: string;
|
|
206
206
|
readonly defaultModel: string;
|
|
207
207
|
readonly capabilities: CompletionModelCapabilities;
|
|
208
|
+
traceRequest?(request: CompletionRequest, options?: {
|
|
209
|
+
stream?: boolean | undefined;
|
|
210
|
+
}): JsonObject | undefined;
|
|
208
211
|
completion(request: CompletionRequest): Promise<CompletionResponse<RawResponse>>;
|
|
209
212
|
}
|
|
210
213
|
type CompletionStreamEvent<RawResponse = unknown> = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
2
2
|
import { StreamableHTTPClientTransportOptions } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
3
|
-
import { J as JsonObject } from './types-
|
|
4
|
-
import { A as AnyTool } from './tool-
|
|
3
|
+
import { J as JsonObject } from './types-BM8-Y8Hy.js';
|
|
4
|
+
import { A as AnyTool } from './tool-FEHplpd9.js';
|
|
5
5
|
|
|
6
6
|
type McpToolDefinition = {
|
|
7
7
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VectorMetadataValue, VectorMetadata, EmbeddingModel, EmbeddedDocument, Embedding } from '../embeddings/index.js';
|
|
2
|
-
import { T as Tool } from '../tool-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { T as Tool } from '../tool-FEHplpd9.js';
|
|
3
|
+
import '../types-BM8-Y8Hy.js';
|
|
4
4
|
|
|
5
5
|
type VectorFilter = {
|
|
6
6
|
type: "eq";
|
|
@@ -51,6 +51,21 @@ type VectorSearchResult<T = unknown, Metadata extends VectorMetadata = VectorMet
|
|
|
51
51
|
document: T;
|
|
52
52
|
metadata?: Metadata | undefined;
|
|
53
53
|
};
|
|
54
|
+
type VectorInspectRequest = {
|
|
55
|
+
limit: number;
|
|
56
|
+
cursor?: string | undefined;
|
|
57
|
+
filter?: VectorFilter | undefined;
|
|
58
|
+
};
|
|
59
|
+
type VectorInspectItem<T = unknown, Metadata extends VectorMetadata = VectorMetadata> = {
|
|
60
|
+
id: string;
|
|
61
|
+
document: T;
|
|
62
|
+
metadata?: Metadata | undefined;
|
|
63
|
+
};
|
|
64
|
+
type VectorInspectPage<T = unknown, Metadata extends VectorMetadata = VectorMetadata> = {
|
|
65
|
+
items: Array<VectorInspectItem<T, Metadata>>;
|
|
66
|
+
nextCursor?: string | undefined;
|
|
67
|
+
totalCount?: number | undefined;
|
|
68
|
+
};
|
|
54
69
|
interface VectorSearchIndex<T = unknown, Metadata extends VectorMetadata = VectorMetadata> {
|
|
55
70
|
search(request: VectorSearchRequest): Promise<Array<VectorSearchResult<T, Metadata>>>;
|
|
56
71
|
searchIds(request: VectorSearchRequest): Promise<Array<{
|
|
@@ -61,6 +76,7 @@ interface VectorSearchIndex<T = unknown, Metadata extends VectorMetadata = Vecto
|
|
|
61
76
|
query: string;
|
|
62
77
|
topK?: number;
|
|
63
78
|
}, unknown>;
|
|
79
|
+
inspect?(request: VectorInspectRequest): Promise<VectorInspectPage<T, Metadata>>;
|
|
64
80
|
}
|
|
65
81
|
type VectorSearchToolOptions = {
|
|
66
82
|
name: string;
|
|
@@ -98,6 +114,7 @@ declare class InMemoryVectorIndex<T, Metadata extends VectorMetadata = VectorMet
|
|
|
98
114
|
score: number;
|
|
99
115
|
id: string;
|
|
100
116
|
}>>;
|
|
117
|
+
inspect(request: VectorInspectRequest): Promise<VectorInspectPage<T, Metadata>>;
|
|
101
118
|
asTool(options: VectorSearchToolOptions): Tool<{
|
|
102
119
|
query: string;
|
|
103
120
|
topK?: number;
|
|
@@ -108,4 +125,4 @@ declare function createVectorSearchTool<T, Metadata extends VectorMetadata>(inde
|
|
|
108
125
|
topK?: number;
|
|
109
126
|
}, Array<VectorSearchResult<T, Metadata>>>;
|
|
110
127
|
|
|
111
|
-
export { InMemoryVectorIndex, InMemoryVectorStore, type IndexStrategy, type VectorFilter, type VectorSearchIndex, type VectorSearchRequest, type VectorSearchResult, type VectorSearchToolOptions, createVectorSearchTool, vectorFilter };
|
|
128
|
+
export { InMemoryVectorIndex, InMemoryVectorStore, type IndexStrategy, type VectorFilter, type VectorInspectItem, type VectorInspectPage, type VectorInspectRequest, type VectorSearchIndex, type VectorSearchRequest, type VectorSearchResult, type VectorSearchToolOptions, createVectorSearchTool, vectorFilter };
|