Skip to content

feat: restore slack gate config and label mcp profiles#188

Open
i-am-thor[bot] wants to merge 3 commits into
mainfrom
feat/restore-slack-private-channel-key
Open

feat: restore slack gate config and label mcp profiles#188
i-am-thor[bot] wants to merge 3 commits into
mainfrom
feat/restore-slack-private-channel-key

Conversation

@i-am-thor
Copy link
Copy Markdown
Contributor

@i-am-thor i-am-thor Bot commented Jun 5, 2026

Summary

  • restore as the independent gated-Slack admission key
  • keep MCP profile routing intact while removing Slack admission from profile membership
  • render explicit MCP profile selections in progress labels as

Testing

  • pnpm vitest run packages/common/src/workspace-config.test.ts packages/gateway/src/slack-channel-allowlist.test.ts packages/gateway/src/app.test.ts packages/gateway/src/service.test.ts packages/runner/src/prompt-stream.test.ts
  • pnpm typecheck

AI-generated — verify before acting. View Thor context

Co-authored-by: Son Dao <son.dao@katalon.com>
@i-am-thor
Copy link
Copy Markdown
Contributor Author

i-am-thor Bot commented Jun 5, 2026

Follow-up summary because the PR body dropped the backticked literals during shell quoting:

  • restore as the independent gated-Slack admission key
  • keep MCP profile routing intact while removing Slack admission from profile membership
  • render explicit MCP profile selections in progress labels as

Verification:

  • pnpm vitest run packages/common/src/workspace-config.test.ts packages/gateway/src/slack-channel-allowlist.test.ts packages/gateway/src/app.test.ts packages/gateway/src/service.test.ts packages/runner/src/prompt-stream.test.ts
  • pnpm typecheck

AI-generated — verify before acting. View Thor context

@i-am-thor
Copy link
Copy Markdown
Contributor Author

i-am-thor Bot commented Jun 5, 2026

Corrected summary:

  • restore slack.private_channel_allowlist as the independent gated-Slack admission key
  • keep MCP profile routing intact while removing Slack admission from profile membership
  • render explicit MCP profile selections in progress labels as mcp[PROFILE]

Verification:

  • pnpm vitest run packages/common/src/workspace-config.test.ts packages/gateway/src/slack-channel-allowlist.test.ts packages/gateway/src/app.test.ts packages/gateway/src/service.test.ts packages/runner/src/prompt-stream.test.ts
  • pnpm typecheck

AI-generated — verify before acting. View Thor context

Co-authored-by: Son Dao <son.dao@katalon.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR re-separates Slack admission gating from MCP credential routing by restoring a dedicated Slack gated-surface allowlist in workspace config, while making MCP “profiles” an explicit mcp --profile selection that never derives from Slack/repo/session context. It also improves observability by rendering chosen MCP profiles in runner progress labels and updates docs/tests to match the new contract.

Changes:

  • Replace profile-based Slack admission (profiles.<name>.channels[]) with slack.private_channel_allowlist[] gating for private/DM/shared Slack surfaces.
  • Make MCP profile routing explicit (mcp --profile NAME), remove session-derived profile inference, and disable global fallback when a profile is explicitly requested.
  • Update runner tool display labels and expand test coverage + documentation to reflect the new behavior.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Updates deployment + workspace-config documentation to reflect Slack allowlist + explicit MCP profiles.
packages/runner/src/prompt-stream.ts Adds MCP-specific display-name parsing and labels mcp[PROFILE] server in progress logs.
packages/runner/src/prompt-stream.test.ts Adds coverage for MCP tool display-name formatting.
packages/remote-cli/src/mcp-handler.ts Removes session-derived profile routing; parses explicit --profile and stores profile snapshots for approvals.
packages/remote-cli/src/mcp-handler.test.ts Updates/expands tests to assert explicit-profile routing, no session inference, and approval snapshot behavior.
packages/remote-cli/src/approval-store.ts Extends approval action origin schema to include a nullable stored MCP profile snapshot.
packages/gateway/src/slack-channel-gate.ts Switches gated-Slack admission checks from profile membership to private-channel allowlist.
packages/gateway/src/service.test.ts Updates Slack privacy dispatch planning tests to use the allowlist; adds a negative admission case.
packages/gateway/src/app.test.ts Renames/updates Slack admission tests from “profiled” to “allowlisted” semantics.
packages/common/src/workspace-config.ts Removes profiles schema/helpers; adds slack.private_channel_allowlist schema and helpers.
packages/common/src/workspace-config.test.ts Replaces profile tests with allowlist tests + duplicate validation.
packages/common/src/proxies.ts Enforces exact profile env resolution (no global fallback) and strict bundle requirements for profiled Grafana/Langfuse.
packages/common/src/proxies.test.ts Updates tests to assert “exact profile only” resolution and no fallback behavior.
packages/common/src/index.ts Updates public exports to remove profile helpers and export Slack allowlist helpers instead.
docs/slack.md Documents allowlist-based gated Slack admission and clarifies MCP profiles are explicit.
docs/feat/security-model.md Updates security model to reflect allowlist-based Slack gating and explicit MCP profiles + approval snapshots.
docs/feat/profile.md Rewrites profile documentation to “MCP profiles” (explicit CLI selection; exact env bundles).
docs/feat/event-flow.md Updates Slack event admission description and notes MCP profiles do not affect Slack admission.
docs/examples/thor.json Updates example workspace config to include slack.private_channel_allowlist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 13 to 17
origin: z
.object({
sessionId: z.string().min(1).optional(),
profile: z.string().min(1).nullable().optional(),
trigger: z
Co-authored-by: Son Dao <son.dao@katalon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants