@inkeep/agents-core 0.0.0-dev-20260209225959 → 0.0.0-dev-20260209233018

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.
@@ -16,19 +16,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
18
  id: string;
19
- tenantId: string;
20
- projectId: string;
21
- agentId: string | null;
22
- title: string | null;
23
19
  createdAt: string;
24
20
  updatedAt: string;
25
- metadata: ConversationMetadata | null;
26
21
  ref: {
27
- type: "tag" | "commit" | "branch";
22
+ type: "commit" | "tag" | "branch";
28
23
  name: string;
29
24
  hash: string;
30
25
  } | null;
31
26
  userId: string | null;
27
+ metadata: ConversationMetadata | null;
28
+ title: string | null;
29
+ agentId: string | null;
30
+ projectId: string;
31
+ tenantId: string;
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;
@@ -85,19 +85,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
87
  id: string;
88
- tenantId: string;
89
- projectId: string;
90
- agentId: string | null;
91
- title: string | null;
92
88
  createdAt: string;
93
89
  updatedAt: string;
94
- metadata: ConversationMetadata | null;
95
90
  ref: {
96
- type: "tag" | "commit" | "branch";
91
+ type: "commit" | "tag" | "branch";
97
92
  name: string;
98
93
  hash: string;
99
94
  } | null;
100
95
  userId: string | null;
96
+ metadata: ConversationMetadata | null;
97
+ title: string | null;
98
+ agentId: string | null;
99
+ projectId: string;
100
+ tenantId: string;
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
  };
@@ -121,19 +121,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
123
  id: string;
124
- tenantId: string;
125
- projectId: string;
126
- agentId: string | null;
127
- title: string | null;
128
124
  createdAt: string;
129
125
  updatedAt: string;
130
- metadata: ConversationMetadata | null;
131
126
  ref: {
132
- type: "tag" | "commit" | "branch";
127
+ type: "commit" | "tag" | "branch";
133
128
  name: string;
134
129
  hash: string;
135
130
  } | null;
136
131
  userId: string | null;
132
+ metadata: ConversationMetadata | null;
133
+ title: string | null;
134
+ agentId: string | null;
135
+ projectId: string;
136
+ tenantId: string;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -153,19 +153,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
155
  id: string;
156
- tenantId: string;
157
- projectId: string;
158
- agentId: string | null;
159
- title: string | null;
160
156
  createdAt: string;
161
157
  updatedAt: string;
162
- metadata: ConversationMetadata | null;
163
158
  ref: {
164
- type: "tag" | "commit" | "branch";
159
+ type: "commit" | "tag" | "branch";
165
160
  name: string;
166
161
  hash: string;
167
162
  } | null;
168
163
  userId: string | null;
164
+ metadata: ConversationMetadata | null;
165
+ title: string | null;
166
+ agentId: string | null;
167
+ projectId: string;
168
+ tenantId: string;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -10,25 +10,25 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  messageId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- tenantId: string;
14
- projectId: string;
15
13
  createdAt: string;
16
14
  updatedAt: string;
17
15
  metadata: MessageMetadata | null;
18
- content: MessageContent;
19
16
  role: string;
