@inkeep/agents-core 0.37.0 → 0.37.2

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.
Files changed (55) hide show
  1. package/dist/auth/auth-schema.d.ts +47 -1
  2. package/dist/auth/auth-schema.js +1 -1
  3. package/dist/auth/auth-validation-schemas.d.ts +35 -1
  4. package/dist/auth/auth-validation-schemas.js +18 -18
  5. package/dist/auth/auth.d.ts +23 -23
  6. package/dist/auth/auth.js +13 -5
  7. package/dist/auth/permissions.d.ts +9 -9
  8. package/dist/auth/permissions.js +1 -1
  9. package/dist/{auth-detection-CGqhPDnj.d.ts → auth-detection-7G0Dxt55.d.ts} +11 -0
  10. package/dist/{chunk-ICZLNCX7.js → chunk-3HACEHXF.js} +370 -71
  11. package/dist/{chunk-32YRH2S7.js → chunk-5QZSNATS.js} +63 -67
  12. package/dist/{chunk-SSRRHYU4.js → chunk-6CYQZ5KX.js} +4 -5
  13. package/dist/{chunk-SLQW43IV.js → chunk-BJLC7EI4.js} +4 -5
  14. package/dist/chunk-CMNLBV2A.js +39 -0
  15. package/dist/{chunk-NFYCSHD3.js → chunk-DEYPSEXR.js} +2 -1
  16. package/dist/chunk-GENLXHZ4.js +159 -0
  17. package/dist/{chunk-VMSYBWFH.js → chunk-JNBVHWXX.js} +7 -4
  18. package/dist/{chunk-TGESM3JG.js → chunk-MQMMFK2K.js} +14 -3
  19. package/dist/{chunk-Q5U2SVA6.js → chunk-RUTYLJB7.js} +11 -7
  20. package/dist/{chunk-VQXQOGJU.js → chunk-XHODTX4H.js} +313 -315
  21. package/dist/{chunk-MB2ZIPZS.js → chunk-YSFXXC6K.js} +5 -5
  22. package/dist/{chunk-SG75RA63.js → chunk-ZSYMSL55.js} +2 -2
  23. package/dist/{client-CnpNkGsH.d.ts → client-B3nwdklT.d.ts} +1 -1
  24. package/dist/client-exports.d.ts +10 -8
  25. package/dist/client-exports.js +126 -127
  26. package/dist/constants/schema-validation/index.js +1 -1
  27. package/dist/credential-stores/index.d.ts +4 -5
  28. package/dist/credential-stores/index.js +1 -1
  29. package/dist/db/schema.d.ts +3 -4
  30. package/dist/db/schema.js +2 -2
  31. package/dist/db/test-client.d.ts +4 -5
  32. package/dist/db/test-client.js +1 -1
  33. package/dist/index.d.ts +675 -558
  34. package/dist/index.js +297 -76
  35. package/dist/{schema-Cgkp_geg.d.ts → schema-BhYTubhP.d.ts} +24 -1
  36. package/dist/server-CHLmv-Jb.d.ts +127 -0
  37. package/dist/types/index.d.ts +34 -115
  38. package/dist/types/index.js +1 -1
  39. package/dist/{utility-C_tTZ7-k.d.ts → utility-5USfJ5Xd.d.ts} +588 -459
  40. package/dist/utils/schema-conversion.d.ts +1 -1
  41. package/dist/utils/schema-conversion.js +1 -1
  42. package/dist/validation/index.d.ts +131 -132
  43. package/dist/validation/index.js +2 -2
  44. package/drizzle/{0001_fair_malice.sql → 0001_calm_sheva_callister.sql} +1 -16
  45. package/drizzle/0002_puzzling_goblin_queen.sql +8 -0
  46. package/drizzle/0003_sweet_human_robot.sql +8 -0
  47. package/drizzle/meta/0001_snapshot.json +7 -1
  48. package/drizzle/meta/0002_snapshot.json +3637 -0
  49. package/drizzle/meta/0003_snapshot.json +3643 -0
  50. package/drizzle/meta/_journal.json +16 -2
  51. package/package.json +11 -3
  52. package/dist/chunk-CUM6BY2Y.js +0 -320
  53. package/dist/chunk-H2F72PDA.js +0 -15
  54. package/dist/chunk-NOPEANIU.js +0 -82
  55. package/dist/chunk-OUXC23J7.js +0 -12534
@@ -1,3 +1,4 @@
1
+ import * as drizzle_orm from 'drizzle-orm';
1
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
2
3
 
