@standardagents/cli 0.24.6 → 0.25.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.
package/dist/index.js CHANGED
@@ -239,7 +239,7 @@ function getScaffoldStandardAgentsVersion() {
239
239
  if (process.env.STANDARDAGENTS_WORKSPACE === "1") {
240
240
  return "workspace:*";
241
241
  }
242
- return "0.24.6";
242
+ return "0.25.0";
243
243
  }
244
244
  function findViteConfig(cwd) {
245
245
  const candidates = ["vite.config.ts", "vite.config.js", "vite.config.mts", "vite.config.mjs"];
@@ -1529,7 +1529,7 @@ async function ensurePlatformAuth(options, quietLogs = false, context = {}) {
1529
1529
  return { connected: true, mode: "standardagents" };
1530
1530
  }
1531
1531
  function getCliVersion() {
1532
- return "0.24.6";
1532
+ return "0.25.0";
1533
1533
  }
1534
1534
  function getSipVersion() {
1535
1535
  return "1.0.1";
@@ -4569,6 +4569,13 @@ var PROVIDER_DEFINITIONS = [
4569
4569
  label: "Groq",
4570
4570
  envKeys: ["GROQ_API_KEY"]
4571
4571
  },
4572
+ {
4573
+ name: "novita",
4574
+ packageName: "@standardagents/novita",
4575
+ exportName: "novita",
4576
+ label: "Novita AI",
4577
+ envKeys: ["NOVITA_API_KEY"]
4578
+ },
4572
4579
  {
4573
4580
  name: "openai",
4574
4581
  packageName: "@standardagents/openai",
@@ -5055,6 +5062,17 @@ password=${tokenSecret}
5055
5062
  `);
5056
5063
  }
5057
5064
  var DEFAULT_GIT_HELPER_COMMAND = "!npx -y @standardagents/cli@latest git-credential";
5065
+ var STANDARD_AGENTS_GIT_CREDENTIAL_URL_PATTERNS = [
5066
+ "https://standardagents.ai",
5067
+ "https://*.standardagents.ai",
5068
+ "https://standardagentbuilder.com",
5069
+ "https://*.standardagentbuilder.com",
5070
+ "https://artifacts.cloudflare.net",
5071
+ "https://*.artifacts.cloudflare.net",
5072
+ "https://artifacts.cloudflare.com",
5073
+ "https://*.artifacts.cloudflare.com",
5074
+ "https://git.cloudflare.com"
5075
+ ];
5058
5076
  function prompt4(question) {
5059
5077
  const rl = readline.createInterface({
5060
5078
  input: process.stdin,
@@ -5082,19 +5100,43 @@ function runGit(args, runner) {
5082
5100
  }
5083
5101
  return result;
5084
5102
  }
5103
+ function readGlobalConfigValues(runner, key) {
5104
+ const result = runner(["config", "--global", "--get-all", key]);
5105
+ if (result.status !== 0) {
5106
+ if (result.stderr.trim()) {
5107
+ throw new Error(result.stderr.trim());
5108
+ }
5109
+ return null;
5110
+ }
5111
+ if (result.stdout === "") return [];
5112
+ return result.stdout.replace(/\r?\n$/, "").split(/\r?\n/);
5113
+ }
5114
+ function isStandardAgentsHelper(value, helperCommand) {
5115
+ const trimmed = value.trim();
5116
+ return trimmed === helperCommand || trimmed.includes("@standardagents/cli") && trimmed.includes("git-credential");
5117
+ }
5085
5118
  function configureStandardAgentsGitCredentials(options = {}) {
5086
5119
  const runner = options.gitRunner ?? defaultGitRunner;
5087
5120
  const helperCommand = options.helperCommand?.trim() || process.env.STANDARD_AGENTS_GIT_HELPER || DEFAULT_GIT_HELPER_COMMAND;
5088
- const existingResult = runner(["config", "--global", "--get-all", "credential.helper"]);
5089
- if (existingResult.status !== 0 && existingResult.stderr.trim()) {
5090
- throw new Error(existingResult.stderr.trim());
5091
- }
5092
- const existing = existingResult.stdout.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
5093
5121
  let helperAdded = false;
5094
- if (!existing.includes(helperCommand)) {
5095
- runGit(["config", "--global", "--add", "credential.helper", helperCommand], runner);
5122
+ const desired = ["", helperCommand];
5123
+ for (const pattern of STANDARD_AGENTS_GIT_CREDENTIAL_URL_PATTERNS) {
5124
+ const key = `credential.${pattern}.helper`;
5125
+ const existing = readGlobalConfigValues(runner, key);
5126
+ if (existing && existing.length === desired.length && existing.every((value, i) => value === desired[i])) {
5127
+ continue;
5128
+ }
5129
+ if (existing !== null) {
5130
+ runGit(["config", "--global", "--unset-all", key], runner);
5131
+ }
5132
+ runGit(["config", "--global", "--add", key, ""], runner);
5133
+ runGit(["config", "--global", "--add", key, helperCommand], runner);
5096
5134
  helperAdded = true;
5097
5135
  }
5136
+ const generic = readGlobalConfigValues(runner, "credential.helper") ?? [];
5137
+ for (const value of new Set(generic.filter((entry) => isStandardAgentsHelper(entry, helperCommand)))) {
5138
+ runner(["config", "--global", "--unset-all", "--fixed-value", "credential.helper", value]);
5139
+ }
5098
5140
  runGit(["config", "--global", "credential.useHttpPath", "true"], runner);
5099
5141
  return { helperCommand, helperAdded };
5100
5142
  }
@@ -5195,7 +5237,7 @@ async function settleStdinForInitHandoff(stdin = process.stdin) {
5195
5237
  }
5196
5238
  }
5197
5239
  var program = new Command();
5198
- program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.24.6");
5240
+ program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.25.0");
5199
5241
  program.command("init [project-name]").description("Create a new Standard Agents project").option("-y, --yes", "Skip prompts and use defaults").option("--local", "Use local project scaffolding instead of browser platform onboarding").option("--cli", "Use classic line-by-line CLI prompts instead of the TUI wizard").option("--api-url <url>", "Standard Agents platform API URL").option("--endpoint <url>", "Platform API endpoint for auth/bootstrap exchange").option("--package-manager <manager>", "Package manager for generated project: npm, pnpm, yarn, or bun").option("--template <template>", "Vite template to use", "vanilla-ts").option("--workspace", "Install @standardagents packages as workspace:* (local pnpm workspace development)").option("--no-dev", "Clone and configure the project without starting the dev server").addOption(new Option("--bootstrap <code>", "Exchange a web onboarding bootstrap code")).action(init);
5200
5242
  program.command("login").description("Authenticate this machine (or use --bootstrap for project bootstrap auth)").option("--bootstrap <code>", "Bootstrap code from web onboarding").option("--endpoint <url>", "Platform API endpoint (default: https://api.standardagents.ai)").option("--no-open", "Do not auto-open browser URL").action(login);
5201
5243
  program.command("logout").description("Clear stored StandardAgents auth and local org-scoped project auth").option("--org <org-id-or-slug>", "Org ID or slug to logout (defaults to active org)").option("--endpoint <url>", "Platform API endpoint (default: https://api.standardagents.ai)").action(logout);