@struere/cli 0.1.1 → 0.1.2

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 +24 -24
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -641,7 +641,7 @@ function getDevHtml(agentName, mode, cloudUrl) {
641
641
  const resultText = typeof data.toolResult === 'string'
642
642
  ? data.toolResult
643
643
  : JSON.stringify(data.toolResult || data.toolCall?.result, null, 2);
644
- addMessage('tool', ' Result: ' + resultText);
644
+ addMessage('tool', '\u2713 Result: ' + resultText);
645
645
  } else if (data.type === 'finish') {
646
646
  assistantDiv.classList.remove('streaming');
647
647
  } else if (data.type === 'error') {
@@ -809,7 +809,7 @@ var buildCommand = new Command2("build").description("Build and validate agent f
809
809
  spinner.fail("Validation failed");
810
810
  console.log();
811
811
  for (const error of errors) {
812
- console.log(chalk2.red(" "), error);
812
+ console.log(chalk2.red(" \u2717"), error);
813
813
  }
814
814
  console.log();
815
815
  process.exit(1);
@@ -827,7 +827,7 @@ var buildCommand = new Command2("build").description("Build and validate agent f
827
827
  spinner.fail("Build failed");
828
828
  console.log();
829
829
  for (const log of result.logs) {
830
- console.log(chalk2.red(" "), log.message);
830
+ console.log(chalk2.red(" \u2717"), log.message);
831
831
  }
832
832
  process.exit(1);
833
833
  }
@@ -837,7 +837,7 @@ var buildCommand = new Command2("build").description("Build and validate agent f
837
837
  console.log();
838
838
  console.log("Output files:");
839
839
  for (const output of result.outputs) {
840
- console.log(chalk2.gray(" "), output.path.replace(cwd, "."));
840
+ console.log(chalk2.gray(" \u2022"), output.path.replace(cwd, "."));
841
841
  }
842
842
  console.log();
843
843
  });
@@ -895,11 +895,11 @@ var testCommand = new Command3("test").description("Run test conversations").arg
895
895
  const result = options.dryRun ? await runDryTest(testCase) : await runTest(testCase, agent, options.verbose);
896
896
  results.push(result);
897
897
  if (result.passed) {
898
- console.log(chalk3.green(" "), result.name);
898
+ console.log(chalk3.green(" \u2713"), result.name);
899
899
  } else {
900
- console.log(chalk3.red(" "), result.name);
900
+ console.log(chalk3.red(" \u2717"), result.name);
901
901
  for (const error of result.errors) {
902
- console.log(chalk3.red(" "), error);
902
+ console.log(chalk3.red(" \u2192"), error);
903
903
  }
904
904
  }
905
905
  }
