diff --git a/pkg/config/cliconfig.go b/pkg/config/cliconfig.go index d0ef00c8..215e2f39 100644 --- a/pkg/config/cliconfig.go +++ b/pkg/config/cliconfig.go @@ -22,14 +22,15 @@ const ( PassCredHelper = "pass" FileCredHelper = "file" SqliteCredHelper = "sqlite" + PostgresCredHelper = "postgres" GPTScriptHelperPrefix = "gptscript-credential-" ) var ( - darwinHelpers = []string{OsxkeychainCredHelper, FileCredHelper, SqliteCredHelper} + darwinHelpers = []string{OsxkeychainCredHelper, FileCredHelper, SqliteCredHelper, PostgresCredHelper} windowsHelpers = []string{WincredCredHelper, FileCredHelper} - linuxHelpers = []string{SecretserviceCredHelper, PassCredHelper, FileCredHelper, SqliteCredHelper} + linuxHelpers = []string{SecretserviceCredHelper, PassCredHelper, FileCredHelper, SqliteCredHelper, PostgresCredHelper} ) func listAsString(helpers []string) string { diff --git a/pkg/credentials/util.go b/pkg/credentials/util.go index 72f9eab9..2a4ad96b 100644 --- a/pkg/credentials/util.go +++ b/pkg/credentials/util.go @@ -14,8 +14,8 @@ type CredentialHelperDirs struct { func RepoNameForCredentialStore(store string) string { switch store { - case config.SqliteCredHelper: - return "gptscript-credential-sqlite" + case config.SqliteCredHelper, config.PostgresCredHelper: + return "gptscript-credential-database" default: return "gptscript-credential-helpers" } @@ -23,8 +23,8 @@ func RepoNameForCredentialStore(store string) string { func GitURLForRepoName(repoName string) (string, error) { switch repoName { - case "gptscript-credential-sqlite": - return runtimeEnv.VarOrDefault("GPTSCRIPT_CRED_SQLITE_ROOT", "https://github.com/gptscript-ai/gptscript-credential-sqlite.git"), nil + case "gptscript-credential-database": + return runtimeEnv.VarOrDefault("GPTSCRIPT_CRED_SQLITE_ROOT", "https://github.com/gptscript-ai/gptscript-credential-database.git"), nil case "gptscript-credential-helpers": return runtimeEnv.VarOrDefault("GPTSCRIPT_CRED_HELPERS_ROOT", "https://github.com/gptscript-ai/gptscript-credential-helpers.git"), nil default: