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