opencode-codex-multi-account 0.2.6 → 0.2.9

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/index.d.ts CHANGED
@@ -1,10 +1,32 @@
1
- import { OPENAI_OAUTH_ADAPTER } from "./constants";
2
- export declare const CodexMultiAuthPlugin: (ctx: unknown) => Promise<{
1
+ import * as _opencode_ai_plugin from '@opencode-ai/plugin';
2
+ import * as opencode_multi_account_core from 'opencode-multi-account-core';
3
+
4
+ type OAuthCallbackResponse = ({
5
+ type: "success";
6
+ } & {
7
+ refresh: string;
8
+ access: string;
9
+ expires: number;
10
+ accountId?: string;
11
+ }) | {
12
+ type: "failed";
13
+ };
14
+ interface OAuthFlowResult {
15
+ url: string;
16
+ instructions: string;
17
+ method: "auto";
18
+ callback(): Promise<OAuthCallbackResponse>;
19
+ }
20
+
21
+ /** OpenAI OAuth adapter config */
22
+ declare const OPENAI_OAUTH_ADAPTER: opencode_multi_account_core.OAuthAdapter;
23
+
24
+ declare const CodexMultiAuthPlugin: (ctx: unknown) => Promise<{
3
25
  tool: {
4
26
  [OPENAI_OAUTH_ADAPTER.statusToolName]: {
5
27
  description: string;
6
28
  args: {};
7
- execute(args: Record<string, never>, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
29
+ execute(args: Record<string, never>, context: _opencode_ai_plugin.ToolContext): Promise<string>;
8
30
  };
9
31
  };
10
32
  auth: {
@@ -12,7 +34,7 @@ export declare const CodexMultiAuthPlugin: (ctx: unknown) => Promise<{
12
34
  methods: ({
13
35
  label: string;
14
36
  type: "oauth";
15
- authorize(): Promise<import("./auth-handler").OAuthFlowResult>;
37
+ authorize(): Promise<OAuthFlowResult>;
16
38
  } | {
17
39
  type: "api";
18
40
  label: string;
@@ -24,3 +46,5 @@ export declare const CodexMultiAuthPlugin: (ctx: unknown) => Promise<{
24
46
  }>;
25
47
  };
26
48
  }>;
49
+
50
+ export { CodexMultiAuthPlugin };