@inkeep/agents-sdk 0.2.0 → 0.2.2
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 -3
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +12 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -459,7 +459,12 @@ var Agent = class {
|
|
|
459
459
|
getInstructions() {
|
|
460
460
|
return this.config.prompt;
|
|
461
461
|
}
|
|
462
|
-
|
|
462
|
+
/**
|
|
463
|
+
* Get the agent's description (the human-readable description field)
|
|
464
|
+
*/
|
|
465
|
+
getDescription() {
|
|
466
|
+
return this.config.description || "";
|
|
467
|
+
}
|
|
463
468
|
getTools() {
|
|
464
469
|
const tools = resolveGetter(this.config.canUse);
|
|
465
470
|
if (!tools) {
|
|
@@ -2730,12 +2735,15 @@ var Project = class {
|
|
|
2730
2735
|
* Set or update the configuration (tenantId and apiUrl)
|
|
2731
2736
|
* This is used by the CLI to inject configuration from inkeep.config.ts
|
|
2732
2737
|
*/
|
|
2733
|
-
setConfig(tenantId, apiUrl) {
|
|
2738
|
+
setConfig(tenantId, apiUrl, models) {
|
|
2734
2739
|
if (this.initialized) {
|
|
2735
2740
|
throw new Error("Cannot set config after project has been initialized");
|
|
2736
2741
|
}
|
|
2737
2742
|
this.tenantId = tenantId;
|
|
2738
2743
|
this.baseURL = apiUrl;
|
|
2744
|
+
if (models) {
|
|
2745
|
+
this.models = models;
|
|
2746
|
+
}
|
|
2739
2747
|
for (const graph of this.graphs) {
|
|
2740
2748
|
graph.setConfig(tenantId, this.projectId, apiUrl);
|
|
2741
2749
|
}
|
|
@@ -2743,7 +2751,8 @@ var Project = class {
|
|
|
2743
2751
|
{
|
|
2744
2752
|
projectId: this.projectId,
|
|
2745
2753
|
tenantId: this.tenantId,
|
|
2746
|
-
apiUrl: this.baseURL
|
|
2754
|
+
apiUrl: this.baseURL,
|
|
2755
|
+
hasModels: !!this.models
|
|
2747
2756
|
},
|
|
2748
2757
|
"Project configuration updated"
|
|
2749
2758
|
);
|
package/dist/index.d.cts
CHANGED
|
@@ -312,11 +312,9 @@ interface RunResult {
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
interface StatusComponent {
|
|
315
|
-
id: string;
|
|
316
|
-
name: string;
|
|
317
315
|
type: string;
|
|
318
316
|
description?: string;
|
|
319
|
-
schema
|
|
317
|
+
schema?: {
|
|
320
318
|
type: 'object';
|
|
321
319
|
properties: Record<string, any>;
|
|
322
320
|
required?: string[];
|
|
@@ -368,6 +366,7 @@ interface AgentInterface {
|
|
|
368
366
|
init(): Promise<void>;
|
|
369
367
|
getId(): string;
|
|
370
368
|
getName(): string;
|
|
369
|
+
getDescription(): string;
|
|
371
370
|
getInstructions(): string;
|
|
372
371
|
getTools(): Record<string, any>;
|
|
373
372
|
getTransfers(): AgentInterface[];
|
|
@@ -439,6 +438,10 @@ declare class Agent implements AgentInterface {
|
|
|
439
438
|
getId(): string;
|
|
440
439
|
getName(): string;
|
|
441
440
|
getInstructions(): string;
|
|
441
|
+
/**
|
|
442
|
+
* Get the agent's description (the human-readable description field)
|
|
443
|
+
*/
|
|
444
|
+
getDescription(): string;
|
|
442
445
|
getTools(): Record<string, unknown>;
|
|
443
446
|
getModels(): typeof this$1.config.models;
|
|
444
447
|
setModels(models: typeof this$1.config.models): void;
|
|
@@ -788,7 +791,7 @@ declare class Project implements ProjectInterface {
|
|
|
788
791
|
* Set or update the configuration (tenantId and apiUrl)
|
|
789
792
|
* This is used by the CLI to inject configuration from inkeep.config.ts
|
|
790
793
|
*/
|
|
791
|
-
setConfig(tenantId: string, apiUrl: string): void;
|
|
794
|
+
setConfig(tenantId: string, apiUrl: string, models?: ProjectConfig['models']): void;
|
|
792
795
|
/**
|
|
793
796
|
* Set credential references for the project
|
|
794
797
|
* This is used by the CLI to inject environment-specific credentials
|
package/dist/index.d.ts
CHANGED
|
@@ -312,11 +312,9 @@ interface RunResult {
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
interface StatusComponent {
|
|
315
|
-
id: string;
|
|
316
|
-
name: string;
|
|
317
315
|
type: string;
|
|
318
316
|
description?: string;
|
|
319
|
-
schema
|
|
317
|
+
schema?: {
|
|
320
318
|
type: 'object';
|
|
321
319
|
properties: Record<string, any>;
|
|
322
320
|
required?: string[];
|
|
@@ -368,6 +366,7 @@ interface AgentInterface {
|
|
|
368
366
|
init(): Promise<void>;
|
|
369
367
|
getId(): string;
|
|
370
368
|
getName(): string;
|
|
369
|
+
getDescription(): string;
|
|
371
370
|
getInstructions(): string;
|
|
372
371
|
getTools(): Record<string, any>;
|
|
373
372
|
getTransfers(): AgentInterface[];
|
|
@@ -439,6 +438,10 @@ declare class Agent implements AgentInterface {
|
|
|
439
438
|
getId(): string;
|
|
440
439
|
getName(): string;
|
|
441
440
|
getInstructions(): string;
|
|
441
|
+
/**
|
|
442
|
+
* Get the agent's description (the human-readable description field)
|
|
443
|
+
*/
|
|
444
|
+
getDescription(): string;
|
|
442
445
|
getTools(): Record<string, unknown>;
|
|
443
446
|
getModels(): typeof this$1.config.models;
|
|
444
447
|
setModels(models: typeof this$1.config.models): void;
|
|
@@ -788,7 +791,7 @@ declare class Project implements ProjectInterface {
|
|
|
788
791
|
* Set or update the configuration (tenantId and apiUrl)
|
|
789
792
|
* This is used by the CLI to inject configuration from inkeep.config.ts
|
|
790
793
|
*/
|
|
791
|
-
setConfig(tenantId: string, apiUrl: string): void;
|
|
794
|
+
setConfig(tenantId: string, apiUrl: string, models?: ProjectConfig['models']): void;
|
|
792
795
|
/**
|
|
793
796
|
* Set credential references for the project
|
|
794
797
|
* This is used by the CLI to inject environment-specific credentials
|
package/dist/index.js
CHANGED
|
@@ -457,7 +457,12 @@ var Agent = class {
|
|
|
457
457
|
getInstructions() {
|
|
458
458
|
return this.config.prompt;
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
/**
|
|
461
|
+
* Get the agent's description (the human-readable description field)
|
|
462
|
+
*/
|
|
463
|
+
getDescription() {
|
|
464
|
+
return this.config.description || "";
|
|
465
|
+
}
|
|
461
466
|
getTools() {
|
|
462
467
|
const tools = resolveGetter(this.config.canUse);
|
|
463
468
|
if (!tools) {
|
|
@@ -2728,12 +2733,15 @@ var Project = class {
|
|
|
2728
2733
|
* Set or update the configuration (tenantId and apiUrl)
|
|
2729
2734
|
* This is used by the CLI to inject configuration from inkeep.config.ts
|
|
2730
2735
|
*/
|
|
2731
|
-
setConfig(tenantId, apiUrl) {
|
|
2736
|
+
setConfig(tenantId, apiUrl, models) {
|
|
2732
2737
|
if (this.initialized) {
|
|
2733
2738
|
throw new Error("Cannot set config after project has been initialized");
|
|
2734
2739
|
}
|
|
2735
2740
|
this.tenantId = tenantId;
|
|
2736
2741
|
this.baseURL = apiUrl;
|
|
2742
|
+
if (models) {
|
|
2743
|
+
this.models = models;
|
|
2744
|
+
}
|
|
2737
2745
|
for (const graph of this.graphs) {
|
|
2738
2746
|
graph.setConfig(tenantId, this.projectId, apiUrl);
|
|
2739
2747
|
}
|
|
@@ -2741,7 +2749,8 @@ var Project = class {
|
|
|
2741
2749
|
{
|
|
2742
2750
|
projectId: this.projectId,
|
|
2743
2751
|
tenantId: this.tenantId,
|
|
2744
|
-
apiUrl: this.baseURL
|
|
2752
|
+
apiUrl: this.baseURL,
|
|
2753
|
+
hasModels: !!this.models
|
|
2745
2754
|
},
|
|
2746
2755
|
"Project configuration updated"
|
|
2747
2756
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"nanoid": "^5.1.5",
|
|
10
10
|
"zod": "^4.1.5",
|
|
11
|
-
"@inkeep/agents-core": "^0.2.
|
|
11
|
+
"@inkeep/agents-core": "^0.2.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^20.11.24",
|