@seekrit/cli 1.7.1 → 1.8.0

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.
Files changed (2) hide show
  1. package/dist/index.js +27 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2560,7 +2560,8 @@ const SYNC_PROVIDER_KINDS = [
2560
2560
  "gcp-secret-manager",
2561
2561
  "langgraph-platform",
2562
2562
  "azure-key-vault",
2563
- "huggingface-spaces"
2563
+ "huggingface-spaces",
2564
+ "openai-vault"
2564
2565
  ];
2565
2566
  z.enum(SYNC_PROVIDER_KINDS);
2566
2567
  /**
@@ -2964,6 +2965,8 @@ const azureKeyVaultConnectionConfigSchema = z.object({
2964
2965
  * would invite pointing a connection at a host that silently swallows secrets.
2965
2966
  */
2966
2967
  const huggingfaceSpacesConnectionConfigSchema = z.object({ provider: z.literal("huggingface-spaces") });
2968
+ /** The wrapped credential is an OpenAI project API key with vault read/write access. */
2969
+ const openaiVaultConnectionConfigSchema = z.object({ provider: z.literal("openai-vault") });
2967
2970
  const syncConnectionConfigSchema = z.discriminatedUnion("provider", [
2968
2971
  vercelConnectionConfigSchema,
2969
2972
  cloudflareWorkersConnectionConfigSchema,
@@ -2983,7 +2986,8 @@ const syncConnectionConfigSchema = z.discriminatedUnion("provider", [
2983
2986
  gcpSecretManagerConnectionConfigSchema,
2984
2987
  langgraphPlatformConnectionConfigSchema,
2985
2988
  azureKeyVaultConnectionConfigSchema,
2986
- huggingfaceSpacesConnectionConfigSchema
2989
+ huggingfaceSpacesConnectionConfigSchema,
2990
+ openaiVaultConnectionConfigSchema
2987
2991
  ]);
2988
2992
  /** Vercel's three deployment targets. A binding writes to one or more. */
2989
2993
  const VERCEL_TARGETS = [
@@ -3808,6 +3812,12 @@ const huggingfaceSpacesDestinationSchema = z.object({
3808
3812
  /** Space ID as `owner/name`, e.g. `acme/support-demo`. */
3809
3813
  repoId: huggingfaceRepoIdSchema
3810
3814
  });
3815
+ /** One existing OpenAI vault; every credential in this binding gets the same host boundary. */
3816
+ const openaiVaultDestinationSchema = z.object({
3817
+ provider: z.literal("openai-vault"),
3818
+ vaultId: z.string().trim().regex(/^vault_[A-Za-z0-9_-]+$/, "must be an OpenAI vault ID"),
3819
+ allowedHosts: z.array(z.string().trim().toLowerCase().max(253).regex(/^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/, "must be an exact hostname without scheme, port, path, or wildcard")).min(1).max(100).refine((hosts) => new Set(hosts).size === hosts.length, "hostnames must be unique")
3820
+ });
3811
3821
  const syncDestinationSchema = z.discriminatedUnion("provider", [
3812
3822
  vercelDestinationSchema,
3813
3823
  cloudflareWorkersDestinationSchema,
@@ -3827,7 +3837,8 @@ const syncDestinationSchema = z.discriminatedUnion("provider", [
3827
3837
  gcpSecretManagerDestinationSchema,
3828
3838
  langgraphPlatformDestinationSchema,
3829
3839
  azureKeyVaultDestinationSchema,
3830
- huggingfaceSpacesDestinationSchema
3840
+ huggingfaceSpacesDestinationSchema,
3841
+ openaiVaultDestinationSchema
3831
3842
  ]);
3832
3843
  /**
3833
3844
  * How seekrit secret names become destination key names. Applied in order:
@@ -5115,7 +5126,7 @@ async function createAgentTaskToken() {
5115
5126
  }
5116
5127
  //#endregion
5117
5128
  //#region package.json
5118
- var version = "1.7.1";
5129
+ var version = "1.8.0";
5119
5130
  //#endregion
5120
5131
  //#region ../../packages/api-client/src/index.ts
5121
5132
  /**
@@ -14555,6 +14566,7 @@ function credentialNoun(provider) {
14555
14566
  if (provider === "langgraph-platform") return "LangSmith API key";
14556
14567
  if (provider === "azure-key-vault") return "client secret";
14557
14568
  if (provider === "huggingface-spaces") return "user access token";
14569
+ if (provider === "openai-vault") return "OpenAI project API key";
14558
14570
  return "API token";
14559
14571
  }
14560
14572
  /**
@@ -14644,6 +14656,7 @@ function buildConfig(provider, options) {
14644
14656
  };
14645
14657
  }
14646
14658
  case "huggingface-spaces": return { provider: "huggingface-spaces" };
14659
+ case "openai-vault": return { provider: "openai-vault" };
14647
14660
  }
14648
14661
  }
14649
14662
  /** Where inside the platform a binding writes. */
@@ -14861,6 +14874,14 @@ function buildDestination(provider, options) {
14861
14874
  provider: "huggingface-spaces",
14862
14875
  repoId: assertHuggingfaceSpace(options.hfSpace)
14863
14876
  };
14877
+ case "openai-vault":
14878
+ if (!options.openaiVault) fail("--openai-vault is required for openai-vault (vault_… ID)");
14879
+ if (!options.openaiHosts) fail("--openai-hosts is required for openai-vault");
14880
+ return {
14881
+ provider: "openai-vault",
14882
+ vaultId: options.openaiVault.trim(),
14883
+ allowedHosts: list(options.openaiHosts, "")
14884
+ };
14864
14885
  }
14865
14886
  }
14866
14887
  /** One-line description of a destination, for list output. */
@@ -14884,6 +14905,7 @@ function describeDestination(destination) {
14884
14905
  case "langgraph-platform": return `deployment ${destination.deploymentId}`;
14885
14906
  case "azure-key-vault": return `${destination.vault}${destination.prefix ? ` (${destination.prefix}*)` : ""}`;
14886
14907
  case "huggingface-spaces": return `space ${destination.repoId}`;
14908
+ case "openai-vault": return `${destination.vaultId} (${destination.allowedHosts.join(", ")})`;
14887
14909
  case "github-actions": switch (destination.kind) {
14888
14910
  case "repo": return `${destination.owner}/${destination.repo}`;
14889
14911
  case "environment": return `${destination.owner}/${destination.repo} @${destination.environment}`;
@@ -14899,7 +14921,7 @@ function describeDestination(destination) {
14899
14921
  * application whose environment the binding reads from.
14900
14922
  */
14901
14923
  function destinationOptions(command) {
14902
- return command.option("--project <id>", "vercel: project id or name · cloudflare-pages / northflank: project name or slug · bunnyshell: project ID (writes variables new environments inherit)").option("--target <list>", "vercel / cloudflare-pages: comma-separated deployment targets", "production").option("--git-branch <branch>", "vercel: restrict preview writes to one branch").option("--script <name>", "cloudflare-workers: Worker script name").option("--store-id <id>", "cloudflare-secrets-store: store ID (32 hex)").option("--scopes <list>", "cloudflare-secrets-store: comma-separated scopes", "workers").option("--railway-project <id>", "railway: project ID (a UUID)").option("--railway-environment <id>", "railway: environment ID (a UUID)").option("--service <id>", "railway: service ID (omit for the environment's shared variables) · render: service ID (srv-…, or crn-… for a cron job)").option("--skip-deploys", "railway: stage values without triggering a redeploy").option("--path <path>", "aws-parameter-store: hierarchy, e.g. /prod/storefront/ · aws-secrets-manager, azure-key-vault: name prefix").option("--layout <layout>", `aws-secrets-manager: ${AWS_SECRETS_MANAGER_LAYOUTS.join(" | ")}`).option("--secret-name <name>", "aws-secrets-manager: the secret a json-bundle writes to").option("--param-type <type>", `aws-parameter-store: ${AWS_PARAMETER_TYPES.join(" | ")}`).option("--tier <tier>", `aws-parameter-store: ${AWS_PARAMETER_TIERS.join(" | ")}`).option("--kms-key-id <id>", "aws: customer-managed KMS key id, ARN, or alias").option("--env-group <id>", "render: environment group ID (evg-…)").option("--fly-app <name>", "fly: app name, as `fly apps list` shows it").option("--secret-group <id>", "northflank: secret group ID (the slug in its URL)").option("--do-app <id>", "digitalocean: App Platform app ID (the UUID in its URL)").option("--component <name>", "digitalocean: write to one component's variables (omit for app-level)").option("--env-scope <scope>", `digitalocean: ${DIGITALOCEAN_ENV_SCOPES.join(" | ")}`).option("--heroku-app <name>", "heroku: app name, as `heroku apps` shows it (or its UUID)").option("--netlify-site <id>", "netlify: site API ID (the UUID under Project configuration)").option("--no-netlify-secret", "netlify: create readable variables instead of Netlify secrets (write-only)").option("--bunnyshell-environment <id>", "bunnyshell: environment ID (omit to write a project)").option("--no-bunnyshell-secret", "bunnyshell: create variables visible in the dashboard instead of secret ones").option("--gh-repo <owner/name>", "github-actions: repository, e.g. acme/storefront").option("--gh-environment <name>", "github-actions: write to one deployment environment's secrets (needs --gh-repo)").option("--gh-org <login>", "github-actions: write organization secrets instead of a repo's").option("--gh-visibility <v>", `github-actions org secrets: ${GITHUB_ACTIONS_VISIBILITIES.join(" | ")}`).option("--gh-repo-ids <ids>", "github-actions: comma-separated numeric repository IDs for --gh-visibility selected").option("--langgraph-deployment <id>", "langgraph-platform: deployment UUID (the one in its dashboard URL)").option("--gcp-prefix <prefix>", "gcp: prepended to every secret ID, e.g. prod-storefront-").option("--gcp-replication <policy>", `gcp: ${GCP_REPLICATION_POLICIES.join(" | ")}`, "automatic").option("--gcp-locations <list>", "gcp: regions for user-managed replication, e.g. us-east1").option("--gcp-kms-key <name>", "gcp: Cloud KMS key (projects/…/cryptoKeys/…)").option("--gcp-prune-versions", "gcp: destroy the version each push supersedes, keeping one active version").option("--vault <name>", "azure-key-vault: vault name, e.g. acme-prod").option("--hf-space <owner/name>", "huggingface-spaces: Space ID, e.g. acme/support-demo (its owner and name, not a URL)").option("--name-mode <mode>", `azure-key-vault: ${AZURE_KEY_VAULT_NAME_MODES.join(" | ")} — Key Vault stores no underscores, so DATABASE_URL becomes DATABASE-URL unless you reject instead`);
14924
+ return command.option("--project <id>", "vercel: project id or name · cloudflare-pages / northflank: project name or slug · bunnyshell: project ID (writes variables new environments inherit)").option("--target <list>", "vercel / cloudflare-pages: comma-separated deployment targets", "production").option("--git-branch <branch>", "vercel: restrict preview writes to one branch").option("--script <name>", "cloudflare-workers: Worker script name").option("--store-id <id>", "cloudflare-secrets-store: store ID (32 hex)").option("--scopes <list>", "cloudflare-secrets-store: comma-separated scopes", "workers").option("--railway-project <id>", "railway: project ID (a UUID)").option("--railway-environment <id>", "railway: environment ID (a UUID)").option("--service <id>", "railway: service ID (omit for the environment's shared variables) · render: service ID (srv-…, or crn-… for a cron job)").option("--skip-deploys", "railway: stage values without triggering a redeploy").option("--path <path>", "aws-parameter-store: hierarchy, e.g. /prod/storefront/ · aws-secrets-manager, azure-key-vault: name prefix").option("--layout <layout>", `aws-secrets-manager: ${AWS_SECRETS_MANAGER_LAYOUTS.join(" | ")}`).option("--secret-name <name>", "aws-secrets-manager: the secret a json-bundle writes to").option("--param-type <type>", `aws-parameter-store: ${AWS_PARAMETER_TYPES.join(" | ")}`).option("--tier <tier>", `aws-parameter-store: ${AWS_PARAMETER_TIERS.join(" | ")}`).option("--kms-key-id <id>", "aws: customer-managed KMS key id, ARN, or alias").option("--env-group <id>", "render: environment group ID (evg-…)").option("--fly-app <name>", "fly: app name, as `fly apps list` shows it").option("--secret-group <id>", "northflank: secret group ID (the slug in its URL)").option("--do-app <id>", "digitalocean: App Platform app ID (the UUID in its URL)").option("--component <name>", "digitalocean: write to one component's variables (omit for app-level)").option("--env-scope <scope>", `digitalocean: ${DIGITALOCEAN_ENV_SCOPES.join(" | ")}`).option("--heroku-app <name>", "heroku: app name, as `heroku apps` shows it (or its UUID)").option("--netlify-site <id>", "netlify: site API ID (the UUID under Project configuration)").option("--no-netlify-secret", "netlify: create readable variables instead of Netlify secrets (write-only)").option("--bunnyshell-environment <id>", "bunnyshell: environment ID (omit to write a project)").option("--no-bunnyshell-secret", "bunnyshell: create variables visible in the dashboard instead of secret ones").option("--gh-repo <owner/name>", "github-actions: repository, e.g. acme/storefront").option("--gh-environment <name>", "github-actions: write to one deployment environment's secrets (needs --gh-repo)").option("--gh-org <login>", "github-actions: write organization secrets instead of a repo's").option("--gh-visibility <v>", `github-actions org secrets: ${GITHUB_ACTIONS_VISIBILITIES.join(" | ")}`).option("--gh-repo-ids <ids>", "github-actions: comma-separated numeric repository IDs for --gh-visibility selected").option("--langgraph-deployment <id>", "langgraph-platform: deployment UUID (the one in its dashboard URL)").option("--gcp-prefix <prefix>", "gcp: prepended to every secret ID, e.g. prod-storefront-").option("--gcp-replication <policy>", `gcp: ${GCP_REPLICATION_POLICIES.join(" | ")}`, "automatic").option("--gcp-locations <list>", "gcp: regions for user-managed replication, e.g. us-east1").option("--gcp-kms-key <name>", "gcp: Cloud KMS key (projects/…/cryptoKeys/…)").option("--gcp-prune-versions", "gcp: destroy the version each push supersedes, keeping one active version").option("--vault <name>", "azure-key-vault: vault name, e.g. acme-prod").option("--openai-vault <id>", "openai-vault: existing OpenAI Vault ID (vault_…)").option("--openai-hosts <hosts>", "openai-vault: comma-separated exact HTTPS hostnames").option("--hf-space <owner/name>", "huggingface-spaces: Space ID, e.g. acme/support-demo (its owner and name, not a URL)").option("--name-mode <mode>", `azure-key-vault: ${AZURE_KEY_VAULT_NAME_MODES.join(" | ")} — Key Vault stores no underscores, so DATABASE_URL becomes DATABASE-URL unless you reject instead`);
14903
14925
  }
14904
14926
  /** Find a connection by id or name — nobody keeps `syc_…` ids in their head. */
14905
14927
  async function resolveConnection(ctx, orgId, ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seekrit/cli",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "description": "End-to-end encrypted secrets manager CLI — inject decrypted secrets into any command.",
5
5
  "type": "module",
6
6
  "publishConfig": {