@inkeep/agents-work-apps 0.0.0-dev-20260212183554 → 0.0.0-dev-20260212190104

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/env.d.ts CHANGED
@@ -14,11 +14,11 @@ declare const envSchema: z.ZodObject<{
14
14
  pentest: "pentest";
15
15
  }>>;
16
16
  LOG_LEVEL: z.ZodDefault<z.ZodEnum<{
17
+ error: "error";
17
18
  trace: "trace";
18
19
  debug: "debug";
19
20
  info: "info";
20
21
  warn: "warn";
21
- error: "error";
22
22
  }>>;
23
23
  INKEEP_AGENTS_RUN_DATABASE_URL: z.ZodString;
24
24
  INKEEP_AGENTS_MANAGE_UI_URL: z.ZodOptional<z.ZodString>;
@@ -43,7 +43,7 @@ declare const envSchema: z.ZodObject<{
43
43
  declare const env: {
44
44
  NODE_ENV: "development" | "production" | "test";
45
45
  ENVIRONMENT: "development" | "production" | "test" | "pentest";
46
- LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
46
+ LOG_LEVEL: "error" | "trace" | "debug" | "info" | "warn";
47
47
  INKEEP_AGENTS_RUN_DATABASE_URL: string;
48
48
  INKEEP_AGENTS_MANAGE_UI_URL?: string | undefined;
49
49
  GITHUB_APP_ID?: string | undefined;
@@ -4,10 +4,10 @@ import "./routes/setup.js";
4
4
  import "./routes/tokenExchange.js";
5
5
  import { WebhookVerificationResult, verifyWebhookSignature } from "./routes/webhooks.js";
6
6
  import { Hono } from "hono";
7
- import * as hono_types6 from "hono/types";
7
+ import * as hono_types0 from "hono/types";
8
8
 
9
9
  //#region src/github/index.d.ts
10
- declare function createGithubRoutes(): Hono<hono_types6.BlankEnv, hono_types6.BlankSchema, "/">;
11
- declare const githubRoutes: Hono<hono_types6.BlankEnv, hono_types6.BlankSchema, "/">;
10
+ declare function createGithubRoutes(): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
11
+ declare const githubRoutes: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
12
12
  //#endregion
13
13
  export { GenerateInstallationAccessTokenResult, GenerateTokenError, GenerateTokenResult, GitHubAppConfig, InstallationAccessToken, InstallationInfo, LookupInstallationError, LookupInstallationForRepoResult, LookupInstallationResult, WebhookVerificationResult, clearConfigCache, createAppJwt, createGithubRoutes, determineStatus, fetchInstallationDetails, fetchInstallationRepositories, generateInstallationAccessToken, getGitHubAppConfig, getGitHubAppName, getStateSigningSecret, getWebhookSecret, githubRoutes, isGitHubAppConfigured, isGitHubAppNameConfigured, isStateSigningConfigured, isWebhookConfigured, lookupInstallationForRepo, validateGitHubAppConfigOnStartup, validateGitHubInstallFlowConfigOnStartup, validateGitHubWebhookConfigOnStartup, verifyWebhookSignature };
@@ -1,7 +1,7 @@
1
- import * as hono1 from "hono";
1
+ import * as hono0 from "hono";
2
2
 
3
3
  //#region src/github/mcp/auth.d.ts
4
- declare const githubMcpAuth: () => hono1.MiddlewareHandler<{
4
+ declare const githubMcpAuth: () => hono0.MiddlewareHandler<{
5
5
  Variables: {
6
6
  toolId: string;
7
7
  };
@@ -1,11 +1,11 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types5 from "hono/types";
2
+ import * as hono_types9 from "hono/types";
3
3
 
4
4
  //#region src/github/mcp/index.d.ts
5
5
  declare const app: Hono<{
6
6
  Variables: {
7
7
  toolId: string;
8
8
  };
9
- }, hono_types5.BlankSchema, "/">;
9
+ }, hono_types9.BlankSchema, "/">;
10
10
  //#endregion
11
11
  export { app as default };
@@ -672,40 +672,22 @@ const getServer = async (toolId) => {
672
672
  });
673
673
  return server;
674
674
  };
675
- const SERVER_CACHE_TTL_MS = 300 * 1e3;
676
- const SERVER_CACHE_MAX_SIZE = 100;
677
- const serverCache = /* @__PURE__ */ new Map();
678
- const getCachedServer = async (toolId) => {
679
- const cached = serverCache.get(toolId);
680
- if (cached && cached.expiresAt > Date.now()) {
681
- serverCache.delete(toolId);
682
- serverCache.set(toolId, cached);
683
- return cached.server;
684
- }
685
- serverCache.delete(toolId);
686
- const server = await getServer(toolId);
687
- serverCache.set(toolId, {
688
- server,
689
- expiresAt: Date.now() + SERVER_CACHE_TTL_MS
690
- });
691
- if (serverCache.size > SERVER_CACHE_MAX_SIZE) {
692
- const firstKey = serverCache.keys().next().value;
693
- if (firstKey !== void 0) serverCache.delete(firstKey);
694
- }
695
- return server;
696
- };
697
675
  const app = new Hono();
698
676
  app.use("/", githubMcpAuth());
699
677
  app.post("/", async (c) => {
700
678
  if (!process.env.GITHUB_APP_ID || !process.env.GITHUB_APP_PRIVATE_KEY) return c.json({ error: "GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY must be set" }, 500);
701
679
  const toolId = c.get("toolId");
702
680
  const body = await c.req.json();
703
- const server = await getCachedServer(toolId);
681
+ const server = await getServer(toolId);
704
682
  const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: void 0 });
705
- server.connect(transport);
683
+ await server.connect(transport);
706
684
  const { req, res } = toReqRes(c.req.raw);
707
- await transport.handleRequest(req, res, body);
708
- return toFetchResponse(res);
685
+ try {
686
+ await transport.handleRequest(req, res, body);
687
+ return toFetchResponse(res);
688
+ } finally {
689
+ await server.close();
690
+ }
709
691
  });
710
692
  app.delete("/", async (c) => {
711
693
  return c.json({
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types0 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/setup.d.ts
5
- declare const app: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types1 from "hono/types";
2
+ import * as hono_types3 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/tokenExchange.d.ts
5
- declare const app: Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types3 from "hono/types";
2
+ import * as hono_types5 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/webhooks.d.ts
5
5
  interface WebhookVerificationResult {
@@ -7,6 +7,6 @@ interface WebhookVerificationResult {
7
7
  error?: string;
8
8
  }
9
9
  declare function verifyWebhookSignature(payload: string, signature: string | undefined, secret: string): WebhookVerificationResult;
10
- declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
10
+ declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
11
11
  //#endregion
12
12
  export { WebhookVerificationResult, app as default, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-work-apps",
3
- "version": "0.0.0-dev-20260212183554",
3
+ "version": "0.0.0-dev-20260212190104",
4
4
  "description": "First party integrations for Inkeep Agents",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -32,7 +32,7 @@
32
32
  "hono": "^4.11.7",
33
33
  "jose": "^6.1.0",
34
34
  "minimatch": "^10.1.1",
35
- "@inkeep/agents-core": "0.0.0-dev-20260212183554"
35
+ "@inkeep/agents-core": "0.0.0-dev-20260212190104"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@hono/zod-openapi": "^1.1.5",