@gaberrb/polypus 0.2.0 → 0.2.1

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
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/cli/index.ts
4
4
  import { Command } from "commander";
5
+ import { createRequire } from "module";
5
6
  import pc10 from "picocolors";
6
7
 
7
8
  // src/cli/commands/add-agent.ts
@@ -2937,6 +2938,7 @@ function loadDotenv(paths) {
2937
2938
  }
2938
2939
 
2939
2940
  // src/cli/index.ts
2941
+ var { version: pkgVersion } = createRequire(import.meta.url)("../package.json");
2940
2942
  async function launchInteractive() {
2941
2943
  const config = await loadConfig();
2942
2944
  if (config.agents.length === 0) {
@@ -2962,7 +2964,7 @@ async function resolveLocale() {
2962
2964
  }
2963
2965
  function buildProgram() {
2964
2966
  const program = new Command();
2965
- program.name("polypus").description(t("cli.description")).version("0.1.0").option("--lang <locale>", t("cli.opt.lang")).action(() => launchInteractive());
2967
+ program.name("polypus").description(t("cli.description")).version(pkgVersion).option("--lang <locale>", t("cli.opt.lang")).action(() => launchInteractive());
2966
2968
  program.command("setup").description(t("cli.cmd.setup")).action(() => setup());
2967
2969
  program.command("add-agent").argument("<name>", t("cli.arg.addAgentName")).requiredOption("--provider <provider>", t("cli.opt.provider")).requiredOption("--model <model>", t("cli.opt.model")).option("--api-key <key>", t("cli.opt.apiKey")).option("--base-url <url>", t("cli.opt.baseUrl")).option("--tool-mode <mode>", t("cli.opt.toolMode"), "auto").option("--set-default", t("cli.opt.setDefault")).description(t("cli.cmd.addAgent")).action((name, opts) => addAgent(name, opts));
2968
2970
  program.command("remove-agent").argument("<name>", t("cli.arg.removeAgentName")).description(t("cli.cmd.removeAgent")).action((name) => removeAgent(name));