@inkeep/agents-sdk 0.0.0-dev-20250919185254 → 0.0.0-dev-20250919192523
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 +19 -19
- package/dist/index.js +19 -19
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -83,7 +83,7 @@ var ArtifactComponent = class {
|
|
|
83
83
|
};
|
|
84
84
|
logger.info({ artifactComponentData }, "artifactComponentData for create/update");
|
|
85
85
|
const updateResponse = await fetch(
|
|
86
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
86
|
+
`${this.baseURL}/tenants/${this.tenantId}/artifact-components/${this.getId()}`,
|
|
87
87
|
{
|
|
88
88
|
method: "PUT",
|
|
89
89
|
headers: {
|
|
@@ -116,7 +116,7 @@ var ArtifactComponent = class {
|
|
|
116
116
|
"ArtifactComponent not found, creating new artifact component"
|
|
117
117
|
);
|
|
118
118
|
const createResponse = await fetch(
|
|
119
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
119
|
+
`${this.baseURL}/tenants/${this.tenantId}/artifact-components`,
|
|
120
120
|
{
|
|
121
121
|
method: "POST",
|
|
122
122
|
headers: {
|
|
@@ -218,7 +218,7 @@ var DataComponent = class {
|
|
|
218
218
|
};
|
|
219
219
|
logger2.info({ dataComponentData }, "dataComponentData for create/update");
|
|
220
220
|
const updateResponse = await fetch(
|
|
221
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
221
|
+
`${this.baseURL}/tenants/${this.tenantId}/data-components/${this.getId()}`,
|
|
222
222
|
{
|
|
223
223
|
method: "PUT",
|
|
224
224
|
headers: {
|
|
@@ -251,7 +251,7 @@ var DataComponent = class {
|
|
|
251
251
|
"DataComponent not found, creating new data component"
|
|
252
252
|
);
|
|
253
253
|
const createResponse = await fetch(
|
|
254
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
254
|
+
`${this.baseURL}/tenants/${this.tenantId}/data-components`,
|
|
255
255
|
{
|
|
256
256
|
method: "POST",
|
|
257
257
|
headers: {
|
|
@@ -368,7 +368,7 @@ var Tool = class {
|
|
|
368
368
|
};
|
|
369
369
|
logger3.info({ toolDataForCreate }, "toolDataForCreate");
|
|
370
370
|
const updateResponse = await fetch(
|
|
371
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
371
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools/${this.getId()}`,
|
|
372
372
|
{
|
|
373
373
|
method: "PUT",
|
|
374
374
|
headers: {
|
|
@@ -395,7 +395,7 @@ var Tool = class {
|
|
|
395
395
|
"Tool not found, creating new tool"
|
|
396
396
|
);
|
|
397
397
|
const createResponse = await fetch(
|
|
398
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
398
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools`,
|
|
399
399
|
{
|
|
400
400
|
method: "POST",
|
|
401
401
|
headers: {
|
|
@@ -573,7 +573,7 @@ var Agent = class {
|
|
|
573
573
|
stopWhen: this.config.stopWhen
|
|
574
574
|
};
|
|
575
575
|
const updateResponse = await fetch(
|
|
576
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
576
|
+
`${this.baseURL}/tenants/${this.tenantId}/agents/${this.getId()}`,
|
|
577
577
|
{
|
|
578
578
|
method: "PUT",
|
|
579
579
|
headers: {
|
|
@@ -598,7 +598,7 @@ var Agent = class {
|
|
|
598
598
|
},
|
|
599
599
|
"Agent not found, creating new agent"
|
|
600
600
|
);
|
|
601
|
-
const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/
|
|
601
|
+
const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agents`, {
|
|
602
602
|
method: "POST",
|
|
603
603
|
headers: {
|
|
604
604
|
"Content-Type": "application/json"
|
|
@@ -881,7 +881,7 @@ var Agent = class {
|
|
|
881
881
|
}
|
|
882
882
|
async createAgentDataComponentRelation(dataComponentId) {
|
|
883
883
|
const relationResponse = await fetch(
|
|
884
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
884
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-data-components`,
|
|
885
885
|
{
|
|
886
886
|
method: "POST",
|
|
887
887
|
headers: {
|
|
@@ -910,7 +910,7 @@ var Agent = class {
|
|
|
910
910
|
}
|
|
911
911
|
async createAgentArtifactComponentRelation(artifactComponentId) {
|
|
912
912
|
const relationResponse = await fetch(
|
|
913
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
913
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-artifact-components`,
|
|
914
914
|
{
|
|
915
915
|
method: "POST",
|
|
916
916
|
headers: {
|
|
@@ -949,7 +949,7 @@ var Agent = class {
|
|
|
949
949
|
relationData.selectedTools = selectedTools;
|
|
950
950
|
}
|
|
951
951
|
const relationResponse = await fetch(
|
|
952
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
952
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/agent-tool-relations`,
|
|
953
953
|
{
|
|
954
954
|
method: "POST",
|
|
955
955
|
headers: {
|
|
@@ -1026,7 +1026,7 @@ var ExternalAgent = class {
|
|
|
1026
1026
|
headers: this.config.headers || void 0
|
|
1027
1027
|
};
|
|
1028
1028
|
const updateResponse = await fetch(
|
|
1029
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
1029
|
+
`${this.baseURL}/tenants/${this.tenantId}/external-agents/${this.getId()}`,
|
|
1030
1030
|
{
|
|
1031
1031
|
method: "PUT",
|
|
1032
1032
|
headers: {
|
|
@@ -1052,7 +1052,7 @@ var ExternalAgent = class {
|
|
|
1052
1052
|
"External agent not found, creating new external agent"
|
|
1053
1053
|
);
|
|
1054
1054
|
const createResponse = await fetch(
|
|
1055
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
1055
|
+
`${this.baseURL}/tenants/${this.tenantId}/external-agents`,
|
|
1056
1056
|
{
|
|
1057
1057
|
method: "POST",
|
|
1058
1058
|
headers: {
|
|
@@ -1135,7 +1135,7 @@ async function updateFullGraphViaAPI(tenantId, projectId, apiUrl, graphId, graph
|
|
|
1135
1135
|
},
|
|
1136
1136
|
"Updating full graph via API"
|
|
1137
1137
|
);
|
|
1138
|
-
const url = `${apiUrl}/tenants/${tenantId}/
|
|
1138
|
+
const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/graph/${graphId}`;
|
|
1139
1139
|
const response = await fetch(url, {
|
|
1140
1140
|
method: "PUT",
|
|
1141
1141
|
headers: {
|
|
@@ -2153,7 +2153,7 @@ var AgentGraph = class {
|
|
|
2153
2153
|
}
|
|
2154
2154
|
async saveToDatabase() {
|
|
2155
2155
|
try {
|
|
2156
|
-
const getUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2156
|
+
const getUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs/${this.graphId}`;
|
|
2157
2157
|
try {
|
|
2158
2158
|
const getResponse = await fetch(getUrl, {
|
|
2159
2159
|
method: "GET",
|
|
@@ -2174,7 +2174,7 @@ var AgentGraph = class {
|
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
2176
2176
|
logger7.info({ graphId: this.graphId }, "Creating graph in backend");
|
|
2177
|
-
const createUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2177
|
+
const createUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs`;
|
|
2178
2178
|
const createResponse = await fetch(createUrl, {
|
|
2179
2179
|
method: "POST",
|
|
2180
2180
|
headers: {
|
|
@@ -2203,7 +2203,7 @@ var AgentGraph = class {
|
|
|
2203
2203
|
async saveRelations() {
|
|
2204
2204
|
if (this.defaultAgent) {
|
|
2205
2205
|
try {
|
|
2206
|
-
const updateUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2206
|
+
const updateUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs/${this.graphId}`;
|
|
2207
2207
|
const updateResponse = await fetch(updateUrl, {
|
|
2208
2208
|
method: "PUT",
|
|
2209
2209
|
headers: {
|
|
@@ -2292,7 +2292,7 @@ var AgentGraph = class {
|
|
|
2292
2292
|
async createInternalAgentRelation(sourceAgent, targetAgent, relationType) {
|
|
2293
2293
|
try {
|
|
2294
2294
|
const response = await fetch(
|
|
2295
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
2295
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-relations`,
|
|
2296
2296
|
{
|
|
2297
2297
|
method: "POST",
|
|
2298
2298
|
headers: {
|
|
@@ -2349,7 +2349,7 @@ var AgentGraph = class {
|
|
|
2349
2349
|
async createExternalAgentRelation(sourceAgent, externalAgent2, relationType) {
|
|
2350
2350
|
try {
|
|
2351
2351
|
const response = await fetch(
|
|
2352
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
2352
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-relations`,
|
|
2353
2353
|
{
|
|
2354
2354
|
method: "POST",
|
|
2355
2355
|
headers: {
|
package/dist/index.js
CHANGED
|
@@ -81,7 +81,7 @@ var ArtifactComponent = class {
|
|
|
81
81
|
};
|
|
82
82
|
logger.info({ artifactComponentData }, "artifactComponentData for create/update");
|
|
83
83
|
const updateResponse = await fetch(
|
|
84
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
84
|
+
`${this.baseURL}/tenants/${this.tenantId}/artifact-components/${this.getId()}`,
|
|
85
85
|
{
|
|
86
86
|
method: "PUT",
|
|
87
87
|
headers: {
|
|
@@ -114,7 +114,7 @@ var ArtifactComponent = class {
|
|
|
114
114
|
"ArtifactComponent not found, creating new artifact component"
|
|
115
115
|
);
|
|
116
116
|
const createResponse = await fetch(
|
|
117
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
117
|
+
`${this.baseURL}/tenants/${this.tenantId}/artifact-components`,
|
|
118
118
|
{
|
|
119
119
|
method: "POST",
|
|
120
120
|
headers: {
|
|
@@ -216,7 +216,7 @@ var DataComponent = class {
|
|
|
216
216
|
};
|
|
217
217
|
logger2.info({ dataComponentData }, "dataComponentData for create/update");
|
|
218
218
|
const updateResponse = await fetch(
|
|
219
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
219
|
+
`${this.baseURL}/tenants/${this.tenantId}/data-components/${this.getId()}`,
|
|
220
220
|
{
|
|
221
221
|
method: "PUT",
|
|
222
222
|
headers: {
|
|
@@ -249,7 +249,7 @@ var DataComponent = class {
|
|
|
249
249
|
"DataComponent not found, creating new data component"
|
|
250
250
|
);
|
|
251
251
|
const createResponse = await fetch(
|
|
252
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
252
|
+
`${this.baseURL}/tenants/${this.tenantId}/data-components`,
|
|
253
253
|
{
|
|
254
254
|
method: "POST",
|
|
255
255
|
headers: {
|
|
@@ -366,7 +366,7 @@ var Tool = class {
|
|
|
366
366
|
};
|
|
367
367
|
logger3.info({ toolDataForCreate }, "toolDataForCreate");
|
|
368
368
|
const updateResponse = await fetch(
|
|
369
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
369
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools/${this.getId()}`,
|
|
370
370
|
{
|
|
371
371
|
method: "PUT",
|
|
372
372
|
headers: {
|
|
@@ -393,7 +393,7 @@ var Tool = class {
|
|
|
393
393
|
"Tool not found, creating new tool"
|
|
394
394
|
);
|
|
395
395
|
const createResponse = await fetch(
|
|
396
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
396
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools`,
|
|
397
397
|
{
|
|
398
398
|
method: "POST",
|
|
399
399
|
headers: {
|
|
@@ -571,7 +571,7 @@ var Agent = class {
|
|
|
571
571
|
stopWhen: this.config.stopWhen
|
|
572
572
|
};
|
|
573
573
|
const updateResponse = await fetch(
|
|
574
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
574
|
+
`${this.baseURL}/tenants/${this.tenantId}/agents/${this.getId()}`,
|
|
575
575
|
{
|
|
576
576
|
method: "PUT",
|
|
577
577
|
headers: {
|
|
@@ -596,7 +596,7 @@ var Agent = class {
|
|
|
596
596
|
},
|
|
597
597
|
"Agent not found, creating new agent"
|
|
598
598
|
);
|
|
599
|
-
const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/
|
|
599
|
+
const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agents`, {
|
|
600
600
|
method: "POST",
|
|
601
601
|
headers: {
|
|
602
602
|
"Content-Type": "application/json"
|
|
@@ -879,7 +879,7 @@ var Agent = class {
|
|
|
879
879
|
}
|
|
880
880
|
async createAgentDataComponentRelation(dataComponentId) {
|
|
881
881
|
const relationResponse = await fetch(
|
|
882
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
882
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-data-components`,
|
|
883
883
|
{
|
|
884
884
|
method: "POST",
|
|
885
885
|
headers: {
|
|
@@ -908,7 +908,7 @@ var Agent = class {
|
|
|
908
908
|
}
|
|
909
909
|
async createAgentArtifactComponentRelation(artifactComponentId) {
|
|
910
910
|
const relationResponse = await fetch(
|
|
911
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
911
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-artifact-components`,
|
|
912
912
|
{
|
|
913
913
|
method: "POST",
|
|
914
914
|
headers: {
|
|
@@ -947,7 +947,7 @@ var Agent = class {
|
|
|
947
947
|
relationData.selectedTools = selectedTools;
|
|
948
948
|
}
|
|
949
949
|
const relationResponse = await fetch(
|
|
950
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
950
|
+
`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/agent-tool-relations`,
|
|
951
951
|
{
|
|
952
952
|
method: "POST",
|
|
953
953
|
headers: {
|
|
@@ -1024,7 +1024,7 @@ var ExternalAgent = class {
|
|
|
1024
1024
|
headers: this.config.headers || void 0
|
|
1025
1025
|
};
|
|
1026
1026
|
const updateResponse = await fetch(
|
|
1027
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
1027
|
+
`${this.baseURL}/tenants/${this.tenantId}/external-agents/${this.getId()}`,
|
|
1028
1028
|
{
|
|
1029
1029
|
method: "PUT",
|
|
1030
1030
|
headers: {
|
|
@@ -1050,7 +1050,7 @@ var ExternalAgent = class {
|
|
|
1050
1050
|
"External agent not found, creating new external agent"
|
|
1051
1051
|
);
|
|
1052
1052
|
const createResponse = await fetch(
|
|
1053
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
1053
|
+
`${this.baseURL}/tenants/${this.tenantId}/external-agents`,
|
|
1054
1054
|
{
|
|
1055
1055
|
method: "POST",
|
|
1056
1056
|
headers: {
|
|
@@ -1133,7 +1133,7 @@ async function updateFullGraphViaAPI(tenantId, projectId, apiUrl, graphId, graph
|
|
|
1133
1133
|
},
|
|
1134
1134
|
"Updating full graph via API"
|
|
1135
1135
|
);
|
|
1136
|
-
const url = `${apiUrl}/tenants/${tenantId}/
|
|
1136
|
+
const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/graph/${graphId}`;
|
|
1137
1137
|
const response = await fetch(url, {
|
|
1138
1138
|
method: "PUT",
|
|
1139
1139
|
headers: {
|
|
@@ -2151,7 +2151,7 @@ var AgentGraph = class {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
async saveToDatabase() {
|
|
2153
2153
|
try {
|
|
2154
|
-
const getUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2154
|
+
const getUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs/${this.graphId}`;
|
|
2155
2155
|
try {
|
|
2156
2156
|
const getResponse = await fetch(getUrl, {
|
|
2157
2157
|
method: "GET",
|
|
@@ -2172,7 +2172,7 @@ var AgentGraph = class {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
2174
|
logger7.info({ graphId: this.graphId }, "Creating graph in backend");
|
|
2175
|
-
const createUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2175
|
+
const createUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs`;
|
|
2176
2176
|
const createResponse = await fetch(createUrl, {
|
|
2177
2177
|
method: "POST",
|
|
2178
2178
|
headers: {
|
|
@@ -2201,7 +2201,7 @@ var AgentGraph = class {
|
|
|
2201
2201
|
async saveRelations() {
|
|
2202
2202
|
if (this.defaultAgent) {
|
|
2203
2203
|
try {
|
|
2204
|
-
const updateUrl = `${this.baseURL}/tenants/${this.tenantId}/
|
|
2204
|
+
const updateUrl = `${this.baseURL}/tenants/${this.tenantId}/agent-graphs/${this.graphId}`;
|
|
2205
2205
|
const updateResponse = await fetch(updateUrl, {
|
|
2206
2206
|
method: "PUT",
|
|
2207
2207
|
headers: {
|
|
@@ -2290,7 +2290,7 @@ var AgentGraph = class {
|
|
|
2290
2290
|
async createInternalAgentRelation(sourceAgent, targetAgent, relationType) {
|
|
2291
2291
|
try {
|
|
2292
2292
|
const response = await fetch(
|
|
2293
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
2293
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-relations`,
|
|
2294
2294
|
{
|
|
2295
2295
|
method: "POST",
|
|
2296
2296
|
headers: {
|
|
@@ -2347,7 +2347,7 @@ var AgentGraph = class {
|
|
|
2347
2347
|
async createExternalAgentRelation(sourceAgent, externalAgent2, relationType) {
|
|
2348
2348
|
try {
|
|
2349
2349
|
const response = await fetch(
|
|
2350
|
-
`${this.baseURL}/tenants/${this.tenantId}/
|
|
2350
|
+
`${this.baseURL}/tenants/${this.tenantId}/agent-relations`,
|
|
2351
2351
|
{
|
|
2352
2352
|
method: "POST",
|
|
2353
2353
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-sdk",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250919192523",
|
|
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.0.0-dev-
|
|
11
|
+
"@inkeep/agents-core": "^0.0.0-dev-20250919192523"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/node": "^20.11.24",
|