@inkeep/agents-core 0.0.0-dev-20260122182448 → 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 +32 -32
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +15 -15
- package/dist/data-access/runtime/apiKeys.d.ts +8 -8
- package/dist/data-access/runtime/conversations.d.ts +12 -12
- package/dist/data-access/runtime/messages.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +3 -3
- package/dist/db/manage/manage-schema.d.ts +375 -375
- package/dist/db/runtime/runtime-schema.d.ts +175 -175
- package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
- package/dist/validation/schemas.d.ts +1162 -1162
- 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,
|
|
@@ -13,6 +13,10 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
description: string | null;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
defaultSubAgentId: string | null;
|
|
19
|
+
contextConfigId: string | null;
|
|
16
20
|
models: {
|
|
17
21
|
base?: {
|
|
18
22
|
model?: string | undefined;
|
|
@@ -27,12 +31,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
27
31
|
providerOptions?: Record<string, any> | undefined;
|
|
28
32
|
} | undefined;
|
|
29
33
|
} | null;
|
|
30
|
-
stopWhen: {
|
|
31
|
-
transferCountIs?: number | undefined;
|
|
32
|
-
} | null;
|
|
33
|
-
tenantId: string;
|
|
34
|
-
defaultSubAgentId: string | null;
|
|
35
|
-
contextConfigId: string | null;
|
|
36
34
|
prompt: string | null;
|
|
37
35
|
statusUpdates: {
|
|
38
36
|
enabled?: boolean | undefined;
|
|
@@ -49,7 +47,9 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
49
47
|
} | undefined;
|
|
50
48
|
}[] | undefined;
|
|
51
49
|
} | null;
|
|
52
|
-
|
|
50
|
+
stopWhen: {
|
|
51
|
+
transferCountIs?: number | undefined;
|
|
52
|
+
} | null;
|
|
53
53
|
} | null>;
|
|
54
54
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -59,6 +59,10 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
59
59
|
createdAt: string;
|
|
60
60
|
updatedAt: string;
|
|
61
61
|
description: string | null;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
|
+
defaultSubAgentId: string | null;
|
|
65
|
+
contextConfigId: string | null;
|
|
62
66
|
models: {
|
|
63
67
|
base?: {
|
|
64
68
|
model?: string | undefined;
|
|
@@ -73,12 +77,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
73
77
|
providerOptions?: Record<string, any> | undefined;
|
|
74
78
|
} | undefined;
|
|
75
79
|
} | null;
|
|
76
|
-
stopWhen: {
|
|
77
|
-
transferCountIs?: number | undefined;
|
|
78
|
-
} | null;
|
|
79
|
-
tenantId: string;
|
|
80
|
-
defaultSubAgentId: string | null;
|
|
81
|
-
contextConfigId: string | null;
|
|
82
80
|
prompt: string | null;
|
|
83
81
|
statusUpdates: {
|
|
84
82
|
enabled?: boolean | undefined;
|
|
@@ -95,13 +93,18 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
95
93
|
} | undefined;
|
|
96
94
|
}[] | undefined;
|
|
97
95
|
} | null;
|
|
98
|
-
|
|
96
|
+
stopWhen: {
|
|
97
|
+
transferCountIs?: number | undefined;
|
|
98
|
+
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
100
|
id: string;
|
|
101
101
|
name: string;
|
|
102
102
|
createdAt: string;
|
|
103
103
|
updatedAt: string;
|
|
104
104
|
description: string | null;
|
|
105
|
+
agentId: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
tenantId: string;
|
|
105
108
|
models: {
|
|
106
109
|
base?: {
|
|
107
110
|
model?: string | undefined;
|
|
@@ -116,13 +119,10 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
116
119
|
providerOptions?: Record<string, any> | undefined;
|
|
117
120
|
} | undefined;
|
|
118
121
|
} | null;
|
|
122
|
+
prompt: string | null;
|
|
119
123
|
stopWhen: {
|
|
120
124
|
stepCountIs?: number | undefined;
|
|
121
125
|
} | null;
|
|
122
|
-
tenantId: string;
|
|
123
|
-
prompt: string | null;
|
|
124
|
-
projectId: string;
|
|
125
|
-
agentId: string;
|
|
126
126
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
@@ -134,6 +134,10 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
134
134
|
createdAt: string;
|
|
135
135
|
updatedAt: string;
|
|
136
136
|
description: string | null;
|
|
137
|
+
projectId: string;
|
|
138
|
+
tenantId: string;
|
|
139
|
+
defaultSubAgentId: string | null;
|
|
140
|
+
contextConfigId: string | null;
|
|
137
141
|
models: {
|
|
138
142
|
base?: {
|
|
139
143
|
model?: string | undefined;
|
|
@@ -148,12 +152,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
148
152
|
providerOptions?: Record<string, any> | undefined;
|
|
149
153
|
} | undefined;
|
|
150
154
|
} | null;
|
|
151
|
-
stopWhen: {
|
|
152
|
-
transferCountIs?: number | undefined;
|
|
153
|
-
} | null;
|
|
154
|
-
tenantId: string;
|
|
155
|
-
defaultSubAgentId: string | null;
|
|
156
|
-
contextConfigId: string | null;
|
|
157
155
|
prompt: string | null;
|
|
158
156
|
statusUpdates: {
|
|
159
157
|
enabled?: boolean | undefined;
|
|
@@ -170,7 +168,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
170
168
|
} | undefined;
|
|
171
169
|
}[] | undefined;
|
|
172
170
|
} | null;
|
|
173
|
-
|
|
171
|
+
stopWhen: {
|
|
172
|
+
transferCountIs?: number | undefined;
|
|
173
|
+
} | null;
|
|
174
174
|
}[]>;
|
|
175
175
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
176
176
|
scopes: ProjectScopeConfig;
|
|
@@ -233,6 +233,10 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
233
233
|
createdAt: string;
|
|
234
234
|
updatedAt: string;
|
|
235
235
|
description: string | null;
|
|
236
|
+
projectId: string;
|
|
237
|
+
tenantId: string;
|
|
238
|
+
defaultSubAgentId: string | null;
|
|
239
|
+
contextConfigId: string | null;
|
|
236
240
|
models: {
|
|
237
241
|
base?: {
|
|
238
242
|
model?: string | undefined;
|
|
@@ -247,12 +251,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
247
251
|
providerOptions?: Record<string, any> | undefined;
|
|
248
252
|
} | undefined;
|
|
249
253
|
} | null;
|
|
250
|
-
stopWhen: {
|
|
251
|
-
transferCountIs?: number | undefined;
|
|
252
|
-
} | null;
|
|
253
|
-
tenantId: string;
|
|
254
|
-
defaultSubAgentId: string | null;
|
|
255
|
-
contextConfigId: string | null;
|
|
256
254
|
prompt: string | null;
|
|
257
255
|
statusUpdates: {
|
|
258
256
|
enabled?: boolean | undefined;
|
|
@@ -269,7 +267,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
269
267
|
} | undefined;
|
|
270
268
|
}[] | undefined;
|
|
271
269
|
} | null;
|
|
272
|
-
|
|
270
|
+
stopWhen: {
|
|
271
|
+
transferCountIs?: number | undefined;
|
|
272
|
+
} | null;
|
|
273
273
|
}>;
|
|
274
274
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
275
275
|
scopes: AgentScopeConfig;
|
|
@@ -12,8 +12,8 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
description: string | null;
|
|
15
|
-
tenantId: string;
|
|
16
15
|
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -54,8 +54,8 @@ declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (para
|
|
|
54
54
|
createdAt: string;
|
|
55
55
|
updatedAt: string;
|
|
56
56
|
description: string | null;
|
|
57
|
-
tenantId: string;
|
|
58
57
|
projectId: string;
|
|
58
|
+
tenantId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -106,9 +106,9 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
106
106
|
}) => Promise<{
|
|
107
107
|
id: string;
|
|
108
108
|
createdAt: string;
|
|
109
|
-
tenantId: string;
|
|
110
|
-
projectId: string;
|
|
111
109
|
agentId: string;
|
|
110
|
+
projectId: string;
|
|
111
|
+
tenantId: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -149,9 +149,9 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
149
149
|
}) => Promise<{
|
|
150
150
|
id: string;
|
|
151
151
|
createdAt: string;
|
|
152
|
-
tenantId: string;
|
|
153
|
-
projectId: string;
|
|
154
152
|
agentId: string;
|
|
153
|
+
projectId: string;
|
|
154
|
+
tenantId: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -11,11 +11,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
projectId: string;
|
|
16
14
|
headersSchema: unknown;
|
|
17
15
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
18
16
|
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
@@ -23,11 +23,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
23
23
|
id: string;
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
|
-
tenantId: string;
|
|
27
|
-
projectId: string;
|
|
28
26
|
headersSchema: unknown;
|
|
29
27
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
30
28
|
agentId: string;
|
|
29
|
+
projectId: string;
|
|
30
|
+
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -45,11 +45,11 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
45
45
|
id: string;
|
|
46
46
|
createdAt: string;
|
|
47
47
|
updatedAt: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
48
|
headersSchema: unknown;
|
|
51
49
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
52
50
|
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -85,11 +85,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
85
85
|
id: string;
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
|
-
tenantId: string;
|
|
89
|
-
projectId: string;
|
|
90
88
|
headersSchema: unknown;
|
|
91
89
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
92
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 };
|
|
@@ -66,11 +66,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
68
|
createdAt: string;
|
|
69
|
-
tenantId: string;
|
|
70
|
-
projectId: string;
|
|
71
69
|
agentId: string;
|
|
72
|
-
|
|
70
|
+
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
73
72
|
subAgentId: string;
|
|
73
|
+
dataComponentId: string;
|
|
74
74
|
}>;
|
|
75
75
|
/**
|
|
76
76
|
* Remove association between data component and agent
|
|
@@ -108,11 +108,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
110
|
createdAt: string;
|
|
111
|
-
tenantId: string;
|
|
112
|
-
projectId: string;
|
|
113
111
|
agentId: string;
|
|
114
|
-
|
|
112
|
+
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
115
114
|
subAgentId: string;
|
|
115
|
+
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
117
117
|
/**
|
|
118
118
|
* Count data components for a tenant/project
|
|
@@ -58,9 +58,9 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
58
58
|
createdAt: string;
|
|
59
59
|
updatedAt: string;
|
|
60
60
|
description: string | null;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
61
|
agentId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -100,9 +100,9 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
100
100
|
createdAt: string;
|
|
101
101
|
updatedAt: string;
|
|
102
102
|
description: string | null;
|
|
103
|
-
tenantId: string;
|
|
104
|
-
projectId: string;
|
|
105
103
|
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -155,9 +155,9 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
155
155
|
id: string;
|
|
156
156
|
createdAt: string;
|
|
157
157
|
updatedAt: string;
|
|
158
|
-
tenantId: string;
|
|
159
|
-
projectId: string;
|
|
160
158
|
agentId: string;
|
|
159
|
+
projectId: string;
|
|
160
|
+
tenantId: string;
|
|
161
161
|
subAgentId: string;
|
|
162
162
|
functionToolId: string;
|
|
163
163
|
}>;
|
|
@@ -211,9 +211,9 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
211
211
|
id: string;
|
|
212
212
|
createdAt: string;
|
|
213
213
|
updatedAt: string;
|
|
214
|
-
tenantId: string;
|
|
215
|
-
projectId: string;
|
|
216
214
|
agentId: string;
|
|
215
|
+
projectId: string;
|
|
216
|
+
tenantId: string;
|
|
217
217
|
subAgentId: string;
|
|
218
218
|
functionToolId: string;
|
|
219
219
|
}>;
|