@inkeep/agents-core 0.0.0-dev-20260317180950 → 0.0.0-dev-20260317210645

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,20 +16,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  total: number;
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
- id: string;
20
- tenantId: string;
21
- projectId: string;
22
- agentId: string | null;
23
19
  title: string | null;
20
+ id: string;
24
21
  createdAt: string;
25
22
  updatedAt: string;
26
- metadata: ConversationMetadata | null;
27
23
  ref: {
28
24
  type: "commit" | "tag" | "branch";
29
25
  name: string;
30
26
  hash: string;
31
27
  } | null;
32
28
  userId: string | null;
29
+ metadata: ConversationMetadata | null;
30
+ tenantId: string;
31
+ projectId: string;
32
+ agentId: string | null;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  }>;
@@ -85,20 +85,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  scopes: ProjectScopeConfig;
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
- id: string;
89
- tenantId: string;
90
- projectId: string;
91
- agentId: string | null;
92
88
  title: string | null;
89
+ id: string;
93
90
  createdAt: string;
94
91
  updatedAt: string;
95
- metadata: ConversationMetadata | null;
96
92
  ref: {
97
93
  type: "commit" | "tag" | "branch";
98
94
  name: string;
99
95
  hash: string;
100
96
  } | null;
101
97
  userId: string | null;
98
+ metadata: ConversationMetadata | null;
99
+ tenantId: string;
100
+ projectId: string;
101
+ agentId: string | null;
102
102
  activeSubAgentId: string;
103
103
  lastContextResolution: string | null;
104
104
  } | undefined>;
@@ -121,20 +121,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  metadata?: ConversationMetadata | null | undefined;
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
- id: string;
125
- tenantId: string;
126
- projectId: string;
127
- agentId: string | null;
128
124
  title: string | null;
125
+ id: string;
129
126
  createdAt: string;
130
127
  updatedAt: string;
131
- metadata: ConversationMetadata | null;
132
128
  ref: {
133
129
  type: "commit" | "tag" | "branch";
134
130
  name: string;
135
131
  hash: string;
136
132
  } | null;
137
133
  userId: string | null;
134
+ metadata: ConversationMetadata | null;
135
+ tenantId: string;
136
+ projectId: string;
137
+ agentId: string | null;
138
138
  activeSubAgentId: string;
139
139
  lastContextResolution: string | null;
140
140
  }>;
@@ -153,20 +153,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  scopes: ProjectScopeConfig;
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
- id: string;
157
- tenantId: string;
158
- projectId: string;
159
- agentId: string | null;
160
156
  title: string | null;
157
+ id: string;
161
158
  createdAt: string;
162
159
  updatedAt: string;
163
- metadata: ConversationMetadata | null;
164
160
  ref: {
165
161
  type: "commit" | "tag" | "branch";
166
162
  name: string;
167
163
  hash: string;
168
164
  } | null;
169
165
  userId: string | null;
166
+ metadata: ConversationMetadata | null;
167
+ tenantId: string;
168
+ projectId: string;
169
+ agentId: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -11,13 +11,13 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  messageId: string;
12
12
  }) => Promise<{
13
13
  id: string;
14
- tenantId: string;
15
- projectId: string;
16
14
  createdAt: string;
17
15
  updatedAt: string;
18
16
  metadata: MessageMetadata | null;
19
- content: MessageContent;
20
17
  role: string;
18
+ content: MessageContent;
19
+ tenantId: string;
20
+ projectId: string;
21
21
  conversationId: string;
22
22
  fromSubAgentId: string | null;
23
23
  toSubAgentId: string | null;
@@ -140,15 +140,18 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
140
140
  tenantId: string;
141
141
  id: string;
142
142
  }[]>;
