@inkeep/agents-core 0.44.0 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/auth/auth-schema.d.ts +82 -82
  2. package/dist/auth/auth-validation-schemas.d.ts +146 -146
  3. package/dist/auth/auth.d.ts +57 -57
  4. package/dist/auth/authz/index.d.ts +2 -2
  5. package/dist/auth/authz/index.js +2 -2
  6. package/dist/auth/authz/permissions.d.ts +16 -1
  7. package/dist/auth/authz/permissions.js +26 -1
  8. package/dist/auth/permissions.d.ts +13 -13
  9. package/dist/constants/otel-attributes.d.ts +1 -0
  10. package/dist/constants/otel-attributes.js +1 -0
  11. package/dist/data-access/index.d.ts +2 -2
  12. package/dist/data-access/index.js +4 -4
  13. package/dist/data-access/manage/agents.d.ts +59 -42
  14. package/dist/data-access/manage/agents.js +33 -2
  15. package/dist/data-access/manage/artifactComponents.d.ts +12 -12
  16. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  17. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  18. package/dist/data-access/manage/functionTools.d.ts +16 -16
  19. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  20. package/dist/data-access/manage/subAgentRelations.d.ts +32 -32
  21. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  22. package/dist/data-access/manage/subAgents.d.ts +15 -15
  23. package/dist/data-access/manage/tools.d.ts +27 -27
  24. package/dist/data-access/manage/tools.js +1 -1
  25. package/dist/data-access/manage/triggers.d.ts +2 -2
  26. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  27. package/dist/data-access/runtime/conversations.d.ts +31 -31
  28. package/dist/data-access/runtime/messages.d.ts +18 -18
  29. package/dist/data-access/runtime/tasks.d.ts +7 -7
  30. package/dist/db/manage/manage-schema.d.ts +4 -4
  31. package/dist/db/runtime/runtime-schema.d.ts +8 -8
  32. package/dist/dolt/branch.js +1 -1
  33. package/dist/dolt/branches-api.js +1 -1
  34. package/dist/dolt/index.js +3 -3
  35. package/dist/dolt/migrate-all-branches.js +1 -1
  36. package/dist/dolt/ref-helpers.js +1 -1
  37. package/dist/dolt/ref-scope.js +1 -1
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +11 -11
  40. package/dist/utils/temp-jwt.d.ts +2 -1
  41. package/dist/utils/temp-jwt.js +3 -2
  42. package/dist/validation/dolt-schemas.d.ts +1 -1
  43. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  44. package/dist/validation/schemas.d.ts +1666 -1666
  45. package/dist/validation/schemas.js +50 -52
  46. package/package.json +2 -2
@@ -15,20 +15,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
15
15
  total: number;
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
+ tenantId: string;
19
+ projectId: string;
18
20
  id: string;
21
+ title: string | null;
22
+ agentId: string | null;
19
23
  createdAt: string;
20
24
  updatedAt: string;
25
+ userId: string | null;
26
+ metadata: ConversationMetadata | null;
21
27
  ref: {
22
- type: "tag" | "commit" | "branch";
28
+ type: "commit" | "tag" | "branch";
23
29
  name: string;
24
30
  hash: string;
25
31
  } | null;
26
- userId: string | null;
27
- metadata: ConversationMetadata | null;
28
- agentId: string | null;
29
- projectId: string;
30
- tenantId: string;
31
- title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
43
43
  agentId: string | null;
44
44
  activeSubAgentId: string;
45
45
  ref: {
46
- type: "tag" | "commit" | "branch";
46
+ type: "commit" | "tag" | "branch";
47
47
  name: string;
48
48
  hash: string;
49
49
  } | null;
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
69
69
  agentId: string | null;
70
70
  activeSubAgentId: string;
71
71
  ref: {
72
- type: "tag" | "commit" | "branch";
72
+ type: "commit" | "tag" | "branch";
73
73
  name: string;
74
74
  hash: string;
75
75
  } | null;
