@inkeep/agents-core 0.20.1 → 0.21.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-4FMDWUE4.js → chunk-QEXLYPVZ.js} +1 -1
- package/dist/{chunk-B6F3RF4T.js → chunk-TNHJH73I.js} +14 -41
- package/dist/{chunk-LZJWVTQ2.js → chunk-TTIPV5QP.js} +11 -0
- package/dist/{chunk-VICWT3WO.js → chunk-XKJPMUGE.js} +1 -1
- package/dist/client-exports.cjs +10 -37
- package/dist/client-exports.js +2 -2
- package/dist/constants/models.cjs +11 -0
- package/dist/constants/models.d.cts +11 -0
- package/dist/constants/models.d.ts +11 -0
- package/dist/constants/models.js +1 -1
- package/dist/db/schema.cjs +13 -40
- package/dist/db/schema.d.cts +1 -1
- package/dist/db/schema.d.ts +1 -1
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +143 -99
- package/dist/index.d.cts +27 -16
- package/dist/index.d.ts +27 -16
- package/dist/index.js +124 -64
- package/dist/{schema-CcSN2XcZ.d.cts → schema-BjQKqtdC.d.cts} +18 -18
- package/dist/{schema-D8h85qdU.d.ts → schema-DylNIx0j.d.ts} +18 -18
- package/dist/types/index.d.cts +8 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/validation/index.cjs +10 -37
- package/dist/validation/index.js +2 -2
- package/drizzle/0008_mysterious_crusher_hogan.sql +20 -0
- package/drizzle/meta/0008_snapshot.json +2753 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
package/dist/db/schema.cjs
CHANGED
|
@@ -33,11 +33,8 @@ var projects = sqliteCore.sqliteTable(
|
|
|
33
33
|
{
|
|
34
34
|
...tenantScoped,
|
|
35
35
|
...uiProperties,
|
|
36
|
-
// Project-level default model settings that can be inherited by agents
|
|
37
36
|
models: sqliteCore.text("models", { mode: "json" }).$type(),
|
|
38
|
-
// Project-level stopWhen configuration that can be inherited by agents
|
|
39
37
|
stopWhen: sqliteCore.text("stop_when", { mode: "json" }).$type(),
|
|
40
|
-
// Project-level sandbox configuration for function execution
|
|
41
38
|
sandboxConfig: sqliteCore.text("sandbox_config", { mode: "json" }).$type(),
|
|
42
39
|
...timestamps
|
|
43
40
|
},
|
|
@@ -70,9 +67,7 @@ var contextConfigs = sqliteCore.sqliteTable(
|
|
|
70
67
|
"context_configs",
|
|
71
68
|
{
|
|
72
69
|
...agentScoped,
|
|
73
|
-
// Developer-defined Zod schema for validating incoming request context
|
|
74
70
|
headersSchema: sqliteCore.blob("headers_schema", { mode: "json" }).$type(),
|
|
75
|
-
// Object mapping template keys to fetch definitions that use request context data
|
|
76
71
|
contextVariables: sqliteCore.blob("context_variables", { mode: "json" }).$type(),
|
|
77
72
|
...timestamps
|
|
78
73
|
},
|
|
@@ -89,15 +84,11 @@ var contextCache = sqliteCore.sqliteTable(
|
|
|
89
84
|
"context_cache",
|
|
90
85
|
{
|
|
91
86
|
...projectScoped,
|
|
92
|
-
// Always scoped to conversation for complete data isolation
|
|
93
87
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
94
|
-
// Reference to the context config and specific fetch definition
|
|
95
88
|
contextConfigId: sqliteCore.text("context_config_id").notNull(),
|
|
96
89
|
contextVariableKey: sqliteCore.text("context_variable_key").notNull(),
|
|
97
90
|
value: sqliteCore.blob("value", { mode: "json" }).$type().notNull(),
|
|
98
|
-
// Request hash for cache invalidation based on context changes
|
|
99
91
|
requestHash: sqliteCore.text("request_hash"),
|
|
100
|
-
// Metadata for monitoring and debugging
|
|
101
92
|
fetchedAt: sqliteCore.text("fetched_at").notNull(),
|
|
102
93
|
fetchSource: sqliteCore.text("fetch_source"),
|
|
103
94
|
fetchDurationMs: sqliteCore.integer("fetch_duration_ms"),
|
|
@@ -144,9 +135,7 @@ var subAgentRelations = sqliteCore.sqliteTable(
|
|
|
144
135
|
{
|
|
145
136
|
...agentScoped,
|
|
146
137
|
sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
|
|
147
|
-
// For internal relationships
|
|
148
138
|
targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
|
|
149
|
-
// For external relationships
|
|
150
139
|
externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
|
|
151
140
|
relationType: sqliteCore.text("relation_type"),
|
|
152
141
|
...timestamps
|
|
@@ -315,9 +304,7 @@ var tools = sqliteCore.sqliteTable(
|
|
|
315
304
|
config: sqliteCore.blob("config", { mode: "json" }).$type().notNull(),
|
|
316
305
|
credentialReferenceId: sqliteCore.text("credential_reference_id"),
|
|
317
306
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
318
|
-
// Image URL for custom tool icon (supports regular URLs and base64 encoded images)
|
|
319
307
|
imageUrl: sqliteCore.text("image_url"),
|
|
320
|
-
// Server capabilities and status (only for MCP tools)
|
|
321
308
|
capabilities: sqliteCore.blob("capabilities", { mode: "json" }).$type(),
|
|
322
309
|
lastError: sqliteCore.text("last_error"),
|
|
323
310
|
...timestamps
|
|
@@ -347,7 +334,6 @@ var functionTools = sqliteCore.sqliteTable(
|
|
|
347
334
|
foreignColumns: [agents.tenantId, agents.projectId, agents.id],
|
|
348
335
|
name: "function_tools_agent_fk"
|
|
349
336
|
}).onDelete("cascade"),
|
|
350
|
-
// Foreign key constraint to functions table
|
|
351
337
|
sqliteCore.foreignKey({
|
|
352
338
|
columns: [table.tenantId, table.projectId, table.functionId],
|
|
353
339
|
foreignColumns: [functions.tenantId, functions.projectId, functions.id],
|
|
@@ -396,8 +382,8 @@ var subAgentToolRelations = sqliteCore.sqliteTable(
|
|
|
396
382
|
}).onDelete("cascade")
|
|
397
383
|
]
|
|
398
384
|
);
|
|
399
|
-
var
|
|
400
|
-
"
|
|
385
|
+
var subAgentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
386
|
+
"sub_agent_function_tool_relations",
|
|
401
387
|
{
|
|
402
388
|
...subAgentScoped,
|
|
403
389
|
functionToolId: sqliteCore.text("function_tool_id").notNull(),
|
|
@@ -405,13 +391,11 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
405
391
|
},
|
|
406
392
|
(table) => [
|
|
407
393
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.agentId, table.id] }),
|
|
408
|
-
// Foreign key constraint to agents table
|
|
409
394
|
sqliteCore.foreignKey({
|
|
410
395
|
columns: [table.tenantId, table.projectId, table.agentId, table.subAgentId],
|
|
411
396
|
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.agentId, subAgents.id],
|
|
412
|
-
name: "
|
|
397
|
+
name: "sub_agent_function_tool_relations_sub_agent_fk"
|
|
413
398
|
}).onDelete("cascade"),
|
|
414
|
-
// Foreign key constraint to functionTools table
|
|
415
399
|
sqliteCore.foreignKey({
|
|
416
400
|
columns: [table.tenantId, table.projectId, table.agentId, table.functionToolId],
|
|
417
401
|
foreignColumns: [
|
|
@@ -420,7 +404,7 @@ var agentFunctionToolRelations = sqliteCore.sqliteTable(
|
|
|
420
404
|
functionTools.agentId,
|
|
421
405
|
functionTools.id
|
|
422
406
|
],
|
|
423
|
-
name: "
|
|
407
|
+
name: "sub_agent_function_tool_relations_function_tool_fk"
|
|
424
408
|
}).onDelete("cascade")
|
|
425
409
|
]
|
|
426
410
|
);
|
|
@@ -449,26 +433,18 @@ var messages = sqliteCore.sqliteTable(
|
|
|
449
433
|
{
|
|
450
434
|
...projectScoped,
|
|
451
435
|
conversationId: sqliteCore.text("conversation_id").notNull(),
|
|
452
|
-
// Role mapping: user, agent, system (unified for both formats)
|
|
453
436
|
role: sqliteCore.text("role").notNull(),
|
|
454
|
-
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
455
437
|
fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
|
|
456
438
|
toSubAgentId: sqliteCore.text("to_sub_agent_id"),
|
|
457
|
-
// External agent sender tracking
|
|
458
439
|
fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
|
|
459
|
-
// External agent recipient tracking
|
|
460
440
|
toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
|
|
461
|
-
// Message content stored as JSON to support both formats
|
|
462
441
|
content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
|
|
463
|
-
// Message classification and filtering
|
|
464
442
|
visibility: sqliteCore.text("visibility").notNull().default("user-facing"),
|
|
465
443
|
messageType: sqliteCore.text("message_type").notNull().default("chat"),
|
|
466
444
|
taskId: sqliteCore.text("task_id"),
|
|
467
445
|
parentMessageId: sqliteCore.text("parent_message_id"),
|
|
468
|
-
// A2A specific fields
|
|
469
446
|
a2aTaskId: sqliteCore.text("a2a_task_id"),
|
|
470
447
|
a2aSessionId: sqliteCore.text("a2a_session_id"),
|
|
471
|
-
// Metadata for extensions
|
|
472
448
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
473
449
|
...timestamps
|
|
474
450
|
},
|
|
@@ -485,17 +461,14 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
485
461
|
"ledger_artifacts",
|
|
486
462
|
{
|
|
487
463
|
...projectScoped,
|
|
488
|
-
// Links
|
|
489
464
|
taskId: sqliteCore.text("task_id").notNull(),
|
|
490
465
|
toolCallId: sqliteCore.text("tool_call_id"),
|
|
491
466
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
492
|
-
// Core Artifact fields
|
|
493
467
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
494
468
|
name: sqliteCore.text("name"),
|
|
495
469
|
description: sqliteCore.text("description"),
|
|
496
470
|
parts: sqliteCore.blob("parts", { mode: "json" }).$type(),
|
|
497
471
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
498
|
-
// Extra ledger information (not part of the Artifact spec – kept optional)
|
|
499
472
|
summary: sqliteCore.text("summary"),
|
|
500
473
|
mime: sqliteCore.blob("mime", { mode: "json" }).$type(),
|
|
501
474
|
visibility: sqliteCore.text("visibility").default("context"),
|
|
@@ -646,7 +619,7 @@ var subAgentsRelations = drizzleOrm.relations(subAgents, ({ many, one }) => ({
|
|
|
646
619
|
relationName: "receivedMessages"
|
|
647
620
|
}),
|
|
648
621
|
toolRelations: many(subAgentToolRelations),
|
|
649
|
-
functionToolRelations: many(
|
|
622
|
+
functionToolRelations: many(subAgentFunctionToolRelations),
|
|
650
623
|
dataComponentRelations: many(subAgentDataComponents),
|
|
651
624
|
artifactComponentRelations: many(subAgentArtifactComponents)
|
|
652
625
|
}));
|
|
@@ -851,24 +824,22 @@ var functionToolsRelations = drizzleOrm.relations(functionTools, ({ one, many })
|
|
|
851
824
|
fields: [functionTools.tenantId, functionTools.projectId, functionTools.functionId],
|
|
852
825
|
references: [functions.tenantId, functions.projectId, functions.id]
|
|
853
826
|
}),
|
|
854
|
-
|
|
827
|
+
subAgentRelations: many(subAgentFunctionToolRelations)
|
|
855
828
|
}));
|
|
856
|
-
var
|
|
857
|
-
|
|
829
|
+
var subAgentFunctionToolRelationsRelations = drizzleOrm.relations(
|
|
830
|
+
subAgentFunctionToolRelations,
|
|
858
831
|
({ one }) => ({
|
|
859
|
-
|
|
860
|
-
fields: [
|
|
832
|
+
subAgent: one(subAgents, {
|
|
833
|
+
fields: [subAgentFunctionToolRelations.subAgentId],
|
|
861
834
|
references: [subAgents.id]
|
|
862
835
|
}),
|
|
863
836
|
functionTool: one(functionTools, {
|
|
864
|
-
fields: [
|
|
837
|
+
fields: [subAgentFunctionToolRelations.functionToolId],
|
|
865
838
|
references: [functionTools.id]
|
|
866
839
|
})
|
|
867
840
|
})
|
|
868
841
|
);
|
|
869
842
|
|
|
870
|
-
exports.agentFunctionToolRelations = agentFunctionToolRelations;
|
|
871
|
-
exports.agentFunctionToolRelationsRelations = agentFunctionToolRelationsRelations;
|
|
872
843
|
exports.agentRelations = agentRelations;
|
|
873
844
|
exports.agentToolRelationsRelations = agentToolRelationsRelations;
|
|
874
845
|
exports.agents = agents;
|
|
@@ -902,6 +873,8 @@ exports.subAgentArtifactComponents = subAgentArtifactComponents;
|
|
|
902
873
|
exports.subAgentArtifactComponentsRelations = subAgentArtifactComponentsRelations;
|
|
903
874
|
exports.subAgentDataComponents = subAgentDataComponents;
|
|
904
875
|
exports.subAgentDataComponentsRelations = subAgentDataComponentsRelations;
|
|
876
|
+
exports.subAgentFunctionToolRelations = subAgentFunctionToolRelations;
|
|
877
|
+
exports.subAgentFunctionToolRelationsRelations = subAgentFunctionToolRelationsRelations;
|
|
905
878
|
exports.subAgentRelations = subAgentRelations;
|
|
906
879
|
exports.subAgentRelationsRelations = subAgentRelationsRelations;
|
|
907
880
|
exports.subAgentToolRelations = subAgentToolRelations;
|
package/dist/db/schema.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import '../utility-HqRMF7sM.cjs';
|
|
4
|
-
export {
|
|
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-BjQKqtdC.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
3
|
import '../utility-HqRMF7sM.js';
|
|
4
|
-
export {
|
|
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-DylNIx0j.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 {
|
|
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, subAgentFunctionToolRelations, subAgentFunctionToolRelationsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-TNHJH73I.js';
|