@inkeep/agents-core 0.0.0-dev-20260225223007 → 0.0.0-dev-20260226082947
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 +107 -107
- package/dist/auth/auth-validation-schemas.d.ts +135 -135
- package/dist/auth/auth.d.ts +28 -28
- package/dist/auth/init.js +12 -2
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/conversations.d.ts +4 -4
- package/dist/data-access/runtime/tasks.d.ts +1 -1
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +292 -292
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/setup/setup.js +19 -5
- package/dist/validation/schemas.d.ts +1323 -1323
- package/package.json +3 -3
package/dist/auth/auth.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as zod0 from "zod";
|
|
|
3
3
|
import * as better_auth0 from "better-auth";
|
|
4
4
|
import { BetterAuthAdvancedOptions } from "better-auth";
|
|
5
5
|
import * as _better_auth_sso0 from "@better-auth/sso";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_auth_plugins20 from "better-auth/plugins";
|
|
7
7
|
import { GoogleOptions } from "better-auth/social-providers";
|
|
8
8
|
|
|
9
9
|
//#region src/auth/auth.d.ts
|
|
@@ -250,7 +250,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
250
250
|
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
251
251
|
}[];
|
|
252
252
|
};
|
|
253
|
-
options:
|
|
253
|
+
options: better_auth_plugins20.BearerOptions | undefined;
|
|
254
254
|
}, {
|
|
255
255
|
id: "sso";
|
|
256
256
|
endpoints: {
|
|
@@ -1241,30 +1241,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1241
1241
|
handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
|
|
1242
1242
|
}[];
|
|
1243
1243
|
};
|
|
1244
|
-
},
|
|
1244
|
+
}, better_auth_plugins20.DefaultOrganizationPlugin<{
|
|
1245
1245
|
allowUserToCreateOrganization: true;
|
|
1246
|
-
ac:
|
|
1246
|
+
ac: better_auth_plugins20.AccessControl;
|
|
1247
1247
|
roles: {
|
|
1248
1248
|
member: {
|
|
1249
|
-
authorize<K_1 extends "
|
|
1250
|
-
actions:
|
|
1249
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
|
|
1250
|
+
actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
|
|
1251
1251
|
connector: "OR" | "AND";
|
|
1252
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1253
|
-
statements:
|
|
1252
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1253
|
+
statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
|
|
1254
1254
|
};
|
|
1255
1255
|
admin: {
|
|
1256
|
-
authorize<K_1 extends "
|
|
1257
|
-
actions:
|
|
1256
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
|
|
1257
|
+
actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
|
|
1258
1258
|
connector: "OR" | "AND";
|
|
1259
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1260
|
-
statements:
|
|
1259
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1260
|
+
statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
|
|
1261
1261
|
};
|
|
1262
1262
|
owner: {
|
|
1263
|
-
authorize<K_1 extends "
|
|
1264
|
-
actions:
|
|
1263
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
|
|
1264
|
+
actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
|
|
1265
1265
|
connector: "OR" | "AND";
|
|
1266
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
1267
|
-
statements:
|
|
1266
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
|
|
1267
|
+
statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
|
|
1268
1268
|
};
|
|
1269
1269
|
};
|
|
1270
1270
|
creatorRole: "admin";
|
|
@@ -1275,9 +1275,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1275
1275
|
id: string;
|
|
1276
1276
|
role: string;
|
|
1277
1277
|
email: string;
|
|
1278
|
-
organization:
|
|
1279
|
-
invitation:
|
|
1280
|
-
inviter:
|
|
1278
|
+
organization: better_auth_plugins20.Organization;
|
|
1279
|
+
invitation: better_auth_plugins20.Invitation;
|
|
1280
|
+
inviter: better_auth_plugins20.Member & {
|
|
1281
1281
|
user: better_auth0.User;
|
|
1282
1282
|
};
|
|
1283
1283
|
}): Promise<void>;
|
|
@@ -1312,28 +1312,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1312
1312
|
user,
|
|
1313
1313
|
organization: org
|
|
1314
1314
|
}: {
|
|
1315
|
-
invitation:
|
|
1316
|
-
member:
|
|
1315
|
+
invitation: better_auth_plugins20.Invitation & Record<string, any>;
|
|
1316
|
+
member: better_auth_plugins20.Member & Record<string, any>;
|
|
1317
1317
|
user: better_auth0.User & Record<string, any>;
|
|
1318
|
-
organization:
|
|
1318
|
+
organization: better_auth_plugins20.Organization & Record<string, any>;
|
|
1319
1319
|
}) => Promise<void>;
|
|
1320
1320
|
beforeUpdateMemberRole: ({
|
|
1321
1321
|
member,
|
|
1322
1322
|
organization: org,
|
|
1323
1323
|
newRole
|
|
1324
1324
|
}: {
|
|
1325
|
-
member:
|
|
1325
|
+
member: better_auth_plugins20.Member & Record<string, any>;
|
|
1326
1326
|
newRole: string;
|
|
1327
1327
|
user: better_auth0.User & Record<string, any>;
|
|
1328
|
-
organization:
|
|
1328
|
+
organization: better_auth_plugins20.Organization & Record<string, any>;
|
|
1329
1329
|
}) => Promise<void>;
|
|
1330
1330
|
beforeRemoveMember: ({
|
|
1331
1331
|
member,
|
|
1332
1332
|
organization: org
|
|
1333
1333
|
}: {
|
|
1334
|
-
member:
|
|
1334
|
+
member: better_auth_plugins20.Member & Record<string, any>;
|
|
1335
1335
|
user: better_auth0.User & Record<string, any>;
|
|
1336
|
-
organization:
|
|
1336
|
+
organization: better_auth_plugins20.Organization & Record<string, any>;
|
|
1337
1337
|
}) => Promise<void>;
|
|
1338
1338
|
};
|
|
1339
1339
|
}>, {
|
|
@@ -1674,8 +1674,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1674
1674
|
readonly AUTHENTICATION_REQUIRED: "Authentication required";
|
|
1675
1675
|
};
|
|
1676
1676
|
options: Partial<{
|
|
1677
|
-
expiresIn:
|
|
1678
|
-
interval:
|
|
1677
|
+
expiresIn: better_auth_plugins20.TimeString;
|
|
1678
|
+
interval: better_auth_plugins20.TimeString;
|
|
1679
1679
|
deviceCodeLength: number;
|
|
1680
1680
|
userCodeLength: number;
|
|
1681
1681
|
schema: {
|
package/dist/auth/init.js
CHANGED
|
@@ -72,8 +72,18 @@ async function init() {
|
|
|
72
72
|
else console.log(` ℹ️ Organization already exists: ${TENANT_ID}`);
|
|
73
73
|
console.log(`\n👤 Creating admin user: ${username}`);
|
|
74
74
|
let user = await getUserByEmail(dbClient)(username);
|
|
75
|
-
if (user)
|
|
76
|
-
|
|
75
|
+
if (user) {
|
|
76
|
+
console.log(` ℹ️ User already exists: ${username}`);
|
|
77
|
+
try {
|
|
78
|
+
const ctx = await auth.$context;
|
|
79
|
+
const hashedPassword = await ctx.password.hash(password);
|
|
80
|
+
await ctx.internalAdapter.updatePassword(user.id, hashedPassword);
|
|
81
|
+
console.log(" ✅ Password synced from .env");
|
|
82
|
+
} catch (error) {
|
|
83
|
+
console.error(" ❌ Failed to sync password from .env:", error);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
77
87
|
console.log(" Creating user with Better Auth...");
|
|
78
88
|
if (!(await auth.api.signUpEmail({ body: {
|
|
79
89
|
email: username,
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
2
2
|
import { AccessControl } from "better-auth/plugins/access";
|
|
3
3
|
import { organizationClient } from "better-auth/client/plugins";
|
|
4
4
|
|
|
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:
|
|
8
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
9
|
+
actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
|
|
10
10
|
connector: "OR" | "AND";
|
|
11
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
12
|
-
statements:
|
|
11
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
12
|
+
statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
|
|
13
13
|
};
|
|
14
14
|
declare const adminRole: {
|
|
15
|
-
authorize<K_1 extends "
|
|
16
|
-
actions:
|
|
15
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
16
|
+
actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
|
|
17
17
|
connector: "OR" | "AND";
|
|
18
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
19
|
-
statements:
|
|
18
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
19
|
+
statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
|
|
20
20
|
};
|
|
21
21
|
declare const ownerRole: {
|
|
22
|
-
authorize<K_1 extends "
|
|
23
|
-
actions:
|
|
22
|
+
authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
|
|
23
|
+
actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
|
|
24
24
|
connector: "OR" | "AND";
|
|
25
|
-
} | undefined } : never, connector?: "OR" | "AND"):
|
|
26
|
-
statements:
|
|
25
|
+
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
26
|
+
statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
43
|
+
source: "query" | "header" | "body";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "header" | "body";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -24,12 +24,12 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
26
|
metadata: ConversationMetadata | null;
|
|
27
|
-
userId: string | null;
|
|
28
27
|
ref: {
|
|
29
28
|
type: "commit" | "tag" | "branch";
|
|
30
29
|
name: string;
|
|
31
30
|
hash: string;
|
|
32
31
|
} | null;
|
|
32
|
+
userId: string | null;
|
|
33
33
|
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
@@ -93,12 +93,12 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
93
93
|
createdAt: string;
|
|
94
94
|
updatedAt: string;
|
|
95
95
|
metadata: ConversationMetadata | null;
|
|
96
|
-
userId: string | null;
|
|
97
96
|
ref: {
|
|
98
97
|
type: "commit" | "tag" | "branch";
|
|
99
98
|
name: string;
|
|
100
99
|
hash: string;
|
|
101
100
|
} | null;
|
|
101
|
+
userId: string | null;
|
|
102
102
|
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
@@ -129,12 +129,12 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
129
129
|
createdAt: string;
|
|
130
130
|
updatedAt: string;
|
|
131
131
|
metadata: ConversationMetadata | null;
|
|
132
|
-
userId: string | null;
|
|
133
132
|
ref: {
|
|
134
133
|
type: "commit" | "tag" | "branch";
|
|
135
134
|
name: string;
|
|
136
135
|
hash: string;
|
|
137
136
|
} | null;
|
|
137
|
+
userId: string | null;
|
|
138
138
|
activeSubAgentId: string;
|
|
139
139
|
lastContextResolution: string | null;
|
|
140
140
|
}>;
|
|
@@ -161,12 +161,12 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
161
161
|
createdAt: string;
|
|
162
162
|
updatedAt: string;
|
|
163
163
|
metadata: ConversationMetadata | null;
|
|
164
|
-
userId: string | null;
|
|
165
164
|
ref: {
|
|
166
165
|
type: "commit" | "tag" | "branch";
|
|
167
166
|
name: string;
|
|
168
167
|
hash: string;
|
|
169
168
|
} | null;
|
|
169
|
+
userId: string | null;
|
|
170
170
|
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
@@ -13,12 +13,12 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
|
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
metadata: TaskMetadataConfig | null;
|
|
16
|
-
status: string;
|
|
17
16
|
ref: {
|
|
18
17
|
type: "commit" | "tag" | "branch";
|
|
19
18
|
name: string;
|
|
20
19
|
hash: string;
|
|
21
20
|
} | null;
|
|
21
|
+
status: string;
|
|
22
22
|
subAgentId: string;
|
|
23
23
|
contextId: string;
|
|
24
24
|
}>;
|