@inkeep/agents-core 0.0.0-dev-20260205195256 → 0.0.0-dev-20260205205159

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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
874
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
881
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
888
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1184
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1191
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1198
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
9
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
16
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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 "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
23
+ actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "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<"organization" | "member" | "invitation" | "project" | "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>;
@@ -194,9 +194,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
194
194
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
195
195
  id: z.ZodString;
196
196
  name: z.ZodString;
197
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
197
  createdAt: z.ZodOptional<z.ZodString>;
199
198
  updatedAt: z.ZodOptional<z.ZodString>;
199
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
200
  models: z.ZodOptional<z.ZodObject<{
201
201
  base: z.ZodOptional<z.ZodObject<{
202
202
  model: z.ZodOptional<z.ZodString>;
@@ -8,14 +8,14 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
12
  name: string;
15
- description: string | null;
16
- prompt: string | null;
17
13
  createdAt: string;
18
14
  updatedAt: string;
15
+ tenantId: string;
16
+ projectId: string;
17
+ description: string | null;
18
+ prompt: string | null;
19
19
  models: {
20
20
  base?: {
21
21
  model?: string | undefined;
@@ -54,14 +54,14 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
54
54
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
- tenantId: string;
58
- projectId: string;
59
57
  id: string;
60
58
  name: string;
61
- description: string | null;
62
- prompt: string | null;
63
59
  createdAt: string;
64
60
  updatedAt: string;
61
+ tenantId: string;
62
+ projectId: string;
63
+ description: string | null;
64
+ prompt: string | null;
65
65
  models: {
66
66
  base?: {
67
67
  model?: string | undefined;
@@ -97,15 +97,15 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
97
97
  }[] | undefined;
98
98
  } | null;
99
99
  defaultSubAgent: {
100
- tenantId: string;
101
- projectId: string;
102
100
  id: string;
103
101
  name: string;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ tenantId: string;
105
+ projectId: string;
104
106
  description: string | null;
105
107
  prompt: string | null;
106
108
  agentId: string;
107
- createdAt: string;
108
- updatedAt: string;
109
109
  models: {
110
110
  base?: {
111
111
  model?: string | undefined;
@@ -129,14 +129,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
129
129
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
- tenantId: string;
133
- projectId: string;
134
132
  id: string;
135
133
  name: string;
136
- description: string | null;
137
- prompt: string | null;
138
134
  createdAt: string;
139
135
  updatedAt: string;
136
+ tenantId: string;
137
+ projectId: string;
138
+ description: string | null;
139
+ prompt: string | null;
140
140
  models: {
141
141
  base?: {
142
142
  model?: string | undefined;
@@ -245,14 +245,14 @@ declare function listAgentsAcrossProjectBranches(db: AgentsManageDatabaseClient,
245
245
  projectIds: string[];
246
246
  }): Promise<AvailableAgentInfo[]>;
247
247
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
248
- tenantId: string;
249
- projectId: string;
250
248
  id: string;
251
249
  name: string;
252
- description: string | null;
253
- prompt: string | null;
254
250
  createdAt: string;
255
251
  updatedAt: string;
252
+ tenantId: string;
253
+ projectId: string;
254
+ description: string | null;
255
+ prompt: string | null;
256
256
  models: {
257
257
  base?: {
258
258
  model?: string | undefined;
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- tenantId: string;
11
- projectId: string;
12
10
  id: string;
13
11
  name: string;
14
- description: string | null;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
16
+ description: string | null;
17
17
  props: Record<string, unknown> | null;
18
18
  render: {
19
19
  component: string;
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
49
49
  };
50
50
  }>;
51
51
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
52
- tenantId: string;
53
- projectId: string;
54
52
  id: string;
55
53
  name: string;
56
- description: string | null;
57
54
  createdAt: string;
58
55
  updatedAt: string;
56
+ tenantId: string;
57
+ projectId: string;
58
+ description: string | null;
59
59
  props: Record<string, unknown> | null;
60
60
  render: {
61
61
  component: string;
@@ -104,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
104
104
  scopes: SubAgentScopeConfig;
105
105
  artifactComponentId: string;
106
106
  }) => Promise<{
107
+ id: string;
108
+ createdAt: string;
107
109
  tenantId: string;
108
110
  projectId: string;
109
- id: string;
110
111
  agentId: string;
111
- createdAt: string;
112
112
  subAgentId: string;
113
113
  artifactComponentId: string;
114
114
  }>;
@@ -147,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
147
147
  scopes: SubAgentScopeConfig;
148
148
  artifactComponentId: string;
149
149
  }) => Promise<{
150
+ id: string;
151
+ createdAt: string;
150
152
  tenantId: string;
151
153
  projectId: string;
152
- id: string;
153
154
  agentId: string;
154
- createdAt: string;
155
155
  subAgentId: string;
156
156
  artifactComponentId: string;
157
157
  } | null>;
@@ -8,24 +8,24 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
16
+ agentId: string;
17
17
  headersSchema: unknown;
18
18
  contextVariables: Record<string, ContextFetchDefinition> | null;
19
19
  } | undefined>;
20
20
  declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
21
21
  scopes: AgentScopeConfig;
22
22
  }) => Promise<{
23
- tenantId: string;
24
- projectId: string;
25
23
  id: string;
26
- agentId: string;
27
24
  createdAt: string;
28
25
  updatedAt: string;
26
+ tenantId: string;
27
+ projectId: string;
28
+ agentId: string;
29
29
  headersSchema: unknown;
30
30
  contextVariables: Record<string, ContextFetchDefinition> | null;
31
31
  }[]>;
@@ -42,12 +42,12 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
42
42
  };
43
43
  }>;
44
44
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
45
- tenantId: string;
46
- projectId: string;
47
45
  id: string;
48
- agentId: string;
49
46
  createdAt: string;
50
47
  updatedAt: string;
48
+ tenantId: string;
49
+ projectId: string;
50
+ agentId: string;
51
51
  headersSchema: unknown;
52
52
  contextVariables: Record<string, ContextFetchDefinition> | null;
53
53
  }>;
