@inkeep/agents-core 0.23.5 → 0.24.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/{chunk-AN3YZP42.js → chunk-ZGJI6UNK.js} +34 -11
- 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 +34 -11
- package/dist/index.d.cts +264 -264
- package/dist/index.d.ts +264 -264
- package/dist/index.js +2 -2
- package/dist/{schema-DygzZEj3.d.cts → schema-B8NMPwEM.d.cts} +1 -1
- package/dist/{schema-CxJkXzMM.d.ts → schema-PgBNwsV-.d.ts} +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.cjs +34 -11
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +1 -1
- package/package.json +1 -1
- package/dist/{utility-DVhMoRLZ.d.ts → utility-mGrlR4Ta.d.cts} +253 -253
- package/dist/{utility-DVhMoRLZ.d.cts → utility-mGrlR4Ta.d.ts} +253 -253
|
@@ -173,15 +173,38 @@ function generateIdFromName(name) {
|
|
|
173
173
|
var MAX_CODE_SIZE = 5e4;
|
|
174
174
|
var MAX_DATA_SIZE = 1e4;
|
|
175
175
|
var DANGEROUS_PATTERNS = [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
{
|
|
177
|
+
pattern: /\beval\s*\(/i,
|
|
178
|
+
message: "eval() is not allowed"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
pattern: /\bFunction\s*\(/i,
|
|
182
|
+
message: "Function constructor is not allowed"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
pattern: /dangerouslySetInnerHTML/i,
|
|
186
|
+
message: "dangerouslySetInnerHTML is not allowed"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
pattern: /<script\b/i,
|
|
190
|
+
message: "Script tags are not allowed"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
pattern: /\bon\w+\s*=/i,
|
|
194
|
+
message: "Inline event handlers (onClick=, onLoad=, etc.) are not allowed"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
pattern: /document\.write/i,
|
|
198
|
+
message: "document.write is not allowed"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
pattern: /window\.location/i,
|
|
202
|
+
message: "window.location is not allowed"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
pattern: /\.innerHTML\s*=/i,
|
|
206
|
+
message: "innerHTML manipulation is not allowed"
|
|
207
|
+
}
|
|
185
208
|
];
|
|
186
209
|
var ALLOWED_IMPORTS = ["lucide-react"];
|
|
187
210
|
function validatePreview(preview) {
|
|
@@ -211,11 +234,11 @@ function validatePreview(preview) {
|
|
|
211
234
|
message: `Data size exceeds maximum allowed (${MAX_DATA_SIZE} characters)`
|
|
212
235
|
});
|
|
213
236
|
}
|
|
214
|
-
for (const pattern of DANGEROUS_PATTERNS) {
|
|
237
|
+
for (const { pattern, message } of DANGEROUS_PATTERNS) {
|
|
215
238
|
if (pattern.test(preview.code)) {
|
|
216
239
|
errors.push({
|
|
217
240
|
field: "preview.code",
|
|
218
|
-
message: `Code contains potentially dangerous pattern: ${
|
|
241
|
+
message: `Code contains potentially dangerous pattern: ${message}`
|
|
219
242
|
});
|
|
220
243
|
}
|
|
221
244
|
}
|
|
@@ -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-BO8bSpe4.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-mGrlR4Ta.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-mGrlR4Ta.cjs';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
|
@@ -129,8 +129,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
129
129
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
130
|
}, z.core.$strip>;
|
|
131
131
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
132
|
-
name: z.ZodString;
|
|
133
132
|
id: z.ZodString;
|
|
133
|
+
name: z.ZodString;
|
|
134
134
|
description: z.ZodString;
|
|
135
135
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
136
136
|
}, {
|
|
@@ -165,11 +165,12 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
165
165
|
description: z.ZodOptional<z.ZodString>;
|
|
166
166
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
167
167
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
168
|
-
name: z.ZodString;
|
|
169
168
|
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
description: z.ZodString;
|
|
171
|
+
prompt: z.ZodString;
|
|
170
172
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
171
173
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
172
|
-
description: z.ZodString;
|
|
173
174
|
models: z.ZodOptional<z.ZodObject<{
|
|
174
175
|
base: z.ZodOptional<z.ZodObject<{
|
|
175
176
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -193,7 +194,6 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
193
194
|
}, {
|
|
194
195
|
stepCountIs?: number | undefined;
|
|
195
196
|
}>>>>;
|
|
196
|
-
prompt: z.ZodString;
|
|
197
197
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
198
198
|
type: z.ZodLiteral<"internal">;
|
|
199
199
|
canUse: z.ZodArray<z.ZodObject<{
|
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-BO8bSpe4.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-mGrlR4Ta.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-mGrlR4Ta.js';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
|
@@ -129,8 +129,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
129
129
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
130
|
}, z.core.$strip>;
|
|
131
131
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
132
|
-
name: z.ZodString;
|
|
133
132
|
id: z.ZodString;
|
|
133
|
+
name: z.ZodString;
|
|
134
134
|
description: z.ZodString;
|
|
135
135
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
136
136
|
}, {
|
|
@@ -165,11 +165,12 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
165
165
|
description: z.ZodOptional<z.ZodString>;
|
|
166
166
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
167
167
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
168
|
-
name: z.ZodString;
|
|
169
168
|
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
description: z.ZodString;
|
|
171
|
+
prompt: z.ZodString;
|
|
170
172
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
171
173
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
172
|
-
description: z.ZodString;
|
|
173
174
|
models: z.ZodOptional<z.ZodObject<{
|
|
174
175
|
base: z.ZodOptional<z.ZodObject<{
|
|
175
176
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -193,7 +194,6 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
193
194
|
}, {
|
|
194
195
|
stepCountIs?: number | undefined;
|
|
195
196
|
}>>>>;
|
|
196
|
-
prompt: z.ZodString;
|
|
197
197
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
198
198
|
type: z.ZodLiteral<"internal">;
|
|
199
199
|
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-mGrlR4Ta.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-B8NMPwEM.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-mGrlR4Ta.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-PgBNwsV-.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/index.cjs
CHANGED
|
@@ -219729,15 +219729,38 @@ var setActiveAgentForThread = (db) => async ({
|
|
|
219729
219729
|
var MAX_CODE_SIZE = 5e4;
|
|
219730
219730
|
var MAX_DATA_SIZE = 1e4;
|
|
219731
219731
|
var DANGEROUS_PATTERNS = [
|
|
219732
|
-
|
|
219733
|
-
|
|
219734
|
-
|
|
219735
|
-
|
|
219736
|
-
|
|
219737
|
-
|
|
219738
|
-
|
|
219739
|
-
|
|
219740
|
-
|
|
219732
|
+
{
|
|
219733
|
+
pattern: /\beval\s*\(/i,
|
|
219734
|
+
message: "eval() is not allowed"
|
|
219735
|
+
},
|
|
219736
|
+
{
|
|
219737
|
+
pattern: /\bFunction\s*\(/i,
|
|
219738
|
+
message: "Function constructor is not allowed"
|
|
219739
|
+
},
|
|
219740
|
+
{
|
|
219741
|
+
pattern: /dangerouslySetInnerHTML/i,
|
|
219742
|
+
message: "dangerouslySetInnerHTML is not allowed"
|
|
219743
|
+
},
|
|
219744
|
+
{
|
|
219745
|
+
pattern: /<script\b/i,
|
|
219746
|
+
message: "Script tags are not allowed"
|
|
219747
|
+
},
|
|
219748
|
+
{
|
|
219749
|
+
pattern: /\bon\w+\s*=/i,
|
|
219750
|
+
message: "Inline event handlers (onClick=, onLoad=, etc.) are not allowed"
|
|
219751
|
+
},
|
|
219752
|
+
{
|
|
219753
|
+
pattern: /document\.write/i,
|
|
219754
|
+
message: "document.write is not allowed"
|
|
219755
|
+
},
|
|
219756
|
+
{
|
|
219757
|
+
pattern: /window\.location/i,
|
|
219758
|
+
message: "window.location is not allowed"
|
|
219759
|
+
},
|
|
219760
|
+
{
|
|
219761
|
+
pattern: /\.innerHTML\s*=/i,
|
|
219762
|
+
message: "innerHTML manipulation is not allowed"
|
|
219763
|
+
}
|
|
219741
219764
|
];
|
|
219742
219765
|
var ALLOWED_IMPORTS = ["lucide-react"];
|
|
219743
219766
|
function validatePreview(preview2) {
|
|
@@ -219767,11 +219790,11 @@ function validatePreview(preview2) {
|
|
|
219767
219790
|
message: `Data size exceeds maximum allowed (${MAX_DATA_SIZE} characters)`
|
|
219768
219791
|
});
|
|
219769
219792
|
}
|
|
219770
|
-
for (const pattern of DANGEROUS_PATTERNS) {
|
|
219793
|
+
for (const { pattern, message } of DANGEROUS_PATTERNS) {
|
|
219771
219794
|
if (pattern.test(preview2.code)) {
|
|
219772
219795
|
errors.push({
|
|
219773
219796
|
field: "preview.code",
|
|
219774
|
-
message: `Code contains potentially dangerous pattern: ${
|
|
219797
|
+
message: `Code contains potentially dangerous pattern: ${message}`
|
|
219775
219798
|
});
|
|
219776
219799
|
}
|
|
219777
219800
|
}
|