@inkeep/agents-work-apps 0.0.0-dev-20260309140034 → 0.0.0-dev-20260309140634
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/github/index.d.ts +3 -3
- package/dist/github/mcp/auth.d.ts +4 -2
- package/dist/github/mcp/auth.js +20 -0
- package/dist/github/mcp/index.d.ts +4 -2
- package/dist/github/mcp/index.js +9 -6
- package/dist/github/routes/setup.d.ts +2 -2
- package/dist/github/routes/tokenExchange.d.ts +2 -2
- package/dist/github/routes/webhooks.d.ts +2 -2
- package/dist/slack/mcp/auth.d.ts +2 -2
- package/dist/slack/mcp/index.d.ts +2 -2
- package/dist/slack/middleware/permissions.d.ts +3 -3
- package/dist/slack/services/events/utils.d.ts +2 -2
- package/dist/slack/services/link-prompt.d.ts +2 -2
- package/package.json +2 -2
package/dist/github/index.d.ts
CHANGED
|
@@ -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
|
|
7
|
+
import * as hono_types5 from "hono/types";
|
|
8
8
|
|
|
9
9
|
//#region src/github/index.d.ts
|
|
10
|
-
declare function createGithubRoutes(): Hono<
|
|
11
|
-
declare const githubRoutes: Hono<
|
|
10
|
+
declare function createGithubRoutes(): Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
|
|
11
|
+
declare const githubRoutes: Hono<hono_types5.BlankEnv, hono_types5.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,9 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono1 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/github/mcp/auth.d.ts
|
|
4
|
-
declare const githubMcpAuth: () =>
|
|
4
|
+
declare const githubMcpAuth: () => hono1.MiddlewareHandler<{
|
|
5
5
|
Variables: {
|
|
6
6
|
toolId: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
projectId: string;
|
|
7
9
|
};
|
|
8
10
|
}, string, {}, Response>;
|
|
9
11
|
//#endregion
|
package/dist/github/mcp/auth.js
CHANGED
|
@@ -13,6 +13,24 @@ const githubMcpAuth = () => createMiddleware(async (c, next) => {
|
|
|
13
13
|
name: "x-inkeep-tool-id"
|
|
14
14
|
} }
|
|
15
15
|
});
|
|
16
|
+
const tenantId = c.req.header("x-inkeep-tenant-id");
|
|
17
|
+
if (!tenantId) throw createApiError({
|
|
18
|
+
code: "unauthorized",
|
|
19
|
+
message: "Missing required header: x-inkeep-tenant-id",
|
|
20
|
+
extensions: { parameter: {
|
|
21
|
+
in: "header",
|
|
22
|
+
name: "x-inkeep-tenant-id"
|
|
23
|
+
} }
|
|
24
|
+
});
|
|
25
|
+
const projectId = c.req.header("x-inkeep-project-id");
|
|
26
|
+
if (!projectId) throw createApiError({
|
|
27
|
+
code: "unauthorized",
|
|
28
|
+
message: "Missing required header: x-inkeep-project-id",
|
|
29
|
+
extensions: { parameter: {
|
|
30
|
+
in: "header",
|
|
31
|
+
name: "x-inkeep-project-id"
|
|
32
|
+
} }
|
|
33
|
+
});
|
|
16
34
|
const authHeader = c.req.header("Authorization");
|
|
17
35
|
if (!authHeader) throw createApiError({
|
|
18
36
|
code: "unauthorized",
|
|
@@ -36,6 +54,8 @@ const githubMcpAuth = () => createMiddleware(async (c, next) => {
|
|
|
36
54
|
message: "Invalid API key"
|
|
37
55
|
});
|
|
38
56
|
c.set("toolId", toolId);
|
|
57
|
+
c.set("tenantId", tenantId);
|
|
58
|
+
c.set("projectId", projectId);
|
|
39
59
|
await next();
|
|
40
60
|
});
|
|
41
61
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types1 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
|
+
tenantId: string;
|
|
9
|
+
projectId: string;
|
|
8
10
|
};
|
|
9
|
-
},
|
|
11
|
+
}, hono_types1.BlankSchema, "/">;
|
|
10
12
|
//#endregion
|
|
11
13
|
export { app as default };
|
package/dist/github/mcp/index.js
CHANGED
|
@@ -27,11 +27,8 @@ const getAvailableRepositoryString = (repositoryAccess) => {
|
|
|
27
27
|
if (repositoryAccess.length === 0) return "No repositories available";
|
|
28
28
|
return `Available repositories: ${repositoryAccess.map((r) => `"${r.repositoryFullName}"`).join(", ")}`;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
const getServer = async (toolId) => {
|
|
34
|
-
const repositoryAccess = await getMcpToolRepositoryAccessWithDetails(runDbClient_default)(toolId);
|
|
30
|
+
const getServer = async (scope) => {
|
|
31
|
+
const repositoryAccess = await getMcpToolRepositoryAccessWithDetails(runDbClient_default)(scope);
|
|
35
32
|
const installationIdMap = /* @__PURE__ */ new Map();
|
|
36
33
|
for (const repo of repositoryAccess) installationIdMap.set(repo.repositoryFullName, repo.installationId);
|
|
37
34
|
if (repositoryAccess.length === 0) throw new Error("No repository access found for tool");
|
|
@@ -985,8 +982,14 @@ app.use("/", githubMcpAuth());
|
|
|
985
982
|
app.post("/", async (c) => {
|
|
986
983
|
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);
|
|
987
984
|
const toolId = c.get("toolId");
|
|
985
|
+
const tenantId = c.get("tenantId");
|
|
986
|
+
const projectId = c.get("projectId");
|
|
988
987
|
const body = await c.req.json();
|
|
989
|
-
const server = await getServer(
|
|
988
|
+
const server = await getServer({
|
|
989
|
+
tenantId,
|
|
990
|
+
projectId,
|
|
991
|
+
toolId
|
|
992
|
+
});
|
|
990
993
|
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: void 0 });
|
|
991
994
|
await server.connect(transport);
|
|
992
995
|
const { req, res } = toReqRes(c.req.raw);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types3 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/routes/setup.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types9 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/github/routes/tokenExchange.d.ts
|
|
5
|
-
declare const app: Hono<
|
|
5
|
+
declare const app: Hono<hono_types9.BlankEnv, hono_types9.BlankSchema, "/">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { app as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types0 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<
|
|
10
|
+
declare const app: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { WebhookVerificationResult, app as default, verifyWebhookSignature };
|
package/dist/slack/mcp/auth.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as hono2 from "hono";
|
|
2
2
|
|
|
3
3
|
//#region src/slack/mcp/auth.d.ts
|
|
4
|
-
declare const slackMcpAuth: () =>
|
|
4
|
+
declare const slackMcpAuth: () => hono2.MiddlewareHandler<{
|
|
5
5
|
Variables: {
|
|
6
6
|
toolId: string;
|
|
7
7
|
tenantId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono_types2 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
|
-
},
|
|
21
|
+
}, hono_types2.BlankSchema, "/">;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { ChannelInfo, app as default, pruneStaleChannelIds };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ManageAppVariables } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as hono0 from "hono";
|
|
3
3
|
|
|
4
4
|
//#region src/slack/middleware/permissions.d.ts
|
|
5
5
|
/**
|
|
@@ -14,7 +14,7 @@ declare const requireWorkspaceAdmin: <Env extends {
|
|
|
14
14
|
Variables: ManageAppVariables;
|
|
15
15
|
} = {
|
|
16
16
|
Variables: ManageAppVariables;
|
|
17
|
-
}>() =>
|
|
17
|
+
}>() => hono0.MiddlewareHandler<Env, string, {}, Response>;
|
|
18
18
|
/**
|
|
19
19
|
* Middleware that requires either:
|
|
20
20
|
* 1. Org admin/owner role (can modify any channel), OR
|
|
@@ -26,6 +26,6 @@ declare const requireChannelMemberOrAdmin: <Env extends {
|
|
|
26
26
|
Variables: ManageAppVariables;
|
|
27
27
|
} = {
|
|
28
28
|
Variables: ManageAppVariables;
|
|
29
|
-
}>() =>
|
|
29
|
+
}>() => hono0.MiddlewareHandler<Env, string, {}, Response>;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { isOrgAdmin, requireChannelMemberOrAdmin, requireWorkspaceAdmin };
|
|
@@ -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
|
-
id: string;
|
|
13
12
|
createdAt: string;
|
|
14
13
|
updatedAt: string;
|
|
15
|
-
|
|
14
|
+
id: string;
|
|
16
15
|
tenantId: string;
|
|
17
16
|
clientId: string;
|
|
17
|
+
slackUserId: string;
|
|
18
18
|
slackTeamId: string;
|
|
19
19
|
slackEnterpriseId: string | null;
|
|
20
20
|
inkeepUserId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SlackLinkIntent } from "@inkeep/agents-core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as slack_block_builder0 from "slack-block-builder";
|
|
3
3
|
|
|
4
4
|
//#region src/slack/services/link-prompt.d.ts
|
|
5
5
|
type LinkPromptResult = {
|
|
@@ -22,6 +22,6 @@ interface ResolveLinkActionParams {
|
|
|
22
22
|
intent?: SlackLinkIntent;
|
|
23
23
|
}
|
|
24
24
|
declare function resolveUnlinkedUserAction(params: ResolveLinkActionParams): Promise<LinkPromptResult>;
|
|
25
|
-
declare function buildLinkPromptMessage(result: LinkPromptResult): Readonly<
|
|
25
|
+
declare function buildLinkPromptMessage(result: LinkPromptResult): Readonly<slack_block_builder0.SlackMessageDto>;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { LinkPromptResult, ResolveLinkActionParams, buildLinkPromptMessage, resolveUnlinkedUserAction };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-work-apps",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260309140634",
|
|
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-
|
|
36
|
+
"@inkeep/agents-core": "0.0.0-dev-20260309140634"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@hono/zod-openapi": "^1.1.5",
|