@inkeep/agents-core 0.0.0-dev-20260205203133 → 0.0.0-dev-20260205231249

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.
@@ -57,6 +57,7 @@ interface BetterAuthConfig {
57
57
  baseURL: string;
58
58
  secret: string;
59
59
  dbClient: AgentsRunDatabaseClient;
60
+ cookieDomain?: string;
60
61
  ssoProviders?: SSOProviderConfig[];
61
62
  socialProviders?: {
62
63
  google?: GoogleOptions;
@@ -70,6 +71,23 @@ interface UserAuthConfig {
70
71
  };
71
72
  advanced?: BetterAuthAdvancedOptions;
72
73
  }
74
+ /**
75
+ * Extracts the root domain from a URL for cross-subdomain cookie sharing.
76
+ *
77
+ * When the API and UI share a common 3-part parent (e.g., api.pilot.inkeep.com
78
+ * and pilot.inkeep.com both share .pilot.inkeep.com), the function auto-computes
79
+ * the shared parent. When domains don't share a 3-part parent (e.g.,
80
+ * api.agents.inkeep.com and app.inkeep.com), set AUTH_COOKIE_DOMAIN explicitly.
81
+ *
82
+ * Examples (auto-computed from baseURL):
83
+ * - https://api.pilot.inkeep.com -> .pilot.inkeep.com
84
+ * - https://pilot.inkeep.com -> .pilot.inkeep.com
85
+ * - http://localhost:3002 -> undefined (no domain for localhost)
86
+ *
87
+ * With AUTH_COOKIE_DOMAIN=.inkeep.com:
88
+ * - Any *.inkeep.com URL -> .inkeep.com
89
+ */
90
+ declare function extractCookieDomain(baseURL: string, explicitDomain?: string): string | undefined;
73
91
  declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
74
92
  baseURL: string;
75
93
  secret: string;
@@ -852,25 +870,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
852
870
  ac: better_auth_plugins0.AccessControl;
853
871
  roles: {
854
872
  member: {
855
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
856
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
873
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
874
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
857
875
  connector: "OR" | "AND";
858
876
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
859
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
877
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
860
878
  };
861
879
  admin: {
862
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
863
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
880
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
881
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
864
882
  connector: "OR" | "AND";
865
883
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
866
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
884
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
867
885
  };
868
886
  owner: {
869
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
870
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
887
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
888
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
871
889
  connector: "OR" | "AND";
872
890
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
873
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
891
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
874
892
  };
875
893
  };
876
894
  creatorRole: "admin";
@@ -1162,25 +1180,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1162
1180
  ac: better_auth_plugins0.AccessControl;
1163
1181
  roles: {
1164
1182
  member: {
1165
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1166
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1183
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1184
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1167
1185
  connector: "OR" | "AND";
1168
1186
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1169
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1187
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1170
1188
  };
1171
1189
  admin: {
1172
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1173
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1190
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1191
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1174
1192
  connector: "OR" | "AND";
1175
1193
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1176
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1194
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1177
1195
  };
1178
1196
  owner: {
1179
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key] | {
1180
- actions: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>[key];
1197
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1198
+ actions: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
1181
1199
  connector: "OR" | "AND";
1182
1200
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1183
- statements: better_auth_plugins0.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins0.Statements>;
1201
+ statements: better_auth_plugins0.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
1184
1202
  };
1185
1203
  };
1186
1204
  creatorRole: "admin";
@@ -1591,4 +1609,4 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1591
1609
  }>;
1592
1610
  declare const auth: ReturnType<typeof createAuth>;
1593
1611
  //#endregion
1594
- export { BetterAuthConfig, OIDCProviderConfig, SAMLProviderConfig, SSOProviderConfig, UserAuthConfig, auth, createAuth };
1612
+ export { BetterAuthConfig, OIDCProviderConfig, SAMLProviderConfig, SSOProviderConfig, UserAuthConfig, auth, createAuth, extractCookieDomain };
package/dist/auth/auth.js CHANGED
@@ -22,16 +22,22 @@ async function getInitialOrganization(dbClient, userId) {
22
22
  }
