@inkeep/agents-core 0.0.0-dev-20260122190953 → 0.0.0-dev-20260122200302

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.
@@ -8,13 +8,13 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
14
  createdAt: string;
13
15
  updatedAt: string;
14
16
  headers: Record<string, string> | null;
15
17
  agentId: string;
16
- projectId: string;
17
- tenantId: string;
18
18
  subAgentId: string;
19
19
  targetAgentId: string;
20
20
  } | undefined>;
@@ -43,26 +43,26 @@ declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =
43
43
  declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
+ tenantId: string;
47
+ projectId: string;
46
48
  id: string;
47
49
  createdAt: string;
48
50
  updatedAt: string;
49
51
  headers: Record<string, string> | null;
50
52
  agentId: string;
51
- projectId: string;
52
- tenantId: string;
53
53
  subAgentId: string;
54
54
  targetAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
+ tenantId: string;
60
+ projectId: string;
59
61
  id: string;
60
62
  createdAt: string;
61
63
  updatedAt: string;
62
64
  headers: Record<string, string> | null;
63
65
  agentId: string;
64
- projectId: string;
65
- tenantId: string;
66
66
  subAgentId: string;
67
67
  targetAgentId: string;
68
68
  }[]>;
@@ -209,13 +209,13 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
209
209
  headers?: Record<string, string> | null;
210
210
  };
211
211
  }) => Promise<{
212
+ tenantId: string;
213
+ projectId: string;
212
214
  id: string;
213
215
  createdAt: string;
214
216
  updatedAt: string;
215
217
  headers: Record<string, string> | null;
216
218
  agentId: string;
217
- projectId: string;
218
- tenantId: string;
219
219
  subAgentId: string;
220
220
  targetAgentId: string;
221
221
  }>;
@@ -226,13 +226,13 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
226
226
  scopes: SubAgentScopeConfig;
227
227
  targetAgentId: string;
228
228
  }) => Promise<{
229
+ tenantId: string;
230
+ projectId: string;
229
231
  id: string;
230
232
  createdAt: string;
231
233
  updatedAt: string;
232
234
  headers: Record<string, string> | null;
233
235
  agentId: string;
234
- projectId: string;
235
- tenantId: string;
236
236
  subAgentId: string;
237
237
  targetAgentId: string;
238
238
  } | undefined>;
@@ -247,13 +247,13 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
247
247
  headers?: Record<string, string> | null;
248
248
  };
249
249
  }) => Promise<{
250
+ tenantId: string;
251
+ projectId: string;
250
252
  id: string;
251
253
  createdAt: string;
252
254
  updatedAt: string;
253
255
  headers: Record<string, string> | null;
254
256
  agentId: string;
255
- projectId: string;
256
- tenantId: string;
257
257
  subAgentId: string;
258
258
  targetAgentId: string;
259
259
  }>;
@@ -8,14 +8,13 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  subAgentId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
- name: string;
13
14
  createdAt: string;
15
+ name: string;
14
16
  updatedAt: string;
15
17
  description: string | null;
16
- agentId: string;
17
- projectId: string;
18
- tenantId: string;
19
18
  models: {
20
19
  base?: {
21
20
  model?: string | undefined;
@@ -30,23 +29,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
30
29
  providerOptions?: Record<string, any> | undefined;
31
30
  } | undefined;
32
31
  } | null;
33
- prompt: string | null;
34
32
  stopWhen: {
35
33
  stepCountIs?: number | undefined;
36
34
  } | null;
35
+ agentId: string;
36
+ prompt: string | null;
37
37
  conversationHistoryConfig: ConversationHistoryConfig | null;
38
38
  } | undefined>;
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
+ tenantId: string;
43
+ projectId: string;
42
44
  id: string;
43
- name: string;
44
45
  createdAt: string;
46
+ name: string;
45
47
  updatedAt: string;
46
48
  description: string | null;
