@inkeep/agents-core 0.65.1 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/_virtual/rolldown_runtime.js +25 -1
  2. package/dist/auth/permissions.d.ts +9 -9
  3. package/dist/constants/index.d.ts +14 -0
  4. package/dist/constants/index.js +15 -0
  5. package/dist/constants/relation-types.d.ts +5 -0
  6. package/dist/constants/relation-types.js +6 -0
  7. package/dist/constants/session-events.d.ts +13 -0
  8. package/dist/constants/session-events.js +14 -0
  9. package/dist/constants/tool-names.d.ts +7 -0
  10. package/dist/constants/tool-names.js +8 -0
  11. package/dist/constants/workflow.d.ts +7 -0
  12. package/dist/constants/workflow.js +8 -0
  13. package/dist/data-access/index.d.ts +3 -3
  14. package/dist/data-access/manage/agentFull.d.ts +7 -10
  15. package/dist/data-access/manage/agentFull.js +26 -28
  16. package/dist/data-access/manage/agents.d.ts +47 -47
  17. package/dist/data-access/manage/artifactComponents.d.ts +10 -10
  18. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  19. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  20. package/dist/data-access/manage/dataComponents.js +1 -1
  21. package/dist/data-access/manage/functionTools.d.ts +16 -16
  22. package/dist/data-access/manage/projectFull.d.ts +6 -8
  23. package/dist/data-access/manage/projectFull.js +18 -18
  24. package/dist/data-access/manage/skills.d.ts +12 -12
  25. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  26. package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
  27. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  28. package/dist/data-access/manage/subAgents.d.ts +21 -21
  29. package/dist/data-access/manage/tools.d.ts +24 -24
  30. package/dist/data-access/manage/triggers.d.ts +4 -4
  31. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  32. package/dist/data-access/runtime/apps.d.ts +10 -10
  33. package/dist/data-access/runtime/conversations.d.ts +24 -24
  34. package/dist/data-access/runtime/feedback.d.ts +4 -4
  35. package/dist/data-access/runtime/messages.d.ts +12 -12
  36. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
  37. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  38. package/dist/data-access/runtime/tasks.d.ts +5 -5
  39. package/dist/db/manage/dolt-safe-jsonb.d.ts +2 -2
  40. package/dist/db/manage/manage-client.js +15 -3
  41. package/dist/db/manage/manage-schema.d.ts +358 -358
  42. package/dist/db/runtime/runtime-client.js +7 -1
  43. package/dist/db/runtime/runtime-schema.d.ts +373 -373
  44. package/dist/dolt/merge.js +7 -9
  45. package/dist/dolt/ref-middleware.js +2 -2
  46. package/dist/dolt/ref-scope.js +9 -3
  47. package/dist/index.d.ts +9 -5
  48. package/dist/index.js +7 -3
  49. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
  50. package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +1356 -0
  51. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +1119 -0
  52. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +982 -0
  53. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.js +4 -0
  54. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/utils.js +3 -0
  55. package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +1821 -0
  56. package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +171 -0
  57. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +124 -0
  58. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +1334 -0
  59. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +105 -0
  60. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +118 -0
  61. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +455 -0
  62. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +168 -0
  63. package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3087 -0
  64. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +384 -0
  65. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
  66. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
  67. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
  68. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
  69. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
  70. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
  71. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
  72. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
  73. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
  74. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
  75. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
  76. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
  77. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
  78. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
  79. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
  80. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
  81. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +25 -0
  82. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +8 -0
  83. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
  84. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +939 -0
  85. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
  86. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +51 -0
  87. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +81 -0
  88. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +9 -0
  89. package/dist/node_modules/.pnpm/tinyspy@4.0.4/node_modules/tinyspy/dist/index.js +125 -0
  90. package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +8 -0
  91. package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
  92. package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +48 -0
  93. package/dist/node_modules/.pnpm/vitest@3.2.4_@edge-runtime_vm@3.2.0_@types_debug@4.1.12_@types_node@20.19.27_jiti@2.6.1_93023d256ff9ed909ae8f0d436c922a0/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +2613 -0
  94. package/dist/test-utils/index.d.ts +2 -0
  95. package/dist/test-utils/index.js +3 -0
  96. package/dist/test-utils/mocks/index.d.ts +2 -0
  97. package/dist/test-utils/mocks/index.js +3 -0
  98. package/dist/test-utils/mocks/logger.d.ts +27 -0
  99. package/dist/test-utils/mocks/logger.js +48 -0
  100. package/dist/utils/error.d.ts +58 -52
  101. package/dist/utils/error.js +63 -21
  102. package/dist/utils/index.d.ts +3 -3
  103. package/dist/utils/index.js +3 -3
  104. package/dist/utils/jwt-helpers.js +1 -1
  105. package/dist/utils/logger.d.ts +21 -2
  106. package/dist/utils/logger.js +67 -11
  107. package/dist/utils/third-party-mcp-servers/composio-client.js +10 -10
  108. package/dist/utils/tracer-factory.js +1 -1
  109. package/dist/validation/schemas/skills.d.ts +45 -45
  110. package/dist/validation/schemas.d.ts +2289 -2289
  111. package/drizzle/runtime/meta/_journal.json +2 -2
  112. package/package.json +5 -1
