@inkeep/agents-core 0.0.0-dev-20260119163620 → 0.0.0-dev-20260120175022

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.
@@ -846,25 +846,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
846
846
  ac: better_auth_plugins20.AccessControl;
847
847
  roles: {
848
848
  member: {
849
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
850
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
849
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
850
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
851
851
  connector: "OR" | "AND";
852
852
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
853
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
853
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
854
854
  };
855
855
  admin: {
856
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
857
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
856
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
857
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
858
858
  connector: "OR" | "AND";
859
859
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
860
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
860
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
861
861
  };
862
862
  owner: {
863
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
864
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
863
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
864
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
865
865
  connector: "OR" | "AND";
866
866
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
867
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
867
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
868
868
  };
869
869
  };
870
870
  membershipLimit: number;
@@ -1038,7 +1038,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1038
1038
  id: string;
1039
1039
  organizationId: string;
1040
1040
  email: string;
1041
- role: "member" | "owner" | "admin";
1041
+ role: "member" | "admin" | "owner";
1042
1042
  status: better_auth_plugins20.InvitationStatus;
1043
1043
  inviterId: string;
1044
1044
  expiresAt: Date;
@@ -1047,7 +1047,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1047
1047
  Member: {
1048
1048
  id: string;
1049
1049
  organizationId: string;
1050
- role: "member" | "owner" | "admin";
1050
+ role: "member" | "admin" | "owner";
1051
1051
  createdAt: Date;
1052
1052
  userId: string;
1053
1053
  user: {
@@ -1063,7 +1063,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1063
1063
  members: {
1064
1064
  id: string;
1065
1065
  organizationId: string;
1066
- role: "member" | "owner" | "admin";
1066
+ role: "member" | "admin" | "owner";
1067
1067
  createdAt: Date;
1068
1068
  userId: string;
1069
1069
  user: {
@@ -1077,7 +1077,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1077
1077
  id: string;
1078
1078
  organizationId: string;
1079
1079
  email: string;
1080
- role: "member" | "owner" | "admin";
1080
+ role: "member" | "admin" | "owner";
1081
1081
  status: better_auth_plugins20.InvitationStatus;
1082
1082
  inviterId: string;
1083
1083
  expiresAt: Date;
@@ -1155,25 +1155,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1155
1155
  ac: better_auth_plugins20.AccessControl;
1156
1156
  roles: {
1157
1157
  member: {
1158
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1159
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1158
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1159
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1160
1160
  connector: "OR" | "AND";
1161
1161
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1162
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1162
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1163
1163
  };
1164
1164
  admin: {
1165
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1166
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1165
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1166
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1167
1167
  connector: "OR" | "AND";
1168
1168
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1169
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1169
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1170
1170
  };
1171
1171
  owner: {
1172
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1173
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1172
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key] | {
1173
+ actions: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>[key];
1174
1174
  connector: "OR" | "AND";
1175
1175
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1176
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1176
+ statements: better_auth_plugins20.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins20.Statements>;
1177
1177
  };
1178
1178
  };
1179
1179
  membershipLimit: number;
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
5
5
  //#region src/auth/permissions.d.ts
6
6
  declare const ac: AccessControl;
7
7
  declare const memberRole: {
8
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
9
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
8
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
9
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
10
10
  connector: "OR" | "AND";
11
11
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
12
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
12
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
16
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
15
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
16
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
17
17
  connector: "OR" | "AND";
18
18
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
19
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
19
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
23
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
22
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key] | {
23
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>[key];
24
24
  connector: "OR" | "AND";
25
25
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
26
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
26
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins0.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -6,6 +6,7 @@ import "./types/index.js";
6
6
  import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
7
7
  import { detectAuthenticationRequired } from "./utils/auth-detection.js";
8
8
  import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
9
+ import "./index.js";
9
10
  import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettings, ModelSettingsSchema, StopWhen, StopWhenSchema, SubAgentStopWhen, SubAgentStopWhenSchema } from "./validation/schemas.js";
10
11
  import { z } from "@hono/zod-openapi";
11
12
 
@@ -1,9 +1,9 @@
1
- import { projects, subAgentToolRelations, subAgents } from "../../db/manage/manage-schema.js";
1
+ import { projects, subAgentFunctionToolRelations, subAgentToolRelations, subAgents } from "../../db/manage/manage-schema.js";
2
2
  import { generateId } from "../../utils/conversations.js";
3
3
  import { validateAgentStructure, validateAndTypeAgentData } from "../../validation/agentFull.js";
4
4
  import { upsertContextConfig } from "./contextConfigs.js";
5
5
  import { upsertFunction } from "./functions.js";
6
- import { upsertFunctionTool, upsertSubAgentFunctionToolRelation } from "./functionTools.js";
6
+ import { deleteFunctionTool, listFunctionTools, upsertFunctionTool, upsertSubAgentFunctionToolRelation } from "./functionTools.js";
7
7
  import { deleteSubAgentExternalAgentRelation, getSubAgentExternalAgentRelationsByAgent, upsertSubAgentExternalAgentRelation } from "./subAgentExternalAgentRelations.js";
8
8
  import { createSubAgentRelation, deleteAgentRelationsByAgent, deleteAgentToolRelationByAgent, upsertSubAgentRelation } from "./subAgentRelations.js";
9
9
  import { deleteSubAgent, listSubAgents, upsertSubAgent } from "./subAgents.js";
@@ -735,6 +735,37 @@ const updateFullAgentServerSide = (db, logger = defaultLogger) => async (scopes,
735
735
  functionToolCount: Object.keys(typedAgentDefinition.functionTools).length
736
736
  }, "All function tools updated successfully");
737
737
  }
738
+ const incomingFunctionToolIds = new Set(typedAgentDefinition.functionTools ? Object.keys(typedAgentDefinition.functionTools) : []);
739
+ const existingFunctionTools = await listFunctionTools(db)({
740
+ scopes: {
741
+ tenantId,
742
+ projectId,
743
+ agentId: finalAgentId
744
+ },
745
+ pagination: {
746
+ page: 1,
747
+ limit: 1e3
748
+ }
749
+ });
750
+ let deletedFunctionToolCount = 0;
751
+ for (const functionTool of existingFunctionTools.data) if (!incomingFunctionToolIds.has(functionTool.id)) try {
752
+ await deleteFunctionTool(db)({
753
+ scopes: {
754
+ tenantId,
755
+ projectId,
756
+ agentId: finalAgentId
757
+ },
758
+ functionToolId: functionTool.id
759
+ });
760
+ deletedFunctionToolCount++;
761
+ logger.info({ functionToolId: functionTool.id }, "Deleted orphaned function tool");
762
+ } catch (error) {
763
+ logger.error({
764
+ functionToolId: functionTool.id,
765
+ error
766
+ }, "Failed to delete orphaned function tool");
767
+ }
768
+ if (deletedFunctionToolCount > 0) logger.info({ deletedFunctionToolCount }, "Deleted orphaned function tools from agent");
738
769
  const subAgentPromises = Object.entries(typedAgentDefinition.subAgents).map(async ([subAgentId, agentData$1]) => {
739
770
  const subAgent = agentData$1;
740
771
  let existingSubAgent = null;
@@ -910,6 +941,24 @@ const updateFullAgentServerSide = (db, logger = defaultLogger) => async (scopes,
910
941
  error
911
942
  }, "Failed to delete orphaned agent-tool relations");
912
943
  }
944
+ const incomingFunctionToolRelationIds = /* @__PURE__ */ new Set();
945
+ for (const [_subAgentId, agentData$1] of Object.entries(typedAgentDefinition.subAgents)) if (agentData$1.canUse && Array.isArray(agentData$1.canUse)) {
946
+ for (const canUseItem of agentData$1.canUse) if (typedAgentDefinition.functionTools && canUseItem.toolId in typedAgentDefinition.functionTools && canUseItem.agentToolRelationId) incomingFunctionToolRelationIds.add(canUseItem.agentToolRelationId);
947
+ }
948
+ for (const subAgentId of Object.keys(typedAgentDefinition.subAgents)) try {
949
+ let deletedFunctionToolRelationCount = 0;
950
+ if (incomingFunctionToolRelationIds.size === 0) deletedFunctionToolRelationCount = (await db.delete(subAgentFunctionToolRelations).where(and(eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, finalAgentId), eq(subAgentFunctionToolRelations.subAgentId, subAgentId))).returning()).length;
951
+ else deletedFunctionToolRelationCount = (await db.delete(subAgentFunctionToolRelations).where(and(eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, finalAgentId), eq(subAgentFunctionToolRelations.subAgentId, subAgentId), not(inArray(subAgentFunctionToolRelations.id, Array.from(incomingFunctionToolRelationIds))))).returning()).length;
952
+ if (deletedFunctionToolRelationCount > 0) logger.info({
953
+ subAgentId,
954
+ deletedCount: deletedFunctionToolRelationCount
955
+ }, "Deleted orphaned sub-agent-function tool relations");
956
+ } catch (error) {
957
+ logger.error({
958
+ subAgentId,
959
+ error
960
+ }, "Failed to delete orphaned sub-agent-function tool relations");
961
+ }
913
962
  const subAgentToolPromises = [];
