diff --git a/go.mod b/go.mod index 7ad363a716..4c13696673 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/go-git/go-git/v6 v6.0.0-20251009132922-75a182125145 github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.3 - github.com/jackc/pgx/v5 v5.7.6 + github.com/jackc/pgx/v5 v5.9.0 github.com/joho/godotenv v1.5.1 github.com/klauspost/compress v1.17.4 github.com/minio/minio-go/v7 v7.0.66 @@ -94,6 +94,6 @@ require ( golang.org/x/arch v0.8.0 // indirect golang.org/x/sys v0.38.0 // indirect golang.org/x/text v0.31.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.1 gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index e811b0123b..eaef9ba185 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk= -github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= +github.com/jackc/pgx/v5 v5.9.0 h1:T/dI+2TvmI2H8s/KH1/lXIbz1CUFk3gn5oTjr0/mBsE= +github.com/jackc/pgx/v5 v5.9.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= diff --git a/sdk/exec/antigravity.go b/sdk/exec/antigravity.go new file mode 100644 index 0000000000..9258ed1e30 --- /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/v6/internal/config" + internal "github.com/router-for-me/CLIProxyAPI/v6/internal/runtime/executor" + + // Import builtin to register translators (claude -> antigravity, etc.) + _ "github.com/router-for-me/CLIProxyAPI/v6/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 0000000000..621737584f --- /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/v6/internal/config" + internal "github.com/router-for-me/CLIProxyAPI/v6/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{}) +}