47
- agentId: string;
48
- projectId: string;
49
- tenantId: string;
50
49
  models: {
51
50
  base?: {
52
51
  model?: string | undefined;
@@ -61,10 +60,11 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
61
60
  providerOptions?: Record<string, any> | undefined;
62
61
  } | undefined;
63
62
  } | null;
64
- prompt: string | null;
65
63
  stopWhen: {
66
64
  stepCountIs?: number | undefined;
67
65
  } | null;
66
+ agentId: string;
67
+ prompt: string | null;
68
68
  conversationHistoryConfig: ConversationHistoryConfig | null;
69
69
  }[]>;
70
70
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -108,14 +108,13 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
108
108
  };
109
109
  }>;
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
+ tenantId: string;
112
+ projectId: string;
111
113
  id: string;
112
- name: string;
113
114
  createdAt: string;
115
+ name: string;
114
116
  updatedAt: string;
115
117
  description: string | null;
116
- agentId: string;
117
- projectId: string;
118
- tenantId: string;
119
118
  models: {
120
119
  base?: {
121
120
  model?: string | undefined;
@@ -130,10 +129,11 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
130
129
  providerOptions?: Record<string, any> | undefined;
131
130
  } | undefined;
132
131
  } | null;
133
- prompt: string | null;
134
132
  stopWhen: {
135
133
  stepCountIs?: number | undefined;
136
134
  } | null;
135
+ agentId: string;
136
+ prompt: string | null;
137
137
  conversationHistoryConfig: ConversationHistoryConfig | null;
138
138
  }>;
139
139
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -12,14 +12,14 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
12
12
  scopes: ProjectScopeConfig;
13
13
  toolId: string;
14
14
  }) => Promise<{
15
+ tenantId: string;
16
+ projectId: string;
15
17
  id: string;
16
- name: string;
17
18
  createdAt: string;
19
+ name: string;
18
20
  updatedAt: string;
19
21
  description: string | null;
20
22
  headers: Record<string, string> | null;
21
- projectId: string;
22
- tenantId: string;
23
23
  config: {
24
24
  type: "mcp";
25
25
  mcp: ToolMcpConfig;
@@ -68,14 +68,14 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
68
68
  };
69
69
  }>;
70
70
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
71
+ tenantId: string;
72
+ projectId: string;
71
73
  id: string;
72
- name: string;
73
74
  createdAt: string;
75
+ name: string;
74
76
  updatedAt: string;
75
77
  description: string | null;
76
78
  headers: Record<string, string> | null;
77
- projectId: string;
78
- tenantId: string;
79
79
  config: {
80
80
  type: "mcp";
81
81
  mcp: ToolMcpConfig;
@@ -123,13 +123,13 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
123
123
  needsApproval?: boolean;
124
124
  }> | null;
125
125
  }) => Promise<{
126
+ tenantId: string;
127
+ projectId: string;
126
128
  id: string;
127
129
  createdAt: string;
128
130
  updatedAt: string;
129
131
  headers: Record<string, string> | null;
130
132
  agentId: string;
131
- projectId: string;
132
- tenantId: string;
133
133
  subAgentId: string;
134
134
  toolId: string;
135
135
  selectedTools: string[] | null;
@@ -142,13 +142,13 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
142
142
  subAgentId: string;
143
143
  toolId: string;
144
144
  }) => Promise<{
145
+ tenantId: string;
146
+ projectId: string;
145
147
  id: string;
146
148
  createdAt: string;
147
149
  updatedAt: string;
148
150
  headers: Record<string, string> | null;
149
151
  agentId: string;
150
- projectId: string;
151
- tenantId: string;
152
152
  subAgentId: string;
153
153
  toolId: string;
154
154
  selectedTools: string[] | null;
@@ -170,13 +170,13 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
170
170
  }> | null;
171
171
  relationId?: string;
