@inkeep/agents-core 0.0.0-dev-20251125083010 → 0.0.0-dev-20251125085423
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 +34 -0
- package/dist/auth/auth-validation-schemas.js +1 -1
- package/dist/auth/auth.d.ts +22 -22
- package/dist/auth/auth.js +9 -2
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/auth/permissions.js +1 -1
- package/dist/{chunk-W3QDM7WH.js → chunk-4FHCJ65J.js} +1 -1
- 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-K6GMXJPW.js → chunk-XHODTX4H.js} +1 -1
- package/dist/{chunk-I6IF7ZTL.js → chunk-ZSYMSL55.js} +2 -2
- package/dist/{client-CD-dO-so.d.ts → client-B_3j-V4-.d.ts} +1 -1
- package/dist/client-exports.d.ts +5 -5
- package/dist/client-exports.js +2 -2
- package/dist/credential-stores/index.d.ts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +2 -2
- package/dist/db/test-client.d.ts +3 -3
- package/dist/db/test-client.js +1 -1
- package/dist/index.d.ts +253 -253
- package/dist/index.js +9 -9
- package/dist/{schema-BGPkUUmn.d.ts → schema-DKbG39on.d.ts} +1 -1
- package/dist/{server-DuzlQdBX.d.ts → server-BXoUiBMg.d.ts} +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-Cw2pFmu3.d.ts → utility-Lo5NoRHK.d.ts} +300 -300
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/0002_puzzling_goblin_queen.sql +8 -0
- package/drizzle/meta/0002_snapshot.json +3637 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- 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';
|
|
@@ -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,4 +1,4 @@
|
|
|
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
3
|
import { z } from 'zod';
|
|
4
4
|
|
package/dist/auth/auth.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ 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-B_3j-V4-.js';
|
|
8
8
|
import 'drizzle-orm/node-postgres';
|
|
9
9
|
import 'drizzle-orm/pglite';
|
|
10
|
-
import '../schema-
|
|
10
|
+
import '../schema-DKbG39on.js';
|
|
11
11
|
import 'drizzle-orm';
|
|
12
12
|
import 'drizzle-orm/pg-core';
|
|
13
|
-
import '../utility-
|
|
13
|
+
import '../utility-Lo5NoRHK.js';
|
|
14
14
|
import 'drizzle-zod';
|
|
15
15
|
import '@hono/zod-openapi';
|
|
16
16
|
import './auth-schema.js';
|
|
@@ -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
1
|
import { generateId } from '../chunk-XSKQ54TS.js';
|
|
2
2
|
import { env } from '../chunk-LL6F3EAR.js';
|
|
3
|
-
import { ssoProvider } from '../chunk-
|
|
4
|
-
import { ownerRole, adminRole, memberRole, ac } from '../chunk-
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-
|
|
1
|
+
import { AgentWithinContextOfProjectSchema, resourceIdSchema, MAX_ID_LENGTH } from './chunk-XHODTX4H.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
// src/validation/cycleDetection.ts
|
|
@@ -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';
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { relations } from 'drizzle-orm';
|
|
2
|
+
import { pgTable, timestamp, text, boolean, index } from 'drizzle-orm/pg-core';
|
|
3
|
+
|
|
4
|
+
// src/auth/auth-schema.ts
|
|
5
|
+
var user = pgTable("user", {
|
|
6
|
+
id: text("id").primaryKey(),
|
|
7
|
+
name: text("name").notNull(),
|
|
8
|
+
email: text("email").notNull().unique(),
|
|
9
|
+
emailVerified: boolean("email_verified").default(false).notNull(),
|
|
10
|
+
image: text("image"),
|
|
11
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
12
|
+
updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
13
|
+
});
|
|
14
|
+
var session = pgTable(
|
|
15
|
+
"session",
|
|
16
|
+
{
|
|
17
|
+
id: text("id").primaryKey(),
|
|
18
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
19
|
+
token: text("token").notNull().unique(),
|
|
20
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
21
|
+
updatedAt: timestamp("updated_at").$onUpdate(() => /* @__PURE__ */ new Date()).notNull(),
|
|
22
|
+
ipAddress: text("ip_address"),
|
|
23
|
+
userAgent: text("user_agent"),
|
|
24
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
25
|
+
activeOrganizationId: text("active_organization_id")
|
|
26
|
+
},
|
|
27
|
+
(table) => [index("session_userId_idx").on(table.userId)]
|
|
28
|
+
);
|
|
29
|
+
var account = pgTable(
|
|
30
|
+
"account",
|
|
31
|
+
{
|
|
32
|
+
id: text("id").primaryKey(),
|
|
33
|
+
accountId: text("account_id").notNull(),
|
|
34
|
+
providerId: text("provider_id").notNull(),
|
|
35
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
36
|
+
accessToken: text("access_token"),
|
|
37
|
+
refreshToken: text("refresh_token"),
|
|
38
|
+
idToken: text("id_token"),
|
|
39
|
+
accessTokenExpiresAt: timestamp("access_token_expires_at"),
|
|
40
|
+
refreshTokenExpiresAt: timestamp("refresh_token_expires_at"),
|
|
41
|
+
scope: text("scope"),
|
|
42
|
+
password: text("password"),
|
|
43
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
44
|
+
updatedAt: timestamp("updated_at").$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
45
|
+
},
|
|
46
|
+
(table) => [index("account_userId_idx").on(table.userId)]
|
|
47
|
+
);
|
|
48
|
+
var verification = pgTable(
|
|
49
|
+
"verification",
|
|
50
|
+
{
|
|
51
|
+
id: text("id").primaryKey(),
|
|
52
|
+
identifier: text("identifier").notNull(),
|
|
53
|
+
value: text("value").notNull(),
|
|
54
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
55
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
56
|
+
updatedAt: timestamp("updated_at").defaultNow().$onUpdate(() => /* @__PURE__ */ new Date()).notNull()
|
|
57
|
+
},
|
|
58
|
+
(table) => [index("verification_identifier_idx").on(table.identifier)]
|
|
59
|
+
);
|
|
60
|
+
var ssoProvider = pgTable("sso_provider", {
|
|
61
|
+
id: text("id").primaryKey(),
|
|
62
|
+
issuer: text("issuer").notNull(),
|
|
63
|
+
oidcConfig: text("oidc_config"),
|
|
64
|
+
samlConfig: text("saml_config"),
|
|
65
|
+
userId: text("user_id").references(() => user.id, { onDelete: "cascade" }),
|
|
66
|
+
providerId: text("provider_id").notNull().unique(),
|
|
67
|
+
organizationId: text("organization_id"),
|
|
68
|
+
domain: text("domain").notNull()
|
|
69
|
+
});
|
|
70
|
+
var organization = pgTable("organization", {
|
|
71
|
+
id: text("id").primaryKey(),
|
|
72
|
+
name: text("name").notNull(),
|
|
73
|
+
slug: text("slug").notNull().unique(),
|
|
74
|
+
logo: text("logo"),
|
|
75
|
+
createdAt: timestamp("created_at").notNull(),
|
|
76
|
+
metadata: text("metadata")
|
|
77
|
+
});
|
|
78
|
+
var member = pgTable(
|
|
79
|
+
"member",
|
|
80
|
+
{
|
|
81
|
+
id: text("id").primaryKey(),
|
|
82
|
+
organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
|
|
83
|
+
userId: text("user_id").notNull().references(() => user.id, { onDelete: "cascade" }),
|
|
84
|
+
role: text("role").default("member").notNull(),
|
|
85
|
+
createdAt: timestamp("created_at").notNull()
|
|
86
|
+
},
|
|
87
|
+
(table) => [
|
|
88
|
+
index("member_organizationId_idx").on(table.organizationId),
|
|
89
|
+
index("member_userId_idx").on(table.userId)
|
|
90
|
+
]
|
|
91
|
+
);
|
|
92
|
+
var invitation = pgTable(
|
|
93
|
+
"invitation",
|
|
94
|
+
{
|
|
95
|
+
id: text("id").primaryKey(),
|
|
96
|
+
organizationId: text("organization_id").notNull().references(() => organization.id, { onDelete: "cascade" }),
|
|
97
|
+
email: text("email").notNull(),
|
|
98
|
+
role: text("role"),
|
|
99
|
+
status: text("status").default("pending").notNull(),
|
|
100
|
+
expiresAt: timestamp("expires_at").notNull(),
|
|
101
|
+
createdAt: timestamp("created_at").defaultNow().notNull(),
|
|
102
|
+
inviterId: text("inviter_id").notNull().references(() => user.id, { onDelete: "cascade" })
|
|
103
|
+
},
|
|
104
|
+
(table) => [
|
|
105
|
+
index("invitation_organizationId_idx").on(table.organizationId),
|
|
106
|
+
index("invitation_email_idx").on(table.email)
|
|
107
|
+
]
|
|
108
|
+
);
|
|
109
|
+
var userRelations = relations(user, ({ many }) => ({
|
|
110
|
+
sessions: many(session),
|
|
111
|
+
accounts: many(account),
|
|
112
|
+
ssoProviders: many(ssoProvider),
|
|
113
|
+
members: many(member),
|
|
114
|
+
invitations: many(invitation)
|
|
115
|
+
}));
|
|
116
|
+
var sessionRelations = relations(session, ({ one }) => ({
|
|
117
|
+
user: one(user, {
|
|
118
|
+
fields: [session.userId],
|
|
119
|
+
references: [user.id]
|
|
120
|
+
})
|
|
121
|
+
}));
|
|
122
|
+
var accountRelations = relations(account, ({ one }) => ({
|
|
123
|
+
user: one(user, {
|
|
124
|
+
fields: [account.userId],
|
|
125
|
+
references: [user.id]
|
|
126
|
+
})
|
|
127
|
+
}));
|
|
128
|
+
var ssoProviderRelations = relations(ssoProvider, ({ one }) => ({
|
|
129
|
+
user: one(user, {
|
|
130
|
+
fields: [ssoProvider.userId],
|
|
131
|
+
references: [user.id]
|
|
132
|
+
})
|
|
133
|
+
}));
|
|
134
|
+
var organizationRelations = relations(organization, ({ many }) => ({
|
|
135
|
+
members: many(member),
|
|
136
|
+
invitations: many(invitation)
|
|
137
|
+
}));
|
|
138
|
+
var memberRelations = relations(member, ({ one }) => ({
|
|
139
|
+
organization: one(organization, {
|
|
140
|
+
fields: [member.organizationId],
|
|
141
|
+
references: [organization.id]
|
|
142
|
+
}),
|
|
143
|
+
user: one(user, {
|
|
144
|
+
fields: [member.userId],
|
|
145
|
+
references: [user.id]
|
|
146
|
+
})
|
|
147
|
+
}));
|
|
148
|
+
var invitationRelations = relations(invitation, ({ one }) => ({
|
|
149
|
+
organization: one(organization, {
|
|
150
|
+
fields: [invitation.organizationId],
|
|
151
|
+
references: [organization.id]
|
|
152
|
+
}),
|
|
153
|
+
user: one(user, {
|
|
154
|
+
fields: [invitation.inviterId],
|
|
155
|
+
references: [user.id]
|
|
156
|
+
})
|
|
157
|
+
}));
|
|
158
|
+
|
|
159
|
+
export { account, accountRelations, invitation, invitationRelations, member, memberRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createAccessControl } from 'better-auth/plugins/access';
|
|
2
|
-
import { defaultStatements } from 'better-auth/plugins/organization/access';
|
|
2
|
+
import { defaultStatements, memberAc, adminAc, ownerAc } from 'better-auth/plugins/organization/access';
|
|
3
3
|
|
|
4
4
|
// src/auth/permissions.ts
|
|
5
5
|
var statement = {
|
|
@@ -28,7 +28,8 @@ var memberRole = ac.newRole({
|
|
|
28
28
|
artifact_component: ["read"],
|
|
29
29
|
external_agent: ["read"],
|
|
30
30
|
function: ["read"],
|
|
31
|
-
context_config: ["read"]
|
|
31
|
+
context_config: ["read"],
|
|
32
|
+
...memberAc.statements
|
|
32
33
|
});
|
|
33
34
|
var adminRole = ac.newRole({
|
|
34
35
|
project: ["create", "read", "update"],
|
|
@@ -41,7 +42,8 @@ var adminRole = ac.newRole({
|
|
|
41
42
|
artifact_component: ["create", "read", "update"],
|
|
42
43
|
external_agent: ["create", "read", "update"],
|
|
43
44
|
function: ["create", "read", "update"],
|
|
44
|
-
context_config: ["create", "read", "update"]
|
|
45
|
+
context_config: ["create", "read", "update"],
|
|
46
|
+
...adminAc.statements
|
|
45
47
|
});
|
|
46
48
|
var ownerRole = ac.newRole({
|
|
47
49
|
project: ["create", "read", "update", "delete"],
|
|
@@ -54,7 +56,8 @@ var ownerRole = ac.newRole({
|
|
|
54
56
|
artifact_component: ["create", "read", "update", "delete"],
|
|
55
57
|
external_agent: ["create", "read", "update", "delete"],
|
|
56
58
|
function: ["create", "read", "update", "delete"],
|
|
57
|
-
context_config: ["create", "read", "update", "delete"]
|
|
59
|
+
context_config: ["create", "read", "update", "delete"],
|
|
60
|
+
...ownerAc.statements
|
|
58
61
|
});
|
|
59
62
|
|
|
60
63
|
export { ac, adminRole, memberRole, ownerRole };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { subAgents, subAgentRelations, agents, tasks, taskRelations, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, tools, functionTools, functions, contextConfigs, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, ledgerArtifacts, projects } from './chunk-
|
|
1
|
+
import { subAgents, subAgentRelations, agents, tasks, taskRelations, conversations, messages, contextCache, dataComponents, subAgentDataComponents, artifactComponents, subAgentArtifactComponents, externalAgents, apiKeys, credentialReferences, tools, functionTools, functions, contextConfigs, subAgentToolRelations, subAgentExternalAgentRelations, subAgentTeamAgentRelations, ledgerArtifacts, projects } from './chunk-DEYPSEXR.js';
|
|
2
2
|
import { schemaValidationDefaults } from './chunk-Z64UK4CA.js';
|
|
3
3
|
import { VALID_RELATION_TYPES, MCPTransportType, TOOL_STATUS_VALUES, CredentialStoreType, MCPServerType } from './chunk-YFHT5M2R.js';
|
|
4
4
|
import { z } from '@hono/zod-openapi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { schema_exports, projects } from './chunk-
|
|
2
|
-
import { organization } from './chunk-
|
|
1
|
+
import { schema_exports, projects } from './chunk-DEYPSEXR.js';
|
|
2
|
+
import { organization } from './chunk-GENLXHZ4.js';
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { PGlite } from '@electric-sql/pglite';
|
|
@@ -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-
|
|
3
|
+
import { s as schema } from './schema-DKbG39on.js';
|
|
4
4
|
|
|
5
5
|
type DatabaseClient = NodePgDatabase<typeof schema> | PgliteDatabase<typeof schema>;
|
|
6
6
|
interface DatabaseConfig {
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -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-7G0Dxt55.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-
|
|
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-
|
|
3
|
+
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullAgentAgentInsertSchema } from './utility-Lo5NoRHK.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-Lo5NoRHK.js';
|
|
5
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import 'drizzle-zod';
|
|
@@ -134,8 +134,8 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
134
134
|
}, z.core.$strip>>>;
|
|
135
135
|
}, z.core.$strip>;
|
|
136
136
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
137
|
-
name: z.ZodString;
|
|
138
137
|
id: z.ZodString;
|
|
138
|
+
name: z.ZodString;
|
|
139
139
|
description: z.ZodString;
|
|
140
140
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
141
141
|
}, {
|
|
@@ -170,11 +170,11 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
170
170
|
description: z.ZodOptional<z.ZodString>;
|
|
171
171
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
172
172
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
173
|
-
name: z.ZodString;
|
|
174
173
|
id: z.ZodString;
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
description: z.ZodString;
|
|
175
176
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
176
177
|
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>;
|
package/dist/client-exports.js
CHANGED
|
@@ -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-MQMMFK2K.js';
|
|
2
|
-
import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-
|
|
3
|
-
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-
|
|
2
|
+
import { ModelSettingsSchema, FullAgentAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-XHODTX4H.js';
|
|
3
|
+
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, StopWhenSchema, SubAgentStopWhenSchema, validatePropsAsJsonSchema } from './chunk-XHODTX4H.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,6 +1,6 @@
|
|
|
1
|
-
import { C as CredentialStore } from '../server-
|
|
1
|
+
import { C as CredentialStore } from '../server-BXoUiBMg.js';
|
|
2
2
|
import 'hono';
|
|
3
|
-
import '../utility-
|
|
3
|
+
import '../utility-Lo5NoRHK.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'drizzle-zod';
|
|
6
6
|
import 'drizzle-orm/pg-core';
|