@integrity-labs/agt-cli 0.28.1165 → 0.28.1167
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/bin/agt.js +6 -6
- package/dist/{chunk-TNPLCJIG.js → chunk-7IAJXJ7C.js} +315 -36
- package/dist/chunk-7IAJXJ7C.js.map +1 -0
- package/dist/{chunk-MBNPMML4.js → chunk-7WXWT4PA.js} +5 -5
- package/dist/{chunk-FGPPJKJ5.js → chunk-AJTF72A2.js} +3 -3
- package/dist/{chunk-ZDHCIJL6.js → chunk-AV4KD3HE.js} +2 -2
- package/dist/{chunk-T7NKHOJF.js → chunk-IV2UENRG.js} +10 -2
- package/dist/chunk-IV2UENRG.js.map +1 -0
- package/dist/{claude-code-updater-EM3AY2PR.js → claude-code-updater-WD4NNWY5.js} +5 -3
- package/dist/{claude-pair-runtime-P45H3GNC.js → claude-pair-runtime-JWXVVSSG.js} +3 -3
- package/dist/lib/manager-worker.js +40 -27
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +763 -484
- package/dist/mcp/index.js +616 -337
- package/dist/mcp/origami.js +604 -325
- package/dist/mcp/slack-channel.js +613 -334
- package/dist/mcp/telegram-channel.js +604 -325
- package/dist/{persistent-session-KSV7RIQQ.js → persistent-session-LKJVSRHX.js} +4 -4
- package/dist/{responsiveness-probe-XVYYSQQN.js → responsiveness-probe-ZEK2TD5E.js} +4 -4
- package/dist/{session-auth-dead-KMMDVC5E.js → session-auth-dead-TSARKC55.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-T7NKHOJF.js.map +0 -1
- package/dist/chunk-TNPLCJIG.js.map +0 -1
- /package/dist/{chunk-MBNPMML4.js.map → chunk-7WXWT4PA.js.map} +0 -0
- /package/dist/{chunk-FGPPJKJ5.js.map → chunk-AJTF72A2.js.map} +0 -0
- /package/dist/{chunk-ZDHCIJL6.js.map → chunk-AV4KD3HE.js.map} +0 -0
- /package/dist/{claude-code-updater-EM3AY2PR.js.map → claude-code-updater-WD4NNWY5.js.map} +0 -0
- /package/dist/{claude-pair-runtime-P45H3GNC.js.map → claude-pair-runtime-JWXVVSSG.js.map} +0 -0
- /package/dist/{persistent-session-KSV7RIQQ.js.map → persistent-session-LKJVSRHX.js.map} +0 -0
- /package/dist/{responsiveness-probe-XVYYSQQN.js.map → responsiveness-probe-ZEK2TD5E.js.map} +0 -0
- /package/dist/{session-auth-dead-KMMDVC5E.js.map → session-auth-dead-TSARKC55.js.map} +0 -0
|
@@ -108,7 +108,7 @@ var require_code = __commonJS({
|
|
|
108
108
|
}
|
|
109
109
|
exports._ = _;
|
|
110
110
|
var plus = new _Code("+");
|
|
111
|
-
function
|
|
111
|
+
function str3(strs, ...args) {
|
|
112
112
|
const expr = [safeStringify(strs[0])];
|
|
113
113
|
let i = 0;
|
|
114
114
|
while (i < args.length) {
|
|
@@ -119,7 +119,7 @@ var require_code = __commonJS({
|
|
|
119
119
|
optimize(expr);
|
|
120
120
|
return new _Code(expr);
|
|
121
121
|
}
|
|
122
|
-
exports.str =
|
|
122
|
+
exports.str = str3;
|
|
123
123
|
function addCodeArg(code, arg) {
|
|
124
124
|
if (arg instanceof _Code)
|
|
125
125
|
code.push(...arg._items);
|
|
@@ -162,7 +162,7 @@ var require_code = __commonJS({
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
function strConcat(c1, c2) {
|
|
165
|
-
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 :
|
|
165
|
+
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str3`${c1}${c2}`;
|
|
166
166
|
}
|
|
167
167
|
exports.strConcat = strConcat;
|
|
168
168
|
function interpolate(x) {
|
|
@@ -1124,22 +1124,22 @@ var require_util = __commonJS({
|
|
|
1124
1124
|
return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
|
|
1125
1125
|
}
|
|
1126
1126
|
exports.schemaRefOrVal = schemaRefOrVal;
|
|
1127
|
-
function unescapeFragment(
|
|
1128
|
-
return unescapeJsonPointer(decodeURIComponent(
|
|
1127
|
+
function unescapeFragment(str3) {
|
|
1128
|
+
return unescapeJsonPointer(decodeURIComponent(str3));
|
|
1129
1129
|
}
|
|
1130
1130
|
exports.unescapeFragment = unescapeFragment;
|
|
1131
|
-
function escapeFragment(
|
|
1132
|
-
return encodeURIComponent(escapeJsonPointer(
|
|
1131
|
+
function escapeFragment(str3) {
|
|
1132
|
+
return encodeURIComponent(escapeJsonPointer(str3));
|
|
1133
1133
|
}
|
|
1134
1134
|
exports.escapeFragment = escapeFragment;
|
|
1135
|
-
function escapeJsonPointer(
|
|
1136
|
-
if (typeof
|
|
1137
|
-
return `${
|
|
1138
|
-
return
|
|
1135
|
+
function escapeJsonPointer(str3) {
|
|
1136
|
+
if (typeof str3 == "number")
|
|
1137
|
+
return `${str3}`;
|
|
1138
|
+
return str3.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
1139
1139
|
}
|
|
1140
1140
|
exports.escapeJsonPointer = escapeJsonPointer;
|
|
1141
|
-
function unescapeJsonPointer(
|
|
1142
|
-
return
|
|
1141
|
+
function unescapeJsonPointer(str3) {
|
|
1142
|
+
return str3.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1143
1143
|
}
|
|
1144
1144
|
exports.unescapeJsonPointer = unescapeJsonPointer;
|
|
1145
1145
|
function eachItem(xs, f) {
|
|
@@ -2164,8 +2164,8 @@ var require_json_schema_traverse = __commonJS({
|
|
|
2164
2164
|
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
|
-
function escapeJsonPtr(
|
|
2168
|
-
return
|
|
2167
|
+
function escapeJsonPtr(str3) {
|
|
2168
|
+
return str3.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2169
2169
|
}
|
|
2170
2170
|
}
|
|
2171
2171
|
});
|
|
@@ -3226,10 +3226,10 @@ var require_utils = __commonJS({
|
|
|
3226
3226
|
return { host, isIPV6: false };
|
|
3227
3227
|
}
|
|
3228
3228
|
}
|
|
3229
|
-
function findToken(
|
|
3229
|
+
function findToken(str3, token) {
|
|
3230
3230
|
let ind = 0;
|
|
3231
|
-
for (let i = 0; i <
|
|
3232
|
-
if (
|
|
3231
|
+
for (let i = 0; i < str3.length; i++) {
|
|
3232
|
+
if (str3[i] === token) ind++;
|
|
3233
3233
|
}
|
|
3234
3234
|
return ind;
|
|
3235
3235
|
}
|
|
@@ -3882,7 +3882,7 @@ var require_core = __commonJS({
|
|
|
3882
3882
|
var util_1 = require_util();
|
|
3883
3883
|
var $dataRefSchema = require_data();
|
|
3884
3884
|
var uri_1 = require_uri();
|
|
3885
|
-
var defaultRegExp = (
|
|
3885
|
+
var defaultRegExp = (str3, flags) => new RegExp(str3, flags);
|
|
3886
3886
|
defaultRegExp.code = "new RegExp";
|
|
3887
3887
|
var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
|
|
3888
3888
|
var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
|
|
@@ -4677,16 +4677,16 @@ var require_ucs2length = __commonJS({
|
|
|
4677
4677
|
"../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
|
|
4678
4678
|
"use strict";
|
|
4679
4679
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4680
|
-
function ucs2length(
|
|
4681
|
-
const len =
|
|
4680
|
+
function ucs2length(str3) {
|
|
4681
|
+
const len = str3.length;
|
|
4682
4682
|
let length = 0;
|
|
4683
4683
|
let pos = 0;
|
|
4684
4684
|
let value;
|
|
4685
4685
|
while (pos < len) {
|
|
4686
4686
|
length++;
|
|
4687
|
-
value =
|
|
4687
|
+
value = str3.charCodeAt(pos++);
|
|
4688
4688
|
if (value >= 55296 && value <= 56319 && pos < len) {
|
|
4689
|
-
value =
|
|
4689
|
+
value = str3.charCodeAt(pos);
|
|
4690
4690
|
if ((value & 64512) === 56320)
|
|
4691
4691
|
pos++;
|
|
4692
4692
|
}
|
|
@@ -6569,8 +6569,8 @@ var require_formats = __commonJS({
|
|
|
6569
6569
|
}
|
|
6570
6570
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6571
6571
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
6572
|
-
function date3(
|
|
6573
|
-
const matches = DATE.exec(
|
|
6572
|
+
function date3(str3) {
|
|
6573
|
+
const matches = DATE.exec(str3);
|
|
6574
6574
|
if (!matches)
|
|
6575
6575
|
return false;
|
|
6576
6576
|
const year = +matches[1];
|
|
@@ -6589,8 +6589,8 @@ var require_formats = __commonJS({
|
|
|
6589
6589
|
}
|
|
6590
6590
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
6591
6591
|
function getTime(strictTimeZone) {
|
|
6592
|
-
return function time3(
|
|
6593
|
-
const matches = TIME.exec(
|
|
6592
|
+
return function time3(str3) {
|
|
6593
|
+
const matches = TIME.exec(str3);
|
|
6594
6594
|
if (!matches)
|
|
6595
6595
|
return false;
|
|
6596
6596
|
const hr = +matches[1];
|
|
@@ -6636,8 +6636,8 @@ var require_formats = __commonJS({
|
|
|
6636
6636
|
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
6637
6637
|
function getDateTime(strictTimeZone) {
|
|
6638
6638
|
const time3 = getTime(strictTimeZone);
|
|
6639
|
-
return function date_time(
|
|
6640
|
-
const dateTime =
|
|
6639
|
+
return function date_time(str3) {
|
|
6640
|
+
const dateTime = str3.split(DATE_TIME_SEPARATOR);
|
|
6641
6641
|
return dateTime.length === 2 && date3(dateTime[0]) && time3(dateTime[1]);
|
|
6642
6642
|
};
|
|
6643
6643
|
}
|
|
@@ -6662,13 +6662,13 @@ var require_formats = __commonJS({
|
|
|
6662
6662
|
}
|
|
6663
6663
|
var NOT_URI_FRAGMENT = /\/|:/;
|
|
6664
6664
|
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
6665
|
-
function uri(
|
|
6666
|
-
return NOT_URI_FRAGMENT.test(
|
|
6665
|
+
function uri(str3) {
|
|
6666
|
+
return NOT_URI_FRAGMENT.test(str3) && URI.test(str3);
|
|
6667
6667
|
}
|
|
6668
6668
|
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
6669
|
-
function byte(
|
|
6669
|
+
function byte(str3) {
|
|
6670
6670
|
BYTE.lastIndex = 0;
|
|
6671
|
-
return BYTE.test(
|
|
6671
|
+
return BYTE.test(str3);
|
|
6672
6672
|
}
|
|
6673
6673
|
var MIN_INT32 = -(2 ** 31);
|
|
6674
6674
|
var MAX_INT32 = 2 ** 31 - 1;
|
|
@@ -6682,11 +6682,11 @@ var require_formats = __commonJS({
|
|
|
6682
6682
|
return true;
|
|
6683
6683
|
}
|
|
6684
6684
|
var Z_ANCHOR = /[^\\]\\Z/;
|
|
6685
|
-
function regex(
|
|
6686
|
-
if (Z_ANCHOR.test(
|
|
6685
|
+
function regex(str3) {
|
|
6686
|
+
if (Z_ANCHOR.test(str3))
|
|
6687
6687
|
return false;
|
|
6688
6688
|
try {
|
|
6689
|
-
new RegExp(
|
|
6689
|
+
new RegExp(str3);
|
|
6690
6690
|
return true;
|
|
6691
6691
|
} catch (e) {
|
|
6692
6692
|
return false;
|
|
@@ -8640,13 +8640,13 @@ var require_Collection = __commonJS({
|
|
|
8640
8640
|
var require_stringifyComment = __commonJS({
|
|
8641
8641
|
"../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
8642
8642
|
"use strict";
|
|
8643
|
-
var stringifyComment = (
|
|
8643
|
+
var stringifyComment = (str3) => str3.replace(/^(?!$)(?: $)?/gm, "#");
|
|
8644
8644
|
function indentComment(comment, indent) {
|
|
8645
8645
|
if (/^\n+$/.test(comment))
|
|
8646
8646
|
return comment.substring(1);
|
|
8647
8647
|
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
8648
8648
|
}
|
|
8649
|
-
var lineComment = (
|
|
8649
|
+
var lineComment = (str3, indent, comment) => str3.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str3.endsWith(" ") ? "" : " ") + comment;
|
|
8650
8650
|
exports.indentComment = indentComment;
|
|
8651
8651
|
exports.lineComment = lineComment;
|
|
8652
8652
|
exports.stringifyComment = stringifyComment;
|
|
@@ -8800,16 +8800,16 @@ var require_stringifyString = __commonJS({
|
|
|
8800
8800
|
lineWidth: ctx.options.lineWidth,
|
|
8801
8801
|
minContentWidth: ctx.options.minContentWidth
|
|
8802
8802
|
});
|
|
8803
|
-
var containsDocumentMarker = (
|
|
8804
|
-
function lineLengthOverLimit(
|
|
8803
|
+
var containsDocumentMarker = (str3) => /^(%|---|\.\.\.)/m.test(str3);
|
|
8804
|
+
function lineLengthOverLimit(str3, lineWidth, indentLength) {
|
|
8805
8805
|
if (!lineWidth || lineWidth < 0)
|
|
8806
8806
|
return false;
|
|
8807
8807
|
const limit = lineWidth - indentLength;
|
|
8808
|
-
const strLen =
|
|
8808
|
+
const strLen = str3.length;
|
|
8809
8809
|
if (strLen <= limit)
|
|
8810
8810
|
return false;
|
|
8811
8811
|
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
8812
|
-
if (
|
|
8812
|
+
if (str3[i] === "\n") {
|
|
8813
8813
|
if (i - start > limit)
|
|
8814
8814
|
return true;
|
|
8815
8815
|
start = i + 1;
|
|
@@ -8826,11 +8826,11 @@ var require_stringifyString = __commonJS({
|
|
|
8826
8826
|
const { implicitKey } = ctx;
|
|
8827
8827
|
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
8828
8828
|
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
8829
|
-
let
|
|
8829
|
+
let str3 = "";
|
|
8830
8830
|
let start = 0;
|
|
8831
8831
|
for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
|
|
8832
8832
|
if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
8833
|
-
|
|
8833
|
+
str3 += json.slice(start, i) + "\\ ";
|
|
8834
8834
|
i += 1;
|
|
8835
8835
|
start = i;
|
|
8836
8836
|
ch = "\\";
|
|
@@ -8839,38 +8839,38 @@ var require_stringifyString = __commonJS({
|
|
|
8839
8839
|
switch (json[i + 1]) {
|
|
8840
8840
|
case "u":
|
|
8841
8841
|
{
|
|
8842
|
-
|
|
8842
|
+
str3 += json.slice(start, i);
|
|
8843
8843
|
const code = json.substr(i + 2, 4);
|
|
8844
8844
|
switch (code) {
|
|
8845
8845
|
case "0000":
|
|
8846
|
-
|
|
8846
|
+
str3 += "\\0";
|
|
8847
8847
|
break;
|
|
8848
8848
|
case "0007":
|
|
8849
|
-
|
|
8849
|
+
str3 += "\\a";
|
|
8850
8850
|
break;
|
|
8851
8851
|
case "000b":
|
|
8852
|
-
|
|
8852
|
+
str3 += "\\v";
|
|
8853
8853
|
break;
|
|
8854
8854
|
case "001b":
|
|
8855
|
-
|
|
8855
|
+
str3 += "\\e";
|
|
8856
8856
|
break;
|
|
8857
8857
|
case "0085":
|
|
8858
|
-
|
|
8858
|
+
str3 += "\\N";
|
|
8859
8859
|
break;
|
|
8860
8860
|
case "00a0":
|
|
8861
|
-
|
|
8861
|
+
str3 += "\\_";
|
|
8862
8862
|
break;
|
|
8863
8863
|
case "2028":
|
|
8864
|
-
|
|
8864
|
+
str3 += "\\L";
|
|
8865
8865
|
break;
|
|
8866
8866
|
case "2029":
|
|
8867
|
-
|
|
8867
|
+
str3 += "\\P";
|
|
8868
8868
|
break;
|
|
8869
8869
|
default:
|
|
8870
8870
|
if (code.substr(0, 2) === "00")
|
|
8871
|
-
|
|
8871
|
+
str3 += "\\x" + code.substr(2);
|
|
8872
8872
|
else
|
|
8873
|
-
|
|
8873
|
+
str3 += json.substr(i, 6);
|
|
8874
8874
|
}
|
|
8875
8875
|
i += 5;
|
|
8876
8876
|
start = i + 1;
|
|
@@ -8880,14 +8880,14 @@ var require_stringifyString = __commonJS({
|
|
|
8880
8880
|
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
8881
8881
|
i += 1;
|
|
8882
8882
|
} else {
|
|
8883
|
-
|
|
8883
|
+
str3 += json.slice(start, i) + "\n\n";
|
|
8884
8884
|
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
8885
|
-
|
|
8885
|
+
str3 += "\n";
|
|
8886
8886
|
i += 2;
|
|
8887
8887
|
}
|
|
8888
|
-
|
|
8888
|
+
str3 += indent;
|
|
8889
8889
|
if (json[i + 2] === " ")
|
|
8890
|
-
|
|
8890
|
+
str3 += "\\";
|
|
8891
8891
|
i += 1;
|
|
8892
8892
|
start = i + 1;
|
|
8893
8893
|
}
|
|
@@ -8896,8 +8896,8 @@ var require_stringifyString = __commonJS({
|
|
|
8896
8896
|
i += 1;
|
|
8897
8897
|
}
|
|
8898
8898
|
}
|
|
8899
|
-
|
|
8900
|
-
return implicitKey ?
|
|
8899
|
+
str3 = start ? str3 + json.slice(start) : json;
|
|
8900
|
+
return implicitKey ? str3 : foldFlowLines.foldFlowLines(str3, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
8901
8901
|
}
|
|
8902
8902
|
function singleQuotedString(value, ctx) {
|
|
8903
8903
|
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
@@ -8981,9 +8981,9 @@ ${indent}`) + "'";
|
|
|
8981
8981
|
start = start.replace(/\n+/g, `$&${indent}`);
|
|
8982
8982
|
}
|
|
8983
8983
|
const indentSize = indent ? "2" : "1";
|
|
8984
|
-
let
|
|
8984
|
+
let header2 = (startWithSpace ? indentSize : "") + chomp;
|
|
8985
8985
|
if (comment) {
|
|
8986
|
-
|
|
8986
|
+
header2 += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
|
|
8987
8987
|
if (onComment)
|
|
8988
8988
|
onComment();
|
|
8989
8989
|
}
|
|
@@ -8998,11 +8998,11 @@ ${indent}`) + "'";
|
|
|
8998
8998
|
}
|
|
8999
8999
|
const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);
|
|
9000
9000
|
if (!literalFallback)
|
|
9001
|
-
return `>${
|
|
9001
|
+
return `>${header2}
|
|
9002
9002
|
${indent}${body}`;
|
|
9003
9003
|
}
|
|
9004
9004
|
value = value.replace(/\n+/g, `$&${indent}`);
|
|
9005
|
-
return `|${
|
|
9005
|
+
return `|${header2}
|
|
9006
9006
|
${indent}${start}${value}${end}`;
|
|
9007
9007
|
}
|
|
9008
9008
|
function plainString(item, ctx, onComment, onChompKeep) {
|
|
@@ -9025,15 +9025,15 @@ ${indent}${start}${value}${end}`;
|
|
|
9025
9025
|
return quotedString(value, ctx);
|
|
9026
9026
|
}
|
|
9027
9027
|
}
|
|
9028
|
-
const
|
|
9028
|
+
const str3 = value.replace(/\n+/g, `$&
|
|
9029
9029
|
${indent}`);
|
|
9030
9030
|
if (actualString) {
|
|
9031
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(
|
|
9031
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str3);
|
|
9032
9032
|
const { compat, tags } = ctx.doc.schema;
|
|
9033
9033
|
if (tags.some(test) || compat?.some(test))
|
|
9034
9034
|
return quotedString(value, ctx);
|
|
9035
9035
|
}
|
|
9036
|
-
return implicitKey ?
|
|
9036
|
+
return implicitKey ? str3 : foldFlowLines.foldFlowLines(str3, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
|
|
9037
9037
|
}
|
|
9038
9038
|
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
9039
9039
|
const { implicitKey, inFlow } = ctx;
|
|
@@ -9185,11 +9185,11 @@ var require_stringify = __commonJS({
|
|
|
9185
9185
|
const props = stringifyProps(node, tagObj, ctx);
|
|
9186
9186
|
if (props.length > 0)
|
|
9187
9187
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
9188
|
-
const
|
|
9188
|
+
const str3 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
9189
9189
|
if (!props)
|
|
9190
|
-
return
|
|
9191
|
-
return identity.isScalar(node) ||
|
|
9192
|
-
${ctx.indent}${
|
|
9190
|
+
return str3;
|
|
9191
|
+
return identity.isScalar(node) || str3[0] === "{" || str3[0] === "[" ? `${props} ${str3}` : `${props}
|
|
9192
|
+
${ctx.indent}${str3}`;
|
|
9193
9193
|
}
|
|
9194
9194
|
exports.createStringifyContext = createStringifyContext;
|
|
9195
9195
|
exports.stringify = stringify;
|
|
@@ -9224,8 +9224,8 @@ var require_stringifyPair = __commonJS({
|
|
|
9224
9224
|
});
|
|
9225
9225
|
let keyCommentDone = false;
|
|
9226
9226
|
let chompKeep = false;
|
|
9227
|
-
let
|
|
9228
|
-
if (!explicitKey && !ctx.inFlow &&
|
|
9227
|
+
let str3 = stringify.stringify(key2, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
9228
|
+
if (!explicitKey && !ctx.inFlow && str3.length > 1024) {
|
|
9229
9229
|
if (simpleKeys)
|
|
9230
9230
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
9231
9231
|
explicitKey = true;
|
|
@@ -9234,27 +9234,27 @@ var require_stringifyPair = __commonJS({
|
|
|
9234
9234
|
if (allNullValues || value == null) {
|
|
9235
9235
|
if (keyCommentDone && onComment)
|
|
9236
9236
|
onComment();
|
|
9237
|
-
return
|
|
9237
|
+
return str3 === "" ? "?" : explicitKey ? `? ${str3}` : str3;
|
|
9238
9238
|
}
|
|
9239
9239
|
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
9240
|
-
|
|
9240
|
+
str3 = `? ${str3}`;
|
|
9241
9241
|
if (keyComment && !keyCommentDone) {
|
|
9242
|
-
|
|
9242
|
+
str3 += stringifyComment.lineComment(str3, ctx.indent, commentString(keyComment));
|
|
9243
9243
|
} else if (chompKeep && onChompKeep)
|
|
9244
9244
|
onChompKeep();
|
|
9245
|
-
return
|
|
9245
|
+
return str3;
|
|
9246
9246
|
}
|
|
9247
9247
|
if (keyCommentDone)
|
|
9248
9248
|
keyComment = null;
|
|
9249
9249
|
if (explicitKey) {
|
|
9250
9250
|
if (keyComment)
|
|
9251
|
-
|
|
9252
|
-
|
|
9251
|
+
str3 += stringifyComment.lineComment(str3, ctx.indent, commentString(keyComment));
|
|
9252
|
+
str3 = `? ${str3}
|
|
9253
9253
|
${indent}:`;
|
|
9254
9254
|
} else {
|
|
9255
|
-
|
|
9255
|
+
str3 = `${str3}:`;
|
|
9256
9256
|
if (keyComment)
|
|
9257
|
-
|
|
9257
|
+
str3 += stringifyComment.lineComment(str3, ctx.indent, commentString(keyComment));
|
|
9258
9258
|
}
|
|
9259
9259
|
let vsb, vcb, valueComment;
|
|
9260
9260
|
if (identity.isNode(value)) {
|
|
@@ -9270,7 +9270,7 @@ ${indent}:`;
|
|
|
9270
9270
|
}
|
|
9271
9271
|
ctx.implicitKey = false;
|
|
9272
9272
|
if (!explicitKey && !keyComment && identity.isScalar(value))
|
|
9273
|
-
ctx.indentAtStart =
|
|
9273
|
+
ctx.indentAtStart = str3.length + 1;
|
|
9274
9274
|
chompKeep = false;
|
|
9275
9275
|
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
9276
9276
|
ctx.indent = ctx.indent.substring(2);
|
|
@@ -9314,16 +9314,16 @@ ${ctx.indent}`;
|
|
|
9314
9314
|
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
9315
9315
|
ws = "";
|
|
9316
9316
|
}
|
|
9317
|
-
|
|
9317
|
+
str3 += ws + valueStr;
|
|
9318
9318
|
if (ctx.inFlow) {
|
|
9319
9319
|
if (valueCommentDone && onComment)
|
|
9320
9320
|
onComment();
|
|
9321
9321
|
} else if (valueComment && !valueCommentDone) {
|
|
9322
|
-
|
|
9322
|
+
str3 += stringifyComment.lineComment(str3, ctx.indent, commentString(valueComment));
|
|
9323
9323
|
} else if (chompKeep && onChompKeep) {
|
|
9324
9324
|
onChompKeep();
|
|
9325
9325
|
}
|
|
9326
|
-
return
|
|
9326
|
+
return str3;
|
|
9327
9327
|
}
|
|
9328
9328
|
exports.stringifyPair = stringifyPair;
|
|
9329
9329
|
}
|
|
@@ -9550,31 +9550,31 @@ var require_stringifyCollection = __commonJS({
|
|
|
9550
9550
|
}
|
|
9551
9551
|
}
|
|
9552
9552
|
chompKeep = false;
|
|
9553
|
-
let
|
|
9553
|
+
let str4 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
9554
9554
|
if (comment2)
|
|
9555
|
-
|
|
9555
|
+
str4 += stringifyComment.lineComment(str4, itemIndent, commentString(comment2));
|
|
9556
9556
|
if (chompKeep && comment2)
|
|
9557
9557
|
chompKeep = false;
|
|
9558
|
-
lines.push(blockItemPrefix +
|
|
9558
|
+
lines.push(blockItemPrefix + str4);
|
|
9559
9559
|
}
|
|
9560
|
-
let
|
|
9560
|
+
let str3;
|
|
9561
9561
|
if (lines.length === 0) {
|
|
9562
|
-
|
|
9562
|
+
str3 = flowChars.start + flowChars.end;
|
|
9563
9563
|
} else {
|
|
9564
|
-
|
|
9564
|
+
str3 = lines[0];
|
|
9565
9565
|
for (let i = 1; i < lines.length; ++i) {
|
|
9566
9566
|
const line = lines[i];
|
|
9567
|
-
|
|
9567
|
+
str3 += line ? `
|
|
9568
9568
|
${indent}${line}` : "\n";
|
|
9569
9569
|
}
|
|
9570
9570
|
}
|
|
9571
9571
|
if (comment) {
|
|
9572
|
-
|
|
9572
|
+
str3 += "\n" + stringifyComment.indentComment(commentString(comment), indent);
|
|
9573
9573
|
if (onComment)
|
|
9574
9574
|
onComment();
|
|
9575
9575
|
} else if (chompKeep && onChompKeep)
|
|
9576
9576
|
onChompKeep();
|
|
9577
|
-
return
|
|
9577
|
+
return str3;
|
|
9578
9578
|
}
|
|
9579
9579
|
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
9580
9580
|
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
@@ -9617,21 +9617,21 @@ ${indent}${line}` : "\n";
|
|
|
9617
9617
|
}
|
|
9618
9618
|
if (comment)
|
|
9619
9619
|
reqNewline = true;
|
|
9620
|
-
let
|
|
9621
|
-
reqNewline || (reqNewline = lines.length > linesAtValue ||
|
|
9620
|
+
let str3 = stringify.stringify(item, itemCtx, () => comment = null);
|
|
9621
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str3.includes("\n"));
|
|
9622
9622
|
if (i < items.length - 1) {
|
|
9623
|
-
|
|
9623
|
+
str3 += ",";
|
|
9624
9624
|
} else if (ctx.options.trailingComma) {
|
|
9625
9625
|
if (ctx.options.lineWidth > 0) {
|
|
9626
|
-
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (
|
|
9626
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str3.length + 2) > ctx.options.lineWidth);
|
|
9627
9627
|
}
|
|
9628
9628
|
if (reqNewline) {
|
|
9629
|
-
|
|
9629
|
+
str3 += ",";
|
|
9630
9630
|
}
|
|
9631
9631
|
}
|
|
9632
9632
|
if (comment)
|
|
9633
|
-
|
|
9634
|
-
lines.push(
|
|
9633
|
+
str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment));
|
|
9634
|
+
lines.push(str3);
|
|
9635
9635
|
linesAtValue = lines.length;
|
|
9636
9636
|
}
|
|
9637
9637
|
const { start, end } = flowChars;
|
|
@@ -9643,11 +9643,11 @@ ${indent}${line}` : "\n";
|
|
|
9643
9643
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
9644
9644
|
}
|
|
9645
9645
|
if (reqNewline) {
|
|
9646
|
-
let
|
|
9646
|
+
let str3 = start;
|
|
9647
9647
|
for (const line of lines)
|
|
9648
|
-
|
|
9648
|
+
str3 += line ? `
|
|
9649
9649
|
${indentStep}${indent}${line}` : "\n";
|
|
9650
|
-
return `${
|
|
9650
|
+
return `${str3}
|
|
9651
9651
|
${indent}${end}`;
|
|
9652
9652
|
} else {
|
|
9653
9653
|
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
@@ -9979,7 +9979,7 @@ var require_string = __commonJS({
|
|
|
9979
9979
|
identify: (value) => typeof value === "string",
|
|
9980
9980
|
default: true,
|
|
9981
9981
|
tag: "tag:yaml.org,2002:str",
|
|
9982
|
-
resolve: (
|
|
9982
|
+
resolve: (str3) => str3,
|
|
9983
9983
|
stringify(item, ctx, onComment, onChompKeep) {
|
|
9984
9984
|
ctx = Object.assign({ actualString: true }, ctx);
|
|
9985
9985
|
return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
|
|
@@ -10017,7 +10017,7 @@ var require_bool = __commonJS({
|
|
|
10017
10017
|
default: true,
|
|
10018
10018
|
tag: "tag:yaml.org,2002:bool",
|
|
10019
10019
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
10020
|
-
resolve: (
|
|
10020
|
+
resolve: (str3) => new Scalar.Scalar(str3[0] === "t" || str3[0] === "T"),
|
|
10021
10021
|
stringify({ source, value }, ctx) {
|
|
10022
10022
|
if (source && boolTag.test.test(source)) {
|
|
10023
10023
|
const sv = source[0] === "t" || source[0] === "T";
|
|
@@ -10069,7 +10069,7 @@ var require_float = __commonJS({
|
|
|
10069
10069
|
default: true,
|
|
10070
10070
|
tag: "tag:yaml.org,2002:float",
|
|
10071
10071
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
10072
|
-
resolve: (
|
|
10072
|
+
resolve: (str3) => str3.slice(-3).toLowerCase() === "nan" ? NaN : str3[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
10073
10073
|
stringify: stringifyNumber.stringifyNumber
|
|
10074
10074
|
};
|
|
10075
10075
|
var floatExp = {
|
|
@@ -10078,7 +10078,7 @@ var require_float = __commonJS({
|
|
|
10078
10078
|
tag: "tag:yaml.org,2002:float",
|
|
10079
10079
|
format: "EXP",
|
|
10080
10080
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
10081
|
-
resolve: (
|
|
10081
|
+
resolve: (str3) => parseFloat(str3),
|
|
10082
10082
|
stringify(node) {
|
|
10083
10083
|
const num = Number(node.value);
|
|
10084
10084
|
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
|
|
@@ -10089,11 +10089,11 @@ var require_float = __commonJS({
|
|
|
10089
10089
|
default: true,
|
|
10090
10090
|
tag: "tag:yaml.org,2002:float",
|
|
10091
10091
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
10092
|
-
resolve(
|
|
10093
|
-
const node = new Scalar.Scalar(parseFloat(
|
|
10094
|
-
const dot =
|
|
10095
|
-
if (dot !== -1 &&
|
|
10096
|
-
node.minFractionDigits =
|
|
10092
|
+
resolve(str3) {
|
|
10093
|
+
const node = new Scalar.Scalar(parseFloat(str3));
|
|
10094
|
+
const dot = str3.indexOf(".");
|
|
10095
|
+
if (dot !== -1 && str3[str3.length - 1] === "0")
|
|
10096
|
+
node.minFractionDigits = str3.length - dot - 1;
|
|
10097
10097
|
return node;
|
|
10098
10098
|
},
|
|
10099
10099
|
stringify: stringifyNumber.stringifyNumber
|
|
@@ -10110,7 +10110,7 @@ var require_int = __commonJS({
|
|
|
10110
10110
|
"use strict";
|
|
10111
10111
|
var stringifyNumber = require_stringifyNumber();
|
|
10112
10112
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
10113
|
-
var intResolve = (
|
|
10113
|
+
var intResolve = (str3, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str3) : parseInt(str3.substring(offset), radix);
|
|
10114
10114
|
function intStringify(node, radix, prefix) {
|
|
10115
10115
|
const { value } = node;
|
|
10116
10116
|
if (intIdentify(value) && value >= 0)
|
|
@@ -10123,7 +10123,7 @@ var require_int = __commonJS({
|
|
|
10123
10123
|
tag: "tag:yaml.org,2002:int",
|
|
10124
10124
|
format: "OCT",
|
|
10125
10125
|
test: /^0o[0-7]+$/,
|
|
10126
|
-
resolve: (
|
|
10126
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 2, 8, opt),
|
|
10127
10127
|
stringify: (node) => intStringify(node, 8, "0o")
|
|
10128
10128
|
};
|
|
10129
10129
|
var int2 = {
|
|
@@ -10131,7 +10131,7 @@ var require_int = __commonJS({
|
|
|
10131
10131
|
default: true,
|
|
10132
10132
|
tag: "tag:yaml.org,2002:int",
|
|
10133
10133
|
test: /^[-+]?[0-9]+$/,
|
|
10134
|
-
resolve: (
|
|
10134
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 0, 10, opt),
|
|
10135
10135
|
stringify: stringifyNumber.stringifyNumber
|
|
10136
10136
|
};
|
|
10137
10137
|
var intHex = {
|
|
@@ -10140,7 +10140,7 @@ var require_int = __commonJS({
|
|
|
10140
10140
|
tag: "tag:yaml.org,2002:int",
|
|
10141
10141
|
format: "HEX",
|
|
10142
10142
|
test: /^0x[0-9a-fA-F]+$/,
|
|
10143
|
-
resolve: (
|
|
10143
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 2, 16, opt),
|
|
10144
10144
|
stringify: (node) => intStringify(node, 16, "0x")
|
|
10145
10145
|
};
|
|
10146
10146
|
exports.int = int2;
|
|
@@ -10193,7 +10193,7 @@ var require_schema3 = __commonJS({
|
|
|
10193
10193
|
identify: (value) => typeof value === "string",
|
|
10194
10194
|
default: true,
|
|
10195
10195
|
tag: "tag:yaml.org,2002:str",
|
|
10196
|
-
resolve: (
|
|
10196
|
+
resolve: (str3) => str3,
|
|
10197
10197
|
stringify: stringifyJSON
|
|
10198
10198
|
},
|
|
10199
10199
|
{
|
|
@@ -10210,7 +10210,7 @@ var require_schema3 = __commonJS({
|
|
|
10210
10210
|
default: true,
|
|
10211
10211
|
tag: "tag:yaml.org,2002:bool",
|
|
10212
10212
|
test: /^true$|^false$/,
|
|
10213
|
-
resolve: (
|
|
10213
|
+
resolve: (str3) => str3 === "true",
|
|
10214
10214
|
stringify: stringifyJSON
|
|
10215
10215
|
},
|
|
10216
10216
|
{
|
|
@@ -10218,7 +10218,7 @@ var require_schema3 = __commonJS({
|
|
|
10218
10218
|
default: true,
|
|
10219
10219
|
tag: "tag:yaml.org,2002:int",
|
|
10220
10220
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
10221
|
-
resolve: (
|
|
10221
|
+
resolve: (str3, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str3) : parseInt(str3, 10),
|
|
10222
10222
|
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
10223
10223
|
},
|
|
10224
10224
|
{
|
|
@@ -10226,7 +10226,7 @@ var require_schema3 = __commonJS({
|
|
|
10226
10226
|
default: true,
|
|
10227
10227
|
tag: "tag:yaml.org,2002:float",
|
|
10228
10228
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
10229
|
-
resolve: (
|
|
10229
|
+
resolve: (str3) => parseFloat(str3),
|
|
10230
10230
|
stringify: stringifyJSON
|
|
10231
10231
|
}
|
|
10232
10232
|
];
|
|
@@ -10234,9 +10234,9 @@ var require_schema3 = __commonJS({
|
|
|
10234
10234
|
default: true,
|
|
10235
10235
|
tag: "",
|
|
10236
10236
|
test: /^/,
|
|
10237
|
-
resolve(
|
|
10238
|
-
onError(`Unresolved plain scalar ${JSON.stringify(
|
|
10239
|
-
return
|
|
10237
|
+
resolve(str3, onError) {
|
|
10238
|
+
onError(`Unresolved plain scalar ${JSON.stringify(str3)}`);
|
|
10239
|
+
return str3;
|
|
10240
10240
|
}
|
|
10241
10241
|
};
|
|
10242
10242
|
var schema = [map.map, seq.seq].concat(jsonScalars, jsonError);
|
|
@@ -10268,10 +10268,10 @@ var require_binary = __commonJS({
|
|
|
10268
10268
|
if (typeof node_buffer.Buffer === "function") {
|
|
10269
10269
|
return node_buffer.Buffer.from(src, "base64");
|
|
10270
10270
|
} else if (typeof atob === "function") {
|
|
10271
|
-
const
|
|
10272
|
-
const buffer = new Uint8Array(
|
|
10273
|
-
for (let i = 0; i <
|
|
10274
|
-
buffer[i] =
|
|
10271
|
+
const str3 = atob(src.replace(/[\n\r]/g, ""));
|
|
10272
|
+
const buffer = new Uint8Array(str3.length);
|
|
10273
|
+
for (let i = 0; i < str3.length; ++i)
|
|
10274
|
+
buffer[i] = str3.charCodeAt(i);
|
|
10275
10275
|
return buffer;
|
|
10276
10276
|
} else {
|
|
10277
10277
|
onError("This environment does not support reading binary tags; either Buffer or atob is required");
|
|
@@ -10282,28 +10282,28 @@ var require_binary = __commonJS({
|
|
|
10282
10282
|
if (!value)
|
|
10283
10283
|
return "";
|
|
10284
10284
|
const buf = value;
|
|
10285
|
-
let
|
|
10285
|
+
let str3;
|
|
10286
10286
|
if (typeof node_buffer.Buffer === "function") {
|
|
10287
|
-
|
|
10287
|
+
str3 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
|
|
10288
10288
|
} else if (typeof btoa === "function") {
|
|
10289
10289
|
let s = "";
|
|
10290
10290
|
for (let i = 0; i < buf.length; ++i)
|
|
10291
10291
|
s += String.fromCharCode(buf[i]);
|
|
10292
|
-
|
|
10292
|
+
str3 = btoa(s);
|
|
10293
10293
|
} else {
|
|
10294
10294
|
throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
10295
10295
|
}
|
|
10296
10296
|
type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
|
|
10297
10297
|
if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
|
|
10298
10298
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
|
10299
|
-
const n = Math.ceil(
|
|
10299
|
+
const n = Math.ceil(str3.length / lineWidth);
|
|
10300
10300
|
const lines = new Array(n);
|
|
10301
10301
|
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
|
|
10302
|
-
lines[i] =
|
|
10302
|
+
lines[i] = str3.substr(o, lineWidth);
|
|
10303
10303
|
}
|
|
10304
|
-
|
|
10304
|
+
str3 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
|
10305
10305
|
}
|
|
10306
|
-
return stringifyString.stringifyString({ comment, type, value:
|
|
10306
|
+
return stringifyString.stringifyString({ comment, type, value: str3 }, ctx, onComment, onChompKeep);
|
|
10307
10307
|
}
|
|
10308
10308
|
};
|
|
10309
10309
|
exports.binary = binary;
|
|
@@ -10509,7 +10509,7 @@ var require_float2 = __commonJS({
|
|
|
10509
10509
|
default: true,
|
|
10510
10510
|
tag: "tag:yaml.org,2002:float",
|
|
10511
10511
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
10512
|
-
resolve: (
|
|
10512
|
+
resolve: (str3) => str3.slice(-3).toLowerCase() === "nan" ? NaN : str3[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
10513
10513
|
stringify: stringifyNumber.stringifyNumber
|
|
10514
10514
|
};
|
|
10515
10515
|
var floatExp = {
|
|
@@ -10518,7 +10518,7 @@ var require_float2 = __commonJS({
|
|
|
10518
10518
|
tag: "tag:yaml.org,2002:float",
|
|
10519
10519
|
format: "EXP",
|
|
10520
10520
|
test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
10521
|
-
resolve: (
|
|
10521
|
+
resolve: (str3) => parseFloat(str3.replace(/_/g, "")),
|
|
10522
10522
|
stringify(node) {
|
|
10523
10523
|
const num = Number(node.value);
|
|
10524
10524
|
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
|
|
@@ -10529,11 +10529,11 @@ var require_float2 = __commonJS({
|
|
|
10529
10529
|
default: true,
|
|
10530
10530
|
tag: "tag:yaml.org,2002:float",
|
|
10531
10531
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
10532
|
-
resolve(
|
|
10533
|
-
const node = new Scalar.Scalar(parseFloat(
|
|
10534
|
-
const dot =
|
|
10532
|
+
resolve(str3) {
|
|
10533
|
+
const node = new Scalar.Scalar(parseFloat(str3.replace(/_/g, "")));
|
|
10534
|
+
const dot = str3.indexOf(".");
|
|
10535
10535
|
if (dot !== -1) {
|
|
10536
|
-
const f =
|
|
10536
|
+
const f = str3.substring(dot + 1).replace(/_/g, "");
|
|
10537
10537
|
if (f[f.length - 1] === "0")
|
|
10538
10538
|
node.minFractionDigits = f.length;
|
|
10539
10539
|
}
|
|
@@ -10553,34 +10553,34 @@ var require_int2 = __commonJS({
|
|
|
10553
10553
|
"use strict";
|
|
10554
10554
|
var stringifyNumber = require_stringifyNumber();
|
|
10555
10555
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
10556
|
-
function intResolve(
|
|
10557
|
-
const sign =
|
|
10556
|
+
function intResolve(str3, offset, radix, { intAsBigInt }) {
|
|
10557
|
+
const sign = str3[0];
|
|
10558
10558
|
if (sign === "-" || sign === "+")
|
|
10559
10559
|
offset += 1;
|
|
10560
|
-
|
|
10560
|
+
str3 = str3.substring(offset).replace(/_/g, "");
|
|
10561
10561
|
if (intAsBigInt) {
|
|
10562
10562
|
switch (radix) {
|
|
10563
10563
|
case 2:
|
|
10564
|
-
|
|
10564
|
+
str3 = `0b${str3}`;
|
|
10565
10565
|
break;
|
|
10566
10566
|
case 8:
|
|
10567
|
-
|
|
10567
|
+
str3 = `0o${str3}`;
|
|
10568
10568
|
break;
|
|
10569
10569
|
case 16:
|
|
10570
|
-
|
|
10570
|
+
str3 = `0x${str3}`;
|
|
10571
10571
|
break;
|
|
10572
10572
|
}
|
|
10573
|
-
const n2 = BigInt(
|
|
10573
|
+
const n2 = BigInt(str3);
|
|
10574
10574
|
return sign === "-" ? BigInt(-1) * n2 : n2;
|
|
10575
10575
|
}
|
|
10576
|
-
const n = parseInt(
|
|
10576
|
+
const n = parseInt(str3, radix);
|
|
10577
10577
|
return sign === "-" ? -1 * n : n;
|
|
10578
10578
|
}
|
|
10579
10579
|
function intStringify(node, radix, prefix) {
|
|
10580
10580
|
const { value } = node;
|
|
10581
10581
|
if (intIdentify(value)) {
|
|
10582
|
-
const
|
|
10583
|
-
return value < 0 ? "-" + prefix +
|
|
10582
|
+
const str3 = value.toString(radix);
|
|
10583
|
+
return value < 0 ? "-" + prefix + str3.substr(1) : prefix + str3;
|
|
10584
10584
|
}
|
|
10585
10585
|
return stringifyNumber.stringifyNumber(node);
|
|
10586
10586
|
}
|
|
@@ -10590,7 +10590,7 @@ var require_int2 = __commonJS({
|
|
|
10590
10590
|
tag: "tag:yaml.org,2002:int",
|
|
10591
10591
|
format: "BIN",
|
|
10592
10592
|
test: /^[-+]?0b[0-1_]+$/,
|
|
10593
|
-
resolve: (
|
|
10593
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 2, 2, opt),
|
|
10594
10594
|
stringify: (node) => intStringify(node, 2, "0b")
|
|
10595
10595
|
};
|
|
10596
10596
|
var intOct = {
|
|
@@ -10599,7 +10599,7 @@ var require_int2 = __commonJS({
|
|
|
10599
10599
|
tag: "tag:yaml.org,2002:int",
|
|
10600
10600
|
format: "OCT",
|
|
10601
10601
|
test: /^[-+]?0[0-7_]+$/,
|
|
10602
|
-
resolve: (
|
|
10602
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 1, 8, opt),
|
|
10603
10603
|
stringify: (node) => intStringify(node, 8, "0")
|
|
10604
10604
|
};
|
|
10605
10605
|
var int2 = {
|
|
@@ -10607,7 +10607,7 @@ var require_int2 = __commonJS({
|
|
|
10607
10607
|
default: true,
|
|
10608
10608
|
tag: "tag:yaml.org,2002:int",
|
|
10609
10609
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
10610
|
-
resolve: (
|
|
10610
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 0, 10, opt),
|
|
10611
10611
|
stringify: stringifyNumber.stringifyNumber
|
|
10612
10612
|
};
|
|
10613
10613
|
var intHex = {
|
|
@@ -10616,7 +10616,7 @@ var require_int2 = __commonJS({
|
|
|
10616
10616
|
tag: "tag:yaml.org,2002:int",
|
|
10617
10617
|
format: "HEX",
|
|
10618
10618
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
10619
|
-
resolve: (
|
|
10619
|
+
resolve: (str3, _onError, opt) => intResolve(str3, 2, 16, opt),
|
|
10620
10620
|
stringify: (node) => intStringify(node, 16, "0x")
|
|
10621
10621
|
};
|
|
10622
10622
|
exports.int = int2;
|
|
@@ -10720,9 +10720,9 @@ var require_timestamp = __commonJS({
|
|
|
10720
10720
|
"../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
10721
10721
|
"use strict";
|
|
10722
10722
|
var stringifyNumber = require_stringifyNumber();
|
|
10723
|
-
function parseSexagesimal(
|
|
10724
|
-
const sign =
|
|
10725
|
-
const parts = sign === "-" || sign === "+" ?
|
|
10723
|
+
function parseSexagesimal(str3, asBigInt) {
|
|
10724
|
+
const sign = str3[0];
|
|
10725
|
+
const parts = sign === "-" || sign === "+" ? str3.substring(1) : str3;
|
|
10726
10726
|
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
10727
10727
|
const res = parts.replace(/_/g, "").split(":").reduce((res2, p2) => res2 * num(60) + num(p2), num(0));
|
|
10728
10728
|
return sign === "-" ? num(-1) * res : res;
|
|
@@ -10759,7 +10759,7 @@ var require_timestamp = __commonJS({
|
|
|
10759
10759
|
tag: "tag:yaml.org,2002:int",
|
|
10760
10760
|
format: "TIME",
|
|
10761
10761
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
10762
|
-
resolve: (
|
|
10762
|
+
resolve: (str3, _onError, { intAsBigInt }) => parseSexagesimal(str3, intAsBigInt),
|
|
10763
10763
|
stringify: stringifySexagesimal
|
|
10764
10764
|
};
|
|
10765
10765
|
var floatTime = {
|
|
@@ -10768,7 +10768,7 @@ var require_timestamp = __commonJS({
|
|
|
10768
10768
|
tag: "tag:yaml.org,2002:float",
|
|
10769
10769
|
format: "TIME",
|
|
10770
10770
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
10771
|
-
resolve: (
|
|
10771
|
+
resolve: (str3) => parseSexagesimal(str3, false),
|
|
10772
10772
|
stringify: stringifySexagesimal
|
|
10773
10773
|
};
|
|
10774
10774
|
var timestamp = {
|
|
@@ -10779,8 +10779,8 @@ var require_timestamp = __commonJS({
|
|
|
10779
10779
|
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
10780
10780
|
// assumed to be 00:00:00Z (start of day, UTC).
|
|
10781
10781
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
10782
|
-
resolve(
|
|
10783
|
-
const match =
|
|
10782
|
+
resolve(str3) {
|
|
10783
|
+
const match = str3.match(timestamp.test);
|
|
10784
10784
|
if (!match)
|
|
10785
10785
|
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
10786
10786
|
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
@@ -12105,10 +12105,10 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
12105
12105
|
var Scalar = require_Scalar();
|
|
12106
12106
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
12107
12107
|
const start = scalar.offset;
|
|
12108
|
-
const
|
|
12109
|
-
if (!
|
|
12108
|
+
const header2 = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
|
|
12109
|
+
if (!header2)
|
|
12110
12110
|
return { value: "", type: null, comment: "", range: [start, start, start] };
|
|
12111
|
-
const type =
|
|
12111
|
+
const type = header2.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;
|
|
12112
12112
|
const lines = scalar.source ? splitLines(scalar.source) : [];
|
|
12113
12113
|
let chompStart = lines.length;
|
|
12114
12114
|
for (let i = lines.length - 1; i >= 0; --i) {
|
|
@@ -12119,26 +12119,26 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
12119
12119
|
break;
|
|
12120
12120
|
}
|
|
12121
12121
|
if (chompStart === 0) {
|
|
12122
|
-
const value2 =
|
|
12123
|
-
let end2 = start +
|
|
12122
|
+
const value2 = header2.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : "";
|
|
12123
|
+
let end2 = start + header2.length;
|
|
12124
12124
|
if (scalar.source)
|
|
12125
12125
|
end2 += scalar.source.length;
|
|
12126
|
-
return { value: value2, type, comment:
|
|
12126
|
+
return { value: value2, type, comment: header2.comment, range: [start, end2, end2] };
|
|
12127
12127
|
}
|
|
12128
|
-
let trimIndent = scalar.indent +
|
|
12129
|
-
let offset = scalar.offset +
|
|
12128
|
+
let trimIndent = scalar.indent + header2.indent;
|
|
12129
|
+
let offset = scalar.offset + header2.length;
|
|
12130
12130
|
let contentStart = 0;
|
|
12131
12131
|
for (let i = 0; i < chompStart; ++i) {
|
|
12132
12132
|
const [indent, content] = lines[i];
|
|
12133
12133
|
if (content === "" || content === "\r") {
|
|
12134
|
-
if (
|
|
12134
|
+
if (header2.indent === 0 && indent.length > trimIndent)
|
|
12135
12135
|
trimIndent = indent.length;
|
|
12136
12136
|
} else {
|
|
12137
12137
|
if (indent.length < trimIndent) {
|
|
12138
12138
|
const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator";
|
|
12139
12139
|
onError(offset + indent.length, "MISSING_CHAR", message);
|
|
12140
12140
|
}
|
|
12141
|
-
if (
|
|
12141
|
+
if (header2.indent === 0)
|
|
12142
12142
|
trimIndent = indent.length;
|
|
12143
12143
|
contentStart = i;
|
|
12144
12144
|
if (trimIndent === 0 && !ctx.atRoot) {
|
|
@@ -12165,7 +12165,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
12165
12165
|
if (crlf)
|
|
12166
12166
|
content = content.slice(0, -1);
|
|
12167
12167
|
if (content && indent.length < trimIndent) {
|
|
12168
|
-
const src =
|
|
12168
|
+
const src = header2.indent ? "explicit indentation indicator" : "first line";
|
|
12169
12169
|
const message = `Block scalar lines must not be less indented than their ${src}`;
|
|
12170
12170
|
onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
|
|
12171
12171
|
indent = "";
|
|
@@ -12192,7 +12192,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
12192
12192
|
prevMoreIndented = false;
|
|
12193
12193
|
}
|
|
12194
12194
|
}
|
|
12195
|
-
switch (
|
|
12195
|
+
switch (header2.chomp) {
|
|
12196
12196
|
case "-":
|
|
12197
12197
|
break;
|
|
12198
12198
|
case "+":
|
|
@@ -12204,8 +12204,8 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
12204
12204
|
default:
|
|
12205
12205
|
value += "\n";
|
|
12206
12206
|
}
|
|
12207
|
-
const end = start +
|
|
12208
|
-
return { value, type, comment:
|
|
12207
|
+
const end = start + header2.length + scalar.source.length;
|
|
12208
|
+
return { value, type, comment: header2.comment, range: [start, end, end] };
|
|
12209
12209
|
}
|
|
12210
12210
|
function parseBlockScalarHeader({ offset, props }, strict, onError) {
|
|
12211
12211
|
if (props[0].type !== "block-scalar-header") {
|
|
@@ -13041,10 +13041,10 @@ var require_cst_scalar = __commonJS({
|
|
|
13041
13041
|
type = "QUOTE_DOUBLE";
|
|
13042
13042
|
break;
|
|
13043
13043
|
case "block-scalar": {
|
|
13044
|
-
const
|
|
13045
|
-
if (
|
|
13044
|
+
const header2 = token.props[0];
|
|
13045
|
+
if (header2.type !== "block-scalar-header")
|
|
13046
13046
|
throw new Error("Invalid block scalar header");
|
|
13047
|
-
type =
|
|
13047
|
+
type = header2.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
|
|
13048
13048
|
break;
|
|
13049
13049
|
}
|
|
13050
13050
|
default:
|
|
@@ -13076,10 +13076,10 @@ var require_cst_scalar = __commonJS({
|
|
|
13076
13076
|
const head = source.substring(0, he);
|
|
13077
13077
|
const body = source.substring(he + 1) + "\n";
|
|
13078
13078
|
if (token.type === "block-scalar") {
|
|
13079
|
-
const
|
|
13080
|
-
if (
|
|
13079
|
+
const header2 = token.props[0];
|
|
13080
|
+
if (header2.type !== "block-scalar-header")
|
|
13081
13081
|
throw new Error("Invalid block scalar header");
|
|
13082
|
-
|
|
13082
|
+
header2.source = head;
|
|
13083
13083
|
token.source = body;
|
|
13084
13084
|
} else {
|
|
13085
13085
|
const { offset } = token;
|
|
@@ -15200,11 +15200,11 @@ var require_lib = __commonJS({
|
|
|
15200
15200
|
}
|
|
15201
15201
|
_exports.without = without;
|
|
15202
15202
|
function repeat(char_, n) {
|
|
15203
|
-
var
|
|
15203
|
+
var str3 = "";
|
|
15204
15204
|
for (var i = 0; i < n; i++) {
|
|
15205
|
-
|
|
15205
|
+
str3 += char_;
|
|
15206
15206
|
}
|
|
15207
|
-
return
|
|
15207
|
+
return str3;
|
|
15208
15208
|
}
|
|
15209
15209
|
_exports.repeat = repeat;
|
|
15210
15210
|
function each(obj, func, context) {
|
|
@@ -15547,10 +15547,10 @@ var require_lexer2 = __commonJS({
|
|
|
15547
15547
|
};
|
|
15548
15548
|
}
|
|
15549
15549
|
var Tokenizer = /* @__PURE__ */ (function() {
|
|
15550
|
-
function Tokenizer2(
|
|
15551
|
-
this.str =
|
|
15550
|
+
function Tokenizer2(str3, opts) {
|
|
15551
|
+
this.str = str3;
|
|
15552
15552
|
this.index = 0;
|
|
15553
|
-
this.len =
|
|
15553
|
+
this.len = str3.length;
|
|
15554
15554
|
this.lineno = 0;
|
|
15555
15555
|
this.colno = 0;
|
|
15556
15556
|
this.in_code = false;
|
|
@@ -15748,44 +15748,44 @@ var require_lexer2 = __commonJS({
|
|
|
15748
15748
|
};
|
|
15749
15749
|
_proto._parseString = function _parseString(delimiter) {
|
|
15750
15750
|
this.forward();
|
|
15751
|
-
var
|
|
15751
|
+
var str3 = "";
|
|
15752
15752
|
while (!this.isFinished() && this.current() !== delimiter) {
|
|
15753
15753
|
var cur = this.current();
|
|
15754
15754
|
if (cur === "\\") {
|
|
15755
15755
|
this.forward();
|
|
15756
15756
|
switch (this.current()) {
|
|
15757
15757
|
case "n":
|
|
15758
|
-
|
|
15758
|
+
str3 += "\n";
|
|
15759
15759
|
break;
|
|
15760
15760
|
case "t":
|
|
15761
|
-
|
|
15761
|
+
str3 += " ";
|
|
15762
15762
|
break;
|
|
15763
15763
|
case "r":
|
|
15764
|
-
|
|
15764
|
+
str3 += "\r";
|
|
15765
15765
|
break;
|
|
15766
15766
|
default:
|
|
15767
|
-
|
|
15767
|
+
str3 += this.current();
|
|
15768
15768
|
}
|
|
15769
15769
|
this.forward();
|
|
15770
15770
|
} else {
|
|
15771
|
-
|
|
15771
|
+
str3 += cur;
|
|
15772
15772
|
this.forward();
|
|
15773
15773
|
}
|
|
15774
15774
|
}
|
|
15775
15775
|
this.forward();
|
|
15776
|
-
return
|
|
15776
|
+
return str3;
|
|
15777
15777
|
};
|
|
15778
|
-
_proto._matches = function _matches(
|
|
15779
|
-
if (this.index +
|
|
15778
|
+
_proto._matches = function _matches(str3) {
|
|
15779
|
+
if (this.index + str3.length > this.len) {
|
|
15780
15780
|
return null;
|
|
15781
15781
|
}
|
|
15782
|
-
var m = this.str.slice(this.index, this.index +
|
|
15783
|
-
return m ===
|
|
15782
|
+
var m = this.str.slice(this.index, this.index + str3.length);
|
|
15783
|
+
return m === str3;
|
|
15784
15784
|
};
|
|
15785
|
-
_proto._extractString = function _extractString(
|
|
15786
|
-
if (this._matches(
|
|
15787
|
-
this.forwardN(
|
|
15788
|
-
return
|
|
15785
|
+
_proto._extractString = function _extractString(str3) {
|
|
15786
|
+
if (this._matches(str3)) {
|
|
15787
|
+
this.forwardN(str3.length);
|
|
15788
|
+
return str3;
|
|
15789
15789
|
}
|
|
15790
15790
|
return null;
|
|
15791
15791
|
};
|
|
@@ -16312,8 +16312,8 @@ var require_nodes = __commonJS({
|
|
|
16312
16312
|
fields: ["extName", "prop", "args", "contentArgs"]
|
|
16313
16313
|
});
|
|
16314
16314
|
var CallExtensionAsync = CallExtension.extend("CallExtensionAsync");
|
|
16315
|
-
function print(
|
|
16316
|
-
var lines =
|
|
16315
|
+
function print(str3, indent, inline) {
|
|
16316
|
+
var lines = str3.split("\n");
|
|
16317
16317
|
lines.forEach(function(line, i) {
|
|
16318
16318
|
if (line && (inline && i > 0 || !inline)) {
|
|
16319
16319
|
process.stdout.write(" ".repeat(indent));
|
|
@@ -16908,7 +16908,7 @@ var require_parser2 = __commonJS({
|
|
|
16908
16908
|
var endTagName = "end" + tagName;
|
|
16909
16909
|
var rawBlockRegex = new RegExp("([\\s\\S]*?){%\\s*(" + tagName + "|" + endTagName + ")\\s*(?=%})%}");
|
|
16910
16910
|
var rawLevel = 1;
|
|
16911
|
-
var
|
|
16911
|
+
var str3 = "";
|
|
16912
16912
|
var matches = null;
|
|
16913
16913
|
var begun = this.advanceAfterBlockEnd();
|
|
16914
16914
|
while ((matches = this.tokens._extractRegex(rawBlockRegex)) && rawLevel > 0) {
|
|
@@ -16921,13 +16921,13 @@ var require_parser2 = __commonJS({
|
|
|
16921
16921
|
rawLevel -= 1;
|
|
16922
16922
|
}
|
|
16923
16923
|
if (rawLevel === 0) {
|
|
16924
|
-
|
|
16924
|
+
str3 += pre;
|
|
16925
16925
|
this.tokens.backN(all.length - pre.length);
|
|
16926
16926
|
} else {
|
|
16927
|
-
|
|
16927
|
+
str3 += all;
|
|
16928
16928
|
}
|
|
16929
16929
|
}
|
|
16930
|
-
return new nodes.Output(begun.lineno, begun.colno, [new nodes.TemplateData(begun.lineno, begun.colno,
|
|
16930
|
+
return new nodes.Output(begun.lineno, begun.colno, [new nodes.TemplateData(begun.lineno, begun.colno, str3)]);
|
|
16931
16931
|
};
|
|
16932
16932
|
_proto.parsePostfix = function parsePostfix(node) {
|
|
16933
16933
|
var lookup;
|
|
@@ -18143,9 +18143,9 @@ var require_compiler = __commonJS({
|
|
|
18143
18143
|
}
|
|
18144
18144
|
this._emit(") === true");
|
|
18145
18145
|
};
|
|
18146
|
-
_proto._binOpEmitter = function _binOpEmitter(node, frame,
|
|
18146
|
+
_proto._binOpEmitter = function _binOpEmitter(node, frame, str3) {
|
|
18147
18147
|
this.compile(node.left, frame);
|
|
18148
|
-
this._emit(
|
|
18148
|
+
this._emit(str3);
|
|
18149
18149
|
this.compile(node.right, frame);
|
|
18150
18150
|
};
|
|
18151
18151
|
_proto.compileOr = function compileOr(node, frame) {
|
|
@@ -18827,22 +18827,22 @@ var require_filters = __commonJS({
|
|
|
18827
18827
|
return res;
|
|
18828
18828
|
}
|
|
18829
18829
|
_exports.batch = batch;
|
|
18830
|
-
function capitalize(
|
|
18831
|
-
|
|
18832
|
-
var ret =
|
|
18833
|
-
return r.copySafeness(
|
|
18830
|
+
function capitalize(str3) {
|
|
18831
|
+
str3 = normalize(str3, "");
|
|
18832
|
+
var ret = str3.toLowerCase();
|
|
18833
|
+
return r.copySafeness(str3, ret.charAt(0).toUpperCase() + ret.slice(1));
|
|
18834
18834
|
}
|
|
18835
18835
|
_exports.capitalize = capitalize;
|
|
18836
|
-
function center(
|
|
18837
|
-
|
|
18836
|
+
function center(str3, width) {
|
|
18837
|
+
str3 = normalize(str3, "");
|
|
18838
18838
|
width = width || 80;
|
|
18839
|
-
if (
|
|
18840
|
-
return
|
|
18839
|
+
if (str3.length >= width) {
|
|
18840
|
+
return str3;
|
|
18841
18841
|
}
|
|
18842
|
-
var spaces = width -
|
|
18842
|
+
var spaces = width - str3.length;
|
|
18843
18843
|
var pre = lib.repeat(" ", spaces / 2 - spaces % 2);
|
|
18844
18844
|
var post = lib.repeat(" ", spaces / 2);
|
|
18845
|
-
return r.copySafeness(
|
|
18845
|
+
return r.copySafeness(str3, pre + str3 + post);
|
|
18846
18846
|
}
|
|
18847
18847
|
_exports.center = center;
|
|
18848
18848
|
function default_(val, def, bool) {
|
|
@@ -18889,47 +18889,47 @@ var require_filters = __commonJS({
|
|
|
18889
18889
|
return JSON.stringify(obj, null, spaces);
|
|
18890
18890
|
}
|
|
18891
18891
|
_exports.dump = dump;
|
|
18892
|
-
function escape2(
|
|
18893
|
-
if (
|
|
18894
|
-
return
|
|
18892
|
+
function escape2(str3) {
|
|
18893
|
+
if (str3 instanceof r.SafeString) {
|
|
18894
|
+
return str3;
|
|
18895
18895
|
}
|
|
18896
|
-
|
|
18897
|
-
return r.markSafe(lib.escape(
|
|
18896
|
+
str3 = str3 === null || str3 === void 0 ? "" : str3;
|
|
18897
|
+
return r.markSafe(lib.escape(str3.toString()));
|
|
18898
18898
|
}
|
|
18899
18899
|
_exports.escape = escape2;
|
|
18900
|
-
function safe(
|
|
18901
|
-
if (
|
|
18902
|
-
return
|
|
18900
|
+
function safe(str3) {
|
|
18901
|
+
if (str3 instanceof r.SafeString) {
|
|
18902
|
+
return str3;
|
|
18903
18903
|
}
|
|
18904
|
-
|
|
18905
|
-
return r.markSafe(
|
|
18904
|
+
str3 = str3 === null || str3 === void 0 ? "" : str3;
|
|
18905
|
+
return r.markSafe(str3.toString());
|
|
18906
18906
|
}
|
|
18907
18907
|
_exports.safe = safe;
|
|
18908
18908
|
function first(arr) {
|
|
18909
18909
|
return arr[0];
|
|
18910
18910
|
}
|
|
18911
18911
|
_exports.first = first;
|
|
18912
|
-
function forceescape(
|
|
18913
|
-
|
|
18914
|
-
return r.markSafe(lib.escape(
|
|
18912
|
+
function forceescape(str3) {
|
|
18913
|
+
str3 = str3 === null || str3 === void 0 ? "" : str3;
|
|
18914
|
+
return r.markSafe(lib.escape(str3.toString()));
|
|
18915
18915
|
}
|
|
18916
18916
|
_exports.forceescape = forceescape;
|
|
18917
18917
|
function groupby(arr, attr) {
|
|
18918
18918
|
return lib.groupBy(arr, attr, this.env.opts.throwOnUndefined);
|
|
18919
18919
|
}
|
|
18920
18920
|
_exports.groupby = groupby;
|
|
18921
|
-
function indent(
|
|
18922
|
-
|
|
18923
|
-
if (
|
|
18921
|
+
function indent(str3, width, indentfirst) {
|
|
18922
|
+
str3 = normalize(str3, "");
|
|
18923
|
+
if (str3 === "") {
|
|
18924
18924
|
return "";
|
|
18925
18925
|
}
|
|
18926
18926
|
width = width || 4;
|
|
18927
|
-
var lines =
|
|
18927
|
+
var lines = str3.split("\n");
|
|
18928
18928
|
var sp = lib.repeat(" ", width);
|
|
18929
18929
|
var res = lines.map(function(l, i) {
|
|
18930
18930
|
return i === 0 && !indentfirst ? l : "" + sp + l;
|
|
18931
18931
|
}).join("\n");
|
|
18932
|
-
return r.copySafeness(
|
|
18932
|
+
return r.copySafeness(str3, res);
|
|
18933
18933
|
}
|
|
18934
18934
|
_exports.indent = indent;
|
|
18935
18935
|
function join23(arr, del, attr) {
|
|
@@ -18978,16 +18978,16 @@ var require_filters = __commonJS({
|
|
|
18978
18978
|
}
|
|
18979
18979
|
}
|
|
18980
18980
|
_exports.list = list;
|
|
18981
|
-
function lower(
|
|
18982
|
-
|
|
18983
|
-
return
|
|
18981
|
+
function lower(str3) {
|
|
18982
|
+
str3 = normalize(str3, "");
|
|
18983
|
+
return str3.toLowerCase();
|
|
18984
18984
|
}
|
|
18985
18985
|
_exports.lower = lower;
|
|
18986
|
-
function nl2br(
|
|
18987
|
-
if (
|
|
18986
|
+
function nl2br(str3) {
|
|
18987
|
+
if (str3 === null || str3 === void 0) {
|
|
18988
18988
|
return "";
|
|
18989
18989
|
}
|
|
18990
|
-
return r.copySafeness(
|
|
18990
|
+
return r.copySafeness(str3, str3.replace(/\r\n|\n/g, "<br />\n"));
|
|
18991
18991
|
}
|
|
18992
18992
|
_exports.nl2br = nl2br;
|
|
18993
18993
|
function random(arr) {
|
|
@@ -19021,10 +19021,10 @@ var require_filters = __commonJS({
|
|
|
19021
19021
|
});
|
|
19022
19022
|
}
|
|
19023
19023
|
_exports.selectattr = selectattr;
|
|
19024
|
-
function replace(
|
|
19025
|
-
var originalStr =
|
|
19024
|
+
function replace(str3, old, new_, maxCount) {
|
|
19025
|
+
var originalStr = str3;
|
|
19026
19026
|
if (old instanceof RegExp) {
|
|
19027
|
-
return
|
|
19027
|
+
return str3.replace(old, new_);
|
|
19028
19028
|
}
|
|
19029
19029
|
if (typeof maxCount === "undefined") {
|
|
19030
19030
|
maxCount = -1;
|
|
@@ -19033,32 +19033,32 @@ var require_filters = __commonJS({
|
|
|
19033
19033
|
if (typeof old === "number") {
|
|
19034
19034
|
old = "" + old;
|
|
19035
19035
|
} else if (typeof old !== "string") {
|
|
19036
|
-
return
|
|
19036
|
+
return str3;
|
|
19037
19037
|
}
|
|
19038
|
-
if (typeof
|
|
19039
|
-
|
|
19038
|
+
if (typeof str3 === "number") {
|
|
19039
|
+
str3 = "" + str3;
|
|
19040
19040
|
}
|
|
19041
|
-
if (typeof
|
|
19042
|
-
return
|
|
19041
|
+
if (typeof str3 !== "string" && !(str3 instanceof r.SafeString)) {
|
|
19042
|
+
return str3;
|
|
19043
19043
|
}
|
|
19044
19044
|
if (old === "") {
|
|
19045
|
-
res = new_ +
|
|
19046
|
-
return r.copySafeness(
|
|
19045
|
+
res = new_ + str3.split("").join(new_) + new_;
|
|
19046
|
+
return r.copySafeness(str3, res);
|
|
19047
19047
|
}
|
|
19048
|
-
var nextIndex =
|
|
19048
|
+
var nextIndex = str3.indexOf(old);
|
|
19049
19049
|
if (maxCount === 0 || nextIndex === -1) {
|
|
19050
|
-
return
|
|
19050
|
+
return str3;
|
|
19051
19051
|
}
|
|
19052
19052
|
var pos = 0;
|
|
19053
19053
|
var count = 0;
|
|
19054
19054
|
while (nextIndex > -1 && (maxCount === -1 || count < maxCount)) {
|
|
19055
|
-
res +=
|
|
19055
|
+
res += str3.substring(pos, nextIndex) + new_;
|
|
19056
19056
|
pos = nextIndex + old.length;
|
|
19057
19057
|
count++;
|
|
19058
|
-
nextIndex =
|
|
19058
|
+
nextIndex = str3.indexOf(old, pos);
|
|
19059
19059
|
}
|
|
19060
|
-
if (pos <
|
|
19061
|
-
res +=
|
|
19060
|
+
if (pos < str3.length) {
|
|
19061
|
+
res += str3.substring(pos);
|
|
19062
19062
|
}
|
|
19063
19063
|
return r.copySafeness(originalStr, res);
|
|
19064
19064
|
}
|
|
@@ -19170,16 +19170,16 @@ var require_filters = __commonJS({
|
|
|
19170
19170
|
return r.copySafeness(input, res);
|
|
19171
19171
|
}
|
|
19172
19172
|
_exports.striptags = striptags;
|
|
19173
|
-
function title(
|
|
19174
|
-
|
|
19175
|
-
var words =
|
|
19173
|
+
function title(str3) {
|
|
19174
|
+
str3 = normalize(str3, "");
|
|
19175
|
+
var words = str3.split(" ").map(function(word) {
|
|
19176
19176
|
return capitalize(word);
|
|
19177
19177
|
});
|
|
19178
|
-
return r.copySafeness(
|
|
19178
|
+
return r.copySafeness(str3, words.join(" "));
|
|
19179
19179
|
}
|
|
19180
19180
|
_exports.title = title;
|
|
19181
|
-
function trim(
|
|
19182
|
-
return r.copySafeness(
|
|
19181
|
+
function trim(str3) {
|
|
19182
|
+
return r.copySafeness(str3, str3.replace(/^\s*|\s*$/g, ""));
|
|
19183
19183
|
}
|
|
19184
19184
|
_exports.trim = trim;
|
|
19185
19185
|
function truncate2(input, length, killwords, end) {
|
|
@@ -19202,9 +19202,9 @@ var require_filters = __commonJS({
|
|
|
19202
19202
|
return r.copySafeness(orig, input);
|
|
19203
19203
|
}
|
|
19204
19204
|
_exports.truncate = truncate2;
|
|
19205
|
-
function upper(
|
|
19206
|
-
|
|
19207
|
-
return
|
|
19205
|
+
function upper(str3) {
|
|
19206
|
+
str3 = normalize(str3, "");
|
|
19207
|
+
return str3.toUpperCase();
|
|
19208
19208
|
}
|
|
19209
19209
|
_exports.upper = upper;
|
|
19210
19210
|
function urlencode(obj) {
|
|
@@ -19225,12 +19225,12 @@ var require_filters = __commonJS({
|
|
|
19225
19225
|
var httpHttpsRe = /^https?:\/\/.*$/;
|
|
19226
19226
|
var wwwRe = /^www\./;
|
|
19227
19227
|
var tldRe = /\.(?:org|net|com)(?:\:|\/|$)/;
|
|
19228
|
-
function urlize(
|
|
19228
|
+
function urlize(str3, length, nofollow) {
|
|
19229
19229
|
if (isNaN2(length)) {
|
|
19230
19230
|
length = Infinity;
|
|
19231
19231
|
}
|
|
19232
19232
|
var noFollowAttr = nofollow === true ? ' rel="nofollow"' : "";
|
|
19233
|
-
var words =
|
|
19233
|
+
var words = str3.split(/(\s+)/).filter(function(word) {
|
|
19234
19234
|
return word && word.length;
|
|
19235
19235
|
}).map(function(word) {
|
|
19236
19236
|
var matches = word.match(puncRe);
|
|
@@ -19253,9 +19253,9 @@ var require_filters = __commonJS({
|
|
|
19253
19253
|
return words.join("");
|
|
19254
19254
|
}
|
|
19255
19255
|
_exports.urlize = urlize;
|
|
19256
|
-
function wordcount(
|
|
19257
|
-
|
|
19258
|
-
var words =
|
|
19256
|
+
function wordcount(str3) {
|
|
19257
|
+
str3 = normalize(str3, "");
|
|
19258
|
+
var words = str3 ? str3.match(/\w+/g) : null;
|
|
19259
19259
|
return words ? words.length : null;
|
|
19260
19260
|
}
|
|
19261
19261
|
_exports.wordcount = wordcount;
|
|
@@ -20457,18 +20457,18 @@ var require_chokidar = __commonJS({
|
|
|
20457
20457
|
return paths.map(normalizePathToUnix);
|
|
20458
20458
|
};
|
|
20459
20459
|
var toUnix = (string3) => {
|
|
20460
|
-
let
|
|
20460
|
+
let str3 = string3.replace(BACK_SLASH_RE, SLASH);
|
|
20461
20461
|
let prepend = false;
|
|
20462
|
-
if (
|
|
20462
|
+
if (str3.startsWith(SLASH_SLASH)) {
|
|
20463
20463
|
prepend = true;
|
|
20464
20464
|
}
|
|
20465
|
-
while (
|
|
20466
|
-
|
|
20465
|
+
while (str3.match(DOUBLE_SLASH_RE)) {
|
|
20466
|
+
str3 = str3.replace(DOUBLE_SLASH_RE, SLASH);
|
|
20467
20467
|
}
|
|
20468
20468
|
if (prepend) {
|
|
20469
|
-
|
|
20469
|
+
str3 = SLASH + str3;
|
|
20470
20470
|
}
|
|
20471
|
-
return
|
|
20471
|
+
return str3;
|
|
20472
20472
|
};
|
|
20473
20473
|
var normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
|
|
20474
20474
|
var normalizeIgnored = (cwd = "") => (path) => {
|
|
@@ -21989,7 +21989,7 @@ var require_precompile = __commonJS({
|
|
|
21989
21989
|
return filename.match(pattern);
|
|
21990
21990
|
});
|
|
21991
21991
|
}
|
|
21992
|
-
function precompileString(
|
|
21992
|
+
function precompileString(str3, opts) {
|
|
21993
21993
|
opts = opts || {};
|
|
21994
21994
|
opts.isString = true;
|
|
21995
21995
|
var env2 = opts.env || new Environment([]);
|
|
@@ -21997,7 +21997,7 @@ var require_precompile = __commonJS({
|
|
|
21997
21997
|
if (!opts.name) {
|
|
21998
21998
|
throw new Error('the "name" option is required when compiling a string');
|
|
21999
21999
|
}
|
|
22000
|
-
return wrapper([_precompile(
|
|
22000
|
+
return wrapper([_precompile(str3, opts.name, env2)], opts);
|
|
22001
22001
|
}
|
|
22002
22002
|
function precompile(input, opts) {
|
|
22003
22003
|
opts = opts || {};
|
|
@@ -22043,14 +22043,14 @@ var require_precompile = __commonJS({
|
|
|
22043
22043
|
}
|
|
22044
22044
|
return wrapper(precompiled, opts);
|
|
22045
22045
|
}
|
|
22046
|
-
function _precompile(
|
|
22046
|
+
function _precompile(str3, name, env2) {
|
|
22047
22047
|
env2 = env2 || new Environment([]);
|
|
22048
22048
|
var asyncFilters = env2.asyncFilters;
|
|
22049
22049
|
var extensions = env2.extensionsList;
|
|
22050
22050
|
var template;
|
|
22051
22051
|
name = name.replace(/\\/g, "/");
|
|
22052
22052
|
try {
|
|
22053
|
-
template = compiler.compile(
|
|
22053
|
+
template = compiler.compile(str3, asyncFilters, extensions, name, env2.opts);
|
|
22054
22054
|
} catch (err) {
|
|
22055
22055
|
throw _prettifyError(name, false, err);
|
|
22056
22056
|
}
|
|
@@ -23210,9 +23210,9 @@ function renderTable(el) {
|
|
|
23210
23210
|
return cells.map((c) => c.replace(/\|/g, "\\|"));
|
|
23211
23211
|
};
|
|
23212
23212
|
const lines = [];
|
|
23213
|
-
const
|
|
23213
|
+
const header2 = rows[0] ?? [];
|
|
23214
23214
|
const body = rows.slice(1);
|
|
23215
|
-
lines.push(`| ${pad(
|
|
23215
|
+
lines.push(`| ${pad(header2).join(" | ")} |`);
|
|
23216
23216
|
lines.push(`| ${Array.from({ length: colCount }, () => "---").join(" | ")} |`);
|
|
23217
23217
|
for (const r of body)
|
|
23218
23218
|
lines.push(`| ${pad(r).join(" | ")} |`);
|
|
@@ -23610,14 +23610,14 @@ function promiseAllObject(promisesObj) {
|
|
|
23610
23610
|
}
|
|
23611
23611
|
function randomString(length = 10) {
|
|
23612
23612
|
const chars = "abcdefghijklmnopqrstuvwxyz";
|
|
23613
|
-
let
|
|
23613
|
+
let str3 = "";
|
|
23614
23614
|
for (let i = 0; i < length; i++) {
|
|
23615
|
-
|
|
23615
|
+
str3 += chars[Math.floor(Math.random() * chars.length)];
|
|
23616
23616
|
}
|
|
23617
|
-
return
|
|
23617
|
+
return str3;
|
|
23618
23618
|
}
|
|
23619
|
-
function esc(
|
|
23620
|
-
return JSON.stringify(
|
|
23619
|
+
function esc(str3) {
|
|
23620
|
+
return JSON.stringify(str3);
|
|
23621
23621
|
}
|
|
23622
23622
|
var captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {
|
|
23623
23623
|
};
|
|
@@ -23705,8 +23705,8 @@ var getParsedType = (data) => {
|
|
|
23705
23705
|
};
|
|
23706
23706
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
23707
23707
|
var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
23708
|
-
function escapeRegex(
|
|
23709
|
-
return
|
|
23708
|
+
function escapeRegex(str3) {
|
|
23709
|
+
return str3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
23710
23710
|
}
|
|
23711
23711
|
function clone(inst, def, params) {
|
|
23712
23712
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
@@ -24943,10 +24943,10 @@ function isValidJWT(token, algorithm = null) {
|
|
|
24943
24943
|
const tokensParts = token.split(".");
|
|
24944
24944
|
if (tokensParts.length !== 3)
|
|
24945
24945
|
return false;
|
|
24946
|
-
const [
|
|
24947
|
-
if (!
|
|
24946
|
+
const [header2] = tokensParts;
|
|
24947
|
+
if (!header2)
|
|
24948
24948
|
return false;
|
|
24949
|
-
const parsedHeader = JSON.parse(atob(
|
|
24949
|
+
const parsedHeader = JSON.parse(atob(header2));
|
|
24950
24950
|
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
24951
24951
|
return false;
|
|
24952
24952
|
if (!parsedHeader.alg)
|
|
@@ -35102,6 +35102,15 @@ var INTEGRATION_REGISTRY = [
|
|
|
35102
35102
|
// successor at the same cost to us); Sunburst is seeded at 4x.
|
|
35103
35103
|
{ event_type: "gpt_image_2_5_flare", unit: "image" },
|
|
35104
35104
|
{ event_type: "gpt_image_2_5_sunburst", unit: "image" },
|
|
35105
|
+
// CS-2360: quality medium/high price on their own rows (more image-output
|
|
35106
|
+
// tokens at the same per-token rate). `low` stays on the two meters above.
|
|
35107
|
+
// The handler refuses a medium/high render until its meter has a rate
|
|
35108
|
+
// card row in BOTH USD and AUD. Size does not change the meter: the rate
|
|
35109
|
+
// is set on the worst case (landscape/portrait).
|
|
35110
|
+
{ event_type: "gpt_image_2_5_flare_medium", unit: "image", label: "Flare, medium quality" },
|
|
35111
|
+
{ event_type: "gpt_image_2_5_flare_high", unit: "image", label: "Flare, high quality" },
|
|
35112
|
+
{ event_type: "gpt_image_2_5_sunburst_medium", unit: "image", label: "Sunburst, medium quality" },
|
|
35113
|
+
{ event_type: "gpt_image_2_5_sunburst_high", unit: "image", label: "Sunburst, high quality" },
|
|
35105
35114
|
// CS-1940: an edit also records one of these with units = the number of
|
|
35106
35115
|
// reference images. Declared here (obi-wan 3a515eaf41b0) because the admin
|
|
35107
35116
|
// pricing route only accepts a price for a declared meter, and the org
|
|
@@ -38100,7 +38109,7 @@ function truncate(text, max) {
|
|
|
38100
38109
|
}
|
|
38101
38110
|
function resolvePreset(config2) {
|
|
38102
38111
|
const name = config2["preset"];
|
|
38103
|
-
const base = typeof name === "string" && name
|
|
38112
|
+
const base = typeof name === "string" && Object.prototype.hasOwnProperty.call(WEBHOOK_PRESETS, name) ? WEBHOOK_PRESETS[name] : WEBHOOK_PRESETS.generic;
|
|
38104
38113
|
const dedup = config2["dedup_path"];
|
|
38105
38114
|
const type = config2["event_type_path"];
|
|
38106
38115
|
const payload = config2["payload_path"];
|
|
@@ -38111,35 +38120,47 @@ function resolvePreset(config2) {
|
|
|
38111
38120
|
...typeof payload === "string" && payload ? { payloadPath: payload } : {}
|
|
38112
38121
|
};
|
|
38113
38122
|
}
|
|
38114
|
-
function
|
|
38115
|
-
const out = {};
|
|
38123
|
+
function validateOperatorText(input, out) {
|
|
38116
38124
|
const name = input["name"];
|
|
38117
38125
|
if (name !== void 0) {
|
|
38118
38126
|
if (typeof name !== "string")
|
|
38119
|
-
return
|
|
38127
|
+
return "name must be a string";
|
|
38120
38128
|
const trimmed = name.trim();
|
|
38121
38129
|
if (trimmed.length > WEBHOOK_NAME_MAX_CHARS) {
|
|
38122
|
-
return
|
|
38130
|
+
return `name must be at most ${WEBHOOK_NAME_MAX_CHARS} characters`;
|
|
38123
38131
|
}
|
|
38124
38132
|
if (trimmed)
|
|
38125
38133
|
out["name"] = trimmed;
|
|
38126
38134
|
}
|
|
38127
38135
|
const instruction = input["instruction"];
|
|
38128
38136
|
if (typeof instruction !== "string" || !instruction.trim()) {
|
|
38129
|
-
return
|
|
38130
|
-
ok: false,
|
|
38131
|
-
error: "instruction is required: tell the agent what to do when an event arrives"
|
|
38132
|
-
};
|
|
38137
|
+
return "instruction is required: tell the agent what to do when an event arrives";
|
|
38133
38138
|
}
|
|
38134
38139
|
if (instruction.trim().length > WEBHOOK_INSTRUCTION_MAX_CHARS) {
|
|
38135
|
-
return {
|
|
38136
|
-
ok: false,
|
|
38137
|
-
error: `instruction must be at most ${WEBHOOK_INSTRUCTION_MAX_CHARS} characters`
|
|
38138
|
-
};
|
|
38140
|
+
return `instruction must be at most ${WEBHOOK_INSTRUCTION_MAX_CHARS} characters`;
|
|
38139
38141
|
}
|
|
38140
38142
|
out["instruction"] = instruction.trim();
|
|
38143
|
+
return null;
|
|
38144
|
+
}
|
|
38145
|
+
function validateRateCapConfig(input, out) {
|
|
38146
|
+
const cap = input["max_events_per_hour"];
|
|
38147
|
+
if (cap !== void 0 && cap !== null) {
|
|
38148
|
+
if (typeof cap !== "number" || !Number.isInteger(cap) || cap < 1 || cap > WEBHOOK_MAX_RATE_CAP) {
|
|
38149
|
+
return `max_events_per_hour must be an integer from 1 to ${WEBHOOK_MAX_RATE_CAP}`;
|
|
38150
|
+
}
|
|
38151
|
+
out["max_events_per_hour"] = cap;
|
|
38152
|
+
} else {
|
|
38153
|
+
out["max_events_per_hour"] = WEBHOOK_DEFAULT_RATE_CAP;
|
|
38154
|
+
}
|
|
38155
|
+
return null;
|
|
38156
|
+
}
|
|
38157
|
+
function validateWebhookConfig(input) {
|
|
38158
|
+
const out = {};
|
|
38159
|
+
const textError = validateOperatorText(input, out);
|
|
38160
|
+
if (textError)
|
|
38161
|
+
return { ok: false, error: textError };
|
|
38141
38162
|
const preset = input["preset"] ?? "generic";
|
|
38142
|
-
if (typeof preset !== "string" || !(preset
|
|
38163
|
+
if (typeof preset !== "string" || !Object.prototype.hasOwnProperty.call(WEBHOOK_PRESETS, preset)) {
|
|
38143
38164
|
return {
|
|
38144
38165
|
ok: false,
|
|
38145
38166
|
error: `preset must be one of: ${Object.keys(WEBHOOK_PRESETS).join(", ")}`
|
|
@@ -38155,18 +38176,9 @@ function validateWebhookConfig(input) {
|
|
|
38155
38176
|
}
|
|
38156
38177
|
out[key2] = v;
|
|
38157
38178
|
}
|
|
38158
|
-
const
|
|
38159
|
-
if (
|
|
38160
|
-
|
|
38161
|
-
return {
|
|
38162
|
-
ok: false,
|
|
38163
|
-
error: `max_events_per_hour must be an integer from 1 to ${WEBHOOK_MAX_RATE_CAP}`
|
|
38164
|
-
};
|
|
38165
|
-
}
|
|
38166
|
-
out["max_events_per_hour"] = cap;
|
|
38167
|
-
} else {
|
|
38168
|
-
out["max_events_per_hour"] = WEBHOOK_DEFAULT_RATE_CAP;
|
|
38169
|
-
}
|
|
38179
|
+
const capError = validateRateCapConfig(input, out);
|
|
38180
|
+
if (capError)
|
|
38181
|
+
return { ok: false, error: capError };
|
|
38170
38182
|
return { ok: true, config: out };
|
|
38171
38183
|
}
|
|
38172
38184
|
function webhookRateCap(trigger) {
|
|
@@ -38229,6 +38241,273 @@ var webhookTriggerAdapter = {
|
|
|
38229
38241
|
};
|
|
38230
38242
|
registerTriggerSource(webhookTriggerAdapter);
|
|
38231
38243
|
|
|
38244
|
+
// ../core/dist/triggers/adapters/github.js
|
|
38245
|
+
var GITHUB_TRIGGER_PROVIDER = "github";
|
|
38246
|
+
var GITHUB_MAX_BODY_BYTES = 5 * 1024 * 1024;
|
|
38247
|
+
var GITHUB_SIGNATURE_HEADER = "x-hub-signature-256";
|
|
38248
|
+
var GITHUB_EVENT_HEADER = "x-github-event";
|
|
38249
|
+
var GITHUB_DELIVERY_HEADER = "x-github-delivery";
|
|
38250
|
+
var GITHUB_EVENT_RULES = {
|
|
38251
|
+
pull_request: { actions: ["closed", "dequeued", "labeled"] },
|
|
38252
|
+
pull_request_review: { actions: ["submitted"] },
|
|
38253
|
+
check_suite: { actions: ["completed"] },
|
|
38254
|
+
issues: { actions: ["opened", "closed"] },
|
|
38255
|
+
issue_comment: { actions: ["created"] }
|
|
38256
|
+
};
|
|
38257
|
+
var GITHUB_WEBHOOK_EVENTS = Object.keys(GITHUB_EVENT_RULES);
|
|
38258
|
+
var REPO_FULL_NAME = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9._-]{1,100}$/;
|
|
38259
|
+
var LOGIN = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})(?:\[bot\])?$/;
|
|
38260
|
+
var LABEL_TOKEN = /^[A-Za-z0-9][A-Za-z0-9._:/+-]{0,49}$/;
|
|
38261
|
+
var SHA = /^[0-9a-f]{40}$/;
|
|
38262
|
+
var GUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
38263
|
+
var REASON_TOKEN = /^(?=.{1,40}$)[a-z]+(?:_[a-z]+){0,3}$/;
|
|
38264
|
+
var APP_SLUG = /^[a-z0-9][a-z0-9-]{0,99}$/;
|
|
38265
|
+
var REVIEW_STATES = /* @__PURE__ */ new Set(["approved", "changes_requested", "commented", "dismissed"]);
|
|
38266
|
+
var CHECK_CONCLUSIONS = /* @__PURE__ */ new Set([
|
|
38267
|
+
"success",
|
|
38268
|
+
"failure",
|
|
38269
|
+
"neutral",
|
|
38270
|
+
"cancelled",
|
|
38271
|
+
"timed_out",
|
|
38272
|
+
"action_required",
|
|
38273
|
+
"stale",
|
|
38274
|
+
"skipped",
|
|
38275
|
+
"startup_failure"
|
|
38276
|
+
]);
|
|
38277
|
+
var ISSUE_STATE_REASONS = /* @__PURE__ */ new Set(["completed", "not_planned", "reopened", "duplicate"]);
|
|
38278
|
+
function asDict(v) {
|
|
38279
|
+
return v !== null && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
38280
|
+
}
|
|
38281
|
+
function str(v) {
|
|
38282
|
+
return typeof v === "string" && v.length > 0 ? v : null;
|
|
38283
|
+
}
|
|
38284
|
+
function shaped(v, re) {
|
|
38285
|
+
const s = str(v);
|
|
38286
|
+
return s !== null && re.test(s) ? s : null;
|
|
38287
|
+
}
|
|
38288
|
+
function posInt(v) {
|
|
38289
|
+
return typeof v === "number" && Number.isInteger(v) && v > 0 ? v : null;
|
|
38290
|
+
}
|
|
38291
|
+
function header(headers, name) {
|
|
38292
|
+
const v = headers[name] ?? headers[name.toLowerCase()];
|
|
38293
|
+
return typeof v === "string" && v.length > 0 ? v : null;
|
|
38294
|
+
}
|
|
38295
|
+
function inSet(v, set) {
|
|
38296
|
+
const s = str(v)?.toLowerCase() ?? null;
|
|
38297
|
+
return s !== null && set.has(s) ? s : null;
|
|
38298
|
+
}
|
|
38299
|
+
function extractGithubFacts(event, payload) {
|
|
38300
|
+
const rule = Object.hasOwn(GITHUB_EVENT_RULES, event) ? GITHUB_EVENT_RULES[event] : void 0;
|
|
38301
|
+
if (!rule)
|
|
38302
|
+
return null;
|
|
38303
|
+
const root = asDict(payload);
|
|
38304
|
+
if (!root)
|
|
38305
|
+
return null;
|
|
38306
|
+
const rawAction = str(root["action"]);
|
|
38307
|
+
const action = rule.actions.find((a) => a === rawAction);
|
|
38308
|
+
if (!action)
|
|
38309
|
+
return null;
|
|
38310
|
+
const repo = shaped(asDict(root["repository"])?.["full_name"], REPO_FULL_NAME);
|
|
38311
|
+
if (!repo)
|
|
38312
|
+
return null;
|
|
38313
|
+
const sender = shaped(asDict(root["sender"])?.["login"], LOGIN);
|
|
38314
|
+
const base = `https://github.com/${repo}`;
|
|
38315
|
+
const details = [];
|
|
38316
|
+
if (event === "pull_request") {
|
|
38317
|
+
const pr = asDict(root["pull_request"]);
|
|
38318
|
+
const n2 = pr ? posInt(pr["number"]) : null;
|
|
38319
|
+
if (!pr || n2 === null)
|
|
38320
|
+
return null;
|
|
38321
|
+
let summary;
|
|
38322
|
+
if (action === "closed") {
|
|
38323
|
+
if (pr["merged"] !== true)
|
|
38324
|
+
return null;
|
|
38325
|
+
details.push(["Outcome", "merged"]);
|
|
38326
|
+
const mergedBy = shaped(asDict(pr["merged_by"])?.["login"], LOGIN);
|
|
38327
|
+
if (mergedBy)
|
|
38328
|
+
details.push(["Merged by", mergedBy]);
|
|
38329
|
+
summary = `PR #${n2} merged in ${repo}`;
|
|
38330
|
+
} else if (action === "dequeued") {
|
|
38331
|
+
const reasonRaw = str(root["reason"])?.toLowerCase().replace(/-/g, "_") ?? null;
|
|
38332
|
+
const reason = reasonRaw && REASON_TOKEN.test(reasonRaw) ? reasonRaw : "unknown";
|
|
38333
|
+
details.push(["Removed from merge queue, reason", reason]);
|
|
38334
|
+
if (pr["merged"] === true)
|
|
38335
|
+
details.push(["Merged", "yes"]);
|
|
38336
|
+
summary = `PR #${n2} removed from the merge queue in ${repo}`;
|
|
38337
|
+
} else {
|
|
38338
|
+
const label = shaped(asDict(root["label"])?.["name"], LABEL_TOKEN);
|
|
38339
|
+
details.push(["Label", label ?? "(name withheld: not a plain token)"]);
|
|
38340
|
+
summary = `PR #${n2} labeled in ${repo}`;
|
|
38341
|
+
}
|
|
38342
|
+
const state = str(pr["state"]);
|
|
38343
|
+
if (state === "open" || state === "closed")
|
|
38344
|
+
details.unshift(["State", state]);
|
|
38345
|
+
return {
|
|
38346
|
+
event,
|
|
38347
|
+
action,
|
|
38348
|
+
repo,
|
|
38349
|
+
subject: `Pull request: #${n2}`,
|
|
38350
|
+
url: `${base}/pull/${n2}`,
|
|
38351
|
+
sender,
|
|
38352
|
+
details,
|
|
38353
|
+
summary
|
|
38354
|
+
};
|
|
38355
|
+
}
|
|
38356
|
+
if (event === "pull_request_review") {
|
|
38357
|
+
const pr = asDict(root["pull_request"]);
|
|
38358
|
+
const n2 = pr ? posInt(pr["number"]) : null;
|
|
38359
|
+
if (n2 === null)
|
|
38360
|
+
return null;
|
|
38361
|
+
const review = asDict(root["review"]);
|
|
38362
|
+
const state = inSet(review?.["state"], REVIEW_STATES);
|
|
38363
|
+
details.push(["Review state", state ?? "unknown"]);
|
|
38364
|
+
const reviewId = review ? posInt(review["id"]) : null;
|
|
38365
|
+
return {
|
|
38366
|
+
event,
|
|
38367
|
+
action,
|
|
38368
|
+
repo,
|
|
38369
|
+
subject: `Pull request: #${n2}`,
|
|
38370
|
+
url: reviewId ? `${base}/pull/${n2}#pullrequestreview-${reviewId}` : `${base}/pull/${n2}`,
|
|
38371
|
+
sender,
|
|
38372
|
+
details,
|
|
38373
|
+
summary: `Review ${state ?? "submitted"} on PR #${n2} in ${repo}`
|
|
38374
|
+
};
|
|
38375
|
+
}
|
|
38376
|
+
if (event === "check_suite") {
|
|
38377
|
+
const suite = asDict(root["check_suite"]);
|
|
38378
|
+
if (!suite)
|
|
38379
|
+
return null;
|
|
38380
|
+
const conclusion = inSet(suite["conclusion"], CHECK_CONCLUSIONS);
|
|
38381
|
+
details.push(["Conclusion", conclusion ?? "unknown"]);
|
|
38382
|
+
const app = shaped(asDict(suite["app"])?.["slug"], APP_SLUG);
|
|
38383
|
+
if (app)
|
|
38384
|
+
details.push(["App", app]);
|
|
38385
|
+
const sha = shaped(str(suite["head_sha"])?.toLowerCase(), SHA);
|
|
38386
|
+
if (sha)
|
|
38387
|
+
details.push(["Head commit", sha]);
|
|
38388
|
+
const prs = Array.isArray(suite["pull_requests"]) ? suite["pull_requests"].map((p2) => posInt(asDict(p2)?.["number"])).filter((x) => x !== null).slice(0, 10) : [];
|
|
38389
|
+
if (prs.length > 0)
|
|
38390
|
+
details.push(["Pull requests", prs.map((x) => `#${x}`).join(", ")]);
|
|
38391
|
+
return {
|
|
38392
|
+
event,
|
|
38393
|
+
action,
|
|
38394
|
+
repo,
|
|
38395
|
+
subject: null,
|
|
38396
|
+
url: sha ? `${base}/commit/${sha}` : base,
|
|
38397
|
+
sender,
|
|
38398
|
+
details,
|
|
38399
|
+
summary: `Check suite ${conclusion ?? "completed"} in ${repo}${prs.length > 0 ? ` (PR #${prs[0]})` : ""}`
|
|
38400
|
+
};
|
|
38401
|
+
}
|
|
38402
|
+
if (event === "issues") {
|
|
38403
|
+
const issue3 = asDict(root["issue"]);
|
|
38404
|
+
const n2 = issue3 ? posInt(issue3["number"]) : null;
|
|
38405
|
+
if (!issue3 || n2 === null)
|
|
38406
|
+
return null;
|
|
38407
|
+
if (action === "closed") {
|
|
38408
|
+
const reason = inSet(issue3["state_reason"], ISSUE_STATE_REASONS);
|
|
38409
|
+
if (reason)
|
|
38410
|
+
details.push(["Close reason", reason]);
|
|
38411
|
+
}
|
|
38412
|
+
return {
|
|
38413
|
+
event,
|
|
38414
|
+
action,
|
|
38415
|
+
repo,
|
|
38416
|
+
subject: `Issue: #${n2}`,
|
|
38417
|
+
url: `${base}/issues/${n2}`,
|
|
38418
|
+
sender,
|
|
38419
|
+
details,
|
|
38420
|
+
summary: `Issue #${n2} ${action} in ${repo}`
|
|
38421
|
+
};
|
|
38422
|
+
}
|
|
38423
|
+
const issue2 = asDict(root["issue"]);
|
|
38424
|
+
const n = issue2 ? posInt(issue2["number"]) : null;
|
|
38425
|
+
if (!issue2 || n === null)
|
|
38426
|
+
return null;
|
|
38427
|
+
const onPr = asDict(issue2["pull_request"]) !== null;
|
|
38428
|
+
const commentId = posInt(asDict(root["comment"])?.["id"]);
|
|
38429
|
+
details.push(["Comment on", onPr ? "pull request" : "issue"]);
|
|
38430
|
+
return {
|
|
38431
|
+
event,
|
|
38432
|
+
action,
|
|
38433
|
+
repo,
|
|
38434
|
+
subject: `${onPr ? "Pull request" : "Issue"}: #${n}`,
|
|
38435
|
+
url: commentId ? `${base}/issues/${n}#issuecomment-${commentId}` : `${base}/issues/${n}`,
|
|
38436
|
+
sender,
|
|
38437
|
+
details,
|
|
38438
|
+
summary: `New comment on ${onPr ? "PR" : "issue"} #${n} in ${repo}`
|
|
38439
|
+
};
|
|
38440
|
+
}
|
|
38441
|
+
function githubDedupKey(event, rawBody) {
|
|
38442
|
+
return `gh:body:${stableHash(`${event}
|
|
38443
|
+
${rawBody}`)}`;
|
|
38444
|
+
}
|
|
38445
|
+
function buildGithubEvent(req, now = /* @__PURE__ */ new Date()) {
|
|
38446
|
+
const event = header(req.headers, GITHUB_EVENT_HEADER);
|
|
38447
|
+
if (!event)
|
|
38448
|
+
return null;
|
|
38449
|
+
const facts = extractGithubFacts(event, req.body);
|
|
38450
|
+
if (!facts)
|
|
38451
|
+
return null;
|
|
38452
|
+
const raw = req.rawBody ?? JSON.stringify(req.body ?? null);
|
|
38453
|
+
const delivery = header(req.headers, GITHUB_DELIVERY_HEADER);
|
|
38454
|
+
const deliveryGuid = delivery && GUID.test(delivery.toLowerCase()) ? delivery.toLowerCase() : null;
|
|
38455
|
+
const lines = [`GitHub event: ${facts.event} (${facts.action})`, `Repository: ${facts.repo}`];
|
|
38456
|
+
if (facts.subject)
|
|
38457
|
+
lines.push(facts.subject);
|
|
38458
|
+
for (const [k, v] of facts.details)
|
|
38459
|
+
lines.push(`${k}: ${v}`);
|
|
38460
|
+
if (facts.url)
|
|
38461
|
+
lines.push(`URL: ${facts.url}`);
|
|
38462
|
+
if (facts.sender)
|
|
38463
|
+
lines.push(`Sender: ${facts.sender}`);
|
|
38464
|
+
if (deliveryGuid)
|
|
38465
|
+
lines.push(`Delivery: ${deliveryGuid}`);
|
|
38466
|
+
lines.push("", "Titles, descriptions, comment text and commit messages are deliberately not included. Read them with your GitHub tools if you need them.");
|
|
38467
|
+
return {
|
|
38468
|
+
provider: GITHUB_TRIGGER_PROVIDER,
|
|
38469
|
+
occurredAt: now.toISOString(),
|
|
38470
|
+
dedupKey: githubDedupKey(facts.event, raw),
|
|
38471
|
+
sourceTrust: "untrusted",
|
|
38472
|
+
title: facts.summary,
|
|
38473
|
+
body: lines.join("\n"),
|
|
38474
|
+
// Ledger copy only (team-readable event log), never the prompt. Bounded
|
|
38475
|
+
// like the generic source; never headers (the signature rides there).
|
|
38476
|
+
raw: raw.length <= WEBHOOK_RAW_MAX_CHARS ? req.body : { truncated: true, bytes: raw.length, head: raw.slice(0, WEBHOOK_RAW_MAX_CHARS) },
|
|
38477
|
+
meaningful: true
|
|
38478
|
+
};
|
|
38479
|
+
}
|
|
38480
|
+
function validateGithubConfig(input) {
|
|
38481
|
+
const out = {};
|
|
38482
|
+
const textError = validateOperatorText(input, out);
|
|
38483
|
+
if (textError)
|
|
38484
|
+
return { ok: false, error: textError };
|
|
38485
|
+
const capError = validateRateCapConfig(input, out);
|
|
38486
|
+
if (capError)
|
|
38487
|
+
return { ok: false, error: capError };
|
|
38488
|
+
return { ok: true, config: out };
|
|
38489
|
+
}
|
|
38490
|
+
var githubTriggerAdapter = {
|
|
38491
|
+
provider: GITHUB_TRIGGER_PROVIDER,
|
|
38492
|
+
kind: "webhook",
|
|
38493
|
+
webhookAuth: "hmac",
|
|
38494
|
+
hmac: { signatureHeader: GITHUB_SIGNATURE_HEADER, signaturePrefix: "sha256=", algorithm: "sha256" },
|
|
38495
|
+
webhookEvents: [...GITHUB_WEBHOOK_EVENTS],
|
|
38496
|
+
// One trigger per repository or org hook, each with its own secret and instruction.
|
|
38497
|
+
multiInstance: true,
|
|
38498
|
+
maxBodyBytes: GITHUB_MAX_BODY_BYTES,
|
|
38499
|
+
validateConfig: validateGithubConfig,
|
|
38500
|
+
// Same breaker, same config key, same defaults as the generic source.
|
|
38501
|
+
rateCapPerHour: (trigger) => webhookRateCap(trigger),
|
|
38502
|
+
// Minted only on the human, agent.edit-gated route (as for `webhook`).
|
|
38503
|
+
operatorInstruction: true,
|
|
38504
|
+
ingest(req) {
|
|
38505
|
+
const event = buildGithubEvent(req);
|
|
38506
|
+
return event ? [event] : [];
|
|
38507
|
+
}
|
|
38508
|
+
};
|
|
38509
|
+
registerTriggerSource(githubTriggerAdapter);
|
|
38510
|
+
|
|
38232
38511
|
// ../core/dist/feature-flags/registry.js
|
|
38233
38512
|
var FLAG_REGISTRY = [
|
|
38234
38513
|
{
|
|
@@ -41920,8 +42199,8 @@ var REFLOW_COLS = 80;
|
|
|
41920
42199
|
function formatPaneSnapshot(opts) {
|
|
41921
42200
|
const maxChars = opts.maxChars ?? DEFAULT_MAX_CHARS;
|
|
41922
42201
|
const commandName = opts.commandName ?? "/debug";
|
|
41923
|
-
const
|
|
41924
|
-
const fenceOverhead =
|
|
42202
|
+
const header2 = opts.status.kind === "live" ? `\u{1F50E} Live pane tail for \`${opts.codeName}\` \u2014 captured ${opts.capturedAtLabel} \xB7 updates ~3s \xB7 expires in ${formatCountdown(opts.status.secondsRemaining)}` : `\u{1F50E} Pane tail for \`${opts.codeName}\` \u2014 captured ${opts.capturedAtLabel} \xB7 *expired* \u2014 run \`${commandName}\` to restart`;
|
|
42203
|
+
const fenceOverhead = header2.length + "\n```\n".length + "\n```".length + 16;
|
|
41925
42204
|
const contentBudget = Math.max(0, maxChars - fenceOverhead);
|
|
41926
42205
|
const lines = reflowLines(sanitizeForCodeBlock(opts.text), REFLOW_COLS);
|
|
41927
42206
|
const kept = [];
|
|
@@ -41937,7 +42216,7 @@ function formatPaneSnapshot(opts) {
|
|
|
41937
42216
|
const block = body.length > 0 ? `\`\`\`
|
|
41938
42217
|
${truncated ? "\u2026\n" : ""}${body}
|
|
41939
42218
|
\`\`\`` : "_(pane is empty)_";
|
|
41940
|
-
return `${
|
|
42219
|
+
return `${header2}
|
|
41941
42220
|
${block}`;
|
|
41942
42221
|
}
|
|
41943
42222
|
function formatCountdown(totalSeconds) {
|
|
@@ -42219,14 +42498,14 @@ var SLACK_EGRESS_COORDS = {
|
|
|
42219
42498
|
// bare channel id, no colon) names no thread, so it contributes no candidate.
|
|
42220
42499
|
"channel_request_input": { channelThread: ["thread_id"] }
|
|
42221
42500
|
};
|
|
42222
|
-
function
|
|
42501
|
+
function str2(v) {
|
|
42223
42502
|
return typeof v === "string" && v.length > 0 ? v : void 0;
|
|
42224
42503
|
}
|
|
42225
42504
|
function resolveEgressTargets(toolName, args, registry2) {
|
|
42226
42505
|
const spec = SLACK_EGRESS_COORDS[toolName];
|
|
42227
42506
|
if (!spec) return [];
|
|
42228
42507
|
const a = args ?? {};
|
|
42229
|
-
const argChannel =
|
|
42508
|
+
const argChannel = str2(a.channel);
|
|
42230
42509
|
const out = [];
|
|
42231
42510
|
const seen = /* @__PURE__ */ new Set();
|
|
42232
42511
|
const push = (channel, threadTs) => {
|
|
@@ -42237,14 +42516,14 @@ function resolveEgressTargets(toolName, args, registry2) {
|
|
|
42237
42516
|
out.push({ channel, threadTs });
|
|
42238
42517
|
};
|
|
42239
42518
|
for (const field of spec.channelThread ?? []) {
|
|
42240
|
-
const raw =
|
|
42519
|
+
const raw = str2(a[field]);
|
|
42241
42520
|
if (!raw) continue;
|
|
42242
42521
|
const sep3 = raw.indexOf(":");
|
|
42243
42522
|
if (sep3 <= 0) continue;
|
|
42244
|
-
push(raw.slice(0, sep3),
|
|
42523
|
+
push(raw.slice(0, sep3), str2(raw.slice(sep3 + 1)));
|
|
42245
42524
|
}
|
|
42246
42525
|
for (const field of spec.inboundId ?? []) {
|
|
42247
|
-
const id =
|
|
42526
|
+
const id = str2(a[field]);
|
|
42248
42527
|
if (!id || !registry2) continue;
|
|
42249
42528
|
let known = null;
|
|
42250
42529
|
try {
|
|
@@ -42255,10 +42534,10 @@ function resolveEgressTargets(toolName, args, registry2) {
|
|
|
42255
42534
|
if (known) push(known.channel, known.threadTs);
|
|
42256
42535
|
}
|
|
42257
42536
|
for (const field of spec.thread ?? []) {
|
|
42258
|
-
push(argChannel,
|
|
42537
|
+
push(argChannel, str2(a[field]));
|
|
42259
42538
|
}
|
|
42260
42539
|
for (const field of spec.message ?? []) {
|
|
42261
|
-
const ts =
|
|
42540
|
+
const ts = str2(a[field]);
|
|
42262
42541
|
if (!ts) continue;
|
|
42263
42542
|
push(argChannel, ts);
|
|
42264
42543
|
if (!argChannel || !registry2) continue;
|