@@ -82,12 +82,12 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
82
82
  declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
83
83
  data: ContextConfigInsert;
84
84
  }) => Promise<{
85
- tenantId: string;
86
- projectId: string;
87
85
  id: string;
88
- agentId: string;
89
86
  createdAt: string;
90
87
  updatedAt: string;
88
+ tenantId: string;
89
+ projectId: string;
90
+ agentId: string;
91
91
  headersSchema: unknown;
92
92
  contextVariables: Record<string, ContextFetchDefinition> | null;
93
93
  }>;
@@ -64,13 +64,13 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
64
64
  scopes: SubAgentScopeConfig;
65
65
  dataComponentId: string;
66
66
  }) => Promise<{
67
+ id: string;
68
+ createdAt: string;
67
69
  tenantId: string;
68
70
  projectId: string;
69
- id: string;
70
71
  agentId: string;
71
- createdAt: string;
72
- subAgentId: string;
73
72
  dataComponentId: string;
73
+ subAgentId: string;
74
74
  }>;
75
75
  /**
76
76
  * Remove association between data component and agent
@@ -106,13 +106,13 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
106
106
  scopes: SubAgentScopeConfig;
107
107
  dataComponentId: string;
108
108
  }) => Promise<{
109
+ id: string;
110
+ createdAt: string;
109
111
  tenantId: string;
110
112
  projectId: string;
111
- id: string;
112
113
  agentId: string;
113
- createdAt: string;
114
- subAgentId: string;
115
114
  dataComponentId: string;
115
+ subAgentId: string;
116
116
  } | null>;
117
117
  /**
118
118
  * Count data components for a tenant/project
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- tenantId: string;
57
- projectId: string;
58
56
  id: string;
59
57
  name: string;
60
- description: string | null;
61
- agentId: string;
62
58
  createdAt: string;
63
59
  updatedAt: string;
60
+ tenantId: string;
61
+ projectId: string;
62
+ description: string | null;
63
+ agentId: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- tenantId: string;
99
- projectId: string;
100
98
  id: string;
101
99
  name: string;
102
- description: string | null;
103
- agentId: string;
104
100
  createdAt: string;
105
101
  updatedAt: string;
102
+ tenantId: string;
103
+ projectId: string;
104
+ description: string | null;
105
+ agentId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -161,12 +161,12 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
161
161
  needsApproval?: boolean;
162
162
  }> | null;
163
163
  }) => Promise<{
164
- tenantId: string;
165
- projectId: string;
166
164
  id: string;
167
- agentId: string;
168
165
  createdAt: string;
169
166
  updatedAt: string;
167
+ tenantId: string;
168
+ projectId: string;
169
+ agentId: string;
170
170
  toolPolicies: Record<string, {
171
171
  needsApproval?: boolean;
172
172
  }> | null;
@@ -226,12 +226,12 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
226
226
  needsApproval?: boolean;
227
227
  }> | null;
228
228
  }) => Promise<{
229
- tenantId: string;
230
- projectId: string;
231
229
  id: string;
232
- agentId: string;
233
230
  createdAt: string;
234
231
  updatedAt: string;
232
+ tenantId: string;
233
+ projectId: string;
234
+ agentId: string;
235
235
  toolPolicies: Record<string, {
236
236
  needsApproval?: boolean;
237
237
  }> | null;
@@ -8,12 +8,12 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
16
+ agentId: string;
17
17
  headers: Record<string, string> | null;
18
18
  externalAgentId: string;
19
19
  subAgentId: string;
@@ -43,12 +43,12 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
43
43
  declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
- tenantId: string;
47
- projectId: string;
48
46
  id: string;
49
- agentId: string;
50
47
  createdAt: string;
51
48
  updatedAt: string;
49
+ tenantId: string;
50
+ projectId: string;
51
+ agentId: string;
52
52
  headers: Record<string, string> | null;
53
53
  externalAgentId: string;
54
54
  subAgentId: string;
@@ -56,12 +56,12 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
56
56
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
- tenantId: string;
60
- projectId: string;
61
59
  id: string;
62
- agentId: string;
63
60
  createdAt: string;
64
61
  updatedAt: string;
62
+ tenantId: string;
63
+ projectId: string;
64
+ agentId: string;
65
65
  headers: Record<string, string> | null;
66
66
  externalAgentId: string;
67
67
  subAgentId: string;
@@ -179,12 +179,12 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
179
179
  headers?: Record<string, string> | null;
180
180
  };
181
181
  }) => Promise<{
182
- tenantId: string;
183
- projectId: string;
184
182
  id: string;
185
- agentId: string;
186
183
  createdAt: string;
187
184
  updatedAt: string;
185
+ tenantId: string;
186
+ projectId: string;
187
+ agentId: string;
188
188
  headers: Record<string, string> | null;
189
189
  externalAgentId: string;
190
190
  subAgentId: string;
@@ -196,12 +196,12 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
196
196
  scopes: SubAgentScopeConfig;
197
197
  externalAgentId: string;
198
198
  }) => Promise<{
199
- tenantId: string;
200
- projectId: string;
201
199
  id: string;
202
- agentId: string;
203
200
  createdAt: string;
204
201
  updatedAt: string;
202
+ tenantId: string;
203
+ projectId: string;
204
+ agentId: string;
205
205
  headers: Record<string, string> | null;
206
206
  externalAgentId: string;
207
207
  subAgentId: string;
@@ -217,12 +217,12 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
217
217
  headers?: Record<string, string> | null;
218
218
  };
219
219
  }) => Promise<{
220
- tenantId: string;
221
- projectId: string;
222
220
  id: string;
223
- agentId: string;
224
221
  createdAt: string;
225
222
  updatedAt: string;
223
+ tenantId: string;
224
+ projectId: string;
225
+ agentId: string;
226
226
  headers: Record<string, string> | null;
227
227
  externalAgentId: string;
228
228
  subAgentId: string;