opencode-claude-code-wrapper 0.0.2 → 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.
Files changed (2) hide show
  1. package/index.mjs +7 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -268,7 +268,8 @@ export async function ClaudeCodeWrapperPlugin({ client }) {
268
268
  const auth = await getAuth();
269
269
 
270
270
  // Claude Code CLI auth - zero cost, use CLI
271
- if (auth.type === "claude-code") {
271
+ // Detected by special key value set during authorize
272
+ if (auth.type === "api" && auth.key === "claude-code-cli") {
272
273
  for (const model of Object.values(provider.models)) {
273
274
  model.cost = {
274
275
  input: 0,
@@ -478,7 +479,11 @@ export async function ClaudeCodeWrapperPlugin({ client }) {
478
479
  methods: [
479
480
  {
480
481
  label: "Claude Code CLI",
481
- type: "claude-code",
482
+ type: "api",
483
+ authorize: async () => {
484
+ // Return immediately with special key marker
485
+ return { type: "success", key: "claude-code-cli" };
486
+ },
482
487
  },
483
488
  {
484
489
  label: "Claude Pro/Max",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-claude-code-wrapper",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "OpenCode plugin that wraps Claude Code CLI for API-like access",
5
5
  "main": "./index.mjs",
6
6
  "type": "module",