@@ -10,11 +10,15 @@ import { PgColumn } from "drizzle-orm/pg-core";
10
10
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
11
11
  scopes: AgentScopeConfig;
12
12
  }) => Promise<{
13
- description: string | null;
14
13
  id: string;
15
- tenantId: string;
16
- createdAt: string;
17
14
  name: string;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ description: string | null;
18
+ projectId: string;
19
+ tenantId: string;
20
+ defaultSubAgentId: string | null;
21
+ contextConfigId: string | null;
18
22
  models: {
19
23
  base?: {
20
24
  model?: string | undefined;
@@ -35,13 +39,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
35
39
  allowedProviders?: string[] | undefined;
36
40
  } | undefined;
37
41
  } | null;
38
- stopWhen: {
39
- transferCountIs?: number | undefined;
40
- } | null;
41
- updatedAt: string;
42
- projectId: string;
43
- defaultSubAgentId: string | null;
44
- contextConfigId: string | null;
45
42
  prompt: string | null;
46
43
  statusUpdates: {
47
44
  enabled?: boolean | undefined;
@@ -58,16 +55,23 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
58
55
  } | undefined;
59
56
  }[] | undefined;
60
57
  } | null;
58
+ stopWhen: {
59
+ transferCountIs?: number | undefined;
60
+ } | null;
61
61
  executionMode: "classic" | "durable";
62
62
  } | null>;
63
63
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
64
64
  scopes: AgentScopeConfig;
65
65
  }) => Promise<{
66
- description: string | null;
67
66
  id: string;
68
- tenantId: string;
69
- createdAt: string;
70
67
  name: string;
68
+ createdAt: string;
69
+ updatedAt: string;
70
+ description: string | null;
71
+ projectId: string;
72
+ tenantId: string;
73
+ defaultSubAgentId: string | null;
74
+ contextConfigId: string | null;
71
75
  models: {
72
76
  base?: {
73
77
  model?: string | undefined;
@@ -88,13 +92,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
88
92
  allowedProviders?: string[] | undefined;
89
93
  } | undefined;
90
94
  } | null;
91
- stopWhen: {
92
- transferCountIs?: number | undefined;
93
- } | null;
94
- updatedAt: string;
95
- projectId: string;
96
- defaultSubAgentId: string | null;
97
- contextConfigId: string | null;
98
95
  prompt: string | null;
99
96
  statusUpdates: {
100
97
  enabled?: boolean | undefined;
@@ -111,13 +108,19 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
111
108
  } | undefined;
112
109
  }[] | undefined;
