@clawos-dev/clawd 0.2.133-beta.270.8f65d4e → 0.2.133-beta.272.de77151
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/cli.cjs +176 -105
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -5073,7 +5073,7 @@ var init_schemas = __esm({
|
|
|
5073
5073
|
cwd: external_exports.string().min(1),
|
|
5074
5074
|
path: external_exports.string().min(1)
|
|
5075
5075
|
});
|
|
5076
|
-
SkillsListArgs = external_exports.object({ cwd: external_exports.string().min(1) });
|
|
5076
|
+
SkillsListArgs = external_exports.object({ cwd: external_exports.string().min(1), tool: external_exports.string().optional() });
|
|
5077
5077
|
SkillEntrySchema = external_exports.object({
|
|
5078
5078
|
name: external_exports.string().min(1),
|
|
5079
5079
|
source: external_exports.enum(SKILL_SOURCE_VALUES),
|
|
@@ -5089,7 +5089,7 @@ var init_schemas = __esm({
|
|
|
5089
5089
|
whenToUse: external_exports.string().optional(),
|
|
5090
5090
|
plugin: external_exports.string().optional()
|
|
5091
5091
|
});
|
|
5092
|
-
AgentsListArgs = external_exports.object({ cwd: external_exports.string().min(1) });
|
|
5092
|
+
AgentsListArgs = external_exports.object({ cwd: external_exports.string().min(1), tool: external_exports.string().optional() });
|
|
5093
5093
|
AgentsListResponseSchema = external_exports.object({
|
|
5094
5094
|
agents: external_exports.array(AgentEntrySchema)
|
|
5095
5095
|
});
|
|
@@ -6850,10 +6850,10 @@ var require_redaction = __commonJS({
|
|
|
6850
6850
|
var strict = false;
|
|
6851
6851
|
function redaction(opts, serialize) {
|
|
6852
6852
|
const { paths, censor, remove } = handle(opts);
|
|
6853
|
-
const shape = paths.reduce((o,
|
|
6853
|
+
const shape = paths.reduce((o, str4) => {
|
|
6854
6854
|
rx.lastIndex = 0;
|
|
6855
|
-
const first = rx.exec(
|
|
6856
|
-
const next = rx.exec(
|
|
6855
|
+
const first = rx.exec(str4);
|
|
6856
|
+
const next = rx.exec(str4);
|
|
6857
6857
|
let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
|
|
6858
6858
|
if (ns === "*") {
|
|
6859
6859
|
ns = wildcardFirstSym;
|
|
@@ -6866,7 +6866,7 @@ var require_redaction = __commonJS({
|
|
|
6866
6866
|
return o;
|
|
6867
6867
|
}
|
|
6868
6868
|
const { index } = next;
|
|
6869
|
-
const nextPath = `${
|
|
6869
|
+
const nextPath = `${str4.substr(index, str4.length - 1)}`;
|
|
6870
6870
|
o[ns] = o[ns] || [];
|
|
6871
6871
|
if (ns !== wildcardFirstSym && o[ns].length === 0) {
|
|
6872
6872
|
o[ns].push(...o[wildcardFirstSym] || []);
|
|
@@ -6982,7 +6982,7 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
6982
6982
|
}
|
|
6983
6983
|
var argLen = args.length;
|
|
6984
6984
|
if (argLen === 0) return f;
|
|
6985
|
-
var
|
|
6985
|
+
var str4 = "";
|
|
6986
6986
|
var a = 1 - offset;
|
|
6987
6987
|
var lastPos = -1;
|
|
6988
6988
|
var flen = f && f.length || 0;
|
|
@@ -6997,8 +6997,8 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
6997
6997
|
break;
|
|
6998
6998
|
if (args[a] == null) break;
|
|
6999
6999
|
if (lastPos < i)
|
|
7000
|
-
|
|
7001
|
-
|
|
7000
|
+
str4 += f.slice(lastPos, i);
|
|
7001
|
+
str4 += Number(args[a]);
|
|
7002
7002
|
lastPos = i + 2;
|
|
7003
7003
|
i++;
|
|
7004
7004
|
break;
|
|
@@ -7007,8 +7007,8 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
7007
7007
|
break;
|
|
7008
7008
|
if (args[a] == null) break;
|
|
7009
7009
|
if (lastPos < i)
|
|
7010
|
-
|
|
7011
|
-
|
|
7010
|
+
str4 += f.slice(lastPos, i);
|
|
7011
|
+
str4 += Math.floor(Number(args[a]));
|
|
7012
7012
|
lastPos = i + 2;
|
|
7013
7013
|
i++;
|
|
7014
7014
|
break;
|
|
@@ -7021,21 +7021,21 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
7021
7021
|
break;
|
|
7022
7022
|
if (args[a] === void 0) break;
|
|
7023
7023
|
if (lastPos < i)
|
|
7024
|
-
|
|
7024
|
+
str4 += f.slice(lastPos, i);
|
|
7025
7025
|
var type = typeof args[a];
|
|
7026
7026
|
if (type === "string") {
|
|
7027
|
-
|
|
7027
|
+
str4 += "'" + args[a] + "'";
|
|
7028
7028
|
lastPos = i + 2;
|
|
7029
7029
|
i++;
|
|
7030
7030
|
break;
|
|
7031
7031
|
}
|
|
7032
7032
|
if (type === "function") {
|
|
7033
|
-
|
|
7033
|
+
str4 += args[a].name || "<anonymous>";
|
|
7034
7034
|
lastPos = i + 2;
|
|
7035
7035
|
i++;
|
|
7036
7036
|
break;
|
|
7037
7037
|
}
|
|
7038
|
-
|
|
7038
|
+
str4 += ss(args[a]);
|
|
7039
7039
|
lastPos = i + 2;
|
|
7040
7040
|
i++;
|
|
7041
7041
|
break;
|
|
@@ -7043,15 +7043,15 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
7043
7043
|
if (a >= argLen)
|
|
7044
7044
|
break;
|
|
7045
7045
|
if (lastPos < i)
|
|
7046
|
-
|
|
7047
|
-
|
|
7046
|
+
str4 += f.slice(lastPos, i);
|
|
7047
|
+
str4 += String(args[a]);
|
|
7048
7048
|
lastPos = i + 2;
|
|
7049
7049
|
i++;
|
|
7050
7050
|
break;
|
|
7051
7051
|
case 37:
|
|
7052
7052
|
if (lastPos < i)
|
|
7053
|
-
|
|
7054
|
-
|
|
7053
|
+
str4 += f.slice(lastPos, i);
|
|
7054
|
+
str4 += "%";
|
|
7055
7055
|
lastPos = i + 2;
|
|
7056
7056
|
i++;
|
|
7057
7057
|
a--;
|
|
@@ -7064,9 +7064,9 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
7064
7064
|
if (lastPos === -1)
|
|
7065
7065
|
return f;
|
|
7066
7066
|
else if (lastPos < flen) {
|
|
7067
|
-
|
|
7067
|
+
str4 += f.slice(lastPos);
|
|
7068
7068
|
}
|
|
7069
|
-
return
|
|
7069
|
+
return str4;
|
|
7070
7070
|
}
|
|
7071
7071
|
}
|
|
7072
7072
|
});
|
|
@@ -8552,29 +8552,29 @@ var require_tools = __commonJS({
|
|
|
8552
8552
|
}
|
|
8553
8553
|
}
|
|
8554
8554
|
}
|
|
8555
|
-
function asString(
|
|
8555
|
+
function asString(str4) {
|
|
8556
8556
|
let result = "";
|
|
8557
8557
|
let last = 0;
|
|
8558
8558
|
let found = false;
|
|
8559
8559
|
let point = 255;
|
|
8560
|
-
const l =
|
|
8560
|
+
const l = str4.length;
|
|
8561
8561
|
if (l > 100) {
|
|
8562
|
-
return JSON.stringify(
|
|
8562
|
+
return JSON.stringify(str4);
|
|
8563
8563
|
}
|
|
8564
8564
|
for (var i = 0; i < l && point >= 32; i++) {
|
|
8565
|
-
point =
|
|
8565
|
+
point = str4.charCodeAt(i);
|
|
8566
8566
|
if (point === 34 || point === 92) {
|
|
8567
|
-
result +=
|
|
8567
|
+
result += str4.slice(last, i) + "\\";
|
|
8568
8568
|
last = i;
|
|
8569
8569
|
found = true;
|
|
8570
8570
|
}
|
|
8571
8571
|
}
|
|
8572
8572
|
if (!found) {
|
|
8573
|
-
result =
|
|
8573
|
+
result = str4;
|
|
8574
8574
|
} else {
|
|
8575
|
-
result +=
|
|
8575
|
+
result += str4.slice(last);
|
|
8576
8576
|
}
|
|
8577
|
-
return point < 32 ? JSON.stringify(
|
|
8577
|
+
return point < 32 ? JSON.stringify(str4) : '"' + result + '"';
|
|
8578
8578
|
}
|
|
8579
8579
|
function asJson(obj, msg, num3, time) {
|
|
8580
8580
|
if (asJsonChan.hasSubscribers === false) {
|
|
@@ -9280,11 +9280,11 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
9280
9280
|
exports2.configure = configure;
|
|
9281
9281
|
module2.exports = stringify;
|
|
9282
9282
|
var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
|
|
9283
|
-
function strEscape(
|
|
9284
|
-
if (
|
|
9285
|
-
return `"${
|
|
9283
|
+
function strEscape(str4) {
|
|
9284
|
+
if (str4.length < 5e3 && !strEscapeSequencesRegExp.test(str4)) {
|
|
9285
|
+
return `"${str4}"`;
|
|
9286
9286
|
}
|
|
9287
|
-
return JSON.stringify(
|
|
9287
|
+
return JSON.stringify(str4);
|
|
9288
9288
|
}
|
|
9289
9289
|
function sort(array, comparator) {
|
|
9290
9290
|
if (array.length > 200 || comparator) {
|
|
@@ -22761,19 +22761,19 @@ var require_stream_readable = __commonJS({
|
|
|
22761
22761
|
var ret = p2.data;
|
|
22762
22762
|
n -= ret.length;
|
|
22763
22763
|
while (p2 = p2.next) {
|
|
22764
|
-
var
|
|
22765
|
-
var nb = n >
|
|
22766
|
-
if (nb ===
|
|
22767
|
-
else ret +=
|
|
22764
|
+
var str4 = p2.data;
|
|
22765
|
+
var nb = n > str4.length ? str4.length : n;
|
|
22766
|
+
if (nb === str4.length) ret += str4;
|
|
22767
|
+
else ret += str4.slice(0, n);
|
|
22768
22768
|
n -= nb;
|
|
22769
22769
|
if (n === 0) {
|
|
22770
|
-
if (nb ===
|
|
22770
|
+
if (nb === str4.length) {
|
|
22771
22771
|
++c;
|
|
22772
22772
|
if (p2.next) list.head = p2.next;
|
|
22773
22773
|
else list.head = list.tail = null;
|
|
22774
22774
|
} else {
|
|
22775
22775
|
list.head = p2;
|
|
22776
|
-
p2.data =
|
|
22776
|
+
p2.data = str4.slice(nb);
|
|
22777
22777
|
}
|
|
22778
22778
|
break;
|
|
22779
22779
|
}
|
|
@@ -23669,14 +23669,14 @@ var require_utils = __commonJS({
|
|
|
23669
23669
|
var nodejsUtils = require_nodejsUtils();
|
|
23670
23670
|
var external = require_external();
|
|
23671
23671
|
require_setImmediate();
|
|
23672
|
-
function string2binary(
|
|
23672
|
+
function string2binary(str4) {
|
|
23673
23673
|
var result = null;
|
|
23674
23674
|
if (support.uint8array) {
|
|
23675
|
-
result = new Uint8Array(
|
|
23675
|
+
result = new Uint8Array(str4.length);
|
|
23676
23676
|
} else {
|
|
23677
|
-
result = new Array(
|
|
23677
|
+
result = new Array(str4.length);
|
|
23678
23678
|
}
|
|
23679
|
-
return stringToArrayLike(
|
|
23679
|
+
return stringToArrayLike(str4, result);
|
|
23680
23680
|
}
|
|
23681
23681
|
exports2.newBlob = function(part, type) {
|
|
23682
23682
|
exports2.checkSupport("blob");
|
|
@@ -23698,9 +23698,9 @@ var require_utils = __commonJS({
|
|
|
23698
23698
|
function identity(input) {
|
|
23699
23699
|
return input;
|
|
23700
23700
|
}
|
|
23701
|
-
function stringToArrayLike(
|
|
23702
|
-
for (var i = 0; i <
|
|
23703
|
-
array[i] =
|
|
23701
|
+
function stringToArrayLike(str4, array) {
|
|
23702
|
+
for (var i = 0; i < str4.length; ++i) {
|
|
23703
|
+
array[i] = str4.charCodeAt(i) & 255;
|
|
23704
23704
|
}
|
|
23705
23705
|
return array;
|
|
23706
23706
|
}
|
|
@@ -23913,10 +23913,10 @@ var require_utils = __commonJS({
|
|
|
23913
23913
|
};
|
|
23914
23914
|
exports2.MAX_VALUE_16BITS = 65535;
|
|
23915
23915
|
exports2.MAX_VALUE_32BITS = -1;
|
|
23916
|
-
exports2.pretty = function(
|
|
23916
|
+
exports2.pretty = function(str4) {
|
|
23917
23917
|
var res = "", code, i;
|
|
23918
|
-
for (i = 0; i < (
|
|
23919
|
-
code =
|
|
23918
|
+
for (i = 0; i < (str4 || "").length; i++) {
|
|
23919
|
+
code = str4.charCodeAt(i);
|
|
23920
23920
|
res += "\\x" + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
|
|
23921
23921
|
}
|
|
23922
23922
|
return res;
|
|
@@ -24226,12 +24226,12 @@ var require_utf8 = __commonJS({
|
|
|
24226
24226
|
}
|
|
24227
24227
|
var i;
|
|
24228
24228
|
_utf8len[254] = _utf8len[254] = 1;
|
|
24229
|
-
var string2buf = function(
|
|
24230
|
-
var buf, c, c2, m_pos, i2, str_len =
|
|
24229
|
+
var string2buf = function(str4) {
|
|
24230
|
+
var buf, c, c2, m_pos, i2, str_len = str4.length, buf_len = 0;
|
|
24231
24231
|
for (m_pos = 0; m_pos < str_len; m_pos++) {
|
|
24232
|
-
c =
|
|
24232
|
+
c = str4.charCodeAt(m_pos);
|
|
24233
24233
|
if ((c & 64512) === 55296 && m_pos + 1 < str_len) {
|
|
24234
|
-
c2 =
|
|
24234
|
+
c2 = str4.charCodeAt(m_pos + 1);
|
|
24235
24235
|
if ((c2 & 64512) === 56320) {
|
|
24236
24236
|
c = 65536 + (c - 55296 << 10) + (c2 - 56320);
|
|
24237
24237
|
m_pos++;
|
|
@@ -24245,9 +24245,9 @@ var require_utf8 = __commonJS({
|
|
|
24245
24245
|
buf = new Array(buf_len);
|
|
24246
24246
|
}
|
|
24247
24247
|
for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) {
|
|
24248
|
-
c =
|
|
24248
|
+
c = str4.charCodeAt(m_pos);
|
|
24249
24249
|
if ((c & 64512) === 55296 && m_pos + 1 < str_len) {
|
|
24250
|
-
c2 =
|
|
24250
|
+
c2 = str4.charCodeAt(m_pos + 1);
|
|
24251
24251
|
if ((c2 & 64512) === 56320) {
|
|
24252
24252
|
c = 65536 + (c - 55296 << 10) + (c2 - 56320);
|
|
24253
24253
|
m_pos++;
|
|
@@ -24331,11 +24331,11 @@ var require_utf8 = __commonJS({
|
|
|
24331
24331
|
}
|
|
24332
24332
|
return utils.applyFromCharCode(utf16buf);
|
|
24333
24333
|
};
|
|
24334
|
-
exports2.utf8encode = function utf8encode(
|
|
24334
|
+
exports2.utf8encode = function utf8encode(str4) {
|
|
24335
24335
|
if (support.nodebuffer) {
|
|
24336
|
-
return nodejsUtils.newBufferFrom(
|
|
24336
|
+
return nodejsUtils.newBufferFrom(str4, "utf-8");
|
|
24337
24337
|
}
|
|
24338
|
-
return string2buf(
|
|
24338
|
+
return string2buf(str4);
|
|
24339
24339
|
};
|
|
24340
24340
|
exports2.utf8decode = function utf8decode(buf) {
|
|
24341
24341
|
if (support.nodebuffer) {
|
|
@@ -24744,11 +24744,11 @@ var require_crc32 = __commonJS({
|
|
|
24744
24744
|
}
|
|
24745
24745
|
return crc ^ -1;
|
|
24746
24746
|
}
|
|
24747
|
-
function crc32str(crc,
|
|
24747
|
+
function crc32str(crc, str4, len, pos) {
|
|
24748
24748
|
var t = crcTable, end = pos + len;
|
|
24749
24749
|
crc = crc ^ -1;
|
|
24750
24750
|
for (var i = pos; i < end; i++) {
|
|
24751
|
-
crc = crc >>> 8 ^ t[(crc ^
|
|
24751
|
+
crc = crc >>> 8 ^ t[(crc ^ str4.charCodeAt(i)) & 255];
|
|
24752
24752
|
}
|
|
24753
24753
|
return crc ^ -1;
|
|
24754
24754
|
}
|
|
@@ -25945,7 +25945,7 @@ var require_deflate = __commonJS({
|
|
|
25945
25945
|
}
|
|
25946
25946
|
function fill_window(s) {
|
|
25947
25947
|
var _w_size = s.w_size;
|
|
25948
|
-
var p2, n, m2, more,
|
|
25948
|
+
var p2, n, m2, more, str4;
|
|
25949
25949
|
do {
|
|
25950
25950
|
more = s.window_size - s.lookahead - s.strstart;
|
|
25951
25951
|
if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
|
|
@@ -25973,14 +25973,14 @@ var require_deflate = __commonJS({
|
|
|
25973
25973
|
n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
|
|
25974
25974
|
s.lookahead += n;
|
|
25975
25975
|
if (s.lookahead + s.insert >= MIN_MATCH) {
|
|
25976
|
-
|
|
25977
|
-
s.ins_h = s.window[
|
|
25978
|
-
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[
|
|
25976
|
+
str4 = s.strstart - s.insert;
|
|
25977
|
+
s.ins_h = s.window[str4];
|
|
25978
|
+
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str4 + 1]) & s.hash_mask;
|
|
25979
25979
|
while (s.insert) {
|
|
25980
|
-
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[
|
|
25981
|
-
s.prev[
|
|
25982
|
-
s.head[s.ins_h] =
|
|
25983
|
-
|
|
25980
|
+
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str4 + MIN_MATCH - 1]) & s.hash_mask;
|
|
25981
|
+
s.prev[str4 & s.w_mask] = s.head[s.ins_h];
|
|
25982
|
+
s.head[s.ins_h] = str4;
|
|
25983
|
+
str4++;
|
|
25984
25984
|
s.insert--;
|
|
25985
25985
|
if (s.lookahead + s.insert < MIN_MATCH) {
|
|
25986
25986
|
break;
|
|
@@ -26756,7 +26756,7 @@ var require_deflate = __commonJS({
|
|
|
26756
26756
|
function deflateSetDictionary(strm, dictionary) {
|
|
26757
26757
|
var dictLength = dictionary.length;
|
|
26758
26758
|
var s;
|
|
26759
|
-
var
|
|
26759
|
+
var str4, n;
|
|
26760
26760
|
var wrap2;
|
|
26761
26761
|
var avail;
|
|
26762
26762
|
var next;
|
|
@@ -26794,15 +26794,15 @@ var require_deflate = __commonJS({
|
|
|
26794
26794
|
strm.input = dictionary;
|
|
26795
26795
|
fill_window(s);
|
|
26796
26796
|
while (s.lookahead >= MIN_MATCH) {
|
|
26797
|
-
|
|
26797
|
+
str4 = s.strstart;
|
|
26798
26798
|
n = s.lookahead - (MIN_MATCH - 1);
|
|
26799
26799
|
do {
|
|
26800
|
-
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[
|
|
26801
|
-
s.prev[
|
|
26802
|
-
s.head[s.ins_h] =
|
|
26803
|
-
|
|
26800
|
+
s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str4 + MIN_MATCH - 1]) & s.hash_mask;
|
|
26801
|
+
s.prev[str4 & s.w_mask] = s.head[s.ins_h];
|
|
26802
|
+
s.head[s.ins_h] = str4;
|
|
26803
|
+
str4++;
|
|
26804
26804
|
} while (--n);
|
|
26805
|
-
s.strstart =
|
|
26805
|
+
s.strstart = str4;
|
|
26806
26806
|
s.lookahead = MIN_MATCH - 1;
|
|
26807
26807
|
fill_window(s);
|
|
26808
26808
|
}
|
|
@@ -26853,12 +26853,12 @@ var require_strings = __commonJS({
|
|
|
26853
26853
|
}
|
|
26854
26854
|
var q;
|
|
26855
26855
|
_utf8len[254] = _utf8len[254] = 1;
|
|
26856
|
-
exports2.string2buf = function(
|
|
26857
|
-
var buf, c, c2, m_pos, i, str_len =
|
|
26856
|
+
exports2.string2buf = function(str4) {
|
|
26857
|
+
var buf, c, c2, m_pos, i, str_len = str4.length, buf_len = 0;
|
|
26858
26858
|
for (m_pos = 0; m_pos < str_len; m_pos++) {
|
|
26859
|
-
c =
|
|
26859
|
+
c = str4.charCodeAt(m_pos);
|
|
26860
26860
|
if ((c & 64512) === 55296 && m_pos + 1 < str_len) {
|
|
26861
|
-
c2 =
|
|
26861
|
+
c2 = str4.charCodeAt(m_pos + 1);
|
|
26862
26862
|
if ((c2 & 64512) === 56320) {
|
|
26863
26863
|
c = 65536 + (c - 55296 << 10) + (c2 - 56320);
|
|
26864
26864
|
m_pos++;
|
|
@@ -26868,9 +26868,9 @@ var require_strings = __commonJS({
|
|
|
26868
26868
|
}
|
|
26869
26869
|
buf = new utils.Buf8(buf_len);
|
|
26870
26870
|
for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
|
|
26871
|
-
c =
|
|
26871
|
+
c = str4.charCodeAt(m_pos);
|
|
26872
26872
|
if ((c & 64512) === 55296 && m_pos + 1 < str_len) {
|
|
26873
|
-
c2 =
|
|
26873
|
+
c2 = str4.charCodeAt(m_pos + 1);
|
|
26874
26874
|
if ((c2 & 64512) === 56320) {
|
|
26875
26875
|
c = 65536 + (c - 55296 << 10) + (c2 - 56320);
|
|
26876
26876
|
m_pos++;
|
|
@@ -26909,10 +26909,10 @@ var require_strings = __commonJS({
|
|
|
26909
26909
|
exports2.buf2binstring = function(buf) {
|
|
26910
26910
|
return buf2binstring(buf, buf.length);
|
|
26911
26911
|
};
|
|
26912
|
-
exports2.binstring2buf = function(
|
|
26913
|
-
var buf = new utils.Buf8(
|
|
26912
|
+
exports2.binstring2buf = function(str4) {
|
|
26913
|
+
var buf = new utils.Buf8(str4.length);
|
|
26914
26914
|
for (var i = 0, len = buf.length; i < len; i++) {
|
|
26915
|
-
buf[i] =
|
|
26915
|
+
buf[i] = str4.charCodeAt(i);
|
|
26916
26916
|
}
|
|
26917
26917
|
return buf;
|
|
26918
26918
|
};
|
|
@@ -35389,9 +35389,15 @@ function threadStartParams(ctx) {
|
|
|
35389
35389
|
};
|
|
35390
35390
|
}
|
|
35391
35391
|
var ATTACHMENT_RE2 = /\[attachment:(image|file):([^\]]+)\]/g;
|
|
35392
|
+
var SKILL_RE = /\[skill:(.+?):(\/[^\]]+)\]/g;
|
|
35392
35393
|
function turnStartInput(text) {
|
|
35393
35394
|
const items = [];
|
|
35394
35395
|
let leftover = text;
|
|
35396
|
+
for (const m2 of text.matchAll(SKILL_RE)) {
|
|
35397
|
+
const [marker, name, path59] = m2;
|
|
35398
|
+
items.push({ type: "skill", name, path: path59 });
|
|
35399
|
+
leftover = leftover.replace(marker, "");
|
|
35400
|
+
}
|
|
35395
35401
|
for (const m2 of text.matchAll(ATTACHMENT_RE2)) {
|
|
35396
35402
|
const [marker, kind, url] = m2;
|
|
35397
35403
|
if (kind === "image") {
|
|
@@ -36764,6 +36770,66 @@ var CodexHistoryReader = class {
|
|
|
36764
36770
|
}
|
|
36765
36771
|
};
|
|
36766
36772
|
|
|
36773
|
+
// src/tools/codex-skills.ts
|
|
36774
|
+
var import_node_child_process6 = require("child_process");
|
|
36775
|
+
var DEFAULT_TIMEOUT_MS2 = 8e3;
|
|
36776
|
+
function str3(v2) {
|
|
36777
|
+
return typeof v2 === "string" ? v2 : void 0;
|
|
36778
|
+
}
|
|
36779
|
+
function mapSkillsListResponse(res) {
|
|
36780
|
+
const data = res?.data;
|
|
36781
|
+
if (!Array.isArray(data)) return [];
|
|
36782
|
+
const out = [];
|
|
36783
|
+
for (const entry of data) {
|
|
36784
|
+
const skills = entry?.skills;
|
|
36785
|
+
if (!Array.isArray(skills)) continue;
|
|
36786
|
+
for (const s of skills) {
|
|
36787
|
+
const r = s ?? {};
|
|
36788
|
+
const name = str3(r.name);
|
|
36789
|
+
if (!name) continue;
|
|
36790
|
+
const path59 = str3(r.path);
|
|
36791
|
+
const description = str3(r.description);
|
|
36792
|
+
const isPlugin = name.includes(":");
|
|
36793
|
+
out.push({
|
|
36794
|
+
name,
|
|
36795
|
+
source: isPlugin ? "plugin" : "project",
|
|
36796
|
+
...path59 ? { path: path59 } : {},
|
|
36797
|
+
...description ? { description } : {},
|
|
36798
|
+
...isPlugin ? { plugin: name.split(":")[0] } : {}
|
|
36799
|
+
});
|
|
36800
|
+
}
|
|
36801
|
+
}
|
|
36802
|
+
return out;
|
|
36803
|
+
}
|
|
36804
|
+
async function listCodexSkills(cwd, deps = {}) {
|
|
36805
|
+
const cmd = process.env.CODEX_BIN ?? "codex";
|
|
36806
|
+
const args = ["app-server", "--listen", "stdio://"];
|
|
36807
|
+
const proc = deps.spawnOverride ? deps.spawnOverride(cmd, args, cwd) : (0, import_node_child_process6.spawn)(cmd, args, { cwd, env: process.env, stdio: ["pipe", "pipe", "pipe"] });
|
|
36808
|
+
const client = new CodexAppServerClient(proc, {});
|
|
36809
|
+
const timeoutMs = deps.timeoutMs ?? DEFAULT_TIMEOUT_MS2;
|
|
36810
|
+
let timer;
|
|
36811
|
+
const timeout = new Promise((_2, reject) => {
|
|
36812
|
+
timer = setTimeout(() => reject(new Error(`codex app-server skills/list timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
36813
|
+
});
|
|
36814
|
+
try {
|
|
36815
|
+
await Promise.race([
|
|
36816
|
+
(async () => {
|
|
36817
|
+
await client.request("initialize", {
|
|
36818
|
+
clientInfo: { name: "clawd", title: "clawd", version: "0" },
|
|
36819
|
+
capabilities: null
|
|
36820
|
+
});
|
|
36821
|
+
client.notify("initialized", {});
|
|
36822
|
+
})(),
|
|
36823
|
+
timeout
|
|
36824
|
+
]);
|
|
36825
|
+
const res = await Promise.race([client.request("skills/list", { cwds: [cwd] }), timeout]);
|
|
36826
|
+
return mapSkillsListResponse(res);
|
|
36827
|
+
} finally {
|
|
36828
|
+
if (timer) clearTimeout(timer);
|
|
36829
|
+
if (proc.exitCode === null && proc.signalCode === null) proc.kill("SIGTERM");
|
|
36830
|
+
}
|
|
36831
|
+
}
|
|
36832
|
+
|
|
36767
36833
|
// src/workspace/browser.ts
|
|
36768
36834
|
var import_node_fs12 = __toESM(require("fs"), 1);
|
|
36769
36835
|
var import_node_os6 = __toESM(require("os"), 1);
|
|
@@ -39763,7 +39829,7 @@ var StateFileManager = class {
|
|
|
39763
39829
|
var import_node_fs24 = __toESM(require("fs"), 1);
|
|
39764
39830
|
var import_node_path25 = __toESM(require("path"), 1);
|
|
39765
39831
|
var import_node_crypto7 = __toESM(require("crypto"), 1);
|
|
39766
|
-
var
|
|
39832
|
+
var import_node_child_process9 = require("child_process");
|
|
39767
39833
|
|
|
39768
39834
|
// src/tunnel/tunnel-store.ts
|
|
39769
39835
|
var import_node_fs21 = __toESM(require("fs"), 1);
|
|
@@ -39899,7 +39965,7 @@ function escape(v2) {
|
|
|
39899
39965
|
var import_node_fs22 = __toESM(require("fs"), 1);
|
|
39900
39966
|
var import_node_os11 = __toESM(require("os"), 1);
|
|
39901
39967
|
var import_node_path23 = __toESM(require("path"), 1);
|
|
39902
|
-
var
|
|
39968
|
+
var import_node_child_process7 = require("child_process");
|
|
39903
39969
|
var import_node_stream2 = require("stream");
|
|
39904
39970
|
var import_promises3 = require("stream/promises");
|
|
39905
39971
|
var FRPC_VERSION = "0.68.0";
|
|
@@ -39999,7 +40065,7 @@ async function extractFrpcFromTarball(tarball, binDir, version2, platform, destB
|
|
|
39999
40065
|
import_node_fs22.default.mkdirSync(work, { recursive: true });
|
|
40000
40066
|
try {
|
|
40001
40067
|
await new Promise((resolve6, reject) => {
|
|
40002
|
-
const proc = (0,
|
|
40068
|
+
const proc = (0, import_node_child_process7.spawn)("tar", ["xzf", tarball, "-C", work], { stdio: "pipe" });
|
|
40003
40069
|
proc.on("error", reject);
|
|
40004
40070
|
proc.on("exit", (code) => code === 0 ? resolve6() : reject(new Error(`tar exited ${code}`)));
|
|
40005
40071
|
});
|
|
@@ -40017,7 +40083,7 @@ async function extractFrpcFromTarball(tarball, binDir, version2, platform, destB
|
|
|
40017
40083
|
// src/tunnel/frpc-process.ts
|
|
40018
40084
|
var import_node_fs23 = __toESM(require("fs"), 1);
|
|
40019
40085
|
var import_node_path24 = __toESM(require("path"), 1);
|
|
40020
|
-
var
|
|
40086
|
+
var import_node_child_process8 = require("child_process");
|
|
40021
40087
|
function frpcPidFilePath(dataDir) {
|
|
40022
40088
|
return import_node_path24.default.join(dataDir, "frpc.pid");
|
|
40023
40089
|
}
|
|
@@ -40103,7 +40169,7 @@ async function killStaleFrpc(deps) {
|
|
|
40103
40169
|
async function defaultScanFrpcPidsByCmdline(tomlPath, logger) {
|
|
40104
40170
|
if (process.platform === "win32") return [];
|
|
40105
40171
|
return new Promise((resolve6) => {
|
|
40106
|
-
const ps = (0,
|
|
40172
|
+
const ps = (0, import_node_child_process8.spawn)("ps", ["-axo", "pid=,command="], { stdio: ["ignore", "pipe", "ignore"] });
|
|
40107
40173
|
let buf = "";
|
|
40108
40174
|
ps.stdout.on("data", (c) => {
|
|
40109
40175
|
buf += c.toString();
|
|
@@ -40272,7 +40338,7 @@ var TunnelManager = class {
|
|
|
40272
40338
|
logLevel: "info"
|
|
40273
40339
|
});
|
|
40274
40340
|
await import_node_fs24.default.promises.writeFile(tomlPath, toml, { mode: 384 });
|
|
40275
|
-
const proc = (this.deps.spawnImpl ??
|
|
40341
|
+
const proc = (this.deps.spawnImpl ?? import_node_child_process9.spawn)(frpcBin, ["-c", tomlPath], {
|
|
40276
40342
|
stdio: ["ignore", "pipe", "pipe"]
|
|
40277
40343
|
});
|
|
40278
40344
|
const logFilePath = import_node_path25.default.join(this.deps.dataDir, "frpc.log");
|
|
@@ -41452,7 +41518,7 @@ function assertGuestPath2(ctx, absPath, personaRoot, method, usersRoot) {
|
|
|
41452
41518
|
}
|
|
41453
41519
|
}
|
|
41454
41520
|
function buildWorkspaceHandlers(deps) {
|
|
41455
|
-
const { workspace, skills, agents, personaRoot, personaManager, usersRoot } = deps;
|
|
41521
|
+
const { workspace, skills, agents, getSkillsForTool, personaRoot, personaManager, usersRoot } = deps;
|
|
41456
41522
|
const list = async (frame, _client, ctx) => {
|
|
41457
41523
|
const args = WorkspaceListArgs.parse(frame);
|
|
41458
41524
|
const isGuest = ctx?.principal.kind === "guest";
|
|
@@ -41474,7 +41540,7 @@ function buildWorkspaceHandlers(deps) {
|
|
|
41474
41540
|
const args = SkillsListArgs.parse(frame);
|
|
41475
41541
|
const cwdAbs = path42.resolve(args.cwd);
|
|
41476
41542
|
assertGuestPath2(ctx, cwdAbs, personaRoot, "skills:list", usersRoot);
|
|
41477
|
-
const list2 =
|
|
41543
|
+
const list2 = await getSkillsForTool(args.tool ?? "claude", cwdAbs);
|
|
41478
41544
|
if (ctx?.principal.kind === "guest" && personaRoot) {
|
|
41479
41545
|
const personaId = personaIdFromPath(cwdAbs, personaRoot);
|
|
41480
41546
|
const enabled = personaId ? buildEnabledPluginNames(personaManager, personaId) : /* @__PURE__ */ new Set();
|
|
@@ -41486,6 +41552,9 @@ function buildWorkspaceHandlers(deps) {
|
|
|
41486
41552
|
const args = AgentsListArgs.parse(frame);
|
|
41487
41553
|
const cwdAbs = path42.resolve(args.cwd);
|
|
41488
41554
|
assertGuestPath2(ctx, cwdAbs, personaRoot, "agents:list", usersRoot);
|
|
41555
|
+
if (args.tool === "codex") {
|
|
41556
|
+
return { response: { type: "agents:list", agents: [] } };
|
|
41557
|
+
}
|
|
41489
41558
|
const list2 = agents.list(args);
|
|
41490
41559
|
if (ctx?.principal.kind === "guest" && personaRoot) {
|
|
41491
41560
|
const personaId = personaIdFromPath(cwdAbs, personaRoot);
|
|
@@ -41508,11 +41577,11 @@ init_protocol();
|
|
|
41508
41577
|
init_protocol();
|
|
41509
41578
|
|
|
41510
41579
|
// src/workspace/git.ts
|
|
41511
|
-
var
|
|
41580
|
+
var import_node_child_process10 = require("child_process");
|
|
41512
41581
|
var import_node_fs29 = __toESM(require("fs"), 1);
|
|
41513
41582
|
var import_node_path31 = __toESM(require("path"), 1);
|
|
41514
41583
|
var import_node_util = require("util");
|
|
41515
|
-
var pexec = (0, import_node_util.promisify)(
|
|
41584
|
+
var pexec = (0, import_node_util.promisify)(import_node_child_process10.execFile);
|
|
41516
41585
|
function normalizePath(p2) {
|
|
41517
41586
|
const resolved = import_node_path31.default.resolve(p2);
|
|
41518
41587
|
try {
|
|
@@ -42938,7 +43007,7 @@ function buildExtensionHandlers(deps) {
|
|
|
42938
43007
|
}
|
|
42939
43008
|
|
|
42940
43009
|
// src/app-builder/kill-port.ts
|
|
42941
|
-
var
|
|
43010
|
+
var import_node_child_process11 = require("child_process");
|
|
42942
43011
|
async function killPortOccupants(port, ownedPids, logger) {
|
|
42943
43012
|
let pids;
|
|
42944
43013
|
try {
|
|
@@ -42980,7 +43049,7 @@ async function killPortOccupants(port, ownedPids, logger) {
|
|
|
42980
43049
|
}
|
|
42981
43050
|
function listPidsOnPort(port) {
|
|
42982
43051
|
return new Promise((resolve6, reject) => {
|
|
42983
|
-
(0,
|
|
43052
|
+
(0, import_node_child_process11.execFile)(
|
|
42984
43053
|
"lsof",
|
|
42985
43054
|
["-ti", `:${port}`],
|
|
42986
43055
|
{ timeout: 3e3 },
|
|
@@ -43052,7 +43121,7 @@ var PublishJobRegistry = class {
|
|
|
43052
43121
|
};
|
|
43053
43122
|
|
|
43054
43123
|
// src/app-builder/publish-job-runner.ts
|
|
43055
|
-
var
|
|
43124
|
+
var import_node_child_process12 = require("child_process");
|
|
43056
43125
|
var import_node_fs30 = require("fs");
|
|
43057
43126
|
var import_node_path38 = require("path");
|
|
43058
43127
|
|
|
@@ -43081,7 +43150,7 @@ function tailStderrLines(buf, n) {
|
|
|
43081
43150
|
// src/app-builder/publish-job-runner.ts
|
|
43082
43151
|
async function startPublishJob(deps, args) {
|
|
43083
43152
|
const { registry: registry2, projectDir } = deps;
|
|
43084
|
-
const
|
|
43153
|
+
const spawn12 = deps.spawnImpl ?? import_node_child_process12.spawn;
|
|
43085
43154
|
if (registry2.has(args.name)) {
|
|
43086
43155
|
return { jobId: registry2.get(args.name).jobId, status: "already-publishing" };
|
|
43087
43156
|
}
|
|
@@ -43093,7 +43162,7 @@ async function startPublishJob(deps, args) {
|
|
|
43093
43162
|
} catch {
|
|
43094
43163
|
logStream = null;
|
|
43095
43164
|
}
|
|
43096
|
-
const child =
|
|
43165
|
+
const child = spawn12("bash", [args.scriptPath, projDir], {
|
|
43097
43166
|
cwd: projDir,
|
|
43098
43167
|
env: process.env,
|
|
43099
43168
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -43970,7 +44039,7 @@ function buildMethodHandlers(deps) {
|
|
|
43970
44039
|
|
|
43971
44040
|
// src/app-builder/project-store.ts
|
|
43972
44041
|
var import_node_fs32 = require("fs");
|
|
43973
|
-
var
|
|
44042
|
+
var import_node_child_process13 = require("child_process");
|
|
43974
44043
|
var import_node_path42 = require("path");
|
|
43975
44044
|
init_protocol();
|
|
43976
44045
|
var PROJECTS_DIR = "projects";
|
|
@@ -44077,7 +44146,7 @@ var ProjectStore = class {
|
|
|
44077
44146
|
const scriptPath = (0, import_node_path42.join)(personaRoot, SCAFFOLD_SCRIPT_REL);
|
|
44078
44147
|
const destDir = this.projectDir(name);
|
|
44079
44148
|
return await new Promise((resolve6, reject) => {
|
|
44080
|
-
const child = (0,
|
|
44149
|
+
const child = (0, import_node_child_process13.spawn)("bash", [scriptPath, name, template, destDir], {
|
|
44081
44150
|
cwd: personaRoot,
|
|
44082
44151
|
env: { ...process.env, PATH: process.env.PATH ?? "" },
|
|
44083
44152
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -44182,7 +44251,7 @@ var ProjectStore = class {
|
|
|
44182
44251
|
};
|
|
44183
44252
|
|
|
44184
44253
|
// src/app-builder/dev-server-supervisor.ts
|
|
44185
|
-
var
|
|
44254
|
+
var import_node_child_process14 = require("child_process");
|
|
44186
44255
|
var import_node_events2 = require("events");
|
|
44187
44256
|
var DEFAULT_READY_PATTERN = /Local:\s+https?:\/\/|Nest application successfully started|server listening on/i;
|
|
44188
44257
|
var DevServerSupervisor = class extends import_node_events2.EventEmitter {
|
|
@@ -44219,7 +44288,7 @@ var DevServerSupervisor = class extends import_node_events2.EventEmitter {
|
|
|
44219
44288
|
tunnelHost: args.tunnelHost,
|
|
44220
44289
|
devCommand: cmd
|
|
44221
44290
|
});
|
|
44222
|
-
const child = (0,
|
|
44291
|
+
const child = (0, import_node_child_process14.spawn)("sh", ["-c", cmd], {
|
|
44223
44292
|
cwd: args.cwd,
|
|
44224
44293
|
env,
|
|
44225
44294
|
stdio: "pipe",
|
|
@@ -44611,7 +44680,7 @@ function computeGrantForFrame(method, frame) {
|
|
|
44611
44680
|
}
|
|
44612
44681
|
|
|
44613
44682
|
// src/extension/runtime.ts
|
|
44614
|
-
var
|
|
44683
|
+
var import_node_child_process15 = require("child_process");
|
|
44615
44684
|
var import_node_path43 = __toESM(require("path"), 1);
|
|
44616
44685
|
var import_promises10 = require("timers/promises");
|
|
44617
44686
|
|
|
@@ -44719,7 +44788,7 @@ var Runtime = class {
|
|
|
44719
44788
|
CLAWOS_EXT_PORT: String(port),
|
|
44720
44789
|
CLAWOS_EXT_ID: extId
|
|
44721
44790
|
};
|
|
44722
|
-
const child = (0,
|
|
44791
|
+
const child = (0, import_node_child_process15.spawn)("sh", ["-c", cmd], {
|
|
44723
44792
|
cwd: dir,
|
|
44724
44793
|
env,
|
|
44725
44794
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -45304,6 +45373,8 @@ async function startDaemon(config) {
|
|
|
45304
45373
|
workspace,
|
|
45305
45374
|
skills,
|
|
45306
45375
|
agents,
|
|
45376
|
+
// skills:list 按 tool 路由:codex → app-server skills/list;缺省 claude → SkillsScanner(同步包成 Promise)。
|
|
45377
|
+
getSkillsForTool: (tool, cwd) => tool === "codex" ? listCodexSkills(cwd) : Promise.resolve(skills.list({ cwd })),
|
|
45307
45378
|
history,
|
|
45308
45379
|
// history:read 按 session.tool 路由:codex → adapter.historyReader(CodexHistoryReader);缺省 claude。
|
|
45309
45380
|
getHistoryReader: (tool) => getAdapter(tool).historyReader ?? history,
|
package/package.json
CHANGED