opencode-puter-auth 1.0.33 → 1.0.35

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.
package/README.md CHANGED
@@ -5,32 +5,53 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
  [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/chindrismihai)
7
7
 
8
- > **FREE, UNLIMITED access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini, DeepSeek, and 500+ AI models** through Puter.com's revolutionary "User-Pays" model.
8
+ > Access Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini, DeepSeek, and 500+ AI models through Puter.com OAuth. No API keys needed - free tier available with undocumented limits.
9
9
 
10
- Enable OpenCode to authenticate with [Puter.com](https://puter.com) via OAuth, giving you unlimited access to the world's best AI coding models - **completely free**.
10
+ Enable OpenCode to authenticate with [Puter.com](https://puter.com) via OAuth, giving you access to premium AI models through your Puter account. Ideal for app developers using the "User-Pays" model where each user covers their own AI costs.
11
11
 
12
12
  ## What You Get
13
13
 
14
- - **FREE, UNLIMITED Claude Opus 4.5** - The best coding AI model in the world
15
- - **FREE, UNLIMITED Claude Sonnet 4.5** - Fast, powerful reasoning
16
- - **FREE, UNLIMITED GPT-5.2, o3-mini, o4-mini** - OpenAI's latest models
17
- - **FREE, UNLIMITED Gemini 2.5 Pro** - 1M context window
18
- - **FREE, UNLIMITED DeepSeek R1** - Advanced reasoning model
14
+ - **Claude Opus 4.5, Sonnet 4.5** - Best coding AI models
15
+ - **GPT-5.2, o3-mini, o4-mini** - OpenAI's latest models
16
+ - **Gemini 2.5 Pro** - 1M context window
17
+ - **DeepSeek R1** - Advanced reasoning model
19
18
  - **500+ More Models** - Mistral, Llama, Grok, and more
20
- - **No Rate Limits** - Puter's "User-Pays" model means truly unlimited usage
21
19
  - **Real-time SSE Streaming** - Full streaming support
22
20
  - **Tool Calling** - Native function calling support
23
21
  - **Vision Support** - Image analysis capabilities
24
22
 
25
23
  ## How It Works
26
24
 
27
- Puter.com uses the innovative **"User-Pays" model**:
25
+ Puter.com uses a **"User-Pays" model**:
28
26
 
29
- 1. **You (the developer)** pay nothing for infrastructure
30
- 2. **Users** cover their own AI usage costs through their Puter account
31
- 3. **For personal use**, you ARE the user - so it's FREE for you!
27
+ 1. **No API keys** - Just sign in with your Puter account
28
+ 2. **Users pay their own usage** - Each Puter account has its own credit allocation
29
+ 3. **Free tier available** - New accounts get free credits to start
30
+ 4. **Credits run out** - When exhausted, you pay Puter directly or create a new account
32
31
 
33
- This means whether you have 1 or 1 million users, you pay $0 for AI infrastructure.
32
+ > **Important Reality Check:** Puter's marketing says "Free, Unlimited" but this is misleading. In practice:
33
+ > - Free tier limits exist but are **undocumented** ([GitHub Issue #1704](https://github.com/HeyPuter/puter/issues/1704))
34
+ > - Users report limits trigger after "minimal usage" ([GitHub Issue #1291](https://github.com/HeyPuter/puter/issues/1291))
35
+ > - When limits hit, you'll see: `"usage-limited-chat": Permission denied`
36
+
37
+ ## Understanding the "User-Pays" Model
38
+
39
+ ### For App Developers (Building apps for others)
40
+ **Great fit!** Your infrastructure cost is $0. Each of YOUR users authenticates with their OWN Puter account and pays for their own AI usage.
41
+
42
+ ### For Personal/Development Use (Using it yourself)
43
+ **Caution:** When YOU use this plugin during development, YOU are the user. YOUR Puter account's free tier gets consumed. Based on community reports, the free tier is limited and undocumented.
44
+
45
+ ### Free Tier Reality
46
+
47
+ | Aspect | What Puter Claims | What Actually Happens |
48
+ |--------|-------------------|----------------------|
49
+ | **Pricing** | "Free, Unlimited" | Free tier exists but has limits |
50
+ | **Limits** | "No usage restrictions" | Undocumented limits trigger unexpectedly |
51
+ | **Documentation** | Not specified | Limits are not publicly documented |
52
+ | **When exceeded** | Not mentioned | Error: `usage-limited-chat: Permission denied` |
53
+
54
+ **Estimated free tier:** ~100 requests/day (unconfirmed, based on third-party reports)
34
55
 
35
56
  ## Installation
36
57
 
@@ -55,65 +76,65 @@ https://raw.githubusercontent.com/Mihai-Codes/opencode-puter-auth/main/README.md
55
76
  "provider": {
56
77
  "puter": {
57
78
  "npm": "opencode-puter-auth",
58
- "name": "Puter.com (FREE Unlimited AI)",
79
+ "name": "Puter.com (500+ AI Models)",
59
80
  "models": {
60
81
  "claude-opus-4-5": {
61
- "name": "Claude Opus 4.5 (FREE via Puter)",
82
+ "name": "Claude Opus 4.5 (via Puter)",
62
83
  "limit": { "context": 200000, "output": 64000 },
63
84
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
64
85
  },
65
86
  "claude-sonnet-4-5": {
66
- "name": "Claude Sonnet 4.5 (FREE via Puter)",
87
+ "name": "Claude Sonnet 4.5 (via Puter)",
67
88
  "limit": { "context": 200000, "output": 64000 },
68
89
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
69
90
  },
70
91
  "claude-sonnet-4": {
71
- "name": "Claude Sonnet 4 (FREE via Puter)",
92
+ "name": "Claude Sonnet 4 (via Puter)",
72
93
  "limit": { "context": 200000, "output": 64000 },
73
94
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
74
95
  },
75
96
  "claude-haiku-4-5": {
76
- "name": "Claude Haiku 4.5 (FREE via Puter - Fast)",
97
+ "name": "Claude Haiku 4.5 (via Puter - Fast)",
77
98
  "limit": { "context": 200000, "output": 64000 },
78
99
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
79
100
  },
80
101
  "gpt-5.2": {
81
- "name": "GPT-5.2 (FREE via Puter)",
102
+ "name": "GPT-5.2 (via Puter)",
82
103
  "limit": { "context": 128000, "output": 32768 },
83
104
  "modalities": { "input": ["text", "image"], "output": ["text"] }
84
105
  },
85
106
  "gpt-4.1-nano": {
86
- "name": "GPT-4.1 Nano (FREE via Puter - Ultra Fast)",
107
+ "name": "GPT-4.1 Nano (via Puter - Ultra Fast)",
87
108
  "limit": { "context": 128000, "output": 16384 },
88
109
  "modalities": { "input": ["text", "image"], "output": ["text"] }
89
110
  },
90
111
  "gpt-4o": {
91
- "name": "GPT-4o (FREE via Puter)",
112
+ "name": "GPT-4o (via Puter)",
92
113
  "limit": { "context": 128000, "output": 16384 },
93
114
  "modalities": { "input": ["text", "image"], "output": ["text"] }
94
115
  },
95
116
  "o3-mini": {
96
- "name": "o3-mini (FREE via Puter - Reasoning)",
117
+ "name": "o3-mini (via Puter - Reasoning)",
97
118
  "limit": { "context": 128000, "output": 32768 },
98
119
  "modalities": { "input": ["text"], "output": ["text"] }
99
120
  },
100
121
  "o4-mini": {
101
- "name": "o4-mini (FREE via Puter - Reasoning)",
122
+ "name": "o4-mini (via Puter - Reasoning)",
102
123
  "limit": { "context": 128000, "output": 32768 },
103
124
  "modalities": { "input": ["text"], "output": ["text"] }
104
125
  },
105
126
  "deepseek-r1": {
106
- "name": "DeepSeek R1 (FREE via Puter - Reasoning)",
127
+ "name": "DeepSeek R1 (via Puter - Reasoning)",
107
128
  "limit": { "context": 128000, "output": 32768 },
108
129
  "modalities": { "input": ["text"], "output": ["text"] }
109
130
  },
110
131
  "google/gemini-2.5-pro": {
111
- "name": "Gemini 2.5 Pro (FREE via Puter - 1M Context)",
132
+ "name": "Gemini 2.5 Pro (via Puter - 1M Context)",
112
133
  "limit": { "context": 1000000, "output": 65536 },
113
134
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
114
135
  },
115
136
  "google/gemini-2.5-flash": {
116
- "name": "Gemini 2.5 Flash (FREE via Puter)",
137
+ "name": "Gemini 2.5 Flash (via Puter)",
117
138
  "limit": { "context": 1000000, "output": 65536 },
118
139
  "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
119
140
  }
@@ -128,7 +149,7 @@ https://raw.githubusercontent.com/Mihai-Codes/opencode-puter-auth/main/README.md
128
149
  ```bash
129
150
  opencode auth login
130
151
  # Select "Puter" provider
131
- # Select "Puter.com (FREE Unlimited AI)"
152
+ # Select "Puter.com (500+ AI Models)"
132
153
  # Complete OAuth in browser
133
154
  ```
134
155
 
@@ -227,25 +248,114 @@ The plugin adds these tools to OpenCode:
227
248
  - **`puter-models`** - List all available Puter models
228
249
  - **`puter-account`** - Show current account info
229
250
 
230
- ## Comparison: Puter vs Antigravity
251
+ ## Comparison: Puter vs Antigravity vs Alternatives
252
+
253
+ | Feature | Puter | Antigravity | Netlify AI Gateway |
254
+ |---------|-------|-------------|-------------------|
255
+ | **Free Quota** | Undocumented limits | ~300K tokens/day | 300 credits/mo |
256
+ | **Limits Documented?** | No | Unofficial | Yes |
257
+ | **Claude Opus 4.5** | Yes | Yes | Yes |
258
+ | **Claude Sonnet 4.5** | Yes | Yes | Yes |
259
+ | **GPT-5** | Yes | No | No |
260
+ | **DeepSeek R1** | Yes | No | No |
261
+ | **Gemini 3** | No | Yes | No |
262
+ | **Best For** | App builders | Dev work | Very light use |
263
+
264
+ ### Recommendations by Use Case
265
+
266
+ | Use Case | Recommended Provider |
267
+ |----------|---------------------|
268
+ | **Building apps** (users pay their own usage) | **Puter** |
269
+ | **Development/testing** (you are the user) | **Antigravity** (more predictable) |
270
+ | **Heavy development work** | Paid API (Anthropic, OpenAI) |
271
+ | **Occasional Claude access** | Puter (while free tier lasts) |
272
+ | **GPT-5 / DeepSeek access** | **Puter** (only option) |
273
+
274
+ **Bottom line**:
275
+ - Use **Puter** for building apps where your users authenticate with their own accounts
276
+ - Use **Antigravity** for your own development (more predictable ~300K tokens/day)
277
+ - Use **Puter** if you specifically need GPT-5 or DeepSeek (not available elsewhere free)
278
+
279
+ ## Migrating from Old Config (v1.0.27 and earlier)
280
+
281
+ If you were using the old configuration format that piggybacked on Google (`google/puter-*` models), you need to update to the new standalone provider format.
282
+
283
+ ### Old Format (Deprecated)
284
+
285
+ ```json
286
+ {
287
+ "plugin": ["opencode-puter-auth"],
288
+ "provider": {
289
+ "google": {
290
+ "models": {
291
+ "puter-claude-opus-4-5": { ... }
292
+ }
293
+ }
294
+ }
295
+ }
296
+ ```
297
+
298
+ ### New Format (v1.0.32+)
231
299
 
232
- | Feature | Puter | Antigravity |
233
- |---------|-------|-------------|
234
- | **Cost** | FREE | FREE |
235
- | **Rate Limits** | **NONE** | Weekly quotas |
236
- | **Claude Opus 4.5** | **Unlimited** | Limited |
237
- | **Claude Sonnet 4.5** | **Unlimited** | Limited |
238
- | **GPT-5** | **Unlimited** | No |
239
- | **DeepSeek R1** | **Unlimited** | No |
240
- | **Gemini 3** | No | Limited |
241
- | **Multi-Account** | N/A (unlimited) | Required for quota |
242
- | **Provider Type** | Standalone (`puter/`) | Google piggyback (`google/`) |
243
- | **Shows in `opencode auth login`** | **Yes** (select Puter) | Yes (select Google) |
300
+ ```json
301
+ {
302
+ "plugin": ["opencode-puter-auth"],
303
+ "provider": {
304
+ "puter": {
305
+ "npm": "opencode-puter-auth",
306
+ "name": "Puter.com (500+ AI Models)",
307
+ "models": {
308
+ "claude-opus-4-5": { ... }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ ```
314
+
315
+ ### Migration Steps
316
+
317
+ 1. **Clear the plugin cache:**
318
+ ```bash
319
+ rm -rf ~/.cache/opencode/node_modules/opencode-puter-auth
320
+ rm -rf ~/.config/opencode/node_modules/opencode-puter-auth
321
+ ```
322
+
323
+ 2. **Update your `opencode.json`:**
324
+ - Change `provider.google.models.puter-*` to `provider.puter.models.*`
325
+ - Add `"npm": "opencode-puter-auth"` to the puter provider section
326
+ - Remove the `puter-` prefix from model names
327
+
328
+ 3. **Update your model references:**
329
+ - Old: `google/puter-claude-opus-4-5`
330
+ - New: `puter/claude-opus-4-5`
244
331
 
245
- **Bottom line**: Use **Puter** for unlimited Claude/GPT/DeepSeek access. Use **Antigravity** for Gemini 3.
332
+ 4. **Re-authenticate:**
333
+ ```bash
334
+ opencode auth login
335
+ # Select "Puter" provider → "Puter.com (500+ AI Models)"
336
+ ```
337
+
338
+ ### Why the Change?
339
+
340
+ The new standalone provider offers:
341
+ - **Direct API access** - No routing through Google/Antigravity infrastructure
342
+ - **Proper OAuth visibility** - Puter now appears in `opencode auth login`
343
+ - **Better reliability** - Direct connection to Puter's API
344
+ - **Cleaner model names** - `puter/claude-opus-4-5` instead of `google/puter-claude-opus-4-5`
246
345
 
247
346
  ## Troubleshooting
248
347
 
348
+ ### "usage-limited-chat: Permission denied" or "You have reached your AI usage limit"
349
+
350
+ This means your Puter account has exhausted its free tier credits. Despite Puter's "Free Unlimited" marketing, limits do exist.
351
+
352
+ **Solutions:**
353
+ 1. **Wait** - Limits may reset (timing undocumented)
354
+ 2. **Add credits** on [Puter.com](https://puter.com) (paid)
355
+ 3. **New account** - Create a new Puter account (new accounts get free credits)
356
+ 4. **Switch providers** - Use Antigravity, OpenRouter free tier, or other free providers
357
+ 5. **Use lighter models** - Haiku/Flash models may consume fewer credits than Opus
358
+
249
359
  ### Clear cached plugin and reinstall
250
360
 
251
361
  ```bash
package/dist/cli.js CHANGED
File without changes
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * opencode-puter-auth - Puter.com OAuth Plugin for OpenCode
3
3
  *
4
- * Provides FREE, UNLIMITED access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini,
4
+ * Provides access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini,
5
5
  * and 500+ AI models through Puter.com's "User-Pays" model.
6
+ * Free tier available with undocumented limits.
6
7
  *
7
8
  * @author chindris-mihai-alexandru
8
9
  * @license MIT
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGrH,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9C,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGrH,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * opencode-puter-auth - Puter.com OAuth Plugin for OpenCode
3
3
  *
4
- * Provides FREE, UNLIMITED access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini,
4
+ * Provides access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini,
5
5
  * and 500+ AI models through Puter.com's "User-Pays" model.
6
+ * Free tier available with undocumented limits.
6
7
  *
7
8
  * @author chindris-mihai-alexandru
8
9
  * @license MIT
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,kDAAkD;AAClD,2DAA2D;AAC3D,wEAAwE;AACxE,yFAAyF;AACzF,gFAAgF;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,gEAAgE;AAChE,uEAAuE;AACvE,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEhE,0BAA0B;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kDAAkD;AAClD,2DAA2D;AAC3D,wEAAwE;AACxE,yFAAyF;AACzF,gFAAgF;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,gEAAgE;AAChE,uEAAuE;AACvE,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEhE,0BAA0B;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/plugin.d.ts CHANGED
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * OpenCode Plugin for Puter.com Authentication
3
3
  *
4
- * This plugin provides FREE, UNLIMITED access to Claude Opus 4.5, Sonnet 4.5,
5
- * GPT-5, Gemini, and 500+ AI models through Puter.com's "User-Pays" model.
4
+ * This plugin provides easy access to Claude, GPT, Gemini, and 500+ AI models
5
+ * through Puter.com's OAuth authentication. No API keys needed - just sign in.
6
+ *
7
+ * Note: Puter uses a credit-based system. New accounts get free credits,
8
+ * and premium models consume credits. This is NOT unlimited - credits run out.
6
9
  *
7
10
  * @author chindris-mihai-alexandru
8
11
  * @license MIT
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAuDtE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAuS7B,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAmWtE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAoS7B,CAAC"}
package/dist/plugin.js CHANGED
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * OpenCode Plugin for Puter.com Authentication
3
3
  *
4
- * This plugin provides FREE, UNLIMITED access to Claude Opus 4.5, Sonnet 4.5,
5
- * GPT-5, Gemini, and 500+ AI models through Puter.com's "User-Pays" model.
4
+ * This plugin provides easy access to Claude, GPT, Gemini, and 500+ AI models
5
+ * through Puter.com's OAuth authentication. No API keys needed - just sign in.
6
+ *
7
+ * Note: Puter uses a credit-based system. New accounts get free credits,
8
+ * and premium models consume credits. This is NOT unlimited - credits run out.
6
9
  *
7
10
  * @author chindris-mihai-alexandru
8
11
  * @license MIT
@@ -30,6 +33,305 @@ let pluginConfig = {};
30
33
  // OAuth server state
31
34
  const CALLBACK_PORT = 19847;
32
35
  const AUTH_TIMEOUT_MS = 300000;
36
+ /**
37
+ * Generate the HTML login page for Puter authentication.
38
+ * Puter uses username/password login via REST API, not OAuth redirects.
39
+ * This page handles the login flow entirely in the browser, including 2FA.
40
+ */
41
+ function getLoginPage(callbackPort) {
42
+ return `<!DOCTYPE html>
43
+ <html lang="en">
44
+ <head>
45
+ <meta charset="UTF-8">
46
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
47
+ <title>Sign in to Puter - OpenCode</title>
48
+ <style>
49
+ * { box-sizing: border-box; margin: 0; padding: 0; }
50
+ body {
51
+ font-family: system-ui, -apple-system, sans-serif;
52
+ min-height: 100vh;
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
57
+ padding: 20px;
58
+ }
59
+ .card {
60
+ background: white;
61
+ padding: 40px;
62
+ border-radius: 16px;
63
+ box-shadow: 0 10px 40px rgba(0,0,0,0.2);
64
+ width: 100%;
65
+ max-width: 400px;
66
+ }
67
+ .logo {
68
+ text-align: center;
69
+ margin-bottom: 24px;
70
+ }
71
+ .logo h1 {
72
+ font-size: 28px;
73
+ color: #333;
74
+ }
75
+ .logo p {
76
+ color: #666;
77
+ font-size: 14px;
78
+ margin-top: 8px;
79
+ }
80
+ .form-group {
81
+ margin-bottom: 20px;
82
+ }
83
+ label {
84
+ display: block;
85
+ font-weight: 500;
86
+ margin-bottom: 6px;
87
+ color: #333;
88
+ }
89
+ input {
90
+ width: 100%;
91
+ padding: 12px 16px;
92
+ border: 2px solid #e2e8f0;
93
+ border-radius: 8px;
94
+ font-size: 16px;
95
+ transition: border-color 0.2s;
96
+ }
97
+ input:focus {
98
+ outline: none;
99
+ border-color: #667eea;
100
+ }
101
+ button {
102
+ width: 100%;
103
+ padding: 14px;
104
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
105
+ color: white;
106
+ border: none;
107
+ border-radius: 8px;
108
+ font-size: 16px;
109
+ font-weight: 600;
110
+ cursor: pointer;
111
+ transition: opacity 0.2s;
112
+ }
113
+ button:hover { opacity: 0.9; }
114
+ button:disabled {
115
+ opacity: 0.6;
116
+ cursor: not-allowed;
117
+ }
118
+ .error {
119
+ background: #fee2e2;
120
+ border: 1px solid #fca5a5;
121
+ color: #dc2626;
122
+ padding: 12px;
123
+ border-radius: 8px;
124
+ margin-bottom: 20px;
125
+ display: none;
126
+ }
127
+ .info {
128
+ background: #dbeafe;
129
+ border: 1px solid #93c5fd;
130
+ color: #1d4ed8;
131
+ padding: 12px;
132
+ border-radius: 8px;
133
+ margin-bottom: 20px;
134
+ font-size: 14px;
135
+ }
136
+ .signup-link {
137
+ text-align: center;
138
+ margin-top: 20px;
139
+ font-size: 14px;
140
+ color: #666;
141
+ }
142
+ .signup-link a {
143
+ color: #667eea;
144
+ text-decoration: none;
145
+ }
146
+ .signup-link a:hover { text-decoration: underline; }
147
+ #otp-section { display: none; }
148
+ .spinner {
149
+ display: inline-block;
150
+ width: 16px;
151
+ height: 16px;
152
+ border: 2px solid transparent;
153
+ border-top: 2px solid white;
154
+ border-radius: 50%;
155
+ animation: spin 1s linear infinite;
156
+ margin-right: 8px;
157
+ vertical-align: middle;
158
+ }
159
+ @keyframes spin { to { transform: rotate(360deg); } }
160
+ </style>
161
+ </head>
162
+ <body>
163
+ <div class="card">
164
+ <div class="logo">
165
+ <h1>Puter</h1>
166
+ <p>Sign in to access 500+ AI models via OpenCode</p>
167
+ </div>
168
+
169
+ <div class="error" id="error"></div>
170
+
171
+ <div class="info">
172
+ Sign in with your Puter.com account. If you don't have one,
173
+ <a href="https://puter.com" target="_blank">create a free account</a> first.
174
+ </div>
175
+
176
+ <form id="login-form">
177
+ <div id="credentials-section">
178
+ <div class="form-group">
179
+ <label for="username">Username</label>
180
+ <input type="text" id="username" name="username" required autocomplete="username">
181
+ </div>
182
+ <div class="form-group">
183
+ <label for="password">Password</label>
184
+ <input type="password" id="password" name="password" required autocomplete="current-password">
185
+ </div>
186
+ </div>
187
+
188
+ <div id="otp-section">
189
+ <div class="form-group">
190
+ <label for="otp">Authenticator Code (2FA)</label>
191
+ <input type="text" id="otp" name="otp" maxlength="6" pattern="[0-9]{6}"
192
+ placeholder="Enter 6-digit code" autocomplete="one-time-code">
193
+ </div>
194
+ </div>
195
+
196
+ <button type="submit" id="submit-btn">Sign In</button>
197
+ </form>
198
+
199
+ <div class="signup-link">
200
+ Don't have an account? <a href="https://puter.com" target="_blank">Sign up for Puter</a>
201
+ </div>
202
+ </div>
203
+
204
+ <script>
205
+ const form = document.getElementById('login-form');
206
+ const errorDiv = document.getElementById('error');
207
+ const submitBtn = document.getElementById('submit-btn');
208
+ const credentialsSection = document.getElementById('credentials-section');
209
+ const otpSection = document.getElementById('otp-section');
210
+ const otpInput = document.getElementById('otp');
211
+
212
+ let otpJwtToken = null; // For 2FA flow
213
+
214
+ function showError(message) {
215
+ errorDiv.textContent = message;
216
+ errorDiv.style.display = 'block';
217
+ }
218
+
219
+ function hideError() {
220
+ errorDiv.style.display = 'none';
221
+ }
222
+
223
+ function setLoading(loading) {
224
+ submitBtn.disabled = loading;
225
+ submitBtn.innerHTML = loading
226
+ ? '<span class="spinner"></span>Signing in...'
227
+ : 'Sign In';
228
+ }
229
+
230
+ async function handleLogin(e) {
231
+ e.preventDefault();
232
+ hideError();
233
+ setLoading(true);
234
+
235
+ try {
236
+ let response, data;
237
+
238
+ if (otpJwtToken) {
239
+ // 2FA step
240
+ const otp = otpInput.value.trim();
241
+ if (otp.length !== 6) {
242
+ showError('Please enter a 6-digit code');
243
+ setLoading(false);
244
+ return;
245
+ }
246
+
247
+ response = await fetch('https://puter.com/login/otp', {
248
+ method: 'POST',
249
+ headers: {
250
+ 'Content-Type': 'application/json',
251
+ 'Origin': 'https://puter.com',
252
+ 'Referer': 'https://puter.com/'
253
+ },
254
+ body: JSON.stringify({
255
+ token: otpJwtToken,
256
+ code: otp
257
+ })
258
+ });
259
+ } else {
260
+ // Initial login
261
+ const username = document.getElementById('username').value.trim();
262
+ const password = document.getElementById('password').value;
263
+
264
+ response = await fetch('https://puter.com/login', {
265
+ method: 'POST',
266
+ headers: {
267
+ 'Content-Type': 'application/json',
268
+ 'Origin': 'https://puter.com',
269
+ 'Referer': 'https://puter.com/'
270
+ },
271
+ body: JSON.stringify({ username, password })
272
+ });
273
+ }
274
+
275
+ const contentType = response.headers.get('content-type') || '';
276
+ if (!contentType.includes('application/json')) {
277
+ const text = await response.text();
278
+ throw new Error(text || 'Login failed');
279
+ }
280
+
281
+ data = await response.json();
282
+
283
+ // Handle multi-step login (2FA)
284
+ while (data.proceed && data.next_step) {
285
+ if (data.next_step === 'otp') {
286
+ // Show 2FA input
287
+ otpJwtToken = data.otp_jwt_token;
288
+ credentialsSection.style.display = 'none';
289
+ otpSection.style.display = 'block';
290
+ submitBtn.textContent = 'Verify Code';
291
+ setLoading(false);
292
+ otpInput.focus();
293
+ return; // Wait for user to submit OTP
294
+ }
295
+
296
+ if (data.next_step === 'complete') {
297
+ break;
298
+ }
299
+
300
+ throw new Error('Unrecognized login step: ' + data.next_step);
301
+ }
302
+
303
+ // Success - we have the token
304
+ if (data.proceed && data.token) {
305
+ // Get user info to get username
306
+ let username = document.getElementById('username').value.trim();
307
+
308
+ // Redirect to callback with token
309
+ const callbackUrl = new URL('http://localhost:${callbackPort}/callback');
310
+ callbackUrl.searchParams.set('token', data.token);
311
+ callbackUrl.searchParams.set('username', username);
312
+ if (data.email) {
313
+ callbackUrl.searchParams.set('email', data.email);
314
+ }
315
+
316
+ window.location.href = callbackUrl.toString();
317
+ } else {
318
+ throw new Error('Login failed. Please check your credentials.');
319
+ }
320
+
321
+ } catch (err) {
322
+ showError(err.message || 'Login failed');
323
+ setLoading(false);
324
+ }
325
+ }
326
+
327
+ form.addEventListener('submit', handleLogin);
328
+
329
+ // Focus username on load
330
+ document.getElementById('username').focus();
331
+ </script>
332
+ </body>
333
+ </html>`;
334
+ }
33
335
  /**
34
336
  * Load plugin configuration from puter.json
35
337
  */
@@ -76,7 +378,7 @@ export const PuterAuthPlugin = async (_input) => {
76
378
  // ========================================
77
379
  auth: {
78
380
  // Use 'puter' as a STANDALONE provider - NOT routing through Google!
79
- // This ensures Puter's truly unlimited API is used directly without
381
+ // This provides direct access to Puter's API without
80
382
  // being subject to Google/Antigravity rate limits.
81
383
  //
82
384
  // Users must configure opencode.json with:
@@ -89,7 +391,7 @@ export const PuterAuthPlugin = async (_input) => {
89
391
  async loader(_auth, provider) {
90
392
  const account = authManager?.getActiveAccount();
91
393
  if (account) {
92
- // Set all Puter models as FREE (cost = 0) - Puter's "User-Pays" model
394
+ // Set cost to 0 for OpenCode's cost tracking (Puter handles billing separately)
93
395
  if (provider?.models) {
94
396
  for (const model of Object.values(provider.models)) {
95
397
  model.cost = { input: 0, output: 0, cache: { read: 0, write: 0 } };
@@ -106,7 +408,7 @@ export const PuterAuthPlugin = async (_input) => {
106
408
  methods: [
107
409
  {
108
410
  type: 'oauth',
109
- label: 'Puter.com (FREE Unlimited AI)',
411
+ label: 'Puter.com (500+ AI Models, No API Keys)',
110
412
  async authorize() {
111
413
  return new Promise((resolve) => {
112
414
  let resolved = false;
@@ -172,11 +474,9 @@ export const PuterAuthPlugin = async (_input) => {
172
474
  }
173
475
  }
174
476
  else if (url.pathname === '/') {
175
- // Redirect to Puter auth
176
- const callbackUrl = encodeURIComponent(`http://localhost:${CALLBACK_PORT}/callback`);
177
- const authUrl = `https://puter.com/auth?redirect=${callbackUrl}`;
178
- res.writeHead(302, { Location: authUrl });
179
- res.end();
477
+ // Serve login page - Puter uses username/password, not OAuth redirects
478
+ res.writeHead(200, { 'Content-Type': 'text/html' });
479
+ res.end(getLoginPage(CALLBACK_PORT));
180
480
  }
181
481
  else {
182
482
  res.writeHead(404);
@@ -201,7 +501,7 @@ export const PuterAuthPlugin = async (_input) => {
201
501
  });
202
502
  resolve({
203
503
  url: `http://localhost:${CALLBACK_PORT}`,
204
- instructions: 'Opening browser for Puter.com authentication. Sign in or create a FREE account to get unlimited AI access.',
504
+ instructions: 'Opening browser for Puter.com login. Enter your Puter username and password to authenticate.',
205
505
  method: 'auto',
206
506
  callback: () => callbackPromise,
207
507
  });
@@ -215,14 +515,14 @@ export const PuterAuthPlugin = async (_input) => {
215
515
  // ========================================
216
516
  tool: {
217
517
  'puter-models': tool({
218
- description: 'List all available Puter.com AI models (Claude, GPT, Gemini - all FREE)',
518
+ description: 'List all available Puter.com AI models (Claude, GPT, Gemini, etc.)',
219
519
  args: {},
220
520
  async execute() {
221
521
  if (!puterClient) {
222
522
  return 'Not authenticated with Puter. Run: opencode auth login';
223
523
  }
224
524
  const models = await puterClient.listModels();
225
- let output = '# Available Puter.com Models (FREE, UNLIMITED)\n\n';
525
+ let output = '# Available Puter.com Models\n\n';
226
526
  // Group by provider
227
527
  const byProvider = {};
228
528
  for (const model of models) {
@@ -241,7 +541,7 @@ export const PuterAuthPlugin = async (_input) => {
241
541
  }
242
542
  output += '\n';
243
543
  }
244
- output += `\nTotal: ${models.length} models available for FREE!`;
544
+ output += `\nTotal: ${models.length} models available via Puter.com`;
245
545
  return output;
246
546
  },
247
547
  }),
@@ -272,12 +572,12 @@ export const PuterAuthPlugin = async (_input) => {
272
572
  }
273
573
  }
274
574
  output += '\n---\n';
275
- output += 'Puter uses the "User-Pays" model - your usage is FREE and UNLIMITED!\n';
575
+ output += 'Puter uses a credit-based system. New accounts get free credits.\n';
276
576
  return output;
277
577
  },
278
578
  }),
279
579
  'puter-chat': tool({
280
- description: 'Send a chat message using Puter AI (FREE). Use this to access Claude Opus 4.5, GPT-5, Gemini, etc.',
580
+ description: 'Send a chat message using Puter AI. Access Claude, GPT, Gemini via Puter.com.',
281
581
  args: {
282
582
  message: tool.schema.string().describe('The message to send to the AI'),
283
583
  model: tool.schema.string().optional().describe('Model to use (default: claude-sonnet-4-5). Options: claude-opus-4-5, claude-sonnet-4-5, gpt-5.2, gpt-4o, gemini-2.5-pro, etc.'),
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAyB,MAAM,WAAW,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,2BAA2B;AAC3B,MAAM,YAAY,GAAG,GAAW,EAAE;IAChC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAC9C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE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CAAC;wBACf,OAAO,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;oBACrG,CAAC;gBACH,CAAC;aACF,CAAC;SACH;QAED,2CAA2C;QAC3C,gBAAgB;QAChB,2CAA2C;QAC3C,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE;YACnB,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-puter-auth",
3
- "version": "1.0.33",
4
- "description": "Puter.com OAuth auth plugin for OpenCode - FREE UNLIMITED access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini, and 500+ AI models",
3
+ "version": "1.0.35",
4
+ "description": "Puter.com OAuth plugin for OpenCode - Easy access to Claude, GPT, Gemini & 500+ AI models. No API keys needed, credit-based usage.",
5
5
  "bin": {
6
6
  "puter-auth": "dist/cli.js"
7
7
  },
@@ -44,14 +44,14 @@
44
44
  "gpt",
45
45
  "openai",
46
46
  "gemini",
47
- "free",
48
- "unlimited",
49
47
  "oauth",
50
48
  "plugin",
51
49
  "auth",
52
50
  "ai",
53
51
  "coding",
54
- "llm"
52
+ "llm",
53
+ "no-api-key",
54
+ "easy-setup"
55
55
  ],
56
56
  "engines": {
57
57
  "node": ">=20.0.0"