113
110
  } | null;
111
+ stopWhen: {
112
+ transferCountIs?: number | undefined;
113
+ } | null;
114
114
  executionMode: "classic" | "durable";
115
115
  defaultSubAgent: {
116
- description: string | null;
117
116
  id: string;
118
- tenantId: string;
119
- createdAt: string;
120
117
  name: string;
118
+ createdAt: string;
119
+ updatedAt: string;
120
+ description: string | null;
121
+ agentId: string;
122
+ projectId: string;
123
+ tenantId: string;
121
124
  models: {
122
125
  base?: {
123
126
  model?: string | undefined;
@@ -138,24 +141,25 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
138
141
  allowedProviders?: string[] | undefined;
139
142
  } | undefined;
140
143
  } | null;
144
+ prompt: string | null;
141
145
  stopWhen: {
142
146
  stepCountIs?: number | undefined;
143
147
  } | null;
144
- updatedAt: string;
145
- projectId: string;
146
- prompt: string | null;
147
- agentId: string;
148
148
  conversationHistoryConfig: ConversationHistoryConfig | null;
149
149
  } | null;
150
150
  } | null>;
151
151
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
152
152
  scopes: ProjectScopeConfig;
153
153
  }) => Promise<{
154
- description: string | null;
155
154
  id: string;
156
- tenantId: string;
157
- createdAt: string;
158
155
  name: string;
156
+ createdAt: string;
157
+ updatedAt: string;
158
+ description: string | null;
159
+ projectId: string;
160
+ tenantId: string;
161
+ defaultSubAgentId: string | null;
162
+ contextConfigId: string | null;
159
163
  models: {
160
164
  base?: {
161
165
  model?: string | undefined;
@@ -176,13 +180,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
176
180
  allowedProviders?: string[] | undefined;
177
181
  } | undefined;
178
182
  } | null;
179
- stopWhen: {
180
- transferCountIs?: number | undefined;
181
- } | null;
182
- updatedAt: string;
183
- projectId: string;
184
- defaultSubAgentId: string | null;
185
- contextConfigId: string | null;
186
183
  prompt: string | null;
187
184
  statusUpdates: {
188
185
  enabled?: boolean | undefined;
@@ -199,6 +196,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
199
196
  } | undefined;
200
197
  }[] | undefined;
201
198
  } | null;
199
+ stopWhen: {
200
+ transferCountIs?: number | undefined;
201
+ } | null;
202
202
  executionMode: "classic" | "durable";
203
203
  }[]>;
204
204
  declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -281,11 +281,15 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
281
281
  projectIds: string[];
282
282
  }): Promise<AvailableAgentInfo[]>;
283
283
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
284
- description: string | null;
285
284
  id: string;
286
- tenantId: string;
287
- createdAt: string;
288
285
  name: string;
286
+ createdAt: string;
287
+ updatedAt: string;
288
+ description: string | null;
289
+ projectId: string;
290
+ tenantId: string;
291
+ defaultSubAgentId: string | null;
292
+ contextConfigId: string | null;
289
293
  models: {
290
294
  base?: {
291
295
  model?: string | undefined;
@@ -306,13 +310,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
306
310
  allowedProviders?: string[] | undefined;
307
311
  } | undefined;
308
312
  } | null;
309
- stopWhen: {
310
- transferCountIs?: number | undefined;
311
- } | null;
312
- updatedAt: string;
313
- projectId: string;
314
- defaultSubAgentId: string | null;
315
- contextConfigId: string | null;
316
313
  prompt: string | null;
317
314
  statusUpdates: {
318
315
  enabled?: boolean | undefined;
@@ -329,6 +326,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
329
326
  } | undefined;
330
327
  }[] | undefined;
331
328
  } | null;
329
+ stopWhen: {
330
+ transferCountIs?: number | undefined;
331
+ } | null;
332
332
  executionMode: "classic" | "durable";
333
333
  }>;