143
- declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
+ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
144
+ scopes: ProjectScopeConfig;
145
+ data: Omit<MessageInsert, "tenantId" | "projectId">;
146
+ }) => Promise<{
144
147
  id: string;
145
- tenantId: string;
146
- projectId: string;
147
148
  createdAt: string;
148
149
  updatedAt: string;
149
150
  metadata: MessageMetadata | null;
150
- content: MessageContent;
151
151
  role: string;
152
+ content: MessageContent;
153
+ tenantId: string;
154
+ projectId: string;
152
155
  conversationId: string;
153
156
  fromSubAgentId: string | null;
154
157
  toSubAgentId: string | null;
@@ -195,13 +198,13 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
195
198
  messageId: string;
196
199
  }) => Promise<{
197
200
  id: string;
198
- tenantId: string;
199
- projectId: string;
200
201
  createdAt: string;
201
202
  updatedAt: string;
202
203
  metadata: MessageMetadata | null;
203
- content: MessageContent;
204
204
  role: string;
205
+ content: MessageContent;
206
+ tenantId: string;
207
+ projectId: string;
205
208
  conversationId: string;
206
209
  fromSubAgentId: string | null;
207
210
  toSubAgentId: string | null;
@@ -32,9 +32,12 @@ const getVisibleMessages = (db) => async (params) => {
32
32
  return await db.select().from(messages).where(and(projectScopedWhere(messages, params.scopes), eq(messages.conversationId, params.conversationId), inArray(messages.visibility, visibilityFilter))).limit(limit).offset(offset).orderBy(asc(messages.createdAt));
33
33
  };
34
34
  const createMessage = (db) => async (params) => {
35
+ const { scopes, data } = params;
35
36
  const now = (/* @__PURE__ */ new Date()).toISOString();
36
37
  const [created] = await db.insert(messages).values({
37
- ...params,
38
+ ...data,
39
+ tenantId: scopes.tenantId,
40
+ projectId: scopes.projectId,
38
41
  createdAt: now,
39
42
  updatedAt: now
40
43
  }).returning();
@@ -34,7 +34,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
34
34
  }) => Promise<{
35
35
  data: {
36
36
  scheduledTriggerId: string;
37
- status: "pending" | "failed" | "running" | "completed" | "cancelled";
37
+ status: "pending" | "running" | "completed" | "failed" | "cancelled";
38
38
  scheduledFor: string;
39
39
  startedAt: string | null;
40
40
  completedAt: string | null;
@@ -174,7 +174,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
174
174
  }) => Promise<{
175
175
  data: {
176
176
  scheduledTriggerId: string;
177
- status: "pending" | "failed" | "running" | "completed" | "cancelled";
177
+ status: "pending" | "running" | "completed" | "failed" | "cancelled";
178
178
  scheduledFor: string;
179
179
  startedAt: string | null;
180
180
  completedAt: string | null;
@@ -208,7 +208,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
208
208
  }) => Promise<{
209
209
  data: {
210
210
  scheduledTriggerId: string;
211
- status: "pending" | "failed" | "running" | "completed" | "cancelled";
211
+ status: "pending" | "running" | "completed" | "failed" | "cancelled";
212
212
  scheduledFor: string;
213
213
  startedAt: string | null;
214
214
  completedAt: string | null;
@@ -8,20 +8,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
8
8
  //#region src/data-access/runtime/tasks.d.ts
9
9
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
10
10
  id: string;
11
- tenantId: string;
12
- projectId: string;
13
- agentId: string;
14
11
  createdAt: string;
15
12
  updatedAt: string;
16
- metadata: TaskMetadataConfig | null;
17
13
  ref: {
18
14
  type: "commit" | "tag" | "branch";
19
15
  name: string;
20
16
  hash: string;
21
17
  } | null;
18
+ metadata: TaskMetadataConfig | null;
22
19
  status: string;
23
- subAgentId: string;
20
+ tenantId: string;
21
+ projectId: string;
22
+ agentId: string;
24
23
  contextId: string;
24
+ subAgentId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
27
27
  id: string;