@swmansion/argent 0.24.1-next.4 → 0.24.1-next.6
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 +41 -9
- package/dist/installer.mjs +13 -1
- package/dist/mcp-server.mjs +20 -0
- package/dist/tool-server.cjs +2472 -960
- package/package.json +1 -1
- package/skills/argent-create-flow/SKILL.md +2 -2
- package/skills/argent-create-flow/references/flow-yaml.md +50 -11
- package/skills/argent-create-flow/references/live-authoring.md +20 -8
- package/skills/argent-create-flow/references/reliability-and-recovery.md +1 -1
- package/skills/argent-qa-flows/SKILL.md +4 -4
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 = {
|
|
@@ -21090,6 +21091,13 @@ var PLATFORMS = [
|
|
|
21090
21091
|
"tvos",
|
|
21091
21092
|
"android-tv"
|
|
21092
21093
|
];
|
|
21094
|
+
var DEVICE_KINDS = [
|
|
21095
|
+
"simulator",
|
|
21096
|
+
"emulator",
|
|
21097
|
+
"vvd",
|
|
21098
|
+
"device",
|
|
21099
|
+
"app"
|
|
21100
|
+
];
|
|
21093
21101
|
var DEBUGGER_NOT_CONNECTED_REASONS = [
|
|
21094
21102
|
"metro_not_running",
|
|
21095
21103
|
"no_app_connected",
|
|
@@ -21133,6 +21141,7 @@ var arrayOf = (elem, maxLen = 16) => (v) => {
|
|
|
21133
21141
|
};
|
|
21134
21142
|
var TOOL_NAME = matches(/^[a-z][a-z0-9_-]{0,63}$/, 64);
|
|
21135
21143
|
var PLATFORM = oneOf(PLATFORMS);
|
|
21144
|
+
var DEVICE_KIND = oneOf(DEVICE_KINDS);
|
|
21136
21145
|
var UUID = matches(
|
|
21137
21146
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
|
21138
21147
|
36
|
|
@@ -21276,6 +21285,7 @@ var ALLOWED = {
|
|
|
21276
21285
|
tool: TOOL_NAME,
|
|
21277
21286
|
tool_invocation_id: UUID,
|
|
21278
21287
|
platform: PLATFORM,
|
|
21288
|
+
device_kind: DEVICE_KIND,
|
|
21279
21289
|
...AI_TELEMETRY
|
|
21280
21290
|
},
|
|
21281
21291
|
"tool:complete": {
|
|
@@ -21283,6 +21293,7 @@ var ALLOWED = {
|
|
|
21283
21293
|
tool: TOOL_NAME,
|
|
21284
21294
|
tool_invocation_id: UUID,
|
|
21285
21295
|
platform: PLATFORM,
|
|
21296
|
+
device_kind: DEVICE_KIND,
|
|
21286
21297
|
duration_ms: DURATION_MS,
|
|
21287
21298
|
...AI_TELEMETRY
|
|
21288
21299
|
},
|
|
@@ -21291,6 +21302,7 @@ var ALLOWED = {
|
|
|
21291
21302
|
tool: TOOL_NAME,
|
|
21292
21303
|
tool_invocation_id: UUID,
|
|
21293
21304
|
platform: PLATFORM,
|
|
21305
|
+
device_kind: DEVICE_KIND,
|
|
21294
21306
|
duration_ms: DURATION_MS,
|
|
21295
21307
|
// Emit side sends only names declared in the tool's zod shape, capped at 16
|
|
21296
21308
|
// because arrayOf voids the whole array once it is longer.
|
|
@@ -21825,7 +21837,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21825
21837
|
var SESSION_ID2 = randomUUID5();
|
|
21826
21838
|
function readCliVersion() {
|
|
21827
21839
|
if (true) {
|
|
21828
|
-
return "0.24.1-next.
|
|
21840
|
+
return "0.24.1-next.6";
|
|
21829
21841
|
}
|
|
21830
21842
|
return "0.0.0";
|
|
21831
21843
|
}
|
|
@@ -23160,13 +23172,14 @@ chromium (a lone \`{ chromium: ... }\` target, or --platform chromium); a
|
|
|
23160
23172
|
multi-platform launch auto-detects a device instead. Pass --device to attach to
|
|
23161
23173
|
a running instance.
|
|
23162
23174
|
|
|
23163
|
-
A directory run prints
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23167
|
-
|
|
23168
|
-
|
|
23169
|
-
remaining flows
|
|
23175
|
+
A directory run prints only the steps that need attention (each failure, each
|
|
23176
|
+
warning, and each script step's output), then its outcome, then a final flow
|
|
23177
|
+
summary; --recursive walks subdirectories too (dot-directories and node_modules
|
|
23178
|
+
are skipped). A flow that fails its steps keeps the batch running, as does one
|
|
23179
|
+
the server rejects up front \u2014 an invalid file, or a device it cannot resolve. A
|
|
23180
|
+
transport failure, a rejection the server does not mark as validation, or a
|
|
23181
|
+
reply that is not a report stops the batch and counts the remaining flows
|
|
23182
|
+
skipped.
|
|
23170
23183
|
|
|
23171
23184
|
Runs require the auto-started local tool server;
|
|
23172
23185
|
ARGENT_TOOLS_URL and \`argent link\` routing are not supported.
|
|
@@ -23262,6 +23275,18 @@ function renderStepLine(s, n2, topFlow) {
|
|
|
23262
23275
|
function renderUnderStepLine(s, n2, text2) {
|
|
23263
23276
|
return `${" ".repeat(5 + Math.max(2, String(n2).length))}${stepIndent(s.depth)}${text2}`;
|
|
23264
23277
|
}
|
|
23278
|
+
function renderScriptLogLines(s, n2) {
|
|
23279
|
+
const log2 = typeof s.scriptLog === "string" ? s.scriptLog : "";
|
|
23280
|
+
const lines = [];
|
|
23281
|
+
if (log2) {
|
|
23282
|
+
const body = log2.endsWith("\n") ? log2.slice(0, -1) : log2;
|
|
23283
|
+
for (const line of body.split("\n")) lines.push(renderUnderStepLine(s, n2, `\u2502 ${line}`));
|
|
23284
|
+
}
|
|
23285
|
+
if (s.scriptLogTruncated === true) {
|
|
23286
|
+
lines.push(renderUnderStepLine(s, n2, "\u2502 \u2026 output truncated"));
|
|
23287
|
+
}
|
|
23288
|
+
return lines;
|
|
23289
|
+
}
|
|
23265
23290
|
function renderSummary(report, opts = {}) {
|
|
23266
23291
|
const warnings = report.steps.filter((s) => s.warning).length;
|
|
23267
23292
|
const warningsNote = warnings ? `, ${warnings} warning${warnings === 1 ? "" : "s"}` : "";
|
|
@@ -23290,9 +23315,14 @@ function renderFailedSteps(report) {
|
|
|
23290
23315
|
for (const s of report.steps) {
|
|
23291
23316
|
if (s.kind === "echo") continue;
|
|
23292
23317
|
n2++;
|
|
23293
|
-
|
|
23318
|
+
const scriptLog = renderScriptLogLines(s, n2);
|
|
23319
|
+
const scriptNote = s.kind === "script" && Boolean(s.reason);
|
|
23320
|
+
if (s.status !== "fail" && s.status !== "error" && !s.warning && !scriptNote && scriptLog.length === 0) {
|
|
23321
|
+
continue;
|
|
23322
|
+
}
|
|
23294
23323
|
lines.push(renderStepLine(s, n2, report.flow));
|
|
23295
23324
|
if (s.warning) lines.push(renderUnderStepLine(s, n2, `\u26A0 ${s.warning}`));
|
|
23325
|
+
lines.push(...scriptLog);
|
|
23296
23326
|
if (s.artifacts && typeof s.artifacts === "object") {
|
|
23297
23327
|
for (const [k, v] of Object.entries(s.artifacts)) {
|
|
23298
23328
|
if (typeof v === "string") lines.push(renderUnderStepLine(s, n2, `${k}: ${v}`));
|
|
@@ -23459,6 +23489,7 @@ function renderReport(report) {
|
|
|
23459
23489
|
n2++;
|
|
23460
23490
|
lines.push(renderStepLine(s, n2, report.flow));
|
|
23461
23491
|
if (s.warning) lines.push(renderUnderStepLine(s, n2, `\u26A0 ${s.warning}`));
|
|
23492
|
+
lines.push(...renderScriptLogLines(s, n2));
|
|
23462
23493
|
if (s.artifacts && typeof s.artifacts === "object") {
|
|
23463
23494
|
for (const [k, v] of Object.entries(s.artifacts)) {
|
|
23464
23495
|
if (typeof v === "string") lines.push(renderUnderStepLine(s, n2, `${k}: ${v}`));
|
|
@@ -23859,6 +23890,7 @@ ${recovery}`,
|
|
|
23859
23890
|
liveIndex++;
|
|
23860
23891
|
console.log(renderStepLine(s, liveIndex, flowName));
|
|
23861
23892
|
if (s.warning) console.log(renderUnderStepLine(s, liveIndex, `\u26A0 ${s.warning}`));
|
|
23893
|
+
for (const line of renderScriptLogLines(s, liveIndex)) console.log(line);
|
|
23862
23894
|
};
|
|
23863
23895
|
let report;
|
|
23864
23896
|
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 = {
|
|
@@ -15943,6 +15944,13 @@ var PLATFORMS = [
|
|
|
15943
15944
|
"tvos",
|
|
15944
15945
|
"android-tv"
|
|
15945
15946
|
];
|
|
15947
|
+
var DEVICE_KINDS = [
|
|
15948
|
+
"simulator",
|
|
15949
|
+
"emulator",
|
|
15950
|
+
"vvd",
|
|
15951
|
+
"device",
|
|
15952
|
+
"app"
|
|
15953
|
+
];
|
|
15946
15954
|
var DEBUGGER_NOT_CONNECTED_REASONS = [
|
|
15947
15955
|
"metro_not_running",
|
|
15948
15956
|
"no_app_connected",
|
|
@@ -15986,6 +15994,7 @@ var arrayOf = (elem, maxLen = 16) => (v) => {
|
|
|
15986
15994
|
};
|
|
15987
15995
|
var TOOL_NAME = matches(/^[a-z][a-z0-9_-]{0,63}$/, 64);
|
|
15988
15996
|
var PLATFORM = oneOf(PLATFORMS);
|
|
15997
|
+
var DEVICE_KIND = oneOf(DEVICE_KINDS);
|
|
15989
15998
|
var UUID = matches(
|
|
15990
15999
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
|
15991
16000
|
36
|
|
@@ -16129,6 +16138,7 @@ var ALLOWED = {
|
|
|
16129
16138
|
tool: TOOL_NAME,
|
|
16130
16139
|
tool_invocation_id: UUID,
|
|
16131
16140
|
platform: PLATFORM,
|
|
16141
|
+
device_kind: DEVICE_KIND,
|
|
16132
16142
|
...AI_TELEMETRY
|
|
16133
16143
|
},
|
|
16134
16144
|
"tool:complete": {
|
|
@@ -16136,6 +16146,7 @@ var ALLOWED = {
|
|
|
16136
16146
|
tool: TOOL_NAME,
|
|
16137
16147
|
tool_invocation_id: UUID,
|
|
16138
16148
|
platform: PLATFORM,
|
|
16149
|
+
device_kind: DEVICE_KIND,
|
|
16139
16150
|
duration_ms: DURATION_MS,
|
|
16140
16151
|
...AI_TELEMETRY
|
|
16141
16152
|
},
|
|
@@ -16144,6 +16155,7 @@ var ALLOWED = {
|
|
|
16144
16155
|
tool: TOOL_NAME,
|
|
16145
16156
|
tool_invocation_id: UUID,
|
|
16146
16157
|
platform: PLATFORM,
|
|
16158
|
+
device_kind: DEVICE_KIND,
|
|
16147
16159
|
duration_ms: DURATION_MS,
|
|
16148
16160
|
// Emit side sends only names declared in the tool's zod shape, capped at 16
|
|
16149
16161
|
// because arrayOf voids the whole array once it is longer.
|
|
@@ -16678,7 +16690,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16678
16690
|
var SESSION_ID = randomUUID4();
|
|
16679
16691
|
function readCliVersion() {
|
|
16680
16692
|
if (true) {
|
|
16681
|
-
return "0.24.1-next.
|
|
16693
|
+
return "0.24.1-next.6";
|
|
16682
16694
|
}
|
|
16683
16695
|
return "0.0.0";
|
|
16684
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 = {
|
|
@@ -17588,6 +17589,13 @@ var PLATFORMS = [
|
|
|
17588
17589
|
"tvos",
|
|
17589
17590
|
"android-tv"
|
|
17590
17591
|
];
|
|
17592
|
+
var DEVICE_KINDS = [
|
|
17593
|
+
"simulator",
|
|
17594
|
+
"emulator",
|
|
17595
|
+
"vvd",
|
|
17596
|
+
"device",
|
|
17597
|
+
"app"
|
|
17598
|
+
];
|
|
17591
17599
|
var DEBUGGER_NOT_CONNECTED_REASONS = [
|
|
17592
17600
|
"metro_not_running",
|
|
17593
17601
|
"no_app_connected",
|
|
@@ -17652,6 +17660,7 @@ var arrayOf = (elem, maxLen = 16) => (v) => {
|
|
|
17652
17660
|
};
|
|
17653
17661
|
var TOOL_NAME = matches(/^[a-z][a-z0-9_-]{0,63}$/, 64);
|
|
17654
17662
|
var PLATFORM = oneOf(PLATFORMS);
|
|
17663
|
+
var DEVICE_KIND = oneOf(DEVICE_KINDS);
|
|
17655
17664
|
var UUID = matches(
|
|
17656
17665
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
|
17657
17666
|
36
|
|
@@ -17795,6 +17804,7 @@ var ALLOWED = {
|
|
|
17795
17804
|
tool: TOOL_NAME,
|
|
17796
17805
|
tool_invocation_id: UUID,
|
|
17797
17806
|
platform: PLATFORM,
|
|
17807
|
+
device_kind: DEVICE_KIND,
|
|
17798
17808
|
...AI_TELEMETRY
|
|
17799
17809
|
},
|
|
17800
17810
|
"tool:complete": {
|
|
@@ -17802,6 +17812,7 @@ var ALLOWED = {
|
|
|
17802
17812
|
tool: TOOL_NAME,
|
|
17803
17813
|
tool_invocation_id: UUID,
|
|
17804
17814
|
platform: PLATFORM,
|
|
17815
|
+
device_kind: DEVICE_KIND,
|
|
17805
17816
|
duration_ms: DURATION_MS,
|
|
17806
17817
|
...AI_TELEMETRY
|
|
17807
17818
|
},
|
|
@@ -17810,6 +17821,7 @@ var ALLOWED = {
|
|
|
17810
17821
|
tool: TOOL_NAME,
|
|
17811
17822
|
tool_invocation_id: UUID,
|
|
17812
17823
|
platform: PLATFORM,
|
|
17824
|
+
device_kind: DEVICE_KIND,
|
|
17813
17825
|
duration_ms: DURATION_MS,
|
|
17814
17826
|
// Emit side sends only names declared in the tool's zod shape, capped at 16
|
|
17815
17827
|
// because arrayOf voids the whole array once it is longer.
|
|
@@ -18542,6 +18554,14 @@ async function flowRunToMcpContent(result, ctx) {
|
|
|
18542
18554
|
type: "text",
|
|
18543
18555
|
text: `[${num}] ${glyph}${stepIndent(step.depth)}${stepLabel(step)}${suffix}${warning}`
|
|
18544
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
|
+
}
|
|
18545
18565
|
if (step.result !== void 0) {
|
|
18546
18566
|
blocks.push(...await toMcpContent(step.result, step.outputHint, ctx, step.args));
|
|
18547
18567
|
}
|