334
334
  declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -9,13 +9,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
9
9
  scopes: ProjectScopeConfig;
10
10
  id: string;
11
11
  }) => Promise<{
12
- description: string | null;
13
12
  id: string;
14
- tenantId: string;
15
- createdAt: string;
16
13
  name: string;
14
+ createdAt: string;
17
15
  updatedAt: string;
16
+ description: string | null;
18
17
  projectId: string;
18
+ tenantId: string;
19
19
  props: {
20
20
  [x: string]: unknown;
21
21
  type: "object";
@@ -65,13 +65,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
65
65
  };
66
66
  }>;
67
67
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
68
- description: string | null;
69
68
  id: string;
70
- tenantId: string;
71
- createdAt: string;
72
69
  name: string;
70
+ createdAt: string;
73
71
  updatedAt: string;
72
+ description: string | null;
74
73
  projectId: string;
74
+ tenantId: string;
75
75
  props: {
76
76
  [x: string]: unknown;
77
77
  type: "object";
@@ -142,10 +142,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
142
142
  artifactComponentId: string;
143
143
  }) => Promise<{
144
144
  id: string;
145
- tenantId: string;
146
145
  createdAt: string;
147
- projectId: string;
148
146
  agentId: string;
147
+ projectId: string;
148
+ tenantId: string;
149
149
  subAgentId: string;
150
150
  artifactComponentId: string;
151
151
  }>;
@@ -185,10 +185,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
185
185
  artifactComponentId: string;
186
186
  }) => Promise<{
187
187
  id: string;
188
- tenantId: string;
189
188
  createdAt: string;
190
- projectId: string;
191
189
  agentId: string;
190
+ projectId: string;
191
+ tenantId: string;
192
192
  subAgentId: string;
193
193
  artifactComponentId: string;
194
194
  } | null>;
@@ -10,25 +10,25 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
10
10
  id: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- tenantId: string;
14
13
  createdAt: string;
15
14
  updatedAt: string;
16
- projectId: string;
17
- agentId: string;
18
15
  headersSchema: unknown;
19
16
  contextVariables: Record<string, ContextFetchDefinition> | null;
17
+ agentId: string;
18
+ projectId: string;
19
+ tenantId: string;
20
20
  } | undefined>;
21
21
  declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: AgentScopeConfig;
23
23
  }) => Promise<{
24
24
  id: string;
25
- tenantId: string;
26
25
  createdAt: string;
27
26
  updatedAt: string;
28
- projectId: string;
29
- agentId: string;
30
27
  headersSchema: unknown;
31
28
  contextVariables: Record<string, ContextFetchDefinition> | null;
29
+ agentId: string;
30
+ projectId: string;
31
+ tenantId: string;
32
32
  }[]>;
33
33
  declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
34
34
  scopes: AgentScopeConfig;
@@ -44,13 +44,13 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
44
44
  }>;
45
45
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
46
46
  id: string;
47
- tenantId: string;
48
47
  createdAt: string;
49
48
  updatedAt: string;
50
- projectId: string;
51
- agentId: string;
52
49
  headersSchema: unknown;
53
50
  contextVariables: Record<string, ContextFetchDefinition> | null;
51
+ agentId: string;
52
+ projectId: string;
53
+ tenantId: string;
54
54
  }>;
55
55
  declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
56
56
  scopes: AgentScopeConfig;
@@ -84,13 +84,13 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
84
84
  data: ContextConfigInsert;
85
85
  }) => Promise<{
86
86
  id: string;
87
- tenantId: string;
88
87
  createdAt: string;
89
88
  updatedAt: string;
90
- projectId: string;
91
- agentId: string;
92
89
  headersSchema: unknown;
93
90
  contextVariables: Record<string, ContextFetchDefinition> | null;
91
+ agentId: string;
92
+ projectId: string;
93
+ tenantId: string;
94
94
  }>;
95
95
  //#endregion
96
96
  export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
