@swmansion/argent 0.35.1-next.44 → 0.35.1-next.46
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 +238 -165
- package/dist/client.js +164 -97
- package/dist/installer.mjs +86 -76
- package/dist/mcp-server.mjs +192 -125
- package/dist/tool-args.generated.d.ts +10 -10
- package/dist/tool-server.cjs +633 -327
- package/package.json +2 -2
- package/skills/argent-create-e2e/references/e2e-yaml.md +22 -5
- package/skills/argent-create-e2e/references/live-authoring.md +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -4402,10 +4402,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
4402
4402
|
let offset = bm.offset;
|
|
4403
4403
|
let commentEnd = null;
|
|
4404
4404
|
for (const collItem of bm.items) {
|
|
4405
|
-
const { start, key, sep:
|
|
4405
|
+
const { start, key, sep: sep12, value } = collItem;
|
|
4406
4406
|
const keyProps = resolveProps.resolveProps(start, {
|
|
4407
4407
|
indicator: "explicit-key-ind",
|
|
4408
|
-
next: key ??
|
|
4408
|
+
next: key ?? sep12?.[0],
|
|
4409
4409
|
offset,
|
|
4410
4410
|
onError,
|
|
4411
4411
|
parentIndent: bm.indent,
|
|
@@ -4419,7 +4419,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
4419
4419
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
4420
4420
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
4421
4421
|
}
|
|
4422
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
4422
|
+
if (!keyProps.anchor && !keyProps.tag && !sep12) {
|
|
4423
4423
|
commentEnd = keyProps.end;
|
|
4424
4424
|
if (keyProps.comment) {
|
|
4425
4425
|
if (map2.comment)
|
|
@@ -4443,7 +4443,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
4443
4443
|
ctx.atKey = false;
|
|
4444
4444
|
if (utilMapIncludes.mapIncludes(ctx, map2.items, keyNode))
|
|
4445
4445
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
4446
|
-
const valueProps = resolveProps.resolveProps(
|
|
4446
|
+
const valueProps = resolveProps.resolveProps(sep12 ?? [], {
|
|
4447
4447
|
indicator: "map-value-ind",
|
|
4448
4448
|
next: value,
|
|
4449
4449
|
offset: keyNode.range[2],
|
|
@@ -4459,7 +4459,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
4459
4459
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
4460
4460
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
4461
4461
|
}
|
|
4462
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
4462
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep12, null, valueProps, onError);
|
|
4463
4463
|
if (ctx.schema.compat)
|
|
4464
4464
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
4465
4465
|
offset = valueNode.range[2];
|
|
@@ -4550,7 +4550,7 @@ var require_resolve_end = __commonJS({
|
|
|
4550
4550
|
let comment = "";
|
|
4551
4551
|
if (end) {
|
|
4552
4552
|
let hasSpace = false;
|
|
4553
|
-
let
|
|
4553
|
+
let sep12 = "";
|
|
4554
4554
|
for (const token of end) {
|
|
4555
4555
|
const { source, type } = token;
|
|
4556
4556
|
switch (type) {
|
|
@@ -4564,13 +4564,13 @@ var require_resolve_end = __commonJS({
|
|
|
4564
4564
|
if (!comment)
|
|
4565
4565
|
comment = cb;
|
|
4566
4566
|
else
|
|
4567
|
-
comment +=
|
|
4568
|
-
|
|
4567
|
+
comment += sep12 + cb;
|
|
4568
|
+
sep12 = "";
|
|
4569
4569
|
break;
|
|
4570
4570
|
}
|
|
4571
4571
|
case "newline":
|
|
4572
4572
|
if (comment)
|
|
4573
|
-
|
|
4573
|
+
sep12 += source;
|
|
4574
4574
|
hasSpace = true;
|
|
4575
4575
|
break;
|
|
4576
4576
|
default:
|
|
@@ -4613,18 +4613,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4613
4613
|
let offset = fc.offset + fc.start.source.length;
|
|
4614
4614
|
for (let i2 = 0; i2 < fc.items.length; ++i2) {
|
|
4615
4615
|
const collItem = fc.items[i2];
|
|
4616
|
-
const { start, key, sep:
|
|
4616
|
+
const { start, key, sep: sep12, value } = collItem;
|
|
4617
4617
|
const props = resolveProps.resolveProps(start, {
|
|
4618
4618
|
flow: fcName,
|
|
4619
4619
|
indicator: "explicit-key-ind",
|
|
4620
|
-
next: key ??
|
|
4620
|
+
next: key ?? sep12?.[0],
|
|
4621
4621
|
offset,
|
|
4622
4622
|
onError,
|
|
4623
4623
|
parentIndent: fc.indent,
|
|
4624
4624
|
startOnNewline: false
|
|
4625
4625
|
});
|
|
4626
4626
|
if (!props.found) {
|
|
4627
|
-
if (!props.anchor && !props.tag && !
|
|
4627
|
+
if (!props.anchor && !props.tag && !sep12 && !value) {
|
|
4628
4628
|
if (i2 === 0 && props.comma)
|
|
4629
4629
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
4630
4630
|
else if (i2 < fc.items.length - 1)
|
|
@@ -4678,8 +4678,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4678
4678
|
}
|
|
4679
4679
|
}
|
|
4680
4680
|
}
|
|
4681
|
-
if (!isMap2 && !
|
|
4682
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
4681
|
+
if (!isMap2 && !sep12 && !props.found) {
|
|
4682
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep12, null, props, onError);
|
|
4683
4683
|
coll.items.push(valueNode);
|
|
4684
4684
|
offset = valueNode.range[2];
|
|
4685
4685
|
if (isBlock(value))
|
|
@@ -4691,7 +4691,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4691
4691
|
if (isBlock(key))
|
|
4692
4692
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
4693
4693
|
ctx.atKey = false;
|
|
4694
|
-
const valueProps = resolveProps.resolveProps(
|
|
4694
|
+
const valueProps = resolveProps.resolveProps(sep12 ?? [], {
|
|
4695
4695
|
flow: fcName,
|
|
4696
4696
|
indicator: "map-value-ind",
|
|
4697
4697
|
next: value,
|
|
@@ -4702,8 +4702,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4702
4702
|
});
|
|
4703
4703
|
if (valueProps.found) {
|
|
4704
4704
|
if (!isMap2 && !props.found && ctx.options.strict) {
|
|
4705
|
-
if (
|
|
4706
|
-
for (const st of
|
|
4705
|
+
if (sep12)
|
|
4706
|
+
for (const st of sep12) {
|
|
4707
4707
|
if (st === valueProps.found)
|
|
4708
4708
|
break;
|
|
4709
4709
|
if (st.type === "newline") {
|
|
@@ -4720,7 +4720,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4720
4720
|
else
|
|
4721
4721
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
4722
4722
|
}
|
|
4723
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
4723
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep12, null, valueProps, onError) : null;
|
|
4724
4724
|
if (valueNode) {
|
|
4725
4725
|
if (isBlock(value))
|
|
4726
4726
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -4900,7 +4900,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4900
4900
|
chompStart = i2 + 1;
|
|
4901
4901
|
}
|
|
4902
4902
|
let value = "";
|
|
4903
|
-
let
|
|
4903
|
+
let sep12 = "";
|
|
4904
4904
|
let prevMoreIndented = false;
|
|
4905
4905
|
for (let i2 = 0; i2 < contentStart; ++i2)
|
|
4906
4906
|
value += lines[i2][0].slice(trimIndent) + "\n";
|
|
@@ -4917,24 +4917,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4917
4917
|
indent = "";
|
|
4918
4918
|
}
|
|
4919
4919
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
4920
|
-
value +=
|
|
4921
|
-
|
|
4920
|
+
value += sep12 + indent.slice(trimIndent) + content;
|
|
4921
|
+
sep12 = "\n";
|
|
4922
4922
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
4923
|
-
if (
|
|
4924
|
-
|
|
4925
|
-
else if (!prevMoreIndented &&
|
|
4926
|
-
|
|
4927
|
-
value +=
|
|
4928
|
-
|
|
4923
|
+
if (sep12 === " ")
|
|
4924
|
+
sep12 = "\n";
|
|
4925
|
+
else if (!prevMoreIndented && sep12 === "\n")
|
|
4926
|
+
sep12 = "\n\n";
|
|
4927
|
+
value += sep12 + indent.slice(trimIndent) + content;
|
|
4928
|
+
sep12 = "\n";
|
|
4929
4929
|
prevMoreIndented = true;
|
|
4930
4930
|
} else if (content === "") {
|
|
4931
|
-
if (
|
|
4931
|
+
if (sep12 === "\n")
|
|
4932
4932
|
value += "\n";
|
|
4933
4933
|
else
|
|
4934
|
-
|
|
4934
|
+
sep12 = "\n";
|
|
4935
4935
|
} else {
|
|
4936
|
-
value +=
|
|
4937
|
-
|
|
4936
|
+
value += sep12 + content;
|
|
4937
|
+
sep12 = " ";
|
|
4938
4938
|
prevMoreIndented = false;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
@@ -5117,25 +5117,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
5117
5117
|
trimBoth = /^[ \t]+|[ \t]+$/g;
|
|
5118
5118
|
}
|
|
5119
5119
|
let res = match[1].replace(trimEnd, "");
|
|
5120
|
-
let
|
|
5120
|
+
let sep12 = " ";
|
|
5121
5121
|
let pos = line.lastIndex;
|
|
5122
5122
|
while (match = line.exec(source)) {
|
|
5123
5123
|
const lm = match[1].replace(trimBoth, "");
|
|
5124
5124
|
if (lm === "") {
|
|
5125
|
-
if (
|
|
5126
|
-
res +=
|
|
5125
|
+
if (sep12 === "\n")
|
|
5126
|
+
res += sep12;
|
|
5127
5127
|
else
|
|
5128
|
-
|
|
5128
|
+
sep12 = "\n";
|
|
5129
5129
|
} else {
|
|
5130
|
-
res +=
|
|
5131
|
-
|
|
5130
|
+
res += sep12 + lm;
|
|
5131
|
+
sep12 = " ";
|
|
5132
5132
|
}
|
|
5133
5133
|
pos = line.lastIndex;
|
|
5134
5134
|
}
|
|
5135
5135
|
const last = /[ \t]*(.*)/sy;
|
|
5136
5136
|
last.lastIndex = pos;
|
|
5137
5137
|
match = last.exec(source);
|
|
5138
|
-
return res +
|
|
5138
|
+
return res + sep12 + (match?.[1] ?? "");
|
|
5139
5139
|
}
|
|
5140
5140
|
function doubleQuotedValue(source, onError) {
|
|
5141
5141
|
let res = "";
|
|
@@ -5945,14 +5945,14 @@ var require_cst_stringify = __commonJS({
|
|
|
5945
5945
|
}
|
|
5946
5946
|
}
|
|
5947
5947
|
}
|
|
5948
|
-
function stringifyItem({ start, key, sep:
|
|
5948
|
+
function stringifyItem({ start, key, sep: sep12, value }) {
|
|
5949
5949
|
let res = "";
|
|
5950
5950
|
for (const st of start)
|
|
5951
5951
|
res += st.source;
|
|
5952
5952
|
if (key)
|
|
5953
5953
|
res += stringifyToken(key);
|
|
5954
|
-
if (
|
|
5955
|
-
for (const st of
|
|
5954
|
+
if (sep12)
|
|
5955
|
+
for (const st of sep12)
|
|
5956
5956
|
res += st.source;
|
|
5957
5957
|
if (value)
|
|
5958
5958
|
res += stringifyToken(value);
|
|
@@ -7119,18 +7119,18 @@ var require_parser = __commonJS({
|
|
|
7119
7119
|
if (this.type === "map-value-ind") {
|
|
7120
7120
|
const prev = getPrevProps(this.peek(2));
|
|
7121
7121
|
const start = getFirstKeyStartProps(prev);
|
|
7122
|
-
let
|
|
7122
|
+
let sep12;
|
|
7123
7123
|
if (scalar.end) {
|
|
7124
|
-
|
|
7125
|
-
|
|
7124
|
+
sep12 = scalar.end;
|
|
7125
|
+
sep12.push(this.sourceToken);
|
|
7126
7126
|
delete scalar.end;
|
|
7127
7127
|
} else
|
|
7128
|
-
|
|
7128
|
+
sep12 = [this.sourceToken];
|
|
7129
7129
|
const map2 = {
|
|
7130
7130
|
type: "block-map",
|
|
7131
7131
|
offset: scalar.offset,
|
|
7132
7132
|
indent: scalar.indent,
|
|
7133
|
-
items: [{ start, key: scalar, sep:
|
|
7133
|
+
items: [{ start, key: scalar, sep: sep12 }]
|
|
7134
7134
|
};
|
|
7135
7135
|
this.onKeyLine = true;
|
|
7136
7136
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -7283,15 +7283,15 @@ var require_parser = __commonJS({
|
|
|
7283
7283
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
7284
7284
|
const start2 = getFirstKeyStartProps(it.start);
|
|
7285
7285
|
const key = it.key;
|
|
7286
|
-
const
|
|
7287
|
-
|
|
7286
|
+
const sep12 = it.sep;
|
|
7287
|
+
sep12.push(this.sourceToken);
|
|
7288
7288
|
delete it.key;
|
|
7289
7289
|
delete it.sep;
|
|
7290
7290
|
this.stack.push({
|
|
7291
7291
|
type: "block-map",
|
|
7292
7292
|
offset: this.offset,
|
|
7293
7293
|
indent: this.indent,
|
|
7294
|
-
items: [{ start: start2, key, sep:
|
|
7294
|
+
items: [{ start: start2, key, sep: sep12 }]
|
|
7295
7295
|
});
|
|
7296
7296
|
} else if (start.length > 0) {
|
|
7297
7297
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -7485,13 +7485,13 @@ var require_parser = __commonJS({
|
|
|
7485
7485
|
const prev = getPrevProps(parent);
|
|
7486
7486
|
const start = getFirstKeyStartProps(prev);
|
|
7487
7487
|
fixFlowSeqItems(fc);
|
|
7488
|
-
const
|
|
7489
|
-
|
|
7488
|
+
const sep12 = fc.end.splice(1, fc.end.length);
|
|
7489
|
+
sep12.push(this.sourceToken);
|
|
7490
7490
|
const map2 = {
|
|
7491
7491
|
type: "block-map",
|
|
7492
7492
|
offset: fc.offset,
|
|
7493
7493
|
indent: fc.indent,
|
|
7494
|
-
items: [{ start, key: fc, sep:
|
|
7494
|
+
items: [{ start, key: fc, sep: sep12 }]
|
|
7495
7495
|
};
|
|
7496
7496
|
this.onKeyLine = true;
|
|
7497
7497
|
this.stack[this.stack.length - 1] = map2;
|
|
@@ -7669,7 +7669,7 @@ var require_public_api = __commonJS({
|
|
|
7669
7669
|
}
|
|
7670
7670
|
return doc;
|
|
7671
7671
|
}
|
|
7672
|
-
function
|
|
7672
|
+
function parse8(src, reviver, options) {
|
|
7673
7673
|
let _reviver = void 0;
|
|
7674
7674
|
if (typeof reviver === "function") {
|
|
7675
7675
|
_reviver = reviver;
|
|
@@ -7710,7 +7710,7 @@ var require_public_api = __commonJS({
|
|
|
7710
7710
|
return value.toString(options);
|
|
7711
7711
|
return new Document2.Document(value, _replacer, options).toString(options);
|
|
7712
7712
|
}
|
|
7713
|
-
exports.parse =
|
|
7713
|
+
exports.parse = parse8;
|
|
7714
7714
|
exports.parseAllDocuments = parseAllDocuments;
|
|
7715
7715
|
exports.parseDocument = parseDocument2;
|
|
7716
7716
|
exports.stringify = stringify2;
|
|
@@ -9386,7 +9386,7 @@ var require_parse = __commonJS({
|
|
|
9386
9386
|
"../../node_modules/semver/functions/parse.js"(exports, module) {
|
|
9387
9387
|
"use strict";
|
|
9388
9388
|
var SemVer = require_semver();
|
|
9389
|
-
var
|
|
9389
|
+
var parse8 = (version2, options, throwErrors = false) => {
|
|
9390
9390
|
if (version2 instanceof SemVer) {
|
|
9391
9391
|
return version2;
|
|
9392
9392
|
}
|
|
@@ -9399,7 +9399,7 @@ var require_parse = __commonJS({
|
|
|
9399
9399
|
throw er;
|
|
9400
9400
|
}
|
|
9401
9401
|
};
|
|
9402
|
-
module.exports =
|
|
9402
|
+
module.exports = parse8;
|
|
9403
9403
|
}
|
|
9404
9404
|
});
|
|
9405
9405
|
|
|
@@ -9407,9 +9407,9 @@ var require_parse = __commonJS({
|
|
|
9407
9407
|
var require_valid = __commonJS({
|
|
9408
9408
|
"../../node_modules/semver/functions/valid.js"(exports, module) {
|
|
9409
9409
|
"use strict";
|
|
9410
|
-
var
|
|
9410
|
+
var parse8 = require_parse();
|
|
9411
9411
|
var valid = (version2, options) => {
|
|
9412
|
-
const v =
|
|
9412
|
+
const v = parse8(version2, options);
|
|
9413
9413
|
return v ? v.version : null;
|
|
9414
9414
|
};
|
|
9415
9415
|
module.exports = valid;
|
|
@@ -9420,9 +9420,9 @@ var require_valid = __commonJS({
|
|
|
9420
9420
|
var require_clean = __commonJS({
|
|
9421
9421
|
"../../node_modules/semver/functions/clean.js"(exports, module) {
|
|
9422
9422
|
"use strict";
|
|
9423
|
-
var
|
|
9423
|
+
var parse8 = require_parse();
|
|
9424
9424
|
var clean = (version2, options) => {
|
|
9425
|
-
const s =
|
|
9425
|
+
const s = parse8(version2.trim().replace(/^[=v]+/, ""), options);
|
|
9426
9426
|
return s ? s.version : null;
|
|
9427
9427
|
};
|
|
9428
9428
|
module.exports = clean;
|
|
@@ -9457,10 +9457,10 @@ var require_inc = __commonJS({
|
|
|
9457
9457
|
var require_diff = __commonJS({
|
|
9458
9458
|
"../../node_modules/semver/functions/diff.js"(exports, module) {
|
|
9459
9459
|
"use strict";
|
|
9460
|
-
var
|
|
9460
|
+
var parse8 = require_parse();
|
|
9461
9461
|
var diff = (version1, version2) => {
|
|
9462
|
-
const v1 =
|
|
9463
|
-
const v2 =
|
|
9462
|
+
const v1 = parse8(version1, null, true);
|
|
9463
|
+
const v2 = parse8(version2, null, true);
|
|
9464
9464
|
const comparison = v1.compare(v2);
|
|
9465
9465
|
if (comparison === 0) {
|
|
9466
9466
|
return null;
|
|
@@ -9531,9 +9531,9 @@ var require_patch = __commonJS({
|
|
|
9531
9531
|
var require_prerelease = __commonJS({
|
|
9532
9532
|
"../../node_modules/semver/functions/prerelease.js"(exports, module) {
|
|
9533
9533
|
"use strict";
|
|
9534
|
-
var
|
|
9534
|
+
var parse8 = require_parse();
|
|
9535
9535
|
var prerelease = (version2, options) => {
|
|
9536
|
-
const parsed =
|
|
9536
|
+
const parsed = parse8(version2, options);
|
|
9537
9537
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
9538
9538
|
};
|
|
9539
9539
|
module.exports = prerelease;
|
|
@@ -9719,7 +9719,7 @@ var require_coerce = __commonJS({
|
|
|
9719
9719
|
"../../node_modules/semver/functions/coerce.js"(exports, module) {
|
|
9720
9720
|
"use strict";
|
|
9721
9721
|
var SemVer = require_semver();
|
|
9722
|
-
var
|
|
9722
|
+
var parse8 = require_parse();
|
|
9723
9723
|
var { safeRe: re2, t: t2 } = require_re();
|
|
9724
9724
|
var coerce = (version2, options) => {
|
|
9725
9725
|
if (version2 instanceof SemVer) {
|
|
@@ -9754,7 +9754,7 @@ var require_coerce = __commonJS({
|
|
|
9754
9754
|
const patch = match[4] || "0";
|
|
9755
9755
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
9756
9756
|
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
9757
|
-
return
|
|
9757
|
+
return parse8(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
|
|
9758
9758
|
};
|
|
9759
9759
|
module.exports = coerce;
|
|
9760
9760
|
}
|
|
@@ -9764,7 +9764,7 @@ var require_coerce = __commonJS({
|
|
|
9764
9764
|
var require_truncate = __commonJS({
|
|
9765
9765
|
"../../node_modules/semver/functions/truncate.js"(exports, module) {
|
|
9766
9766
|
"use strict";
|
|
9767
|
-
var
|
|
9767
|
+
var parse8 = require_parse();
|
|
9768
9768
|
var constants6 = require_constants();
|
|
9769
9769
|
var SemVer = require_semver();
|
|
9770
9770
|
var truncate = (version2, truncation, options) => {
|
|
@@ -9776,7 +9776,7 @@ var require_truncate = __commonJS({
|
|
|
9776
9776
|
};
|
|
9777
9777
|
var cloneInputVersion = (version2, options) => {
|
|
9778
9778
|
const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
|
|
9779
|
-
return
|
|
9779
|
+
return parse8(versionStringToParse, options);
|
|
9780
9780
|
};
|
|
9781
9781
|
var doTruncation = (version2, truncation) => {
|
|
9782
9782
|
if (isPrerelease(truncation)) {
|
|
@@ -10820,7 +10820,7 @@ var require_semver2 = __commonJS({
|
|
|
10820
10820
|
var constants6 = require_constants();
|
|
10821
10821
|
var SemVer = require_semver();
|
|
10822
10822
|
var identifiers = require_identifiers();
|
|
10823
|
-
var
|
|
10823
|
+
var parse8 = require_parse();
|
|
10824
10824
|
var valid = require_valid();
|
|
10825
10825
|
var clean = require_clean();
|
|
10826
10826
|
var inc = require_inc();
|
|
@@ -10859,7 +10859,7 @@ var require_semver2 = __commonJS({
|
|
|
10859
10859
|
var simplifyRange = require_simplify();
|
|
10860
10860
|
var subset = require_subset();
|
|
10861
10861
|
module.exports = {
|
|
10862
|
-
parse:
|
|
10862
|
+
parse: parse8,
|
|
10863
10863
|
valid,
|
|
10864
10864
|
clean,
|
|
10865
10865
|
inc,
|
|
@@ -11636,6 +11636,15 @@ function secretSources(options = {}) {
|
|
|
11636
11636
|
function encodeClientSecrets(values) {
|
|
11637
11637
|
return Buffer.from(JSON.stringify(Object.fromEntries(values)), "utf8").toString("base64");
|
|
11638
11638
|
}
|
|
11639
|
+
function summarizeSecretSources(sources) {
|
|
11640
|
+
return sources.map(({ values: _values, ...summary }) => ({
|
|
11641
|
+
...summary,
|
|
11642
|
+
names: [...summary.names]
|
|
11643
|
+
}));
|
|
11644
|
+
}
|
|
11645
|
+
function encodeSecretSourceSummaries(sources) {
|
|
11646
|
+
return Buffer.from(JSON.stringify(sources), "utf8").toString("base64");
|
|
11647
|
+
}
|
|
11639
11648
|
function lookupSecret(name, sources) {
|
|
11640
11649
|
for (const source of sources) {
|
|
11641
11650
|
const value = source.values.get(name);
|
|
@@ -12039,14 +12048,14 @@ function findFreePort() {
|
|
|
12039
12048
|
});
|
|
12040
12049
|
}
|
|
12041
12050
|
function isVersionNewer(a2, b) {
|
|
12042
|
-
const
|
|
12051
|
+
const parse8 = (v) => {
|
|
12043
12052
|
const [core = "", ...preParts] = v.split("+")[0].split("-");
|
|
12044
12053
|
const nums = core.split(".").map((n3) => Number.parseInt(n3, 10));
|
|
12045
12054
|
if (nums.length === 0 || nums.some((n3) => Number.isNaN(n3))) return null;
|
|
12046
12055
|
return { nums, pre: preParts.length > 0 ? preParts.join("-").split(".") : [] };
|
|
12047
12056
|
};
|
|
12048
|
-
const pa =
|
|
12049
|
-
const pb =
|
|
12057
|
+
const pa = parse8(a2);
|
|
12058
|
+
const pb = parse8(b);
|
|
12050
12059
|
if (!pa || !pb) return false;
|
|
12051
12060
|
for (let i2 = 0; i2 < 3; i2++) {
|
|
12052
12061
|
const x = pa.nums[i2] ?? 0;
|
|
@@ -12511,6 +12520,7 @@ import * as path13 from "node:path";
|
|
|
12511
12520
|
var LINKED_CALL_HEADER = "x-argent-linked";
|
|
12512
12521
|
var E2E_DIR_CLIENT_HEADER = "x-argent-e2e-dir";
|
|
12513
12522
|
var CLIENT_SECRETS_HEADER = "x-argent-client-secrets";
|
|
12523
|
+
var CLIENT_SECRET_SOURCES_HEADER = "x-argent-client-secret-sources";
|
|
12514
12524
|
|
|
12515
12525
|
// ../registry/src/artifacts.ts
|
|
12516
12526
|
import { stat } from "node:fs/promises";
|
|
@@ -15149,18 +15159,18 @@ var validateAsync = async (schema, value, _ctx) => {
|
|
|
15149
15159
|
return result.issues.length === 0;
|
|
15150
15160
|
};
|
|
15151
15161
|
var _encode = (_Err) => {
|
|
15152
|
-
const
|
|
15162
|
+
const parse8 = _parse(_Err);
|
|
15153
15163
|
const fn = (schema, value, _ctx, _params) => {
|
|
15154
15164
|
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
15155
|
-
return
|
|
15165
|
+
return parse8(schema, value, ctx, finalizeParams(fn, _params));
|
|
15156
15166
|
};
|
|
15157
15167
|
return fn;
|
|
15158
15168
|
};
|
|
15159
15169
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
15160
15170
|
var _decode = (_Err) => {
|
|
15161
|
-
const
|
|
15171
|
+
const parse8 = _parse(_Err);
|
|
15162
15172
|
const fn = (schema, value, _ctx, _params) => {
|
|
15163
|
-
return
|
|
15173
|
+
return parse8(schema, value, _ctx, finalizeParams(fn, _params));
|
|
15164
15174
|
};
|
|
15165
15175
|
return fn;
|
|
15166
15176
|
};
|
|
@@ -16655,7 +16665,7 @@ function capSize(inst, size) {
|
|
|
16655
16665
|
if (!caps.length)
|
|
16656
16666
|
return;
|
|
16657
16667
|
const cap = Math.min(...caps.map((c2) => c2[0]));
|
|
16658
|
-
const
|
|
16668
|
+
const parse8 = inst._zod.parse;
|
|
16659
16669
|
inst._zod.parse = (payload, ctx) => {
|
|
16660
16670
|
const n3 = size(payload.value);
|
|
16661
16671
|
if (n3 > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
@@ -16669,7 +16679,7 @@ function capSize(inst, size) {
|
|
|
16669
16679
|
}
|
|
16670
16680
|
}
|
|
16671
16681
|
}
|
|
16672
|
-
return
|
|
16682
|
+
return parse8(payload, ctx);
|
|
16673
16683
|
};
|
|
16674
16684
|
}
|
|
16675
16685
|
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
@@ -34027,7 +34037,7 @@ function memberCollector(roots, opts) {
|
|
|
34027
34037
|
const runs = /* @__PURE__ */ new Set();
|
|
34028
34038
|
const baselineDirs = /* @__PURE__ */ new Map();
|
|
34029
34039
|
const budget = { inline: 0 };
|
|
34030
|
-
const logging = filesLogEnabled();
|
|
34040
|
+
const logging = filesLogEnabled() && opts.scanOnly !== true;
|
|
34031
34041
|
const log2 = opts.log ?? ((line) => void process.stderr.write(`${line}
|
|
34032
34042
|
`));
|
|
34033
34043
|
const emit = (member, sent) => {
|
|
@@ -34047,6 +34057,7 @@ function memberCollector(roots, opts) {
|
|
|
34047
34057
|
return entry;
|
|
34048
34058
|
}
|
|
34049
34059
|
async function toolFiles(step) {
|
|
34060
|
+
if (opts.scanOnly) return;
|
|
34050
34061
|
if (canonicalToolId(step.tool) === "e2e-execute") return;
|
|
34051
34062
|
for (const file2 of toolStepFiles(opts.toolFileInputs?.(step.tool), step.args)) {
|
|
34052
34063
|
const { unwrapWhenSet } = file2.spec;
|
|
@@ -34073,6 +34084,12 @@ function memberCollector(roots, opts) {
|
|
|
34073
34084
|
if (text2 === void 0 || hop >= MAX_RUN_DEPTH) return void 0;
|
|
34074
34085
|
return { canonical: member.canonical, text: text2, flowName: target.name, hop, updates, platform };
|
|
34075
34086
|
}
|
|
34087
|
+
async function pathRun(target, hop, updates, platform) {
|
|
34088
|
+
const { member, text: text2 } = await flow(path12.dirname(target.path), path12.basename(target.path));
|
|
34089
|
+
if (text2 === void 0 || hop >= MAX_RUN_DEPTH) return void 0;
|
|
34090
|
+
const flowName = path12.basename(target.path, ".yaml");
|
|
34091
|
+
return { canonical: member.canonical, text: text2, flowName, hop, updates, platform };
|
|
34092
|
+
}
|
|
34076
34093
|
async function runTarget(anchorDir, target) {
|
|
34077
34094
|
const found = await flow(anchorDir, target);
|
|
34078
34095
|
if (found.member.spelling?.state !== "absent") return found;
|
|
@@ -34112,13 +34129,8 @@ function memberCollector(roots, opts) {
|
|
|
34112
34129
|
}
|
|
34113
34130
|
}
|
|
34114
34131
|
for (const { target, args } of requests.nested) {
|
|
34115
|
-
|
|
34116
|
-
const next = await nestedRun(
|
|
34117
|
-
target,
|
|
34118
|
-
file2.hop + 1,
|
|
34119
|
-
nestedRunUpdates(run2.updates, args),
|
|
34120
|
-
run2.platform
|
|
34121
|
-
);
|
|
34132
|
+
const updates = nestedRunUpdates(run2.updates, args);
|
|
34133
|
+
const next = target.kind === "name" ? await nestedRun(target, file2.hop + 1, updates, run2.platform) : opts.scanOnly ? await pathRun(target, file2.hop + 1, updates, run2.platform) : void 0;
|
|
34122
34134
|
if (next !== void 0) queue.push(next);
|
|
34123
34135
|
}
|
|
34124
34136
|
}
|
|
@@ -34139,6 +34151,7 @@ function memberCollector(roots, opts) {
|
|
|
34139
34151
|
}
|
|
34140
34152
|
}
|
|
34141
34153
|
async function sendBaselines() {
|
|
34154
|
+
if (opts.scanOnly) return;
|
|
34142
34155
|
for (const [dir, { prefixes, updates }] of baselineDirs) {
|
|
34143
34156
|
const real = (await landing(dir)).canonical;
|
|
34144
34157
|
if (!roots.some((root) => isWithin(real, root))) continue;
|
|
@@ -34176,7 +34189,7 @@ async function collectFlowMembers(rootPath, rootBytes, args, opts) {
|
|
|
34176
34189
|
FLOW_FILE_NAME_PATTERN
|
|
34177
34190
|
);
|
|
34178
34191
|
const collector = memberCollector(
|
|
34179
|
-
await closureRoots(rootPath, canonical, args.project_root),
|
|
34192
|
+
opts.scanOnly ? [path12.parse(path12.resolve(rootPath)).root] : await closureRoots(rootPath, canonical, args.project_root),
|
|
34180
34193
|
opts
|
|
34181
34194
|
);
|
|
34182
34195
|
await collector.walk([
|
|
@@ -34214,7 +34227,7 @@ async function collectStepMembers(args, opts, recordingDirFor = e2eDirFor) {
|
|
|
34214
34227
|
}
|
|
34215
34228
|
const recording = path12.join(recordingDirFor(projectRoot), `${name}.yaml`);
|
|
34216
34229
|
const collector = memberCollector(
|
|
34217
|
-
await closureRoots(recording, (await landing(recording)).canonical, projectRoot),
|
|
34230
|
+
opts.scanOnly ? [path12.parse(recording).root] : await closureRoots(recording, (await landing(recording)).canonical, projectRoot),
|
|
34218
34231
|
opts
|
|
34219
34232
|
);
|
|
34220
34233
|
await collector.toolFiles(step);
|
|
@@ -34460,8 +34473,25 @@ function carriesMembers(args) {
|
|
|
34460
34473
|
function carriesUpload(args) {
|
|
34461
34474
|
return carriesMembers(args) || wiresOf(args).some((wire) => typeof wire.uploadId === "string");
|
|
34462
34475
|
}
|
|
34463
|
-
|
|
34464
|
-
|
|
34476
|
+
function secretValues(names, sources) {
|
|
34477
|
+
const values = /* @__PURE__ */ new Map();
|
|
34478
|
+
for (const rawName of names) {
|
|
34479
|
+
const { name, value } = lookupPlaceholderSecret(rawName, sources);
|
|
34480
|
+
if (value !== void 0) values.set(name, value);
|
|
34481
|
+
}
|
|
34482
|
+
return values;
|
|
34483
|
+
}
|
|
34484
|
+
async function callerSecrets(scanned, remote) {
|
|
34485
|
+
if (remote && !isFeatureEnabled("forward-secrets")) return void 0;
|
|
34486
|
+
const names = await placeholderNamesIn(scanned);
|
|
34487
|
+
if (remote) {
|
|
34488
|
+
return names.size === 0 ? void 0 : { values: secretValues(names, secretSources()) };
|
|
34489
|
+
}
|
|
34490
|
+
if (names.size === 0) return { values: /* @__PURE__ */ new Map() };
|
|
34491
|
+
const sources = secretSources();
|
|
34492
|
+
return { values: secretValues(names, sources), sources: summarizeSecretSources(sources) };
|
|
34493
|
+
}
|
|
34494
|
+
async function placeholderNamesIn(args) {
|
|
34465
34495
|
const names = /* @__PURE__ */ new Set();
|
|
34466
34496
|
const scan = (text2) => {
|
|
34467
34497
|
for (const name of placeholderNames(text2)) names.add(name);
|
|
@@ -34498,15 +34528,33 @@ async function forwardedSecrets(args) {
|
|
|
34498
34528
|
}
|
|
34499
34529
|
};
|
|
34500
34530
|
await visit3(args);
|
|
34501
|
-
|
|
34502
|
-
|
|
34503
|
-
|
|
34504
|
-
|
|
34505
|
-
|
|
34506
|
-
|
|
34531
|
+
return names;
|
|
34532
|
+
}
|
|
34533
|
+
async function localScanArgs(meta3, args, prepare) {
|
|
34534
|
+
const scanned = [args];
|
|
34535
|
+
const collecting = meta3?.fileInputs?.filter((spec) => spec.collect !== void 0) ?? [];
|
|
34536
|
+
if (meta3 && RECORDING_TOOLS.has(canonicalToolId(meta3.name))) {
|
|
34537
|
+
collecting.push(RECORDING_FILE_INPUT);
|
|
34507
34538
|
}
|
|
34508
|
-
|
|
34539
|
+
if (collecting.length > 0) {
|
|
34540
|
+
scanned.push(await prepare(collecting).catch(() => void 0));
|
|
34541
|
+
}
|
|
34542
|
+
return scanned;
|
|
34509
34543
|
}
|
|
34544
|
+
var RECORDING_TOOLS = /* @__PURE__ */ new Set([
|
|
34545
|
+
"e2e-start-recording",
|
|
34546
|
+
"e2e-add-script",
|
|
34547
|
+
"e2e-add-step",
|
|
34548
|
+
"e2e-finish-recording"
|
|
34549
|
+
]);
|
|
34550
|
+
var RECORDING_FILE_INPUT = {
|
|
34551
|
+
target: "__recording",
|
|
34552
|
+
path: `\${project_root}/${E2E_DIRS[0].split(path13.sep).join("/")}/\${name}.yaml`,
|
|
34553
|
+
paths: E2E_DIRS.map((dir) => `\${project_root}/${dir.split(path13.sep).join("/")}/\${name}.yaml`),
|
|
34554
|
+
kind: "file",
|
|
34555
|
+
optional: true,
|
|
34556
|
+
collect: "flow"
|
|
34557
|
+
};
|
|
34510
34558
|
function secretsTransportRefusal(url2) {
|
|
34511
34559
|
if (!URL.canParse(url2)) return `${url2} is not a URL`;
|
|
34512
34560
|
const { protocol, hostname: hostname3 } = new URL(url2);
|
|
@@ -34610,6 +34658,23 @@ function createToolsClient(options = {}) {
|
|
|
34610
34658
|
const shadowWarning = await e2eShadowWarningFor(name, args);
|
|
34611
34659
|
const baselineDirs = [];
|
|
34612
34660
|
let unwrittenBaselines2 = [];
|
|
34661
|
+
const memberOptions = {
|
|
34662
|
+
collectMembers: collectFlowMembers,
|
|
34663
|
+
collectStepMembers: olderServer ? (record2, o) => collectStepMembers(record2, o, (root) => path13.join(root, LEGACY_E2E_DIRS[0])) : collectStepMembers,
|
|
34664
|
+
toolFileInputs: (tool) => findTool(tools2, tool)?.fileInputs,
|
|
34665
|
+
signal: opts?.signal
|
|
34666
|
+
};
|
|
34667
|
+
const scanned = remote ? void 0 : await localScanArgs(
|
|
34668
|
+
meta3,
|
|
34669
|
+
finalArgs,
|
|
34670
|
+
(specs) => prepareFileInputs(specs, finalArgs ?? {}, {
|
|
34671
|
+
includeContent: true,
|
|
34672
|
+
scanOnly: true,
|
|
34673
|
+
log: () => {
|
|
34674
|
+
},
|
|
34675
|
+
...memberOptions
|
|
34676
|
+
})
|
|
34677
|
+
);
|
|
34613
34678
|
if (meta3?.fileInputs?.length) {
|
|
34614
34679
|
if (remote) assertRequiredPresent(meta3, finalArgs);
|
|
34615
34680
|
finalArgs = await prepareFileInputs(meta3.fileInputs, finalArgs ?? {}, {
|
|
@@ -34617,10 +34682,7 @@ function createToolsClient(options = {}) {
|
|
|
34617
34682
|
uploadEndpoint: remote ? { url: url2, token, formats: uploadFormats } : void 0,
|
|
34618
34683
|
log: diagnose,
|
|
34619
34684
|
baselineDirs,
|
|
34620
|
-
|
|
34621
|
-
collectStepMembers: olderServer ? (record2, o) => collectStepMembers(record2, o, (root) => path13.join(root, LEGACY_E2E_DIRS[0])) : collectStepMembers,
|
|
34622
|
-
toolFileInputs: (tool) => findTool(tools2, tool)?.fileInputs,
|
|
34623
|
-
signal: opts?.signal
|
|
34685
|
+
...memberOptions
|
|
34624
34686
|
});
|
|
34625
34687
|
}
|
|
34626
34688
|
const settle2 = async (data2) => {
|
|
@@ -34645,9 +34707,9 @@ function createToolsClient(options = {}) {
|
|
|
34645
34707
|
const unwrittenFailure = () => unwrittenBaselines2.length > 0 ? `Baselines not written on this client: ${unwrittenBaselines2.join(", ")}` : void 0;
|
|
34646
34708
|
const stream = opts?.onProgress !== void 0 || carriesMembers(finalArgs);
|
|
34647
34709
|
const sentOnce = carriesUpload(finalArgs);
|
|
34648
|
-
const
|
|
34649
|
-
const encodedSecrets =
|
|
34650
|
-
const clientSecrets =
|
|
34710
|
+
const sent = await callerSecrets(remote ? finalArgs : scanned, remote);
|
|
34711
|
+
const encodedSecrets = sent ? encodeClientSecrets(sent.values) : void 0;
|
|
34712
|
+
const clientSecrets = sent?.values.size ? sent.values : void 0;
|
|
34651
34713
|
const refusal = clientSecrets ? secretsTransportRefusal(url2) : void 0;
|
|
34652
34714
|
if (refusal !== void 0) {
|
|
34653
34715
|
throw new Error(
|
|
@@ -34670,16 +34732,21 @@ function createToolsClient(options = {}) {
|
|
|
34670
34732
|
...stream ? { "Accept": "application/x-ndjson", "Accept-Encoding": "identity" } : {},
|
|
34671
34733
|
...authHeaders2(token)
|
|
34672
34734
|
};
|
|
34673
|
-
|
|
34674
|
-
|
|
34675
|
-
|
|
34676
|
-
|
|
34677
|
-
|
|
34678
|
-
|
|
34679
|
-
throw new Error(
|
|
34680
|
-
`forward-secrets would send ${[...clientSecrets.keys()].join(", ")} in an ${CLIENT_SECRETS_HEADER} header of ${encodedSecrets.length} bytes, which takes the request headers past the ${maxHeaderSize} bytes a tool-server accepts, so the call was not sent. Define a secret this large on the machine running the tool-server instead.`
|
|
34735
|
+
const headBytes = () => toolUrl.length + FETCH_HEAD_BYTES + Object.entries(headers).reduce((sum, [key, value]) => sum + key.length + value.length + 4, 0);
|
|
34736
|
+
if (sent?.sources) {
|
|
34737
|
+
headers[CLIENT_SECRET_SOURCES_HEADER] = encodeSecretSourceSummaries(sent.sources);
|
|
34738
|
+
if (headBytes() > maxHeaderSize) {
|
|
34739
|
+
headers[CLIENT_SECRET_SOURCES_HEADER] = encodeSecretSourceSummaries(
|
|
34740
|
+
sent.sources.map((source) => ({ ...source, names: [] }))
|
|
34681
34741
|
);
|
|
34682
34742
|
}
|
|
34743
|
+
if (headBytes() > maxHeaderSize) delete headers[CLIENT_SECRET_SOURCES_HEADER];
|
|
34744
|
+
}
|
|
34745
|
+
if (clientSecrets !== void 0 && encodedSecrets !== void 0 && headBytes() > maxHeaderSize) {
|
|
34746
|
+
const names = [...clientSecrets.keys()].join(", ");
|
|
34747
|
+
throw new Error(
|
|
34748
|
+
remote ? `forward-secrets would send ${names} in an ${CLIENT_SECRETS_HEADER} header of ${encodedSecrets.length} bytes, which takes the request headers past the ${maxHeaderSize} bytes a tool-server accepts, so the call was not sent. Define a secret this large on the machine running the tool-server instead.` : `The values of ${names} take the ${CLIENT_SECRETS_HEADER} header to ${encodedSecrets.length} bytes, past the ${maxHeaderSize} bytes of request headers the tool-server accepts, so the call was not sent. One call can send about 11 KiB of secret values: split the text across several calls.`
|
|
34749
|
+
);
|
|
34683
34750
|
}
|
|
34684
34751
|
const res = await doFetch(
|
|
34685
34752
|
toolUrl,
|
|
@@ -34738,7 +34805,7 @@ function createToolsClient(options = {}) {
|
|
|
34738
34805
|
const headersRefused = res.status === 431 || res.status === 400 && errorBodyMessage(json2) === void 0;
|
|
34739
34806
|
if (clientSecrets && headersRefused) {
|
|
34740
34807
|
throw new ToolInvocationError(
|
|
34741
|
-
`The tool-server, or a proxy in front of it, refused the request headers (${res.status}), as it does when they are too large. The ${CLIENT_SECRETS_HEADER} header carried ${[...clientSecrets.keys()].join(", ")}; define a secret this large on the machine running the tool-server instead.`
|
|
34808
|
+
`The tool-server, or a proxy in front of it, refused the request headers (${res.status}), as it does when they are too large. The ${CLIENT_SECRETS_HEADER} header carried ${[...clientSecrets.keys()].join(", ")}; ` + (remote ? `define a secret this large on the machine running the tool-server instead.` : `split the text across several calls.`)
|
|
34742
34809
|
);
|
|
34743
34810
|
}
|
|
34744
34811
|
if (!res.ok) {
|
|
@@ -34775,7 +34842,7 @@ import {
|
|
|
34775
34842
|
} from "node:fs/promises";
|
|
34776
34843
|
import { constants as fsConstants } from "node:fs";
|
|
34777
34844
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
34778
|
-
import { basename as basename7, extname as extname2, isAbsolute as isAbsolute6, join as join14, normalize as normalize2, resolve as resolve11, sep as
|
|
34845
|
+
import { basename as basename7, extname as extname2, isAbsolute as isAbsolute6, join as join14, normalize as normalize2, resolve as resolve11, sep as sep6 } from "node:path";
|
|
34779
34846
|
import { createHash as createHash3 } from "node:crypto";
|
|
34780
34847
|
var ARTIFACT_MARKER2 = "__argentArtifact";
|
|
34781
34848
|
function isArtifactHandle(value) {
|
|
@@ -34823,7 +34890,7 @@ function configuredRecordingsDir() {
|
|
|
34823
34890
|
const trimmed = value.trim();
|
|
34824
34891
|
if (trimmed === "") return null;
|
|
34825
34892
|
const home2 = resolveHomeDir();
|
|
34826
|
-
const expanded = trimmed === "~" ? home2 : trimmed.startsWith("~/") || trimmed.startsWith(`~${
|
|
34893
|
+
const expanded = trimmed === "~" ? home2 : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep6}`) ? join14(home2, trimmed.slice(2)) : trimmed;
|
|
34827
34894
|
return resolve11(durableBaseDir(), expanded);
|
|
34828
34895
|
}
|
|
34829
34896
|
var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
|
|
@@ -34871,7 +34938,7 @@ async function writeDurableUnique(dir, filename, write) {
|
|
|
34871
34938
|
function durableSaveTarget(handle) {
|
|
34872
34939
|
if (typeof handle.saveDir !== "string" || !handle.saveDir || handle.archive) return null;
|
|
34873
34940
|
const rel = normalize2(handle.saveDir);
|
|
34874
|
-
if (isAbsolute6(rel) || rel === ".." || rel.startsWith(`..${
|
|
34941
|
+
if (isAbsolute6(rel) || rel === ".." || rel.startsWith(`..${sep6}`) || rel.split(sep6).includes("..")) {
|
|
34875
34942
|
return null;
|
|
34876
34943
|
}
|
|
34877
34944
|
if (!ALLOWED_SAVE_DIRS.has(rel)) return null;
|
|
@@ -38596,7 +38663,7 @@ function isCi(env = process.env) {
|
|
|
38596
38663
|
var SESSION_ID2 = randomUUID5();
|
|
38597
38664
|
function readCliVersion() {
|
|
38598
38665
|
if (true) {
|
|
38599
|
-
return "0.35.1-next.
|
|
38666
|
+
return "0.35.1-next.46";
|
|
38600
38667
|
}
|
|
38601
38668
|
return "0.0.0";
|
|
38602
38669
|
}
|
|
@@ -39908,8 +39975,8 @@ Options (run):
|
|
|
39908
39975
|
--update-baselines Write/refresh screenshot baselines instead of diffing,
|
|
39909
39976
|
also those of tests that tool: e2e-execute steps run,
|
|
39910
39977
|
unless such a step sets updateBaselines
|
|
39911
|
-
--
|
|
39912
|
-
|
|
39978
|
+
--var NAME=value Set a test input for this run. Repeat for more names.
|
|
39979
|
+
Use {{secret:NAME}} for credentials.
|
|
39913
39980
|
--output <dir> Also write failed snapshot images (baseline/current/diff)
|
|
39914
39981
|
and failed-step screenshots (step-<n>-screen.png)
|
|
39915
39982
|
under <dir>/<test>/ \u2014 a stable path for CI artifact
|
|
@@ -39932,7 +39999,8 @@ Examples:
|
|
|
39932
39999
|
argent e2e run .argent/e2e/checkout.yaml --output e2e-artifacts --json
|
|
39933
40000
|
argent e2e run ~/shared-e2e/checkout.yaml --device <UDID> --update-baselines
|
|
39934
40001
|
argent e2e run .argent/e2e --recursive
|
|
39935
|
-
argent e2e run checkout --
|
|
40002
|
+
argent e2e run checkout --var API_URL=https://staging.example.com
|
|
40003
|
+
argent e2e run login --var PASSWORD='{{secret:ALICE_PASSWORD}}'
|
|
39936
40004
|
argent e2e check checkout
|
|
39937
40005
|
`);
|
|
39938
40006
|
}
|
|
@@ -39946,7 +40014,7 @@ var RUN_OPTIONS = {
|
|
|
39946
40014
|
// run it would stop the whole batch.
|
|
39947
40015
|
"platform": { kind: "value", choices: SELECTABLE_PLATFORMS },
|
|
39948
40016
|
"output": { kind: "value" },
|
|
39949
|
-
"
|
|
40017
|
+
"var": { kind: "value", repeatable: true }
|
|
39950
40018
|
};
|
|
39951
40019
|
var LIST_OPTIONS = {
|
|
39952
40020
|
json: { kind: "boolean" },
|
|
@@ -39982,27 +40050,33 @@ function parseRunArgs(argv) {
|
|
|
39982
40050
|
if (options.device !== void 0) out.device = options.device;
|
|
39983
40051
|
if (options.platform !== void 0) out.platform = options.platform;
|
|
39984
40052
|
if (options.output !== void 0) out.output = options.output;
|
|
39985
|
-
if (options.
|
|
40053
|
+
if (options.var !== void 0) out.vars = parseVarFlags(options.var);
|
|
39986
40054
|
if (out.json && out.jsonStream) {
|
|
39987
40055
|
throw new FlagParseException("--json and --json-stream cannot be combined");
|
|
39988
40056
|
}
|
|
39989
40057
|
return out;
|
|
39990
40058
|
}
|
|
39991
|
-
var
|
|
39992
|
-
function
|
|
39993
|
-
const
|
|
40059
|
+
var VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
40060
|
+
function parseVarFlags(values) {
|
|
40061
|
+
const vars = {};
|
|
39994
40062
|
for (const entry of values) {
|
|
39995
40063
|
const eq = entry.indexOf("=");
|
|
39996
40064
|
const name = eq === -1 ? entry : entry.slice(0, eq);
|
|
39997
|
-
if (eq === -1 || !
|
|
40065
|
+
if (eq === -1 || !VAR_NAME_RE.test(name) || name === "__proto__") {
|
|
39998
40066
|
throw new FlagParseException(
|
|
39999
|
-
`--
|
|
40067
|
+
`--var takes NAME=value with a name of letters, digits and _, not starting with a digit; got ${JSON.stringify(entry)}`
|
|
40000
40068
|
);
|
|
40001
40069
|
}
|
|
40002
|
-
|
|
40003
|
-
|
|
40070
|
+
const value = entry.slice(eq + 1);
|
|
40071
|
+
if (value.replace(SECRET_PLACEHOLDER_RE, "").includes("{{")) {
|
|
40072
|
+
throw new FlagParseException(
|
|
40073
|
+
`--var ${name} takes only literal text and {{secret:NAME}} placeholders, not another reference; got ${JSON.stringify(value)}`
|
|
40074
|
+
);
|
|
40075
|
+
}
|
|
40076
|
+
delete vars[name];
|
|
40077
|
+
vars[name] = value;
|
|
40004
40078
|
}
|
|
40005
|
-
return
|
|
40079
|
+
return vars;
|
|
40006
40080
|
}
|
|
40007
40081
|
var SHUTDOWN_HEADER = " shutdown:";
|
|
40008
40082
|
function renderEchoLine(s) {
|
|
@@ -40161,8 +40235,8 @@ function rerunCommand(flowPath, rel, projectRoot, args) {
|
|
|
40161
40235
|
if (args.platform) parts.push("--platform", shellQuoteArg(args.platform));
|
|
40162
40236
|
if (args.updateBaselines) parts.push("--update-baselines");
|
|
40163
40237
|
if (args.output) parts.push("--output", pathArg(path20.join(args.output, path20.dirname(rel))));
|
|
40164
|
-
for (const [name, value] of Object.entries(args.
|
|
40165
|
-
parts.push("--
|
|
40238
|
+
for (const [name, value] of Object.entries(args.vars ?? {})) {
|
|
40239
|
+
parts.push("--var", shellQuoteArg(`${name}=${value}`));
|
|
40166
40240
|
}
|
|
40167
40241
|
return parts.join(" ");
|
|
40168
40242
|
}
|
|
@@ -40550,7 +40624,7 @@ function buildRunPayload(flowPath, projectRoot, args) {
|
|
|
40550
40624
|
if (args.device) payload.device = args.device;
|
|
40551
40625
|
if (args.platform) payload.platform = args.platform;
|
|
40552
40626
|
if (args.updateBaselines) payload.updateBaselines = true;
|
|
40553
|
-
if (args.
|
|
40627
|
+
if (args.vars) payload.vars = args.vars;
|
|
40554
40628
|
return payload;
|
|
40555
40629
|
}
|
|
40556
40630
|
function writeJsonStreamRecord(record2) {
|
|
@@ -41795,9 +41869,9 @@ var START_OPTIONS = {
|
|
|
41795
41869
|
"host": { kind: "value" },
|
|
41796
41870
|
"idle-timeout": { kind: "value" }
|
|
41797
41871
|
};
|
|
41798
|
-
function parseOrStartFlagError(
|
|
41872
|
+
function parseOrStartFlagError(parse8) {
|
|
41799
41873
|
try {
|
|
41800
|
-
return
|
|
41874
|
+
return parse8();
|
|
41801
41875
|
} catch (err) {
|
|
41802
41876
|
if (err instanceof UsageError) throw new StartFlagError(err.message);
|
|
41803
41877
|
throw err;
|
|
@@ -42563,10 +42637,10 @@ function parseSseBuffer(buffer) {
|
|
|
42563
42637
|
const events = [];
|
|
42564
42638
|
let rest = normalised;
|
|
42565
42639
|
for (; ; ) {
|
|
42566
|
-
const
|
|
42567
|
-
if (
|
|
42568
|
-
const rawFrame = rest.slice(0,
|
|
42569
|
-
rest = rest.slice(
|
|
42640
|
+
const sep12 = rest.indexOf("\n\n");
|
|
42641
|
+
if (sep12 === -1) break;
|
|
42642
|
+
const rawFrame = rest.slice(0, sep12);
|
|
42643
|
+
rest = rest.slice(sep12 + 2);
|
|
42570
42644
|
let event = "message";
|
|
42571
42645
|
const dataLines = [];
|
|
42572
42646
|
for (const line of rawFrame.split("\n")) {
|
|
@@ -43172,22 +43246,21 @@ async function secrets(argv) {
|
|
|
43172
43246
|
function printUsage() {
|
|
43173
43247
|
console.log(`Usage: argent secrets [list] [--json]
|
|
43174
43248
|
|
|
43175
|
-
List
|
|
43176
|
-
they come from. Names only \u2014 a value is never printed.
|
|
43249
|
+
List secret names and their sources without printing values.
|
|
43177
43250
|
|
|
43178
|
-
|
|
43179
|
-
|
|
43251
|
+
For local calls, lookup uses the working directory and environment of the
|
|
43252
|
+
\`argent\` command or the agent's MCP server. The first matching source wins.
|
|
43180
43253
|
|
|
43181
|
-
1. ${SECRET_ENV_PREFIX}<NAME> in the environment
|
|
43254
|
+
1. ${SECRET_ENV_PREFIX}<NAME> in the environment
|
|
43182
43255
|
2. <project>/.argent/secrets.env every key (gitignore this file)
|
|
43183
|
-
3. <project>/.env.local, then <project>/.env
|
|
43256
|
+
3. <project>/.env.local, then <project>/.env keys starting with ${SECRET_ENV_PREFIX}
|
|
43184
43257
|
4. ~/.argent/secrets.env every key, any project
|
|
43185
43258
|
|
|
43186
|
-
|
|
43187
|
-
|
|
43259
|
+
Run this command from the project to check secret setup. File changes apply to
|
|
43260
|
+
the next call. Restart the MCP server to pick up environment changes.
|
|
43188
43261
|
|
|
43189
|
-
|
|
43190
|
-
|
|
43262
|
+
A linked tool-server uses its own sources by default. With
|
|
43263
|
+
\`argent enable forward-secrets\`, client values take precedence.
|
|
43191
43264
|
|
|
43192
43265
|
Examples:
|
|
43193
43266
|
echo 'APP_PASSWORD=\u2026' >> ~/.argent/secrets.env # available in every project
|
|
@@ -47255,7 +47328,7 @@ function validateTablePeek(ctx, peek, ptr) {
|
|
|
47255
47328
|
if (peek === null || ctx.uk === 2)
|
|
47256
47329
|
TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
|
|
47257
47330
|
}
|
|
47258
|
-
function
|
|
47331
|
+
function parse5(toml, options = {}) {
|
|
47259
47332
|
let ctx = {
|
|
47260
47333
|
s: toml,
|
|
47261
47334
|
p: 0,
|
|
@@ -48215,7 +48288,7 @@ var ParseOptions;
|
|
|
48215
48288
|
allowTrailingComma: false
|
|
48216
48289
|
};
|
|
48217
48290
|
})(ParseOptions || (ParseOptions = {}));
|
|
48218
|
-
function
|
|
48291
|
+
function parse6(text2, errors = [], options = ParseOptions.DEFAULT) {
|
|
48219
48292
|
let currentProperty = null;
|
|
48220
48293
|
let currentParent = [];
|
|
48221
48294
|
const previousParents = [];
|
|
@@ -48296,11 +48369,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
48296
48369
|
onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
|
|
48297
48370
|
ensurePropertyComplete(offset + length);
|
|
48298
48371
|
},
|
|
48299
|
-
onSeparator: (
|
|
48372
|
+
onSeparator: (sep12, offset, length) => {
|
|
48300
48373
|
if (currentParent.type === "property") {
|
|
48301
|
-
if (
|
|
48374
|
+
if (sep12 === ":") {
|
|
48302
48375
|
currentParent.colonOffset = offset;
|
|
48303
|
-
} else if (
|
|
48376
|
+
} else if (sep12 === ",") {
|
|
48304
48377
|
ensurePropertyComplete(offset);
|
|
48305
48378
|
}
|
|
48306
48379
|
}
|
|
@@ -48848,7 +48921,7 @@ var SyntaxKind;
|
|
|
48848
48921
|
SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
|
|
48849
48922
|
SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
|
|
48850
48923
|
})(SyntaxKind || (SyntaxKind = {}));
|
|
48851
|
-
var
|
|
48924
|
+
var parse7 = parse6;
|
|
48852
48925
|
var ParseErrorCode;
|
|
48853
48926
|
(function(ParseErrorCode2) {
|
|
48854
48927
|
ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
@@ -49330,7 +49403,7 @@ function resolveProjectRoot2(startDir, homeDir = os5.homedir()) {
|
|
|
49330
49403
|
function readToml(filePath) {
|
|
49331
49404
|
if (!fs26.existsSync(filePath)) return {};
|
|
49332
49405
|
try {
|
|
49333
|
-
return
|
|
49406
|
+
return parse5(fs26.readFileSync(filePath, "utf8"));
|
|
49334
49407
|
} catch {
|
|
49335
49408
|
return {};
|
|
49336
49409
|
}
|
|
@@ -49406,12 +49479,12 @@ function readJsonc(filePath) {
|
|
|
49406
49479
|
let raw = fs26.readFileSync(filePath, "utf8");
|
|
49407
49480
|
if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
|
|
49408
49481
|
if (raw.trim() === "") return {};
|
|
49409
|
-
const parsed =
|
|
49482
|
+
const parsed = parse7(raw, [], { allowTrailingComma: true });
|
|
49410
49483
|
return parsed ?? {};
|
|
49411
49484
|
}
|
|
49412
49485
|
function tomlSyntaxErrorLine(raw) {
|
|
49413
49486
|
try {
|
|
49414
|
-
|
|
49487
|
+
parse5(raw);
|
|
49415
49488
|
return null;
|
|
49416
49489
|
} catch (err) {
|
|
49417
49490
|
return err.line ?? 1;
|
|
@@ -49433,7 +49506,7 @@ function findConfigSyntaxErrorLine(filePath, jsonOptions) {
|
|
|
49433
49506
|
if (filePath.endsWith(".toml")) return tomlSyntaxErrorLine(raw);
|
|
49434
49507
|
if (/\.ya?ml$/.test(filePath)) return yamlSyntaxErrorLine(raw);
|
|
49435
49508
|
const errors = [];
|
|
49436
|
-
|
|
49509
|
+
parse7(raw, errors, jsonOptions);
|
|
49437
49510
|
const first = errors[0];
|
|
49438
49511
|
return first ? raw.slice(0, first.offset).split("\n").length : null;
|
|
49439
49512
|
}
|
|
@@ -49443,12 +49516,12 @@ function editJsoncFile(filePath, jsonPath, value) {
|
|
|
49443
49516
|
if (value === void 0) {
|
|
49444
49517
|
for (let i2 = jsonPath.length - 1; i2 > 0; i2--) {
|
|
49445
49518
|
const parentPath = jsonPath.slice(0, i2);
|
|
49446
|
-
const parsed2 =
|
|
49519
|
+
const parsed2 = parse7(text2, [], { allowTrailingComma: true });
|
|
49447
49520
|
if (!isEmptyPlainObject(getAtJsoncPath(parsed2, parentPath))) break;
|
|
49448
49521
|
text2 = setJsoncIn(text2, parentPath, void 0);
|
|
49449
49522
|
}
|
|
49450
49523
|
}
|
|
49451
|
-
const parsed =
|
|
49524
|
+
const parsed = parse7(text2, [], { allowTrailingComma: true });
|
|
49452
49525
|
if (isEmptyPlainObject(parsed)) {
|
|
49453
49526
|
fs26.rmSync(filePath, { force: true });
|
|
49454
49527
|
rmEmptyDir(path36.dirname(filePath));
|
|
@@ -49572,14 +49645,14 @@ function parseJsoncStrict(filePath) {
|
|
|
49572
49645
|
}
|
|
49573
49646
|
if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
|
|
49574
49647
|
const errors = [];
|
|
49575
|
-
const parsed =
|
|
49648
|
+
const parsed = parse7(raw, errors, { allowTrailingComma: true });
|
|
49576
49649
|
if (errors.length > 0 || parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
49577
49650
|
return null;
|
|
49578
49651
|
return parsed;
|
|
49579
49652
|
}
|
|
49580
49653
|
function parseTomlStrict(filePath) {
|
|
49581
49654
|
try {
|
|
49582
|
-
return
|
|
49655
|
+
return parse5(fs27.readFileSync(filePath, "utf8"));
|
|
49583
49656
|
} catch {
|
|
49584
49657
|
return null;
|
|
49585
49658
|
}
|