@inkeep/agents-core 0.54.0 → 0.55.0

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.
@@ -4,7 +4,7 @@ import * as zod0 from "zod";
4
4
  import * as better_auth0 from "better-auth";
5
5
  import { BetterAuthAdvancedOptions } from "better-auth";
6
6
  import * as _better_auth_sso0 from "@better-auth/sso";
7
- import * as better_auth_plugins0 from "better-auth/plugins";
7
+ import * as better_auth_plugins20 from "better-auth/plugins";
8
8
  import { GoogleOptions } from "better-auth/social-providers";
9
9
 
10
10
  //#region src/auth/auth.d.ts
@@ -252,7 +252,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
252
252
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
253
253
  }[];
254
254
  };
255
- options: better_auth_plugins0.BearerOptions | undefined;
255
+ options: better_auth_plugins20.BearerOptions | undefined;
256
256
  }, {
257
257
  id: "sso";
258
258
  endpoints: {
@@ -1243,30 +1243,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1243
1243
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
1244
1244
  }[];
1245
1245
  };
1246
- }, better_auth_plugins0.DefaultOrganizationPlugin<{
1246
+ }, better_auth_plugins20.DefaultOrganizationPlugin<{
1247
1247
  allowUserToCreateOrganization: true;
1248
- ac: better_auth_plugins0.AccessControl;
1248
+ ac: better_auth_plugins20.AccessControl;
1249
1249
  roles: {
1250
1250
  member: {
1251
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1252
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1251
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1252
+ actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1253
1253
  connector: "OR" | "AND";
1254
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1255
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1254
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1255
+ statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1256
1256
  };
1257
1257
  admin: {
1258
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1259
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1258
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1259
+ actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1260
1260
  connector: "OR" | "AND";
1261
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1262
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1261
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1262
+ statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1263
1263
  };
1264
1264
  owner: {
1265
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1266
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key];
1265
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1266
+ actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1267
1267
  connector: "OR" | "AND";
1268
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1269
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1268
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1269
+ statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1270
1270
  };
1271
1271
  };
1272
1272
  creatorRole: "admin";
@@ -1277,9 +1277,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1277
1277
  id: string;
1278
1278
  role: string;
1279
1279
  email: string;
1280
- organization: better_auth_plugins0.Organization;
1281
- invitation: better_auth_plugins0.Invitation;
1282
- inviter: better_auth_plugins0.Member & {
1280
+ organization: better_auth_plugins20.Organization;
1281
+ invitation: better_auth_plugins20.Invitation;
1282
+ inviter: better_auth_plugins20.Member & {
1283
1283
  user: better_auth0.User;
1284
1284
  };
1285
1285
  }): Promise<void>;
@@ -1314,28 +1314,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1314
1314
  user,
1315
1315
  organization: org
1316
1316
  }: {
1317
- invitation: better_auth_plugins0.Invitation & Record<string, any>;
1318
- member: better_auth_plugins0.Member & Record<string, any>;
1317
+ invitation: better_auth_plugins20.Invitation & Record<string, any>;
1318
+ member: better_auth_plugins20.Member & Record<string, any>;
1319
1319
  user: better_auth0.User & Record<string, any>;
1320
- organization: better_auth_plugins0.Organization & Record<string, any>;
1320
+ organization: better_auth_plugins20.Organization & Record<string, any>;
1321
1321
  }) => Promise<void>;
1322
1322
  beforeUpdateMemberRole: ({
1323
1323
  member,
1324
1324
  organization: org,
1325
1325
  newRole
1326
1326
  }: {
1327
- member: better_auth_plugins0.Member & Record<string, any>;
1327
+ member: better_auth_plugins20.Member & Record<string, any>;
1328
1328
  newRole: string;
1329
1329
  user: better_auth0.User & Record<string, any>;
1330
- organization: better_auth_plugins0.Organization & Record<string, any>;
1330
+ organization: better_auth_plugins20.Organization & Record<string, any>;
1331
1331
  }) => Promise<void>;
