claude-threads 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +338 -325
- package/dist/mcp/permission-server.js +1381 -1382
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import { createRequire } from "node:module";
|
|
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 = import.meta.
|
|
20
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
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("events").EventEmitter;
|
|
743
|
-
var childProcess = __require("child_process");
|
|
744
|
-
var path = __require("path");
|
|
745
|
-
var fs = __require("fs");
|
|
746
|
-
var process2 = __require("process");
|
|
742
|
+
var EventEmitter = __require("node:events").EventEmitter;
|
|
743
|
+
var childProcess = __require("node:child_process");
|
|
744
|
+
var path = __require("node:path");
|
|
745
|
+
var fs = __require("node:fs");
|
|
746
|
+
var process2 = __require("node: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: "↑",
|
|
2420
|
+
arrowDown: "↓",
|
|
2421
|
+
arrowLeft: "←",
|
|
2422
|
+
arrowRight: "→",
|
|
2423
|
+
radioOn: "◉",
|
|
2424
|
+
radioOff: "◯",
|
|
2425
|
+
tick: "✔",
|
|
2426
|
+
cross: "✖",
|
|
2427
|
+
ellipsis: "…",
|
|
2428
|
+
pointerSmall: "›",
|
|
2429
|
+
line: "─",
|
|
2430
|
+
pointer: "❯"
|
|
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: "√",
|
|
2440
|
+
cross: "×",
|
|
2441
2441
|
ellipsis: "...",
|
|
2442
|
-
pointerSmall: "
|
|
2443
|
-
line: "
|
|
2442
|
+
pointerSmall: "»",
|
|
2443
|
+
line: "─",
|
|
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: "↑",
|
|
4944
|
+
arrowDown: "↓",
|
|
4945
|
+
arrowLeft: "←",
|
|
4946
|
+
arrowRight: "→",
|
|
4947
|
+
radioOn: "◉",
|
|
4948
|
+
radioOff: "◯",
|
|
4949
|
+
tick: "✔",
|
|
4950
|
+
cross: "✖",
|
|
4951
|
+
ellipsis: "…",
|
|
4952
|
+
pointerSmall: "›",
|
|
4953
|
+
line: "─",
|
|
4954
|
+
pointer: "❯"
|
|
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: "√",
|
|
4964
|
+
cross: "×",
|
|
4965
4965
|
ellipsis: "...",
|
|
4966
|
-
pointerSmall: "
|
|
4967
|
-
line: "
|
|
4966
|
+
pointerSmall: "»",
|
|
4967
|
+
line: "─",
|
|
4968
4968
|
pointer: ">"
|
|
4969
4969
|
};
|
|
4970
4970
|
var figures = process.platform === "win32" ? win : main;
|
|
@@ -12602,68 +12602,75 @@ 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
|
+
|
|
12605
12612
|
// node_modules/cli-boxes/boxes.json
|
|
12606
12613
|
var require_boxes = __commonJS((exports, module) => {
|
|
12607
12614
|
module.exports = {
|
|
12608
12615
|
single: {
|
|
12609
|
-
topLeft: "
|
|
12610
|
-
top: "
|
|
12611
|
-
topRight: "
|
|
12612
|
-
right: "
|
|
12613
|
-
bottomRight: "
|
|
12614
|
-
bottom: "
|
|
12615
|
-
bottomLeft: "
|
|
12616
|
-
left: "
|
|
12616
|
+
topLeft: "┌",
|
|
12617
|
+
top: "─",
|
|
12618
|
+
topRight: "┐",
|
|
12619
|
+
right: "│",
|
|
12620
|
+
bottomRight: "┘",
|
|
12621
|
+
bottom: "─",
|
|
12622
|
+
bottomLeft: "└",
|
|
12623
|
+
left: "│"
|
|
12617
12624
|
},
|
|
12618
12625
|
double: {
|
|
12619
|
-
topLeft: "
|
|
12620
|
-
top: "
|
|
12621
|
-
topRight: "
|
|
12622
|
-
right: "
|
|
12623
|
-
bottomRight: "
|
|
12624
|
-
bottom: "
|
|
12625
|
-
bottomLeft: "
|
|
12626
|
-
left: "
|
|
12626
|
+
topLeft: "╔",
|
|
12627
|
+
top: "═",
|
|
12628
|
+
topRight: "╗",
|
|
12629
|
+
right: "║",
|
|
12630
|
+
bottomRight: "╝",
|
|
12631
|
+
bottom: "═",
|
|
12632
|
+
bottomLeft: "╚",
|
|
12633
|
+
left: "║"
|
|
12627
12634
|
},
|
|
12628
12635
|
round: {
|
|
12629
|
-
topLeft: "
|
|
12630
|
-
top: "
|
|
12631
|
-
topRight: "
|
|
12632
|
-
right: "
|
|
12633
|
-
bottomRight: "
|
|
12634
|
-
bottom: "
|
|
12635
|
-
bottomLeft: "
|
|
12636
|
-
left: "
|
|
12636
|
+
topLeft: "╭",
|
|
12637
|
+
top: "─",
|
|
12638
|
+
topRight: "╮",
|
|
12639
|
+
right: "│",
|
|
12640
|
+
bottomRight: "╯",
|
|
12641
|
+
bottom: "─",
|
|
12642
|
+
bottomLeft: "╰",
|
|
12643
|
+
left: "│"
|
|
12637
12644
|
},
|
|
12638
12645
|
bold: {
|
|
12639
|
-
topLeft: "
|
|
12640
|
-
top: "
|
|
12641
|
-
topRight: "
|
|
12642
|
-
right: "
|
|
12643
|
-
bottomRight: "
|
|
12644
|
-
bottom: "
|
|
12645
|
-
bottomLeft: "
|
|
12646
|
-
left: "
|
|
12646
|
+
topLeft: "┏",
|
|
12647
|
+
top: "━",
|
|
12648
|
+
topRight: "┓",
|
|
12649
|
+
right: "┃",
|
|
12650
|
+
bottomRight: "┛",
|
|
12651
|
+
bottom: "━",
|
|
12652
|
+
bottomLeft: "┗",
|
|
12653
|
+
left: "┃"
|
|
12647
12654
|
},
|
|
12648
12655
|
singleDouble: {
|
|
12649
|
-
topLeft: "
|
|
12650
|
-
top: "
|
|
12651
|
-
topRight: "
|
|
12652
|
-
right: "
|
|
12653
|
-
bottomRight: "
|
|
12654
|
-
bottom: "
|
|
12655
|
-
bottomLeft: "
|
|
12656
|
-
left: "
|
|
12656
|
+
topLeft: "╓",
|
|
12657
|
+
top: "─",
|
|
12658
|
+
topRight: "╖",
|
|
12659
|
+
right: "║",
|
|
12660
|
+
bottomRight: "╜",
|
|
12661
|
+
bottom: "─",
|
|
12662
|
+
bottomLeft: "╙",
|
|
12663
|
+
left: "║"
|
|
12657
12664
|
},
|
|
12658
12665
|
doubleSingle: {
|
|
12659
|
-
topLeft: "
|
|
12660
|
-
top: "
|
|
12661
|
-
topRight: "
|
|
12662
|
-
right: "
|
|
12663
|
-
bottomRight: "
|
|
12664
|
-
bottom: "
|
|
12665
|
-
bottomLeft: "
|
|
12666
|
-
left: "
|
|
12666
|
+
topLeft: "╒",
|
|
12667
|
+
top: "═",
|
|
12668
|
+
topRight: "╕",
|
|
12669
|
+
right: "│",
|
|
12670
|
+
bottomRight: "╛",
|
|
12671
|
+
bottom: "═",
|
|
12672
|
+
bottomLeft: "╘",
|
|
12673
|
+
left: "│"
|
|
12667
12674
|
},
|
|
12668
12675
|
classic: {
|
|
12669
12676
|
topLeft: "+",
|
|
@@ -12676,14 +12683,14 @@ var require_boxes = __commonJS((exports, module) => {
|
|
|
12676
12683
|
left: "|"
|
|
12677
12684
|
},
|
|
12678
12685
|
arrow: {
|
|
12679
|
-
topLeft: "
|
|
12680
|
-
top: "
|
|
12681
|
-
topRight: "
|
|
12682
|
-
right: "
|
|
12683
|
-
bottomRight: "
|
|
12684
|
-
bottom: "
|
|
12685
|
-
bottomLeft: "
|
|
12686
|
-
left: "
|
|
12686
|
+
topLeft: "↘",
|
|
12687
|
+
top: "↓",
|
|
12688
|
+
topRight: "↙",
|
|
12689
|
+
right: "←",
|
|
12690
|
+
bottomRight: "↖",
|
|
12691
|
+
bottom: "↑",
|
|
12692
|
+
bottomLeft: "↗",
|
|
12693
|
+
left: "→"
|
|
12687
12694
|
}
|
|
12688
12695
|
};
|
|
12689
12696
|
});
|
|
@@ -12728,7 +12735,7 @@ var require_is_fullwidth_code_point = __commonJS((exports, module) => {
|
|
|
12728
12735
|
});
|
|
12729
12736
|
|
|
12730
12737
|
// node_modules/ansi-align/node_modules/string-width/node_modules/emoji-regex/index.js
|
|
12731
|
-
var
|
|
12738
|
+
var require_emoji_regex2 = __commonJS((exports, module) => {
|
|
12732
12739
|
module.exports = function() {
|
|
12733
12740
|
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;
|
|
12734
12741
|
};
|
|
@@ -12738,7 +12745,7 @@ var require_emoji_regex = __commonJS((exports, module) => {
|
|
|
12738
12745
|
var require_string_width = __commonJS((exports, module) => {
|
|
12739
12746
|
var stripAnsi2 = require_strip_ansi();
|
|
12740
12747
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
12741
|
-
var
|
|
12748
|
+
var emojiRegex2 = require_emoji_regex2();
|
|
12742
12749
|
var stringWidth2 = (string) => {
|
|
12743
12750
|
if (typeof string !== "string" || string.length === 0) {
|
|
12744
12751
|
return 0;
|
|
@@ -12747,7 +12754,7 @@ var require_string_width = __commonJS((exports, module) => {
|
|
|
12747
12754
|
if (string.length === 0) {
|
|
12748
12755
|
return 0;
|
|
12749
12756
|
}
|
|
12750
|
-
string = string.replace(
|
|
12757
|
+
string = string.replace(emojiRegex2(), " ");
|
|
12751
12758
|
let width = 0;
|
|
12752
12759
|
for (let i = 0;i < string.length; i++) {
|
|
12753
12760
|
const code = string.codePointAt(i);
|
|
@@ -12873,7 +12880,7 @@ var onCancel = () => {
|
|
|
12873
12880
|
async function runOnboarding(reconfigure = false) {
|
|
12874
12881
|
console.log("");
|
|
12875
12882
|
console.log(bold(" claude-threads setup"));
|
|
12876
|
-
console.log(dim("
|
|
12883
|
+
console.log(dim(" ─────────────────────────────────"));
|
|
12877
12884
|
console.log("");
|
|
12878
12885
|
let existingConfig = null;
|
|
12879
12886
|
if (reconfigure && existsSync2(CONFIG_PATH)) {
|
|
@@ -12973,7 +12980,7 @@ async function runOnboarding(reconfigure = false) {
|
|
|
12973
12980
|
const platform = await setupSlackPlatform(platformId, displayName, existingPlatform);
|
|
12974
12981
|
config.platforms.push(platform);
|
|
12975
12982
|
}
|
|
12976
|
-
console.log(green(`
|
|
12983
|
+
console.log(green(` ✓ Added ${displayName}`));
|
|
12977
12984
|
console.log("");
|
|
12978
12985
|
if (platformNumber === 1) {
|
|
12979
12986
|
const { addAnother } = await import_prompts.default({
|
|
@@ -12988,17 +12995,17 @@ async function runOnboarding(reconfigure = false) {
|
|
|
12988
12995
|
}
|
|
12989
12996
|
if (config.platforms.length === 0) {
|
|
12990
12997
|
console.log("");
|
|
12991
|
-
console.log(dim("
|
|
12998
|
+
console.log(dim(" ⚠️ No platforms configured. Setup cancelled."));
|
|
12992
12999
|
process.exit(1);
|
|
12993
13000
|
}
|
|
12994
13001
|
saveConfig(config);
|
|
12995
13002
|
console.log("");
|
|
12996
|
-
console.log(green("
|
|
13003
|
+
console.log(green(" ✓ Configuration saved!"));
|
|
12997
13004
|
console.log(dim(` ${CONFIG_PATH}`));
|
|
12998
13005
|
console.log("");
|
|
12999
13006
|
console.log(dim(` Configured ${config.platforms.length} platform(s):`));
|
|
13000
13007
|
for (const platform of config.platforms) {
|
|
13001
|
-
console.log(dim(`
|
|
13008
|
+
console.log(dim(` • ${platform.displayName} (${platform.type})`));
|
|
13002
13009
|
}
|
|
13003
13010
|
console.log("");
|
|
13004
13011
|
console.log(dim(" Starting claude-threads..."));
|
|
@@ -13062,7 +13069,7 @@ async function setupMattermostPlatform(id, displayName, existing) {
|
|
|
13062
13069
|
const finalToken = response.token || existingMattermost?.token;
|
|
13063
13070
|
if (!finalToken) {
|
|
13064
13071
|
console.log("");
|
|
13065
|
-
console.log(dim("
|
|
13072
|
+
console.log(dim(" ⚠️ Token is required. Setup cancelled."));
|
|
13066
13073
|
process.exit(1);
|
|
13067
13074
|
}
|
|
13068
13075
|
return {
|
|
@@ -13142,7 +13149,7 @@ async function setupSlackPlatform(id, displayName, existing) {
|
|
|
13142
13149
|
const finalAppToken = response.appToken || existingSlack?.appToken;
|
|
13143
13150
|
if (!finalBotToken || !finalAppToken) {
|
|
13144
13151
|
console.log("");
|
|
13145
|
-
console.log(dim("
|
|
13152
|
+
console.log(dim(" ⚠️ Both tokens are required. Setup cancelled."));
|
|
13146
13153
|
process.exit(1);
|
|
13147
13154
|
}
|
|
13148
13155
|
return {
|
|
@@ -13365,7 +13372,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13365
13372
|
try {
|
|
13366
13373
|
await this.addReaction(post.id, emoji);
|
|
13367
13374
|
} catch (err) {
|
|
13368
|
-
console.error(`
|
|
13375
|
+
console.error(` ⚠️ Failed to add reaction ${emoji}:`, err);
|
|
13369
13376
|
}
|
|
13370
13377
|
}
|
|
13371
13378
|
return post;
|
|
@@ -13477,7 +13484,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13477
13484
|
}
|
|
13478
13485
|
scheduleReconnect() {
|
|
13479
13486
|
if (this.reconnectAttempts >= this.maxReconnectAttempts) {
|
|
13480
|
-
console.error("
|
|
13487
|
+
console.error(" ⚠️ Max reconnection attempts reached");
|
|
13481
13488
|
return;
|
|
13482
13489
|
}
|
|
13483
13490
|
this.reconnectAttempts++;
|
|
@@ -13485,7 +13492,7 @@ class MattermostClient extends EventEmitter {
|
|
|
13485
13492
|
console.log(` \uD83D\uDD04 Reconnecting... (attempt ${this.reconnectAttempts})`);
|
|
13486
13493
|
setTimeout(() => {
|
|
13487
13494
|
this.connect().catch((err) => {
|
|
13488
|
-
console.error(`
|
|
13495
|
+
console.error(` ❌ Reconnection failed: ${err}`);
|
|
13489
13496
|
});
|
|
13490
13497
|
}, delay);
|
|
13491
13498
|
}
|
|
@@ -13700,10 +13707,10 @@ function isEscapeEmoji(emoji) {
|
|
|
13700
13707
|
return ESCAPE_EMOJIS.includes(emoji);
|
|
13701
13708
|
}
|
|
13702
13709
|
var UNICODE_NUMBER_EMOJIS = {
|
|
13703
|
-
"1
|
|
13704
|
-
"2
|
|
13705
|
-
"3
|
|
13706
|
-
"4
|
|
13710
|
+
"1️⃣": 0,
|
|
13711
|
+
"2️⃣": 1,
|
|
13712
|
+
"3️⃣": 2,
|
|
13713
|
+
"4️⃣": 3
|
|
13707
13714
|
};
|
|
13708
13715
|
function getNumberEmojiIndex(emoji) {
|
|
13709
13716
|
const textIndex = NUMBER_EMOJIS.indexOf(emoji);
|
|
@@ -13730,7 +13737,7 @@ async function buildMessageContent(text, platform, files, debug = false) {
|
|
|
13730
13737
|
for (const file of imageFiles) {
|
|
13731
13738
|
try {
|
|
13732
13739
|
if (!platform.downloadFile) {
|
|
13733
|
-
console.warn(`
|
|
13740
|
+
console.warn(` ⚠️ Platform does not support file downloads, skipping ${file.name}`);
|
|
13734
13741
|
continue;
|
|
13735
13742
|
}
|
|
13736
13743
|
const buffer = await platform.downloadFile(file.id);
|
|
@@ -13747,7 +13754,7 @@ async function buildMessageContent(text, platform, files, debug = false) {
|
|
|
13747
13754
|
console.log(` \uD83D\uDCF7 Attached image: ${file.name} (${file.mimeType}, ${Math.round(buffer.length / 1024)}KB)`);
|
|
13748
13755
|
}
|
|
13749
13756
|
} catch (err) {
|
|
13750
|
-
console.error(`
|
|
13757
|
+
console.error(` ⚠️ Failed to download image ${file.name}:`, err);
|
|
13751
13758
|
}
|
|
13752
13759
|
}
|
|
13753
13760
|
if (text) {
|
|
@@ -14493,11 +14500,11 @@ function formatToolUse(toolName, input, formatter, options = {}) {
|
|
|
14493
14500
|
}
|
|
14494
14501
|
const totalLines = changes.reduce((sum, c) => sum + c.value.split(`
|
|
14495
14502
|
`).length - 1, 0);
|
|
14496
|
-
let diff =
|
|
14503
|
+
let diff = `✏️ ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}
|
|
14497
14504
|
${formatter.formatCodeBlock(diffLines2.join(`
|
|
14498
14505
|
`), "diff")}`;
|
|
14499
14506
|
if (totalLines > maxLines) {
|
|
14500
|
-
diff =
|
|
14507
|
+
diff = `✏️ ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}
|
|
14501
14508
|
`;
|
|
14502
14509
|
diff += formatter.formatCodeBlock(diffLines2.join(`
|
|
14503
14510
|
`) + `
|
|
@@ -14505,7 +14512,7 @@ ${formatter.formatCodeBlock(diffLines2.join(`
|
|
|
14505
14512
|
}
|
|
14506
14513
|
return diff;
|
|
14507
14514
|
}
|
|
14508
|
-
return
|
|
14515
|
+
return `✏️ ${formatter.formatBold("Edit")} ${formatter.formatCode(filePath)}`;
|
|
14509
14516
|
}
|
|
14510
14517
|
case "Write": {
|
|
14511
14518
|
const filePath = short(input.file_path);
|
|
@@ -14563,7 +14570,7 @@ ${formatter.formatCodeBlock(diffLines2.join(`
|
|
|
14563
14570
|
}
|
|
14564
14571
|
return `\uD83D\uDD0C ${formatter.formatBold(mcpParts.tool)} ${formatter.formatItalic(`(${mcpParts.server})`)}`;
|
|
14565
14572
|
}
|
|
14566
|
-
return
|
|
14573
|
+
return `● ${formatter.formatBold(toolName)}`;
|
|
14567
14574
|
}
|
|
14568
14575
|
}
|
|
14569
14576
|
}
|
|
@@ -14714,9 +14721,9 @@ function formatEvent(session, e, ctx) {
|
|
|
14714
14721
|
}
|
|
14715
14722
|
}
|
|
14716
14723
|
if (result.is_error)
|
|
14717
|
-
return `
|
|
14724
|
+
return ` ↳ ❌ Error${elapsed}`;
|
|
14718
14725
|
if (elapsed)
|
|
14719
|
-
return `
|
|
14726
|
+
return ` ↳ ✓${elapsed}`;
|
|
14720
14727
|
return null;
|
|
14721
14728
|
}
|
|
14722
14729
|
case "result": {
|
|
@@ -14728,7 +14735,7 @@ function formatEvent(session, e, ctx) {
|
|
|
14728
14735
|
}
|
|
14729
14736
|
case "system":
|
|
14730
14737
|
if (e.subtype === "error")
|
|
14731
|
-
return
|
|
14738
|
+
return `❌ ${e.error}`;
|
|
14732
14739
|
return null;
|
|
14733
14740
|
case "user": {
|
|
14734
14741
|
const msg = e.message;
|
|
@@ -14747,7 +14754,7 @@ function formatEvent(session, e, ctx) {
|
|
|
14747
14754
|
async function handleExitPlanMode(session, toolUseId, ctx) {
|
|
14748
14755
|
if (session.planApproved) {
|
|
14749
14756
|
if (ctx.debug)
|
|
14750
|
-
console.log("
|
|
14757
|
+
console.log(" ↪ Plan already approved, sending acknowledgment");
|
|
14751
14758
|
if (session.claude.isRunning()) {
|
|
14752
14759
|
session.claude.sendToolResult(toolUseId, "Plan already approved. Proceeding.");
|
|
14753
14760
|
}
|
|
@@ -14755,13 +14762,13 @@ async function handleExitPlanMode(session, toolUseId, ctx) {
|
|
|
14755
14762
|
}
|
|
14756
14763
|
if (session.pendingApproval && session.pendingApproval.type === "plan") {
|
|
14757
14764
|
if (ctx.debug)
|
|
14758
|
-
console.log("
|
|
14765
|
+
console.log(" ↪ Plan approval already pending, waiting");
|
|
14759
14766
|
return;
|
|
14760
14767
|
}
|
|
14761
14768
|
await ctx.flush(session);
|
|
14762
14769
|
session.currentPostId = null;
|
|
14763
14770
|
session.pendingContent = "";
|
|
14764
|
-
const message =
|
|
14771
|
+
const message = `✅ **Plan ready for approval**
|
|
14765
14772
|
|
|
14766
14773
|
` + `\uD83D\uDC4D Approve and start building
|
|
14767
14774
|
` + `\uD83D\uDC4E Request changes
|
|
@@ -14779,7 +14786,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14779
14786
|
try {
|
|
14780
14787
|
await session.platform.updatePost(session.tasksPostId, "\uD83D\uDCCB ~~Tasks~~ *(completed)*");
|
|
14781
14788
|
} catch (err) {
|
|
14782
|
-
console.error("
|
|
14789
|
+
console.error(" ⚠️ Failed to update tasks:", err);
|
|
14783
14790
|
}
|
|
14784
14791
|
}
|
|
14785
14792
|
return;
|
|
@@ -14793,7 +14800,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14793
14800
|
} else if (!hasInProgress) {
|
|
14794
14801
|
session.inProgressTaskStart = null;
|
|
14795
14802
|
}
|
|
14796
|
-
let message = `\uD83D\uDCCB **Tasks** (${completed}/${total}
|
|
14803
|
+
let message = `\uD83D\uDCCB **Tasks** (${completed}/${total} · ${pct}%)
|
|
14797
14804
|
|
|
14798
14805
|
`;
|
|
14799
14806
|
for (const todo of todos) {
|
|
@@ -14801,7 +14808,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14801
14808
|
let text;
|
|
14802
14809
|
switch (todo.status) {
|
|
14803
14810
|
case "completed":
|
|
14804
|
-
icon = "
|
|
14811
|
+
icon = "✅";
|
|
14805
14812
|
text = `~~${todo.content}~~`;
|
|
14806
14813
|
break;
|
|
14807
14814
|
case "in_progress": {
|
|
@@ -14817,7 +14824,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14817
14824
|
break;
|
|
14818
14825
|
}
|
|
14819
14826
|
default:
|
|
14820
|
-
icon = "
|
|
14827
|
+
icon = "○";
|
|
14821
14828
|
text = todo.content;
|
|
14822
14829
|
}
|
|
14823
14830
|
message += `${icon} ${text}
|
|
@@ -14831,7 +14838,7 @@ async function handleTodoWrite(session, input) {
|
|
|
14831
14838
|
session.tasksPostId = post.id;
|
|
14832
14839
|
}
|
|
14833
14840
|
} catch (err) {
|
|
14834
|
-
console.error("
|
|
14841
|
+
console.error(" ⚠️ Failed to update tasks:", err);
|
|
14835
14842
|
}
|
|
14836
14843
|
}
|
|
14837
14844
|
async function handleTaskStart(session, toolUseId, input) {
|
|
@@ -14839,26 +14846,26 @@ async function handleTaskStart(session, toolUseId, input) {
|
|
|
14839
14846
|
const subagentType = input.subagent_type || "general";
|
|
14840
14847
|
const message = `\uD83E\uDD16 **Subagent** *(${subagentType})*
|
|
14841
14848
|
` + `> ${description}
|
|
14842
|
-
` +
|
|
14849
|
+
` + `⏳ Running...`;
|
|
14843
14850
|
try {
|
|
14844
14851
|
const post = await session.platform.createPost(message, session.threadId);
|
|
14845
14852
|
session.activeSubagents.set(toolUseId, post.id);
|
|
14846
14853
|
} catch (err) {
|
|
14847
|
-
console.error("
|
|
14854
|
+
console.error(" ⚠️ Failed to post subagent status:", err);
|
|
14848
14855
|
}
|
|
14849
14856
|
}
|
|
14850
14857
|
async function handleTaskComplete(session, toolUseId, postId) {
|
|
14851
14858
|
try {
|
|
14852
|
-
await session.platform.updatePost(postId, session.activeSubagents.has(toolUseId) ? `\uD83E\uDD16 **Subagent**
|
|
14859
|
+
await session.platform.updatePost(postId, session.activeSubagents.has(toolUseId) ? `\uD83E\uDD16 **Subagent** ✅ *completed*` : `\uD83E\uDD16 **Subagent** ✅`);
|
|
14853
14860
|
session.activeSubagents.delete(toolUseId);
|
|
14854
14861
|
} catch (err) {
|
|
14855
|
-
console.error("
|
|
14862
|
+
console.error(" ⚠️ Failed to update subagent completion:", err);
|
|
14856
14863
|
}
|
|
14857
14864
|
}
|
|
14858
14865
|
async function handleAskUserQuestion(session, toolUseId, input, ctx) {
|
|
14859
14866
|
if (session.pendingQuestionSet) {
|
|
14860
14867
|
if (ctx.debug)
|
|
14861
|
-
console.log("
|
|
14868
|
+
console.log(" ↪ Questions already pending, waiting");
|
|
14862
14869
|
return;
|
|
14863
14870
|
}
|
|
14864
14871
|
await ctx.flush(session);
|
|
@@ -14889,13 +14896,13 @@ async function postCurrentQuestion(session, ctx) {
|
|
|
14889
14896
|
return;
|
|
14890
14897
|
const q = questions[currentIndex];
|
|
14891
14898
|
const total = questions.length;
|
|
14892
|
-
let message =
|
|
14899
|
+
let message = `❓ **Question** *(${currentIndex + 1}/${total})*
|
|
14893
14900
|
`;
|
|
14894
14901
|
message += `**${q.header}:** ${q.question}
|
|
14895
14902
|
|
|
14896
14903
|
`;
|
|
14897
14904
|
for (let i = 0;i < q.options.length && i < 4; i++) {
|
|
14898
|
-
const emoji = ["1
|
|
14905
|
+
const emoji = ["1️⃣", "2️⃣", "3️⃣", "4️⃣"][i];
|
|
14899
14906
|
message += `${emoji} **${q.options[i].label}**`;
|
|
14900
14907
|
if (q.options[i].description) {
|
|
14901
14908
|
message += ` - ${q.options[i].description}`;
|
|
@@ -14925,9 +14932,9 @@ async function handleQuestionReaction(session, postId, emojiName, username, ctx)
|
|
|
14925
14932
|
if (ctx.debug)
|
|
14926
14933
|
console.log(` \uD83D\uDCAC @${username} answered "${question.header}": ${selectedOption.label}`);
|
|
14927
14934
|
try {
|
|
14928
|
-
await session.platform.updatePost(postId,
|
|
14935
|
+
await session.platform.updatePost(postId, `✅ **${question.header}**: ${selectedOption.label}`);
|
|
14929
14936
|
} catch (err) {
|
|
14930
|
-
console.error("
|
|
14937
|
+
console.error(" ⚠️ Failed to update answered question:", err);
|
|
14931
14938
|
}
|
|
14932
14939
|
session.pendingQuestionSet.currentIndex++;
|
|
14933
14940
|
if (session.pendingQuestionSet.currentIndex < questions.length) {
|
|
@@ -14947,7 +14954,7 @@ async function handleQuestionReaction(session, postId, emojiName, username, ctx)
|
|
|
14947
14954
|
`;
|
|
14948
14955
|
}
|
|
14949
14956
|
if (ctx.debug)
|
|
14950
|
-
console.log("
|
|
14957
|
+
console.log(" ✅ All questions answered");
|
|
14951
14958
|
const toolUseId = session.pendingQuestionSet.toolUseId;
|
|
14952
14959
|
session.pendingQuestionSet = null;
|
|
14953
14960
|
if (session.claude.isRunning()) {
|
|
@@ -14965,12 +14972,12 @@ async function handleApprovalReaction(session, emojiName, username, ctx) {
|
|
|
14965
14972
|
return;
|
|
14966
14973
|
const { postId, toolUseId } = session.pendingApproval;
|
|
14967
14974
|
const shortId = session.threadId.substring(0, 8);
|
|
14968
|
-
console.log(` ${isApprove ? "
|
|
14975
|
+
console.log(` ${isApprove ? "✅" : "❌"} Plan ${isApprove ? "approved" : "rejected"} (${shortId}…) by @${username}`);
|
|
14969
14976
|
try {
|
|
14970
|
-
const statusMessage = isApprove ?
|
|
14977
|
+
const statusMessage = isApprove ? `✅ **Plan approved** by @${username} - starting implementation...` : `❌ **Changes requested** by @${username}`;
|
|
14971
14978
|
await session.platform.updatePost(postId, statusMessage);
|
|
14972
14979
|
} catch (err) {
|
|
14973
|
-
console.error("
|
|
14980
|
+
console.error(" ⚠️ Failed to update approval post:", err);
|
|
14974
14981
|
}
|
|
14975
14982
|
session.pendingApproval = null;
|
|
14976
14983
|
if (isApprove) {
|
|
@@ -14995,22 +15002,22 @@ async function handleMessageApprovalReaction(session, emoji, approver, ctx) {
|
|
|
14995
15002
|
if (!isAllow && !isInvite && !isDeny)
|
|
14996
15003
|
return;
|
|
14997
15004
|
if (isAllow) {
|
|
14998
|
-
await session.platform.updatePost(pending.postId,
|
|
15005
|
+
await session.platform.updatePost(pending.postId, `✅ Message from @${pending.fromUser} approved by @${approver}`);
|
|
14999
15006
|
session.claude.sendMessage(pending.originalMessage);
|
|
15000
15007
|
session.lastActivityAt = new Date;
|
|
15001
15008
|
ctx.startTyping(session);
|
|
15002
|
-
console.log(`
|
|
15009
|
+
console.log(` ✅ Message from @${pending.fromUser} approved by @${approver}`);
|
|
15003
15010
|
} else if (isInvite) {
|
|
15004
15011
|
session.sessionAllowedUsers.add(pending.fromUser);
|
|
15005
|
-
await session.platform.updatePost(pending.postId,
|
|
15012
|
+
await session.platform.updatePost(pending.postId, `✅ @${pending.fromUser} invited to session by @${approver}`);
|
|
15006
15013
|
await ctx.updateSessionHeader(session);
|
|
15007
15014
|
session.claude.sendMessage(pending.originalMessage);
|
|
15008
15015
|
session.lastActivityAt = new Date;
|
|
15009
15016
|
ctx.startTyping(session);
|
|
15010
15017
|
console.log(` \uD83D\uDC4B @${pending.fromUser} invited to session by @${approver}`);
|
|
15011
15018
|
} else if (isDeny) {
|
|
15012
|
-
await session.platform.updatePost(pending.postId,
|
|
15013
|
-
console.log(`
|
|
15019
|
+
await session.platform.updatePost(pending.postId, `❌ Message from @${pending.fromUser} denied by @${approver}`);
|
|
15020
|
+
console.log(` ❌ Message from @${pending.fromUser} denied by @${approver}`);
|
|
15014
15021
|
}
|
|
15015
15022
|
session.pendingMessageApproval = null;
|
|
15016
15023
|
}
|
|
@@ -15098,7 +15105,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
15098
15105
|
}
|
|
15099
15106
|
});
|
|
15100
15107
|
this.process.on("error", (err) => {
|
|
15101
|
-
console.error("
|
|
15108
|
+
console.error(" ❌ Claude error:", err);
|
|
15102
15109
|
this.emit("error", err);
|
|
15103
15110
|
});
|
|
15104
15111
|
this.process.on("exit", (code) => {
|
|
@@ -15189,19 +15196,19 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
15189
15196
|
// src/session/commands.ts
|
|
15190
15197
|
import { randomUUID } from "crypto";
|
|
15191
15198
|
import { resolve as resolve5 } from "path";
|
|
15192
|
-
import { existsSync as
|
|
15199
|
+
import { existsSync as existsSync6, statSync } from "fs";
|
|
15193
15200
|
|
|
15194
15201
|
// node_modules/update-notifier/update-notifier.js
|
|
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";
|
|
15202
|
+
import process10 from "node:process";
|
|
15203
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
15204
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
15205
|
+
import path8 from "node:path";
|
|
15206
|
+
import { format } from "node:util";
|
|
15200
15207
|
|
|
15201
15208
|
// node_modules/configstore/index.js
|
|
15202
15209
|
var import_graceful_fs = __toESM(require_graceful_fs(), 1);
|
|
15203
|
-
import path4 from "path";
|
|
15204
|
-
import os2 from "os";
|
|
15210
|
+
import path4 from "node:path";
|
|
15211
|
+
import os2 from "node:os";
|
|
15205
15212
|
|
|
15206
15213
|
// node_modules/xdg-basedir/index.js
|
|
15207
15214
|
import os from "os";
|
|
@@ -15223,11 +15230,11 @@ if (xdgConfig) {
|
|
|
15223
15230
|
}
|
|
15224
15231
|
|
|
15225
15232
|
// node_modules/atomically/dist/index.js
|
|
15226
|
-
import path3 from "path";
|
|
15233
|
+
import path3 from "node:path";
|
|
15227
15234
|
|
|
15228
15235
|
// node_modules/stubborn-fs/dist/index.js
|
|
15229
|
-
import fs from "fs";
|
|
15230
|
-
import { promisify } from "util";
|
|
15236
|
+
import fs from "node:fs";
|
|
15237
|
+
import { promisify } from "node:util";
|
|
15231
15238
|
|
|
15232
15239
|
// node_modules/stubborn-utils/dist/attemptify_async.js
|
|
15233
15240
|
var attemptifyAsync = (fn, options) => {
|
|
@@ -15304,7 +15311,7 @@ var retryifySync = (fn, options) => {
|
|
|
15304
15311
|
var retryify_sync_default = retryifySync;
|
|
15305
15312
|
|
|
15306
15313
|
// node_modules/stubborn-fs/dist/constants.js
|
|
15307
|
-
import process2 from "process";
|
|
15314
|
+
import process2 from "node:process";
|
|
15308
15315
|
|
|
15309
15316
|
// node_modules/stubborn-fs/dist/handlers.js
|
|
15310
15317
|
var Handlers = {
|
|
@@ -15396,7 +15403,7 @@ var FS = {
|
|
|
15396
15403
|
var dist_default = FS;
|
|
15397
15404
|
|
|
15398
15405
|
// node_modules/atomically/dist/constants.js
|
|
15399
|
-
import process3 from "process";
|
|
15406
|
+
import process3 from "node:process";
|
|
15400
15407
|
var DEFAULT_ENCODING = "utf8";
|
|
15401
15408
|
var DEFAULT_FILE_MODE = 438;
|
|
15402
15409
|
var DEFAULT_FOLDER_MODE = 511;
|
|
@@ -15420,13 +15427,13 @@ var isUndefined = (value) => {
|
|
|
15420
15427
|
};
|
|
15421
15428
|
|
|
15422
15429
|
// node_modules/atomically/dist/utils/temp.js
|
|
15423
|
-
import path2 from "path";
|
|
15430
|
+
import path2 from "node:path";
|
|
15424
15431
|
|
|
15425
15432
|
// node_modules/when-exit/dist/node/interceptor.js
|
|
15426
|
-
import process5 from "process";
|
|
15433
|
+
import process5 from "node:process";
|
|
15427
15434
|
|
|
15428
15435
|
// node_modules/when-exit/dist/node/constants.js
|
|
15429
|
-
import process4 from "process";
|
|
15436
|
+
import process4 from "node:process";
|
|
15430
15437
|
var IS_LINUX = process4.platform === "linux";
|
|
15431
15438
|
var IS_WINDOWS = process4.platform === "win32";
|
|
15432
15439
|
|
|
@@ -16092,9 +16099,9 @@ var ansiStyles = assembleStyles();
|
|
|
16092
16099
|
var ansi_styles_default = ansiStyles;
|
|
16093
16100
|
|
|
16094
16101
|
// node_modules/update-notifier/node_modules/chalk/source/vendor/supports-color/index.js
|
|
16095
|
-
import process6 from "process";
|
|
16096
|
-
import os3 from "os";
|
|
16097
|
-
import tty from "tty";
|
|
16102
|
+
import process6 from "node:process";
|
|
16103
|
+
import os3 from "node:os";
|
|
16104
|
+
import tty from "node:tty";
|
|
16098
16105
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process6.argv) {
|
|
16099
16106
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
16100
16107
|
const position = argv.indexOf(prefix + flag);
|
|
@@ -17321,7 +17328,7 @@ async function latestVersion(packageName, options) {
|
|
|
17321
17328
|
}
|
|
17322
17329
|
|
|
17323
17330
|
// node_modules/is-npm/index.js
|
|
17324
|
-
import process7 from "process";
|
|
17331
|
+
import process7 from "node:process";
|
|
17325
17332
|
var packageJson2 = process7.env.npm_package_json;
|
|
17326
17333
|
var userAgent = process7.env.npm_config_user_agent;
|
|
17327
17334
|
var isNpm = Boolean(userAgent?.startsWith("npm")) || Boolean(packageJson2?.endsWith("package.json"));
|
|
@@ -17331,16 +17338,16 @@ var isBun = Boolean(userAgent?.startsWith("bun"));
|
|
|
17331
17338
|
var isNpmOrYarn = isNpm || isYarn;
|
|
17332
17339
|
|
|
17333
17340
|
// node_modules/is-installed-globally/index.js
|
|
17334
|
-
import fs4 from "fs";
|
|
17335
|
-
import path7 from "path";
|
|
17336
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
17341
|
+
import fs4 from "node:fs";
|
|
17342
|
+
import path7 from "node:path";
|
|
17343
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
17337
17344
|
|
|
17338
17345
|
// node_modules/global-directory/index.js
|
|
17339
17346
|
var import_ini = __toESM(require_ini3(), 1);
|
|
17340
|
-
import process8 from "process";
|
|
17341
|
-
import path5 from "path";
|
|
17342
|
-
import os4 from "os";
|
|
17343
|
-
import fs3 from "fs";
|
|
17347
|
+
import process8 from "node:process";
|
|
17348
|
+
import path5 from "node:path";
|
|
17349
|
+
import os4 from "node:os";
|
|
17350
|
+
import fs3 from "node:fs";
|
|
17344
17351
|
var isWindows = process8.platform === "win32";
|
|
17345
17352
|
var readRc = (filePath) => {
|
|
17346
17353
|
try {
|
|
@@ -17427,7 +17434,7 @@ globalDirectory.yarn.binaries = path5.join(globalDirectory.yarn.packages, ".bin"
|
|
|
17427
17434
|
var global_directory_default = globalDirectory;
|
|
17428
17435
|
|
|
17429
17436
|
// node_modules/is-path-inside/index.js
|
|
17430
|
-
import path6 from "path";
|
|
17437
|
+
import path6 from "node:path";
|
|
17431
17438
|
function isPathInside(childPath, parentPath) {
|
|
17432
17439
|
const relation = path6.relative(parentPath, childPath);
|
|
17433
17440
|
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path6.sep}`) && relation !== path6.resolve(childPath));
|
|
@@ -17445,7 +17452,7 @@ var isInstalledGlobally = (() => {
|
|
|
17445
17452
|
var is_installed_globally_default = isInstalledGlobally;
|
|
17446
17453
|
|
|
17447
17454
|
// node_modules/update-notifier/node_modules/boxen/index.js
|
|
17448
|
-
import process9 from "process";
|
|
17455
|
+
import process9 from "node:process";
|
|
17449
17456
|
|
|
17450
17457
|
// node_modules/ansi-regex/index.js
|
|
17451
17458
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
@@ -17490,12 +17497,8 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
17490
17497
|
return 1;
|
|
17491
17498
|
}
|
|
17492
17499
|
|
|
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
|
-
|
|
17498
17500
|
// node_modules/update-notifier/node_modules/boxen/node_modules/string-width/index.js
|
|
17501
|
+
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
17499
17502
|
var segmenter = new Intl.Segmenter;
|
|
17500
17503
|
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
17501
17504
|
function stringWidth(string, options = {}) {
|
|
@@ -17534,7 +17537,7 @@ function stringWidth(string, options = {}) {
|
|
|
17534
17537
|
if (defaultIgnorableCodePointRegex.test(character)) {
|
|
17535
17538
|
continue;
|
|
17536
17539
|
}
|
|
17537
|
-
if (
|
|
17540
|
+
if (import_emoji_regex.default().test(character)) {
|
|
17538
17541
|
width += 2;
|
|
17539
17542
|
continue;
|
|
17540
17543
|
}
|
|
@@ -17821,7 +17824,7 @@ var ansi_styles_default2 = ansiStyles2;
|
|
|
17821
17824
|
// node_modules/update-notifier/node_modules/boxen/node_modules/wrap-ansi/index.js
|
|
17822
17825
|
var ESCAPES = new Set([
|
|
17823
17826
|
"\x1B",
|
|
17824
|
-
"
|
|
17827
|
+
""
|
|
17825
17828
|
]);
|
|
17826
17829
|
var END_CODE = 39;
|
|
17827
17830
|
var ANSI_ESCAPE_BELL = "\x07";
|
|
@@ -18254,7 +18257,7 @@ function boxen(text, options) {
|
|
|
18254
18257
|
}
|
|
18255
18258
|
|
|
18256
18259
|
// node_modules/is-in-ci/index.js
|
|
18257
|
-
import { env as env3 } from "process";
|
|
18260
|
+
import { env as env3 } from "node:process";
|
|
18258
18261
|
var isInCi = env3.CI !== "0" && env3.CI !== "false" && (("CI" in env3) || ("CONTINUOUS_INTEGRATION" in env3) || Object.keys(env3).some((key) => key.startsWith("CI_")));
|
|
18259
18262
|
var is_in_ci_default = isInCi;
|
|
18260
18263
|
|
|
@@ -18294,8 +18297,8 @@ function pupa(template, data, { ignoreMissing = false, transform = ({ value }) =
|
|
|
18294
18297
|
if (typeof data !== "object") {
|
|
18295
18298
|
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
|
18296
18299
|
}
|
|
18297
|
-
const escapedLeftBrace = "
|
|
18298
|
-
const escapedRightBrace = "
|
|
18300
|
+
const escapedLeftBrace = "";
|
|
18301
|
+
const escapedRightBrace = "";
|
|
18299
18302
|
template = template.replace(/\\{/g, escapedLeftBrace);
|
|
18300
18303
|
template = template.replace(/\\}/g, escapedRightBrace);
|
|
18301
18304
|
const parseKeyPath = (key) => {
|
|
@@ -18442,7 +18445,7 @@ class UpdateNotifier {
|
|
|
18442
18445
|
...options
|
|
18443
18446
|
};
|
|
18444
18447
|
const installCommand = options.isGlobal ? `npm i -g ${this._packageName}` : `npm i ${this._packageName}`;
|
|
18445
|
-
const defaultTemplate = "Update available " + source_default.dim("{currentVersion}") + source_default.reset("
|
|
18448
|
+
const defaultTemplate = "Update available " + source_default.dim("{currentVersion}") + source_default.reset(" → ") + source_default.green("{latestVersion}") + `
|
|
18446
18449
|
Run ` + source_default.cyan("{updateCommand}") + " to update";
|
|
18447
18450
|
const template = options.message || defaultTemplate;
|
|
18448
18451
|
options.boxenOptions ??= {
|
|
@@ -18478,23 +18481,48 @@ function updateNotifier(options) {
|
|
|
18478
18481
|
|
|
18479
18482
|
// src/update-notifier.ts
|
|
18480
18483
|
var import_semver2 = __toESM(require_semver2(), 1);
|
|
18481
|
-
|
|
18482
|
-
|
|
18484
|
+
|
|
18485
|
+
// src/version.ts
|
|
18486
|
+
import { readFileSync as readFileSync4, existsSync as existsSync4 } from "fs";
|
|
18487
|
+
import { dirname as dirname3, resolve as resolve3 } from "path";
|
|
18483
18488
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
18484
|
-
var __dirname4 = fileURLToPath4(
|
|
18489
|
+
var __dirname4 = dirname3(fileURLToPath4(import.meta.url));
|
|
18490
|
+
function loadPackageJson() {
|
|
18491
|
+
const candidates = [
|
|
18492
|
+
resolve3(__dirname4, "..", "package.json"),
|
|
18493
|
+
resolve3(__dirname4, "..", "..", "package.json"),
|
|
18494
|
+
resolve3(process.cwd(), "package.json")
|
|
18495
|
+
];
|
|
18496
|
+
for (const candidate of candidates) {
|
|
18497
|
+
if (existsSync4(candidate)) {
|
|
18498
|
+
try {
|
|
18499
|
+
const pkg = JSON.parse(readFileSync4(candidate, "utf-8"));
|
|
18500
|
+
if (pkg.name === "claude-threads") {
|
|
18501
|
+
return { version: pkg.version, name: pkg.name };
|
|
18502
|
+
}
|
|
18503
|
+
} catch {}
|
|
18504
|
+
}
|
|
18505
|
+
}
|
|
18506
|
+
return { version: "unknown", name: "claude-threads" };
|
|
18507
|
+
}
|
|
18508
|
+
var pkgInfo = loadPackageJson();
|
|
18509
|
+
var VERSION = pkgInfo.version;
|
|
18510
|
+
var PACKAGE_NAME = pkgInfo.name;
|
|
18511
|
+
var PKG = pkgInfo;
|
|
18512
|
+
|
|
18513
|
+
// src/update-notifier.ts
|
|
18485
18514
|
var cachedUpdateInfo;
|
|
18486
18515
|
function checkForUpdates() {
|
|
18487
18516
|
if (process.env.NO_UPDATE_NOTIFIER)
|
|
18488
18517
|
return;
|
|
18489
18518
|
try {
|
|
18490
|
-
const pkg = JSON.parse(readFileSync4(resolve3(__dirname4, "..", "package.json"), "utf-8"));
|
|
18491
18519
|
const notifier = updateNotifier({
|
|
18492
|
-
pkg,
|
|
18520
|
+
pkg: PKG,
|
|
18493
18521
|
updateCheckInterval: 1000 * 60 * 30
|
|
18494
18522
|
});
|
|
18495
18523
|
cachedUpdateInfo = notifier.update;
|
|
18496
18524
|
notifier.notify({
|
|
18497
|
-
message: `Update available: {currentVersion}
|
|
18525
|
+
message: `Update available: {currentVersion} → {latestVersion}
|
|
18498
18526
|
Run: npm install -g claude-threads`
|
|
18499
18527
|
});
|
|
18500
18528
|
} catch {}
|
|
@@ -18511,10 +18539,10 @@ function getUpdateInfo() {
|
|
|
18511
18539
|
}
|
|
18512
18540
|
|
|
18513
18541
|
// src/changelog.ts
|
|
18514
|
-
import { readFileSync as readFileSync5, existsSync as
|
|
18515
|
-
import { dirname as
|
|
18542
|
+
import { readFileSync as readFileSync5, existsSync as existsSync5 } from "fs";
|
|
18543
|
+
import { dirname as dirname4, resolve as resolve4 } from "path";
|
|
18516
18544
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
18517
|
-
var __dirname5 =
|
|
18545
|
+
var __dirname5 = dirname4(fileURLToPath5(import.meta.url));
|
|
18518
18546
|
function getReleaseNotes(version) {
|
|
18519
18547
|
const possiblePaths = [
|
|
18520
18548
|
resolve4(__dirname5, "..", "CHANGELOG.md"),
|
|
@@ -18522,7 +18550,7 @@ function getReleaseNotes(version) {
|
|
|
18522
18550
|
];
|
|
18523
18551
|
let changelogPath = null;
|
|
18524
18552
|
for (const p of possiblePaths) {
|
|
18525
|
-
if (
|
|
18553
|
+
if (existsSync5(p)) {
|
|
18526
18554
|
changelogPath = p;
|
|
18527
18555
|
break;
|
|
18528
18556
|
}
|
|
@@ -18593,7 +18621,7 @@ function formatReleaseNotes(notes) {
|
|
|
18593
18621
|
for (const [section, items] of Object.entries(notes.sections)) {
|
|
18594
18622
|
if (items.length === 0)
|
|
18595
18623
|
continue;
|
|
18596
|
-
const emoji = section === "Added" ? "
|
|
18624
|
+
const emoji = section === "Added" ? "✨" : section === "Fixed" ? "\uD83D\uDC1B" : section === "Changed" ? "\uD83D\uDD04" : section === "Removed" ? "\uD83D\uDDD1️" : "•";
|
|
18597
18625
|
msg += `**${emoji} ${section}**
|
|
18598
18626
|
`;
|
|
18599
18627
|
for (const item of items) {
|
|
@@ -18634,15 +18662,15 @@ var colors = {
|
|
|
18634
18662
|
orange: "\x1B[38;5;209m"
|
|
18635
18663
|
};
|
|
18636
18664
|
var CLI_LOGO = `
|
|
18637
|
-
${colors.orange}
|
|
18638
|
-
${colors.orange}
|
|
18639
|
-
${colors.orange}
|
|
18665
|
+
${colors.orange} ✴${colors.reset} ${colors.blue}▄█▀ ███${colors.reset} ${colors.orange}✴${colors.reset} ${colors.bold}claude-threads${colors.reset}
|
|
18666
|
+
${colors.orange}✴${colors.reset} ${colors.blue}█▀ █${colors.reset} ${colors.orange}✴${colors.reset} ${colors.dim}Chat × Claude Code${colors.reset}
|
|
18667
|
+
${colors.orange}✴${colors.reset} ${colors.blue}▀█▄ █${colors.reset} ${colors.orange}✴${colors.reset}
|
|
18640
18668
|
`;
|
|
18641
18669
|
function getLogo(version) {
|
|
18642
18670
|
return `\`\`\`
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18671
|
+
✴ ▄█▀ ███ ✴ claude-threads v${version}
|
|
18672
|
+
✴ █▀ █ ✴ Chat × Claude Code
|
|
18673
|
+
✴ ▀█▄ █ ✴
|
|
18646
18674
|
\`\`\``;
|
|
18647
18675
|
}
|
|
18648
18676
|
function printLogo() {
|
|
@@ -18650,48 +18678,43 @@ function printLogo() {
|
|
|
18650
18678
|
}
|
|
18651
18679
|
|
|
18652
18680
|
// src/session/commands.ts
|
|
18653
|
-
import { readFileSync as readFileSync6 } from "fs";
|
|
18654
|
-
import { dirname as dirname4 } from "path";
|
|
18655
|
-
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
18656
|
-
var __dirname6 = dirname4(fileURLToPath6(import.meta.url));
|
|
18657
|
-
var pkg = JSON.parse(readFileSync6(resolve5(__dirname6, "..", "..", "package.json"), "utf-8"));
|
|
18658
18681
|
async function cancelSession(session, username, ctx) {
|
|
18659
18682
|
const shortId = session.threadId.substring(0, 8);
|
|
18660
|
-
console.log(` \uD83D\uDED1 Session (${shortId}
|
|
18683
|
+
console.log(` \uD83D\uDED1 Session (${shortId}…) cancelled by @${username}`);
|
|
18661
18684
|
await session.platform.createPost(`\uD83D\uDED1 **Session cancelled** by @${username}`, session.threadId);
|
|
18662
18685
|
ctx.killSession(session.threadId);
|
|
18663
18686
|
}
|
|
18664
18687
|
async function interruptSession(session, username) {
|
|
18665
18688
|
if (!session.claude.isRunning()) {
|
|
18666
|
-
await session.platform.createPost(
|
|
18689
|
+
await session.platform.createPost(`ℹ️ Session is idle, nothing to interrupt`, session.threadId);
|
|
18667
18690
|
return;
|
|
18668
18691
|
}
|
|
18669
18692
|
const shortId = session.threadId.substring(0, 8);
|
|
18670
18693
|
session.wasInterrupted = true;
|
|
18671
18694
|
const interrupted = session.claude.interrupt();
|
|
18672
18695
|
if (interrupted) {
|
|
18673
|
-
console.log(`
|
|
18674
|
-
await session.platform.createPost(
|
|
18696
|
+
console.log(` ⏸️ Session (${shortId}…) interrupted by @${username}`);
|
|
18697
|
+
await session.platform.createPost(`⏸️ **Interrupted** by @${username}`, session.threadId);
|
|
18675
18698
|
}
|
|
18676
18699
|
}
|
|
18677
18700
|
async function changeDirectory(session, newDir, username, ctx) {
|
|
18678
18701
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
18679
|
-
await session.platform.createPost(
|
|
18702
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can change the working directory`, session.threadId);
|
|
18680
18703
|
return;
|
|
18681
18704
|
}
|
|
18682
18705
|
const expandedDir = newDir.startsWith("~") ? newDir.replace("~", process.env.HOME || "") : newDir;
|
|
18683
18706
|
const absoluteDir = resolve5(expandedDir);
|
|
18684
|
-
if (!
|
|
18685
|
-
await session.platform.createPost(
|
|
18707
|
+
if (!existsSync6(absoluteDir)) {
|
|
18708
|
+
await session.platform.createPost(`❌ Directory does not exist: \`${newDir}\``, session.threadId);
|
|
18686
18709
|
return;
|
|
18687
18710
|
}
|
|
18688
18711
|
if (!statSync(absoluteDir).isDirectory()) {
|
|
18689
|
-
await session.platform.createPost(
|
|
18712
|
+
await session.platform.createPost(`❌ Not a directory: \`${newDir}\``, session.threadId);
|
|
18690
18713
|
return;
|
|
18691
18714
|
}
|
|
18692
18715
|
const shortId = session.threadId.substring(0, 8);
|
|
18693
18716
|
const shortDir = absoluteDir.replace(process.env.HOME || "", "~");
|
|
18694
|
-
console.log(` \uD83D\uDCC2 Session (${shortId}
|
|
18717
|
+
console.log(` \uD83D\uDCC2 Session (${shortId}…) changing directory to ${shortDir}`);
|
|
18695
18718
|
ctx.stopTyping(session);
|
|
18696
18719
|
session.isRestarting = true;
|
|
18697
18720
|
session.claude.kill();
|
|
@@ -18717,8 +18740,8 @@ async function changeDirectory(session, newDir, username, ctx) {
|
|
|
18717
18740
|
session.claude.start();
|
|
18718
18741
|
} catch (err) {
|
|
18719
18742
|
session.isRestarting = false;
|
|
18720
|
-
console.error("
|
|
18721
|
-
await session.platform.createPost(
|
|
18743
|
+
console.error(" ❌ Failed to restart Claude:", err);
|
|
18744
|
+
await session.platform.createPost(`❌ Failed to restart Claude: ${err}`, session.threadId);
|
|
18722
18745
|
return;
|
|
18723
18746
|
}
|
|
18724
18747
|
await updateSessionHeader(session, ctx);
|
|
@@ -18730,26 +18753,26 @@ async function changeDirectory(session, newDir, username, ctx) {
|
|
|
18730
18753
|
}
|
|
18731
18754
|
async function inviteUser(session, invitedUser, invitedBy, ctx) {
|
|
18732
18755
|
if (session.startedBy !== invitedBy && !session.platform.isUserAllowed(invitedBy)) {
|
|
18733
|
-
await session.platform.createPost(
|
|
18756
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can invite others`, session.threadId);
|
|
18734
18757
|
return;
|
|
18735
18758
|
}
|
|
18736
18759
|
session.sessionAllowedUsers.add(invitedUser);
|
|
18737
|
-
await session.platform.createPost(
|
|
18760
|
+
await session.platform.createPost(`✅ @${invitedUser} can now participate in this session (invited by @${invitedBy})`, session.threadId);
|
|
18738
18761
|
console.log(` \uD83D\uDC4B @${invitedUser} invited to session by @${invitedBy}`);
|
|
18739
18762
|
await updateSessionHeader(session, ctx);
|
|
18740
18763
|
ctx.persistSession(session);
|
|
18741
18764
|
}
|
|
18742
18765
|
async function kickUser(session, kickedUser, kickedBy, ctx) {
|
|
18743
18766
|
if (session.startedBy !== kickedBy && !session.platform.isUserAllowed(kickedBy)) {
|
|
18744
|
-
await session.platform.createPost(
|
|
18767
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can kick others`, session.threadId);
|
|
18745
18768
|
return;
|
|
18746
18769
|
}
|
|
18747
18770
|
if (kickedUser === session.startedBy) {
|
|
18748
|
-
await session.platform.createPost(
|
|
18771
|
+
await session.platform.createPost(`⚠️ Cannot kick session owner @${session.startedBy}`, session.threadId);
|
|
18749
18772
|
return;
|
|
18750
18773
|
}
|
|
18751
18774
|
if (session.platform.isUserAllowed(kickedUser)) {
|
|
18752
|
-
await session.platform.createPost(
|
|
18775
|
+
await session.platform.createPost(`⚠️ @${kickedUser} is globally allowed and cannot be kicked from individual sessions`, session.threadId);
|
|
18753
18776
|
return;
|
|
18754
18777
|
}
|
|
18755
18778
|
if (session.sessionAllowedUsers.delete(kickedUser)) {
|
|
@@ -18758,25 +18781,25 @@ async function kickUser(session, kickedUser, kickedBy, ctx) {
|
|
|
18758
18781
|
await updateSessionHeader(session, ctx);
|
|
18759
18782
|
ctx.persistSession(session);
|
|
18760
18783
|
} else {
|
|
18761
|
-
await session.platform.createPost(
|
|
18784
|
+
await session.platform.createPost(`⚠️ @${kickedUser} was not in this session`, session.threadId);
|
|
18762
18785
|
}
|
|
18763
18786
|
}
|
|
18764
18787
|
async function enableInteractivePermissions(session, username, ctx) {
|
|
18765
18788
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
18766
|
-
await session.platform.createPost(
|
|
18789
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can change permissions`, session.threadId);
|
|
18767
18790
|
return;
|
|
18768
18791
|
}
|
|
18769
18792
|
if (!ctx.skipPermissions) {
|
|
18770
|
-
await session.platform.createPost(
|
|
18793
|
+
await session.platform.createPost(`ℹ️ Permissions are already interactive for this session`, session.threadId);
|
|
18771
18794
|
return;
|
|
18772
18795
|
}
|
|
18773
18796
|
if (session.forceInteractivePermissions) {
|
|
18774
|
-
await session.platform.createPost(
|
|
18797
|
+
await session.platform.createPost(`ℹ️ Interactive permissions already enabled for this session`, session.threadId);
|
|
18775
18798
|
return;
|
|
18776
18799
|
}
|
|
18777
18800
|
session.forceInteractivePermissions = true;
|
|
18778
18801
|
const shortId = session.threadId.substring(0, 8);
|
|
18779
|
-
console.log(` \uD83D\uDD10 Session (${shortId}
|
|
18802
|
+
console.log(` \uD83D\uDD10 Session (${shortId}…) enabling interactive permissions`);
|
|
18780
18803
|
ctx.stopTyping(session);
|
|
18781
18804
|
session.isRestarting = true;
|
|
18782
18805
|
session.claude.kill();
|
|
@@ -18799,8 +18822,8 @@ async function enableInteractivePermissions(session, username, ctx) {
|
|
|
18799
18822
|
session.claude.start();
|
|
18800
18823
|
} catch (err) {
|
|
18801
18824
|
session.isRestarting = false;
|
|
18802
|
-
console.error("
|
|
18803
|
-
await session.platform.createPost(
|
|
18825
|
+
console.error(" ❌ Failed to restart Claude:", err);
|
|
18826
|
+
await session.platform.createPost(`❌ Failed to enable interactive permissions: ${err}`, session.threadId);
|
|
18804
18827
|
return;
|
|
18805
18828
|
}
|
|
18806
18829
|
await updateSessionHeader(session, ctx);
|
|
@@ -18820,7 +18843,7 @@ async function requestMessageApproval(session, username, message, ctx) {
|
|
|
18820
18843
|
|
|
18821
18844
|
` + `> ${displayMessage}
|
|
18822
18845
|
|
|
18823
|
-
` + `React: \uD83D\uDC4D Allow once |
|
|
18846
|
+
` + `React: \uD83D\uDC4D Allow once | ✅ Invite to session | \uD83D\uDC4E Deny`;
|
|
18824
18847
|
const post = await session.platform.createInteractivePost(approvalMessage, [APPROVAL_EMOJIS[0], ALLOW_ALL_EMOJIS[0], DENIAL_EMOJIS[0]], session.threadId);
|
|
18825
18848
|
session.pendingMessageApproval = {
|
|
18826
18849
|
postId: post.id,
|
|
@@ -18834,7 +18857,7 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18834
18857
|
return;
|
|
18835
18858
|
const shortDir = session.workingDir.replace(process.env.HOME || "", "~");
|
|
18836
18859
|
const isInteractive = !ctx.skipPermissions || session.forceInteractivePermissions;
|
|
18837
|
-
const permMode = isInteractive ? "\uD83D\uDD10 Interactive" : "
|
|
18860
|
+
const permMode = isInteractive ? "\uD83D\uDD10 Interactive" : "⚡ Auto";
|
|
18838
18861
|
const otherParticipants = [...session.sessionAllowedUsers].filter((u) => u !== session.startedBy).map((u) => `@${u}`).join(", ");
|
|
18839
18862
|
const rows = [
|
|
18840
18863
|
`| \uD83D\uDCC2 **Directory** | \`${shortDir}\` |`,
|
|
@@ -18854,15 +18877,15 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18854
18877
|
}
|
|
18855
18878
|
const updateInfo = getUpdateInfo();
|
|
18856
18879
|
const updateNotice = updateInfo ? `
|
|
18857
|
-
>
|
|
18880
|
+
> ⚠️ **Update available:** v${updateInfo.current} → v${updateInfo.latest} - Run \`npm install -g claude-threads\`
|
|
18858
18881
|
` : "";
|
|
18859
|
-
const releaseNotes = getReleaseNotes(
|
|
18882
|
+
const releaseNotes = getReleaseNotes(VERSION);
|
|
18860
18883
|
const whatsNew = releaseNotes ? getWhatsNewSummary(releaseNotes) : "";
|
|
18861
18884
|
const whatsNewLine = whatsNew ? `
|
|
18862
|
-
>
|
|
18885
|
+
> ✨ **What's new:** ${whatsNew}
|
|
18863
18886
|
` : "";
|
|
18864
18887
|
const msg = [
|
|
18865
|
-
getLogo(
|
|
18888
|
+
getLogo(VERSION),
|
|
18866
18889
|
updateNotice,
|
|
18867
18890
|
whatsNewLine,
|
|
18868
18891
|
`| | |`,
|
|
@@ -18873,17 +18896,12 @@ async function updateSessionHeader(session, ctx) {
|
|
|
18873
18896
|
try {
|
|
18874
18897
|
await session.platform.updatePost(session.sessionStartPostId, msg);
|
|
18875
18898
|
} catch (err) {
|
|
18876
|
-
console.error("
|
|
18899
|
+
console.error(" ⚠️ Failed to update session header:", err);
|
|
18877
18900
|
}
|
|
18878
18901
|
}
|
|
18879
18902
|
|
|
18880
18903
|
// src/session/lifecycle.ts
|
|
18881
18904
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
18882
|
-
import { readFileSync as readFileSync7 } from "fs";
|
|
18883
|
-
import { dirname as dirname5, resolve as resolve6 } from "path";
|
|
18884
|
-
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
18885
|
-
var __dirname7 = dirname5(fileURLToPath7(import.meta.url));
|
|
18886
|
-
var pkg2 = JSON.parse(readFileSync7(resolve6(__dirname7, "..", "..", "package.json"), "utf-8"));
|
|
18887
18905
|
function findPersistedByThreadId(persisted, threadId) {
|
|
18888
18906
|
for (const session of persisted.values()) {
|
|
18889
18907
|
if (session.threadId === threadId) {
|
|
@@ -18905,16 +18923,16 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18905
18923
|
throw new Error(`Platform '${platformId}' not found. Call addPlatform() first.`);
|
|
18906
18924
|
}
|
|
18907
18925
|
if (ctx.sessions.size >= ctx.maxSessions) {
|
|
18908
|
-
await platform.createPost(
|
|
18926
|
+
await platform.createPost(`⚠️ **Too busy** - ${ctx.sessions.size} sessions active. Please try again later.`, replyToPostId);
|
|
18909
18927
|
return;
|
|
18910
18928
|
}
|
|
18911
18929
|
let post;
|
|
18912
18930
|
try {
|
|
18913
|
-
post = await platform.createPost(`${getLogo(
|
|
18931
|
+
post = await platform.createPost(`${getLogo(VERSION)}
|
|
18914
18932
|
|
|
18915
18933
|
*Starting session...*`, replyToPostId);
|
|
18916
18934
|
} catch (err) {
|
|
18917
|
-
console.error(`
|
|
18935
|
+
console.error(` ❌ Failed to create session post:`, err);
|
|
18918
18936
|
return;
|
|
18919
18937
|
}
|
|
18920
18938
|
const actualThreadId = replyToPostId || post.id;
|
|
@@ -18966,7 +18984,7 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18966
18984
|
ctx.sessions.set(sessionId, session);
|
|
18967
18985
|
ctx.registerPost(post.id, actualThreadId);
|
|
18968
18986
|
const shortId = actualThreadId.substring(0, 8);
|
|
18969
|
-
console.log(`
|
|
18987
|
+
console.log(` ▶ Session #${ctx.sessions.size} started (${shortId}…) by @${username}`);
|
|
18970
18988
|
await ctx.updateSessionHeader(session);
|
|
18971
18989
|
ctx.startTyping(session);
|
|
18972
18990
|
claude.on("event", (e) => ctx.handleEvent(sessionId, e));
|
|
@@ -18974,9 +18992,9 @@ async function startSession(options, username, replyToPostId, platformId, ctx) {
|
|
|
18974
18992
|
try {
|
|
18975
18993
|
claude.start();
|
|
18976
18994
|
} catch (err) {
|
|
18977
|
-
console.error("
|
|
18995
|
+
console.error(" ❌ Failed to start Claude:", err);
|
|
18978
18996
|
ctx.stopTyping(session);
|
|
18979
|
-
await session.platform.createPost(
|
|
18997
|
+
await session.platform.createPost(`❌ ${err}`, actualThreadId);
|
|
18980
18998
|
ctx.sessions.delete(session.sessionId);
|
|
18981
18999
|
return;
|
|
18982
19000
|
}
|
|
@@ -18996,17 +19014,17 @@ async function resumeSession(state, ctx) {
|
|
|
18996
19014
|
const shortId = state.threadId.substring(0, 8);
|
|
18997
19015
|
const platform = ctx.platforms.get(state.platformId);
|
|
18998
19016
|
if (!platform) {
|
|
18999
|
-
console.log(`
|
|
19017
|
+
console.log(` ⚠️ Platform ${state.platformId} not registered, skipping resume for ${shortId}...`);
|
|
19000
19018
|
return;
|
|
19001
19019
|
}
|
|
19002
19020
|
const post = await platform.getPost(state.threadId);
|
|
19003
19021
|
if (!post) {
|
|
19004
|
-
console.log(`
|
|
19022
|
+
console.log(` ⚠️ Thread ${shortId}... deleted, skipping resume`);
|
|
19005
19023
|
ctx.sessionStore.remove(`${state.platformId}:${state.threadId}`);
|
|
19006
19024
|
return;
|
|
19007
19025
|
}
|
|
19008
19026
|
if (ctx.sessions.size >= ctx.maxSessions) {
|
|
19009
|
-
console.log(`
|
|
19027
|
+
console.log(` ⚠️ Max sessions reached, skipping resume for ${shortId}...`);
|
|
19010
19028
|
return;
|
|
19011
19029
|
}
|
|
19012
19030
|
const platformId = state.platformId;
|
|
@@ -19068,16 +19086,16 @@ async function resumeSession(state, ctx) {
|
|
|
19068
19086
|
try {
|
|
19069
19087
|
claude.start();
|
|
19070
19088
|
console.log(` \uD83D\uDD04 Resumed session ${shortId}... (@${state.startedBy})`);
|
|
19071
|
-
await session.platform.createPost(`\uD83D\uDD04 **Session resumed** after bot restart (v${
|
|
19089
|
+
await session.platform.createPost(`\uD83D\uDD04 **Session resumed** after bot restart (v${VERSION})
|
|
19072
19090
|
*Reconnected to Claude session. You can continue where you left off.*`, state.threadId);
|
|
19073
19091
|
await ctx.updateSessionHeader(session);
|
|
19074
19092
|
ctx.persistSession(session);
|
|
19075
19093
|
} catch (err) {
|
|
19076
|
-
console.error(`
|
|
19094
|
+
console.error(` ❌ Failed to resume session ${shortId}...:`, err);
|
|
19077
19095
|
ctx.sessions.delete(sessionId);
|
|
19078
19096
|
ctx.sessionStore.remove(sessionId);
|
|
19079
19097
|
try {
|
|
19080
|
-
await session.platform.createPost(
|
|
19098
|
+
await session.platform.createPost(`⚠️ **Could not resume previous session.** Starting fresh.
|
|
19081
19099
|
*Your previous conversation context is preserved, but Claude needs to re-read it.*`, state.threadId);
|
|
19082
19100
|
} catch {}
|
|
19083
19101
|
}
|
|
@@ -19107,7 +19125,7 @@ async function resumePausedSession(threadId, message, files, ctx) {
|
|
|
19107
19125
|
session.lastActivityAt = new Date;
|
|
19108
19126
|
ctx.startTyping(session);
|
|
19109
19127
|
} else {
|
|
19110
|
-
console.log(`
|
|
19128
|
+
console.log(` ⚠️ Failed to resume session ${shortId}..., could not send message`);
|
|
19111
19129
|
}
|
|
19112
19130
|
}
|
|
19113
19131
|
async function handleExit(sessionId, code, ctx) {
|
|
@@ -19148,9 +19166,9 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19148
19166
|
}
|
|
19149
19167
|
}
|
|
19150
19168
|
try {
|
|
19151
|
-
await session.platform.createPost(
|
|
19169
|
+
await session.platform.createPost(`ℹ️ Session paused. Send a new message to continue.`, session.threadId);
|
|
19152
19170
|
} catch {}
|
|
19153
|
-
console.log(`
|
|
19171
|
+
console.log(` ⏸️ Session paused (${shortId}…) — ${ctx.sessions.size} active`);
|
|
19154
19172
|
return;
|
|
19155
19173
|
}
|
|
19156
19174
|
if (session.isResumed && code !== 0) {
|
|
@@ -19162,7 +19180,7 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19162
19180
|
}
|
|
19163
19181
|
ctx.sessions.delete(session.sessionId);
|
|
19164
19182
|
try {
|
|
19165
|
-
await session.platform.createPost(
|
|
19183
|
+
await session.platform.createPost(`⚠️ **Session resume failed** (exit code ${code}). The session data is preserved - try restarting the bot.`, session.threadId);
|
|
19166
19184
|
} catch {}
|
|
19167
19185
|
return;
|
|
19168
19186
|
}
|
|
@@ -19187,7 +19205,7 @@ async function handleExit(sessionId, code, ctx) {
|
|
|
19187
19205
|
} else {
|
|
19188
19206
|
console.log(` [exit] Session ${shortId}... non-zero exit, preserving for potential retry`);
|
|
19189
19207
|
}
|
|
19190
|
-
console.log(`
|
|
19208
|
+
console.log(` ■ Session ended (${shortId}…) — ${ctx.sessions.size} active`);
|
|
19191
19209
|
}
|
|
19192
19210
|
function killSession(session, unpersist, ctx) {
|
|
19193
19211
|
const shortId = session.threadId.substring(0, 8);
|
|
@@ -19205,7 +19223,7 @@ function killSession(session, unpersist, ctx) {
|
|
|
19205
19223
|
if (unpersist) {
|
|
19206
19224
|
ctx.unpersistSession(session.threadId);
|
|
19207
19225
|
}
|
|
19208
|
-
console.log(`
|
|
19226
|
+
console.log(` ✖ Session killed (${shortId}…) — ${ctx.sessions.size} active`);
|
|
19209
19227
|
}
|
|
19210
19228
|
function killAllSessions(ctx) {
|
|
19211
19229
|
for (const session of ctx.sessions.values()) {
|
|
@@ -19221,16 +19239,16 @@ function cleanupIdleSessions(timeoutMs, warningMs, ctx) {
|
|
|
19221
19239
|
const idleMs = now - session.lastActivityAt.getTime();
|
|
19222
19240
|
const shortId = session.threadId.substring(0, 8);
|
|
19223
19241
|
if (idleMs > timeoutMs) {
|
|
19224
|
-
console.log(`
|
|
19225
|
-
session.platform.createPost(
|
|
19242
|
+
console.log(` ⏰ Session (${shortId}…) timed out after ${Math.round(idleMs / 60000)}min idle`);
|
|
19243
|
+
session.platform.createPost(`⏰ **Session timed out** after ${Math.round(idleMs / 60000)} minutes of inactivity`, session.threadId).catch(() => {});
|
|
19226
19244
|
killSession(session, false, ctx);
|
|
19227
19245
|
continue;
|
|
19228
19246
|
}
|
|
19229
19247
|
if (idleMs > warningMs && !session.timeoutWarningPosted) {
|
|
19230
19248
|
const remainingMins = Math.round((timeoutMs - idleMs) / 60000);
|
|
19231
|
-
session.platform.createPost(
|
|
19249
|
+
session.platform.createPost(`⏰ **Session idle** - will timeout in ~${remainingMins} minutes without activity`, session.threadId).catch(() => {});
|
|
19232
19250
|
session.timeoutWarningPosted = true;
|
|
19233
|
-
console.log(`
|
|
19251
|
+
console.log(` ⏰ Session (${shortId}…) idle warning posted`);
|
|
19234
19252
|
}
|
|
19235
19253
|
}
|
|
19236
19254
|
}
|
|
@@ -19241,7 +19259,7 @@ import { randomUUID as randomUUID3 } from "crypto";
|
|
|
19241
19259
|
import * as path9 from "path";
|
|
19242
19260
|
import * as fs5 from "fs/promises";
|
|
19243
19261
|
async function execGit(args, cwd) {
|
|
19244
|
-
return new Promise((
|
|
19262
|
+
return new Promise((resolve6, reject) => {
|
|
19245
19263
|
const proc = spawn3("git", args, { cwd });
|
|
19246
19264
|
let stdout = "";
|
|
19247
19265
|
let stderr = "";
|
|
@@ -19253,7 +19271,7 @@ async function execGit(args, cwd) {
|
|
|
19253
19271
|
});
|
|
19254
19272
|
proc.on("close", (code) => {
|
|
19255
19273
|
if (code === 0) {
|
|
19256
|
-
|
|
19274
|
+
resolve6(stdout.trim());
|
|
19257
19275
|
} else {
|
|
19258
19276
|
reject(new Error(`git ${args.join(" ")} failed: ${stderr || stdout}`));
|
|
19259
19277
|
}
|
|
@@ -19420,11 +19438,11 @@ async function postWorktreePrompt(session, reason, registerPost) {
|
|
|
19420
19438
|
switch (reason) {
|
|
19421
19439
|
case "uncommitted":
|
|
19422
19440
|
message = `\uD83C\uDF3F **This repo has uncommitted changes.**
|
|
19423
|
-
` + `Reply with a branch name to work in an isolated worktree, or react with
|
|
19441
|
+
` + `Reply with a branch name to work in an isolated worktree, or react with ❌ to continue in the main repo.`;
|
|
19424
19442
|
break;
|
|
19425
19443
|
case "concurrent":
|
|
19426
|
-
message =
|
|
19427
|
-
` + `Reply with a branch name to work in an isolated worktree, or react with
|
|
19444
|
+
message = `⚠️ **Another session is already using this repo.**
|
|
19445
|
+
` + `Reply with a branch name to work in an isolated worktree, or react with ❌ to continue anyway.`;
|
|
19428
19446
|
break;
|
|
19429
19447
|
case "require":
|
|
19430
19448
|
message = `\uD83C\uDF3F **This deployment requires working in a worktree.**
|
|
@@ -19432,7 +19450,7 @@ async function postWorktreePrompt(session, reason, registerPost) {
|
|
|
19432
19450
|
break;
|
|
19433
19451
|
default:
|
|
19434
19452
|
message = `\uD83C\uDF3F **Would you like to work in an isolated worktree?**
|
|
19435
|
-
` + `Reply with a branch name, or react with
|
|
19453
|
+
` + `Reply with a branch name, or react with ❌ to continue in the main repo.`;
|
|
19436
19454
|
}
|
|
19437
19455
|
const reactionOptions = reason === "require" ? [] : ["x"];
|
|
19438
19456
|
const post = await session.platform.createInteractivePost(message, reactionOptions, session.threadId);
|
|
@@ -19446,7 +19464,7 @@ async function handleWorktreeBranchResponse(session, branchName, username, creat
|
|
|
19446
19464
|
return false;
|
|
19447
19465
|
}
|
|
19448
19466
|
if (!isValidBranchName(branchName)) {
|
|
19449
|
-
await session.platform.createPost(
|
|
19467
|
+
await session.platform.createPost(`❌ Invalid branch name: \`${branchName}\`. Please provide a valid git branch name.`, session.threadId);
|
|
19450
19468
|
return true;
|
|
19451
19469
|
}
|
|
19452
19470
|
await createAndSwitch(session.threadId, branchName, username);
|
|
@@ -19460,9 +19478,9 @@ async function handleWorktreeSkip(session, username, persistSession, startTyping
|
|
|
19460
19478
|
}
|
|
19461
19479
|
if (session.worktreePromptPostId) {
|
|
19462
19480
|
try {
|
|
19463
|
-
await session.platform.updatePost(session.worktreePromptPostId,
|
|
19481
|
+
await session.platform.updatePost(session.worktreePromptPostId, `✅ Continuing in main repo (skipped by @${username})`);
|
|
19464
19482
|
} catch (err) {
|
|
19465
|
-
console.error("
|
|
19483
|
+
console.error(" ⚠️ Failed to update worktree prompt:", err);
|
|
19466
19484
|
}
|
|
19467
19485
|
}
|
|
19468
19486
|
session.pendingWorktreePrompt = false;
|
|
@@ -19477,30 +19495,30 @@ async function handleWorktreeSkip(session, username, persistSession, startTyping
|
|
|
19477
19495
|
}
|
|
19478
19496
|
async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
19479
19497
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19480
|
-
await session.platform.createPost(
|
|
19498
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19481
19499
|
return;
|
|
19482
19500
|
}
|
|
19483
19501
|
const isRepo = await isGitRepository(session.workingDir);
|
|
19484
19502
|
if (!isRepo) {
|
|
19485
|
-
await session.platform.createPost(
|
|
19503
|
+
await session.platform.createPost(`❌ Current directory is not a git repository`, session.threadId);
|
|
19486
19504
|
return;
|
|
19487
19505
|
}
|
|
19488
19506
|
const repoRoot = await getRepositoryRoot(session.workingDir);
|
|
19489
19507
|
const existing = await findWorktreeByBranch(repoRoot, branch);
|
|
19490
19508
|
if (existing && !existing.isMain) {
|
|
19491
|
-
await session.platform.createPost(
|
|
19509
|
+
await session.platform.createPost(`⚠️ Worktree for branch \`${branch}\` already exists at \`${existing.path}\`. Use \`!worktree switch ${branch}\` to switch to it.`, session.threadId);
|
|
19492
19510
|
return;
|
|
19493
19511
|
}
|
|
19494
19512
|
const shortId = session.threadId.substring(0, 8);
|
|
19495
|
-
console.log(` \uD83C\uDF3F Session (${shortId}
|
|
19513
|
+
console.log(` \uD83C\uDF3F Session (${shortId}…) creating worktree for branch ${branch}`);
|
|
19496
19514
|
const worktreePath = getWorktreeDir(repoRoot, branch);
|
|
19497
19515
|
try {
|
|
19498
19516
|
await createWorktree(repoRoot, branch, worktreePath);
|
|
19499
19517
|
if (session.worktreePromptPostId) {
|
|
19500
19518
|
try {
|
|
19501
|
-
await session.platform.updatePost(session.worktreePromptPostId,
|
|
19519
|
+
await session.platform.updatePost(session.worktreePromptPostId, `✅ Created worktree for \`${branch}\``);
|
|
19502
19520
|
} catch (err) {
|
|
19503
|
-
console.error("
|
|
19521
|
+
console.error(" ⚠️ Failed to update worktree prompt:", err);
|
|
19504
19522
|
}
|
|
19505
19523
|
}
|
|
19506
19524
|
const wasPending = session.pendingWorktreePrompt;
|
|
@@ -19539,7 +19557,7 @@ async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
|
19539
19557
|
}
|
|
19540
19558
|
await options.updateSessionHeader(session);
|
|
19541
19559
|
const shortWorktreePath = worktreePath.replace(process.env.HOME || "", "~");
|
|
19542
|
-
await session.platform.createPost(
|
|
19560
|
+
await session.platform.createPost(`✅ **Created worktree** for branch \`${branch}\`
|
|
19543
19561
|
\uD83D\uDCC1 Working directory: \`${shortWorktreePath}\`
|
|
19544
19562
|
*Claude Code restarted in the new worktree*`, session.threadId);
|
|
19545
19563
|
session.lastActivityAt = new Date;
|
|
@@ -19549,22 +19567,22 @@ async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
|
19549
19567
|
session.claude.sendMessage(queuedPrompt);
|
|
19550
19568
|
options.startTyping(session);
|
|
19551
19569
|
}
|
|
19552
|
-
console.log(` \uD83C\uDF3F Session (${shortId}
|
|
19570
|
+
console.log(` \uD83C\uDF3F Session (${shortId}…) switched to worktree ${branch} at ${shortWorktreePath}`);
|
|
19553
19571
|
} catch (err) {
|
|
19554
|
-
console.error(`
|
|
19555
|
-
await session.platform.createPost(
|
|
19572
|
+
console.error(` ❌ Failed to create worktree:`, err);
|
|
19573
|
+
await session.platform.createPost(`❌ Failed to create worktree: ${err instanceof Error ? err.message : String(err)}`, session.threadId);
|
|
19556
19574
|
}
|
|
19557
19575
|
}
|
|
19558
19576
|
async function switchToWorktree(session, branchOrPath, username, changeDirectory2) {
|
|
19559
19577
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19560
|
-
await session.platform.createPost(
|
|
19578
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19561
19579
|
return;
|
|
19562
19580
|
}
|
|
19563
19581
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
19564
19582
|
const worktrees = await listWorktrees(repoRoot);
|
|
19565
19583
|
const target = worktrees.find((wt) => wt.branch === branchOrPath || wt.path === branchOrPath || wt.path.endsWith(branchOrPath));
|
|
19566
19584
|
if (!target) {
|
|
19567
|
-
await session.platform.createPost(
|
|
19585
|
+
await session.platform.createPost(`❌ Worktree not found: \`${branchOrPath}\`. Use \`!worktree list\` to see available worktrees.`, session.threadId);
|
|
19568
19586
|
return;
|
|
19569
19587
|
}
|
|
19570
19588
|
await changeDirectory2(session.threadId, target.path, username);
|
|
@@ -19577,7 +19595,7 @@ async function switchToWorktree(session, branchOrPath, username, changeDirectory
|
|
|
19577
19595
|
async function listWorktreesCommand(session) {
|
|
19578
19596
|
const isRepo = await isGitRepository(session.workingDir);
|
|
19579
19597
|
if (!isRepo) {
|
|
19580
|
-
await session.platform.createPost(
|
|
19598
|
+
await session.platform.createPost(`❌ Current directory is not a git repository`, session.threadId);
|
|
19581
19599
|
return;
|
|
19582
19600
|
}
|
|
19583
19601
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
@@ -19593,51 +19611,51 @@ async function listWorktreesCommand(session) {
|
|
|
19593
19611
|
for (const wt of worktrees) {
|
|
19594
19612
|
const shortPath = wt.path.replace(process.env.HOME || "", "~");
|
|
19595
19613
|
const isCurrent = session.workingDir === wt.path;
|
|
19596
|
-
const marker = isCurrent ? "
|
|
19614
|
+
const marker = isCurrent ? " ← current" : "";
|
|
19597
19615
|
const label = wt.isMain ? "(main repository)" : "";
|
|
19598
|
-
message +=
|
|
19616
|
+
message += `• \`${wt.branch}\` → \`${shortPath}\` ${label}${marker}
|
|
19599
19617
|
`;
|
|
19600
19618
|
}
|
|
19601
19619
|
await session.platform.createPost(message, session.threadId);
|
|
19602
19620
|
}
|
|
19603
19621
|
async function removeWorktreeCommand(session, branchOrPath, username) {
|
|
19604
19622
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19605
|
-
await session.platform.createPost(
|
|
19623
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19606
19624
|
return;
|
|
19607
19625
|
}
|
|
19608
19626
|
const repoRoot = session.worktreeInfo?.repoRoot || await getRepositoryRoot(session.workingDir);
|
|
19609
19627
|
const worktrees = await listWorktrees(repoRoot);
|
|
19610
19628
|
const target = worktrees.find((wt) => wt.branch === branchOrPath || wt.path === branchOrPath || wt.path.endsWith(branchOrPath));
|
|
19611
19629
|
if (!target) {
|
|
19612
|
-
await session.platform.createPost(
|
|
19630
|
+
await session.platform.createPost(`❌ Worktree not found: \`${branchOrPath}\`. Use \`!worktree list\` to see available worktrees.`, session.threadId);
|
|
19613
19631
|
return;
|
|
19614
19632
|
}
|
|
19615
19633
|
if (target.isMain) {
|
|
19616
|
-
await session.platform.createPost(
|
|
19634
|
+
await session.platform.createPost(`❌ Cannot remove the main repository. Use \`!worktree remove\` only for worktrees.`, session.threadId);
|
|
19617
19635
|
return;
|
|
19618
19636
|
}
|
|
19619
19637
|
if (session.workingDir === target.path) {
|
|
19620
|
-
await session.platform.createPost(
|
|
19638
|
+
await session.platform.createPost(`❌ Cannot remove the current working directory. Switch to another worktree first.`, session.threadId);
|
|
19621
19639
|
return;
|
|
19622
19640
|
}
|
|
19623
19641
|
try {
|
|
19624
19642
|
await removeWorktree(repoRoot, target.path);
|
|
19625
19643
|
const shortPath = target.path.replace(process.env.HOME || "", "~");
|
|
19626
|
-
await session.platform.createPost(
|
|
19627
|
-
console.log(` \uD83D\uDDD1
|
|
19644
|
+
await session.platform.createPost(`✅ Removed worktree \`${target.branch}\` at \`${shortPath}\``, session.threadId);
|
|
19645
|
+
console.log(` \uD83D\uDDD1️ Removed worktree ${target.branch} at ${shortPath}`);
|
|
19628
19646
|
} catch (err) {
|
|
19629
|
-
console.error(`
|
|
19630
|
-
await session.platform.createPost(
|
|
19647
|
+
console.error(` ❌ Failed to remove worktree:`, err);
|
|
19648
|
+
await session.platform.createPost(`❌ Failed to remove worktree: ${err instanceof Error ? err.message : String(err)}`, session.threadId);
|
|
19631
19649
|
}
|
|
19632
19650
|
}
|
|
19633
19651
|
async function disableWorktreePrompt(session, username, persistSession) {
|
|
19634
19652
|
if (session.startedBy !== username && !session.platform.isUserAllowed(username)) {
|
|
19635
|
-
await session.platform.createPost(
|
|
19653
|
+
await session.platform.createPost(`⚠️ Only @${session.startedBy} or allowed users can manage worktrees`, session.threadId);
|
|
19636
19654
|
return;
|
|
19637
19655
|
}
|
|
19638
19656
|
session.worktreePromptDisabled = true;
|
|
19639
19657
|
persistSession(session);
|
|
19640
|
-
await session.platform.createPost(
|
|
19658
|
+
await session.platform.createPost(`✅ Worktree prompts disabled for this session`, session.threadId);
|
|
19641
19659
|
}
|
|
19642
19660
|
|
|
19643
19661
|
// src/session/types.ts
|
|
@@ -20091,15 +20109,10 @@ class SessionManager {
|
|
|
20091
20109
|
}
|
|
20092
20110
|
}
|
|
20093
20111
|
// src/index.ts
|
|
20094
|
-
import { readFileSync as readFileSync8 } from "fs";
|
|
20095
|
-
import { dirname as dirname7, resolve as resolve7 } from "path";
|
|
20096
|
-
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
20097
|
-
var __dirname8 = dirname7(fileURLToPath8(import.meta.url));
|
|
20098
|
-
var pkg3 = JSON.parse(readFileSync8(resolve7(__dirname8, "..", "package.json"), "utf-8"));
|
|
20099
20112
|
var dim2 = (s) => `\x1B[2m${s}\x1B[0m`;
|
|
20100
20113
|
var bold2 = (s) => `\x1B[1m${s}\x1B[0m`;
|
|
20101
20114
|
var cyan = (s) => `\x1B[36m${s}\x1B[0m`;
|
|
20102
|
-
program.name("claude-threads").version(
|
|
20115
|
+
program.name("claude-threads").version(VERSION).description("Share Claude Code sessions in Mattermost").option("--url <url>", "Mattermost server URL").option("--token <token>", "Mattermost bot token").option("--channel <id>", "Mattermost channel ID").option("--bot-name <name>", "Bot mention name (default: claude-code)").option("--allowed-users <users>", "Comma-separated allowed usernames").option("--skip-permissions", "Skip interactive permission prompts").option("--no-skip-permissions", "Enable interactive permission prompts (override env)").option("--chrome", "Enable Claude in Chrome integration").option("--no-chrome", "Disable Claude in Chrome integration").option("--worktree-mode <mode>", "Git worktree mode: off, prompt, require (default: prompt)").option("--setup", "Run interactive setup wizard (reconfigure existing settings)").option("--debug", "Enable debug logging").parse();
|
|
20103
20116
|
var opts = program.opts();
|
|
20104
20117
|
function hasRequiredCliArgs(args) {
|
|
20105
20118
|
return !!(args.url && args.token && args.channel);
|
|
@@ -20141,13 +20154,13 @@ async function main() {
|
|
|
20141
20154
|
}
|
|
20142
20155
|
const config = newConfig;
|
|
20143
20156
|
printLogo();
|
|
20144
|
-
console.log(dim2(` v${
|
|
20157
|
+
console.log(dim2(` v${VERSION}`));
|
|
20145
20158
|
console.log("");
|
|
20146
20159
|
console.log(` \uD83D\uDCC2 ${cyan(workingDir)}`);
|
|
20147
20160
|
console.log(` \uD83D\uDCAC ${cyan("@" + platformConfig.botName)}`);
|
|
20148
20161
|
console.log(` \uD83C\uDF10 ${dim2(platformConfig.url)}`);
|
|
20149
20162
|
if (platformConfig.skipPermissions) {
|
|
20150
|
-
console.log(`
|
|
20163
|
+
console.log(` ⚠️ ${dim2("Permissions disabled")}`);
|
|
20151
20164
|
} else {
|
|
20152
20165
|
console.log(` \uD83D\uDD10 ${dim2("Interactive permissions")}`);
|
|
20153
20166
|
}
|
|
@@ -20166,7 +20179,7 @@ async function main() {
|
|
|
20166
20179
|
const lowerMessage = message.trim().toLowerCase();
|
|
20167
20180
|
if (lowerMessage === "!kill" || mattermost.isBotMentioned(message) && mattermost.extractPrompt(message).toLowerCase() === "!kill") {
|
|
20168
20181
|
if (!mattermost.isUserAllowed(username)) {
|
|
20169
|
-
await mattermost.createPost("
|
|
20182
|
+
await mattermost.createPost("⛔ Only authorized users can use `!kill`", threadRoot);
|
|
20170
20183
|
return;
|
|
20171
20184
|
}
|
|
20172
20185
|
for (const tid of session.getActiveThreadIds()) {
|
|
@@ -20222,17 +20235,17 @@ async function main() {
|
|
|
20222
20235
|
` + `| \`!kill\` | Emergency shutdown (kills ALL sessions, exits bot) |
|
|
20223
20236
|
|
|
20224
20237
|
` + `**Reactions:**
|
|
20225
|
-
` + `- \uD83D\uDC4D Approve action
|
|
20226
|
-
` + `-
|
|
20227
|
-
` + `-
|
|
20238
|
+
` + `- \uD83D\uDC4D Approve action · ✅ Approve all · \uD83D\uDC4E Deny
|
|
20239
|
+
` + `- ⏸️ Interrupt current task (session stays active)
|
|
20240
|
+
` + `- ❌ or \uD83D\uDED1 Stop session`, threadRoot);
|
|
20228
20241
|
return;
|
|
20229
20242
|
}
|
|
20230
20243
|
if (lowerContent === "!release-notes" || lowerContent === "!changelog") {
|
|
20231
|
-
const notes = getReleaseNotes(
|
|
20244
|
+
const notes = getReleaseNotes(VERSION);
|
|
20232
20245
|
if (notes) {
|
|
20233
20246
|
await mattermost.createPost(formatReleaseNotes(notes), threadRoot);
|
|
20234
20247
|
} else {
|
|
20235
|
-
await mattermost.createPost(`\uD83D\uDCCB **claude-threads v${
|
|
20248
|
+
await mattermost.createPost(`\uD83D\uDCCB **claude-threads v${VERSION}**
|
|
20236
20249
|
|
|
20237
20250
|
Release notes not available. See [GitHub releases](https://github.com/anneschuth/claude-threads/releases).`, threadRoot);
|
|
20238
20251
|
}
|
|
@@ -20254,7 +20267,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20254
20267
|
if (mode === "interactive") {
|
|
20255
20268
|
await session.enableInteractivePermissions(threadRoot, username);
|
|
20256
20269
|
} else {
|
|
20257
|
-
await mattermost.createPost(
|
|
20270
|
+
await mattermost.createPost(`⚠️ Cannot upgrade to auto permissions - can only downgrade to interactive`, threadRoot);
|
|
20258
20271
|
}
|
|
20259
20272
|
return;
|
|
20260
20273
|
}
|
|
@@ -20273,14 +20286,14 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20273
20286
|
break;
|
|
20274
20287
|
case "switch":
|
|
20275
20288
|
if (!args) {
|
|
20276
|
-
await mattermost.createPost("
|
|
20289
|
+
await mattermost.createPost("❌ Usage: `!worktree switch <branch>`", threadRoot);
|
|
20277
20290
|
} else {
|
|
20278
20291
|
await session.switchToWorktree(threadRoot, args, username);
|
|
20279
20292
|
}
|
|
20280
20293
|
break;
|
|
20281
20294
|
case "remove":
|
|
20282
20295
|
if (!args) {
|
|
20283
|
-
await mattermost.createPost("
|
|
20296
|
+
await mattermost.createPost("❌ Usage: `!worktree remove <branch>`", threadRoot);
|
|
20284
20297
|
} else {
|
|
20285
20298
|
await session.removeWorktreeCommand(threadRoot, args, username);
|
|
20286
20299
|
}
|
|
@@ -20327,7 +20340,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20327
20340
|
if (persistedSession) {
|
|
20328
20341
|
const allowedUsers = new Set(persistedSession.sessionAllowedUsers);
|
|
20329
20342
|
if (!allowedUsers.has(username) && !mattermost.isUserAllowed(username)) {
|
|
20330
|
-
await mattermost.createPost(
|
|
20343
|
+
await mattermost.createPost(`⚠️ @${username} is not authorized to resume this session`, threadRoot);
|
|
20331
20344
|
return;
|
|
20332
20345
|
}
|
|
20333
20346
|
}
|
|
@@ -20340,7 +20353,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20340
20353
|
if (!mattermost.isBotMentioned(message))
|
|
20341
20354
|
return;
|
|
20342
20355
|
if (!mattermost.isUserAllowed(username)) {
|
|
20343
|
-
await mattermost.createPost(
|
|
20356
|
+
await mattermost.createPost(`⚠️ @${username} is not authorized`, threadRoot);
|
|
20344
20357
|
return;
|
|
20345
20358
|
}
|
|
20346
20359
|
const prompt = mattermost.extractPrompt(message);
|
|
@@ -20358,18 +20371,18 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20358
20371
|
}
|
|
20359
20372
|
await session.startSession({ prompt, files }, username, threadRoot);
|
|
20360
20373
|
} catch (err) {
|
|
20361
|
-
console.error("
|
|
20374
|
+
console.error(" ❌ Error handling message:", err);
|
|
20362
20375
|
try {
|
|
20363
20376
|
const threadRoot = post.rootId || post.id;
|
|
20364
|
-
await mattermost.createPost(
|
|
20377
|
+
await mattermost.createPost(`⚠️ An error occurred. Please try again.`, threadRoot);
|
|
20365
20378
|
} catch {}
|
|
20366
20379
|
}
|
|
20367
20380
|
});
|
|
20368
20381
|
mattermost.on("connected", () => {});
|
|
20369
|
-
mattermost.on("error", (e) => console.error("
|
|
20382
|
+
mattermost.on("error", (e) => console.error(" ❌ Error:", e));
|
|
20370
20383
|
await mattermost.connect();
|
|
20371
20384
|
await session.initialize();
|
|
20372
|
-
console.log(`
|
|
20385
|
+
console.log(` ✅ ${bold2("Ready!")} Waiting for @${platformConfig.botName} mentions...`);
|
|
20373
20386
|
console.log("");
|
|
20374
20387
|
let isShuttingDown = false;
|
|
20375
20388
|
const shutdown = async () => {
|
|
@@ -20384,7 +20397,7 @@ Release notes not available. See [GitHub releases](https://github.com/anneschuth
|
|
|
20384
20397
|
console.log(` \uD83D\uDCE4 Notifying ${activeThreads.length} active session(s)...`);
|
|
20385
20398
|
for (const threadId of activeThreads) {
|
|
20386
20399
|
try {
|
|
20387
|
-
await mattermost.createPost(
|
|
20400
|
+
await mattermost.createPost(`⏸️ **Bot shutting down** - session will resume on restart`, threadId);
|
|
20388
20401
|
} catch {}
|
|
20389
20402
|
}
|
|
20390
20403
|
}
|