{"slug": "channelstack-your-app-s-whole-world-on-localhost", "title": "Channelstack – Your app's whole world, on localhost", "summary": "Channelstack launched a local test harness that recreates Slack, GitHub, Linear, Notion, Resend, Gmail and Discord on a developer's machine, and also fakes OpenAI's API so the model behind an AI agent can be scripted. The tool delivers signed webhooks, real payload shapes and real IDs, letting developers script users and model responses, run their app through its real code path, and assert on what a person would see, including Slack block_actions, chat.startStream and assistant.threads events, GitHub X-Hub-Signature-256 redelivery, Linear AgentSessionEvent stop signals and Notion X-Notion-Signature payloads.", "body_md": "### Slack\n\nDMs, mentions, threads, buttons and the agent view, with progress streams rendered the way people see them.\n\n- Events API\n- block_actions\n- chat.startStream\n- assistant.threads\n- agent_session_stopped\n\nTest harness for Slack, GitHub, Linear, Notion, Resend, Gmail and Discord apps, and the model behind them\n\nchannelstack recreates **Slack, GitHub, Linear, Notion, Resend, Gmail and Discord** on your machine, for the bots, integrations and AI agents you build on them, and fakes OpenAI’s API for your agent’s model too. Script the people and what the model answers, let your app answer through its real code path, and assert on what a person would see. Signed webhooks, real payload shapes and real ids, with no changes to how your app works.\n\n``` js\nimport { expect, test } from \"vitest\";test(\"ships a PR from a Slack DM\", async ({ slack }) => {  const ana = await slack.createUser({ name: \"ana\" });  const dm = { to: slack.app };  const msg = await ana.say(\"@my-agent ship #812 to staging\", dm);  await expect(msg.thread).toHaveStatusText(/checking CI/);  const ask = await msg.thread.waitForReply({ from: \"my-agent\" });  await expect(ask).toHaveButton(\"Approve\");  await ana.click(\"Approve\", { message: ask });  await expect(msg.thread).toContainText(/Deployed/, { count: 1 });  await expect(msg.thread).not.toContainText(\"Thinking…\");});\n```\n\n**ana**  10:42 AM\n\n@my-agent ship #812 to staging\n\n**my-agent** APP 10:42 AM\n\nDeploy #812 to staging? CI passed 4 minutes ago, 2 files changed.\n\nApproveCancel\n\n**my-agent** APP 10:43 AM\n\nDeployed #812 to staging in 41s. ana approved it.\n\n`message.im` event to your app`block_actions` when Ana clicks Approve\n\n``` js\ntest(\"answers on the issue and ignores itself\", async ({ github }) => {  const mo = await github.createUser({ login: \"mo\" });  const repo = await github.createRepo({    collaborators: [mo],    apps: [github.app],  });  const issue = await mo.openIssue({ title: \"500s on Safari\" }, { repo });  const comment = await mo.comment(\"@my-agent take a look?\", { issue });  await expect(issue).toHaveCommentFrom(\"my-agent\", { text: /Safari/ });  // the same delivery again must not start a second run  await comment.delivery!.redeliver();  await expect(issue).toHaveCommentsFrom(\"my-agent\", { count: 1 });});\n```\n\n500s on Safari #1\n\n**mo** commented now\n\n@my-agent take a look?\n\n**my-agent** bot commented now\n\nReproduced on Safari 17: the session cookie is dropped on the redirect. A fix is on the way.\n\n**issue_comment** redelivered with the same GUID\n\n`apps`` X-Hub-Signature-256`\n\n``` js\ntest(\"Stop ends a working session\", async ({ linear }) => {  const kai = await linear.createUser({ name: \"Kai\" });  const team = await linear.createTeam({ key: \"ENG\", members: [kai] });  const issue = await kai.createIssue({ title: \"Migrate cron\" }, { team });  const session = await kai.delegate(linear.app, { issue });  await expect(session).toHaveActivity({ type: \"thought\" });  await kai.stop({ session });  await expect(session).toHaveSessionState(\"complete\");});\n```\n\nMigrate cron\n\nIn Progress*K*Kai*R*my-agent\n\nActivity\n\n*R***my-agent** AgentComplete\n\nReading the cron definitions in billing/cron.ts…\n\nKai stopped the session\n\n`AgentSessionEvent` in Linear’s current shape`prompted` event carrying the stop signal\n\n``` js\ntest(\"answers a mention in the same discussion\", async ({ notion }) => {  const ana = await notion.createUser({ name: \"Ana\" });  const page = await notion.createPage({    title: \"Roadmap\",    content: \"# Q1\\n- ship search\",    connections: [notion.app],  });  const comment = await ana.comment(\"@my-agent summarize\", { page });  const thread = comment.discussion;  await expect(thread).toHaveCommentFrom(\"my-agent\", { text: /search/ });  await expect(thread).toHaveCommentsFrom(\"my-agent\", { count: 1 });});\n```\n\nRoadmap\n\nQ1\n\n**Ana** Just now\n\n@my-agent summarize\n\n**my-agent** Just now\n\nQ1 has one goal: ship search.\n\n`X-Notion-Signature`` page.content_updated` batched the way Notion does\n\n``` js\ntest(\"answers once, even when Resend retries\", async ({ resend }) => {  const ana = await resend.createUser({ name: \"Ana\" });  const email = await ana.send({    to: [resend.app],    subject: \"Refund\",    text: \"Where is my refund for #4411?\",  });  const answer = await email.thread.waitForReply({ from: \"my-agent\" });  expect(answer.text).toMatch(/refund/i);  // Resend delivers the webhook again, with the same svix-id  await email.delivery!.redeliver();  await expect(email.thread).toHaveRepliesFrom(\"my-agent\", { count: 1 });});\n```\n\nRefund\n\n**Ana** <ana@example.com>9:14 AM\n\nto my-agent@acme.resend.app\n\nWhere is my refund for #4411?\n\n**my-agent** <my-agent@acme.resend.app>9:14 AM\n\nto ana@example.com\n\nYour refund for #4411 went out on Monday. It reaches your card within 5 days.\n\nResend delivered `email.received` again, with the same `svix-id`\n\n`email.received`, signed the Svix way` svix-id`\n\n``` js\ntest(\"answers in Ana's thread\", async ({ google }) => {  const ana = await google.createUser({ name: \"Ana\" });  const email = await ana.send({    to: [google.app],    subject: \"Invoice\",    text: \"Can you resend the March invoice?\",  });  const answer = await ana.waitForEmail({ from: google.app });  expect(answer.subject).toBe(\"Re: Invoice\");  expect(answer.thread.id).toBe(email.thread.id);  await expect(email.thread).toHaveRepliesFrom(\"my-agent\", { count: 1 });});\n```\n\nInvoice Inbox ×2 in this thread\n\n**my-agent** <my-agent@example.com>\n\nto me\n\nHere is the March invoice again, attached.\n\n`history.list` and `messages.get` from the mailbox`messages.send` by `threadId` and `In-Reply-To`\n\n``` js\ntest(\"answers a mention once, quoting it\", async ({ discord }) => {  const ana = await discord.createUser({ name: \"Ana\" });  const channel = await discord.createChannel({ name: \"support\", participants: [ana, discord.app] });  const msg = await ana.say(\"@my-agent why is the build red?\", { channel });  const answer = await msg.waitForReply({ from: \"my-agent\" });  expect(answer.replyTo).toBe(msg.id);  await expect(msg).toHaveRepliesFrom(\"my-agent\", { count: 1 });});\n```\n\n**Ana**  Today at 10:42 AM\n\n@my-agent why is the build red?\n\n**@Ana** why is the build red?\n\n**my-agent** APP Today at 10:42 AM\n\nThe lint step fails on main since 9:58: an unused import in api/routes.ts.\n\n`MESSAGE_CREATE` over the Gateway, with its content under `MESSAGE_CONTENT`\n\n``` js\ntest(\"answers from a tool call, once\", async ({ slack, openai }) => {  const ana = await slack.createUser({ name: \"Ana\" });  const channel = await slack.createChannel({ name: \"ops\", participants: [ana, slack.app] });  const ai = await openai.respond([    { toolCalls: [{ name: \"search_incidents\", arguments: { since: \"yesterday\" } }] },    \"Two incidents yesterday: the web deploy and a DNS blip.\",  ]);  const msg = await ana.say(\"@my-agent what broke yesterday?\", { channel });  await expect(ai).toHaveOfferedTool(\"search_incidents\");  await expect(ai).toHaveSentToolResult(\"search_incidents\", { text: /migration/ });  await expect(msg.thread).toHaveReplyFrom(\"my-agent\", { text: /DNS blip/ });  await expect(msg.thread).toHaveRepliesFrom(\"my-agent\", { count: 1 });  await expect(ai).toHaveAnswered({ times: 2 });  await expect(openai).not.toHaveSentSecrets();});\n```\n\n**ana**  9:30 AM\n\n@my-agent what broke yesterday?\n\n**my-agent** APP 9:30 AM\n\nTwo incidents yesterday: the web deploy and a DNS blip.\n\nModel calls`POST /v1/chat/completions`\n\nPASS2 calls, both scripted · no secrets sent\n\n`openai.localhost/v1`, from `OPENAI_BASE_URL`\nSeven platforms and the model, one API\n\nOne package fakes all seven, with the people, events and API calls apps actually use, and the OpenAI API your agent’s model runs on. Use one in a test, or several when your app spans them. Stripe comes next.\n\nApps with installations, signed deliveries with real GUIDs, and redelivery for dedupe tests.\n\nIssues, comments and their webhooks, and agent sessions end to end: delegation, prompts, activities and Stop.\n\nPages, databases and comments, with webhooks when someone mentions your integration.\n\nEmail agents: people email your agent, it reads the mail back and answers in their thread, with Svix-signed webhooks and Resend's test addresses.\n\nGmail agents: a watched mailbox, Pub/Sub pushes with tokens verifyIdToken checks, history to read, and answers sent in the thread.\n\nDiscord bots: a guild your bot hears over the Gateway, threads and DMs, and slash commands and buttons as Ed25519-signed interactions it answers within 3 seconds.\n\nThe model your agent runs on, scripted per test: text, streams, tool calls, errors and a slow first token, images, audio and built-in tools, on OpenAI’s API. A call no script answers fails the test.\n\nWhy channelstack\n\nIntegrations break in the gaps between systems: a webhook signed the wrong way, a payload shape that changed last month, a stray progress message nobody asserted on. channelstack closes those gaps.\n\n`channelstack env` points your app’s own SDKs at `slack.localhost`, `github.localhost` and friends, and its model at `openai.localhost`. Apps with hard-coded hosts use proxy mode instead: set `HTTPS_PROXY` and trust a CA that only that app sees.\n\nEvery response and webhook is checked against the providers’ own schemas: OpenAPI descriptions, GraphQL introspection and recorded traffic. When a platform changes, your build goes red instead of quietly wrong.\n\nWrite `ana.click(\"Approve\", { message })` instead of hand-building a `block_actions` body. People post, reply, review, delegate and press Stop, with correct signatures, retries and delivery IDs.\n\nStreams, status lines, edits and ephemeral messages render into one transcript. `toHaveRepliesFrom(…, { count: 1 })` catches the double post. `not.toContainText` catches the leftover “Thinking…” reply.\n\nHow it works\n\nYour test scripts the people. channelstack delivers what the platform would deliver, and your app answers with its real SDKs, into the same fake workspace your test reads back.\n\nCompared\n\nReal sandbox workspaces are slow, shared and flaky in CI. Mocks are fast but only prove your code matches your own guess. channelstack keeps the speed and drops the guessing.\n\n|  | Hand-written mocks | API emulators | Real sandbox workspace | channelstack | \n|---|---|---|---|---|\n| Your code unchanged | No | Base URL overrides | Yes | Yes: a base URL, or a proxy | \n| Platform calls your app | No | Some webhooks | Yes | Signed, retried, replayable | \n| Scripted people | No | No | Manual or second bot | Built in | \n| Payload shapes checked | No | No | They’re real | Against provider schemas | \n| Assert on what people see | No | Raw state | Screenshots | Rendered transcript | \n| Offline, parallel CI | Yes | Yes | No | Yes | \n| Same test against the real platform | No | No | Yes | Live mode | \n\nQuick start\n\nStep 1\n\nOne package: the server, the CLI, the UI and the test integrations.\n\n``` bash\n$ npm i -D channelstack\n```\n\nStep 2\n\nStart channelstack with where your app takes events, then start the app the way you always do, with channelstack’s environment.\n\n``` bash\n$ CHANNELSTACK_SLACK_WEBHOOK_URL=http://localhost:3000/slack/events npx channelstack$ npx channelstack env >> .env.local$ pnpm dev\n```\n\nStep 3\n\nAdd the plugin and run your tests as usual. A failure says what a person sees, and what the app left open.\n\nvitest.config.ts\n\n``` python\nimport channelstack from \"channelstack/vitest\";import { defineConfig } from \"vitest/config\";export default defineConfig({  plugins: [channelstack()],});\nbash\n$ npx vitest✓ deploy.test.ts (1) 2.7s\n```\n\n**Why “channelstack”?** Your app lives in a stack of channels: Slack, GitHub, Linear, Notion, Resend, Gmail, Discord. channelstack runs that whole stack on localhost, with the people in it and the model your agent runs on, so you can test the conversation end to end before your users have it.", "url": "https://wpnews.pro/news/channelstack-your-app-s-whole-world-on-localhost", "canonical_source": "https://channelstack.dev", "published_at": "2026-12-01 20:27:40+00:00", "updated_at": "2026-12-01 20:48:10.233718+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools", "artificial-intelligence"], "entities": ["Channelstack", "Slack", "GitHub", "Linear", "Notion", "Resend", "Gmail", "Discord"], "also_reported_by": [], "takeaway": "Channelstack lets developers test Slack, GitHub, Linear, Notion, Resend, Gmail and Discord bots and AI agents locally with signed webhooks and real payload shapes, including a faked OpenAI API for scripted model responses.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/channelstack-your-app-s-whole-world-on-localhost", "markdown": "https://wpnews.pro/news/channelstack-your-app-s-whole-world-on-localhost.md", "text": "https://wpnews.pro/news/channelstack-your-app-s-whole-world-on-localhost.txt", "jsonld": "https://wpnews.pro/news/channelstack-your-app-s-whole-world-on-localhost.jsonld"}}