@hung319/opencode-iflow-cli 1.1.1 → 1.2.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.
package/dist/plugin.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare const IFLOW_PROVIDER_ID = "iflow-oauth";
1
2
  export declare const createIFlowPlugin: (id: string) => ({ client, directory }: any) => Promise<{
2
3
  auth: {
3
4
  provider: string;
@@ -7,12 +8,17 @@ export declare const createIFlowPlugin: (id: string) => ({ client, directory }:
7
8
  models: any;
8
9
  fetch(input: any, init?: any): Promise<Response>;
9
10
  }>;
10
- methods: {
11
+ methods: ({
11
12
  id: string;
12
13
  label: string;
13
- type: string;
14
+ type: "oauth";
14
15
  authorize: (inputs?: any) => Promise<unknown>;
15
- }[];
16
+ } | {
17
+ id: string;
18
+ label: string;
19
+ type: "api";
20
+ authorize: (inputs?: any) => Promise<unknown>;
21
+ })[];
16
22
  };
17
23
  }>;
18
24
  export declare const IFlowOAuthPlugin: ({ client, directory }: any) => Promise<{
@@ -24,11 +30,16 @@ export declare const IFlowOAuthPlugin: ({ client, directory }: any) => Promise<{
24
30
  models: any;
25
31
  fetch(input: any, init?: any): Promise<Response>;
26
32
  }>;
27
- methods: {
33
+ methods: ({
34
+ id: string;
35
+ label: string;
36
+ type: "oauth";
37
+ authorize: (inputs?: any) => Promise<unknown>;
38
+ } | {
28
39
  id: string;
29
40
  label: string;
30
- type: string;
41
+ type: "api";
31
42
  authorize: (inputs?: any) => Promise<unknown>;
32
- }[];
43
+ })[];
33
44
  };
34
45
  }>;
package/dist/plugin.js CHANGED
@@ -9,7 +9,7 @@ import { startOAuthServer } from './plugin/server';
9
9
  import { promptAddAnotherAccount, promptLoginMode, promptApiKey, promptEmail, promptOAuthCallback } from './plugin/cli';
10
10
  import { IFLOW_CONSTANTS, applyThinkingConfig } from './constants';
11
11
  import * as logger from './plugin/logger';
12
- const IFLOW_PROVIDER_ID = 'iflow';
12
+ export const IFLOW_PROVIDER_ID = 'iflow-oauth';
13
13
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
14
14
  const isNetworkError = (e) => e instanceof Error && /econnreset|etimedout|enotfound|network|fetch failed/i.test(e.message);
15
15
  const openBrowser = (url) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hung319/opencode-iflow-cli",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "OpenCode plugin for iFlow providing access to Qwen, DeepSeek, Kimi, GLM, and iFlow ROME models with auto-config and headless OAuth support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",