@@ -84,20 +84,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
84
84
  scopes: ProjectScopeConfig;
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
+ tenantId: string;
88
+ projectId: string;
87
89
  id: string;
90
+ title: string | null;
91
+ agentId: string | null;
88
92
  createdAt: string;
89
93
  updatedAt: string;
94
+ userId: string | null;
95
+ metadata: ConversationMetadata | null;
90
96
  ref: {
91
- type: "tag" | "commit" | "branch";
97
+ type: "commit" | "tag" | "branch";
92
98
  name: string;
93
99
  hash: string;
94
100
  } | null;
95
- userId: string | null;
96
- metadata: ConversationMetadata | null;
97
- agentId: string | null;
98
- projectId: string;
99
- tenantId: string;
100
- title: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
107
107
  tenantId: string;
108
108
  id: string;
109
109
  ref: {
110
- type: "tag" | "commit" | "branch";
110
+ type: "commit" | "tag" | "branch";
111
111
  name: string;
112
112
  hash: string;
113
113
  };
@@ -120,20 +120,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
120
120
  metadata?: ConversationMetadata | null | undefined;
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
+ tenantId: string;
124
+ projectId: string;
123
125
  id: string;
126
+ title: string | null;
127
+ agentId: string | null;
124
128
  createdAt: string;
125
129
  updatedAt: string;
130
+ userId: string | null;
131
+ metadata: ConversationMetadata | null;
126
132
  ref: {
127
- type: "tag" | "commit" | "branch";
133
+ type: "commit" | "tag" | "branch";
128
134
  name: string;
129
135
  hash: string;
130
136
  } | null;
131
- userId: string | null;
132
- metadata: ConversationMetadata | null;
133
- agentId: string | null;
134
- projectId: string;
135
- tenantId: string;
136
- title: string | null;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -152,20 +152,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
152
152
  scopes: ProjectScopeConfig;
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
+ tenantId: string;
156
+ projectId: string;
155
157
  id: string;
158
+ title: string | null;
159
+ agentId: string | null;
156
160
  createdAt: string;
157
161
  updatedAt: string;
162
+ userId: string | null;
163
+ metadata: ConversationMetadata | null;
158
164
  ref: {
159
- type: "tag" | "commit" | "branch";
165
+ type: "commit" | "tag" | "branch";
160
166
  name: string;
161
167
  hash: string;
162
168
  } | null;
163
- userId: string | null;
164
- metadata: ConversationMetadata | null;
165
- agentId: string | null;
166
- projectId: string;
167
- tenantId: string;
168
- title: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -9,26 +9,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  scopes: ProjectScopeConfig;
10
10
  messageId: string;
11
11
  }) => Promise<{
12
+ tenantId: string;
13
+ projectId: string;
12
14
  id: string;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
17
  metadata: MessageMetadata | null;
16
- role: string;
17
- projectId: string;
18
- tenantId: string;
19
18
  content: MessageContent;
19
+ role: string;
20
+ conversationId: string;
20
21
  fromSubAgentId: string | null;
21
22
  toSubAgentId: string | null;
22
23
  fromExternalAgentId: string | null;
23
24
  toExternalAgentId: string | null;
24
- taskId: string | null;
25
- a2aTaskId: string | null;
26
- conversationId: string;
27
25
  fromTeamAgentId: string | null;
28
26
  toTeamAgentId: string | null;
29
27
  visibility: string;
30
28
  messageType: string;
29
+ taskId: string | null;
31
30
  parentMessageId: string | null;
31
+ a2aTaskId: string | null;
32
32
  a2aSessionId: string | null;
33
33
  } | undefined>;
34
34
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -140,26 +140,26 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
140
140
  id: string;
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
+ tenantId: string;
144
+ projectId: string;
143
145
  id: string;
144
146
  createdAt: string;
145
147
  updatedAt: string;