23
23
  /**
24
24
  * Extracts the root domain from a URL for cross-subdomain cookie sharing.
25
- * For example:
25
+ *
26
+ * When the API and UI share a common 3-part parent (e.g., api.pilot.inkeep.com
27
+ * and pilot.inkeep.com both share .pilot.inkeep.com), the function auto-computes
28
+ * the shared parent. When domains don't share a 3-part parent (e.g.,
29
+ * api.agents.inkeep.com and app.inkeep.com), set AUTH_COOKIE_DOMAIN explicitly.
30
+ *
31
+ * Examples (auto-computed from baseURL):
26
32
  * - https://api.pilot.inkeep.com -> .pilot.inkeep.com
27
33
  * - https://pilot.inkeep.com -> .pilot.inkeep.com
28
34
  * - http://localhost:3002 -> undefined (no domain for localhost)
29
35
  *
30
- * The logic extracts the parent domain that can be shared across subdomains.
31
- * For domains with 3+ parts, it takes everything except the first part.
32
- * For domains with exactly 2 parts, it takes both parts.
36
+ * With AUTH_COOKIE_DOMAIN=.inkeep.com:
37
+ * - Any *.inkeep.com URL -> .inkeep.com
33
38
  */
34
- function extractCookieDomain(baseURL) {
39
+ function extractCookieDomain(baseURL, explicitDomain) {
40
+ if (explicitDomain) return explicitDomain.startsWith(".") ? explicitDomain : `.${explicitDomain}`;
35
41
  try {
36
42
  const hostname = new URL(baseURL).hostname;
37
43
  if (hostname === "localhost" || hostname.match(/^\d+\.\d+\.\d+\.\d+$/)) return;
@@ -65,7 +71,7 @@ async function registerSSOProvider(dbClient, provider) {
65
71
  }
66
72
  }
67
73
  function createAuth(config) {
68
- const cookieDomain = extractCookieDomain(config.baseURL);
74
+ const cookieDomain = extractCookieDomain(config.baseURL, config.cookieDomain);
69
75
  const auth$1 = betterAuth({
70
76
  baseURL: config.baseURL,
71
77
  secret: config.secret,
@@ -114,7 +120,6 @@ function createAuth(config) {
114
120
  sameSite: "none",
115
121
  secure: true,
116
122
  httpOnly: true,
117
- partitioned: true,
118
123
  ...cookieDomain && { domain: cookieDomain }
119
124
  },
120
125
  ...config.advanced
@@ -219,4 +224,4 @@ function createAuth(config) {
219
224
  const auth = null;
220
225
 
221
226
  //#endregion
222
- export { auth, createAuth };
227
+ export { auth, createAuth, extractCookieDomain };
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
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" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
9
- actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
8
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
9
+ actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
10
10
  connector: "OR" | "AND";
11
11
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
12
- statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
12
+ statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
16
- actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
15
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
16
+ actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
17
17
  connector: "OR" | "AND";
18
18
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
19
- statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
19
+ statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "organization" | "ac" | "member" | "project" | "team" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key] | {
23
- actions: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>[key];
22
+ authorize<K_1 extends "project" | "organization" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
23
+ actions: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
24
24
  connector: "OR" | "AND";
25
25
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
26
- statements: better_auth_plugins69.Subset<"organization" | "ac" | "member" | "project" | "team" | "invitation", better_auth_plugins69.Statements>;
26
+ statements: better_auth_plugins69.Subset<"project" | "organization" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -7,12 +7,12 @@ import "./types/index.js";
7
7
  import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
8
8
  import { detectAuthenticationRequired } from "./utils/auth-detection.js";
9
9
  import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
10
- import "./index.js";
11
10
  import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettings, ModelSettingsSchema, ResourceIdSchema, SignatureSource, SignatureVerificationConfig, SignatureVerificationConfigSchema, SignedComponent, StopWhen, StopWhenSchema, SubAgentStopWhen, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
12
11
  import { z } from "@hono/zod-openapi";
13
12
  import { convertJsonSchemaToZod } from "zod-from-json-schema";
14
13
 
15
14
  //#region src/client-exports.d.ts
15
+
16
16
  declare const TenantParamsSchema: z.ZodObject<{
17
17
  tenantId: z.ZodString;
18
18
  }, z.core.$strip>;
@@ -143,9 +143,9 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
143
143
  }, z.core.$strip>>>;
144
144
  }, z.core.$strip>;
145
145
  declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
146
- id: z.ZodString;
147
- name: z.ZodString;
148
146
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ name: z.ZodString;
148
+ id: z.ZodString;
149
149
  props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
150
150
  render: z.ZodOptional<z.ZodNullable<z.ZodType<{
151
151
  component: string;
@@ -192,9 +192,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
192
192
  description: z.ZodOptional<z.ZodString>;
193
193
  defaultSubAgentId: z.ZodOptional<z.ZodString>;
194
194
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
195
- id: z.ZodString;
196
- name: z.ZodString;
197
195
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ name: z.ZodString;
197
+ id: z.ZodString;
198
198
  createdAt: z.ZodOptional<z.ZodString>;
199
199
  updatedAt: z.ZodOptional<z.ZodString>;
200
200
  models: z.ZodOptional<z.ZodObject<{
@@ -79,6 +79,8 @@ declare const QUERY_EXPRESSIONS: {
79
79
  readonly LAST_ACTIVITY: "lastActivity";
80
80
  readonly CONVERSATION_METADATA: "conversationMetadata";
81
81
  readonly FILTERED_CONVERSATIONS: "filteredConversations";
82
+ readonly PAGE_CONVERSATIONS: "pageConversations";
83
+ readonly TOTAL_CONVERSATIONS: "totalConversations";
82
84
  readonly TOOLS: "tools";
83
85
  readonly TRANSFERS: "transfers";
84
86
  readonly DELEGATIONS: "delegations";
@@ -79,6 +79,8 @@ const QUERY_EXPRESSIONS = {
79
79
  LAST_ACTIVITY: "lastActivity",
80
80
  CONVERSATION_METADATA: "conversationMetadata",
81
81
  FILTERED_CONVERSATIONS: "filteredConversations",
82
+ PAGE_CONVERSATIONS: "pageConversations",
83
+ TOTAL_CONVERSATIONS: "totalConversations",
82
84
  TOOLS: "tools",
83
85
  TRANSFERS: "transfers",
84
86
  DELEGATIONS: "delegations",
@@ -8,11 +8,11 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
+ description: string | null;
12
+ name: string;
11
13
  tenantId: string;
12
14
  projectId: string;
13
15
  id: string;
14
- name: string;
15
- description: string | null;
16
16
  prompt: string | null;
17
17
  createdAt: string;
18
18
  updatedAt: string;
@@ -54,11 +54,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
54
54
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
+ description: string | null;
58
+ name: string;
57
59
  tenantId: string;
58
60
  projectId: string;
59
61
  id: string;
60
- name: string;
61
- description: string | null;
62
62
  prompt: string | null;
63
63
  createdAt: string;
64
64
  updatedAt: string;
@@ -97,11 +97,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
97
97
  }[] | undefined;
98
98
  } | null;
99
99
  defaultSubAgent: {
100
+ description: string | null;
101
+ name: string;
100
102
  tenantId: string;
101
103
  projectId: string;
102
104
  id: string;
103
- name: string;
104
- description: string | null;
105
105
  prompt: string | null;
106
106
  agentId: string;
107
107
  createdAt: string;
@@ -129,11 +129,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
129
129
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
+ description: string | null;
133
+ name: string;
132
134
  tenantId: string;
133
135
  projectId: string;
134
136
  id: string;
135
- name: string;
136
- description: string | null;
137
137
  prompt: string | null;
138
138
  createdAt: string;
139
139
  updatedAt: string;
@@ -245,11 +245,11 @@ declare function listAgentsAcrossProjectBranches(db: AgentsManageDatabaseClient,
245
245
  projectIds: string[];
246
246
  }): Promise<AvailableAgentInfo[]>;
247
247
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
248
+ description: string | null;
249
+ name: string;
248
250
  tenantId: string;
249
251
  projectId: string;
250
252
  id: string;
251
- name: string;
252
- description: string | null;
253
253
  prompt: string | null;
254
254
  createdAt: string;
255
255
  updatedAt: string;
@@ -7,11 +7,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
+ description: string | null;
11
+ name: string;
10
12
  tenantId: string;
11
13
  projectId: string;
12
14
  id: string;
13
- name: string;
14
- description: string | null;
15
15
  createdAt: string;
16
16
  updatedAt: string;
17
17
  props: Record<string, unknown> | null;
@@ -49,11 +49,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
49
49
  };
50
50
  }>;
51
51
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
52
+ description: string | null;
53
+ name: string;
52
54
  tenantId: string;
53
55
  projectId: string;
54
56
  id: string;
55
- name: string;
56
- description: string | null;
57
57
  createdAt: string;
58
58
  updatedAt: string;
59
59
  props: Record<string, unknown> | null;
@@ -53,11 +53,11 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
+ description: string | null;
57
+ name: string;
56
58
  tenantId: string;
57
59
  projectId: string;
58
60
  id: string;
59
- name: string;
60
- description: string | null;
61
61
  agentId: string;
62
62
  createdAt: string;
63
63
  updatedAt: string;
@@ -95,11 +95,11 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
+ description: string | null;
99
+ name: string;
98
100
  tenantId: string;
99
101
  projectId: string;
100
102
  id: string;
101
- name: string;
102
- description: string | null;
103
103
  agentId: string;
104
104
  createdAt: string;
105
105
  updatedAt: string;
@@ -8,11 +8,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  subAgentId: string;
10
10
  }) => Promise<{
11
+ description: string | null;
12
+ name: string;
11
13
  tenantId: string;
12
14
  projectId: string;
13
15
  id: string;
14
- name: string;
15
- description: string | null;
16
16
  prompt: string | null;
17
17
  agentId: string;
18
18
  createdAt: string;
@@ -39,11 +39,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
+ description: string | null;
43
+ name: string;
42
44
  tenantId: string;
43
45
  projectId: string;
44
46
  id: string;
45
- name: string;
46
- description: string | null;
47
47
  prompt: string | null;
48
48
  agentId: string;
49
49
  createdAt: string;
@@ -108,11 +108,11 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
108
108
  };
109
109
  }>;
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
+ description: string | null;
112
+ name: string;
111
113
  tenantId: string;
112
114
  projectId: string;
113
115
  id: string;
114
- name: string;
115
- description: string | null;
116
116
  prompt: string | null;
117
117
  agentId: string;
118
118
  createdAt: string;
@@ -18,11 +18,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
18
18
  scopes: ProjectScopeConfig;
19
19
  toolId: string;
20
20
  }) => Promise<{
21
+ description: string | null;
22
+ name: string;
21
23
  tenantId: string;
22
24
  projectId: string;
23
25
  id: string;
24
- name: string;
25
- description: string | null;
26
26
  config: {
27
27
  type: "mcp";
28
28
  mcp: ToolMcpConfig;
@@ -76,11 +76,11 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
76
76
  };
77
77
  }>;
