@inkeep/agents-core 0.22.1 → 0.22.2
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/client-exports.d.cts +6 -6
- package/dist/client-exports.d.ts +6 -6
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/index.cjs +1 -9
- package/dist/index.d.cts +256 -256
- package/dist/index.d.ts +256 -256
- package/dist/index.js +1 -9
- package/dist/{schema-lnJ7dKE3.d.cts → schema-C-O4Dx8k.d.cts} +1 -1
- package/dist/{schema-9o975__r.d.ts → schema-CjTRX20S.d.ts} +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/{utility-DmLVF565.d.cts → utility-Ciw5NRcr.d.cts} +246 -246
- package/dist/{utility-DmLVF565.d.ts → utility-Ciw5NRcr.d.ts} +246 -246
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, o as AGGREGATE_OPERATORS, A as AI_OPERATIONS, i as AI_TOOL_TYPES, n as DATA_SOURCES, j as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, l as ORDER_DIRECTIONS, P as PANEL_TYPES, p as QUERY_DEFAULTS, k as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, m as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-Bqpkx5sK.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-
|
|
4
|
-
export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-
|
|
3
|
+
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-Ciw5NRcr.cjs';
|
|
4
|
+
export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-Ciw5NRcr.cjs';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -128,8 +128,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
128
128
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
130
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
131
|
-
id: z.ZodString;
|
|
132
131
|
name: z.ZodString;
|
|
132
|
+
id: z.ZodString;
|
|
133
133
|
description: z.ZodString;
|
|
134
134
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
135
135
|
}, {
|
|
@@ -164,12 +164,11 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
164
164
|
description: z.ZodOptional<z.ZodString>;
|
|
165
165
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
166
166
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
167
|
-
id: z.ZodString;
|
|
168
167
|
name: z.ZodString;
|
|
169
|
-
|
|
170
|
-
prompt: z.ZodString;
|
|
168
|
+
id: z.ZodString;
|
|
171
169
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
172
170
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
171
|
+
description: z.ZodString;
|
|
173
172
|
models: z.ZodOptional<z.ZodObject<{
|
|
174
173
|
base: z.ZodOptional<z.ZodObject<{
|
|
175
174
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -193,6 +192,7 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
193
192
|
}, {
|
|
194
193
|
stepCountIs?: number | undefined;
|
|
195
194
|
}>>>>;
|
|
195
|
+
prompt: z.ZodString;
|
|
196
196
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
197
197
|
type: z.ZodLiteral<"internal">;
|
|
198
198
|
canUse: z.ZodArray<z.ZodObject<{
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, o as AGGREGATE_OPERATORS, A as AI_OPERATIONS, i as AI_TOOL_TYPES, n as DATA_SOURCES, j as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, l as ORDER_DIRECTIONS, P as PANEL_TYPES, p as QUERY_DEFAULTS, k as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, m as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-Bqpkx5sK.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-
|
|
4
|
-
export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-
|
|
3
|
+
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-Ciw5NRcr.js';
|
|
4
|
+
export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-Ciw5NRcr.js';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -128,8 +128,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
128
128
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
130
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
131
|
-
id: z.ZodString;
|
|
132
131
|
name: z.ZodString;
|
|
132
|
+
id: z.ZodString;
|
|
133
133
|
description: z.ZodString;
|
|
134
134
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
135
135
|
}, {
|
|
@@ -164,12 +164,11 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
164
164
|
description: z.ZodOptional<z.ZodString>;
|
|
165
165
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
166
166
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
167
|
-
id: z.ZodString;
|
|
168
167
|
name: z.ZodString;
|
|
169
|
-
|
|
170
|
-
prompt: z.ZodString;
|
|
168
|
+
id: z.ZodString;
|
|
171
169
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
172
170
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
171
|
+
description: z.ZodString;
|
|
173
172
|
models: z.ZodOptional<z.ZodObject<{
|
|
174
173
|
base: z.ZodOptional<z.ZodObject<{
|
|
175
174
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -193,6 +192,7 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
193
192
|
}, {
|
|
194
193
|
stepCountIs?: number | undefined;
|
|
195
194
|
}>>>>;
|
|
195
|
+
prompt: z.ZodString;
|
|
196
196
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
197
197
|
type: z.ZodLiteral<"internal">;
|
|
198
198
|
canUse: z.ZodArray<z.ZodObject<{
|
package/dist/db/schema.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { E as agentRelations, H as agentToolRelationsRelations, a as agents, w as apiKeys, G as apiKeysRelations, j as artifactComponents, M as artifactComponentsRelations, b as contextCache, C as contextCacheRelations, c as contextConfigs, B as contextConfigsRelations, r as conversations, K as conversationsRelations, x as credentialReferences, I as credentialReferencesRelations, h as dataComponents, O as dataComponentsRelations, f as externalAgents, F as externalAgentsRelations, m as functionTools, T as functionToolsRelations, n as functions, R as functionsRelations, v as ledgerArtifacts, Q as ledgerArtifactsRelations, u as messages, L as messagesRelations, p as projects, z as projectsRelations, k as subAgentArtifactComponents, N as subAgentArtifactComponentsRelations, i as subAgentDataComponents, P as subAgentDataComponentsRelations, q as subAgentFunctionToolRelations, U as subAgentFunctionToolRelationsRelations, e as subAgentRelations, S as subAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, D as subAgentsRelations, g as taskRelations, A as taskRelationsRelations, t as tasks, y as tasksRelations, l as tools, J as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-Ciw5NRcr.cjs';
|
|
4
|
+
export { E as agentRelations, H as agentToolRelationsRelations, a as agents, w as apiKeys, G as apiKeysRelations, j as artifactComponents, M as artifactComponentsRelations, b as contextCache, C as contextCacheRelations, c as contextConfigs, B as contextConfigsRelations, r as conversations, K as conversationsRelations, x as credentialReferences, I as credentialReferencesRelations, h as dataComponents, O as dataComponentsRelations, f as externalAgents, F as externalAgentsRelations, m as functionTools, T as functionToolsRelations, n as functions, R as functionsRelations, v as ledgerArtifacts, Q as ledgerArtifactsRelations, u as messages, L as messagesRelations, p as projects, z as projectsRelations, k as subAgentArtifactComponents, N as subAgentArtifactComponentsRelations, i as subAgentDataComponents, P as subAgentDataComponentsRelations, q as subAgentFunctionToolRelations, U as subAgentFunctionToolRelationsRelations, e as subAgentRelations, S as subAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, D as subAgentsRelations, g as taskRelations, A as taskRelationsRelations, t as tasks, y as tasksRelations, l as tools, J as toolsRelations } from '../schema-C-O4Dx8k.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/db/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { E as agentRelations, H as agentToolRelationsRelations, a as agents, w as apiKeys, G as apiKeysRelations, j as artifactComponents, M as artifactComponentsRelations, b as contextCache, C as contextCacheRelations, c as contextConfigs, B as contextConfigsRelations, r as conversations, K as conversationsRelations, x as credentialReferences, I as credentialReferencesRelations, h as dataComponents, O as dataComponentsRelations, f as externalAgents, F as externalAgentsRelations, m as functionTools, T as functionToolsRelations, n as functions, R as functionsRelations, v as ledgerArtifacts, Q as ledgerArtifactsRelations, u as messages, L as messagesRelations, p as projects, z as projectsRelations, k as subAgentArtifactComponents, N as subAgentArtifactComponentsRelations, i as subAgentDataComponents, P as subAgentDataComponentsRelations, q as subAgentFunctionToolRelations, U as subAgentFunctionToolRelationsRelations, e as subAgentRelations, S as subAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, D as subAgentsRelations, g as taskRelations, A as taskRelationsRelations, t as tasks, y as tasksRelations, l as tools, J as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-Ciw5NRcr.js';
|
|
4
|
+
export { E as agentRelations, H as agentToolRelationsRelations, a as agents, w as apiKeys, G as apiKeysRelations, j as artifactComponents, M as artifactComponentsRelations, b as contextCache, C as contextCacheRelations, c as contextConfigs, B as contextConfigsRelations, r as conversations, K as conversationsRelations, x as credentialReferences, I as credentialReferencesRelations, h as dataComponents, O as dataComponentsRelations, f as externalAgents, F as externalAgentsRelations, m as functionTools, T as functionToolsRelations, n as functions, R as functionsRelations, v as ledgerArtifacts, Q as ledgerArtifactsRelations, u as messages, L as messagesRelations, p as projects, z as projectsRelations, k as subAgentArtifactComponents, N as subAgentArtifactComponentsRelations, i as subAgentDataComponents, P as subAgentDataComponentsRelations, q as subAgentFunctionToolRelations, U as subAgentFunctionToolRelationsRelations, e as subAgentRelations, S as subAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, D as subAgentsRelations, g as taskRelations, A as taskRelationsRelations, t as tasks, y as tasksRelations, l as tools, J as toolsRelations } from '../schema-CjTRX20S.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/index.cjs
CHANGED
|
@@ -215200,7 +215200,6 @@ var ContextConfigBuilder = class {
|
|
|
215200
215200
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
215201
215201
|
};
|
|
215202
215202
|
}
|
|
215203
|
-
// Getter methods
|
|
215204
215203
|
getId() {
|
|
215205
215204
|
if (!this.config.id) {
|
|
215206
215205
|
throw new Error("Context config ID is not set");
|
|
@@ -215213,7 +215212,6 @@ var ContextConfigBuilder = class {
|
|
|
215213
215212
|
getContextVariables() {
|
|
215214
215213
|
return this.config.contextVariables || {};
|
|
215215
215214
|
}
|
|
215216
|
-
// Builder methods for fluent API
|
|
215217
215215
|
withHeadersSchema(schema) {
|
|
215218
215216
|
this.config.headersSchema = schema;
|
|
215219
215217
|
return this;
|
|
@@ -215222,7 +215220,6 @@ var ContextConfigBuilder = class {
|
|
|
215222
215220
|
toTemplate(path2) {
|
|
215223
215221
|
return `{{${path2}}}`;
|
|
215224
215222
|
}
|
|
215225
|
-
// Validation method
|
|
215226
215223
|
validate() {
|
|
215227
215224
|
try {
|
|
215228
215225
|
const contextVariables = this.config.contextVariables || {};
|
|
@@ -215250,7 +215247,6 @@ var ContextConfigBuilder = class {
|
|
|
215250
215247
|
return { valid: false, errors: ["Unknown validation error"] };
|
|
215251
215248
|
}
|
|
215252
215249
|
}
|
|
215253
|
-
// Initialize and save to database
|
|
215254
215250
|
async init() {
|
|
215255
215251
|
const validation = this.validate();
|
|
215256
215252
|
if (!validation.valid) {
|
|
@@ -215275,7 +215271,6 @@ var ContextConfigBuilder = class {
|
|
|
215275
215271
|
throw error;
|
|
215276
215272
|
}
|
|
215277
215273
|
}
|
|
215278
|
-
// Private method to upsert context config
|
|
215279
215274
|
async upsertContextConfig() {
|
|
215280
215275
|
const configData = {
|
|
215281
215276
|
id: this.getId(),
|
|
@@ -215344,7 +215339,6 @@ var ContextConfigBuilder = class {
|
|
|
215344
215339
|
throw new Error(`Network error while upserting context config: ${String(error)}`);
|
|
215345
215340
|
}
|
|
215346
215341
|
}
|
|
215347
|
-
// Helper method to parse error responses
|
|
215348
215342
|
async parseErrorResponse(response) {
|
|
215349
215343
|
try {
|
|
215350
215344
|
const contentType = response.headers?.get("content-type");
|
|
@@ -220774,9 +220768,7 @@ var updateFullAgentServerSide = (db, logger14 = defaultLogger) => async (scopes,
|
|
|
220774
220768
|
const modelTypes = ["base", "structuredOutput", "summarizer"];
|
|
220775
220769
|
const cascadedModels = { ...finalModelSettings };
|
|
220776
220770
|
for (const modelType of modelTypes) {
|
|
220777
|
-
if (subAgentModels[modelType]?.model && existingAgentModels?.[modelType]?.model && subAgentModels[modelType].model === existingAgentModels[modelType].model && agentModels[modelType] &&
|
|
220778
|
-
(agentModels[modelType].model !== existingAgentModels[modelType]?.model || // OR providerOptions changed
|
|
220779
|
-
JSON.stringify(agentModels[modelType].providerOptions) !== JSON.stringify(existingAgentModels[modelType]?.providerOptions))) {
|
|
220771
|
+
if (subAgentModels[modelType]?.model && existingAgentModels?.[modelType]?.model && subAgentModels[modelType].model === existingAgentModels[modelType].model && agentModels[modelType] && (agentModels[modelType].model !== existingAgentModels[modelType]?.model || JSON.stringify(agentModels[modelType].providerOptions) !== JSON.stringify(existingAgentModels[modelType]?.providerOptions))) {
|
|
220780
220772
|
cascadedModels[modelType] = agentModels[modelType];
|
|
220781
220773
|
logger14.info(
|
|
220782
220774
|
{
|