146
148
  metadata: MessageMetadata | null;
147
- role: string;
148
- projectId: string;
149
- tenantId: string;
150
149
  content: MessageContent;
150
+ role: string;
151
+ conversationId: string;
151
152
  fromSubAgentId: string | null;
152
153
  toSubAgentId: string | null;
153
154
  fromExternalAgentId: string | null;
154
155
  toExternalAgentId: string | null;
155
- taskId: string | null;
156
- a2aTaskId: string | null;
157
- conversationId: string;
158
156
  fromTeamAgentId: string | null;
159
157
  toTeamAgentId: string | null;
160
158
  visibility: string;
161
159
  messageType: string;
160
+ taskId: string | null;
162
161
  parentMessageId: string | null;
162
+ a2aTaskId: string | null;
163
163
  a2aSessionId: string | null;
164
164
  }>;
165
165
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -193,26 +193,26 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
193
193
  scopes: ProjectScopeConfig;
194
194
  messageId: string;
195
195
  }) => Promise<{
196
+ tenantId: string;
197
+ projectId: string;
196
198
  id: string;
197
199
  createdAt: string;
198
200
  updatedAt: string;
199
201
  metadata: MessageMetadata | null;
200
- role: string;
201
- projectId: string;
202
- tenantId: string;
203
202
  content: MessageContent;
203
+ role: string;
204
+ conversationId: string;
204
205
  fromSubAgentId: string | null;
205
206
  toSubAgentId: string | null;
206
207
  fromExternalAgentId: string | null;
207
208
  toExternalAgentId: string | null;
208
- taskId: string | null;
209
- a2aTaskId: string | null;
210
- conversationId: string;
211
209
  fromTeamAgentId: string | null;
212
210
  toTeamAgentId: string | null;
213
211
  visibility: string;
214
212
  messageType: string;
213
+ taskId: string | null;
215
214
  parentMessageId: string | null;
215
+ a2aTaskId: string | null;
216
216
  a2aSessionId: string | null;
217
217
  }>;
218
218
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -6,21 +6,21 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
6
6
 
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
+ tenantId: string;
10
+ projectId: string;
9
11
  id: string;
12
+ agentId: string;
10
13
  createdAt: string;
11
14
  updatedAt: string;
15
+ metadata: TaskMetadataConfig | null;
12
16
  ref: {
13
- type: "tag" | "commit" | "branch";
17
+ type: "commit" | "tag" | "branch";
14
18
  name: string;
15
19
  hash: string;
16
20
  } | null;
17
- metadata: TaskMetadataConfig | null;
18
21
  status: string;
19
- agentId: string;
20
- projectId: string;
21
- tenantId: string;
22
- subAgentId: string;
23
22
  contextId: string;
23
+ subAgentId: string;
24
24
  }>;
25
25
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
26
26
  id: string;
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
36
36
  updatedAt: string;
37
37
  contextId: string;
38
38
  ref: {
39
- type: "tag" | "commit" | "branch";
39
+ type: "commit" | "tag" | "branch";
40
40
  name: string;
41
41
  hash: string;
42
42
  } | null;