78
78
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
79
+ description: string | null;
80
+ name: string;
79
81
  tenantId: string;
80
82
  projectId: string;
81
83
  id: string;
82
- name: string;
83
- description: string | null;
84
84
  config: {
85
85
  type: "mcp";
86
86
  mcp: ToolMcpConfig;
@@ -200,11 +200,11 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
200
200
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
201
201
  data: ToolInsert;
202
202
  }) => Promise<{
203
+ description: string | null;
204
+ name: string;
203
205
  tenantId: string;
204
206
  projectId: string;
205
207
  id: string;
206
- name: string;
207
- description: string | null;
208
208
  config: {
209
209
  type: "mcp";
210
210
  mcp: ToolMcpConfig;
@@ -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;
@@ -7,10 +7,10 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
+ name: string | null;
10
11
  tenantId: string;
11
12
  projectId: string;
12
13
  id: string;
13
- name: string | null;
14
14
  agentId: string;
15
15
  publicId: string;
16
16
  keyHash: string;
@@ -21,10 +21,10 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
21
21
  updatedAt: string;
22
22
  } | undefined>;
23
23
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
24
+ name: string | null;
24
25
  tenantId: string;
25
26
  projectId: string;
26
27
  id: string;
27
- name: string | null;
28
28
  agentId: string;
29
29
  publicId: string;
30
30
  keyHash: string;
@@ -38,10 +38,10 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
39
39
  agentId?: string;
40
40
  }) => Promise<{
41
+ name: string | null;
41
42
  tenantId: string;
42
43
  projectId: string;
43
44
  id: string;
44
- name: string | null;
45
45
  agentId: string;
46
46
  publicId: string;
47
47
  keyHash: string;
@@ -65,10 +65,10 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
65
65
  };
