@inkeep/agents-work-apps 0.0.0-dev-20260313014132 → 0.0.0-dev-20260315043702

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.ZodOptional<z.ZodString>;
24
24
  INKEEP_AGENTS_MANAGE_UI_URL: z.ZodOptional<z.ZodString>;
@@ -45,7 +45,7 @@ declare const envSchema: z.ZodObject<{
45
45
  declare const env: {
46
46
  NODE_ENV: "development" | "production" | "test";
47
47
  ENVIRONMENT: "development" | "production" | "test" | "pentest";
48
- LOG_LEVEL: "trace" | "debug" | "info" | "warn" | "error";
48
+ LOG_LEVEL: "error" | "trace" | "debug" | "info" | "warn";
49
49
  INKEEP_AGENTS_RUN_DATABASE_URL?: string | undefined;
50
50
  INKEEP_AGENTS_MANAGE_UI_URL?: string | undefined;
51
51
  GITHUB_APP_ID?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types5 from "hono/types";
2
+ import * as hono_types4 from "hono/types";
3
3
 
4
4
  //#region src/github/mcp/index.d.ts
5
5
  declare const app: Hono<{
@@ -8,6 +8,6 @@ declare const app: Hono<{
8
8
  tenantId: string;
9
9
  projectId: string;
10
10
  };
11
- }, hono_types5.BlankSchema, "/">;
11
+ }, hono_types4.BlankSchema, "/">;
12
12
  //#endregion
13
13
  export { app as default };
@@ -76,8 +76,8 @@ declare const ChangedFileSchema: z.ZodObject<{
76
76
  path: z.ZodString;
77
77
  status: z.ZodEnum<{
78
78
  added: "added";
79
- modified: "modified";
80
79
  removed: "removed";
80
+ modified: "modified";
81
81
  renamed: "renamed";
82
82
  copied: "copied";
83
83
  changed: "changed";
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types6 from "hono/types";
2
+ import * as hono_types9 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/setup.d.ts
5
- declare const app: Hono<hono_types6.BlankEnv, hono_types6.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types8 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/tokenExchange.d.ts
5
- declare const app: Hono<hono_types8.BlankEnv, hono_types8.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types7.BlankEnv, hono_types7.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 };
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types10 from "hono/types";
2
+ import * as hono_types3 from "hono/types";
3
3
 
4
4
  //#region src/slack/mcp/index.d.ts
5
5
  interface ChannelInfo {
@@ -18,6 +18,6 @@ declare const app: Hono<{
18
18
  tenantId: string;
19
19
  projectId: string;
20
20
  };
21
- }, hono_types10.BlankSchema, "/">;
21
+ }, hono_types3.BlankSchema, "/">;
22
22
  //#endregion
23
23
  export { ChannelInfo, app as default, pruneStaleChannelIds };
@@ -5,6 +5,7 @@ import { clearWorkspaceConnectionCache, computeWorkspaceConnectionId, deleteWork
5
5
  import { getSlackClient, getSlackTeamInfo, getSlackUserInfo } from "../services/client.js";
6
6
  import { getBotTokenForTeam, setBotTokenForTeam } from "../services/workspace-tokens.js";
7
7
  import "../services/index.js";
8
+ import { BOT_SCOPES_CSV } from "../slack-scopes.js";
8
9
  import { OpenAPIHono, z } from "@hono/zod-openapi";
9
10
  import { createWorkAppSlackWorkspace, isUniqueConstraintError, listWorkAppSlackWorkspacesByTenant } from "@inkeep/agents-core";
10
11
  import * as crypto$1 from "node:crypto";
@@ -89,30 +90,10 @@ app.openapi(createProtectedRoute({
89
90
  const { tenant_id: tenantId } = c.req.valid("query");
90
91
  const clientId = env.SLACK_CLIENT_ID;
91
92
  const redirectUri = `${env.SLACK_APP_URL}/work-apps/slack/oauth_redirect`;
92
- const botScopes = [
93
- "app_mentions:read",
94
- "channels:history",
95
- "channels:read",
96
- "chat:write",
97
- "chat:write.public",
98
- "commands",
99
- "files:write",
100
- "groups:history",
101
- "groups:read",
102
- "im:history",
103
- "im:read",
104
- "im:write",
105
- "team:read",
106
- "users:read",
107
- "users:read.email",
108
- "search:read.public",
109
- "search:read.files",
110
- "search:read.users"
111
- ].join(",");
112
93
  const state = createOAuthState(tenantId);
113
94
  const slackAuthUrl = new URL("https://slack.com/oauth/v2/authorize");
114
95
  slackAuthUrl.searchParams.set("client_id", clientId || "");
115
- slackAuthUrl.searchParams.set("scope", botScopes);
96
+ slackAuthUrl.searchParams.set("scope", BOT_SCOPES_CSV);
116
97
  slackAuthUrl.searchParams.set("redirect_uri", redirectUri);
117
98
  slackAuthUrl.searchParams.set("state", state);
118
99
  logger.info({
@@ -9,12 +9,12 @@ import { AgentOption } from "../modals.js";
9
9
  * Called on every @mention and /inkeep command — caching avoids redundant DB queries.
10
10
  */
11
11
  declare function findCachedUserMapping(tenantId: string, slackUserId: string, teamId: string, clientId?: string): Promise<{
12
+ slackUserId: string;
13
+ id: string;
12
14
  createdAt: string;
13
15
  updatedAt: string;
14
- id: string;
15
16
  tenantId: string;
16
17
  clientId: string;
17
- slackUserId: string;
18
18
  slackTeamId: string;
19
19
  slackEnterpriseId: string | null;
20
20
  inkeepUserId: string;
@@ -0,0 +1,35 @@
1
+ //#region src/slack/slack-app-manifest.json
2
+ var oauth_config = {
3
+ "redirect_urls": ["https://api.nango.dev/oauth/callback", "https://<YOUR_API_DOMAIN>/work-apps/slack/oauth_redirect"],
4
+ "scopes": {
5
+ "user": ["users:read", "users:read.email"],
6
+ "bot": [
7
+ "app_mentions:read",
8
+ "channels:history",
9
+ "channels:read",
10
+ "channels:join",
11
+ "chat:write",
12
+ "chat:write.public",
13
+ "commands",
14
+ "files:write",
15
+ "files:read",
16
+ "groups:history",
17
+ "groups:read",
18
+ "im:history",
19
+ "im:read",
20
+ "im:write",
21
+ "mpim:history",
22
+ "mpim:read",
23
+ "mpim:write",
24
+ "team:read",
25
+ "users:read",
26
+ "users:read.email",
27
+ "search:read.public",
28
+ "search:read.files",
29
+ "search:read.users"
30
+ ]
31
+ }
32
+ };
33
+
34
+ //#endregion
35
+ export { oauth_config };
@@ -0,0 +1,5 @@
1
+ //#region src/slack/slack-scopes.d.ts
2
+ declare const BOT_SCOPES: readonly string[];
3
+ declare const BOT_SCOPES_CSV: string;
4
+ //#endregion
5
+ export { BOT_SCOPES, BOT_SCOPES_CSV };
@@ -0,0 +1,8 @@
1
+ import { oauth_config } from "./slack-app-manifest.js";
2
+
3
+ //#region src/slack/slack-scopes.ts
4
+ const BOT_SCOPES = oauth_config.scopes.bot;
5
+ const BOT_SCOPES_CSV = BOT_SCOPES.join(",");
6
+
7
+ //#endregion
8
+ export { BOT_SCOPES, BOT_SCOPES_CSV };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-work-apps",
3
- "version": "0.0.0-dev-20260313014132",
3
+ "version": "0.0.0-dev-20260315043702",
4
4
  "description": "First party integrations for Inkeep Agents",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -33,7 +33,7 @@
33
33
  "jose": "^6.1.0",
34
34
  "minimatch": "^10.2.1",
35
35
  "slack-block-builder": "^2.8.0",
36
- "@inkeep/agents-core": "0.0.0-dev-20260313014132"
36
+ "@inkeep/agents-core": "0.0.0-dev-20260315043702"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@hono/zod-openapi": "^1.1.5",