@anthonyhaussman/opencode-agy-auth 1.2.3-alpha.5 → 1.2.3-alpha.6

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.
@@ -1,6 +1,4 @@
1
1
  export declare const AGY_PROVIDER_ID = "google-agy";
2
- export declare const AGY_AUTH_URL = "https://accounts.google.com/o/oauth2/auth";
3
- export declare const AGY_TOKEN_URL = "https://oauth2.googleapis.com/token";
4
2
  export declare const AGY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
5
3
  export declare const AGY_CLIENT_SECRET = "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";
6
4
  export declare const AGY_SCOPES: readonly string[];
@@ -7,18 +7,9 @@ export declare function createOAuthAuthorizeMethod(options?: {
7
7
  client?: PluginClient;
8
8
  getConfiguredProjectId?: () => Promise<string | undefined> | string | undefined;
9
9
  getUserAgentModel?: () => Promise<string | undefined> | string | undefined;
10
- openBrowser?: (url: string) => void;
11
10
  }): () => Promise<{
12
11
  url: string;
13
12
  instructions: string;
14
13
  method: 'code';
15
14
  callback: (callbackUrl: string) => Promise<AgyTokenExchangeResult>;
16
15
  }>;
17
- export declare function parseOAuthCallbackInput(input: string): {
18
- code?: string;
19
- state?: string;
20
- };
21
- export declare function setOpenBrowserLauncherForTesting(launcher: typeof openBrowserLauncher | null): void;
22
- export declare function defaultOpenBrowserLauncher(command: string, args: string[]): void;
23
- declare let openBrowserLauncher: typeof defaultOpenBrowserLauncher;
24
- export {};
@@ -29,36 +29,3 @@ export interface ProjectContextResult {
29
29
  effectiveProjectId: string;
30
30
  }
31
31
  export type { Provider as ProviderV2, Model as ModelV2 } from '@opencode-ai/sdk/v2';
32
- export interface OpenCodeV2TransformRegistry<T = any> {
33
- transform: (fn: (target: T) => Promise<void> | void) => void;
34
- }
35
- export interface OpenCodeV2SessionRegistry {
36
- hook: (name: string, handler: (...args: any[]) => any, options?: {
37
- providerID?: string;
38
- }) => void;
39
- }
40
- export interface OpenCodeV2PluginLocation {
41
- root?: string;
42
- workspace?: string;
43
- }
44
- export interface OpenCodeV2PluginContext {
45
- catalog: OpenCodeV2TransformRegistry;
46
- tool: OpenCodeV2TransformRegistry;
47
- command: OpenCodeV2TransformRegistry;
48
- session: OpenCodeV2SessionRegistry;
49
- aisdk?: {
50
- hook: (name: 'sdk' | 'language', handler: (event: any) => Promise<void> | void) => void;
51
- };
52
- integration?: OpenCodeV2TransformRegistry | {
53
- transform?: (transformer: (editor: any) => void) => void;
54
- };
55
- location: OpenCodeV2PluginLocation;
56
- }
57
- export interface OpenCodeV2PluginDefinition {
58
- id: string;
59
- setup: (ctx: OpenCodeV2PluginContext) => Promise<void> | void;
60
- }
61
- export interface DualOpenCodePlugin extends OpenCodeV2PluginDefinition {
62
- server: (options: any) => Promise<any>;
63
- }
64
- export declare function defineOpenCodeV2Plugin(def: OpenCodeV2PluginDefinition): OpenCodeV2PluginDefinition;
@@ -1,27 +1,4 @@
1
1
  import type { PluginContext, PluginResult } from './plugin/types';
2
- export interface SimpleStaticModel {
3
- name: string;
4
- description: string;
5
- maxTokens: number;
6
- maxOutputTokens: number;
7
- toolCall: boolean;
8
- reasoning: boolean;
9
- attachment: boolean;
10
- cost?: {
11
- input: number;
12
- output: number;
13
- cache?: {
14
- read: number;
15
- write: number;
16
- };
17
- };
18
- }
19
- export declare const STATIC_MODELS_SIMPLE: Record<string, SimpleStaticModel>;
20
- export declare const TIER_MAPPING: Record<string, {
21
- low: string;
22
- high: string;
23
- medium?: string;
24
- } & Record<string, string | undefined>>;
25
2
  /**
26
3
  * Registers the Agy OAuth provider for Opencode.
27
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthonyhaussman/opencode-agy-auth",
3
- "version": "1.2.3-alpha.5",
3
+ "version": "1.2.3-alpha.6",
4
4
  "author": "antigravity",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,21 +0,0 @@
1
- import { type OpenCodeV2PluginContext, type OpenCodeV2PluginDefinition } from './types';
2
- export declare const AGY_V2_QUOTA_COMMAND = "agy-quota";
3
- export declare const AGY_V2_QUOTA_SUMMARY_COMMAND = "agy-quota-summary";
4
- export declare const AGY_V2_QUOTA_COMMAND_TEMPLATE = "Retrieve Agy Code Assist quota usage for the current authenticated account.\n\nImmediately call `agy_quota` with no arguments and return its output verbatim.\nDo not call other tools.\n";
5
- export declare const AGY_V2_QUOTA_SUMMARY_COMMAND_TEMPLATE = "Retrieve Agy Code Assist quota summary (weekly and 5-hour limits by model group) for the current authenticated account.\n\nImmediately call `agy_quota_summary` with no arguments and return its output verbatim.\nDo not call other tools.\n";
6
- export declare function getSafeHeader(headers: unknown, key: string): string | undefined;
7
- export declare function setSafeHeaders(initHeaders: unknown, newHeaders: Record<string, string>): unknown;
8
- export declare function toUrlString(value: RequestInfo): string;
9
- export declare function resolveModelTier(baseModelId: string, init?: RequestInit): string;
10
- export declare function setStoredAuthOverrideForTesting(override: any): void;
11
- export declare function loadStoredAuthFromJson(): any;
12
- export declare function createV2FetchInterceptor(getAuthSnapshot?: () => Promise<any> | any): (input: RequestInfo, init?: RequestInit) => Promise<Response>;
13
- /**
14
- * Setup adapter for OpenCode v2 plugin architecture.
15
- */
16
- export declare function setupOpenCodeV2(ctx: OpenCodeV2PluginContext): Promise<void>;
17
- /**
18
- * OpenCode v2 Plugin Definition
19
- */
20
- export declare const v2PluginDefinition: OpenCodeV2PluginDefinition;
21
- export declare const createV2PluginDefinition: () => OpenCodeV2PluginDefinition;