3
4
  declare const user: drizzle_orm_pg_core.PgTableWithColumns<{
@@ -1073,6 +1074,23 @@ declare const invitation: drizzle_orm_pg_core.PgTableWithColumns<{
1073
1074
  identity: undefined;
1074
1075
  generated: undefined;
1075
1076
  }, {}, {}>;
1077
+ createdAt: drizzle_orm_pg_core.PgColumn<{
1078
+ name: "created_at";
1079
+ tableName: "invitation";
1080
+ dataType: "date";
1081
+ columnType: "PgTimestamp";
1082
+ data: Date;
1083
+ driverParam: string;
1084
+ notNull: true;
1085
+ hasDefault: true;
1086
+ isPrimaryKey: false;
1087
+ isAutoincrement: false;
1088
+ hasRuntimeDefault: false;
1089
+ enumValues: undefined;
1090
+ baseColumn: never;
1091
+ identity: undefined;
1092
+ generated: undefined;
1093
+ }, {}, {}>;
1076
1094
  inviterId: drizzle_orm_pg_core.PgColumn<{
1077
1095
  name: "inviter_id";
1078
1096
  tableName: "invitation";
@@ -1093,5 +1111,33 @@ declare const invitation: drizzle_orm_pg_core.PgTableWithColumns<{
1093
1111
  };
1094
1112
  dialect: "pg";
1095
1113
  }>;
1114
+ declare const userRelations: drizzle_orm.Relations<"user", {
1115
+ sessions: drizzle_orm.Many<"session">;
1116
+ accounts: drizzle_orm.Many<"account">;
1117
+ ssoProviders: drizzle_orm.Many<"sso_provider">;
1118
+ members: drizzle_orm.Many<"member">;
1119
+ invitations: drizzle_orm.Many<"invitation">;
1120
+ }>;
1121
+ declare const sessionRelations: drizzle_orm.Relations<"session", {
1122
+ user: drizzle_orm.One<"user", true>;
1123
+ }>;
1124
+ declare const accountRelations: drizzle_orm.Relations<"account", {
1125
+ user: drizzle_orm.One<"user", true>;
1126
+ }>;
1127
+ declare const ssoProviderRelations: drizzle_orm.Relations<"sso_provider", {
1128
+ user: drizzle_orm.One<"user", false>;
1129
+ }>;
1130
+ declare const organizationRelations: drizzle_orm.Relations<"organization", {
1131
+ members: drizzle_orm.Many<"member">;
1132
+ invitations: drizzle_orm.Many<"invitation">;
1133
+ }>;
1134
+ declare const memberRelations: drizzle_orm.Relations<"member", {
1135
+ organization: drizzle_orm.One<"organization", true>;
1136
+ user: drizzle_orm.One<"user", true>;
1137
+ }>;
1138
+ declare const invitationRelations: drizzle_orm.Relations<"invitation", {
1139
+ organization: drizzle_orm.One<"organization", true>;
1140
+ user: drizzle_orm.One<"user", true>;
1141
+ }>;
1096
1142
 
1097
- export { account, invitation, member, organization, session, ssoProvider, user, verification };
1143
+ export { account, accountRelations, invitation, invitationRelations, member, memberRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };
@@ -1 +1 @@
1
- export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../chunk-NOPEANIU.js';
1
+ export { account, accountRelations, invitation, invitationRelations, member, memberRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification } from '../chunk-GENLXHZ4.js';
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_zod from 'drizzle-zod';
2
2
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
- import { z } from 'zod';
3
+ import { z } from '@hono/zod-openapi';
4
4
 
5
5
  declare const UserSelectSchema: drizzle_zod.BuildSchema<"select", {
6
6
  id: drizzle_orm_pg_core.PgColumn<{
@@ -1485,6 +1485,23 @@ declare const InvitationSelectSchema: drizzle_zod.BuildSchema<"select", {
1485
1485
  identity: undefined;
1486
1486
  generated: undefined;
1487
1487
  }, {}, {}>;
1488
+ createdAt: drizzle_orm_pg_core.PgColumn<{
1489
+ name: "created_at";
1490
+ tableName: "invitation";
1491
+ dataType: "date";
1492
+ columnType: "PgTimestamp";
1493
+ data: Date;
1494
+ driverParam: string;
1495
+ notNull: true;
1496
+ hasDefault: true;
1497
+ isPrimaryKey: false;
1498
+ isAutoincrement: false;
1499
+ hasRuntimeDefault: false;
1500
+ enumValues: undefined;
1501
+ baseColumn: never;
1502
+ identity: undefined;
1503
+ generated: undefined;
1504
+ }, {}, {}>;
1488
1505
  inviterId: drizzle_orm_pg_core.PgColumn<{
1489
1506
  name: "inviter_id";
1490
1507
  tableName: "invitation";
@@ -1606,6 +1623,23 @@ declare const InvitationInsertSchema: drizzle_zod.BuildSchema<"insert", {
1606
1623
  identity: undefined;
1607
1624
  generated: undefined;
1608
1625
  }, {}, {}>;
1626
+ createdAt: drizzle_orm_pg_core.PgColumn<{
1627
+ name: "created_at";
1628
+ tableName: "invitation";
1629
+ dataType: "date";
1630
+ columnType: "PgTimestamp";
1631
+ data: Date;
1632
+ driverParam: string;
1633
+ notNull: true;
1634
+ hasDefault: true;
1635
+ isPrimaryKey: false;
1636
+ isAutoincrement: false;
1637
+ hasRuntimeDefault: false;
1638
+ enumValues: undefined;
1639
+ baseColumn: never;
1640
+ identity: undefined;
1641
+ generated: undefined;
1642
+ }, {}, {}>;
1609
1643
  inviterId: drizzle_orm_pg_core.PgColumn<{
1610
1644
  name: "inviter_id";
1611
1645
  tableName: "invitation";
@@ -1,6 +1,6 @@
1
- import { user, session, account, organization, member, invitation, verification } from '../chunk-NOPEANIU.js';
2
- import { external_exports } from '../chunk-OUXC23J7.js';
1
+ import { user, session, account, organization, member, invitation, verification } from '../chunk-GENLXHZ4.js';
3
2
  import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
3
+ import { z } from '@hono/zod-openapi';
4
4
 
5
5
  var UserSelectSchema = createSelectSchema(user);
6
6
  var UserInsertSchema = createInsertSchema(user);
@@ -16,24 +16,24 @@ var InvitationSelectSchema = createSelectSchema(invitation);
16
16
  var InvitationInsertSchema = createInsertSchema(invitation);
17
17
  var VerificationSelectSchema = createSelectSchema(verification);
18
18
  var VerificationInsertSchema = createInsertSchema(verification);
19
- var UserOrganizationSchema = external_exports.object({
20
- id: external_exports.string(),
21
- userId: external_exports.string(),
22
- organizationId: external_exports.string(),
23
- role: external_exports.string(),
24
- createdAt: external_exports.union([external_exports.string(), external_exports.date()]).transform((val) => val instanceof Date ? val.toISOString() : val),
25
- organizationName: external_exports.string().nullable(),
26
- organizationSlug: external_exports.string().nullable()
19
+ var UserOrganizationSchema = z.object({
20
+ id: z.string(),
21
+ userId: z.string(),
22
+ organizationId: z.string(),
23
+ role: z.string(),
24
+ createdAt: z.union([z.string(), z.date()]).transform((val) => val instanceof Date ? val.toISOString() : val),
25
+ organizationName: z.string().nullable(),
26
+ organizationSlug: z.string().nullable()
27
27
  });
28
- var UserOrganizationsResponseSchema = external_exports.array(UserOrganizationSchema);
29
- var AddUserToOrganizationRequestSchema = external_exports.object({
30
- organizationId: external_exports.string(),
31
- role: external_exports.string().default("member")
28
+ var UserOrganizationsResponseSchema = z.array(UserOrganizationSchema);
29
+ var AddUserToOrganizationRequestSchema = z.object({
30
+ organizationId: z.string(),
31
+ role: z.string().default("member")
32
32
  });
33
- var AddUserToOrganizationResponseSchema = external_exports.object({
34
- organizationId: external_exports.string(),
35
- role: external_exports.string(),
36
- createdAt: external_exports.string()
33
+ var AddUserToOrganizationResponseSchema = z.object({
34
+ organizationId: z.string(),
35
+ role: z.string(),
36
+ createdAt: z.string()
37
37
  });
38
38
 
39
39
  export { AccountInsertSchema, AccountSelectSchema, AddUserToOrganizationRequestSchema, AddUserToOrganizationResponseSchema, InvitationInsertSchema, InvitationSelectSchema, MemberInsertSchema, MemberSelectSchema, OrganizationInsertSchema, OrganizationSelectSchema, SessionInsertSchema, SessionSelectSchema, UserInsertSchema, UserOrganizationSchema, UserOrganizationsResponseSchema, UserSelectSchema, VerificationInsertSchema, VerificationSelectSchema };
@@ -4,15 +4,15 @@ import * as zod from 'zod';
4
4
  import * as better_auth from 'better-auth';
5
5
  import { BetterAuthAdvancedOptions } from 'better-auth';
6
6
  import { GoogleOptions } from 'better-auth/social-providers';
7
- import { D as DatabaseClient } from '../client-CnpNkGsH.js';
7
+ import { D as DatabaseClient } from '../client-B3nwdklT.js';
8
8
  import 'drizzle-orm/node-postgres';
9
9
  import 'drizzle-orm/pglite';
10
- import '../schema-Cgkp_geg.js';
10
+ import '../schema-BhYTubhP.js';
11
11
  import 'drizzle-orm';
12
12
  import 'drizzle-orm/pg-core';
13
- import '../utility-C_tTZ7-k.js';
14
- import 'drizzle-zod';
13
+ import '../utility-5USfJ5Xd.js';
15
14
  import '@hono/zod-openapi';
15
+ import 'drizzle-zod';
16
16
  import './auth-schema.js';
17
17
 
18
18
  interface OIDCProviderConfig {
@@ -115,7 +115,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
115
115
  attributes?: better_auth.CookieOptions;
116
116
  };
117
117
  } | undefined;
118
- defaultCookieAttributes?: better_auth.CookieOptions | undefined;
118
+ defaultCookieAttributes: better_auth.CookieOptions;
119
119
  cookiePrefix?: string | undefined;
120
120
  database?: {
121
121
  defaultFindManyLimit?: number;
@@ -716,25 +716,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
716
716
  ac: better_auth_plugins.AccessControl;
717
717
  roles: {
718
718
  member: {
719
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
720
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
719
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
720
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
721
721
  connector: "OR" | "AND";
722
722
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
723
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
723
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
724
724
  };
725
725
  admin: {
726
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
727
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
726
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
727
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
728
728
  connector: "OR" | "AND";
729
729
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
730
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
730
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
731
731
  };
732
732
  owner: {
733
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
734
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
733
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
734
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
735
735
  connector: "OR" | "AND";
736
736
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
737
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
737
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
738
738
  };
739
739
  };
740
740
  sendInvitationEmail(data: {
@@ -992,25 +992,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth.Auth<{
992
992
  ac: better_auth_plugins.AccessControl;
993
993
  roles: {
994
994
  member: {
995
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
996
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
995
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
996
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
997
997
  connector: "OR" | "AND";
998
998
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
999
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
999
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
1000
1000
  };
1001
1001
  admin: {
1002
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
1003
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
1002
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
1003
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
1004
1004
  connector: "OR" | "AND";
1005
1005
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
1006
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
1006
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
1007
1007
  };
1008
1008
  owner: {
1009
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
1010
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
1009
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
1010
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
1011
1011
  connector: "OR" | "AND";
1012
1012
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
1013
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
1013
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
1014
1014
  };
1015
1015
  };
1016
1016
  sendInvitationEmail(data: {
package/dist/auth/auth.js CHANGED
@@ -1,8 +1,9 @@
1
- import { generateId } from '../chunk-ICZLNCX7.js';
2
- import { ssoProvider } from '../chunk-NOPEANIU.js';
3
- import { ownerRole, adminRole, memberRole, ac } from '../chunk-VMSYBWFH.js';
1
+ import { generateId } from '../chunk-3HACEHXF.js';
2
+ import { env } from '../chunk-RUTYLJB7.js';
3
+ import { ssoProvider } from '../chunk-GENLXHZ4.js';
4
+ import { ownerRole, adminRole, memberRole, ac } from '../chunk-JNBVHWXX.js';
4
5
  import { sso } from '@better-auth/sso';
5
- import { betterAuth, env } from 'better-auth';
6
+ import { betterAuth } from 'better-auth';
6
7
  import { drizzleAdapter } from 'better-auth/adapters/drizzle';
7
8
  import { organization } from 'better-auth/plugins';
8
9
  import { eq } from 'drizzle-orm';
@@ -81,6 +82,13 @@ function createAuth(config) {
81
82
  enabled: true,
82
83
  ...cookieDomain && { domain: cookieDomain }
83
84
  },
85
+ defaultCookieAttributes: {
86
+ sameSite: "none",
87
+ secure: true,
88
+ httpOnly: true,
89
+ partitioned: true,
90
+ ...cookieDomain && { domain: cookieDomain }
91
+ },
84
92
  ...config.advanced
85
93
  },
86
94
  trustedOrigins: [
@@ -88,7 +96,7 @@ function createAuth(config) {
88
96
  "http://localhost:3002",
89
97
  env.INKEEP_AGENTS_MANAGE_UI_URL,
90
98
  env.INKEEP_AGENTS_MANAGE_API_URL
91
- ],
99
+ ].filter((origin) => typeof origin === "string" && origin.length > 0),
92
100
  plugins: [
93
101
  sso(),
94
102
  organization({
@@ -3,25 +3,25 @@ import { AccessControl } from 'better-auth/plugins/access';
3
3
 
4
4
  declare const ac: AccessControl;
5
5
  declare const memberRole: {
6
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
7
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
6
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
7
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
8
8
  connector: "OR" | "AND";
9
9
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
10
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
10
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
11
11
  };
12
12
  declare const adminRole: {
13
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
14
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
13
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
14
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
15
15
  connector: "OR" | "AND";
16
16
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
17
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
17
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
18
18
  };
19
19
  declare const ownerRole: {
20
- 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.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key] | {
21
- actions: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>[key];
20
+ authorize<K_1 extends "function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key] | {
21
+ actions: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>[key];
22
22
  connector: "OR" | "AND";
23
23
  } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
24
- statements: better_auth_plugins.Subset<"function" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config", better_auth_plugins.Statements>;
24
+ statements: better_auth_plugins.Subset<"function" | "organization" | "ac" | "member" | "project" | "agent" | "sub_agent" | "tool" | "api_key" | "credential" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "invitation" | "team", better_auth_plugins.Statements>;
25
25
  };
26
26
 
27
27
  export { ac, adminRole, memberRole, ownerRole };
@@ -1 +1 @@
1
- export { ac, adminRole, memberRole, ownerRole } from '../chunk-VMSYBWFH.js';
1
+ export { ac, adminRole, memberRole, ownerRole } from '../chunk-JNBVHWXX.js';
@@ -12,6 +12,9 @@ declare const SPAN_NAMES: {
12
12
  readonly AGENT_GENERATION: "agent.generate";
13
13
  readonly CONTEXT_FETCHER: "context-fetcher.http-request";
14
14
  readonly ARTIFACT_PROCESSING: "agent_session.process_artifact";
15
+ readonly TOOL_APPROVAL_REQUESTED: "tool.approval_requested";
16
+ readonly TOOL_APPROVAL_APPROVED: "tool.approval_approved";
17
+ readonly TOOL_APPROVAL_DENIED: "tool.approval_denied";
15
18
  };
16
19
  declare const AI_OPERATIONS: {
17
20
  readonly GENERATE_TEXT: "ai.generateText.doGenerate";
@@ -53,6 +56,8 @@ declare const SPAN_KEYS: {
53
56
  readonly AI_TOOL_CALL_ID: "ai.toolCall.id";
54
57
  readonly AI_TOOL_TYPE: "ai.toolType";
55
58
  readonly TOOL_PURPOSE: "tool.purpose";
59
+ readonly TOOL_NAME: "tool.name";
60
+ readonly TOOL_CALL_ID: "tool.callId";
56
61
  readonly GEN_AI_USAGE_INPUT_TOKENS: "gen_ai.usage.input_tokens";
57
62
  readonly GEN_AI_USAGE_OUTPUT_TOKENS: "gen_ai.usage.output_tokens";
58
63
  readonly CONTEXT_URL: "context.url";
@@ -92,6 +97,9 @@ declare const ACTIVITY_TYPES: {
92
97
  readonly AI_ASSISTANT_MESSAGE: "ai_assistant_message";
93
98
  readonly AI_MODEL_STREAMED_TEXT: "ai_model_streamed_text";
94
99
  readonly AI_MODEL_STREAMED_OBJECT: "ai_model_streamed_object";
100
+ readonly TOOL_APPROVAL_REQUESTED: "tool_approval_requested";
101
+ readonly TOOL_APPROVAL_APPROVED: "tool_approval_approved";
102
+ readonly TOOL_APPROVAL_DENIED: "tool_approval_denied";
95
103
  };
96
104
  /** Activity Status Values */
97
105
  declare const ACTIVITY_STATUS: {
@@ -223,6 +231,9 @@ declare const QUERY_EXPRESSIONS: {
223
231
  readonly AGENT_GENERATIONS: "agentGenerations";
224
232
  readonly SPANS_WITH_ERRORS: "spansWithErrors";
225
233
  readonly ARTIFACT_PROCESSING: "artifactProcessing";
234
+ readonly TOOL_APPROVAL_REQUESTED: "toolApprovalRequested";
235
+ readonly TOOL_APPROVAL_APPROVED: "toolApprovalApproved";
236
+ readonly TOOL_APPROVAL_DENIED: "toolApprovalDenied";
226
237
  };
227
238
  /** Query Reduce Operations */
228
239
  declare const REDUCE_OPERATIONS: {