172
172
  }) => Promise<{
173
+ tenantId: string;
174
+ projectId: string;
173
175
  id: string;
174
176
  createdAt: string;
175
177
  updatedAt: string;
176
178
  headers: Record<string, string> | null;
177
179
  agentId: string;
178
- projectId: string;
179
- tenantId: string;
180
180
  subAgentId: string;
181
181
  toolId: string;
182
182
  selectedTools: string[] | null;
@@ -190,14 +190,14 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
190
190
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
191
191
  data: ToolInsert;
192
192
  }) => Promise<{
193
+ tenantId: string;
194
+ projectId: string;
193
195
  id: string;
194
- name: string;
195
196
  createdAt: string;
197
+ name: string;
196
198
  updatedAt: string;
197
199
  description: string | null;
198
200
  headers: Record<string, string> | null;
199
- projectId: string;
200
- tenantId: string;
201
201
  config: {
202
202
  type: "mcp";
203
203
  mcp: ToolMcpConfig;
@@ -7,28 +7,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
+ tenantId: string;
11
+ projectId: string;
10
12
  id: string;
11
- name: string | null;
12
13
  createdAt: string;
14
+ name: string | null;
13
15
  updatedAt: string;
14
16
  expiresAt: string | null;
15
17
  agentId: string;
16
- projectId: string;
17
- tenantId: string;
18
18
  publicId: string;
19
19
  keyHash: string;
20
20
  keyPrefix: string;
21
21
  lastUsedAt: string | null;
22
22
  } | undefined>;
23
23
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
24
+ tenantId: string;
25
+ projectId: string;
24
26
  id: string;
25
- name: string | null;
26
27
  createdAt: string;
28
+ name: string | null;
27
29
  updatedAt: string;
28
30
  expiresAt: string | null;
29
31
  agentId: string;
30
- projectId: string;
31
- tenantId: string;
32
32
  publicId: string;
33
33
  keyHash: string;
34
34
  keyPrefix: string;
@@ -38,14 +38,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
39
39
  agentId?: string;
40
40
  }) => Promise<{
41
+ tenantId: string;
42
+ projectId: string;
41
43
  id: string;
42
- name: string | null;
43
44
  createdAt: string;
45
+ name: string | null;
44
46
  updatedAt: string;
45
47
  expiresAt: string | null;
46
48
  agentId: string;
47
- projectId: string;
48
- tenantId: string;
49
49
  publicId: string;
50
50
  keyHash: string;
51
51
  keyPrefix: string;
@@ -65,14 +65,14 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
65
65
  };
66
66
  }>;
67
67
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
+ tenantId: string;
69
+ projectId: string;
68
70
  id: string;
69
- name: string | null;
70
71
  createdAt: string;
72
+ name: string | null;
71
73
  updatedAt: string;
72
74
  expiresAt: string | null;
73
75
  agentId: string;
74
- projectId: string;
75
- tenantId: string;
76
76
  publicId: string;
77
77
  keyHash: string;
78
78
  keyPrefix: string;
@@ -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;
19
21
  createdAt: string;
20
22
  updatedAt: string;
23
+ title: string | null;
24
+ metadata: ConversationMetadata | null;
21
25
  ref: {
22
26
  type: "tag" | "commit" | "branch";
23
27
  name: string;
24
28
  hash: string;
25
29
  } | null;
26
30
  userId: string | null;
27
- metadata: ConversationMetadata | null;
28
31
  agentId: string | null;
29
- projectId: string;
30
- tenantId: string;
31
- title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -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;
88
90
  createdAt: string;
89
91
  updatedAt: string;
92
+ title: string | null;
93
+ metadata: ConversationMetadata | null;
90
94
  ref: {
91
95
  type: "tag" | "commit" | "branch";
92
96
  name: string;
93
97
  hash: string;
94
98
  } | null;
95
99
  userId: string | null;
96
- metadata: ConversationMetadata | null;
97
100
  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>;
