@inkeep/agents-sdk 0.28.0 → 0.29.0
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/index.cjs +12 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2263,6 +2263,7 @@ var Project = class {
|
|
|
2263
2263
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2264
2264
|
credentialReferencesObject[credential2.id] = {
|
|
2265
2265
|
id: credential2.id,
|
|
2266
|
+
name: credential2.name,
|
|
2266
2267
|
type: credential2.type,
|
|
2267
2268
|
credentialStoreId: credential2.credentialStoreId,
|
|
2268
2269
|
retrievalParams: credential2.retrievalParams
|
|
@@ -2380,6 +2381,7 @@ var Project = class {
|
|
|
2380
2381
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2381
2382
|
credentialReferencesObject[credential2.id] = {
|
|
2382
2383
|
id: credential2.id,
|
|
2384
|
+
name: credential2.name,
|
|
2383
2385
|
type: credential2.type,
|
|
2384
2386
|
credentialStoreId: credential2.credentialStoreId,
|
|
2385
2387
|
retrievalParams: credential2.retrievalParams
|
|
@@ -2467,6 +2469,7 @@ var Project = class {
|
|
|
2467
2469
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2468
2470
|
credentialReferencesObject[credential2.id] = {
|
|
2469
2471
|
id: credential2.id,
|
|
2472
|
+
name: credential2.name,
|
|
2470
2473
|
type: credential2.type,
|
|
2471
2474
|
credentialStoreId: credential2.credentialStoreId,
|
|
2472
2475
|
retrievalParams: credential2.retrievalParams
|
|
@@ -3650,7 +3653,15 @@ function subAgent(config) {
|
|
|
3650
3653
|
return new SubAgent(config);
|
|
3651
3654
|
}
|
|
3652
3655
|
function credential(config) {
|
|
3653
|
-
|
|
3656
|
+
try {
|
|
3657
|
+
return agentsCore.CredentialReferenceApiInsertSchema.parse(config);
|
|
3658
|
+
} catch (error) {
|
|
3659
|
+
if (error instanceof Error) {
|
|
3660
|
+
const credId = config.id || "unknown";
|
|
3661
|
+
throw new Error(`Invalid credential '${credId}': ${error.message}`);
|
|
3662
|
+
}
|
|
3663
|
+
throw error;
|
|
3664
|
+
}
|
|
3654
3665
|
}
|
|
3655
3666
|
function mcpServer(config) {
|
|
3656
3667
|
if (!config.serverUrl) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1082,12 +1082,14 @@ declare function subAgent(config: SubAgentConfig): SubAgent;
|
|
|
1082
1082
|
* ```typescript
|
|
1083
1083
|
* const apiCredential = credential({
|
|
1084
1084
|
* id: 'github-token',
|
|
1085
|
+
* name: 'GitHub Token',
|
|
1085
1086
|
* type: 'bearer',
|
|
1086
1087
|
* value: process.env.GITHUB_TOKEN
|
|
1087
1088
|
* });
|
|
1088
1089
|
* ```
|
|
1089
1090
|
*/
|
|
1090
1091
|
declare function credential(config: CredentialReferenceApiInsert): {
|
|
1092
|
+
name: string;
|
|
1091
1093
|
id: string;
|
|
1092
1094
|
credentialStoreId: string;
|
|
1093
1095
|
type: "nango" | "memory" | "keychain";
|
|
@@ -1121,6 +1123,7 @@ declare function credential(config: CredentialReferenceApiInsert): {
|
|
|
1121
1123
|
* serverUrl: 'https://secure.example.com/mcp',
|
|
1122
1124
|
* credential: credential({
|
|
1123
1125
|
* id: 'api-key',
|
|
1126
|
+
* name: 'API Key',
|
|
1124
1127
|
* type: 'bearer',
|
|
1125
1128
|
* value: process.env.API_KEY
|
|
1126
1129
|
* })
|
package/dist/index.d.ts
CHANGED
|
@@ -1082,12 +1082,14 @@ declare function subAgent(config: SubAgentConfig): SubAgent;
|
|
|
1082
1082
|
* ```typescript
|
|
1083
1083
|
* const apiCredential = credential({
|
|
1084
1084
|
* id: 'github-token',
|
|
1085
|
+
* name: 'GitHub Token',
|
|
1085
1086
|
* type: 'bearer',
|
|
1086
1087
|
* value: process.env.GITHUB_TOKEN
|
|
1087
1088
|
* });
|
|
1088
1089
|
* ```
|
|
1089
1090
|
*/
|
|
1090
1091
|
declare function credential(config: CredentialReferenceApiInsert): {
|
|
1092
|
+
name: string;
|
|
1091
1093
|
id: string;
|
|
1092
1094
|
credentialStoreId: string;
|
|
1093
1095
|
type: "nango" | "memory" | "keychain";
|
|
@@ -1121,6 +1123,7 @@ declare function credential(config: CredentialReferenceApiInsert): {
|
|
|
1121
1123
|
* serverUrl: 'https://secure.example.com/mcp',
|
|
1122
1124
|
* credential: credential({
|
|
1123
1125
|
* id: 'api-key',
|
|
1126
|
+
* name: 'API Key',
|
|
1124
1127
|
* type: 'bearer',
|
|
1125
1128
|
* value: process.env.API_KEY
|
|
1126
1129
|
* })
|
package/dist/index.js
CHANGED
|
@@ -2236,6 +2236,7 @@ var Project = class {
|
|
|
2236
2236
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2237
2237
|
credentialReferencesObject[credential2.id] = {
|
|
2238
2238
|
id: credential2.id,
|
|
2239
|
+
name: credential2.name,
|
|
2239
2240
|
type: credential2.type,
|
|
2240
2241
|
credentialStoreId: credential2.credentialStoreId,
|
|
2241
2242
|
retrievalParams: credential2.retrievalParams
|
|
@@ -2353,6 +2354,7 @@ var Project = class {
|
|
|
2353
2354
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2354
2355
|
credentialReferencesObject[credential2.id] = {
|
|
2355
2356
|
id: credential2.id,
|
|
2357
|
+
name: credential2.name,
|
|
2356
2358
|
type: credential2.type,
|
|
2357
2359
|
credentialStoreId: credential2.credentialStoreId,
|
|
2358
2360
|
retrievalParams: credential2.retrievalParams
|
|
@@ -2440,6 +2442,7 @@ var Project = class {
|
|
|
2440
2442
|
if (!credentialReferencesObject[credential2.id]) {
|
|
2441
2443
|
credentialReferencesObject[credential2.id] = {
|
|
2442
2444
|
id: credential2.id,
|
|
2445
|
+
name: credential2.name,
|
|
2443
2446
|
type: credential2.type,
|
|
2444
2447
|
credentialStoreId: credential2.credentialStoreId,
|
|
2445
2448
|
retrievalParams: credential2.retrievalParams
|
|
@@ -3623,7 +3626,15 @@ function subAgent(config) {
|
|
|
3623
3626
|
return new SubAgent(config);
|
|
3624
3627
|
}
|
|
3625
3628
|
function credential(config) {
|
|
3626
|
-
|
|
3629
|
+
try {
|
|
3630
|
+
return CredentialReferenceApiInsertSchema.parse(config);
|
|
3631
|
+
} catch (error) {
|
|
3632
|
+
if (error instanceof Error) {
|
|
3633
|
+
const credId = config.id || "unknown";
|
|
3634
|
+
throw new Error(`Invalid credential '${credId}': ${error.message}`);
|
|
3635
|
+
}
|
|
3636
|
+
throw error;
|
|
3637
|
+
}
|
|
3627
3638
|
}
|
|
3628
3639
|
function mcpServer(config) {
|
|
3629
3640
|
if (!config.serverUrl) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"nanoid": "^5.1.5",
|
|
13
13
|
"typescript": "^5.3.3",
|
|
14
14
|
"zod": "^4.1.11",
|
|
15
|
-
"@inkeep/agents-core": "^0.
|
|
15
|
+
"@inkeep/agents-core": "^0.29.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/js-yaml": "^4.0.9",
|