66
66
  }>;
67
67
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
+ name: string | null;
68
69
  tenantId: string;
69
70
  projectId: string;
70
71
  id: string;
71
- name: string | null;
72
72
  agentId: string;
73
73
  publicId: string;
74
74
  keyHash: string;
@@ -15,17 +15,17 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
15
15
  total: number;
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
+ title: string | null;
18
19
  tenantId: string;
19
20
  projectId: string;
20
21
  id: string;
21
- title: string | null;
22
22
  agentId: string | null;
23
23
  createdAt: string;
24
24
  updatedAt: string;
25
25
  userId: string | null;
26
26
  metadata: ConversationMetadata | null;
27
27
  ref: {
28
- type: "tag" | "commit" | "branch";
28
+ type: "commit" | "tag" | "branch";
29
29
  name: string;
30
30
  hash: string;
31
31
  } | null;
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
43
43
  agentId: string | null;
44
44
  activeSubAgentId: string;
45
45
  ref: {
46
- type: "tag" | "commit" | "branch";
46
+ type: "commit" | "tag" | "branch";
47
47
  name: string;
48
48
  hash: string;
49
49
  } | null;
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
69
69
  agentId: string | null;
70
70
  activeSubAgentId: string;
71
71
  ref: {
72
- type: "tag" | "commit" | "branch";
72
+ type: "commit" | "tag" | "branch";
73
73
  name: string;
74
74
  hash: string;
75
75
  } | null;
