@oh-my-pi/pi-ai 16.3.6 → 16.3.8
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/CHANGELOG.md +18 -0
- package/dist/types/api-registry.d.ts +1 -1
- package/dist/types/auth-broker/client.d.ts +2 -2
- package/dist/types/auth-broker/discover.d.ts +1 -1
- package/dist/types/auth-broker/index.d.ts +7 -7
- package/dist/types/auth-broker/refresher.d.ts +1 -1
- package/dist/types/auth-broker/remote-store.d.ts +6 -6
- package/dist/types/auth-broker/server.d.ts +1 -1
- package/dist/types/auth-broker/snapshot-cache.d.ts +1 -1
- package/dist/types/auth-broker/types.d.ts +2 -2
- package/dist/types/auth-gateway/index.d.ts +3 -3
- package/dist/types/auth-gateway/server.d.ts +3 -3
- package/dist/types/auth-gateway/types.d.ts +1 -1
- package/dist/types/auth-retry.d.ts +2 -2
- package/dist/types/auth-storage.d.ts +6 -6
- package/dist/types/dialect/anthropic.d.ts +1 -1
- package/dist/types/dialect/catalog.d.ts +1 -1
- package/dist/types/dialect/coercion.d.ts +1 -1
- package/dist/types/dialect/deepseek.d.ts +1 -1
- package/dist/types/dialect/demotion.d.ts +16 -14
- package/dist/types/dialect/examples.d.ts +1 -1
- package/dist/types/dialect/factory.d.ts +1 -1
- package/dist/types/dialect/gemini.d.ts +1 -1
- package/dist/types/dialect/gemma.d.ts +1 -1
- package/dist/types/dialect/glm.d.ts +1 -1
- package/dist/types/dialect/harmony.d.ts +1 -1
- package/dist/types/dialect/hermes.d.ts +1 -1
- package/dist/types/dialect/history.d.ts +2 -2
- package/dist/types/dialect/index.d.ts +11 -11
- package/dist/types/dialect/inventory.d.ts +1 -1
- package/dist/types/dialect/kimi.d.ts +1 -1
- package/dist/types/dialect/minimax.d.ts +1 -1
- package/dist/types/dialect/owned-stream.d.ts +2 -2
- package/dist/types/dialect/qwen3.d.ts +1 -1
- package/dist/types/dialect/rendering.d.ts +2 -2
- package/dist/types/dialect/thinking.d.ts +1 -1
- package/dist/types/dialect/types.d.ts +1 -1
- package/dist/types/dialect/xml.d.ts +1 -1
- package/dist/types/error/classes.d.ts +1 -1
- package/dist/types/error/finalize.d.ts +3 -3
- package/dist/types/error/flags.d.ts +1 -1
- package/dist/types/error/format.d.ts +1 -1
- package/dist/types/error/index.d.ts +13 -13
- package/dist/types/error/provider.d.ts +1 -1
- package/dist/types/error/rate-limit.d.ts +1 -1
- package/dist/types/index.d.ts +47 -47
- package/dist/types/provider-details.d.ts +1 -1
- package/dist/types/providers/amazon-bedrock.d.ts +1 -1
- package/dist/types/providers/anthropic-client.d.ts +3 -3
- package/dist/types/providers/anthropic-messages-server-schema.d.ts +1 -1
- package/dist/types/providers/anthropic-messages-server.d.ts +2 -2
- package/dist/types/providers/anthropic-wire.d.ts +1 -1
- package/dist/types/providers/anthropic.d.ts +3 -3
- package/dist/types/providers/aws-credentials.d.ts +2 -2
- package/dist/types/providers/azure-openai-responses.d.ts +2 -2
- package/dist/types/providers/cursor.d.ts +18 -3
- package/dist/types/providers/devin.d.ts +1 -1
- package/dist/types/providers/error-message.d.ts +1 -1
- package/dist/types/providers/github-copilot-headers.d.ts +1 -1
- package/dist/types/providers/gitlab-duo-workflow.d.ts +2 -2
- package/dist/types/providers/gitlab-duo.d.ts +2 -2
- package/dist/types/providers/google-auth.d.ts +1 -1
- package/dist/types/providers/google-gemini-cli.d.ts +6 -4
- package/dist/types/providers/google-interactions.d.ts +3 -3
- package/dist/types/providers/google-shared.d.ts +7 -5
- package/dist/types/providers/google-vertex.d.ts +2 -2
- package/dist/types/providers/google.d.ts +2 -2
- package/dist/types/providers/kimi.d.ts +3 -3
- package/dist/types/providers/mock.d.ts +2 -2
- package/dist/types/providers/ollama.d.ts +1 -1
- package/dist/types/providers/openai-anthropic-shim.d.ts +2 -2
- package/dist/types/providers/openai-chat-server-schema.d.ts +1 -1
- package/dist/types/providers/openai-chat-server.d.ts +2 -2
- package/dist/types/providers/openai-codex/request-transformer.d.ts +1 -1
- package/dist/types/providers/openai-codex/response-handler.d.ts +1 -1
- package/dist/types/providers/openai-codex-responses.d.ts +3 -3
- package/dist/types/providers/openai-completions.d.ts +3 -3
- package/dist/types/providers/openai-reasoning-fallback.d.ts +1 -1
- package/dist/types/providers/openai-responses-server-schema.d.ts +1 -1
- package/dist/types/providers/openai-responses-server.d.ts +2 -2
- package/dist/types/providers/openai-responses.d.ts +5 -5
- package/dist/types/providers/openai-shared.d.ts +10 -9
- package/dist/types/providers/pi-native-client.d.ts +1 -1
- package/dist/types/providers/pi-native-server.d.ts +2 -2
- package/dist/types/providers/register-builtins.d.ts +3 -3
- package/dist/types/providers/synthetic.d.ts +3 -3
- package/dist/types/providers/transform-messages.d.ts +1 -1
- package/dist/types/providers/vision-guard.d.ts +1 -1
- package/dist/types/registry/alibaba-coding-plan.d.ts +1 -1
- package/dist/types/registry/anthropic.d.ts +1 -1
- package/dist/types/registry/api-key-login.d.ts +1 -1
- package/dist/types/registry/api-key-validation.d.ts +1 -1
- package/dist/types/registry/baseten.d.ts +2 -2
- package/dist/types/registry/cerebras.d.ts +2 -2
- package/dist/types/registry/cloudflare-ai-gateway.d.ts +1 -1
- package/dist/types/registry/coreweave.d.ts +2 -2
- package/dist/types/registry/cursor.d.ts +1 -1
- package/dist/types/registry/deepseek.d.ts +1 -1
- package/dist/types/registry/devin.d.ts +1 -1
- package/dist/types/registry/firepass.d.ts +2 -2
- package/dist/types/registry/fireworks.d.ts +2 -2
- package/dist/types/registry/github-copilot.d.ts +1 -1
- package/dist/types/registry/gitlab-duo-workflow.d.ts +1 -1
- package/dist/types/registry/gitlab-duo.d.ts +1 -1
- package/dist/types/registry/google-antigravity.d.ts +1 -1
- package/dist/types/registry/google-gemini-cli.d.ts +1 -1
- package/dist/types/registry/huggingface.d.ts +2 -2
- package/dist/types/registry/index.d.ts +4 -4
- package/dist/types/registry/kagi.d.ts +1 -1
- package/dist/types/registry/kilo.d.ts +1 -1
- package/dist/types/registry/kimi-code.d.ts +1 -1
- package/dist/types/registry/litellm.d.ts +1 -1
- package/dist/types/registry/llama-cpp.d.ts +1 -1
- package/dist/types/registry/lm-studio.d.ts +1 -1
- package/dist/types/registry/minimax-code-cn.d.ts +1 -1
- package/dist/types/registry/minimax-code.d.ts +1 -1
- package/dist/types/registry/moonshot.d.ts +2 -2
- package/dist/types/registry/nanogpt.d.ts +2 -2
- package/dist/types/registry/nvidia.d.ts +1 -1
- package/dist/types/registry/oauth/anthropic.d.ts +3 -3
- package/dist/types/registry/oauth/callback-server.d.ts +1 -1
- package/dist/types/registry/oauth/cursor.d.ts +1 -1
- package/dist/types/registry/oauth/devin.d.ts +1 -1
- package/dist/types/registry/oauth/github-copilot.d.ts +2 -2
- package/dist/types/registry/oauth/gitlab-duo-workflow.d.ts +2 -2
- package/dist/types/registry/oauth/gitlab-duo.d.ts +1 -1
- package/dist/types/registry/oauth/google-antigravity.d.ts +1 -1
- package/dist/types/registry/oauth/google-gemini-cli.d.ts +1 -1
- package/dist/types/registry/oauth/google-oauth-shared.d.ts +2 -2
- package/dist/types/registry/oauth/index.d.ts +2 -2
- package/dist/types/registry/oauth/kimi.d.ts +1 -1
- package/dist/types/registry/oauth/minimax-code.d.ts +2 -2
- package/dist/types/registry/oauth/openai-codex.d.ts +1 -1
- package/dist/types/registry/oauth/opencode.d.ts +1 -1
- package/dist/types/registry/oauth/perplexity.d.ts +1 -1
- package/dist/types/registry/oauth/types.d.ts +2 -2
- package/dist/types/registry/oauth/wafer.d.ts +1 -1
- package/dist/types/registry/oauth/xai-oauth.d.ts +3 -3
- package/dist/types/registry/oauth/xiaomi.d.ts +1 -1
- package/dist/types/registry/ollama-cloud.d.ts +1 -1
- package/dist/types/registry/ollama.d.ts +1 -1
- package/dist/types/registry/openai-codex-device.d.ts +1 -1
- package/dist/types/registry/openai-codex.d.ts +1 -1
- package/dist/types/registry/opencode-go.d.ts +1 -1
- package/dist/types/registry/opencode-zen.d.ts +1 -1
- package/dist/types/registry/openrouter.d.ts +2 -2
- package/dist/types/registry/parallel.d.ts +1 -1
- package/dist/types/registry/perplexity.d.ts +2 -2
- package/dist/types/registry/qianfan.d.ts +2 -2
- package/dist/types/registry/qwen-portal.d.ts +1 -1
- package/dist/types/registry/registry.d.ts +69 -69
- package/dist/types/registry/sakana.d.ts +2 -2
- package/dist/types/registry/synthetic.d.ts +2 -2
- package/dist/types/registry/tavily.d.ts +1 -1
- package/dist/types/registry/together.d.ts +1 -1
- package/dist/types/registry/types.d.ts +1 -1
- package/dist/types/registry/umans.d.ts +2 -2
- package/dist/types/registry/venice.d.ts +2 -2
- package/dist/types/registry/vercel-ai-gateway.d.ts +1 -1
- package/dist/types/registry/vllm.d.ts +1 -1
- package/dist/types/registry/wafer-serverless.d.ts +1 -1
- package/dist/types/registry/xai-oauth.d.ts +1 -1
- package/dist/types/registry/xiaomi-token-plan-ams.d.ts +1 -1
- package/dist/types/registry/xiaomi-token-plan-cn.d.ts +1 -1
- package/dist/types/registry/xiaomi-token-plan-sgp.d.ts +1 -1
- package/dist/types/registry/xiaomi.d.ts +1 -1
- package/dist/types/registry/zai.d.ts +2 -2
- package/dist/types/registry/zenmux.d.ts +2 -2
- package/dist/types/registry/zhipu-coding-plan.d.ts +2 -2
- package/dist/types/stream.d.ts +6 -6
- package/dist/types/types.d.ts +24 -21
- package/dist/types/usage/claude.d.ts +1 -1
- package/dist/types/usage/gemini.d.ts +1 -1
- package/dist/types/usage/github-copilot.d.ts +1 -1
- package/dist/types/usage/google-antigravity.d.ts +1 -1
- package/dist/types/usage/kimi.d.ts +1 -1
- package/dist/types/usage/minimax-code.d.ts +1 -1
- package/dist/types/usage/ollama.d.ts +1 -1
- package/dist/types/usage/openai-codex-reset.d.ts +1 -1
- package/dist/types/usage/openai-codex.d.ts +1 -1
- package/dist/types/usage/opencode-go.d.ts +1 -1
- package/dist/types/usage/zai.d.ts +1 -1
- package/dist/types/usage.d.ts +1 -1
- package/dist/types/utils/block-symbols.d.ts +15 -0
- package/dist/types/utils/empty-completion-retry.d.ts +2 -2
- package/dist/types/utils/event-stream.d.ts +1 -1
- package/dist/types/utils/harmony-leak.d.ts +1 -1
- package/dist/types/utils/http-inspector.d.ts +19 -0
- package/dist/types/utils/leaked-thinking-stream.d.ts +1 -1
- package/dist/types/utils/openai-http.d.ts +3 -9
- package/dist/types/utils/provider-response.d.ts +1 -1
- package/dist/types/utils/proxy.d.ts +1 -1
- package/dist/types/utils/request-debug.d.ts +1 -1
- package/dist/types/utils/retry.d.ts +1 -1
- package/dist/types/utils/schema/equality.d.ts +1 -1
- package/dist/types/utils/schema/index.d.ts +15 -15
- package/dist/types/utils/schema/normalize.d.ts +2 -2
- package/dist/types/utils/schema/spill.d.ts +1 -1
- package/dist/types/utils/schema/wire.d.ts +1 -1
- package/dist/types/utils/sse-debug.d.ts +1 -1
- package/dist/types/utils/thinking-loop.d.ts +2 -2
- package/dist/types/utils/tool-call-loop-guard.d.ts +1 -1
- package/dist/types/utils/tool-choice.d.ts +1 -1
- package/dist/types/utils/validation.d.ts +1 -1
- package/dist/types/utils.d.ts +14 -2
- package/package.json +4 -4
- package/src/dialect/demotion.ts +18 -19
- package/src/error/rate-limit.ts +1 -1
- package/src/providers/azure-openai-responses.ts +3 -2
- package/src/providers/cursor.ts +36 -0
- package/src/providers/google-gemini-cli.ts +12 -3
- package/src/providers/google-shared.ts +3 -1
- package/src/providers/mock.ts +10 -3
- package/src/providers/openai-codex-responses.ts +47 -39
- package/src/providers/openai-completions.ts +48 -9
- package/src/providers/openai-responses.ts +37 -23
- package/src/providers/openai-shared.ts +145 -26
- package/src/providers/transform-messages.ts +63 -9
- package/src/registry/oauth/wafer.ts +1 -1
- package/src/stream.ts +6 -0
- package/src/types.ts +27 -3
- package/src/utils/block-symbols.ts +18 -0
- package/src/utils/http-inspector.ts +32 -4
- package/src/utils/openai-http.ts +6 -9
- package/src/utils/retry-after.ts +12 -1
- package/src/utils.ts +78 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Fire Pass login flow.
|
|
4
4
|
*
|
|
@@ -8,7 +8,7 @@ import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
|
8
8
|
* pings the chat completions endpoint with the router id directly.
|
|
9
9
|
* See https://docs.fireworks.ai/firepass.
|
|
10
10
|
*/
|
|
11
|
-
export declare const loginFirepass: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
11
|
+
export declare const loginFirepass: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
12
12
|
export declare const firepassProvider: {
|
|
13
13
|
readonly id: "firepass";
|
|
14
14
|
readonly name: "Fire Pass (Fireworks Kimi K2.6 Turbo subscription)";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
-
export declare const loginFireworks: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
|
+
export declare const loginFireworks: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
3
3
|
export declare const fireworksProvider: {
|
|
4
4
|
readonly id: "fireworks";
|
|
5
5
|
readonly name: "Fireworks";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const githubCopilotProvider: {
|
|
3
3
|
readonly id: "github-copilot";
|
|
4
4
|
readonly name: "GitHub Copilot";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const gitLabDuoWorkflowProvider: {
|
|
3
3
|
readonly id: "gitlab-duo-agent";
|
|
4
4
|
readonly name: "GitLab Duo Agent";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const gitlabDuoProvider: {
|
|
3
3
|
readonly id: "gitlab-duo";
|
|
4
4
|
readonly name: "GitLab Duo Non-Agentic";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const googleAntigravityProvider: {
|
|
3
3
|
readonly id: "google-antigravity";
|
|
4
4
|
readonly name: "Antigravity (Gemini 3, Claude, GPT-OSS)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const googleGeminiCliProvider: {
|
|
3
3
|
readonly id: "google-gemini-cli";
|
|
4
4
|
readonly name: "Google Cloud Code Assist (Gemini CLI)";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
-
export declare const loginHuggingface: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
|
+
export declare const loginHuggingface: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
3
3
|
export declare const huggingfaceProvider: {
|
|
4
4
|
readonly id: "huggingface";
|
|
5
5
|
readonly name: "Hugging Face Inference";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./derived";
|
|
2
|
-
export * from "./oauth";
|
|
3
|
-
export * from "./registry";
|
|
4
|
-
export * from "./types";
|
|
1
|
+
export * from "./derived.js";
|
|
2
|
+
export * from "./oauth/index.js";
|
|
3
|
+
export * from "./registry.js";
|
|
4
|
+
export * from "./types.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthCredentials } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthCredentials } from "./oauth/types.js";
|
|
2
2
|
export declare function loginKilo(callbacks: OAuthController): Promise<OAuthCredentials>;
|
|
3
3
|
export declare const kiloProvider: {
|
|
4
4
|
readonly id: "kilo";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare function loginLlamaCpp(options: OAuthController): Promise<string>;
|
|
3
3
|
export declare const llamaCppProvider: {
|
|
4
4
|
readonly id: "llama.cpp";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const DEFAULT_LOCAL_TOKEN = "lm-studio-local";
|
|
3
3
|
export declare function loginLmStudio(options: OAuthController): Promise<string>;
|
|
4
4
|
export declare const lmStudioProvider: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
-
export declare const loginMoonshot: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
|
+
export declare const loginMoonshot: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
3
3
|
export declare const moonshotProvider: {
|
|
4
4
|
readonly id: "moonshot";
|
|
5
5
|
readonly name: "Moonshot (Kimi API)";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
-
export declare const loginNanoGPT: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
|
+
export declare const loginNanoGPT: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
3
3
|
export declare const nanogptProvider: {
|
|
4
4
|
readonly id: "nanogpt";
|
|
5
5
|
readonly name: "NanoGPT";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare function loginNvidia(options: OAuthController): Promise<string>;
|
|
3
3
|
export declare const nvidiaProvider: {
|
|
4
4
|
readonly id: "nvidia";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anthropic OAuth flow (Claude Pro/Max)
|
|
3
3
|
*/
|
|
4
|
-
import type { FetchImpl } from "../../types";
|
|
5
|
-
import { OAuthCallbackFlow } from "./callback-server";
|
|
6
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
4
|
+
import type { FetchImpl } from "../../types.js";
|
|
5
|
+
import { OAuthCallbackFlow } from "./callback-server.js";
|
|
6
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
7
7
|
export declare class AnthropicOAuthFlow extends OAuthCallbackFlow {
|
|
8
8
|
#private;
|
|
9
9
|
constructor(ctrl: OAuthController);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
1
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
2
2
|
type FetchFunction = NonNullable<OAuthController["fetch"]>;
|
|
3
3
|
export declare function loginDevin(ctrl: OAuthController): Promise<OAuthCredentials>;
|
|
4
4
|
export declare function exchangeDevinCliToken(authorizationCode: string, codeVerifier: string, fetchImpl?: FetchFunction): Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FetchImpl } from "../../types";
|
|
2
|
-
import type { OAuthCredentials } from "./types";
|
|
1
|
+
import type { FetchImpl } from "../../types.js";
|
|
2
|
+
import type { OAuthCredentials } from "./types.js";
|
|
3
3
|
type GitHubCopilotLoginOptions = {
|
|
4
4
|
onAuth: (url: string, instructions?: string) => void;
|
|
5
5
|
onPrompt: (prompt: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FetchImpl } from "../../types";
|
|
2
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./types";
|
|
1
|
+
import type { FetchImpl } from "../../types.js";
|
|
2
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./types.js";
|
|
3
3
|
export declare const GITLAB_DUO_WORKFLOW_OAUTH_CLIENT_ID = "36f2a70cddeb5a0889d4fd8295c241b7e9848e89cf9e599d0eed2d8e5350fbf5";
|
|
4
4
|
export declare const GITLAB_DUO_WORKFLOW_OAUTH_REDIRECT_URI = "vscode://gitlab.gitlab-workflow/authentication";
|
|
5
5
|
export declare function loginGitLabDuoWorkflow(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./types.js";
|
|
2
2
|
export declare function loginGitLabDuo(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials>;
|
|
3
3
|
export declare function refreshGitLabDuoToken(credentials: OAuthCredentials): Promise<OAuthCredentials>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Gemini CLI OAuth flow (Google Cloud Code Assist)
|
|
3
3
|
* Standard Gemini models only (gemini-2.0-flash, gemini-2.5-*)
|
|
4
4
|
*/
|
|
5
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
5
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
6
6
|
export declare function loginGeminiCli(ctrl: OAuthController): Promise<OAuthCredentials>;
|
|
7
7
|
/**
|
|
8
8
|
* Refresh Google Cloud Code Assist token
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OAuthCallbackFlow } from "./callback-server";
|
|
2
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
1
|
+
import { OAuthCallbackFlow } from "./callback-server.js";
|
|
2
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
3
3
|
export interface GoogleOAuthFlowConfig {
|
|
4
4
|
clientId: string;
|
|
5
5
|
clientSecret: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthProvider, OAuthProviderId, OAuthProviderInfo, OAuthProviderInterface } from "./types";
|
|
2
|
-
export type * from "./types";
|
|
1
|
+
import type { OAuthCredentials, OAuthProvider, OAuthProviderId, OAuthProviderInfo, OAuthProviderInterface } from "./types.js";
|
|
2
|
+
export type * from "./types.js";
|
|
3
3
|
/** Result returned by one OAuth device-code polling attempt. */
|
|
4
4
|
export type OAuthDeviceCodePollResult<T> = {
|
|
5
5
|
status: "complete";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kimi Code OAuth flow (device authorization grant)
|
|
3
3
|
*/
|
|
4
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
4
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
5
5
|
export declare let getKimiCommonHeaders: () => Readonly<{
|
|
6
6
|
"User-Agent": `KimiCLI/${string}`;
|
|
7
7
|
"X-Msh-Platform": "kimi_cli";
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* Opens browser to subscription page, prompts user to paste their API key.
|
|
19
19
|
* Returns the API key directly (not OAuthCredentials - this isn't OAuth).
|
|
20
20
|
*/
|
|
21
|
-
export declare const loginMiniMaxCode: (options: import("./types").OAuthController) => Promise<string>;
|
|
21
|
+
export declare const loginMiniMaxCode: (options: import("./types.js").OAuthController) => Promise<string>;
|
|
22
22
|
/**
|
|
23
23
|
* Login to MiniMax Token Plan (China).
|
|
24
24
|
*
|
|
25
25
|
* Same flow as international but uses China endpoint.
|
|
26
26
|
*/
|
|
27
|
-
export declare const loginMiniMaxCodeCn: (options: import("./types").OAuthController) => Promise<string>;
|
|
27
|
+
export declare const loginMiniMaxCodeCn: (options: import("./types.js").OAuthController) => Promise<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenAI Codex (ChatGPT OAuth) flow — browser and device-code flows.
|
|
3
3
|
*/
|
|
4
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
4
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
5
5
|
export declare function decodeJwt<T = Record<string, unknown>>(token: string): T | null;
|
|
6
6
|
/** Formats OpenAI Codex OAuth token endpoint errors for login and refresh failures. */
|
|
7
7
|
export declare function formatOpenAICodexTokenEndpointError(status: number, bodyText: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FetchImpl } from "../../types";
|
|
2
|
-
import type { OAuthProviderUnion } from "../registry";
|
|
1
|
+
import type { FetchImpl } from "../../types.js";
|
|
2
|
+
import type { OAuthProviderUnion } from "../registry.js";
|
|
3
3
|
export type OAuthCredentials = {
|
|
4
4
|
refresh: string;
|
|
5
5
|
access: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const loginWaferServerless: (options: import("./types").OAuthController) => Promise<string>;
|
|
1
|
+
export declare const loginWaferServerless: (options: import("./types.js").OAuthController) => Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FetchImpl } from "../../types";
|
|
2
|
-
import { OAuthCallbackFlow } from "./callback-server";
|
|
3
|
-
import type { OAuthController, OAuthCredentials } from "./types";
|
|
1
|
+
import type { FetchImpl } from "../../types.js";
|
|
2
|
+
import { OAuthCallbackFlow } from "./callback-server.js";
|
|
3
|
+
import type { OAuthController, OAuthCredentials } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Validate an xAI OIDC discovery endpoint against scheme + host.
|
|
6
6
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Standard Xiaomi login opens the pay-as-you-go API key console. Token Plan
|
|
8
8
|
* login opens plan management so users copy the regional `tp-...` key.
|
|
9
9
|
*/
|
|
10
|
-
import type { OAuthController } from "./types";
|
|
10
|
+
import type { OAuthController } from "./types.js";
|
|
11
11
|
/** Region codes accepted by the Xiaomi Token Plan login flow. */
|
|
12
12
|
export type XiaomiTokenPlanRegion = "sgp" | "ams" | "cn";
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare function loginOllamaCloud(options: OAuthController): Promise<string>;
|
|
3
3
|
export declare const ollamaCloudProvider: {
|
|
4
4
|
readonly id: "ollama-cloud";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const openaiCodexDeviceProvider: {
|
|
3
3
|
readonly id: "openai-codex-device";
|
|
4
4
|
readonly name: "ChatGPT Plus/Pro (Codex, headless/device)";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const openaiCodexProvider: {
|
|
3
3
|
readonly id: "openai-codex";
|
|
4
4
|
readonly name: "ChatGPT Plus/Pro (Codex Subscription)";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
/** OpenRouter login flow (API key paste, validated via /auth/key).
|
|
3
3
|
*
|
|
4
4
|
* `/api/v1/models` is public and returns 200 for any bearer (including bogus),
|
|
5
5
|
* so it cannot validate auth. `/api/v1/auth/key` is the canonical "who am I"
|
|
6
6
|
* endpoint — 200 for valid keys, 401 otherwise.
|
|
7
7
|
*/
|
|
8
|
-
export declare const loginOpenRouter: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
8
|
+
export declare const loginOpenRouter: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
9
9
|
export declare const openrouterProvider: {
|
|
10
10
|
readonly id: "openrouter";
|
|
11
11
|
readonly name: "OpenRouter";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare const perplexityProvider: {
|
|
3
3
|
readonly id: "perplexity";
|
|
4
4
|
readonly name: "Perplexity (Pro/Max)";
|
|
5
5
|
readonly envKeys: "PERPLEXITY_API_KEY";
|
|
6
|
-
readonly login: (cb: OAuthLoginCallbacks) => Promise<import("./oauth").OAuthCredentials>;
|
|
6
|
+
readonly login: (cb: OAuthLoginCallbacks) => Promise<import("./oauth/index.js").OAuthCredentials>;
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
-
export declare const loginQianfan: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
|
+
export declare const loginQianfan: (options: import("./oauth/index.js").OAuthController) => Promise<string>;
|
|
3
3
|
export declare const qianfanProvider: {
|
|
4
4
|
readonly id: "qianfan";
|
|
5
5
|
readonly name: "Qianfan";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types";
|
|
1
|
+
import type { OAuthController, OAuthLoginCallbacks } from "./oauth/types.js";
|
|
2
2
|
export declare function loginQwenPortal(options: OAuthController): Promise<string>;
|
|
3
3
|
export declare const qwenPortalProvider: {
|
|
4
4
|
readonly id: "qwen-portal";
|