@swmansion/argent 0.24.1-next.5 → 0.24.1-next.7
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-cmds.mjs +32 -12
- package/dist/installer.mjs +2 -1
- package/dist/mcp-server.mjs +9 -0
- package/dist/tool-server.cjs +2880 -1048
- package/package.json +1 -1
- package/skills/argent-create-flow/SKILL.md +3 -2
- package/skills/argent-create-flow/references/flow-yaml.md +35 -11
- package/skills/argent-create-flow/references/live-authoring.md +23 -10
- package/skills/argent-create-flow/references/reliability-and-recovery.md +1 -1
- package/skills/argent-qa-flows/SKILL.md +7 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -2230,6 +2230,7 @@ import { basename as basename2, extname } from "node:path";
|
|
|
2230
2230
|
var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
|
|
2231
2231
|
var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
|
|
2232
2232
|
var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
|
|
2233
|
+
var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
|
|
2233
2234
|
|
|
2234
2235
|
// ../registry/src/failure-codes.ts
|
|
2235
2236
|
var FAILURE_CODES = {
|
|
@@ -21836,7 +21837,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21836
21837
|
var SESSION_ID2 = randomUUID5();
|
|
21837
21838
|
function readCliVersion() {
|
|
21838
21839
|
if (true) {
|
|
21839
|
-
return "0.24.1-next.
|
|
21840
|
+
return "0.24.1-next.7";
|
|
21840
21841
|
}
|
|
21841
21842
|
return "0.0.0";
|
|
21842
21843
|
}
|
|
@@ -23163,21 +23164,21 @@ Run a YAML flow without an LLM in the loop. \`run\` takes any of these forms:
|
|
|
23163
23164
|
For a name and for a file path alike, the
|
|
23164
23165
|
filename (minus .yaml) names the run's report and artifacts, so it must
|
|
23165
23166
|
contain only letters, numbers, "_", or "-" \u2014 the same charset a name must
|
|
23166
|
-
match. A flow
|
|
23167
|
-
|
|
23168
|
-
authoring one. Exception: a fragment whose first step \`run:\`s a chromium e2e
|
|
23167
|
+
match. A flow is e2e when its first non-\`echo\`/\`script\` step is \`launch\`.
|
|
23168
|
+
Other flows are fragments and use the device's current state. Exception: a fragment whose first step \`run:\`s a chromium e2e
|
|
23169
23169
|
flow boots that flow's app before step 1 \u2014 when that launch is unambiguously
|
|
23170
23170
|
chromium (a lone \`{ chromium: ... }\` target, or --platform chromium); a
|
|
23171
23171
|
multi-platform launch auto-detects a device instead. Pass --device to attach to
|
|
23172
23172
|
a running instance.
|
|
23173
23173
|
|
|
23174
|
-
A directory run prints
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
|
|
23178
|
-
|
|
23179
|
-
|
|
23180
|
-
remaining flows
|
|
23174
|
+
A directory run prints only the steps that need attention (each failure, each
|
|
23175
|
+
warning, and each script step's output), then its outcome, then a final flow
|
|
23176
|
+
summary; --recursive walks subdirectories too (dot-directories and node_modules
|
|
23177
|
+
are skipped). A flow that fails its steps keeps the batch running, as does one
|
|
23178
|
+
the server rejects up front \u2014 an invalid file, or a device it cannot resolve. A
|
|
23179
|
+
transport failure, a rejection the server does not mark as validation, or a
|
|
23180
|
+
reply that is not a report stops the batch and counts the remaining flows
|
|
23181
|
+
skipped.
|
|
23181
23182
|
|
|
23182
23183
|
Runs require the auto-started local tool server;
|
|
23183
23184
|
ARGENT_TOOLS_URL and \`argent link\` routing are not supported.
|
|
@@ -23273,6 +23274,18 @@ function renderStepLine(s, n2, topFlow) {
|
|
|
23273
23274
|
function renderUnderStepLine(s, n2, text2) {
|
|
23274
23275
|
return `${" ".repeat(5 + Math.max(2, String(n2).length))}${stepIndent(s.depth)}${text2}`;
|
|
23275
23276
|
}
|
|
23277
|
+
function renderScriptLogLines(s, n2) {
|
|
23278
|
+
const log2 = typeof s.scriptLog === "string" ? s.scriptLog : "";
|
|
23279
|
+
const lines = [];
|
|
23280
|
+
if (log2) {
|
|
23281
|
+
const body = log2.endsWith("\n") ? log2.slice(0, -1) : log2;
|
|
23282
|
+
for (const line of body.split("\n")) lines.push(renderUnderStepLine(s, n2, `\u2502 ${line}`));
|
|
23283
|
+
}
|
|
23284
|
+
if (s.scriptLogTruncated === true) {
|
|
23285
|
+
lines.push(renderUnderStepLine(s, n2, "\u2502 \u2026 output truncated"));
|
|
23286
|
+
}
|
|
23287
|
+
return lines;
|
|
23288
|
+
}
|
|
23276
23289
|
function renderSummary(report, opts = {}) {
|
|
23277
23290
|
const warnings = report.steps.filter((s) => s.warning).length;
|
|
23278
23291
|
const warningsNote = warnings ? `, ${warnings} warning${warnings === 1 ? "" : "s"}` : "";
|
|
@@ -23301,9 +23314,14 @@ function renderFailedSteps(report) {
|
|
|
23301
23314
|
for (const s of report.steps) {
|
|
23302
23315
|
if (s.kind === "echo") continue;
|
|
23303
23316
|
n2++;
|
|
23304
|
-
|
|
23317
|
+
const scriptLog = renderScriptLogLines(s, n2);
|
|
23318
|
+
const scriptNote = s.kind === "script" && Boolean(s.reason);
|
|
23319
|
+
if (s.status !== "fail" && s.status !== "error" && !s.warning && !scriptNote && scriptLog.length === 0) {
|
|
23320
|
+
continue;
|
|
23321
|
+
}
|
|
23305
23322
|
lines.push(renderStepLine(s, n2, report.flow));
|
|
23306
23323
|
if (s.warning) lines.push(renderUnderStepLine(s, n2, `\u26A0 ${s.warning}`));
|
|
23324
|
+
lines.push(...scriptLog);
|
|
23307
23325
|
if (s.artifacts && typeof s.artifacts === "object") {
|
|
23308
23326
|
for (const [k, v] of Object.entries(s.artifacts)) {
|
|
23309
23327
|
if (typeof v === "string") lines.push(renderUnderStepLine(s, n2, `${k}: ${v}`));
|
|
@@ -23470,6 +23488,7 @@ function renderReport(report) {
|
|
|
23470
23488
|
n2++;
|
|
23471
23489
|
lines.push(renderStepLine(s, n2, report.flow));
|
|
23472
23490
|
if (s.warning) lines.push(renderUnderStepLine(s, n2, `\u26A0 ${s.warning}`));
|
|
23491
|
+
lines.push(...renderScriptLogLines(s, n2));
|
|
23473
23492
|
if (s.artifacts && typeof s.artifacts === "object") {
|
|
23474
23493
|
for (const [k, v] of Object.entries(s.artifacts)) {
|
|
23475
23494
|
if (typeof v === "string") lines.push(renderUnderStepLine(s, n2, `${k}: ${v}`));
|
|
@@ -23870,6 +23889,7 @@ ${recovery}`,
|
|
|
23870
23889
|
liveIndex++;
|
|
23871
23890
|
console.log(renderStepLine(s, liveIndex, flowName));
|
|
23872
23891
|
if (s.warning) console.log(renderUnderStepLine(s, liveIndex, `\u26A0 ${s.warning}`));
|
|
23892
|
+
for (const line of renderScriptLogLines(s, liveIndex)) console.log(line);
|
|
23873
23893
|
};
|
|
23874
23894
|
let report;
|
|
23875
23895
|
try {
|
package/dist/installer.mjs
CHANGED
|
@@ -15582,6 +15582,7 @@ import { basename, extname } from "node:path";
|
|
|
15582
15582
|
var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
|
|
15583
15583
|
var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
|
|
15584
15584
|
var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
|
|
15585
|
+
var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
|
|
15585
15586
|
|
|
15586
15587
|
// ../registry/src/failure-codes.ts
|
|
15587
15588
|
var FAILURE_CODES = {
|
|
@@ -16689,7 +16690,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16689
16690
|
var SESSION_ID = randomUUID4();
|
|
16690
16691
|
function readCliVersion() {
|
|
16691
16692
|
if (true) {
|
|
16692
|
-
return "0.24.1-next.
|
|
16693
|
+
return "0.24.1-next.7";
|
|
16693
16694
|
}
|
|
16694
16695
|
return "0.0.0";
|
|
16695
16696
|
}
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -16410,6 +16410,7 @@ import { basename as basename2, extname } from "node:path";
|
|
|
16410
16410
|
var FLOW_NAME_CHARSET = "[A-Za-z0-9_-]+";
|
|
16411
16411
|
var FLOW_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}$`);
|
|
16412
16412
|
var FLOW_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.yaml$`);
|
|
16413
|
+
var SCRIPT_FILE_NAME_PATTERN = new RegExp(`^${FLOW_NAME_CHARSET}\\.mjs$`);
|
|
16413
16414
|
|
|
16414
16415
|
// ../registry/src/failure-codes.ts
|
|
16415
16416
|
var FAILURE_CODES = {
|
|
@@ -18553,6 +18554,14 @@ async function flowRunToMcpContent(result, ctx) {
|
|
|
18553
18554
|
type: "text",
|
|
18554
18555
|
text: `[${num}] ${glyph}${stepIndent(step.depth)}${stepLabel(step)}${suffix}${warning}`
|
|
18555
18556
|
});
|
|
18557
|
+
const scriptLog = typeof step.scriptLog === "string" ? step.scriptLog : "";
|
|
18558
|
+
const scriptLogTruncated = step.scriptLogTruncated === true;
|
|
18559
|
+
if (scriptLog || scriptLogTruncated) {
|
|
18560
|
+
const parts = [`${stepIndent(step.depth)}script output:`];
|
|
18561
|
+
if (scriptLog) parts.push(scriptLog.endsWith("\n") ? scriptLog.slice(0, -1) : scriptLog);
|
|
18562
|
+
if (scriptLogTruncated) parts.push("\u2026 output truncated");
|
|
18563
|
+
blocks.push({ type: "text", text: parts.join("\n") });
|
|
18564
|
+
}
|
|
18556
18565
|
if (step.result !== void 0) {
|
|
18557
18566
|
blocks.push(...await toMcpContent(step.result, step.outputHint, ctx, step.args));
|
|
18558
18567
|
}
|