@inkeep/agents-core 0.41.0 → 0.41.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/auth/auth-schema.d.ts +104 -104
- package/dist/auth/auth-validation-schemas.d.ts +146 -146
- package/dist/auth/auth.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/data-access/apiKeys.d.ts +4 -4
- package/dist/data-access/conversations.d.ts +8 -8
- package/dist/data-access/messages.d.ts +6 -6
- package/dist/data-access/subAgentExternalAgentRelations.d.ts +6 -6
- package/dist/data-access/subAgentRelations.d.ts +2 -2
- package/dist/data-access/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/tasks.d.ts +2 -2
- package/dist/data-access/tools.d.ts +6 -6
- package/dist/db/schema.d.ts +405 -405
- package/dist/utils/model-factory.js +13 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +771 -771
- package/package.json +2 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getLogger } from "./logger.js";
|
|
2
2
|
import { anthropic, createAnthropic } from "@ai-sdk/anthropic";
|
|
3
|
+
import { createAzure } from "@ai-sdk/azure";
|
|
3
4
|
import { createGateway, gateway } from "@ai-sdk/gateway";
|
|
4
5
|
import { createGoogleGenerativeAI, google } from "@ai-sdk/google";
|
|
5
6
|
import { createOpenAI, openai } from "@ai-sdk/openai";
|
|
@@ -25,6 +26,12 @@ var ModelFactory = class ModelFactory {
|
|
|
25
26
|
static createProvider(provider, config) {
|
|
26
27
|
switch (provider) {
|
|
27
28
|
case "anthropic": return createAnthropic(config);
|
|
29
|
+
case "azure":
|
|
30
|
+
if (!config.resourceName && !config.baseURL) {
|
|
31
|
+
const errorMessage = !!process.env.AZURE_OPENAI_API_KEY ? "Azure provider requires either resourceName or baseURL in provider options. Provide resourceName for standard Azure OpenAI, or baseURL for custom endpoints." : "Azure provider requires either resourceName or baseURL in provider options, and AZURE_OPENAI_API_KEY environment variable must be set. Provide resourceName for standard Azure OpenAI, or baseURL for custom endpoints.";
|
|
32
|
+
throw new Error(errorMessage);
|
|
33
|
+
}
|
|
34
|
+
return createAzure(config);
|
|
28
35
|
case "openai": return createOpenAI(config);
|
|
29
36
|
case "google": return createGoogleGenerativeAI(config);
|
|
30
37
|
case "openrouter": return createOpenRouter(config);
|
|
@@ -66,6 +73,8 @@ var ModelFactory = class ModelFactory {
|
|
|
66
73
|
const providerConfig = {};
|
|
67
74
|
if (providerOptions.baseUrl || providerOptions.baseURL) providerConfig.baseURL = providerOptions.baseUrl || providerOptions.baseURL;
|
|
68
75
|
if (providerOptions.headers) providerConfig.headers = providerOptions.headers;
|
|
76
|
+
if (providerOptions.resourceName) providerConfig.resourceName = providerOptions.resourceName;
|
|
77
|
+
if (providerOptions.apiVersion) providerConfig.apiVersion = providerOptions.apiVersion;
|
|
69
78
|
if (providerOptions.gateway) Object.assign(providerConfig, providerOptions.gateway);
|
|
70
79
|
if (providerOptions.nim) Object.assign(providerConfig, providerOptions.nim);
|
|
71
80
|
if (providerOptions.custom) Object.assign(providerConfig, providerOptions.custom);
|
|
@@ -88,7 +97,7 @@ var ModelFactory = class ModelFactory {
|
|
|
88
97
|
hasProviderOptions: !!modelSettings.providerOptions
|
|
89
98
|
}, "Creating language model from config");
|
|
90
99
|
const providerConfig = ModelFactory.extractProviderConfig(modelSettings.providerOptions);
|
|
91
|
-
if (Object.keys(providerConfig).length > 0) {
|
|
100
|
+
if (provider === "azure" || Object.keys(providerConfig).length > 0) {
|
|
92
101
|
logger.info({ config: providerConfig }, `Applying custom ${provider} provider configuration`);
|
|
93
102
|
return ModelFactory.createProvider(provider, providerConfig).languageModel(modelName);
|
|
94
103
|
}
|
|
@@ -108,6 +117,7 @@ var ModelFactory = class ModelFactory {
|
|
|
108
117
|
*/
|
|
109
118
|
static BUILT_IN_PROVIDERS = [
|
|
110
119
|
"anthropic",
|
|
120
|
+
"azure",
|
|
111
121
|
"openai",
|
|
112
122
|
"google",
|
|
113
123
|
"openrouter",
|
|
@@ -143,6 +153,8 @@ var ModelFactory = class ModelFactory {
|
|
|
143
153
|
"apiKey",
|
|
144
154
|
"baseURL",
|
|
145
155
|
"baseUrl",
|
|
156
|
+
"resourceName",
|
|
157
|
+
"apiVersion",
|
|
146
158
|
"maxDuration",
|
|
147
159
|
"headers",
|
|
148
160
|
"gateway",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as drizzle_zod0 from "drizzle-zod";
|
|
3
3
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
4
4
|
|
|
5
5
|
//#region src/validation/drizzle-schema-helpers.d.ts
|
|
@@ -22,8 +22,8 @@ declare const resourceIdSchema: z.ZodString;
|
|
|
22
22
|
declare function createResourceIdSchema(description: string, options?: {
|
|
23
23
|
example?: string;
|
|
24
24
|
}): z.ZodString;
|
|
25
|
-
declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>):
|
|
26
|
-
declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>):
|
|
25
|
+
declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"select", T["_"]["columns"], drizzle_zod0.BuildRefine<T["_"]["columns"], undefined>, undefined>;
|
|
26
|
+
declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"insert", T["_"]["columns"], drizzle_zod0.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
|
|
27
27
|
declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
|
|
28
28
|
declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
|
|
29
29
|
/**
|