@swmansion/argent 0.33.1-next.0 → 0.33.1-next.10

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/cli-cmds.mjs CHANGED
@@ -10204,7 +10204,10 @@ import { basename, extname } from "node:path";
10204
10204
  var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
10205
10205
  var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
10206
10206
  var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
10207
- var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
10207
+ var SCRIPT_FILE_EXTENSIONS = [".mjs", ".mts"];
10208
+ var SCRIPT_FILE_NAME_PATTERN = new RegExp(
10209
+ `^${FLOW_NAME_CHARSET}(?:${SCRIPT_FILE_EXTENSIONS.map((ext) => `\\${ext}`).join("|")})$`
10210
+ );
10208
10211
  function interpolateFileInputPath(template, args) {
10209
10212
  let missing = false;
10210
10213
  const out = template.replace(/\$\{([A-Za-z0-9_]+)\}/g, (_m, name) => {
@@ -10727,6 +10730,8 @@ var FAILURE_CODES = {
10727
10730
  FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
10728
10731
  // The target does not satisfy the test's `requires:` block; a directory run skips it.
10729
10732
  FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
10733
+ // The tool-server's Node.js cannot run a TypeScript `script:` step the test holds.
10734
+ FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED: "FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED",
10730
10735
  PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
10731
10736
  PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
10732
10737
  PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
@@ -35872,7 +35877,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
35872
35877
  var SESSION_ID2 = randomUUID5();
35873
35878
  function readCliVersion() {
35874
35879
  if (true) {
35875
- return "0.33.1-next.0";
35880
+ return "0.33.1-next.10";
35876
35881
  }
35877
35882
  return "0.0.0";
35878
35883
  }
package/dist/client.js CHANGED
@@ -8780,7 +8780,10 @@ import { basename, extname } from "node:path";
8780
8780
  var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
8781
8781
  var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
8782
8782
  var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
8783
- var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
8783
+ var SCRIPT_FILE_EXTENSIONS = [".mjs", ".mts"];
8784
+ var SCRIPT_FILE_NAME_PATTERN = new RegExp(
8785
+ `^${FLOW_NAME_CHARSET}(?:${SCRIPT_FILE_EXTENSIONS.map((ext) => `\\${ext}`).join("|")})$`
8786
+ );
8784
8787
  function interpolateFileInputPath(template, args) {
8785
8788
  let missing = false;
8786
8789
  const out = template.replace(/\$\{([A-Za-z0-9_]+)\}/g, (_m, name) => {
@@ -9300,6 +9303,8 @@ var FAILURE_CODES = {
9300
9303
  FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
9301
9304
  // The target does not satisfy the test's `requires:` block; a directory run skips it.
9302
9305
  FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
9306
+ // The tool-server's Node.js cannot run a TypeScript `script:` step the test holds.
9307
+ FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED: "FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED",
9303
9308
  PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
9304
9309
  PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
9305
9310
  PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
@@ -15735,7 +15735,10 @@ import { basename, extname } from "node:path";
15735
15735
  var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
15736
15736
  var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
15737
15737
  var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
15738
- var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
15738
+ var SCRIPT_FILE_EXTENSIONS = [".mjs", ".mts"];
15739
+ var SCRIPT_FILE_NAME_PATTERN = new RegExp(
15740
+ `^${FLOW_NAME_CHARSET}(?:${SCRIPT_FILE_EXTENSIONS.map((ext) => `\\${ext}`).join("|")})$`
15741
+ );
15739
15742
 
15740
15743
  // ../registry/src/flow-file-refs.ts
15741
15744
  import * as fs7 from "node:fs/promises";
@@ -16059,6 +16062,8 @@ var FAILURE_CODES = {
16059
16062
  FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
16060
16063
  // The target does not satisfy the test's `requires:` block; a directory run skips it.
16061
16064
  FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
16065
+ // The tool-server's Node.js cannot run a TypeScript `script:` step the test holds.
16066
+ FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED: "FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED",
16062
16067
  PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
16063
16068
  PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
16064
16069
  PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
@@ -16981,7 +16986,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16981
16986
  var SESSION_ID = randomUUID4();
16982
16987
  function readCliVersion() {
16983
16988
  if (true) {
16984
- return "0.33.1-next.0";
16989
+ return "0.33.1-next.10";
16985
16990
  }
16986
16991
  return "0.0.0";
16987
16992
  }
@@ -20064,7 +20069,7 @@ function localInstallCommand(pm, pkg) {
20064
20069
  case "yarn":
20065
20070
  return { bin: "yarn", args: ["add", "--dev", pkg] };
20066
20071
  case "pnpm":
20067
- return { bin: "pnpm", args: ["add", "-D", pkg] };
20072
+ return { bin: "pnpm", args: ["add", "-D", "--ignore-workspace-root-check", pkg] };
20068
20073
  case "bun":
20069
20074
  return { bin: "bun", args: ["add", "-d", pkg] };
20070
20075
  default:
@@ -20654,6 +20659,7 @@ function isNewerVersion(candidate, current) {
20654
20659
  function withNpmForce(npxArgs) {
20655
20660
  return ["--force", ...npxArgs];
20656
20661
  }
20662
+ var SKIPPED_SKILLS_SOURCE_SUBMODULES = ["packages/argent-private"];
20657
20663
  function npxChildEnv(env = process.env) {
20658
20664
  const childEnv = { ...env };
20659
20665
  for (const key of Object.keys(childEnv)) {
@@ -20661,14 +20667,23 @@ function npxChildEnv(env = process.env) {
20661
20667
  delete childEnv[key];
20662
20668
  }
20663
20669
  }
20670
+ const existing = Number(childEnv.GIT_CONFIG_COUNT ?? 0);
20671
+ let count = Number.isInteger(existing) && existing >= 0 ? existing : 0;
20672
+ for (const name of SKIPPED_SKILLS_SOURCE_SUBMODULES) {
20673
+ childEnv[`GIT_CONFIG_KEY_${count}`] = `submodule.${name}.update`;
20674
+ childEnv[`GIT_CONFIG_VALUE_${count}`] = "none";
20675
+ count += 1;
20676
+ }
20677
+ childEnv.GIT_CONFIG_COUNT = String(count);
20664
20678
  return childEnv;
20665
20679
  }
20666
- function isSkillsCliAvailable() {
20680
+ function isSkillsCliAvailable(cwd) {
20667
20681
  try {
20668
20682
  execSync("npx --force --no-install skills --version", {
20669
20683
  env: npxChildEnv(),
20670
20684
  stdio: ["ignore", "ignore", "ignore"],
20671
- timeout: PROBE_TIMEOUT_MS
20685
+ timeout: PROBE_TIMEOUT_MS,
20686
+ ...cwd ? { cwd } : {}
20672
20687
  });
20673
20688
  return true;
20674
20689
  } catch {
@@ -22470,7 +22485,11 @@ function runShellCommand(cmd, opts = {}) {
22470
22485
  shell: process.platform === "win32",
22471
22486
  ...opts.cwd ? { cwd: opts.cwd } : {}
22472
22487
  });
22488
+ let stdout2 = "";
22473
22489
  let stderr = "";
22490
+ child.stdout?.on("data", (chunk) => {
22491
+ stdout2 += chunk.toString();
22492
+ });
22474
22493
  child.stderr?.on("data", (chunk) => {
22475
22494
  stderr += chunk.toString();
22476
22495
  });
@@ -22479,7 +22498,7 @@ function runShellCommand(cmd, opts = {}) {
22479
22498
  else
22480
22499
  reject(
22481
22500
  new ShellCommandError(
22482
- stderr.trim() || (signal !== null ? `Command terminated by signal ${signal}` : `Command exited with code ${code}`),
22501
+ stderr.trim() || stdout2.trim() || (signal !== null ? `Command terminated by signal ${signal}` : `Command exited with code ${code}`),
22483
22502
  code,
22484
22503
  signal
22485
22504
  )
@@ -23345,10 +23364,10 @@ function bundledCopyFor(version) {
23345
23364
  }
23346
23365
  return SKILLS_DIR;
23347
23366
  }
23348
- function printManualInstructions(source, bundledCopy, scope, customRoot, npxMissing = false) {
23349
- const root = scope === "global" ? "~" : scope === "custom" ? customRoot : ".";
23367
+ function printManualInstructions(source, bundledCopy, scope, root, npxMissing = false) {
23368
+ const dir = (sub) => scope === "global" ? `~/${sub}` : shellQuotePath(`${root}/${sub}`);
23350
23369
  const add = `skills add ${source}${scope === "global" ? " -g" : ""} --skill '*' -y`;
23351
- const cd = scope === "custom" ? `cd ${customRoot} && ` : "";
23370
+ const cd = scope === "global" ? "" : `cd ${shellQuotePath(root)} && `;
23352
23371
  note(
23353
23372
  [
23354
23373
  `Skills are bundled at:`,
@@ -23357,10 +23376,10 @@ function printManualInstructions(source, bundledCopy, scope, customRoot, npxMiss
23357
23376
  `To install manually, copy them to your editor's skills directory:`,
23358
23377
  ``,
23359
23378
  ` ${import_picocolors10.default.dim("# Claude Code")}`,
23360
- ` mkdir -p ${root}/.claude/skills && cp -r ${bundledCopy}/* ${root}/.claude/skills/`,
23379
+ ` mkdir -p ${dir(".claude/skills")} && cp -r ${bundledCopy}/* ${dir(".claude/skills/")}`,
23361
23380
  ``,
23362
23381
  ` ${import_picocolors10.default.dim("# Cursor")}`,
23363
- ` mkdir -p ${root}/.cursor/skills && cp -r ${bundledCopy}/* ${root}/.cursor/skills/`,
23382
+ ` mkdir -p ${dir(".cursor/skills")} && cp -r ${bundledCopy}/* ${dir(".cursor/skills/")}`,
23364
23383
  ``,
23365
23384
  ...npxMissing ? [` ${import_picocolors10.default.dim("# Or, with pnpm:")}`, ` ${cd}pnpm dlx ${add}`] : [` ${import_picocolors10.default.dim("# Or use npx skills directly:")}`, ` ${cd}npx ${add}`]
23366
23385
  ].join("\n"),
@@ -23392,12 +23411,13 @@ function formatSkillsSummaryLine(skills) {
23392
23411
  return `${import_picocolors10.default.green("Skills")} ${written} installed`;
23393
23412
  }
23394
23413
  async function runSkillsStep(args) {
23395
- const { nonInteractive, fromTar, version, scope, customRoot } = args;
23414
+ const { nonInteractive, fromTar, version, scope, effectiveRoot } = args;
23415
+ const skillsCwd = scope === "global" ? void 0 : effectiveRoot;
23396
23416
  log.step(import_picocolors10.default.bold("Step 2: Skills Installation"));
23397
23417
  log.warn(import_picocolors10.default.yellow("Skills installation is required for Argent to function properly."));
23398
23418
  let skillsMethod;
23399
23419
  const online = await isOnline();
23400
- const offlineWithCache = !online && isSkillsCliAvailable();
23420
+ const offlineWithCache = !online && isSkillsCliAvailable(skillsCwd);
23401
23421
  const skillsCliReady = online || offlineWithCache;
23402
23422
  if (!skillsCliReady) {
23403
23423
  log.warn(
@@ -23436,8 +23456,7 @@ async function runSkillsStep(args) {
23436
23456
  const useGitHubSource = online && !fromTar && version !== "unknown";
23437
23457
  const skillsSource = useGitHubSource ? buildArgentSkillsSource(version) : SKILLS_DIR;
23438
23458
  const bundledCopy = useGitHubSource ? bundledCopyFor(version) : SKILLS_DIR;
23439
- const skillsCwd = scope === "custom" ? customRoot : void 0;
23440
- const skillsRoot = scope === "global" ? os3.homedir() : skillsCwd ?? process.cwd();
23459
+ const skillsRoot = scope === "global" ? os3.homedir() : effectiveRoot;
23441
23460
  const skillsScope = scope === "global" ? "global" : "project";
23442
23461
  const expected = listBundledSkills(bundledCopy);
23443
23462
  const snapshot = () => snapshotArgentSkills(skillsRoot, skillsScope, expected);
@@ -23447,7 +23466,7 @@ async function runSkillsStep(args) {
23447
23466
  let installedFrom = skillsSource;
23448
23467
  let fallbackReason = null;
23449
23468
  if (skillsMethod === "manual") {
23450
- printManualInstructions(skillsSource, bundledCopy, scope, customRoot);
23469
+ printManualInstructions(skillsSource, bundledCopy, scope, effectiveRoot);
23451
23470
  skillOutcome = "skipped";
23452
23471
  } else {
23453
23472
  const interactive = skillsMethod === "interactive";
@@ -23471,7 +23490,7 @@ async function runSkillsStep(args) {
23471
23490
  const fail = (err, attempted, npxMissing = false) => {
23472
23491
  if (!interactive) spinner2.stop(import_picocolors10.default.red("Skills installation failed."));
23473
23492
  log.error(`Failed to install skills from ${attempted}: ${meaningfulLine(err)}`);
23474
- printManualInstructions(bundledCopy, bundledCopy, scope, customRoot, npxMissing);
23493
+ printManualInstructions(bundledCopy, bundledCopy, scope, effectiveRoot, npxMissing);
23475
23494
  return "failure";
23476
23495
  };
23477
23496
  try {
@@ -23746,7 +23765,7 @@ async function init2(args) {
23746
23765
  fromTar: parsed.fromTar,
23747
23766
  version,
23748
23767
  scope,
23749
- customRoot
23768
+ effectiveRoot
23750
23769
  });
23751
23770
  log.step(import_picocolors11.default.bold("Step 3: Rules"));
23752
23771
  const copyResults = copyRulesAndAgents(
@@ -25490,7 +25490,10 @@ import { basename, extname } from "node:path";
25490
25490
  var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
25491
25491
  var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
25492
25492
  var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
25493
- var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
25493
+ var SCRIPT_FILE_EXTENSIONS = [".mjs", ".mts"];
25494
+ var SCRIPT_FILE_NAME_PATTERN = new RegExp(
25495
+ `^${FLOW_NAME_CHARSET}(?:${SCRIPT_FILE_EXTENSIONS.map((ext) => `\\${ext}`).join("|")})$`
25496
+ );
25494
25497
  function interpolateFileInputPath(template, args) {
25495
25498
  let missing = false;
25496
25499
  const out = template.replace(/\$\{([A-Za-z0-9_]+)\}/g, (_m, name) => {
@@ -26010,6 +26013,8 @@ var FAILURE_CODES = {
26010
26013
  FLOW_DEVICE_RESOLUTION: "FLOW_DEVICE_RESOLUTION",
26011
26014
  // The target does not satisfy the test's `requires:` block; a directory run skips it.
26012
26015
  FLOW_REQUIREMENTS_UNMET: "FLOW_REQUIREMENTS_UNMET",
26016
+ // The tool-server's Node.js cannot run a TypeScript `script:` step the test holds.
26017
+ FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED: "FLOW_SCRIPT_TYPESCRIPT_UNSUPPORTED",
26013
26018
  PROFILER_QUERY_MODE_INVALID: "PROFILER_QUERY_MODE_INVALID",
26014
26019
  PROFILER_QUERY_REQUIRED_PARAM_MISSING: "PROFILER_QUERY_REQUIRED_PARAM_MISSING",
26015
26020
  PROFILER_DATA_NOT_LOADED: "PROFILER_DATA_NOT_LOADED",
@@ -209,7 +209,7 @@ export interface ArgentToolArgs {
209
209
  name: string;
210
210
  /** Absolute project root passed to e2e-start-recording. */
211
211
  project_root: string;
212
- /** Path to the .mjs file, relative to the e2e test YAML. For example: "../../scripts/seed-order.mjs". */
212
+ /** Path to the .mjs or .mts file, relative to the e2e test YAML. For example: "../../scripts/seed-order.mjs". */
213
213
  path: string;
214
214
  /** Time limit in milliseconds. The default is 30000 and the minimum is 100. */
215
215
  timeout?: number;