@@ -66,10 +66,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
66
66
  dataComponentId: string;
67
67
  }) => Promise<{
68
68
  id: string;
69
- tenantId: string;
70
69
  createdAt: string;
71
- projectId: string;
72
70
  agentId: string;
71
+ projectId: string;
72
+ tenantId: string;
73
73
  subAgentId: string;
74
74
  dataComponentId: string;
75
75
  }>;
@@ -108,10 +108,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
108
108
  dataComponentId: string;
109
109
  }) => Promise<{
110
110
  id: string;
111
- tenantId: string;
112
111
  createdAt: string;
113
- projectId: string;
114
112
  agentId: string;
113
+ projectId: string;
114
+ tenantId: string;
115
115
  subAgentId: string;
116
116
  dataComponentId: string;
117
117
  } | null>;
@@ -1,8 +1,8 @@
1
1
  import { dataComponents, subAgentDataComponents } from "../../db/manage/manage-schema.js";
2
2
  import { validatePropsAsJsonSchema } from "../../validation/props-validation.js";
3
3
  import { validateRender } from "../../validation/render-validation.js";
4
- import { generateId } from "../../utils/conversations.js";
5
4
  import { createApiError } from "../../utils/error.js";
5
+ import { generateId } from "../../utils/conversations.js";
6
6
  import { projectScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
7
7
  import "../../utils/index.js";
8
8
  import { and, count, desc, eq } from "drizzle-orm";
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- description: string | null;
57
56
  id: string;
58
- tenantId: string;
59
- createdAt: string;
60
57
  name: string;
58
+ createdAt: string;
61
59
  updatedAt: string;
62
- projectId: string;
60
+ description: string | null;
63
61
  agentId: string;
62
+ projectId: string;
63
+ tenantId: 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
- description: string | null;
99
98
  id: string;
100
- tenantId: string;
101
- createdAt: string;
102
99
  name: string;
100
+ createdAt: string;
103
101
  updatedAt: string;
104
- projectId: string;
102
+ description: string | null;
105
103
  agentId: string;
104
+ projectId: string;
105
+ tenantId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -158,16 +158,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
158
158
  }> | null;
159
159
  }) => Promise<{
160
160
  id: string;
161
- tenantId: string;
162
161
  createdAt: string;
163
162
  updatedAt: string;
164
- projectId: string;
165
163
  agentId: string;
164
+ projectId: string;
165
+ tenantId: string;
166
+ subAgentId: string;
167
+ functionToolId: string;
166
168
  toolPolicies: Record<string, {
167
169
  needsApproval?: boolean;
168
170
  }> | null;
169
- subAgentId: string;
170
- functionToolId: string;
171
171
  }>;
172
172
  /**
173
173
  * Update an agent-function tool relation
@@ -223,16 +223,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
223
223
  }> | null;
224
224
  }) => Promise<{
225
225
  id: string;
226
- tenantId: string;
227
226
  createdAt: string;
228
227
  updatedAt: string;
229
- projectId: string;
230
228
  agentId: string;
229
+ projectId: string;
230
+ tenantId: string;
231
+ subAgentId: string;
232
+ functionToolId: string;
231
233
  toolPolicies: Record<string, {
232
234
  needsApproval?: boolean;
233
235
  }> | null;
234
- subAgentId: string;
235
- functionToolId: string;
236
236
  }>;
237
237
  //#endregion
238
238
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -1,17 +1,15 @@
1
1
  import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
2
2
  import "../../types/utility.js";
3
- import { getLogger } from "../../utils/logger.js";
4
3
  import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
5
4
  import { FullProjectDefinition, FullProjectSelect, FullProjectSelectWithRelationIds } from "../../types/entities.js";
6
5
 
7
6
  //#region src/data-access/manage/projectFull.d.ts
8
7
 
9
- type ProjectLogger = ReturnType<typeof getLogger>;
10
8
  /**
11
9
  * Server-side implementation of createFullProject that performs actual database operations.
12
10
  * This function creates a complete project with all agent and their nested resources.
13
11
  */
