@inkeep/agents-core 0.0.0-dev-20260403190627 → 0.0.0-dev-20260403194639
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.
- package/dist/auth/auth-schema.d.ts +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/data-access/manage/agents.d.ts +25 -25
- package/dist/data-access/manage/artifactComponents.d.ts +14 -14
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/skills.d.ts +11 -11
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +14 -14
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +27 -27
- package/dist/data-access/manage/tools.js +1 -1
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +10 -10
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +27 -27
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/dolt-safe-jsonb.d.ts +12 -0
- package/dist/db/manage/dolt-safe-jsonb.js +61 -0
- package/dist/db/manage/manage-schema.d.ts +483 -483
- package/dist/db/manage/manage-schema.js +40 -39
- package/dist/db/runtime/runtime-schema.d.ts +376 -376
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +45 -45
- package/dist/validation/schemas.d.ts +2312 -2312
- package/package.json +1 -1
|
@@ -10,26 +10,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
+
fromSubAgentId: string | null;
|
|
14
|
+
toSubAgentId: string | null;
|
|
15
|
+
fromExternalAgentId: string | null;
|
|
16
|
+
toExternalAgentId: string | null;
|
|
17
|
+
taskId: string | null;
|
|
18
|
+
a2aTaskId: string | null;
|
|
13
19
|
id: string;
|
|
14
20
|
createdAt: string;
|
|
15
21
|
updatedAt: string;
|
|
16
|
-
metadata: MessageMetadata | null;
|
|
17
|
-
role: string;
|
|
18
|
-
tenantId: string;
|
|
19
22
|
projectId: string;
|
|
23
|
+
tenantId: string;
|
|
24
|
+
metadata: MessageMetadata | null;
|
|
20
25
|
content: MessageContent;
|
|
21
26
|
conversationId: string;
|
|
22
|
-
|
|
23
|
-
toSubAgentId: string | null;
|
|
24
|
-
fromExternalAgentId: string | null;
|
|
25
|
-
toExternalAgentId: string | null;
|
|
27
|
+
role: string;
|
|
26
28
|
fromTeamAgentId: string | null;
|
|
27
29
|
toTeamAgentId: string | null;
|
|
28
30
|
visibility: string;
|
|
29
31
|
messageType: string;
|
|
30
|
-
taskId: string | null;
|
|
31
32
|
parentMessageId: string | null;
|
|
32
|
-
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -144,26 +144,26 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
+
fromSubAgentId: string | null;
|
|
148
|
+
toSubAgentId: string | null;
|
|
149
|
+
fromExternalAgentId: string | null;
|
|
150
|
+
toExternalAgentId: string | null;
|
|
151
|
+
taskId: string | null;
|
|
152
|
+
a2aTaskId: string | null;
|
|
147
153
|
id: string;
|
|
148
154
|
createdAt: string;
|
|
149
155
|
updatedAt: string;
|
|
150
|
-
metadata: MessageMetadata | null;
|
|
151
|
-
role: string;
|
|
152
|
-
tenantId: string;
|
|
153
156
|
projectId: string;
|
|
157
|
+
tenantId: string;
|
|
158
|
+
metadata: MessageMetadata | null;
|
|
154
159
|
content: MessageContent;
|
|
155
160
|
conversationId: string;
|
|
156
|
-
|
|
157
|
-
toSubAgentId: string | null;
|
|
158
|
-
fromExternalAgentId: string | null;
|
|
159
|
-
toExternalAgentId: string | null;
|
|
161
|
+
role: string;
|
|
160
162
|
fromTeamAgentId: string | null;
|
|
161
163
|
toTeamAgentId: string | null;
|
|
162
164
|
visibility: string;
|
|
163
165
|
messageType: string;
|
|
164
|
-
taskId: string | null;
|
|
165
166
|
parentMessageId: string | null;
|
|
166
|
-
a2aTaskId: string | null;
|
|
167
167
|
a2aSessionId: string | null;
|
|
168
168
|
}>;
|
|
169
169
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -197,26 +197,26 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
+
fromSubAgentId: string | null;
|
|
201
|
+
toSubAgentId: string | null;
|
|
202
|
+
fromExternalAgentId: string | null;
|
|
203
|
+
toExternalAgentId: string | null;
|
|
204
|
+
taskId: string | null;
|
|
205
|
+
a2aTaskId: string | null;
|
|
200
206
|
id: string;
|
|
201
207
|
createdAt: string;
|
|
202
208
|
updatedAt: string;
|
|
203
|
-
metadata: MessageMetadata | null;
|
|
204
|
-
role: string;
|
|
205
|
-
tenantId: string;
|
|
206
209
|
projectId: string;
|
|
210
|
+
tenantId: string;
|
|
211
|
+
metadata: MessageMetadata | null;
|
|
207
212
|
content: MessageContent;
|
|
208
213
|
conversationId: string;
|
|
209
|
-
|
|
210
|
-
toSubAgentId: string | null;
|
|
211
|
-
fromExternalAgentId: string | null;
|
|
212
|
-
toExternalAgentId: string | null;
|
|
214
|
+
role: string;
|
|
213
215
|
fromTeamAgentId: string | null;
|
|
214
216
|
toTeamAgentId: string | null;
|
|
215
217
|
visibility: string;
|
|
216
218
|
messageType: string;
|
|
217
|
-
taskId: string | null;
|
|
218
219
|
parentMessageId: string | null;
|
|
219
|
-
a2aTaskId: string | null;
|
|
220
220
|
a2aSessionId: string | null;
|
|
221
221
|
}>;
|
|
222
222
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|
|
43
|
-
status: "pending" | "
|
|
43
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
44
44
|
scheduledFor: string;
|
|
45
45
|
startedAt: string | null;
|
|
46
46
|
completedAt: string | null;
|
|
@@ -194,7 +194,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
194
194
|
name: string;
|
|
195
195
|
hash: string;
|
|
196
196
|
} | null;
|
|
197
|
-
status: "pending" | "
|
|
197
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
198
198
|
scheduledFor: string;
|
|
199
199
|
startedAt: string | null;
|
|
200
200
|
completedAt: string | null;
|
|
@@ -233,7 +233,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
233
233
|
name: string;
|
|
234
234
|
hash: string;
|
|
235
235
|
} | null;
|
|
236
|
-
status: "pending" | "
|
|
236
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
237
237
|
scheduledFor: string;
|
|
238
238
|
startedAt: string | null;
|
|
239
239
|
completedAt: string | null;
|
|
@@ -285,7 +285,7 @@ declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabase
|
|
|
285
285
|
name: string;
|
|
286
286
|
hash: string;
|
|
287
287
|
} | null;
|
|
288
|
-
status: "pending" | "
|
|
288
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
289
289
|
scheduledFor: string;
|
|
290
290
|
startedAt: string | null;
|
|
291
291
|
completedAt: string | null;
|
|
@@ -7,20 +7,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
|
+
subAgentId: string;
|
|
10
11
|
id: string;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
updatedAt: string;
|
|
13
12
|
ref: {
|
|
14
13
|
type: "commit" | "tag" | "branch";
|
|
15
14
|
name: string;
|
|
16
15
|
hash: string;
|
|
17
16
|
} | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
tenantId: string;
|
|
18
21
|
metadata: TaskMetadataConfig | null;
|
|
19
22
|
status: string;
|
|
20
|
-
tenantId: string;
|
|
21
|
-
projectId: string;
|
|
22
23
|
agentId: string;
|
|
23
|
-
subAgentId: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as drizzle_orm_pg_core1458 from "drizzle-orm/pg-core";
|
|
2
|
+
|
|
3
|
+
//#region src/db/manage/dolt-safe-jsonb.d.ts
|
|
4
|
+
declare function encodeBackslashes(value: unknown): unknown;
|
|
5
|
+
declare function decodeBackslashes(value: unknown): unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Drop-in replacement for drizzle-orm's `jsonb()`.
|
|
8
|
+
* Encodes backslashes on write and decodes on read to work around the Doltgres bug.
|
|
9
|
+
*/
|
|
10
|
+
declare function jsonb(name: string): ReturnType<typeof drizzle_orm_pg_core1458.jsonb>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { decodeBackslashes, encodeBackslashes, jsonb };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PgJsonb, PgJsonbBuilder } from "drizzle-orm/pg-core";
|
|
2
|
+
|
|
3
|
+
//#region src/db/manage/dolt-safe-jsonb.ts
|
|
4
|
+
/**
|
|
5
|
+
* Workaround for Doltgres JSON parser bug.
|
|
6
|
+
*
|
|
7
|
+
* Doltgres has an off-by-one error in its JSON escape-sequence state machine:
|
|
8
|
+
* after parsing `\\` (escaped backslash), the parser doesn't reset to normal
|
|
9
|
+
* mode, so the next character is incorrectly treated as an escape character.
|
|
10
|
+
*
|
|
11
|
+
* The workaround encodes literal backslash characters in string values as a
|
|
12
|
+
* Unicode Private-Use-Area character (U+E000) before JSON.stringify, so the
|
|
13
|
+
* serialised JSON never contains `\\`. On read the placeholder is decoded back.
|
|
14
|
+
*
|
|
15
|
+
* Usage: import { jsonb } from './dolt-safe-jsonb' instead of from 'drizzle-orm/pg-core'.
|
|
16
|
+
* All existing .$type<T>(), .notNull(), .default() chains work unchanged.
|
|
17
|
+
*/
|
|
18
|
+
const BACKSLASH_PLACEHOLDER = "";
|
|
19
|
+
function encodeBackslashes(value) {
|
|
20
|
+
if (typeof value === "string") return value.replaceAll("\0", "").replaceAll("\\", BACKSLASH_PLACEHOLDER);
|
|
21
|
+
if (Array.isArray(value)) return value.map(encodeBackslashes);
|
|
22
|
+
if (value !== null && typeof value === "object") {
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const [k, v] of Object.entries(value)) out[k] = encodeBackslashes(v);
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
function decodeBackslashes(value) {
|
|
30
|
+
if (typeof value === "string") return value.replaceAll(BACKSLASH_PLACEHOLDER, "\\");
|
|
31
|
+
if (Array.isArray(value)) return value.map(decodeBackslashes);
|
|
32
|
+
if (value !== null && typeof value === "object") {
|
|
33
|
+
const out = {};
|
|
34
|
+
for (const [k, v] of Object.entries(value)) out[k] = decodeBackslashes(v);
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
var DoltSafeJsonb = class extends PgJsonb {
|
|
40
|
+
mapToDriverValue(value) {
|
|
41
|
+
return super.mapToDriverValue(encodeBackslashes(value));
|
|
42
|
+
}
|
|
43
|
+
mapFromDriverValue(value) {
|
|
44
|
+
return decodeBackslashes(super.mapFromDriverValue(value));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var DoltSafeJsonbBuilder = class extends PgJsonbBuilder {
|
|
48
|
+
build(table) {
|
|
49
|
+
return new DoltSafeJsonb(table, this.config);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Drop-in replacement for drizzle-orm's `jsonb()`.
|
|
54
|
+
* Encodes backslashes on write and decodes on read to work around the Doltgres bug.
|
|
55
|
+
*/
|
|
56
|
+
function jsonb(name) {
|
|
57
|
+
return new DoltSafeJsonbBuilder(name);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { decodeBackslashes, encodeBackslashes, jsonb };
|