@inkeep/agents-core 0.0.0-dev-20260326163133 → 0.0.0-dev-20260326201814
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.d.ts +6 -6
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agentFull.js +10 -5
- package/dist/data-access/manage/agents.d.ts +37 -31
- package/dist/data-access/manage/agents.js +2 -0
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/skills.d.ts +13 -13
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +30 -30
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +21 -21
- package/dist/data-access/manage/tools.d.ts +30 -30
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +8 -8
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/data-access/runtime/workflowExecutions.d.ts +25 -0
- package/dist/data-access/runtime/workflowExecutions.js +32 -0
- package/dist/db/manage/manage-schema.d.ts +377 -357
- package/dist/db/manage/manage-schema.js +1 -0
- package/dist/db/runtime/runtime-schema.d.ts +496 -303
- package/dist/db/runtime/runtime-schema.js +16 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/types/entities.d.ts +5 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +2020 -1861
- package/dist/validation/schemas.js +16 -3
- package/drizzle/manage/0013_gorgeous_umar.sql +1 -0
- package/drizzle/manage/meta/0013_snapshot.json +3704 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/0026_graceful_scorpion.sql +15 -0
- package/drizzle/runtime/meta/{0025_snapshot.json → 0026_snapshot.json} +114 -1
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -10,14 +10,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
id: string;
|
|
14
13
|
tenantId: string;
|
|
15
|
-
|
|
14
|
+
id: string;
|
|
16
15
|
createdAt: string;
|
|
17
16
|
updatedAt: string;
|
|
18
17
|
metadata: MessageMetadata | null;
|
|
19
|
-
content: MessageContent;
|
|
20
18
|
role: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
content: MessageContent;
|
|
21
21
|
conversationId: string;
|
|
22
22
|
fromSubAgentId: string | null;
|
|
23
23
|
toSubAgentId: string | null;
|
|
@@ -144,14 +144,14 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
-
id: string;
|
|
148
147
|
tenantId: string;
|
|
149
|
-
|
|
148
|
+
id: string;
|
|
150
149
|
createdAt: string;
|
|
151
150
|
updatedAt: string;
|
|
152
151
|
metadata: MessageMetadata | null;
|
|
153
|
-
content: MessageContent;
|
|
154
152
|
role: string;
|
|
153
|
+
projectId: string;
|
|
154
|
+
content: MessageContent;
|
|
155
155
|
conversationId: string;
|
|
156
156
|
fromSubAgentId: string | null;
|
|
157
157
|
toSubAgentId: string | null;
|
|
@@ -197,14 +197,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
-
id: string;
|
|
201
200
|
tenantId: string;
|
|
202
|
-
|
|
201
|
+
id: string;
|
|
203
202
|
createdAt: string;
|
|
204
203
|
updatedAt: string;
|
|
205
204
|
metadata: MessageMetadata | null;
|
|
206
|
-
content: MessageContent;
|
|
207
205
|
role: string;
|
|
206
|
+
projectId: string;
|
|
207
|
+
content: MessageContent;
|
|
208
208
|
conversationId: string;
|
|
209
209
|
fromSubAgentId: string | null;
|
|
210
210
|
toSubAgentId: string | null;
|
|
@@ -7,19 +7,19 @@ 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
|
-
id: string;
|
|
11
10
|
tenantId: string;
|
|
12
|
-
|
|
13
|
-
agentId: string;
|
|
11
|
+
id: string;
|
|
14
12
|
createdAt: string;
|
|
15
13
|
updatedAt: string;
|
|
16
|
-
metadata: TaskMetadataConfig | null;
|
|
17
14
|
ref: {
|
|
18
15
|
type: "commit" | "tag" | "branch";
|
|
19
16
|
name: string;
|
|
20
17
|
hash: string;
|
|
21
18
|
} | null;
|
|
19
|
+
metadata: TaskMetadataConfig | null;
|
|
22
20
|
status: string;
|
|
21
|
+
projectId: string;
|
|
22
|
+
agentId: string;
|
|
23
23
|
subAgentId: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../../types/index.js";
|
|
2
|
+
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
3
|
+
import { WorkflowExecutionInsert, WorkflowExecutionSelect } from "../../types/entities.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/runtime/workflowExecutions.d.ts
|
|
6
|
+
declare const createWorkflowExecution: (db: AgentsRunDatabaseClient) => (params: WorkflowExecutionInsert) => Promise<WorkflowExecutionSelect>;
|
|
7
|
+
declare const getWorkflowExecution: (db: AgentsRunDatabaseClient) => (params: {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
id: string;
|
|
11
|
+
}) => Promise<WorkflowExecutionSelect | null>;
|
|
12
|
+
declare const getWorkflowExecutionByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
conversationId: string;
|
|
16
|
+
}) => Promise<WorkflowExecutionSelect | null>;
|
|
17
|
+
declare const updateWorkflowExecutionStatus: (db: AgentsRunDatabaseClient) => (params: {
|
|
18
|
+
tenantId: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
id: string;
|
|
21
|
+
status: "running" | "suspended" | "completed" | "failed";
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}) => Promise<WorkflowExecutionSelect | null>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { createWorkflowExecution, getWorkflowExecution, getWorkflowExecutionByConversation, updateWorkflowExecutionStatus };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { workflowExecutions } from "../../db/runtime/runtime-schema.js";
|
|
2
|
+
import { and, desc, eq } from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/runtime/workflowExecutions.ts
|
|
5
|
+
const createWorkflowExecution = (db) => async (params) => {
|
|
6
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7
|
+
const [created] = await db.insert(workflowExecutions).values({
|
|
8
|
+
...params,
|
|
9
|
+
createdAt: now,
|
|
10
|
+
updatedAt: now
|
|
11
|
+
}).returning();
|
|
12
|
+
return created;
|
|
13
|
+
};
|
|
14
|
+
const getWorkflowExecution = (db) => async (params) => {
|
|
15
|
+
return (await db.select().from(workflowExecutions).where(and(eq(workflowExecutions.tenantId, params.tenantId), eq(workflowExecutions.projectId, params.projectId), eq(workflowExecutions.id, params.id))).limit(1))[0] ?? null;
|
|
16
|
+
};
|
|
17
|
+
const getWorkflowExecutionByConversation = (db) => async (params) => {
|
|
18
|
+
return (await db.select().from(workflowExecutions).where(and(eq(workflowExecutions.tenantId, params.tenantId), eq(workflowExecutions.projectId, params.projectId), eq(workflowExecutions.conversationId, params.conversationId))).orderBy(desc(workflowExecutions.createdAt)).limit(1))[0] ?? null;
|
|
19
|
+
};
|
|
20
|
+
const updateWorkflowExecutionStatus = (db) => async (params) => {
|
|
21
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
22
|
+
const updateData = {
|
|
23
|
+
status: params.status,
|
|
24
|
+
updatedAt: now
|
|
25
|
+
};
|
|
26
|
+
if (params.metadata !== void 0) updateData.metadata = params.metadata;
|
|
27
|
+
const [updated] = await db.update(workflowExecutions).set(updateData).where(and(eq(workflowExecutions.tenantId, params.tenantId), eq(workflowExecutions.projectId, params.projectId), eq(workflowExecutions.id, params.id))).returning();
|
|
28
|
+
return updated ?? null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { createWorkflowExecution, getWorkflowExecution, getWorkflowExecutionByConversation, updateWorkflowExecutionStatus };
|