@inkeep/agents-core 0.33.1 → 0.34.0
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-4VUM4EJL.js} +1 -1
- package/dist/{chunk-MQTANAMG.js → chunk-7CLFCY6J.js} +2 -0
- package/dist/{chunk-VSQY72K5.js → chunk-EKV6C5GS.js} +7 -3
- package/dist/{chunk-JFSIBQHO.js → chunk-UMFCT6A6.js} +3 -2
- package/dist/client-exports.cjs +9 -4
- package/dist/client-exports.d.cts +2 -2
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/constants/models.cjs +2 -0
- package/dist/constants/models.d.cts +2 -0
- package/dist/constants/models.d.ts +2 -0
- package/dist/constants/models.js +1 -1
- 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 +66 -26
- package/dist/index.d.cts +37 -31
- package/dist/index.d.ts +37 -31
- package/dist/index.js +63 -30
- package/dist/{schema-BceDktlR.d.ts → schema-CaEvIRdT.d.cts} +2 -2
- package/dist/{schema-aKVr9nIb.d.cts → schema-DvYv9PQ1.d.ts} +2 -2
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-aMKDDNv4.d.cts → utility-htaewQEL.d.cts} +9 -3
- package/dist/{utility-aMKDDNv4.d.ts → utility-htaewQEL.d.ts} +9 -3
- package/dist/validation/index.cjs +9 -4
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/meta/0000_snapshot.json +93 -459
- package/drizzle/meta/_journal.json +1 -1
- 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-UMFCT6A6.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/validation/cycleDetection.ts
|
|
@@ -12,6 +12,7 @@ var ANTHROPIC_MODELS = {
|
|
|
12
12
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
13
13
|
};
|
|
14
14
|
var OPENAI_MODELS = {
|
|
15
|
+
GPT_5_1: "openai/gpt-5.1",
|
|
15
16
|
GPT_5: "openai/gpt-5",
|
|
16
17
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
17
18
|
GPT_5_MINI: "openai/gpt-5-mini",
|
|
@@ -26,6 +27,7 @@ var OPENAI_MODELS = {
|
|
|
26
27
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
27
28
|
};
|
|
28
29
|
var GOOGLE_MODELS = {
|
|
30
|
+
GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
|
|
29
31
|
GEMINI_2_5_PRO: "google/gemini-2.5-pro",
|
|
30
32
|
GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
|
|
31
33
|
GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
|
|
@@ -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().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
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-EKV6C5GS.js';
|
|
2
2
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
3
3
|
import { z } from '@hono/zod-openapi';
|
|
4
4
|
import { createSelectSchema as createSelectSchema$1, createInsertSchema as createInsertSchema$1 } from 'drizzle-zod';
|
|
@@ -621,7 +621,8 @@ var McpToolSchema = ToolInsertSchema.extend({
|
|
|
621
621
|
version: z.string().optional(),
|
|
622
622
|
createdAt: z.date(),
|
|
623
623
|
updatedAt: z.date(),
|
|
624
|
-
expiresAt: z.date().optional()
|
|
624
|
+
expiresAt: z.date().optional(),
|
|
625
|
+
relationshipId: z.string().optional()
|
|
625
626
|
}).openapi("McpTool");
|
|
626
627
|
var MCPToolConfigSchema = McpToolSchema.omit({
|
|
627
628
|
config: true,
|
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().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
|
|
@@ -1578,7 +1582,8 @@ var McpToolSchema = ToolInsertSchema.extend({
|
|
|
1578
1582
|
version: zodOpenapi.z.string().optional(),
|
|
1579
1583
|
createdAt: zodOpenapi.z.date(),
|
|
1580
1584
|
updatedAt: zodOpenapi.z.date(),
|
|
1581
|
-
expiresAt: zodOpenapi.z.date().optional()
|
|
1585
|
+
expiresAt: zodOpenapi.z.date().optional(),
|
|
1586
|
+
relationshipId: zodOpenapi.z.string().optional()
|
|
1582
1587
|
}).openapi("McpTool");
|
|
1583
1588
|
McpToolSchema.omit({
|
|
1584
1589
|
config: true,
|
|
@@ -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-htaewQEL.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-htaewQEL.cjs';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
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-htaewQEL.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-htaewQEL.js';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
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-UMFCT6A6.js';
|
|
3
|
+
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-UMFCT6A6.js';
|
|
4
4
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
5
5
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -14,6 +14,7 @@ var ANTHROPIC_MODELS = {
|
|
|
14
14
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
15
15
|
};
|
|
16
16
|
var OPENAI_MODELS = {
|
|
17
|
+
GPT_5_1: "openai/gpt-5.1",
|
|
17
18
|
GPT_5: "openai/gpt-5",
|
|
18
19
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
19
20
|
GPT_5_MINI: "openai/gpt-5-mini",
|
|
@@ -28,6 +29,7 @@ var OPENAI_MODELS = {
|
|
|
28
29
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
29
30
|
};
|
|
30
31
|
var GOOGLE_MODELS = {
|
|
32
|
+
GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
|
|
31
33
|
GEMINI_2_5_PRO: "google/gemini-2.5-pro",
|
|
32
34
|
GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
|
|
33
35
|
GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
|
|
@@ -14,6 +14,7 @@ declare const ANTHROPIC_MODELS: {
|
|
|
14
14
|
readonly CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022";
|
|
15
15
|
};
|
|
16
16
|
declare const OPENAI_MODELS: {
|
|
17
|
+
readonly GPT_5_1: "openai/gpt-5.1";
|
|
17
18
|
readonly GPT_5: "openai/gpt-5";
|
|
18
19
|
readonly GPT_5_20250807: "openai/gpt-5-2025-08-07";
|
|
19
20
|
readonly GPT_5_MINI: "openai/gpt-5-mini";
|
|
@@ -28,6 +29,7 @@ declare const OPENAI_MODELS: {
|
|
|
28
29
|
readonly GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14";
|
|
29
30
|
};
|
|
30
31
|
declare const GOOGLE_MODELS: {
|
|
32
|
+
readonly GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview";
|
|
31
33
|
readonly GEMINI_2_5_PRO: "google/gemini-2.5-pro";
|
|
32
34
|
readonly GEMINI_2_5_FLASH: "google/gemini-2.5-flash";
|
|
33
35
|
readonly GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite";
|
|
@@ -14,6 +14,7 @@ declare const ANTHROPIC_MODELS: {
|
|
|
14
14
|
readonly CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022";
|
|
15
15
|
};
|
|
16
16
|
declare const OPENAI_MODELS: {
|
|
17
|
+
readonly GPT_5_1: "openai/gpt-5.1";
|
|
17
18
|
readonly GPT_5: "openai/gpt-5";
|
|
18
19
|
readonly GPT_5_20250807: "openai/gpt-5-2025-08-07";
|
|
19
20
|
readonly GPT_5_MINI: "openai/gpt-5-mini";
|
|
@@ -28,6 +29,7 @@ declare const OPENAI_MODELS: {
|
|
|
28
29
|
readonly GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14";
|
|
29
30
|
};
|
|
30
31
|
declare const GOOGLE_MODELS: {
|
|
32
|
+
readonly GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview";
|
|
31
33
|
readonly GEMINI_2_5_PRO: "google/gemini-2.5-pro";
|
|
32
34
|
readonly GEMINI_2_5_FLASH: "google/gemini-2.5-flash";
|
|
33
35
|
readonly GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite";
|
package/dist/constants/models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from '../chunk-
|
|
1
|
+
export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from '../chunk-7CLFCY6J.js';
|
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().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-htaewQEL.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-CaEvIRdT.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-htaewQEL.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-DvYv9PQ1.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-EKV6C5GS.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
|
|
@@ -213023,6 +213024,7 @@ var ANTHROPIC_MODELS = {
|
|
|
213023
213024
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
213024
213025
|
};
|
|
213025
213026
|
var OPENAI_MODELS = {
|
|
213027
|
+
GPT_5_1: "openai/gpt-5.1",
|
|
213026
213028
|
GPT_5: "openai/gpt-5",
|
|
213027
213029
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
213028
213030
|
GPT_5_MINI: "openai/gpt-5-mini",
|
|
@@ -213037,6 +213039,7 @@ var OPENAI_MODELS = {
|
|
|
213037
213039
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
213038
213040
|
};
|
|
213039
213041
|
var GOOGLE_MODELS = {
|
|
213042
|
+
GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
|
|
213040
213043
|
GEMINI_2_5_PRO: "google/gemini-2.5-pro",
|
|
213041
213044
|
GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
|
|
213042
213045
|
GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
|
|
@@ -213769,9 +213772,13 @@ var subAgents = pgCore.pgTable(
|
|
|
213769
213772
|
...agentScoped,
|
|
213770
213773
|
...uiProperties,
|
|
213771
213774
|
prompt: pgCore.text("prompt").notNull(),
|
|
213772
|
-
conversationHistoryConfig: pgCore.jsonb(
|
|
213773
|
-
"
|
|
213774
|
-
|
|
213775
|
+
conversationHistoryConfig: pgCore.jsonb("conversation_history_config").$type().default({
|
|
213776
|
+
mode: "full",
|
|
213777
|
+
limit: 50,
|
|
213778
|
+
maxOutputTokens: 4e3,
|
|
213779
|
+
includeInternal: false,
|
|
213780
|
+
messageTypes: ["chat", "tool-result"]
|
|
213781
|
+
}),
|
|
213775
213782
|
models: pgCore.jsonb("models").$type(),
|
|
213776
213783
|
stopWhen: pgCore.jsonb("stop_when").$type(),
|
|
213777
213784
|
...timestamps
|
|
@@ -215193,7 +215200,8 @@ var McpToolSchema = ToolInsertSchema.extend({
|
|
|
215193
215200
|
version: zodOpenapi.z.string().optional(),
|
|
215194
215201
|
createdAt: zodOpenapi.z.date(),
|
|
215195
215202
|
updatedAt: zodOpenapi.z.date(),
|
|
215196
|
-
expiresAt: zodOpenapi.z.date().optional()
|
|
215203
|
+
expiresAt: zodOpenapi.z.date().optional(),
|
|
215204
|
+
relationshipId: zodOpenapi.z.string().optional()
|
|
215197
215205
|
}).openapi("McpTool");
|
|
215198
215206
|
var MCPToolConfigSchema = McpToolSchema.omit({
|
|
215199
215207
|
config: true,
|
|
@@ -216020,6 +216028,29 @@ var _TemplateEngine = class _TemplateEngine {
|
|
|
216020
216028
|
throw error;
|
|
216021
216029
|
}
|
|
216022
216030
|
}
|
|
216031
|
+
/**
|
|
216032
|
+
* Normalize JMES path by wrapping property names with dashes in quotes
|
|
216033
|
+
* Example: headers.x-tenant-id -> headers."x-tenant-id"
|
|
216034
|
+
* Example: api-responses[0].response-code -> "api-responses"[0]."response-code"
|
|
216035
|
+
*/
|
|
216036
|
+
static normalizeJMESPath(path2) {
|
|
216037
|
+
const segments = path2.split(".");
|
|
216038
|
+
return segments.map((segment) => {
|
|
216039
|
+
if (!segment.includes("-")) {
|
|
216040
|
+
return segment;
|
|
216041
|
+
}
|
|
216042
|
+
if (segment.startsWith('"') && segment.includes('"')) {
|
|
216043
|
+
return segment;
|
|
216044
|
+
}
|
|
216045
|
+
const bracketIndex = segment.indexOf("[");
|
|
216046
|
+
if (bracketIndex !== -1) {
|
|
216047
|
+
const propertyName = segment.substring(0, bracketIndex);
|
|
216048
|
+
const arrayAccess = segment.substring(bracketIndex);
|
|
216049
|
+
return `"${propertyName}"${arrayAccess}`;
|
|
216050
|
+
}
|
|
216051
|
+
return `"${segment}"`;
|
|
216052
|
+
}).join(".");
|
|
216053
|
+
}
|
|
216023
216054
|
/**
|
|
216024
216055
|
* Process variable substitutions {{variable.path}} using JMESPath
|
|
216025
216056
|
*/
|
|
@@ -216030,7 +216061,8 @@ var _TemplateEngine = class _TemplateEngine {
|
|
|
216030
216061
|
if (trimmedPath.startsWith("$")) {
|
|
216031
216062
|
return _TemplateEngine.processBuiltinVariable(trimmedPath);
|
|
216032
216063
|
}
|
|
216033
|
-
const
|
|
216064
|
+
const normalizedPath = _TemplateEngine.normalizeJMESPath(trimmedPath);
|
|
216065
|
+
const result = jmespath__default.default.search(context, normalizedPath);
|
|
216034
216066
|
if (result === void 0 || result === null) {
|
|
216035
216067
|
if (options.strict) {
|
|
216036
216068
|
throw new Error(`Template variable '${trimmedPath}' not found in context`);
|
|
@@ -216042,6 +216074,7 @@ var _TemplateEngine = class _TemplateEngine {
|
|
|
216042
216074
|
logger3.warn(
|
|
216043
216075
|
{
|
|
216044
216076
|
variable: trimmedPath,
|
|
216077
|
+
normalizedPath,
|
|
216045
216078
|
availableKeys: Object.keys(context),
|
|
216046
216079
|
contextStructure: JSON.stringify(context, null, 2),
|
|
216047
216080
|
headersContent: context.headers ? JSON.stringify(context.headers, null, 2) : "undefined"
|
|
@@ -216052,6 +216085,7 @@ var _TemplateEngine = class _TemplateEngine {
|
|
|
216052
216085
|
logger3.warn(
|
|
216053
216086
|
{
|
|
216054
216087
|
variable: trimmedPath,
|
|
216088
|
+
normalizedPath,
|
|
216055
216089
|
availableKeys: Object.keys(context)
|
|
216056
216090
|
},
|
|
216057
216091
|
"Template variable not found in context"
|
|
@@ -216065,12 +216099,16 @@ var _TemplateEngine = class _TemplateEngine {
|
|
|
216065
216099
|
return String(result);
|
|
216066
216100
|
} catch (error) {
|
|
216067
216101
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
216102
|
+
const normalizedPath = _TemplateEngine.normalizeJMESPath(trimmedPath);
|
|
216068
216103
|
if (options.strict) {
|
|
216069
|
-
throw new Error(
|
|
216104
|
+
throw new Error(
|
|
216105
|
+
`Failed to resolve template variable '${trimmedPath}' (normalized: '${normalizedPath}'): ${errorMessage}`
|
|
216106
|
+
);
|
|
216070
216107
|
}
|
|
216071
216108
|
logger3.error(
|
|
216072
216109
|
{
|
|
216073
216110
|
variable: trimmedPath,
|
|
216111
|
+
normalizedPath,
|
|
216074
216112
|
error: errorMessage
|
|
216075
216113
|
},
|
|
216076
216114
|
"Failed to resolve template variable"
|
|
@@ -218842,7 +218880,7 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
218842
218880
|
// description: "A URI reference that identifies the problem type.",
|
|
218843
218881
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
218844
218882
|
// }),
|
|
218845
|
-
status: zodOpenapi.z.
|
|
218883
|
+
status: zodOpenapi.z.number().int().openapi({
|
|
218846
218884
|
description: "The HTTP status code.",
|
|
218847
218885
|
example: errorCodeToHttpStatus[code]
|
|
218848
218886
|
}),
|
|
@@ -219544,7 +219582,7 @@ var discoverToolsFromServer = async (tool2, dbClient, credentialStoreRegistry) =
|
|
|
219544
219582
|
throw error;
|
|
219545
219583
|
}
|
|
219546
219584
|
};
|
|
219547
|
-
var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry) => {
|
|
219585
|
+
var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, relationshipId) => {
|
|
219548
219586
|
const { headers: headers2, capabilities, credentialReferenceId, imageUrl, createdAt, ...rest } = dbResult;
|
|
219549
219587
|
if (dbResult.config.type !== "mcp") {
|
|
219550
219588
|
return {
|
|
@@ -219557,7 +219595,8 @@ var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry) => {
|
|
|
219557
219595
|
updatedAt: new Date(normalizeDateString(dbResult.updatedAt)),
|
|
219558
219596
|
lastError: null,
|
|
219559
219597
|
headers: headers2 || void 0,
|
|
219560
|
-
imageUrl: imageUrl || void 0
|
|
219598
|
+
imageUrl: imageUrl || void 0,
|
|
219599
|
+
relationshipId
|
|
219561
219600
|
};
|
|
219562
219601
|
}
|
|
219563
219602
|
let availableTools = [];
|
|
@@ -219629,7 +219668,8 @@ var dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry) => {
|
|
|
219629
219668
|
expiresAt,
|
|
219630
219669
|
lastError: lastErrorComputed,
|
|
219631
219670
|
headers: headers2 || void 0,
|
|
219632
|
-
imageUrl: imageUrl || void 0
|
|
219671
|
+
imageUrl: imageUrl || void 0,
|
|
219672
|
+
relationshipId
|
|
219633
219673
|
};
|
|
219634
219674
|
};
|
|
219635
219675
|
var getToolById = (db) => async (params) => {
|
|
@@ -220872,17 +220912,23 @@ var updateDataComponent = (db) => async (params) => {
|
|
|
220872
220912
|
const propsValidation = validatePropsAsJsonSchema(params.data.props);
|
|
220873
220913
|
if (!propsValidation.isValid) {
|
|
220874
220914
|
const errorMessages = propsValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
220875
|
-
throw
|
|
220915
|
+
throw createApiError({
|
|
220916
|
+
code: "bad_request",
|
|
220917
|
+
message: `Invalid props schema: ${errorMessages}`
|
|
220918
|
+
});
|
|
220876
220919
|
}
|
|
220877
220920
|
}
|
|
220878
|
-
if (params.data.render
|
|
220879
|
-
if (typeof params.data.render === "object" &&
|
|
220921
|
+
if (params.data.render) {
|
|
220922
|
+
if (typeof params.data.render === "object" && "component" in params.data.render && "mockData" in params.data.render) {
|
|
220880
220923
|
const renderValidation = validateRender(
|
|
220881
220924
|
params.data.render
|
|
220882
220925
|
);
|
|
220883
220926
|
if (!renderValidation.isValid) {
|
|
220884
220927
|
const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
220885
|
-
throw
|
|
220928
|
+
throw createApiError({
|
|
220929
|
+
code: "bad_request",
|
|
220930
|
+
message: `Invalid render: ${errorMessages}`
|
|
220931
|
+
});
|
|
220886
220932
|
}
|
|
220887
220933
|
}
|
|
220888
220934
|
}
|
|
@@ -222886,7 +222932,8 @@ var getConversationHistory = (db) => async (params) => {
|
|
|
222886
222932
|
const {
|
|
222887
222933
|
limit = options.limit ?? 50,
|
|
222888
222934
|
includeInternal = options.includeInternal ?? false,
|
|
222889
|
-
maxOutputTokens
|
|
222935
|
+
maxOutputTokens,
|
|
222936
|
+
messageTypes
|
|
222890
222937
|
} = options;
|
|
222891
222938
|
const whereConditions = [
|
|
222892
222939
|
drizzleOrm.eq(messages.tenantId, tenantId),
|
|
@@ -222896,6 +222943,9 @@ var getConversationHistory = (db) => async (params) => {
|
|
|
222896
222943
|
if (!includeInternal) {
|
|
222897
222944
|
whereConditions.push(drizzleOrm.eq(messages.visibility, "user-facing"));
|
|
222898
222945
|
}
|
|
222946
|
+
if (messageTypes && messageTypes.length > 0) {
|
|
222947
|
+
whereConditions.push(drizzleOrm.inArray(messages.messageType, messageTypes));
|
|
222948
|
+
}
|
|
222899
222949
|
const messageHistory = await db.select().from(messages).where(drizzleOrm.and(...whereConditions)).orderBy(drizzleOrm.desc(messages.createdAt)).limit(limit);
|
|
222900
222950
|
const chronologicalHistory = messageHistory.reverse();
|
|
222901
222951
|
if (maxOutputTokens) {
|
|
@@ -225263,7 +225313,6 @@ function validationHelper(jsonSchema) {
|
|
|
225263
225313
|
return getCachedValidator(jsonSchema);
|
|
225264
225314
|
}
|
|
225265
225315
|
function validateAgainstJsonSchema(jsonSchema, context) {
|
|
225266
|
-
logger11.debug({ jsonSchema, context }, "Validating context against JSON Schema");
|
|
225267
225316
|
const validate = validationHelper(jsonSchema);
|
|
225268
225317
|
return validate(context);
|
|
225269
225318
|
}
|
|
@@ -225628,7 +225677,6 @@ var ContextFetcher = class {
|
|
|
225628
225677
|
definition.credentialReferenceId
|
|
225629
225678
|
);
|
|
225630
225679
|
const response = await this.performRequest(resolvedConfig);
|
|
225631
|
-
logger12.info({ response }, "ContextFetcher Response");
|
|
225632
225680
|
let transformedData = response.data;
|
|
225633
225681
|
if (definition.fetchConfig.transform) {
|
|
225634
225682
|
transformedData = this.transformResponse(response.data, definition.fetchConfig.transform);
|
|
@@ -225860,14 +225908,6 @@ var ContextFetcher = class {
|
|
|
225860
225908
|
if (!isValid) {
|
|
225861
225909
|
throw new Error("Data does not match JSON Schema");
|
|
225862
225910
|
}
|
|
225863
|
-
logger12.debug(
|
|
225864
|
-
{
|
|
225865
|
-
definitionId,
|
|
225866
|
-
dataType: typeof data,
|
|
225867
|
-
validationResult: "success"
|
|
225868
|
-
},
|
|
225869
|
-
"JSON Schema response validation passed"
|
|
225870
|
-
);
|
|
225871
225911
|
} catch (error) {
|
|
225872
225912
|
const errorMessage = error instanceof Error ? error.message : "Unknown validation error";
|
|
225873
225913
|
logger12.error(
|