14
- declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient, logger?: ProjectLogger) => (params: {
12
+ declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient) => (params: {
15
13
  scopes: ProjectScopeConfig;
16
14
  projectData: FullProjectDefinition;
17
15
  }) => Promise<FullProjectSelect>;
@@ -19,21 +17,21 @@ declare const createFullProjectServerSide: (db: AgentsManageDatabaseClient, logg
19
17
  * Server-side implementation of updateFullProject that performs actual database operations.
20
18
  * This function updates a complete project with all agent and their nested resources.
21
19
  */
22
- declare const updateFullProjectServerSide: (db: AgentsManageDatabaseClient, logger?: ProjectLogger) => (params: {
20
+ declare const updateFullProjectServerSide: (db: AgentsManageDatabaseClient) => (params: {
23
21
  scopes: ProjectScopeConfig;
24
22
  projectData: FullProjectDefinition;
25
23
  }) => Promise<FullProjectSelect>;
26
- declare const getFullProject: (db: AgentsManageDatabaseClient, logger?: ProjectLogger) => (params: {
24
+ declare const getFullProject: (db: AgentsManageDatabaseClient) => (params: {
27
25
  scopes: ProjectScopeConfig;
28
26
  }) => Promise<FullProjectSelect | null>;
29
- declare const getFullProjectWithRelationIds: (db: AgentsManageDatabaseClient, logger?: ProjectLogger) => (params: {
27
+ declare const getFullProjectWithRelationIds: (db: AgentsManageDatabaseClient) => (params: {
30
28
  scopes: ProjectScopeConfig;
31
29
  }) => Promise<FullProjectSelectWithRelationIds | null>;
32
30
  /**
33
31
  * Delete a complete project and cascade to all related entities
34
32
  */
35
- declare const deleteFullProject: (db: AgentsManageDatabaseClient, logger?: ProjectLogger) => (params: {
33
+ declare const deleteFullProject: (db: AgentsManageDatabaseClient) => (params: {
36
34
  scopes: ProjectScopeConfig;
37
35
  }) => Promise<boolean>;
38
36
  //#endregion
39
- export { ProjectLogger, createFullProjectServerSide, deleteFullProject, getFullProject, getFullProjectWithRelationIds, updateFullProjectServerSide };
37
+ export { createFullProjectServerSide, deleteFullProject, getFullProject, getFullProjectWithRelationIds, updateFullProjectServerSide };
@@ -11,7 +11,7 @@ import { createFullAgentServerSide, deleteFullAgent, getFullAgent, getFullAgentW
11
11
  import { createProject, deleteProject, getProject, updateProject } from "./projects.js";
12
12
 
13
13
  //#region src/data-access/manage/projectFull.ts
14
- const defaultLogger = getLogger("projectFull");
14
+ const logger = getLogger("projectFull");
15
15
  /**
16
16
  * Validate and type the project data
17
17
  */
@@ -22,7 +22,7 @@ function validateAndTypeProjectData(projectData) {
22
22
  * Server-side implementation of createFullProject that performs actual database operations.
23
23
  * This function creates a complete project with all agent and their nested resources.
24
24
  */
25
- const createFullProjectServerSide = (db, logger = defaultLogger) => async (params) => {
25
+ const createFullProjectServerSide = (db) => async (params) => {
26
26
  const { scopes, projectData } = params;
27
27
  const { tenantId } = scopes;
28
28
  const typed = validateAndTypeProjectData(projectData);
@@ -306,7 +306,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
306
306
  credentialReferences: typed.credentialReferences || {},
307
307
  statusUpdates: agentData.statusUpdates === null ? void 0 : agentData.statusUpdates
308
308
  };
309
- await createFullAgentServerSide(db, logger)({
309
+ await createFullAgentServerSide(db)({
310
310
  tenantId,
311
311
  projectId: typed.id
312
312
  }, agentDataWithoutSubAgents);
@@ -349,7 +349,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
349
349
  ...agentData,
350
350
  subAgents: agentData.subAgents
351
351
  };
352
- await updateFullAgentServerSide(db, logger)({
352
+ await updateFullAgentServerSide(db)({
353
353
  tenantId,
354
354
  projectId: typed.id
355
355
  }, updateData);
@@ -380,7 +380,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
380
380
  }, "Phase 2 complete: All sub-agents added successfully");
381
381
  }
382
382
  logger.info({ projectId: typed.id }, "Full project created successfully");
383
- const fullProject = await getFullProject(db, logger)({ scopes: {
383
+ const fullProject = await getFullProject(db)({ scopes: {
384
384
  tenantId,
385
385
  projectId: typed.id
386
386
  } });
@@ -399,7 +399,7 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
399
399
  * Server-side implementation of updateFullProject that performs actual database operations.
400
400
  * This function updates a complete project with all agent and their nested resources.
401
401
  */
402
- const updateFullProjectServerSide = (db, logger = defaultLogger) => async (params) => {
402
+ const updateFullProjectServerSide = (db) => async (params) => {
403
403
  const { scopes, projectData } = params;
404
404
  const { tenantId } = scopes;
405
405
  const typed = validateAndTypeProjectData(projectData);
@@ -415,7 +415,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
415
415
  projectId: typed.id
416
416
  } })) {
417
417
  logger.info({ projectId: typed.id }, "Project not found, creating new project");
418
- return await createFullProjectServerSide(db, logger)({
418
+ return await createFullProjectServerSide(db)({
419
419
  scopes: {
420
420
  tenantId,
421
421
  projectId: typed.id
@@ -847,7 +847,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
847
847
  } });
848
848
  let deletedAgentCount = 0;
849
849
  for (const agent of existingAgents) if (!incomingAgentIds.has(agent.id)) try {
850
- await deleteFullAgent(db, logger)({ scopes: {
850
+ await deleteFullAgent(db)({ scopes: {
851
851
  tenantId,
852
852
  projectId: typed.id,
853
853
  agentId: agent.id
@@ -885,7 +885,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
885
885
  credentialReferences: typed.credentialReferences || {},
886
886
  statusUpdates: agentData.statusUpdates === null ? void 0 : agentData.statusUpdates
887
887
  };
888
- await updateFullAgentServerSide(db, logger)({
888
+ await updateFullAgentServerSide(db)({
889
889
  tenantId,
890
890
  projectId: typed.id
891
891
  }, agentDataWithProjectResources);
@@ -916,7 +916,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
916
916
  }, "All project agent updated successfully");
917
917
  }
918
918
  logger.info({ projectId: typed.id }, "Full project updated successfully");
919
- const fullProject = await getFullProject(db, logger)({ scopes: {
919
+ const fullProject = await getFullProject(db)({ scopes: {
920
920
  tenantId,
921
921
  projectId: typed.id
922
922
  } });
@@ -934,7 +934,7 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
934
934
  /**
935
935
  * Get a complete project definition with all nested resources
936
936
  */
937
- const getFullProjectInternal = (db, logger = defaultLogger) => async (params) => {
937
+ const getFullProjectInternal = (db) => async (params) => {
938
938
  const { scopes, includeRelationIds = false } = params;
939
939
  const { tenantId, projectId } = scopes;
940
940
  logger.info({
@@ -1205,16 +1205,16 @@ const getFullProjectInternal = (db, logger = defaultLogger) => async (params) =>
1205
1205
  throw error;
1206
1206
  }
1207
1207
  };
1208
- const getFullProject = (db, logger = defaultLogger) => async (params) => {
1208
+ const getFullProject = (db) => async (params) => {
1209
1209
  const { scopes } = params;
1210
- return getFullProjectInternal(db, logger)({
1210
+ return getFullProjectInternal(db)({
1211
1211
  scopes,
1212
1212
  includeRelationIds: false
1213
1213
  });
1214
1214
  };
1215
- const getFullProjectWithRelationIds = (db, logger = defaultLogger) => async (params) => {
1215
+ const getFullProjectWithRelationIds = (db) => async (params) => {
1216
1216
  const { scopes } = params;
1217
- return getFullProjectInternal(db, logger)({
1217
+ return getFullProjectInternal(db)({
1218
1218
  scopes,
1219
1219
  includeRelationIds: true
1220
1220
  });
@@ -1222,7 +1222,7 @@ const getFullProjectWithRelationIds = (db, logger = defaultLogger) => async (par
1222
1222
  /**
1223
1223
  * Delete a complete project and cascade to all related entities
1224
1224
  */
1225
- const deleteFullProject = (db, logger = defaultLogger) => async (params) => {
1225
+ const deleteFullProject = (db) => async (params) => {
1226
1226
  const { scopes } = params;
1227
1227
  const { tenantId, projectId } = scopes;
1228
1228
  logger.info({
@@ -1230,7 +1230,7 @@ const deleteFullProject = (db, logger = defaultLogger) => async (params) => {
1230
1230
  projectId
1231
1231
  }, "Deleting full project and related entities");
1232
1232
  try {
1233
- const project = await getFullProject(db, logger)({ scopes: {
1233
+ const project = await getFullProject(db)({ scopes: {
1234
1234
  tenantId,
1235
1235
  projectId
1236
1236
  } });
@@ -1254,7 +1254,7 @@ const deleteFullProject = (db, logger = defaultLogger) => async (params) => {
1254
1254
  projectId,
1255
1255
  agentId
1256
1256
  }, "Deleting agent from project");
1257
- await deleteFullAgent(db, logger)({ scopes: {
1257
+ await deleteFullAgent(db)({ scopes: {
1258
1258
  tenantId,
1259
1259
  projectId,
1260
1260
  agentId
@@ -15,15 +15,15 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
15
15
  scopes: ProjectScopeConfig;
16
16
  skillId: string;
17
17
  }) => Promise<{
18
- description: string;
19
18
  id: string;
20
- tenantId: string;
21
- createdAt: string;
22
19
  name: string;
23
- metadata: Record<string, string> | null;
24
- content: string;
20
+ createdAt: string;
25
21
  updatedAt: string;
22
+ metadata: Record<string, string> | null;
23
+ description: string;
26
24
  projectId: string;
25
+ tenantId: string;
26
+ content: string;
27
27
  } | null>;
28
28
  declare const getSkillByIdWithFiles: (db: AgentsManageDatabaseClient) => (params: {
29
29
  scopes: ProjectScopeConfig;
@@ -110,15 +110,15 @@ interface WithTenantIdProjectId {
110
110
  }
111
111
  declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<SkillRecordWithFiles>;
112
112
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<{
113
- description: string;
114
113
  id: string;
115
- tenantId: string;
116
- createdAt: string;
117
114
  name: string;
118
- metadata: Record<string, string> | null;
119
- content: string;
115
+ createdAt: string;
120
116
  updatedAt: string;
117
+ metadata: Record<string, string> | null;
118
+ description: string;
121
119
  projectId: string;
120
+ tenantId: string;
121
+ content: string;
122
122
  }>;
123
123
  declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
124
124
  scopes: ProjectScopeConfig;
@@ -140,11 +140,11 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
140
140
  alwaysLoaded?: boolean;
141
141
  }) => Promise<{
142
142
  id: string;
143
- tenantId: string;
144
143
  createdAt: string;
145
144
  updatedAt: string;
146
- projectId: string;
147
145
  agentId: string;
146
+ projectId: string;
147
+ tenantId: string;
148
148
  subAgentId: string;
149
149
  index: number;
150
150
  alwaysLoaded: boolean;