@xquik/tweetclaw 1.6.5 → 1.6.7

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 (53) hide show
  1. package/README.md +22 -13
  2. package/dist/api-spec.d.ts +3 -0
  3. package/dist/api-spec.js +1427 -0
  4. package/dist/api-spec.js.map +1 -0
  5. package/dist/commands/xstatus.d.ts +17 -0
  6. package/dist/commands/xstatus.js +52 -0
  7. package/dist/commands/xstatus.js.map +1 -0
  8. package/dist/commands/xtrends.d.ts +16 -0
  9. package/dist/commands/xtrends.js +39 -0
  10. package/dist/commands/xtrends.js.map +1 -0
  11. package/dist/index.d.ts +107 -0
  12. package/dist/index.js +249 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/mpp.d.ts +7 -0
  15. package/dist/mpp.js +39 -0
  16. package/dist/mpp.js.map +1 -0
  17. package/dist/request.d.ts +7 -0
  18. package/dist/request.js +88 -0
  19. package/dist/request.js.map +1 -0
  20. package/dist/services/event-poller.d.ts +7 -0
  21. package/dist/services/event-poller.js +69 -0
  22. package/dist/services/event-poller.js.map +1 -0
  23. package/dist/tools/catalog.d.ts +17 -0
  24. package/dist/tools/catalog.js +110 -0
  25. package/dist/tools/catalog.js.map +1 -0
  26. package/dist/tools/explore.d.ts +5 -0
  27. package/dist/tools/explore.js +28 -0
  28. package/dist/tools/explore.js.map +1 -0
  29. package/dist/tools/result.d.ts +5 -0
  30. package/dist/tools/result.js +15 -0
  31. package/dist/tools/result.js.map +1 -0
  32. package/dist/tools/tweetclaw.d.ts +13 -0
  33. package/dist/tools/tweetclaw.js +62 -0
  34. package/dist/tools/tweetclaw.js.map +1 -0
  35. package/dist/truncate.d.ts +3 -0
  36. package/dist/truncate.js +25 -0
  37. package/dist/truncate.js.map +1 -0
  38. package/dist/types.d.ts +64 -0
  39. package/dist/types.js +2 -0
  40. package/dist/types.js.map +1 -0
  41. package/openclaw.plugin.json +7 -8
  42. package/package.json +19 -18
  43. package/skills/tweetclaw/SKILL.md +33 -42
  44. package/src/api-spec.ts +480 -12
  45. package/src/index.ts +135 -36
  46. package/src/mpp.ts +9 -11
  47. package/src/request.ts +27 -2
  48. package/src/tools/catalog.ts +145 -0
  49. package/src/tools/explore.ts +18 -44
  50. package/src/tools/result.ts +19 -0
  51. package/src/tools/tweetclaw.ts +49 -296
  52. package/src/types.ts +19 -0
  53. package/src/tools/executor.ts +0 -125