914
963
  for (const [subAgentId, agentData$1] of Object.entries(typedAgentDefinition.subAgents)) if (agentData$1.canUse && Array.isArray(agentData$1.canUse)) for (const canUseItem of agentData$1.canUse) subAgentToolPromises.push((async () => {
915
964
  try {
@@ -8,14 +8,13 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
12
  name: string;
15
13
  description: string | null;
16
- prompt: string | null;
17
14
  createdAt: string;
18
15
  updatedAt: string;
16
+ projectId: string;
17
+ tenantId: string;
19
18
  models: {
20
19
  base?: {
21
20
  model?: string | undefined;
@@ -33,6 +32,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
33
32
  stopWhen: {
34
33
  transferCountIs?: number | undefined;
35
34
  } | null;
35
+ prompt: string | null;
36
36
  defaultSubAgentId: string | null;
37
37
  contextConfigId: string | null;
38
38
  statusUpdates: {
@@ -54,14 +54,13 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
54
54
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
- tenantId: string;
58
- projectId: string;
59
57
  id: string;
60
58
  name: string;
61
59
  description: string | null;
62
- prompt: string | null;
63
60
  createdAt: string;
64
61
  updatedAt: string;
62
+ projectId: string;
63
+ tenantId: string;
65
64
  models: {
66
65
  base?: {
67
66
  model?: string | undefined;
@@ -79,6 +78,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
79
78
  stopWhen: {
80
79
  transferCountIs?: number | undefined;
81
80
  } | null;
81
+ prompt: string | null;
82
82
  defaultSubAgentId: string | null;
83
83
  contextConfigId: string | null;
84
84
  statusUpdates: {
@@ -97,15 +97,13 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
97
97
  }[] | undefined;
98
98
  } | null;
99
99
  defaultSubAgent: {
100
- tenantId: string;
101
- projectId: string;
102
100
  id: string;
103
101
  name: string;
104
102
  description: string | null;
105
- prompt: string | null;
106
- agentId: string;
107
103
  createdAt: string;
108
104
  updatedAt: string;
105
+ projectId: string;
106
+ tenantId: string;
109
107
  models: {
110
108
  base?: {
111
109
  model?: string | undefined;
@@ -123,20 +121,21 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
123
121
  stopWhen: {
124
122
  stepCountIs?: number | undefined;
125
123
  } | null;
124
+ prompt: string | null;
125
+ agentId: string;
126
126
  conversationHistoryConfig: ConversationHistoryConfig | null;
127
127
  } | null;
128
128
  } | null>;
129
129
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
- tenantId: string;
133
- projectId: string;
134
132
  id: string;
135
133
  name: string;
136
134
  description: string | null;
137
- prompt: string | null;
138
135
  createdAt: string;
139
136
  updatedAt: string;
137
+ projectId: string;
138
+ tenantId: string;
140
139
  models: {
141
140
  base?: {
142
141
  model?: string | undefined;
@@ -154,6 +153,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
154
153
  stopWhen: {
155
154
  transferCountIs?: number | undefined;
156
155
  } | null;
156
+ prompt: string | null;
157
157
  defaultSubAgentId: string | null;
158
158
  contextConfigId: string | null;
159
159
  statusUpdates: {
@@ -228,14 +228,13 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
228
228
  };
229
229
  }>;
230
230
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
231
- tenantId: string;
232
- projectId: string;
233
231
  id: string;
234
232
  name: string;
235
233
  description: string | null;
236
- prompt: string | null;
237
234
  createdAt: string;
238
235
  updatedAt: string;
236
+ projectId: string;
237
+ tenantId: string;
239
238
  models: {
240
239
  base?: {
241
240
  model?: string | undefined;
@@ -253,6 +252,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
253
252
  stopWhen: {
254
253
  transferCountIs?: number | undefined;
255
254
  } | null;
255
+ prompt: string | null;
256
256
  defaultSubAgentId: string | null;
257
257
  contextConfigId: string | null;
258
258
  statusUpdates: {
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- tenantId: string;
11
- projectId: string;
12
10
  id: string;
13
11
  name: string;
14
12
  description: string | null;
15
13
  createdAt: string;
16
14
  updatedAt: string;
15
+ projectId: string;
16
+ tenantId: string;
17
17
  props: Record<string, unknown> | null;
18
18
  render: {
19
19
  component: string;
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
49
49
  };
50
50
  }>;
51
51
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
52
- tenantId: string;
53
- projectId: string;
54
52
  id: string;
55
53
  name: string;
56
54
  description: string | null;
57
55
  createdAt: string;
58
56
  updatedAt: string;
57
+ projectId: string;
58
+ tenantId: string;
59
59
  props: Record<string, unknown> | null;
60
60
  render: {
61
61
  component: string;
@@ -104,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
104
104
  scopes: SubAgentScopeConfig;
105
105
  artifactComponentId: string;
106
106
  }) => Promise<{
107
- tenantId: string;
108
- projectId: string;
109
107
  id: string;
110
- agentId: string;
111
108
  createdAt: string;
109
+ projectId: string;
110
+ tenantId: string;
111
+ agentId: string;
112
112
  subAgentId: string;
113
113
  artifactComponentId: string;
114
114
  }>;
@@ -147,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
147
147
  scopes: SubAgentScopeConfig;
148
148
  artifactComponentId: string;
149
149
  }) => Promise<{
150
- tenantId: string;
151
- projectId: string;
152
150
  id: string;
153
- agentId: string;
154
151
  createdAt: string;
152
+ projectId: string;
153
+ tenantId: string;
154
+ agentId: string;
155
155
  subAgentId: string;
156
156
  artifactComponentId: string;
157
157
  } | null>;
@@ -8,24 +8,24 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ projectId: string;
15
+ tenantId: string;
16
+ agentId: string;
17
17
  headersSchema: unknown;
18
18
  contextVariables: Record<string, ContextFetchDefinition> | null;
19
19
  } | undefined>;
20
20
  declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
21
21
  scopes: AgentScopeConfig;
22
22
  }) => Promise<{
23
- tenantId: string;
24
- projectId: string;
25
23
  id: string;
26
- agentId: string;
27
24
  createdAt: string;
28
25
  updatedAt: string;
26
+ projectId: string;
27
+ tenantId: string;
28
+ agentId: string;
29
29
  headersSchema: unknown;
30
30
  contextVariables: Record<string, ContextFetchDefinition> | null;
31
31
  }[]>;
@@ -42,12 +42,12 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
42
42
  };
43
43
  }>;
44
44
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
45
- tenantId: string;
46
- projectId: string;
47
45
  id: string;
48
- agentId: string;
49
46
  createdAt: string;
50
47
  updatedAt: string;
48
+ projectId: string;
49
+ tenantId: string;
50
+ agentId: string;
51
51
  headersSchema: unknown;
52
52
  contextVariables: Record<string, ContextFetchDefinition> | null;
53
53
  }>;
@@ -82,12 +82,12 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
82
82
  declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
83
83
  data: ContextConfigInsert;
84
84
  }) => Promise<{
85
- tenantId: string;
86
- projectId: string;
87
85
  id: string;
88
- agentId: string;
89
86
  createdAt: string;
90
87
  updatedAt: string;
88
+ projectId: string;
89
+ tenantId: string;
90
+ agentId: string;
91
91
  headersSchema: unknown;
92
92
  contextVariables: Record<string, ContextFetchDefinition> | null;
93
93
  }>;
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
64
64
  scopes: SubAgentScopeConfig;
65
65
  dataComponentId: string;
66
66
  }) => Promise<{
67
- tenantId: string;
68
- projectId: string;
69
67
  id: string;
70
- agentId: string;
71
68
  createdAt: string;
69
+ projectId: string;
70
+ tenantId: string;
71
+ agentId: string;
72
72
  subAgentId: string;
73
73
  dataComponentId: string;
74
74
  }>;
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
106
106
  scopes: SubAgentScopeConfig;
