@anvia/core 0.1.2 → 0.1.4
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/LICENSE +21 -0
- package/dist/agent/index.js +2 -2
- package/dist/{chunk-BIJ5ZBCO.js → chunk-67X6U5HI.js} +4 -4
- package/dist/{chunk-ZCKIAMMR.js → chunk-SXLGKGKJ.js} +2 -2
- package/dist/{chunk-U524PWC6.js → chunk-UEUE6W2X.js} +2 -2
- package/dist/chunk-WJT22R3T.js +18 -0
- package/dist/chunk-WJT22R3T.js.map +1 -0
- package/dist/evals/index.js +4 -4
- package/dist/extractor/index.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -6
- package/dist/model-listing/index.d.ts +28 -0
- package/dist/model-listing/index.js +7 -0
- package/dist/model-listing/index.js.map +1 -0
- package/package.json +12 -8
- /package/dist/{chunk-BIJ5ZBCO.js.map → chunk-67X6U5HI.js.map} +0 -0
- /package/dist/{chunk-ZCKIAMMR.js.map → chunk-SXLGKGKJ.js.map} +0 -0
- /package/dist/{chunk-U524PWC6.js.map → chunk-UEUE6W2X.js.map} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Indra Zulfi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/agent/index.js
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
runControl,
|
|
12
12
|
skipTool,
|
|
13
13
|
toolCallControl
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-67X6U5HI.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveMemoryOptions
|
|
17
17
|
} from "../chunk-XXT2UCAR.js";
|
|
18
18
|
import "../chunk-YK4WAAS4.js";
|
|
19
|
-
import "../chunk-XUUY2L2D.js";
|
|
20
19
|
import "../chunk-GNWMOSNR.js";
|
|
21
20
|
import "../chunk-B4QHQN5K.js";
|
|
21
|
+
import "../chunk-XUUY2L2D.js";
|
|
22
22
|
import "../chunk-CP47FBJV.js";
|
|
23
23
|
export {
|
|
24
24
|
Agent,
|
|
@@ -4,9 +4,6 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
isSkillTool
|
|
6
6
|
} from "./chunk-YK4WAAS4.js";
|
|
7
|
-
import {
|
|
8
|
-
toReadableStream
|
|
9
|
-
} from "./chunk-XUUY2L2D.js";
|
|
10
7
|
import {
|
|
11
8
|
ToolSet
|
|
12
9
|
} from "./chunk-GNWMOSNR.js";
|
|
@@ -14,6 +11,9 @@ import {
|
|
|
14
11
|
createTool,
|
|
15
12
|
toProviderJsonSchema
|
|
16
13
|
} from "./chunk-B4QHQN5K.js";
|
|
14
|
+
import {
|
|
15
|
+
toReadableStream
|
|
16
|
+
} from "./chunk-XUUY2L2D.js";
|
|
17
17
|
import {
|
|
18
18
|
CompletionRequestBuilder,
|
|
19
19
|
Message,
|
|
@@ -1439,4 +1439,4 @@ export {
|
|
|
1439
1439
|
AgentSession,
|
|
1440
1440
|
AgentBuilder
|
|
1441
1441
|
};
|
|
1442
|
-
//# sourceMappingURL=chunk-
|
|
1442
|
+
//# sourceMappingURL=chunk-67X6U5HI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentBuilder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-67X6U5HI.js";
|
|
4
4
|
import {
|
|
5
5
|
createTool
|
|
6
6
|
} from "./chunk-B4QHQN5K.js";
|
|
@@ -139,4 +139,4 @@ export {
|
|
|
139
139
|
Extractor,
|
|
140
140
|
ExtractorBuilder
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-SXLGKGKJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExtractorBuilder
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SXLGKGKJ.js";
|
|
4
4
|
import {
|
|
5
5
|
cosineSimilarity,
|
|
6
6
|
embedText
|
|
@@ -301,4 +301,4 @@ export {
|
|
|
301
301
|
llmScore,
|
|
302
302
|
agentEvalTarget
|
|
303
303
|
};
|
|
304
|
-
//# sourceMappingURL=chunk-
|
|
304
|
+
//# sourceMappingURL=chunk-UEUE6W2X.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/model-listing/index.ts
|
|
2
|
+
var ModelListingError = class extends Error {
|
|
3
|
+
provider;
|
|
4
|
+
statusCode;
|
|
5
|
+
cause;
|
|
6
|
+
constructor(message, options = {}) {
|
|
7
|
+
super(message, { cause: options.cause });
|
|
8
|
+
this.name = "ModelListingError";
|
|
9
|
+
this.provider = options.provider;
|
|
10
|
+
this.statusCode = options.statusCode;
|
|
11
|
+
this.cause = options.cause;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
ModelListingError
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=chunk-WJT22R3T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/model-listing/index.ts"],"sourcesContent":["export type ListedModel = {\n id: string;\n name?: string;\n description?: string;\n type?: string;\n createdAt?: number;\n ownedBy?: string;\n contextLength?: number;\n};\n\nexport type ModelList = {\n data: ListedModel[];\n};\n\nexport interface ModelListingClient {\n listModels(): Promise<ModelList>;\n}\n\ntype ModelListingErrorOptions = {\n provider?: string | undefined;\n statusCode?: number | undefined;\n cause?: unknown;\n};\n\nexport class ModelListingError extends Error {\n readonly provider?: string | undefined;\n readonly statusCode?: number | undefined;\n override readonly cause?: unknown;\n\n constructor(message: string, options: ModelListingErrorOptions = {}) {\n super(message, { cause: options.cause });\n this.name = \"ModelListingError\";\n this.provider = options.provider;\n this.statusCode = options.statusCode;\n this.cause = options.cause;\n }\n}\n"],"mappings":";AAwBO,IAAM,oBAAN,cAAgC,MAAM;AAAA,EAClC;AAAA,EACA;AAAA,EACS;AAAA,EAElB,YAAY,SAAiB,UAAoC,CAAC,GAAG;AACnE,UAAM,SAAS,EAAE,OAAO,QAAQ,MAAM,CAAC;AACvC,SAAK,OAAO;AACZ,SAAK,WAAW,QAAQ;AACxB,SAAK,aAAa,QAAQ;AAC1B,SAAK,QAAQ,QAAQ;AAAA,EACvB;AACF;","names":[]}
|
package/dist/evals/index.js
CHANGED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
llmScore,
|
|
8
8
|
runEvalSuite,
|
|
9
9
|
semanticSimilarity
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-UEUE6W2X.js";
|
|
11
|
+
import "../chunk-SXLGKGKJ.js";
|
|
12
12
|
import "../chunk-J23SIK6Y.js";
|
|
13
13
|
import "../chunk-SRGJPXKT.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-67X6U5HI.js";
|
|
15
15
|
import "../chunk-XXT2UCAR.js";
|
|
16
16
|
import "../chunk-YK4WAAS4.js";
|
|
17
|
-
import "../chunk-XUUY2L2D.js";
|
|
18
17
|
import "../chunk-GNWMOSNR.js";
|
|
19
18
|
import "../chunk-B4QHQN5K.js";
|
|
19
|
+
import "../chunk-XUUY2L2D.js";
|
|
20
20
|
import "../chunk-CP47FBJV.js";
|
|
21
21
|
import "../chunk-A7VDIZQN.js";
|
|
22
22
|
export {
|
package/dist/extractor/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
ExtractionError,
|
|
3
3
|
Extractor,
|
|
4
4
|
ExtractorBuilder
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-SXLGKGKJ.js";
|
|
6
6
|
import "../chunk-J23SIK6Y.js";
|
|
7
7
|
import "../chunk-SRGJPXKT.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-67X6U5HI.js";
|
|
9
9
|
import "../chunk-XXT2UCAR.js";
|
|
10
10
|
import "../chunk-YK4WAAS4.js";
|
|
11
|
-
import "../chunk-XUUY2L2D.js";
|
|
12
11
|
import "../chunk-GNWMOSNR.js";
|
|
13
12
|
import "../chunk-B4QHQN5K.js";
|
|
13
|
+
import "../chunk-XUUY2L2D.js";
|
|
14
14
|
import "../chunk-CP47FBJV.js";
|
|
15
15
|
import "../chunk-A7VDIZQN.js";
|
|
16
16
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { ExtractionError, ExtractionResponse, Extractor, ExtractorBuilder } from
|
|
|
10
10
|
export { GeneratedImage, ImageGenerationModel, ImageGenerationRequest, ImageGenerationRequestBuilder, ImageGenerationResponse, imageGenerationRequest } from './image-generation/index.js';
|
|
11
11
|
export { connectMcp, mcp } from './mcp/index.js';
|
|
12
12
|
export { M as McpClient, a as McpConnection, b as McpHttpOptions, c as McpServer, d as McpStdioOptions, e as McpToolCallContent, f as McpToolCallResult, g as McpToolDefinition } from './types-B5B8Sdl4.js';
|
|
13
|
+
export { ListedModel, ModelList, ModelListingClient, ModelListingError } from './model-listing/index.js';
|
|
13
14
|
export { AgentGenerationEndArgs, AgentGenerationErrorArgs, AgentGenerationObserver, AgentGenerationStartArgs, AgentObserver, AgentObserverRegistration, AgentRunEndArgs, AgentRunErrorArgs, AgentRunObserver, AgentRunStartArgs, AgentToolEndArgs, AgentToolErrorArgs, AgentToolObserver, AgentToolStartArgs, AgentTraceInfo, AgentTraceOptions, ObserveOptions, createObserver } from './observability/index.js';
|
|
14
15
|
export { Pipeline, PipelineBatchOptions, PipelineBuilder, PipelineOp } from './pipeline/index.js';
|
|
15
16
|
export { D as DynamicToolIndex, E as EmbedToolsOptions, T as ToolMiddleware, a as ToolResultMiddlewareArgs, b as ToolSearchDocument, c as ToolSet, Z as ZodSchema, d as createToolIndex, e as createToolMiddleware, f as embedTools, i as isDynamicToolIndex } from './zod-schema-Cq_9zlmJ.js';
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
connectMcp,
|
|
7
7
|
mcp
|
|
8
8
|
} from "./chunk-WZTPK5HV.js";
|
|
9
|
+
import {
|
|
10
|
+
ModelListingError
|
|
11
|
+
} from "./chunk-WJT22R3T.js";
|
|
9
12
|
import {
|
|
10
13
|
createObserver
|
|
11
14
|
} from "./chunk-S55WOHX5.js";
|
|
@@ -31,12 +34,12 @@ import {
|
|
|
31
34
|
llmScore,
|
|
32
35
|
runEvalSuite,
|
|
33
36
|
semanticSimilarity
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-UEUE6W2X.js";
|
|
35
38
|
import {
|
|
36
39
|
ExtractionError,
|
|
37
40
|
Extractor,
|
|
38
41
|
ExtractorBuilder
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-SXLGKGKJ.js";
|
|
40
43
|
import {
|
|
41
44
|
createThinkTool,
|
|
42
45
|
createToolIndex,
|
|
@@ -63,14 +66,11 @@ import {
|
|
|
63
66
|
runControl,
|
|
64
67
|
skipTool,
|
|
65
68
|
toolCallControl
|
|
66
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-67X6U5HI.js";
|
|
67
70
|
import {
|
|
68
71
|
resolveMemoryOptions
|
|
69
72
|
} from "./chunk-XXT2UCAR.js";
|
|
70
73
|
import "./chunk-YK4WAAS4.js";
|
|
71
|
-
import {
|
|
72
|
-
toReadableStream
|
|
73
|
-
} from "./chunk-XUUY2L2D.js";
|
|
74
74
|
import {
|
|
75
75
|
ToolCallError,
|
|
76
76
|
ToolJsonError,
|
|
@@ -82,6 +82,9 @@ import {
|
|
|
82
82
|
import {
|
|
83
83
|
createTool
|
|
84
84
|
} from "./chunk-B4QHQN5K.js";
|
|
85
|
+
import {
|
|
86
|
+
toReadableStream
|
|
87
|
+
} from "./chunk-XUUY2L2D.js";
|
|
85
88
|
import {
|
|
86
89
|
AssistantContent,
|
|
87
90
|
CompletionCapabilityError,
|
|
@@ -129,6 +132,7 @@ export {
|
|
|
129
132
|
InMemoryVectorStore,
|
|
130
133
|
MaxTurnsError,
|
|
131
134
|
Message,
|
|
135
|
+
ModelListingError,
|
|
132
136
|
Pipeline,
|
|
133
137
|
PipelineBuilder,
|
|
134
138
|
PromptCancelledError,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type ListedModel = {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
createdAt?: number;
|
|
7
|
+
ownedBy?: string;
|
|
8
|
+
contextLength?: number;
|
|
9
|
+
};
|
|
10
|
+
type ModelList = {
|
|
11
|
+
data: ListedModel[];
|
|
12
|
+
};
|
|
13
|
+
interface ModelListingClient {
|
|
14
|
+
listModels(): Promise<ModelList>;
|
|
15
|
+
}
|
|
16
|
+
type ModelListingErrorOptions = {
|
|
17
|
+
provider?: string | undefined;
|
|
18
|
+
statusCode?: number | undefined;
|
|
19
|
+
cause?: unknown;
|
|
20
|
+
};
|
|
21
|
+
declare class ModelListingError extends Error {
|
|
22
|
+
readonly provider?: string | undefined;
|
|
23
|
+
readonly statusCode?: number | undefined;
|
|
24
|
+
readonly cause?: unknown;
|
|
25
|
+
constructor(message: string, options?: ModelListingErrorOptions);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { type ListedModel, type ModelList, type ModelListingClient, ModelListingError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvia/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Core runtime primitives for context-aware Anvia agents.",
|
|
5
5
|
"author": "anvia",
|
|
6
6
|
"maintainer": "Indra Zulfi",
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
"types": "./dist/memory/index.d.ts",
|
|
53
53
|
"import": "./dist/memory/index.js"
|
|
54
54
|
},
|
|
55
|
+
"./model-listing": {
|
|
56
|
+
"types": "./dist/model-listing/index.d.ts",
|
|
57
|
+
"import": "./dist/model-listing/index.js"
|
|
58
|
+
},
|
|
55
59
|
"./observability": {
|
|
56
60
|
"types": "./dist/observability/index.d.ts",
|
|
57
61
|
"import": "./dist/observability/index.js"
|
|
@@ -85,22 +89,22 @@
|
|
|
85
89
|
"import": "./dist/vector-store/index.js"
|
|
86
90
|
}
|
|
87
91
|
},
|
|
88
|
-
"scripts": {
|
|
89
|
-
"build": "tsup src/index.ts src/agent/index.ts src/audio-generation/index.ts src/completion/index.ts src/embeddings/index.ts src/evals/index.ts src/image-generation/index.ts src/loaders/index.ts src/extractor/index.ts src/mcp/index.ts src/memory/index.ts src/observability/index.ts src/pipeline/index.ts src/skills/index.ts src/streaming/index.ts src/tool/index.ts src/transcription/index.ts src/vector-store/index.ts --format esm --dts --sourcemap --clean",
|
|
90
|
-
"test": "vitest run",
|
|
91
|
-
"typecheck": "tsc --noEmit"
|
|
92
|
-
},
|
|
93
92
|
"dependencies": {
|
|
94
93
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
95
94
|
"pdfjs-dist": "^5.7.284",
|
|
96
95
|
"tinyglobby": "^0.2.16",
|
|
97
96
|
"yaml": "^2.8.4",
|
|
98
|
-
"zod": "^4.4.
|
|
97
|
+
"zod": "^4.4.3"
|
|
99
98
|
},
|
|
100
99
|
"devDependencies": {
|
|
101
100
|
"@types/node": "^24.9.1",
|
|
102
101
|
"tsup": "^8.5.0",
|
|
103
102
|
"typescript": "^5.9.3",
|
|
104
103
|
"vitest": "^4.0.8"
|
|
104
|
+
},
|
|
105
|
+
"scripts": {
|
|
106
|
+
"build": "tsup src/index.ts src/agent/index.ts src/audio-generation/index.ts src/completion/index.ts src/embeddings/index.ts src/evals/index.ts src/image-generation/index.ts src/loaders/index.ts src/extractor/index.ts src/mcp/index.ts src/memory/index.ts src/model-listing/index.ts src/observability/index.ts src/pipeline/index.ts src/skills/index.ts src/streaming/index.ts src/tool/index.ts src/transcription/index.ts src/vector-store/index.ts --format esm --dts --sourcemap --clean",
|
|
107
|
+
"test": "vitest run",
|
|
108
|
+
"typecheck": "tsc --noEmit"
|
|
105
109
|
}
|
|
106
|
-
}
|
|
110
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|