@agiflowai/agent-cli 0.2.23 → 0.2.25

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/cli.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { bx as z, bl as H, by as P, bm as M } from "./index-gcsRkQbL.mjs";
2
+ import { by as z, bm as x, bz as S, bn as M } from "./index-DTMl_vl1.mjs";
3
3
  import Q from "node:events";
4
4
  import X from "node:child_process";
5
5
  import Z from "node:path";
6
6
  import ee from "node:fs";
7
7
  import te from "node:process";
8
8
  import ie from "dotenv";
9
- var E = {}, S = {}, V = {}, W;
9
+ var E = {}, V = {}, k = {}, W;
10
10
  function D() {
11
- if (W) return V;
11
+ if (W) return k;
12
12
  W = 1;
13
13
  class g extends Error {
14
14
  /**
@@ -30,11 +30,11 @@ function D() {
30
30
  super(1, "commander.invalidArgument", o), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
31
31
  }
32
32
  }
33
- return V.CommanderError = g, V.InvalidArgumentError = C, V;
33
+ return k.CommanderError = g, k.InvalidArgumentError = C, k;
34
34
  }
35
35
  var j;
36
36
  function N() {
37
- if (j) return S;
37
+ if (j) return V;
38
38
  j = 1;
39
39
  const { InvalidArgumentError: g } = D();
40
40
  class C {
@@ -129,7 +129,7 @@ function N() {
129
129
  const n = o.name() + (o.variadic === !0 ? "..." : "");
130
130
  return o.required ? "<" + n + ">" : "[" + n + "]";
131
131
  }
132
- return S.Argument = C, S.humanReadableArgName = _, S;
132
+ return V.Argument = C, V.humanReadableArgName = _, V;
133
133
  }
134
134
  var T = {}, F = {}, R;
135
135
  function J() {
@@ -373,11 +373,11 @@ function J() {
373
373
  n.wrap(v, a, 0),
374
374
  ""
375
375
  ]));
376
- const x = n.visibleArguments(o).map((t) => O(
376
+ const y = n.visibleArguments(o).map((t) => O(
377
377
  n.argumentTerm(t),
378
378
  n.argumentDescription(t)
379
379
  ));
380
- x.length > 0 && (A = A.concat(["Arguments:", w(x), ""]));
380
+ y.length > 0 && (A = A.concat(["Arguments:", w(y), ""]));
381
381
  const $ = n.visibleOptions(o).map((t) => O(
382
382
  n.optionTerm(t),
383
383
  n.optionDescription(t)
@@ -445,9 +445,9 @@ function J() {
445
445
  }
446
446
  return F.Help = C, F;
447
447
  }
448
- var k = {}, L;
448
+ var P = {}, L;
449
449
  function K() {
450
- if (L) return k;
450
+ if (L) return P;
451
451
  L = 1;
452
452
  const { InvalidArgumentError: g } = D();
453
453
  class C {
@@ -649,7 +649,7 @@ function K() {
649
649
  const f = u.split(/[ |,]+/);
650
650
  return f.length > 1 && !/^[[<]/.test(f[1]) && (a = f.shift()), h = f.shift(), !a && /^-[^-]$/.test(h) && (a = h, h = void 0), { shortFlag: a, longFlag: h };
651
651
  }
652
- return k.Option = C, k.DualOptions = _, k;
652
+ return P.Option = C, P.DualOptions = _, P;
653
653
  }
654
654
  var I = {}, G;
655
655
  function ne() {
@@ -1413,13 +1413,13 @@ Expecting one of '${i.join("', '")}'`);
1413
1413
  let i = !1;
1414
1414
  const s = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1415
1415
  function r(d, b) {
1416
- const y = _.resolve(d, b);
1417
- if (o.existsSync(y)) return y;
1416
+ const H = _.resolve(d, b);
1417
+ if (o.existsSync(H)) return H;
1418
1418
  if (s.includes(_.extname(b))) return;
1419
1419
  const q = s.find(
1420
- (Y) => o.existsSync(`${y}${Y}`)
1420
+ (Y) => o.existsSync(`${H}${Y}`)
1421
1421
  );
1422
- if (q) return `${y}${q}`;
1422
+ if (q) return `${H}${q}`;
1423
1423
  }
1424
1424
  this._checkForMissingMandatoryOptions(), this._checkForConflictingOptions();
1425
1425
  let l = e._executableFile || `${this._name}-${e._name}`, m = this._executableDir || "";
@@ -1451,7 +1451,7 @@ Expecting one of '${i.join("', '")}'`);
1451
1451
  }
1452
1452
  i = s.includes(_.extname(l));
1453
1453
  let c;
1454
- n.platform !== "win32" ? i ? (t.unshift(l), t = x(n.execArgv).concat(t), c = C.spawn(n.argv[0], t, { stdio: "inherit" })) : c = C.spawn(l, t, { stdio: "inherit" }) : (t.unshift(l), t = x(n.execArgv).concat(t), c = C.spawn(n.execPath, t, { stdio: "inherit" })), c.killed || ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((b) => {
1454
+ n.platform !== "win32" ? i ? (t.unshift(l), t = y(n.execArgv).concat(t), c = C.spawn(n.argv[0], t, { stdio: "inherit" })) : c = C.spawn(l, t, { stdio: "inherit" }) : (t.unshift(l), t = y(n.execArgv).concat(t), c = C.spawn(n.execPath, t, { stdio: "inherit" })), c.killed || ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((b) => {
1455
1455
  n.on(b, () => {
1456
1456
  c.killed === !1 && c.exitCode === null && c.kill(b);
1457
1457
  });
@@ -1467,11 +1467,11 @@ Expecting one of '${i.join("', '")}'`);
1467
1467
  ) : n.exit(d);
1468
1468
  }), c.on("error", (d) => {
1469
1469
  if (d.code === "ENOENT") {
1470
- const b = m ? `searched for local subcommand relative to directory '${m}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory", y = `'${l}' does not exist
1470
+ const b = m ? `searched for local subcommand relative to directory '${m}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory", H = `'${l}' does not exist
1471
1471
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
1472
1472
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
1473
1473
  - ${b}`;
1474
- throw new Error(y);
1474
+ throw new Error(H);
1475
1475
  } else if (d.code === "EACCES")
1476
1476
  throw new Error(`'${l}' not executable`);
1477
1477
  if (!p)
@@ -2215,7 +2215,7 @@ Expecting one of '${i.join("', '")}'`);
2215
2215
  t && e.find((s) => t.is(s)) && (this.outputHelp(), this._exit(0, "commander.helpDisplayed", "(outputHelp)"));
2216
2216
  }
2217
2217
  }
2218
- function x($) {
2218
+ function y($) {
2219
2219
  return $.map((e) => {
2220
2220
  if (!e.startsWith("--inspect"))
2221
2221
  return e;
@@ -2259,15 +2259,15 @@ const le = () => {
2259
2259
  let g = !1;
2260
2260
  const C = () => {
2261
2261
  try {
2262
- H.get(P.StdinManager).restoreNormalMode();
2262
+ x.get(S.StdinManager).restoreNormalMode();
2263
2263
  } catch {
2264
2264
  }
2265
2265
  }, _ = async () => {
2266
2266
  if (!g) {
2267
2267
  g = !0, C();
2268
2268
  try {
2269
- if (H.isBound(M.DaemonManager)) {
2270
- const o = H.get(
2269
+ if (x.isBound(M.DaemonManager)) {
2270
+ const o = x.get(
2271
2271
  M.DaemonManager
2272
2272
  );
2273
2273
  if (o.isRunning()) {
@@ -2290,12 +2290,12 @@ le();
2290
2290
  async function ce() {
2291
2291
  const g = new ue();
2292
2292
  g.name("agiflow").description("@agiflowai/agent-cli").option("-v, --verbose", "enable verbose logging").option("--debug", "enable debug mode");
2293
- const C = H.get(P.DaemonCommand), _ = H.get(P.AgentCommand), o = H.get(P.LogoutCommand);
2294
- C.register(g), _.register(g), o.register(g);
2293
+ const C = x.get(S.DaemonCommand), _ = x.get(S.AgentCommand), o = x.get(S.LogoutCommand), n = x.get(S.CredentialsCommand);
2294
+ C.register(g), _.register(g), o.register(g), n.register(g);
2295
2295
  try {
2296
2296
  await g.parseAsync(process.argv);
2297
- } catch (n) {
2298
- console.error("[cli] error", n.message), g.opts().debug && n instanceof Error && console.error(n.stack), process.exit(1);
2297
+ } catch (u) {
2298
+ console.error("[cli] error", u.message), g.opts().debug && u instanceof Error && console.error(u.stack), process.exit(1);
2299
2299
  }
2300
2300
  }
2301
2301
  ce();