@heyamiko/openclaw-plugin 0.1.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 (55) hide show
  1. package/README.md +200 -0
  2. package/contracts/channel-config.schema.json +87 -0
  3. package/contracts/platform-ack.schema.json +25 -0
  4. package/contracts/platform-events.schema.json +87 -0
  5. package/contracts/platform-outbound.schema.json +47 -0
  6. package/dist/index.d.ts +20 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +61 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/src/accounts.d.ts +30 -0
  11. package/dist/src/accounts.d.ts.map +1 -0
  12. package/dist/src/accounts.js +115 -0
  13. package/dist/src/accounts.js.map +1 -0
  14. package/dist/src/api.d.ts +13 -0
  15. package/dist/src/api.d.ts.map +1 -0
  16. package/dist/src/api.js +45 -0
  17. package/dist/src/api.js.map +1 -0
  18. package/dist/src/channel.d.ts +174 -0
  19. package/dist/src/channel.d.ts.map +1 -0
  20. package/dist/src/channel.js +140 -0
  21. package/dist/src/channel.js.map +1 -0
  22. package/dist/src/config-schema.d.ts +92 -0
  23. package/dist/src/config-schema.d.ts.map +1 -0
  24. package/dist/src/config-schema.js +17 -0
  25. package/dist/src/config-schema.js.map +1 -0
  26. package/dist/src/monitor.d.ts +19 -0
  27. package/dist/src/monitor.d.ts.map +1 -0
  28. package/dist/src/monitor.js +432 -0
  29. package/dist/src/monitor.js.map +1 -0
  30. package/dist/src/reply-prefix.d.ts +12 -0
  31. package/dist/src/reply-prefix.d.ts.map +1 -0
  32. package/dist/src/reply-prefix.js +8 -0
  33. package/dist/src/reply-prefix.js.map +1 -0
  34. package/dist/src/runtime.d.ts +57 -0
  35. package/dist/src/runtime.d.ts.map +1 -0
  36. package/dist/src/runtime.js +28 -0
  37. package/dist/src/runtime.js.map +1 -0
  38. package/dist/src/send.d.ts +8 -0
  39. package/dist/src/send.d.ts.map +1 -0
  40. package/dist/src/send.js +51 -0
  41. package/dist/src/send.js.map +1 -0
  42. package/dist/src/status.d.ts +19 -0
  43. package/dist/src/status.d.ts.map +1 -0
  44. package/dist/src/status.js +51 -0
  45. package/dist/src/status.js.map +1 -0
  46. package/dist/src/types.d.ts +79 -0
  47. package/dist/src/types.d.ts.map +1 -0
  48. package/dist/src/types.js +2 -0
  49. package/dist/src/types.js.map +1 -0
  50. package/openclaw.plugin.json +51 -0
  51. package/package.json +73 -0
  52. package/skills/amiko/SKILL.md +287 -0
  53. package/skills/amiko/cli.js +521 -0
  54. package/skills/amiko/lib.js +634 -0
  55. package/skills/composio/SKILL.md +102 -0
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: composio
3
+ description: Composio tools (Gmail, Google Calendar, Calendly, etc.) via Amiko platform MCP proxy on the Amiko web app
4
+ homepage: https://composio.dev
5
+ metadata: {"openclaw":{"emoji":"📧","mcp":{"url":"amiko-web-mcp"}}}
6
+ ---
7
+
8
+ # Composio Skill
9
+
10
+ This skill exposes **Composio** tools to your agent via the Amiko platform's MCP endpoint. The platform uses your twin-scoped Clawd token to obtain short-lived Composio sessions—no Composio API key is stored on this instance.
11
+
12
+ ## How it works
13
+
14
+ - The wrapper writes a `config/mcporter.json` file in the workspace that points the `composio` MCP server to the Amiko web app's endpoint `/api/agents/:id/mcp`.
15
+ - The endpoint is authenticated with a **Clawd twin token** sent in the `Authorization: Bearer ...` header, sourced from the workspace `.amiko.json`.
16
+ - **OpenClaw** (via mcporter) connects directly to this Amiko endpoint as an MCP server so the agent can use Composio tools.
17
+
18
+ ## MCP server URL
19
+
20
+ Use this URL in your OpenClaw MCP / mcp-bridge configuration (the wrapper will also write it into `config/mcporter.json`):
21
+
22
+ - **URL:** `https://platform.heyamiko.com/api/agents/<twinId>/mcp` (or your Amiko web base URL)
23
+
24
+ ## Available toolkits (examples)
25
+
26
+ Once connected, the agent can use tools from Composio toolkits such as:
27
+
28
+ - **Gmail** – Read, send, search email
29
+ - **Google Calendar** – List and create events
30
+ - **Slack** – Read and send messages
31
+ - **GitHub** – Repos, issues, PRs
32
+ - **Spotify** – Playback, playlists
33
+ - **Google Sheets** – Read and write spreadsheets
34
+ - **Calendly** – Scheduling and availability
35
+ - **Notion**, **Discord**, **Linear**, and others (depending on platform configuration)
36
+
37
+ Exact tools depend on which apps you've connected in the Amiko platform Composio integration.
38
+
39
+ ## Check connected services
40
+
41
+ To see which services are connected for this twin, call **COMPOSIO_SEARCH_TOOLS** with a relevant query. The response includes `toolkit_connection_statuses` with `has_active_connection` per toolkit:
42
+
43
+ ```bash
44
+ mcporter call composio.COMPOSIO_SEARCH_TOOLS queries='[{"use_case": "read emails", "known_fields": ""}]' session='{"generate_id": true}'
45
+ ```
46
+
47
+ Or for calendar: `queries='[{"use_case": "list calendar events", "known_fields": ""}]'`
48
+
49
+ The response lists each toolkit (gmail, googlesheets, googledrive, etc.) and whether it has an active connection. **Always use this** when the user asks what services/tools are connected.
50
+
51
+ ## Connect Gmail / Google Calendar / Calendly (user auth)
52
+
53
+ When the user wants to connect Gmail, Google Calendar, Calendly, or another app:
54
+
55
+ 1. **Get a session** – Call COMPOSIO_SEARCH_TOOLS first with a query for that app. Extract `session_id` from the response (e.g. `"mill"`). You MUST pass this `session_id` in all subsequent meta tool calls.
56
+
57
+ 2. **Initiate connection** – Call COMPOSIO_MANAGE_CONNECTIONS with the toolkit name(s) as a **JSON array**. Use single-quoted JSON for array parameters:
58
+
59
+ ```bash
60
+ mcporter call composio.COMPOSIO_MANAGE_CONNECTIONS toolkits='["gmail"]' session_id='mill'
61
+ ```
62
+
63
+ For multiple apps: `toolkits='["gmail","googledrive","calendly"]'`
64
+
65
+ **Important:** `toolkits` must be a JSON array string. Wrong: `toolkits="gmail"` or `toolkits=[gmail]`. Correct: `toolkits='["gmail"]'`.
66
+
67
+ 3. **Share the link** – The response includes `redirect_url` per toolkit. Show it to the user as a **clickable markdown link** and tell them to open it, complete OAuth, then reply when done.
68
+
69
+ 4. **Verify** – Do NOT execute any toolkit tools until the user confirms. Re-run COMPOSIO_SEARCH_TOOLS to verify `has_active_connection: true` for that toolkit.
70
+
71
+ Toolkit names: `gmail`, `googledrive`, `googlesheets`, `googlecalendar`, `calendly`, `slack`, `github`, etc. Use the exact identifiers returned by COMPOSIO_SEARCH_TOOLS.
72
+
73
+ ## Troubleshooting
74
+
75
+ - On 401/403 from Composio, the proxy clears its session cache; the next request will fetch a new session automatically.
76
+ - Read `skills/composio/SKILL.md` (this file) from the workspace for agent-facing documentation.
77
+
78
+ ## Using mcporter inside this container
79
+
80
+ This container includes the **mcporter** CLI preinstalled globally. When the Composio skill is deployed, a mcporter config file is created at **workspace `config/mcporter.json`** with the Composio MCP proxy registered as the named server **`composio`**. Run mcporter from the workspace directory (or with `--root` pointing at the workspace) so it picks up that config.
81
+
82
+ ### Use the named `composio` MCP server
83
+
84
+ - **List all configured servers (including composio):**
85
+ `mcporter list`
86
+ - **List Composio tools:**
87
+ `mcporter list composio`
88
+ - **Call a Composio tool:**
89
+ `mcporter call composio.tool_name arg:value`
90
+
91
+ Example:
92
+
93
+ ```bash
94
+ cd /data/.openclaw/workspace # main workspace (or workspace-{agentId} for other agent)
95
+ mcporter list composio
96
+ mcporter call composio.COMPOSIO_SEARCH_TOOLS queries='[{"use_case": "read emails"}]' session='{"generate_id": true}'
97
+ ```
98
+
99
+ **Meta tool calls:** COMPOSIO_SEARCH_TOOLS, COMPOSIO_MANAGE_CONNECTIONS, COMPOSIO_MULTI_EXECUTE_TOOL, etc. require `session_id` from a prior SEARCH_TOOLS response. For array parameters (e.g. `toolkits`), pass quoted JSON: `toolkits='["gmail"]'`.
100
+
101
+ Config location: `config/mcporter.json` in the workspace (created/updated when this skill is deployed). For more mcporter options (ad‑hoc URLs, OAuth, TypeScript clients), see the upstream MCPorter documentation.
102
+