@inkeep/agents-core 0.37.1 → 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.
- package/dist/auth/auth-schema.d.ts +47 -1
- package/dist/auth/auth-schema.js +1 -1
- package/dist/auth/auth-validation-schemas.d.ts +35 -1
- package/dist/auth/auth-validation-schemas.js +2 -2
- package/dist/auth/auth.d.ts +23 -23
- package/dist/auth/auth.js +11 -4
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/auth/permissions.js +1 -1
- package/dist/{chunk-ROXPFQAM.js → chunk-3HACEHXF.js} +23 -22
- package/dist/{chunk-W3QDM7WH.js → chunk-5QZSNATS.js} +2 -2
- package/dist/{chunk-7GZHUB4J.js → chunk-6CYQZ5KX.js} +1 -1
- package/dist/{chunk-ZEZCCHV7.js → chunk-BJLC7EI4.js} +2 -2
- package/dist/{chunk-PVRIMF6N.js → chunk-DEYPSEXR.js} +1 -1
- package/dist/chunk-GENLXHZ4.js +159 -0
- package/dist/{chunk-VMSYBWFH.js → chunk-JNBVHWXX.js} +7 -4
- package/dist/{chunk-LL6F3EAR.js → chunk-RUTYLJB7.js} +1 -1
- package/dist/{chunk-K6GMXJPW.js → chunk-XHODTX4H.js} +1 -1
- package/dist/{chunk-FOK3JSQN.js → chunk-YSFXXC6K.js} +1 -1
- package/dist/{chunk-I6IF7ZTL.js → chunk-ZSYMSL55.js} +2 -2
- package/dist/{client-B_3j-V4-.d.ts → client-B3nwdklT.d.ts} +1 -1
- package/dist/client-exports.d.ts +6 -7
- package/dist/client-exports.js +3 -3
- package/dist/constants/schema-validation/index.js +1 -1
- package/dist/credential-stores/index.d.ts +3 -4
- package/dist/credential-stores/index.js +1 -1
- package/dist/db/schema.d.ts +3 -4
- package/dist/db/schema.js +2 -2
- package/dist/db/test-client.d.ts +4 -5
- package/dist/db/test-client.js +1 -1
- package/dist/index.d.ts +560 -560
- package/dist/index.js +35 -25
- package/dist/{schema-DKbG39on.d.ts → schema-BhYTubhP.d.ts} +1 -1
- package/dist/{server-BXoUiBMg.d.ts → server-CHLmv-Jb.d.ts} +1 -1
- package/dist/types/index.d.ts +3 -4
- package/dist/{utility-Lo5NoRHK.d.ts → utility-5USfJ5Xd.d.ts} +452 -453
- package/dist/utils/schema-conversion.d.ts +1 -1
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/index.d.ts +131 -132
- package/dist/validation/index.js +2 -2
- package/drizzle/0002_puzzling_goblin_queen.sql +8 -0
- package/drizzle/0003_sweet_human_robot.sql +8 -0
- package/drizzle/meta/0002_snapshot.json +3637 -0
- package/drizzle/meta/0003_snapshot.json +3643 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +2 -4
- package/dist/chunk-NFTJ5JBY.js +0 -82
|
@@ -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 };
|
package/dist/auth/auth-schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { account, invitation, member, organization, session, ssoProvider, user, verification } from '../chunk-
|
|
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-
|
|
1
|
+
import { user, session, account, organization, member, invitation, verification } from '../chunk-GENLXHZ4.js';
|
|
2
2
|
import { createSelectSchema, createInsertSchema } from 'drizzle-zod';
|
|
3
|
-
import { z } from 'zod';
|
|
3
|
+
import { z } from '@hono/zod-openapi';
|
|
4
4
|
|
|
5
5
|
var UserSelectSchema = createSelectSchema(user);
|
|
6
6
|
var UserInsertSchema = createInsertSchema(user);
|
package/dist/auth/auth.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
10
|
+
import '../schema-BhYTubhP.js';
|
|
11
11
|
import 'drizzle-orm';
|
|
12
12
|
import 'drizzle-orm/pg-core';
|
|
13
|
-
import '../utility-
|
|
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
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { generateId } from '../chunk-
|
|
2
|
-
import { env } from '../chunk-
|
|
3
|
-
import { ssoProvider } from '../chunk-
|
|
4
|
-
import { ownerRole, adminRole, memberRole, ac } from '../chunk-
|
|
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';
|
|
5
5
|
import { sso } from '@better-auth/sso';
|
|
6
6
|
import { betterAuth } from 'better-auth';
|
|
7
7
|
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
|
|
@@ -82,6 +82,13 @@ function createAuth(config) {
|
|
|
82
82
|
enabled: true,
|
|
83
83
|
...cookieDomain && { domain: cookieDomain }
|
|
84
84
|
},
|
|
85
|
+
defaultCookieAttributes: {
|
|
86
|
+
sameSite: "none",
|
|
87
|
+
secure: true,
|
|
88
|
+
httpOnly: true,
|
|
89
|
+
partitioned: true,
|
|
90
|
+
...cookieDomain && { domain: cookieDomain }
|
|
91
|
+
},
|
|
85
92
|
...config.advanced
|
|
86
93
|
},
|
|
87
94
|
trustedOrigins: [
|
|
@@ -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 };
|
package/dist/auth/permissions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ac, adminRole, memberRole, ownerRole } from '../chunk-
|
|
1
|
+
export { ac, adminRole, memberRole, ownerRole } from '../chunk-JNBVHWXX.js';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { loadEnvironmentFiles, env } from './chunk-
|
|
1
|
+
import { loadEnvironmentFiles, env } from './chunk-RUTYLJB7.js';
|
|
2
2
|
import { getLogger } from './chunk-DN4B564Y.js';
|
|
3
3
|
import { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
4
|
-
import { z } from 'zod';
|
|
4
|
+
import { z } from '@hono/zod-openapi';
|
|
5
5
|
import { customAlphabet } from 'nanoid';
|
|
6
6
|
import { scrypt, randomBytes, timingSafeEqual } from 'crypto';
|
|
7
7
|
import { promisify } from 'util';
|
|
8
|
-
import { z as z$1 } from '@hono/zod-openapi';
|
|
9
8
|
import { HTTPException } from 'hono/http-exception';
|
|
10
9
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
11
10
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
@@ -195,7 +194,7 @@ function toISODateString(dateValue) {
|
|
|
195
194
|
}
|
|
196
195
|
return dateValue.toISOString();
|
|
197
196
|
}
|
|
198
|
-
var ErrorCode = z
|
|
197
|
+
var ErrorCode = z.enum([
|
|
199
198
|
"bad_request",
|
|
200
199
|
"unauthorized",
|
|
201
200
|
"forbidden",
|
|
@@ -214,28 +213,28 @@ var errorCodeToHttpStatus = {
|
|
|
214
213
|
internal_server_error: 500
|
|
215
214
|
};
|
|
216
215
|
var ERROR_DOCS_BASE_URL = "https://docs.inkeep.com/agents-api/errors";
|
|
217
|
-
var problemDetailsSchema = z
|
|
216
|
+
var problemDetailsSchema = z.object({
|
|
218
217
|
// type: z.string().url().openapi({
|
|
219
218
|
// description: "A URI reference that identifies the problem type.",
|
|
220
219
|
// example: `${ERROR_DOCS_BASE_URL}#not-found`,
|
|
221
220
|
// }),
|
|
222
|
-
title: z
|
|
221
|
+
title: z.string().openapi({
|
|
223
222
|
description: "A short, human-readable summary of the problem type.",
|
|
224
223
|
example: "Resource Not Found"
|
|
225
224
|
}),
|
|
226
|
-
status: z
|
|
225
|
+
status: z.number().int().openapi({
|
|
227
226
|
description: "The HTTP status code.",
|
|
228
227
|
example: 404
|
|
229
228
|
}),
|
|
230
|
-
detail: z
|
|
229
|
+
detail: z.string().openapi({
|
|
231
230
|
description: "A human-readable explanation specific to this occurrence of the problem.",
|
|
232
231
|
example: "The requested resource was not found."
|
|
233
232
|
}),
|
|
234
|
-
instance: z
|
|
233
|
+
instance: z.string().optional().openapi({
|
|
235
234
|
description: "A URI reference that identifies the specific occurrence of the problem.",
|
|
236
235
|
example: "/conversations/123"
|
|
237
236
|
}),
|
|
238
|
-
requestId: z
|
|
237
|
+
requestId: z.string().optional().openapi({
|
|
239
238
|
description: "A unique identifier for the request, useful for troubleshooting.",
|
|
240
239
|
example: "req_1234567890"
|
|
241
240
|
}),
|
|
@@ -244,13 +243,13 @@ var problemDetailsSchema = z$1.object({
|
|
|
244
243
|
example: "not_found"
|
|
245
244
|
})
|
|
246
245
|
}).openapi("ProblemDetails");
|
|
247
|
-
var errorResponseSchema = z
|
|
248
|
-
error: z
|
|
246
|
+
var errorResponseSchema = z.object({
|
|
247
|
+
error: z.object({
|
|
249
248
|
code: ErrorCode.openapi({
|
|
250
249
|
description: "A short code indicating the error code returned.",
|
|
251
250
|
example: "not_found"
|
|
252
251
|
}),
|
|
253
|
-
message: z
|
|
252
|
+
message: z.string().openapi({
|
|
254
253
|
description: "A human readable error message.",
|
|
255
254
|
example: "The requested resource was not found."
|
|
256
255
|
})
|
|
@@ -260,7 +259,8 @@ function createApiError({
|
|
|
260
259
|
code,
|
|
261
260
|
message,
|
|
262
261
|
instance,
|
|
263
|
-
requestId
|
|
262
|
+
requestId,
|
|
263
|
+
extensions
|
|
264
264
|
}) {
|
|
265
265
|
const status = errorCodeToHttpStatus[code];
|
|
266
266
|
const title = getTitleFromCode(code);
|
|
@@ -275,7 +275,8 @@ function createApiError({
|
|
|
275
275
|
const errorMessage = message.length > 100 ? `${message.substring(0, 97)}...` : message;
|
|
276
276
|
const responseBody = {
|
|
277
277
|
...problemDetails,
|
|
278
|
-
error: { code, message: errorMessage }
|
|
278
|
+
error: { code, message: errorMessage },
|
|
279
|
+
...extensions && extensions
|
|
279
280
|
};
|
|
280
281
|
const res = new Response(JSON.stringify(responseBody), {
|
|
281
282
|
status,
|
|
@@ -388,15 +389,15 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
388
389
|
content: {
|
|
389
390
|
"application/problem+json": {
|
|
390
391
|
schema: problemDetailsSchema.extend({
|
|
391
|
-
code: z
|
|
392
|
+
code: z.literal(code).openapi({
|
|
392
393
|
description: "A short code indicating the error code returned.",
|
|
393
394
|
example: code
|
|
394
395
|
}),
|
|
395
|
-
detail: z
|
|
396
|
+
detail: z.string().openapi({
|
|
396
397
|
description: "A detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.",
|
|
397
398
|
example: description
|
|
398
399
|
}),
|
|
399
|
-
title: z
|
|
400
|
+
title: z.string().openapi({
|
|
400
401
|
description: "A short, human-readable summary of the problem type.",
|
|
401
402
|
example: getTitleFromCode(code)
|
|
402
403
|
}),
|
|
@@ -404,16 +405,16 @@ var errorSchemaFactory = (code, description) => ({
|
|
|
404
405
|
// description: "A URI reference that identifies the problem type.",
|
|
405
406
|
// example: `${ERROR_DOCS_BASE_URL}#${code}`,
|
|
406
407
|
// }),
|
|
407
|
-
status: z
|
|
408
|
+
status: z.number().int().openapi({
|
|
408
409
|
description: "The HTTP status code.",
|
|
409
410
|
example: errorCodeToHttpStatus[code]
|
|
410
411
|
}),
|
|
411
|
-
error: z
|
|
412
|
-
code: z
|
|
412
|
+
error: z.object({
|
|
413
|
+
code: z.literal(code).openapi({
|
|
413
414
|
description: "A short code indicating the error code returned.",
|
|
414
415
|
example: code
|
|
415
416
|
}),
|
|
416
|
-
message: z
|
|
417
|
+
message: z.string().openapi({
|
|
417
418
|
description: "A concise error message suitable for display to end users. May be truncated if the full detail is long.",
|
|
418
419
|
example: description.length > 100 ? `${description.substring(0, 97)}...` : description
|
|
419
420
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-
|
|
2
|
-
import { z } from 'zod';
|
|
1
|
+
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-XHODTX4H.js';
|
|
2
|
+
import { z } from '@hono/zod-openapi';
|
|
3
3
|
|
|
4
4
|
// src/validation/cycleDetection.ts
|
|
5
5
|
function detectDelegationCycles(agentData) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
|
|
2
|
-
import { loadEnvironmentFiles } from './chunk-
|
|
3
|
-
import { z } from 'zod';
|
|
2
|
+
import { loadEnvironmentFiles } from './chunk-RUTYLJB7.js';
|
|
3
|
+
import { z } from '@hono/zod-openapi';
|
|
4
4
|
|
|
5
5
|
loadEnvironmentFiles();
|
|
6
6
|
var constantsSchema = z.object(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { verification, user, ssoProvider, session, organization, member, invitation, account } from './chunk-
|
|
1
|
+
import { verification, user, ssoProvider, session, organization, member, invitation, account } from './chunk-GENLXHZ4.js';
|
|
2
2
|
import { __export } from './chunk-SIAA4J6H.js';
|
|
3
3
|
import { relations } from 'drizzle-orm';
|
|
4
4
|
import { pgTable, varchar, text, timestamp, jsonb, primaryKey, foreignKey, integer, index, unique } from 'drizzle-orm/pg-core';
|