@inkeep/agents-run-api 0.0.0-dev-20251009010805 → 0.0.0-dev-20251009020740

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 CHANGED
@@ -7952,7 +7952,7 @@ var Agent = class {
7952
7952
  /**
7953
7953
  * Get resolved context using ContextResolver - will return cached data or fetch fresh data as needed
7954
7954
  */
7955
- async getResolvedContext(conversationId, requestContext) {
7955
+ async getResolvedContext(conversationId, headers) {
7956
7956
  try {
7957
7957
  if (!this.config.contextConfigId) {
7958
7958
  logger19.debug({ graphId: this.config.graphId }, "No context config found for graph");
@@ -7976,7 +7976,7 @@ var Agent = class {
7976
7976
  const result = await this.contextResolver.resolve(contextConfig, {
7977
7977
  triggerEvent: "invocation",
7978
7978
  conversationId,
7979
- requestContext: requestContext || {},
7979
+ headers: headers || {},
7980
7980
  tenantId: this.config.tenantId
7981
7981
  });
7982
7982
  const contextWithBuiltins = {
@@ -10681,8 +10681,8 @@ var chatCompletionsRoute = zodOpenapi.createRoute({
10681
10681
  conversationId: z6.z.string().optional().describe("Conversation ID for multi-turn chat"),
10682
10682
  tools: z6.z.array(z6.z.string()).optional().describe("Available tools"),
10683
10683
  runConfig: z6.z.record(z6.z.string(), z6.z.unknown()).optional().describe("Run configuration"),
10684
- requestContext: z6.z.record(z6.z.string(), z6.z.unknown()).optional().describe(
10685
- "Context data for template processing (validated against context config schema)"
10684
+ headers: z6.z.record(z6.z.string(), z6.z.unknown()).optional().describe(
10685
+ "Headers data for template processing (validated against context config schema)"
10686
10686
  )
10687
10687
  })
10688
10688
  }
@@ -10840,14 +10840,14 @@ app2.openapi(chatCompletionsRoute, async (c) => {
10840
10840
  message: "Agent not found"
10841
10841
  });
10842
10842
  }
10843
- const validatedContext = c.get("validatedContext") || body.requestContext || {};
10843
+ const validatedContext = c.get("validatedContext") || body.headers || {};
10844
10844
  const credentialStores = c.get("credentialStores");
10845
10845
  await agentsCore.handleContextResolution({
10846
10846
  tenantId,
10847
10847
  projectId,
10848
10848
  graphId,
10849
10849
  conversationId,
10850
- requestContext: validatedContext,
10850
+ headers: validatedContext,
10851
10851
  dbClient: dbClient_default,
10852
10852
  credentialStores
10853
10853
  });
@@ -10860,7 +10860,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
10860
10860
  defaultAgentId,
10861
10861
  activeAgentId: activeAgent?.activeAgentId || "none",
10862
10862
  hasContextConfig: !!agentGraph.contextConfigId,
10863
- hasRequestContext: !!body.requestContext,
10863
+ hasHeaders: !!body.headers,
10864
10864
  hasValidatedContext: !!validatedContext,
10865
10865
  validatedContextKeys: Object.keys(validatedContext)
10866
10866
  },
@@ -11007,7 +11007,7 @@ var chatDataStreamRoute = zodOpenapi.createRoute({
11007
11007
  ),
11008
11008
  id: zodOpenapi.z.string().optional(),
11009
11009
  conversationId: zodOpenapi.z.string().optional(),
11010
- requestContext: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional().describe("Context data for template processing")
11010
+ headers: zodOpenapi.z.record(zodOpenapi.z.string(), zodOpenapi.z.unknown()).optional().describe("Headers data for template processing")
11011
11011
  })
11012
11012
  }
11013
11013
  }
@@ -11080,14 +11080,14 @@ app3.openapi(chatDataStreamRoute, async (c) => {
11080
11080
  message: "Agent not found"
11081
11081
  });
11082
11082
  }
11083
- const validatedContext = c.get("validatedContext") || body.requestContext || {};
11083
+ const validatedContext = c.get("validatedContext") || body.headers || {};
11084
11084
  const credentialStores = c.get("credentialStores");
11085
11085
  await agentsCore.handleContextResolution({
11086
11086
  tenantId,
11087
11087
  projectId,
11088
11088
  graphId,
11089
11089
  conversationId,
11090
- requestContext: validatedContext,
11090
+ headers: validatedContext,
11091
11091
  dbClient: dbClient_default,
11092
11092
  credentialStores
11093
11093
  });
@@ -11365,7 +11365,7 @@ var executeAgentQuery = async (executionContext, conversationId, query, defaultA
11365
11365
  ]
11366
11366
  };
