@standardagents/cli 0.45.6 → 0.45.7

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/README.md CHANGED
@@ -1,3 +1,25 @@
1
+ <p align="center">
2
+ <a href="https://standardagents.ai">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://standardagents.ai/images/standard-agents-logo.svg">
5
+ <img src="https://standardagents.ai/images/standard-agents-logo-dark.svg" alt="Standard Agents" width="300">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <p align="center">Standard Agents Builder is a TypeScript framework for building, testing, and running production AI agents.</p>
11
+
12
+ ```bash
13
+ npx @standardagents/cli@latest init
14
+ ```
15
+
16
+ <picture>
17
+ <source media="(prefers-color-scheme: dark)" srcset="https://standardagents.ai/images/take3/demo-run-start-dark.webp">
18
+ <img src="https://standardagents.ai/images/take3/demo-run-start-light.webp" alt="The Standard Agents Builder home screen, with threads, spend, and failures for each agent in a project">
19
+ </picture>
20
+
21
+ See the docs at [standardagents.ai](https://standardagents.ai). The full command reference follows.
22
+
1
23
  # @standardagents/cli
2
24
 
3
25
  Command-line tool for Standard Agents Builder: project setup, sign-in,
@@ -55,7 +77,7 @@ one. The account supplies inference for your agents.
55
77
 
56
78
  This command will:
57
79
  - Print the sign-in URL, then open Standard Agents in your browser for login, billing, and platform repository setup
58
- - Show elapsed time and the session's remaining time while it waits. Press Ctrl-C to cancel; the pending sign-in session is cancelled on the platform
80
+ - Show the session's remaining time on one line while it waits. Press Ctrl-C to cancel; the pending sign-in session is cancelled on the platform
59
81
  - Clone the created platform-owned Artifact repository into the directory where you ran the command
60
82
  - Write `STANDARD_AGENTS_API_KEY`, `PLATFORM_ENDPOINT`, and `STANDARD_AGENTS_API_URL` to `.dev.vars`. It writes no admin password: your local instance signs in with your Standard Agents account
61
83
  - Configure a repo-local Git credential helper that mints short-lived Artifacts tokens through the Standard Agents platform
package/dist/index.js CHANGED
@@ -1446,6 +1446,9 @@ function parkUntilExit() {
1446
1446
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
1447
1447
  var CLEAR_LINE = "\r\x1B[2K";
1448
1448
  var CANCEL_HINT = "Press Ctrl-C to cancel.";
1449
+ var SHORT_CANCEL_HINT = "Ctrl-C to cancel";
1450
+ var FRAME_MS = 100;
1451
+ var DEFAULT_COLUMNS = 80;
1449
1452
  function formatDuration(ms) {
1450
1453
  const totalSeconds = Math.max(0, Math.floor(ms / 1e3));
1451
1454
  const minutes = Math.floor(totalSeconds / 60);
@@ -1464,17 +1467,23 @@ function startWaitIndicator(options) {
1464
1467
  return { note: log, stop: () => {
1465
1468
  } };
1466
1469
  }
1470
+ const useColor = !process.env.NO_COLOR;
1471
+ const dim = (text2) => useColor ? `\x1B[2m${text2}\x1B[22m` : text2;
1472
+ const accent = (text2) => useColor ? `\x1B[36m${text2}\x1B[39m` : text2;
1467
1473
  let frame = 0;
1468
1474
  let stopped = false;
1469
1475
  const render3 = () => {
1470
- const now = Date.now();
1471
- stream.write(
1472
- `${CLEAR_LINE}${SPINNER_FRAMES[frame]} ${options.label} (${formatDuration(now - startedAt)} elapsed, expires in ${formatDuration(options.expiresAt - now)}). ${CANCEL_HINT}`
1473
- );
1476
+ const width = Math.max(1, (stream.columns || DEFAULT_COLUMNS) - 1);
1477
+ const left = `${formatDuration(options.expiresAt - Date.now())} left`;
1478
+ const tails = [` \xB7 ${left} \xB7 ${SHORT_CANCEL_HINT}`, ` \xB7 ${left}`, ""];
1479
+ const room = width - 2;
1480
+ const label = options.label.length > room ? `${options.label.slice(0, Math.max(0, room - 1)).trimEnd()}\u2026` : options.label;
1481
+ const tail = tails.find((candidate) => label.length + candidate.length <= room) ?? "";
1482
+ stream.write(`${CLEAR_LINE}${accent(SPINNER_FRAMES[frame])} ${label}${dim(tail)}`);
1474
1483
  frame = (frame + 1) % SPINNER_FRAMES.length;
1475
1484
  };
1476
1485
  render3();
1477
- const timer = setInterval(render3, 1e3);
1486
+ const timer = setInterval(render3, FRAME_MS);
1478
1487
  return {
1479
1488
  note(message) {
1480
1489
  if (stopped) {
@@ -1666,7 +1675,7 @@ function getScaffoldStandardAgentsVersion() {
1666
1675
  if (process.env.STANDARDAGENTS_WORKSPACE === "1") {
1667
1676
  return workspacePackageLink("@standardagents/builder");
1668
1677
  }
1669
- return "0.45.6";
1678
+ return "0.45.7";
1670
1679
  }
1671
1680
  function findViteConfig(cwd) {
1672
1681
  const candidates = ["vite.config.ts", "vite.config.js", "vite.config.mts", "vite.config.mjs"];
@@ -1994,7 +2003,7 @@ function writeBuildGuardScript(projectPath) {
1994
2003
 
1995
2004
  // src/utils/git-helper-command.ts
1996
2005
  function cliVersion() {
1997
- return "0.45.6";
2006
+ return "0.45.7";
1998
2007
  }
1999
2008
  function defaultGitCredentialHelperCommand(version = cliVersion()) {
2000
2009
  return `!npx -y @standardagents/cli@${version} git-credential`;
@@ -2982,7 +2991,7 @@ function renderInitStepHeader(stage, title, subtitle, options) {
2982
2991
  logger.log("");
2983
2992
  }
2984
2993
  function getCliVersion() {
2985
- return "0.45.6";
2994
+ return "0.45.7";
2986
2995
  }
2987
2996
  function getSipVersion() {
2988
2997
  return "1.0.1";
@@ -10149,7 +10158,7 @@ async function settleStdinForInitHandoff(stdin = process.stdin) {
10149
10158
  }
10150
10159
  }
10151
10160
  var program = new Command();
10152
- program.name("agents").description("CLI tool for Standard Agents Builder").version("0.45.6").exitOverride();
10161
+ program.name("agents").description("CLI tool for Standard Agents Builder").version("0.45.7").exitOverride();
10153
10162
  registerInitCommand(program);
10154
10163
  registerLoginCommands(program);
10155
10164
  addPlatformEndpointOption(
@@ -10174,7 +10183,7 @@ program.command("skill").description("Install the bundled Standard Agents Builde
10174
10183
  program.command("current-models").description("Print the live curated model guide from standardagentspec.org (standardagentspec.com when that request fails)").option("--url <url>", "Request this models markdown URL instead").action(currentModels);
10175
10184
  program.command("available-models").description("List the model IDs of one provider in the current project, using its own key or the project's Standard Agents account key").option("--provider <provider>", "Provider to query: an installed provider package such as openai, or a provider defined in agents/providers/").option("--json", "Print the provider and its models as one JSON document on stdout").action(availableModels);
10176
10185
  registerDiagCommand(program);
10177
- registerTermsCommand(program, "0.45.6");
10186
+ registerTermsCommand(program, "0.45.7");
10178
10187
  async function run() {
10179
10188
  const userArgs = process.argv.slice(2);
10180
10189
  if (userArgs[0] !== "git-credential") {