@inkeep/agents-core 0.0.0-dev-20251121223756 → 0.0.0-dev-20251122034411

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.
@@ -1,13 +1,14 @@
1
1
  import * as better_auth_adapters from 'better-auth/adapters';
2
2
  import * as better_auth from 'better-auth';
3
3
  import { BetterAuthPlugin } from 'better-auth';
4
- import { D as DatabaseClient } from '../client-HrEgt7wv.js';
4
+ import { GoogleOptions } from 'better-auth/social-providers';
5
+ import { D as DatabaseClient } from '../client-BLjor29e.js';
5
6
  import 'drizzle-orm/node-postgres';
6
7
  import 'drizzle-orm/pglite';
7
- import '../schema-CoC3tYFX.js';
8
+ import '../schema-DCB_LgW9.js';
8
9
  import 'drizzle-orm';
9
10
  import 'drizzle-orm/pg-core';
10
- import '../utility-C4QAannk.js';
11
+ import '../utility-B5hlet30.js';
11
12
  import 'zod';
12
13
  import 'drizzle-zod';
13
14
  import '@hono/zod-openapi';
@@ -64,9 +65,15 @@ interface BetterAuthConfig {
64
65
  secret: string;
65
66
  dbClient: DatabaseClient;
66
67
  ssoProviders?: SSOProviderConfig[];
68
+ socialProviders?: {
69
+ google?: GoogleOptions;
70
+ };
67
71
  }
68
72
  interface UserAuthConfig {
69
73
  ssoProviders?: SSOProviderConfig[];
74
+ socialProviders?: {
75
+ google?: GoogleOptions;
76
+ };
70
77
  }
71
78
  declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
72
79
  baseURL: string;
@@ -79,6 +86,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
79
86
  requireEmailVerification: false;
80
87
  autoSignIn: true;
81
88
  };
89
+ socialProviders: {
90
+ google: GoogleOptions;
91
+ } | undefined;
82
92
  session: {
83
93
  expiresIn: number;
84
94
  updateAge: number;
@@ -91,28 +101,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
91
101
  trustedOrigins: string[];
92
102
  plugins: BetterAuthPlugin[];
93
103
  }>;
94
- declare const auth: better_auth.Auth<{
95
- baseURL: string;
96
- secret: string;
97
- database: (options: better_auth.BetterAuthOptions) => better_auth_adapters.DBAdapter<better_auth.BetterAuthOptions>;
98
- emailAndPassword: {
99
- enabled: true;
100
- minPasswordLength: number;
101
- maxPasswordLength: number;
102
- requireEmailVerification: false;
103
- autoSignIn: true;
104
- };
105
- session: {
106
- expiresIn: number;
107
- updateAge: number;
108
- };
109
- advanced: {
110
- crossSubDomainCookies: {
111
- enabled: true;
112
- };
113
- };
114
- trustedOrigins: string[];
115
- plugins: BetterAuthPlugin[];
116
- }>;
104
+ declare const auth: ReturnType<typeof createAuth>;
117
105
 
118
106
  export { type BetterAuthConfig, type OIDCProviderConfig, type SAMLProviderConfig, type SSOProviderConfig, type UserAuthConfig, auth, createAuth };
package/dist/auth/auth.js CHANGED
@@ -1,7 +1,6 @@
1
- import { generateId } from '../chunk-D3NGJEP2.js';
2
- import { createTestDatabaseClient } from '../chunk-SG75RA63.js';
1
+ import { generateId } from '../chunk-4OISWRFK.js';
3
2
  import { ssoProvider } from '../chunk-NOPEANIU.js';
4
- import { ownerRole, adminRole, memberRole, ac } from '../chunk-F5WWOOIX.js';
3
+ import { ownerRole, adminRole, memberRole, ac } from '../chunk-VMSYBWFH.js';
5
4
  import { sso } from '@better-auth/sso';
6
5
  import { betterAuth } from 'better-auth';
7
6
  import { drizzleAdapter } from 'better-auth/adapters/drizzle';
@@ -65,6 +64,9 @@ function createAuth(config) {
65
64
  requireEmailVerification: false,
66
65
  autoSignIn: true
67
66
  },
67
+ socialProviders: config.socialProviders?.google && {
68
+ google: config.socialProviders.google
69
+ },
68
70
  session: {
69
71
  expiresIn: 60 * 60 * 24 * 7,
70
72
  updateAge: 60 * 60 * 24
@@ -87,10 +89,6 @@ function createAuth(config) {
87
89
  }
88
90
  return auth2;
89
91
  }
90
- var auth = createAuth({
91
- baseURL: process.env.INKEEP_AGENTS_MANAGE_API_URL || "http://localhost:3002",
92
- secret: process.env.BETTER_AUTH_SECRET || "development-secret-change-in-production",
93
- dbClient: await createTestDatabaseClient()
94
- });
92
+ var auth = null;
95
93
 
96
94
  export { auth, createAuth };
@@ -154,7 +154,7 @@ declare const memberRole: {
154
154
  }>;
155
155
  };