@@ -813,13 +813,13 @@ declare const triggers: drizzle_orm_pg_core1370.PgTableWithColumns<{
813
813
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
814
814
  encoding: "hex" | "base64";
815
815
  signature: {
816
- source: "query" | "body" | "header";
816
+ source: "query" | "header" | "body";
817
817
  key: string;
818
818
  prefix?: string | undefined;
819
819
  regex?: string | undefined;
820
820
  };
821
821
  signedComponents: {
822
- source: "literal" | "body" | "header";
822
+ source: "literal" | "header" | "body";
823
823
  required: boolean;
824
824
  key?: string | undefined;
825
825
  value?: string | undefined;
@@ -850,13 +850,13 @@ declare const triggers: drizzle_orm_pg_core1370.PgTableWithColumns<{
850
850
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
851
851
  encoding: "hex" | "base64";
852
852
  signature: {
853
- source: "query" | "body" | "header";
853
+ source: "query" | "header" | "body";
854
854
  key: string;
855
855
  prefix?: string | undefined;
856
856
  regex?: string | undefined;
857
857
  };
858
858
  signedComponents: {
859
- source: "literal" | "body" | "header";
859
+ source: "literal" | "header" | "body";
860
860
  required: boolean;
861
861
  key?: string | undefined;
862
862
  value?: string | undefined;
@@ -216,7 +216,7 @@ declare const conversations: drizzle_orm_pg_core1671.PgTableWithColumns<{
216
216
  dataType: "json";
217
217
  columnType: "PgJsonb";
218
218
  data: {
219
- type: "tag" | "commit" | "branch";
219
+ type: "commit" | "tag" | "branch";
220
220
  name: string;
221
221
  hash: string;
222
222
  };
@@ -232,7 +232,7 @@ declare const conversations: drizzle_orm_pg_core1671.PgTableWithColumns<{
232
232
  generated: undefined;
233
233
  }, {}, {
234
234
  $type: {
235
- type: "tag" | "commit" | "branch";
235
+ type: "commit" | "tag" | "branch";
236
236
  name: string;
237
237
  hash: string;
238
238
  };
@@ -413,7 +413,7 @@ declare const tasks: drizzle_orm_pg_core1671.PgTableWithColumns<{
413
413
  dataType: "json";
414
414
  columnType: "PgJsonb";
415
415
  data: {
416
- type: "tag" | "commit" | "branch";
416
+ type: "commit" | "tag" | "branch";
417
417
  name: string;
418
418
  hash: string;
419
419
  };
@@ -429,7 +429,7 @@ declare const tasks: drizzle_orm_pg_core1671.PgTableWithColumns<{
429
429
  generated: undefined;
430
430
  }, {}, {
431
431
  $type: {
432
- type: "tag" | "commit" | "branch";
432
+ type: "commit" | "tag" | "branch";
433
433
  name: string;
434
434
  hash: string;
435
435
  };
@@ -2011,7 +2011,7 @@ declare const contextCache: drizzle_orm_pg_core1671.PgTableWithColumns<{
2011
2011
  dataType: "json";
2012
2012
  columnType: "PgJsonb";
2013
2013
  data: {
2014
- type: "tag" | "commit" | "branch";
2014
+ type: "commit" | "tag" | "branch";
2015
2015
  name: string;
2016
2016
  hash: string;
2017
2017
  };
@@ -2027,7 +2027,7 @@ declare const contextCache: drizzle_orm_pg_core1671.PgTableWithColumns<{
2027
2027
  generated: undefined;
2028
2028
  }, {}, {
2029
2029
  $type: {
2030
- type: "tag" | "commit" | "branch";
2030
+ type: "commit" | "tag" | "branch";
2031
2031
  name: string;
2032
2032
  hash: string;
2033
2033
  };
@@ -2931,7 +2931,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1671.PgTableWithCol
2931
2931
  tableName: "work_app_github_installations";
2932
2932
  dataType: "string";
2933
2933
  columnType: "PgVarchar";
2934
- data: "User" | "Organization";
2934
+ data: "Organization" | "User";
2935
2935
  driverParam: string;
2936
2936
  notNull: true;
2937
2937
  hasDefault: false;
@@ -2944,7 +2944,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1671.PgTableWithCol
2944
2944
  generated: undefined;
2945
2945
  }, {}, {
2946
2946
  length: 20;
2947
- $type: "User" | "Organization";
2947
+ $type: "Organization" | "User";
2948
2948
  }>;
2949
2949
  status: drizzle_orm_pg_core1671.PgColumn<{
2950
2950
  name: "status";
@@ -1,5 +1,5 @@
1
- import { resolveRef } from "./ref-helpers.js";
2
1
  import { doltHashOf } from "./commit.js";
2
+ import { resolveRef } from "./ref-helpers.js";
3
3
  import { sql } from "drizzle-orm";
4
4
  import { logger } from "@composio/core";
5
5
 
@@ -1,5 +1,5 @@
1
- import { doltBranch, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches } from "./branch.js";
2
1
  import { SCHEMA_SOURCE_BRANCH, ensureSchemaSync, getSchemaDiff, syncSchemaFromMain } from "./schema-sync.js";
2
+ import { doltBranch, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches } from "./branch.js";
3
3
  import { sql } from "drizzle-orm";
4
4
 
5
5
  //#region src/dolt/branches-api.ts
@@ -1,9 +1,9 @@
1
- import { MAIN_BRANCH_SUFFIX, checkoutBranch, createBranch, deleteBranch, getBranch, getTenantMainBranch, isProtectedBranchName, listBranches, listBranchesForAgent } from "./branches-api.js";
2
- import { checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveRef } from "./ref-helpers.js";
3
- import { doltActiveBranch, doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches, doltRenameBranch, ensureBranchExists } from "./branch.js";
4
1
  import { doltAdd, doltAddAndCommit, doltCommit, doltDeleteTag, doltHashOf, doltListTags, doltLog, doltReset, doltStatus, doltTag } from "./commit.js";
5
2
  import { doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltResolveConflicts, doltSchemaConflicts, doltTableConflicts } from "./merge.js";
6
3
  import { SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, isLocalhostUrl, syncSchemaFromMain } from "./schema-sync.js";
4
+ import { MAIN_BRANCH_SUFFIX, checkoutBranch, createBranch, deleteBranch, getBranch, getTenantMainBranch, isProtectedBranchName, listBranches, listBranchesForAgent } from "./branches-api.js";
5
+ import { checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveRef } from "./ref-helpers.js";
6
+ import { doltActiveBranch, doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches, doltRenameBranch, ensureBranchExists } from "./branch.js";
7
7
  import { doltDiff, doltDiffSummary } from "./diff.js";
8
8
  import { createRefMiddleware, createWriteProtectionMiddleware, refMiddlewareFactory, writeProtectionMiddlewareFactory } from "./ref-middleware.js";
9
9
  import { NestedRefScopeError, getCurrentRefScope, getRefScopedDb, isInRefScope, withRef } from "./ref-scope.js";
@@ -1,7 +1,7 @@
1
1
  import { loadEnvironmentFiles } from "../env.js";
2
2
  import { createAgentsManageDatabaseClient } from "../db/manage/manage-client.js";
3
- import { doltCheckout, doltListBranches } from "./branch.js";
4
3
  import { syncSchemaFromMain } from "./schema-sync.js";
4
+ import { doltCheckout, doltListBranches } from "./branch.js";
5
5
  import { confirmMigration } from "../db/utils.js";
6
6
 
7
7
  //#region src/dolt/migrate-all-branches.ts
@@ -1,6 +1,6 @@
1
+ import { doltHashOf, doltListTags } from "./commit.js";
1
2
  import { checkoutBranch } from "./branches-api.js";
2
3
  import { doltListBranches } from "./branch.js";
3
- import { doltHashOf, doltListTags } from "./commit.js";
4
4
  import { sql } from "drizzle-orm";
5
5
 
6
6
  //#region src/dolt/ref-helpers.ts
@@ -1,8 +1,8 @@
1
1
  import { manage_schema_exports } from "../db/manage/manage-schema.js";
2
2
  import { getLogger } from "../utils/logger.js";
3
3
  import { generateId } from "../utils/conversations.js";
4
- import { checkoutBranch } from "./branches-api.js";
5
4
  import { doltAddAndCommit, doltReset, doltStatus } from "./commit.js";
5
+ import { checkoutBranch } from "./branches-api.js";
6
6
  import { drizzle } from "drizzle-orm/node-postgres";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
8
8