@@ -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;
124
126
  createdAt: string;
125
127
  updatedAt: string;
128
+ title: string | null;
129
+ metadata: ConversationMetadata | null;
126
130
  ref: {
127
131
  type: "tag" | "commit" | "branch";
128
132
  name: string;
129
133
  hash: string;
130
134
  } | null;
131
135
  userId: string | null;
132
- metadata: ConversationMetadata | null;
133
136
  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;
156
158
  createdAt: string;
157
159
  updatedAt: string;
160
+ title: string | null;
161
+ metadata: ConversationMetadata | null;
158
162
  ref: {
159
163
  type: "tag" | "commit" | "branch";
160
164
  name: string;
161
165
  hash: string;
162
166
  } | null;
163
167
  userId: string | null;
164
- metadata: ConversationMetadata | null;
165
168
  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;
20
- conversationId: string;
19
+ role: string;
21
20
  fromSubAgentId: string | null;
22
21
  toSubAgentId: string | null;
23
22
  fromExternalAgentId: string | null;
24
23
  toExternalAgentId: string | null;
24
+ taskId: string | null;
25
+ a2aTaskId: string | null;
26
+ conversationId: string;
25
27
  fromTeamAgentId: string | null;
26
28
  toTeamAgentId: string | null;
27
29
  visibility: string;
28
30
  messageType: string;
29
- taskId: string | null;
30
31
  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;
151
- conversationId: string;
150
+ role: string;
152
151
  fromSubAgentId: string | null;
153
152
  toSubAgentId: string | null;
154
153
  fromExternalAgentId: string | null;
155
154
  toExternalAgentId: string | null;
155
+ taskId: string | null;
156
+ a2aTaskId: string | null;
157
+ conversationId: string;
156
158
  fromTeamAgentId: string | null;
157
159
  toTeamAgentId: string | null;
158
160
  visibility: string;
159
161
  messageType: string;
160
- taskId: string | null;
161
162
  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;
204
- conversationId: string;
203
+ role: string;
205
204
  fromSubAgentId: string | null;
206
205
  toSubAgentId: string | null;
207
206
  fromExternalAgentId: string | null;
208
207
  toExternalAgentId: string | null;
208
+ taskId: string | null;
209
+ a2aTaskId: string | null;
210
+ conversationId: string;
209
211
  fromTeamAgentId: string | null;
210
212
  toTeamAgentId: string | null;
211
213
  visibility: string;
212
214
  messageType: string;
213
- taskId: string | null;
214
215
  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;
10
12
  createdAt: string;
11
13
  updatedAt: string;
14
+ metadata: TaskMetadataConfig | null;
12
15
  ref: {
13
16
  type: "tag" | "commit" | "branch";
14
17
  name: string;
15
18
  hash: string;
16
19
  } | null;
17
- metadata: TaskMetadataConfig | null;
18
20
  status: string;
19
21
  agentId: string;
20
- projectId: string;
21
- tenantId: string;
22
- contextId: string;
23
22
  subAgentId: string;
23
+ contextId: string;
24
24
  }>;
25
25
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
26
26
  id: string;
