@inkeep/agents-run-api 0.0.0-dev-20250912230612 → 0.0.0-dev-20250912230752

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
@@ -327,17 +327,15 @@ var init_conversations = __esm({
327
327
  init_env();
328
328
  var maxExportBatchSize = env.OTEL_MAX_EXPORT_BATCH_SIZE ?? (env.ENVIRONMENT === "development" ? 1 : 512);
329
329
  var otlpExporter = new exporterTraceOtlpHttp.OTLPTraceExporter();
330
+ var batchProcessor = new sdkTraceBase.BatchSpanProcessor(otlpExporter, {
331
+ maxExportBatchSize
332
+ });
330
333
  var resource = resources.resourceFromAttributes({
331
334
  [semanticConventions.ATTR_SERVICE_NAME]: "inkeep-agents-run-api"
332
335
  });
333
336
  var sdk = new sdkNode.NodeSDK({
334
337
  resource,
335
- spanProcessors: [
336
- new baggageSpanProcessor.BaggageSpanProcessor(baggageSpanProcessor.ALLOW_ALL_BAGGAGE_KEYS),
337
- new sdkTraceBase.BatchSpanProcessor(otlpExporter, {
338
- maxExportBatchSize
339
- })
340
- ],
338
+ spanProcessors: [new baggageSpanProcessor.BaggageSpanProcessor(baggageSpanProcessor.ALLOW_ALL_BAGGAGE_KEYS), batchProcessor],
341
339
  instrumentations: [
342
340
  autoInstrumentationsNode.getNodeAutoInstrumentations({
343
341
  "@opentelemetry/instrumentation-http": {
@@ -9059,6 +9057,22 @@ function createExecutionHono(serverConfig, credentialStores) {
9059
9057
  app6.route("/v1/mcp", mcp_default);
9060
9058
  app6.route("/agents", agents_default);
9061
9059
  setupOpenAPIRoutes(app6);
9060
+ app6.use("/tenants/*", async (c, next) => {
9061
+ await next();
9062
+ await batchProcessor.forceFlush();
9063
+ });
9064
+ app6.use("/agents/*", async (c, next) => {
9065
+ await next();
9066
+ await batchProcessor.forceFlush();
9067
+ });
9068
+ app6.use("/v1/*", async (c, next) => {
9069
+ await next();
9070
+ await batchProcessor.forceFlush();
9071
+ });
9072
+ app6.use("/api/*", async (c, next) => {
9073
+ await next();
9074
+ await batchProcessor.forceFlush();
9075
+ });
9062
9076
  const baseApp = new hono.Hono();
9063
9077
  baseApp.route("/", app6);
9064
9078
  return baseApp;
package/dist/index.js CHANGED
@@ -34,17 +34,15 @@ import { toReqRes, toFetchResponse } from 'fetch-to-node';
34
34
 
35
35
  var maxExportBatchSize = env.OTEL_MAX_EXPORT_BATCH_SIZE ?? (env.ENVIRONMENT === "development" ? 1 : 512);
36
36
  var otlpExporter = new OTLPTraceExporter();
37
+ var batchProcessor = new BatchSpanProcessor(otlpExporter, {
38
+ maxExportBatchSize
39
+ });
37
40
  var resource = resourceFromAttributes({
38
41
  [ATTR_SERVICE_NAME]: "inkeep-agents-run-api"
39
42
  });
40
43
  var sdk = new NodeSDK({
41
44
  resource,
42
- spanProcessors: [
43
- new BaggageSpanProcessor(ALLOW_ALL_BAGGAGE_KEYS),
44
- new BatchSpanProcessor(otlpExporter, {
45
- maxExportBatchSize
46
- })
47
- ],
45
+ spanProcessors: [new BaggageSpanProcessor(ALLOW_ALL_BAGGAGE_KEYS), batchProcessor],
48
46
  instrumentations: [
49
47
  getNodeAutoInstrumentations({
50
48
  "@opentelemetry/instrumentation-http": {
@@ -8716,6 +8714,22 @@ function createExecutionHono(serverConfig, credentialStores) {
8716
8714
  app6.route("/v1/mcp", mcp_default);
8717
8715
  app6.route("/agents", agents_default);
8718
8716
  setupOpenAPIRoutes(app6);
8717
+ app6.use("/tenants/*", async (c, next) => {
8718
+ await next();
8719
+ await batchProcessor.forceFlush();
8720
+ });
8721
+ app6.use("/agents/*", async (c, next) => {
8722
+ await next();
8723
+ await batchProcessor.forceFlush();
8724
+ });
8725
+ app6.use("/v1/*", async (c, next) => {
8726
+ await next();
8727
+ await batchProcessor.forceFlush();
8728
+ });
8729
+ app6.use("/api/*", async (c, next) => {
8730
+ await next();
8731
+ await batchProcessor.forceFlush();
8732
+ });
8719
8733
  const baseApp = new Hono();
8720
8734
  baseApp.route("/", app6);
8721
8735
  return baseApp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-run-api",
3
- "version": "0.0.0-dev-20250912230612",
3
+ "version": "0.0.0-dev-20250912230752",
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",
@@ -43,7 +43,7 @@
43
43
  "traverse": "^0.6.11",
44
44
  "ts-pattern": "^5.7.1",
45
45
  "zod": "^4.1.5",
46
- "@inkeep/agents-core": "^0.0.0-dev-20250912230612"
46
+ "@inkeep/agents-core": "^0.0.0-dev-20250912230752"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@hono/vite-dev-server": "^0.20.1",