@inkeep/agents-core 0.0.0-dev-20260106194315 → 0.0.0-dev-20260106221934
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/_virtual/rolldown_runtime.js +2 -2
- package/dist/auth/auth-schema.d.ts +104 -104
- package/dist/auth/auth-validation-schemas.d.ts +146 -146
- package/dist/auth/auth.d.ts +85 -76
- package/dist/auth/permissions.d.ts +15 -14
- package/dist/auth/permissions.js +2 -1
- package/dist/client-exports.d.ts +2 -1
- package/dist/data-access/agents.d.ts +41 -41
- package/dist/data-access/apiKeys.d.ts +20 -20
- package/dist/data-access/artifactComponents.d.ts +12 -12
- package/dist/data-access/contextConfigs.d.ts +12 -12
- package/dist/data-access/conversations.d.ts +16 -16
- package/dist/data-access/dataComponents.d.ts +6 -6
- package/dist/data-access/functionTools.d.ts +8 -8
- package/dist/data-access/messages.d.ts +21 -21
- package/dist/data-access/subAgentExternalAgentRelations.d.ts +30 -30
- package/dist/data-access/subAgentRelations.d.ts +30 -30
- package/dist/data-access/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/subAgents.d.ts +15 -15
- package/dist/data-access/tasks.d.ts +5 -5
- package/dist/data-access/tools.d.ts +33 -33
- package/dist/db/schema.d.ts +405 -405
- package/dist/db/schema.js +2 -2
- package/dist/utils/schema-conversion.d.ts +1 -1
- package/dist/utils/schema-conversion.js +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1020 -1020
- package/package.json +9 -9
package/dist/auth/auth.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import { DatabaseClient } from "../db/client.js";
|
|
|
2
2
|
import * as _better_auth_sso0 from "@better-auth/sso";
|
|
3
3
|
import * as better_auth0 from "better-auth";
|
|
4
4
|
import { BetterAuthAdvancedOptions } from "better-auth";
|
|
5
|
-
import * as
|
|
6
|
-
import * as better_auth_social_providers0 from "better-auth/social-providers";
|
|
7
|
-
import { GoogleOptions } from "better-auth/social-providers";
|
|
5
|
+
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
8
6
|
import * as zod0 from "zod";
|
|
7
|
+
import { GoogleOptions } from "better-auth/social-providers";
|
|
9
8
|
|
|
10
9
|
//#region src/auth/auth.d.ts
|
|
11
10
|
interface OIDCProviderConfig {
|
|
@@ -105,9 +104,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
105
104
|
[key: string]: any;
|
|
106
105
|
};
|
|
107
106
|
data: any;
|
|
108
|
-
}>) | undefined;
|
|
107
|
+
} | null>) | undefined;
|
|
109
108
|
refreshAccessToken?: ((refreshToken: string) => Promise<better_auth0.OAuth2Tokens>) | undefined;
|
|
110
|
-
mapProfileToUser?: ((profile:
|
|
109
|
+
mapProfileToUser?: ((profile: better_auth0.GoogleProfile) => {
|
|
111
110
|
id?: string;
|
|
112
111
|
name?: string;
|
|
113
112
|
email?: string | null;
|
|
@@ -165,6 +164,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
165
164
|
generateId?: better_auth0.GenerateIdFn | false | "serial" | "uuid";
|
|
166
165
|
} | undefined;
|
|
167
166
|
trustedProxyHeaders?: boolean | undefined;
|
|
167
|
+
backgroundTasks?: {
|
|
168
|
+
handler: (promise: Promise<void>) => void;
|
|
169
|
+
};
|
|
168
170
|
};
|
|
169
171
|
trustedOrigins: string[];
|
|
170
172
|
plugins: [{
|
|
@@ -183,6 +185,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
183
185
|
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
184
186
|
}[];
|
|
185
187
|
};
|
|
188
|
+
options: better_auth_plugins0.BearerOptions | undefined;
|
|
186
189
|
}, {
|
|
187
190
|
id: "sso";
|
|
188
191
|
endpoints: {
|
|
@@ -207,8 +210,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
207
210
|
};
|
|
208
211
|
};
|
|
209
212
|
};
|
|
210
|
-
} & {
|
|
211
|
-
use: any[];
|
|
212
213
|
}, Response>>;
|
|
213
214
|
registerSSOProvider: better_auth0.StrictEndpoint<"/sso/register", {
|
|
214
215
|
method: "POST";
|
|
@@ -228,6 +229,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
228
229
|
}>>;
|
|
229
230
|
jwksEndpoint: zod0.ZodOptional<zod0.ZodString>;
|
|
230
231
|
discoveryEndpoint: zod0.ZodOptional<zod0.ZodString>;
|
|
232
|
+
skipDiscovery: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
231
233
|
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
232
234
|
pkce: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodBoolean>>;
|
|
233
235
|
mapping: zod0.ZodOptional<zod0.ZodObject<{
|
|
@@ -472,9 +474,11 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
472
474
|
};
|
|
473
475
|
};
|
|
474
476
|
};
|
|
475
|
-
} & {
|
|
476
|
-
use: any[];
|
|
477
477
|
}, {
|
|
478
|
+
redirectURI: string;
|
|
479
|
+
oidcConfig: _better_auth_sso0.OIDCConfig | null;
|
|
480
|
+
samlConfig: _better_auth_sso0.SAMLConfig | null;
|
|
481
|
+
} & Omit<{
|
|
478
482
|
issuer: string;
|
|
479
483
|
oidcConfig?: _better_auth_sso0.OIDCConfig | undefined;
|
|
480
484
|
samlConfig?: _better_auth_sso0.SAMLConfig | undefined;
|
|
@@ -482,7 +486,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
482
486
|
providerId: string;
|
|
483
487
|
organizationId?: string | undefined;
|
|
484
488
|
domain: string;
|
|
485
|
-
}
|
|
489
|
+
}, "oidcConfig" | "samlConfig">>;
|
|
486
490
|
signInSSO: ReturnType<(options?: _better_auth_sso0.SSOOptions) => better_auth0.StrictEndpoint<"/sign-in/sso", {
|
|
487
491
|
method: "POST";
|
|
488
492
|
body: zod0.ZodObject<{
|
|
@@ -497,8 +501,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
497
501
|
loginHint: zod0.ZodOptional<zod0.ZodString>;
|
|
498
502
|
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
499
503
|
providerType: zod0.ZodOptional<zod0.ZodEnum<{
|
|
500
|
-
oidc: "oidc";
|
|
501
504
|
saml: "saml";
|
|
505
|
+
oidc: "oidc";
|
|
502
506
|
}>>;
|
|
503
507
|
}, better_auth0.$strip>;
|
|
504
508
|
metadata: {
|
|
@@ -573,8 +577,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
573
577
|
};
|
|
574
578
|
};
|
|
575
579
|
};
|
|
576
|
-
} & {
|
|
577
|
-
use: any[];
|
|
578
580
|
}, {
|
|
579
581
|
url: string;
|
|
580
582
|
redirect: boolean;
|
|
@@ -589,7 +591,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
589
591
|
}, better_auth0.$strip>;
|
|
590
592
|
allowedMediaTypes: string[];
|
|
591
593
|
metadata: {
|
|
592
|
-
isAction: false;
|
|
593
594
|
openapi: {
|
|
594
595
|
operationId: string;
|
|
595
596
|
summary: string;
|
|
@@ -600,9 +601,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
600
601
|
};
|
|
601
602
|
};
|
|
602
603
|
};
|
|
604
|
+
scope: "server";
|
|
603
605
|
};
|
|
604
|
-
} & {
|
|
605
|
-
use: any[];
|
|
606
606
|
}, never>>;
|
|
607
607
|
callbackSSOSAML: ReturnType<(options?: _better_auth_sso0.SSOOptions) => better_auth0.StrictEndpoint<"/sso/saml2/callback/:providerId", {
|
|
608
608
|
method: "POST";
|
|
@@ -611,7 +611,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
611
611
|
RelayState: zod0.ZodOptional<zod0.ZodString>;
|
|
612
612
|
}, better_auth0.$strip>;
|
|
613
613
|
metadata: {
|
|
614
|
-
isAction: false;
|
|
615
614
|
allowedMediaTypes: string[];
|
|
616
615
|
openapi: {
|
|
617
616
|
operationId: string;
|
|
@@ -629,9 +628,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
629
628
|
};
|
|
630
629
|
};
|
|
631
630
|
};
|
|
631
|
+
scope: "server";
|
|
632
632
|
};
|
|
633
|
-
} & {
|
|
634
|
-
use: any[];
|
|
635
633
|
}, never>>;
|
|
636
634
|
acsEndpoint: ReturnType<(options?: _better_auth_sso0.SSOOptions) => better_auth0.StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
|
|
637
635
|
method: "POST";
|
|
@@ -643,7 +641,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
643
641
|
RelayState: zod0.ZodOptional<zod0.ZodString>;
|
|
644
642
|
}, better_auth0.$strip>;
|
|
645
643
|
metadata: {
|
|
646
|
-
isAction: false;
|
|
647
644
|
allowedMediaTypes: string[];
|
|
648
645
|
openapi: {
|
|
649
646
|
operationId: string;
|
|
@@ -655,9 +652,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
655
652
|
};
|
|
656
653
|
};
|
|
657
654
|
};
|
|
655
|
+
scope: "server";
|
|
658
656
|
};
|
|
659
|
-
} & {
|
|
660
|
-
use: any[];
|
|
661
657
|
}, never>>;
|
|
662
658
|
} & {
|
|
663
659
|
requestDomainVerification: ReturnType<(options: _better_auth_sso0.SSOOptions) => better_auth0.StrictEndpoint<"/sso/request-domain-verification", {
|
|
@@ -705,8 +701,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
705
701
|
};
|
|
706
702
|
};
|
|
707
703
|
}>)[];
|
|
708
|
-
} & {
|
|
709
|
-
use: any[];
|
|
710
704
|
}, {
|
|
711
705
|
domainVerificationToken: string;
|
|
712
706
|
}>>;
|
|
@@ -758,8 +752,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
758
752
|
};
|
|
759
753
|
};
|
|
760
754
|
}>)[];
|
|
761
|
-
} & {
|
|
762
|
-
use: any[];
|
|
763
755
|
}, void>>;
|
|
764
756
|
};
|
|
765
757
|
schema: any;
|
|
@@ -770,7 +762,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
770
762
|
};
|
|
771
763
|
}, {
|
|
772
764
|
id: "oauth-proxy";
|
|
773
|
-
options:
|
|
765
|
+
options: NoInfer<{
|
|
766
|
+
productionURL: string;
|
|
767
|
+
}>;
|
|
774
768
|
endpoints: {
|
|
775
769
|
oAuthProxy: better_auth0.StrictEndpoint<"/oauth-proxy-callback", {
|
|
776
770
|
method: "GET";
|
|
@@ -805,8 +799,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
805
799
|
};
|
|
806
800
|
};
|
|
807
801
|
};
|
|
808
|
-
} & {
|
|
809
|
-
use: any[];
|
|
810
802
|
}, never>;
|
|
811
803
|
};
|
|
812
804
|
hooks: {
|
|
@@ -821,30 +813,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
821
813
|
};
|
|
822
814
|
}, {
|
|
823
815
|
id: "organization";
|
|
824
|
-
endpoints:
|
|
816
|
+
endpoints: better_auth_plugins0.OrganizationEndpoints<{
|
|
825
817
|
allowUserToCreateOrganization: true;
|
|
826
|
-
ac:
|
|
818
|
+
ac: better_auth_plugins0.AccessControl;
|
|
827
819
|
roles: {
|
|
828
820
|
member: {
|
|
829
|
-
authorize<K_1 extends "function" | "
|
|
830
|
-
actions:
|
|
821
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
822
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
831
823
|
connector: "OR" | "AND";
|
|
832
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
833
|
-
statements:
|
|
824
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
825
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
834
826
|
};
|
|
835
827
|
admin: {
|
|
836
|
-
authorize<K_1 extends "function" | "
|
|
837
|
-
actions:
|
|
828
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
829
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
838
830
|
connector: "OR" | "AND";
|
|
839
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
840
|
-
statements:
|
|
831
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
832
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
841
833
|
};
|
|
842
834
|
owner: {
|
|
843
|
-
authorize<K_1 extends "function" | "
|
|
844
|
-
actions:
|
|
835
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
836
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
845
837
|
connector: "OR" | "AND";
|
|
846
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
847
|
-
statements:
|
|
838
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
839
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
848
840
|
};
|
|
849
841
|
};
|
|
850
842
|
membershipLimit: number;
|
|
@@ -854,9 +846,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
854
846
|
id: string;
|
|
855
847
|
role: string;
|
|
856
848
|
email: string;
|
|
857
|
-
organization:
|
|
858
|
-
invitation:
|
|
859
|
-
inviter:
|
|
849
|
+
organization: better_auth_plugins0.Organization;
|
|
850
|
+
invitation: better_auth_plugins0.Invitation;
|
|
851
|
+
inviter: better_auth_plugins0.Member & {
|
|
860
852
|
user: better_auth0.User;
|
|
861
853
|
};
|
|
862
854
|
}): Promise<void>;
|
|
@@ -989,7 +981,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
989
981
|
organizationId: string;
|
|
990
982
|
email: string;
|
|
991
983
|
role: "member" | "admin" | "owner";
|
|
992
|
-
status:
|
|
984
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
993
985
|
inviterId: string;
|
|
994
986
|
expiresAt: Date;
|
|
995
987
|
createdAt: Date;
|
|
@@ -1028,7 +1020,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1028
1020
|
organizationId: string;
|
|
1029
1021
|
email: string;
|
|
1030
1022
|
role: "member" | "admin" | "owner";
|
|
1031
|
-
status:
|
|
1023
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
1032
1024
|
inviterId: string;
|
|
1033
1025
|
expiresAt: Date;
|
|
1034
1026
|
createdAt: Date;
|
|
@@ -1100,30 +1092,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1100
1092
|
readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
|
|
1101
1093
|
readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
|
|
1102
1094
|
};
|
|
1103
|
-
options: {
|
|
1095
|
+
options: NoInfer<{
|
|
1104
1096
|
allowUserToCreateOrganization: true;
|
|
1105
|
-
ac:
|
|
1097
|
+
ac: better_auth_plugins0.AccessControl;
|
|
1106
1098
|
roles: {
|
|
1107
1099
|
member: {
|
|
1108
|
-
authorize<K_1 extends "function" | "
|
|
1109
|
-
actions:
|
|
1100
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1101
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
1110
1102
|
connector: "OR" | "AND";
|
|
1111
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1112
|
-
statements:
|
|
1103
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1104
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
1113
1105
|
};
|
|
1114
1106
|
admin: {
|
|
1115
|
-
authorize<K_1 extends "function" | "
|
|
1116
|
-
actions:
|
|
1107
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1108
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
1117
1109
|
connector: "OR" | "AND";
|
|
1118
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1119
|
-
statements:
|
|
1110
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1111
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
1120
1112
|
};
|
|
1121
1113
|
owner: {
|
|
1122
|
-
authorize<K_1 extends "function" | "
|
|
1123
|
-
actions:
|
|
1114
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1115
|
+
actions: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>[key];
|
|
1124
1116
|
connector: "OR" | "AND";
|
|
1125
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1126
|
-
statements:
|
|
1117
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1118
|
+
statements: better_auth_plugins0.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins0.Statements>;
|
|
1127
1119
|
};
|
|
1128
1120
|
};
|
|
1129
1121
|
membershipLimit: number;
|
|
@@ -1133,13 +1125,13 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1133
1125
|
id: string;
|
|
1134
1126
|
role: string;
|
|
1135
1127
|
email: string;
|
|
1136
|
-
organization:
|
|
1137
|
-
invitation:
|
|
1138
|
-
inviter:
|
|
1128
|
+
organization: better_auth_plugins0.Organization;
|
|
1129
|
+
invitation: better_auth_plugins0.Invitation;
|
|
1130
|
+
inviter: better_auth_plugins0.Member & {
|
|
1139
1131
|
user: better_auth0.User;
|
|
1140
1132
|
};
|
|
1141
1133
|
}): Promise<void>;
|
|
1142
|
-
}
|
|
1134
|
+
}>;
|
|
1143
1135
|
}, {
|
|
1144
1136
|
id: "device-authorization";
|
|
1145
1137
|
schema: {
|
|
@@ -1262,8 +1254,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1262
1254
|
};
|
|
1263
1255
|
};
|
|
1264
1256
|
};
|
|
1265
|
-
} & {
|
|
1266
|
-
use: any[];
|
|
1267
1257
|
}, {
|
|
1268
1258
|
device_code: string;
|
|
1269
1259
|
user_code: string;
|
|
@@ -1334,8 +1324,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1334
1324
|
};
|
|
1335
1325
|
};
|
|
1336
1326
|
};
|
|
1337
|
-
} & {
|
|
1338
|
-
use: any[];
|
|
1339
1327
|
}, {
|
|
1340
1328
|
access_token: string;
|
|
1341
1329
|
token_type: string;
|
|
@@ -1381,8 +1369,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1381
1369
|
};
|
|
1382
1370
|
};
|
|
1383
1371
|
};
|
|
1384
|
-
} & {
|
|
1385
|
-
use: any[];
|
|
1386
1372
|
}, {
|
|
1387
1373
|
user_code: string;
|
|
1388
1374
|
status: string;
|
|
@@ -1423,8 +1409,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1423
1409
|
};
|
|
1424
1410
|
};
|
|
1425
1411
|
};
|
|
1426
|
-
} & {
|
|
1427
|
-
use: any[];
|
|
1428
1412
|
}, {
|
|
1429
1413
|
success: boolean;
|
|
1430
1414
|
}>;
|
|
@@ -1462,8 +1446,6 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1462
1446
|
};
|
|
1463
1447
|
};
|
|
1464
1448
|
};
|
|
1465
|
-
} & {
|
|
1466
|
-
use: any[];
|
|
1467
1449
|
}, {
|
|
1468
1450
|
success: boolean;
|
|
1469
1451
|
}>;
|
|
@@ -1482,6 +1464,33 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1482
1464
|
readonly INVALID_DEVICE_CODE_STATUS: "Invalid device code status";
|
|
1483
1465
|
readonly AUTHENTICATION_REQUIRED: "Authentication required";
|
|
1484
1466
|
};
|
|
1467
|
+
options: Partial<{
|
|
1468
|
+
expiresIn: better_auth_plugins0.TimeString;
|
|
1469
|
+
interval: better_auth_plugins0.TimeString;
|
|
1470
|
+
deviceCodeLength: number;
|
|
1471
|
+
userCodeLength: number;
|
|
1472
|
+
schema: {
|
|
1473
|
+
deviceCode?: {
|
|
1474
|
+
modelName?: string | undefined;
|
|
1475
|
+
fields?: {
|
|
1476
|
+
deviceCode?: string | undefined;
|
|
1477
|
+
userCode?: string | undefined;
|
|
1478
|
+
userId?: string | undefined;
|
|
1479
|
+
expiresAt?: string | undefined;
|
|
1480
|
+
status?: string | undefined;
|
|
1481
|
+
lastPolledAt?: string | undefined;
|
|
1482
|
+
pollingInterval?: string | undefined;
|
|
1483
|
+
clientId?: string | undefined;
|
|
1484
|
+
scope?: string | undefined;
|
|
1485
|
+
} | undefined;
|
|
1486
|
+
} | undefined;
|
|
1487
|
+
};
|
|
1488
|
+
generateDeviceCode?: (() => string | Promise<string>) | undefined;
|
|
1489
|
+
generateUserCode?: (() => string | Promise<string>) | undefined;
|
|
1490
|
+
validateClient?: ((clientId: string) => boolean | Promise<boolean>) | undefined;
|
|
1491
|
+
onDeviceAuthRequest?: ((clientId: string, scope: string | undefined) => void | Promise<void>) | undefined;
|
|
1492
|
+
verificationUri?: string | undefined;
|
|
1493
|
+
}>;
|
|
1485
1494
|
}];
|
|
1486
1495
|
}>;
|
|
1487
1496
|
declare const auth: ReturnType<typeof createAuth>;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_plugins55 from "better-auth/plugins";
|
|
2
2
|
import { AccessControl } from "better-auth/plugins/access";
|
|
3
|
+
import { organizationClient } from "better-auth/client/plugins";
|
|
3
4
|
|
|
4
5
|
//#region src/auth/permissions.d.ts
|
|
5
6
|
declare const ac: AccessControl;
|
|
6
7
|
declare const memberRole: {
|
|
7
|
-
authorize<K_1 extends "function" | "
|
|
8
|
-
actions:
|
|
8
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key] | {
|
|
9
|
+
actions: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key];
|
|
9
10
|
connector: "OR" | "AND";
|
|
10
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
11
|
-
statements:
|
|
11
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins55.AuthorizeResponse;
|
|
12
|
+
statements: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>;
|
|
12
13
|
};
|
|
13
14
|
declare const adminRole: {
|
|
14
|
-
authorize<K_1 extends "function" | "
|
|
15
|
-
actions:
|
|
15
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key] | {
|
|
16
|
+
actions: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key];
|
|
16
17
|
connector: "OR" | "AND";
|
|
17
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
18
|
-
statements:
|
|
18
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins55.AuthorizeResponse;
|
|
19
|
+
statements: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>;
|
|
19
20
|
};
|
|
20
21
|
declare const ownerRole: {
|
|
21
|
-
authorize<K_1 extends "function" | "
|
|
22
|
-
actions:
|
|
22
|
+
authorize<K_1 extends "function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key] | {
|
|
23
|
+
actions: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>[key];
|
|
23
24
|
connector: "OR" | "AND";
|
|
24
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
25
|
-
statements:
|
|
25
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins55.AuthorizeResponse;
|
|
26
|
+
statements: better_auth_plugins55.Subset<"function" | "organization" | "agent" | "member" | "invitation" | "project" | "tool" | "credential" | "ac" | "sub_agent" | "api_key" | "data_component" | "artifact_component" | "external_agent" | "context_config" | "team", better_auth_plugins55.Statements>;
|
|
26
27
|
};
|
|
27
28
|
//#endregion
|
|
28
|
-
export { ac, adminRole, memberRole, ownerRole };
|
|
29
|
+
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
package/dist/auth/permissions.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createAccessControl } from "better-auth/plugins/access";
|
|
2
2
|
import { adminAc, defaultStatements, memberAc, ownerAc } from "better-auth/plugins/organization/access";
|
|
3
|
+
import { organizationClient } from "better-auth/client/plugins";
|
|
3
4
|
|
|
4
5
|
//#region src/auth/permissions.ts
|
|
5
6
|
const statement = {
|
|
@@ -215,4 +216,4 @@ const ownerRole = ac.newRole({
|
|
|
215
216
|
});
|
|
216
217
|
|
|
217
218
|
//#endregion
|
|
218
|
-
export { ac, adminRole, memberRole, ownerRole };
|
|
219
|
+
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAge
|
|
|
4
4
|
import "./types/index.js";
|
|
5
5
|
import { detectAuthenticationRequired } from "./utils/auth-detection.js";
|
|
6
6
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
7
|
+
import "./index.js";
|
|
7
8
|
import { ConversationHistoryConfig, CredentialStoreType, MCPTransportType } from "./types/utility.js";
|
|
8
9
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
9
10
|
import { z } from "@hono/zod-openapi";
|
|
@@ -191,9 +192,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
191
192
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
192
193
|
id: z.ZodString;
|
|
193
194
|
name: z.ZodString;
|
|
195
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
196
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
195
197
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
196
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
198
|
models: z.ZodOptional<z.ZodObject<{
|
|
198
199
|
base: z.ZodOptional<z.ZodObject<{
|
|
199
200
|
model: z.ZodOptional<z.ZodString>;
|