1332
1332
  beforeRemoveMember: ({
1333
1333
  member,
1334
1334
  organization: org
1335
1335
  }: {
1336
- member: better_auth_plugins0.Member & Record<string, any>;
1336
+ member: better_auth_plugins20.Member & Record<string, any>;
1337
1337
  user: better_auth0.User & Record<string, any>;
1338
- organization: better_auth_plugins0.Organization & Record<string, any>;
1338
+ organization: better_auth_plugins20.Organization & Record<string, any>;
1339
1339
  }) => Promise<void>;
1340
1340
  };
1341
1341
  }>, {
@@ -1676,8 +1676,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1676
1676
  readonly AUTHENTICATION_REQUIRED: "Authentication required";
1677
1677
  };
1678
1678
  options: Partial<{
1679
- expiresIn: better_auth_plugins0.TimeString;
1680
- interval: better_auth_plugins0.TimeString;
1679
+ expiresIn: better_auth_plugins20.TimeString;
1680
+ interval: better_auth_plugins20.TimeString;
1681
1681
  deviceCodeLength: number;
1682
1682
  userCodeLength: number;
1683
1683
  schema: {
@@ -1,29 +1,29 @@
1
- import * as better_auth_plugins35 from "better-auth/plugins";
1
+ import * as better_auth_plugins0 from "better-auth/plugins";
2
2
  import { AccessControl } from "better-auth/plugins/access";
3
3
  import { organizationClient } from "better-auth/client/plugins";
4
4
 
5
5
  //#region src/auth/permissions.d.ts
6
6
  declare const ac: AccessControl;
7
7
  declare const memberRole: {
8
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
9
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key];
8
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
9
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
10
10
  connector: "OR" | "AND";
11
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
12
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
11
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
12
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
16
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key];
15
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
16
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
17
17
  connector: "OR" | "AND";
18
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
19
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
18
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
19
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
23
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key];
22
+ authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
23
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
24
24
  connector: "OR" | "AND";
25
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
26
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
25
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
26
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -130,16 +130,20 @@ const discoverToolsFromServer = async (tool, credentialReference, credentialStor
130
130
  });
131
131
  await client.connect();
132
132
  const serverTools = await client.tools();
133
+ const serverInstructions = client.getInstructions()?.replace(/\u0000/g, "");
133
134
  await client.disconnect();
134
135
  const toolOverrides = tool.config.mcp.toolOverrides;
