oh-my-opencode 3.0.0-beta.1 → 3.0.0-beta.11
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.ja.md +69 -816
- package/README.md +72 -949
- package/README.zh-cn.md +222 -959
- package/bin/oh-my-opencode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/metis.d.ts +1 -0
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/orchestrator-sisyphus.d.ts +3 -2
- package/dist/agents/prometheus-prompt.d.ts +3 -1
- package/dist/agents/sisyphus-junior.d.ts +6 -2
- package/dist/agents/types.d.ts +1 -0
- package/dist/agents/utils.d.ts +3 -2
- package/dist/cli/config-manager.d.ts +9 -1
- package/dist/cli/doctor/checks/opencode.d.ts +5 -1
- package/dist/cli/index.js +3886 -3763
- package/dist/cli/run/events.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema.d.ts +538 -208
- package/dist/features/background-agent/concurrency.d.ts +17 -0
- package/dist/features/background-agent/manager.d.ts +54 -5
- package/dist/features/background-agent/types.d.ts +13 -4
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +6 -1
- package/dist/features/context-injector/index.d.ts +1 -1
- package/dist/features/context-injector/injector.d.ts +1 -1
- package/dist/features/hook-message-injector/index.d.ts +2 -2
- package/dist/features/hook-message-injector/injector.d.ts +7 -0
- package/dist/features/opencode-skill-loader/skill-content.d.ts +17 -2
- package/dist/features/skill-mcp-manager/manager.d.ts +11 -0
- package/dist/features/task-toast-manager/index.d.ts +1 -1
- package/dist/features/task-toast-manager/manager.d.ts +2 -1
- package/dist/features/task-toast-manager/types.d.ts +5 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +1 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +0 -5
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +4 -0
- package/dist/hooks/background-compaction/index.d.ts +19 -0
- package/dist/hooks/background-notification/index.d.ts +6 -0
- package/dist/hooks/comment-checker/cli.d.ts +0 -1
- package/dist/hooks/compaction-context-injector/index.d.ts +7 -1
- package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/keyword-detector/index.d.ts +2 -1
- package/dist/hooks/prometheus-md-only/constants.d.ts +2 -2
- package/dist/hooks/prometheus-md-only/index.d.ts +1 -1
- package/dist/hooks/ralph-loop/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/index.js +24184 -25263
- package/dist/mcp/context7.d.ts +1 -0
- package/dist/mcp/grep-app.d.ts +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/websearch.d.ts +1 -0
- package/dist/plugin-handlers/config-handler.d.ts +2 -0
- package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
- package/dist/shared/agent-tool-restrictions.d.ts +7 -0
- package/dist/shared/agent-variant.d.ts +5 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/deep-merge.test.d.ts +1 -0
- package/dist/shared/first-message-variant.d.ts +11 -0
- package/dist/shared/first-message-variant.test.d.ts +1 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/migration.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +6 -3
- package/dist/shared/permission-compat.d.ts +22 -7
- package/dist/shared/session-cursor.d.ts +13 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +41 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/shared/system-directive.d.ts +31 -0
- package/dist/shared/zip-extractor.d.ts +1 -0
- package/dist/tools/{sisyphus-task → delegate-task}/constants.d.ts +3 -3
- package/dist/tools/{sisyphus-task → delegate-task}/index.d.ts +1 -1
- package/dist/tools/{sisyphus-task → delegate-task}/tools.d.ts +5 -3
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/{sisyphus-task → delegate-task}/types.d.ts +1 -1
- package/dist/tools/glob/cli.d.ts +4 -0
- package/dist/tools/glob/cli.test.d.ts +1 -0
- package/dist/tools/glob/types.d.ts +1 -0
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/interactive-bash/constants.d.ts +1 -1
- package/dist/tools/look-at/tools.d.ts +7 -0
- package/dist/tools/look-at/tools.test.d.ts +1 -0
- package/dist/tools/lsp/client.d.ts +1 -3
- package/dist/tools/lsp/config.test.d.ts +1 -0
- package/dist/tools/lsp/index.d.ts +1 -1
- package/dist/tools/lsp/tools.d.ts +1 -6
- package/dist/tools/lsp/types.d.ts +0 -33
- package/dist/tools/lsp/utils.d.ts +1 -4
- package/dist/tools/skill/tools.d.ts +1 -7
- package/dist/tools/skill/types.d.ts +3 -0
- package/dist/tools/skill-mcp/types.d.ts +1 -1
- package/dist/tools/slashcommand/tools.d.ts +1 -7
- package/package.json +21 -14
- package/postinstall.mjs +43 -0
- package/dist/agents/build-prompt.d.ts +0 -31
- package/dist/agents/plan-prompt.d.ts +0 -64
- package/dist/auth/antigravity/accounts.d.ts +0 -40
- package/dist/auth/antigravity/browser.d.ts +0 -27
- package/dist/auth/antigravity/cli.d.ts +0 -2
- package/dist/auth/antigravity/constants.d.ts +0 -98
- package/dist/auth/antigravity/fetch.d.ts +0 -69
- package/dist/auth/antigravity/index.d.ts +0 -13
- package/dist/auth/antigravity/integration.test.d.ts +0 -10
- package/dist/auth/antigravity/message-converter.d.ts +0 -54
- package/dist/auth/antigravity/oauth.d.ts +0 -51
- package/dist/auth/antigravity/plugin.d.ts +0 -54
- package/dist/auth/antigravity/project.d.ts +0 -10
- package/dist/auth/antigravity/request.d.ts +0 -116
- package/dist/auth/antigravity/response.d.ts +0 -137
- package/dist/auth/antigravity/storage.d.ts +0 -5
- package/dist/auth/antigravity/thinking.d.ts +0 -278
- package/dist/auth/antigravity/thinking.test.d.ts +0 -10
- package/dist/auth/antigravity/thought-signature-store.d.ts +0 -52
- package/dist/auth/antigravity/token.d.ts +0 -38
- package/dist/auth/antigravity/tools.d.ts +0 -119
- package/dist/auth/antigravity/types.d.ts +0 -229
- package/dist/cli/ast-grep-napi.linux-x64-gnu-jfv8414z.node +0 -0
- package/dist/cli/ast-grep-napi.linux-x64-musl-8cj2e5cf.node +0 -0
- package/dist/cli/commands/auth.d.ts +0 -2
- package/dist/google-auth.d.ts +0 -3
- package/dist/google-auth.js +0 -3871
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-executor.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +0 -7
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +0 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +0 -6
- package/dist/hooks/comment-checker/constants.d.ts +0 -3
- package/dist/hooks/comment-checker/filters/bdd.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/directive.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/docstring.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/index.d.ts +0 -7
- package/dist/hooks/comment-checker/filters/shebang.d.ts +0 -2
- package/dist/hooks/comment-checker/output/formatter.d.ts +0 -2
- package/dist/hooks/comment-checker/output/index.d.ts +0 -2
- package/dist/hooks/comment-checker/output/xml-builder.d.ts +0 -2
- package/dist/hooks/empty-message-sanitizer/index.d.ts +0 -12
- package/dist/hooks/preemptive-compaction/constants.d.ts +0 -3
- package/dist/hooks/preemptive-compaction/index.d.ts +0 -24
- package/dist/hooks/preemptive-compaction/types.d.ts +0 -17
- package/dist/tools/ast-grep/napi.d.ts +0 -13
- package/dist/tools/interactive-bash/types.d.ts +0 -3
- /package/dist/{auth/antigravity/accounts.test.d.ts → agents/momus.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/browser.test.d.ts → agents/prometheus-prompt.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/cli.test.d.ts → agents/sisyphus-junior.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/constants.test.d.ts → features/claude-code-session-state/state.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/oauth.test.d.ts → hooks/auto-update-checker/checker.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/request.test.d.ts → hooks/auto-update-checker/index.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/storage.test.d.ts → hooks/comment-checker/cli.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/token.test.d.ts → hooks/delegate-task-retry/index.test.d.ts} +0 -0
- /package/dist/{tools/sisyphus-task/tools.test.d.ts → plugin-config.test.d.ts} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity Tool Normalization
|
|
3
|
-
* Converts tools between OpenAI and Gemini formats.
|
|
4
|
-
*
|
|
5
|
-
* OpenAI format:
|
|
6
|
-
* { "type": "function", "function": { "name": "x", "description": "...", "parameters": {...} } }
|
|
7
|
-
*
|
|
8
|
-
* Gemini format:
|
|
9
|
-
* { "functionDeclarations": [{ "name": "x", "description": "...", "parameters": {...} }] }
|
|
10
|
-
*
|
|
11
|
-
* Note: This is for Gemini models ONLY. Claude models are not supported via Antigravity.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* OpenAI function tool format
|
|
15
|
-
*/
|
|
16
|
-
export interface OpenAITool {
|
|
17
|
-
type: string;
|
|
18
|
-
function?: {
|
|
19
|
-
name: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
parameters?: Record<string, unknown>;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Gemini function declaration format
|
|
26
|
-
*/
|
|
27
|
-
export interface GeminiFunctionDeclaration {
|
|
28
|
-
name: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
parameters?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Gemini tools format (array of functionDeclarations)
|
|
34
|
-
*/
|
|
35
|
-
export interface GeminiTools {
|
|
36
|
-
functionDeclarations: GeminiFunctionDeclaration[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* OpenAI tool call in response
|
|
40
|
-
*/
|
|
41
|
-
export interface OpenAIToolCall {
|
|
42
|
-
id: string;
|
|
43
|
-
type: "function";
|
|
44
|
-
function: {
|
|
45
|
-
name: string;
|
|
46
|
-
arguments: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Gemini function call in response
|
|
51
|
-
*/
|
|
52
|
-
export interface GeminiFunctionCall {
|
|
53
|
-
name: string;
|
|
54
|
-
args: Record<string, unknown>;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Gemini function response format
|
|
58
|
-
*/
|
|
59
|
-
export interface GeminiFunctionResponse {
|
|
60
|
-
name: string;
|
|
61
|
-
response: Record<string, unknown>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Gemini tool result containing function calls
|
|
65
|
-
*/
|
|
66
|
-
export interface GeminiToolResult {
|
|
67
|
-
functionCall?: GeminiFunctionCall;
|
|
68
|
-
functionResponse?: GeminiFunctionResponse;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Normalize OpenAI-format tools to Gemini format.
|
|
72
|
-
* Converts an array of OpenAI tools to Gemini's functionDeclarations format.
|
|
73
|
-
*
|
|
74
|
-
* - Handles `function` type tools with name, description, parameters
|
|
75
|
-
* - Logs warning for unsupported tool types (does NOT silently drop them)
|
|
76
|
-
* - Creates a single object with functionDeclarations array
|
|
77
|
-
*
|
|
78
|
-
* @param tools - Array of OpenAI-format tools
|
|
79
|
-
* @returns Gemini-format tools object with functionDeclarations, or undefined if no valid tools
|
|
80
|
-
*/
|
|
81
|
-
export declare function normalizeToolsForGemini(tools: OpenAITool[]): GeminiTools | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Convert Gemini tool results (functionCall) back to OpenAI tool_call format.
|
|
84
|
-
* Handles both functionCall (request) and functionResponse (result) formats.
|
|
85
|
-
*
|
|
86
|
-
* Gemini functionCall format:
|
|
87
|
-
* { "name": "tool_name", "args": { ... } }
|
|
88
|
-
*
|
|
89
|
-
* OpenAI tool_call format:
|
|
90
|
-
* { "id": "call_xxx", "type": "function", "function": { "name": "tool_name", "arguments": "..." } }
|
|
91
|
-
*
|
|
92
|
-
* @param results - Array of Gemini tool results containing functionCall or functionResponse
|
|
93
|
-
* @returns Array of OpenAI-format tool calls
|
|
94
|
-
*/
|
|
95
|
-
export declare function normalizeToolResultsFromGemini(results: GeminiToolResult[]): OpenAIToolCall[];
|
|
96
|
-
/**
|
|
97
|
-
* Convert a single Gemini functionCall to OpenAI tool_call format.
|
|
98
|
-
* Useful for streaming responses where each chunk may contain a function call.
|
|
99
|
-
*
|
|
100
|
-
* @param functionCall - Gemini function call
|
|
101
|
-
* @param id - Optional tool call ID (generates one if not provided)
|
|
102
|
-
* @returns OpenAI-format tool call
|
|
103
|
-
*/
|
|
104
|
-
export declare function convertFunctionCallToToolCall(functionCall: GeminiFunctionCall, id?: string): OpenAIToolCall;
|
|
105
|
-
/**
|
|
106
|
-
* Check if a tool array contains any function-type tools.
|
|
107
|
-
*
|
|
108
|
-
* @param tools - Array of OpenAI-format tools
|
|
109
|
-
* @returns true if there are function tools to normalize
|
|
110
|
-
*/
|
|
111
|
-
export declare function hasFunctionTools(tools: OpenAITool[]): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Extract function declarations from already-normalized Gemini tools.
|
|
114
|
-
* Useful when tools may already be in Gemini format.
|
|
115
|
-
*
|
|
116
|
-
* @param tools - Tools that may be in Gemini or OpenAI format
|
|
117
|
-
* @returns Array of function declarations
|
|
118
|
-
*/
|
|
119
|
-
export declare function extractFunctionDeclarations(tools: unknown): GeminiFunctionDeclaration[];
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity Auth Type Definitions
|
|
3
|
-
* Matches cliproxyapi/sdk/auth/antigravity.go token format exactly
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Token storage format for Antigravity authentication
|
|
7
|
-
* Matches Go metadata structure: type, access_token, refresh_token, expires_in, timestamp, email, project_id
|
|
8
|
-
*/
|
|
9
|
-
export interface AntigravityTokens {
|
|
10
|
-
/** Always "antigravity" for this auth type */
|
|
11
|
-
type: "antigravity";
|
|
12
|
-
/** OAuth access token from Google */
|
|
13
|
-
access_token: string;
|
|
14
|
-
/** OAuth refresh token from Google */
|
|
15
|
-
refresh_token: string;
|
|
16
|
-
/** Token expiration time in seconds */
|
|
17
|
-
expires_in: number;
|
|
18
|
-
/** Unix timestamp in milliseconds when tokens were obtained */
|
|
19
|
-
timestamp: number;
|
|
20
|
-
/** ISO 8601 formatted expiration datetime (optional, for display) */
|
|
21
|
-
expired?: string;
|
|
22
|
-
/** User's email address from Google userinfo */
|
|
23
|
-
email?: string;
|
|
24
|
-
/** GCP project ID from loadCodeAssist API */
|
|
25
|
-
project_id?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Project context returned from loadCodeAssist API
|
|
29
|
-
* Used to get cloudaicompanionProject for API calls
|
|
30
|
-
*/
|
|
31
|
-
export interface AntigravityProjectContext {
|
|
32
|
-
/** GCP project ID for Cloud AI Companion */
|
|
33
|
-
cloudaicompanionProject?: string;
|
|
34
|
-
/** Managed project ID for enterprise users (optional) */
|
|
35
|
-
managedProjectId?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Metadata for loadCodeAssist API request
|
|
39
|
-
*/
|
|
40
|
-
export interface AntigravityClientMetadata {
|
|
41
|
-
/** IDE type identifier */
|
|
42
|
-
ideType: "IDE_UNSPECIFIED" | string;
|
|
43
|
-
/** Platform identifier */
|
|
44
|
-
platform: "PLATFORM_UNSPECIFIED" | string;
|
|
45
|
-
/** Plugin type - typically "GEMINI" */
|
|
46
|
-
pluginType: "GEMINI" | string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Request body for loadCodeAssist API
|
|
50
|
-
*/
|
|
51
|
-
export interface AntigravityLoadCodeAssistRequest {
|
|
52
|
-
metadata: AntigravityClientMetadata;
|
|
53
|
-
}
|
|
54
|
-
export interface AntigravityUserTier {
|
|
55
|
-
id?: string;
|
|
56
|
-
isDefault?: boolean;
|
|
57
|
-
userDefinedCloudaicompanionProject?: boolean;
|
|
58
|
-
}
|
|
59
|
-
export interface AntigravityLoadCodeAssistResponse {
|
|
60
|
-
cloudaicompanionProject?: string | {
|
|
61
|
-
id: string;
|
|
62
|
-
};
|
|
63
|
-
currentTier?: {
|
|
64
|
-
id?: string;
|
|
65
|
-
};
|
|
66
|
-
allowedTiers?: AntigravityUserTier[];
|
|
67
|
-
}
|
|
68
|
-
export interface AntigravityOnboardUserPayload {
|
|
69
|
-
done?: boolean;
|
|
70
|
-
response?: {
|
|
71
|
-
cloudaicompanionProject?: {
|
|
72
|
-
id?: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Request body format for Antigravity API calls
|
|
78
|
-
* Wraps the actual request with project and model context
|
|
79
|
-
*/
|
|
80
|
-
export interface AntigravityRequestBody {
|
|
81
|
-
project: string;
|
|
82
|
-
model: string;
|
|
83
|
-
userAgent: string;
|
|
84
|
-
requestType: string;
|
|
85
|
-
requestId: string;
|
|
86
|
-
request: Record<string, unknown>;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Response format from Antigravity API
|
|
90
|
-
* Follows OpenAI-compatible structure with Gemini extensions
|
|
91
|
-
*/
|
|
92
|
-
export interface AntigravityResponse {
|
|
93
|
-
/** Response ID */
|
|
94
|
-
id?: string;
|
|
95
|
-
/** Object type (e.g., "chat.completion") */
|
|
96
|
-
object?: string;
|
|
97
|
-
/** Creation timestamp */
|
|
98
|
-
created?: number;
|
|
99
|
-
/** Model used for response */
|
|
100
|
-
model?: string;
|
|
101
|
-
/** Response choices */
|
|
102
|
-
choices?: AntigravityResponseChoice[];
|
|
103
|
-
/** Token usage statistics */
|
|
104
|
-
usage?: AntigravityUsage;
|
|
105
|
-
/** Error information if request failed */
|
|
106
|
-
error?: AntigravityError;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Single response choice in Antigravity response
|
|
110
|
-
*/
|
|
111
|
-
export interface AntigravityResponseChoice {
|
|
112
|
-
/** Choice index */
|
|
113
|
-
index: number;
|
|
114
|
-
/** Message content */
|
|
115
|
-
message?: {
|
|
116
|
-
role: "assistant";
|
|
117
|
-
content?: string;
|
|
118
|
-
tool_calls?: AntigravityToolCall[];
|
|
119
|
-
};
|
|
120
|
-
/** Delta for streaming responses */
|
|
121
|
-
delta?: {
|
|
122
|
-
role?: "assistant";
|
|
123
|
-
content?: string;
|
|
124
|
-
tool_calls?: AntigravityToolCall[];
|
|
125
|
-
};
|
|
126
|
-
/** Finish reason */
|
|
127
|
-
finish_reason?: "stop" | "tool_calls" | "length" | "content_filter" | null;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Tool call in Antigravity response
|
|
131
|
-
*/
|
|
132
|
-
export interface AntigravityToolCall {
|
|
133
|
-
id: string;
|
|
134
|
-
type: "function";
|
|
135
|
-
function: {
|
|
136
|
-
name: string;
|
|
137
|
-
arguments: string;
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Token usage statistics
|
|
142
|
-
*/
|
|
143
|
-
export interface AntigravityUsage {
|
|
144
|
-
prompt_tokens: number;
|
|
145
|
-
completion_tokens: number;
|
|
146
|
-
total_tokens: number;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Error response from Antigravity API
|
|
150
|
-
*/
|
|
151
|
-
export interface AntigravityError {
|
|
152
|
-
message: string;
|
|
153
|
-
type?: string;
|
|
154
|
-
code?: string | number;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Token exchange result from Google OAuth
|
|
158
|
-
* Matches antigravityTokenResponse in Go
|
|
159
|
-
*/
|
|
160
|
-
export interface AntigravityTokenExchangeResult {
|
|
161
|
-
access_token: string;
|
|
162
|
-
refresh_token: string;
|
|
163
|
-
expires_in: number;
|
|
164
|
-
token_type: string;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* User info from Google userinfo API
|
|
168
|
-
*/
|
|
169
|
-
export interface AntigravityUserInfo {
|
|
170
|
-
email: string;
|
|
171
|
-
name?: string;
|
|
172
|
-
picture?: string;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Parsed refresh token parts
|
|
176
|
-
* Format: refreshToken|projectId|managedProjectId
|
|
177
|
-
*/
|
|
178
|
-
export interface AntigravityRefreshParts {
|
|
179
|
-
refreshToken: string;
|
|
180
|
-
projectId?: string;
|
|
181
|
-
managedProjectId?: string;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* OAuth error payload from Google
|
|
185
|
-
* Google returns errors in multiple formats, this handles all of them
|
|
186
|
-
*/
|
|
187
|
-
export interface OAuthErrorPayload {
|
|
188
|
-
error?: string | {
|
|
189
|
-
status?: string;
|
|
190
|
-
code?: string;
|
|
191
|
-
message?: string;
|
|
192
|
-
};
|
|
193
|
-
error_description?: string;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Parsed OAuth error with normalized fields
|
|
197
|
-
*/
|
|
198
|
-
export interface ParsedOAuthError {
|
|
199
|
-
code?: string;
|
|
200
|
-
description?: string;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Multi-account support types
|
|
204
|
-
*/
|
|
205
|
-
/** All model families for rate limit tracking */
|
|
206
|
-
export declare const MODEL_FAMILIES: readonly ["claude", "gemini-flash", "gemini-pro"];
|
|
207
|
-
/** Model family for rate limit tracking */
|
|
208
|
-
export type ModelFamily = (typeof MODEL_FAMILIES)[number];
|
|
209
|
-
/** Account tier for prioritization */
|
|
210
|
-
export type AccountTier = "free" | "paid";
|
|
211
|
-
/** Rate limit state per model family (Unix timestamps in ms) */
|
|
212
|
-
export type RateLimitState = Partial<Record<ModelFamily, number>>;
|
|
213
|
-
/** Account metadata for storage */
|
|
214
|
-
export interface AccountMetadata {
|
|
215
|
-
email: string;
|
|
216
|
-
tier: AccountTier;
|
|
217
|
-
refreshToken: string;
|
|
218
|
-
projectId: string;
|
|
219
|
-
managedProjectId?: string;
|
|
220
|
-
accessToken: string;
|
|
221
|
-
expiresAt: number;
|
|
222
|
-
rateLimits: RateLimitState;
|
|
223
|
-
}
|
|
224
|
-
/** Storage schema for persisting multiple accounts */
|
|
225
|
-
export interface AccountStorage {
|
|
226
|
-
version: number;
|
|
227
|
-
accounts: AccountMetadata[];
|
|
228
|
-
activeIndex: number;
|
|
229
|
-
}
|
|
Binary file
|
|
Binary file
|
package/dist/google-auth.d.ts
DELETED