diff --git a/sdk/exec/antigravity.go b/sdk/exec/antigravity.go new file mode 100644 index 00000000000..8d189d55591 --- /dev/null +++ b/sdk/exec/antigravity.go @@ -0,0 +1,19 @@ +// Package exec provides SDK wrappers for CLIProxyAPI executor functionality. +// This package exposes internal executor implementations for external use. +package exec + +import ( + "github.com/router-for-me/CLIProxyAPI/v7/internal/config" + internal "github.com/router-for-me/CLIProxyAPI/v7/internal/runtime/executor" + + // Import builtin to register translators (claude -> antigravity, etc.) + _ "github.com/router-for-me/CLIProxyAPI/v7/sdk/translator/builtin" +) + +// AntigravityExecutor is a type alias for the internal AntigravityExecutor. +type AntigravityExecutor = internal.AntigravityExecutor + +// NewAntigravityExecutor creates a new AntigravityExecutor instance. +func NewAntigravityExecutor() *AntigravityExecutor { + return internal.NewAntigravityExecutor(&config.Config{}) +} diff --git a/sdk/exec/codex.go b/sdk/exec/codex.go new file mode 100644 index 00000000000..904c8f66604 --- /dev/null +++ b/sdk/exec/codex.go @@ -0,0 +1,18 @@ +// Package exec provides SDK wrappers for CLIProxyAPI executor functionality. +// This file exposes the internal CodexExecutor for external use. +// Token management (access_token refresh) is the caller's responsibility; +// the caller should set auth.Metadata["access_token"] before calling Execute/ExecuteStream. +package exec + +import ( + "github.com/router-for-me/CLIProxyAPI/v7/internal/config" + internal "github.com/router-for-me/CLIProxyAPI/v7/internal/runtime/executor" +) + +// CodexExecutor is a type alias for the internal CodexExecutor. +type CodexExecutor = internal.CodexExecutor + +// NewCodexExecutor creates a new CodexExecutor instance. +func NewCodexExecutor() *CodexExecutor { + return internal.NewCodexExecutor(&config.Config{}) +} diff --git a/sdk/exec/xai.go b/sdk/exec/xai.go new file mode 100644 index 00000000000..cce22605b5a --- /dev/null +++ b/sdk/exec/xai.go @@ -0,0 +1,18 @@ +// Package exec provides SDK wrappers for CLIProxyAPI executor functionality. +// This file exposes the internal xAI/Grok executor for external use. +// Token management (access_token refresh) is handled by the executor using the +// OAuth metadata stored on the provided auth object. +package exec + +import ( + "github.com/router-for-me/CLIProxyAPI/v7/internal/config" + internal "github.com/router-for-me/CLIProxyAPI/v7/internal/runtime/executor" +) + +// XAIExecutor is a type alias for the internal xAI/Grok executor. +type XAIExecutor = internal.XAIAutoExecutor + +// NewXAIExecutor creates a new xAI/Grok executor instance. +func NewXAIExecutor() *XAIExecutor { + return internal.NewXAIAutoExecutor(&config.Config{}) +}