claude-threads 0.16.3 → 0.16.4
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/CHANGELOG.md +6 -0
- package/dist/index.js +289 -292
- package/dist/mcp/permission-server.js +1382 -1381
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
// @bun
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __getProtoOf = Object.getPrototypeOf;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -17,7 +17,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
20
|
-
var __require =
|
|
20
|
+
var __require = import.meta.require;
|
|
21
21
|
|
|
22
22
|
// node_modules/commander/lib/error.js
|
|
23
23
|
var require_error = __commonJS((exports) => {
|
|
@@ -739,11 +739,11 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
739
739
|
|
|
740
740
|
// node_modules/commander/lib/command.js
|
|
741
741
|
var require_command = __commonJS((exports) => {
|
|
742
|
-
var EventEmitter = __require("
|
|
743
|
-
var childProcess = __require("
|
|
744
|
-
var path = __require("
|
|
745
|
-
var fs = __require("
|
|
746
|
-
var process2 = __require("
|
|
742
|
+
var EventEmitter = __require("events").EventEmitter;
|
|
743
|
+
var childProcess = __require("child_process");
|
|
744
|
+
var path = __require("path");
|
|
745
|
+
var fs = __require("fs");
|
|
746
|
+
var process2 = __require("process");
|
|
747
747
|
var { Argument, humanReadableArgName } = require_argument();
|
|
748
748
|
var { CommanderError } = require_error();
|
|
749
749
|
var { Help, stripColor } = require_help();
|
|
@@ -2416,18 +2416,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2416
2416
|
// node_modules/prompts/dist/util/figures.js
|
|
2417
2417
|
var require_figures = __commonJS((exports, module) => {
|
|
2418
2418
|
var main = {
|
|
2419
|
-
arrowUp: "
|
|
2420
|
-
arrowDown: "
|
|
2421
|
-
arrowLeft: "
|
|
2422
|
-
arrowRight: "
|
|
2423
|
-
radioOn: "
|
|
2424
|
-
radioOff: "
|
|
2425
|
-
tick: "
|
|
2426
|
-
cross: "
|
|
2427
|
-
ellipsis: "
|
|
2428
|
-
pointerSmall: "
|
|
2429
|
-
line: "
|
|
2430
|
-
pointer: "
|
|
2419
|
+
arrowUp: "\u2191",
|
|
2420
|
+
arrowDown: "\u2193",
|
|
2421
|
+
arrowLeft: "\u2190",
|
|
2422
|
+
arrowRight: "\u2192",
|
|
2423
|
+
radioOn: "\u25C9",
|
|
2424
|
+
radioOff: "\u25EF",
|
|
2425
|
+
tick: "\u2714",
|
|
2426
|
+
cross: "\u2716",
|
|
2427
|
+
ellipsis: "\u2026",
|
|
2428
|
+
pointerSmall: "\u203A",
|
|
2429
|
+
line: "\u2500",
|
|
2430
|
+
pointer: "\u276F"
|
|
2431
2431
|
};
|
|
2432
2432
|
var win = {
|
|
2433
2433
|
arrowUp: main.arrowUp,
|
|
@@ -2436,11 +2436,11 @@ var require_figures = __commonJS((exports, module) => {
|
|
|
2436
2436
|
arrowRight: main.arrowRight,
|
|
2437
2437
|
radioOn: "(*)",
|
|
2438
2438
|
radioOff: "( )",
|
|
2439
|
-
tick: "
|
|
2440
|
-
cross: "
|
|
2439
|
+
tick: "\u221A",
|
|
2440
|
+
cross: "\xD7",
|
|
2441
2441
|
ellipsis: "...",
|
|
2442
|
-
pointerSmall: "
|
|
2443
|
-
line: "
|
|
2442
|
+
pointerSmall: "\xBB",
|
|
2443
|
+
line: "\u2500",
|
|
2444
2444
|
pointer: ">"
|
|
2445
2445
|
};
|
|
2446
2446
|
var figures = process.platform === "win32" ? win : main;
|
|
@@ -4940,18 +4940,18 @@ var require_clear2 = __commonJS((exports, module) => {
|
|
|
4940
4940
|
// node_modules/prompts/lib/util/figures.js
|
|
4941
4941
|
var require_figures2 = __commonJS((exports, module) => {
|
|
4942
4942
|
var main = {
|
|
4943
|
-
arrowUp: "
|
|
4944
|
-
arrowDown: "
|
|
4945
|
-
arrowLeft: "
|
|
4946
|
-
arrowRight: "
|
|
4947
|
-
radioOn: "
|
|
4948
|
-
radioOff: "
|
|
4949
|
-
tick: "
|
|
4950
|
-
cross: "
|
|
4951
|
-
ellipsis: "
|
|
4952
|
-
pointerSmall: "
|
|
4953
|
-
line: "
|
|
4954
|
-
pointer: "
|
|
4943
|
+
arrowUp: "\u2191",
|
|
4944
|
+
arrowDown: "\u2193",
|
|
4945
|
+
arrowLeft: "\u2190",
|
|
4946
|
+
arrowRight: "\u2192",
|
|
4947
|
+
radioOn: "\u25C9",
|
|
4948
|
+
radioOff: "\u25EF",
|
|
4949
|
+
tick: "\u2714",
|
|
4950
|
+
cross: "\u2716",
|
|
4951
|
+
ellipsis: "\u2026",
|
|
4952
|
+
pointerSmall: "\u203A",
|
|
4953
|
+
line: "\u2500",
|
|
4954
|
+
pointer: "\u276F"
|
|
4955
4955
|
};
|
|
4956
4956
|
var win = {
|
|
4957
4957
|
arrowUp: main.arrowUp,
|
|
@@ -4960,11 +4960,11 @@ var require_figures2 = __commonJS((exports, module) => {
|
|
|
4960
4960
|
arrowRight: main.arrowRight,
|
|
4961
4961
|
radioOn: "(*)",
|
|
4962
4962
|
radioOff: "( )",
|
|
4963
|
-
tick: "
|
|
4964
|
-
cross: "
|
|
4963
|
+
tick: "\u221A",
|
|
4964
|
+
cross: "\xD7",
|
|
4965
4965
|
ellipsis: "...",
|
|
4966
|
-
pointerSmall: "
|
|
4967
|
-
line: "
|
|
4966
|
+
pointerSmall: "\xBB",
|
|
4967
|
+
line: "\u2500",
|
|
4968
4968
|
pointer: ">"
|
|
4969
4969
|
};
|
|
4970
4970
|
var figures = process.platform === "win32" ? win : main;
|
|
@@ -12602,75 +12602,68 @@ var require_ini3 = __commonJS((exports, module) => {
|
|
|
12602
12602
|
};
|
|
12603
12603
|
});
|
|
12604
12604
|
|
|
12605
|
-
// node_modules/update-notifier/node_modules/boxen/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
12606
|
-
var require_emoji_regex = __commonJS((exports, module) => {
|
|
12607
|
-
module.exports = () => {
|
|
12608
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
12609
|
-
};
|
|
12610
|
-
});
|
|
12611
|
-
|
|
12612
12605
|
// node_modules/cli-boxes/boxes.json
|
|
12613
12606
|
var require_boxes = __commonJS((exports, module) => {
|
|
12614
12607
|
module.exports = {
|
|
12615
12608
|
single: {
|
|
12616
|
-
topLeft: "
|
|
12617
|
-
top: "
|
|
12618
|
-
topRight: "
|
|
12619
|
-
right: "
|
|
12620
|
-
bottomRight: "
|
|
12621
|
-
bottom: "
|
|
12622
|
-
bottomLeft: "
|
|
12623
|
-
left: "
|
|
12609
|
+
topLeft: "\u250C",
|
|
12610
|
+
top: "\u2500",
|
|
12611
|
+
topRight: "\u2510",
|
|
12612
|
+
right: "\u2502",
|
|
12613
|
+
bottomRight: "\u2518",
|
|
12614
|
+
bottom: "\u2500",
|
|
12615
|
+
bottomLeft: "\u2514",
|
|
12616
|
+
left: "\u2502"
|
|
12624
12617
|
},
|
|
12625
12618
|
double: {
|
|
12626
|
-
topLeft: "
|
|
12627
|
-
top: "
|
|
12628
|
-
topRight: "
|
|
12629
|
-
right: "
|
|
12630
|
-
bottomRight: "
|
|
12631
|
-
bottom: "
|
|
12632
|
-
bottomLeft: "
|
|
12633
|
-
left: "
|
|
12619
|
+
topLeft: "\u2554",
|
|
12620
|
+
top: "\u2550",
|
|
12621
|
+
topRight: "\u2557",
|
|
12622
|
+
right: "\u2551",
|
|
12623
|
+
bottomRight: "\u255D",
|
|
12624
|
+
bottom: "\u2550",
|
|
12625
|
+
bottomLeft: "\u255A",
|
|
12626
|
+
left: "\u2551"
|
|
12634
12627
|
},
|
|
12635
12628
|
round: {
|
|
12636
|
-
topLeft: "
|
|
12637
|
-
top: "
|
|
12638
|
-
topRight: "
|
|
12639
|
-
right: "
|
|
12640
|
-
bottomRight: "
|
|
12641
|
-
bottom: "
|
|
12642
|
-
bottomLeft: "
|
|
12643
|
-
left: "
|
|
12629
|
+
topLeft: "\u256D",
|
|
12630
|
+
top: "\u2500",
|
|
12631
|
+
topRight: "\u256E",
|
|
12632
|
+
right: "\u2502",
|
|
12633
|
+
bottomRight: "\u256F",
|
|
12634
|
+
bottom: "\u2500",
|
|
12635
|
+
bottomLeft: "\u2570",
|
|
12636
|
+
left: "\u2502"
|
|
12644
12637
|
},
|
|
12645
12638
|
bold: {
|
|
12646
|
-
topLeft: "
|
|
12647
|
-
top: "
|
|
12648
|
-
topRight: "
|
|
12649
|
-
right: "
|
|
12650
|
-
bottomRight: "
|
|
12651
|
-
bottom: "
|
|
12652
|
-
bottomLeft: "
|
|
12653
|
-
left: "
|
|
12639
|
+
topLeft: "\u250F",
|
|
12640
|
+
top: "\u2501",
|
|
12641
|
+
topRight: "\u2513",
|
|
12642
|
+
right: "\u2503",
|
|
12643
|
+
bottomRight: "\u251B",
|
|
12644
|
+
bottom: "\u2501",
|
|
12645
|
+
bottomLeft: "\u2517",
|
|
12646
|
+
left: "\u2503"
|
|
12654
12647
|
},
|
|
12655
12648
|
singleDouble: {
|
|
12656
|
-
topLeft: "
|
|
12657
|
-
top: "
|
|
12658
|
-
topRight: "
|
|
12659
|
-
right: "
|
|
12660
|
-
bottomRight: "
|
|
12661
|
-
bottom: "
|
|
12662
|
-
bottomLeft: "
|
|
12663
|
-
left: "
|
|
12649
|
+
topLeft: "\u2553",
|
|
12650
|
+
top: "\u2500",
|
|
12651
|
+
topRight: "\u2556",
|
|
12652
|
+
right: "\u2551",
|
|
12653
|
+
bottomRight: "\u255C",
|
|
12654
|
+
bottom: "\u2500",
|
|
12655
|
+
bottomLeft: "\u2559",
|
|
12656
|
+
left: "\u2551"
|
|
12664
12657
|
},
|
|
12665
12658
|
doubleSingle: {
|
|
12666
|
-
topLeft: "
|
|
12667
|
-
top: "
|
|
12668
|
-
topRight: "
|
|
12669
|
-
right: "
|
|
12670
|
-
bottomRight: "
|
|
12671
|
-
bottom: "
|
|
12672
|
-
bottomLeft: "
|
|
12673
|
-
left: "
|
|
12659
|
+
topLeft: "\u2552",
|
|
12660
|
+
top: "\u2550",
|
|
12661
|
+
topRight: "\u2555",
|
|
12662
|
+
right: "\u2502",
|
|
12663
|
+
bottomRight: "\u255B",
|
|
12664
|
+
bottom: "\u2550",
|
|
12665
|
+
bottomLeft: "\u2558",
|
|
12666
|
+
left: "\u2502"
|
|
12674
12667
|
},
|
|
12675
12668
|
classic: {
|
|
12676
12669
|
topLeft: "+",
|
|
@@ -12683,14 +12676,14 @@ var require_boxes = __commonJS((exports, module) => {
|
|
|
12683
12676
|
left: "|"
|
|
12684
12677
|
},
|
|
12685
12678
|
arrow: {
|
|
12686
|
-
topLeft: "
|
|
12687
|
-
top: "
|
|
12688
|
-
topRight: "
|
|
12689
|
-
right: "
|
|
12690
|
-
bottomRight: "
|
|
12691
|
-
bottom: "
|
|
12692
|
-
bottomLeft: "
|
|
12693
|
-
left: "
|
|
12679
|
+
topLeft: "\u2198",
|
|
12680
|
+
top: "\u2193",
|
|
12681
|
+
topRight: "\u2199",
|
|
12682
|
+
right: "\u2190",
|
|
12683
|
+
bottomRight: "\u2196",
|
|
12684
|
+
bottom: "\u2191",
|
|
12685
|
+
bottomLeft: "\u2197",
|
|
12686
|
+
left: "\u2192"
|
|
12694
12687
|
}
|
|
12695
12688
|
};
|
|
12696
12689
|
});
|
|
@@ -12735,7 +12728,7 @@ var require_is_fullwidth_code_point = __commonJS((exports, module) => {
|
|
|
12735
12728
|
});
|
|
12736
12729
|
|
|
12737
12730
|
// node_modules/ansi-align/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
12738
|
-
var
|
|
12731
|
+
var require_emoji_regex = __commonJS((exports, module) => {
|
|
12739
12732
|
module.exports = function() {
|
|
12740
12733
|
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
12741
12734
|
};
|
|
@@ -12745,7 +12738,7 @@ var require_emoji_regex2 = __commonJS((exports, module) => {
|
|
|
12745
12738
|
var require_string_width = __commonJS((exports, module) => {
|
|
12746
12739
|
var stripAnsi2 = require_strip_ansi();
|
|
12747
12740
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
12748
|
-
var
|
|
12741
|
+
var emojiRegex = require_emoji_regex();
|
|
12749
12742
|
var stringWidth2 = (string) => {
|
|
12750
12743
|
if (typeof string !== "string" || string.length === 0) {
|
|
12751
12744
|
return 0;
|
|
@@ -12754,7 +12747,7 @@ var require_string_width = __commonJS((exports, module) => {
|
|
|
12754
12747
|
if (string.length === 0) {
|
|
12755
12748
|
return 0;
|
|
12756
12749
|
}
|
|
12757
|
-
string = string.replace(
|
|
12750
|
+
string = string.replace(emojiRegex(), " ");
|
|
12758
12751
|
let width = 0;
|
|
12759
12752
|
for (let i = 0;i < string.length; i++) {
|
|
12760
12753
|
const code = string.codePointAt(i);
|
|
@@ -12880,7 +12873,7 @@ var onCancel = () => {
|
|
|
12880
12873
|
async function runOnboarding(reconfigure = false) {
|
|
12881
12874
|
console.log("");
|
|
12882
12875
|
console.log(bold(" claude-threads setup"));
|
|
12883
|
-
console.log(dim("
|
|
12876
|
+
console.log(dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
12884
12877
|
console.log("");
|
|
12885
12878
|
let existingConfig = null;
|
|
12886
12879
|
if (reconfigure && existsSync2(CONFIG_PATH)) {
|
|
@@ -12980,7 +12973,7 @@ async function runOnboarding(reconfigure = false) {
|
|
|
12980
12973
|
const platform = await setupSlackPlatform(platformId, displayName, existingPlatform);
|
|
12981
12974
|
config.platforms.push(platform);
|
|
12982
12975
|
}
|
|
12983
|
-
console.log(green(`
|
|
12976
|
+
console.log(green(` \u2713 Added ${displayName}`));
|
|
12984
12977
|
console.log("");
|
|
12985
12978
|
if (platformNumber === 1) {
|
|
12986
12979
|
const { addAnother } = await import_prompts.default({
|
|
@@ -12995,17 +12988,17 @@ async function runOnboarding(reconfigure = false) {
|
|
|
12995
12988
|
}
|
|
12996
12989
|
if (config.platforms.length === 0) {
|
|
12997
12990
|
console.log("");
|
|
12998
|
-
console.log(dim("
|
|
12991
|
+
console.log(dim(" \u26A0\uFE0F No platforms configured. Setup cancelled."));
|
|
12999
12992
|
process.exit(1);
|
|
13000
12993
|
}
|
|
13001
12994
|
saveConfig(config);
|
|
13002
12995
|
console.log("");
|
|
13003
|
-
console.log(green("
|
|
12996
|
+
console.log(green(" \u2713 Configuration saved!"));
|
|
13004
12997
|
console.log(dim(` ${CONFIG_PATH}`));
|
|
13005
12998
|
console.log("");
|
|
13006
12999
|
console.log(dim(` Configured ${config.platforms.length} platform(s):`));
|
|
13007
13000
|
for (const platform of config.platforms) {
|
|
13008
|
-
console.log(dim(`
|
|
13001
|
+
console.log(dim(` \u2022 ${platform.displayName} (${platform.type})`));
|
|
13009
13002
|
}
|
|
13010
13003
|
console.log("");
|
|
13011
13004
|
console.log(dim(" Starting claude-threads..."));
|
|
@@ -13069,7 +13062,7 @@ async function setupMattermostPlatform(id, displayName, existing) {
|
|
|
13069
13062
|
const finalToken = response.token || existingMattermost?.token;
|
|
13070
13063
|
if (!finalToken) {
|
|
13071
13064
|
console.log("");
|
|
13072
|
-
console.log(dim("
|
|
13065
|
+
console.log(dim(" \u26A0\uFE0F Token is required. Setup cancelled."));
|
|
13073
13066
|
process.exit(1);
|
|
13074
13067
|
}
|
|
13075
13068
|
return {
|
|
@@ -13149,7 +13142,7 @@ async function setupSlackPlatform(id, displayName, existing) {
|
|
|
13149
13142
|
const finalAppToken = response.appToken || existingSlack?.appToken;
|
|
13150
13143
|
if (!finalBotToken || !finalAppToken) {
|
|
13151
13144
|
console.log("");
|
|
13152
|
-
console.log(dim("
|
|
13145
|
+
console.log(dim(" \u26A0\uFE0F Both tokens are required. Setup cancelled."));
|
|
13153
13146
|
process.exit(1);
|
|
13154
13147
|
}
|
|
13155
13148
|
return {
|
|
@@ -13372,7 +13365,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13372
13365
|
try {
|
|
13373
13366
|
await this.addReaction(post.id, emoji);
|
|
13374
13367
|
} catch (err) {
|
|
13375
|
-
console.error(`
|
|
13368
|
+
console.error(` \u26A0\uFE0F Failed to add reaction ${emoji}:`, err);
|
|
13376
13369
|
}
|
|
13377
13370
|
}
|
|
13378
13371
|
return post;
|
|
@@ -13484,7 +13477,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13484
13477
|
}
|
|
13485
13478
|
scheduleReconnect() {
|
|
13486
13479
|
if (this.reconnectAttempts >= this.maxReconnectAttempts) {
|
|
13487
|
-
console.error("
|
|
13480
|
+
console.error(" \u26A0\uFE0F Max reconnection attempts reached");
|
|
13488
13481
|
return;
|
|
13489
13482
|
}
|
|
13490
13483
|
this.reconnectAttempts++;
|
|
@@ -13492,7 +13485,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13492
13485
|
console.log(` \uD83D\uDD04 Reconnecting... (attempt ${this.reconnectAttempts})`);
|
|
13493
13486
|
setTimeout(() => {
|
|
13494
13487
|
this.connect().catch((err) => {
|
|
13495
|
-
console.error(`
|
|
13488
|
+
console.error(` \u274C Reconnection failed: ${err}`);
|
|
13496
13489
|
});
|
|
13497
13490
|
}, delay);
|
|
13498
13491
|
}
|
|
@@ -13707,10 +13700,10 @@ function isEscapeEmoji(emoji) {
|
|
|
13707
13700
|
return ESCAPE_EMOJIS.includes(emoji);
|
|
13708
13701
|
}
|
|
13709
13702
|
var UNICODE_NUMBER_EMOJIS = {
|
|
13710
|
-
"1
|
|
13711
|
-
"2
|
|
13712
|
-
"3
|
|
13713
|
-
"4
|
|
13703
|
+
"1\uFE0F\u20E3": 0,
|
|
13704
|
+
"2\uFE0F\u20E3": 1,
|
|
13705
|
+
"3\uFE0F\u20E3": 2,
|
|
13706
|
+
"4\uFE0F\u20E3": 3
|
|
13714
13707
|
};
|
|
13715
13708
|
function getNumberEmojiIndex(emoji) {
|
|
13716
13709
|
const textIndex = NUMBER_EMOJIS.indexOf(emoji);
|
|
@@ -13737,7 +13730,7 @@ async function buildMessageContent(text, platform, files, debug = false) {
|
|
|
13737
13730
|
for (const file of imageFiles) {
|
|
13738
13731
|
try {
|
|
13739
13732
|
if (!platform.downloadFile) {
|
|
13740
|
-
console.warn(`
|
|
13733
|
+
console.warn(` \u26A0\uFE0F Platform does not support file downloads, skipping ${file.name}`);
|
|
13741
13734
|
continue;
|
|
13742
13735
|
}
|
|
13743
13736
|
const buffer = await platform.downloadFile(file.id);
|
|
@@ -13754,7 +13747,7 @@ async function buildMessageContent(text, platform, files, debug = false) {
|
|
|
13754
13747
|
console.log(` \uD83D\uDCF7 Attached image: ${file.name} (${file.mimeType}, ${Math.round(buffer.length / 1024)}KB)`);
|
|
13755
13748
|
}
|
|
13756
13749
|
} catch (err) {
|
|
13757
|
-
console.error(`
|
|
13750
|
+
console.error(` \u26A0\uFE0F Failed to download image ${file.name}:`, err);
|
|
13758
13751
|
}
|
|
13759
13752
|
}
|
|
13760
13753
|
if (text) {
|
|
@@ -14500,11 +14493,11 @@ function formatToolUse(toolName, input, formatter, options = {}) {
|
|
|
14500
14493
|
}
|
|
14501
14494
|
const totalLines = changes.reduce((sum, c) => sum + c.value.split(`
|
|
14502
14495
|
`).length - 1, 0);
|
|
14503
|
-
let diff =
|
|
14496
|
+
let diff = `\u270F\uFE0F ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}
|
|
14504
14497
|
${formatter.formatCodeBlock(diffLines2.join(`
|
|
14505
14498
|
`), "diff")}`;
|
|
14506
14499
|
if (totalLines > maxLines) {
|
|
14507
|
-
diff =
|
|
14500
|
+
diff = `\u270F\uFE0F ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}
|
|
14508
14501
|
`;
|
|
14509
14502
|
diff += formatter.formatCodeBlock(diffLines2.join(`
|
|
14510
14503
|
`) + `
|
|
@@ -14512,7 +14505,7 @@ ${formatter.formatCodeBlock(diffLines2.join(`
|
|
|
14512
14505
|
}
|
|
14513
14506
|
return diff;
|
|
14514
14507
|
}
|
|
14515
|
-
return
|
|
14508
|
+
return `\u270F\uFE0F ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}`;
|
|
14516
14509
|
}
|
|
14517
14510
|
case "Write": {
|
|
14518
14511
|
const filePath = short(input.file_path);
|
|
@@ -14570,7 +14563,7 @@ ${formatter.formatCodeBlock(diffLines2.join(`
|
|
|
14570
14563
|
}
|
|
14571
14564
|
return `\uD83D\uDD0C ${formatter.formatBold(mcpParts.tool)} ${formatter.formatItalic(`(${mcpParts.server})`)}`;
|
|
14572
14565
|
}
|
|
14573
|
-
return
|
|
14566
|
+
return `\u25CF ${formatter.formatBold(toolName)}`;
|
|
14574
14567
|
}
|
|
14575
14568
|
}
|
|
14576
14569
|
}
|
|
@@ -14721,9 +14714,9 @@ function formatEvent(session, e, ctx) {
|
|
|
14721
14714
|
}
|
|
14722
14715
|
}
|
|
14723
14716
|
if (result.is_error)
|
|
14724
|
-
return `
|
|
14717
|
+
return ` \u21B3 \u274C Error${elapsed}`;
|
|
14725
14718
|
if (elapsed)
|
|
14726
|
-
return `
|
|
14719
|
+
return ` \u21B3 \u2713${elapsed}`;
|
|
14727
14720
|
return null;
|
|
14728
14721
|
}
|
|
14729
14722
|
case "result": {
|
|
@@ -14735,7 +14728,7 @@ function formatEvent(session, e, ctx) {
|
|
|
14735
14728
|
}
|
|
14736
14729
|
case "system":
|
|
14737
14730
|
if (e.subtype === "error")
|
|
14738
|
-
return
|
|
14731
|
+
return `\u274C ${e.error}`;
|
|
14739
14732
|
return null;
|
|
14740
14733
|
case "user": {
|
|
14741
14734
|
const msg = e.message;
|
|
@@ -14754,7 +14747,7 @@ function formatEvent(session, e, ctx) {
|
|
|
14754
14747
|
async function handleExitPlanMode(session, toolUseId, ctx) {
|
|
14755
14748
|
if (session.planApproved) {
|
|
14756
14749
|
if (ctx.debug)
|
|
14757
|
-
console.log("
|
|
14750
|
+
console.log(" \u21AA Plan already approved, sending acknowledgment");
|
|
14758
14751
|
if (session.claude.isRunning()) {
|
|
14759
14752
|
session.claude.sendToolResult(toolUseId, "Plan already approved. Proceeding.");
|
|
14760
14753
|
}
|
|
@@ -14762,13 +14755,13 @@ async function handleExitPlanMode(session, toolUseId, ctx) {
|
|
|
14762
14755
|
}
|
|
14763
14756
|
if (session.pendingApproval && session.pendingApproval.type === "plan") {
|
|
14764
14757
|
if (ctx.debug)
|
|
14765
|
-
console.log("
|
|
14758
|
+
console.log(" \u21AA Plan approval already pending, waiting");
|
|
14766
14759
|
return;
|
|
14767
14760
|
}
|
|
14768
14761
|
await ctx.flush(session);
|
|
14769
14762
|
session.currentPostId = null;
|
|
14770
14763
|
session.pendingContent = "";
|
|
14771
|
-
const message =
|
|
14764
|
+
const message = `\u2705 **Plan ready for approval**
|
|
14772
14765
|
|
|
14773
14766
|
` + `\uD83D\uDC4D Approve and start building
|
|
14774
14767
|
` + `\uD83D\uDC4E Request changes
|
|
@@ -14786,7 +14779,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14786
14779
|
try {
|
|
14787
14780
|
await session.platform.updatePost(session.tasksPostId, "\uD83D\uDCCB ~~Tasks~~ *(completed)*");
|
|
14788
14781
|
} catch (err) {
|
|
14789
|
-
console.error("
|
|
14782
|
+
console.error(" \u26A0\uFE0F Failed to update tasks:", err);
|
|
14790
14783
|
}
|
|
14791
14784
|
}
|
|
14792
14785
|
return;
|
|
@@ -14800,7 +14793,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14800
14793
|
} else if (!hasInProgress) {
|
|
14801
14794
|
session.inProgressTaskStart = null;
|
|
14802
14795
|
}
|
|
14803
|
-
let message = `\uD83D\uDCCB **Tasks** (${completed}/${total}
|
|
14796
|
+
let message = `\uD83D\uDCCB **Tasks** (${completed}/${total} \xB7 ${pct}%)
|
|
14804
14797
|
|
|
14805
14798
|
`;
|
|
14806
14799
|
for (const todo of todos) {
|
|
@@ -14808,7 +14801,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14808
14801
|
let text;
|
|
14809
14802
|
switch (todo.status) {
|
|
14810
14803
|
case "completed":
|
|
14811
|
-
icon = "
|
|
14804
|
+
icon = "\u2705";
|
|
14812
14805
|
text = `~~${todo.content}~~`;
|
|
14813
14806
|
break;
|
|
14814
14807
|
case "in_progress": {
|
|
@@ -14824,7 +14817,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14824
14817
|
break;
|
|
14825
14818
|
}
|
|
14826
14819
|
default:
|
|
14827
|
-
icon = "
|
|
14820
|
+
icon = "\u25CB";
|
|
14828
14821
|
text = todo.content;
|
|
14829
14822
|
}
|
|
14830
14823
|
message += `${icon} ${text}
|
|
@@ -14838,7 +14831,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14838
14831
|
session.tasksPostId = post.id;
|
|
14839
14832
|
}
|
|
14840
14833
|
} catch (err) {
|
|
14841
|
-
console.error("
|
|
14834
|
+
console.error(" \u26A0\uFE0F Failed to update tasks:", err);
|
|
14842
14835
|
}
|
|
14843
14836
|
}
|
|
14844
14837
|
async function handleTaskStart(session, toolUseId, input) {
|
|
@@ -14846,26 +14839,26 @@ async function handleTaskStart(session, toolUseId, input) {
|
|
|
14846
14839
|
const subagentType = input.subagent_type || "general";
|
|
14847
14840
|
const message = `\uD83E\uDD16 **Subagent** *(${subagentType})*
|
|
14848
14841
|
` + `> ${description}
|
|
14849
|
-
` +
|
|
14842
|
+
` + `\u23F3 Running...`;
|
|
14850
14843
|
try {
|
|
14851
14844
|
const post = await session.platform.createPost(message, session.threadId);
|
|
14852
14845
|
session.activeSubagents.set(toolUseId, post.id);
|
|
14853
14846
|
} catch (err) {
|
|
14854
|
-
console.error("
|
|
14847
|
+
console.error(" \u26A0\uFE0F Failed to post subagent status:", err);
|
|
14855
14848
|
}
|
|
14856
14849
|
}
|
|
14857
14850
|
async function handleTaskComplete(session, toolUseId, postId) {
|
|
14858
14851
|
try {
|
|
14859
|
-
await session.platform.updatePost(postId, session.activeSubagents.has(toolUseId) ? `\uD83E\uDD16 **Subagent**
|
|
14852
|
+
await session.platform.updatePost(postId, session.activeSubagents.has(toolUseId) ? `\uD83E\uDD16 **Subagent** \u2705 *completed*` : `\uD83E\uDD16 **Subagent** \u2705`);
|
|
14860
14853
|
session.activeSubagents.delete(toolUseId);
|
|
14861
14854
|
} catch (err) {
|
|
14862
|
-
console.error("
|
|
14855
|
+
console.error(" \u26A0\uFE0F Failed to update subagent completion:", err);
|
|
14863
14856
|
}
|
|
14864
14857
|
}
|
|
14865
14858
|
async function handleAskUserQuestion(session, toolUseId, input, ctx) {
|
|
14866
14859
|
if (session.pendingQuestionSet) {
|
|
14867
14860
|
if (ctx.debug)
|
|
14868
|
-
console.log("
|
|
14861
|
+
console.log(" \u21AA Questions already pending, waiting");
|
|
14869
14862
|
return;
|
|
14870
14863
|
}
|
|
14871
14864
|
await ctx.flush(session);
|
|
@@ -14896,13 +14889,13 @@ async function postCurrentQuestion(session, ctx) {
|
|
|
14896
14889
|
return;
|
|
14897
14890
|
const q = questions[currentIndex];
|
|
14898
14891
|
const total = questions.length;
|
|
14899
|
-
let message =
|
|
14892
|
+
let message = `\u2753 **Question** *(${currentIndex + 1}/${total})*
|
|
14900
14893
|
`;
|
|
14901
14894
|
message += `**${q.header}:** ${q.question}
|
|
14902
14895
|
|
|
14903
14896
|
`;
|
|
14904
14897
|
for (let i = 0;i < q.options.length && i < 4; i++) {
|
|
14905
|
-
const emoji = ["1
|
|
14898
|
+
const emoji = ["1\uFE0F\u20E3", "2\uFE0F\u20E3", "3\uFE0F\u20E3", "4\uFE0F\u20E3"][i];
|
|
14906
14899
|
message += `${emoji} **${q.options[i].label}**`;
|
|
14907
14900
|
if (q.options[i].description) {
|
|
14908
14901
|
message += ` - ${q.options[i].description}`;
|
|
@@ -14932,9 +14925,9 @@ async function handleQuestionReaction(session, postId, emojiName, username, ctx)
|
|
|
14932
14925
|
if (ctx.debug)
|
|
14933
14926
|
console.log(` \uD83D\uDCAC @${username} answered "${question.header}": ${selectedOption.label}`);
|
|
14934
14927
|
try {
|
|
14935
|
-
await session.platform.updatePost(postId,
|
|
14928
|
+
await session.platform.updatePost(postId, `\u2705 **${question.header}**: ${selectedOption.label}`);
|
|
14936
14929
|
} catch (err) {
|
|
14937
|
-
console.error("
|
|
14930
|
+
console.error(" \u26A0\uFE0F Failed to update answered question:", err);
|
|
14938
14931
|
}
|
|
14939
14932
|
session.pendingQuestionSet.currentIndex++;
|
|
14940
14933
|
if (session.pendingQuestionSet.currentIndex < questions.length) {
|
|
@@ -14954,7 +14947,7 @@ async function handleQuestionReaction(session, postId, emojiName, username, ctx)
|
|
|
14954
14947
|
`;
|
|
14955
14948
|
}
|
|
14956
14949
|
if (ctx.debug)
|
|
14957
|
-
console.log("
|
|
14950
|
+
console.log(" \u2705 All questions answered");
|
|
14958
14951
|
const toolUseId = session.pendingQuestionSet.toolUseId;
|
|
14959
14952
|
session.pendingQuestionSet = null;
|
|
14960
14953
|
if (session.claude.isRunning()) {
|
|
@@ -14972,12 +14965,12 @@ async function handleApprovalReaction(session, emojiName, username, ctx) {
|
|
|
14972
14965
|
return;
|
|
14973
14966
|
const { postId, toolUseId } = session.pendingApproval;
|
|
14974
14967
|
const shortId = session.threadId.substring(0, 8);
|
|
14975
|
-
console.log(` ${isApprove ? "
|
|
14968
|
+
console.log(` ${isApprove ? "\u2705" : "\u274C"} Plan ${isApprove ? "approved" : "rejected"} (${shortId}\u2026) by @${username}`);
|
|
14976
14969
|
try {
|
|
14977
|
-
const statusMessage = isApprove ?
|
|
14970
|
+
const statusMessage = isApprove ? `\u2705 **Plan approved** by @${username} - starting implementation...` : `\u274C **Changes requested** by @${username}`;
|
|
14978
14971
|
await session.platform.updatePost(postId, statusMessage);
|
|
14979
14972
|
} catch (err) {
|
|
14980
|
-
console.error("
|
|
14973
|
+
console.error(" \u26A0\uFE0F Failed to update approval post:", err);
|
|
14981
14974
|
}
|
|
14982
14975
|
session.pendingApproval = null;
|
|
14983
14976
|
if (isApprove) {
|
|
@@ -15002,22 +14995,22 @@ async function handleMessageApprovalReaction(session, emoji, approver, ctx) {
|
|
|
15002
14995
|
if (!isAllow && !isInvite && !isDeny)
|
|
15003
14996
|
return;
|
|
15004
14997
|
if (isAllow) {
|
|
15005
|
-
await session.platform.updatePost(pending.postId,
|
|
14998
|
+
await session.platform.updatePost(pending.postId, `\u2705 Message from @${pending.fromUser} approved by @${approver}`);
|
|
15006
14999
|
session.claude.sendMessage(pending.originalMessage);
|
|
15007
15000
|
session.lastActivityAt = new Date;
|
|
15008
15001
|
ctx.startTyping(session);
|
|
15009
|
-
console.log(`
|
|
15002
|
+
console.log(` \u2705 Message from @${pending.fromUser} approved by @${approver}`);
|
|
15010
15003
|
} else if (isInvite) {
|
|
15011
15004
|
session.sessionAllowedUsers.add(pending.fromUser);
|
|
15012
|
-
await session.platform.updatePost(pending.postId,
|
|
15005
|
+
await session.platform.updatePost(pending.postId, `\u2705 @${pending.fromUser} invited to session by @${approver}`);
|
|
15013
15006
|
await ctx.updateSessionHeader(session);
|
|
15014
15007
|
session.claude.sendMessage(pending.originalMessage);
|
|
15015
15008
|
session.lastActivityAt = new Date;
|
|
15016
15009
|
ctx.startTyping(session);
|
|
15017
15010
|
console.log(` \uD83D\uDC4B @${pending.fromUser} invited to session by @${approver}`);
|
|
15018
15011
|
} else if (isDeny) {
|
|
15019
|
-
await session.platform.updatePost(pending.postId,
|
|
15020
|
-
console.log(`
|
|
15012
|
+
await session.platform.updatePost(pending.postId, `\u274C Message from @${pending.fromUser} denied by @${approver}`);
|
|
15013
|
+
console.log(` \u274C Message from @${pending.fromUser} denied by @${approver}`);
|
|
15021
15014
|
}
|
|
15022
15015
|
session.pendingMessageApproval = null;
|
|
15023
15016
|
}
|
|
@@ -15105,7 +15098,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
15105
15098
|
}
|
|
15106
15099
|
});
|
|
15107
15100
|
this.process.on("error", (err) => {
|
|
15108
|
-
console.error("
|
|
15101
|
+
console.error(" \u274C Claude error:", err);
|
|
15109
15102
|
this.emit("error", err);
|
|
15110
15103
|
});
|
|
15111
15104
|
this.process.on("exit", (code) => {
|
|
@@ -15199,16 +15192,16 @@ import { resolve as resolve5 } from "path";
|
|
|
15199
15192
|
import { existsSync as existsSync6, statSync } from "fs";
|
|
15200
15193
|
|
|
15201
15194
|
// node_modules/update-notifier/update-notifier.js
|
|
15202
|
-
import process10 from "
|
|
15203
|
-
import { spawn as spawn2 } from "
|
|
15204
|
-
import { fileURLToPath as fileURLToPath3 } from "
|
|
15205
|
-
import path8 from "
|
|
15206
|
-
import { format } from "
|
|
15195
|
+
import process10 from "process";
|
|
15196
|
+
import { spawn as spawn2 } from "child_process";
|
|
15197
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
15198
|
+
import path8 from "path";
|
|
15199
|
+
import { format } from "util";
|
|
15207
15200
|
|
|
15208
15201
|
// node_modules/configstore/index.js
|
|
15209
15202
|
var import_graceful_fs = __toESM(require_graceful_fs(), 1);
|
|
15210
|
-
import path4 from "
|
|
15211
|
-
import os2 from "
|
|
15203
|
+
import path4 from "path";
|
|
15204
|
+
import os2 from "os";
|
|
15212
15205
|
|
|
15213
15206
|
// node_modules/xdg-basedir/index.js
|
|
15214
15207
|
import os from "os";
|
|
@@ -15230,11 +15223,11 @@ if (xdgConfig) {
|
|
|
15230
15223
|
}
|
|
15231
15224
|
|
|
15232
15225
|
// node_modules/atomically/dist/index.js
|
|
15233
|
-
import path3 from "
|
|
15226
|
+
import path3 from "path";
|
|
15234
15227
|
|
|
15235
15228
|
// node_modules/stubborn-fs/dist/index.js
|
|
15236
|
-
import fs from "
|
|
15237
|
-
import { promisify } from "
|
|
15229
|
+
import fs from "fs";
|
|
15230
|
+
import { promisify } from "util";
|
|
15238
15231
|
|
|
15239
15232
|
// node_modules/stubborn-utils/dist/attemptify_async.js
|
|
15240
15233
|
var attemptifyAsync = (fn, options) => {
|
|
@@ -15311,7 +15304,7 @@ var retryifySync = (fn, options) => {
|
|
|
15311
15304
|
var retryify_sync_default = retryifySync;
|
|
15312
15305
|
|
|
15313
15306
|
// node_modules/stubborn-fs/dist/constants.js
|
|
15314
|
-
import process2 from "
|
|
15307
|
+
import process2 from "process";
|
|
15315
15308
|
|
|
15316
15309
|
// node_modules/stubborn-fs/dist/handlers.js
|
|
15317
15310
|
var Handlers = {
|
|
@@ -15403,7 +15396,7 @@ var FS = {
|
|
|
15403
15396
|
var dist_default = FS;
|
|
15404
15397
|
|
|
15405
15398
|
// node_modules/atomically/dist/constants.js
|
|
15406
|
-
import process3 from "
|
|
15399
|
+
import process3 from "process";
|
|
15407
15400
|
var DEFAULT_ENCODING = "utf8";
|
|
15408
15401
|
var DEFAULT_FILE_MODE = 438;
|
|
15409
15402
|
var DEFAULT_FOLDER_MODE = 511;
|
|
@@ -15427,13 +15420,13 @@ var isUndefined = (value) => {
|
|
|
15427
15420
|
};
|
|
15428
15421
|
|
|
15429
15422
|
// node_modules/atomically/dist/utils/temp.js
|
|
15430
|
-
import path2 from "
|
|
15423
|
+
import path2 from "path";
|
|
15431
15424
|
|
|
15432
15425
|
// node_modules/when-exit/dist/node/interceptor.js
|
|
15433
|
-
import process5 from "
|
|
15426
|
+
import process5 from "process";
|
|
15434
15427
|
|
|
15435
15428
|
// node_modules/when-exit/dist/node/constants.js
|
|
15436
|
-
import process4 from "
|
|
15429
|
+
import process4 from "process";
|
|
15437
15430
|
var IS_LINUX = process4.platform === "linux";
|
|
15438
15431
|
var IS_WINDOWS = process4.platform === "win32";
|
|
15439
15432
|
|
|
@@ -16099,9 +16092,9 @@ var ansiStyles = assembleStyles();
|
|
|
16099
16092
|
var ansi_styles_default = ansiStyles;
|
|
16100
16093
|
|
|
16101
16094
|
// node_modules/update-notifier/node_modules/chalk/source/vendor/supports-color/index.js
|
|
16102
|
-
import process6 from "
|
|
16103
|
-
import os3 from "
|
|
16104
|
-
import tty from "
|
|
16095
|
+
import process6 from "process";
|
|
16096
|
+
import os3 from "os";
|
|
16097
|
+
import tty from "tty";
|
|
16105
16098
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process6.argv) {
|
|
16106
16099
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
16107
16100
|
const position = argv.indexOf(prefix + flag);
|
|
@@ -17328,7 +17321,7 @@ async function latestVersion(packageName, options) {
|
|
|
17328
17321
|
}
|
|
17329
17322
|
|
|
17330
17323
|
// node_modules/is-npm/index.js
|
|
17331
|
-
import process7 from "
|
|
17324
|
+
import process7 from "process";
|
|
17332
17325
|
var packageJson2 = process7.env.npm_package_json;
|
|
17333
17326
|
var userAgent = process7.env.npm_config_user_agent;
|
|
17334
17327
|
var isNpm = Boolean(userAgent?.startsWith("npm")) || Boolean(packageJson2?.endsWith("package.json"));
|
|
@@ -17338,16 +17331,16 @@ var isBun = Boolean(userAgent?.startsWith("bun"));
|
|
|
17338
17331
|
var isNpmOrYarn = isNpm || isYarn;
|
|
17339
17332
|
|
|
17340
17333
|
// node_modules/is-installed-globally/index.js
|
|
17341
|
-
import fs4 from "
|
|
17342
|
-
import path7 from "
|
|
17343
|
-
import { fileURLToPath as fileURLToPath2 } from "
|
|
17334
|
+
import fs4 from "fs";
|
|
17335
|
+
import path7 from "path";
|
|
17336
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
17344
17337
|
|
|
17345
17338
|
// node_modules/global-directory/index.js
|
|
17346
17339
|
var import_ini = __toESM(require_ini3(), 1);
|
|
17347
|
-
import process8 from "
|
|
17348
|
-
import path5 from "
|
|
17349
|
-
import os4 from "
|
|
17350
|
-
import fs3 from "
|
|
17340
|
+
import process8 from "process";
|
|
17341
|
+
import path5 from "path";
|
|
17342
|
+
import os4 from "os";
|
|
17343
|
+
import fs3 from "fs";
|
|
17351
17344
|
var isWindows = process8.platform === "win32";
|
|
17352
17345
|
var readRc = (filePath) => {
|
|
17353
17346
|
try {
|
|
@@ -17434,7 +17427,7 @@ globalDirectory.yarn.binaries = path5.join(globalDirectory.yarn.packages, ".bin"
|
|
|
17434
17427
|
var global_directory_default = globalDirectory;
|
|
17435
17428
|
|
|
17436
17429
|
// node_modules/is-path-inside/index.js
|
|
17437
|
-
import path6 from "
|
|
17430
|
+
import path6 from "path";
|
|
17438
17431
|
function isPathInside(childPath, parentPath) {
|
|
17439
17432
|
const relation = path6.relative(parentPath, childPath);
|
|
17440
17433
|
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path6.sep}`) && relation !== path6.resolve(childPath));
|
|
@@ -17452,7 +17445,7 @@ var isInstalledGlobally = (() => {
|
|
|
17452
17445
|
var is_installed_globally_default = isInstalledGlobally;
|
|
17453
17446
|
|
|
17454
17447
|
// node_modules/update-notifier/node_modules/boxen/index.js
|
|
17455
|
-
import process9 from "
|
|
17448
|
+
import process9 from "process";
|
|
17456
17449
|
|
|
17457
17450
|
// node_modules/ansi-regex/index.js
|
|
17458
17451
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
@@ -17497,8 +17490,12 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
17497
17490
|
return 1;
|
|
17498
17491
|
}
|
|
17499
17492
|
|
|
17493
|
+
// node_modules/update-notifier/node_modules/boxen/node_modules/string-width/node_modules/emoji-regex/index.mjs
|
|
17494
|
+
var emoji_regex_default = () => {
|
|
17495
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
17496
|
+
};
|
|
17497
|
+
|
|
17500
17498
|
// node_modules/update-notifier/node_modules/boxen/node_modules/string-width/index.js
|
|
17501
|
-
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
17502
17499
|
var segmenter = new Intl.Segmenter;
|
|
17503
17500
|
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
17504
17501
|
function stringWidth(string, options = {}) {
|
|
@@ -17537,7 +17534,7 @@ function stringWidth(string, options = {}) {
|
|
|
17537
17534
|
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
17538
17535
|
continue;
|
|
17539
17536
|
}
|
|
17540
|
-
if (
|
|
17537
|
+
if (emoji_regex_default().test(character)) {
|
|
17541
17538
|
width += 2;
|
|
17542
17539
|
continue;
|
|
17543
17540
|
}
|
|
@@ -17824,7 +17821,7 @@ var ansi_styles_default2 = ansiStyles2;
|
|
|
17824
17821
|
// node_modules/update-notifier/node_modules/boxen/node_modules/wrap-ansi/index.js
|
|
17825
17822
|
var ESCAPES = new Set([
|
|
17826
17823
|
"\x1B",
|
|
17827
|
-
"
|
|
17824
|
+
"\x9B"
|
|
17828
17825
|
]);
|
|
17829
17826
|
var END_CODE = 39;
|
|
17830
17827
|
var ANSI_ESCAPE_BELL = "\x07";
|
|
@@ -18257,7 +18254,7 @@ function boxen(text, options) {
|
|
|
18257
18254
|
}
|
|
18258
18255
|
|
|
18259
18256
|
// node_modules/is-in-ci/index.js
|
|
18260
|
-
import { env as env3 } from "
|
|
18257
|
+
import { env as env3 } from "process";
|
|
18261
18258
|
var isInCi = env3.CI !== "0" && env3.CI !== "false" && (("CI" in env3) || ("CONTINUOUS_INTEGRATION" in env3) || Object.keys(env3).some((key) => key.startsWith("CI_")));
|
|
18262
18259
|
var is_in_ci_default = isInCi;
|
|
18263
18260
|
|
|
@@ -18297,8 +18294,8 @@ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) =
|
|
|
18297
18294
|
if (typeof data !== "object") {
|
|
18298
18295
|
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
|
18299
18296
|
}
|
|
18300
|
-
const escapedLeftBrace = "
|
|
18301
|
-
const escapedRightBrace = "
|
|
18297
|
+
const escapedLeftBrace = "\uE000\uE001\uE002";
|
|
18298
|
+
const escapedRightBrace = "\uE003\uE004\uE005";
|
|
18302
18299
|
template = template.replace(/\\{/g, escapedLeftBrace);
|
|
18303
18300
|
template = template.replace(/\\}/g, escapedRightBrace);
|
|
18304
18301
|
const parseKeyPath = (key) => {
|
|
@@ -18445,7 +18442,7 @@ class UpdateNotifier {
|
|
|
18445
18442
|
...options
|
|
18446
18443
|
};
|
|
18447
18444
|
const installCommand = options.isGlobal ? `npm i -g ${this._packageName}` : `npm i ${this._packageName}`;
|
|
18448
|
-
const defaultTemplate = "Update available " + source_default.dim("{currentVersion}") + source_default.reset("
|
|
18445
|
+
const defaultTemplate = "Update available " + source_default.dim("{currentVersion}") + source_default.reset(" \u2192 ") + source_default.green("{latestVersion}") + `
|
|
18449
18446
|
Run ` + source_default.cyan("{updateCommand}") + " to update";
|
|
18450
18447
|
const template = options.message || defaultTemplate;
|
|
18451
18448
|
options.boxenOptions ??= {
|
|
@@ -18522,7 +18519,7 @@ function checkForUpdates() {
|
|
|
18522
18519
|
});
|
|
18523
18520
|
cachedUpdateInfo = notifier.update;
|
|
18524
18521
|
notifier.notify({
|
|
18525
|
-
message: `Update available: {currentVersion}
|
|
18522
|
+
message: `Update available: {currentVersion} \u2192 {latestVersion}
|
|
18526
18523
|
Run: npm install -g claude-threads`
|
|
18527
18524
|
});
|
|
18528
18525
|
} catch {}
|
|
@@ -18621,7 +18618,7 @@ function formatReleaseNotes(notes) {
|
|
|
18621
18618
|
for (const [section, items] of Object.entries(notes.sections)) {
|
|
18622
18619
|
if (items.length === 0)
|
|
18623
18620
|
continue;
|
|
18624
|
-
const emoji = section === "Added" ? "
|
|
18621
|
+
const emoji = section === "Added" ? "\u2728" : section === "Fixed" ? "\uD83D\uDC1B" : section === "Changed" ? "\uD83D\uDD04" : section === "Removed" ? "\uD83D\uDDD1\uFE0F" : "\u2022";
|
|
18625
18622
|
msg += `**${emoji} ${section}**
|
|
18626
18623
|
`;
|
|
18627
18624
|
for (const item of items) {
|
|
@@ -18662,15 +18659,15 @@ var colors = {
|
|
|
18662
18659
|
orange: "\x1B[38;5;209m"
|
|
18663
18660
|
};
|
|
18664
18661
|
var CLI_LOGO = `
|
|
18665
|
-
${colors.orange}
|
|
18666
|
-
${colors.orange}
|
|
18667
|
-
${colors.orange}
|
|
18662
|
+
${colors.orange} \u2734${colors.reset} ${colors.blue}\u2584\u2588\u2580 \u2588\u2588\u2588${colors.reset} ${colors.orange}\u2734${colors.reset} ${colors.bold}claude-threads${colors.reset}
|
|
18663
|
+
${colors.orange}\u2734${colors.reset} ${colors.blue}\u2588\u2580 \u2588${colors.reset} ${colors.orange}\u2734${colors.reset} ${colors.dim}Chat \xD7 Claude Code${colors.reset}
|
|
18664
|
+
${colors.orange}\u2734${colors.reset} ${colors.blue}\u2580\u2588\u2584 \u2588${colors.reset} ${colors.orange}\u2734${colors.reset}
|
|
18668
18665
|
`;
|
|
18669
18666
|
function getLogo(version) {
|
|
18670
18667
|
return `\`\`\`
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18668
|
+
\u2734 \u2584\u2588\u2580 \u2588\u2588\u2588 \u2734 claude-threads v${version}
|
|
18669
|
+
\u2734 \u2588\u2580 \u2588 \u2734 Chat \xD7 Claude Code
|
|
18670
|
+
\u2734 \u2580\u2588\u2584 \u2588 \u2734
|
|
18674
18671
|
\`\`\``;
|
|
18675
18672
|
}
|
|
18676
18673
|
function printLogo() {
|
|
@@ -18680,41 +18677,41 @@ function printLogo() {
|
|
|
18680
18677
|
// src/session/commands.ts
|
|
18681
18678
|
async function cancelSession(session, username, ctx) {
|
|
18682
18679
|
const shortId = session.threadId.substring(0, 8);
|
|
18683
|
-
console.log(` \uD83D\uDED1 Session (${shortId}
|
|
18680
|
+
console.log(` \uD83D\uDED1 Session (${shortId}\u2026) cancelled by @${username}`);
|
|
18684
18681
|
await session.platform.createPost(`\uD83D\uDED1 **Session cancelled** by @${username}`, session.threadId);
|
|
18685
18682
|
ctx.killSession(session.threadId);
|
|
18686
18683
|
}
|
|
18687
18684
|
async function interruptSession(session, username) {
|
|
18688
18685
|
if (!session.claude.isRunning()) {
|
|
18689
|
-
await session.platform.createPost(
|
|
18686
|
+
await session.platform.createPost(`\u2139\uFE0F Session is idle, nothing to interrupt`, session.threadId);
|
|
18690
18687
|
return;
|
|
18691
18688
|
}
|
|
18692
18689
|
const shortId = session.threadId.substring(0, 8);
|
|
18693
18690
|
session.wasInterrupted = true;
|
|
18694
18691
|
const interrupted = session.claude.interrupt();
|
|
18695
18692
|
if (interrupted) {
|
|
18696
|
-
console.log(`
|
|
18697
|
-
await session.platform.createPost(
|
|
18693
|
+
console.log(` \u23F8\uFE0F Session (${shortId}\u2026) interrupted by @${username}`);
|
|
18694
|
+
await session.platform.createPost(`\u23F8\uFE0F **Interrupted** by @${username}`, session.threadId);
|
|
18698
18695
|
}
|
|
18699
18696
|
}
|
|
18700
18697
|
async function changeDirectory(session, newDir, username, ctx) {
|
|
18701
18698
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
18702
|
-
await session.platform.createPost(
|
|
18699
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can change the working directory`, session.threadId);
|
|
18703
18700
|
return;
|
|
18704
18701
|
}
|
|
18705
18702
|
const expandedDir = newDir.startsWith("~") ? newDir.replace("~", process.env.HOME || "") : newDir;
|
|
18706
18703
|
const absoluteDir = resolve5(expandedDir);
|
|
18707
18704
|
if (!existsSync6(absoluteDir)) {
|
|
18708
|
-
await session.platform.createPost(
|
|
18705
|
+
await session.platform.createPost(`\u274C Directory does not exist: \`${newDir}\``, session.threadId);
|
|
18709
18706
|
return;
|
|
18710
18707
|
}
|
|
18711
18708
|
if (!statSync(absoluteDir).isDirectory()) {
|
|
18712
|
-
await session.platform.createPost(
|
|
18709
|
+
await session.platform.createPost(`\u274C Not a directory: \`${newDir}\``, session.threadId);
|
|
18713
18710
|
return;
|
|
18714
18711
|
}
|
|
18715
18712
|
const shortId = session.threadId.substring(0, 8);
|
|
18716
18713
|
const shortDir = absoluteDir.replace(process.env.HOME || "", "~");
|
|
18717
|
-
console.log(` \uD83D\uDCC2 Session (${shortId}
|
|
18714
|
+
console.log(` \uD83D\uDCC2 Session (${shortId}\u2026) changing directory to ${shortDir}`);
|
|
18718
18715
|
ctx.stopTyping(session);
|
|
18719
18716
|
session.isRestarting = true;
|
|
18720
18717
|
session.claude.kill();
|
|
@@ -18740,8 +18737,8 @@ async function changeDirectory(session, newDir, username, ctx) {
|
|
|
18740
18737
|
session.claude.start();
|
|
18741
18738
|
} catch (err) {
|
|
18742
18739
|
session.isRestarting = false;
|
|
18743
|
-
console.error("
|
|
18744
|
-
await session.platform.createPost(
|
|
18740
|
+
console.error(" \u274C Failed to restart Claude:", err);
|
|
18741
|
+
await session.platform.createPost(`\u274C Failed to restart Claude: ${err}`, session.threadId);
|
|
18745
18742
|
return;
|
|
18746
18743
|
}
|
|
18747
18744
|
await updateSessionHeader(session, ctx);
|
|
@@ -18753,26 +18750,26 @@ async function changeDirectory(session, newDir, username, ctx) {
|
|
|
18753
18750
|
}
|
|
18754
18751
|
async function inviteUser(session, invitedUser, invitedBy, ctx) {
|
|
18755
18752
|
if (session.startedBy !== invitedBy && !session.platform.isUserAllowed(invitedBy)) {
|
|
18756
|
-
await session.platform.createPost(
|
|
18753
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can invite others`, session.threadId);
|
|
18757
18754
|
return;
|
|
18758
18755
|
}
|
|
18759
18756
|
session.sessionAllowedUsers.add(invitedUser);
|
|
18760
|
-
await session.platform.createPost(
|
|
18757
|
+
await session.platform.createPost(`\u2705 @${invitedUser} can now participate in this session (invited by @${invitedBy})`, session.threadId);
|
|
18761
18758
|
console.log(` \uD83D\uDC4B @${invitedUser} invited to session by @${invitedBy}`);
|
|
18762
18759
|
await updateSessionHeader(session, ctx);
|
|
18763
18760
|
ctx.persistSession(session);
|
|
18764
18761
|
}
|
|
18765
18762
|
async function kickUser(session, kickedUser, kickedBy, ctx) {
|
|
18766
18763
|
if (session.startedBy !== kickedBy && !session.platform.isUserAllowed(kickedBy)) {
|
|
18767
|
-
await session.platform.createPost(
|
|
18764
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can kick others`, session.threadId);
|
|
18768
18765
|
return;
|
|
18769
18766
|
}
|
|
18770
18767
|
if (kickedUser === session.startedBy) {
|
|
18771
|
-
await session.platform.createPost(
|
|
18768
|
+
await session.platform.createPost(`\u26A0\uFE0F Cannot kick session owner @${session.startedBy}`, session.threadId);
|
|
18772
18769
|
return;
|
|
18773
18770
|
}
|
|
18774
18771
|
if (session.platform.isUserAllowed(kickedUser)) {
|
|
18775
|
-
await session.platform.createPost(
|
|
18772
|
+
await session.platform.createPost(`\u26A0\uFE0F @${kickedUser} is globally allowed and cannot be kicked from individual sessions`, session.threadId);
|
|
18776
18773
|
return;
|
|
18777
18774
|
}
|
|
18778
18775
|
if (session.sessionAllowedUsers.delete(kickedUser)) {
|
|
@@ -18781,25 +18778,25 @@ async function kickUser(session, kickedUser, kickedBy, ctx) {
|
|
|
18781
18778
|
await updateSessionHeader(session, ctx);
|
|
18782
18779
|
ctx.persistSession(session);
|
|
18783
18780
|
} else {
|
|
18784
|
-
await session.platform.createPost(
|
|
18781
|
+
await session.platform.createPost(`\u26A0\uFE0F @${kickedUser} was not in this session`, session.threadId);
|
|
18785
18782
|
}
|
|
18786
18783
|
}
|
|
18787
18784
|
async function enableInteractivePermissions(session, username, ctx) {
|
|
18788
18785
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
18789
|
-
await session.platform.createPost(
|
|
18786
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can change permissions`, session.threadId);
|
|
18790
18787
|
return;
|
|
18791
18788
|
}
|
|
18792
18789
|
if (!ctx.skipPermissions) {
|
|
18793
|
-
await session.platform.createPost(
|
|
18790
|
+
await session.platform.createPost(`\u2139\uFE0F Permissions are already interactive for this session`, session.threadId);
|
|
18794
18791
|
return;
|
|
18795
18792
|
}
|
|
18796
18793
|
if (session.forceInteractivePermissions) {
|
|
18797
|
-
await session.platform.createPost(
|
|
18794
|
+
await session.platform.createPost(`\u2139\uFE0F Interactive permissions already enabled for this session`, session.threadId);
|
|
18798
18795
|
return;
|
|
18799
18796
|
}
|
|
18800
18797
|
session.forceInteractivePermissions = true;
|
|
18801
18798
|
const shortId = session.threadId.substring(0, 8);
|
|
18802
|
-
console.log(` \uD83D\uDD10 Session (${shortId}
|
|
18799
|
+
console.log(` \uD83D\uDD10 Session (${shortId}\u2026) enabling interactive permissions`);
|
|
18803
18800
|
ctx.stopTyping(session);
|
|
18804
18801
|
session.isRestarting = true;
|
|
18805
18802
|
session.claude.kill();
|
|
@@ -18822,8 +18819,8 @@ async function enableInteractivePermissions(session, username, ctx) {
|
|
|
18822
18819
|
session.claude.start();
|
|
18823
18820
|
} catch (err) {
|
|
18824
18821
|
session.isRestarting = false;
|
|
18825
|
-
console.error("
|
|
18826
|
-
await session.platform.createPost(
|
|
18822
|
+
console.error(" \u274C Failed to restart Claude:", err);
|
|
18823
|
+
await session.platform.createPost(`\u274C Failed to enable interactive permissions: ${err}`, session.threadId);
|
|
18827
18824
|
return;
|
|
18828
18825
|
}
|
|
18829
18826
|
await updateSessionHeader(session, ctx);
|
|
@@ -18843,7 +18840,7 @@ async function requestMessageApproval(session, username, message, ctx) {
|
|
|
18843
18840
|
|
|
18844
18841
|
` + `> ${displayMessage}
|
|
18845
18842
|
|
|
18846
|
-
` + `React: \uD83D\uDC4D Allow once |
|
|
18843
|
+
` + `React: \uD83D\uDC4D Allow once | \u2705 Invite to session | \uD83D\uDC4E Deny`;
|
|
18847
18844
|
const post = await session.platform.createInteractivePost(approvalMessage, [APPROVAL_EMOJIS[0], ALLOW_ALL_EMOJIS[0], DENIAL_EMOJIS[0]], session.threadId);
|
|
18848
18845
|
session.pendingMessageApproval = {
|
|
18849
18846
|
postId: post.id,
|
|
@@ -18857,7 +18854,7 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18857
18854
|
return;
|
|
18858
18855
|
const shortDir = session.workingDir.replace(process.env.HOME || "", "~");
|
|
18859
18856
|
const isInteractive = !ctx.skipPermissions || session.forceInteractivePermissions;
|
|
18860
|
-
const permMode = isInteractive ? "\uD83D\uDD10 Interactive" : "
|
|
18857
|
+
const permMode = isInteractive ? "\uD83D\uDD10 Interactive" : "\u26A1 Auto";
|
|
18861
18858
|
const otherParticipants = [...session.sessionAllowedUsers].filter((u) => u !== session.startedBy).map((u) => `@${u}`).join(", ");
|
|
18862
18859
|
const rows = [
|
|
18863
18860
|
`| \uD83D\uDCC2 **Directory** | \`${shortDir}\` |`,
|
|
@@ -18877,12 +18874,12 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18877
18874
|
}
|
|
18878
18875
|
const updateInfo = getUpdateInfo();
|
|
18879
18876
|
const updateNotice = updateInfo ? `
|
|
18880
|
-
>
|
|
18877
|
+
> \u26A0\uFE0F **Update available:** v${updateInfo.current} \u2192 v${updateInfo.latest} - Run \`npm install -g claude-threads\`
|
|
18881
18878
|
` : "";
|
|
18882
18879
|
const releaseNotes = getReleaseNotes(VERSION);
|
|
18883
18880
|
const whatsNew = releaseNotes ? getWhatsNewSummary(releaseNotes) : "";
|
|
18884
18881
|
const whatsNewLine = whatsNew ? `
|
|
18885
|
-
>
|
|
18882
|
+
> \u2728 **What's new:** ${whatsNew}
|
|
18886
18883
|
` : "";
|
|
18887
18884
|
const msg = [
|
|
18888
18885
|
getLogo(VERSION),
|
|
@@ -18896,7 +18893,7 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18896
18893
|
try {
|
|
18897
18894
|
await session.platform.updatePost(session.sessionStartPostId, msg);
|
|
18898
18895
|
} catch (err) {
|
|
18899
|
-
console.error("
|
|
18896
|
+
console.error(" \u26A0\uFE0F Failed to update session header:", err);
|
|
18900
18897
|
}
|
|
18901
18898
|
}
|
|
18902
18899
|
|
|
@@ -18923,7 +18920,7 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18923
18920
|
throw new Error(`Platform '${platformId}' not found. Call addPlatform() first.`);
|
|
18924
18921
|
}
|
|
18925
18922
|
if (ctx.sessions.size >= ctx.maxSessions) {
|
|
18926
|
-
await platform.createPost(
|
|
18923
|
+
await platform.createPost(`\u26A0\uFE0F **Too busy** - ${ctx.sessions.size} sessions active. Please try again later.`, replyToPostId);
|
|
18927
18924
|
return;
|
|
18928
18925
|
}
|
|
18929
18926
|
let post;
|
|
@@ -18932,7 +18929,7 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18932
18929
|
|
|
18933
18930
|
*Starting session...*`, replyToPostId);
|
|
18934
18931
|
} catch (err) {
|
|
18935
|
-
console.error(`
|
|
18932
|
+
console.error(` \u274C Failed to create session post:`, err);
|
|
18936
18933
|
return;
|
|
18937
18934
|
}
|
|
18938
18935
|
const actualThreadId = replyToPostId || post.id;
|
|
@@ -18984,7 +18981,7 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18984
18981
|
ctx.sessions.set(sessionId, session);
|
|
18985
18982
|
ctx.registerPost(post.id, actualThreadId);
|
|
18986
18983
|
const shortId = actualThreadId.substring(0, 8);
|
|
18987
|
-
console.log(`
|
|
18984
|
+
console.log(` \u25B6 Session #${ctx.sessions.size} started (${shortId}\u2026) by @${username}`);
|
|
18988
18985
|
await ctx.updateSessionHeader(session);
|
|
18989
18986
|
ctx.startTyping(session);
|
|
18990
18987
|
claude.on("event", (e) => ctx.handleEvent(sessionId, e));
|
|
@@ -18992,9 +18989,9 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18992
18989
|
try {
|
|
18993
18990
|
claude.start();
|
|
18994
18991
|
} catch (err) {
|
|
18995
|
-
console.error("
|
|
18992
|
+
console.error(" \u274C Failed to start Claude:", err);
|
|
18996
18993
|
ctx.stopTyping(session);
|
|
18997
|
-
await session.platform.createPost(
|
|
18994
|
+
await session.platform.createPost(`\u274C ${err}`, actualThreadId);
|
|
18998
18995
|
ctx.sessions.delete(session.sessionId);
|
|
18999
18996
|
return;
|
|
19000
18997
|
}
|
|
@@ -19014,17 +19011,17 @@ async function resumeSession(state, ctx) {
|
|
|
19014
19011
|
const shortId = state.threadId.substring(0, 8);
|
|
19015
19012
|
const platform = ctx.platforms.get(state.platformId);
|
|
19016
19013
|
if (!platform) {
|
|
19017
|
-
console.log(`
|
|
19014
|
+
console.log(` \u26A0\uFE0F Platform ${state.platformId} not registered, skipping resume for ${shortId}...`);
|
|
19018
19015
|
return;
|
|
19019
19016
|
}
|
|
19020
19017
|
const post = await platform.getPost(state.threadId);
|
|
19021
19018
|
if (!post) {
|
|
19022
|
-
console.log(`
|
|
19019
|
+
console.log(` \u26A0\uFE0F Thread ${shortId}... deleted, skipping resume`);
|
|
19023
19020
|
ctx.sessionStore.remove(`${state.platformId}:${state.threadId}`);
|
|
19024
19021
|
return;
|
|
19025
19022
|
}
|
|
19026
19023
|
if (ctx.sessions.size >= ctx.maxSessions) {
|
|
19027
|
-
console.log(`
|
|
19024
|
+
console.log(` \u26A0\uFE0F Max sessions reached, skipping resume for ${shortId}...`);
|
|
19028
19025
|
return;
|
|
19029
19026
|
}
|
|
19030
19027
|
const platformId = state.platformId;
|
|
@@ -19091,11 +19088,11 @@ async function resumeSession(state, ctx) {
|
|
|
19091
19088
|
await ctx.updateSessionHeader(session);
|
|
19092
19089
|
ctx.persistSession(session);
|
|
19093
19090
|
} catch (err) {
|
|
19094
|
-
console.error(`
|
|
19091
|
+
console.error(` \u274C Failed to resume session ${shortId}...:`, err);
|
|
19095
19092
|
ctx.sessions.delete(sessionId);
|
|
19096
19093
|
ctx.sessionStore.remove(sessionId);
|
|
19097
19094
|
try {
|
|
19098
|
-
await session.platform.createPost(
|
|
19095
|
+
await session.platform.createPost(`\u26A0\uFE0F **Could not resume previous session.** Starting fresh.
|
|
19099
19096
|
*Your previous conversation context is preserved, but Claude needs to re-read it.*`, state.threadId);
|
|
19100
19097
|
} catch {}
|
|
19101
19098
|
}
|
|
@@ -19125,7 +19122,7 @@ async function resumePausedSession(threadId, message, files, ctx) {
|
|
|
19125
19122
|
session.lastActivityAt = new Date;
|
|
19126
19123
|
ctx.startTyping(session);
|
|
19127
19124
|
} else {
|
|
19128
|
-
console.log(`
|
|
19125
|
+
console.log(` \u26A0\uFE0F Failed to resume session ${shortId}..., could not send message`);
|
|
19129
19126
|
}
|
|
19130
19127
|
}
|
|
19131
19128
|
async function handleExit(sessionId, code, ctx) {
|
|
@@ -19166,9 +19163,9 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19166
19163
|
}
|
|
19167
19164
|
}
|
|
19168
19165
|
try {
|
|
19169
|
-
await session.platform.createPost(
|
|
19166
|
+
await session.platform.createPost(`\u2139\uFE0F Session paused. Send a new message to continue.`, session.threadId);
|
|
19170
19167
|
} catch {}
|
|
19171
|
-
console.log(`
|
|
19168
|
+
console.log(` \u23F8\uFE0F Session paused (${shortId}\u2026) \u2014 ${ctx.sessions.size} active`);
|
|
19172
19169
|
return;
|
|
19173
19170
|
}
|
|
19174
19171
|
if (session.isResumed && code !== 0) {
|
|
@@ -19180,7 +19177,7 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19180
19177
|
}
|
|
19181
19178
|
ctx.sessions.delete(session.sessionId);
|
|
19182
19179
|
try {
|
|
19183
|
-
await session.platform.createPost(
|
|
19180
|
+
await session.platform.createPost(`\u26A0\uFE0F **Session resume failed** (exit code ${code}). The session data is preserved - try restarting the bot.`, session.threadId);
|
|
19184
19181
|
} catch {}
|
|
19185
19182
|
return;
|
|
19186
19183
|
}
|
|
@@ -19205,7 +19202,7 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19205
19202
|
} else {
|
|
19206
19203
|
console.log(` [exit] Session ${shortId}... non-zero exit, preserving for potential retry`);
|
|
19207
19204
|
}
|
|
19208
|
-
console.log(`
|
|
19205
|
+
console.log(` \u25A0 Session ended (${shortId}\u2026) \u2014 ${ctx.sessions.size} active`);
|
|
19209
19206
|
}
|
|
19210
19207
|
function killSession(session, unpersist, ctx) {
|
|
19211
19208
|
const shortId = session.threadId.substring(0, 8);
|
|
@@ -19223,7 +19220,7 @@ function killSession(session, unpersist, ctx) {
|
|
|
19223
19220
|
if (unpersist) {
|
|
19224
19221
|
ctx.unpersistSession(session.threadId);
|
|
19225
19222
|
}
|
|
19226
|
-
console.log(`
|
|
19223
|
+
console.log(` \u2716 Session killed (${shortId}\u2026) \u2014 ${ctx.sessions.size} active`);
|
|
19227
19224
|
}
|
|
19228
19225
|
function killAllSessions(ctx) {
|
|
19229
19226
|
for (const session of ctx.sessions.values()) {
|
|
@@ -19239,16 +19236,16 @@ function cleanupIdleSessions(timeoutMs, warningMs, ctx) {
|
|
|
19239
19236
|
const idleMs = now - session.lastActivityAt.getTime();
|
|
19240
19237
|
const shortId = session.threadId.substring(0, 8);
|
|
19241
19238
|
if (idleMs > timeoutMs) {
|
|
19242
|
-
console.log(`
|
|
19243
|
-
session.platform.createPost(
|
|
19239
|
+
console.log(` \u23F0 Session (${shortId}\u2026) timed out after ${Math.round(idleMs / 60000)}min idle`);
|
|
19240
|
+
session.platform.createPost(`\u23F0 **Session timed out** after ${Math.round(idleMs / 60000)} minutes of inactivity`, session.threadId).catch(() => {});
|
|
19244
19241
|
killSession(session, false, ctx);
|
|
19245
19242
|
continue;
|
|
19246
19243
|
}
|
|
19247
19244
|
if (idleMs > warningMs && !session.timeoutWarningPosted) {
|
|
19248
19245
|
const remainingMins = Math.round((timeoutMs - idleMs) / 60000);
|
|
19249
|
-
session.platform.createPost(
|
|
19246
|
+
session.platform.createPost(`\u23F0 **Session idle** - will timeout in ~${remainingMins} minutes without activity`, session.threadId).catch(() => {});
|
|
19250
19247
|
session.timeoutWarningPosted = true;
|
|
19251
|
-
console.log(`
|
|
19248
|
+
console.log(` \u23F0 Session (${shortId}\u2026) idle warning posted`);
|
|
19252
19249
|
}
|
|
19253
19250
|
}
|
|
19254
19251
|
}
|
|
@@ -19438,11 +19435,11 @@ async function postWorktreePrompt(session, reason, registerPost) {
|
|
|
19438
19435
|
switch (reason) {
|
|
19439
19436
|
case "uncommitted":
|
|
19440
19437
|
message = `\uD83C\uDF3F **This repo has uncommitted changes.**
|
|
19441
|
-
` + `Reply with a branch name to work in an isolated worktree, or react with
|
|
19438
|
+
` + `Reply with a branch name to work in an isolated worktree, or react with \u274C to continue in the main repo.`;
|
|
19442
19439
|
break;
|
|
19443
19440
|
case "concurrent":
|
|
19444
|
-
message =
|
|
19445
|
-
` + `Reply with a branch name to work in an isolated worktree, or react with
|
|
19441
|
+
message = `\u26A0\uFE0F **Another session is already using this repo.**
|
|
19442
|
+
` + `Reply with a branch name to work in an isolated worktree, or react with \u274C to continue anyway.`;
|
|
19446
19443
|
break;
|
|
19447
19444
|
case "require":
|
|
19448
19445
|
message = `\uD83C\uDF3F **This deployment requires working in a worktree.**
|
|
@@ -19450,7 +19447,7 @@ async function postWorktreePrompt(session, reason, registerPost) {
|
|
|
19450
19447
|
break;
|
|
19451
19448
|
default:
|
|
19452
19449
|
message = `\uD83C\uDF3F **Would you like to work in an isolated worktree?**
|
|
19453
|
-
` + `Reply with a branch name, or react with
|
|
19450
|
+
` + `Reply with a branch name, or react with \u274C to continue in the main repo.`;
|
|
19454
19451
|
}
|
|
19455
19452
|
const reactionOptions = reason === "require" ? [] : ["x"];
|
|
19456
19453
|
const post = await session.platform.createInteractivePost(message, reactionOptions, session.threadId);
|
|
@@ -19464,7 +19461,7 @@ async function handleWorktreeBranchResponse(session, branchName, username, creat
|
|
|
19464
19461
|
return false;
|
|
19465
19462
|
}
|
|
19466
19463
|
if (!isValidBranchName(branchName)) {
|
|
19467
|
-
await session.platform.createPost(
|
|
19464
|
+
await session.platform.createPost(`\u274C Invalid branch name: \`${branchName}\`. Please provide a valid git branch name.`, session.threadId);
|
|
19468
19465
|
return true;
|
|
19469
19466
|
}
|
|
19470
19467
|
await createAndSwitch(session.threadId, branchName, username);
|
|
@@ -19478,9 +19475,9 @@ async function handleWorktreeSkip(session, username, persistSession, startTyping
|
|
|
19478
19475
|
}
|
|
19479
19476
|
if (session.worktreePromptPostId) {
|
|
19480
19477
|
try {
|
|
19481
|
-
await session.platform.updatePost(session.worktreePromptPostId,
|
|
19478
|
+
await session.platform.updatePost(session.worktreePromptPostId, `\u2705 Continuing in main repo (skipped by @${username})`);
|
|
19482
19479
|
} catch (err) {
|
|
19483
|
-
console.error("
|
|
19480
|
+
console.error(" \u26A0\uFE0F Failed to update worktree prompt:", err);
|
|
19484
19481
|
}
|
|
19485
19482
|
}
|
|
19486
19483
|
session.pendingWorktreePrompt = false;
|
|
@@ -19495,30 +19492,30 @@ async function handleWorktreeSkip(session, username, persistSession, startTyping
|
|
|
19495
19492
|
}
|
|
19496
19493
|
async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
19497
19494
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19498
|
-
await session.platform.createPost(
|
|
19495
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19499
19496
|
return;
|
|
19500
19497
|
}
|
|
19501
19498
|
const isRepo = await isGitRepository(session.workingDir);
|
|
19502
19499
|
if (!isRepo) {
|
|
19503
|
-
await session.platform.createPost(
|
|
19500
|
+
await session.platform.createPost(`\u274C Current directory is not a git repository`, session.threadId);
|
|
19504
19501
|
return;
|
|
19505
19502
|
}
|
|
19506
19503
|
const repoRoot = await getRepositoryRoot(session.workingDir);
|
|
19507
19504
|
const existing = await findWorktreeByBranch(repoRoot, branch);
|
|
19508
19505
|
if (existing && !existing.isMain) {
|
|
19509
|
-
await session.platform.createPost(
|
|
19506
|
+
await session.platform.createPost(`\u26A0\uFE0F Worktree for branch \`${branch}\` already exists at \`${existing.path}\`. Use \`!worktree switch ${branch}\` to switch to it.`, session.threadId);
|
|
19510
19507
|
return;
|
|
19511
19508
|
}
|
|
19512
19509
|
const shortId = session.threadId.substring(0, 8);
|
|
19513
|
-
console.log(` \uD83C\uDF3F Session (${shortId}
|
|
19510
|
+
console.log(` \uD83C\uDF3F Session (${shortId}\u2026) creating worktree for branch ${branch}`);
|
|
19514
19511
|
const worktreePath = getWorktreeDir(repoRoot, branch);
|
|
19515
19512
|
try {
|
|
19516
19513
|
await createWorktree(repoRoot, branch, worktreePath);
|
|
19517
19514
|
if (session.worktreePromptPostId) {
|
|
19518
19515
|
try {
|
|
19519
|
-
await session.platform.updatePost(session.worktreePromptPostId,
|
|
19516
|
+
await session.platform.updatePost(session.worktreePromptPostId, `\u2705 Created worktree for \`${branch}\``);
|
|
19520
19517
|
} catch (err) {
|
|
19521
|
-
console.error("
|
|
19518
|
+
console.error(" \u26A0\uFE0F Failed to update worktree prompt:", err);
|
|
19522
19519
|
}
|
|
19523
19520
|
}
|
|
19524
19521
|
const wasPending = session.pendingWorktreePrompt;
|
|
@@ -19557,7 +19554,7 @@ async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
|
19557
19554
|
}
|
|
19558
19555
|
await options.updateSessionHeader(session);
|
|
19559
19556
|
const shortWorktreePath = worktreePath.replace(process.env.HOME || "", "~");
|
|
19560
|
-
await session.platform.createPost(
|
|
19557
|
+
await session.platform.createPost(`\u2705 **Created worktree** for branch \`${branch}\`
|
|
19561
19558
|
\uD83D\uDCC1 Working directory: \`${shortWorktreePath}\`
|
|
19562
19559
|
*Claude Code restarted in the new worktree*`, session.threadId);
|
|
19563
19560
|
session.lastActivityAt = new Date;
|
|
@@ -19567,22 +19564,22 @@ async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
|
19567
19564
|
session.claude.sendMessage(queuedPrompt);
|
|
19568
19565
|
options.startTyping(session);
|
|
19569
19566
|
}
|
|
19570
|
-
console.log(` \uD83C\uDF3F Session (${shortId}
|
|
19567
|
+
console.log(` \uD83C\uDF3F Session (${shortId}\u2026) switched to worktree ${branch} at ${shortWorktreePath}`);
|
|
19571
19568
|
} catch (err) {
|
|
19572
|
-
console.error(`
|
|
19573
|
-
await session.platform.createPost(
|
|
19569
|
+
console.error(` \u274C Failed to create worktree:`, err);
|
|
19570
|
+
await session.platform.createPost(`\u274C Failed to create worktree: ${err instanceof Error ? err.message : String(err)}`, session.threadId);
|
|
19574
19571
|
}
|
|
19575
19572
|
}
|
|
19576
19573
|
async function switchToWorktree(session, branchOrPath, username, changeDirectory2) {
|
|
19577
19574
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19578
|
-
await session.platform.createPost(
|
|
19575
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19579
19576
|
return;
|
|
19580
19577
|
}
|
|
19581
19578
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
19582
19579
|
const worktrees = await listWorktrees(repoRoot);
|
|
19583
19580
|
const target = worktrees.find((wt) => wt.branch === branchOrPath || wt.path === branchOrPath || wt.path.endsWith(branchOrPath));
|
|
19584
19581
|
if (!target) {
|
|
19585
|
-
await session.platform.createPost(
|
|
19582
|
+
await session.platform.createPost(`\u274C Worktree not found: \`${branchOrPath}\`. Use \`!worktree list\` to see available worktrees.`, session.threadId);
|
|
19586
19583
|
return;
|
|
19587
19584
|
}
|
|
19588
19585
|
await changeDirectory2(session.threadId, target.path, username);
|
|
@@ -19595,7 +19592,7 @@ async function switchToWorktree(session, branchOrPath, username, changeDirectory
|
|
|
19595
19592
|
async function listWorktreesCommand(session) {
|
|
19596
19593
|
const isRepo = await isGitRepository(session.workingDir);
|
|
19597
19594
|
if (!isRepo) {
|
|
19598
|
-
await session.platform.createPost(
|
|
19595
|
+
await session.platform.createPost(`\u274C Current directory is not a git repository`, session.threadId);
|
|
19599
19596
|
return;
|
|
19600
19597
|
}
|
|
19601
19598
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
@@ -19611,51 +19608,51 @@ async function listWorktreesCommand(session) {
|
|
|
19611
19608
|
for (const wt of worktrees) {
|
|
19612
19609
|
const shortPath = wt.path.replace(process.env.HOME || "", "~");
|
|
19613
19610
|
const isCurrent = session.workingDir === wt.path;
|
|
19614
|
-
const marker = isCurrent ? "
|
|
19611
|
+
const marker = isCurrent ? " \u2190 current" : "";
|
|
19615
19612
|
const label = wt.isMain ? "(main repository)" : "";
|
|
19616
|
-
message +=
|
|
19613
|
+
message += `\u2022 \`${wt.branch}\` \u2192 \`${shortPath}\` ${label}${marker}
|
|
19617
19614
|
`;
|
|
19618
19615
|
}
|
|
19619
19616
|
await session.platform.createPost(message, session.threadId);
|
|
19620
19617
|
}
|
|
19621
19618
|
async function removeWorktreeCommand(session, branchOrPath, username) {
|
|
19622
19619
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19623
|
-
await session.platform.createPost(
|
|
19620
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19624
19621
|
return;
|
|
19625
19622
|
}
|
|
19626
19623
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
19627
19624
|
const worktrees = await listWorktrees(repoRoot);
|
|
19628
19625
|
const target = worktrees.find((wt) => wt.branch === branchOrPath || wt.path === branchOrPath || wt.path.endsWith(branchOrPath));
|
|
19629
19626
|
if (!target) {
|
|
19630
|
-
await session.platform.createPost(
|
|
19627
|
+
await session.platform.createPost(`\u274C Worktree not found: \`${branchOrPath}\`. Use \`!worktree list\` to see available worktrees.`, session.threadId);
|
|
19631
19628
|
return;
|
|
19632
19629
|
}
|
|
19633
19630
|
if (target.isMain) {
|
|
19634
|
-
await session.platform.createPost(
|
|
19631
|
+
await session.platform.createPost(`\u274C Cannot remove the main repository. Use \`!worktree remove\` only for worktrees.`, session.threadId);
|
|
19635
19632
|
return;
|
|
19636
19633
|
}
|
|
19637
19634
|
if (session.workingDir === target.path) {
|
|
19638
|
-
await session.platform.createPost(
|
|
19635
|
+
await session.platform.createPost(`\u274C Cannot remove the current working directory. Switch to another worktree first.`, session.threadId);
|
|
19639
19636
|
return;
|
|
19640
19637
|
}
|
|
19641
19638
|
try {
|
|
19642
19639
|
await removeWorktree(repoRoot, target.path);
|
|
19643
19640
|
const shortPath = target.path.replace(process.env.HOME || "", "~");
|
|
19644
|
-
await session.platform.createPost(
|
|
19645
|
-
console.log(` \uD83D\uDDD1
|
|
19641
|
+
await session.platform.createPost(`\u2705 Removed worktree \`${target.branch}\` at \`${shortPath}\``, session.threadId);
|
|
19642
|
+
console.log(` \uD83D\uDDD1\uFE0F Removed worktree ${target.branch} at ${shortPath}`);
|
|
19646
19643
|
} catch (err) {
|
|
19647
|
-
console.error(`
|
|
19648
|
-
await session.platform.createPost(
|
|
19644
|
+
console.error(` \u274C Failed to remove worktree:`, err);
|
|
19645
|
+
await session.platform.createPost(`\u274C Failed to remove worktree: ${err instanceof Error ? err.message : String(err)}`, session.threadId);
|
|
19649
19646
|
}
|
|
19650
19647
|
}
|
|
19651
19648
|
async function disableWorktreePrompt(session, username, persistSession) {
|
|
19652
19649
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19653
|
-
await session.platform.createPost(
|
|
19650
|
+
await session.platform.createPost(`\u26A0\uFE0F Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19654
19651
|
return;
|
|
19655
19652
|
}
|
|
19656
19653
|
session.worktreePromptDisabled = true;
|
|
19657
19654
|
persistSession(session);
|
|
19658
|
-
await session.platform.createPost(
|
|
19655
|
+
await session.platform.createPost(`\u2705 Worktree prompts disabled for this session`, session.threadId);
|
|
19659
19656
|
}
|
|
19660
19657
|
|
|
19661
19658
|
// src/session/types.ts
|
|
@@ -20160,7 +20157,7 @@ async function main() {
|
|
|
20160
20157
|
console.log(` \uD83D\uDCAC ${cyan("@" + platformConfig.botName)}`);
|
|
20161
20158
|
console.log(` \uD83C\uDF10 ${dim2(platformConfig.url)}`);
|
|
20162
20159
|
if (platformConfig.skipPermissions) {
|
|
20163
|
-
console.log(`
|
|
20160
|
+
console.log(` \u26A0\uFE0F ${dim2("Permissions disabled")}`);
|
|
20164
20161
|
} else {
|
|
20165
20162
|
console.log(` \uD83D\uDD10 ${dim2("Interactive permissions")}`);
|
|
20166
20163
|
}
|
|
@@ -20179,7 +20176,7 @@ async function main() {
|
|
|
20179
20176
|
const lowerMessage = message.trim().toLowerCase();
|
|
20180
20177
|
if (lowerMessage === "!kill" || mattermost.isBotMentioned(message) && mattermost.extractPrompt(message).toLowerCase() === "!kill") {
|
|
20181
20178
|
if (!mattermost.isUserAllowed(username)) {
|
|
20182
|
-
await mattermost.createPost("
|
|
20179
|
+
await mattermost.createPost("\u26D4 Only authorized users can use `!kill`", threadRoot);
|
|
20183
20180
|
return;
|
|
20184
20181
|
}
|
|
20185
20182
|
for (const tid of session.getActiveThreadIds()) {
|
|
@@ -20235,9 +20232,9 @@ async function main() {
|
|
|
20235
20232
|
` + `| \`!kill\` | Emergency shutdown (kills ALL sessions, exits bot) |
|
|
20236
20233
|
|
|
20237
20234
|
` + `**Reactions:**
|
|
20238
|
-
` + `- \uD83D\uDC4D Approve action
|
|
20239
|
-
` + `-
|
|
20240
|
-
` + `-
|
|
20235
|
+
` + `- \uD83D\uDC4D Approve action \xB7 \u2705 Approve all \xB7 \uD83D\uDC4E Deny
|
|
20236
|
+
` + `- \u23F8\uFE0F Interrupt current task (session stays active)
|
|
20237
|
+
` + `- \u274C or \uD83D\uDED1 Stop session`, threadRoot);
|
|
20241
20238
|
return;
|
|
20242
20239
|
}
|
|
20243
20240
|
if (lowerContent === "!release-notes" || lowerContent === "!changelog") {
|
|
@@ -20267,7 +20264,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20267
20264
|
if (mode === "interactive") {
|
|
20268
20265
|
await session.enableInteractivePermissions(threadRoot, username);
|
|
20269
20266
|
} else {
|
|
20270
|
-
await mattermost.createPost(
|
|
20267
|
+
await mattermost.createPost(`\u26A0\uFE0F Cannot upgrade to auto permissions - can only downgrade to interactive`, threadRoot);
|
|
20271
20268
|
}
|
|
20272
20269
|
return;
|
|
20273
20270
|
}
|
|
@@ -20286,14 +20283,14 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20286
20283
|
break;
|
|
20287
20284
|
case "switch":
|
|
20288
20285
|
if (!args) {
|
|
20289
|
-
await mattermost.createPost("
|
|
20286
|
+
await mattermost.createPost("\u274C Usage: `!worktree switch <branch>`", threadRoot);
|
|
20290
20287
|
} else {
|
|
20291
20288
|
await session.switchToWorktree(threadRoot, args, username);
|
|
20292
20289
|
}
|
|
20293
20290
|
break;
|
|
20294
20291
|
case "remove":
|
|
20295
20292
|
if (!args) {
|
|
20296
|
-
await mattermost.createPost("
|
|
20293
|
+
await mattermost.createPost("\u274C Usage: `!worktree remove <branch>`", threadRoot);
|
|
20297
20294
|
} else {
|
|
20298
20295
|
await session.removeWorktreeCommand(threadRoot, args, username);
|
|
20299
20296
|
}
|
|
@@ -20340,7 +20337,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20340
20337
|
if (persistedSession) {
|
|
20341
20338
|
const allowedUsers = new Set(persistedSession.sessionAllowedUsers);
|
|
20342
20339
|
if (!allowedUsers.has(username) && !mattermost.isUserAllowed(username)) {
|
|
20343
|
-
await mattermost.createPost(
|
|
20340
|
+
await mattermost.createPost(`\u26A0\uFE0F @${username} is not authorized to resume this session`, threadRoot);
|
|
20344
20341
|
return;
|
|
20345
20342
|
}
|
|
20346
20343
|
}
|
|
@@ -20353,7 +20350,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20353
20350
|
if (!mattermost.isBotMentioned(message))
|
|
20354
20351
|
return;
|
|
20355
20352
|
if (!mattermost.isUserAllowed(username)) {
|
|
20356
|
-
await mattermost.createPost(
|
|
20353
|
+
await mattermost.createPost(`\u26A0\uFE0F @${username} is not authorized`, threadRoot);
|
|
20357
20354
|
return;
|
|
20358
20355
|
}
|
|
20359
20356
|
const prompt = mattermost.extractPrompt(message);
|
|
@@ -20371,18 +20368,18 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20371
20368
|
}
|
|
20372
20369
|
await session.startSession({ prompt, files }, username, threadRoot);
|
|
20373
20370
|
} catch (err) {
|
|
20374
|
-
console.error("
|
|
20371
|
+
console.error(" \u274C Error handling message:", err);
|
|
20375
20372
|
try {
|
|
20376
20373
|
const threadRoot = post.rootId || post.id;
|
|
20377
|
-
await mattermost.createPost(
|
|
20374
|
+
await mattermost.createPost(`\u26A0\uFE0F An error occurred. Please try again.`, threadRoot);
|
|
20378
20375
|
} catch {}
|
|
20379
20376
|
}
|
|
20380
20377
|
});
|
|
20381
20378
|
mattermost.on("connected", () => {});
|
|
20382
|
-
mattermost.on("error", (e) => console.error("
|
|
20379
|
+
mattermost.on("error", (e) => console.error(" \u274C Error:", e));
|
|
20383
20380
|
await mattermost.connect();
|
|
20384
20381
|
await session.initialize();
|
|
20385
|
-
console.log(`
|
|
20382
|
+
console.log(` \u2705 ${bold2("Ready!")} Waiting for @${platformConfig.botName} mentions...`);
|
|
20386
20383
|
console.log("");
|
|
20387
20384
|
let isShuttingDown = false;
|
|
20388
20385
|
const shutdown = async () => {
|
|
@@ -20397,7 +20394,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20397
20394
|
console.log(` \uD83D\uDCE4 Notifying ${activeThreads.length} active session(s)...`);
|
|
20398
20395
|
for (const threadId of activeThreads) {
|
|
20399
20396
|
try {
|
|
20400
|
-
await mattermost.createPost(
|
|
20397
|
+
await mattermost.createPost(`\u23F8\uFE0F **Bot shutting down** - session will resume on restart`, threadId);
|
|
20401
20398
|
} catch {}
|
|
20402
20399
|
}
|
|
20403
20400
|
}
|