@inkeep/agents-sdk 0.0.0-dev-20260120230946 → 0.0.0-dev-20260121032144

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/agent.js CHANGED
@@ -662,7 +662,7 @@ var Agent = class {
662
662
  */
663
663
  async executeWithBackend(input, options) {
664
664
  const normalizedMessages = this.normalizeMessages(input);
665
- const url = `${this.baseURL}/tenants/${this.tenantId}/agent/${this.agentId}/v1/chat/completions`;
665
+ const url = `${this.baseURL}/run/v1/chat/completions`;
666
666
  logger.info({ url }, "Executing with backend");
667
667
  const requestBody = {
668
668
  model: "gpt-4o-mini",
@@ -13,7 +13,7 @@ async function createFullAgentViaAPI(tenantId, projectId, apiUrl, agentData) {
13
13
  agentId: agentData.id,
14
14
  apiUrl
15
15
  }, "Creating full agent via API");
16
- const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/agent`;
16
+ const url = `${apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agent`;
17
17
  const response = await fetch(url, {
18
18
  method: "POST",
19
19
  headers: { "Content-Type": "application/json" },
@@ -41,7 +41,7 @@ async function updateFullAgentViaAPI(tenantId, projectId, apiUrl, agentId, agent
41
41
  agentId,
42
42
  apiUrl
43
43
  }, "Updating full agent via API");
44
- const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
44
+ const url = `${apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
45
45
  const response = await fetch(url, {
46
46
  method: "PUT",
47
47
  headers: { "Content-Type": "application/json" },
@@ -69,7 +69,7 @@ async function getFullAgentViaAPI(tenantId, projectId, apiUrl, agentId) {
69
69
  agentId,
70
70
  apiUrl
71
71
  }, "Getting full agent via API");
72
- const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
72
+ const url = `${apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
73
73
  const response = await fetch(url, {
74
74
  method: "GET",
75
75
  headers: { "Content-Type": "application/json" }
@@ -100,7 +100,7 @@ async function deleteFullAgentViaAPI(tenantId, projectId, apiUrl, agentId) {
100
100
  agentId,
101
101
  apiUrl
102
102
  }, "Deleting full agent via API");
103
- const url = `${apiUrl}/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
103
+ const url = `${apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agent/${agentId}`;
104
104
  const response = await fetch(url, {
105
105
  method: "DELETE",
106
106
  headers: { "Content-Type": "application/json" }
@@ -68,7 +68,7 @@ var ArtifactComponent = class {
68
68
  props: this.config.props
69
69
  };
70
70
  logger.info({ artifactComponentData }, "artifactComponentData for create/update");
71
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/artifact-components/${this.getId()}`, {
71
+ const updateResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/artifact-components/${this.getId()}`, {
72
72
  method: "PUT",
73
73
  headers: { "Content-Type": "application/json" },
74
74
  body: JSON.stringify(artifactComponentData)
@@ -83,7 +83,7 @@ var ArtifactComponent = class {
83
83
  }
84
84
  if (updateResponse.status === 404) {
85
85
  logger.info({ artifactComponentId: this.getId() }, "ArtifactComponent not found, creating new artifact component");
86
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/artifact-components`, {
86
+ const createResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/artifact-components`, {
87
87
  method: "POST",
88
88
  headers: { "Content-Type": "application/json" },
89
89
  body: JSON.stringify(artifactComponentData)
@@ -273,7 +273,8 @@ declare function functionTool(config: FunctionToolConfig): FunctionTool;
273
273
  * Creates a webhook trigger for external service integration.
274
274
  *
275
275
  * Triggers allow external services to invoke agents via webhooks.
276
- * They support authentication, payload transformation, and input validation.
276
+ * They support authentication via arbitrary header key-value pairs,
277
+ * payload transformation, and input validation.
277
278
  *
278
279
  * @param config - Trigger configuration
279
280
  * @returns A Trigger instance
@@ -282,7 +283,7 @@ declare function functionTool(config: FunctionToolConfig): FunctionTool;
282
283
  * ```typescript
283
284
  * import { z } from 'zod';
284
285
  *
285
- * // GitHub webhook trigger
286
+ * // GitHub webhook trigger with header-based authentication
286
287
  * const githubTrigger = trigger({
287
288
  * name: 'GitHub Events',
288
289
  * description: 'Handle GitHub webhook events',
@@ -299,19 +300,31 @@ declare function functionTool(config: FunctionToolConfig): FunctionTool;
299
300
  * },
300
301
  * messageTemplate: 'GitHub {{action}} on repository {{repo}}: {{url}}',
301
302
  * authentication: {
302
- * type: 'api_key',
303
- * data: { name: 'X-GitHub-Token', value: process.env.GITHUB_TOKEN },
304
- * add_position: 'header'
303
+ * headers: [
304
+ * { name: 'X-GitHub-Token', value: process.env.GITHUB_TOKEN }
305
+ * ]
305
306
  * },
306
307
  * signingSecret: process.env.GITHUB_WEBHOOK_SECRET
307
308
  * });
308
309
  *
310
+ * // Multiple authentication headers
311
+ * const multiHeaderTrigger = trigger({
312
+ * name: 'Secure Webhook',
313
+ * description: 'Webhook with multiple auth headers',
314
+ * messageTemplate: 'Received: {{data}}',
315
+ * authentication: {
316
+ * headers: [
317
+ * { name: 'X-API-Key', value: process.env.API_KEY },
318
+ * { name: 'X-Client-ID', value: process.env.CLIENT_ID }
319
+ * ]
320
+ * }
321
+ * });
322
+ *
309
323
  * // Simple webhook trigger with no auth
310
324
  * const simpleTrigger = trigger({
311
325
  * name: 'Slack Message',
312
326
  * description: 'Handle Slack messages',
313
- * messageTemplate: 'New message: {{text}}',
314
- * authentication: { type: 'none' }
327
+ * messageTemplate: 'New message: {{text}}'
315
328
  * });
316
329
  * ```
317
330
  */
@@ -327,7 +327,8 @@ function functionTool(config) {
327
327
  * Creates a webhook trigger for external service integration.
328
328
  *
329
329
  * Triggers allow external services to invoke agents via webhooks.
330
- * They support authentication, payload transformation, and input validation.
330
+ * They support authentication via arbitrary header key-value pairs,
331
+ * payload transformation, and input validation.
331
332
  *
332
333
  * @param config - Trigger configuration
333
334
  * @returns A Trigger instance
@@ -336,7 +337,7 @@ function functionTool(config) {
336
337
  * ```typescript
337
338
  * import { z } from 'zod';
338
339
  *
339
- * // GitHub webhook trigger
340
+ * // GitHub webhook trigger with header-based authentication
340
341
  * const githubTrigger = trigger({
341
342
  * name: 'GitHub Events',
342
343
  * description: 'Handle GitHub webhook events',
@@ -353,19 +354,31 @@ function functionTool(config) {
353
354
  * },
354
355
  * messageTemplate: 'GitHub {{action}} on repository {{repo}}: {{url}}',
355
356
  * authentication: {
356
- * type: 'api_key',
357
- * data: { name: 'X-GitHub-Token', value: process.env.GITHUB_TOKEN },
358
- * add_position: 'header'
357
+ * headers: [
358
+ * { name: 'X-GitHub-Token', value: process.env.GITHUB_TOKEN }
359
+ * ]
359
360
  * },
360
361
  * signingSecret: process.env.GITHUB_WEBHOOK_SECRET
361
362
  * });
362
363
  *
364
+ * // Multiple authentication headers
365
+ * const multiHeaderTrigger = trigger({
366
+ * name: 'Secure Webhook',
367
+ * description: 'Webhook with multiple auth headers',
368
+ * messageTemplate: 'Received: {{data}}',
369
+ * authentication: {
370
+ * headers: [
371
+ * { name: 'X-API-Key', value: process.env.API_KEY },
372
+ * { name: 'X-Client-ID', value: process.env.CLIENT_ID }
373
+ * ]
374
+ * }
375
+ * });
376
+ *
363
377
  * // Simple webhook trigger with no auth
364
378
  * const simpleTrigger = trigger({
365
379
  * name: 'Slack Message',
366
380
  * description: 'Handle Slack messages',
367
- * messageTemplate: 'New message: {{text}}',
368
- * authentication: { type: 'none' }
381
+ * messageTemplate: 'New message: {{text}}'
369
382
  * });
370
383
  * ```
371
384
  */
@@ -73,7 +73,7 @@ var DataComponent = class {
73
73
  render: this.config.render
74
74
  };
75
75
  logger.info({ dataComponentData }, "dataComponentData for create/update");
76
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/data-components/${this.getId()}`, {
76
+ const updateResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/data-components/${this.getId()}`, {
77
77
  method: "PUT",
78
78
  headers: { "Content-Type": "application/json" },
79
79
  body: JSON.stringify(dataComponentData)
@@ -88,7 +88,7 @@ var DataComponent = class {
88
88
  }
89
89
  if (updateResponse.status === 404) {
90
90
  logger.info({ dataComponentId: this.getId() }, "DataComponent not found, creating new data component");
91
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/data-components`, {
91
+ const createResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/data-components`, {
92
92
  method: "POST",
93
93
  headers: { "Content-Type": "application/json" },
94
94
  body: JSON.stringify(dataComponentData)
@@ -29,7 +29,7 @@ var EvaluationClient = class {
29
29
  this.apiKey = config.apiKey;
30
30
  }
31
31
  buildUrl(...pathSegments) {
32
- return `${this.apiUrl}/tenants/${this.tenantId}/projects/${this.projectId}/evals/${pathSegments.join("/")}`;
32
+ return `${this.apiUrl}/manage/tenants/${this.tenantId}/projects/${this.projectId}/evals/${pathSegments.join("/")}`;
33
33
  }
34
34
  buildHeaders() {
35
35
  const headers = { "Content-Type": "application/json" };
@@ -61,7 +61,7 @@ var ExternalAgent = class {
61
61
  baseUrl: this.config.baseUrl,
62
62
  credentialReferenceId: this.config.credentialReference?.id || void 0
63
63
  };
64
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/external-agents/${this.getId()}`, {
64
+ const updateResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/external-agents/${this.getId()}`, {
65
65
  method: "PUT",
66
66
  headers: { "Content-Type": "application/json" },
67
67
  body: JSON.stringify(externalAgentData)
@@ -72,7 +72,7 @@ var ExternalAgent = class {
72
72
  }
73
73
  if (updateResponse.status === 404) {
74
74
  logger.info({ externalSubAgentId: this.getId() }, "External agent not found, creating new external agent");
75
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/external-agents`, {
75
+ const createResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/external-agents`, {
76
76
  method: "POST",
77
77
  headers: { "Content-Type": "application/json" },
78
78
  body: JSON.stringify(externalAgentData)
@@ -15,7 +15,7 @@ async function createFullProjectViaAPI(tenantId, apiUrl, projectData, apiKey) {
15
15
  projectId: projectData.id,
16
16
  apiUrl
17
17
  }, "Creating full project via API");
18
- const url = `${apiUrl}/tenants/${tenantId}/project-full`;
18
+ const url = `${apiUrl}/manage/tenants/${tenantId}/project-full`;
19
19
  const headers = {};
20
20
  if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
21
21
  let response;
@@ -55,7 +55,7 @@ async function updateFullProjectViaAPI(tenantId, apiUrl, projectId, projectData,
55
55
  projectId,
56
56
  apiUrl
57
57
  }, "Updating full project via API");
58
- const url = `${apiUrl}/tenants/${tenantId}/project-full/${projectId}`;
58
+ const url = `${apiUrl}/manage/tenants/${tenantId}/project-full/${projectId}`;
59
59
  const headers = {};
60
60
  if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
61
61
  let response;
@@ -95,7 +95,7 @@ async function getFullProjectViaAPI(tenantId, apiUrl, projectId, apiKey) {
95
95
  projectId,
96
96
  apiUrl
97
97
  }, "Getting full project via API");
98
- const url = `${apiUrl}/tenants/${tenantId}/project-full/${projectId}`;
98
+ const url = `${apiUrl}/manage/tenants/${tenantId}/project-full/${projectId}`;
99
99
  const headers = {};
100
100
  if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
101
101
  const response = await apiFetch(url, {
@@ -127,7 +127,7 @@ async function deleteFullProjectViaAPI(tenantId, apiUrl, projectId, apiKey) {
127
127
  projectId,
128
128
  apiUrl
129
129
  }, "Deleting full project via API");
130
- const url = `${apiUrl}/tenants/${tenantId}/project-full/${projectId}`;
130
+ const url = `${apiUrl}/manage/tenants/${tenantId}/project-full/${projectId}`;
131
131
  const headers = {};
132
132
  if (apiKey) headers.Authorization = `Bearer ${apiKey}`;
133
133
  const response = await apiFetch(url, {
package/dist/subAgent.js CHANGED
@@ -209,7 +209,7 @@ var SubAgent = class {
209
209
  models: this.config.models,
210
210
  stopWhen: this.config.stopWhen
211
211
  };
212
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agents/${this.getId()}`, {
212
+ const updateResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/agents/${this.getId()}`, {
213
213
  method: "PUT",
214
214
  headers: { "Content-Type": "application/json" },
215
215
  body: JSON.stringify(agentData)
@@ -220,7 +220,7 @@ var SubAgent = class {
220
220
  }
221
221
  if (updateResponse.status === 404) {
222
222
  logger.info({ subAgentId: this.getId() }, "Agent not found, creating new agent");
223
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agents`, {
223
+ const createResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/agents`, {
224
224
  method: "POST",
225
225
  headers: { "Content-Type": "application/json" },
226
226
  body: JSON.stringify(agentData)
@@ -369,7 +369,7 @@ var SubAgent = class {
369
369
  try {
370
370
  const functionData = functionTool.serializeFunction();
371
371
  const toolData = functionTool.serializeTool();
372
- const functionUrl = `${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/functions`;
372
+ const functionUrl = `${this.baseURL}/manage/tenants/${this.tenantId}/crud/projects/${this.projectId}/functions`;
373
373
  logger.info({
374
374
  agentId: this.getId(),
375
375
  toolId,
@@ -402,7 +402,7 @@ var SubAgent = class {
402
402
  }, "Function creation failed");
403
403
  throw new Error(`Failed to create function: ${functionResponse.status} ${errorText}`);
404
404
  }
405
- const toolUrl = `${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools`;
405
+ const toolUrl = `${this.baseURL}/manage/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools`;
406
406
  logger.info({
407
407
  agentId: this.getId(),
408
408
  toolId,
@@ -553,7 +553,7 @@ var SubAgent = class {
553
553
  }
554
554
  }
555
555
  async createAgentDataComponentRelation(dataComponentId) {
556
- const relationResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agent-data-components`, {
556
+ const relationResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/agent-data-components`, {
557
557
  method: "POST",
558
558
  headers: { "Content-Type": "application/json" },
559
559
  body: JSON.stringify({
@@ -570,7 +570,7 @@ var SubAgent = class {
570
570
  }, "Created agent-dataComponent relation");
571
571
  }
572
572
  async createAgentArtifactComponentRelation(artifactComponentId) {
573
- const relationResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/agent-artifact-components`, {
573
+ const relationResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/agent-artifact-components`, {
574
574
  method: "POST",
575
575
  headers: { "Content-Type": "application/json" },
576
576
  body: JSON.stringify({
@@ -597,7 +597,7 @@ var SubAgent = class {
597
597
  if (selectedTools !== void 0) relationData.selectedTools = selectedTools;
598
598
  if (headers !== void 0) relationData.headers = headers;
599
599
  if (toolPolicies !== void 0 && Object.keys(toolPolicies).length > 0) relationData.toolPolicies = toolPolicies;
600
- const relationResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/agent-tool-relations`, {
600
+ const relationResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/agent-tool-relations`, {
601
601
  method: "POST",
602
602
  headers: { "Content-Type": "application/json" },
603
603
  body: JSON.stringify(relationData)
package/dist/tool.js CHANGED
@@ -93,7 +93,7 @@ var Tool = class {
93
93
  };
94
94
  const toolDataForCreate = { ...toolDataForUpdate };
95
95
  logger.info({ toolDataForCreate }, "toolDataForCreate");
96
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools/${this.getId()}`, {
96
+ const updateResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/tools/${this.getId()}`, {
97
97
  method: "PUT",
98
98
  headers: { "Content-Type": "application/json" },
99
99
  body: JSON.stringify(toolDataForUpdate)
@@ -105,7 +105,7 @@ var Tool = class {
105
105
  }
106
106
  if (updateResponse.status === 404) {
107
107
  logger.info({ toolId: this.getId() }, "Tool not found, creating new tool");
108
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/projects/${this.projectId}/tools`, {
108
+ const createResponse = await fetch(`${this.baseURL}/manage/tenants/${this.tenantId}/projects/${this.projectId}/tools`, {
109
109
  method: "POST",
110
110
  headers: { "Content-Type": "application/json" },
111
111
  body: JSON.stringify(toolDataForCreate)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-sdk",
3
- "version": "0.0.0-dev-20260120230946",
3
+ "version": "0.0.0-dev-20260121032144",
4
4
  "description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "js-yaml": "^4.1.0",
17
17
  "typescript": "^5.3.3",
18
18
  "zod": "^4.1.11",
19
- "@inkeep/agents-core": "^0.0.0-dev-20260120230946"
19
+ "@inkeep/agents-core": "^0.0.0-dev-20260121032144"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/js-yaml": "^4.0.9",