@nordsym/apiclaw 1.0.0 → 1.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 (154) hide show
  1. package/AGENTS.md +74 -0
  2. package/HEARTBEAT.md +4 -0
  3. package/IDENTITY.md +22 -0
  4. package/README.md +197 -202
  5. package/SOUL.md +36 -0
  6. package/STATUS.md +237 -0
  7. package/TOOLS.md +36 -0
  8. package/USER.md +17 -0
  9. package/{backend/convex → convex}/_generated/api.d.ts +6 -6
  10. package/convex/credits.ts +211 -0
  11. package/convex/http.ts +490 -0
  12. package/convex/providers.ts +516 -0
  13. package/convex/purchases.ts +183 -0
  14. package/convex/schema.ts +180 -0
  15. package/convex.json +3 -0
  16. package/dist/credentials.d.ts +19 -0
  17. package/dist/credentials.d.ts.map +1 -0
  18. package/dist/credentials.js +158 -0
  19. package/dist/credentials.js.map +1 -0
  20. package/dist/credits.d.ts +14 -11
  21. package/dist/credits.d.ts.map +1 -1
  22. package/dist/credits.js +151 -99
  23. package/dist/credits.js.map +1 -1
  24. package/dist/discovery.d.ts +7 -16
  25. package/dist/discovery.d.ts.map +1 -1
  26. package/dist/discovery.js +33 -40
  27. package/dist/discovery.js.map +1 -1
  28. package/dist/execute.d.ts +19 -0
  29. package/dist/execute.d.ts.map +1 -0
  30. package/dist/execute.js +285 -0
  31. package/dist/execute.js.map +1 -0
  32. package/dist/index.js +106 -30
  33. package/dist/index.js.map +1 -1
  34. package/dist/proxy.d.ts +6 -0
  35. package/dist/proxy.d.ts.map +1 -0
  36. package/dist/proxy.js +19 -0
  37. package/dist/proxy.js.map +1 -0
  38. package/dist/registry/apis.json +95362 -202
  39. package/dist/registry/apis_expanded.json +100853 -0
  40. package/dist/stripe.d.ts +68 -0
  41. package/dist/stripe.d.ts.map +1 -0
  42. package/dist/stripe.js +196 -0
  43. package/dist/stripe.js.map +1 -0
  44. package/dist/test.d.ts +3 -2
  45. package/dist/test.d.ts.map +1 -1
  46. package/dist/test.js +105 -75
  47. package/dist/test.js.map +1 -1
  48. package/dist/types.d.ts +0 -28
  49. package/dist/types.d.ts.map +1 -1
  50. package/dist/webhook.d.ts +2 -0
  51. package/dist/webhook.d.ts.map +1 -0
  52. package/dist/webhook.js +90 -0
  53. package/dist/webhook.js.map +1 -0
  54. package/landing/DESIGN.md +343 -0
  55. package/landing/package-lock.json +1190 -40
  56. package/landing/package.json +5 -2
  57. package/landing/public/android-chrome-192x192.png +0 -0
  58. package/landing/public/android-chrome-512x512.png +0 -0
  59. package/landing/public/apple-touch-icon.png +0 -0
  60. package/landing/public/demo.gif +0 -0
  61. package/landing/public/demo.mp4 +0 -0
  62. package/landing/public/favicon-16x16.png +0 -0
  63. package/landing/public/favicon-32x32.png +0 -0
  64. package/landing/public/favicon.ico +0 -0
  65. package/landing/public/favicon.svg +3 -0
  66. package/landing/public/icon.svg +47 -0
  67. package/landing/public/logo-mono.svg +37 -0
  68. package/landing/public/logo-simple.svg +45 -0
  69. package/landing/public/logo.svg +84 -0
  70. package/landing/public/og-image.png +0 -0
  71. package/landing/public/og-template.html +184 -0
  72. package/landing/public/site.webmanifest +31 -0
  73. package/landing/scripts/generate-assets.js +284 -0
  74. package/landing/scripts/generate-pngs.js +48 -0
  75. package/landing/scripts/generate-stats.js +42 -0
  76. package/landing/src/app/admin/page.tsx +348 -0
  77. package/landing/src/app/api/auth/magic-link/route.ts +73 -0
  78. package/landing/src/app/api/auth/session/route.ts +38 -0
  79. package/landing/src/app/api/auth/verify/route.ts +43 -0
  80. package/landing/src/app/api/og/route.tsx +74 -0
  81. package/landing/src/app/globals.css +439 -100
  82. package/landing/src/app/layout.tsx +37 -9
  83. package/landing/src/app/page.tsx +640 -552
  84. package/landing/src/app/providers/dashboard/login/page.tsx +176 -0
  85. package/landing/src/app/providers/dashboard/page.tsx +589 -0
  86. package/landing/src/app/providers/dashboard/verify/page.tsx +106 -0
  87. package/landing/src/app/providers/layout.tsx +14 -0
  88. package/landing/src/app/providers/page.tsx +402 -0
  89. package/landing/src/app/providers/register/page.tsx +670 -0
  90. package/landing/src/components/ProviderDashboard.tsx +794 -0
  91. package/landing/src/hooks/useDashboardData.ts +99 -0
  92. package/landing/src/lib/apis.json +116054 -0
  93. package/landing/src/lib/convex-client.ts +106 -0
  94. package/landing/src/lib/mock-data.ts +285 -0
  95. package/landing/src/lib/stats.json +6 -0
  96. package/landing/tailwind.config.ts +12 -11
  97. package/landing/tsconfig.tsbuildinfo +1 -0
  98. package/package.json +21 -20
  99. package/scripts/SYMBOT-FIX.md +238 -0
  100. package/scripts/demo-simulation.py +177 -0
  101. package/scripts/expand-more.py +502 -0
  102. package/scripts/expand-registry.py +434 -0
  103. package/scripts/history-sanitizer.ts +272 -0
  104. package/scripts/mass-scrape.py +1308 -0
  105. package/scripts/sync-and-deploy.sh +36 -0
  106. package/src/credentials.ts +177 -0
  107. package/src/credits.ts +190 -122
  108. package/src/discovery.ts +45 -58
  109. package/src/execute.ts +350 -0
  110. package/src/index.ts +113 -31
  111. package/src/proxy.ts +24 -0
  112. package/src/registry/apis.json +95362 -202
  113. package/src/registry/apis_expanded.json +100853 -0
  114. package/src/stripe.ts +243 -0
  115. package/src/test.ts +127 -89
  116. package/src/types.ts +0 -34
  117. package/src/webhook.ts +107 -0
  118. package/.github/ISSUE_TEMPLATE/add-api.yml +0 -123
  119. package/BRIEFING.md +0 -30
  120. package/backend/convex/apiKeys.ts +0 -75
  121. package/backend/convex/purchases.ts +0 -74
  122. package/backend/convex/schema.ts +0 -45
  123. package/backend/convex/transactions.ts +0 -57
  124. package/backend/convex/users.ts +0 -94
  125. package/backend/package-lock.json +0 -521
  126. package/backend/package.json +0 -15
  127. package/dist/registry/parse_apis.py +0 -146
  128. package/dist/revenuecat.d.ts +0 -61
  129. package/dist/revenuecat.d.ts.map +0 -1
  130. package/dist/revenuecat.js +0 -166
  131. package/dist/revenuecat.js.map +0 -1
  132. package/dist/webhooks/revenuecat.d.ts +0 -48
  133. package/dist/webhooks/revenuecat.d.ts.map +0 -1
  134. package/dist/webhooks/revenuecat.js +0 -119
  135. package/dist/webhooks/revenuecat.js.map +0 -1
  136. package/docs/revenuecat-setup.md +0 -89
  137. package/landing/src/app/api/keys/route.ts +0 -71
  138. package/landing/src/app/api/log/route.ts +0 -37
  139. package/landing/src/app/api/stats/route.ts +0 -37
  140. package/landing/src/app/page.tsx.bak +0 -567
  141. package/landing/src/components/AddKeyModal.tsx +0 -159
  142. package/newsletter-template.html +0 -71
  143. package/outreach/OUTREACH-SYSTEM.md +0 -211
  144. package/outreach/email-template.html +0 -179
  145. package/outreach/targets.md +0 -133
  146. package/src/registry/parse_apis.py +0 -146
  147. package/src/revenuecat.ts +0 -239
  148. package/src/webhooks/revenuecat.ts +0 -187
  149. /package/{backend/convex → convex}/README.md +0 -0
  150. /package/{backend/convex → convex}/_generated/api.js +0 -0
  151. /package/{backend/convex → convex}/_generated/dataModel.d.ts +0 -0
  152. /package/{backend/convex → convex}/_generated/server.d.ts +0 -0
  153. /package/{backend/convex → convex}/_generated/server.js +0 -0
  154. /package/{backend/convex → convex}/tsconfig.json +0 -0