156
156
  declare const adminRole: {
157
- authorize<K_1 extends "function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
157
+ authorize<K_1 extends "function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
158
158
  readonly project: readonly ["create", "read", "update", "delete"];
159
159
  readonly agent: readonly ["create", "read", "update", "delete"];
160
160
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -172,7 +172,7 @@ declare const adminRole: {
172
172
  readonly team: readonly ["create", "update", "delete"];
173
173
  readonly ac: readonly ["create", "read", "update", "delete"];
174
174
  }>[key] | {
175
- actions: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
175
+ actions: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
176
176
  readonly project: readonly ["create", "read", "update", "delete"];
177
177
  readonly agent: readonly ["create", "read", "update", "delete"];
178
178
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -192,7 +192,7 @@ declare const adminRole: {
192
192
  }>[key];
193
193
  connector: "OR" | "AND";
194
194
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
195
- statements: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
195
+ statements: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
196
196
  readonly project: readonly ["create", "read", "update", "delete"];
197
197
  readonly agent: readonly ["create", "read", "update", "delete"];
198
198
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -212,7 +212,7 @@ declare const adminRole: {
212
212
  }>;
213
213
  };
214
214
  declare const ownerRole: {
215
- authorize<K_1 extends "function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
215
+ authorize<K_1 extends "function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
216
216
  readonly project: readonly ["create", "read", "update", "delete"];
217
217
  readonly agent: readonly ["create", "read", "update", "delete"];
218
218
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -230,7 +230,7 @@ declare const ownerRole: {
230
230
  readonly team: readonly ["create", "update", "delete"];
231
231
  readonly ac: readonly ["create", "read", "update", "delete"];
232
232
  }>[key] | {
233
- actions: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
233
+ actions: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
234
234
  readonly project: readonly ["create", "read", "update", "delete"];
235
235
  readonly agent: readonly ["create", "read", "update", "delete"];
236
236
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -250,7 +250,7 @@ declare const ownerRole: {
250
250
  }>[key];
251
251
  connector: "OR" | "AND";
252
252
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins_access.AuthorizeResponse;
253
- statements: better_auth_plugins_access.Subset<"function" | "organization" | "ac" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "member" | "invitation" | "team", {
253
+ statements: better_auth_plugins_access.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", {
254
254
  readonly project: readonly ["create", "read", "update", "delete"];
255
255
  readonly agent: readonly ["create", "read", "update", "delete"];
256
256
  readonly sub_agent: readonly ["create", "read", "update", "delete"];
@@ -1 +1 @@
1
- export { ac, adminRole, memberRole, ownerRole } from '../chunk-F5WWOOIX.js';
1
+ export { ac, adminRole, memberRole, ownerRole } from '../chunk-VMSYBWFH.js';
@@ -550,7 +550,7 @@ var McpClient = class {
550
550
  }
551
551
  }
552
552
  async selectTools() {
553
- const { tools } = await this.client.listTools({ timeout: this.timeout });
553
+ const { tools } = await this.client.listTools();
554
554
  const { selectedTools, activeTools } = this.serverConfig;
555
555
  let availableTools;
556
556
  if (activeTools === void 0) {
@@ -1,4 +1,4 @@
1
- import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-3AK7OSAT.js';
1
+ import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-ZCEKN54E.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // src/validation/cycleDetection.ts
@@ -1,5 +1,5 @@
1
1
  import { createAccessControl } from 'better-auth/plugins/access';
2
- import { defaultStatements, adminAc } from 'better-auth/plugins/organization/access';
2
+ import { defaultStatements } from 'better-auth/plugins/organization/access';
3
3
 
4
4
  // src/auth/permissions.ts
5
5
  var statement = {
@@ -41,8 +41,7 @@ var adminRole = ac.newRole({
41
41
  artifact_component: ["create", "read", "update"],
42
42
  external_agent: ["create", "read", "update"],
43
43
  function: ["create", "read", "update"],
44
- context_config: ["create", "read", "update"],
45
- ...adminAc.statements
44
+ context_config: ["create", "read", "update"]
46
45
  });
47
46
  var ownerRole = ac.newRole({
48
47
  project: ["create", "read", "update", "delete"],
@@ -55,8 +54,7 @@ var ownerRole = ac.newRole({
55
54
  artifact_component: ["create", "read", "update", "delete"],
56
55
  external_agent: ["create", "read", "update", "delete"],
57
56
  function: ["create", "read", "update", "delete"],
58
- context_config: ["create", "read", "update", "delete"],
59
- ...adminAc.statements
57
+ context_config: ["create", "read", "update", "delete"]
60
58
  });
61
59
 
62
60
  export { ac, adminRole, memberRole, ownerRole };
@@ -1,6 +1,6 @@
1
1
  import { NodePgDatabase } from 'drizzle-orm/node-postgres';
2
2
  import { PgliteDatabase } from 'drizzle-orm/pglite';
3
- import { s as schema } from './schema-CoC3tYFX.js';
3
+ import { s as schema } from './schema-DCB_LgW9.js';
4
4
 
5
5
  type DatabaseClient = NodePgDatabase<typeof schema> | PgliteDatabase<typeof schema>;
6
6
  interface DatabaseConfig {
@@ -1,7 +1,7 @@
1
1
  export { i as ACTIVITY_NAMES, g as ACTIVITY_STATUS, f as ACTIVITY_TYPES, h as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, e as SPAN_KEYS, S as SPAN_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE, d as detectAuthenticationRequired } from './auth-detection-CGqhPDnj.js';
2
2
  import { z } from 'zod';
3
- import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-C4QAannk.js';
4
- export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-C4QAannk.js';
3
+ import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-B5hlet30.js';
4
+ export { e as AgentStopWhen, b as AgentStopWhenSchema, h as CredentialStoreType, j as FunctionApiSelectSchema, k as FunctionApiUpdateSchema, i as MCPTransportType, g as ModelSettings, M as ModelSettingsSchema, d as StopWhen, S as StopWhenSchema, f as SubAgentStopWhen, c as SubAgentStopWhenSchema } from './utility-B5hlet30.js';
5
5
  export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
6
6
  import 'pino';
7
7
  import 'drizzle-zod';
@@ -172,9 +172,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
172
172
  subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
173
173
  id: z.ZodString;
174
174
  name: z.ZodString;
175
- description: z.ZodString;
176
175
  createdAt: z.ZodOptional<z.ZodString>;
177
176
  updatedAt: z.ZodOptional<z.ZodString>;
177
+ description: z.ZodString;
178
178
  models: z.ZodOptional<z.ZodObject<{
179
179
  base: z.ZodOptional<z.ZodObject<{
180
180
  model: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from './chunk-TGESM3JG.js';
2
- import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-3AK7OSAT.js';
3
- export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-3AK7OSAT.js';
2
+ import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-ZCEKN54E.js';
3
+ export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-ZCEKN54E.js';
4
4
  import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
5
5
  export { detectAuthenticationRequired } from './chunk-4JZT4QEE.js';
6
6
  import { CredentialStoreType } from './chunk-YFHT5M2R.js';
@@ -1,5 +1,5 @@
1
1
  import { CredentialStore } from '../types/index.js';
2
- import '../utility-C4QAannk.js';
2
+ import '../utility-B5hlet30.js';
3
3
  import 'zod';
4
4
  import 'drizzle-zod';
5
5
  import 'drizzle-orm/pg-core';
@@ -1,8 +1,8 @@
1
1
  import 'drizzle-orm';
2
2
  import 'drizzle-orm/pg-core';
3
- import '../utility-C4QAannk.js';
3
+ import '../utility-B5hlet30.js';
4
4
  export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../auth/auth-schema.js';
5
- export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-CoC3tYFX.js';
5
+ export { G as agentRelations, J as agentToolRelationsRelations, a as agents, y as apiKeys, I as apiKeysRelations, j as artifactComponents, O as artifactComponentsRelations, b as contextCache, E as contextCacheRelations, c as contextConfigs, D as contextConfigsRelations, v as conversations, M as conversationsRelations, z as credentialReferences, K as credentialReferencesRelations, h as dataComponents, Q as dataComponentsRelations, f as externalAgents, H as externalAgentsRelations, m as functionTools, V as functionToolsRelations, n as functions, T as functionsRelations, x as ledgerArtifacts, S as ledgerArtifactsRelations, w as messages, N as messagesRelations, p as projects, B as projectsRelations, k as subAgentArtifactComponents, P as subAgentArtifactComponentsRelations, i as subAgentDataComponents, R as subAgentDataComponentsRelations, q as subAgentExternalAgentRelations, X as subAgentExternalAgentRelationsRelations, u as subAgentFunctionToolRelations, W as subAgentFunctionToolRelationsRelations, e as subAgentRelations, U as subAgentRelationsRelations, r as subAgentTeamAgentRelations, Y as subAgentTeamAgentRelationsRelations, o as subAgentToolRelations, d as subAgents, F as subAgentsRelations, g as taskRelations, C as taskRelationsRelations, t as tasks, A as tasksRelations, l as tools, L as toolsRelations } from '../schema-DCB_LgW9.js';
6
6
  import 'zod';
7
7
  import 'drizzle-zod';
8
8
  import '@hono/zod-openapi';
@@ -1,10 +1,10 @@
1
- import { D as DatabaseClient } from '../client-HrEgt7wv.js';
1
+ import { D as DatabaseClient } from '../client-BLjor29e.js';
2
2
  import 'drizzle-orm/node-postgres';
3
3
  import 'drizzle-orm/pglite';
4
- import '../schema-CoC3tYFX.js';
4
+ import '../schema-DCB_LgW9.js';
5
5
  import 'drizzle-orm';
6
6
  import 'drizzle-orm/pg-core';
7
- import '../utility-C4QAannk.js';
7
+ import '../utility-B5hlet30.js';
8
8
  import 'zod';
9
9
  import 'drizzle-zod';
10
10
  import '@hono/zod-openapi';