135
- return Object.entries(serverTools).map(([name, toolDef]) => {
136
- const schema = extractInputSchema(toolDef, name, toolOverrides);
137
- return {
138
- name,
139
- description: toolDef.description || "",
140
- inputSchema: schema
141
- };
142
- });
136
+ return {
137
+ tools: Object.entries(serverTools).map(([name, toolDef]) => {
138
+ const schema = extractInputSchema(toolDef, name, toolOverrides);
139
+ return {
140
+ name,
141
+ description: toolDef.description || "",
142
+ inputSchema: schema
143
+ };
144
+ }),
145
+ serverInstructions
146
+ };
143
147
  } catch (error) {
144
148
  logger.error({
145
149
  toolId: tool.id,
@@ -189,6 +193,7 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
189
193
  let lastErrorComputed;
190
194
  let expiresAt;
191
195
  let createdBy;
196
+ let serverInstructions;
192
197
  const credentialReference = credentialReferenceId && dbResult.credentialScope !== "user" ? await getCredentialReference(dbClient)({
193
198
  scopes: {
194
199
  tenantId: dbResult.tenantId,
@@ -209,7 +214,9 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
209
214
  }
210
215
  const mcpServerUrl = dbResult.config.mcp.server.url;
211
216
  try {
212
- availableTools = await discoverToolsFromServer(dbResult, credentialReference, credentialStoreRegistry, userId);
217
+ const discoveryResult = await discoverToolsFromServer(dbResult, credentialReference, credentialStoreRegistry, userId);
218
+ availableTools = discoveryResult.tools;
219
+ serverInstructions = discoveryResult.serverInstructions;
213
220
  status = "healthy";
214
221
  lastErrorComputed = null;
215
222
  } catch (error) {
@@ -235,6 +242,10 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
235
242
  }
236
243
  }
237
244
  const now = (/* @__PURE__ */ new Date()).toISOString();
245
+ const updatedCapabilities = {
246
+ ...capabilities,
247
+ ...serverInstructions !== void 0 && { serverInstructions }
248
+ };
238
249
  try {
239
250
  await updateTool(dbClient)({
240
251
  scopes: {
@@ -244,7 +255,8 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
244
255
  toolId: dbResult.id,
245
256
  data: {
246
257
  updatedAt: now,
247
- lastError: lastErrorComputed
258
+ lastError: lastErrorComputed,
259
+ capabilities: updatedCapabilities
248
260
  }
249
261
  });
250
262
  } catch (updateError) {
@@ -258,7 +270,7 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
258
270
  ...rest,
259
271
  status,
260
272
  availableTools,
261
- capabilities: capabilities || void 0,
273
+ capabilities: Object.keys(updatedCapabilities).length > 0 ? updatedCapabilities : void 0,
262
274
  credentialReferenceId: credentialReferenceId || void 0,
263
275
  createdAt: toISODateString(createdAt),
264
276
  createdBy: createdBy || void 0,
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "body" | "header";
43
+ source: "query" | "header" | "body";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "body" | "header";
49
+ source: "literal" | "header" | "body";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -15,11 +15,11 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
15
15
  agentId: string;
16
16
  createdAt: string;
17
17
  updatedAt: string;
18
- expiresAt: string | null;
19
18
  publicId: string;
20
19
  keyHash: string;
21
20
  keyPrefix: string;
22
21
  lastUsedAt: string | null;
22
+ expiresAt: string | null;
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
25
  id: string;
@@ -29,11 +29,11 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
29
29
  agentId: string;
30
30
  createdAt: string;
31
31
  updatedAt: string;
32
- expiresAt: string | null;
33
32
  publicId: string;
34
33
  keyHash: string;
35
34
  keyPrefix: string;
36
35
  lastUsedAt: string | null;
36
+ expiresAt: string | null;
37
37
  } | undefined>;
38
38
  declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
@@ -46,11 +46,11 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
46
46
  agentId: string;
47
47
  createdAt: string;
48
48
  updatedAt: string;
49
- expiresAt: string | null;
50
49
  publicId: string;
51
50
  keyHash: string;
52
51
  keyPrefix: string;
53
52
  lastUsedAt: string | null;
53
+ expiresAt: string | null;
54
54
  }[]>;
55
55
  declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
56
56
  scopes: ProjectScopeConfig;
@@ -73,11 +73,11 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
73
73
  agentId: string;
74
74
  createdAt: string;
75
75
  updatedAt: string;
76
- expiresAt: string | null;
77
76
  publicId: string;
78
77
  keyHash: string;
79
78
  keyPrefix: string;
80
79
  lastUsedAt: string | null;
80
+ expiresAt: string | null;
81
81
  }>;
82
82
  declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
83
83
  scopes: ProjectScopeConfig;
@@ -24,12 +24,12 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
24
24
  createdAt: string;
25
25
  updatedAt: string;
26
26
  metadata: ConversationMetadata | null;
27
+ userId: string | null;
27
28
  ref: {
28
- type: "tag" | "commit" | "branch";
29
+ type: "commit" | "tag" | "branch";
29
30
  name: string;
30
31
  hash: string;
31
32
  } | null;
32
- userId: string | null;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  }>;
@@ -44,7 +44,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
44
44
  agentId: string | null;
45
45
  activeSubAgentId: string;
46
46
  ref: {
47
- type: "tag" | "commit" | "branch";
47
+ type: "commit" | "tag" | "branch";
48
48
  name: string;
49
49
  hash: string;
50
50
  } | null;
@@ -70,7 +70,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
70
70
  agentId: string | null;
71
71
  activeSubAgentId: string;
72
72
  ref: {
73
- type: "tag" | "commit" | "branch";
73
+ type: "commit" | "tag" | "branch";
74
74
  name: string;
75
75
  hash: string;
76
76
  } | null;
@@ -93,12 +93,12 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
93
93
  createdAt: string;
94
94
  updatedAt: string;
95
95
  metadata: ConversationMetadata | null;
96
+ userId: string | null;
96
97
  ref: {
97
- type: "tag" | "commit" | "branch";
98
+ type: "commit" | "tag" | "branch";
98
99
  name: string;
99
100
  hash: string;
100
101
  } | null;
101
- userId: string | null;
102
102
  activeSubAgentId: string;
103
103
  lastContextResolution: string | null;
104
104
  } | undefined>;
@@ -108,7 +108,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
108
108
  tenantId: string;
109
109
  id: string;
110
110
  ref: {
111
- type: "tag" | "commit" | "branch";
111
+ type: "commit" | "tag" | "branch";
112
112
  name: string;
113
113
  hash: string;
114
114
  };
@@ -129,12 +129,12 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
129
129
  createdAt: string;
130
130
  updatedAt: string;
131
131
  metadata: ConversationMetadata | null;
132
+ userId: string | null;
132
133
  ref: {
133
- type: "tag" | "commit" | "branch";
134
+ type: "commit" | "tag" | "branch";
134
135
  name: string;
135
136
  hash: string;
136
137
  } | null;
137
- userId: string | null;
138
138
  activeSubAgentId: string;
139
139
  lastContextResolution: string | null;
140
140
  }>;