@@ -0,0 +1,177 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ APIClaw Demo Simulation
4
+ Creates a convincing terminal demo showing APIClaw in action.
5
+ For recording with asciinema.
6
+ """
7
+
8
+ import sys
9
+ import time
10
+ import json
11
+ import random
12
+
13
+ # ANSI colors
14
+ RESET = "\033[0m"
15
+ BOLD = "\033[1m"
16
+ DIM = "\033[2m"
17
+ CYAN = "\033[36m"
18
+ GREEN = "\033[32m"
19
+ YELLOW = "\033[33m"
20
+ MAGENTA = "\033[35m"
21
+ BLUE = "\033[34m"
22
+ WHITE = "\033[97m"
23
+ GRAY = "\033[90m"
24
+
25
+ def type_text(text, delay=0.03, newline=True):
26
+ """Simulate typing with variable speed."""
27
+ for char in text:
28
+ sys.stdout.write(char)
29
+ sys.stdout.flush()
30
+ # Vary speed slightly for realism
31
+ time.sleep(delay * random.uniform(0.5, 1.5))
32
+ if newline:
33
+ print()
34
+
35
+ def instant_print(text, newline=True):
36
+ """Print instantly (for command output)."""
37
+ if newline:
38
+ print(text)
39
+ else:
40
+ sys.stdout.write(text)
41
+ sys.stdout.flush()
42
+
43
+ def pause(seconds=0.5):
44
+ time.sleep(seconds)
45
+
46
+ def clear_screen():
47
+ print("\033[2J\033[H", end="")
48
+
49
+ def show_prompt():
50
+ sys.stdout.write(f"{GREEN}${RESET} ")
51
+ sys.stdout.flush()
52
+
53
+ def demo():
54
+ clear_screen()
55
+ pause(0.5)
56
+
57
+ # Scene 1: Show the problem
58
+ instant_print(f"{DIM}# The problem: Manual API integration is slow{RESET}")
59
+ pause(1)
60
+ instant_print(f"{DIM}# Let's fix that with APIClaw{RESET}")
61
+ pause(1.5)
62
+ print()
63
+
64
+ # Scene 2: Start MCP session
65
+ show_prompt()
66
+ type_text("npx @nordsym/apiclaw", delay=0.04)
67
+ pause(0.5)
68
+
69
+ instant_print(f"""
70
+ {CYAN}╔══════════════════════════════════════════════════════════════╗
71
+ ║ {BOLD}APIClaw{RESET}{CYAN} v1.0.0 — The API layer for autonomous agents ║
72
+ ║ {DIM}MCP Server ready • 4000+ APIs indexed{RESET}{CYAN} ║
73
+ ╚══════════════════════════════════════════════════════════════╝{RESET}
74
+ """)
75
+ pause(1)
76
+
77
+ # Scene 3: Agent query
78
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
79
+ instant_print(f"{MAGENTA}🤖 Agent:{RESET} {WHITE}\"I need to send SMS to Swedish phone numbers\"{RESET}")
80
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
81
+ pause(0.3)
82
+
83
+ instant_print(f"\n{YELLOW}⚡ discover_apis{RESET}")
84
+ instant_print(f'{DIM} query: "send SMS Swedish numbers"{RESET}')
85
+ pause(0.8)
86
+
87
+ # Scene 4: Results
88
+ instant_print(f"""
89
+ {GREEN}✓ Found 3 matching APIs:{RESET}
90
+
91
+ {BOLD}┌─────────────────────────────────────────────────────────────┐{RESET}
92
+ │ {CYAN}46elks{RESET} {GREEN}★★★★★{RESET} {DIM}(SE){RESET} │
93
+ │ Swedish SMS/Voice API • Real credentials available │
94
+ │ {DIM}Pricing: $0.03/SMS • Best for Sweden{RESET} │
95
+ ├─────────────────────────────────────────────────────────────┤
96
+ │ {CYAN}Twilio{RESET} {GREEN}★★★★☆{RESET} {DIM}(Global){RESET} │
97
+ │ Global SMS/Voice platform • 180+ countries │
98
+ │ {DIM}Pricing: $0.05/SMS • Great reliability{RESET} │
99
+ ├─────────────────────────────────────────────────────────────┤
100
+ │ {CYAN}Vonage{RESET} {GREEN}★★★★☆{RESET} {DIM}(Global){RESET} │
101
+ │ Enterprise communication APIs │
102
+ │ {DIM}Pricing: $0.04/SMS • Enterprise focus{RESET} │
103
+ └─────────────────────────────────────────────────────────────┘
104
+ """)
105
+ pause(1.5)
106
+
107
+ # Scene 5: Purchase
108
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
109
+ instant_print(f"{MAGENTA}🤖 Agent:{RESET} {WHITE}\"Purchase 46elks access for $10\"{RESET}")
110
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
111
+ pause(0.3)
112
+
113
+ instant_print(f"\n{YELLOW}⚡ purchase_access{RESET}")
114
+ instant_print(f'{DIM} api_id: "46elks", amount: $10{RESET}')
115
+ pause(0.5)
116
+
117
+ # Loading animation
118
+ for i in range(3):
119
+ sys.stdout.write(f"\r{DIM} Processing{'.' * (i+1)}{RESET} ")
120
+ sys.stdout.flush()
121
+ time.sleep(0.3)
122
+ print()
123
+ pause(0.3)
124
+
125
+ # Scene 6: Credentials received
126
+ instant_print(f"""
127
+ {GREEN}✓ Purchase complete!{RESET}
128
+
129
+ {BOLD}┌─────────────────────────────────────────────────────────────┐{RESET}
130
+ │ {GREEN}🔑 CREDENTIALS RECEIVED{RESET} │
131
+ ├─────────────────────────────────────────────────────────────┤
132
+ │ Provider: {CYAN}46elks{RESET} │
133
+ │ Type: Basic Auth │
134
+ │ Username: {WHITE}u8a7f3c2d1e9b4567{RESET} │
135
+ │ Password: {WHITE}••••••••••••••••{RESET} │
136
+ │ Credits: {GREEN}300 SMS{RESET} │
137
+ │ Expires: Never (pre-paid) │
138
+ ├─────────────────────────────────────────────────────────────┤
139
+ │ {DIM}Ready to use immediately. No signup required.{RESET} │
140
+ └─────────────────────────────────────────────────────────────┘
141
+ """)
142
+ pause(1.5)
143
+
144
+ # Scene 7: Agent uses API
145
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
146
+ instant_print(f"{MAGENTA}🤖 Agent:{RESET} {WHITE}\"Send SMS: Hello from APIClaw!\"{RESET}")
147
+ instant_print(f"{GRAY}─────────────────────────────────────────────────────────{RESET}")
148
+ pause(0.5)
149
+
150
+ instant_print(f"""
151
+ {GREEN}✓ SMS sent successfully{RESET}
152
+
153
+ {DIM}┌─────────────────────────────────────────────────────────────┐
154
+ │ To: +46705292583 │
155
+ │ Message: "Hello from APIClaw!" │
156
+ │ Status: delivered │
157
+ │ Cost: 1 credit (299 remaining) │
158
+ └─────────────────────────────────────────────────────────────┘{RESET}
159
+ """)
160
+ pause(1)
161
+
162
+ # Final message
163
+ instant_print(f"""
164
+ {CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{RESET}
165
+ {BOLD} APIClaw: From query to working API in 30 seconds.{RESET}
166
+ {CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{RESET}
167
+
168
+ {DIM}npx @nordsym/apiclaw{RESET} • {DIM}apiclaw.nordsym.com{RESET}
169
+ """)
170
+ pause(2)
171
+
172
+ if __name__ == "__main__":
173
+ try:
174
+ demo()
175
+ except KeyboardInterrupt:
176
+ print("\n")
177
+ sys.exit(0)