@swmansion/argent 0.27.1-next.21 → 0.27.1-next.23
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/bin/argent-android-devtools-0.2.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +579 -352
- package/dist/client.js +402 -187
- package/dist/installer.mjs +144 -141
- package/dist/mcp-server.mjs +444 -229
- package/dist/tool-args.generated.d.ts +2 -2
- package/dist/tool-server.cjs +1249 -928
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/skills/argent-create-flow/references/flow-yaml.md +4 -2
- package/skills/argent-create-flow/references/live-authoring.md +19 -3
package/dist/installer.mjs
CHANGED
|
@@ -1193,7 +1193,7 @@ var init_esm = __esm({
|
|
|
1193
1193
|
var require_main = __commonJS({
|
|
1194
1194
|
"../../node_modules/dotenv/lib/main.js"(exports, module) {
|
|
1195
1195
|
var fs20 = __require("fs");
|
|
1196
|
-
var
|
|
1196
|
+
var path26 = __require("path");
|
|
1197
1197
|
var os3 = __require("os");
|
|
1198
1198
|
var crypto3 = __require("crypto");
|
|
1199
1199
|
var TIPS = [
|
|
@@ -1332,7 +1332,7 @@ var require_main = __commonJS({
|
|
|
1332
1332
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
1333
1333
|
}
|
|
1334
1334
|
} else {
|
|
1335
|
-
possibleVaultPath =
|
|
1335
|
+
possibleVaultPath = path26.resolve(process.cwd(), ".env.vault");
|
|
1336
1336
|
}
|
|
1337
1337
|
if (fs20.existsSync(possibleVaultPath)) {
|
|
1338
1338
|
return possibleVaultPath;
|
|
@@ -1340,7 +1340,7 @@ var require_main = __commonJS({
|
|
|
1340
1340
|
return null;
|
|
1341
1341
|
}
|
|
1342
1342
|
function _resolveHome(envPath) {
|
|
1343
|
-
return envPath[0] === "~" ?
|
|
1343
|
+
return envPath[0] === "~" ? path26.join(os3.homedir(), envPath.slice(1)) : envPath;
|
|
1344
1344
|
}
|
|
1345
1345
|
function _configVault(options) {
|
|
1346
1346
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -1357,7 +1357,7 @@ var require_main = __commonJS({
|
|
|
1357
1357
|
return { parsed };
|
|
1358
1358
|
}
|
|
1359
1359
|
function configDotenv(options) {
|
|
1360
|
-
const dotenvPath =
|
|
1360
|
+
const dotenvPath = path26.resolve(process.cwd(), ".env");
|
|
1361
1361
|
let encoding = "utf8";
|
|
1362
1362
|
let processEnv = process.env;
|
|
1363
1363
|
if (options && options.processEnv != null) {
|
|
@@ -1385,13 +1385,13 @@ var require_main = __commonJS({
|
|
|
1385
1385
|
}
|
|
1386
1386
|
let lastError;
|
|
1387
1387
|
const parsedAll = {};
|
|
1388
|
-
for (const
|
|
1388
|
+
for (const path27 of optionPaths) {
|
|
1389
1389
|
try {
|
|
1390
|
-
const parsed = DotenvModule.parse(fs20.readFileSync(
|
|
1390
|
+
const parsed = DotenvModule.parse(fs20.readFileSync(path27, { encoding }));
|
|
1391
1391
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
1392
1392
|
} catch (e) {
|
|
1393
1393
|
if (debug) {
|
|
1394
|
-
_debug(`failed to load ${
|
|
1394
|
+
_debug(`failed to load ${path27} ${e.message}`);
|
|
1395
1395
|
}
|
|
1396
1396
|
lastError = e;
|
|
1397
1397
|
}
|
|
@@ -1404,7 +1404,7 @@ var require_main = __commonJS({
|
|
|
1404
1404
|
const shortPaths = [];
|
|
1405
1405
|
for (const filePath of optionPaths) {
|
|
1406
1406
|
try {
|
|
1407
|
-
const relative5 =
|
|
1407
|
+
const relative5 = path26.relative(process.cwd(), filePath);
|
|
1408
1408
|
shortPaths.push(relative5);
|
|
1409
1409
|
} catch (e) {
|
|
1410
1410
|
if (debug) {
|
|
@@ -3579,17 +3579,17 @@ var require_visit = __commonJS({
|
|
|
3579
3579
|
visit2.BREAK = BREAK;
|
|
3580
3580
|
visit2.SKIP = SKIP;
|
|
3581
3581
|
visit2.REMOVE = REMOVE;
|
|
3582
|
-
function visit_(key, node, visitor,
|
|
3583
|
-
const ctrl = callVisitor(key, node, visitor,
|
|
3582
|
+
function visit_(key, node, visitor, path26) {
|
|
3583
|
+
const ctrl = callVisitor(key, node, visitor, path26);
|
|
3584
3584
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
3585
|
-
replaceNode(key,
|
|
3586
|
-
return visit_(key, ctrl, visitor,
|
|
3585
|
+
replaceNode(key, path26, ctrl);
|
|
3586
|
+
return visit_(key, ctrl, visitor, path26);
|
|
3587
3587
|
}
|
|
3588
3588
|
if (typeof ctrl !== "symbol") {
|
|
3589
3589
|
if (identity2.isCollection(node)) {
|
|
3590
|
-
|
|
3590
|
+
path26 = Object.freeze(path26.concat(node));
|
|
3591
3591
|
for (let i2 = 0; i2 < node.items.length; ++i2) {
|
|
3592
|
-
const ci = visit_(i2, node.items[i2], visitor,
|
|
3592
|
+
const ci = visit_(i2, node.items[i2], visitor, path26);
|
|
3593
3593
|
if (typeof ci === "number")
|
|
3594
3594
|
i2 = ci - 1;
|
|
3595
3595
|
else if (ci === BREAK)
|
|
@@ -3600,13 +3600,13 @@ var require_visit = __commonJS({
|
|
|
3600
3600
|
}
|
|
3601
3601
|
}
|
|
3602
3602
|
} else if (identity2.isPair(node)) {
|
|
3603
|
-
|
|
3604
|
-
const ck = visit_("key", node.key, visitor,
|
|
3603
|
+
path26 = Object.freeze(path26.concat(node));
|
|
3604
|
+
const ck = visit_("key", node.key, visitor, path26);
|
|
3605
3605
|
if (ck === BREAK)
|
|
3606
3606
|
return BREAK;
|
|
3607
3607
|
else if (ck === REMOVE)
|
|
3608
3608
|
node.key = null;
|
|
3609
|
-
const cv = visit_("value", node.value, visitor,
|
|
3609
|
+
const cv = visit_("value", node.value, visitor, path26);
|
|
3610
3610
|
if (cv === BREAK)
|
|
3611
3611
|
return BREAK;
|
|
3612
3612
|
else if (cv === REMOVE)
|
|
@@ -3627,17 +3627,17 @@ var require_visit = __commonJS({
|
|
|
3627
3627
|
visitAsync.BREAK = BREAK;
|
|
3628
3628
|
visitAsync.SKIP = SKIP;
|
|
3629
3629
|
visitAsync.REMOVE = REMOVE;
|
|
3630
|
-
async function visitAsync_(key, node, visitor,
|
|
3631
|
-
const ctrl = await callVisitor(key, node, visitor,
|
|
3630
|
+
async function visitAsync_(key, node, visitor, path26) {
|
|
3631
|
+
const ctrl = await callVisitor(key, node, visitor, path26);
|
|
3632
3632
|
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
3633
|
-
replaceNode(key,
|
|
3634
|
-
return visitAsync_(key, ctrl, visitor,
|
|
3633
|
+
replaceNode(key, path26, ctrl);
|
|
3634
|
+
return visitAsync_(key, ctrl, visitor, path26);
|
|
3635
3635
|
}
|
|
3636
3636
|
if (typeof ctrl !== "symbol") {
|
|
3637
3637
|
if (identity2.isCollection(node)) {
|
|
3638
|
-
|
|
3638
|
+
path26 = Object.freeze(path26.concat(node));
|
|
3639
3639
|
for (let i2 = 0; i2 < node.items.length; ++i2) {
|
|
3640
|
-
const ci = await visitAsync_(i2, node.items[i2], visitor,
|
|
3640
|
+
const ci = await visitAsync_(i2, node.items[i2], visitor, path26);
|
|
3641
3641
|
if (typeof ci === "number")
|
|
3642
3642
|
i2 = ci - 1;
|
|
3643
3643
|
else if (ci === BREAK)
|
|
@@ -3648,13 +3648,13 @@ var require_visit = __commonJS({
|
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
3650
|
} else if (identity2.isPair(node)) {
|
|
3651
|
-
|
|
3652
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
3651
|
+
path26 = Object.freeze(path26.concat(node));
|
|
3652
|
+
const ck = await visitAsync_("key", node.key, visitor, path26);
|
|
3653
3653
|
if (ck === BREAK)
|
|
3654
3654
|
return BREAK;
|
|
3655
3655
|
else if (ck === REMOVE)
|
|
3656
3656
|
node.key = null;
|
|
3657
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
3657
|
+
const cv = await visitAsync_("value", node.value, visitor, path26);
|
|
3658
3658
|
if (cv === BREAK)
|
|
3659
3659
|
return BREAK;
|
|
3660
3660
|
else if (cv === REMOVE)
|
|
@@ -3681,23 +3681,23 @@ var require_visit = __commonJS({
|
|
|
3681
3681
|
}
|
|
3682
3682
|
return visitor;
|
|
3683
3683
|
}
|
|
3684
|
-
function callVisitor(key, node, visitor,
|
|
3684
|
+
function callVisitor(key, node, visitor, path26) {
|
|
3685
3685
|
if (typeof visitor === "function")
|
|
3686
|
-
return visitor(key, node,
|
|
3686
|
+
return visitor(key, node, path26);
|
|
3687
3687
|
if (identity2.isMap(node))
|
|
3688
|
-
return visitor.Map?.(key, node,
|
|
3688
|
+
return visitor.Map?.(key, node, path26);
|
|
3689
3689
|
if (identity2.isSeq(node))
|
|
3690
|
-
return visitor.Seq?.(key, node,
|
|
3690
|
+
return visitor.Seq?.(key, node, path26);
|
|
3691
3691
|
if (identity2.isPair(node))
|
|
3692
|
-
return visitor.Pair?.(key, node,
|
|
3692
|
+
return visitor.Pair?.(key, node, path26);
|
|
3693
3693
|
if (identity2.isScalar(node))
|
|
3694
|
-
return visitor.Scalar?.(key, node,
|
|
3694
|
+
return visitor.Scalar?.(key, node, path26);
|
|
3695
3695
|
if (identity2.isAlias(node))
|
|
3696
|
-
return visitor.Alias?.(key, node,
|
|
3696
|
+
return visitor.Alias?.(key, node, path26);
|
|
3697
3697
|
return void 0;
|
|
3698
3698
|
}
|
|
3699
|
-
function replaceNode(key,
|
|
3700
|
-
const parent =
|
|
3699
|
+
function replaceNode(key, path26, node) {
|
|
3700
|
+
const parent = path26[path26.length - 1];
|
|
3701
3701
|
if (identity2.isCollection(parent)) {
|
|
3702
3702
|
parent.items[key] = node;
|
|
3703
3703
|
} else if (identity2.isPair(parent)) {
|
|
@@ -4307,10 +4307,10 @@ var require_Collection = __commonJS({
|
|
|
4307
4307
|
var createNode = require_createNode();
|
|
4308
4308
|
var identity2 = require_identity();
|
|
4309
4309
|
var Node = require_Node();
|
|
4310
|
-
function collectionFromPath(schema,
|
|
4310
|
+
function collectionFromPath(schema, path26, value) {
|
|
4311
4311
|
let v = value;
|
|
4312
|
-
for (let i2 =
|
|
4313
|
-
const k =
|
|
4312
|
+
for (let i2 = path26.length - 1; i2 >= 0; --i2) {
|
|
4313
|
+
const k = path26[i2];
|
|
4314
4314
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
4315
4315
|
const a3 = [];
|
|
4316
4316
|
a3[k] = v;
|
|
@@ -4329,7 +4329,7 @@ var require_Collection = __commonJS({
|
|
|
4329
4329
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
4330
4330
|
});
|
|
4331
4331
|
}
|
|
4332
|
-
var isEmptyPath = (
|
|
4332
|
+
var isEmptyPath = (path26) => path26 == null || typeof path26 === "object" && !!path26[Symbol.iterator]().next().done;
|
|
4333
4333
|
var Collection = class extends Node.NodeBase {
|
|
4334
4334
|
constructor(type, schema) {
|
|
4335
4335
|
super(type);
|
|
@@ -4359,11 +4359,11 @@ var require_Collection = __commonJS({
|
|
|
4359
4359
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
4360
4360
|
* that already exists in the map.
|
|
4361
4361
|
*/
|
|
4362
|
-
addIn(
|
|
4363
|
-
if (isEmptyPath(
|
|
4362
|
+
addIn(path26, value) {
|
|
4363
|
+
if (isEmptyPath(path26))
|
|
4364
4364
|
this.add(value);
|
|
4365
4365
|
else {
|
|
4366
|
-
const [key, ...rest] =
|
|
4366
|
+
const [key, ...rest] = path26;
|
|
4367
4367
|
const node = this.get(key, true);
|
|
4368
4368
|
if (identity2.isCollection(node))
|
|
4369
4369
|
node.addIn(rest, value);
|
|
@@ -4377,8 +4377,8 @@ var require_Collection = __commonJS({
|
|
|
4377
4377
|
* Removes a value from the collection.
|
|
4378
4378
|
* @returns `true` if the item was found and removed.
|
|
4379
4379
|
*/
|
|
4380
|
-
deleteIn(
|
|
4381
|
-
const [key, ...rest] =
|
|
4380
|
+
deleteIn(path26) {
|
|
4381
|
+
const [key, ...rest] = path26;
|
|
4382
4382
|
if (rest.length === 0)
|
|
4383
4383
|
return this.delete(key);
|
|
4384
4384
|
const node = this.get(key, true);
|
|
@@ -4392,8 +4392,8 @@ var require_Collection = __commonJS({
|
|
|
4392
4392
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
4393
4393
|
* `true` (collections are always returned intact).
|
|
4394
4394
|
*/
|
|
4395
|
-
getIn(
|
|
4396
|
-
const [key, ...rest] =
|
|
4395
|
+
getIn(path26, keepScalar) {
|
|
4396
|
+
const [key, ...rest] = path26;
|
|
4397
4397
|
const node = this.get(key, true);
|
|
4398
4398
|
if (rest.length === 0)
|
|
4399
4399
|
return !keepScalar && identity2.isScalar(node) ? node.value : node;
|
|
@@ -4411,8 +4411,8 @@ var require_Collection = __commonJS({
|
|
|
4411
4411
|
/**
|
|
4412
4412
|
* Checks if the collection includes a value with the key `key`.
|
|
4413
4413
|
*/
|
|
4414
|
-
hasIn(
|
|
4415
|
-
const [key, ...rest] =
|
|
4414
|
+
hasIn(path26) {
|
|
4415
|
+
const [key, ...rest] = path26;
|
|
4416
4416
|
if (rest.length === 0)
|
|
4417
4417
|
return this.has(key);
|
|
4418
4418
|
const node = this.get(key, true);
|
|
@@ -4422,8 +4422,8 @@ var require_Collection = __commonJS({
|
|
|
4422
4422
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
4423
4423
|
* boolean to add/remove the item from the set.
|
|
4424
4424
|
*/
|
|
4425
|
-
setIn(
|
|
4426
|
-
const [key, ...rest] =
|
|
4425
|
+
setIn(path26, value) {
|
|
4426
|
+
const [key, ...rest] = path26;
|
|
4427
4427
|
if (rest.length === 0) {
|
|
4428
4428
|
this.set(key, value);
|
|
4429
4429
|
} else {
|
|
@@ -6938,9 +6938,9 @@ var require_Document = __commonJS({
|
|
|
6938
6938
|
this.contents.add(value);
|
|
6939
6939
|
}
|
|
6940
6940
|
/** Adds a value to the document. */
|
|
6941
|
-
addIn(
|
|
6941
|
+
addIn(path26, value) {
|
|
6942
6942
|
if (assertCollection(this.contents))
|
|
6943
|
-
this.contents.addIn(
|
|
6943
|
+
this.contents.addIn(path26, value);
|
|
6944
6944
|
}
|
|
6945
6945
|
/**
|
|
6946
6946
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -7015,14 +7015,14 @@ var require_Document = __commonJS({
|
|
|
7015
7015
|
* Removes a value from the document.
|
|
7016
7016
|
* @returns `true` if the item was found and removed.
|
|
7017
7017
|
*/
|
|
7018
|
-
deleteIn(
|
|
7019
|
-
if (Collection.isEmptyPath(
|
|
7018
|
+
deleteIn(path26) {
|
|
7019
|
+
if (Collection.isEmptyPath(path26)) {
|
|
7020
7020
|
if (this.contents == null)
|
|
7021
7021
|
return false;
|
|
7022
7022
|
this.contents = null;
|
|
7023
7023
|
return true;
|
|
7024
7024
|
}
|
|
7025
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
7025
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path26) : false;
|
|
7026
7026
|
}
|
|
7027
7027
|
/**
|
|
7028
7028
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -7037,10 +7037,10 @@ var require_Document = __commonJS({
|
|
|
7037
7037
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
7038
7038
|
* `true` (collections are always returned intact).
|
|
7039
7039
|
*/
|
|
7040
|
-
getIn(
|
|
7041
|
-
if (Collection.isEmptyPath(
|
|
7040
|
+
getIn(path26, keepScalar) {
|
|
7041
|
+
if (Collection.isEmptyPath(path26))
|
|
7042
7042
|
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
7043
|
-
return identity2.isCollection(this.contents) ? this.contents.getIn(
|
|
7043
|
+
return identity2.isCollection(this.contents) ? this.contents.getIn(path26, keepScalar) : void 0;
|
|
7044
7044
|
}
|
|
7045
7045
|
/**
|
|
7046
7046
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -7051,10 +7051,10 @@ var require_Document = __commonJS({
|
|
|
7051
7051
|
/**
|
|
7052
7052
|
* Checks if the document includes a value at `path`.
|
|
7053
7053
|
*/
|
|
7054
|
-
hasIn(
|
|
7055
|
-
if (Collection.isEmptyPath(
|
|
7054
|
+
hasIn(path26) {
|
|
7055
|
+
if (Collection.isEmptyPath(path26))
|
|
7056
7056
|
return this.contents !== void 0;
|
|
7057
|
-
return identity2.isCollection(this.contents) ? this.contents.hasIn(
|
|
7057
|
+
return identity2.isCollection(this.contents) ? this.contents.hasIn(path26) : false;
|
|
7058
7058
|
}
|
|
7059
7059
|
/**
|
|
7060
7060
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -7071,13 +7071,13 @@ var require_Document = __commonJS({
|
|
|
7071
7071
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
7072
7072
|
* boolean to add/remove the item from the set.
|
|
7073
7073
|
*/
|
|
7074
|
-
setIn(
|
|
7075
|
-
if (Collection.isEmptyPath(
|
|
7074
|
+
setIn(path26, value) {
|
|
7075
|
+
if (Collection.isEmptyPath(path26)) {
|
|
7076
7076
|
this.contents = value;
|
|
7077
7077
|
} else if (this.contents == null) {
|
|
7078
|
-
this.contents = Collection.collectionFromPath(this.schema, Array.from(
|
|
7078
|
+
this.contents = Collection.collectionFromPath(this.schema, Array.from(path26), value);
|
|
7079
7079
|
} else if (assertCollection(this.contents)) {
|
|
7080
|
-
this.contents.setIn(
|
|
7080
|
+
this.contents.setIn(path26, value);
|
|
7081
7081
|
}
|
|
7082
7082
|
}
|
|
7083
7083
|
/**
|
|
@@ -9037,9 +9037,9 @@ var require_cst_visit = __commonJS({
|
|
|
9037
9037
|
visit2.BREAK = BREAK;
|
|
9038
9038
|
visit2.SKIP = SKIP;
|
|
9039
9039
|
visit2.REMOVE = REMOVE;
|
|
9040
|
-
visit2.itemAtPath = (cst,
|
|
9040
|
+
visit2.itemAtPath = (cst, path26) => {
|
|
9041
9041
|
let item = cst;
|
|
9042
|
-
for (const [field, index] of
|
|
9042
|
+
for (const [field, index] of path26) {
|
|
9043
9043
|
const tok = item?.[field];
|
|
9044
9044
|
if (tok && "items" in tok) {
|
|
9045
9045
|
item = tok.items[index];
|
|
@@ -9048,23 +9048,23 @@ var require_cst_visit = __commonJS({
|
|
|
9048
9048
|
}
|
|
9049
9049
|
return item;
|
|
9050
9050
|
};
|
|
9051
|
-
visit2.parentCollection = (cst,
|
|
9052
|
-
const parent = visit2.itemAtPath(cst,
|
|
9053
|
-
const field =
|
|
9051
|
+
visit2.parentCollection = (cst, path26) => {
|
|
9052
|
+
const parent = visit2.itemAtPath(cst, path26.slice(0, -1));
|
|
9053
|
+
const field = path26[path26.length - 1][0];
|
|
9054
9054
|
const coll = parent?.[field];
|
|
9055
9055
|
if (coll && "items" in coll)
|
|
9056
9056
|
return coll;
|
|
9057
9057
|
throw new Error("Parent collection not found");
|
|
9058
9058
|
};
|
|
9059
|
-
function _visit(
|
|
9060
|
-
let ctrl = visitor(item,
|
|
9059
|
+
function _visit(path26, item, visitor) {
|
|
9060
|
+
let ctrl = visitor(item, path26);
|
|
9061
9061
|
if (typeof ctrl === "symbol")
|
|
9062
9062
|
return ctrl;
|
|
9063
9063
|
for (const field of ["key", "value"]) {
|
|
9064
9064
|
const token = item[field];
|
|
9065
9065
|
if (token && "items" in token) {
|
|
9066
9066
|
for (let i2 = 0; i2 < token.items.length; ++i2) {
|
|
9067
|
-
const ci = _visit(Object.freeze(
|
|
9067
|
+
const ci = _visit(Object.freeze(path26.concat([[field, i2]])), token.items[i2], visitor);
|
|
9068
9068
|
if (typeof ci === "number")
|
|
9069
9069
|
i2 = ci - 1;
|
|
9070
9070
|
else if (ci === BREAK)
|
|
@@ -9075,10 +9075,10 @@ var require_cst_visit = __commonJS({
|
|
|
9075
9075
|
}
|
|
9076
9076
|
}
|
|
9077
9077
|
if (typeof ctrl === "function" && field === "key")
|
|
9078
|
-
ctrl = ctrl(item,
|
|
9078
|
+
ctrl = ctrl(item, path26);
|
|
9079
9079
|
}
|
|
9080
9080
|
}
|
|
9081
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
9081
|
+
return typeof ctrl === "function" ? ctrl(item, path26) : ctrl;
|
|
9082
9082
|
}
|
|
9083
9083
|
exports.visit = visit2;
|
|
9084
9084
|
}
|
|
@@ -10932,13 +10932,13 @@ var require_min_release_age = __commonJS({
|
|
|
10932
10932
|
return Number.isFinite(days) && days > 0 ? days * config_parse_1.DAY_MS : 0;
|
|
10933
10933
|
}
|
|
10934
10934
|
function probe(p) {
|
|
10935
|
-
return new Promise((
|
|
10935
|
+
return new Promise((resolve16) => {
|
|
10936
10936
|
(0, node_child_process_1.exec)(p.command, { timeout: PROBE_TIMEOUT_MS2, windowsHide: true }, (err, stdout2) => {
|
|
10937
10937
|
if (err) {
|
|
10938
|
-
|
|
10938
|
+
resolve16(0);
|
|
10939
10939
|
return;
|
|
10940
10940
|
}
|
|
10941
|
-
|
|
10941
|
+
resolve16(p.parse(stdout2));
|
|
10942
10942
|
});
|
|
10943
10943
|
});
|
|
10944
10944
|
}
|
|
@@ -10971,12 +10971,12 @@ var require_registry = __commonJS({
|
|
|
10971
10971
|
var node_https_1 = __importDefault(__require("node:https"));
|
|
10972
10972
|
var REQUEST_TIMEOUT_MS = 1e4;
|
|
10973
10973
|
function fetchRegistryInfo2(url) {
|
|
10974
|
-
return new Promise((
|
|
10974
|
+
return new Promise((resolve16) => {
|
|
10975
10975
|
let resolved = false;
|
|
10976
10976
|
const safeResolve = (value) => {
|
|
10977
10977
|
if (!resolved) {
|
|
10978
10978
|
resolved = true;
|
|
10979
|
-
|
|
10979
|
+
resolve16(value);
|
|
10980
10980
|
}
|
|
10981
10981
|
};
|
|
10982
10982
|
const req = node_https_1.default.get(url, { timeout: REQUEST_TIMEOUT_MS }, (res) => {
|
|
@@ -12884,8 +12884,8 @@ var Deferred = class {
|
|
|
12884
12884
|
_resolve;
|
|
12885
12885
|
_reject;
|
|
12886
12886
|
constructor() {
|
|
12887
|
-
this._promise = new Promise((
|
|
12888
|
-
this._resolve =
|
|
12887
|
+
this._promise = new Promise((resolve16, reject) => {
|
|
12888
|
+
this._resolve = resolve16;
|
|
12889
12889
|
this._reject = reject;
|
|
12890
12890
|
});
|
|
12891
12891
|
}
|
|
@@ -13778,8 +13778,8 @@ var ExportOperation = class {
|
|
|
13778
13778
|
_metrics;
|
|
13779
13779
|
_exportScheduledResolve;
|
|
13780
13780
|
constructor(exporter, logRecords, exportTimeoutMillis, metrics) {
|
|
13781
|
-
this._exportScheduledPromise = new Promise((
|
|
13782
|
-
this._exportScheduledResolve =
|
|
13781
|
+
this._exportScheduledPromise = new Promise((resolve16) => {
|
|
13782
|
+
this._exportScheduledResolve = resolve16;
|
|
13783
13783
|
});
|
|
13784
13784
|
this._exportCompleted = this._executeExport(exporter, logRecords, exportTimeoutMillis);
|
|
13785
13785
|
this._metrics = metrics;
|
|
@@ -13804,7 +13804,7 @@ var ExportOperation = class {
|
|
|
13804
13804
|
}
|
|
13805
13805
|
}
|
|
13806
13806
|
async _exportWithTimeout(exporter, logRecords, exportTimeoutMillis) {
|
|
13807
|
-
return new Promise((
|
|
13807
|
+
return new Promise((resolve16, reject) => {
|
|
13808
13808
|
const timer = setTimeout(() => {
|
|
13809
13809
|
reject(new Error("Timeout"));
|
|
13810
13810
|
}, exportTimeoutMillis);
|
|
@@ -13812,7 +13812,7 @@ var ExportOperation = class {
|
|
|
13812
13812
|
this._metrics.finishLogs(logRecords.length, result.error);
|
|
13813
13813
|
clearTimeout(timer);
|
|
13814
13814
|
if (result.code === ExportResultCode.SUCCESS) {
|
|
13815
|
-
|
|
13815
|
+
resolve16();
|
|
13816
13816
|
} else {
|
|
13817
13817
|
reject(result.error ?? new Error("BatchLogRecordProcessor: log record export failed"));
|
|
13818
13818
|
}
|
|
@@ -14593,7 +14593,7 @@ function parseRetryAfterToMills(retryAfter) {
|
|
|
14593
14593
|
var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION4}`;
|
|
14594
14594
|
var MAX_RESPONSE_BODY_SIZE = 4 * 1024 * 1024;
|
|
14595
14595
|
function sendWithHttp(request, url, headers, compression, userAgent, agent, data, timeoutMillis) {
|
|
14596
|
-
return new Promise((
|
|
14596
|
+
return new Promise((resolve16) => {
|
|
14597
14597
|
const parsedUrl = new URL(url);
|
|
14598
14598
|
if (userAgent) {
|
|
14599
14599
|
headers["User-Agent"] = `${userAgent} ${DEFAULT_USER_AGENT}`;
|
|
@@ -14612,7 +14612,7 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
|
|
|
14612
14612
|
responseSize += chunk.length;
|
|
14613
14613
|
if (responseSize > MAX_RESPONSE_BODY_SIZE) {
|
|
14614
14614
|
const sizeError = new Error(`OTLP export response body exceeded size limit of ${MAX_RESPONSE_BODY_SIZE} bytes`);
|
|
14615
|
-
|
|
14615
|
+
resolve16({ status: "failure", error: sizeError });
|
|
14616
14616
|
res.destroy();
|
|
14617
14617
|
return;
|
|
14618
14618
|
}
|
|
@@ -14620,18 +14620,18 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
|
|
|
14620
14620
|
});
|
|
14621
14621
|
res.on("end", () => {
|
|
14622
14622
|
if (res.statusCode && res.statusCode <= 299) {
|
|
14623
|
-
|
|
14623
|
+
resolve16({
|
|
14624
14624
|
status: "success",
|
|
14625
14625
|
data: Buffer.concat(responseData)
|
|
14626
14626
|
});
|
|
14627
14627
|
} else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
|
|
14628
|
-
|
|
14628
|
+
resolve16({
|
|
14629
14629
|
status: "retryable",
|
|
14630
14630
|
retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
|
|
14631
14631
|
});
|
|
14632
14632
|
} else {
|
|
14633
14633
|
const error = new OTLPExporterError(res.statusMessage, res.statusCode, Buffer.concat(responseData).toString());
|
|
14634
|
-
|
|
14634
|
+
resolve16({
|
|
14635
14635
|
status: "failure",
|
|
14636
14636
|
error
|
|
14637
14637
|
});
|
|
@@ -14639,17 +14639,17 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
|
|
|
14639
14639
|
});
|
|
14640
14640
|
res.on("error", (error) => {
|
|
14641
14641
|
if (res.statusCode && res.statusCode <= 299) {
|
|
14642
|
-
|
|
14642
|
+
resolve16({
|
|
14643
14643
|
status: "success"
|
|
14644
14644
|
});
|
|
14645
14645
|
} else if (res.statusCode && isExportHTTPErrorRetryable(res.statusCode)) {
|
|
14646
|
-
|
|
14646
|
+
resolve16({
|
|
14647
14647
|
status: "retryable",
|
|
14648
14648
|
error,
|
|
14649
14649
|
retryInMillis: parseRetryAfterToMills(res.headers["retry-after"])
|
|
14650
14650
|
});
|
|
14651
14651
|
} else {
|
|
14652
|
-
|
|
14652
|
+
resolve16({
|
|
14653
14653
|
status: "failure",
|
|
14654
14654
|
error
|
|
14655
14655
|
});
|
|
@@ -14658,26 +14658,26 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
|
|
|
14658
14658
|
});
|
|
14659
14659
|
req.setTimeout(timeoutMillis, () => {
|
|
14660
14660
|
req.destroy();
|
|
14661
|
-
|
|
14661
|
+
resolve16({
|
|
14662
14662
|
status: "retryable",
|
|
14663
14663
|
error: new Error("Request timed out")
|
|
14664
14664
|
});
|
|
14665
14665
|
});
|
|
14666
14666
|
req.on("error", (error) => {
|
|
14667
14667
|
if (isHttpTransportNetworkErrorRetryable(error)) {
|
|
14668
|
-
|
|
14668
|
+
resolve16({
|
|
14669
14669
|
status: "retryable",
|
|
14670
14670
|
error
|
|
14671
14671
|
});
|
|
14672
14672
|
} else {
|
|
14673
|
-
|
|
14673
|
+
resolve16({
|
|
14674
14674
|
status: "failure",
|
|
14675
14675
|
error
|
|
14676
14676
|
});
|
|
14677
14677
|
}
|
|
14678
14678
|
});
|
|
14679
14679
|
compressAndSend(req, compression, data, (error) => {
|
|
14680
|
-
|
|
14680
|
+
resolve16({
|
|
14681
14681
|
status: "failure",
|
|
14682
14682
|
error
|
|
14683
14683
|
});
|
|
@@ -14767,9 +14767,9 @@ var RetryingTransport = class {
|
|
|
14767
14767
|
this._transport = transport;
|
|
14768
14768
|
}
|
|
14769
14769
|
retry(data, timeoutMillis, inMillis) {
|
|
14770
|
-
return new Promise((
|
|
14770
|
+
return new Promise((resolve16, reject) => {
|
|
14771
14771
|
setTimeout(() => {
|
|
14772
|
-
this._transport.send(data, timeoutMillis).then(
|
|
14772
|
+
this._transport.send(data, timeoutMillis).then(resolve16, reject);
|
|
14773
14773
|
}, inMillis);
|
|
14774
14774
|
});
|
|
14775
14775
|
}
|
|
@@ -14904,7 +14904,7 @@ function appendRootPathToUrlIfNeeded(url) {
|
|
|
14904
14904
|
return void 0;
|
|
14905
14905
|
}
|
|
14906
14906
|
}
|
|
14907
|
-
function appendResourcePathToUrl(url,
|
|
14907
|
+
function appendResourcePathToUrl(url, path26) {
|
|
14908
14908
|
try {
|
|
14909
14909
|
new URL(url);
|
|
14910
14910
|
} catch {
|
|
@@ -14914,11 +14914,11 @@ function appendResourcePathToUrl(url, path25) {
|
|
|
14914
14914
|
if (!url.endsWith("/")) {
|
|
14915
14915
|
url = url + "/";
|
|
14916
14916
|
}
|
|
14917
|
-
url +=
|
|
14917
|
+
url += path26;
|
|
14918
14918
|
try {
|
|
14919
14919
|
new URL(url);
|
|
14920
14920
|
} catch {
|
|
14921
|
-
diag2.warn(`Configuration: Provided URL appended with '${
|
|
14921
|
+
diag2.warn(`Configuration: Provided URL appended with '${path26}' is not a valid URL, using 'undefined' instead of '${url}'`);
|
|
14922
14922
|
return void 0;
|
|
14923
14923
|
}
|
|
14924
14924
|
return url;
|
|
@@ -16313,9 +16313,9 @@ function isReplitAgent(env) {
|
|
|
16313
16313
|
}
|
|
16314
16314
|
var DEVIN_MARKER_PATH = "/opt/.devin";
|
|
16315
16315
|
var JULES_MARKER_PATH = "/opt/environment_summary.sh";
|
|
16316
|
-
function safeExists(fileExists,
|
|
16316
|
+
function safeExists(fileExists, path26) {
|
|
16317
16317
|
try {
|
|
16318
|
-
return fileExists(
|
|
16318
|
+
return fileExists(path26);
|
|
16319
16319
|
} catch {
|
|
16320
16320
|
return false;
|
|
16321
16321
|
}
|
|
@@ -16736,7 +16736,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16736
16736
|
var SESSION_ID = randomUUID4();
|
|
16737
16737
|
function readCliVersion() {
|
|
16738
16738
|
if (true) {
|
|
16739
|
-
return "0.27.1-next.
|
|
16739
|
+
return "0.27.1-next.23";
|
|
16740
16740
|
}
|
|
16741
16741
|
return "0.0.0";
|
|
16742
16742
|
}
|
|
@@ -17062,12 +17062,12 @@ function resolveHostFingerprint() {
|
|
|
17062
17062
|
}
|
|
17063
17063
|
}
|
|
17064
17064
|
function resolveHostFingerprintAsync() {
|
|
17065
|
-
return new Promise((
|
|
17065
|
+
return new Promise((resolve16) => {
|
|
17066
17066
|
let binary;
|
|
17067
17067
|
try {
|
|
17068
17068
|
binary = simulatorServerBinaryPath();
|
|
17069
17069
|
} catch {
|
|
17070
|
-
|
|
17070
|
+
resolve16(null);
|
|
17071
17071
|
return;
|
|
17072
17072
|
}
|
|
17073
17073
|
let settled = false;
|
|
@@ -17080,7 +17080,7 @@ function resolveHostFingerprintAsync() {
|
|
|
17080
17080
|
child?.kill("SIGKILL");
|
|
17081
17081
|
} catch {
|
|
17082
17082
|
}
|
|
17083
|
-
|
|
17083
|
+
resolve16(value);
|
|
17084
17084
|
};
|
|
17085
17085
|
const watchdog = setTimeout(() => finish(null), FINGERPRINT_TIMEOUT_MS);
|
|
17086
17086
|
watchdog.unref?.();
|
|
@@ -17350,7 +17350,7 @@ var DRAIN_GRACE_MS = 250;
|
|
|
17350
17350
|
async function raceDrain(client2, timeoutMs) {
|
|
17351
17351
|
await Promise.race([
|
|
17352
17352
|
client2.shutdown(timeoutMs),
|
|
17353
|
-
new Promise((
|
|
17353
|
+
new Promise((resolve16) => setTimeout(resolve16, timeoutMs + DRAIN_GRACE_MS).unref())
|
|
17354
17354
|
]);
|
|
17355
17355
|
}
|
|
17356
17356
|
async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
|
|
@@ -19011,12 +19011,12 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
19011
19011
|
}
|
|
19012
19012
|
return result;
|
|
19013
19013
|
}
|
|
19014
|
-
function findNodeAtLocation(root,
|
|
19014
|
+
function findNodeAtLocation(root, path26) {
|
|
19015
19015
|
if (!root) {
|
|
19016
19016
|
return void 0;
|
|
19017
19017
|
}
|
|
19018
19018
|
let node = root;
|
|
19019
|
-
for (let segment of
|
|
19019
|
+
for (let segment of path26) {
|
|
19020
19020
|
if (typeof segment === "string") {
|
|
19021
19021
|
if (node.type !== "object" || !Array.isArray(node.children)) {
|
|
19022
19022
|
return void 0;
|
|
@@ -19370,14 +19370,14 @@ function getNodeType(value) {
|
|
|
19370
19370
|
|
|
19371
19371
|
// ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
19372
19372
|
function setProperty(text2, originalPath, value, options) {
|
|
19373
|
-
const
|
|
19373
|
+
const path26 = originalPath.slice();
|
|
19374
19374
|
const errors = [];
|
|
19375
19375
|
const root = parseTree(text2, errors);
|
|
19376
19376
|
let parent = void 0;
|
|
19377
19377
|
let lastSegment = void 0;
|
|
19378
|
-
while (
|
|
19379
|
-
lastSegment =
|
|
19380
|
-
parent = findNodeAtLocation(root,
|
|
19378
|
+
while (path26.length > 0) {
|
|
19379
|
+
lastSegment = path26.pop();
|
|
19380
|
+
parent = findNodeAtLocation(root, path26);
|
|
19381
19381
|
if (parent === void 0 && value !== void 0) {
|
|
19382
19382
|
if (typeof lastSegment === "string") {
|
|
19383
19383
|
value = { [lastSegment]: value };
|
|
@@ -19563,8 +19563,8 @@ var ParseErrorCode;
|
|
|
19563
19563
|
ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
|
|
19564
19564
|
ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
19565
19565
|
})(ParseErrorCode || (ParseErrorCode = {}));
|
|
19566
|
-
function modify(text2,
|
|
19567
|
-
return setProperty(text2,
|
|
19566
|
+
function modify(text2, path26, value, options) {
|
|
19567
|
+
return setProperty(text2, path26, value, options);
|
|
19568
19568
|
}
|
|
19569
19569
|
function applyEdits(text2, edits) {
|
|
19570
19570
|
let sortedEdits = edits.slice(0).sort((a3, b) => {
|
|
@@ -19590,12 +19590,12 @@ function applyEdits(text2, edits) {
|
|
|
19590
19590
|
// ../argent-installer/src/package-root.ts
|
|
19591
19591
|
import * as fs10 from "node:fs";
|
|
19592
19592
|
import * as path11 from "node:path";
|
|
19593
|
-
function resolvePackageRoot(
|
|
19594
|
-
let current = path11.resolve(
|
|
19593
|
+
function resolvePackageRoot(dirname18) {
|
|
19594
|
+
let current = path11.resolve(dirname18);
|
|
19595
19595
|
while (true) {
|
|
19596
19596
|
if (fs10.existsSync(path11.join(current, "package.json"))) return current;
|
|
19597
19597
|
const parent = path11.dirname(current);
|
|
19598
|
-
if (parent === current) return path11.resolve(
|
|
19598
|
+
if (parent === current) return path11.resolve(dirname18);
|
|
19599
19599
|
current = parent;
|
|
19600
19600
|
}
|
|
19601
19601
|
}
|
|
@@ -20245,12 +20245,12 @@ async function isOnline(timeoutMs = PROBE_TIMEOUT_MS) {
|
|
|
20245
20245
|
} catch {
|
|
20246
20246
|
return false;
|
|
20247
20247
|
}
|
|
20248
|
-
return new Promise((
|
|
20249
|
-
const timer = setTimeout(() =>
|
|
20248
|
+
return new Promise((resolve16) => {
|
|
20249
|
+
const timer = setTimeout(() => resolve16(false), timeoutMs);
|
|
20250
20250
|
timer.unref();
|
|
20251
20251
|
dns.lookup(host, (err) => {
|
|
20252
20252
|
clearTimeout(timer);
|
|
20253
|
-
|
|
20253
|
+
resolve16(!err);
|
|
20254
20254
|
});
|
|
20255
20255
|
});
|
|
20256
20256
|
}
|
|
@@ -21918,7 +21918,7 @@ var ShellCommandError = class extends Error {
|
|
|
21918
21918
|
signal;
|
|
21919
21919
|
};
|
|
21920
21920
|
function runShellCommand(cmd, opts = {}) {
|
|
21921
|
-
return new Promise((
|
|
21921
|
+
return new Promise((resolve16, reject) => {
|
|
21922
21922
|
const child = spawn2(cmd.bin, cmd.args, {
|
|
21923
21923
|
stdio: ["ignore", "pipe", "pipe"],
|
|
21924
21924
|
shell: process.platform === "win32",
|
|
@@ -21929,7 +21929,7 @@ function runShellCommand(cmd, opts = {}) {
|
|
|
21929
21929
|
stderr += chunk.toString();
|
|
21930
21930
|
});
|
|
21931
21931
|
child.on("close", (code, signal) => {
|
|
21932
|
-
if (code === 0)
|
|
21932
|
+
if (code === 0) resolve16();
|
|
21933
21933
|
else
|
|
21934
21934
|
reject(
|
|
21935
21935
|
new ShellCommandError(
|
|
@@ -22806,7 +22806,7 @@ async function runSkillsStep(args) {
|
|
|
22806
22806
|
return skillsMethod;
|
|
22807
22807
|
}
|
|
22808
22808
|
function runNpxSkills(args, interactive, cwd) {
|
|
22809
|
-
return new Promise((
|
|
22809
|
+
return new Promise((resolve16, reject) => {
|
|
22810
22810
|
const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
22811
22811
|
const child = spawn3(npxCmd, args, {
|
|
22812
22812
|
stdio: interactive ? "inherit" : ["ignore", "pipe", "pipe"],
|
|
@@ -22825,7 +22825,7 @@ function runNpxSkills(args, interactive, cwd) {
|
|
|
22825
22825
|
}
|
|
22826
22826
|
child.on("close", (code) => {
|
|
22827
22827
|
if (code === 0) {
|
|
22828
|
-
|
|
22828
|
+
resolve16();
|
|
22829
22829
|
} else {
|
|
22830
22830
|
const output = [stderr, stdout2].filter(Boolean).join("\n").trim();
|
|
22831
22831
|
reject(new Error(output || `npx skills exited with code ${code}`));
|
|
@@ -23110,7 +23110,7 @@ function printBanner() {
|
|
|
23110
23110
|
// ../argent-installer/src/update.ts
|
|
23111
23111
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
23112
23112
|
var import_semver5 = __toESM(require_semver2(), 1);
|
|
23113
|
-
import * as
|
|
23113
|
+
import * as path24 from "node:path";
|
|
23114
23114
|
|
|
23115
23115
|
// ../argent-installer/src/update-target.ts
|
|
23116
23116
|
var import_update_core = __toESM(require_dist2(), 1);
|
|
@@ -23313,6 +23313,9 @@ function couldBeOurToolServer(pid, marker) {
|
|
|
23313
23313
|
return false;
|
|
23314
23314
|
}
|
|
23315
23315
|
|
|
23316
|
+
// ../argent-tools-client/src/tools-client.ts
|
|
23317
|
+
import * as path23 from "node:path";
|
|
23318
|
+
|
|
23316
23319
|
// ../argent-tools-client/src/link-config.ts
|
|
23317
23320
|
import * as path20 from "node:path";
|
|
23318
23321
|
import { homedir as homedir6 } from "node:os";
|
|
@@ -23357,7 +23360,7 @@ var INLINE_MEMBERS_BYTES = 256 * 1024;
|
|
|
23357
23360
|
import { copyFile, mkdir as mkdir4, readFile as readFile5, realpath as realpath4, rm as rm3, stat as stat4, writeFile as writeFile4 } from "node:fs/promises";
|
|
23358
23361
|
import { constants as fsConstants } from "node:fs";
|
|
23359
23362
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
23360
|
-
import { basename as basename6, dirname as
|
|
23363
|
+
import { basename as basename6, dirname as dirname16, extname as extname2, isAbsolute as isAbsolute8, join as join23, normalize as normalize2, resolve as resolve14, sep as sep6 } from "node:path";
|
|
23361
23364
|
import { createHash as createHash4 } from "node:crypto";
|
|
23362
23365
|
var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings")]);
|
|
23363
23366
|
var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
|
|
@@ -23716,7 +23719,7 @@ async function update(args) {
|
|
|
23716
23719
|
process.exit(1);
|
|
23717
23720
|
}
|
|
23718
23721
|
const rootOverride = getProjectRootOverride(args);
|
|
23719
|
-
const projectRoot = rootOverride ?
|
|
23722
|
+
const projectRoot = rootOverride ? path24.resolve(rootOverride) : resolveProjectRoot2(process.cwd());
|
|
23720
23723
|
installMode = resolveInstallMode(projectRoot);
|
|
23721
23724
|
const flags = parseTargetFlags(args);
|
|
23722
23725
|
const localInstalled = installMode === "local" && probeLocalInstall(projectRoot).installed;
|
|
@@ -23900,7 +23903,7 @@ async function update(args) {
|
|
|
23900
23903
|
var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
23901
23904
|
var import_yaml4 = __toESM(require_dist(), 1);
|
|
23902
23905
|
import * as fs19 from "node:fs";
|
|
23903
|
-
import * as
|
|
23906
|
+
import * as path25 from "node:path";
|
|
23904
23907
|
var UNINSTALL_TOOLSERVER_STOP_FAILED = {
|
|
23905
23908
|
error_code: FAILURE_CODES.UNINSTALL_TOOLSERVER_STOP_FAILED,
|
|
23906
23909
|
failure_stage: "installer_uninstall_toolserver_stop",
|
|
@@ -23935,8 +23938,8 @@ function collectBundledPaths(sourceDir) {
|
|
|
23935
23938
|
const directories = [];
|
|
23936
23939
|
function walk(currentDir, relativeDir = "") {
|
|
23937
23940
|
for (const entry of fs19.readdirSync(currentDir, { withFileTypes: true })) {
|
|
23938
|
-
const relativePath = relativeDir ?
|
|
23939
|
-
const absolutePath =
|
|
23941
|
+
const relativePath = relativeDir ? path25.join(relativeDir, entry.name) : entry.name;
|
|
23942
|
+
const absolutePath = path25.join(currentDir, entry.name);
|
|
23940
23943
|
if (entry.isDirectory()) {
|
|
23941
23944
|
walk(absolutePath, relativePath);
|
|
23942
23945
|
directories.push(relativePath);
|
|
@@ -23955,7 +23958,7 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
23955
23958
|
const { files, directories } = collectBundledPaths(sourceDir);
|
|
23956
23959
|
const removedPaths = [];
|
|
23957
23960
|
for (const relativePath of files) {
|
|
23958
|
-
const targetPath =
|
|
23961
|
+
const targetPath = path25.join(targetDir, relativePath);
|
|
23959
23962
|
try {
|
|
23960
23963
|
if (!fs19.existsSync(targetPath)) continue;
|
|
23961
23964
|
if (fs19.lstatSync(targetPath).isDirectory()) continue;
|
|
@@ -23965,10 +23968,10 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
23965
23968
|
}
|
|
23966
23969
|
}
|
|
23967
23970
|
directories.sort(
|
|
23968
|
-
(a3, b) => b.split(
|
|
23971
|
+
(a3, b) => b.split(path25.sep).length - a3.split(path25.sep).length || b.length - a3.length
|
|
23969
23972
|
);
|
|
23970
23973
|
for (const relativePath of directories) {
|
|
23971
|
-
const targetPath =
|
|
23974
|
+
const targetPath = path25.join(targetDir, relativePath);
|
|
23972
23975
|
try {
|
|
23973
23976
|
if (!fs19.existsSync(targetPath)) continue;
|
|
23974
23977
|
if (!fs19.statSync(targetPath).isDirectory()) continue;
|
|
@@ -23988,7 +23991,7 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
23988
23991
|
} catch {
|
|
23989
23992
|
}
|
|
23990
23993
|
if (removedRoot) {
|
|
23991
|
-
removeDirIfEmpty2(
|
|
23994
|
+
removeDirIfEmpty2(path25.dirname(targetDir));
|
|
23992
23995
|
}
|
|
23993
23996
|
return { removedPaths, removedRoot };
|
|
23994
23997
|
}
|
|
@@ -24009,7 +24012,7 @@ function getBundledSkillNames(skillsDir) {
|
|
|
24009
24012
|
const skillNames = [];
|
|
24010
24013
|
for (const entry of fs19.readdirSync(skillsDir, { withFileTypes: true })) {
|
|
24011
24014
|
if (!entry.isDirectory()) continue;
|
|
24012
|
-
const skillFilePath =
|
|
24015
|
+
const skillFilePath = path25.join(skillsDir, entry.name, "SKILL.md");
|
|
24013
24016
|
if (!fs19.existsSync(skillFilePath)) continue;
|
|
24014
24017
|
skillNames.push(readBundledSkillName(skillFilePath, entry.name));
|
|
24015
24018
|
}
|
|
@@ -24021,7 +24024,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
|
|
|
24021
24024
|
}
|
|
24022
24025
|
const removedPaths = [];
|
|
24023
24026
|
for (const skillName of skillNames) {
|
|
24024
|
-
const targetPath =
|
|
24027
|
+
const targetPath = path25.join(targetDir, skillName);
|
|
24025
24028
|
try {
|
|
24026
24029
|
if (!fs19.existsSync(targetPath)) continue;
|
|
24027
24030
|
const stats = fs19.lstatSync(targetPath);
|
|
@@ -24036,7 +24039,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
|
|
|
24036
24039
|
}
|
|
24037
24040
|
const removedRoot = removeDirIfEmpty2(targetDir);
|
|
24038
24041
|
if (removedRoot) {
|
|
24039
|
-
removeDirIfEmpty2(
|
|
24042
|
+
removeDirIfEmpty2(path25.dirname(targetDir));
|
|
24040
24043
|
}
|
|
24041
24044
|
return { removedPaths, removedRoot };
|
|
24042
24045
|
}
|