@@ -0,0 +1,6 @@
1
+ //#region src/db/utils.d.ts
2
+ declare const isLocalhostUrl: (url: string | undefined) => boolean;
3
+ declare const askConfirmation: (question: string) => Promise<boolean>;
4
+ declare const confirmMigration: (connectionString: string | undefined) => Promise<boolean>;
5
+ //#endregion
6
+ export { askConfirmation, confirmMigration, isLocalhostUrl };
@@ -0,0 +1,42 @@
1
+ import * as readline from "node:readline";
2
+
3
+ //#region src/db/utils.ts
4
+ const isLocalhostUrl = (url) => {
5
+ if (!url) return false;
6
+ try {
7
+ const parsed = new URL(url);
8
+ return parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "::1";
9
+ } catch {
10
+ return url.includes("localhost") || url.includes("127.0.0.1");
11
+ }
12
+ };
13
+ const askConfirmation = (question) => {
14
+ const rl = readline.createInterface({
15
+ input: process.stdin,
16
+ output: process.stdout
17
+ });
18
+ return new Promise((resolve) => {
19
+ rl.question(question, (answer) => {
20
+ rl.close();
21
+ resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
22
+ });
23
+ });
24
+ };
25
+ const confirmMigration = async (connectionString) => {
26
+ if (!connectionString) {
27
+ console.error("❌ Error: Database URL is not set.");
28
+ process.exit(1);
29
+ }
30
+ if (!isLocalhostUrl(connectionString)) {
31
+ console.warn("⚠️ Warning: Database URL is not pointing to localhost. This operation may modify a production database.");
32
+ if (!await askConfirmation("Do you want to proceed? (y/n): ")) {
33
+ console.log("Migration cancelled.");
34
+ process.exit(0);
35
+ }
36
+ console.log("");
37
+ }
38
+ return true;
39
+ };
40
+
41
+ //#endregion
42
+ export { askConfirmation, confirmMigration, isLocalhostUrl };
@@ -6,5 +6,5 @@ import { doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltResolveC
6
6
  import { RefType, checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveRef } from "./ref-helpers.js";
7
7
  import { RefContext, RefMiddlewareOptions, createRefMiddleware, createWriteProtectionMiddleware, refMiddlewareFactory, writeProtectionMiddlewareFactory } from "./ref-middleware.js";
8
8
  import { NestedRefScopeError, WithRefOptions, getCurrentRefScope, getRefScopedDb, isInRefScope, withRef } from "./ref-scope.js";
9
- import { EnsureSchemaSyncOptions, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, syncSchemaFromMain } from "./schema-sync.js";
10
- export { CheckoutBranchParams, CheckoutBranchResult, CreateBranchParams, DeleteBranchParams, EnsureSchemaSyncOptions, GetBranchParams, MAIN_BRANCH_SUFFIX, NestedRefScopeError, RefContext, RefMiddlewareOptions, RefType, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, WithRefOptions, areBranchesSchemaCompatible, branchScopes, checkoutBranch, checkoutRef, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, isInRefScope, isProtectedBranchName, isRefWritable, isValidCommitHash, listBranches, listBranchesForAgent, refMiddlewareFactory, resolveRef, syncSchemaFromMain, withRef, writeProtectionMiddlewareFactory };
9
+ import { EnsureSchemaSyncOptions, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, isLocalhostUrl, syncSchemaFromMain } from "./schema-sync.js";
10
+ export { CheckoutBranchParams, CheckoutBranchResult, CreateBranchParams, DeleteBranchParams, EnsureSchemaSyncOptions, GetBranchParams, MAIN_BRANCH_SUFFIX, NestedRefScopeError, RefContext, RefMiddlewareOptions, RefType, SCHEMA_SOURCE_BRANCH, SchemaDiff, SchemaSyncOptions, SchemaSyncResult, WithRefOptions, areBranchesSchemaCompatible, branchScopes, checkoutBranch, checkoutRef, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, isInRefScope, isLocalhostUrl, isProtectedBranchName, isRefWritable, isValidCommitHash, listBranches, listBranchesForAgent, refMiddlewareFactory, resolveRef, syncSchemaFromMain, withRef, writeProtectionMiddlewareFactory };
@@ -1,6 +1,6 @@
1
1
  import { doltAdd, doltAddAndCommit, doltCommit, doltDeleteTag, doltHashOf, doltListTags, doltLog, doltReset, doltStatus, doltTag } from "./commit.js";
2
2
  import { doltAbortMerge, doltConflicts, doltMerge, doltMergeStatus, doltResolveConflicts, doltSchemaConflicts, doltTableConflicts } from "./merge.js";
3
- import { SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, syncSchemaFromMain } from "./schema-sync.js";
3
+ import { SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getSchemaDiff, hasSchemaDifferences, hasUncommittedChanges, isLocalhostUrl, syncSchemaFromMain } from "./schema-sync.js";
4
4
  import { MAIN_BRANCH_SUFFIX, checkoutBranch, createBranch, deleteBranch, getBranch, getTenantMainBranch, isProtectedBranchName, listBranches, listBranchesForAgent } from "./branches-api.js";
5
5
  import { checkoutRef, getCurrentBranchOrCommit, getProjectMainResolvedRef, getProjectScopedRef, getTenantScopedRef, isRefWritable, isValidCommitHash, resolveRef } from "./ref-helpers.js";
6
6
  import { doltActiveBranch, doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltGetBranchNamespace, doltListBranches, doltRenameBranch, ensureBranchExists } from "./branch.js";
@@ -8,4 +8,4 @@ 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";
10
10
 
11
- export { MAIN_BRANCH_SUFFIX, NestedRefScopeError, SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, checkoutBranch, checkoutRef, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, isInRefScope, isProtectedBranchName, isRefWritable, isValidCommitHash, listBranches, listBranchesForAgent, refMiddlewareFactory, resolveRef, syncSchemaFromMain, withRef, writeProtectionMiddlewareFactory };
11
+ export { MAIN_BRANCH_SUFFIX, NestedRefScopeError, SCHEMA_SOURCE_BRANCH, areBranchesSchemaCompatible, checkoutBranch, checkoutRef, createBranch, createRefMiddleware, createWriteProtectionMiddleware, deleteBranch, doltAbortMerge, doltActiveBranch, doltAdd, doltAddAndCommit, doltBranch, doltBranchExists, doltCheckout, doltCommit, doltConflicts, doltDeleteBranch, doltDeleteTag, doltDiff, doltDiffSummary, doltGetBranchNamespace, doltHashOf, doltListBranches, doltListTags, doltLog, doltMerge, doltMergeStatus, doltRenameBranch, doltReset, doltResolveConflicts, doltSchemaConflicts, doltStatus, doltTableConflicts, doltTag, ensureBranchExists, ensureSchemaSync, formatSchemaDiffSummary, getActiveBranch, getBranch, getCurrentBranchOrCommit, getCurrentRefScope, getProjectMainResolvedRef, getProjectScopedRef, getRefScopedDb, getSchemaDiff, getTenantMainBranch, getTenantScopedRef, hasSchemaDifferences, hasUncommittedChanges, isInRefScope, isLocalhostUrl, isProtectedBranchName, isRefWritable, isValidCommitHash, listBranches, listBranchesForAgent, refMiddlewareFactory, resolveRef, syncSchemaFromMain, withRef, writeProtectionMiddlewareFactory };
@@ -1,6 +1,8 @@
1
+ import { loadEnvironmentFiles } from "../env.js";
1
2
  import { createAgentsManageDatabaseClient } from "../db/manage/manage-client.js";
2
3
  import { syncSchemaFromMain } from "./schema-sync.js";
3
4
  import { doltCheckout, doltListBranches } from "./branch.js";
5
+ import { confirmMigration } from "../db/utils.js";
4
6
 
5
7
  //#region src/dolt/migrate-all-branches.ts
6
8
  const ansi = {
@@ -22,6 +24,9 @@ const format = {
22
24
  };
23
25
  const ms = (start, end) => `${Math.max(0, end - start)}ms`;
24
26
  const main = async () => {
27
+ loadEnvironmentFiles();
28
+ const connectionString = process.env.INKEEP_AGENTS_MANAGE_DATABASE_URL;
29
+ await confirmMigration(connectionString);
25
30
  const startedAt = Date.now();
26
31
  const db = createAgentsManageDatabaseClient({});
27
32
  const branches = await doltListBranches(db)();