moeba-claude-channel 0.0.1 → 0.0.3

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.
@@ -177,16 +177,30 @@ function connectSSE(c, mcp) {
177
177
  if (eventType === 'message') {
178
178
  try {
179
179
  const event = JSON.parse(eventData);
180
+ const connId = event.connectionId || c.connectionId;
180
181
  const content = event.message?.text || '';
181
182
  const meta = {
182
183
  sender_email: event.senderEmail || '',
183
184
  sender_name: event.senderName || '',
184
- connection_id: event.connectionId || c.connectionId,
185
+ connection_id: connId,
185
186
  conversation_id: event.conversationId || '',
186
187
  };
187
188
  if (event.type === 'action') {
188
189
  meta.type = 'action';
189
190
  }
191
+ // Show progress indicator immediately so user sees typing
192
+ fetch(`${MOEBA_API_URL}/api/agent/send`, {
193
+ method: 'POST',
194
+ headers: {
195
+ 'Content-Type': 'application/json',
196
+ 'X-Moeba-Agent-Key': c.agentApiKey,
197
+ },
198
+ body: JSON.stringify({
199
+ connectionId: connId,
200
+ message: { text: 'Working on it...' },
201
+ type: 'progress',
202
+ }),
203
+ }).catch(() => { });
190
204
  mcp
191
205
  .notification({
192
206
  method: 'notifications/claude/channel',
@@ -245,7 +259,12 @@ When you receive a message:
245
259
  3. Send progress updates via moeba_progress while working on longer tasks
246
260
  4. Reply using moeba_reply with the connection_id from the message tag
247
261
 
248
- Keep replies concise and helpful. The user is chatting from a mobile app.`,
262
+ IMPORTANT: The user is on a mobile app and CANNOT approve terminal permissions.
263
+ - Prefer reading files (Read tool) over running commands (Bash) when possible
264
+ - Use Glob, Grep, and Read tools which don't need permission
265
+ - If you must run a command, warn the user it needs terminal approval
266
+ - NEVER get stuck silently — if something needs approval, send a moeba_reply explaining that the action requires terminal approval
267
+ - Keep replies concise — the user is on a small screen`,
249
268
  });
250
269
  // 3. Register tools
251
270
  mcp.setRequestHandler(ListToolsRequestSchema, async () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moeba-claude-channel",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Claude Code channel for Moeba — chat with Claude Code from the Moeba app",
5
5
  "type": "module",
6
6
  "main": "dist/moeba-channel.js",