@@ -84,17 +84,17 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
84
84
  scopes: ProjectScopeConfig;
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
+ title: string | null;
87
88
  tenantId: string;
88
89
  projectId: string;
89
90
  id: string;
90
- title: string | null;
91
91
  agentId: string | null;
92
92
  createdAt: string;
93
93
  updatedAt: string;
94
94
  userId: string | null;
95
95
  metadata: ConversationMetadata | null;
96
96
  ref: {
97
- type: "tag" | "commit" | "branch";
97
+ type: "commit" | "tag" | "branch";
98
98
  name: string;
99
99
  hash: string;
100
100
  } | null;
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
107
107
  tenantId: string;
108
108
  id: string;
109
109
  ref: {
110
- type: "tag" | "commit" | "branch";
110
+ type: "commit" | "tag" | "branch";
111
111
  name: string;
112
112
  hash: string;
113
113
  };
@@ -120,17 +120,17 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
120
120
  metadata?: ConversationMetadata | null | undefined;
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
+ title: string | null;
123
124
  tenantId: string;
124
125
  projectId: string;
125
126
  id: string;
126
- title: string | null;
127
127
  agentId: string | null;
128
128
  createdAt: string;
129
129
  updatedAt: string;
130
130
  userId: string | null;
131
131
  metadata: ConversationMetadata | null;
132
132
  ref: {
133
- type: "tag" | "commit" | "branch";
133
+ type: "commit" | "tag" | "branch";
134
134
  name: string;
135
135
  hash: string;
136
136
  } | null;
@@ -152,17 +152,17 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
152
152
  scopes: ProjectScopeConfig;
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
+ title: string | null;
155
156
  tenantId: string;
156
157
  projectId: string;
157
158
  id: string;
158
- title: string | null;
159
159
  agentId: string | null;
160
160
  createdAt: string;
161
161
  updatedAt: string;
162
162
  userId: string | null;
163
163
  metadata: ConversationMetadata | null;
164
164
  ref: {
165
- type: "tag" | "commit" | "branch";
165
+ type: "commit" | "tag" | "branch";
166
166
  name: string;
167
167
  hash: string;
168
168
  } | null;