@ghostystudio/cli 0.66.0 → 0.67.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/README.md +1 -0
- package/dist/index.js +305 -235
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
|
|
35
|
-
//
|
|
35
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/identity.js
|
|
36
36
|
var require_identity = __commonJS({
|
|
37
|
-
"
|
|
37
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
38
38
|
"use strict";
|
|
39
39
|
var ALIAS = /* @__PURE__ */ Symbol.for("yaml.alias");
|
|
40
40
|
var DOC = /* @__PURE__ */ Symbol.for("yaml.document");
|
|
@@ -89,9 +89,9 @@ var require_identity = __commonJS({
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
//
|
|
92
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/visit.js
|
|
93
93
|
var require_visit = __commonJS({
|
|
94
|
-
"
|
|
94
|
+
"../../../ghosty-studio/node_modules/yaml/dist/visit.js"(exports) {
|
|
95
95
|
"use strict";
|
|
96
96
|
var identity = require_identity();
|
|
97
97
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
@@ -247,9 +247,9 @@ var require_visit = __commonJS({
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
|
|
250
|
-
//
|
|
250
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/doc/directives.js
|
|
251
251
|
var require_directives = __commonJS({
|
|
252
|
-
"
|
|
252
|
+
"../../../ghosty-studio/node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
253
253
|
"use strict";
|
|
254
254
|
var identity = require_identity();
|
|
255
255
|
var visit = require_visit();
|
|
@@ -418,9 +418,9 @@ var require_directives = __commonJS({
|
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
|
|
421
|
-
//
|
|
421
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/doc/anchors.js
|
|
422
422
|
var require_anchors = __commonJS({
|
|
423
|
-
"
|
|
423
|
+
"../../../ghosty-studio/node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
424
424
|
"use strict";
|
|
425
425
|
var identity = require_identity();
|
|
426
426
|
var visit = require_visit();
|
|
@@ -488,9 +488,9 @@ var require_anchors = __commonJS({
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
|
|
491
|
-
//
|
|
491
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/doc/applyReviver.js
|
|
492
492
|
var require_applyReviver = __commonJS({
|
|
493
|
-
"
|
|
493
|
+
"../../../ghosty-studio/node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
494
494
|
"use strict";
|
|
495
495
|
function applyReviver(reviver, obj, key, val) {
|
|
496
496
|
if (val && typeof val === "object") {
|
|
@@ -538,9 +538,9 @@ var require_applyReviver = __commonJS({
|
|
|
538
538
|
}
|
|
539
539
|
});
|
|
540
540
|
|
|
541
|
-
//
|
|
541
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/toJS.js
|
|
542
542
|
var require_toJS = __commonJS({
|
|
543
|
-
"
|
|
543
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
544
544
|
"use strict";
|
|
545
545
|
var identity = require_identity();
|
|
546
546
|
function toJS(value, arg, ctx) {
|
|
@@ -568,9 +568,9 @@ var require_toJS = __commonJS({
|
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
570
|
|
|
571
|
-
//
|
|
571
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/Node.js
|
|
572
572
|
var require_Node = __commonJS({
|
|
573
|
-
"
|
|
573
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
574
574
|
"use strict";
|
|
575
575
|
var applyReviver = require_applyReviver();
|
|
576
576
|
var identity = require_identity();
|
|
@@ -609,9 +609,9 @@ var require_Node = __commonJS({
|
|
|
609
609
|
}
|
|
610
610
|
});
|
|
611
611
|
|
|
612
|
-
//
|
|
612
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/Alias.js
|
|
613
613
|
var require_Alias = __commonJS({
|
|
614
|
-
"
|
|
614
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
615
615
|
"use strict";
|
|
616
616
|
var anchors = require_anchors();
|
|
617
617
|
var visit = require_visit();
|
|
@@ -727,9 +727,9 @@ var require_Alias = __commonJS({
|
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
|
|
730
|
-
//
|
|
730
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/Scalar.js
|
|
731
731
|
var require_Scalar = __commonJS({
|
|
732
|
-
"
|
|
732
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
733
733
|
"use strict";
|
|
734
734
|
var identity = require_identity();
|
|
735
735
|
var Node = require_Node();
|
|
@@ -757,9 +757,9 @@ var require_Scalar = __commonJS({
|
|
|
757
757
|
}
|
|
758
758
|
});
|
|
759
759
|
|
|
760
|
-
//
|
|
760
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/doc/createNode.js
|
|
761
761
|
var require_createNode = __commonJS({
|
|
762
|
-
"
|
|
762
|
+
"../../../ghosty-studio/node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
763
763
|
"use strict";
|
|
764
764
|
var Alias = require_Alias();
|
|
765
765
|
var identity = require_identity();
|
|
@@ -832,9 +832,9 @@ var require_createNode = __commonJS({
|
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
|
|
835
|
-
//
|
|
835
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/Collection.js
|
|
836
836
|
var require_Collection = __commonJS({
|
|
837
|
-
"
|
|
837
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
838
838
|
"use strict";
|
|
839
839
|
var createNode = require_createNode();
|
|
840
840
|
var identity = require_identity();
|
|
@@ -975,9 +975,9 @@ var require_Collection = __commonJS({
|
|
|
975
975
|
}
|
|
976
976
|
});
|
|
977
977
|
|
|
978
|
-
//
|
|
978
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
979
979
|
var require_stringifyComment = __commonJS({
|
|
980
|
-
"
|
|
980
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
981
981
|
"use strict";
|
|
982
982
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
983
983
|
function indentComment(comment, indent) {
|
|
@@ -992,9 +992,9 @@ var require_stringifyComment = __commonJS({
|
|
|
992
992
|
}
|
|
993
993
|
});
|
|
994
994
|
|
|
995
|
-
//
|
|
995
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
996
996
|
var require_foldFlowLines = __commonJS({
|
|
997
|
-
"
|
|
997
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
998
998
|
"use strict";
|
|
999
999
|
var FOLD_FLOW = "flow";
|
|
1000
1000
|
var FOLD_BLOCK = "block";
|
|
@@ -1128,9 +1128,9 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
1128
1128
|
}
|
|
1129
1129
|
});
|
|
1130
1130
|
|
|
1131
|
-
//
|
|
1131
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1132
1132
|
var require_stringifyString = __commonJS({
|
|
1133
|
-
"
|
|
1133
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1134
1134
|
"use strict";
|
|
1135
1135
|
var Scalar = require_Scalar();
|
|
1136
1136
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -1411,9 +1411,9 @@ ${indent}`);
|
|
|
1411
1411
|
}
|
|
1412
1412
|
});
|
|
1413
1413
|
|
|
1414
|
-
//
|
|
1414
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringify.js
|
|
1415
1415
|
var require_stringify = __commonJS({
|
|
1416
|
-
"
|
|
1416
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1417
1417
|
"use strict";
|
|
1418
1418
|
var anchors = require_anchors();
|
|
1419
1419
|
var identity = require_identity();
|
|
@@ -1535,9 +1535,9 @@ ${ctx.indent}${str}`;
|
|
|
1535
1535
|
}
|
|
1536
1536
|
});
|
|
1537
1537
|
|
|
1538
|
-
//
|
|
1538
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1539
1539
|
var require_stringifyPair = __commonJS({
|
|
1540
|
-
"
|
|
1540
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1541
1541
|
"use strict";
|
|
1542
1542
|
var identity = require_identity();
|
|
1543
1543
|
var Scalar = require_Scalar();
|
|
@@ -1668,9 +1668,9 @@ ${ctx.indent}`;
|
|
|
1668
1668
|
}
|
|
1669
1669
|
});
|
|
1670
1670
|
|
|
1671
|
-
//
|
|
1671
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/log.js
|
|
1672
1672
|
var require_log = __commonJS({
|
|
1673
|
-
"
|
|
1673
|
+
"../../../ghosty-studio/node_modules/yaml/dist/log.js"(exports) {
|
|
1674
1674
|
"use strict";
|
|
1675
1675
|
var node_process = __require("process");
|
|
1676
1676
|
function debug(logLevel, ...messages) {
|
|
@@ -1690,9 +1690,9 @@ var require_log = __commonJS({
|
|
|
1690
1690
|
}
|
|
1691
1691
|
});
|
|
1692
1692
|
|
|
1693
|
-
//
|
|
1693
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1694
1694
|
var require_merge = __commonJS({
|
|
1695
|
-
"
|
|
1695
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1696
1696
|
"use strict";
|
|
1697
1697
|
var identity = require_identity();
|
|
1698
1698
|
var Scalar = require_Scalar();
|
|
@@ -1750,9 +1750,9 @@ var require_merge = __commonJS({
|
|
|
1750
1750
|
}
|
|
1751
1751
|
});
|
|
1752
1752
|
|
|
1753
|
-
//
|
|
1753
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1754
1754
|
var require_addPairToJSMap = __commonJS({
|
|
1755
|
-
"
|
|
1755
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1756
1756
|
"use strict";
|
|
1757
1757
|
var log = require_log();
|
|
1758
1758
|
var merge = require_merge();
|
|
@@ -1814,9 +1814,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1814
1814
|
}
|
|
1815
1815
|
});
|
|
1816
1816
|
|
|
1817
|
-
//
|
|
1817
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/Pair.js
|
|
1818
1818
|
var require_Pair = __commonJS({
|
|
1819
|
-
"
|
|
1819
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
1820
1820
|
"use strict";
|
|
1821
1821
|
var createNode = require_createNode();
|
|
1822
1822
|
var stringifyPair = require_stringifyPair();
|
|
@@ -1854,9 +1854,9 @@ var require_Pair = __commonJS({
|
|
|
1854
1854
|
}
|
|
1855
1855
|
});
|
|
1856
1856
|
|
|
1857
|
-
//
|
|
1857
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1858
1858
|
var require_stringifyCollection = __commonJS({
|
|
1859
|
-
"
|
|
1859
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
1860
1860
|
"use strict";
|
|
1861
1861
|
var identity = require_identity();
|
|
1862
1862
|
var stringify = require_stringify();
|
|
@@ -2005,9 +2005,9 @@ ${indent}${end}`;
|
|
|
2005
2005
|
}
|
|
2006
2006
|
});
|
|
2007
2007
|
|
|
2008
|
-
//
|
|
2008
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
2009
2009
|
var require_YAMLMap = __commonJS({
|
|
2010
|
-
"
|
|
2010
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
2011
2011
|
"use strict";
|
|
2012
2012
|
var stringifyCollection = require_stringifyCollection();
|
|
2013
2013
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -2149,9 +2149,9 @@ var require_YAMLMap = __commonJS({
|
|
|
2149
2149
|
}
|
|
2150
2150
|
});
|
|
2151
2151
|
|
|
2152
|
-
//
|
|
2152
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/common/map.js
|
|
2153
2153
|
var require_map = __commonJS({
|
|
2154
|
-
"
|
|
2154
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2155
2155
|
"use strict";
|
|
2156
2156
|
var identity = require_identity();
|
|
2157
2157
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2171,9 +2171,9 @@ var require_map = __commonJS({
|
|
|
2171
2171
|
}
|
|
2172
2172
|
});
|
|
2173
2173
|
|
|
2174
|
-
//
|
|
2174
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2175
2175
|
var require_YAMLSeq = __commonJS({
|
|
2176
|
-
"
|
|
2176
|
+
"../../../ghosty-studio/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
2177
2177
|
"use strict";
|
|
2178
2178
|
var createNode = require_createNode();
|
|
2179
2179
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -2287,9 +2287,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
2287
2287
|
}
|
|
2288
2288
|
});
|
|
2289
2289
|
|
|
2290
|
-
//
|
|
2290
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/common/seq.js
|
|
2291
2291
|
var require_seq = __commonJS({
|
|
2292
|
-
"
|
|
2292
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2293
2293
|
"use strict";
|
|
2294
2294
|
var identity = require_identity();
|
|
2295
2295
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2309,9 +2309,9 @@ var require_seq = __commonJS({
|
|
|
2309
2309
|
}
|
|
2310
2310
|
});
|
|
2311
2311
|
|
|
2312
|
-
//
|
|
2312
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/common/string.js
|
|
2313
2313
|
var require_string = __commonJS({
|
|
2314
|
-
"
|
|
2314
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
2315
2315
|
"use strict";
|
|
2316
2316
|
var stringifyString = require_stringifyString();
|
|
2317
2317
|
var string = {
|
|
@@ -2328,9 +2328,9 @@ var require_string = __commonJS({
|
|
|
2328
2328
|
}
|
|
2329
2329
|
});
|
|
2330
2330
|
|
|
2331
|
-
//
|
|
2331
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/common/null.js
|
|
2332
2332
|
var require_null = __commonJS({
|
|
2333
|
-
"
|
|
2333
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2334
2334
|
"use strict";
|
|
2335
2335
|
var Scalar = require_Scalar();
|
|
2336
2336
|
var nullTag = {
|
|
@@ -2346,9 +2346,9 @@ var require_null = __commonJS({
|
|
|
2346
2346
|
}
|
|
2347
2347
|
});
|
|
2348
2348
|
|
|
2349
|
-
//
|
|
2349
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/core/bool.js
|
|
2350
2350
|
var require_bool = __commonJS({
|
|
2351
|
-
"
|
|
2351
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2352
2352
|
"use strict";
|
|
2353
2353
|
var Scalar = require_Scalar();
|
|
2354
2354
|
var boolTag = {
|
|
@@ -2370,9 +2370,9 @@ var require_bool = __commonJS({
|
|
|
2370
2370
|
}
|
|
2371
2371
|
});
|
|
2372
2372
|
|
|
2373
|
-
//
|
|
2373
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2374
2374
|
var require_stringifyNumber = __commonJS({
|
|
2375
|
-
"
|
|
2375
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
2376
2376
|
"use strict";
|
|
2377
2377
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2378
2378
|
if (typeof value === "bigint")
|
|
@@ -2397,9 +2397,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
2397
2397
|
}
|
|
2398
2398
|
});
|
|
2399
2399
|
|
|
2400
|
-
//
|
|
2400
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/core/float.js
|
|
2401
2401
|
var require_float = __commonJS({
|
|
2402
|
-
"
|
|
2402
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2403
2403
|
"use strict";
|
|
2404
2404
|
var Scalar = require_Scalar();
|
|
2405
2405
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2443,9 +2443,9 @@ var require_float = __commonJS({
|
|
|
2443
2443
|
}
|
|
2444
2444
|
});
|
|
2445
2445
|
|
|
2446
|
-
//
|
|
2446
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/core/int.js
|
|
2447
2447
|
var require_int = __commonJS({
|
|
2448
|
-
"
|
|
2448
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
2449
2449
|
"use strict";
|
|
2450
2450
|
var stringifyNumber = require_stringifyNumber();
|
|
2451
2451
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2488,9 +2488,9 @@ var require_int = __commonJS({
|
|
|
2488
2488
|
}
|
|
2489
2489
|
});
|
|
2490
2490
|
|
|
2491
|
-
//
|
|
2491
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/core/schema.js
|
|
2492
2492
|
var require_schema = __commonJS({
|
|
2493
|
-
"
|
|
2493
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
2494
2494
|
"use strict";
|
|
2495
2495
|
var map = require_map();
|
|
2496
2496
|
var _null = require_null();
|
|
@@ -2516,9 +2516,9 @@ var require_schema = __commonJS({
|
|
|
2516
2516
|
}
|
|
2517
2517
|
});
|
|
2518
2518
|
|
|
2519
|
-
//
|
|
2519
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/json/schema.js
|
|
2520
2520
|
var require_schema2 = __commonJS({
|
|
2521
|
-
"
|
|
2521
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2522
2522
|
"use strict";
|
|
2523
2523
|
var Scalar = require_Scalar();
|
|
2524
2524
|
var map = require_map();
|
|
@@ -2583,9 +2583,9 @@ var require_schema2 = __commonJS({
|
|
|
2583
2583
|
}
|
|
2584
2584
|
});
|
|
2585
2585
|
|
|
2586
|
-
//
|
|
2586
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2587
2587
|
var require_binary = __commonJS({
|
|
2588
|
-
"
|
|
2588
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2589
2589
|
"use strict";
|
|
2590
2590
|
var node_buffer = __require("buffer");
|
|
2591
2591
|
var Scalar = require_Scalar();
|
|
@@ -2649,9 +2649,9 @@ var require_binary = __commonJS({
|
|
|
2649
2649
|
}
|
|
2650
2650
|
});
|
|
2651
2651
|
|
|
2652
|
-
//
|
|
2652
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2653
2653
|
var require_pairs = __commonJS({
|
|
2654
|
-
"
|
|
2654
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2655
2655
|
"use strict";
|
|
2656
2656
|
var identity = require_identity();
|
|
2657
2657
|
var Pair = require_Pair();
|
|
@@ -2727,9 +2727,9 @@ ${cn.comment}` : item.comment;
|
|
|
2727
2727
|
}
|
|
2728
2728
|
});
|
|
2729
2729
|
|
|
2730
|
-
//
|
|
2730
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2731
2731
|
var require_omap = __commonJS({
|
|
2732
|
-
"
|
|
2732
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2733
2733
|
"use strict";
|
|
2734
2734
|
var identity = require_identity();
|
|
2735
2735
|
var toJS = require_toJS();
|
|
@@ -2805,9 +2805,9 @@ var require_omap = __commonJS({
|
|
|
2805
2805
|
}
|
|
2806
2806
|
});
|
|
2807
2807
|
|
|
2808
|
-
//
|
|
2808
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2809
2809
|
var require_bool2 = __commonJS({
|
|
2810
|
-
"
|
|
2810
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
2811
2811
|
"use strict";
|
|
2812
2812
|
var Scalar = require_Scalar();
|
|
2813
2813
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -2837,9 +2837,9 @@ var require_bool2 = __commonJS({
|
|
|
2837
2837
|
}
|
|
2838
2838
|
});
|
|
2839
2839
|
|
|
2840
|
-
//
|
|
2840
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2841
2841
|
var require_float2 = __commonJS({
|
|
2842
|
-
"
|
|
2842
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
2843
2843
|
"use strict";
|
|
2844
2844
|
var Scalar = require_Scalar();
|
|
2845
2845
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2886,9 +2886,9 @@ var require_float2 = __commonJS({
|
|
|
2886
2886
|
}
|
|
2887
2887
|
});
|
|
2888
2888
|
|
|
2889
|
-
//
|
|
2889
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2890
2890
|
var require_int2 = __commonJS({
|
|
2891
|
-
"
|
|
2891
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
2892
2892
|
"use strict";
|
|
2893
2893
|
var stringifyNumber = require_stringifyNumber();
|
|
2894
2894
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2965,9 +2965,9 @@ var require_int2 = __commonJS({
|
|
|
2965
2965
|
}
|
|
2966
2966
|
});
|
|
2967
2967
|
|
|
2968
|
-
//
|
|
2968
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2969
2969
|
var require_set = __commonJS({
|
|
2970
|
-
"
|
|
2970
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
2971
2971
|
"use strict";
|
|
2972
2972
|
var identity = require_identity();
|
|
2973
2973
|
var Pair = require_Pair();
|
|
@@ -3054,9 +3054,9 @@ var require_set = __commonJS({
|
|
|
3054
3054
|
}
|
|
3055
3055
|
});
|
|
3056
3056
|
|
|
3057
|
-
//
|
|
3057
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
3058
3058
|
var require_timestamp = __commonJS({
|
|
3059
|
-
"
|
|
3059
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
3060
3060
|
"use strict";
|
|
3061
3061
|
var stringifyNumber = require_stringifyNumber();
|
|
3062
3062
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -3142,9 +3142,9 @@ var require_timestamp = __commonJS({
|
|
|
3142
3142
|
}
|
|
3143
3143
|
});
|
|
3144
3144
|
|
|
3145
|
-
//
|
|
3145
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3146
3146
|
var require_schema3 = __commonJS({
|
|
3147
|
-
"
|
|
3147
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
3148
3148
|
"use strict";
|
|
3149
3149
|
var map = require_map();
|
|
3150
3150
|
var _null = require_null();
|
|
@@ -3186,9 +3186,9 @@ var require_schema3 = __commonJS({
|
|
|
3186
3186
|
}
|
|
3187
3187
|
});
|
|
3188
3188
|
|
|
3189
|
-
//
|
|
3189
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/tags.js
|
|
3190
3190
|
var require_tags = __commonJS({
|
|
3191
|
-
"
|
|
3191
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
3192
3192
|
"use strict";
|
|
3193
3193
|
var map = require_map();
|
|
3194
3194
|
var _null = require_null();
|
|
@@ -3280,9 +3280,9 @@ var require_tags = __commonJS({
|
|
|
3280
3280
|
}
|
|
3281
3281
|
});
|
|
3282
3282
|
|
|
3283
|
-
//
|
|
3283
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/schema/Schema.js
|
|
3284
3284
|
var require_Schema = __commonJS({
|
|
3285
|
-
"
|
|
3285
|
+
"../../../ghosty-studio/node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3286
3286
|
"use strict";
|
|
3287
3287
|
var identity = require_identity();
|
|
3288
3288
|
var map = require_map();
|
|
@@ -3312,9 +3312,9 @@ var require_Schema = __commonJS({
|
|
|
3312
3312
|
}
|
|
3313
3313
|
});
|
|
3314
3314
|
|
|
3315
|
-
//
|
|
3315
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3316
3316
|
var require_stringifyDocument = __commonJS({
|
|
3317
|
-
"
|
|
3317
|
+
"../../../ghosty-studio/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3318
3318
|
"use strict";
|
|
3319
3319
|
var identity = require_identity();
|
|
3320
3320
|
var stringify = require_stringify();
|
|
@@ -3392,9 +3392,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
3392
3392
|
}
|
|
3393
3393
|
});
|
|
3394
3394
|
|
|
3395
|
-
//
|
|
3395
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/doc/Document.js
|
|
3396
3396
|
var require_Document = __commonJS({
|
|
3397
|
-
"
|
|
3397
|
+
"../../../ghosty-studio/node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
3398
3398
|
"use strict";
|
|
3399
3399
|
var Alias = require_Alias();
|
|
3400
3400
|
var Collection = require_Collection();
|
|
@@ -3701,9 +3701,9 @@ var require_Document = __commonJS({
|
|
|
3701
3701
|
}
|
|
3702
3702
|
});
|
|
3703
3703
|
|
|
3704
|
-
//
|
|
3704
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/errors.js
|
|
3705
3705
|
var require_errors = __commonJS({
|
|
3706
|
-
"
|
|
3706
|
+
"../../../ghosty-studio/node_modules/yaml/dist/errors.js"(exports) {
|
|
3707
3707
|
"use strict";
|
|
3708
3708
|
var YAMLError = class extends Error {
|
|
3709
3709
|
constructor(name, pos, code, message) {
|
|
@@ -3766,9 +3766,9 @@ ${pointer}
|
|
|
3766
3766
|
}
|
|
3767
3767
|
});
|
|
3768
3768
|
|
|
3769
|
-
//
|
|
3769
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-props.js
|
|
3770
3770
|
var require_resolve_props = __commonJS({
|
|
3771
|
-
"
|
|
3771
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
3772
3772
|
"use strict";
|
|
3773
3773
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
3774
3774
|
let spaceBefore = false;
|
|
@@ -3900,9 +3900,9 @@ var require_resolve_props = __commonJS({
|
|
|
3900
3900
|
}
|
|
3901
3901
|
});
|
|
3902
3902
|
|
|
3903
|
-
//
|
|
3903
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3904
3904
|
var require_util_contains_newline = __commonJS({
|
|
3905
|
-
"
|
|
3905
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
3906
3906
|
"use strict";
|
|
3907
3907
|
function containsNewline(key) {
|
|
3908
3908
|
if (!key)
|
|
@@ -3942,9 +3942,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
3942
3942
|
}
|
|
3943
3943
|
});
|
|
3944
3944
|
|
|
3945
|
-
//
|
|
3945
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3946
3946
|
var require_util_flow_indent_check = __commonJS({
|
|
3947
|
-
"
|
|
3947
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
3948
3948
|
"use strict";
|
|
3949
3949
|
var utilContainsNewline = require_util_contains_newline();
|
|
3950
3950
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -3960,9 +3960,9 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
3960
3960
|
}
|
|
3961
3961
|
});
|
|
3962
3962
|
|
|
3963
|
-
//
|
|
3963
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/util-map-includes.js
|
|
3964
3964
|
var require_util_map_includes = __commonJS({
|
|
3965
|
-
"
|
|
3965
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
3966
3966
|
"use strict";
|
|
3967
3967
|
var identity = require_identity();
|
|
3968
3968
|
function mapIncludes(ctx, items, search) {
|
|
@@ -3976,9 +3976,9 @@ var require_util_map_includes = __commonJS({
|
|
|
3976
3976
|
}
|
|
3977
3977
|
});
|
|
3978
3978
|
|
|
3979
|
-
//
|
|
3979
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3980
3980
|
var require_resolve_block_map = __commonJS({
|
|
3981
|
-
"
|
|
3981
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
3982
3982
|
"use strict";
|
|
3983
3983
|
var Pair = require_Pair();
|
|
3984
3984
|
var YAMLMap = require_YAMLMap();
|
|
@@ -4084,9 +4084,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
4084
4084
|
}
|
|
4085
4085
|
});
|
|
4086
4086
|
|
|
4087
|
-
//
|
|
4087
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
4088
4088
|
var require_resolve_block_seq = __commonJS({
|
|
4089
|
-
"
|
|
4089
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
4090
4090
|
"use strict";
|
|
4091
4091
|
var YAMLSeq = require_YAMLSeq();
|
|
4092
4092
|
var resolveProps = require_resolve_props();
|
|
@@ -4135,9 +4135,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
4135
4135
|
}
|
|
4136
4136
|
});
|
|
4137
4137
|
|
|
4138
|
-
//
|
|
4138
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-end.js
|
|
4139
4139
|
var require_resolve_end = __commonJS({
|
|
4140
|
-
"
|
|
4140
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
4141
4141
|
"use strict";
|
|
4142
4142
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
4143
4143
|
let comment = "";
|
|
@@ -4178,9 +4178,9 @@ var require_resolve_end = __commonJS({
|
|
|
4178
4178
|
}
|
|
4179
4179
|
});
|
|
4180
4180
|
|
|
4181
|
-
//
|
|
4181
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
4182
4182
|
var require_resolve_flow_collection = __commonJS({
|
|
4183
|
-
"
|
|
4183
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4184
4184
|
"use strict";
|
|
4185
4185
|
var identity = require_identity();
|
|
4186
4186
|
var Pair = require_Pair();
|
|
@@ -4372,9 +4372,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4372
4372
|
}
|
|
4373
4373
|
});
|
|
4374
4374
|
|
|
4375
|
-
//
|
|
4375
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/compose-collection.js
|
|
4376
4376
|
var require_compose_collection = __commonJS({
|
|
4377
|
-
"
|
|
4377
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4378
4378
|
"use strict";
|
|
4379
4379
|
var identity = require_identity();
|
|
4380
4380
|
var Scalar = require_Scalar();
|
|
@@ -4437,9 +4437,9 @@ var require_compose_collection = __commonJS({
|
|
|
4437
4437
|
}
|
|
4438
4438
|
});
|
|
4439
4439
|
|
|
4440
|
-
//
|
|
4440
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4441
4441
|
var require_resolve_block_scalar = __commonJS({
|
|
4442
|
-
"
|
|
4442
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4443
4443
|
"use strict";
|
|
4444
4444
|
var Scalar = require_Scalar();
|
|
4445
4445
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -4620,9 +4620,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4620
4620
|
}
|
|
4621
4621
|
});
|
|
4622
4622
|
|
|
4623
|
-
//
|
|
4623
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4624
4624
|
var require_resolve_flow_scalar = __commonJS({
|
|
4625
|
-
"
|
|
4625
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4626
4626
|
"use strict";
|
|
4627
4627
|
var Scalar = require_Scalar();
|
|
4628
4628
|
var resolveEnd = require_resolve_end();
|
|
@@ -4841,9 +4841,9 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4841
4841
|
}
|
|
4842
4842
|
});
|
|
4843
4843
|
|
|
4844
|
-
//
|
|
4844
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/compose-scalar.js
|
|
4845
4845
|
var require_compose_scalar = __commonJS({
|
|
4846
|
-
"
|
|
4846
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
4847
4847
|
"use strict";
|
|
4848
4848
|
var identity = require_identity();
|
|
4849
4849
|
var Scalar = require_Scalar();
|
|
@@ -4922,9 +4922,9 @@ var require_compose_scalar = __commonJS({
|
|
|
4922
4922
|
}
|
|
4923
4923
|
});
|
|
4924
4924
|
|
|
4925
|
-
//
|
|
4925
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4926
4926
|
var require_util_empty_scalar_position = __commonJS({
|
|
4927
|
-
"
|
|
4927
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
4928
4928
|
"use strict";
|
|
4929
4929
|
function emptyScalarPosition(offset, before, pos) {
|
|
4930
4930
|
if (before) {
|
|
@@ -4952,9 +4952,9 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
4952
4952
|
}
|
|
4953
4953
|
});
|
|
4954
4954
|
|
|
4955
|
-
//
|
|
4955
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/compose-node.js
|
|
4956
4956
|
var require_compose_node = __commonJS({
|
|
4957
|
-
"
|
|
4957
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
4958
4958
|
"use strict";
|
|
4959
4959
|
var Alias = require_Alias();
|
|
4960
4960
|
var identity = require_identity();
|
|
@@ -5058,9 +5058,9 @@ var require_compose_node = __commonJS({
|
|
|
5058
5058
|
}
|
|
5059
5059
|
});
|
|
5060
5060
|
|
|
5061
|
-
//
|
|
5061
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/compose-doc.js
|
|
5062
5062
|
var require_compose_doc = __commonJS({
|
|
5063
|
-
"
|
|
5063
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
5064
5064
|
"use strict";
|
|
5065
5065
|
var Document = require_Document();
|
|
5066
5066
|
var composeNode = require_compose_node();
|
|
@@ -5101,9 +5101,9 @@ var require_compose_doc = __commonJS({
|
|
|
5101
5101
|
}
|
|
5102
5102
|
});
|
|
5103
5103
|
|
|
5104
|
-
//
|
|
5104
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/compose/composer.js
|
|
5105
5105
|
var require_composer = __commonJS({
|
|
5106
|
-
"
|
|
5106
|
+
"../../../ghosty-studio/node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
5107
5107
|
"use strict";
|
|
5108
5108
|
var node_process = __require("process");
|
|
5109
5109
|
var directives = require_directives();
|
|
@@ -5309,9 +5309,9 @@ ${end.comment}` : end.comment;
|
|
|
5309
5309
|
}
|
|
5310
5310
|
});
|
|
5311
5311
|
|
|
5312
|
-
//
|
|
5312
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/cst-scalar.js
|
|
5313
5313
|
var require_cst_scalar = __commonJS({
|
|
5314
|
-
"
|
|
5314
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
5315
5315
|
"use strict";
|
|
5316
5316
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5317
5317
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -5494,9 +5494,9 @@ var require_cst_scalar = __commonJS({
|
|
|
5494
5494
|
}
|
|
5495
5495
|
});
|
|
5496
5496
|
|
|
5497
|
-
//
|
|
5497
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5498
5498
|
var require_cst_stringify = __commonJS({
|
|
5499
|
-
"
|
|
5499
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
5500
5500
|
"use strict";
|
|
5501
5501
|
var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
5502
5502
|
function stringifyToken(token) {
|
|
@@ -5555,9 +5555,9 @@ var require_cst_stringify = __commonJS({
|
|
|
5555
5555
|
}
|
|
5556
5556
|
});
|
|
5557
5557
|
|
|
5558
|
-
//
|
|
5558
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/cst-visit.js
|
|
5559
5559
|
var require_cst_visit = __commonJS({
|
|
5560
|
-
"
|
|
5560
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
5561
5561
|
"use strict";
|
|
5562
5562
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
5563
5563
|
var SKIP2 = /* @__PURE__ */ Symbol("skip children");
|
|
@@ -5617,9 +5617,9 @@ var require_cst_visit = __commonJS({
|
|
|
5617
5617
|
}
|
|
5618
5618
|
});
|
|
5619
5619
|
|
|
5620
|
-
//
|
|
5620
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/cst.js
|
|
5621
5621
|
var require_cst = __commonJS({
|
|
5622
|
-
"
|
|
5622
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
5623
5623
|
"use strict";
|
|
5624
5624
|
var cstScalar = require_cst_scalar();
|
|
5625
5625
|
var cstStringify = require_cst_stringify();
|
|
@@ -5719,9 +5719,9 @@ var require_cst = __commonJS({
|
|
|
5719
5719
|
}
|
|
5720
5720
|
});
|
|
5721
5721
|
|
|
5722
|
-
//
|
|
5722
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/lexer.js
|
|
5723
5723
|
var require_lexer = __commonJS({
|
|
5724
|
-
"
|
|
5724
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
5725
5725
|
"use strict";
|
|
5726
5726
|
var cst = require_cst();
|
|
5727
5727
|
function isEmpty(ch) {
|
|
@@ -6308,9 +6308,9 @@ var require_lexer = __commonJS({
|
|
|
6308
6308
|
}
|
|
6309
6309
|
});
|
|
6310
6310
|
|
|
6311
|
-
//
|
|
6311
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/line-counter.js
|
|
6312
6312
|
var require_line_counter = __commonJS({
|
|
6313
|
-
"
|
|
6313
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
6314
6314
|
"use strict";
|
|
6315
6315
|
var LineCounter = class {
|
|
6316
6316
|
constructor() {
|
|
@@ -6339,9 +6339,9 @@ var require_line_counter = __commonJS({
|
|
|
6339
6339
|
}
|
|
6340
6340
|
});
|
|
6341
6341
|
|
|
6342
|
-
//
|
|
6342
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/parse/parser.js
|
|
6343
6343
|
var require_parser = __commonJS({
|
|
6344
|
-
"
|
|
6344
|
+
"../../../ghosty-studio/node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
6345
6345
|
"use strict";
|
|
6346
6346
|
var node_process = __require("process");
|
|
6347
6347
|
var cst = require_cst();
|
|
@@ -7213,9 +7213,9 @@ var require_parser = __commonJS({
|
|
|
7213
7213
|
}
|
|
7214
7214
|
});
|
|
7215
7215
|
|
|
7216
|
-
//
|
|
7216
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/public-api.js
|
|
7217
7217
|
var require_public_api = __commonJS({
|
|
7218
|
-
"
|
|
7218
|
+
"../../../ghosty-studio/node_modules/yaml/dist/public-api.js"(exports) {
|
|
7219
7219
|
"use strict";
|
|
7220
7220
|
var composer = require_composer();
|
|
7221
7221
|
var Document = require_Document();
|
|
@@ -7310,9 +7310,9 @@ var require_public_api = __commonJS({
|
|
|
7310
7310
|
}
|
|
7311
7311
|
});
|
|
7312
7312
|
|
|
7313
|
-
//
|
|
7313
|
+
// ../../../ghosty-studio/node_modules/yaml/dist/index.js
|
|
7314
7314
|
var require_dist = __commonJS({
|
|
7315
|
-
"
|
|
7315
|
+
"../../../ghosty-studio/node_modules/yaml/dist/index.js"(exports) {
|
|
7316
7316
|
"use strict";
|
|
7317
7317
|
var composer = require_composer();
|
|
7318
7318
|
var Document = require_Document();
|
|
@@ -8478,7 +8478,7 @@ async function postLong(path, body, timeoutMs = 9e5) {
|
|
|
8478
8478
|
const req = httpsRequest(`${base}${path}`, {
|
|
8479
8479
|
method: "POST",
|
|
8480
8480
|
timeout: timeoutMs,
|
|
8481
|
-
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.
|
|
8481
|
+
headers: { authorization: `Bearer ${token}`, "user-agent": `ghosty-cli/${"0.67.0"}`, "content-type": "application/json", "content-length": Buffer.byteLength(data) }
|
|
8482
8482
|
}, (res) => {
|
|
8483
8483
|
let buf = "";
|
|
8484
8484
|
res.on("data", (c) => buf += c);
|
|
@@ -8520,7 +8520,7 @@ async function request(path, opts = {}, retried = false) {
|
|
|
8520
8520
|
method: opts.method ?? (opts.body !== void 0 || opts.raw !== void 0 ? "POST" : "GET"),
|
|
8521
8521
|
headers: {
|
|
8522
8522
|
authorization: `Bearer ${token}`,
|
|
8523
|
-
"user-agent": `ghosty-cli/${"0.
|
|
8523
|
+
"user-agent": `ghosty-cli/${"0.67.0"}`,
|
|
8524
8524
|
"accept-language": lang(),
|
|
8525
8525
|
...opts.body !== void 0 ? { "content-type": "application/json" } : {},
|
|
8526
8526
|
...opts.headers
|
|
@@ -10318,6 +10318,54 @@ ${dim(`${t("conversation", "conversaci\xF3n")} ${p.sessionId}`)}`
|
|
|
10318
10318
|
throw usage(t(`Unknown schedule subcommand: ${sub ?? "(none)"}.`, `Subcomando de schedule desconocido: ${sub ?? "(ninguno)"}.`), t("Try", "Prueba") + ": ghosty schedule ls | add | rm");
|
|
10319
10319
|
}
|
|
10320
10320
|
|
|
10321
|
+
// src/commands/teams.ts
|
|
10322
|
+
var enc5 = encodeURIComponent;
|
|
10323
|
+
var sleep2 = (ms) => new Promise((ok) => setTimeout(ok, ms));
|
|
10324
|
+
function allAnswered(respondents, replies) {
|
|
10325
|
+
return respondents.filter((r) => !r.steered).every((r) => replies.some((x) => x.handle === r.handle && !x.live && x.body.trim()));
|
|
10326
|
+
}
|
|
10327
|
+
async function post(target, text, v) {
|
|
10328
|
+
const hint = `ghosty teams post business#mailmask "@plan \u2026" \xB7 ghosty teams post business#mailmask/5612 "\u2026"`;
|
|
10329
|
+
if (!target) throw usage(t("Missing where: workspace#room[/thread].", "Falta d\xF3nde: espacio#room[/hilo]."), hint);
|
|
10330
|
+
const where = parseTeamsTarget(target);
|
|
10331
|
+
if (!where.channel) throw usage(t("Missing the room.", "Falta el room."), hint);
|
|
10332
|
+
if (!text?.trim()) throw usage(t("Missing the message.", "Falta el mensaje."), hint);
|
|
10333
|
+
const timeoutS = v.timeout ? Number(v.timeout) : 600;
|
|
10334
|
+
if (!Number.isFinite(timeoutS) || timeoutS <= 0) throw usage(t(`Invalid --timeout: ${v.timeout}.`, `--timeout inv\xE1lido: ${v.timeout}.`), t("Seconds, e.g. --timeout 900", "Segundos, p. ej. --timeout 900"));
|
|
10335
|
+
const r = await api("/api/v2/teams/post", {
|
|
10336
|
+
method: "POST",
|
|
10337
|
+
body: { workspace: where.workspace, channel: where.channel, ...where.parentId ? { parentId: where.parentId } : {}, text }
|
|
10338
|
+
});
|
|
10339
|
+
const who2 = r.respondents.map((x) => `@${x.handle}${x.steered ? t(" (steer)", " (al turno en curso)") : ""}`).join(", ");
|
|
10340
|
+
const head = () => `${lavender("\u2713")} ${t(`Posted in #${r.channel}`, `Publicado en #${r.channel}`)}${where.parentId ? t(` (thread ${r.threadId})`, ` (hilo ${r.threadId})`) : ""}` + (who2 ? ` \xB7 ${t("answering", "contesta")}: ${who2}` : "") + (r.unresolved.length ? ` \xB7 ${t("nobody is", "no existe")}: ${r.unresolved.map((h) => `@${h}`).join(", ")}` : "") + `
|
|
10341
|
+
${dim(r.url)}`;
|
|
10342
|
+
if (!v.wait || !r.respondents.length) return out(r, head);
|
|
10343
|
+
if (!globals.json) console.log(head());
|
|
10344
|
+
const deadline = Date.now() + timeoutS * 1e3;
|
|
10345
|
+
let replies = [];
|
|
10346
|
+
const q = `workspace=${enc5(where.workspace)}&channel=${enc5(r.channel)}&thread=${r.threadId}&after=${r.id}`;
|
|
10347
|
+
while (Date.now() < deadline) {
|
|
10348
|
+
await sleep2(3e3);
|
|
10349
|
+
replies = (await api(`/api/v2/teams/post?${q}`)).replies;
|
|
10350
|
+
if (allAnswered(r.respondents, replies)) break;
|
|
10351
|
+
}
|
|
10352
|
+
const done = allAnswered(r.respondents, replies);
|
|
10353
|
+
const res = { ...r, replies, done };
|
|
10354
|
+
out(
|
|
10355
|
+
res,
|
|
10356
|
+
() => replies.map((x) => `
|
|
10357
|
+
${lavender(`@${x.handle}`)}${x.live ? dim(t(" (still working)", " (sigue trabajando)")) : ""}
|
|
10358
|
+
${x.body.trim() || dim("\u2026")}`).join("\n") + (done ? "" : `
|
|
10359
|
+
|
|
10360
|
+
${dim(t(`Timed out after ${timeoutS}s; follow it at ${r.url}`, `Pasaron ${timeoutS} s; s\xEDguelo en ${r.url}`))}`)
|
|
10361
|
+
);
|
|
10362
|
+
if (!done) process.exitCode = 1;
|
|
10363
|
+
}
|
|
10364
|
+
async function teamsCmd(sub, target, text, v) {
|
|
10365
|
+
if (sub === "post") return post(target, text, v);
|
|
10366
|
+
throw usage(t(`Unknown teams subcommand: ${sub ?? "(none)"}.`, `Subcomando de teams desconocido: ${sub ?? "(ninguno)"}.`), `ghosty teams post <workspace>#<room>[/<thread>] "\u2026" [--wait]`);
|
|
10367
|
+
}
|
|
10368
|
+
|
|
10321
10369
|
// src/commands/browser.ts
|
|
10322
10370
|
async function browserCmd(sub, v) {
|
|
10323
10371
|
if (sub !== "logout") throw usage(t(`Unknown browser subcommand: ${sub ?? "(none)"}.`, `Subcomando de browser desconocido: ${sub ?? "(ninguno)"}.`), "ghosty browser logout");
|
|
@@ -10424,7 +10472,7 @@ ${dim("(GHOSTY_PARTNER_SECRET tambi\xE9n vale; NO es el secreto global del servi
|
|
|
10424
10472
|
${dim("El mismo par gpk_/gps_ firma POST /api/v2/fleet-agents/<id>/message-stream de los agentes normales de este espacio (claude-worker), con turnToken por usuario final.")}
|
|
10425
10473
|
${dim("Docs: https://www.ghosty.studio/docs/cli/partners")}`
|
|
10426
10474
|
);
|
|
10427
|
-
var
|
|
10475
|
+
var enc6 = encodeURIComponent;
|
|
10428
10476
|
function partnerCreds() {
|
|
10429
10477
|
const key = process.env.GHOSTY_PARTNER_KEY;
|
|
10430
10478
|
const secret = process.env.GHOSTY_PARTNER_KEY_SECRET || process.env.GHOSTY_PARTNER_SECRET;
|
|
@@ -10444,7 +10492,7 @@ async function call(path, v, init = {}) {
|
|
|
10444
10492
|
"x-ghosty-ts": ts,
|
|
10445
10493
|
"x-ghosty-sig": sig,
|
|
10446
10494
|
"content-type": "application/json",
|
|
10447
|
-
"user-agent": `ghosty-cli/${"0.
|
|
10495
|
+
"user-agent": `ghosty-cli/${"0.67.0"}`
|
|
10448
10496
|
},
|
|
10449
10497
|
body: method === "GET" ? void 0 : raw
|
|
10450
10498
|
});
|
|
@@ -10503,17 +10551,17 @@ async function credentialsCmd(sub, id, v) {
|
|
|
10503
10551
|
if (sub === "rotate") {
|
|
10504
10552
|
const grace = v.grace !== void 0 ? Number(v.grace) : void 0;
|
|
10505
10553
|
if (grace !== void 0 && (!Number.isFinite(grace) || grace < 0)) throw usage(t("--grace must be minutes \u2265 0.", "--grace deben ser minutos \u2265 0."));
|
|
10506
|
-
return showSecret(await json(`/api/v2/partner/credentials/${
|
|
10554
|
+
return showSecret(await json(`/api/v2/partner/credentials/${enc6(id)}/rotate`, v, { ...owner, method: "POST", body: { graceMinutes: grace } }), v);
|
|
10507
10555
|
}
|
|
10508
10556
|
if (sub === "revoke" || sub === "rm") {
|
|
10509
|
-
const r = await json(`/api/v2/partner/credentials/${
|
|
10557
|
+
const r = await json(`/api/v2/partner/credentials/${enc6(id)}`, v, { ...owner, method: "DELETE" });
|
|
10510
10558
|
return out(r, () => `${lavender("\u2713")} ${t(`Revoked ${r.keyId}.`, `${r.keyId} revocada.`)}`);
|
|
10511
10559
|
}
|
|
10512
10560
|
throw usage(t(`Unknown credentials subcommand: ${sub}.`, `Subcomando de credentials desconocido: ${sub}.`), t("Try", "Prueba") + ": ghosty partner credentials ls | create | rotate | revoke");
|
|
10513
10561
|
}
|
|
10514
10562
|
async function agentCmd(sub, v) {
|
|
10515
10563
|
if (!sub || sub === "get") {
|
|
10516
|
-
const r = await json(`/api/v2/partner/agent${v.agent ? `?slug=${
|
|
10564
|
+
const r = await json(`/api/v2/partner/agent${v.agent ? `?slug=${enc6(v.agent)}` : ""}`, v);
|
|
10517
10565
|
return out(r, () => {
|
|
10518
10566
|
const a = r.agent;
|
|
10519
10567
|
return [
|
|
@@ -10542,7 +10590,7 @@ async function tenantsCmd(sub, id, v) {
|
|
|
10542
10590
|
return out(r, () => r.tenants.length ? table(r.tenants.map((tn) => ({ externalId: tn.externalId, config: JSON.stringify(tn.config ?? {}), updated: fmt(tn.updatedAt) })), ["externalId", "config", "updated"]) : dim(t("No tenants yet: each one appears on its first turn, or create it with ghosty partner tenants set <externalId> --config '{\u2026}'", "Todav\xEDa no hay tenants: cada uno aparece en su primer turno, o cr\xE9alo con ghosty partner tenants set <externalId> --config '{\u2026}'")));
|
|
10543
10591
|
}
|
|
10544
10592
|
if (!id) throw usage(t("Missing externalId.", "Falta el externalId."), `${t("Example", "Ejemplo")}: ghosty partner tenants ${sub} org_123`);
|
|
10545
|
-
const path = `/api/v2/partner/tenants/${
|
|
10593
|
+
const path = `/api/v2/partner/tenants/${enc6(id)}`;
|
|
10546
10594
|
if (sub === "get") return out(await json(path, v));
|
|
10547
10595
|
if (sub === "set" || sub === "apply") {
|
|
10548
10596
|
if (!v.config) throw usage(t("Missing --config.", "Falta --config."), `${t("Example", "Ejemplo")}: --config '{"name":"Spa","timezone":"America/Mexico_City"}'`);
|
|
@@ -10615,11 +10663,11 @@ ${t("Invite", "Invitaci\xF3n")}: ${r.inviteUrl}`);
|
|
|
10615
10663
|
if (!jid) throw usage(t("Missing the group jid (\u2026@g.us).", "Falta el jid del grupo (\u2026@g.us)."), `${t("See them", "Velos")}: ghosty partner wa groups ls`);
|
|
10616
10664
|
if (sub === "link") {
|
|
10617
10665
|
if (!v.tenant || !v.agent) throw usage(t("Missing --tenant or --agent.", "Falta --tenant o --agent."), `${t("Example", "Ejemplo")}: ghosty partner wa groups link ${jid} --tenant org_123 --agent nik-admin`);
|
|
10618
|
-
const r = await json(`${base}/${
|
|
10666
|
+
const r = await json(`${base}/${enc6(jid)}`, v, { method: "PUT", body: { externalId: v.tenant, agent: v.agent, enabled: !v.off } });
|
|
10619
10667
|
return out(r, () => `${lavender("\u2713")} ${r.group.name} \u2192 ${r.group.externalId} \xB7 ${r.group.enabled ? t("on (answers everything)", "prendido (contesta todo)") : t("off", "apagado")}`);
|
|
10620
10668
|
}
|
|
10621
10669
|
if (sub === "unlink" || sub === "rm") {
|
|
10622
|
-
const r = await json(`${base}/${
|
|
10670
|
+
const r = await json(`${base}/${enc6(jid)}${v.agent ? `?agent=${enc6(v.agent)}` : ""}`, v, { method: "DELETE" });
|
|
10623
10671
|
return out(r, () => r.unlinked ? `${lavender("\u2713")} ${t("Unlinked and off. The number stays in the group.", "Desligado y apagado. El n\xFAmero sigue en el grupo.")}` : dim(t("It wasn't linked.", "No estaba ligado.")));
|
|
10624
10672
|
}
|
|
10625
10673
|
throw usage(t(`Unknown wa groups subcommand: ${sub}.`, `Subcomando de wa groups desconocido: ${sub}.`), t("Try", "Prueba") + ": ghosty partner wa groups ls | create | link | unlink");
|
|
@@ -10630,7 +10678,7 @@ async function wabaCmd(what, sub, id, v) {
|
|
|
10630
10678
|
const row = (l) => ({ id: l.id, business: l.externalId, agent: l.agent ?? "app", number: l.phoneNumber ? `+${l.phoneNumber}` : dim("\u2014"), integration: l.integrationId ?? dim("\u2014"), status: l.enabled ? lavender("on") : dim("off") });
|
|
10631
10679
|
const cols = ["id", "business", "agent", "number", "integration", "status"];
|
|
10632
10680
|
if (!sub || sub === "ls" || sub === "list") {
|
|
10633
|
-
const r = await json(`${base}${v.tenant ? `?externalId=${
|
|
10681
|
+
const r = await json(`${base}${v.tenant ? `?externalId=${enc6(v.tenant)}` : ""}`, v);
|
|
10634
10682
|
return out(r, () => r.links.length ? table(r.links.map(row), cols) : dim(t("No links. Create one: ghosty partner waba links create --tenant <id> --agent nik-public", "Sin links. Crea uno: ghosty partner waba links create --tenant <id> --agent nik-public")));
|
|
10635
10683
|
}
|
|
10636
10684
|
if (sub === "create") {
|
|
@@ -10652,11 +10700,11 @@ async function wabaCmd(what, sub, id, v) {
|
|
|
10652
10700
|
if (v.on && v.off) throw usage(t("--on or --off, not both.", "--on o --off, no los dos."));
|
|
10653
10701
|
const body = { ...v.integration ? { integrationId: v.integration } : {}, ...v.phone ? { phoneNumber: v.phone } : {}, ...v.name ? { displayName: v.name } : {}, ...v.on ? { enabled: true } : v.off ? { enabled: false } : {} };
|
|
10654
10702
|
if (!Object.keys(body).length) throw usage(t("Nothing to change.", "Nada que cambiar."), "--integration ID --phone N --name N --on|--off");
|
|
10655
|
-
const r = await json(`${base}/${
|
|
10703
|
+
const r = await json(`${base}/${enc6(id)}`, v, { method: "PUT", body });
|
|
10656
10704
|
return out(r, () => table([row(r.link)], cols));
|
|
10657
10705
|
}
|
|
10658
10706
|
if (sub === "rm" || sub === "off") {
|
|
10659
|
-
const r = await json(`${base}/${
|
|
10707
|
+
const r = await json(`${base}/${enc6(id)}`, v, { method: "DELETE" });
|
|
10660
10708
|
return out(r, () => `${lavender("\u2713")} ${t("Off: it records and doesn't answer.", "Apagado: registra y no contesta.")}`);
|
|
10661
10709
|
}
|
|
10662
10710
|
throw usage(t(`Unknown waba links subcommand: ${sub}.`, `Subcomando de waba links desconocido: ${sub}.`), t("Try", "Prueba") + ": ghosty partner waba links ls | create | set | rm");
|
|
@@ -10744,8 +10792,8 @@ function parseRowScope(raw) {
|
|
|
10744
10792
|
var describeRowScope = (scope) => Object.entries(scope ?? {}).map(([t2, c]) => `${t2} (${c.join(", ")})`).join("; ");
|
|
10745
10793
|
|
|
10746
10794
|
// src/commands/data.ts
|
|
10747
|
-
var
|
|
10748
|
-
var agentPath2 = (id, rest = "") => `/api/v2/agents/${
|
|
10795
|
+
var enc7 = encodeURIComponent;
|
|
10796
|
+
var agentPath2 = (id, rest = "") => `/api/v2/agents/${enc7(id)}${rest}`;
|
|
10749
10797
|
var need2 = (v, what, example) => {
|
|
10750
10798
|
if (!v) throw usage(t(`Missing ${what}.`, `Falta ${what}.`), `${t("Example", "Ejemplo")}: ${example}`);
|
|
10751
10799
|
return v;
|
|
@@ -10800,7 +10848,7 @@ async function dbsImport(id, db, v) {
|
|
|
10800
10848
|
const easybitsKey = process.env.EASYBITS_API_KEY;
|
|
10801
10849
|
if (!easybitsKey) throw usage(t("EASYBITS_API_KEY is not set.", "EASYBITS_API_KEY no est\xE1 definida."), t("Export your EasyBits API key (https://www.easybits.cloud/dash/developer) and run again.", "Exporta tu API key de EasyBits (https://www.easybits.cloud/dash/developer) y vuelve a correrlo."));
|
|
10802
10850
|
const body = { from: "easybits", sourceDb: m[1], easybitsKey, mode: v.append ? "append" : "replace", ...v.tables ? { tables: csv(v.tables) } : {}, ...v["rehost-images"] ? { rehost: csv(v["rehost-images"]) } : {} };
|
|
10803
|
-
const path = agentPath2(id, `/dbs/${
|
|
10851
|
+
const path = agentPath2(id, `/dbs/${enc7(db)}/import`);
|
|
10804
10852
|
const dry = await api(path, { body: { ...body, dryRun: true } });
|
|
10805
10853
|
if (v["dry-run"]) return out({ ...dry, shrinking: shrinking(dry.plan).map((p) => p.table) }, () => `${dry.db} \u2190 easybits:${m[1]}
|
|
10806
10854
|
${planText(dry.plan)}${shrinkWarnings(dry.plan)}${importWarnings(dry.warnings)}${gsOnlyWarnings(dry.gsOnly)}
|
|
@@ -10819,7 +10867,7 @@ async function dbsRehost(id, db, v) {
|
|
|
10819
10867
|
const ex = "ghosty dbs rehost <agent-id> <db> --table catalogo --column imagen_url [--dry-run]";
|
|
10820
10868
|
const table2 = need2(v.table, "--table", ex);
|
|
10821
10869
|
const column = need2(v.column, "--column", ex);
|
|
10822
|
-
const path = agentPath2(id, `/dbs/${
|
|
10870
|
+
const path = agentPath2(id, `/dbs/${enc7(db)}/rehost`);
|
|
10823
10871
|
const dry = await api(path, { body: { table: table2, column, dryRun: true } });
|
|
10824
10872
|
const head = `${dry.db} \xB7 ${table2}.${column}: ${t(`${dry.distinct} distinct link(s), ${dry.alreadyOurs} already permanent, ${dry.toCopy} to copy`, `${dry.distinct} liga(s) distintas, ${dry.alreadyOurs} ya permanentes, ${dry.toCopy} por copiar`)}`;
|
|
10825
10873
|
if (v["dry-run"] || !dry.toCopy) return out(dry, () => `${head}
|
|
@@ -10849,7 +10897,7 @@ ${total.failed.map((f) => ` ${f.url} ${dim(f.error)}`).join("\n")}` : ""
|
|
|
10849
10897
|
);
|
|
10850
10898
|
}
|
|
10851
10899
|
async function dbsRename(id, db, name, dryRun) {
|
|
10852
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
10900
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}/rename`), { body: { name, dryRun } });
|
|
10853
10901
|
const refs = r.references.flatMap((x) => [
|
|
10854
10902
|
` ${bold(x.agent)} ${x.where}${x.derived ? dim(t(" (derived: follows its base)", " (derivado: sigue a su base)")) : ""}`,
|
|
10855
10903
|
...x.refs.slice(0, 3).map((l) => dim(` ${x.where === "prompt" || x.where.startsWith("skill:") ? `${l.line}: ` : ""}${l.text}`)),
|
|
@@ -10866,7 +10914,7 @@ ${dim(t("Dry run: nothing changed. Without --dry-run those mentions are rewritte
|
|
|
10866
10914
|
return out(r, () => [`${lavender("\u2713")} ${head}. ${t(`${r.rewritten.length} mention(s) rewritten.`, `${r.rewritten.length} menci\xF3n(es) reescritas.`)}`, ...failed, dim(`${t("Undo", "Deshacer")}: ghosty dbs rename ${id} ${r.to} ${r.from}`)].join("\n"));
|
|
10867
10915
|
}
|
|
10868
10916
|
async function dbsRm(id, db, v) {
|
|
10869
|
-
const path = agentPath2(id, `/dbs/${
|
|
10917
|
+
const path = agentPath2(id, `/dbs/${enc7(db)}/delete`);
|
|
10870
10918
|
const dry = await api(path, { body: { dryRun: true } });
|
|
10871
10919
|
const rows = dry.tables.reduce((n, x) => n + x.rows, 0);
|
|
10872
10920
|
const plan = [
|
|
@@ -10885,7 +10933,7 @@ async function dbsExport(id, db, v) {
|
|
|
10885
10933
|
if (format !== "sqlite" && format !== "csv") throw usage(t("--format takes sqlite or csv.", "--format acepta sqlite o csv."), `ghosty dbs export ${id} ${db} --format csv --table <table>`);
|
|
10886
10934
|
if (format === "csv" && !v.table) throw usage(t("A CSV is one table: add --table.", "Un CSV es de una tabla: agrega --table."), `ghosty dbs export ${id} ${db} --table <table> (ghosty dbs tables ${id} ${db})`);
|
|
10887
10935
|
const q = new URLSearchParams({ format, ...v.table ? { table: v.table } : {} });
|
|
10888
|
-
const res = await request(agentPath2(id, `/dbs/${
|
|
10936
|
+
const res = await request(agentPath2(id, `/dbs/${enc7(db)}/export?${q}`));
|
|
10889
10937
|
const suggested = /filename="([^"]+)"/.exec(res.headers.get("content-disposition") ?? "")?.[1] ?? (format === "csv" ? `${db}-${v.table}.csv` : `${db}.sqlite`);
|
|
10890
10938
|
const file = v.out ?? suggested;
|
|
10891
10939
|
const bytes = Buffer.from(await res.arrayBuffer());
|
|
@@ -10915,7 +10963,7 @@ ${dim(`${t("Delete one", "Borrar una")}: ghosty dbs rm ${id} <db> --dry-run`)}`
|
|
|
10915
10963
|
}
|
|
10916
10964
|
case "tables": {
|
|
10917
10965
|
db = need2(db, t("database (id or name)", "la base (id o nombre)"), "ghosty dbs tables <agent-id> <db>");
|
|
10918
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
10966
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}`));
|
|
10919
10967
|
const ext = new Set(r.externalWriteTables);
|
|
10920
10968
|
const own = r.externalRowScope ?? {};
|
|
10921
10969
|
const rows = r.tables.map((tb) => ({ table: tb.name, rows: tb.rows, "customer writes": ext.has(tb.name) ? "yes" : "", "customer sees": own[tb.name] ? `own rows (${own[tb.name].join(", ")})` : "", columns: tb.columns.map((c) => `${c.name}${c.pk ? "*" : ""}`).join(", ") }));
|
|
@@ -10934,7 +10982,7 @@ ${table(rows, ["table", "rows", "customer writes", "customer sees", "columns"])}
|
|
|
10934
10982
|
case "sql": {
|
|
10935
10983
|
db = need2(db, t("database (id or name)", "la base (id o nombre)"), 'ghosty dbs query <agent-id> <db> "SELECT \u2026"');
|
|
10936
10984
|
const sql = need2(rest.join(" ").trim() || void 0, t("SQL", "el SQL"), 'ghosty dbs query <agent-id> <db> "SELECT * FROM t LIMIT 10"');
|
|
10937
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
10985
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}/query`), { body: { sql, args: v.arg ?? [], write: v.write === true } }).catch((e) => {
|
|
10938
10986
|
if (e instanceof CliError && !v.write && /lectura|SELECT|escribir/i.test(e.message)) throw new CliError(e.message, EXIT.API, t("To write on purpose, add --write.", "Para escribir a prop\xF3sito, agrega --write."));
|
|
10939
10987
|
throw e;
|
|
10940
10988
|
});
|
|
@@ -10951,7 +10999,7 @@ ${dim(`${t(`${rows.length} row(s)`, `${rows.length} fila(s)`)} \xB7 ${Math.round
|
|
|
10951
10999
|
if (v.table) q.set("table", v.table);
|
|
10952
11000
|
if (v.since) q.set("since", v.since);
|
|
10953
11001
|
if (v.limit) q.set("limit", v.limit);
|
|
10954
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
11002
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}/origin${q.size ? `?${q}` : ""}`));
|
|
10955
11003
|
const rows = r.writes.map((w) => ({ when: w.created_at, agent: w.agent_id.slice(0, 10), channel: w.canal ?? "", what: `${w.op} ${w.table_name}${w.row_id != null ? ` #${w.row_id}` : ""}`, customer: w.phone10 ?? "", why: w.reason ?? "" }));
|
|
10956
11004
|
return out(r, () => rows.length ? table(rows, ["when", "agent", "channel", "what", "customer", "why"]) : dim(t("No agent writes recorded yet in this database.", "Todav\xEDa no hay escrituras de agentes registradas en esta base.")));
|
|
10957
11005
|
}
|
|
@@ -10967,7 +11015,7 @@ ${dim(`${t(`${rows.length} row(s)`, `${rows.length} fila(s)`)} \xB7 ${Math.round
|
|
|
10967
11015
|
...v["external-write"] !== void 0 ? { externalWriteTables: csv(v["external-write"]) } : {},
|
|
10968
11016
|
...rowScope !== void 0 ? { externalRowScope: rowScope } : {}
|
|
10969
11017
|
};
|
|
10970
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
11018
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}`), { method: "PUT", body });
|
|
10971
11019
|
const own = describeRowScope(r.externalRowScope);
|
|
10972
11020
|
return out(r, () => `${lavender("\u2713")} ${r.name} ${t("granted.", "concedida.")} ${dim(t(`From customer channels it writes to: ${r.externalWriteTables.join(", ") || "nothing (read only)"}.${own ? ` Each customer sees only their own rows of: ${own}.` : ""}`, `Desde canales de clientes escribe en: ${r.externalWriteTables.join(", ") || "nada (s\xF3lo lectura)"}.${own ? ` Cada cliente ve s\xF3lo sus propias filas de: ${own}.` : ""}`))}`);
|
|
10973
11021
|
}
|
|
@@ -10996,7 +11044,7 @@ ${dim(`${t(`${rows.length} row(s)`, `${rows.length} fila(s)`)} \xB7 ${Math.round
|
|
|
10996
11044
|
}
|
|
10997
11045
|
case "revoke": {
|
|
10998
11046
|
db = need2(db, t("database (id or name)", "la base (id o nombre)"), "ghosty dbs revoke <agent-id> <db>");
|
|
10999
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
11047
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}`), { method: "DELETE" });
|
|
11000
11048
|
return out(r, () => `${lavender("\u2713")} ${r.name} ${t("revoked.", "revocada.")} ${dim(`${t("Undo", "Deshacer")}: ghosty dbs grant ${id} ${r.name}`)}`);
|
|
11001
11049
|
}
|
|
11002
11050
|
default:
|
|
@@ -11050,7 +11098,7 @@ async function agentDocsCmd(sub, id, docs, v) {
|
|
|
11050
11098
|
wanted = docs.map((ref) => ({ ref, body }));
|
|
11051
11099
|
}
|
|
11052
11100
|
const done = [];
|
|
11053
|
-
for (const w of wanted) done.push(await api(agentPath2(id, `/documents/${
|
|
11101
|
+
for (const w of wanted) done.push(await api(agentPath2(id, `/documents/${enc7(w.ref)}`), { method: "PUT", body: w.body }));
|
|
11054
11102
|
return out(done.length === 1 ? done[0] : { granted: done }, () => done.map((r) => `${lavender("\u2713")} ${r.name}: ${r.mode === "write" ? t("reads and replaces it", "lo lee y lo reemplaza") : t("reads it", "lo lee")}${r.deliverable ? t(", and can send it", ", y puede mandarlo") : t(", never sends it", ", nunca lo manda")}.`).join("\n"));
|
|
11055
11103
|
}
|
|
11056
11104
|
case "add": {
|
|
@@ -11068,7 +11116,7 @@ async function agentDocsCmd(sub, id, docs, v) {
|
|
|
11068
11116
|
}
|
|
11069
11117
|
case "revoke": {
|
|
11070
11118
|
doc = need2(doc, t("document (id or exact name)", "el documento (id o nombre exacto)"), 'ghosty agents docs revoke <agent-id> "Cat\xE1logo.pdf"');
|
|
11071
|
-
const r = await api(agentPath2(id, `/documents/${
|
|
11119
|
+
const r = await api(agentPath2(id, `/documents/${enc7(doc)}`), { method: "DELETE" });
|
|
11072
11120
|
return out(r, () => `${lavender("\u2713")} ${r.name} ${t("revoked.", "revocado.")} ${dim(`${t("Undo", "Deshacer")}: ghosty agents docs grant ${id} "${r.name}"`)}`);
|
|
11073
11121
|
}
|
|
11074
11122
|
case "replace": {
|
|
@@ -11079,13 +11127,13 @@ async function agentDocsCmd(sub, id, docs, v) {
|
|
|
11079
11127
|
...v.url ? { url: v.url } : { contentBase64: (await readFile6(v.file)).toString("base64"), ...mimeField(v.file) },
|
|
11080
11128
|
...v.note ? { note: v.note } : {}
|
|
11081
11129
|
};
|
|
11082
|
-
const r = await api(agentPath2(id, `/documents/${
|
|
11130
|
+
const r = await api(agentPath2(id, `/documents/${enc7(doc)}/versions`), { method: "POST", body });
|
|
11083
11131
|
return out(r, () => `${lavender("\u2713")} ${r.name}: ${t("version", "versi\xF3n")} ${r.version?.n ?? "?"} ${dim(`(${r.size} bytes)`)}. ${dim(`${t("Undo", "Deshacer")}: ghosty agents docs restore ${id} "${r.name}" ${(r.version?.n ?? 2) - 1}`)}`);
|
|
11084
11132
|
}
|
|
11085
11133
|
case "history":
|
|
11086
11134
|
case "versions": {
|
|
11087
11135
|
doc = need2(doc, t("document (id or exact name)", "el documento (id o nombre exacto)"), 'ghosty agents docs history <agent-id> "Cat\xE1logo.pdf"');
|
|
11088
|
-
const r = await api(agentPath2(id, `/documents/${
|
|
11136
|
+
const r = await api(agentPath2(id, `/documents/${enc7(doc)}/versions`));
|
|
11089
11137
|
const rows = r.versions.map((x) => ({ v: `${x.n}${x.current ? "*" : ""}`, when: x.createdAt.slice(0, 16).replace("T", " "), by: x.agent ?? x.via ?? x.source, size: String(x.size), note: x.note ?? "" }));
|
|
11090
11138
|
const used = r.usedBy.map((u) => `${u.agent} (${u.mode === "write" ? t("updates it", "lo actualiza") + (u.writableFrom.length ? `: ${u.writableFrom.join(", ")}` : "") : t("reads it", "lo lee")})`).join(" \xB7 ");
|
|
11091
11139
|
return out(r, () => `${r.document.name}
|
|
@@ -11097,7 +11145,7 @@ ${dim(t("Used by", "Lo usan"))}: ${used}` : ""}`);
|
|
|
11097
11145
|
doc = need2(doc, t("document (id or exact name)", "el documento (id o nombre exacto)"), ex);
|
|
11098
11146
|
const n = Number(need2(docs[1], t("version number", "el n\xFAmero de versi\xF3n"), ex));
|
|
11099
11147
|
if (!Number.isInteger(n) || n < 1) throw usage(t("The version is a whole number (see docs history).", "La versi\xF3n es un n\xFAmero entero (mira docs history)."), ex);
|
|
11100
|
-
const r = await api(agentPath2(id, `/documents/${
|
|
11148
|
+
const r = await api(agentPath2(id, `/documents/${enc7(doc)}/versions/${n}/restore`), { method: "POST", body: v.note ? { note: v.note } : {} });
|
|
11101
11149
|
return out(r, () => `${lavender("\u2713")} ${r.name}: ${t(`restored from v${n} as version`, `restaurado de la v${n} como versi\xF3n`)} ${r.version?.n ?? "?"}.`);
|
|
11102
11150
|
}
|
|
11103
11151
|
default:
|
|
@@ -11136,7 +11184,7 @@ async function turnsCancel(id, sid) {
|
|
|
11136
11184
|
const ex = "ghosty turns cancel <agent-id> <conversation-id>";
|
|
11137
11185
|
id = need2(id, t("agent id", "el id del agente"), ex);
|
|
11138
11186
|
sid = need2(sid, t("conversation id", "el id de la conversaci\xF3n"), ex);
|
|
11139
|
-
const r = await api(`/api/v2/me/agents/${
|
|
11187
|
+
const r = await api(`/api/v2/me/agents/${enc7(id)}/conversations/${enc7(sid)}/cancel`, { method: "POST", body: {} });
|
|
11140
11188
|
const b = r.background ?? { videos: 0, subagents: 0, wakes: 0 };
|
|
11141
11189
|
const bg = b.videos + b.subagents + b.wakes;
|
|
11142
11190
|
out(
|
|
@@ -11223,7 +11271,7 @@ function mimeField(path) {
|
|
|
11223
11271
|
}
|
|
11224
11272
|
async function turnShow(id, turnId, full = false) {
|
|
11225
11273
|
id = need2(id, t("agent id", "el id del agente"), "ghosty turns show <agent-id> [turn-id|last] [--full]");
|
|
11226
|
-
const r = await api(agentPath2(id, `/turns/${
|
|
11274
|
+
const r = await api(agentPath2(id, `/turns/${enc7(turnId ?? "last")}`));
|
|
11227
11275
|
out(r, () => {
|
|
11228
11276
|
const tu = r.turn;
|
|
11229
11277
|
const clip = (s2) => full || s2.length <= 600 ? s2 : `${s2.slice(0, 600)}\u2026 ${dim(t(`(+${s2.length - 600} chars, --full)`, `(+${s2.length - 600} caracteres, --full)`))}`;
|
|
@@ -11290,7 +11338,7 @@ async function dbsPhotosCmd(verb, id, db, v) {
|
|
|
11290
11338
|
const dir = need2(v.dir, "--dir", ex);
|
|
11291
11339
|
let column = v.column;
|
|
11292
11340
|
if (!column) {
|
|
11293
|
-
const r = await api(agentPath2(id, `/dbs/${
|
|
11341
|
+
const r = await api(agentPath2(id, `/dbs/${enc7(db)}`));
|
|
11294
11342
|
const tb = r.tables.find((x) => x.name === tableName);
|
|
11295
11343
|
if (!tb) throw usage(t(`${db} has no table ${tableName}.`, `${db} no tiene la tabla ${tableName}.`));
|
|
11296
11344
|
column = tb.columns.find((c) => c.name === "imagen_url")?.name;
|
|
@@ -11298,7 +11346,7 @@ async function dbsPhotosCmd(verb, id, db, v) {
|
|
|
11298
11346
|
}
|
|
11299
11347
|
const files = photoFiles(await readdir2(dir));
|
|
11300
11348
|
if (!files.length) throw usage(t(`No .jpg/.png/.webp files in ${dir}.`, `No hay archivos .jpg/.png/.webp en ${dir}.`), t("Name each photo after its key: SKU-123.jpg", "Nombra cada foto con su clave: SKU-123.jpg"));
|
|
11301
|
-
const path = agentPath2(id, `/dbs/${
|
|
11349
|
+
const path = agentPath2(id, `/dbs/${enc7(db)}/photos`);
|
|
11302
11350
|
const results = [];
|
|
11303
11351
|
for (let i = 0; i < files.length; i += 8) {
|
|
11304
11352
|
const batch = files.slice(i, i + 8);
|
|
@@ -11566,7 +11614,7 @@ async function readMultiFileAuth(dir) {
|
|
|
11566
11614
|
}
|
|
11567
11615
|
|
|
11568
11616
|
// src/commands/channels.ts
|
|
11569
|
-
var
|
|
11617
|
+
var enc8 = encodeURIComponent;
|
|
11570
11618
|
var digits = (s2) => s2.replace(/\D/g, "");
|
|
11571
11619
|
function find2(nums, ref) {
|
|
11572
11620
|
const d = digits(ref);
|
|
@@ -11588,7 +11636,7 @@ async function channelsCmd(kind, sub, id, ref, v) {
|
|
|
11588
11636
|
if (sub === "integrations") return integrationsCmd(id, v.email);
|
|
11589
11637
|
if (sub === "import" || sub === "status" || sub === "pause" || sub === "pair") return waCmd2(sub, id, v);
|
|
11590
11638
|
if (sub === "enable" && !v["dry-run"]) requireYesIfHeadless(v.yes, `ghosty channels whatsapp enable ${id} ${ref ?? "<number>"}`);
|
|
11591
|
-
const path = `/api/v2/agents/${
|
|
11639
|
+
const path = `/api/v2/agents/${enc8(id)}/whatsapp`;
|
|
11592
11640
|
const listing = !sub || sub === "ls" || sub === "list";
|
|
11593
11641
|
const cur = await api(listing ? `${path}?formmy=1` : path);
|
|
11594
11642
|
if (listing) {
|
|
@@ -11632,7 +11680,7 @@ async function groupsCmd(args, v) {
|
|
|
11632
11680
|
if (rawSub === "disable") v = { ...v, off: true };
|
|
11633
11681
|
const ex = 'ghosty channels wa groups ls <agent-id> | set <agent-id> <group> [--role equipo|cliente] [--wake mention|all] [--on|--off] [--name "New name"] | create <agent-id> "Name" | inject <agent-id> <group> --text "\u2026" [--sender NAME]';
|
|
11634
11682
|
if (!id) throw usage(t("Missing agent id.", "Falta el id del agente."), `${t("Example", "Ejemplo")}: ${ex}`);
|
|
11635
|
-
const path = `/api/v2/agents/${
|
|
11683
|
+
const path = `/api/v2/agents/${enc8(id)}/wa/groups`;
|
|
11636
11684
|
if (v.role !== void 0 && v.role !== "equipo" && v.role !== "cliente") throw usage(t("--role takes equipo or cliente.", "--role acepta equipo o cliente."));
|
|
11637
11685
|
if (v.wake !== void 0 && v.wake !== "mention" && v.wake !== "all") throw usage(t("--wake takes mention or all.", "--wake acepta mention o all."));
|
|
11638
11686
|
if (!sub || sub === "ls" || sub === "list") {
|
|
@@ -11652,7 +11700,7 @@ async function groupsCmd(args, v) {
|
|
|
11652
11700
|
const text = v.text?.trim();
|
|
11653
11701
|
if (!ref2 || !text) throw usage(t("Missing group or --text.", "Falta el grupo o --text."), t("Example", "Ejemplo") + `: ghosty channels wa groups inject ${id} "Equipo" --text "lo que dec\xEDa el audio" --sender Brenda`);
|
|
11654
11702
|
const g2 = findGroup((await api(`${path}?live=0`)).groups, ref2);
|
|
11655
|
-
const r2 = await api(`/api/v2/agents/${
|
|
11703
|
+
const r2 = await api(`/api/v2/agents/${enc8(id)}/wa/inject`, { method: "POST", body: { jid: g2.jid, text, ...v.sender ? { senderName: v.sender } : {} } });
|
|
11656
11704
|
return out(r2, () => `${lavender("\u2713")} ${t(`Injected into ${g2.name}: the agent answers there.`, `Reinyectado en ${g2.name}: el agente contesta ah\xED.`)}`);
|
|
11657
11705
|
}
|
|
11658
11706
|
if (sub !== "set") throw usage(t(`Unknown groups subcommand: ${sub}.`, `Subcomando de groups desconocido: ${sub}.`), ex);
|
|
@@ -11676,7 +11724,7 @@ ${t(`The agent will start answering in this group as ${role}.`, `El agente empez
|
|
|
11676
11724
|
const now = r.groups.find((x) => x.jid === g.jid);
|
|
11677
11725
|
return out({ group: now ?? null, plan: [plan] }, () => `${lavender("\u2713")} ${now?.name ?? g.name}: ${now?.enabled ? "on" : "off"} ${t("as", "como")} ${now?.role ?? role} \xB7 wake ${now?.wake ?? wake ?? "all"}`);
|
|
11678
11726
|
}
|
|
11679
|
-
var EB_EXPORT = (agentId) => `${(process.env.EASYBITS_URL ?? "https://www.easybits.cloud").replace(/\/+$/, "")}/api/v2/fleet-agents/${
|
|
11727
|
+
var EB_EXPORT = (agentId) => `${(process.env.EASYBITS_URL ?? "https://www.easybits.cloud").replace(/\/+$/, "")}/api/v2/fleet-agents/${enc8(agentId)}/baileys/export`;
|
|
11680
11728
|
async function easybitsSession(agentId, keys) {
|
|
11681
11729
|
const key = process.env.EASYBITS_API_KEY;
|
|
11682
11730
|
if (!key) throw usage(t("EASYBITS_API_KEY is not set.", "EASYBITS_API_KEY no est\xE1 definida."), t("Export the EasyBits API key of the agent's owner and run again.", "Exporta la API key de EasyBits del due\xF1o del agente y vuelve a correrlo."));
|
|
@@ -11703,7 +11751,7 @@ function originText(o) {
|
|
|
11703
11751
|
}
|
|
11704
11752
|
async function waCmd2(sub, id, v) {
|
|
11705
11753
|
if (!id) throw usage(t("Missing agent id.", "Falta el id del agente."), t("Example", "Ejemplo") + `: ghosty channels wa ${sub} <agent-id>`);
|
|
11706
|
-
const base = `/api/v2/agents/${
|
|
11754
|
+
const base = `/api/v2/agents/${enc8(id)}/wa`;
|
|
11707
11755
|
if (sub === "status") {
|
|
11708
11756
|
const s2 = await api(base);
|
|
11709
11757
|
return out(s2, () => `${s2.status === "connected" ? lavender(t("\u25CF connected", "\u25CF conectado")) : dim(`\u25CB ${s2.status}`)} ${s2.phone ? `+${s2.phone}` : dim(t("(no number)", "(sin n\xFAmero)"))}${s2.live ? "" : dim(t(" \xB7 no socket in gs", " \xB7 sin socket en gs"))}${s2.hasCreds ? "" : dim(t(" \xB7 no saved session", " \xB7 sin sesi\xF3n guardada"))}${s2.reason ? `
|
|
@@ -11767,13 +11815,13 @@ async function linkCmd(sub, id, v) {
|
|
|
11767
11815
|
const board = v.board === void 0 ? void 0 : /^(agent|agente)$/i.test(v.board) ? null : v.board;
|
|
11768
11816
|
const boardFlag = v.board !== void 0 ? ` --board ${JSON.stringify(v.board)}` : "";
|
|
11769
11817
|
if (sub === "link" && (adsOnly !== void 0 || board !== void 0) && v.answer === void 0) {
|
|
11770
|
-
const path2 = `/api/v2/agents/${
|
|
11818
|
+
const path2 = `/api/v2/agents/${enc8(id)}/whatsapp/link`;
|
|
11771
11819
|
const r2 = await api(path2, { method: "POST", body: { integrationId: v.integration, ...adsOnly !== void 0 ? { adsOnly } : {}, ...board !== void 0 ? { board } : {}, ...v["dry-run"] ? { dryRun: true } : {} } });
|
|
11772
11820
|
return out(r2, () => `${r2.plan.map((x) => serverText(x)).join("\n")}${v["dry-run"] ? `
|
|
11773
11821
|
${dim(applyHint(`ghosty channels whatsapp link ${id} --integration ${v.integration}${v["ads-only"] ? ` --ads-only ${v["ads-only"]}` : ""}${boardFlag}`))}` : ""}`);
|
|
11774
11822
|
}
|
|
11775
11823
|
if (sub === "link" && v.answer !== "on" && v.answer !== "off") throw usage(t("Missing --answer on|off.", "Falta --answer on|off."), t("on = this agent answers real customers \xB7 off = it only records (add --forward so gs still sees the conversations)", "on = este agente contesta a clientes reales \xB7 off = s\xF3lo registra (agrega --forward para que gs siga viendo las conversaciones)"));
|
|
11776
|
-
const path = `/api/v2/agents/${
|
|
11824
|
+
const path = `/api/v2/agents/${enc8(id)}/whatsapp/link`;
|
|
11777
11825
|
if (v["partner-agent"] && !v["partner-tenant"]) throw usage(t("--partner-agent needs --partner-tenant <externalId>.", "--partner-agent necesita --partner-tenant <externalId>."));
|
|
11778
11826
|
const partner = v["partner-tenant"] ? { partnerExternalId: v["partner-tenant"], ...v["partner-agent"] ? { partnerAgentSlug: v["partner-agent"] } : {} } : {};
|
|
11779
11827
|
const body = { integrationId: v.integration, ...sub === "unlink" ? { unlink: true } : { answer: v.answer === "on", ...v.forward ? { forward: true } : {}, ...adsOnly !== void 0 ? { adsOnly } : {}, ...board !== void 0 ? { board } : {}, ...partner } };
|
|
@@ -11820,7 +11868,7 @@ async function pageWithRetry(fetchPage, where, waitMs = (n) => 5e3 * n, tries =
|
|
|
11820
11868
|
}
|
|
11821
11869
|
var lastCell = (l) => l ? `${l.agentName ?? l.agentId} ${dim(l.at.slice(0, 16).replace("T", " "))}` : dim("\u2014");
|
|
11822
11870
|
async function linksCmd(id, kind, orphans) {
|
|
11823
|
-
const r = await api(`/api/v2/agents/${
|
|
11871
|
+
const r = await api(`/api/v2/agents/${enc8(id)}/channels/links?kind=${kind}${orphans ? "&orphans=1" : ""}`);
|
|
11824
11872
|
const now = (l) => l.answersNow ? l.answersNow.agentName ?? l.answersNow.agentId : l.recordsOnly ? t("nobody (records only)", "nadie (s\xF3lo registra)") : l.via === "easybits" ? "EasyBits" : l.via === "partner" ? "partner" : lavender(t("nobody", "nadie"));
|
|
11825
11873
|
const rows = r.links.map((l) => ({ [kind === "waba" ? "number" : "page"]: l.label, "answers now": now(l), "last answered by": lastCell(l.lastAnswer), turns: l.lastAnswer?.turns ?? 0, id: l.id }));
|
|
11826
11874
|
const first = r.links.find((l) => l.nobody && l.lastAnswer);
|
|
@@ -11832,7 +11880,7 @@ ${dim(`${t("Give it back", "Regresarlo")}: ${kind === "waba" ? `ghosty channels
|
|
|
11832
11880
|
);
|
|
11833
11881
|
}
|
|
11834
11882
|
async function integrationsCmd(id, email) {
|
|
11835
|
-
const r = await api(`/api/v2/agents/${
|
|
11883
|
+
const r = await api(`/api/v2/agents/${enc8(id)}/whatsapp/integrations${email ? `?email=${enc8(email)}` : ""}`);
|
|
11836
11884
|
const who2 = { gs: "gs", easybits: "EasyBits", droplet: "droplet", formmy: "Formmy", other: t("other", "otro") };
|
|
11837
11885
|
const rows = r.integrations.map((i) => ({
|
|
11838
11886
|
number: i.phoneNumber ? `+${i.phoneNumber}` : dim("?"),
|
|
@@ -11853,7 +11901,7 @@ async function historyCmd(id, v) {
|
|
|
11853
11901
|
if (!v.integration) throw usage(t("Missing --integration.", "Falta --integration."), t("Example", "Ejemplo") + `: ghosty channels whatsapp history ${id} --integration <formmy-integration-id> --days 7 --dry-run`);
|
|
11854
11902
|
const days = Number(v.days ?? 7);
|
|
11855
11903
|
if (!Number.isInteger(days) || days < 1 || days > 30) throw usage(t("--days takes 1 to 30.", "--days acepta de 1 a 30."));
|
|
11856
|
-
const path = `/api/v2/agents/${
|
|
11904
|
+
const path = `/api/v2/agents/${enc8(id)}/whatsapp/history`;
|
|
11857
11905
|
const media = v.media !== void 0;
|
|
11858
11906
|
const filters = { ...v["only-ads"] ? { onlyAds: true } : {}, ...v.phones ? { phones: v.phones.split(",").map((x) => x.trim()).filter(Boolean) } : {}, ...v.column ? { column: v.column } : {} };
|
|
11859
11907
|
const cmd = `ghosty channels whatsapp history ${id} --integration ${v.integration} --days ${days}${v["only-ads"] ? " --only-ads" : ""}${v.phones ? ` --phones ${v.phones}` : ""}${v.column ? ` --column "${v.column}"` : ""}`;
|
|
@@ -12062,7 +12110,7 @@ ${t(`Archive ${plan.matched} card(s) on \xAB${plan.board}\xBB? (reversible: a ne
|
|
|
12062
12110
|
}
|
|
12063
12111
|
|
|
12064
12112
|
// src/commands/boards.ts
|
|
12065
|
-
var
|
|
12113
|
+
var enc9 = encodeURIComponent;
|
|
12066
12114
|
async function boardsCmd(sub, a1, a2, v, context) {
|
|
12067
12115
|
if (context && sub !== "assign") {
|
|
12068
12116
|
if ((sub === "ls" || sub === "list" || !sub || sub === "move-cards") && !a1) a1 = context;
|
|
@@ -12072,13 +12120,13 @@ async function boardsCmd(sub, a1, a2, v, context) {
|
|
|
12072
12120
|
case "ls":
|
|
12073
12121
|
case "list": {
|
|
12074
12122
|
if (!a1) throw usage(t("Missing workspace.", "Falta el espacio."), t("Example", "Ejemplo") + ": ghosty boards ls <workspace-slug>");
|
|
12075
|
-
const r = await api(`/api/v2/workspaces/${
|
|
12123
|
+
const r = await api(`/api/v2/workspaces/${enc9(a1)}/boards`);
|
|
12076
12124
|
const rows = r.boards.map((b) => ({ name: b.main ? `${b.name} (${t("main", "principal")})` : b.name, cards: b.cards, agents: b.agents.map((x) => x.name ?? x.id).join(", "), columns: b.columns.length, id: b.id }));
|
|
12077
12125
|
return out(r, () => table(rows, ["name", "cards", "agents", "columns", "id"]));
|
|
12078
12126
|
}
|
|
12079
12127
|
case "create": {
|
|
12080
12128
|
if (!a1 || !a2) throw usage(t("Missing workspace or name.", "Falta el espacio o el nombre."), t("Example", "Ejemplo") + ': ghosty boards create <workspace> "Siiqtec - Ixmiquilpan" --columns-from main');
|
|
12081
|
-
const r = await api(`/api/v2/workspaces/${
|
|
12129
|
+
const r = await api(`/api/v2/workspaces/${enc9(a1)}/boards`, { method: "POST", body: { name: a2, ...v["columns-from"] ? { columnsFrom: v["columns-from"] } : {} } });
|
|
12082
12130
|
return out(r, () => `${lavender("\u2713")} ${t(`Board \xAB${r.name}\xBB created${r.columnsFrom ? ` with the ${r.columns} column(s) of \xAB${r.columnsFrom}\xBB` : ""}.`, `Tablero \xAB${r.name}\xBB creado${r.columnsFrom ? ` con las ${r.columns} columna(s) de \xAB${r.columnsFrom}\xBB` : ""}.`)} ${dim(`${t("Send an agent's cards there", "Manda ah\xED las tarjetas de un agente")}: ghosty boards assign <agent-id> "${r.name}"`)}${r.warning ? `
|
|
12083
12131
|
${lavender(`\u26A0\uFE0F ${serverText(r.warning)}`)}` : ""}`);
|
|
12084
12132
|
}
|
|
@@ -12086,18 +12134,18 @@ ${lavender(`\u26A0\uFE0F ${serverText(r.warning)}`)}` : ""}`);
|
|
|
12086
12134
|
if (!a1 || !a2) throw usage(t("Missing workspace or board.", "Falta el espacio o el tablero."), t("Example", "Ejemplo") + ': ghosty boards rm <workspace> "Prueba"');
|
|
12087
12135
|
requireYesIfHeadless(v.yes, `ghosty boards rm ${a1} ${JSON.stringify(a2)}`);
|
|
12088
12136
|
await confirm(t(`Delete the board \xAB${a2}\xBB of ${a1}? (only an empty one; its agents go back to the main board)`, `\xBFBorrar el tablero \xAB${a2}\xBB de ${a1}? (s\xF3lo si est\xE1 vac\xEDo; sus agentes regresan al tablero principal)`), { yes: v.yes, retry: `ghosty boards rm ${a1} ${JSON.stringify(a2)}` });
|
|
12089
|
-
const r = await api(`/api/v2/workspaces/${
|
|
12137
|
+
const r = await api(`/api/v2/workspaces/${enc9(a1)}/boards`, { method: "DELETE", body: { board: a2 } });
|
|
12090
12138
|
return out(r, () => `${lavender("\u2713")} ${t(`Board \xAB${r.deleted}\xBB deleted.`, `Tablero \xAB${r.deleted}\xBB borrado.`)}`);
|
|
12091
12139
|
}
|
|
12092
12140
|
case "assign": {
|
|
12093
12141
|
if (!a1 || !a2) throw usage(t("Missing agent or board.", "Falta el agente o el tablero."), t("Example", "Ejemplo") + ': ghosty boards assign <agent-id> "Siiqtec - Ixmiquilpan" (' + t("or main", "o main") + ")");
|
|
12094
|
-
const r = await api(`/api/v2/agents/${
|
|
12142
|
+
const r = await api(`/api/v2/agents/${enc9(a1)}`, { method: "PATCH", body: { board: a2 } });
|
|
12095
12143
|
return out(r, () => `${lavender("\u2713")} ${t(`New cards of ${a1} go to \xAB${r.board}\xBB.`, `Las tarjetas nuevas de ${a1} van a \xAB${r.board}\xBB.`)} ${dim(`${t("Existing ones stay where they are", "Las que ya existen se quedan donde est\xE1n")}: ghosty boards move-cards ${r.workspace} --from \u2026 --to "${r.board}" \u2026`)}`);
|
|
12096
12144
|
}
|
|
12097
12145
|
case "move-cards": {
|
|
12098
12146
|
if (!a1 || !v.from || !v.to) throw usage(t("Missing workspace, --from or --to.", "Falta el espacio, --from o --to."), t("Example", "Ejemplo") + ': ghosty boards move-cards <workspace> --from main --to "Siiqtec - Ixmiquilpan" --integration 6a3b02ad\u2026 --dry-run');
|
|
12099
12147
|
if (!v.integration && !v.phone && !v.all) throw usage(t("Add a filter: --integration ID, --phone N or --all.", "Agrega un filtro: --integration ID, --phone N o --all."), t("A filter-less move would empty the board.", "Mover sin filtro vaciar\xEDa el tablero."));
|
|
12100
|
-
const path = `/api/v2/workspaces/${
|
|
12148
|
+
const path = `/api/v2/workspaces/${enc9(a1)}/boards/move-cards`;
|
|
12101
12149
|
const body = { from: v.from, to: v.to, ...v.integration ? { integration: v.integration } : {}, ...v.phone ? { phone: v.phone } : {}, ...v.all ? { all: true } : {} };
|
|
12102
12150
|
const retry = `ghosty boards move-cards ${a1} --from ${JSON.stringify(v.from)} --to ${JSON.stringify(v.to)}${v.integration ? ` --integration ${v.integration}` : ""}${v.phone ? ` --phone ${v.phone}` : ""}${v.all ? " --all" : ""}`;
|
|
12103
12151
|
if (!v["dry-run"]) requireYesIfHeadless(v.yes, retry);
|
|
@@ -12340,6 +12388,11 @@ var HELPS_ES = {
|
|
|
12340
12388
|
replace: [['"what to do"', '"qu\xE9 hacer"'], ["# answers in that thread as if mentioned", "# contesta en ese hilo como si lo mencionaran"]],
|
|
12341
12389
|
notes: ["--teams: el agente tiene que estar activo en el Teams de ese espacio y t\xFA ser miembro. El id del hilo es el del mensaje con que empieza.", "--conversation waba:\u2026 | wa:<jid> | messenger:\u2026: la respuesta sale por ese canal (WABA s\xF3lo dentro de 24 h; WhatsApp personal si el n\xFAmero est\xE1 conectado). \xABOK\xBB nunca se manda."]
|
|
12342
12390
|
},
|
|
12391
|
+
teams: {
|
|
12392
|
+
summary: "Escribe en un room o hilo de Teams a tu nombre; el @agente que menciones contesta, como en el composer.",
|
|
12393
|
+
replace: [['"message"', '"mensaje"'], ["# new thread", "# hilo nuevo"], ["make Deploy wait for ci with needs", "que el Deploy espere al ci con needs"], ["how is it going?", "\xBFen qu\xE9 va?"]],
|
|
12394
|
+
notes: ["Tienes que ser miembro del Teams de ese espacio (o staff que entr\xF3). Tu sesi\xF3n, nunca el token de un agente (gat_).", "Sin hilo abre uno nuevo, como el bot\xF3n \xABPedir\xBB. El id del hilo es el del mensaje con que empieza (en su liga: ?thread=).", "--wait pregunta hasta que cada agente mencionado termina e imprime sus respuestas; sale con 1 si se acaba --timeout (segundos).", "Hasta 30 mensajes por hora por persona. Cada uno queda en la bit\xE1cora: ghosty audit ls --action teams.post"]
|
|
12395
|
+
},
|
|
12343
12396
|
browser: {
|
|
12344
12397
|
summary: "Ghosty para Chrome: cerrar la sesi\xF3n del navegador.",
|
|
12345
12398
|
notes: ["Revoca todos los tokens de Ghosty para Chrome que tengan tus agentes de terminal (Claude Code, CLI, @ghostystudio/browser-mcp) y desconecta la extensi\xF3n. Para volver, copia un comando nuevo del panel de la extensi\xF3n."]
|
|
@@ -13017,6 +13070,13 @@ var HELPS = {
|
|
|
13017
13070
|
notes: ["--teams: the agent must be active in that workspace's Teams and you must be a member. The thread id is the id of the message that starts it.", "--conversation waba:\u2026 | wa:<jid> | messenger:\u2026: the answer goes out through that channel (WABA only within 24 h; personal WhatsApp if the number is connected). \xABOK\xBB is never sent."],
|
|
13018
13071
|
learn: `${REF}#programar-turnos`
|
|
13019
13072
|
},
|
|
13073
|
+
teams: {
|
|
13074
|
+
summary: "Write in a Teams room or thread as yourself; any @agent you mention answers, like in the composer.",
|
|
13075
|
+
usage: ['ghosty teams post <workspace>#<room> "message"', 'ghosty teams post <workspace>#<room>/<thread-id> "message" [--wait [--timeout 600]]'],
|
|
13076
|
+
examples: ['ghosty teams post business#mailmask "@plan make Deploy wait for ci with needs" # new thread', 'ghosty teams post business#mailmask/5612 "@plan how is it going?" --wait'],
|
|
13077
|
+
notes: ["You must be a member of that workspace's Teams (or staff who joined). Your session, never an agent token (gat_).", "No thread = a new thread, like the \xABPedir\xBB button. The thread id is the id of the message that starts it (in its link: ?thread=).", "--wait polls until every mentioned agent finished and prints their answers; exit 1 if --timeout (seconds) runs out.", "Up to 30 messages per hour per person. Each one is in the audit log: ghosty audit ls --action teams.post"],
|
|
13078
|
+
learn: `${REF}#teams`
|
|
13079
|
+
},
|
|
13020
13080
|
browser: {
|
|
13021
13081
|
summary: "Ghosty for Chrome: sign the browser out.",
|
|
13022
13082
|
usage: ["ghosty browser logout [--yes]"],
|
|
@@ -13750,10 +13810,10 @@ function normalizeArgs(pos, v) {
|
|
|
13750
13810
|
var import_yaml = __toESM(require_dist(), 1);
|
|
13751
13811
|
import { mkdir as mkdir7, readdir as readdir4, readFile as readFile11, stat as stat2, writeFile as writeFile9 } from "node:fs/promises";
|
|
13752
13812
|
import { join as join9, resolve as resolve2 } from "node:path";
|
|
13753
|
-
var
|
|
13813
|
+
var enc10 = encodeURIComponent;
|
|
13754
13814
|
async function agentsExport(id, v) {
|
|
13755
13815
|
if (!id) throw usage(t("Missing agent.", "Falta el agente."), t("Example", "Ejemplo") + ": ghosty agents export pia-0 > pia.yaml \xB7 ghosty agents export pia-0 --out ./pia");
|
|
13756
|
-
const yaml = await (await request(`/api/v2/agents/${
|
|
13816
|
+
const yaml = await (await request(`/api/v2/agents/${enc10(id)}/export`)).text();
|
|
13757
13817
|
if (!v.out) {
|
|
13758
13818
|
if (globals.json) return out((0, import_yaml.parse)(yaml));
|
|
13759
13819
|
return void process.stdout.write(yaml);
|
|
@@ -13763,7 +13823,7 @@ async function agentsExport(id, v) {
|
|
|
13763
13823
|
await writeFile9(join9(dir, "agent.yaml"), yaml);
|
|
13764
13824
|
const own = (0, import_yaml.parse)(yaml)["x-ghosty"]?.skills?.own ?? [];
|
|
13765
13825
|
for (const slug of own) {
|
|
13766
|
-
const sk = await api(`/api/v2/agents/${
|
|
13826
|
+
const sk = await api(`/api/v2/agents/${enc10(id)}/skills/${enc10(slug)}`);
|
|
13767
13827
|
await writeSkill(join9(dir, "skills", slug), sk);
|
|
13768
13828
|
}
|
|
13769
13829
|
out({ saved: dir, skills: own }, () => `${lavender("\u2713")} ${dir}/agent.yaml${own.length ? ` + skills/ (${own.join(", ")})` : ""}
|
|
@@ -13822,7 +13882,7 @@ ${dim(t("Then every setting of the file is applied. Dry run: nothing created.",
|
|
|
13822
13882
|
}
|
|
13823
13883
|
const spec = JSON.stringify(v.create ? { ...file, title: void 0 } : file);
|
|
13824
13884
|
const body = { spec, ...files ? { files } : {}, ...v.prune ? { prune: true } : {}, ...v["no-notify"] ? { notify: false } : {} };
|
|
13825
|
-
const path = `/api/v2/agents/${
|
|
13885
|
+
const path = `/api/v2/agents/${enc10(id)}/apply`;
|
|
13826
13886
|
const plan = await api(path, { method: "POST", body: { ...body, dryRun: true } });
|
|
13827
13887
|
const actionable = plan.plan.filter((c) => c.op !== "!");
|
|
13828
13888
|
const text2 = plan.plan.map(line).join("\n") || dim(t("No changes: the agent already matches the file.", "Sin cambios: el agente ya coincide con el archivo."));
|
|
@@ -13877,8 +13937,8 @@ ${dim(t(`${r.totals.activeTurns} turn(s) running`, `${r.totals.activeTurns} turn
|
|
|
13877
13937
|
}
|
|
13878
13938
|
|
|
13879
13939
|
// src/commands/spaces.ts
|
|
13880
|
-
var
|
|
13881
|
-
var wsPath = (slug, rest = "") => `/api/v2/workspaces/${
|
|
13940
|
+
var enc11 = encodeURIComponent;
|
|
13941
|
+
var wsPath = (slug, rest = "") => `/api/v2/workspaces/${enc11(slug)}${rest}`;
|
|
13882
13942
|
var needSpace = (slug, example) => {
|
|
13883
13943
|
if (!slug) throw usage(t("Which workspace?", "\xBFQu\xE9 espacio?"), `${t("Example", "Ejemplo")}: ${example} ${t("(or ghosty use <workspace>)", "(o ghosty use <espacio>)")}`);
|
|
13884
13944
|
return slug;
|
|
@@ -13959,7 +14019,7 @@ ${bagsText(r)}`);
|
|
|
13959
14019
|
if (!name) throw usage(t("Missing the bag's name.", "Falta el nombre de la bolsa."), ex);
|
|
13960
14020
|
const body = { ...v.tokens ? { tokens: parseTokens(v.tokens) } : {}, ...recurring !== void 0 ? { recurring } : {}, ...hardCap !== void 0 ? { hardCap } : {}, ...v.note !== void 0 ? { note: v.note } : {}, ...v.name ? { name: v.name } : {} };
|
|
13961
14021
|
if (!Object.keys(body).length) throw usage(t("Nothing to change.", "Nada que cambiar."), "--tokens 30M | --recurring on|off | --hard-cap on|off | --note TEXT | --name NEW");
|
|
13962
|
-
const r = await api(wsPath(slug, `/bags/${
|
|
14022
|
+
const r = await api(wsPath(slug, `/bags/${enc11(name)}`), { method: "PATCH", body });
|
|
13963
14023
|
return out(r, () => `${lavender("\u2713")} ${t(`Bag \xAB${r.updated}\xBB updated.`, `Bolsa \xAB${r.updated}\xBB actualizada.`)}
|
|
13964
14024
|
${bagsText(r)}`);
|
|
13965
14025
|
}
|
|
@@ -13968,7 +14028,7 @@ ${bagsText(r)}`);
|
|
|
13968
14028
|
if (!name) throw usage(t("Missing the bag's name.", "Falta el nombre de la bolsa."), ex);
|
|
13969
14029
|
requireYesIfHeadless(v.yes, `ghosty bags rm ${slug} "${name}"`);
|
|
13970
14030
|
await confirm(t(`Delete bag \xAB${name}\xBB from ${slug}? (only if no agent uses it)`, `\xBFBorrar la bolsa \xAB${name}\xBB de ${slug}? (s\xF3lo si ning\xFAn agente la usa)`), { yes: v.yes, retry: `ghosty bags rm ${slug} "${name}"` });
|
|
13971
|
-
const r = await api(wsPath(slug, `/bags/${
|
|
14031
|
+
const r = await api(wsPath(slug, `/bags/${enc11(name)}`), { method: "DELETE" });
|
|
13972
14032
|
return out(r, () => `${lavender("\u2713")} ${t(`Bag \xAB${r.deleted}\xBB deleted.`, `Bolsa \xAB${r.deleted}\xBB borrada.`)}
|
|
13973
14033
|
${bagsText(r)}`);
|
|
13974
14034
|
}
|
|
@@ -13977,7 +14037,7 @@ ${bagsText(r)}`);
|
|
|
13977
14037
|
async function spacesCmd(sub, slug, arg, v, context) {
|
|
13978
14038
|
const ex = "ghosty spaces ls [--user EMAIL] \xB7 create <slug> [--combo teams|sales|both] [--dry-run] \xB7 join|leave <workspace> \xB7 set <workspace> --combo teams|sales|both | --model-cap 0.25|1|4|none | --house-claude on|off \xB7 renew <workspace> --until 2026-11-01 [--note TEXT] \xB7 rename <old> <new> [--dry-run] \xB7 archive|restore <workspace> [--dry-run] \xB7 transfer <workspace> --to EMAIL [--keep-as admin|member|none] [--copy-keys] [--dry-run] \xB7 log <workspace> [--since 30d] [--action workspace]";
|
|
13979
14039
|
if (!sub || sub === "ls" || sub === "list") {
|
|
13980
|
-
const r = await api(`/api/v2/workspaces${v.user ? `?user=${
|
|
14040
|
+
const r = await api(`/api/v2/workspaces${v.user ? `?user=${enc11(v.user)}` : ""}`);
|
|
13981
14041
|
const rows = r.workspaces.map((w) => ({ workspace: w.slug, role: w.role ?? "", plan: w.plan, combo: w.combo, owner: w.owner ?? "", paid: w.paidUntil ?? "" }));
|
|
13982
14042
|
return out(r, () => rows.length ? `${bold(r.user)}
|
|
13983
14043
|
${table(rows, ["workspace", "role", "plan", "combo", "owner", "paid"])}` : dim(t(`${r.user} has no workspaces.`, `${r.user} no tiene espacios.`)));
|
|
@@ -14101,7 +14161,7 @@ ${r.warnings.map((w) => red(` \xB7 ${serverText(w)}`)).join("\n")}` : ""}`);
|
|
|
14101
14161
|
}
|
|
14102
14162
|
async function workspaceUsage(slug, v) {
|
|
14103
14163
|
slug = needSpace(slug, "ghosty usage --workspace <slug> --by agent,day --days 14");
|
|
14104
|
-
const r = await api(wsPath(slug, `/usage?days=${
|
|
14164
|
+
const r = await api(wsPath(slug, `/usage?days=${enc11(v.days ?? "14")}`));
|
|
14105
14165
|
const cdmx2 = (iso) => new Date(Date.parse(iso) - 6 * 36e5).toISOString().slice(5, 16).replace("T", " ");
|
|
14106
14166
|
if (v["quota-hits"]) {
|
|
14107
14167
|
const rows2 = r.quotaHits.map((q) => ({ at: cdmx2(q.at), agent: q.agent, channel: q.channel, from: q.phone ?? q.conversationId.slice(0, 24), message: (q.preview ?? "").slice(0, 60) }));
|
|
@@ -14153,7 +14213,7 @@ async function agentUsage(id, v) {
|
|
|
14153
14213
|
if (v.by?.trim() === "visitor") return anonVisitorUsage(id, v);
|
|
14154
14214
|
const by = (v.by ?? "model").split(",").map((x) => x.trim()).filter(Boolean);
|
|
14155
14215
|
if (!by.length || by.some((b) => !USAGE_DIMS.includes(b))) throw usage(t("With --agent, --by takes model, day and/or canal (or visitor alone).", "Con --agent, --by acepta model, day y/o canal (o visitor solo)."), "ghosty usage --agent <id> --by model,day --cost");
|
|
14156
|
-
const r = await api(`/api/v2/agents/${
|
|
14216
|
+
const r = await api(`/api/v2/agents/${enc11(id)}/usage?days=${enc11(v.days ?? "14")}`);
|
|
14157
14217
|
const groups = groupAgentUsage(r.rows, by);
|
|
14158
14218
|
const rows = groups.map((g) => ({ ...Object.fromEntries(by.map((d) => [d, g[d]])), turns: g.turns, tokens: fmtTokens(g.billable), "cache read": fmtTokens(g.cacheRead), out: fmtTokens(g.outputTokens), ...v.cost ? { usd: `$${g.usd.toFixed(2)}` } : {} }));
|
|
14159
14219
|
const cols = [...by, "turns", "tokens", "cache read", "out", ...v.cost ? ["usd"] : []];
|
|
@@ -14164,7 +14224,7 @@ ${table(rows, cols)}
|
|
|
14164
14224
|
${dim(foot)}` : dim(t(`No usage in ${r.days} day(s).`, `Sin uso en ${r.days} d\xEDa(s).`)));
|
|
14165
14225
|
}
|
|
14166
14226
|
async function anonVisitorUsage(id, v) {
|
|
14167
|
-
const r = await api(`/api/v2/agents/${
|
|
14227
|
+
const r = await api(`/api/v2/agents/${enc11(id)}/usage?days=${enc11(v.days ?? "14")}&visitors=1`);
|
|
14168
14228
|
const vs = r.visitors ?? { list: [], total: { visitors: 0, accounts: 0, usd: 0 } };
|
|
14169
14229
|
const yes = t("yes", "s\xED");
|
|
14170
14230
|
const rows = vs.list.map((x) => ({
|
|
@@ -14193,12 +14253,12 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
14193
14253
|
import { mkdir as mkdir8, readFile as readFile12, writeFile as writeFile10 } from "node:fs/promises";
|
|
14194
14254
|
import { homedir as homedir5 } from "node:os";
|
|
14195
14255
|
import { dirname as dirname4, join as join10 } from "node:path";
|
|
14196
|
-
var
|
|
14256
|
+
var enc12 = encodeURIComponent;
|
|
14197
14257
|
var hora = (iso) => new Date(iso).toLocaleString("es-MX", { timeZone: "America/Mexico_City", hour12: false, dateStyle: "short", timeStyle: "short" });
|
|
14198
14258
|
async function history(agent, v) {
|
|
14199
14259
|
if (!agent) throw usage(t("Missing agent.", "Falta el agente."), "ghosty demos history <agent> [--since 2d] [--session web:\u2026] [--timeline] [--full]");
|
|
14200
14260
|
const q = new URLSearchParams({ since: v.since ?? "7d", ...v.session ? { session: v.session } : {}, ...v.timeline ? { timeline: "1" } : {}, ...v.full ? { full: "1" } : {} });
|
|
14201
|
-
const r = await api(`/api/v2/agents/${
|
|
14261
|
+
const r = await api(`/api/v2/agents/${enc12(agent)}/demo/conversations?${q}`);
|
|
14202
14262
|
out(r, () => {
|
|
14203
14263
|
const lines = [`${bold(r.agent.name ?? r.agent.id)} ${dim(`/p/${r.agent.slug ?? "\u2014"} \xB7 ${t("since", "desde")} ${hora(r.since)} \xB7 ${t("clones", "clones")}: ${r.clones.length}`)}`];
|
|
14204
14264
|
for (const c of r.clones) lines.push(dim(` ${t("clone", "clon")} ${c.id} (${hora(c.createdAt)})${c.sponsored ? t(" \xB7 on your key", " \xB7 con tu llave") : ""}`));
|
|
@@ -14227,7 +14287,7 @@ function anonCookieOf(setCookie) {
|
|
|
14227
14287
|
async function visitorCookie(base, slug, fresh) {
|
|
14228
14288
|
const jar = await readJar();
|
|
14229
14289
|
if (jar[slug] && !fresh) return jar[slug];
|
|
14230
|
-
const res = await fetch(`${base}/p/${
|
|
14290
|
+
const res = await fetch(`${base}/p/${enc12(slug)}`, { redirect: "manual" });
|
|
14231
14291
|
if (res.status === 404) throw new CliError(t(`No demo \xAB${slug}\xBB (the link is name-code, e.g. guardias-k3x9q2).`, `No hay demo \xAB${slug}\xBB (la liga es nombre-c\xF3digo, p. ej. guardias-k3x9q2).`), EXIT.API);
|
|
14232
14292
|
const cookie = anonCookieOf(res.headers.get("set-cookie"));
|
|
14233
14293
|
if (!cookie) throw new CliError(t("The demo didn't hand out a visitor cookie.", "El demo no entreg\xF3 cookie de visitante."), EXIT.API);
|
|
@@ -14239,9 +14299,9 @@ async function visitorCookie(base, slug, fresh) {
|
|
|
14239
14299
|
async function visitorTurn(base, slug, cookie, text) {
|
|
14240
14300
|
const turnId = randomUUID2();
|
|
14241
14301
|
const ctrl = new AbortController();
|
|
14242
|
-
const ev = await fetch(`${base}/p/${
|
|
14302
|
+
const ev = await fetch(`${base}/p/${enc12(slug)}/events`, { headers: { cookie, accept: "text/event-stream" }, signal: ctrl.signal });
|
|
14243
14303
|
if (!ev.ok) throw await toError(ev);
|
|
14244
|
-
const sent = await fetch(`${base}/p/${
|
|
14304
|
+
const sent = await fetch(`${base}/p/${enc12(slug)}/messages`, { method: "POST", headers: { cookie, "content-type": "application/json" }, body: JSON.stringify({ content: text, turnId }) });
|
|
14245
14305
|
if (!sent.ok) {
|
|
14246
14306
|
ctrl.abort();
|
|
14247
14307
|
const body = await sent.text();
|
|
@@ -14271,7 +14331,7 @@ async function visitorTurn(base, slug, cookie, text) {
|
|
|
14271
14331
|
async function recycle(agent) {
|
|
14272
14332
|
for (let i = 0; i < 10; i++) {
|
|
14273
14333
|
try {
|
|
14274
|
-
await api(`/api/v2/agents/${
|
|
14334
|
+
await api(`/api/v2/agents/${enc12(agent)}/box`, { method: "POST", body: { recycle: true } });
|
|
14275
14335
|
return;
|
|
14276
14336
|
} catch (e) {
|
|
14277
14337
|
if (!(e instanceof CliError) || !/turno|turn/i.test(e.message)) throw e;
|
|
@@ -14446,7 +14506,7 @@ ${dim(t("Times in UTC. --full for the whole detail; --json for everything.", "Ho
|
|
|
14446
14506
|
}
|
|
14447
14507
|
|
|
14448
14508
|
// src/commands/factory.ts
|
|
14449
|
-
var
|
|
14509
|
+
var enc13 = encodeURIComponent;
|
|
14450
14510
|
var money = (n) => n === null || n === void 0 ? "\u2014" : `$${n.toFixed(2)}`;
|
|
14451
14511
|
var mins = (n) => n === null || n === void 0 ? "\u2014" : n >= 120 ? `${(n / 60).toFixed(1)} h` : `${n} min`;
|
|
14452
14512
|
var hhmm = (iso) => new Date(iso).toLocaleTimeString("es-MX", { hour: "2-digit", minute: "2-digit", hour12: false });
|
|
@@ -14455,7 +14515,7 @@ async function factoryCmd(sub, verb, ref, title, v, context) {
|
|
|
14455
14515
|
if (sub !== "runs") throw usage(t(`Unknown factory subcommand: ${sub ?? "(none)"}.`, `Subcomando de factory desconocido: ${sub ?? "(ninguno)"}.`), "ghosty factory runs ls|show|why|stats|rename \u2026");
|
|
14456
14516
|
const ws = v.workspace ?? context;
|
|
14457
14517
|
if (!ws) throw usage(t("Which workspace?", "\xBFQu\xE9 espacio?"), t("Add --workspace SLUG (or set one with ghosty use SLUG).", "Agrega --workspace SLUG (o fija uno con ghosty use SLUG)."));
|
|
14458
|
-
const base = `/api/v2/workspaces/${
|
|
14518
|
+
const base = `/api/v2/workspaces/${enc13(ws)}/factory/runs`;
|
|
14459
14519
|
if (!verb || verb === "ls" || verb === "list") {
|
|
14460
14520
|
const qs = new URLSearchParams({ ...v.room ? { room: v.room } : {}, ...v.status ? { status: v.status } : {}, ...v.limit ? { limit: v.limit } : {} });
|
|
14461
14521
|
const r = await api(`${base}?${qs}`);
|
|
@@ -14465,7 +14525,7 @@ ${dim(`${t("Detail", "Detalle")}: ghosty factory runs show <run> --workspace ${r
|
|
|
14465
14525
|
}
|
|
14466
14526
|
if (verb === "stats") {
|
|
14467
14527
|
const qs = new URLSearchParams({ since: v.since ?? "30d", ...v.repo ? { repo: v.repo } : {} });
|
|
14468
|
-
const { stats: s2, workspace } = await api(`/api/v2/workspaces/${
|
|
14528
|
+
const { stats: s2, workspace } = await api(`/api/v2/workspaces/${enc13(ws)}/factory/stats?${qs}`);
|
|
14469
14529
|
return out({ workspace, stats: s2 }, () => {
|
|
14470
14530
|
if (!s2.runs) return dim(t(`No factory runs in ${workspace} in the last ${s2.sinceDays} days.`, `No hay pedidos de la f\xE1brica en ${workspace} en los \xFAltimos ${s2.sinceDays} d\xEDas.`));
|
|
14471
14531
|
return [
|
|
@@ -14479,7 +14539,7 @@ ${dim(`${t("Detail", "Detalle")}: ghosty factory runs show <run> --workspace ${r
|
|
|
14479
14539
|
});
|
|
14480
14540
|
}
|
|
14481
14541
|
if (!ref) throw usage(t("Missing run.", "Falta el pedido."), `ghosty factory runs ${verb} <run> --workspace ${ws}`);
|
|
14482
|
-
const path = `${base}/${
|
|
14542
|
+
const path = `${base}/${enc13(ref.replace(/^#/, ""))}`;
|
|
14483
14543
|
if (verb === "show" && v.timing) {
|
|
14484
14544
|
const { timing: tm, workspace } = await api(`${path}/timing`);
|
|
14485
14545
|
return out({ workspace, timing: tm }, () => {
|
|
@@ -14619,7 +14679,7 @@ async function settingsCmd(sub, key, value) {
|
|
|
14619
14679
|
|
|
14620
14680
|
// src/commands/support.ts
|
|
14621
14681
|
import { readFile as readFile14 } from "node:fs/promises";
|
|
14622
|
-
var
|
|
14682
|
+
var enc14 = encodeURIComponent;
|
|
14623
14683
|
var cdmx = (iso) => new Date(Date.parse(iso) - 6 * 36e5).toISOString().slice(5, 16).replace("T", " ");
|
|
14624
14684
|
async function supportThreads(email, v) {
|
|
14625
14685
|
const q = new URLSearchParams({ user: email, since: v.since ?? "30d", ...v.surface ? { surface: v.surface } : {} });
|
|
@@ -14639,7 +14699,7 @@ ${table(rows, ["last", "agent", "conversation", "title", "kind", "listed", "turn
|
|
|
14639
14699
|
${dim(t("Read one: ghosty conversations show <agent> <conversation> --why \xB7 times in CDMX \xB7 listed = in their app list", "Leer uno: ghosty conversations show <agente> <conversaci\xF3n> --why \xB7 horas CDMX \xB7 listed = sale en su lista de la app"))}`);
|
|
14640
14700
|
}
|
|
14641
14701
|
async function supportThread(agent, sid, v) {
|
|
14642
|
-
const r = await api(`/api/v2/support/threads/${
|
|
14702
|
+
const r = await api(`/api/v2/support/threads/${enc14(agent)}/${enc14(sid)}?tail=${enc14(v.limit ?? "40")}${v.tools ? "&tools=1" : ""}`);
|
|
14643
14703
|
out(r, () => {
|
|
14644
14704
|
if (v.tools && r.tools) {
|
|
14645
14705
|
const x = r.tools;
|
|
@@ -14672,7 +14732,7 @@ async function cleanupConversations(action, agent, v) {
|
|
|
14672
14732
|
if (!agent) throw usage(t("Missing agent.", "Falta el agente."), ex);
|
|
14673
14733
|
if (v.kind !== "test" && v.kind !== "channel" && v.kind !== "personal") throw usage(t("--kind takes test, channel or personal.", "--kind acepta test, channel o personal."), ex);
|
|
14674
14734
|
if (action === "rm" && v.kind === "channel") throw usage(t("Customer conversations (channel) are archived, never deleted: their memory keeps serving them.", "Los hilos de clientes (channel) se archivan, nunca se borran: su memoria los sigue atendiendo."), ex);
|
|
14675
|
-
const path = `/api/v2/agents/${
|
|
14735
|
+
const path = `/api/v2/agents/${enc14(agent)}/conversations/cleanup`;
|
|
14676
14736
|
const body = { kind: v.kind, action, ...v.before ? { before: v.before } : {} };
|
|
14677
14737
|
const plan = await api(path, { method: "POST", body: { ...body, dryRun: true } });
|
|
14678
14738
|
const verb = action === "rm" ? t("delete (rows + agent memory)", "borrar (filas + memoria del agente)") : t("archive (hidden; memory stays)", "archivar (se ocultan; la memoria se queda)");
|
|
@@ -14687,7 +14747,7 @@ ${t("Go ahead?", "\xBFSigo?")}`, { yes: v.yes, retry: `ghosty conversations ${ac
|
|
|
14687
14747
|
out(r, () => `${lavender("\u2713")} ${t(`${r.threads} conversation(s) ${action === "rm" ? "deleted" : "archived"}.`, `${r.threads} conversaci\xF3n(es) ${action === "rm" ? "borradas" : "archivadas"}.`)}`);
|
|
14688
14748
|
}
|
|
14689
14749
|
async function turnStats(v) {
|
|
14690
|
-
const r = await api(`/api/v2/support/turn-stats?since=${
|
|
14750
|
+
const r = await api(`/api/v2/support/turn-stats?since=${enc14(v.since ?? "14d")}${v.all ? "&all=1" : ""}`);
|
|
14691
14751
|
out(
|
|
14692
14752
|
r,
|
|
14693
14753
|
() => [
|
|
@@ -14707,7 +14767,7 @@ async function fleetBoxes() {
|
|
|
14707
14767
|
${table(rows, ["template", "boxes", "on", "asleep", "ram", "vcpu", "ram on"])}`);
|
|
14708
14768
|
}
|
|
14709
14769
|
async function appAgentsOf(email, client) {
|
|
14710
|
-
const r = await api(`/api/v2/support/app-agents?user=${
|
|
14770
|
+
const r = await api(`/api/v2/support/app-agents?user=${enc14(email)}${client && client !== "all" ? `&client=${enc14(client)}` : ""}`);
|
|
14711
14771
|
const rows = r.agentes.map((a) => ({ id: a.id, name: a.nombre, engine: a.motor ?? "", model: a.modelo ?? "", tone: a.tono ?? t("(by position)", "(por posici\xF3n)"), space: a.espacio?.tipo === "workspace" ? a.espacio.nombre : a.espacio?.tipo ?? "", last: a.ultimaActividad ? cdmx(a.ultimaActividad) : "" }));
|
|
14712
14772
|
const phones = (r.devices ?? []).map((d) => `${d.platform} ${d.appVersion ?? ""}${d.appBuild ? ` (build ${d.appBuild})` : " (build ?)"} \xB7 ${t("seen", "visto")} ${cdmx(d.lastSeenAt)}`.replace(/\s+/g, " "));
|
|
14713
14773
|
out(r, () => `${bold(r.user)} ${dim(r.client ? t(`as the ${r.client} app sees it`, `como lo ve la app de ${r.client}`) : t("all apps", "todas las apps"))}
|
|
@@ -14718,7 +14778,7 @@ ${dim(t("No phones registered for push.", "Sin tel\xE9fonos registrados para avi
|
|
|
14718
14778
|
}
|
|
14719
14779
|
async function pushLog(email, v) {
|
|
14720
14780
|
if (!email) throw usage(t("Missing --user.", "Falta --user."), "ghosty push log --user ana@empresa.com [--since 2d]");
|
|
14721
|
-
const r = await api(`/api/v2/support/push-log?user=${
|
|
14781
|
+
const r = await api(`/api/v2/support/push-log?user=${enc14(email)}&since=${enc14(v.since ?? "2d")}${v.limit ? `&limit=${enc14(v.limit)}` : ""}`);
|
|
14722
14782
|
const rows = r.pushes.map((p) => ({ at: cdmx(p.at), kind: p.kind, to: p.platform, status: p.status === "sent" ? p.status : red(p.status), thread: p.threadKind ? `${p.threadId?.slice(0, 18)} (${p.threadKind})` : (p.threadId ?? "").slice(0, 24), title: (p.title ?? "").slice(0, 40), detail: p.detail ?? "" }));
|
|
14723
14783
|
out(r, () => rows.length ? `${bold(r.user)}
|
|
14724
14784
|
${table(rows, ["at", "kind", "to", "status", "thread", "title", "detail"])}` : dim(t(`No pushes for ${r.user} in that range (logged since 2026-10-01).`, `Sin avisos para ${r.user} en ese rango (se registran desde el 1-oct).`)));
|
|
@@ -14756,24 +14816,24 @@ ${dim(t(`Try it on your phone: ghosty novedades test ${r.id}`, `Pru\xE9bala en t
|
|
|
14756
14816
|
if (!id) throw usage(t("Missing id.", "Falta el id."), ex);
|
|
14757
14817
|
const b = await fields();
|
|
14758
14818
|
if (!Object.keys(b).length) throw usage(t("Nothing to change.", "Nada que cambiar."), ex);
|
|
14759
|
-
const r = await api(`${base}/${
|
|
14819
|
+
const r = await api(`${base}/${enc14(id)}`, { method: "PATCH", body: b });
|
|
14760
14820
|
return out(r, () => `${lavender("\u2713")} ${line2(r)}`);
|
|
14761
14821
|
}
|
|
14762
14822
|
case "test": {
|
|
14763
14823
|
if (!id) throw usage(t("Missing id.", "Falta el id."), ex);
|
|
14764
|
-
const r = await api(`${base}/${
|
|
14824
|
+
const r = await api(`${base}/${enc14(id)}`, { method: "POST", body: { push: "test" } });
|
|
14765
14825
|
return out(r, () => `${lavender("\u2713")} ${t(`Sent to your phone (${r.enviados} device(s)).`, `Enviada a tu tel\xE9fono (${r.enviados} dispositivo(s)).`)}`);
|
|
14766
14826
|
}
|
|
14767
14827
|
case "send":
|
|
14768
14828
|
case "schedule": {
|
|
14769
14829
|
if (!id) throw usage(t("Missing id.", "Falta el id."), ex);
|
|
14770
14830
|
if (v.at !== void 0) {
|
|
14771
|
-
const r2 = await api(`${base}/${
|
|
14831
|
+
const r2 = await api(`${base}/${enc14(id)}`, { method: "PATCH", body: { schedule: v.at || null } });
|
|
14772
14832
|
return out(r2, () => `${lavender("\u2713")} ${line2(r2)}`);
|
|
14773
14833
|
}
|
|
14774
14834
|
requireYesIfHeadless(v.yes, `ghosty novedades send ${id}`);
|
|
14775
14835
|
await confirm(t("Push this announcement to every recipient now?", "\xBFMandar ya el push de esta novedad a todos sus destinatarios?"), { yes: v.yes, retry: `ghosty novedades send ${id}` });
|
|
14776
|
-
const r = await api(`${base}/${
|
|
14836
|
+
const r = await api(`${base}/${enc14(id)}`, { method: "POST", body: { push: "all" } });
|
|
14777
14837
|
return out(r, () => `${lavender("\u2713")} ${t(`Pushed to ${r.enviados} device(s).`, `Enviada a ${r.enviados} dispositivo(s).`)}`);
|
|
14778
14838
|
}
|
|
14779
14839
|
case "rm":
|
|
@@ -14781,7 +14841,7 @@ ${dim(t(`Try it on your phone: ghosty novedades test ${r.id}`, `Pru\xE9bala en t
|
|
|
14781
14841
|
if (!id) throw usage(t("Missing id.", "Falta el id."), ex);
|
|
14782
14842
|
requireYesIfHeadless(v.yes, `ghosty novedades rm ${id}`);
|
|
14783
14843
|
await confirm(t(`Delete announcement ${id}?`, `\xBFBorrar la novedad ${id}?`), { yes: v.yes, retry: `ghosty novedades rm ${id}` });
|
|
14784
|
-
return out(await api(`${base}/${
|
|
14844
|
+
return out(await api(`${base}/${enc14(id)}`, { method: "DELETE" }), () => `${lavender("\u2713")} ${t("Deleted.", "Borrada.")}`);
|
|
14785
14845
|
}
|
|
14786
14846
|
default:
|
|
14787
14847
|
throw usage(t(`Unknown novedades subcommand: ${sub}.`, `Subcomando de novedades desconocido: ${sub}.`), ex);
|
|
@@ -14850,7 +14910,7 @@ ${dim(r.case.id)}`);
|
|
|
14850
14910
|
}
|
|
14851
14911
|
if (!id) throw usage(t("Missing the case id.", "Falta el id del caso."), "ghosty support ls");
|
|
14852
14912
|
if (sub === "show") {
|
|
14853
|
-
const r = v.all ? await api(`/api/v2/support/cases/${
|
|
14913
|
+
const r = v.all ? await api(`/api/v2/support/cases/${enc14(id)}`) : await api(`/api/v2/me/support/${enc14(id)}`);
|
|
14854
14914
|
const c = r.case;
|
|
14855
14915
|
return out(r, () => {
|
|
14856
14916
|
const who2 = (a) => a === "staff" ? "Ghosty" : a === "agent" ? t("agent", "agente") : a === "customer" ? t("customer", "cliente") : a;
|
|
@@ -14871,18 +14931,18 @@ ${m.body}${m.attachments.length ? dim(`
|
|
|
14871
14931
|
}
|
|
14872
14932
|
if (sub === "reply") {
|
|
14873
14933
|
if (!v.body && !v.resolve) throw usage(t("Missing --body.", "Falta --body."), 'ghosty support reply <id> --body "\u2026" [--resolve]');
|
|
14874
|
-
const r = v.all || v.resolve ? await api(`/api/v2/support/cases/${
|
|
14934
|
+
const r = v.all || v.resolve ? await api(`/api/v2/support/cases/${enc14(id)}`, { method: "POST", body: { intent: "reply", body: v.body ?? "", resolve: Boolean(v.resolve) } }) : await api(`/api/v2/me/support/${enc14(id)}`, { method: "POST", body: { body: v.body } });
|
|
14875
14935
|
return out(r, () => `${lavender("\u2713")} ${r.case.code} \xB7 ${STATUS(r.case.status)}`);
|
|
14876
14936
|
}
|
|
14877
14937
|
if (sub === "link") {
|
|
14878
14938
|
const ref = v.ref;
|
|
14879
14939
|
if (!ref) throw usage(t("Missing the issue or PR.", "Falta el issue o PR."), "ghosty support link <id> owner/repo#12 (or the issue/PR URL)");
|
|
14880
|
-
const r = await api(`/api/v2/support/cases/${
|
|
14940
|
+
const r = await api(`/api/v2/support/cases/${enc14(id)}`, { method: "POST", body: { intent: "link", ref } });
|
|
14881
14941
|
return out(r, () => `${lavender("\u2713")} ${r.case.code} \u2192 ${bold(r.ref)} ${dim(`(${r.github.title})`)}${r.alsoWaiting ? `
|
|
14882
14942
|
${dim(t(`${r.alsoWaiting} more cases wait for the same fix: all get "fixed" when it closes.`, `Otros ${r.alsoWaiting} casos esperan el mismo arreglo: a todos les llega \xABya qued\xF3\xBB al cerrarse.`))}` : ""}`);
|
|
14883
14943
|
}
|
|
14884
14944
|
if (sub === "resolve" || sub === "reopen") {
|
|
14885
|
-
const r = await api(`/api/v2/support/cases/${
|
|
14945
|
+
const r = await api(`/api/v2/support/cases/${enc14(id)}`, { method: "POST", body: { intent: sub } });
|
|
14886
14946
|
return out(r, () => `${lavender("\u2713")} ${r.case.code} \xB7 ${STATUS(r.case.status)}`);
|
|
14887
14947
|
}
|
|
14888
14948
|
throw usage(t(`Unknown support subcommand: ${sub}.`, `Subcomando de support desconocido: ${sub}.`), "ghosty support ls | open | show | reply | resolve | reopen | link");
|
|
@@ -15035,6 +15095,9 @@ ${bold("Schedule turns")} ${dim("(each run lands in a conversation and notifies
|
|
|
15035
15095
|
schedule rm <id> <schedule-id> Cancel a pending turn
|
|
15036
15096
|
schedule add|ls|rm <id> \u2026 --teams WS#room[/thread] The same in a Teams room or thread: it answers there as if mentioned
|
|
15037
15097
|
|
|
15098
|
+
${bold("Teams")}
|
|
15099
|
+
teams post WS#room[/thread] "msg" Write there as you; any @agent it mentions answers (no thread = new thread) [--wait [--timeout 600]: print their answers]
|
|
15100
|
+
|
|
15038
15101
|
${bold("Browser")} ${dim("(Ghosty for Chrome)")}
|
|
15039
15102
|
browser logout Revoke the browser tokens of your terminal agents and disconnect the extension
|
|
15040
15103
|
|
|
@@ -15210,6 +15273,9 @@ ${bold("Turnos programados")} ${dim("(cada corrida cae en una conversaci\xF3n y
|
|
|
15210
15273
|
schedule rm <id> <schedule-id> Cancela un turno pendiente
|
|
15211
15274
|
schedule add|ls|rm <id> \u2026 --teams ESP#room[/hilo] Lo mismo en un room o hilo de Teams: contesta ah\xED como si lo mencionaran
|
|
15212
15275
|
|
|
15276
|
+
${bold("Teams")}
|
|
15277
|
+
teams post ESP#room[/hilo] "texto" Escribe ah\xED a tu nombre; el @agente que menciones contesta (sin hilo = hilo nuevo) [--wait [--timeout 600]: imprime sus respuestas]
|
|
15278
|
+
|
|
15213
15279
|
${bold("Navegador")} ${dim("(Ghosty para Chrome)")}
|
|
15214
15280
|
browser logout Revoca los tokens del navegador de tus agentes de terminal y desconecta la extensi\xF3n
|
|
15215
15281
|
|
|
@@ -15239,7 +15305,7 @@ ${bold("Opciones globales")}
|
|
|
15239
15305
|
${bold("C\xF3digos de salida")} 0 bien \xB7 1 error de la API \xB7 2 uso incorrecto \xB7 3 sin sesi\xF3n
|
|
15240
15306
|
${dim("Nota: `ghosty` puede chocar con otro binario en tu PATH (p. ej. la TUI de Ghosty). Rev\xEDsalo con `which -a ghosty`; corre `npx @ghostystudio/cli` para ir a la segura.")}
|
|
15241
15307
|
${dim("Documentaci\xF3n: https://www.ghosty.studio/docs/cli")}`;
|
|
15242
|
-
var COMMANDS = ["login", "logout", "whoami", "usage", "use", "apply", "plan", "engines", "bags", "spaces", "workspaces", "staff", "settings", "audit", "factory", "demos", "sites", "push", "novedades", "completion", "cards", "agents", "files", "skills", "mcp", "dbs", "turns", "try", "chat", "conversations", "schedule", "partner", "me", "channels", "board", "boards", "credentials", "connectors", "browser", "support", "docs", "help"];
|
|
15308
|
+
var COMMANDS = ["login", "logout", "whoami", "usage", "use", "apply", "plan", "engines", "bags", "spaces", "workspaces", "staff", "settings", "audit", "factory", "demos", "sites", "push", "novedades", "completion", "cards", "agents", "files", "skills", "mcp", "dbs", "turns", "try", "chat", "conversations", "schedule", "teams", "partner", "me", "channels", "board", "boards", "credentials", "connectors", "browser", "support", "docs", "help"];
|
|
15243
15309
|
var AGENTS_SUBS = ["ls", "create", "get", "show", "set", "export", "doctor", "docs", "share", "unshare", "shares", "teams", "rm", "restart", "demo", "embed", "box"];
|
|
15244
15310
|
function unknown(what, input, known, helpCmd) {
|
|
15245
15311
|
const s2 = suggest(input, known);
|
|
@@ -15468,6 +15534,8 @@ async function main() {
|
|
|
15468
15534
|
canal: { type: "string" },
|
|
15469
15535
|
models: { type: "boolean" },
|
|
15470
15536
|
teams: { type: "string" },
|
|
15537
|
+
wait: { type: "boolean" },
|
|
15538
|
+
timeout: { type: "string" },
|
|
15471
15539
|
owner: { type: "string" },
|
|
15472
15540
|
cursor: { type: "string" },
|
|
15473
15541
|
user: { type: "string" },
|
|
@@ -15513,7 +15581,7 @@ async function main() {
|
|
|
15513
15581
|
const tokens = splitTokens(pos, v);
|
|
15514
15582
|
globals.token = tokens.session;
|
|
15515
15583
|
globals.profile = v.profile;
|
|
15516
|
-
if (v.version) return out({ version: "0.
|
|
15584
|
+
if (v.version) return out({ version: "0.67.0" }, () => "0.67.0");
|
|
15517
15585
|
for (const n of normalizeArgs(pos, v)) if (!globals.json) info(dim(n));
|
|
15518
15586
|
const context = (await readConfig()).workspace;
|
|
15519
15587
|
if (!explicitToken()?.startsWith("gat_")) {
|
|
@@ -15637,6 +15705,8 @@ async function main() {
|
|
|
15637
15705
|
throw usage(t(`Unknown conversations subcommand: ${sub ?? "(none)"}.`, `Subcomando de conversations desconocido: ${sub ?? "(ninguno)"}.`), t("Try: ghosty conversations ls <agent-id> \xB7 ghosty conversations show <agent-id> <conversation-id>", "Prueba: ghosty conversations ls <agent-id> \xB7 ghosty conversations show <agent-id> <conversation-id>"));
|
|
15638
15706
|
case "schedule":
|
|
15639
15707
|
return scheduleCmd(sub, a1, a2, v);
|
|
15708
|
+
case "teams":
|
|
15709
|
+
return teamsCmd(sub, a1, a2, v);
|
|
15640
15710
|
case "browser":
|
|
15641
15711
|
return browserCmd(sub, v);
|
|
15642
15712
|
case "partner":
|
|
@@ -15685,7 +15755,7 @@ async function main() {
|
|
|
15685
15755
|
throw unknown(cmd, cmd, COMMANDS, "ghosty --help");
|
|
15686
15756
|
}
|
|
15687
15757
|
}
|
|
15688
|
-
var notice = updateNotice("0.
|
|
15758
|
+
var notice = updateNotice("0.67.0").catch(() => null);
|
|
15689
15759
|
main().then(
|
|
15690
15760
|
async () => {
|
|
15691
15761
|
const n = await notice;
|