@swmansion/argent 0.35.1-next.45 → 0.35.1-next.47
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 +215 -149
- 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 +2 -2
- package/dist/tool-server.cjs +287 -206
- package/package.json +2 -2
- package/skills/argent-create-e2e/references/e2e-yaml.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.47";
|
|
38600
38667
|
}
|
|
38601
38668
|
return "0.0.0";
|
|
38602
38669
|
}
|
|
@@ -41802,9 +41869,9 @@ var START_OPTIONS = {
|
|
|
41802
41869
|
"host": { kind: "value" },
|
|
41803
41870
|
"idle-timeout": { kind: "value" }
|
|
41804
41871
|
};
|
|
41805
|
-
function parseOrStartFlagError(
|
|
41872
|
+
function parseOrStartFlagError(parse8) {
|
|
41806
41873
|
try {
|
|
41807
|
-
return
|
|
41874
|
+
return parse8();
|
|
41808
41875
|
} catch (err) {
|
|
41809
41876
|
if (err instanceof UsageError) throw new StartFlagError(err.message);
|
|
41810
41877
|
throw err;
|
|
@@ -42570,10 +42637,10 @@ function parseSseBuffer(buffer) {
|
|
|
42570
42637
|
const events = [];
|
|
42571
42638
|
let rest = normalised;
|
|
42572
42639
|
for (; ; ) {
|
|
42573
|
-
const
|
|
42574
|
-
if (
|
|
42575
|
-
const rawFrame = rest.slice(0,
|
|
42576
|
-
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);
|
|
42577
42644
|
let event = "message";
|
|
42578
42645
|
const dataLines = [];
|
|
42579
42646
|
for (const line of rawFrame.split("\n")) {
|
|
@@ -43179,22 +43246,21 @@ async function secrets(argv) {
|
|
|
43179
43246
|
function printUsage() {
|
|
43180
43247
|
console.log(`Usage: argent secrets [list] [--json]
|
|
43181
43248
|
|
|
43182
|
-
List
|
|
43183
|
-
they come from. Names only \u2014 a value is never printed.
|
|
43249
|
+
List secret names and their sources without printing values.
|
|
43184
43250
|
|
|
43185
|
-
|
|
43186
|
-
|
|
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.
|
|
43187
43253
|
|
|
43188
|
-
1. ${SECRET_ENV_PREFIX}<NAME> in the environment
|
|
43254
|
+
1. ${SECRET_ENV_PREFIX}<NAME> in the environment
|
|
43189
43255
|
2. <project>/.argent/secrets.env every key (gitignore this file)
|
|
43190
|
-
3. <project>/.env.local, then <project>/.env
|
|
43256
|
+
3. <project>/.env.local, then <project>/.env keys starting with ${SECRET_ENV_PREFIX}
|
|
43191
43257
|
4. ~/.argent/secrets.env every key, any project
|
|
43192
43258
|
|
|
43193
|
-
|
|
43194
|
-
|
|
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.
|
|
43195
43261
|
|
|
43196
|
-
|
|
43197
|
-
|
|
43262
|
+
A linked tool-server uses its own sources by default. With
|
|
43263
|
+
\`argent enable forward-secrets\`, client values take precedence.
|
|
43198
43264
|
|
|
43199
43265
|
Examples:
|
|
43200
43266
|
echo 'APP_PASSWORD=\u2026' >> ~/.argent/secrets.env # available in every project
|
|
@@ -47262,7 +47328,7 @@ function validateTablePeek(ctx, peek, ptr) {
|
|
|
47262
47328
|
if (peek === null || ctx.uk === 2)
|
|
47263
47329
|
TomlError.x(peek === null ? "trying to redefine an already defined table or value" : "document contains an unsafe property", ctx, ptr);
|
|
47264
47330
|
}
|
|
47265
|
-
function
|
|
47331
|
+
function parse5(toml, options = {}) {
|
|
47266
47332
|
let ctx = {
|
|
47267
47333
|
s: toml,
|
|
47268
47334
|
p: 0,
|
|
@@ -48222,7 +48288,7 @@ var ParseOptions;
|
|
|
48222
48288
|
allowTrailingComma: false
|
|
48223
48289
|
};
|
|
48224
48290
|
})(ParseOptions || (ParseOptions = {}));
|
|
48225
|
-
function
|
|
48291
|
+
function parse6(text2, errors = [], options = ParseOptions.DEFAULT) {
|
|
48226
48292
|
let currentProperty = null;
|
|
48227
48293
|
let currentParent = [];
|
|
48228
48294
|
const previousParents = [];
|
|
@@ -48303,11 +48369,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
48303
48369
|
onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
|
|
48304
48370
|
ensurePropertyComplete(offset + length);
|
|
48305
48371
|
},
|
|
48306
|
-
onSeparator: (
|
|
48372
|
+
onSeparator: (sep12, offset, length) => {
|
|
48307
48373
|
if (currentParent.type === "property") {
|
|
48308
|
-
if (
|
|
48374
|
+
if (sep12 === ":") {
|
|
48309
48375
|
currentParent.colonOffset = offset;
|
|
48310
|
-
} else if (
|
|
48376
|
+
} else if (sep12 === ",") {
|
|
48311
48377
|
ensurePropertyComplete(offset);
|
|
48312
48378
|
}
|
|
48313
48379
|
}
|
|
@@ -48855,7 +48921,7 @@ var SyntaxKind;
|
|
|
48855
48921
|
SyntaxKind2[SyntaxKind2["Unknown"] = 16] = "Unknown";
|
|
48856
48922
|
SyntaxKind2[SyntaxKind2["EOF"] = 17] = "EOF";
|
|
48857
48923
|
})(SyntaxKind || (SyntaxKind = {}));
|
|
48858
|
-
var
|
|
48924
|
+
var parse7 = parse6;
|
|
48859
48925
|
var ParseErrorCode;
|
|
48860
48926
|
(function(ParseErrorCode2) {
|
|
48861
48927
|
ParseErrorCode2[ParseErrorCode2["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
@@ -49337,7 +49403,7 @@ function resolveProjectRoot2(startDir, homeDir = os5.homedir()) {
|
|
|
49337
49403
|
function readToml(filePath) {
|
|
49338
49404
|
if (!fs26.existsSync(filePath)) return {};
|
|
49339
49405
|
try {
|
|
49340
|
-
return
|
|
49406
|
+
return parse5(fs26.readFileSync(filePath, "utf8"));
|
|
49341
49407
|
} catch {
|
|
49342
49408
|
return {};
|
|
49343
49409
|
}
|
|
@@ -49413,12 +49479,12 @@ function readJsonc(filePath) {
|
|
|
49413
49479
|
let raw = fs26.readFileSync(filePath, "utf8");
|
|
49414
49480
|
if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
|
|
49415
49481
|
if (raw.trim() === "") return {};
|
|
49416
|
-
const parsed =
|
|
49482
|
+
const parsed = parse7(raw, [], { allowTrailingComma: true });
|
|
49417
49483
|
return parsed ?? {};
|
|
49418
49484
|
}
|
|
49419
49485
|
function tomlSyntaxErrorLine(raw) {
|
|
49420
49486
|
try {
|
|
49421
|
-
|
|
49487
|
+
parse5(raw);
|
|
49422
49488
|
return null;
|
|
49423
49489
|
} catch (err) {
|
|
49424
49490
|
return err.line ?? 1;
|
|
@@ -49440,7 +49506,7 @@ function findConfigSyntaxErrorLine(filePath, jsonOptions) {
|
|
|
49440
49506
|
if (filePath.endsWith(".toml")) return tomlSyntaxErrorLine(raw);
|
|
49441
49507
|
if (/\.ya?ml$/.test(filePath)) return yamlSyntaxErrorLine(raw);
|
|
49442
49508
|
const errors = [];
|
|
49443
|
-
|
|
49509
|
+
parse7(raw, errors, jsonOptions);
|
|
49444
49510
|
const first = errors[0];
|
|
49445
49511
|
return first ? raw.slice(0, first.offset).split("\n").length : null;
|
|
49446
49512
|
}
|
|
@@ -49450,12 +49516,12 @@ function editJsoncFile(filePath, jsonPath, value) {
|
|
|
49450
49516
|
if (value === void 0) {
|
|
49451
49517
|
for (let i2 = jsonPath.length - 1; i2 > 0; i2--) {
|
|
49452
49518
|
const parentPath = jsonPath.slice(0, i2);
|
|
49453
|
-
const parsed2 =
|
|
49519
|
+
const parsed2 = parse7(text2, [], { allowTrailingComma: true });
|
|
49454
49520
|
if (!isEmptyPlainObject(getAtJsoncPath(parsed2, parentPath))) break;
|
|
49455
49521
|
text2 = setJsoncIn(text2, parentPath, void 0);
|
|
49456
49522
|
}
|
|
49457
49523
|
}
|
|
49458
|
-
const parsed =
|
|
49524
|
+
const parsed = parse7(text2, [], { allowTrailingComma: true });
|
|
49459
49525
|
if (isEmptyPlainObject(parsed)) {
|
|
49460
49526
|
fs26.rmSync(filePath, { force: true });
|
|
49461
49527
|
rmEmptyDir(path36.dirname(filePath));
|
|
@@ -49579,14 +49645,14 @@ function parseJsoncStrict(filePath) {
|
|
|
49579
49645
|
}
|
|
49580
49646
|
if (raw.charCodeAt(0) === 65279) raw = raw.slice(1);
|
|
49581
49647
|
const errors = [];
|
|
49582
|
-
const parsed =
|
|
49648
|
+
const parsed = parse7(raw, errors, { allowTrailingComma: true });
|
|
49583
49649
|
if (errors.length > 0 || parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
49584
49650
|
return null;
|
|
49585
49651
|
return parsed;
|
|
49586
49652
|
}
|
|
49587
49653
|
function parseTomlStrict(filePath) {
|
|
49588
49654
|
try {
|
|
49589
|
-
return
|
|
49655
|
+
return parse5(fs27.readFileSync(filePath, "utf8"));
|
|
49590
49656
|
} catch {
|
|
49591
49657
|
return null;
|
|
49592
49658
|
}
|