@wahooks/channel 0.4.1 → 0.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +0 -26
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -130,7 +130,6 @@ const mcp = new Server({ name: "wahooks-channel", version: "0.1.0" }, {
130
130
  capabilities: {
131
131
  experimental: {
132
132
  "claude/channel": {},
133
- "claude/channel/permission": {},
134
133
  },
135
134
  tools: {},
136
135
  },
@@ -146,31 +145,6 @@ const mcp = new Server({ name: "wahooks-channel", version: "0.1.0" }, {
146
145
  const PERMISSION_RE = /^\s*(y|yes|n|no)\s+([a-km-z]{5})\s*$/i;
147
146
  // Track the last sender so we can forward permission requests
148
147
  let lastSender = "";
149
- // Listen for permission requests from Claude Code
150
- const PermissionRequestSchema = {
151
- method: "notifications/claude/channel/permission_request",
152
- };
153
- mcp.setNotificationHandler(PermissionRequestSchema, async (notification) => {
154
- const params = notification.params;
155
- if (!lastSender || !connectionId)
156
- return;
157
- // Forward the permission request to the WhatsApp user
158
- const msg = [
159
- `🔐 Claude wants to run: ${params.tool_name}`,
160
- `${params.description}`,
161
- ``,
162
- `Reply "yes ${params.request_id}" to allow or "no ${params.request_id}" to deny`,
163
- ].join("\n");
164
- try {
165
- await api("POST", `/connections/${connectionId}/send`, {
166
- chatId: `${lastSender}@s.whatsapp.net`,
167
- text: msg,
168
- });
169
- }
170
- catch {
171
- console.error("[wahooks-channel] Failed to forward permission request");
172
- }
173
- });
174
148
  // ─── Tools ──────────────────────────────────────────────────────────────
175
149
  mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
176
150
  tools: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wahooks/channel",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "WhatsApp channel for Claude Code — chat with Claude via WhatsApp",
5
5
  "type": "module",
6
6
  "bin": {