@swmansion/argent 0.11.0 → 0.12.0
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.1.0.apk +0 -0
- package/bin/argent-simulator-server.cjs +11 -3
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/resources/android/LICENSE.txt +186 -0
- package/bin/darwin/resources/android/README.md +11 -0
- package/bin/darwin/resources/android/arm64-v8a/libscreen-sharing-agent.so +0 -0
- package/bin/darwin/resources/android/armeabi-v7a/libscreen-sharing-agent.so +0 -0
- package/bin/darwin/resources/android/screen-sharing-agent.jar +0 -0
- package/bin/darwin/resources/android/x86_64/libscreen-sharing-agent.so +0 -0
- package/bin/darwin/simulator-server +0 -0
- package/bin/linux/resources/android/LICENSE.txt +186 -0
- package/bin/linux/resources/android/README.md +11 -0
- package/bin/linux/resources/android/arm64-v8a/libscreen-sharing-agent.so +0 -0
- package/bin/linux/resources/android/armeabi-v7a/libscreen-sharing-agent.so +0 -0
- package/bin/linux/resources/android/screen-sharing-agent.jar +0 -0
- package/bin/linux/resources/android/x86_64/libscreen-sharing-agent.so +0 -0
- package/bin/linux/simulator-server +0 -0
- package/bin/linux-arm64/resources/android/LICENSE.txt +186 -0
- package/bin/linux-arm64/resources/android/README.md +11 -0
- package/bin/linux-arm64/resources/android/arm64-v8a/libscreen-sharing-agent.so +0 -0
- package/bin/linux-arm64/resources/android/armeabi-v7a/libscreen-sharing-agent.so +0 -0
- package/bin/linux-arm64/resources/android/screen-sharing-agent.jar +0 -0
- package/bin/linux-arm64/resources/android/x86_64/libscreen-sharing-agent.so +0 -0
- package/bin/linux-arm64/simulator-server +0 -0
- package/dist/cli-cmds.mjs +139 -26
- package/dist/cli.js +0 -3
- package/dist/cli.js.map +1 -1
- package/dist/installer.mjs +111 -97
- package/dist/mcp-server.mjs +204 -62
- package/dist/preview-ui/index.html +4500 -645
- package/dist/preview-ui/theme.css +231 -0
- package/dist/preview-window/main.cjs +182 -0
- package/dist/tool-server.cjs +7719 -3531
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +4 -1
- package/rules/argent.md +8 -2
- package/scripts/postinstall.cjs +6 -2
- package/skills/argent-device-interact/SKILL.md +36 -28
- package/skills/argent-lens/SKILL.md +101 -0
- package/skills/argent-metro-debugger/SKILL.md +18 -16
- package/skills/argent-react-native-app-workflow/SKILL.md +8 -8
package/dist/installer.mjs
CHANGED
|
@@ -12,7 +12,11 @@ var __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? requir
|
|
|
12
12
|
throw Error('Dynamic require of "' + x3 + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
} catch (e2) {
|
|
18
|
+
throw mod = 0, e2;
|
|
19
|
+
}
|
|
16
20
|
};
|
|
17
21
|
var __copyProps = (to, from, except, desc) => {
|
|
18
22
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -2209,17 +2213,17 @@ var require_visit = __commonJS({
|
|
|
2209
2213
|
visit2.BREAK = BREAK;
|
|
2210
2214
|
visit2.SKIP = SKIP;
|
|
2211
2215
|
visit2.REMOVE = REMOVE;
|
|
2212
|
-
function visit_(key, node, visitor,
|
|
2213
|
-
const ctrl = callVisitor(key, node, visitor,
|
|
2216
|
+
function visit_(key, node, visitor, path7) {
|
|
2217
|
+
const ctrl = callVisitor(key, node, visitor, path7);
|
|
2214
2218
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
2215
|
-
replaceNode(key,
|
|
2216
|
-
return visit_(key, ctrl, visitor,
|
|
2219
|
+
replaceNode(key, path7, ctrl);
|
|
2220
|
+
return visit_(key, ctrl, visitor, path7);
|
|
2217
2221
|
}
|
|
2218
2222
|
if (typeof ctrl !== "symbol") {
|
|
2219
2223
|
if (identity.isCollection(node)) {
|
|
2220
|
-
|
|
2224
|
+
path7 = Object.freeze(path7.concat(node));
|
|
2221
2225
|
for (let i = 0; i < node.items.length; ++i) {
|
|
2222
|
-
const ci = visit_(i, node.items[i], visitor,
|
|
2226
|
+
const ci = visit_(i, node.items[i], visitor, path7);
|
|
2223
2227
|
if (typeof ci === "number")
|
|
2224
2228
|
i = ci - 1;
|
|
2225
2229
|
else if (ci === BREAK)
|
|
@@ -2230,13 +2234,13 @@ var require_visit = __commonJS({
|
|
|
2230
2234
|
}
|
|
2231
2235
|
}
|
|
2232
2236
|
} else if (identity.isPair(node)) {
|
|
2233
|
-
|
|
2234
|
-
const ck = visit_("key", node.key, visitor,
|
|
2237
|
+
path7 = Object.freeze(path7.concat(node));
|
|
2238
|
+
const ck = visit_("key", node.key, visitor, path7);
|
|
2235
2239
|
if (ck === BREAK)
|
|
2236
2240
|
return BREAK;
|
|
2237
2241
|
else if (ck === REMOVE)
|
|
2238
2242
|
node.key = null;
|
|
2239
|
-
const cv = visit_("value", node.value, visitor,
|
|
2243
|
+
const cv = visit_("value", node.value, visitor, path7);
|
|
2240
2244
|
if (cv === BREAK)
|
|
2241
2245
|
return BREAK;
|
|
2242
2246
|
else if (cv === REMOVE)
|
|
@@ -2257,17 +2261,17 @@ var require_visit = __commonJS({
|
|
|
2257
2261
|
visitAsync.BREAK = BREAK;
|
|
2258
2262
|
visitAsync.SKIP = SKIP;
|
|
2259
2263
|
visitAsync.REMOVE = REMOVE;
|
|
2260
|
-
async function visitAsync_(key, node, visitor,
|
|
2261
|
-
const ctrl = await callVisitor(key, node, visitor,
|
|
2264
|
+
async function visitAsync_(key, node, visitor, path7) {
|
|
2265
|
+
const ctrl = await callVisitor(key, node, visitor, path7);
|
|
2262
2266
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
2263
|
-
replaceNode(key,
|
|
2264
|
-
return visitAsync_(key, ctrl, visitor,
|
|
2267
|
+
replaceNode(key, path7, ctrl);
|
|
2268
|
+
return visitAsync_(key, ctrl, visitor, path7);
|
|
2265
2269
|
}
|
|
2266
2270
|
if (typeof ctrl !== "symbol") {
|
|
2267
2271
|
if (identity.isCollection(node)) {
|
|
2268
|
-
|
|
2272
|
+
path7 = Object.freeze(path7.concat(node));
|
|
2269
2273
|
for (let i = 0; i < node.items.length; ++i) {
|
|
2270
|
-
const ci = await visitAsync_(i, node.items[i], visitor,
|
|
2274
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path7);
|
|
2271
2275
|
if (typeof ci === "number")
|
|
2272
2276
|
i = ci - 1;
|
|
2273
2277
|
else if (ci === BREAK)
|
|
@@ -2278,13 +2282,13 @@ var require_visit = __commonJS({
|
|
|
2278
2282
|
}
|
|
2279
2283
|
}
|
|
2280
2284
|
} else if (identity.isPair(node)) {
|
|
2281
|
-
|
|
2282
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
2285
|
+
path7 = Object.freeze(path7.concat(node));
|
|
2286
|
+
const ck = await visitAsync_("key", node.key, visitor, path7);
|
|
2283
2287
|
if (ck === BREAK)
|
|
2284
2288
|
return BREAK;
|
|
2285
2289
|
else if (ck === REMOVE)
|
|
2286
2290
|
node.key = null;
|
|
2287
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
2291
|
+
const cv = await visitAsync_("value", node.value, visitor, path7);
|
|
2288
2292
|
if (cv === BREAK)
|
|
2289
2293
|
return BREAK;
|
|
2290
2294
|
else if (cv === REMOVE)
|
|
@@ -2311,23 +2315,23 @@ var require_visit = __commonJS({
|
|
|
2311
2315
|
}
|
|
2312
2316
|
return visitor;
|
|
2313
2317
|
}
|
|
2314
|
-
function callVisitor(key, node, visitor,
|
|
2318
|
+
function callVisitor(key, node, visitor, path7) {
|
|
2315
2319
|
if (typeof visitor === "function")
|
|
2316
|
-
return visitor(key, node,
|
|
2320
|
+
return visitor(key, node, path7);
|
|
2317
2321
|
if (identity.isMap(node))
|
|
2318
|
-
return visitor.Map?.(key, node,
|
|
2322
|
+
return visitor.Map?.(key, node, path7);
|
|
2319
2323
|
if (identity.isSeq(node))
|
|
2320
|
-
return visitor.Seq?.(key, node,
|
|
2324
|
+
return visitor.Seq?.(key, node, path7);
|
|
2321
2325
|
if (identity.isPair(node))
|
|
2322
|
-
return visitor.Pair?.(key, node,
|
|
2326
|
+
return visitor.Pair?.(key, node, path7);
|
|
2323
2327
|
if (identity.isScalar(node))
|
|
2324
|
-
return visitor.Scalar?.(key, node,
|
|
2328
|
+
return visitor.Scalar?.(key, node, path7);
|
|
2325
2329
|
if (identity.isAlias(node))
|
|
2326
|
-
return visitor.Alias?.(key, node,
|
|
2330
|
+
return visitor.Alias?.(key, node, path7);
|
|
2327
2331
|
return void 0;
|
|
2328
2332
|
}
|
|
2329
|
-
function replaceNode(key,
|
|
2330
|
-
const parent =
|
|
2333
|
+
function replaceNode(key, path7, node) {
|
|
2334
|
+
const parent = path7[path7.length - 1];
|
|
2331
2335
|
if (identity.isCollection(parent)) {
|
|
2332
2336
|
parent.items[key] = node;
|
|
2333
2337
|
} else if (identity.isPair(parent)) {
|
|
@@ -2937,10 +2941,10 @@ var require_Collection = __commonJS({
|
|
|
2937
2941
|
var createNode = require_createNode();
|
|
2938
2942
|
var identity = require_identity();
|
|
2939
2943
|
var Node = require_Node();
|
|
2940
|
-
function collectionFromPath(schema,
|
|
2944
|
+
function collectionFromPath(schema, path7, value) {
|
|
2941
2945
|
let v2 = value;
|
|
2942
|
-
for (let i =
|
|
2943
|
-
const k2 =
|
|
2946
|
+
for (let i = path7.length - 1; i >= 0; --i) {
|
|
2947
|
+
const k2 = path7[i];
|
|
2944
2948
|
if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
|
|
2945
2949
|
const a = [];
|
|
2946
2950
|
a[k2] = v2;
|
|
@@ -2959,7 +2963,7 @@ var require_Collection = __commonJS({
|
|
|
2959
2963
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
2960
2964
|
});
|
|
2961
2965
|
}
|
|
2962
|
-
var isEmptyPath = (
|
|
2966
|
+
var isEmptyPath = (path7) => path7 == null || typeof path7 === "object" && !!path7[Symbol.iterator]().next().done;
|
|
2963
2967
|
var Collection = class extends Node.NodeBase {
|
|
2964
2968
|
constructor(type, schema) {
|
|
2965
2969
|
super(type);
|
|
@@ -2989,11 +2993,11 @@ var require_Collection = __commonJS({
|
|
|
2989
2993
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
2990
2994
|
* that already exists in the map.
|
|
2991
2995
|
*/
|
|
2992
|
-
addIn(
|
|
2993
|
-
if (isEmptyPath(
|
|
2996
|
+
addIn(path7, value) {
|
|
2997
|
+
if (isEmptyPath(path7))
|
|
2994
2998
|
this.add(value);
|
|
2995
2999
|
else {
|
|
2996
|
-
const [key, ...rest] =
|
|
3000
|
+
const [key, ...rest] = path7;
|
|
2997
3001
|
const node = this.get(key, true);
|
|
2998
3002
|
if (identity.isCollection(node))
|
|
2999
3003
|
node.addIn(rest, value);
|
|
@@ -3007,8 +3011,8 @@ var require_Collection = __commonJS({
|
|
|
3007
3011
|
* Removes a value from the collection.
|
|
3008
3012
|
* @returns `true` if the item was found and removed.
|
|
3009
3013
|
*/
|
|
3010
|
-
deleteIn(
|
|
3011
|
-
const [key, ...rest] =
|
|
3014
|
+
deleteIn(path7) {
|
|
3015
|
+
const [key, ...rest] = path7;
|
|
3012
3016
|
if (rest.length === 0)
|
|
3013
3017
|
return this.delete(key);
|
|
3014
3018
|
const node = this.get(key, true);
|
|
@@ -3022,8 +3026,8 @@ var require_Collection = __commonJS({
|
|
|
3022
3026
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
3023
3027
|
* `true` (collections are always returned intact).
|
|
3024
3028
|
*/
|
|
3025
|
-
getIn(
|
|
3026
|
-
const [key, ...rest] =
|
|
3029
|
+
getIn(path7, keepScalar) {
|
|
3030
|
+
const [key, ...rest] = path7;
|
|
3027
3031
|
const node = this.get(key, true);
|
|
3028
3032
|
if (rest.length === 0)
|
|
3029
3033
|
return !keepScalar && identity.isScalar(node) ? node.value : node;
|
|
@@ -3041,8 +3045,8 @@ var require_Collection = __commonJS({
|
|
|
3041
3045
|
/**
|
|
3042
3046
|
* Checks if the collection includes a value with the key `key`.
|
|
3043
3047
|
*/
|
|
3044
|
-
hasIn(
|
|
3045
|
-
const [key, ...rest] =
|
|
3048
|
+
hasIn(path7) {
|
|
3049
|
+
const [key, ...rest] = path7;
|
|
3046
3050
|
if (rest.length === 0)
|
|
3047
3051
|
return this.has(key);
|
|
3048
3052
|
const node = this.get(key, true);
|
|
@@ -3052,8 +3056,8 @@ var require_Collection = __commonJS({
|
|
|
3052
3056
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
3053
3057
|
* boolean to add/remove the item from the set.
|
|
3054
3058
|
*/
|
|
3055
|
-
setIn(
|
|
3056
|
-
const [key, ...rest] =
|
|
3059
|
+
setIn(path7, value) {
|
|
3060
|
+
const [key, ...rest] = path7;
|
|
3057
3061
|
if (rest.length === 0) {
|
|
3058
3062
|
this.set(key, value);
|
|
3059
3063
|
} else {
|
|
@@ -5568,9 +5572,9 @@ var require_Document = __commonJS({
|
|
|
5568
5572
|
this.contents.add(value);
|
|
5569
5573
|
}
|
|
5570
5574
|
/** Adds a value to the document. */
|
|
5571
|
-
addIn(
|
|
5575
|
+
addIn(path7, value) {
|
|
5572
5576
|
if (assertCollection(this.contents))
|
|
5573
|
-
this.contents.addIn(
|
|
5577
|
+
this.contents.addIn(path7, value);
|
|
5574
5578
|
}
|
|
5575
5579
|
/**
|
|
5576
5580
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -5645,14 +5649,14 @@ var require_Document = __commonJS({
|
|
|
5645
5649
|
* Removes a value from the document.
|
|
5646
5650
|
* @returns `true` if the item was found and removed.
|
|
5647
5651
|
*/
|
|
5648
|
-
deleteIn(
|
|
5649
|
-
if (Collection.isEmptyPath(
|
|
5652
|
+
deleteIn(path7) {
|
|
5653
|
+
if (Collection.isEmptyPath(path7)) {
|
|
5650
5654
|
if (this.contents == null)
|
|
5651
5655
|
return false;
|
|
5652
5656
|
this.contents = null;
|
|
5653
5657
|
return true;
|
|
5654
5658
|
}
|
|
5655
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
5659
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
|
5656
5660
|
}
|
|
5657
5661
|
/**
|
|
5658
5662
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -5667,10 +5671,10 @@ var require_Document = __commonJS({
|
|
|
5667
5671
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
5668
5672
|
* `true` (collections are always returned intact).
|
|
5669
5673
|
*/
|
|
5670
|
-
getIn(
|
|
5671
|
-
if (Collection.isEmptyPath(
|
|
5674
|
+
getIn(path7, keepScalar) {
|
|
5675
|
+
if (Collection.isEmptyPath(path7))
|
|
5672
5676
|
return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
5673
|
-
return identity.isCollection(this.contents) ? this.contents.getIn(
|
|
5677
|
+
return identity.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : void 0;
|
|
5674
5678
|
}
|
|
5675
5679
|
/**
|
|
5676
5680
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -5681,10 +5685,10 @@ var require_Document = __commonJS({
|
|
|
5681
5685
|
/**
|
|
5682
5686
|
* Checks if the document includes a value at `path`.
|
|
5683
5687
|
*/
|
|
5684
|
-
hasIn(
|
|
5685
|
-
if (Collection.isEmptyPath(
|
|
5688
|
+
hasIn(path7) {
|
|
5689
|
+
if (Collection.isEmptyPath(path7))
|
|
5686
5690
|
return this.contents !== void 0;
|
|
5687
|
-
return identity.isCollection(this.contents) ? this.contents.hasIn(
|
|
5691
|
+
return identity.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
|
5688
5692
|
}
|
|
5689
5693
|
/**
|
|
5690
5694
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -5701,13 +5705,13 @@ var require_Document = __commonJS({
|
|
|
5701
5705
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
5702
5706
|
* boolean to add/remove the item from the set.
|
|
5703
5707
|
*/
|
|
5704
|
-
setIn(
|
|
5705
|
-
if (Collection.isEmptyPath(
|
|
5708
|
+
setIn(path7, value) {
|
|
5709
|
+
if (Collection.isEmptyPath(path7)) {
|
|
5706
5710
|
this.contents = value;
|
|
5707
5711
|
} else if (this.contents == null) {
|
|
5708
|
-
this.contents = Collection.collectionFromPath(this.schema, Array.from(
|
|
5712
|
+
this.contents = Collection.collectionFromPath(this.schema, Array.from(path7), value);
|
|
5709
5713
|
} else if (assertCollection(this.contents)) {
|
|
5710
|
-
this.contents.setIn(
|
|
5714
|
+
this.contents.setIn(path7, value);
|
|
5711
5715
|
}
|
|
5712
5716
|
}
|
|
5713
5717
|
/**
|
|
@@ -7667,9 +7671,9 @@ var require_cst_visit = __commonJS({
|
|
|
7667
7671
|
visit2.BREAK = BREAK;
|
|
7668
7672
|
visit2.SKIP = SKIP;
|
|
7669
7673
|
visit2.REMOVE = REMOVE;
|
|
7670
|
-
visit2.itemAtPath = (cst,
|
|
7674
|
+
visit2.itemAtPath = (cst, path7) => {
|
|
7671
7675
|
let item = cst;
|
|
7672
|
-
for (const [field, index] of
|
|
7676
|
+
for (const [field, index] of path7) {
|
|
7673
7677
|
const tok = item?.[field];
|
|
7674
7678
|
if (tok && "items" in tok) {
|
|
7675
7679
|
item = tok.items[index];
|
|
@@ -7678,23 +7682,23 @@ var require_cst_visit = __commonJS({
|
|
|
7678
7682
|
}
|
|
7679
7683
|
return item;
|
|
7680
7684
|
};
|
|
7681
|
-
visit2.parentCollection = (cst,
|
|
7682
|
-
const parent = visit2.itemAtPath(cst,
|
|
7683
|
-
const field =
|
|
7685
|
+
visit2.parentCollection = (cst, path7) => {
|
|
7686
|
+
const parent = visit2.itemAtPath(cst, path7.slice(0, -1));
|
|
7687
|
+
const field = path7[path7.length - 1][0];
|
|
7684
7688
|
const coll = parent?.[field];
|
|
7685
7689
|
if (coll && "items" in coll)
|
|
7686
7690
|
return coll;
|
|
7687
7691
|
throw new Error("Parent collection not found");
|
|
7688
7692
|
};
|
|
7689
|
-
function _visit(
|
|
7690
|
-
let ctrl = visitor(item,
|
|
7693
|
+
function _visit(path7, item, visitor) {
|
|
7694
|
+
let ctrl = visitor(item, path7);
|
|
7691
7695
|
if (typeof ctrl === "symbol")
|
|
7692
7696
|
return ctrl;
|
|
7693
7697
|
for (const field of ["key", "value"]) {
|
|
7694
7698
|
const token = item[field];
|
|
7695
7699
|
if (token && "items" in token) {
|
|
7696
7700
|
for (let i = 0; i < token.items.length; ++i) {
|
|
7697
|
-
const ci = _visit(Object.freeze(
|
|
7701
|
+
const ci = _visit(Object.freeze(path7.concat([[field, i]])), token.items[i], visitor);
|
|
7698
7702
|
if (typeof ci === "number")
|
|
7699
7703
|
i = ci - 1;
|
|
7700
7704
|
else if (ci === BREAK)
|
|
@@ -7705,10 +7709,10 @@ var require_cst_visit = __commonJS({
|
|
|
7705
7709
|
}
|
|
7706
7710
|
}
|
|
7707
7711
|
if (typeof ctrl === "function" && field === "key")
|
|
7708
|
-
ctrl = ctrl(item,
|
|
7712
|
+
ctrl = ctrl(item, path7);
|
|
7709
7713
|
}
|
|
7710
7714
|
}
|
|
7711
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
7715
|
+
return typeof ctrl === "function" ? ctrl(item, path7) : ctrl;
|
|
7712
7716
|
}
|
|
7713
7717
|
exports.visit = visit2;
|
|
7714
7718
|
}
|
|
@@ -12412,12 +12416,12 @@ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
12412
12416
|
}
|
|
12413
12417
|
return result;
|
|
12414
12418
|
}
|
|
12415
|
-
function findNodeAtLocation(root,
|
|
12419
|
+
function findNodeAtLocation(root, path7) {
|
|
12416
12420
|
if (!root) {
|
|
12417
12421
|
return void 0;
|
|
12418
12422
|
}
|
|
12419
12423
|
let node = root;
|
|
12420
|
-
for (let segment of
|
|
12424
|
+
for (let segment of path7) {
|
|
12421
12425
|
if (typeof segment === "string") {
|
|
12422
12426
|
if (node.type !== "object" || !Array.isArray(node.children)) {
|
|
12423
12427
|
return void 0;
|
|
@@ -12771,14 +12775,14 @@ function getNodeType(value) {
|
|
|
12771
12775
|
|
|
12772
12776
|
// ../../node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
12773
12777
|
function setProperty(text, originalPath, value, options) {
|
|
12774
|
-
const
|
|
12778
|
+
const path7 = originalPath.slice();
|
|
12775
12779
|
const errors = [];
|
|
12776
12780
|
const root = parseTree(text, errors);
|
|
12777
12781
|
let parent = void 0;
|
|
12778
12782
|
let lastSegment = void 0;
|
|
12779
|
-
while (
|
|
12780
|
-
lastSegment =
|
|
12781
|
-
parent = findNodeAtLocation(root,
|
|
12783
|
+
while (path7.length > 0) {
|
|
12784
|
+
lastSegment = path7.pop();
|
|
12785
|
+
parent = findNodeAtLocation(root, path7);
|
|
12782
12786
|
if (parent === void 0 && value !== void 0) {
|
|
12783
12787
|
if (typeof lastSegment === "string") {
|
|
12784
12788
|
value = { [lastSegment]: value };
|
|
@@ -12964,8 +12968,8 @@ var ParseErrorCode;
|
|
|
12964
12968
|
ParseErrorCode2[ParseErrorCode2["InvalidEscapeCharacter"] = 15] = "InvalidEscapeCharacter";
|
|
12965
12969
|
ParseErrorCode2[ParseErrorCode2["InvalidCharacter"] = 16] = "InvalidCharacter";
|
|
12966
12970
|
})(ParseErrorCode || (ParseErrorCode = {}));
|
|
12967
|
-
function modify(text,
|
|
12968
|
-
return setProperty(text,
|
|
12971
|
+
function modify(text, path7, value, options) {
|
|
12972
|
+
return setProperty(text, path7, value, options);
|
|
12969
12973
|
}
|
|
12970
12974
|
function applyEdits(text, edits) {
|
|
12971
12975
|
let sortedEdits = edits.slice(0).sort((a, b2) => {
|
|
@@ -12989,12 +12993,12 @@ function applyEdits(text, edits) {
|
|
|
12989
12993
|
}
|
|
12990
12994
|
|
|
12991
12995
|
// ../argent-installer/src/utils.ts
|
|
12992
|
-
function resolvePackageRoot(
|
|
12993
|
-
let current = path.resolve(
|
|
12996
|
+
function resolvePackageRoot(dirname5) {
|
|
12997
|
+
let current = path.resolve(dirname5);
|
|
12994
12998
|
while (true) {
|
|
12995
12999
|
if (fs.existsSync(path.join(current, "package.json"))) return current;
|
|
12996
13000
|
const parent = path.dirname(current);
|
|
12997
|
-
if (parent === current) return path.resolve(
|
|
13001
|
+
if (parent === current) return path.resolve(dirname5);
|
|
12998
13002
|
current = parent;
|
|
12999
13003
|
}
|
|
13000
13004
|
}
|
|
@@ -13233,9 +13237,12 @@ function getGlobalBinaryPath() {
|
|
|
13233
13237
|
function isGloballyInstalled() {
|
|
13234
13238
|
return getGlobalBinaryPath() !== null;
|
|
13235
13239
|
}
|
|
13240
|
+
function withNpmForce(npxArgs) {
|
|
13241
|
+
return ["--force", ...npxArgs];
|
|
13242
|
+
}
|
|
13236
13243
|
function isSkillsCliAvailable() {
|
|
13237
13244
|
try {
|
|
13238
|
-
execSync("npx --no-install skills --version", {
|
|
13245
|
+
execSync("npx --force --no-install skills --version", {
|
|
13239
13246
|
stdio: ["ignore", "ignore", "ignore"],
|
|
13240
13247
|
timeout: PROBE_TIMEOUT_MS
|
|
13241
13248
|
});
|
|
@@ -14144,7 +14151,7 @@ function refreshArgentSkills(projectRoot) {
|
|
|
14144
14151
|
};
|
|
14145
14152
|
if (bundled.size > 0) {
|
|
14146
14153
|
try {
|
|
14147
|
-
execFileSync2("npx", spec.buildAddArgs(primarySource), {
|
|
14154
|
+
execFileSync2("npx", withNpmForce(spec.buildAddArgs(primarySource)), {
|
|
14148
14155
|
stdio: ["ignore", "pipe", "pipe"]
|
|
14149
14156
|
});
|
|
14150
14157
|
result.synced = bundled.size;
|
|
@@ -14153,7 +14160,7 @@ function refreshArgentSkills(projectRoot) {
|
|
|
14153
14160
|
result.syncError = primaryErr instanceof Error ? primaryErr.message.split("\n")[0] : String(primaryErr);
|
|
14154
14161
|
} else {
|
|
14155
14162
|
try {
|
|
14156
|
-
execFileSync2("npx", spec.buildAddArgs(SKILLS_DIR), {
|
|
14163
|
+
execFileSync2("npx", withNpmForce(spec.buildAddArgs(SKILLS_DIR)), {
|
|
14157
14164
|
stdio: ["ignore", "pipe", "pipe"]
|
|
14158
14165
|
});
|
|
14159
14166
|
result.synced = bundled.size;
|
|
@@ -14165,7 +14172,7 @@ function refreshArgentSkills(projectRoot) {
|
|
|
14165
14172
|
}
|
|
14166
14173
|
if (orphaned.length > 0) {
|
|
14167
14174
|
try {
|
|
14168
|
-
execFileSync2("npx", [...spec.removeArgs, ...orphaned], {
|
|
14175
|
+
execFileSync2("npx", withNpmForce([...spec.removeArgs, ...orphaned]), {
|
|
14169
14176
|
stdio: ["ignore", "pipe", "pipe"]
|
|
14170
14177
|
});
|
|
14171
14178
|
result.pruned = orphaned;
|
|
@@ -14582,8 +14589,9 @@ async function init(args) {
|
|
|
14582
14589
|
if (skillsMethod === "default") {
|
|
14583
14590
|
skillsArgs.push("--skill", "*", "-y");
|
|
14584
14591
|
}
|
|
14585
|
-
const
|
|
14586
|
-
|
|
14592
|
+
const baseArgs = offlineWithCache ? ["--no-install", ...skillsArgs] : skillsArgs;
|
|
14593
|
+
const npxArgs = withNpmForce(baseArgs);
|
|
14594
|
+
R2.info(`Running: ${import_picocolors2.default.dim("npx")} ${import_picocolors2.default.cyan(baseArgs.join(" "))}`);
|
|
14587
14595
|
const spinner = ft();
|
|
14588
14596
|
if (skillsMethod === "default") {
|
|
14589
14597
|
spinner.start("Installing skills...");
|
|
@@ -14786,8 +14794,14 @@ import { mkdir as mkdir2, writeFile as writeFile2, readFile as readFile2, unlink
|
|
|
14786
14794
|
var LINK_DIR = path4.join(homedir4(), ".argent");
|
|
14787
14795
|
var LINK_FILE = path4.join(LINK_DIR, "link.json");
|
|
14788
14796
|
|
|
14797
|
+
// ../argent-tools-client/src/file-inputs.ts
|
|
14798
|
+
import { mkdir as mkdir3, stat, writeFile as writeFile3 } from "node:fs/promises";
|
|
14799
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
14800
|
+
import * as path5 from "node:path";
|
|
14801
|
+
var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
|
|
14802
|
+
|
|
14789
14803
|
// ../argent-tools-client/src/artifacts.ts
|
|
14790
|
-
import { mkdir as
|
|
14804
|
+
import { mkdir as mkdir4, readFile as readFile4, rm, stat as stat2, writeFile as writeFile4 } from "node:fs/promises";
|
|
14791
14805
|
import { tmpdir } from "node:os";
|
|
14792
14806
|
import { basename, join as join5 } from "node:path";
|
|
14793
14807
|
import { createHash } from "node:crypto";
|
|
@@ -14822,7 +14836,7 @@ async function update(args) {
|
|
|
14822
14836
|
spinner.start("Checking for updates...");
|
|
14823
14837
|
const pm = detectPackageManager();
|
|
14824
14838
|
let latest = null;
|
|
14825
|
-
let target
|
|
14839
|
+
let target;
|
|
14826
14840
|
let minReleaseAgeMs = 0;
|
|
14827
14841
|
if (requestedVersion !== null) {
|
|
14828
14842
|
if (!import_semver2.default.valid(requestedVersion) || import_semver2.default.prerelease(requestedVersion)) {
|
|
@@ -14954,7 +14968,7 @@ async function update(args) {
|
|
|
14954
14968
|
// ../argent-installer/src/uninstall.ts
|
|
14955
14969
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
14956
14970
|
import * as fs4 from "node:fs";
|
|
14957
|
-
import * as
|
|
14971
|
+
import * as path6 from "node:path";
|
|
14958
14972
|
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
14959
14973
|
function removeDirIfEmpty2(dirPath) {
|
|
14960
14974
|
try {
|
|
@@ -14972,8 +14986,8 @@ function collectBundledPaths(sourceDir) {
|
|
|
14972
14986
|
const directories = [];
|
|
14973
14987
|
function walk(currentDir, relativeDir = "") {
|
|
14974
14988
|
for (const entry of fs4.readdirSync(currentDir, { withFileTypes: true })) {
|
|
14975
|
-
const relativePath = relativeDir ?
|
|
14976
|
-
const absolutePath =
|
|
14989
|
+
const relativePath = relativeDir ? path6.join(relativeDir, entry.name) : entry.name;
|
|
14990
|
+
const absolutePath = path6.join(currentDir, entry.name);
|
|
14977
14991
|
if (entry.isDirectory()) {
|
|
14978
14992
|
walk(absolutePath, relativePath);
|
|
14979
14993
|
directories.push(relativePath);
|
|
@@ -14992,7 +15006,7 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
14992
15006
|
const { files, directories } = collectBundledPaths(sourceDir);
|
|
14993
15007
|
const removedPaths = [];
|
|
14994
15008
|
for (const relativePath of files) {
|
|
14995
|
-
const targetPath =
|
|
15009
|
+
const targetPath = path6.join(targetDir, relativePath);
|
|
14996
15010
|
try {
|
|
14997
15011
|
if (!fs4.existsSync(targetPath)) continue;
|
|
14998
15012
|
if (fs4.lstatSync(targetPath).isDirectory()) continue;
|
|
@@ -15002,10 +15016,10 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
15002
15016
|
}
|
|
15003
15017
|
}
|
|
15004
15018
|
directories.sort(
|
|
15005
|
-
(a, b2) => b2.split(
|
|
15019
|
+
(a, b2) => b2.split(path6.sep).length - a.split(path6.sep).length || b2.length - a.length
|
|
15006
15020
|
);
|
|
15007
15021
|
for (const relativePath of directories) {
|
|
15008
|
-
const targetPath =
|
|
15022
|
+
const targetPath = path6.join(targetDir, relativePath);
|
|
15009
15023
|
try {
|
|
15010
15024
|
if (!fs4.existsSync(targetPath)) continue;
|
|
15011
15025
|
if (!fs4.statSync(targetPath).isDirectory()) continue;
|
|
@@ -15025,7 +15039,7 @@ function removeBundledContent(sourceDir, targetDir) {
|
|
|
15025
15039
|
} catch {
|
|
15026
15040
|
}
|
|
15027
15041
|
if (removedRoot) {
|
|
15028
|
-
removeDirIfEmpty2(
|
|
15042
|
+
removeDirIfEmpty2(path6.dirname(targetDir));
|
|
15029
15043
|
}
|
|
15030
15044
|
return { removedPaths, removedRoot };
|
|
15031
15045
|
}
|
|
@@ -15044,7 +15058,7 @@ function getBundledSkillNames(skillsDir) {
|
|
|
15044
15058
|
const skillNames = [];
|
|
15045
15059
|
for (const entry of fs4.readdirSync(skillsDir, { withFileTypes: true })) {
|
|
15046
15060
|
if (!entry.isDirectory()) continue;
|
|
15047
|
-
const skillFilePath =
|
|
15061
|
+
const skillFilePath = path6.join(skillsDir, entry.name, "SKILL.md");
|
|
15048
15062
|
if (!fs4.existsSync(skillFilePath)) continue;
|
|
15049
15063
|
skillNames.push(readBundledSkillName(skillFilePath, entry.name));
|
|
15050
15064
|
}
|
|
@@ -15056,7 +15070,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
|
|
|
15056
15070
|
}
|
|
15057
15071
|
const removedPaths = [];
|
|
15058
15072
|
for (const skillName of skillNames) {
|
|
15059
|
-
const targetPath =
|
|
15073
|
+
const targetPath = path6.join(targetDir, skillName);
|
|
15060
15074
|
try {
|
|
15061
15075
|
if (!fs4.existsSync(targetPath)) continue;
|
|
15062
15076
|
const stats = fs4.lstatSync(targetPath);
|
|
@@ -15071,7 +15085,7 @@ function removeBundledSkillInstalls(skillNames, targetDir) {
|
|
|
15071
15085
|
}
|
|
15072
15086
|
const removedRoot = removeDirIfEmpty2(targetDir);
|
|
15073
15087
|
if (removedRoot) {
|
|
15074
|
-
removeDirIfEmpty2(
|
|
15088
|
+
removeDirIfEmpty2(path6.dirname(targetDir));
|
|
15075
15089
|
}
|
|
15076
15090
|
return { removedPaths, removedRoot };
|
|
15077
15091
|
}
|