@@ -1042,7 +1042,7 @@ var deployCommand = new Command4("deploy").description("Deploy agent to Agent Fa
1042
1042
  spinner.fail("Validation failed");
1043
1043
  console.log();
1044
1044
  for (const error of errors) {
1045
- console.log(chalk4.red(" "), error);
1045
+ console.log(chalk4.red(" \u2717"), error);
1046
1046
  }
1047
1047
  console.log();
1048
1048
  process.exit(1);
@@ -1053,9 +1053,9 @@ var deployCommand = new Command4("deploy").description("Deploy agent to Agent Fa
1053
1053
  console.log(chalk4.yellow("Dry run mode - no changes will be made"));
1054
1054
  console.log();
1055
1055
  console.log("Would deploy:");
1056
- console.log(chalk4.gray(" "), `Agent: ${chalk4.cyan(agent.name)}`);
1057
- console.log(chalk4.gray(" "), `Version: ${chalk4.cyan(agent.version)}`);
1058
- console.log(chalk4.gray(" "), `Environment: ${chalk4.cyan(options.env)}`);
1056
+ console.log(chalk4.gray(" \u2022"), `Agent: ${chalk4.cyan(agent.name)}`);
1057
+ console.log(chalk4.gray(" \u2022"), `Version: ${chalk4.cyan(agent.version)}`);
1058
+ console.log(chalk4.gray(" \u2022"), `Environment: ${chalk4.cyan(options.env)}`);
1059
1059
  console.log();
1060
1060
  return;
1061
1061
  }
@@ -1079,7 +1079,7 @@ var deployCommand = new Command4("deploy").description("Deploy agent to Agent Fa
1079
1079
  spinner.fail("Build failed");
1080
1080
  console.log();
1081
1081
  for (const log of result.logs) {
1082
- console.log(chalk4.red(" "), log);
1082
+ console.log(chalk4.red(" \u2022"), log);
1083
1083
  }
1084
1084
  console.log();
1085
1085
  process.exit(1);
@@ -1121,10 +1121,10 @@ var deployCommand = new Command4("deploy").description("Deploy agent to Agent Fa
1121
1121
  console.log(chalk4.green("Success!"), "Agent deployed");
1122
1122
  console.log();
1123
1123
  console.log("Deployment details:");
1124
- console.log(chalk4.gray(" "), `ID: ${chalk4.cyan(deployment.id)}`);
1125
- console.log(chalk4.gray(" "), `Version: ${chalk4.cyan(deployment.version)}`);
1126
- console.log(chalk4.gray(" "), `Environment: ${chalk4.cyan(deployment.environment)}`);
1127
- console.log(chalk4.gray(" "), `URL: ${chalk4.cyan(deployment.url)}`);
1124
+ console.log(chalk4.gray(" \u2022"), `ID: ${chalk4.cyan(deployment.id)}`);
1125
+ console.log(chalk4.gray(" \u2022"), `Version: ${chalk4.cyan(deployment.version)}`);
1126
+ console.log(chalk4.gray(" \u2022"), `Environment: ${chalk4.cyan(deployment.environment)}`);
1127
+ console.log(chalk4.gray(" \u2022"), `URL: ${chalk4.cyan(deployment.url)}`);
1128
1128
  console.log();
1129
1129
  console.log(chalk4.gray("Test your agent:"));
1130
1130
  console.log(chalk4.gray(" $"), chalk4.cyan(`curl -X POST ${deployment.url}/chat -H "Authorization: Bearer YOUR_API_KEY" -d '{"message": "Hello"}'`));
@@ -1182,7 +1182,7 @@ var validateCommand = new Command5("validate").description("Validate agent confi
1182
1182
  if (errors.length === 0 && warnings.length === 0) {
1183
1183
  spinner.succeed("Agent is valid");
1184
1184
  console.log();
1185
- console.log(chalk5.green(""), "No issues found");
1185
+ console.log(chalk5.green("\u2713"), "No issues found");
1186
1186
  console.log();
1187
1187
  return;
1188
1188
  }
@@ -1191,7 +1191,7 @@ var validateCommand = new Command5("validate").description("Validate agent confi
1191
1191
  console.log();
1192
1192
  console.log(chalk5.red("Errors:"));
1193
1193
  for (const error of errors) {
1194
- console.log(chalk5.red(" "), error);
1194
+ console.log(chalk5.red(" \u2717"), error);
1195
1195
  }
1196
1196
  } else {
1197
1197
  spinner.succeed("Validation passed with warnings");
@@ -1200,7 +1200,7 @@ var validateCommand = new Command5("validate").description("Validate agent confi
1200
1200
  console.log();
1201
1201
  console.log(chalk5.yellow("Warnings:"));
1202
1202
  for (const warning of warnings) {
1203
- console.log(chalk5.yellow(" "), warning);
1203
+ console.log(chalk5.yellow(" \u26A0"), warning);
1204
1204
  }
1205
1205
  }
1206
1206
  console.log();
@@ -1359,7 +1359,7 @@ var stateCommand = new Command7("state").description("Inspect conversation state
1359
1359
  } else {
1360
1360
  for (const [key, value] of Object.entries(state.state)) {
1361
1361
  const displayValue = typeof value === "object" ? JSON.stringify(value) : String(value);
1362
- console.log(chalk7.gray(" "), `${key}:`, chalk7.cyan(displayValue));
1362
+ console.log(chalk7.gray(" \u2022"), `${key}:`, chalk7.cyan(displayValue));
1363
1363
  }
1364
1364
  }
1365
1365
  console.log();
@@ -1526,9 +1526,9 @@ async function headlessLogin(spinner) {
1526
1526
  }
1527
1527
  function printNextSteps() {
1528
1528
  console.log(chalk8.gray("You can now use:"));
1529
- console.log(chalk8.gray(" "), chalk8.cyan("af dev"), chalk8.gray("- Start cloud-connected dev server"));
1530
- console.log(chalk8.gray(" "), chalk8.cyan("af deploy"), chalk8.gray("- Deploy your agent"));
1531
- console.log(chalk8.gray(" "), chalk8.cyan("af logs"), chalk8.gray("- View agent logs"));
1529
+ console.log(chalk8.gray(" \u2022"), chalk8.cyan("af dev"), chalk8.gray("- Start cloud-connected dev server"));
1530
+ console.log(chalk8.gray(" \u2022"), chalk8.cyan("af deploy"), chalk8.gray("- Deploy your agent"));
1531
+ console.log(chalk8.gray(" \u2022"), chalk8.cyan("af logs"), chalk8.gray("- View agent logs"));
1532
1532
  console.log();
1533
1533
  }
1534
1534
  function getAuthUrl() {
@@ -1598,7 +1598,7 @@ async function prompt(message, hidden = false) {
1598
1598
  resolve(input);
1599
1599
  } else if (char === "\x03") {
1600
1600
  process.exit();
1601
- } else if (char === "") {
1601
+ } else if (char === "\x7F") {
1602
1602
  input = input.slice(0, -1);
1603
1603
  } else {
1604
1604
  input += char;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@struere/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "CLI tool for developing, testing, and deploying AI agents",
5
5
  "keywords": ["ai", "agents", "cli", "developer-tools", "llm"],
6
6
  "author": "struere",
@@ -24,7 +24,7 @@
24
24
  "main": "./dist/index.js",
25
25
  "files": ["dist"],
26
26
  "scripts": {
27
- "build": "bun build ./src/index.ts --outdir ./dist --target node --external commander --external chalk --external ora --external chokidar --external yaml --external @struere/runtime && chmod +x ./dist/index.js",
27
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun --external commander --external chalk --external ora --external chokidar --external yaml --external @struere/runtime && chmod +x ./dist/index.js",
28
28
  "dev": "tsc --watch",
29
29
  "test": "bun test"
30
30
  },