@inkeep/agents-core 0.50.1 → 0.50.3
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 +105 -105
- package/dist/auth/auth-validation-schemas.d.ts +148 -148
- package/dist/auth/auth.d.ts +24 -24
- package/dist/auth/auth.js +8 -9
- package/dist/auth/authz/sync.d.ts +22 -1
- package/dist/auth/authz/sync.js +59 -4
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +12 -11
- package/dist/constants/models.d.ts +1 -0
- package/dist/constants/models.js +1 -0
- package/dist/constants/otel-attributes.d.ts +4 -0
- package/dist/constants/otel-attributes.js +4 -0
- package/dist/data-access/manage/agents.d.ts +40 -40
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/scope-helpers.d.ts +25 -0
- package/dist/data-access/manage/scope-helpers.js +18 -0
- package/dist/data-access/manage/skills.d.ts +14 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentExternalAgentRelations.js +13 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +24 -24
- package/dist/data-access/manage/tools.d.ts +24 -24
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +445 -445
- package/dist/db/runtime/runtime-schema.d.ts +288 -288
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/middleware/authz-meta.d.ts +15 -0
- package/dist/middleware/authz-meta.js +11 -0
- package/dist/middleware/create-protected-route.d.ts +30 -0
- package/dist/middleware/create-protected-route.js +20 -0
- package/dist/middleware/index.d.ts +5 -0
- package/dist/middleware/index.js +6 -0
- package/dist/middleware/inherited-auth.d.ts +43 -0
- package/dist/middleware/inherited-auth.js +50 -0
- package/dist/middleware/no-auth.d.ts +6 -0
- package/dist/middleware/no-auth.js +11 -0
- package/dist/utils/in-process-fetch.d.ts +30 -0
- package/dist/utils/in-process-fetch.js +51 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1969 -1969
- package/package.json +5 -1
package/dist/auth/auth.d.ts
CHANGED
|
@@ -880,25 +880,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
880
880
|
ac: better_auth_plugins0.AccessControl;
|
|
881
881
|
roles: {
|
|
882
882
|
member: {
|
|
883
|
-
authorize<K_1 extends "
|
|
884
|
-
actions: better_auth_plugins0.Subset<"
|
|
883
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
884
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
885
885
|
connector: "OR" | "AND";
|
|
886
886
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
887
|
-
statements: better_auth_plugins0.Subset<"
|
|
887
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
888
888
|
};
|
|
889
889
|
admin: {
|
|
890
|
-
authorize<K_1 extends "
|
|
891
|
-
actions: better_auth_plugins0.Subset<"
|
|
890
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
891
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
892
892
|
connector: "OR" | "AND";
|
|
893
893
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
894
|
-
statements: better_auth_plugins0.Subset<"
|
|
894
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
895
895
|
};
|
|
896
896
|
owner: {
|
|
897
|
-
authorize<K_1 extends "
|
|
898
|
-
actions: better_auth_plugins0.Subset<"
|
|
897
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
898
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
899
899
|
connector: "OR" | "AND";
|
|
900
900
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
901
|
-
statements: better_auth_plugins0.Subset<"
|
|
901
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
902
902
|
};
|
|
903
903
|
};
|
|
904
904
|
creatorRole: "admin";
|
|
@@ -947,7 +947,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
947
947
|
user: better_auth0.User & Record<string, any>;
|
|
948
948
|
organization: better_auth_plugins0.Organization & Record<string, any>;
|
|
949
949
|
}) => Promise<void>;
|
|
950
|
-
|
|
950
|
+
beforeRemoveMember: ({
|
|
951
951
|
member,
|
|
952
952
|
organization: org
|
|
953
953
|
}: {
|
|
@@ -1084,7 +1084,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1084
1084
|
id: string;
|
|
1085
1085
|
organizationId: string;
|
|
1086
1086
|
email: string;
|
|
1087
|
-
role: "
|
|
1087
|
+
role: "member" | "admin" | "owner";
|
|
1088
1088
|
status: better_auth_plugins0.InvitationStatus;
|
|
1089
1089
|
inviterId: string;
|
|
1090
1090
|
expiresAt: Date;
|
|
@@ -1094,7 +1094,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1094
1094
|
Member: {
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
organizationId: string;
|
|
1097
|
-
role: "
|
|
1097
|
+
role: "member" | "admin" | "owner";
|
|
1098
1098
|
createdAt: Date;
|
|
1099
1099
|
userId: string;
|
|
1100
1100
|
user: {
|
|
@@ -1110,7 +1110,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1110
1110
|
members: {
|
|
1111
1111
|
id: string;
|
|
1112
1112
|
organizationId: string;
|
|
1113
|
-
role: "
|
|
1113
|
+
role: "member" | "admin" | "owner";
|
|
1114
1114
|
createdAt: Date;
|
|
1115
1115
|
userId: string;
|
|
1116
1116
|
user: {
|
|
@@ -1124,7 +1124,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1124
1124
|
id: string;
|
|
1125
1125
|
organizationId: string;
|
|
1126
1126
|
email: string;
|
|
1127
|
-
role: "
|
|
1127
|
+
role: "member" | "admin" | "owner";
|
|
1128
1128
|
status: better_auth_plugins0.InvitationStatus;
|
|
1129
1129
|
inviterId: string;
|
|
1130
1130
|
expiresAt: Date;
|
|
@@ -1203,25 +1203,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1203
1203
|
ac: better_auth_plugins0.AccessControl;
|
|
1204
1204
|
roles: {
|
|
1205
1205
|
member: {
|
|
1206
|
-
authorize<K_1 extends "
|
|
1207
|
-
actions: better_auth_plugins0.Subset<"
|
|
1206
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1207
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1208
1208
|
connector: "OR" | "AND";
|
|
1209
1209
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1210
|
-
statements: better_auth_plugins0.Subset<"
|
|
1210
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1211
1211
|
};
|
|
1212
1212
|
admin: {
|
|
1213
|
-
authorize<K_1 extends "
|
|
1214
|
-
actions: better_auth_plugins0.Subset<"
|
|
1213
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1214
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1215
1215
|
connector: "OR" | "AND";
|
|
1216
1216
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1217
|
-
statements: better_auth_plugins0.Subset<"
|
|
1217
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1218
1218
|
};
|
|
1219
1219
|
owner: {
|
|
1220
|
-
authorize<K_1 extends "
|
|
1221
|
-
actions: better_auth_plugins0.Subset<"
|
|
1220
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1221
|
+
actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1222
1222
|
connector: "OR" | "AND";
|
|
1223
1223
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1224
|
-
statements: better_auth_plugins0.Subset<"
|
|
1224
|
+
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1225
1225
|
};
|
|
1226
1226
|
};
|
|
1227
1227
|
creatorRole: "admin";
|
|
@@ -1270,7 +1270,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1270
1270
|
user: better_auth0.User & Record<string, any>;
|
|
1271
1271
|
organization: better_auth_plugins0.Organization & Record<string, any>;
|
|
1272
1272
|
}) => Promise<void>;
|
|
1273
|
-
|
|
1273
|
+
beforeRemoveMember: ({
|
|
1274
1274
|
member,
|
|
1275
1275
|
organization: org
|
|
1276
1276
|
}: {
|
package/dist/auth/auth.js
CHANGED
|
@@ -117,7 +117,7 @@ function createAuth(config) {
|
|
|
117
117
|
updateAge: 3600 * 24,
|
|
118
118
|
cookieCache: {
|
|
119
119
|
enabled: true,
|
|
120
|
-
maxAge:
|
|
120
|
+
maxAge: 30,
|
|
121
121
|
strategy: "compact"
|
|
122
122
|
}
|
|
123
123
|
},
|
|
@@ -209,18 +209,17 @@ function createAuth(config) {
|
|
|
209
209
|
console.log(`🔐 SpiceDB: Revoked all project memberships for ${member$1.userId} (promoted to ${targetRole})`);
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
|
-
|
|
212
|
+
beforeRemoveMember: async ({ member: member$1, organization: org }) => {
|
|
213
213
|
try {
|
|
214
|
-
const {
|
|
215
|
-
await
|
|
214
|
+
const { revokeAllUserRelationships } = await import("./authz/sync.js");
|
|
215
|
+
await revokeAllUserRelationships({
|
|
216
216
|
tenantId: org.id,
|
|
217
|
-
userId: member$1.userId
|
|
218
|
-
role: member$1.role,
|
|
219
|
-
action: "remove"
|
|
217
|
+
userId: member$1.userId
|
|
220
218
|
});
|
|
221
|
-
console.log(`🔐 SpiceDB:
|
|
219
|
+
console.log(`🔐 SpiceDB: Preparing to remove member ${member$1.userId} - revoked all relationships in org ${org.name}`);
|
|
222
220
|
} catch (error) {
|
|
223
|
-
console.error("❌ SpiceDB
|
|
221
|
+
console.error("❌ SpiceDB cleanup failed before member removal:", error);
|
|
222
|
+
throw new Error(`Failed to clean up user permissions: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
}
|
|
@@ -73,6 +73,9 @@ declare function removeProjectFromSpiceDb(params: {
|
|
|
73
73
|
/**
|
|
74
74
|
* List all explicit project members from SpiceDB.
|
|
75
75
|
* Returns users with project_admin, project_member, or project_viewer roles.
|
|
76
|
+
*
|
|
77
|
+
* NOTE: This is an appropriate use of readRelationships for data introspection,
|
|
78
|
+
* not permission logic (per SpiceDB best practices).
|
|
76
79
|
*/
|
|
77
80
|
declare function listProjectMembers(params: {
|
|
78
81
|
tenantId: string;
|
|
@@ -84,6 +87,9 @@ declare function listProjectMembers(params: {
|
|
|
84
87
|
/**
|
|
85
88
|
* List all project memberships for a specific user.
|
|
86
89
|
* Returns projects where the user has explicit project_admin, project_member, or project_viewer roles.
|
|
90
|
+
*
|
|
91
|
+
* NOTE: This is an appropriate use of readRelationships for data introspection,
|
|
92
|
+
* not permission logic (per SpiceDB best practices).
|
|
87
93
|
*/
|
|
88
94
|
declare function listUserProjectMembershipsInSpiceDb(params: {
|
|
89
95
|
tenantId: string;
|
|
@@ -102,5 +108,20 @@ declare function revokeAllProjectMemberships(params: {
|
|
|
102
108
|
tenantId: string;
|
|
103
109
|
userId: string;
|
|
104
110
|
}): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Revoke ALL user relationships within an organization.
|
|
113
|
+
* Call when: user is being removed from an organization.
|
|
114
|
+
*
|
|
115
|
+
* This removes:
|
|
116
|
+
* 1. Organization-level relationships (owner, admin, member)
|
|
117
|
+
* 2. All project-level relationships within the organization
|
|
118
|
+
*
|
|
119
|
+
* Uses the most efficient approach: filters by subject without specifying relation.
|
|
120
|
+
* This is much more efficient than individual relation-specific deletions.
|
|
121
|
+
*/
|
|
122
|
+
declare function revokeAllUserRelationships(params: {
|
|
123
|
+
tenantId: string;
|
|
124
|
+
userId: string;
|
|
125
|
+
}): Promise<void>;
|
|
105
126
|
//#endregion
|
|
106
|
-
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
|
127
|
+
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeAllUserRelationships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
package/dist/auth/authz/sync.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpiceDbRelations, SpiceDbResourceTypes } from "./types.js";
|
|
2
2
|
import { fromSpiceDbProjectId, toSpiceDbProjectId } from "./config.js";
|
|
3
|
-
import { RelationshipOperation, deleteRelationship, getSpiceClient, readRelationships, writeRelationship } from "./client.js";
|
|
3
|
+
import { RelationshipOperation, checkBulkPermissions, deleteRelationship, getSpiceClient, readRelationships, writeRelationship } from "./client.js";
|
|
4
4
|
|
|
5
5
|
//#region src/auth/authz/sync.ts
|
|
6
6
|
/**
|
|
@@ -82,12 +82,13 @@ async function changeOrgRole(params) {
|
|
|
82
82
|
*/
|
|
83
83
|
async function syncProjectToSpiceDb(params) {
|
|
84
84
|
const spice = getSpiceClient();
|
|
85
|
-
const isOrgAdminOrOwner = (await
|
|
85
|
+
const isOrgAdminOrOwner = (await checkBulkPermissions({
|
|
86
86
|
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
87
87
|
resourceId: params.tenantId,
|
|
88
|
+
permissions: ["manage"],
|
|
88
89
|
subjectType: SpiceDbResourceTypes.USER,
|
|
89
90
|
subjectId: params.creatorUserId
|
|
90
|
-
})).
|
|
91
|
+
})).manage;
|
|
91
92
|
const spiceProjectId = toSpiceDbProjectId(params.tenantId, params.projectId);
|
|
92
93
|
const updates = [{
|
|
93
94
|
operation: RelationshipOperation.TOUCH,
|
|
@@ -224,6 +225,9 @@ async function removeProjectFromSpiceDb(params) {
|
|
|
224
225
|
/**
|
|
225
226
|
* List all explicit project members from SpiceDB.
|
|
226
227
|
* Returns users with project_admin, project_member, or project_viewer roles.
|
|
228
|
+
*
|
|
229
|
+
* NOTE: This is an appropriate use of readRelationships for data introspection,
|
|
230
|
+
* not permission logic (per SpiceDB best practices).
|
|
227
231
|
*/
|
|
228
232
|
async function listProjectMembers(params) {
|
|
229
233
|
return (await readRelationships({
|
|
@@ -237,6 +241,9 @@ async function listProjectMembers(params) {
|
|
|
237
241
|
/**
|
|
238
242
|
* List all project memberships for a specific user.
|
|
239
243
|
* Returns projects where the user has explicit project_admin, project_member, or project_viewer roles.
|
|
244
|
+
*
|
|
245
|
+
* NOTE: This is an appropriate use of readRelationships for data introspection,
|
|
246
|
+
* not permission logic (per SpiceDB best practices).
|
|
240
247
|
*/
|
|
241
248
|
async function listUserProjectMembershipsInSpiceDb(params) {
|
|
242
249
|
return (await readRelationships({
|
|
@@ -319,6 +326,54 @@ async function revokeAllProjectMemberships(params) {
|
|
|
319
326
|
})
|
|
320
327
|
]);
|
|
321
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Revoke ALL user relationships within an organization.
|
|
331
|
+
* Call when: user is being removed from an organization.
|
|
332
|
+
*
|
|
333
|
+
* This removes:
|
|
334
|
+
* 1. Organization-level relationships (owner, admin, member)
|
|
335
|
+
* 2. All project-level relationships within the organization
|
|
336
|
+
*
|
|
337
|
+
* Uses the most efficient approach: filters by subject without specifying relation.
|
|
338
|
+
* This is much more efficient than individual relation-specific deletions.
|
|
339
|
+
*/
|
|
340
|
+
async function revokeAllUserRelationships(params) {
|
|
341
|
+
const spice = getSpiceClient();
|
|
342
|
+
const tenantPrefix = `${params.tenantId}/`;
|
|
343
|
+
await Promise.all([spice.promises.deleteRelationships({
|
|
344
|
+
relationshipFilter: {
|
|
345
|
+
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
346
|
+
optionalResourceId: params.tenantId,
|
|
347
|
+
optionalResourceIdPrefix: "",
|
|
348
|
+
optionalRelation: "",
|
|
349
|
+
optionalSubjectFilter: {
|
|
350
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
351
|
+
optionalSubjectId: params.userId,
|
|
352
|
+
optionalRelation: void 0
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
optionalPreconditions: [],
|
|
356
|
+
optionalLimit: 0,
|
|
357
|
+
optionalAllowPartialDeletions: false,
|
|
358
|
+
optionalTransactionMetadata: void 0
|
|
359
|
+
}), spice.promises.deleteRelationships({
|
|
360
|
+
relationshipFilter: {
|
|
361
|
+
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
362
|
+
optionalResourceId: "",
|
|
363
|
+
optionalResourceIdPrefix: tenantPrefix,
|
|
364
|
+
optionalRelation: "",
|
|
365
|
+
optionalSubjectFilter: {
|
|
366
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
367
|
+
optionalSubjectId: params.userId,
|
|
368
|
+
optionalRelation: void 0
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
optionalPreconditions: [],
|
|
372
|
+
optionalLimit: 0,
|
|
373
|
+
optionalAllowPartialDeletions: false,
|
|
374
|
+
optionalTransactionMetadata: void 0
|
|
375
|
+
})]);
|
|
376
|
+
}
|
|
322
377
|
|
|
323
378
|
//#endregion
|
|
324
|
-
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
|
379
|
+
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeAllUserRelationships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
|
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
|
|
|
5
5
|
//#region src/auth/permissions.d.ts
|
|
6
6
|
declare const ac: AccessControl;
|
|
7
7
|
declare const memberRole: {
|
|
8
|
-
authorize<K_1 extends "
|
|
9
|
-
actions: better_auth_plugins69.Subset<"
|
|
8
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
9
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
10
10
|
connector: "OR" | "AND";
|
|
11
11
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
12
|
-
statements: better_auth_plugins69.Subset<"
|
|
12
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
13
13
|
};
|
|
14
14
|
declare const adminRole: {
|
|
15
|
-
authorize<K_1 extends "
|
|
16
|
-
actions: better_auth_plugins69.Subset<"
|
|
15
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
16
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
17
17
|
connector: "OR" | "AND";
|
|
18
18
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
19
|
-
statements: better_auth_plugins69.Subset<"
|
|
19
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
20
20
|
};
|
|
21
21
|
declare const ownerRole: {
|
|
22
|
-
authorize<K_1 extends "
|
|
23
|
-
actions: better_auth_plugins69.Subset<"
|
|
22
|
+
authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
23
|
+
actions: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
24
24
|
connector: "OR" | "AND";
|
|
25
25
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
26
|
-
statements: better_auth_plugins69.Subset<"
|
|
26
|
+
statements: better_auth_plugins69.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ConversationHistoryConfig, CredentialStoreType, MCPTransportType } from
|
|
|
6
6
|
import "./types/index.js";
|
|
7
7
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
8
8
|
import { detectAuthenticationRequired } from "./utils/auth-detection.js";
|
|
9
|
+
import "./index.js";
|
|
9
10
|
import { AgentApiInsertSchema, AgentApiSelectSchema, AgentApiUpdateSchema, AgentInsertSchema, AgentListResponse, AgentResponse, AgentSelectSchema, AgentStopWhen, AgentStopWhenSchema, AgentUpdateSchema, AgentWithinContextOfProjectResponse, AgentWithinContextOfProjectSchema, AgentWithinContextOfProjectSelectResponse, AgentWithinContextOfProjectSelectSchema, AgentWithinContextOfProjectSelectSchemaWithRelationIds, AllAgentSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiSelectSchema, ApiKeyApiUpdateSchema, ApiKeyInsertSchema, ApiKeyListResponse, ApiKeyResponse, ApiKeySelectSchema, ApiKeyUpdateSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiUpdateSchema, ArtifactComponentArrayResponse, ArtifactComponentInsertSchema, ArtifactComponentListResponse, ArtifactComponentResponse, ArtifactComponentSelectSchema, ArtifactComponentUpdateSchema, CanUseItemSchema, ComponentAssociationListResponse, ComponentAssociationSchema, ComponentJoin, ComponentJoinSchema, ContextCacheApiInsertSchema, ContextCacheApiSelectSchema, ContextCacheApiUpdateSchema, ContextCacheInsertSchema, ContextCacheSelectSchema, ContextCacheUpdateSchema, ContextConfigApiInsertSchema, ContextConfigApiSelectSchema, ContextConfigApiUpdateSchema, ContextConfigInsertSchema, ContextConfigListResponse, ContextConfigResponse, ContextConfigSelectSchema, ContextConfigUpdateSchema, ConversationApiInsertSchema, ConversationApiSelectSchema, ConversationApiUpdateSchema, ConversationInsertSchema, ConversationSelectSchema, ConversationUpdateSchema, CreateCredentialInStoreRequestSchema, CreateCredentialInStoreResponseSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiUpdateSchema, CredentialReferenceInsertSchema, CredentialReferenceListResponse, CredentialReferenceResponse, CredentialReferenceSelectSchema, CredentialReferenceUpdateSchema, CredentialStoreListResponseSchema, CredentialStoreSchema, CronExpressionSchema, DataComponentApiInsertSchema, DataComponentApiSelectSchema, DataComponentApiUpdateSchema, DataComponentArrayResponse, DataComponentInsertSchema, DataComponentListResponse, DataComponentResponse, DataComponentSelectSchema, DataComponentUpdateSchema, DataPartSchema, DatasetApiInsertSchema, DatasetApiSelectSchema, DatasetApiUpdateSchema, DatasetInsertSchema, DatasetItemApiInsertSchema, DatasetItemApiSelectSchema, DatasetItemApiUpdateSchema, DatasetItemInsertSchema, DatasetItemSelectSchema, DatasetItemUpdateSchema, DatasetRunApiInsertSchema, DatasetRunApiSelectSchema, DatasetRunApiUpdateSchema, DatasetRunConfigAgentRelationInsertSchema, DatasetRunConfigAgentRelationSelectSchema, DatasetRunConfigAgentRelationUpdateSchema, DatasetRunConfigApiInsertSchema, DatasetRunConfigApiSelectSchema, DatasetRunConfigApiUpdateSchema, DatasetRunConfigInsertSchema, DatasetRunConfigSelectSchema, DatasetRunConfigUpdateSchema, DatasetRunConversationRelationApiInsertSchema, DatasetRunConversationRelationApiSelectSchema, DatasetRunConversationRelationApiUpdateSchema, DatasetRunConversationRelationInsertSchema, DatasetRunConversationRelationSelectSchema, DatasetRunConversationRelationUpdateSchema, DatasetRunInsertSchema, DatasetRunItemSchema, DatasetRunSelectSchema, DatasetRunUpdateSchema, DatasetSelectSchema, DatasetUpdateSchema, DateTimeFilterQueryParamsSchema, ErrorResponseSchema, EvaluationJobConfigApiInsertSchema, EvaluationJobConfigApiSelectSchema, EvaluationJobConfigApiUpdateSchema, EvaluationJobConfigEvaluatorRelationApiInsertSchema, EvaluationJobConfigEvaluatorRelationApiSelectSchema, EvaluationJobConfigEvaluatorRelationApiUpdateSchema, EvaluationJobConfigEvaluatorRelationInsertSchema, EvaluationJobConfigEvaluatorRelationSelectSchema, EvaluationJobConfigEvaluatorRelationUpdateSchema, EvaluationJobConfigInsertSchema, EvaluationJobConfigSelectSchema, EvaluationJobConfigUpdateSchema, EvaluationJobFilterCriteriaSchema, EvaluationResultApiInsertSchema, EvaluationResultApiSelectSchema, EvaluationResultApiUpdateSchema, EvaluationResultInsertSchema, EvaluationResultSelectSchema, EvaluationResultUpdateSchema, EvaluationRunApiInsertSchema, EvaluationRunApiSelectSchema, EvaluationRunApiUpdateSchema, EvaluationRunConfigApiInsertSchema, EvaluationRunConfigApiSelectSchema, EvaluationRunConfigApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationApiUpdateSchema, EvaluationRunConfigEvaluationSuiteConfigRelationInsertSchema, EvaluationRunConfigEvaluationSuiteConfigRelationSelectSchema, EvaluationRunConfigEvaluationSuiteConfigRelationUpdateSchema, EvaluationRunConfigInsertSchema, EvaluationRunConfigSelectSchema, EvaluationRunConfigUpdateSchema, EvaluationRunConfigWithSuiteConfigsApiSelectSchema, EvaluationRunInsertSchema, EvaluationRunSelectSchema, EvaluationRunUpdateSchema, EvaluationSuiteConfigApiInsertSchema, EvaluationSuiteConfigApiSelectSchema, EvaluationSuiteConfigApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationApiInsertSchema, EvaluationSuiteConfigEvaluatorRelationApiSelectSchema, EvaluationSuiteConfigEvaluatorRelationApiUpdateSchema, EvaluationSuiteConfigEvaluatorRelationInsertSchema, EvaluationSuiteConfigEvaluatorRelationSelectSchema, EvaluationSuiteConfigEvaluatorRelationUpdateSchema, EvaluationSuiteConfigInsertSchema, EvaluationSuiteConfigSelectSchema, EvaluationSuiteConfigUpdateSchema, EvaluatorApiInsertSchema, EvaluatorApiSelectSchema, EvaluatorApiUpdateSchema, EvaluatorInsertSchema, EvaluatorSelectSchema, EvaluatorUpdateSchema, ExistsResponseSchema, ExternalAgentApiInsertSchema, ExternalAgentApiSelectSchema, ExternalAgentApiUpdateSchema, ExternalAgentInsertSchema, ExternalAgentListResponse, ExternalAgentResponse, ExternalAgentSelectSchema, ExternalAgentUpdateSchema, ExternalSubAgentRelationApiInsertSchema, ExternalSubAgentRelationInsertSchema, FetchConfigSchema, FetchDefinitionSchema, FilePartSchema, FullAgentAgentInsertSchema, FullAgentSubAgentSelectSchema, FullAgentSubAgentSelectSchemaWithRelationIds, FullProjectDefinitionResponse, FullProjectDefinitionSchema, FullProjectSelectResponse, FullProjectSelectSchema, FullProjectSelectSchemaWithRelationIds, FullProjectSelectWithRelationIdsResponse, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, FunctionInsertSchema, FunctionListResponse, FunctionResponse, FunctionSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiSelectSchema, FunctionToolApiUpdateSchema, FunctionToolConfig, FunctionToolConfigSchema, FunctionToolInsertSchema, FunctionToolListResponse, FunctionToolResponse, FunctionToolSelectSchema, FunctionToolUpdateSchema, FunctionUpdateSchema, HeadersScopeSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiUpdateSchema, LedgerArtifactInsertSchema, LedgerArtifactSelectSchema, LedgerArtifactUpdateSchema, ListResponseSchema, MAX_ID_LENGTH, MCPCatalogListResponse, MCPToolConfigSchema, MIN_ID_LENGTH, McpToolDefinitionSchema, McpToolListResponse, McpToolResponse, McpToolSchema, McpTransportConfigSchema, MessageApiInsertSchema, MessageApiSelectSchema, MessageApiUpdateSchema, MessageInsertSchema, MessageSelectSchema, MessageUpdateSchema, ModelSchema, ModelSettings, ModelSettingsSchema, OAuthCallbackQuerySchema, OAuthLoginQuerySchema, PaginationQueryParamsSchema, PaginationSchema, PaginationWithRefQueryParamsSchema, PartSchema, PartSchemaType, PrebuiltMCPServerSchema, ProjectApiInsertSchema, ProjectApiSelectSchema, ProjectApiUpdateSchema, ProjectInsertSchema, ProjectListResponse, ProjectMetadataInsertSchema, ProjectMetadataSelectSchema, ProjectModelSchema, ProjectResponse, ProjectSelectSchema, ProjectUpdateSchema, RefQueryParamSchema, RelatedAgentInfoListResponse, RelatedAgentInfoSchema, RemovedResponseSchema, ResourceIdSchema, ScheduledTrigger, ScheduledTriggerApiInsertBaseSchema, ScheduledTriggerApiInsertSchema, ScheduledTriggerApiSelectSchema, ScheduledTriggerApiUpdateSchema, ScheduledTriggerInsert, ScheduledTriggerInsertSchema, ScheduledTriggerInvocation, ScheduledTriggerInvocationApiInsertSchema, ScheduledTriggerInvocationApiSelectSchema, ScheduledTriggerInvocationApiUpdateSchema, ScheduledTriggerInvocationInsert, ScheduledTriggerInvocationInsertSchema, ScheduledTriggerInvocationListResponse, ScheduledTriggerInvocationResponse, ScheduledTriggerInvocationSelectSchema, ScheduledTriggerInvocationStatus, ScheduledTriggerInvocationStatusEnum, ScheduledTriggerInvocationUpdate, ScheduledTriggerInvocationUpdateSchema, ScheduledTriggerListResponse, ScheduledTriggerResponse, ScheduledTriggerSelectSchema, ScheduledTriggerUpdate, ScheduledTriggerUpdateSchema, ScheduledTriggerWithRunInfoListResponse, ScheduledTriggerWithRunInfoSchema, ScheduledWorkflow, ScheduledWorkflowApiInsertSchema, ScheduledWorkflowApiSelectSchema, ScheduledWorkflowApiUpdateSchema, ScheduledWorkflowInsert, ScheduledWorkflowInsertSchema, ScheduledWorkflowListResponse, ScheduledWorkflowResponse, ScheduledWorkflowSelectSchema, ScheduledWorkflowUpdate, ScheduledWorkflowUpdateSchema, SignatureSource, SignatureSourceSchema, SignatureValidationOptions, SignatureValidationOptionsSchema, SignatureVerificationConfig, SignatureVerificationConfigSchema, SignedComponent, SignedComponentSchema, SimulationAgent, SimulationAgentSchema, SingleResponseSchema, SkillApiInsertSchema, SkillApiSelectSchema, SkillApiUpdateSchema, SkillFrontmatterSchema, SkillInsertSchema, SkillListResponse, SkillResponse, SkillSelectSchema, SkillUpdateSchema, StatusComponentSchema, StatusUpdateSchema, StopWhen, StopWhenSchema, StringRecordSchema, SubAgentApiInsertSchema, SubAgentApiSelectSchema, SubAgentApiUpdateSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiUpdateSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentResponse, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentUpdateSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiUpdateSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentResponse, SubAgentDataComponentSelectSchema, SubAgentDataComponentUpdateSchema, SubAgentExternalAgentRelationApiInsertSchema, SubAgentExternalAgentRelationApiSelectSchema, SubAgentExternalAgentRelationApiUpdateSchema, SubAgentExternalAgentRelationInsertSchema, SubAgentExternalAgentRelationListResponse, SubAgentExternalAgentRelationResponse, SubAgentExternalAgentRelationSelectSchema, SubAgentExternalAgentRelationUpdateSchema, SubAgentFunctionToolRelationApiInsertSchema, SubAgentFunctionToolRelationApiSelectSchema, SubAgentFunctionToolRelationInsertSchema, SubAgentFunctionToolRelationListResponse, SubAgentFunctionToolRelationResponse, SubAgentFunctionToolRelationSelectSchema, SubAgentInsertSchema, SubAgentListResponse, SubAgentRelationApiInsertSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationInsertSchema, SubAgentRelationListResponse, SubAgentRelationQuerySchema, SubAgentRelationResponse, SubAgentRelationSelectSchema, SubAgentRelationUpdateSchema, SubAgentResponse, SubAgentSelectSchema, SubAgentSkillApiInsertSchema, SubAgentSkillApiSelectSchema, SubAgentSkillApiUpdateSchema, SubAgentSkillInsertSchema, SubAgentSkillResponse, SubAgentSkillSelectSchema, SubAgentSkillUpdateSchema, SubAgentSkillWithIndexArrayResponse, SubAgentSkillWithIndexSchema, SubAgentStopWhen, SubAgentStopWhenSchema, SubAgentTeamAgentRelationApiInsertSchema, SubAgentTeamAgentRelationApiSelectSchema, SubAgentTeamAgentRelationApiUpdateSchema, SubAgentTeamAgentRelationInsertSchema, SubAgentTeamAgentRelationListResponse, SubAgentTeamAgentRelationResponse, SubAgentTeamAgentRelationSelectSchema, SubAgentTeamAgentRelationUpdateSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiUpdateSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationListResponse, SubAgentToolRelationResponse, SubAgentToolRelationSelectSchema, SubAgentToolRelationUpdateSchema, SubAgentUpdateSchema, TaskApiInsertSchema, TaskApiSelectSchema, TaskApiUpdateSchema, TaskInsertSchema, TaskRelationApiInsertSchema, TaskRelationApiSelectSchema, TaskRelationApiUpdateSchema, TaskRelationInsertSchema, TaskRelationSelectSchema, TaskRelationUpdateSchema, TaskSelectSchema, TaskUpdateSchema, TeamAgentSchema, TenantIdParamsSchema, TenantParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, TextPartSchema, ThirdPartyMCPServerResponse, ToolApiInsertSchema, ToolApiSelectSchema, ToolApiUpdateSchema, ToolInsertSchema, ToolSelectSchema, ToolStatusSchema, ToolUpdateSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerAuthHeaderInputSchema, TriggerAuthHeaderStoredSchema, TriggerAuthHeaderUpdateSchema, TriggerAuthenticationInputSchema, TriggerAuthenticationSchema, TriggerAuthenticationStoredSchema, TriggerAuthenticationUpdateSchema, TriggerBatchConversationEvaluationSchema, TriggerConversationEvaluationSchema, TriggerDatasetRunSchema, TriggerEvaluationJobSchema, TriggerInsertSchema, TriggerInvocationApiInsertSchema, TriggerInvocationApiSelectSchema, TriggerInvocationApiUpdateSchema, TriggerInvocationInsertSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationSelectSchema, TriggerInvocationStatusEnum, TriggerInvocationUpdateSchema, TriggerListResponse, TriggerOutputTransformSchema, TriggerResponse, TriggerSelectSchema, TriggerUpdateSchema, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, URL_SAFE_ID_PATTERN, WorkAppGitHubAccessGetResponseSchema, WorkAppGitHubAccessModeSchema, WorkAppGitHubAccessSetRequestSchema, WorkAppGitHubAccessSetResponseSchema, WorkAppGitHubAccountTypeSchema, WorkAppGitHubInstallationApiInsertSchema, WorkAppGitHubInstallationInsertSchema, WorkAppGitHubInstallationSelectSchema, WorkAppGitHubInstallationStatusSchema, WorkAppGitHubMcpToolRepositoryAccessSelectSchema, WorkAppGitHubProjectRepositoryAccessSelectSchema, WorkAppGitHubRepositoryApiInsertSchema, WorkAppGitHubRepositoryInsertSchema, WorkAppGitHubRepositorySelectSchema, WorkAppGithubInstallationApiSelectSchema, canDelegateToExternalAgentInsertSchema, canDelegateToExternalAgentSchema, canDelegateToTeamAgentInsertSchema, canDelegateToTeamAgentSchema, canRelateToInternalSubAgentSchema } from "./validation/schemas.js";
|
|
10
11
|
import { transformToJson } from "./validation/extend-schemas.js";
|
|
11
12
|
import { z } from "@hono/zod-openapi";
|
|
@@ -19,7 +20,18 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
19
20
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
20
21
|
id: z.ZodString;
|
|
21
22
|
name: z.ZodString;
|
|
23
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
24
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
22
25
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
stopWhen: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
27
|
+
stepCountIs?: number | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
stepCountIs?: number | undefined;
|
|
30
|
+
}, z.core.$ZodTypeInternals<{
|
|
31
|
+
stepCountIs?: number | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
stepCountIs?: number | undefined;
|
|
34
|
+
}>>>>;
|
|
23
35
|
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
24
36
|
models: z.ZodOptional<z.ZodObject<{
|
|
25
37
|
base: z.ZodOptional<z.ZodObject<{
|
|
@@ -35,17 +47,6 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
35
47
|
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
36
48
|
}, z.core.$strip>>;
|
|
37
49
|
}, z.core.$strip>>;
|
|
38
|
-
stopWhen: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
39
|
-
stepCountIs?: number | undefined;
|
|
40
|
-
}, {
|
|
41
|
-
stepCountIs?: number | undefined;
|
|
42
|
-
}, z.core.$ZodTypeInternals<{
|
|
43
|
-
stepCountIs?: number | undefined;
|
|
44
|
-
}, {
|
|
45
|
-
stepCountIs?: number | undefined;
|
|
46
|
-
}>>>>;
|
|
47
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
48
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
49
50
|
type: z.ZodLiteral<"internal">;
|
|
50
51
|
canUse: z.ZodArray<z.ZodObject<{
|
|
51
52
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
|
@@ -38,6 +38,7 @@ declare const OPENAI_MODELS: {
|
|
|
38
38
|
readonly GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14";
|
|
39
39
|
};
|
|
40
40
|
declare const GOOGLE_MODELS: {
|
|
41
|
+
readonly GEMINI_3_1_PRO_PREVIEW: "google/gemini-3.1-pro-preview";
|
|
41
42
|
readonly GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview";
|
|
42
43
|
readonly GEMINI_3_FLASH_PREVIEW: "google/gemini-3-flash-preview";
|
|
43
44
|
readonly GEMINI_2_5_PRO: "google/gemini-2.5-pro";
|
package/dist/constants/models.js
CHANGED
|
@@ -38,6 +38,7 @@ const OPENAI_MODELS = {
|
|
|
38
38
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
39
39
|
};
|
|
40
40
|
const GOOGLE_MODELS = {
|
|
41
|
+
GEMINI_3_1_PRO_PREVIEW: "google/gemini-3.1-pro-preview",
|
|
41
42
|
GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
|
|
42
43
|
GEMINI_3_FLASH_PREVIEW: "google/gemini-3-flash-preview",
|
|
43
44
|
GEMINI_2_5_PRO: "google/gemini-2.5-pro",
|
|
@@ -93,6 +93,10 @@ declare const SPAN_KEYS: {
|
|
|
93
93
|
readonly ARTIFACT_DATA: "artifact.data";
|
|
94
94
|
readonly ARTIFACT_NAME: "artifact.name";
|
|
95
95
|
readonly ARTIFACT_DESCRIPTION: "artifact.description";
|
|
96
|
+
readonly ARTIFACT_IS_OVERSIZED: "artifact.is_oversized";
|
|
97
|
+
readonly ARTIFACT_RETRIEVAL_BLOCKED: "artifact.retrieval_blocked";
|
|
98
|
+
readonly ARTIFACT_ORIGINAL_TOKEN_SIZE: "artifact.original_token_size";
|
|
99
|
+
readonly ARTIFACT_CONTEXT_WINDOW_SIZE: "artifact.context_window_size";
|
|
96
100
|
readonly CONTEXT_BREAKDOWN_SYSTEM_TEMPLATE: "context.breakdown.system_template_tokens";
|
|
97
101
|
readonly CONTEXT_BREAKDOWN_CORE_INSTRUCTIONS: "context.breakdown.core_instructions_tokens";
|
|
98
102
|
readonly CONTEXT_BREAKDOWN_AGENT_PROMPT: "context.breakdown.agent_prompt_tokens";
|
|
@@ -93,6 +93,10 @@ const SPAN_KEYS = {
|
|
|
93
93
|
ARTIFACT_DATA: "artifact.data",
|
|
94
94
|
ARTIFACT_NAME: "artifact.name",
|
|
95
95
|
ARTIFACT_DESCRIPTION: "artifact.description",
|
|
96
|
+
ARTIFACT_IS_OVERSIZED: "artifact.is_oversized",
|
|
97
|
+
ARTIFACT_RETRIEVAL_BLOCKED: "artifact.retrieval_blocked",
|
|
98
|
+
ARTIFACT_ORIGINAL_TOKEN_SIZE: "artifact.original_token_size",
|
|
99
|
+
ARTIFACT_CONTEXT_WINDOW_SIZE: "artifact.context_window_size",
|
|
96
100
|
CONTEXT_BREAKDOWN_SYSTEM_TEMPLATE: "context.breakdown.system_template_tokens",
|
|
97
101
|
CONTEXT_BREAKDOWN_CORE_INSTRUCTIONS: "context.breakdown.core_instructions_tokens",
|
|
98
102
|
CONTEXT_BREAKDOWN_AGENT_PROMPT: "context.breakdown.agent_prompt_tokens",
|
|
@@ -10,10 +10,12 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
13
15
|
description: string | null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
stopWhen: {
|
|
17
|
+
transferCountIs?: number | undefined;
|
|
18
|
+
} | null;
|
|
17
19
|
prompt: string | null;
|
|
18
20
|
models: {
|
|
19
21
|
base?: {
|
|
@@ -29,11 +31,9 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
29
31
|
providerOptions?: Record<string, any> | undefined;
|
|
30
32
|
} | undefined;
|
|
31
33
|
} | null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
createdAt: string;
|
|
36
|
-
updatedAt: string;
|
|
34
|
+
projectId: string;
|
|
35
|
+
tenantId: string;
|
|
36
|
+
defaultSubAgentId: string | null;
|
|
37
37
|
contextConfigId: string | null;
|
|
38
38
|
statusUpdates: {
|
|
39
39
|
enabled?: boolean | undefined;
|
|
@@ -56,10 +56,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
56
56
|
}) => Promise<{
|
|
57
57
|
id: string;
|
|
58
58
|
name: string;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
59
61
|
description: string | null;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
stopWhen: {
|
|
63
|
+
transferCountIs?: number | undefined;
|
|
64
|
+
} | null;
|
|
63
65
|
prompt: string | null;
|
|
64
66
|
models: {
|
|
65
67
|
base?: {
|
|
@@ -75,11 +77,9 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
75
77
|
providerOptions?: Record<string, any> | undefined;
|
|
76
78
|
} | undefined;
|
|
77
79
|
} | null;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
createdAt: string;
|
|
82
|
-
updatedAt: string;
|
|
80
|
+
projectId: string;
|
|
81
|
+
tenantId: string;
|
|
82
|
+
defaultSubAgentId: string | null;
|
|
83
83
|
contextConfigId: string | null;
|
|
84
84
|
statusUpdates: {
|
|
85
85
|
enabled?: boolean | undefined;
|
|
@@ -99,10 +99,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
99
99
|
defaultSubAgent: {
|
|
100
100
|
id: string;
|
|
101
101
|
name: string;
|
|
102
|
+
createdAt: string;
|
|
103
|
+
updatedAt: string;
|
|
102
104
|
description: string | null;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
stopWhen: {
|
|
106
|
+
stepCountIs?: number | undefined;
|
|
107
|
+
} | null;
|
|
106
108
|
prompt: string | null;
|
|
107
109
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
108
110
|
models: {
|
|
@@ -119,11 +121,9 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
119
121
|
providerOptions?: Record<string, any> | undefined;
|
|
120
122
|
} | undefined;
|
|
121
123
|
} | null;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
createdAt: string;
|
|
126
|
-
updatedAt: string;
|
|
124
|
+
agentId: string;
|
|
125
|
+
projectId: string;
|
|
126
|
+
tenantId: string;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -131,10 +131,12 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
131
131
|
}) => Promise<{
|
|
132
132
|
id: string;
|
|
133
133
|
name: string;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
134
136
|
description: string | null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
stopWhen: {
|
|
138
|
+
transferCountIs?: number | undefined;
|
|
139
|
+
} | null;
|
|
138
140
|
prompt: string | null;
|
|
139
141
|
models: {
|
|
140
142
|
base?: {
|
|
@@ -150,11 +152,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
150
152
|
providerOptions?: Record<string, any> | undefined;
|
|
151
153
|
} | undefined;
|
|
152
154
|
} | null;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
createdAt: string;
|
|
157
|
-
updatedAt: string;
|
|
155
|
+
projectId: string;
|
|
156
|
+
tenantId: string;
|
|
157
|
+
defaultSubAgentId: string | null;
|
|
158
158
|
contextConfigId: string | null;
|
|
159
159
|
statusUpdates: {
|
|
160
160
|
enabled?: boolean | undefined;
|
|
@@ -247,10 +247,12 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
247
247
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
248
248
|
id: string;
|
|
249
249
|
name: string;
|
|
250
|
+
createdAt: string;
|
|
251
|
+
updatedAt: string;
|
|
250
252
|
description: string | null;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
stopWhen: {
|
|
254
|
+
transferCountIs?: number | undefined;
|
|
255
|
+
} | null;
|
|
254
256
|
prompt: string | null;
|
|
255
257
|
models: {
|
|
256
258
|
base?: {
|
|
@@ -266,11 +268,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
266
268
|
providerOptions?: Record<string, any> | undefined;
|
|
267
269
|
} | undefined;
|
|
268
270
|
} | null;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
createdAt: string;
|
|
273
|
-
updatedAt: string;
|
|
271
|
+
projectId: string;
|
|
272
|
+
tenantId: string;
|
|
273
|
+
defaultSubAgentId: string | null;
|
|
274
274
|
contextConfigId: string | null;
|
|
275
275
|
statusUpdates: {
|
|
276
276
|
enabled?: boolean | undefined;
|