package/README.md CHANGED
@@ -50,12 +50,12 @@ Source: [official X API pricing](https://docs.x.com/x-api/getting-started/pricin
50
50
 
51
51
  Two options:
52
52
 
53
- - **Credits**: Top up credits via the API. 1 credit = $0.00015. Works with all 113 endpoints.
53
+ - **Credits**: Top up credits in the Xquik dashboard. The plugin can read the current balance.
54
54
  - **MPP**: 32 read-only X-API endpoints accept anonymous on-chain payments via Machine Payments Protocol. No account needed. SDK: `npm i mppx viem`.
55
55
 
56
56
  ### Free Operations
57
57
 
58
- Tweet composition, style analysis, drafts, curated radar (7 sources), account management, support tickets - all free, no credits consumed.
58
+ Tweet composition, style analysis, drafts, curated radar (7 sources), and account status checks are free.
59
59
 
60
60
  ## Install
61
61
 
@@ -67,7 +67,7 @@ openclaw plugins install @xquik/tweetclaw
67
67
 
68
68
  ## Configure
69
69
 
70
- ### Option A: API key (full access, 113 endpoints)
70
+ ### Option A: API key (account-backed X automation)
71
71
 
72
72
  Get an API key at [dashboard.xquik.com](https://dashboard.xquik.com/). Store it in an environment variable and configure TweetClaw to use it:
73
73
 
@@ -79,7 +79,7 @@ openclaw config set plugins.entries.tweetclaw.config.apiKey "$XQUIK_API_KEY"
79
79
 
80
80
  ### Option B: Credits (pay-per-use, no subscription)
81
81
 
82
- Top up credits from the Xquik dashboard or via `POST /credits/topup`. All 113 endpoints available. 1 credit = $0.00015.
82
+ Top up credits from the Xquik dashboard. TweetClaw does not create checkout sessions or charge saved payment methods from the agent.
83
83
 
84
84
  ### Option C: MPP pay-per-use (no account needed, 32 read-only endpoints)
85
85
 
@@ -94,6 +94,14 @@ openclaw config set plugins.entries.tweetclaw.config.tempoSigningKey "$MPP_SIGNI
94
94
 
95
95
  MPP-eligible endpoints: tweet lookup ($0.00015), tweet search ($0.00015/tweet), user lookup ($0.00015), user tweets ($0.00015/tweet), follower check ($0.00105), article lookup ($0.00105), media download ($0.00015/media), trends ($0.00045), X trends ($0.00045), quotes ($0.00015/tweet), replies ($0.00015/tweet), retweeters ($0.00015/user), favoriters ($0.00015/user), thread ($0.00015/tweet), user likes ($0.00015/tweet), user media ($0.00015/tweet), community info ($0.00015), community members ($0.00015/user), community moderators ($0.00015/user), community tweets ($0.00015/tweet), community search ($0.00015/community), communities tweets ($0.00015/tweet), list followers ($0.00015/user), list members ($0.00015/user), list tweets ($0.00015/tweet), users batch ($0.00015/user), users search ($0.00015/user), user followers ($0.00015/user), followers you know ($0.00015/user), user following ($0.00015/user), user mentions ($0.00015/tweet), verified followers ($0.00015/user).
96
96
 
97
+ ### Enable the optional action tool
98
+
99
+ OpenClaw loads `explore` as the safe catalog tool. The live endpoint invoker, `tweetclaw`, is registered as an optional tool because it can perform paid reads, private reads, and write actions. If OpenClaw does not expose it after installation, add it to `tools.allow`:
100
+
101
+ ```bash
102
+ openclaw config set tools.allow '["tweetclaw"]'
103
+ ```
104
+
97
105
  ### Optional settings
98
106
 
99
107
  ```bash
@@ -103,7 +111,7 @@ openclaw config set plugins.entries.tweetclaw.config.pollingInterval 60
103
111
 
104
112
  ## Tools
105
113
 
106
- TweetClaw uses Xquik's 2-tool approach to cover the entire API:
114
+ TweetClaw uses 2 structured tools for the agent-safe endpoint catalog:
107
115
 
108
116
  ### `explore` (free, no network)
109
117
 
@@ -116,11 +124,13 @@ AI uses explore → filters spec by category "composition"
116
124
  → Returns matching endpoints with parameters and response shapes
117
125
  ```
118
126
 
119
- ### `tweetclaw` (execute API calls)
127
+ ### `tweetclaw` (invoke API endpoints)
128
+
129
+ Invoke catalog-listed API endpoints with structured `path`, `method`, `query`, and `body` fields. Auth is injected automatically - the LLM never sees your API key.
120
130
 
121
- Execute authenticated API calls. Auth is injected automatically - the LLM never sees your API key.
131
+ This tool is optional in OpenClaw. Add `tweetclaw` to `tools.allow` if your installation keeps optional tools disabled.
122
132
 
123
- OpenClaw approval prompts are enforced before write-like `tweetclaw` tool calls. Review the generated code before approving any post, delete, follow, DM, monitor, extraction, webhook, checkout, or profile-change action.
133
+ OpenClaw approval prompts are enforced before write-like `tweetclaw` tool calls. Review the structured request before approving any post, delete, follow, DM, monitor, extraction, webhook, or profile-change action.
124
134
 
125
135
  ```
126
136
  You: "Post a tweet saying 'Hello from TweetClaw!'"
@@ -161,19 +171,18 @@ You: "Monitor @elonmusk for new tweets, replies, and retweets"
161
171
 
162
172
  ## API Coverage
163
173
 
164
- 113 endpoints across 10 categories:
174
+ 99 agent-callable endpoints across 9 categories. Dashboard-only account-admin, billing, support, and raw credential flows are excluded from the tool catalog and blocked at runtime.
165
175
 
166
176
  | Category | Examples | Cost |
167
177
  |----------|---------|------|
168
- | **Account** | Account settings, API keys, subscription | Free |
178
+ | **Account** | Account status | Free |
169
179
  | **Composition** | Compose, drafts, writing styles, radar | Free / Mixed |
170
- | **Credits** | Check balance, top up credits | Free |
180
+ | **Credits** | Check balance | Free |
171
181
  | **Extraction** | 23 extraction tools, giveaway draws, exports | 1-5 credits/result |
172
182
  | **Media** | Upload media via URL, download tweet media, get gallery links | 1-2 credits |
173
183
  | **Monitoring** | Create monitors, view events, manage webhooks | Free |
174
- | **Support** | Create tickets, reply, track status | Free |
175
184
  | **Twitter** | Search, lookups, timelines, articles, trends, bookmarks, notifications | 1-5 credits |
176
- | **X Accounts** | List, inspect, and disconnect connected accounts | Free |
185
+ | **X Accounts** | List connected account handles for explicit user-selected actions | Free |
177
186
  | **X Write** | Post, reply, like, retweet, follow, remove follower, DM, profile, communities | 10 credits |
178
187
 
179
188
  ## Links
@@ -0,0 +1,3 @@
1
+ import type { EndpointInfo } from './types.js';
2
+ declare const API_SPEC: readonly EndpointInfo[];
3
+ export { API_SPEC };