@probelabs/visor 0.1.192-ee → 0.1.193-ee
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/736.index.js +124 -52
- package/dist/index.js +2890 -223
- package/dist/sdk/{a2a-frontend-XOLDANGJ.mjs → a2a-frontend-IN5D7IVC.mjs} +3 -3
- package/dist/sdk/{check-provider-registry-RWON6HOP.mjs → check-provider-registry-YYTCNHT6.mjs} +6 -6
- package/dist/sdk/{chunk-FYYKQCUJ.mjs → chunk-63MKHGBA.mjs} +2 -2
- package/dist/sdk/{chunk-CBVCFWI3.mjs → chunk-7QEVOF6T.mjs} +3 -3
- package/dist/sdk/{chunk-VNUP4Q25.mjs → chunk-BTRDMNJI.mjs} +2 -2
- package/dist/sdk/{chunk-QZKRJKD5.mjs → chunk-I6HELMNJ.mjs} +18 -18
- package/dist/sdk/{chunk-A64HFAOW.mjs → chunk-O3UWMGDE.mjs} +2 -2
- package/dist/sdk/{chunk-A64HFAOW.mjs.map → chunk-O3UWMGDE.mjs.map} +1 -1
- package/dist/sdk/{failure-condition-evaluator-ANS4WIEA.mjs → failure-condition-evaluator-EYLDH7BT.mjs} +4 -4
- package/dist/sdk/{github-frontend-TRETPEWZ.mjs → github-frontend-MZHXRIY7.mjs} +4 -4
- package/dist/sdk/{host-C3FMSKBX.mjs → host-3Y2RVF7E.mjs} +3 -3
- package/dist/sdk/{routing-GFHGNOMS.mjs → routing-Q5IPCQLI.mjs} +5 -5
- package/dist/sdk/{schedule-tool-3XCZR3NC.mjs → schedule-tool-MDPOLK4O.mjs} +6 -6
- package/dist/sdk/{schedule-tool-handler-4ECAAHEH.mjs → schedule-tool-handler-D2NV7ATP.mjs} +6 -6
- package/dist/sdk/sdk.js +1 -1
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -5
- package/dist/sdk/{trace-helpers-D67B7FOU.mjs → trace-helpers-SETVIO5T.mjs} +3 -3
- package/dist/sdk/{track-execution-DHQA6FAE.mjs → track-execution-6EWFXL34.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-DNPDEVSQ.mjs → workflow-check-provider-7U66H2MI.mjs} +6 -6
- package/package.json +2 -2
- /package/dist/sdk/{a2a-frontend-XOLDANGJ.mjs.map → a2a-frontend-IN5D7IVC.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-RWON6HOP.mjs.map → check-provider-registry-YYTCNHT6.mjs.map} +0 -0
- /package/dist/sdk/{chunk-FYYKQCUJ.mjs.map → chunk-63MKHGBA.mjs.map} +0 -0
- /package/dist/sdk/{chunk-CBVCFWI3.mjs.map → chunk-7QEVOF6T.mjs.map} +0 -0
- /package/dist/sdk/{chunk-VNUP4Q25.mjs.map → chunk-BTRDMNJI.mjs.map} +0 -0
- /package/dist/sdk/{chunk-QZKRJKD5.mjs.map → chunk-I6HELMNJ.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-ANS4WIEA.mjs.map → failure-condition-evaluator-EYLDH7BT.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-TRETPEWZ.mjs.map → github-frontend-MZHXRIY7.mjs.map} +0 -0
- /package/dist/sdk/{host-C3FMSKBX.mjs.map → host-3Y2RVF7E.mjs.map} +0 -0
- /package/dist/sdk/{routing-GFHGNOMS.mjs.map → routing-Q5IPCQLI.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-3XCZR3NC.mjs.map → schedule-tool-MDPOLK4O.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-4ECAAHEH.mjs.map → schedule-tool-handler-D2NV7ATP.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-D67B7FOU.mjs.map → trace-helpers-SETVIO5T.mjs.map} +0 -0
- /package/dist/sdk/{track-execution-DHQA6FAE.mjs.map → track-execution-6EWFXL34.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-DNPDEVSQ.mjs.map → workflow-check-provider-7U66H2MI.mjs.map} +0 -0
package/dist/736.index.js
CHANGED
|
@@ -6381,49 +6381,131 @@ class ParseError extends Error {
|
|
|
6381
6381
|
super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
6382
6382
|
}
|
|
6383
6383
|
}
|
|
6384
|
+
const LF = 10, CR = 13, SPACE = 32;
|
|
6384
6385
|
function noop(_arg) {
|
|
6385
6386
|
}
|
|
6386
|
-
function createParser(
|
|
6387
|
-
if (typeof
|
|
6387
|
+
function createParser(config) {
|
|
6388
|
+
if (typeof config == "function")
|
|
6388
6389
|
throw new TypeError(
|
|
6389
|
-
"`
|
|
6390
|
+
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
6390
6391
|
);
|
|
6391
|
-
const { onEvent = noop, onError = noop, onRetry = noop, onComment } =
|
|
6392
|
-
let
|
|
6393
|
-
function feed(
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6392
|
+
const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];
|
|
6393
|
+
let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = "", dataLines = 0, eventType, terminated = !1;
|
|
6394
|
+
function feed(chunk) {
|
|
6395
|
+
if (terminated)
|
|
6396
|
+
throw new Error(
|
|
6397
|
+
"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
|
|
6398
|
+
);
|
|
6399
|
+
if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
6400
|
+
const trailing2 = processLines(chunk);
|
|
6401
|
+
trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
|
|
6402
|
+
return;
|
|
6403
|
+
}
|
|
6404
|
+
if (chunk.indexOf(`
|
|
6405
|
+
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
6406
|
+
pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
|
|
6407
|
+
return;
|
|
6408
|
+
}
|
|
6409
|
+
pendingFragments.push(chunk);
|
|
6410
|
+
const input = pendingFragments.join("");
|
|
6411
|
+
pendingFragments.length = 0, pendingFragmentsLength = 0;
|
|
6412
|
+
const trailing = processLines(input);
|
|
6413
|
+
trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
|
|
6414
|
+
}
|
|
6415
|
+
function checkBufferSize() {
|
|
6416
|
+
maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(
|
|
6417
|
+
new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {
|
|
6418
|
+
type: "max-buffer-size-exceeded"
|
|
6419
|
+
})
|
|
6420
|
+
)));
|
|
6421
|
+
}
|
|
6422
|
+
function processLines(chunk) {
|
|
6423
|
+
let searchIndex = 0;
|
|
6424
|
+
if (chunk.indexOf("\r") === -1) {
|
|
6425
|
+
let lfIndex = chunk.indexOf(`
|
|
6426
|
+
`, searchIndex);
|
|
6427
|
+
for (; lfIndex !== -1; ) {
|
|
6428
|
+
if (searchIndex === lfIndex) {
|
|
6429
|
+
dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
6430
|
+
`, searchIndex);
|
|
6431
|
+
continue;
|
|
6432
|
+
}
|
|
6433
|
+
const firstCharCode = chunk.charCodeAt(searchIndex);
|
|
6434
|
+
if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
|
|
6435
|
+
const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
|
|
6436
|
+
if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
|
|
6437
|
+
onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
|
|
6438
|
+
`, searchIndex);
|
|
6439
|
+
continue;
|
|
6440
|
+
}
|
|
6441
|
+
data = dataLines === 0 ? value : `${data}
|
|
6442
|
+
${value}`, dataLines++;
|
|
6443
|
+
} else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
|
|
6444
|
+
chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
|
|
6445
|
+
lfIndex
|
|
6446
|
+
) || void 0 : parseLine(chunk, searchIndex, lfIndex);
|
|
6447
|
+
searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
|
|
6448
|
+
`, searchIndex);
|
|
6449
|
+
}
|
|
6450
|
+
return chunk.slice(searchIndex);
|
|
6451
|
+
}
|
|
6452
|
+
for (; searchIndex < chunk.length; ) {
|
|
6453
|
+
const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
|
|
6454
|
+
`, searchIndex);
|
|
6455
|
+
let lineEnd = -1;
|
|
6456
|
+
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
|
|
6457
|
+
break;
|
|
6458
|
+
parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
|
|
6459
|
+
}
|
|
6460
|
+
return chunk.slice(searchIndex);
|
|
6461
|
+
}
|
|
6462
|
+
function parseLine(chunk, start, end) {
|
|
6463
|
+
if (start === end) {
|
|
6401
6464
|
dispatchEvent();
|
|
6402
6465
|
return;
|
|
6403
6466
|
}
|
|
6404
|
-
|
|
6405
|
-
|
|
6467
|
+
const firstCharCode = chunk.charCodeAt(start);
|
|
6468
|
+
if (isDataPrefix(chunk, start, firstCharCode)) {
|
|
6469
|
+
const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
|
|
6470
|
+
data = dataLines === 0 ? value2 : `${data}
|
|
6471
|
+
${value2}`, dataLines++;
|
|
6472
|
+
return;
|
|
6473
|
+
}
|
|
6474
|
+
if (isEventPrefix(chunk, start, firstCharCode)) {
|
|
6475
|
+
eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
|
|
6476
|
+
return;
|
|
6477
|
+
}
|
|
6478
|
+
if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
|
|
6479
|
+
const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
|
|
6480
|
+
value2.includes("\0") || (id = value2);
|
|
6481
|
+
return;
|
|
6482
|
+
}
|
|
6483
|
+
if (firstCharCode === 58) {
|
|
6484
|
+
if (onComment) {
|
|
6485
|
+
const line2 = chunk.slice(start, end);
|
|
6486
|
+
onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
|
|
6487
|
+
}
|
|
6406
6488
|
return;
|
|
6407
6489
|
}
|
|
6408
|
-
const fieldSeparatorIndex = line.indexOf(":");
|
|
6409
|
-
if (fieldSeparatorIndex
|
|
6410
|
-
|
|
6411
|
-
processField(field, value, line);
|
|
6490
|
+
const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
|
|
6491
|
+
if (fieldSeparatorIndex === -1) {
|
|
6492
|
+
processField(line, "", line);
|
|
6412
6493
|
return;
|
|
6413
6494
|
}
|
|
6414
|
-
|
|
6495
|
+
const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
|
|
6496
|
+
processField(field, value, line);
|
|
6415
6497
|
}
|
|
6416
6498
|
function processField(field, value, line) {
|
|
6417
6499
|
switch (field) {
|
|
6418
6500
|
case "event":
|
|
6419
|
-
eventType = value;
|
|
6501
|
+
eventType = value || void 0;
|
|
6420
6502
|
break;
|
|
6421
6503
|
case "data":
|
|
6422
|
-
data = `${data}
|
|
6423
|
-
|
|
6504
|
+
data = dataLines === 0 ? value : `${data}
|
|
6505
|
+
${value}`, dataLines++;
|
|
6424
6506
|
break;
|
|
6425
6507
|
case "id":
|
|
6426
|
-
|
|
6508
|
+
value.includes("\0") || (id = value);
|
|
6427
6509
|
break;
|
|
6428
6510
|
case "retry":
|
|
6429
6511
|
/^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
|
|
@@ -6445,37 +6527,26 @@ function createParser(callbacks) {
|
|
|
6445
6527
|
}
|
|
6446
6528
|
}
|
|
6447
6529
|
function dispatchEvent() {
|
|
6448
|
-
|
|
6530
|
+
dataLines > 0 && onEvent({
|
|
6449
6531
|
id,
|
|
6450
|
-
event: eventType
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
data: data.endsWith(`
|
|
6454
|
-
`) ? data.slice(0, -1) : data
|
|
6455
|
-
}), id = void 0, data = "", eventType = "";
|
|
6532
|
+
event: eventType,
|
|
6533
|
+
data
|
|
6534
|
+
}), id = void 0, data = "", dataLines = 0, eventType = void 0;
|
|
6456
6535
|
}
|
|
6457
6536
|
function reset(options = {}) {
|
|
6458
|
-
|
|
6537
|
+
if (options.consume && pendingFragments.length > 0) {
|
|
6538
|
+
const incompleteLine = pendingFragments.join("");
|
|
6539
|
+
parseLine(incompleteLine, 0, incompleteLine.length);
|
|
6540
|
+
}
|
|
6541
|
+
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;
|
|
6459
6542
|
}
|
|
6460
6543
|
return { feed, reset };
|
|
6461
6544
|
}
|
|
6462
|
-
function
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
`, searchIndex);
|
|
6468
|
-
let lineEnd = -1;
|
|
6469
|
-
if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
|
|
6470
|
-
incompleteLine = chunk.slice(searchIndex);
|
|
6471
|
-
break;
|
|
6472
|
-
} else {
|
|
6473
|
-
const line = chunk.slice(searchIndex, lineEnd);
|
|
6474
|
-
lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
|
|
6475
|
-
` && searchIndex++;
|
|
6476
|
-
}
|
|
6477
|
-
}
|
|
6478
|
-
return [lines, incompleteLine];
|
|
6545
|
+
function isDataPrefix(chunk, i, firstCharCode) {
|
|
6546
|
+
return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
|
|
6547
|
+
}
|
|
6548
|
+
function isEventPrefix(chunk, i, firstCharCode) {
|
|
6549
|
+
return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
|
|
6479
6550
|
}
|
|
6480
6551
|
|
|
6481
6552
|
//# sourceMappingURL=index.js.map
|
|
@@ -6484,7 +6555,7 @@ function splitLines(chunk) {
|
|
|
6484
6555
|
|
|
6485
6556
|
|
|
6486
6557
|
class EventSourceParserStream extends TransformStream {
|
|
6487
|
-
constructor({ onError, onRetry, onComment } = {}) {
|
|
6558
|
+
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
6488
6559
|
let parser;
|
|
6489
6560
|
super({
|
|
6490
6561
|
start(controller) {
|
|
@@ -6493,10 +6564,11 @@ class EventSourceParserStream extends TransformStream {
|
|
|
6493
6564
|
controller.enqueue(event);
|
|
6494
6565
|
},
|
|
6495
6566
|
onError(error) {
|
|
6496
|
-
onError
|
|
6567
|
+
typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error);
|
|
6497
6568
|
},
|
|
6498
6569
|
onRetry,
|
|
6499
|
-
onComment
|
|
6570
|
+
onComment,
|
|
6571
|
+
maxBufferSize
|
|
6500
6572
|
});
|
|
6501
6573
|
},
|
|
6502
6574
|
transform(chunk) {
|