@inkeep/agents-core 0.0.0-dev-20260122153611 → 0.0.0-dev-20260122190953
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/credential-stores/keychain-store.d.ts +20 -8
- package/dist/credential-stores/keychain-store.js +109 -43
- package/dist/data-access/manage/agents.d.ts +41 -41
- 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 +14 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +30 -30
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +33 -33
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- 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 +5 -5
- package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +366 -366
- package/package.json +4 -4
|
@@ -10,16 +10,16 @@ import { CredentialStore } from "../types/server.js";
|
|
|
10
10
|
* - Windows: Credential Vault
|
|
11
11
|
* - Linux: Secret Service API/libsecret
|
|
12
12
|
*
|
|
13
|
-
* Requires the '
|
|
14
|
-
* Falls back gracefully if
|
|
13
|
+
* Requires the '@napi-rs/keyring' npm package to be installed.
|
|
14
|
+
* Falls back gracefully if keyring is not available.
|
|
15
15
|
*
|
|
16
16
|
* ## macOS Permission Handling
|
|
17
17
|
*
|
|
18
|
-
* On macOS, when your Node.js app first calls
|
|
18
|
+
* On macOS, when your Node.js app first calls keyring operations:
|
|
19
19
|
* - `setPassword()` creates a new Keychain item (no prompt required)
|
|
20
20
|
* - `getPassword()` may prompt the user for permission on first access
|
|
21
21
|
* - Users can click "Allow", "Always Allow", or "Deny"
|
|
22
|
-
* - If denied,
|
|
22
|
+
* - If denied, keyring returns `null` which this implementation handles gracefully
|
|
23
23
|
* - The calling binary (usually `node`) will be shown in the permission prompt
|
|
24
24
|
* - For better UX in packaged apps, consider code signing and app bundling
|
|
25
25
|
*
|
|
@@ -33,14 +33,22 @@ declare class KeyChainStore implements CredentialStore {
|
|
|
33
33
|
readonly type: "keychain";
|
|
34
34
|
private readonly service;
|
|
35
35
|
private readonly logger;
|
|
36
|
-
private
|
|
37
|
-
private
|
|
36
|
+
private keyringAvailable;
|
|
37
|
+
private EntryClass;
|
|
38
38
|
private initializationPromise;
|
|
39
39
|
constructor(id: string, servicePrefix?: string);
|
|
40
40
|
/**
|
|
41
|
-
* Initialize
|
|
41
|
+
* Initialize keyring dynamically to handle optional availability
|
|
42
42
|
*/
|
|
43
|
-
private
|
|
43
|
+
private initializeKeyring;
|
|
44
|
+
/**
|
|
45
|
+
* Add a key to the index
|
|
46
|
+
*/
|
|
47
|
+
private addKeyToIndex;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a key from the index
|
|
50
|
+
*/
|
|
51
|
+
private removeKeyFromIndex;
|
|
44
52
|
/**
|
|
45
53
|
* Get a credential from the keychain
|
|
46
54
|
*/
|
|
@@ -68,6 +76,10 @@ declare class KeyChainStore implements CredentialStore {
|
|
|
68
76
|
/**
|
|
69
77
|
* Find all credentials for this service
|
|
70
78
|
* Useful for debugging and listing stored credentials
|
|
79
|
+
*
|
|
80
|
+
* NOTE: @napi-rs/keyring does not have a findCredentials equivalent.
|
|
81
|
+
* This implementation uses a key index to track all stored keys.
|
|
82
|
+
* The index is maintained separately and updated during set/delete operations.
|
|
71
83
|
*/
|
|
72
84
|
findAllCredentials(): Promise<Array<{
|
|
73
85
|
account: string;
|
|
@@ -10,16 +10,16 @@ import { getLogger } from "../utils/logger.js";
|
|
|
10
10
|
* - Windows: Credential Vault
|
|
11
11
|
* - Linux: Secret Service API/libsecret
|
|
12
12
|
*
|
|
13
|
-
* Requires the '
|
|
14
|
-
* Falls back gracefully if
|
|
13
|
+
* Requires the '@napi-rs/keyring' npm package to be installed.
|
|
14
|
+
* Falls back gracefully if keyring is not available.
|
|
15
15
|
*
|
|
16
16
|
* ## macOS Permission Handling
|
|
17
17
|
*
|
|
18
|
-
* On macOS, when your Node.js app first calls
|
|
18
|
+
* On macOS, when your Node.js app first calls keyring operations:
|
|
19
19
|
* - `setPassword()` creates a new Keychain item (no prompt required)
|
|
20
20
|
* - `getPassword()` may prompt the user for permission on first access
|
|
21
21
|
* - Users can click "Allow", "Always Allow", or "Deny"
|
|
22
|
-
* - If denied,
|
|
22
|
+
* - If denied, keyring returns `null` which this implementation handles gracefully
|
|
23
23
|
* - The calling binary (usually `node`) will be shown in the permission prompt
|
|
24
24
|
* - For better UX in packaged apps, consider code signing and app bundling
|
|
25
25
|
*
|
|
@@ -33,34 +33,75 @@ var KeyChainStore = class {
|
|
|
33
33
|
type = CredentialStoreType.keychain;
|
|
34
34
|
service;
|
|
35
35
|
logger = getLogger("KeyChainStore");
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
keyringAvailable = false;
|
|
37
|
+
EntryClass = null;
|
|
38
38
|
initializationPromise;
|
|
39
39
|
constructor(id, servicePrefix = "inkeep-agent-framework") {
|
|
40
40
|
this.id = id;
|
|
41
41
|
this.service = `${servicePrefix}-${id}`;
|
|
42
|
-
this.initializationPromise = this.
|
|
42
|
+
this.initializationPromise = this.initializeKeyring();
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Initialize
|
|
45
|
+
* Initialize keyring dynamically to handle optional availability
|
|
46
46
|
*/
|
|
47
|
-
async
|
|
48
|
-
if (this.
|
|
49
|
-
this.
|
|
47
|
+
async initializeKeyring() {
|
|
48
|
+
if (this.EntryClass) {
|
|
49
|
+
this.keyringAvailable = true;
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
try {
|
|
53
|
-
this.
|
|
53
|
+
this.EntryClass = (await import(
|
|
54
54
|
/* webpackIgnore: true */
|
|
55
|
-
"
|
|
56
|
-
)).
|
|
57
|
-
this.
|
|
55
|
+
"@napi-rs/keyring"
|
|
56
|
+
)).Entry;
|
|
57
|
+
this.keyringAvailable = true;
|
|
58
58
|
} catch (error) {
|
|
59
59
|
this.logger.warn({
|
|
60
60
|
storeId: this.id,
|
|
61
61
|
error: error instanceof Error ? error.message : "Unknown error"
|
|
62
|
-
}, "
|
|
63
|
-
this.
|
|
62
|
+
}, "Keyring not available - KeyChainStore will return null for all operations");
|
|
63
|
+
this.keyringAvailable = false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Add a key to the index
|
|
68
|
+
*/
|
|
69
|
+
addKeyToIndex(key) {
|
|
70
|
+
if (!this.EntryClass) return;
|
|
71
|
+
try {
|
|
72
|
+
const indexEntry = new this.EntryClass(this.service, "__key_index__");
|
|
73
|
+
const indexJson = indexEntry.getPassword();
|
|
74
|
+
const keys = indexJson ? JSON.parse(indexJson) : [];
|
|
75
|
+
if (!keys.includes(key)) {
|
|
76
|
+
keys.push(key);
|
|
77
|
+
indexEntry.setPassword(JSON.stringify(keys));
|
|
78
|
+
}
|
|
79
|
+
} catch (error) {
|
|
80
|
+
this.logger.warn({
|
|
81
|
+
storeId: this.id,
|
|
82
|
+
key,
|
|
83
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
84
|
+
}, "Failed to update key index");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Remove a key from the index
|
|
89
|
+
*/
|
|
90
|
+
removeKeyFromIndex(key) {
|
|
91
|
+
if (!this.EntryClass) return;
|
|
92
|
+
try {
|
|
93
|
+
const indexEntry = new this.EntryClass(this.service, "__key_index__");
|
|
94
|
+
const indexJson = indexEntry.getPassword();
|
|
95
|
+
if (!indexJson) return;
|
|
96
|
+
const keys = JSON.parse(indexJson);
|
|
97
|
+
const filteredKeys = keys.filter((k) => k !== key);
|
|
98
|
+
if (filteredKeys.length !== keys.length) indexEntry.setPassword(JSON.stringify(filteredKeys));
|
|
99
|
+
} catch (error) {
|
|
100
|
+
this.logger.warn({
|
|
101
|
+
storeId: this.id,
|
|
102
|
+
key,
|
|
103
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
104
|
+
}, "Failed to update key index");
|
|
64
105
|
}
|
|
65
106
|
}
|
|
66
107
|
/**
|
|
@@ -68,20 +109,23 @@ var KeyChainStore = class {
|
|
|
68
109
|
*/
|
|
69
110
|
async get(key) {
|
|
70
111
|
await this.initializationPromise;
|
|
71
|
-
if (!this.
|
|
112
|
+
if (!this.keyringAvailable || !this.EntryClass) {
|
|
72
113
|
this.logger.debug({
|
|
73
114
|
storeId: this.id,
|
|
74
115
|
key
|
|
75
|
-
}, "
|
|
116
|
+
}, "Keyring not available, returning null");
|
|
76
117
|
return null;
|
|
77
118
|
}
|
|
78
119
|
try {
|
|
79
|
-
const password =
|
|
80
|
-
if (password === null)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
120
|
+
const password = new this.EntryClass(this.service, key).getPassword();
|
|
121
|
+
if (password === null || password === void 0) {
|
|
122
|
+
this.logger.debug({
|
|
123
|
+
storeId: this.id,
|
|
124
|
+
service: this.service,
|
|
125
|
+
account: key
|
|
126
|
+
}, "No credential found in keychain");
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
85
129
|
return password;
|
|
86
130
|
} catch (error) {
|
|
87
131
|
this.logger.error({
|
|
@@ -98,15 +142,16 @@ var KeyChainStore = class {
|
|
|
98
142
|
*/
|
|
99
143
|
async set(key, value, _metadata) {
|
|
100
144
|
await this.initializationPromise;
|
|
101
|
-
if (!this.
|
|
145
|
+
if (!this.keyringAvailable || !this.EntryClass) {
|
|
102
146
|
this.logger.warn({
|
|
103
147
|
storeId: this.id,
|
|
104
148
|
key
|
|
105
|
-
}, "
|
|
106
|
-
throw new Error("
|
|
149
|
+
}, "Keyring not available, cannot set credential");
|
|
150
|
+
throw new Error("Keyring not available - cannot store credentials in system keychain");
|
|
107
151
|
}
|
|
108
152
|
try {
|
|
109
|
-
|
|
153
|
+
new this.EntryClass(this.service, key).setPassword(value);
|
|
154
|
+
this.addKeyToIndex(key);
|
|
110
155
|
this.logger.debug({
|
|
111
156
|
storeId: this.id,
|
|
112
157
|
service: this.service,
|
|
@@ -133,9 +178,9 @@ var KeyChainStore = class {
|
|
|
133
178
|
*/
|
|
134
179
|
async checkAvailability() {
|
|
135
180
|
await this.initializationPromise;
|
|
136
|
-
if (!this.
|
|
181
|
+
if (!this.keyringAvailable || !this.EntryClass) return {
|
|
137
182
|
available: false,
|
|
138
|
-
reason: "
|
|
183
|
+
reason: "Keyring not available - cannot store credentials in system keychain"
|
|
139
184
|
};
|
|
140
185
|
return { available: true };
|
|
141
186
|
}
|
|
@@ -144,26 +189,22 @@ var KeyChainStore = class {
|
|
|
144
189
|
*/
|
|
145
190
|
async delete(key) {
|
|
146
191
|
await this.initializationPromise;
|
|
147
|
-
if (!this.
|
|
192
|
+
if (!this.keyringAvailable || !this.EntryClass) {
|
|
148
193
|
this.logger.warn({
|
|
149
194
|
storeId: this.id,
|
|
150
195
|
key
|
|
151
|
-
}, "
|
|
196
|
+
}, "Keyring not available, cannot delete credential");
|
|
152
197
|
return false;
|
|
153
198
|
}
|
|
154
199
|
try {
|
|
155
|
-
|
|
156
|
-
|
|
200
|
+
new this.EntryClass(this.service, key).deletePassword();
|
|
201
|
+
this.removeKeyFromIndex(key);
|
|
202
|
+
this.logger.debug({
|
|
157
203
|
storeId: this.id,
|
|
158
204
|
service: this.service,
|
|
159
205
|
account: key
|
|
160
206
|
}, "Credential deleted from keychain");
|
|
161
|
-
|
|
162
|
-
storeId: this.id,
|
|
163
|
-
service: this.service,
|
|
164
|
-
account: key
|
|
165
|
-
}, "Credential not found in keychain for deletion");
|
|
166
|
-
return result;
|
|
207
|
+
return true;
|
|
167
208
|
} catch (error) {
|
|
168
209
|
this.logger.error({
|
|
169
210
|
storeId: this.id,
|
|
@@ -177,12 +218,29 @@ var KeyChainStore = class {
|
|
|
177
218
|
/**
|
|
178
219
|
* Find all credentials for this service
|
|
179
220
|
* Useful for debugging and listing stored credentials
|
|
221
|
+
*
|
|
222
|
+
* NOTE: @napi-rs/keyring does not have a findCredentials equivalent.
|
|
223
|
+
* This implementation uses a key index to track all stored keys.
|
|
224
|
+
* The index is maintained separately and updated during set/delete operations.
|
|
180
225
|
*/
|
|
181
226
|
async findAllCredentials() {
|
|
182
227
|
await this.initializationPromise;
|
|
183
|
-
if (!this.
|
|
228
|
+
if (!this.keyringAvailable || !this.EntryClass) return [];
|
|
184
229
|
try {
|
|
185
|
-
|
|
230
|
+
const indexJson = new this.EntryClass(this.service, "__key_index__").getPassword();
|
|
231
|
+
if (!indexJson) return [];
|
|
232
|
+
const keys = JSON.parse(indexJson);
|
|
233
|
+
const credentials = [];
|
|
234
|
+
for (const key of keys) try {
|
|
235
|
+
const password = new this.EntryClass(this.service, key).getPassword();
|
|
236
|
+
if (password) credentials.push({
|
|
237
|
+
account: key,
|
|
238
|
+
password
|
|
239
|
+
});
|
|
240
|
+
} catch {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
return credentials;
|
|
186
244
|
} catch (error) {
|
|
187
245
|
this.logger.error({
|
|
188
246
|
storeId: this.id,
|
|
@@ -200,6 +258,14 @@ var KeyChainStore = class {
|
|
|
200
258
|
const credentials = await this.findAllCredentials();
|
|
201
259
|
let deletedCount = 0;
|
|
202
260
|
for (const cred of credentials) if (await this.delete(cred.account)) deletedCount++;
|
|
261
|
+
if (this.EntryClass && deletedCount > 0) try {
|
|
262
|
+
new this.EntryClass(this.service, "__key_index__").deletePassword();
|
|
263
|
+
} catch (error) {
|
|
264
|
+
this.logger.warn({
|
|
265
|
+
storeId: this.id,
|
|
266
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
267
|
+
}, "Failed to delete key index");
|
|
268
|
+
}
|
|
203
269
|
if (deletedCount > 0) this.logger.info({
|
|
204
270
|
storeId: this.id,
|
|
205
271
|
service: this.service,
|
|
@@ -8,14 +8,15 @@ import { PgTable } from "drizzle-orm/pg-core";
|
|
|
8
8
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
12
|
name: string;
|
|
15
|
-
description: string | null;
|
|
16
|
-
prompt: string | null;
|
|
17
13
|
createdAt: string;
|
|
18
14
|
updatedAt: string;
|
|
15
|
+
description: string | null;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
defaultSubAgentId: string | null;
|
|
19
|
+
contextConfigId: string | null;
|
|
19
20
|
models: {
|
|
20
21
|
base?: {
|
|
21
22
|
model?: string | undefined;
|
|
@@ -30,11 +31,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
30
31
|
providerOptions?: Record<string, any> | undefined;
|
|
31
32
|
} | undefined;
|
|
32
33
|
} | null;
|
|
33
|
-
|
|
34
|
-
transferCountIs?: number | undefined;
|
|
35
|
-
} | null;
|
|
36
|
-
defaultSubAgentId: string | null;
|
|
37
|
-
contextConfigId: string | null;
|
|
34
|
+
prompt: string | null;
|
|
38
35
|
statusUpdates: {
|
|
39
36
|
enabled?: boolean | undefined;
|
|
40
37
|
numEvents?: number | undefined;
|
|
@@ -50,18 +47,22 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
50
47
|
} | undefined;
|
|
51
48
|
}[] | undefined;
|
|
52
49
|
} | null;
|
|
50
|
+
stopWhen: {
|
|
51
|
+
transferCountIs?: number | undefined;
|
|
52
|
+
} | null;
|
|
53
53
|
} | null>;
|
|
54
54
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
}) => Promise<{
|
|
57
|
-
tenantId: string;
|
|
58
|
-
projectId: string;
|
|
59
57
|
id: string;
|
|
60
58
|
name: string;
|
|
61
|
-
description: string | null;
|
|
62
|
-
prompt: string | null;
|
|
63
59
|
createdAt: string;
|
|
64
60
|
updatedAt: string;
|
|
61
|
+
description: string | null;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
|
+
defaultSubAgentId: string | null;
|
|
65
|
+
contextConfigId: string | null;
|
|
65
66
|
models: {
|
|
66
67
|
base?: {
|
|
67
68
|
model?: string | undefined;
|
|
@@ -76,11 +77,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
76
77
|
providerOptions?: Record<string, any> | undefined;
|
|
77
78
|
} | undefined;
|
|
78
79
|
} | null;
|
|
79
|
-
|
|
80
|
-
transferCountIs?: number | undefined;
|
|
81
|
-
} | null;
|
|
82
|
-
defaultSubAgentId: string | null;
|
|
83
|
-
contextConfigId: string | null;
|
|
80
|
+
prompt: string | null;
|
|
84
81
|
statusUpdates: {
|
|
85
82
|
enabled?: boolean | undefined;
|
|
86
83
|
numEvents?: number | undefined;
|
|
@@ -96,16 +93,18 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
96
93
|
} | undefined;
|
|
97
94
|
}[] | undefined;
|
|
98
95
|
} | null;
|
|
96
|
+
stopWhen: {
|
|
97
|
+
transferCountIs?: number | undefined;
|
|
98
|
+
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
|
-
tenantId: string;
|
|
101
|
-
projectId: string;
|
|
102
100
|
id: string;
|
|
103
101
|
name: string;
|
|
104
|
-
description: string | null;
|
|
105
|
-
prompt: string | null;
|
|
106
|
-
agentId: string;
|
|
107
102
|
createdAt: string;
|
|
108
103
|
updatedAt: string;
|
|
104
|
+
description: string | null;
|
|
105
|
+
agentId: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
tenantId: string;
|
|
109
108
|
models: {
|
|
110
109
|
base?: {
|
|
111
110
|
model?: string | undefined;
|
|
@@ -120,6 +119,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
120
119
|
providerOptions?: Record<string, any> | undefined;
|
|
121
120
|
} | undefined;
|
|
122
121
|
} | null;
|
|
122
|
+
prompt: string | null;
|
|
123
123
|
stopWhen: {
|
|
124
124
|
stepCountIs?: number | undefined;
|
|
125
125
|
} | null;
|
|
@@ -129,14 +129,15 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
130
130
|
scopes: ProjectScopeConfig;
|
|
131
131
|
}) => Promise<{
|
|
132
|
-
tenantId: string;
|
|
133
|
-
projectId: string;
|
|
134
132
|
id: string;
|
|
135
133
|
name: string;
|
|
136
|
-
description: string | null;
|
|
137
|
-
prompt: string | null;
|
|
138
134
|
createdAt: string;
|
|
139
135
|
updatedAt: string;
|
|
136
|
+
description: string | null;
|
|
137
|
+
projectId: string;
|
|
138
|
+
tenantId: string;
|
|
139
|
+
defaultSubAgentId: string | null;
|
|
140
|
+
contextConfigId: string | null;
|
|
140
141
|
models: {
|
|
141
142
|
base?: {
|
|
142
143
|
model?: string | undefined;
|
|
@@ -151,11 +152,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
151
152
|
providerOptions?: Record<string, any> | undefined;
|
|
152
153
|
} | undefined;
|
|
153
154
|
} | null;
|
|
154
|
-
|
|
155
|
-
transferCountIs?: number | undefined;
|
|
156
|
-
} | null;
|
|
157
|
-
defaultSubAgentId: string | null;
|
|
158
|
-
contextConfigId: string | null;
|
|
155
|
+
prompt: string | null;
|
|
159
156
|
statusUpdates: {
|
|
160
157
|
enabled?: boolean | undefined;
|
|
161
158
|
numEvents?: number | undefined;
|
|
@@ -171,6 +168,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
171
168
|
} | undefined;
|
|
172
169
|
}[] | undefined;
|
|
173
170
|
} | null;
|
|
171
|
+
stopWhen: {
|
|
172
|
+
transferCountIs?: number | undefined;
|
|
173
|
+
} | null;
|
|
174
174
|
}[]>;
|
|
175
175
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
176
176
|
scopes: ProjectScopeConfig;
|
|
@@ -228,14 +228,15 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
|
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
230
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
231
|
-
tenantId: string;
|
|
232
|
-
projectId: string;
|
|
233
231
|
id: string;
|
|
234
232
|
name: string;
|
|
235
|
-
description: string | null;
|
|
236
|
-
prompt: string | null;
|
|
237
233
|
createdAt: string;
|
|
238
234
|
updatedAt: string;
|
|
235
|
+
description: string | null;
|
|
236
|
+
projectId: string;
|
|
237
|
+
tenantId: string;
|
|
238
|
+
defaultSubAgentId: string | null;
|
|
239
|
+
contextConfigId: string | null;
|
|
239
240
|
models: {
|
|
240
241
|
base?: {
|
|
241
242
|
model?: string | undefined;
|
|
@@ -250,11 +251,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
250
251
|
providerOptions?: Record<string, any> | undefined;
|
|
251
252
|
} | undefined;
|
|
252
253
|
} | null;
|
|
253
|
-
|
|
254
|
-
transferCountIs?: number | undefined;
|
|
255
|
-
} | null;
|
|
256
|
-
defaultSubAgentId: string | null;
|
|
257
|
-
contextConfigId: string | null;
|
|
254
|
+
prompt: string | null;
|
|
258
255
|
statusUpdates: {
|
|
259
256
|
enabled?: boolean | undefined;
|
|
260
257
|
numEvents?: number | undefined;
|
|
@@ -270,6 +267,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
270
267
|
} | undefined;
|
|
271
268
|
}[] | undefined;
|
|
272
269
|
} | null;
|
|
270
|
+
stopWhen: {
|
|
271
|
+
transferCountIs?: number | undefined;
|
|
272
|
+
} | null;
|
|
273
273
|
}>;
|
|
274
274
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
275
275
|
scopes: AgentScopeConfig;
|
|
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
7
7
|
scopes: ProjectScopeConfig;
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
-
tenantId: string;
|
|
11
|
-
projectId: string;
|
|
12
10
|
id: string;
|
|
13
11
|
name: string;
|
|
14
|
-
description: string | null;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
51
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
52
|
-
tenantId: string;
|
|
53
|
-
projectId: string;
|
|
54
52
|
id: string;
|
|
55
53
|
name: string;
|
|
56
|
-
description: string | null;
|
|
57
54
|
createdAt: string;
|
|
58
55
|
updatedAt: string;
|
|
56
|
+
description: string | null;
|
|
57
|
+
projectId: string;
|
|
58
|
+
tenantId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -104,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
104
104
|
scopes: SubAgentScopeConfig;
|
|
105
105
|
artifactComponentId: string;
|
|
106
106
|
}) => Promise<{
|
|
107
|
-
tenantId: string;
|
|
108
|
-
projectId: string;
|
|
109
107
|
id: string;
|
|
110
|
-
agentId: string;
|
|
111
108
|
createdAt: string;
|
|
109
|
+
agentId: string;
|
|
110
|
+
projectId: string;
|
|
111
|
+
tenantId: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -147,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
147
147
|
scopes: SubAgentScopeConfig;
|
|
148
148
|
artifactComponentId: string;
|
|
149
149
|
}) => Promise<{
|
|
150
|
-
tenantId: string;
|
|
151
|
-
projectId: string;
|
|
152
150
|
id: string;
|
|
153
|
-
agentId: string;
|
|
154
151
|
createdAt: string;
|
|
152
|
+
agentId: string;
|
|
153
|
+
projectId: string;
|
|
154
|
+
tenantId: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -8,26 +8,26 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headersSchema: unknown;
|
|
18
15
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
22
22
|
}) => Promise<{
|
|
23
|
-
tenantId: string;
|
|
24
|
-
projectId: string;
|
|
25
23
|
id: string;
|
|
26
|
-
agentId: string;
|
|
27
24
|
createdAt: string;
|
|
28
25
|
updatedAt: string;
|
|
29
26
|
headersSchema: unknown;
|
|
30
27
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
28
|
+
agentId: string;
|
|
29
|
+
projectId: string;
|
|
30
|
+
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -42,14 +42,14 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
44
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
45
|
-
tenantId: string;
|
|
46
|
-
projectId: string;
|
|
47
45
|
id: string;
|
|
48
|
-
agentId: string;
|
|
49
46
|
createdAt: string;
|
|
50
47
|
updatedAt: string;
|
|
51
48
|
headersSchema: unknown;
|
|
52
49
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -82,14 +82,14 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
|
|
|
82
82
|
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
|
-
tenantId: string;
|
|
86
|
-
projectId: string;
|
|
87
85
|
id: string;
|
|
88
|
-
agentId: string;
|
|
89
86
|
createdAt: string;
|
|
90
87
|
updatedAt: string;
|
|
91
88
|
headersSchema: unknown;
|
|
92
89
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
90
|
+
agentId: string;
|
|
91
|
+
projectId: string;
|
|
92
|
+
tenantId: string;
|
|
93
93
|
}>;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
64
64
|
scopes: SubAgentScopeConfig;
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
|
-
tenantId: string;
|
|
68
|
-
projectId: string;
|
|
69
67
|
id: string;
|
|
70
|
-
agentId: string;
|
|
71
68
|
createdAt: string;
|
|
69
|
+
agentId: string;
|
|
70
|
+
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
106
106
|
scopes: SubAgentScopeConfig;
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
|
-
tenantId: string;
|
|
110
|
-
projectId: string;
|
|
111
109
|
id: string;
|
|
112
|
-
agentId: string;
|
|
113
110
|
createdAt: string;
|
|
111
|
+
agentId: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|