@@ -161,12 +161,12 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
161
161
  createdAt: string;
162
162
  updatedAt: string;
163
163
  metadata: ConversationMetadata | null;
164
+ userId: string | null;
164
165
  ref: {
165
- type: "tag" | "commit" | "branch";
166
+ type: "commit" | "tag" | "branch";
166
167
  name: string;
167
168
  hash: string;
168
169
  } | null;
169
- userId: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -17,19 +17,19 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
17
17
  updatedAt: string;
18
18
  metadata: MessageMetadata | null;
19
19
  content: MessageContent;
20
- role: string;
21
- conversationId: string;
22
20
  fromSubAgentId: string | null;
23
21
  toSubAgentId: string | null;
24
22
  fromExternalAgentId: string | null;
25
23
  toExternalAgentId: string | null;
24
+ taskId: string | null;
25
+ a2aTaskId: string | null;
26
+ conversationId: string;
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: {
@@ -148,19 +148,19 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageIn
148
148
  updatedAt: string;
149
149
  metadata: MessageMetadata | null;
150
150
  content: MessageContent;
151
- role: string;
152
- conversationId: string;
153
151
  fromSubAgentId: string | null;
154
152
  toSubAgentId: string | null;
155
153
  fromExternalAgentId: string | null;
156
154
  toExternalAgentId: string | null;
155
+ taskId: string | null;
156
+ a2aTaskId: string | null;
157
+ conversationId: string;
158
+ role: string;
157
159
  fromTeamAgentId: string | null;
158
160
  toTeamAgentId: string | null;
159
161
  visibility: string;
160
162
  messageType: string;
161
- taskId: string | null;
162
163
  parentMessageId: string | null;
163
- a2aTaskId: string | null;
164
164
  a2aSessionId: string | null;
165
165
  }>;
166
166
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -201,19 +201,19 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
201
201
  updatedAt: string;
202
202
  metadata: MessageMetadata | null;
203
203
  content: MessageContent;
204
- role: string;
205
- conversationId: string;
206
204
  fromSubAgentId: string | null;
207
205
  toSubAgentId: string | null;
208
206
  fromExternalAgentId: string | null;
209
207
  toExternalAgentId: string | null;
208
+ taskId: string | null;
209
+ a2aTaskId: string | null;
210
+ conversationId: string;
211
+ role: string;
210
212
  fromTeamAgentId: string | null;
211
213
  toTeamAgentId: string | null;
212
214
  visibility: string;
213
215
  messageType: string;
214
- taskId: string | null;
215
216
  parentMessageId: string | null;
216
- a2aTaskId: string | null;
217
217
  a2aSessionId: string | null;
218
218
  }>;
219
219
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -13,14 +13,14 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  metadata: TaskMetadataConfig | null;
16
+ subAgentId: string;
17
+ status: string;
18
+ contextId: string;
16
19
  ref: {
17
- type: "tag" | "commit" | "branch";
20
+ type: "commit" | "tag" | "branch";
18
21
  name: string;
19
22
  hash: string;
20
23
  } | null;