107
107
  dataComponentId: string;
108
108
  }) => Promise<{
109
- tenantId: string;
110
- projectId: string;
111
109
  id: string;
112
- agentId: string;
113
110
  createdAt: string;
111
+ projectId: string;
112
+ tenantId: string;
113
+ agentId: string;
114
114
  subAgentId: string;
115
115
  dataComponentId: string;
116
116
  } | null>;
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- tenantId: string;
57
- projectId: string;
58
56
  id: string;
59
57
  name: string;
60
58
  description: string | null;
61
- agentId: string;
62
59
  createdAt: string;
63
60
  updatedAt: string;
61
+ projectId: string;
62
+ tenantId: string;
63
+ agentId: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- tenantId: string;
99
- projectId: string;
100
98
  id: string;
101
99
  name: string;
102
100
  description: string | null;
103
- agentId: string;
104
101
  createdAt: string;
105
102
  updatedAt: string;
103
+ projectId: string;
104
+ tenantId: string;
105
+ agentId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -150,12 +150,12 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
150
150
  subAgentId: string;
151
151
  functionToolId: string;
152
152
  }) => Promise<{
153
- tenantId: string;
154
- projectId: string;
155
153
  id: string;
156
- agentId: string;
157
154
  createdAt: string;
158
155
  updatedAt: string;
156
+ projectId: string;
157
+ tenantId: string;
158
+ agentId: string;
159
159
  subAgentId: string;
160
160
  functionToolId: string;
161
161
  }>;
@@ -206,12 +206,12 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
206
206
  subAgentId: string;
207
207
  functionToolId: string;
208
208
  }) => Promise<{
209
- tenantId: string;
210
- projectId: string;
211
209
  id: string;
212
- agentId: string;
213
210
  createdAt: string;
214
211
  updatedAt: string;
212
+ projectId: string;
213
+ tenantId: string;
214
+ agentId: string;
215
215
  subAgentId: string;
216
216
  functionToolId: string;
217
217
  }>;