11367
11367
  };
11368
- var getServer = async (requestContext, executionContext, conversationId, credentialStores) => {
11368
+ var getServer = async (headers, executionContext, conversationId, credentialStores) => {
11369
11369
  const { tenantId, projectId, graphId } = executionContext;
11370
11370
  setupTracing(conversationId, tenantId, graphId);
11371
11371
  const agentGraph = await agentsCore.getAgentGraphWithDefaultAgent(dbClient_default)({
@@ -11421,7 +11421,7 @@ var getServer = async (requestContext, executionContext, conversationId, credent
11421
11421
  projectId,
11422
11422
  graphId,
11423
11423
  conversationId,
11424
- requestContext,
11424
+ headers,
11425
11425
  dbClient: dbClient_default,
11426
11426
  credentialStores
11427
11427
  });
@@ -11432,7 +11432,7 @@ var getServer = async (requestContext, executionContext, conversationId, credent
11432
11432
  graphId,
11433
11433
  conversationId,
11434
11434
  hasContextConfig: !!agentGraph.contextConfigId,
11435
- hasRequestContext: !!requestContext,
11435
+ hasHeaders: !!headers,
11436
11436
  hasValidatedContext: !!resolvedContext
11437
11437
  },
11438
11438
  "parameters"
package/dist/index.js CHANGED
@@ -7130,7 +7130,7 @@ var Agent = class {
7130
7130
  /**
7131
7131
  * Get resolved context using ContextResolver - will return cached data or fetch fresh data as needed
7132
7132
  */
7133
- async getResolvedContext(conversationId, requestContext) {
7133
+ async getResolvedContext(conversationId, headers) {
7134
7134
  try {
7135
7135
  if (!this.config.contextConfigId) {
7136
7136
  logger17.debug({ graphId: this.config.graphId }, "No context config found for graph");
@@ -7154,7 +7154,7 @@ var Agent = class {
7154
7154
  const result = await this.contextResolver.resolve(contextConfig, {
7155
7155
  triggerEvent: "invocation",
7156
7156
  conversationId,
7157
- requestContext: requestContext || {},
7157
+ headers: headers || {},
7158
7158
  tenantId: this.config.tenantId
7159
7159
  });
7160
7160
  const contextWithBuiltins = {
@@ -9844,8 +9844,8 @@ var chatCompletionsRoute = createRoute({
9844
9844
  conversationId: z.string().optional().describe("Conversation ID for multi-turn chat"),
9845
9845
  tools: z.array(z.string()).optional().describe("Available tools"),
9846
9846
  runConfig: z.record(z.string(), z.unknown()).optional().describe("Run configuration"),
9847
- requestContext: z.record(z.string(), z.unknown()).optional().describe(
9848
- "Context data for template processing (validated against context config schema)"
9847
+ headers: z.record(z.string(), z.unknown()).optional().describe(
9848
+ "Headers data for template processing (validated against context config schema)"
9849
9849
  )
9850
9850
  })
9851
9851
  }
@@ -10003,14 +10003,14 @@ app2.openapi(chatCompletionsRoute, async (c) => {
10003
10003
  message: "Agent not found"
10004
10004
  });
10005
10005
  }
10006
- const validatedContext = c.get("validatedContext") || body.requestContext || {};
10006
+ const validatedContext = c.get("validatedContext") || body.headers || {};
10007
10007
  const credentialStores = c.get("credentialStores");
10008
10008
  await handleContextResolution({
10009
10009
  tenantId,
10010
10010
  projectId,
10011
10011
  graphId,
10012
10012
  conversationId,
10013
- requestContext: validatedContext,
10013
+ headers: validatedContext,
10014
10014
  dbClient: dbClient_default,
10015
10015
  credentialStores
10016
10016
  });
@@ -10023,7 +10023,7 @@ app2.openapi(chatCompletionsRoute, async (c) => {
10023
10023
  defaultAgentId,
10024
10024
  activeAgentId: activeAgent?.activeAgentId || "none",
10025
10025
  hasContextConfig: !!agentGraph.contextConfigId,
10026
- hasRequestContext: !!body.requestContext,
10026
+ hasHeaders: !!body.headers,
10027
10027
  hasValidatedContext: !!validatedContext,
10028
10028
  validatedContextKeys: Object.keys(validatedContext)
10029
10029
  },
@@ -10166,7 +10166,7 @@ var chatDataStreamRoute = createRoute({
10166
10166
  ),
10167
10167
  id: z$1.string().optional(),
10168
10168
  conversationId: z$1.string().optional(),
10169
- requestContext: z$1.record(z$1.string(), z$1.unknown()).optional().describe("Context data for template processing")
10169
+ headers: z$1.record(z$1.string(), z$1.unknown()).optional().describe("Headers data for template processing")
10170
10170
  })
10171
10171
  }
10172
10172
  }
@@ -10239,14 +10239,14 @@ app3.openapi(chatDataStreamRoute, async (c) => {
10239
10239
  message: "Agent not found"
10240
10240
  });
10241
10241
  }
10242
- const validatedContext = c.get("validatedContext") || body.requestContext || {};
10242
+ const validatedContext = c.get("validatedContext") || body.headers || {};
10243
10243
  const credentialStores = c.get("credentialStores");
10244
10244
  await handleContextResolution({
10245
10245
  tenantId,
10246
10246
  projectId,
10247
10247
  graphId,
10248
10248
  conversationId,
10249
- requestContext: validatedContext,
10249
+ headers: validatedContext,
10250
10250
  dbClient: dbClient_default,
10251
10251
  credentialStores
10252
10252
  });
@@ -10520,7 +10520,7 @@ var executeAgentQuery = async (executionContext, conversationId, query, defaultA
10520
10520
  ]
10521
10521
  };
10522
10522
  };
10523
- var getServer = async (requestContext, executionContext, conversationId, credentialStores) => {
10523
+ var getServer = async (headers, executionContext, conversationId, credentialStores) => {
10524
10524
  const { tenantId, projectId, graphId } = executionContext;
10525
10525
  setupTracing(conversationId, tenantId, graphId);
10526
10526
  const agentGraph = await getAgentGraphWithDefaultAgent(dbClient_default)({
@@ -10576,7 +10576,7 @@ var getServer = async (requestContext, executionContext, conversationId, credent
10576
10576
  projectId,
10577
10577
  graphId,
10578
10578
  conversationId,
10579
- requestContext,
10579
+ headers,
10580
10580
  dbClient: dbClient_default,
10581
10581
  credentialStores
10582
10582
  });
@@ -10587,7 +10587,7 @@ var getServer = async (requestContext, executionContext, conversationId, credent
10587
10587
  graphId,
10588
10588
  conversationId,
10589
10589
  hasContextConfig: !!agentGraph.contextConfigId,
10590
- hasRequestContext: !!requestContext,
10590
+ hasHeaders: !!headers,
10591
10591
  hasValidatedContext: !!resolvedContext
10592
10592
  },
10593
10593
  "parameters"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-run-api",
3
- "version": "0.0.0-dev-20251009010805",
3
+ "version": "0.0.0-dev-20251009020740",
4
4
  "description": "Agents Run API for Inkeep Agent Framework - handles chat, agent execution, and streaming",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "traverse": "^0.6.11",
52
52
  "ts-pattern": "^5.7.1",
53
53
  "zod": "^4.1.11",
54
- "@inkeep/agents-core": "^0.0.0-dev-20251009010805"
54
+ "@inkeep/agents-core": "^0.0.0-dev-20251009020740"
55
55
  },
56
56
  "optionalDependencies": {
57
57
  "keytar": "^7.9.0"