@inkeep/agents-core 0.33.0 → 0.33.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/{chunk-HS7ZTPLJ.js → chunk-62UIQW4L.js} +1 -1
- package/dist/{chunk-JFSIBQHO.js → chunk-6MC5N2NE.js} +1 -1
- package/dist/{chunk-VSQY72K5.js → chunk-S75NGJ6E.js} +7 -3
- package/dist/client-exports.cjs +7 -3
- package/dist/client-exports.d.cts +5 -5
- package/dist/client-exports.d.ts +5 -5
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.cjs +7 -3
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +57 -33
- package/dist/index.d.cts +270 -270
- package/dist/index.d.ts +270 -270
- package/dist/index.js +57 -37
- package/dist/{schema-BceDktlR.d.ts → schema-DYCQuSqA.d.ts} +3 -3
- package/dist/{schema-aKVr9nIb.d.cts → schema-dODUpZEu.d.cts} +3 -3
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-aMKDDNv4.d.cts → utility-B73oHEd8.d.cts} +247 -245
- package/dist/{utility-aMKDDNv4.d.ts → utility-B73oHEd8.d.ts} +247 -245
- package/dist/validation/index.cjs +7 -3
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-
|
|
1
|
+
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-6MC5N2NE.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/validation/cycleDetection.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { subAgents, subAgentRelations, agents, tasks, taskRelations, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, tools, functionTools, functions, contextConfigs, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, ledgerArtifacts, projects } from './chunk-VSQY72K5.js';
|
|
2
1
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
2
|
+
import { subAgents, subAgentRelations, agents, tasks, taskRelations, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, tools, functionTools, functions, contextConfigs, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, ledgerArtifacts, projects } from './chunk-S75NGJ6E.js';
|
|
3
3
|
import { z } from '@hono/zod-openapi';
|
|
4
4
|
import { createSelectSchema as createSelectSchema$1, createInsertSchema as createInsertSchema$1 } from 'drizzle-zod';
|
|
5
5
|
import Ajv from 'ajv';
|
|
@@ -165,9 +165,13 @@ var subAgents = pgTable(
|
|
|
165
165
|
...agentScoped,
|
|
166
166
|
...uiProperties,
|
|
167
167
|
prompt: text("prompt").notNull(),
|
|
168
|
-
conversationHistoryConfig: jsonb(
|
|
169
|
-
"
|
|
170
|
-
|
|
168
|
+
conversationHistoryConfig: jsonb("conversation_history_config").$type().notNull().default({
|
|
169
|
+
mode: "full",
|
|
170
|
+
limit: 50,
|
|
171
|
+
maxOutputTokens: 4e3,
|
|
172
|
+
includeInternal: false,
|
|
173
|
+
messageTypes: ["chat", "tool-result"]
|
|
174
|
+
}),
|
|
171
175
|
models: jsonb("models").$type(),
|
|
172
176
|
stopWhen: jsonb("stop_when").$type(),
|
|
173
177
|
...timestamps
|
package/dist/client-exports.cjs
CHANGED
|
@@ -171,9 +171,13 @@ var subAgents = pgCore.pgTable(
|
|
|
171
171
|
...agentScoped,
|
|
172
172
|
...uiProperties,
|
|
173
173
|
prompt: pgCore.text("prompt").notNull(),
|
|
174
|
-
conversationHistoryConfig: pgCore.jsonb(
|
|
175
|
-
"
|
|
176
|
-
|
|
174
|
+
conversationHistoryConfig: pgCore.jsonb("conversation_history_config").$type().notNull().default({
|
|
175
|
+
mode: "full",
|
|
176
|
+
limit: 50,
|
|
177
|
+
maxOutputTokens: 4e3,
|
|
178
|
+
includeInternal: false,
|
|
179
|
+
messageTypes: ["chat", "tool-result"]
|
|
180
|
+
}),
|
|
177
181
|
models: pgCore.jsonb("models").$type(),
|
|
178
182
|
stopWhen: pgCore.jsonb("stop_when").$type(),
|
|
179
183
|
...timestamps
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k 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, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e 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, d as detectAuthenticationRequired } from './auth-detection-CGqhPDnj.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-B73oHEd8.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-B73oHEd8.cjs';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
|
@@ -134,8 +134,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
134
134
|
}, z.core.$strip>>>;
|
|
135
135
|
}, z.core.$strip>;
|
|
136
136
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
137
|
-
id: z.ZodString;
|
|
138
137
|
name: z.ZodString;
|
|
138
|
+
id: z.ZodString;
|
|
139
139
|
description: z.ZodString;
|
|
140
140
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
141
141
|
}, {
|
|
@@ -170,8 +170,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
170
170
|
description: z.ZodOptional<z.ZodString>;
|
|
171
171
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
172
172
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
173
|
-
id: z.ZodString;
|
|
174
173
|
name: z.ZodString;
|
|
174
|
+
id: z.ZodString;
|
|
175
175
|
description: z.ZodString;
|
|
176
176
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
177
177
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -198,7 +198,7 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
198
198
|
}, {
|
|
199
199
|
stepCountIs?: number | undefined;
|
|
200
200
|
}>>>>;
|
|
201
|
-
conversationHistoryConfig: z.ZodOptional<z.
|
|
201
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>;
|
|
202
202
|
type: z.ZodLiteral<"internal">;
|
|
203
203
|
canUse: z.ZodArray<z.ZodObject<{
|
|
204
204
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k 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, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e 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, d as detectAuthenticationRequired } from './auth-detection-CGqhPDnj.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-B73oHEd8.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-B73oHEd8.js';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
|
@@ -134,8 +134,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
134
134
|
}, z.core.$strip>>>;
|
|
135
135
|
}, z.core.$strip>;
|
|
136
136
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
137
|
-
id: z.ZodString;
|
|
138
137
|
name: z.ZodString;
|
|
138
|
+
id: z.ZodString;
|
|
139
139
|
description: z.ZodString;
|
|
140
140
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
141
141
|
}, {
|
|
@@ -170,8 +170,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
170
170
|
description: z.ZodOptional<z.ZodString>;
|
|
171
171
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
172
172
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
173
|
-
id: z.ZodString;
|
|
174
173
|
name: z.ZodString;
|
|
174
|
+
id: z.ZodString;
|
|
175
175
|
description: z.ZodString;
|
|
176
176
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
177
177
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -198,7 +198,7 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
198
198
|
}, {
|
|
199
199
|
stepCountIs?: number | undefined;
|
|
200
200
|
}>>>>;
|
|
201
|
-
conversationHistoryConfig: z.ZodOptional<z.
|
|
201
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>;
|
|
202
202
|
type: z.ZodLiteral<"internal">;
|
|
203
203
|
canUse: z.ZodArray<z.ZodObject<{
|
|
204
204
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
package/dist/client-exports.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE, detectAuthenticationRequired } from './chunk-OP3KPT4T.js';
|
|
2
|
-
import { ModelSettingsSchema, schemaValidationDefaults, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-
|
|
3
|
-
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-
|
|
2
|
+
import { ModelSettingsSchema, schemaValidationDefaults, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-6MC5N2NE.js';
|
|
3
|
+
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-6MC5N2NE.js';
|
|
4
4
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
5
5
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
6
6
|
import { z } from 'zod';
|
package/dist/db/schema.cjs
CHANGED
|
@@ -113,9 +113,13 @@ var subAgents = pgCore.pgTable(
|
|
|
113
113
|
...agentScoped,
|
|
114
114
|
...uiProperties,
|
|
115
115
|
prompt: pgCore.text("prompt").notNull(),
|
|
116
|
-
conversationHistoryConfig: pgCore.jsonb(
|
|
117
|
-
"
|
|
118
|
-
|
|
116
|
+
conversationHistoryConfig: pgCore.jsonb("conversation_history_config").$type().notNull().default({
|
|
117
|
+
mode: "full",
|
|
118
|
+
limit: 50,
|
|
119
|
+
maxOutputTokens: 4e3,
|
|
120
|
+
includeInternal: false,
|
|
121
|
+
messageTypes: ["chat", "tool-result"]
|
|
122
|
+
}),
|
|
119
123
|
models: pgCore.jsonb("models").$type(),
|
|
120
124
|
stopWhen: pgCore.jsonb("stop_when").$type(),
|
|
121
125
|
...timestamps
|
package/dist/db/schema.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/pg-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-B73oHEd8.cjs';
|
|
4
|
+
export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-dODUpZEu.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/pg-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-
|
|
3
|
+
import '../utility-B73oHEd8.js';
|
|
4
|
+
export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-DYCQuSqA.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/db/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-
|
|
1
|
+
export { agentRelations, agentToolRelationsRelations, agents, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functionTools, functionToolsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentExternalAgentRelations, subAgentExternalAgentRelationsRelations, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentTeamAgentRelations, subAgentTeamAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-S75NGJ6E.js';
|
package/dist/index.cjs
CHANGED
|
@@ -212976,7 +212976,8 @@ var executionLimitsSharedDefaults = {
|
|
|
212976
212976
|
// CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: Maximum number of tokens from previous conversation messages
|
|
212977
212977
|
// to include in the LLM prompt. Prevents excessive token usage while maintaining relevant conversation context.
|
|
212978
212978
|
// Messages exceeding this limit are truncated from the beginning of the conversation.
|
|
212979
|
-
|
|
212979
|
+
// Increased from 4,000 to 8,000 to accommodate tool results in conversation history.
|
|
212980
|
+
CONVERSATION_HISTORY_MAX_OUTPUT_TOKENS_DEFAULT: 8e3
|
|
212980
212981
|
};
|
|
212981
212982
|
|
|
212982
212983
|
// src/constants/execution-limits-shared/index.ts
|
|
@@ -213769,9 +213770,13 @@ var subAgents = pgCore.pgTable(
|
|
|
213769
213770
|
...agentScoped,
|
|
213770
213771
|
...uiProperties,
|
|
213771
213772
|
prompt: pgCore.text("prompt").notNull(),
|
|
213772
|
-
conversationHistoryConfig: pgCore.jsonb(
|
|
213773
|
-
"
|
|
213774
|
-
|
|
213773
|
+
conversationHistoryConfig: pgCore.jsonb("conversation_history_config").$type().notNull().default({
|
|
213774
|
+
mode: "full",
|
|
213775
|
+
limit: 50,
|
|
213776
|
+
maxOutputTokens: 4e3,
|
|
213777
|
+
includeInternal: false,
|
|
213778
|
+
messageTypes: ["chat", "tool-result"]
|
|
213779
|
+
}),
|
|
213775
213780
|
models: pgCore.jsonb("models").$type(),
|
|
213776
213781
|
stopWhen: pgCore.jsonb("stop_when").$type(),
|
|
213777
213782
|
...timestamps
|
|
@@ -215730,9 +215735,11 @@ var ContextConfigBuilder = class {
|
|
|
215730
215735
|
const credentialReferenceId = credentialReference?.id || rest.credentialReferenceId;
|
|
215731
215736
|
processedContextVariables[key] = {
|
|
215732
215737
|
...rest,
|
|
215733
|
-
responseSchema: convertZodToJsonSchema(definition.responseSchema)
|
|
215734
|
-
credentialReferenceId
|
|
215738
|
+
responseSchema: convertZodToJsonSchema(definition.responseSchema)
|
|
215735
215739
|
};
|
|
215740
|
+
if (credentialReferenceId !== void 0) {
|
|
215741
|
+
processedContextVariables[key].credentialReferenceId = credentialReferenceId;
|
|
215742
|
+
}
|
|
215736
215743
|
logger2.debug(
|
|
215737
215744
|
{
|
|
215738
215745
|
contextVariableKey: key,
|
|
@@ -215958,22 +215965,39 @@ function headers(options) {
|
|
|
215958
215965
|
}
|
|
215959
215966
|
function fetchDefinition(options) {
|
|
215960
215967
|
const fetchConfig = options.fetchConfig;
|
|
215961
|
-
|
|
215968
|
+
const result = {
|
|
215962
215969
|
id: options.id,
|
|
215963
|
-
name: options.name,
|
|
215964
215970
|
trigger: options.trigger,
|
|
215965
215971
|
fetchConfig: {
|
|
215966
|
-
url: fetchConfig.url
|
|
215967
|
-
method: fetchConfig.method,
|
|
215968
|
-
headers: fetchConfig.headers,
|
|
215969
|
-
body: fetchConfig.body,
|
|
215970
|
-
transform: fetchConfig.transform,
|
|
215971
|
-
timeout: fetchConfig.timeout
|
|
215972
|
+
url: fetchConfig.url
|
|
215972
215973
|
},
|
|
215973
|
-
responseSchema: options.responseSchema
|
|
215974
|
-
defaultValue: options.defaultValue,
|
|
215975
|
-
credentialReferenceId: options.credentialReference?.id
|
|
215974
|
+
responseSchema: options.responseSchema
|
|
215976
215975
|
};
|
|
215976
|
+
if (options.name !== void 0) {
|
|
215977
|
+
result.name = options.name;
|
|
215978
|
+
}
|
|
215979
|
+
if (options.defaultValue !== void 0) {
|
|
215980
|
+
result.defaultValue = options.defaultValue;
|
|
215981
|
+
}
|
|
215982
|
+
if (fetchConfig.method !== void 0) {
|
|
215983
|
+
result.fetchConfig.method = fetchConfig.method;
|
|
215984
|
+
}
|
|
215985
|
+
if (fetchConfig.headers !== void 0) {
|
|
215986
|
+
result.fetchConfig.headers = fetchConfig.headers;
|
|
215987
|
+
}
|
|
215988
|
+
if (fetchConfig.transform !== void 0) {
|
|
215989
|
+
result.fetchConfig.transform = fetchConfig.transform;
|
|
215990
|
+
}
|
|
215991
|
+
if (fetchConfig.body !== void 0) {
|
|
215992
|
+
result.fetchConfig.body = fetchConfig.body;
|
|
215993
|
+
}
|
|
215994
|
+
if (fetchConfig.timeout !== void 0) {
|
|
215995
|
+
result.fetchConfig.timeout = fetchConfig.timeout;
|
|
215996
|
+
}
|
|
215997
|
+
if (options.credentialReference?.id !== void 0) {
|
|
215998
|
+
result.credentialReferenceId = options.credentialReference.id;
|
|
215999
|
+
}
|
|
216000
|
+
return result;
|
|
215977
216001
|
}
|
|
215978
216002
|
var logger3 = getLogger("template-engine");
|
|
215979
216003
|
var _TemplateEngine = class _TemplateEngine {
|
|
@@ -218823,7 +218847,7 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
218823
218847
|
// description: "A URI reference that identifies the problem type.",
|
|
218824
218848
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
218825
218849
|
// }),
|
|
218826
|
-
status: zodOpenapi.z.
|
|
218850
|
+
status: zodOpenapi.z.number().int().openapi({
|
|
218827
218851
|
description: "The HTTP status code.",
|
|
218828
218852
|
example: errorCodeToHttpStatus[code]
|
|
218829
218853
|
}),
|
|
@@ -220853,17 +220877,23 @@ var updateDataComponent = (db) => async (params) => {
|
|
|
220853
220877
|
const propsValidation = validatePropsAsJsonSchema(params.data.props);
|
|
220854
220878
|
if (!propsValidation.isValid) {
|
|
220855
220879
|
const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
220856
|
-
throw
|
|
220880
|
+
throw createApiError({
|
|
220881
|
+
code: "bad_request",
|
|
220882
|
+
message: `Invalid props schema: ${errorMessages}`
|
|
220883
|
+
});
|
|
220857
220884
|
}
|
|
220858
220885
|
}
|
|
220859
|
-
if (params.data.render
|
|
220860
|
-
if (typeof params.data.render === "object" &&
|
|
220886
|
+
if (params.data.render) {
|
|
220887
|
+
if (typeof params.data.render === "object" && "component" in params.data.render && "mockData" in params.data.render) {
|
|
220861
220888
|
const renderValidation = validateRender(
|
|
220862
220889
|
params.data.render
|
|
220863
220890
|
);
|
|
220864
220891
|
if (!renderValidation.isValid) {
|
|
220865
220892
|
const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
220866
|
-
throw
|
|
220893
|
+
throw createApiError({
|
|
220894
|
+
code: "bad_request",
|
|
220895
|
+
message: `Invalid render: ${errorMessages}`
|
|
220896
|
+
});
|
|
220867
220897
|
}
|
|
220868
220898
|
}
|
|
220869
220899
|
}
|
|
@@ -222867,7 +222897,8 @@ var getConversationHistory = (db) => async (params) => {
|
|
|
222867
222897
|
const {
|
|
222868
222898
|
limit = options.limit ?? 50,
|
|
222869
222899
|
includeInternal = options.includeInternal ?? false,
|
|
222870
|
-
maxOutputTokens
|
|
222900
|
+
maxOutputTokens,
|
|
222901
|
+
messageTypes
|
|
222871
222902
|
} = options;
|
|
222872
222903
|
const whereConditions = [
|
|
222873
222904
|
drizzleOrm.eq(messages.tenantId, tenantId),
|
|
@@ -222877,6 +222908,9 @@ var getConversationHistory = (db) => async (params) => {
|
|
|
222877
222908
|
if (!includeInternal) {
|
|
222878
222909
|
whereConditions.push(drizzleOrm.eq(messages.visibility, "user-facing"));
|
|
222879
222910
|
}
|
|
222911
|
+
if (messageTypes && messageTypes.length > 0) {
|
|
222912
|
+
whereConditions.push(drizzleOrm.inArray(messages.messageType, messageTypes));
|
|
222913
|
+
}
|
|
222880
222914
|
const messageHistory = await db.select().from(messages).where(drizzleOrm.and(...whereConditions)).orderBy(drizzleOrm.desc(messages.createdAt)).limit(limit);
|
|
222881
222915
|
const chronologicalHistory = messageHistory.reverse();
|
|
222882
222916
|
if (maxOutputTokens) {
|
|
@@ -225244,7 +225278,6 @@ function validationHelper(jsonSchema) {
|
|
|
225244
225278
|
return getCachedValidator(jsonSchema);
|
|
225245
225279
|
}
|
|
225246
225280
|
function validateAgainstJsonSchema(jsonSchema, context) {
|
|
225247
|
-
logger11.debug({ jsonSchema, context }, "Validating context against JSON Schema");
|
|
225248
225281
|
const validate = validationHelper(jsonSchema);
|
|
225249
225282
|
return validate(context);
|
|
225250
225283
|
}
|
|
@@ -225609,7 +225642,6 @@ var ContextFetcher = class {
|
|
|
225609
225642
|
definition.credentialReferenceId
|
|
225610
225643
|
);
|
|
225611
225644
|
const response = await this.performRequest(resolvedConfig);
|
|
225612
|
-
logger12.info({ response }, "ContextFetcher Response");
|
|
225613
225645
|
let transformedData = response.data;
|
|
225614
225646
|
if (definition.fetchConfig.transform) {
|
|
225615
225647
|
transformedData = this.transformResponse(response.data, definition.fetchConfig.transform);
|
|
@@ -225841,14 +225873,6 @@ var ContextFetcher = class {
|
|
|
225841
225873
|
if (!isValid) {
|
|
225842
225874
|
throw new Error("Data does not match JSON Schema");
|
|
225843
225875
|
}
|
|
225844
|
-
logger12.debug(
|
|
225845
|
-
{
|
|
225846
|
-
definitionId,
|
|
225847
|
-
dataType: typeof data,
|
|
225848
|
-
validationResult: "success"
|
|
225849
|
-
},
|
|
225850
|
-
"JSON Schema response validation passed"
|
|
225851
|
-
);
|
|
225852
225876
|
} catch (error) {
|
|
225853
225877
|
const errorMessage = error instanceof Error ? error.message : "Unknown validation error";
|
|
225854
225878
|
logger12.error(
|