@inkeep/agents-core 0.8.1 → 0.8.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-P5LTXXFH.js → chunk-AX77SEE3.js} +1 -1
- package/dist/{chunk-VZ62ZJTI.js → chunk-GPGFF2K4.js} +1 -1
- package/dist/{chunk-E4ZLV4GU.js → chunk-URSDNK76.js} +9 -3
- package/dist/client-exports.cjs +7 -2
- 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/db/schema.cjs +8 -2
- 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 +193 -18
- package/dist/index.d.cts +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.js +190 -23
- package/dist/{schema-BF9NpAv5.d.cts → schema-DnjptA-m.d.ts} +25 -4
- package/dist/{schema-78jVngGh.d.ts → schema-DwiRB4zS.d.cts} +25 -4
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-CT2pq49U.d.cts → utility-C3eMTvpr.d.cts} +47 -4
- package/dist/{utility-CT2pq49U.d.ts → utility-C3eMTvpr.d.ts} +47 -4
- package/dist/validation/index.cjs +7 -2
- 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 { agents, agentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, externalAgents, apiKeys, credentialReferences, contextConfigs, agentToolRelations, ledgerArtifacts, projects } from './chunk-
|
|
1
|
+
import { agents, agentRelations, agentGraph, tasks, taskRelations, tools, conversations, messages, contextCache, dataComponents, agentDataComponents, artifactComponents, agentArtifactComponents, externalAgents, apiKeys, credentialReferences, contextConfigs, agentToolRelations, ledgerArtifacts, projects } from './chunk-URSDNK76.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, createInsertSchema } from 'drizzle-zod';
|
|
@@ -38,6 +38,7 @@ __export(schema_exports, {
|
|
|
38
38
|
ledgerArtifactsRelations: () => ledgerArtifactsRelations,
|
|
39
39
|
ledgerArtifactsTaskContextNameUnique: () => ledgerArtifactsTaskContextNameUnique,
|
|
40
40
|
ledgerArtifactsTaskIdIdx: () => ledgerArtifactsTaskIdIdx,
|
|
41
|
+
ledgerArtifactsToolCallIdIdx: () => ledgerArtifactsToolCallIdIdx,
|
|
41
42
|
messages: () => messages,
|
|
42
43
|
messagesRelations: () => messagesRelations,
|
|
43
44
|
projects: () => projects,
|
|
@@ -539,7 +540,9 @@ var ledgerArtifacts = sqliteTable(
|
|
|
539
540
|
projectId: text("project_id").notNull(),
|
|
540
541
|
id: text("id").notNull(),
|
|
541
542
|
// Links
|
|
542
|
-
taskId: text("task_id"),
|
|
543
|
+
taskId: text("task_id").notNull(),
|
|
544
|
+
toolCallId: text("tool_call_id"),
|
|
545
|
+
// Added for traceability to the specific tool execution
|
|
543
546
|
contextId: text("context_id").notNull(),
|
|
544
547
|
// Core Artifact fields
|
|
545
548
|
type: text("type").notNull().default("source"),
|
|
@@ -558,7 +561,7 @@ var ledgerArtifacts = sqliteTable(
|
|
|
558
561
|
updatedAt: text("updated_at").notNull().default(sql`CURRENT_TIMESTAMP`)
|
|
559
562
|
},
|
|
560
563
|
(table) => [
|
|
561
|
-
primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
564
|
+
primaryKey({ columns: [table.tenantId, table.projectId, table.id, table.taskId] }),
|
|
562
565
|
foreignKey({
|
|
563
566
|
columns: [table.tenantId, table.projectId],
|
|
564
567
|
foreignColumns: [projects.tenantId, projects.id],
|
|
@@ -627,6 +630,9 @@ var credentialReferences = sqliteTable(
|
|
|
627
630
|
var ledgerArtifactsTaskIdIdx = index("ledger_artifacts_task_id_idx").on(
|
|
628
631
|
ledgerArtifacts.taskId
|
|
629
632
|
);
|
|
633
|
+
var ledgerArtifactsToolCallIdIdx = index("ledger_artifacts_tool_call_id_idx").on(
|
|
634
|
+
ledgerArtifacts.toolCallId
|
|
635
|
+
);
|
|
630
636
|
var ledgerArtifactsContextIdIdx = index("ledger_artifacts_context_id_idx").on(
|
|
631
637
|
ledgerArtifacts.contextId
|
|
632
638
|
);
|
|
@@ -959,4 +965,4 @@ var agentRelationsRelations = relations(agentRelations, ({ one }) => ({
|
|
|
959
965
|
})
|
|
960
966
|
}));
|
|
961
967
|
|
|
962
|
-
export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsRelations, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, messages, messagesRelations, projects, projectsRelations, schema_exports, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
|
|
968
|
+
export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsRelations, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, ledgerArtifactsToolCallIdIdx, messages, messagesRelations, projects, projectsRelations, schema_exports, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations };
|
package/dist/client-exports.cjs
CHANGED
|
@@ -514,7 +514,9 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
514
514
|
projectId: sqliteCore.text("project_id").notNull(),
|
|
515
515
|
id: sqliteCore.text("id").notNull(),
|
|
516
516
|
// Links
|
|
517
|
-
taskId: sqliteCore.text("task_id"),
|
|
517
|
+
taskId: sqliteCore.text("task_id").notNull(),
|
|
518
|
+
toolCallId: sqliteCore.text("tool_call_id"),
|
|
519
|
+
// Added for traceability to the specific tool execution
|
|
518
520
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
519
521
|
// Core Artifact fields
|
|
520
522
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
@@ -533,7 +535,7 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
533
535
|
updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
|
|
534
536
|
},
|
|
535
537
|
(table) => [
|
|
536
|
-
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
538
|
+
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id, table.taskId] }),
|
|
537
539
|
sqliteCore.foreignKey({
|
|
538
540
|
columns: [table.tenantId, table.projectId],
|
|
539
541
|
foreignColumns: [projects.tenantId, projects.id],
|
|
@@ -602,6 +604,9 @@ var credentialReferences = sqliteCore.sqliteTable(
|
|
|
602
604
|
sqliteCore.index("ledger_artifacts_task_id_idx").on(
|
|
603
605
|
ledgerArtifacts.taskId
|
|
604
606
|
);
|
|
607
|
+
sqliteCore.index("ledger_artifacts_tool_call_id_idx").on(
|
|
608
|
+
ledgerArtifacts.toolCallId
|
|
609
|
+
);
|
|
605
610
|
sqliteCore.index("ledger_artifacts_context_id_idx").on(
|
|
606
611
|
ledgerArtifacts.contextId
|
|
607
612
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, F as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { c as AgentStopWhen, A as AgentStopWhenSchema, d as CredentialStoreType, b as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, a as StopWhen, S as StopWhenSchema } from './utility-
|
|
2
|
+
import { C as ConversationHistoryConfig, F as FullGraphAgentInsertSchema } from './utility-C3eMTvpr.cjs';
|
|
3
|
+
export { c as AgentStopWhen, A as AgentStopWhenSchema, d as CredentialStoreType, b as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, a as StopWhen, S as StopWhenSchema } from './utility-C3eMTvpr.cjs';
|
|
4
4
|
import 'drizzle-zod';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|
|
6
6
|
import '@hono/zod-openapi';
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, F as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { c as AgentStopWhen, A as AgentStopWhenSchema, d as CredentialStoreType, b as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, a as StopWhen, S as StopWhenSchema } from './utility-
|
|
2
|
+
import { C as ConversationHistoryConfig, F as FullGraphAgentInsertSchema } from './utility-C3eMTvpr.js';
|
|
3
|
+
export { c as AgentStopWhen, A as AgentStopWhenSchema, d as CredentialStoreType, b as GraphStopWhen, G as GraphStopWhenSchema, M as MCPTransportType, a as StopWhen, S as StopWhenSchema } from './utility-C3eMTvpr.js';
|
|
4
4
|
import 'drizzle-zod';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|
|
6
6
|
import '@hono/zod-openapi';
|
package/dist/client-exports.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FullGraphAgentInsertSchema } from './chunk-
|
|
2
|
-
export { AgentStopWhenSchema, GraphStopWhenSchema, StopWhenSchema } from './chunk-
|
|
1
|
+
import { FullGraphAgentInsertSchema } from './chunk-AX77SEE3.js';
|
|
2
|
+
export { AgentStopWhenSchema, GraphStopWhenSchema, StopWhenSchema } from './chunk-AX77SEE3.js';
|
|
3
3
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
4
4
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
5
5
|
import { z } from 'zod';
|
package/dist/db/schema.cjs
CHANGED
|
@@ -494,7 +494,9 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
494
494
|
projectId: sqliteCore.text("project_id").notNull(),
|
|
495
495
|
id: sqliteCore.text("id").notNull(),
|
|
496
496
|
// Links
|
|
497
|
-
taskId: sqliteCore.text("task_id"),
|
|
497
|
+
taskId: sqliteCore.text("task_id").notNull(),
|
|
498
|
+
toolCallId: sqliteCore.text("tool_call_id"),
|
|
499
|
+
// Added for traceability to the specific tool execution
|
|
498
500
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
499
501
|
// Core Artifact fields
|
|
500
502
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
@@ -513,7 +515,7 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
513
515
|
updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
|
|
514
516
|
},
|
|
515
517
|
(table) => [
|
|
516
|
-
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
518
|
+
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id, table.taskId] }),
|
|
517
519
|
sqliteCore.foreignKey({
|
|
518
520
|
columns: [table.tenantId, table.projectId],
|
|
519
521
|
foreignColumns: [projects.tenantId, projects.id],
|
|
@@ -582,6 +584,9 @@ var credentialReferences = sqliteCore.sqliteTable(
|
|
|
582
584
|
var ledgerArtifactsTaskIdIdx = sqliteCore.index("ledger_artifacts_task_id_idx").on(
|
|
583
585
|
ledgerArtifacts.taskId
|
|
584
586
|
);
|
|
587
|
+
var ledgerArtifactsToolCallIdIdx = sqliteCore.index("ledger_artifacts_tool_call_id_idx").on(
|
|
588
|
+
ledgerArtifacts.toolCallId
|
|
589
|
+
);
|
|
585
590
|
var ledgerArtifactsContextIdIdx = sqliteCore.index("ledger_artifacts_context_id_idx").on(
|
|
586
591
|
ledgerArtifacts.contextId
|
|
587
592
|
);
|
|
@@ -947,6 +952,7 @@ exports.ledgerArtifactsContextIdIdx = ledgerArtifactsContextIdIdx;
|
|
|
947
952
|
exports.ledgerArtifactsRelations = ledgerArtifactsRelations;
|
|
948
953
|
exports.ledgerArtifactsTaskContextNameUnique = ledgerArtifactsTaskContextNameUnique;
|
|
949
954
|
exports.ledgerArtifactsTaskIdIdx = ledgerArtifactsTaskIdIdx;
|
|
955
|
+
exports.ledgerArtifactsToolCallIdIdx = ledgerArtifactsToolCallIdIdx;
|
|
950
956
|
exports.messages = messages;
|
|
951
957
|
exports.messagesRelations = messagesRelations;
|
|
952
958
|
exports.projects = projects;
|
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 { k as agentArtifactComponents,
|
|
3
|
+
import '../utility-C3eMTvpr.cjs';
|
|
4
|
+
export { k as agentArtifactComponents, O as agentArtifactComponentsRelations, i as agentDataComponents, Q as agentDataComponentsRelations, a as agentGraph, F as agentGraphRelations, e as agentRelations, S as agentRelationsRelations, m as agentToolRelations, I as agentToolRelationsRelations, d as agents, E as agentsRelations, r as apiKeys, H as apiKeysRelations, j as artifactComponents, N as artifactComponentsRelations, b as contextCache, D as contextCacheRelations, c as contextConfigs, C as contextConfigsRelations, n as conversations, L as conversationsRelations, u as credentialReferences, J as credentialReferencesRelations, h as dataComponents, P as dataComponentsRelations, f as externalAgents, G as externalAgentsRelations, q as ledgerArtifacts, x as ledgerArtifactsContextIdIdx, R as ledgerArtifactsRelations, y as ledgerArtifactsTaskContextNameUnique, v as ledgerArtifactsTaskIdIdx, w as ledgerArtifactsToolCallIdIdx, o as messages, M as messagesRelations, p as projects, A as projectsRelations, g as taskRelations, B as taskRelationsRelations, t as tasks, z as tasksRelations, l as tools, K as toolsRelations } from '../schema-DwiRB4zS.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 { k as agentArtifactComponents,
|
|
3
|
+
import '../utility-C3eMTvpr.js';
|
|
4
|
+
export { k as agentArtifactComponents, O as agentArtifactComponentsRelations, i as agentDataComponents, Q as agentDataComponentsRelations, a as agentGraph, F as agentGraphRelations, e as agentRelations, S as agentRelationsRelations, m as agentToolRelations, I as agentToolRelationsRelations, d as agents, E as agentsRelations, r as apiKeys, H as apiKeysRelations, j as artifactComponents, N as artifactComponentsRelations, b as contextCache, D as contextCacheRelations, c as contextConfigs, C as contextConfigsRelations, n as conversations, L as conversationsRelations, u as credentialReferences, J as credentialReferencesRelations, h as dataComponents, P as dataComponentsRelations, f as externalAgents, G as externalAgentsRelations, q as ledgerArtifacts, x as ledgerArtifactsContextIdIdx, R as ledgerArtifactsRelations, y as ledgerArtifactsTaskContextNameUnique, v as ledgerArtifactsTaskIdIdx, w as ledgerArtifactsToolCallIdIdx, o as messages, M as messagesRelations, p as projects, A as projectsRelations, g as taskRelations, B as taskRelationsRelations, t as tasks, z as tasksRelations, l as tools, K as toolsRelations } from '../schema-DnjptA-m.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 { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsRelations, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, messages, messagesRelations, projects, projectsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-
|
|
1
|
+
export { agentArtifactComponents, agentArtifactComponentsRelations, agentDataComponents, agentDataComponentsRelations, agentGraph, agentGraphRelations, agentRelations, agentRelationsRelations, agentToolRelations, agentToolRelationsRelations, agents, agentsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, ledgerArtifacts, ledgerArtifactsContextIdIdx, ledgerArtifactsRelations, ledgerArtifactsTaskContextNameUnique, ledgerArtifactsTaskIdIdx, ledgerArtifactsToolCallIdIdx, messages, messagesRelations, projects, projectsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-URSDNK76.js';
|
package/dist/index.cjs
CHANGED
|
@@ -244,6 +244,7 @@ __export(schema_exports, {
|
|
|
244
244
|
ledgerArtifactsRelations: () => ledgerArtifactsRelations,
|
|
245
245
|
ledgerArtifactsTaskContextNameUnique: () => ledgerArtifactsTaskContextNameUnique,
|
|
246
246
|
ledgerArtifactsTaskIdIdx: () => ledgerArtifactsTaskIdIdx,
|
|
247
|
+
ledgerArtifactsToolCallIdIdx: () => ledgerArtifactsToolCallIdIdx,
|
|
247
248
|
messages: () => messages,
|
|
248
249
|
messagesRelations: () => messagesRelations,
|
|
249
250
|
projects: () => projects,
|
|
@@ -745,7 +746,9 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
745
746
|
projectId: sqliteCore.text("project_id").notNull(),
|
|
746
747
|
id: sqliteCore.text("id").notNull(),
|
|
747
748
|
// Links
|
|
748
|
-
taskId: sqliteCore.text("task_id"),
|
|
749
|
+
taskId: sqliteCore.text("task_id").notNull(),
|
|
750
|
+
toolCallId: sqliteCore.text("tool_call_id"),
|
|
751
|
+
// Added for traceability to the specific tool execution
|
|
749
752
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
750
753
|
// Core Artifact fields
|
|
751
754
|
type: sqliteCore.text("type").notNull().default("source"),
|
|
@@ -764,7 +767,7 @@ var ledgerArtifacts = sqliteCore.sqliteTable(
|
|
|
764
767
|
updatedAt: sqliteCore.text("updated_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
|
|
765
768
|
},
|
|
766
769
|
(table) => [
|
|
767
|
-
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
770
|
+
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id, table.taskId] }),
|
|
768
771
|
sqliteCore.foreignKey({
|
|
769
772
|
columns: [table.tenantId, table.projectId],
|
|
770
773
|
foreignColumns: [projects.tenantId, projects.id],
|
|
@@ -833,6 +836,9 @@ var credentialReferences = sqliteCore.sqliteTable(
|
|
|
833
836
|
var ledgerArtifactsTaskIdIdx = sqliteCore.index("ledger_artifacts_task_id_idx").on(
|
|
834
837
|
ledgerArtifacts.taskId
|
|
835
838
|
);
|
|
839
|
+
var ledgerArtifactsToolCallIdIdx = sqliteCore.index("ledger_artifacts_tool_call_id_idx").on(
|
|
840
|
+
ledgerArtifacts.toolCallId
|
|
841
|
+
);
|
|
836
842
|
var ledgerArtifactsContextIdIdx = sqliteCore.index("ledger_artifacts_context_id_idx").on(
|
|
837
843
|
ledgerArtifacts.contextId
|
|
838
844
|
);
|
|
@@ -6986,38 +6992,200 @@ var deleteFullGraph = (db, logger12 = defaultLogger) => async (params) => {
|
|
|
6986
6992
|
throw error;
|
|
6987
6993
|
}
|
|
6988
6994
|
};
|
|
6995
|
+
function validateArtifactData(artifact, index2) {
|
|
6996
|
+
if (!artifact.artifactId?.trim()) {
|
|
6997
|
+
throw new Error(`Artifact at index ${index2} missing required artifactId`);
|
|
6998
|
+
}
|
|
6999
|
+
if (artifact.parts) {
|
|
7000
|
+
try {
|
|
7001
|
+
JSON.stringify(artifact.parts);
|
|
7002
|
+
} catch (error) {
|
|
7003
|
+
throw new Error(
|
|
7004
|
+
`Artifact ${artifact.artifactId} has invalid parts data: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
7005
|
+
);
|
|
7006
|
+
}
|
|
7007
|
+
}
|
|
7008
|
+
if (artifact.metadata) {
|
|
7009
|
+
try {
|
|
7010
|
+
JSON.stringify(artifact.metadata);
|
|
7011
|
+
} catch (error) {
|
|
7012
|
+
throw new Error(
|
|
7013
|
+
`Artifact ${artifact.artifactId} has invalid metadata: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
7014
|
+
);
|
|
7015
|
+
}
|
|
7016
|
+
}
|
|
7017
|
+
}
|
|
7018
|
+
function determineMimeTypes(artifact) {
|
|
7019
|
+
if (artifact.parts && artifact.parts.length > 0) {
|
|
7020
|
+
const kinds = /* @__PURE__ */ new Set();
|
|
7021
|
+
for (const part of artifact.parts) {
|
|
7022
|
+
if (part.kind) {
|
|
7023
|
+
kinds.add(part.kind);
|
|
7024
|
+
}
|
|
7025
|
+
}
|
|
7026
|
+
if (kinds.size > 0) {
|
|
7027
|
+
return Array.from(kinds);
|
|
7028
|
+
}
|
|
7029
|
+
}
|
|
7030
|
+
if (artifact.type?.toLowerCase().includes("document")) {
|
|
7031
|
+
return ["text"];
|
|
7032
|
+
}
|
|
7033
|
+
if (artifact.type?.toLowerCase().includes("image")) {
|
|
7034
|
+
return ["image"];
|
|
7035
|
+
}
|
|
7036
|
+
if (artifact.type?.toLowerCase().includes("code")) {
|
|
7037
|
+
return ["text"];
|
|
7038
|
+
}
|
|
7039
|
+
return ["data"];
|
|
7040
|
+
}
|
|
7041
|
+
function sanitizeArtifactForDatabase(artifact) {
|
|
7042
|
+
return {
|
|
7043
|
+
...artifact,
|
|
7044
|
+
// Ensure text fields don't exceed reasonable limits
|
|
7045
|
+
name: artifact.name?.slice(0, 255) || void 0,
|
|
7046
|
+
description: artifact.description?.slice(0, 1e3) || void 0,
|
|
7047
|
+
// Clean any undefined values from JSON fields
|
|
7048
|
+
parts: artifact.parts ? JSON.parse(JSON.stringify(artifact.parts)) : null,
|
|
7049
|
+
metadata: artifact.metadata ? JSON.parse(JSON.stringify(artifact.metadata)) : null
|
|
7050
|
+
};
|
|
7051
|
+
}
|
|
7052
|
+
async function tryFallbackInsert(db, rows, _originalError) {
|
|
7053
|
+
for (let i = 0; i < rows.length; i++) {
|
|
7054
|
+
const row = rows[i];
|
|
7055
|
+
try {
|
|
7056
|
+
await db.insert(ledgerArtifacts).values([row]);
|
|
7057
|
+
} catch (_fallbackError) {
|
|
7058
|
+
try {
|
|
7059
|
+
const minimalRow = {
|
|
7060
|
+
id: row.id,
|
|
7061
|
+
tenantId: row.tenantId,
|
|
7062
|
+
projectId: row.projectId,
|
|
7063
|
+
taskId: row.taskId,
|
|
7064
|
+
toolCallId: row.toolCallId,
|
|
7065
|
+
contextId: row.contextId,
|
|
7066
|
+
type: row.type || "source",
|
|
7067
|
+
name: row.name || `Artifact ${row.id.substring(0, 8)}`,
|
|
7068
|
+
description: row.description || "Artifact from tool results",
|
|
7069
|
+
parts: null,
|
|
7070
|
+
// Skip complex JSON data
|
|
7071
|
+
metadata: null,
|
|
7072
|
+
// Skip complex JSON data
|
|
7073
|
+
summary: null,
|
|
7074
|
+
mime: null,
|
|
7075
|
+
visibility: "context",
|
|
7076
|
+
allowedAgents: null,
|
|
7077
|
+
derivedFrom: null,
|
|
7078
|
+
createdAt: row.createdAt,
|
|
7079
|
+
updatedAt: row.updatedAt
|
|
7080
|
+
};
|
|
7081
|
+
await db.insert(ledgerArtifacts).values([minimalRow]);
|
|
7082
|
+
} catch (_finalError) {
|
|
7083
|
+
}
|
|
7084
|
+
}
|
|
7085
|
+
}
|
|
7086
|
+
}
|
|
7087
|
+
var upsertLedgerArtifact = (db) => async (params) => {
|
|
7088
|
+
const { scopes, contextId, taskId, toolCallId = null, artifact } = params;
|
|
7089
|
+
validateArtifactData(artifact, 0);
|
|
7090
|
+
const sanitizedArt = sanitizeArtifactForDatabase(artifact);
|
|
7091
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7092
|
+
const artifactRow = {
|
|
7093
|
+
id: sanitizedArt.artifactId ?? nanoid.nanoid(),
|
|
7094
|
+
tenantId: scopes.tenantId,
|
|
7095
|
+
projectId: scopes.projectId,
|
|
7096
|
+
taskId,
|
|
7097
|
+
toolCallId,
|
|
7098
|
+
contextId,
|
|
7099
|
+
type: sanitizedArt.type ?? "source",
|
|
7100
|
+
name: sanitizedArt.name,
|
|
7101
|
+
description: sanitizedArt.description,
|
|
7102
|
+
parts: sanitizedArt.parts,
|
|
7103
|
+
metadata: sanitizedArt.metadata,
|
|
7104
|
+
summary: sanitizedArt.description?.slice(0, 200) ?? null,
|
|
7105
|
+
mime: determineMimeTypes(sanitizedArt),
|
|
7106
|
+
visibility: sanitizedArt.metadata?.visibility ?? "context",
|
|
7107
|
+
allowedAgents: sanitizedArt.metadata?.allowedAgents ?? [],
|
|
7108
|
+
derivedFrom: sanitizedArt.metadata?.derivedFrom ?? null,
|
|
7109
|
+
createdAt: now,
|
|
7110
|
+
updatedAt: now
|
|
7111
|
+
};
|
|
7112
|
+
try {
|
|
7113
|
+
await db.insert(ledgerArtifacts).values([artifactRow]);
|
|
7114
|
+
return { created: true };
|
|
7115
|
+
} catch (error) {
|
|
7116
|
+
if (error.message?.includes("UNIQUE") || error.message?.includes("duplicate")) {
|
|
7117
|
+
const existing = await db.select().from(ledgerArtifacts).where(
|
|
7118
|
+
drizzleOrm.and(
|
|
7119
|
+
drizzleOrm.eq(ledgerArtifacts.tenantId, scopes.tenantId),
|
|
7120
|
+
drizzleOrm.eq(ledgerArtifacts.projectId, scopes.projectId),
|
|
7121
|
+
drizzleOrm.eq(ledgerArtifacts.id, artifactRow.id),
|
|
7122
|
+
drizzleOrm.eq(ledgerArtifacts.taskId, taskId)
|
|
7123
|
+
)
|
|
7124
|
+
).limit(1);
|
|
7125
|
+
if (existing.length > 0) {
|
|
7126
|
+
return { created: false, existing: existing[0] };
|
|
7127
|
+
}
|
|
7128
|
+
}
|
|
7129
|
+
throw error;
|
|
7130
|
+
}
|
|
7131
|
+
};
|
|
6989
7132
|
var addLedgerArtifacts = (db) => async (params) => {
|
|
6990
|
-
const { scopes, contextId, taskId = null, artifacts } = params;
|
|
7133
|
+
const { scopes, contextId, taskId = null, toolCallId = null, artifacts } = params;
|
|
6991
7134
|
if (artifacts.length === 0) return;
|
|
7135
|
+
for (let i = 0; i < artifacts.length; i++) {
|
|
7136
|
+
validateArtifactData(artifacts[i], i);
|
|
7137
|
+
}
|
|
6992
7138
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
6993
7139
|
const rows = artifacts.map((art) => {
|
|
6994
|
-
const
|
|
7140
|
+
const sanitizedArt = sanitizeArtifactForDatabase(art);
|
|
7141
|
+
const resolvedTaskId = taskId ?? sanitizedArt.taskId ?? sanitizedArt.metadata?.taskId ?? null;
|
|
6995
7142
|
return {
|
|
6996
|
-
id:
|
|
7143
|
+
id: sanitizedArt.artifactId ?? nanoid.nanoid(),
|
|
6997
7144
|
tenantId: scopes.tenantId,
|
|
6998
7145
|
projectId: scopes.projectId,
|
|
6999
7146
|
taskId: resolvedTaskId,
|
|
7147
|
+
toolCallId: toolCallId ?? sanitizedArt.metadata?.toolCallId ?? null,
|
|
7000
7148
|
contextId,
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7149
|
+
type: sanitizedArt.type ?? "source",
|
|
7150
|
+
name: sanitizedArt.name,
|
|
7151
|
+
description: sanitizedArt.description,
|
|
7152
|
+
parts: sanitizedArt.parts,
|
|
7153
|
+
metadata: sanitizedArt.metadata,
|
|
7005
7154
|
// extra (optional) ledger fields
|
|
7006
|
-
summary:
|
|
7007
|
-
mime:
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7155
|
+
summary: sanitizedArt.description?.slice(0, 200) ?? null,
|
|
7156
|
+
mime: determineMimeTypes(sanitizedArt),
|
|
7157
|
+
// Simple string fallback until we debug the issue
|
|
7158
|
+
visibility: sanitizedArt.metadata?.visibility ?? "context",
|
|
7159
|
+
allowedAgents: sanitizedArt.metadata?.allowedAgents ?? [],
|
|
7160
|
+
// Fix: use empty array, not null
|
|
7161
|
+
derivedFrom: sanitizedArt.metadata?.derivedFrom ?? null,
|
|
7011
7162
|
createdAt: now,
|
|
7012
7163
|
updatedAt: now
|
|
7013
7164
|
};
|
|
7014
7165
|
});
|
|
7015
|
-
|
|
7166
|
+
const maxRetries = 3;
|
|
7167
|
+
let lastError = null;
|
|
7168
|
+
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
|
7169
|
+
try {
|
|
7170
|
+
await db.insert(ledgerArtifacts).values(rows);
|
|
7171
|
+
return;
|
|
7172
|
+
} catch (error) {
|
|
7173
|
+
lastError = error;
|
|
7174
|
+
const isRetryable = error.code === "SQLITE_BUSY" || error.code === "SQLITE_LOCKED" || error.message?.includes("database is locked") || error.message?.includes("busy") || error.message?.includes("timeout");
|
|
7175
|
+
if (!isRetryable || attempt === maxRetries) {
|
|
7176
|
+
await tryFallbackInsert(db, rows);
|
|
7177
|
+
return;
|
|
7178
|
+
}
|
|
7179
|
+
const backoffMs = Math.min(1e3 * 2 ** (attempt - 1), 5e3);
|
|
7180
|
+
await new Promise((resolve) => setTimeout(resolve, backoffMs));
|
|
7181
|
+
}
|
|
7182
|
+
}
|
|
7183
|
+
throw lastError;
|
|
7016
7184
|
};
|
|
7017
7185
|
var getLedgerArtifacts = (db) => async (params) => {
|
|
7018
|
-
const { scopes, taskId, artifactId } = params;
|
|
7019
|
-
if (!taskId && !artifactId) {
|
|
7020
|
-
throw new Error("
|
|
7186
|
+
const { scopes, taskId, toolCallId, artifactId } = params;
|
|
7187
|
+
if (!taskId && !toolCallId && !artifactId) {
|
|
7188
|
+
throw new Error("At least one of taskId, toolCallId, or artifactId must be provided");
|
|
7021
7189
|
}
|
|
7022
7190
|
const conditions = [
|
|
7023
7191
|
drizzleOrm.eq(ledgerArtifacts.tenantId, scopes.tenantId),
|
|
@@ -7029,6 +7197,9 @@ var getLedgerArtifacts = (db) => async (params) => {
|
|
|
7029
7197
|
if (taskId) {
|
|
7030
7198
|
conditions.push(drizzleOrm.eq(ledgerArtifacts.taskId, taskId));
|
|
7031
7199
|
}
|
|
7200
|
+
if (toolCallId) {
|
|
7201
|
+
conditions.push(drizzleOrm.eq(ledgerArtifacts.toolCallId, toolCallId));
|
|
7202
|
+
}
|
|
7032
7203
|
const query = db.select().from(ledgerArtifacts).where(conditions.length > 1 ? drizzleOrm.and(...conditions) : conditions[0]);
|
|
7033
7204
|
const results = await query;
|
|
7034
7205
|
return results.map(
|
|
@@ -7036,6 +7207,8 @@ var getLedgerArtifacts = (db) => async (params) => {
|
|
|
7036
7207
|
artifactId: row.id,
|
|
7037
7208
|
type: row.type ?? "source",
|
|
7038
7209
|
taskId: row.taskId ?? void 0,
|
|
7210
|
+
toolCallId: row.toolCallId ?? void 0,
|
|
7211
|
+
// Added for traceability to the specific tool execution
|
|
7039
7212
|
name: row.name ?? void 0,
|
|
7040
7213
|
description: row.description ?? void 0,
|
|
7041
7214
|
parts: row.parts ?? [],
|
|
@@ -10800,6 +10973,7 @@ exports.ledgerArtifactsContextIdIdx = ledgerArtifactsContextIdIdx;
|
|
|
10800
10973
|
exports.ledgerArtifactsRelations = ledgerArtifactsRelations;
|
|
10801
10974
|
exports.ledgerArtifactsTaskContextNameUnique = ledgerArtifactsTaskContextNameUnique;
|
|
10802
10975
|
exports.ledgerArtifactsTaskIdIdx = ledgerArtifactsTaskIdIdx;
|
|
10976
|
+
exports.ledgerArtifactsToolCallIdIdx = ledgerArtifactsToolCallIdIdx;
|
|
10803
10977
|
exports.listAgentGraphs = listAgentGraphs;
|
|
10804
10978
|
exports.listAgentGraphsPaginated = listAgentGraphsPaginated;
|
|
10805
10979
|
exports.listAgentRelations = listAgentRelations;
|
|
@@ -10880,6 +11054,7 @@ exports.upsertContextConfig = upsertContextConfig;
|
|
|
10880
11054
|
exports.upsertCredentialReference = upsertCredentialReference;
|
|
10881
11055
|
exports.upsertDataComponent = upsertDataComponent;
|
|
10882
11056
|
exports.upsertExternalAgent = upsertExternalAgent;
|
|
11057
|
+
exports.upsertLedgerArtifact = upsertLedgerArtifact;
|
|
10883
11058
|
exports.upsertTool = upsertTool;
|
|
10884
11059
|
exports.validateAgainstJsonSchema = validateAgainstJsonSchema;
|
|
10885
11060
|
exports.validateAgentRelationships = validateAgentRelationships;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { k as CredentialReferenceApiInsert, l as ContextConfigSelect, e as ContextFetchDefinition, M as MCPTransportType, m as MCPToolConfig, n as GraphScopeConfig, C as ConversationHistoryConfig, o as ProjectScopeConfig, p as PaginationConfig, q as AgentGraphInsert, r as AgentGraphUpdate, s as FullGraphDefinition, t as AgentScopeConfig, u as AgentRelationInsert, E as ExternalAgentRelationInsert, v as AgentRelationUpdate, w as AgentToolRelationUpdate, f as ToolMcpConfig, g as ToolServerCapabilities, x as AgentInsert, y as AgentUpdate, z as AgentSelect, B as ApiKeySelect, D as ApiKeyInsert, H as ApiKeyUpdate, I as CreateApiKeyParams, J as ApiKeyCreateResult, K as ArtifactComponentSelect, L as ArtifactComponentInsert, N as ArtifactComponentUpdate, O as ContextCacheSelect, Q as ContextCacheInsert, R as ContextConfigInsert, U as ContextConfigUpdate, V as ConversationSelect, W as ConversationInsert, h as ConversationMetadata, X as ConversationUpdate, Y as CredentialReferenceSelect, Z as ToolSelect, _ as CredentialReferenceInsert, $ as CredentialReferenceUpdate, a0 as DataComponentSelect, a1 as DataComponentInsert, a2 as DataComponentUpdate, a3 as ExternalAgentInsert, a4 as ExternalAgentSelect, a5 as ExternalAgentUpdate, a6 as Artifact, a7 as LedgerArtifactSelect, j as MessageMetadata, i as MessageContent, a8 as MessageVisibility, a9 as MessageInsert, aa as MessageUpdate, ab as FullProjectDefinition, ac as ProjectInfo, ad as ProjectSelect, ae as PaginationResult, af as ProjectResourceCounts, ag as ProjectInsert, ah as ProjectUpdate, ai as TaskInsert, T as TaskMetadataConfig, aj as TaskSelect, ak as McpTool, al as ToolInsert, am as ToolUpdate, d as CredentialStoreType, an as ExecutionContext } from './utility-
|
|
3
|
-
export { a$ as A2AError, bv as A2ARequest, bw as A2AResponse, aA as APIKeySecurityScheme, bA as AgentApiInsert, ds as AgentApiInsertSchema, bz as AgentApiSelect, dr as AgentApiSelectSchema, bB as AgentApiUpdate, dt as AgentApiUpdateSchema, ct as AgentArtifactComponentApiInsert, eD as AgentArtifactComponentApiInsertSchema, cs as AgentArtifactComponentApiSelect, eC as AgentArtifactComponentApiSelectSchema, cu as AgentArtifactComponentApiUpdate, eE as AgentArtifactComponentApiUpdateSchema, cq as AgentArtifactComponentInsert, eA as AgentArtifactComponentInsertSchema, cp as AgentArtifactComponentSelect, ez as AgentArtifactComponentSelectSchema, cr as AgentArtifactComponentUpdate, eB as AgentArtifactComponentUpdateSchema, aw as AgentCapabilities, aK as AgentCard, d6 as AgentConversationHistoryConfig, ck as AgentDataComponentApiInsert, er as AgentDataComponentApiInsertSchema, cj as AgentDataComponentApiSelect, eq as AgentDataComponentApiSelectSchema, cl as AgentDataComponentApiUpdate, es as AgentDataComponentApiUpdateSchema, ch as AgentDataComponentInsert, eo as AgentDataComponentInsertSchema, cg as AgentDataComponentSelect, en as AgentDataComponentSelectSchema, ci as AgentDataComponentUpdate, ep as AgentDataComponentUpdateSchema, cS as AgentDefinition, bK as AgentGraphApiInsert, dH as AgentGraphApiInsertSchema, bJ as AgentGraphApiSelect, dG as AgentGraphApiSelectSchema, bL as AgentGraphApiUpdate, dI as AgentGraphApiUpdateSchema, dE as AgentGraphInsertSchema, bI as AgentGraphSelect, dD as AgentGraphSelectSchema, dF as AgentGraphUpdateSchema, dp as AgentInsertSchema, ax as AgentProvider, bE as AgentRelationApiInsert, dy as AgentRelationApiInsertSchema, bD as AgentRelationApiSelect, dx as AgentRelationApiSelectSchema, bF as AgentRelationApiUpdate, dz as AgentRelationApiUpdateSchema, dv as AgentRelationInsertSchema, bG as AgentRelationQuery, dA as AgentRelationQuerySchema, bC as AgentRelationSelect, du as AgentRelationSelectSchema, dw as AgentRelationUpdateSchema, dn as AgentSelectSchema, ay as AgentSkill, c as AgentStopWhen, A as AgentStopWhenSchema, cI as AgentToolRelationApiInsert, ff as AgentToolRelationApiInsertSchema, cH as AgentToolRelationApiSelect, fe as AgentToolRelationApiSelectSchema, cJ as AgentToolRelationApiUpdate, fg as AgentToolRelationApiUpdateSchema, cG as AgentToolRelationInsert, fc as AgentToolRelationInsertSchema, cF as AgentToolRelationSelect, fb as AgentToolRelationSelectSchema, fd as AgentToolRelationUpdateSchema, dq as AgentUpdateSchema, eL as AllAgentSchema, cy as AllAgentSelect, cC as ApiKeyApiCreationResponse, eQ as ApiKeyApiCreationResponseSchema, cA as ApiKeyApiInsert, eR as ApiKeyApiInsertSchema, cz as ApiKeyApiSelect, eP as ApiKeyApiSelectSchema, cB as ApiKeyApiUpdate, eS as ApiKeyApiUpdateSchema, eN as ApiKeyInsertSchema, eM as ApiKeySelectSchema, eO as ApiKeyUpdateSchema, cn as ArtifactComponentApiInsert, ex as ArtifactComponentApiInsertSchema, cm as ArtifactComponentApiSelect, ew as ArtifactComponentApiSelectSchema, co as ArtifactComponentApiUpdate, ey as ArtifactComponentApiUpdateSchema, eu as ArtifactComponentInsertSchema, et as ArtifactComponentSelectSchema, ev as ArtifactComponentUpdateSchema, aD as AuthorizationCodeOAuthFlow, cQ as CanUseItem, fp as CanUseItemSchema, bf as CancelTaskRequest, bq as CancelTaskResponse, bp as CancelTaskSuccessResponse, aE as ClientCredentialsOAuthFlow, aZ as ContentTypeNotSupportedError, cb as ContextCacheApiInsert, ee as ContextCacheApiInsertSchema, ca as ContextCacheApiSelect, ed as ContextCacheApiSelectSchema, cc as ContextCacheApiUpdate, ef as ContextCacheApiUpdateSchema, d7 as ContextCacheEntry, eb as ContextCacheInsertSchema, ea as ContextCacheSelectSchema, c9 as ContextCacheUpdate, ec as ContextCacheUpdateSchema, c5 as ContextConfigApiInsert, f9 as ContextConfigApiInsertSchema, c4 as ContextConfigApiSelect, f8 as ContextConfigApiSelectSchema, c6 as ContextConfigApiUpdate, fa as ContextConfigApiUpdateSchema, f6 as ContextConfigInsertSchema, f5 as ContextConfigSelectSchema, f7 as ContextConfigUpdateSchema, b_ as ConversationApiInsert, e2 as ConversationApiInsertSchema, bZ as ConversationApiSelect, e1 as ConversationApiSelectSchema, b$ as ConversationApiUpdate, e3 as ConversationApiUpdateSchema, d$ as ConversationInsertSchema, d5 as ConversationScopeOptions, d_ as ConversationSelectSchema, e0 as ConversationUpdateSchema, eX as CredentialReferenceApiInsertSchema, cD as CredentialReferenceApiSelect, eW as CredentialReferenceApiSelectSchema, cE as CredentialReferenceApiUpdate, eY as CredentialReferenceApiUpdateSchema, eU as CredentialReferenceInsertSchema, eT as CredentialReferenceSelectSchema, eV as CredentialReferenceUpdateSchema, ce as DataComponentApiInsert, el as DataComponentApiInsertSchema, cd as DataComponentApiSelect, ek as DataComponentApiSelectSchema, cf as DataComponentApiUpdate, em as DataComponentApiUpdateSchema, ei as DataComponentBaseSchema, eh as DataComponentInsertSchema, eg as DataComponentSelectSchema, ej as DataComponentUpdateSchema, au as DataPart, fv as ErrorResponseSchema, fw as ExistsResponseSchema, cw as ExternalAgentApiInsert, eJ as ExternalAgentApiInsertSchema, cv as ExternalAgentApiSelect, eI as ExternalAgentApiSelectSchema, cx as ExternalAgentApiUpdate, eK as ExternalAgentApiUpdateSchema, eG as ExternalAgentInsertSchema, bH as ExternalAgentRelationApiInsert, dC as ExternalAgentRelationApiInsertSchema, dB as ExternalAgentRelationInsertSchema, eF as ExternalAgentSelectSchema, eH as ExternalAgentUpdateSchema, c8 as FetchConfig, f3 as FetchConfigSchema, c7 as FetchDefinition, f4 as FetchDefinitionSchema, aq as FileBase, at as FilePart, ar as FileWithBytes, as as FileWithUri, cP as FullGraphAgentInsert, F as FullGraphAgentInsertSchema, fq as FullGraphDefinitionSchema, fE as FullProjectDefinitionSchema, bh as GetTaskPushNotificationConfigRequest, bu as GetTaskPushNotificationConfigResponse, bt as GetTaskPushNotificationConfigSuccessResponse, be as GetTaskRequest, bo as GetTaskResponse, bn as GetTaskSuccessResponse, b as GraphStopWhen, G as GraphStopWhenSchema, fr as GraphWithinContextOfProjectSchema, aB as HTTPAuthSecurityScheme, fF as HeadersScopeSchema, fM as IdParamsSchema, aF as ImplicitOAuthFlow, cR as InternalAgentDefinition, aU as InternalError, a_ as InvalidAgentResponseError, aT as InvalidParamsError, aR as InvalidRequestError, aQ as JSONParseError, b9 as JSONRPCError, bb as JSONRPCErrorResponse, b7 as JSONRPCMessage, b8 as JSONRPCRequest, ba as JSONRPCResult, cN as LedgerArtifactApiInsert, fl as LedgerArtifactApiInsertSchema, cM as LedgerArtifactApiSelect, fk as LedgerArtifactApiSelectSchema, cO as LedgerArtifactApiUpdate, fm as LedgerArtifactApiUpdateSchema, cK as LedgerArtifactInsert, fi as LedgerArtifactInsertSchema, fh as LedgerArtifactSelectSchema, cL as LedgerArtifactUpdate, fj as LedgerArtifactUpdateSchema, ft as ListResponseSchema, dh as MAX_ID_LENGTH, df as MCPServerType, e_ as MCPToolConfigSchema, dg as MIN_ID_LENGTH, d8 as McpAuthType, d9 as McpServerAuth, db as McpServerCapabilities, dc as McpToolDefinition, dX as McpToolDefinitionSchema, eZ as McpToolSchema, da as McpTransportConfig, dV as McpTransportConfigSchema, aL as Message, c2 as MessageApiInsert, e8 as MessageApiInsertSchema, c1 as MessageApiSelect, e7 as MessageApiSelectSchema, c3 as MessageApiUpdate, e9 as MessageApiUpdateSchema, e5 as MessageInsertSchema, c$ as MessageMode, bx as MessagePart, c_ as MessageRole, c0 as MessageSelect, e4 as MessageSelectSchema, b5 as MessageSendConfiguration, b6 as MessageSendParams, cZ as MessageType, e6 as MessageUpdateSchema, aS as MethodNotFoundError, dl as ModelSchema, d2 as ModelSettings, dk as ModelSettingsSchema, d0 as Models, aH as OAuth2SecurityScheme, aC as OAuthFlows, aI as OpenIdConnectSecurityScheme, cX as Pagination, fN as PaginationQueryParamsSchema, fs as PaginationSchema, P as Part, ao as PartBase, aG as PasswordOAuthFlow, cV as ProjectApiInsert, fC as ProjectApiInsertSchema, cU as ProjectApiSelect, fB as ProjectApiSelectSchema, cW as ProjectApiUpdate, fD as ProjectApiUpdateSchema, fz as ProjectInsertSchema, dm as ProjectModelSchema, d1 as ProjectModels, fy as ProjectSelectSchema, fA as ProjectUpdateSchema, b0 as PushNotificationAuthenticationInfo, b1 as PushNotificationConfig, aX as PushNotificationNotSupportedError, fx as RemovedResponseSchema, aJ as SecurityScheme, az as SecuritySchemeBase, bc as SendMessageRequest, bk as SendMessageResponse, bj as SendMessageSuccessResponse, bd as SendStreamingMessageRequest, bm as SendStreamingMessageResponse, bl as SendStreamingMessageSuccessResponse, bg as SetTaskPushNotificationConfigRequest, bs as SetTaskPushNotificationConfigResponse, br as SetTaskPushNotificationConfigSuccessResponse, fu as SingleResponseSchema, d4 as StatusComponent, fn as StatusComponentSchema, fo as StatusUpdateSchema, d3 as StatusUpdateSettings, a as StopWhen, S as StopWhenSchema, cY as SummaryEvent, dd as TOOL_STATUS_VALUES, aN as Task, bO as TaskApiInsert, dN as TaskApiInsertSchema, bN as TaskApiSelect, dM as TaskApiSelectSchema, bP as TaskApiUpdate, dO as TaskApiUpdateSchema, by as TaskArtifact, aP as TaskArtifactUpdateEvent, b3 as TaskIdParams, dK as TaskInsertSchema, aW as TaskNotCancelableError, aV as TaskNotFoundError, b2 as TaskPushNotificationConfig, b4 as TaskQueryParams, bU as TaskRelationApiInsert, dT as TaskRelationApiInsertSchema, bT as TaskRelationApiSelect, dS as TaskRelationApiSelectSchema, bV as TaskRelationApiUpdate, dU as TaskRelationApiUpdateSchema, bR as TaskRelationInsert, dQ as TaskRelationInsertSchema, bQ as TaskRelationSelect, dP as TaskRelationSelectSchema, bS as TaskRelationUpdate, dR as TaskRelationUpdateSchema, bi as TaskResubscriptionRequest, dJ as TaskSelectSchema, av as TaskState, aM as TaskStatus, aO as TaskStatusUpdateEvent, bM as TaskUpdate, dL as TaskUpdateSchema, fL as TenantIdParamsSchema, fG as TenantParamsSchema, fJ as TenantProjectGraphIdParamsSchema, fI as TenantProjectGraphParamsSchema, fK as TenantProjectIdParamsSchema, fH as TenantProjectParamsSchema, ap as TextPart, bX as ToolApiInsert, f1 as ToolApiInsertSchema, bW as ToolApiSelect, f0 as ToolApiSelectSchema, bY as ToolApiUpdate, f2 as ToolApiUpdateSchema, cT as ToolDefinition, dZ as ToolInsertSchema, dY as ToolSelectSchema, dW as ToolStatusSchema, e$ as ToolUpdateSchema, di as URL_SAFE_ID_PATTERN, aY as UnsupportedOperationError, de as VALID_RELATION_TYPES, dj as resourceIdSchema } from './utility-CT2pq49U.cjs';
|
|
2
|
+
import { k as CredentialReferenceApiInsert, l as ContextConfigSelect, e as ContextFetchDefinition, M as MCPTransportType, m as MCPToolConfig, n as GraphScopeConfig, C as ConversationHistoryConfig, o as ProjectScopeConfig, p as PaginationConfig, q as AgentGraphInsert, r as AgentGraphUpdate, s as FullGraphDefinition, t as AgentScopeConfig, u as AgentRelationInsert, E as ExternalAgentRelationInsert, v as AgentRelationUpdate, w as AgentToolRelationUpdate, f as ToolMcpConfig, g as ToolServerCapabilities, x as AgentInsert, y as AgentUpdate, z as AgentSelect, B as ApiKeySelect, D as ApiKeyInsert, H as ApiKeyUpdate, I as CreateApiKeyParams, J as ApiKeyCreateResult, K as ArtifactComponentSelect, L as ArtifactComponentInsert, N as ArtifactComponentUpdate, O as ContextCacheSelect, Q as ContextCacheInsert, R as ContextConfigInsert, U as ContextConfigUpdate, V as ConversationSelect, W as ConversationInsert, h as ConversationMetadata, X as ConversationUpdate, Y as CredentialReferenceSelect, Z as ToolSelect, _ as CredentialReferenceInsert, $ as CredentialReferenceUpdate, a0 as DataComponentSelect, a1 as DataComponentInsert, a2 as DataComponentUpdate, a3 as ExternalAgentInsert, a4 as ExternalAgentSelect, a5 as ExternalAgentUpdate, a6 as Artifact, a7 as LedgerArtifactSelect, j as MessageMetadata, i as MessageContent, a8 as MessageVisibility, a9 as MessageInsert, aa as MessageUpdate, ab as FullProjectDefinition, ac as ProjectInfo, ad as ProjectSelect, ae as PaginationResult, af as ProjectResourceCounts, ag as ProjectInsert, ah as ProjectUpdate, ai as TaskInsert, T as TaskMetadataConfig, aj as TaskSelect, ak as McpTool, al as ToolInsert, am as ToolUpdate, d as CredentialStoreType, an as ExecutionContext } from './utility-C3eMTvpr.cjs';
|
|
3
|
+
export { a$ as A2AError, bv as A2ARequest, bw as A2AResponse, aA as APIKeySecurityScheme, bA as AgentApiInsert, ds as AgentApiInsertSchema, bz as AgentApiSelect, dr as AgentApiSelectSchema, bB as AgentApiUpdate, dt as AgentApiUpdateSchema, ct as AgentArtifactComponentApiInsert, eD as AgentArtifactComponentApiInsertSchema, cs as AgentArtifactComponentApiSelect, eC as AgentArtifactComponentApiSelectSchema, cu as AgentArtifactComponentApiUpdate, eE as AgentArtifactComponentApiUpdateSchema, cq as AgentArtifactComponentInsert, eA as AgentArtifactComponentInsertSchema, cp as AgentArtifactComponentSelect, ez as AgentArtifactComponentSelectSchema, cr as AgentArtifactComponentUpdate, eB as AgentArtifactComponentUpdateSchema, aw as AgentCapabilities, aK as AgentCard, d6 as AgentConversationHistoryConfig, ck as AgentDataComponentApiInsert, er as AgentDataComponentApiInsertSchema, cj as AgentDataComponentApiSelect, eq as AgentDataComponentApiSelectSchema, cl as AgentDataComponentApiUpdate, es as AgentDataComponentApiUpdateSchema, ch as AgentDataComponentInsert, eo as AgentDataComponentInsertSchema, cg as AgentDataComponentSelect, en as AgentDataComponentSelectSchema, ci as AgentDataComponentUpdate, ep as AgentDataComponentUpdateSchema, cS as AgentDefinition, bK as AgentGraphApiInsert, dH as AgentGraphApiInsertSchema, bJ as AgentGraphApiSelect, dG as AgentGraphApiSelectSchema, bL as AgentGraphApiUpdate, dI as AgentGraphApiUpdateSchema, dE as AgentGraphInsertSchema, bI as AgentGraphSelect, dD as AgentGraphSelectSchema, dF as AgentGraphUpdateSchema, dp as AgentInsertSchema, ax as AgentProvider, bE as AgentRelationApiInsert, dy as AgentRelationApiInsertSchema, bD as AgentRelationApiSelect, dx as AgentRelationApiSelectSchema, bF as AgentRelationApiUpdate, dz as AgentRelationApiUpdateSchema, dv as AgentRelationInsertSchema, bG as AgentRelationQuery, dA as AgentRelationQuerySchema, bC as AgentRelationSelect, du as AgentRelationSelectSchema, dw as AgentRelationUpdateSchema, dn as AgentSelectSchema, ay as AgentSkill, c as AgentStopWhen, A as AgentStopWhenSchema, cI as AgentToolRelationApiInsert, ff as AgentToolRelationApiInsertSchema, cH as AgentToolRelationApiSelect, fe as AgentToolRelationApiSelectSchema, cJ as AgentToolRelationApiUpdate, fg as AgentToolRelationApiUpdateSchema, cG as AgentToolRelationInsert, fc as AgentToolRelationInsertSchema, cF as AgentToolRelationSelect, fb as AgentToolRelationSelectSchema, fd as AgentToolRelationUpdateSchema, dq as AgentUpdateSchema, eL as AllAgentSchema, cy as AllAgentSelect, cC as ApiKeyApiCreationResponse, eQ as ApiKeyApiCreationResponseSchema, cA as ApiKeyApiInsert, eR as ApiKeyApiInsertSchema, cz as ApiKeyApiSelect, eP as ApiKeyApiSelectSchema, cB as ApiKeyApiUpdate, eS as ApiKeyApiUpdateSchema, eN as ApiKeyInsertSchema, eM as ApiKeySelectSchema, eO as ApiKeyUpdateSchema, cn as ArtifactComponentApiInsert, ex as ArtifactComponentApiInsertSchema, cm as ArtifactComponentApiSelect, ew as ArtifactComponentApiSelectSchema, co as ArtifactComponentApiUpdate, ey as ArtifactComponentApiUpdateSchema, eu as ArtifactComponentInsertSchema, et as ArtifactComponentSelectSchema, ev as ArtifactComponentUpdateSchema, aD as AuthorizationCodeOAuthFlow, cQ as CanUseItem, fp as CanUseItemSchema, bf as CancelTaskRequest, bq as CancelTaskResponse, bp as CancelTaskSuccessResponse, aE as ClientCredentialsOAuthFlow, aZ as ContentTypeNotSupportedError, cb as ContextCacheApiInsert, ee as ContextCacheApiInsertSchema, ca as ContextCacheApiSelect, ed as ContextCacheApiSelectSchema, cc as ContextCacheApiUpdate, ef as ContextCacheApiUpdateSchema, d7 as ContextCacheEntry, eb as ContextCacheInsertSchema, ea as ContextCacheSelectSchema, c9 as ContextCacheUpdate, ec as ContextCacheUpdateSchema, c5 as ContextConfigApiInsert, f9 as ContextConfigApiInsertSchema, c4 as ContextConfigApiSelect, f8 as ContextConfigApiSelectSchema, c6 as ContextConfigApiUpdate, fa as ContextConfigApiUpdateSchema, f6 as ContextConfigInsertSchema, f5 as ContextConfigSelectSchema, f7 as ContextConfigUpdateSchema, b_ as ConversationApiInsert, e2 as ConversationApiInsertSchema, bZ as ConversationApiSelect, e1 as ConversationApiSelectSchema, b$ as ConversationApiUpdate, e3 as ConversationApiUpdateSchema, d$ as ConversationInsertSchema, d5 as ConversationScopeOptions, d_ as ConversationSelectSchema, e0 as ConversationUpdateSchema, eX as CredentialReferenceApiInsertSchema, cD as CredentialReferenceApiSelect, eW as CredentialReferenceApiSelectSchema, cE as CredentialReferenceApiUpdate, eY as CredentialReferenceApiUpdateSchema, eU as CredentialReferenceInsertSchema, eT as CredentialReferenceSelectSchema, eV as CredentialReferenceUpdateSchema, ce as DataComponentApiInsert, el as DataComponentApiInsertSchema, cd as DataComponentApiSelect, ek as DataComponentApiSelectSchema, cf as DataComponentApiUpdate, em as DataComponentApiUpdateSchema, ei as DataComponentBaseSchema, eh as DataComponentInsertSchema, eg as DataComponentSelectSchema, ej as DataComponentUpdateSchema, au as DataPart, fv as ErrorResponseSchema, fw as ExistsResponseSchema, cw as ExternalAgentApiInsert, eJ as ExternalAgentApiInsertSchema, cv as ExternalAgentApiSelect, eI as ExternalAgentApiSelectSchema, cx as ExternalAgentApiUpdate, eK as ExternalAgentApiUpdateSchema, eG as ExternalAgentInsertSchema, bH as ExternalAgentRelationApiInsert, dC as ExternalAgentRelationApiInsertSchema, dB as ExternalAgentRelationInsertSchema, eF as ExternalAgentSelectSchema, eH as ExternalAgentUpdateSchema, c8 as FetchConfig, f3 as FetchConfigSchema, c7 as FetchDefinition, f4 as FetchDefinitionSchema, aq as FileBase, at as FilePart, ar as FileWithBytes, as as FileWithUri, cP as FullGraphAgentInsert, F as FullGraphAgentInsertSchema, fq as FullGraphDefinitionSchema, fE as FullProjectDefinitionSchema, bh as GetTaskPushNotificationConfigRequest, bu as GetTaskPushNotificationConfigResponse, bt as GetTaskPushNotificationConfigSuccessResponse, be as GetTaskRequest, bo as GetTaskResponse, bn as GetTaskSuccessResponse, b as GraphStopWhen, G as GraphStopWhenSchema, fr as GraphWithinContextOfProjectSchema, aB as HTTPAuthSecurityScheme, fF as HeadersScopeSchema, fM as IdParamsSchema, aF as ImplicitOAuthFlow, cR as InternalAgentDefinition, aU as InternalError, a_ as InvalidAgentResponseError, aT as InvalidParamsError, aR as InvalidRequestError, aQ as JSONParseError, b9 as JSONRPCError, bb as JSONRPCErrorResponse, b7 as JSONRPCMessage, b8 as JSONRPCRequest, ba as JSONRPCResult, cN as LedgerArtifactApiInsert, fl as LedgerArtifactApiInsertSchema, cM as LedgerArtifactApiSelect, fk as LedgerArtifactApiSelectSchema, cO as LedgerArtifactApiUpdate, fm as LedgerArtifactApiUpdateSchema, cK as LedgerArtifactInsert, fi as LedgerArtifactInsertSchema, fh as LedgerArtifactSelectSchema, cL as LedgerArtifactUpdate, fj as LedgerArtifactUpdateSchema, ft as ListResponseSchema, dh as MAX_ID_LENGTH, df as MCPServerType, e_ as MCPToolConfigSchema, dg as MIN_ID_LENGTH, d8 as McpAuthType, d9 as McpServerAuth, db as McpServerCapabilities, dc as McpToolDefinition, dX as McpToolDefinitionSchema, eZ as McpToolSchema, da as McpTransportConfig, dV as McpTransportConfigSchema, aL as Message, c2 as MessageApiInsert, e8 as MessageApiInsertSchema, c1 as MessageApiSelect, e7 as MessageApiSelectSchema, c3 as MessageApiUpdate, e9 as MessageApiUpdateSchema, e5 as MessageInsertSchema, c$ as MessageMode, bx as MessagePart, c_ as MessageRole, c0 as MessageSelect, e4 as MessageSelectSchema, b5 as MessageSendConfiguration, b6 as MessageSendParams, cZ as MessageType, e6 as MessageUpdateSchema, aS as MethodNotFoundError, dl as ModelSchema, d2 as ModelSettings, dk as ModelSettingsSchema, d0 as Models, aH as OAuth2SecurityScheme, aC as OAuthFlows, aI as OpenIdConnectSecurityScheme, cX as Pagination, fN as PaginationQueryParamsSchema, fs as PaginationSchema, P as Part, ao as PartBase, aG as PasswordOAuthFlow, cV as ProjectApiInsert, fC as ProjectApiInsertSchema, cU as ProjectApiSelect, fB as ProjectApiSelectSchema, cW as ProjectApiUpdate, fD as ProjectApiUpdateSchema, fz as ProjectInsertSchema, dm as ProjectModelSchema, d1 as ProjectModels, fy as ProjectSelectSchema, fA as ProjectUpdateSchema, b0 as PushNotificationAuthenticationInfo, b1 as PushNotificationConfig, aX as PushNotificationNotSupportedError, fx as RemovedResponseSchema, aJ as SecurityScheme, az as SecuritySchemeBase, bc as SendMessageRequest, bk as SendMessageResponse, bj as SendMessageSuccessResponse, bd as SendStreamingMessageRequest, bm as SendStreamingMessageResponse, bl as SendStreamingMessageSuccessResponse, bg as SetTaskPushNotificationConfigRequest, bs as SetTaskPushNotificationConfigResponse, br as SetTaskPushNotificationConfigSuccessResponse, fu as SingleResponseSchema, d4 as StatusComponent, fn as StatusComponentSchema, fo as StatusUpdateSchema, d3 as StatusUpdateSettings, a as StopWhen, S as StopWhenSchema, cY as SummaryEvent, dd as TOOL_STATUS_VALUES, aN as Task, bO as TaskApiInsert, dN as TaskApiInsertSchema, bN as TaskApiSelect, dM as TaskApiSelectSchema, bP as TaskApiUpdate, dO as TaskApiUpdateSchema, by as TaskArtifact, aP as TaskArtifactUpdateEvent, b3 as TaskIdParams, dK as TaskInsertSchema, aW as TaskNotCancelableError, aV as TaskNotFoundError, b2 as TaskPushNotificationConfig, b4 as TaskQueryParams, bU as TaskRelationApiInsert, dT as TaskRelationApiInsertSchema, bT as TaskRelationApiSelect, dS as TaskRelationApiSelectSchema, bV as TaskRelationApiUpdate, dU as TaskRelationApiUpdateSchema, bR as TaskRelationInsert, dQ as TaskRelationInsertSchema, bQ as TaskRelationSelect, dP as TaskRelationSelectSchema, bS as TaskRelationUpdate, dR as TaskRelationUpdateSchema, bi as TaskResubscriptionRequest, dJ as TaskSelectSchema, av as TaskState, aM as TaskStatus, aO as TaskStatusUpdateEvent, bM as TaskUpdate, dL as TaskUpdateSchema, fL as TenantIdParamsSchema, fG as TenantParamsSchema, fJ as TenantProjectGraphIdParamsSchema, fI as TenantProjectGraphParamsSchema, fK as TenantProjectIdParamsSchema, fH as TenantProjectParamsSchema, ap as TextPart, bX as ToolApiInsert, f1 as ToolApiInsertSchema, bW as ToolApiSelect, f0 as ToolApiSelectSchema, bY as ToolApiUpdate, f2 as ToolApiUpdateSchema, cT as ToolDefinition, dZ as ToolInsertSchema, dY as ToolSelectSchema, dW as ToolStatusSchema, e$ as ToolUpdateSchema, di as URL_SAFE_ID_PATTERN, aY as UnsupportedOperationError, de as VALID_RELATION_TYPES, dj as resourceIdSchema } from './utility-C3eMTvpr.cjs';
|
|
4
4
|
import { CredentialStore } from './types/index.cjs';
|
|
5
5
|
export { CorsConfig, ServerConfig, ServerOptions } from './types/index.cjs';
|
|
6
6
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
|
7
|
-
import { s as schema } from './schema-
|
|
8
|
-
export { k as agentArtifactComponents,
|
|
7
|
+
import { s as schema } from './schema-DwiRB4zS.cjs';
|
|
8
|
+
export { k as agentArtifactComponents, O as agentArtifactComponentsRelations, i as agentDataComponents, Q as agentDataComponentsRelations, a as agentGraph, F as agentGraphRelations, e as agentRelations, S as agentRelationsRelations, m as agentToolRelations, I as agentToolRelationsRelations, d as agents, E as agentsRelations, r as apiKeys, H as apiKeysRelations, j as artifactComponents, N as artifactComponentsRelations, b as contextCache, D as contextCacheRelations, c as contextConfigs, C as contextConfigsRelations, n as conversations, L as conversationsRelations, u as credentialReferences, J as credentialReferencesRelations, h as dataComponents, P as dataComponentsRelations, f as externalAgents, G as externalAgentsRelations, q as ledgerArtifacts, x as ledgerArtifactsContextIdIdx, R as ledgerArtifactsRelations, y as ledgerArtifactsTaskContextNameUnique, v as ledgerArtifactsTaskIdIdx, w as ledgerArtifactsToolCallIdIdx, o as messages, M as messagesRelations, p as projects, A as projectsRelations, g as taskRelations, B as taskRelationsRelations, t as tasks, z as tasksRelations, l as tools, K as toolsRelations } from './schema-DwiRB4zS.cjs';
|
|
9
9
|
import { LoggerOptions, TransportSingleOptions, Logger } from 'pino';
|
|
10
10
|
import { SSEClientTransportOptions } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
11
11
|
import { StreamableHTTPClientTransportOptions } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
@@ -2656,6 +2656,19 @@ declare const deleteFullGraph: (db: DatabaseClient, logger?: GraphLogger) => (pa
|
|
|
2656
2656
|
scopes: GraphScopeConfig;
|
|
2657
2657
|
}) => Promise<boolean>;
|
|
2658
2658
|
|
|
2659
|
+
/**
|
|
2660
|
+
* Atomic upsert operation for a single artifact - prevents race conditions
|
|
2661
|
+
*/
|
|
2662
|
+
declare const upsertLedgerArtifact: (db: DatabaseClient) => (params: {
|
|
2663
|
+
scopes: ProjectScopeConfig;
|
|
2664
|
+
contextId: string;
|
|
2665
|
+
taskId: string;
|
|
2666
|
+
toolCallId?: string | null;
|
|
2667
|
+
artifact: Artifact;
|
|
2668
|
+
}) => Promise<{
|
|
2669
|
+
created: boolean;
|
|
2670
|
+
existing?: any;
|
|
2671
|
+
}>;
|
|
2659
2672
|
/**
|
|
2660
2673
|
* Save one or more artifacts to the ledger
|
|
2661
2674
|
*/
|
|
@@ -2663,15 +2676,17 @@ declare const addLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
|
2663
2676
|
scopes: ProjectScopeConfig;
|
|
2664
2677
|
contextId: string;
|
|
2665
2678
|
taskId?: string | null;
|
|
2679
|
+
toolCallId?: string | null;
|
|
2666
2680
|
artifacts: Artifact[];
|
|
2667
2681
|
}) => Promise<void>;
|
|
2668
2682
|
/**
|
|
2669
|
-
* Retrieve artifacts by taskId and/or artifactId.
|
|
2670
|
-
* At least one of taskId or artifactId must be provided.
|
|
2683
|
+
* Retrieve artifacts by taskId, toolCallId, and/or artifactId.
|
|
2684
|
+
* At least one of taskId, toolCallId, or artifactId must be provided.
|
|
2671
2685
|
*/
|
|
2672
2686
|
declare const getLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
2673
2687
|
scopes: ProjectScopeConfig;
|
|
2674
2688
|
taskId?: string;
|
|
2689
|
+
toolCallId?: string;
|
|
2675
2690
|
artifactId?: string;
|
|
2676
2691
|
}) => Promise<Artifact[]>;
|
|
2677
2692
|
/**
|
|
@@ -3890,4 +3905,4 @@ declare function setSpanWithError(span: Span, error: unknown, logger?: {
|
|
|
3890
3905
|
*/
|
|
3891
3906
|
declare function getTracer(serviceName: string, serviceVersion?: string): Tracer;
|
|
3892
3907
|
|
|
3893
|
-
export { AgentGraphInsert, AgentGraphUpdate, AgentInsert, AgentRelationInsert, AgentRelationUpdate, AgentScopeConfig, AgentSelect, AgentToolRelationUpdate, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentRelationInsert, ExternalAgentSelect, ExternalAgentUpdate, type FetchResult, FullGraphDefinition, FullProjectDefinition, type GraphLogger, GraphScopeConfig, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addLedgerArtifacts, addToolToAgent, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentGraph, createAgentRelation, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullGraphServerSide, createFullProjectServerSide, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentGraph, deleteAgentRelation, deleteAgentRelationsByGraph, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullGraph, deleteFullProject, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, getActiveAgentForConversation, getAgentById, getAgentGraphById, getAgentGraphWithDefaultAgent, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByGraph, getAgentRelationsBySource, getAgentRelationsByTarget, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentsByIds, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getContextConfigById, getContextConfigCacheEntries, getContextConfigsByName, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithTools, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentRelations, getFullGraph, getFullGraphDefinition, getFullProject, getGraphAgentInfos, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForGraph, getRequestExecutionContext, getTask, getToolById, getToolsForAgent, getTracer, getVisibleMessages, graphHasArtifactComponents, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, invalidateInvocationDefinitionsCache, invalidateRequestContextCache, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isValidHttpRequest, listAgentGraphs, listAgentGraphsPaginated, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listMessages, listProjects, listProjectsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, requestContextSchema, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentGraph, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullGraphServerSide, updateFullProjectServerSide, updateMessage, updateProject, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertAgentGraph, upsertAgentRelation, upsertAgentToolRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateExternalAgent, validateHttpRequestHeaders, validateInternalAgent, validateProjectExists, validateRequestContext, validationHelper, withProjectValidation };
|
|
3908
|
+
export { AgentGraphInsert, AgentGraphUpdate, AgentInsert, AgentRelationInsert, AgentRelationUpdate, AgentScopeConfig, AgentSelect, AgentToolRelationUpdate, AgentUpdate, ApiKeyCreateResult, type ApiKeyGenerationResult, ApiKeyInsert, ApiKeySelect, ApiKeyUpdate, Artifact, ArtifactComponentInsert, ArtifactComponentSelect, ArtifactComponentUpdate, type CommonCreateErrorResponses, type CommonDeleteErrorResponses, type CommonGetErrorResponses, type CommonUpdateErrorResponses, ContextCache, ContextCacheInsert, ContextCacheSelect, ContextConfigBuilder, type ContextConfigBuilderOptions, ContextConfigInsert, ContextConfigSelect, ContextConfigUpdate, ContextFetchDefinition, ContextFetcher, type ContextResolutionOptions, type ContextResolutionResult, ContextResolver, type ContextResolverInterface, type ContextValidationError, type ContextValidationResult, ConversationHistoryConfig, ConversationInsert, ConversationMetadata, ConversationSelect, ConversationUpdate, CreateApiKeyParams, type CredentialContext, type CredentialData, CredentialReferenceApiInsert, CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, type CredentialReferenceWithTools, type CredentialResolverInput, CredentialStore, type CredentialStoreReference, CredentialStoreRegistry, CredentialStoreType, CredentialStuffer, DataComponentInsert, DataComponentSelect, DataComponentUpdate, type DatabaseClient, type DatabaseConfig, type DotPaths, ERROR_DOCS_BASE_URL, ErrorCode, type ErrorCodes, type ErrorResponse, ExecutionContext, ExternalAgentInsert, ExternalAgentRelationInsert, ExternalAgentSelect, ExternalAgentUpdate, type FetchResult, FullGraphDefinition, FullProjectDefinition, type GraphLogger, GraphScopeConfig, HTTP_REQUEST_PARTS, type HttpRequestPart, InMemoryCredentialStore, KeyChainStore, LedgerArtifactSelect, type LoggerFactoryConfig, MCPToolConfig, MCPTransportType, McpClient, type McpClientOptions, type McpSSEConfig, type McpServerConfig, type McpStreamableHttpConfig, McpTool, MessageContent, MessageInsert, MessageMetadata, MessageUpdate, MessageVisibility, NangoCredentialStore, type OAuthConfig, PaginationConfig, PaginationResult, type ParsedHttpRequest, PinoLogger, type PinoLoggerConfig, type ProblemDetails, ProjectInfo, ProjectInsert, type ProjectLogger, ProjectResourceCounts, ProjectScopeConfig, ProjectSelect, ProjectUpdate, type ResolvedContext, TaskInsert, TaskMetadataConfig, TaskSelect, type TemplateContext, TemplateEngine, type TemplateRenderOptions, ToolInsert, ToolMcpConfig, ToolSelect, ToolServerCapabilities, ToolUpdate, addLedgerArtifacts, addToolToAgent, associateArtifactComponentWithAgent, associateDataComponentWithAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, contextConfig, contextValidationMiddleware, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, createAgent, createAgentGraph, createAgentRelation, createAgentToolRelation, createApiError, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDatabaseClient, createDefaultCredentialStores, createExecutionContext, createExternalAgent, createExternalAgentRelation, createFullGraphServerSide, createFullProjectServerSide, createInMemoryDatabaseClient, createKeyChainStore, createMessage, createNangoCredentialStore, createOrGetConversation, createProject, createTask, createTool, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentGraph, deleteAgentRelation, deleteAgentRelationsByGraph, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteExternalAgent, deleteFullGraph, deleteFullProject, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteTool, detectAuthenticationRequired, determineContextTrigger, discoverOAuthEndpoints, errorResponseSchema, errorSchemaFactory, externalAgentExists, externalAgentUrlExists, extractPublicId, fetchComponentRelationships, fetchDefinition, generateAndCreateApiKey, generateApiKey, getActiveAgentForConversation, getAgentById, getAgentGraphById, getAgentGraphWithDefaultAgent, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByGraph, getAgentRelationsBySource, getAgentRelationsByTarget, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentsByIds, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getCachedValidator, getContextConfigById, getContextConfigCacheEntries, getContextConfigsByName, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithTools, getCredentialStoreLookupKeyFromRetrievalParams, getDataComponent, getDataComponentsForAgent, getExternalAgent, getExternalAgentByUrl, getExternalAgentRelations, getFullGraph, getFullGraphDefinition, getFullProject, getGraphAgentInfos, getLedgerArtifacts, getLedgerArtifactsByContext, getLogger, getMessageById, getMessagesByConversation, getMessagesByTask, getProject, getProjectResourceCounts, getRelatedAgentsForGraph, getRequestExecutionContext, getTask, getToolById, getToolsForAgent, getTracer, getVisibleMessages, graphHasArtifactComponents, handleApiError, handleContextConfigChange, handleContextResolution, hasApiKey, hasContextConfig, hasCredentialReference, hashApiKey, invalidateInvocationDefinitionsCache, invalidateRequestContextCache, isApiKeyExpired, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isValidHttpRequest, listAgentGraphs, listAgentGraphsPaginated, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listExternalAgents, listExternalAgentsPaginated, listMessages, listProjects, listProjectsPaginated, listTaskIdsByContextId, listTools, loadEnvironmentFiles, loggerFactory, maskApiKey, problemDetailsSchema, projectExists, projectExistsInTable, projectHasResources, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeToolFromAgent, requestContextSchema, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setSpanWithError, updateAgent, updateAgentGraph, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveAgent, updateCredentialReference, updateDataComponent, updateExternalAgent, updateFullGraphServerSide, updateFullProjectServerSide, updateMessage, updateProject, updateTask, updateTool, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertAgentGraph, upsertAgentRelation, upsertAgentToolRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertLedgerArtifact, upsertTool, validateAgainstJsonSchema, validateAndGetApiKey, validateApiKey, validateExternalAgent, validateHttpRequestHeaders, validateInternalAgent, validateProjectExists, validateRequestContext, validationHelper, withProjectValidation };
|