21
- status: string;
22
- subAgentId: string;
23
- contextId: 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;
@@ -814,13 +814,13 @@ declare const triggers: drizzle_orm_pg_core1547.PgTableWithColumns<{
814
814
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
815
815
  encoding: "hex" | "base64";
816
816
  signature: {
817
- source: "query" | "body" | "header";
817
+ source: "query" | "header" | "body";
818
818
  key: string;
819
819
  prefix?: string | undefined;
820
820
  regex?: string | undefined;
821
821
  };
822
822
  signedComponents: {
823
- source: "literal" | "body" | "header";
823
+ source: "literal" | "header" | "body";
824
824
  required: boolean;
825
825
  key?: string | undefined;
826
826
  value?: string | undefined;
@@ -851,13 +851,13 @@ declare const triggers: drizzle_orm_pg_core1547.PgTableWithColumns<{
851
851
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
852
852
  encoding: "hex" | "base64";
853
853
  signature: {
854
- source: "query" | "body" | "header";
854
+ source: "query" | "header" | "body";
855
855
  key: string;
856
856
  prefix?: string | undefined;
857
857
  regex?: string | undefined;
858
858
  };
859
859
  signedComponents: {
860
- source: "literal" | "body" | "header";
860
+ source: "literal" | "header" | "body";
861
861
  required: boolean;
862
862
  key?: string | undefined;
863
863
  value?: string | undefined;
@@ -216,7 +216,7 @@ declare const conversations: drizzle_orm_pg_core1901.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_core1901.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_core1901.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_core1901.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
  };
@@ -3083,7 +3083,7 @@ declare const contextCache: drizzle_orm_pg_core1901.PgTableWithColumns<{
3083
3083
  dataType: "json";
3084
3084
  columnType: "PgJsonb";
3085
3085
  data: {
3086
- type: "tag" | "commit" | "branch";
3086
+ type: "commit" | "tag" | "branch";
3087
3087
  name: string;
3088
3088
  hash: string;
3089
3089
  };
@@ -3099,7 +3099,7 @@ declare const contextCache: drizzle_orm_pg_core1901.PgTableWithColumns<{
3099
3099
  generated: undefined;
3100
3100
  }, {}, {
3101
3101
  $type: {
3102
- type: "tag" | "commit" | "branch";
3102
+ type: "commit" | "tag" | "branch";
3103
3103
  name: string;
3104
3104
  hash: string;
3105
3105
  };
@@ -4003,7 +4003,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1901.PgTableWithCol
4003
4003
  tableName: "work_app_github_installations";
4004
4004
  dataType: "string";
4005
4005
  columnType: "PgVarchar";
4006
- data: "User" | "Organization";
4006
+ data: "Organization" | "User";
4007
4007
  driverParam: string;
4008
4008
  notNull: true;
4009
4009
  hasDefault: false;
@@ -4016,7 +4016,7 @@ declare const workAppGitHubInstallations: drizzle_orm_pg_core1901.PgTableWithCol
4016
4016
  generated: undefined;
4017
4017
  }, {}, {
4018
4018
  length: 20;
4019
- $type: "User" | "Organization";
4019
+ $type: "Organization" | "User";
4020
4020
  }>;
4021
4021
  status: drizzle_orm_pg_core1901.PgColumn<{
4022
4022
  name: "status";
@@ -1,6 +1,6 @@
1
- import * as hono0 from "hono";
1
+ import * as hono3 from "hono";
2
2
 
3
3
  //#region src/middleware/no-auth.d.ts
4
- declare const noAuth: () => hono0.MiddlewareHandler<any, string, {}, Response>;
4
+ declare const noAuth: () => hono3.MiddlewareHandler<any, string, {}, Response>;
5
5
  //#endregion
6
6
  export { noAuth };
@@ -157,6 +157,7 @@ type ToolServerCapabilities = {
157
157
  prompts?: boolean;
158
158
  logging?: boolean;
159
159
  streaming?: boolean;
160
+ serverInstructions?: string;
160
161
  };
161
162
  type TaskMetadataConfig = {
162
163
  conversation_id: string;