17
+ projectId: string;
18
+ tenantId: string;
19
+ content: MessageContent;
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: {
@@ -141,25 +141,25 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
143
  id: string;
144
- tenantId: string;
145
- projectId: string;
146
144
  createdAt: string;
147
145
  updatedAt: string;
148
146
  metadata: MessageMetadata | null;
149
- content: MessageContent;
150
147
  role: string;
148
+ projectId: string;
149
+ tenantId: string;
150
+ content: MessageContent;
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: {
@@ -194,25 +194,25 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
194
194
  messageId: string;
195
195
  }) => Promise<{
196
196
  id: string;
197
- tenantId: string;
198
- projectId: string;
199
197
  createdAt: string;
200
198
  updatedAt: string;
201
199
  metadata: MessageMetadata | null;
202
- content: MessageContent;
203
200
  role: string;
201
+ projectId: string;
202
+ tenantId: string;
203
+ content: MessageContent;
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: {
@@ -7,20 +7,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
9
  id: string;
10
- tenantId: string;
11
- projectId: string;
12
- agentId: string;
13
10
  createdAt: string;
14
11
  updatedAt: string;
15
- metadata: TaskMetadataConfig | null;
16
12
  ref: {
17
- type: "tag" | "commit" | "branch";
13
+ type: "commit" | "tag" | "branch";
18
14
  name: string;
19
15
  hash: string;
20
16
  } | null;
17
+ metadata: TaskMetadataConfig | null;
21
18
  status: string;
22
- subAgentId: string;
19
+ agentId: string;
20
+ projectId: string;
21
+ tenantId: 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;
@@ -11,7 +11,11 @@ function createAgentsManageDatabasePool(config) {
11
11
  if (!connectionString) throw new Error("INKEEP_AGENTS_MANAGE_DATABASE_URL environment variable is required. Please set it to your PostgreSQL connection string.");
12
12
  const pool = new Pool({
13
13
  connectionString,
14
- max: config.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100
14
+ max: config.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100,
15
+ keepAlive: true,
16
+ keepAliveInitialDelayMillis: 6e4,
17
+ connectionTimeoutMillis: 1e4,
18
+ idleTimeoutMillis: 3e4
15
19
  });
16
20
  pool.on("error", (err) => {
17
21
  console.error("Unexpected PostgreSQL pool error:", err);
@@ -27,7 +31,11 @@ function createAgentsManageDatabaseClient(config) {
27
31
  if (!connectionString) throw new Error("INKEEP_AGENTS_MANAGE_DATABASE_URL environment variable is required. Please set it to your PostgreSQL connection string.");
28
32
  const pool = new Pool({
29
33
  connectionString,
30
- max: config.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100
34
+ max: config.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100,
35
+ keepAlive: true,
36
+ keepAliveInitialDelayMillis: 6e4,
37
+ connectionTimeoutMillis: 1e4,
38
+ idleTimeoutMillis: 3e4
31
39
  });
32
40
  pool.on("error", (err) => {
33
41
  console.error("Unexpected PostgreSQL pool error:", err);
@@ -43,7 +51,10 @@ function createAgentManageDatabaseConnection(config) {
43
51
  if (!connectionString) throw new Error("INKEEP_AGENTS_MANAGE_DATABASE_URL environment variable is required. Please set it to your PostgreSQL connection string.");
44
52
  const pool = new Pool({
45
53
  connectionString,
46
- max: 1
54
+ max: 1,
55
+ keepAlive: true,
56
+ keepAliveInitialDelayMillis: 6e4,
57
+ connectionTimeoutMillis: 1e4
47
58
  });
48
59
  pool.on("error", (err) => {
49
60
  console.error("Unexpected PostgreSQL pool error:", err);
@@ -813,13 +813,13 @@ declare const triggers: drizzle_orm_pg_core1373.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_core1373.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;
@@ -15,7 +15,11 @@ function createAgentsRunDatabaseClient(config) {
15
15
  if (!connectionString) throw new Error("INKEEP_AGENTS_RUN_DATABASE_URL environment variable is required. Please set it to your PostgreSQL connection string.");
16
16
  const pool = new Pool({
17
17
  connectionString,
18
- max: config?.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100
18
+ max: config?.poolSize || Number(env.POSTGRES_POOL_SIZE) || 100,
19
+ keepAlive: true,
20
+ keepAliveInitialDelayMillis: 6e4,
21
+ connectionTimeoutMillis: 1e4,
22
+ idleTimeoutMillis: 3e4
19
23
  });
20
24
  pool.on("error", (err) => {
21
25
  console.error("Unexpected PostgreSQL pool error:", err);
@@ -216,7 +216,7 @@ declare const conversations: drizzle_orm_pg_core1674.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_core1674.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_core1674.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_core1674.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_core1674.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_core1674.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_core1674.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_core1674.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_core1674.PgColumn<{
2950
2950
  name: "status";
@@ -32,8 +32,8 @@ declare const BranchNameParamsSchema: z.ZodObject<{
32
32
  }, z.core.$strip>;
33
33
  declare const ResolvedRefSchema: z.ZodObject<{
34
34
  type: z.ZodEnum<{
35
- tag: "tag";
36
35
  commit: "commit";
36
+ tag: "tag";
37
37
  branch: "branch";
38
38
  }>;
39
39
  name: z.ZodString;
@@ -1,10 +1,10 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import * as drizzle_zod15 from "drizzle-zod";
2
+ import * as drizzle_zod0 from "drizzle-zod";
3
3
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
4
 
5
5
  //#region src/validation/drizzle-schema-helpers.d.ts
6
- declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"select", T["_"]["columns"], drizzle_zod15.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
- declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"insert", T["_"]["columns"], drizzle_zod15.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
6
+ declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"select", T["_"]["columns"], drizzle_zod0.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
+ declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"insert", T["_"]["columns"], drizzle_zod0.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
8
8
  declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
9
9
  declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
10
10
  /**