linkque-cli-v2 1.4.6 → 1.6.0
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/dataTransformWorker.js +1880 -0
- package/emscripten-module.wasm +0 -0
- package/linkquejs.js +1132 -230
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/data-transform/dataTransformWorker.js +1880 -0
- package/vendor/linkque-agent-appwrite-integrate/data-transform/emscripten-module.wasm +0 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-PM2UO433.js → chunk-3WYLH7P7.js} +2324 -1398
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-GQ4TD3EQ.js → chunk-4XAZNSEQ.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-JD3IL3IC.js → chunk-GPVKBHKR.js} +1 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-STGFILDE.js → chunk-TSJX2OMA.js} +2 -19
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{dist-TGBYXSBU.js → dist-ZPLSQEAM.js} +42 -27
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-ENBYCHYT.js → google-generative-ai-OLT56CSV.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-RIGAEYLC.js → google-vertex-4DBBJ7SR.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +1483 -667
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +2 -2
- package/vendor/linkque-agent-appwrite-integrate/package.json +1 -1
- package/worker.js +3895 -2162
package/linkquejs.js
CHANGED
|
@@ -13484,9 +13484,15 @@ var init_codec_registry = __esm({
|
|
|
13484
13484
|
|
|
13485
13485
|
// ../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js
|
|
13486
13486
|
function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32) {
|
|
13487
|
+
const writer = gzipStream.writable.getWriter();
|
|
13488
|
+
const reader = gzipStream.readable.getReader();
|
|
13489
|
+
const outputCrc32 = crc32 === UNDEFINED_VALUE ? new Crc32() : UNDEFINED_VALUE;
|
|
13487
13490
|
let outputLength = 0;
|
|
13488
13491
|
let inputDone = false;
|
|
13489
|
-
let
|
|
13492
|
+
let trailerWritten = false;
|
|
13493
|
+
let idleCheckArmed = false;
|
|
13494
|
+
let readCount = 0;
|
|
13495
|
+
let readPending = false;
|
|
13490
13496
|
let resolveTrailerReady, rejectTrailerReady;
|
|
13491
13497
|
const trailerReady = new Promise((resolve2, reject) => {
|
|
13492
13498
|
resolveTrailerReady = resolve2;
|
|
@@ -13494,62 +13500,115 @@ function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, cr
|
|
|
13494
13500
|
});
|
|
13495
13501
|
trailerReady.catch(() => {
|
|
13496
13502
|
});
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13503
|
+
pump();
|
|
13504
|
+
return new ReadableStream({
|
|
13505
|
+
async pull(controller) {
|
|
13506
|
+
let result;
|
|
13507
|
+
try {
|
|
13508
|
+
result = await read();
|
|
13509
|
+
} catch (error2) {
|
|
13510
|
+
throw trailerWritten ? getTrailerError(error2) : error2;
|
|
13511
|
+
}
|
|
13512
|
+
const { value, done } = result;
|
|
13513
|
+
if (done) {
|
|
13514
|
+
controller.close();
|
|
13515
|
+
} else {
|
|
13516
|
+
outputLength += value.length;
|
|
13517
|
+
if (outputLength > outputSize) {
|
|
13518
|
+
const error2 = new Error(ERR_INVALID_UNCOMPRESSED_SIZE);
|
|
13519
|
+
rejectTrailerReady(error2);
|
|
13520
|
+
await cancel(reader, error2);
|
|
13521
|
+
throw error2;
|
|
13522
|
+
}
|
|
13523
|
+
if (outputCrc32) {
|
|
13524
|
+
outputCrc32.append(value);
|
|
13525
|
+
}
|
|
13526
|
+
controller.enqueue(value);
|
|
13527
|
+
}
|
|
13528
|
+
},
|
|
13529
|
+
cancel(reason) {
|
|
13530
|
+
rejectTrailerReady(reason);
|
|
13531
|
+
return reader.cancel(reason);
|
|
13532
|
+
}
|
|
13533
|
+
});
|
|
13534
|
+
async function pump() {
|
|
13535
|
+
const inputReader = readable.getReader();
|
|
13536
|
+
try {
|
|
13502
13537
|
const header = new Uint8Array(GZIP_HEADER_LENGTH);
|
|
13503
13538
|
header.set(GZIP_HEADER_BYTES);
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13539
|
+
await writer.write(header);
|
|
13540
|
+
for (; ; ) {
|
|
13541
|
+
await writer.ready;
|
|
13542
|
+
const { value, done } = await inputReader.read();
|
|
13543
|
+
if (done) {
|
|
13544
|
+
break;
|
|
13545
|
+
}
|
|
13546
|
+
await writer.write(value);
|
|
13547
|
+
}
|
|
13510
13548
|
inputDone = true;
|
|
13511
|
-
|
|
13512
|
-
|
|
13549
|
+
if (outputCrc32) {
|
|
13550
|
+
if (readPending) {
|
|
13551
|
+
armIdleCheck();
|
|
13552
|
+
}
|
|
13513
13553
|
await trailerReady;
|
|
13514
|
-
} finally {
|
|
13515
|
-
stopWatchdog();
|
|
13516
13554
|
}
|
|
13517
13555
|
const trailer = new Uint8Array(GZIP_TRAILER_LENGTH);
|
|
13518
13556
|
const dataView = getDataView(trailer);
|
|
13519
|
-
dataView.setUint32(0,
|
|
13557
|
+
dataView.setUint32(0, outputCrc32 ? outputCrc32.get() : crc32, true);
|
|
13520
13558
|
dataView.setUint32(4, outputSize, true);
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13559
|
+
trailerWritten = true;
|
|
13560
|
+
await writer.write(trailer);
|
|
13561
|
+
await writer.close();
|
|
13562
|
+
} catch (error2) {
|
|
13563
|
+
await abort(writer, error2);
|
|
13564
|
+
await cancel(inputReader, error2);
|
|
13525
13565
|
}
|
|
13526
|
-
}
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13566
|
+
}
|
|
13567
|
+
function read() {
|
|
13568
|
+
readCount++;
|
|
13569
|
+
readPending = true;
|
|
13570
|
+
const result = reader.read();
|
|
13571
|
+
result.then(onReadSettled, onReadSettled);
|
|
13572
|
+
if (inputDone && outputCrc32) {
|
|
13573
|
+
armIdleCheck();
|
|
13574
|
+
}
|
|
13575
|
+
return result;
|
|
13576
|
+
}
|
|
13577
|
+
function onReadSettled() {
|
|
13578
|
+
readPending = false;
|
|
13579
|
+
}
|
|
13580
|
+
async function armIdleCheck() {
|
|
13581
|
+
if (!idleCheckArmed) {
|
|
13582
|
+
idleCheckArmed = true;
|
|
13583
|
+
const count = readCount;
|
|
13584
|
+
await nextTask();
|
|
13585
|
+
idleCheckArmed = false;
|
|
13586
|
+
if (readPending) {
|
|
13587
|
+
if (readCount == count) {
|
|
13588
|
+
resolveTrailerReady();
|
|
13589
|
+
} else {
|
|
13590
|
+
armIdleCheck();
|
|
13591
|
+
}
|
|
13535
13592
|
}
|
|
13536
|
-
controller.enqueue(chunk);
|
|
13537
|
-
},
|
|
13538
|
-
cancel(reason) {
|
|
13539
|
-
rejectTrailerReady(reason);
|
|
13540
13593
|
}
|
|
13541
|
-
});
|
|
13542
|
-
readable = pipeThrough(readable, gzipWrapStream);
|
|
13543
|
-
readable = pipeThroughBackpressured(readable, gzipStream);
|
|
13544
|
-
return pipeThrough(readable, outputStream);
|
|
13545
|
-
function startWatchdog() {
|
|
13546
|
-
stopWatchdog();
|
|
13547
|
-
watchdogTimeout = setTimeout(() => rejectTrailerReady(new Error(ERR_INVALID_UNCOMPRESSED_SIZE)), GZIP_OUTPUT_STALL_TIMEOUT);
|
|
13548
13594
|
}
|
|
13549
|
-
function
|
|
13550
|
-
|
|
13595
|
+
function getTrailerError(error2) {
|
|
13596
|
+
const trailerError = new Error(outputLength == outputSize ? ERR_INVALID_CRC32 : ERR_INVALID_UNCOMPRESSED_SIZE);
|
|
13597
|
+
trailerError.cause = error2;
|
|
13598
|
+
return trailerError;
|
|
13551
13599
|
}
|
|
13552
13600
|
}
|
|
13601
|
+
function nextTask() {
|
|
13602
|
+
return new Promise((resolve2) => {
|
|
13603
|
+
const { port1, port2 } = new MessageChannel();
|
|
13604
|
+
port2.onmessage = () => {
|
|
13605
|
+
port1.close();
|
|
13606
|
+
port2.close();
|
|
13607
|
+
resolve2();
|
|
13608
|
+
};
|
|
13609
|
+
port1.postMessage(UNDEFINED_VALUE);
|
|
13610
|
+
});
|
|
13611
|
+
}
|
|
13553
13612
|
function supportsFormat(StreamClass, format) {
|
|
13554
13613
|
if (!StreamClass) {
|
|
13555
13614
|
return false;
|
|
@@ -13591,11 +13650,11 @@ function createCodecStream(CodecStreamClass, format, options) {
|
|
|
13591
13650
|
}
|
|
13592
13651
|
return new CodecStreamClass(format, options);
|
|
13593
13652
|
}
|
|
13594
|
-
function
|
|
13595
|
-
if (useCompressionStream &&
|
|
13596
|
-
return
|
|
13597
|
-
} else if (
|
|
13598
|
-
return
|
|
13653
|
+
function getGzipCodecStream(useCompressionStream, CodecStreamNative, CodecStreamFallback) {
|
|
13654
|
+
if (useCompressionStream && CodecStreamNative) {
|
|
13655
|
+
return CodecStreamNative;
|
|
13656
|
+
} else if (CodecStreamFallback && CodecStreamFallback.requiresModule) {
|
|
13657
|
+
return CodecStreamFallback;
|
|
13599
13658
|
}
|
|
13600
13659
|
}
|
|
13601
13660
|
function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback) {
|
|
@@ -13677,7 +13736,7 @@ function mapInflateStreamError(readable) {
|
|
|
13677
13736
|
}
|
|
13678
13737
|
});
|
|
13679
13738
|
}
|
|
13680
|
-
var ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_COMPRESSED_DATA, ERR_INVALID_CRC32, FORMAT_DEFLATE_RAW, FORMAT_DEFLATE64_RAW, FORMAT_GZIP, GZIP_HEADER_LENGTH, GZIP_TRAILER_LENGTH, GZIP_HEADER_BYTES,
|
|
13739
|
+
var ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_COMPRESSED_DATA, ERR_INVALID_CRC32, FORMAT_DEFLATE_RAW, FORMAT_DEFLATE64_RAW, FORMAT_GZIP, GZIP_HEADER_LENGTH, GZIP_TRAILER_LENGTH, GZIP_HEADER_BYTES, DeflateStream, GzipToRawDeflateStream, InflateStream, formatSupportByStream;
|
|
13681
13740
|
var init_zip_entry_stream = __esm({
|
|
13682
13741
|
"../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js"() {
|
|
13683
13742
|
init_crc32();
|
|
@@ -13698,7 +13757,6 @@ var init_zip_entry_stream = __esm({
|
|
|
13698
13757
|
GZIP_HEADER_LENGTH = 10;
|
|
13699
13758
|
GZIP_TRAILER_LENGTH = 8;
|
|
13700
13759
|
GZIP_HEADER_BYTES = [31, 139, 8];
|
|
13701
|
-
GZIP_OUTPUT_STALL_TIMEOUT = 5e3;
|
|
13702
13760
|
DeflateStream = class extends TransformStream {
|
|
13703
13761
|
constructor(options, { chunkSize, CompressionStreamFallback, CompressionStream: CompressionStream2 }) {
|
|
13704
13762
|
super({});
|
|
@@ -13707,7 +13765,7 @@ var init_zip_entry_stream = __esm({
|
|
|
13707
13765
|
let crc32Stream, encryptionStream, gzipCrc32Stream;
|
|
13708
13766
|
let readable = super.readable;
|
|
13709
13767
|
const codecStreams2 = format && getCodecStreams(format);
|
|
13710
|
-
const GzipCompressionStream =
|
|
13768
|
+
const GzipCompressionStream = getGzipCodecStream(useCompressionStream, CompressionStream2, CompressionStreamFallback);
|
|
13711
13769
|
const useGzipCrc32 = computeCrc32 && compressed && !deflate64 && !codecStreams2 && (!encrypted || zipCrypto) && Boolean(GzipCompressionStream);
|
|
13712
13770
|
if ((!encrypted || zipCrypto) && computeCrc32 && !useGzipCrc32) {
|
|
13713
13771
|
crc32Stream = new Crc32Stream();
|
|
@@ -13724,6 +13782,9 @@ var init_zip_entry_stream = __esm({
|
|
|
13724
13782
|
try {
|
|
13725
13783
|
readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream2, CompressionStreamFallback);
|
|
13726
13784
|
} catch (error2) {
|
|
13785
|
+
if (!useCompressionStream && CompressionStreamFallback) {
|
|
13786
|
+
throw error2;
|
|
13787
|
+
}
|
|
13727
13788
|
let gzipStream;
|
|
13728
13789
|
try {
|
|
13729
13790
|
gzipStream = new CompressionStream2(FORMAT_GZIP);
|
|
@@ -13809,20 +13870,32 @@ var init_zip_entry_stream = __esm({
|
|
|
13809
13870
|
if (codecStreams2) {
|
|
13810
13871
|
readable = pipeThroughBackpressured(readable, createCodecStream(codecStreams2.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }));
|
|
13811
13872
|
} else {
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
|
|
13815
|
-
if (deflate64 || outputSize === UNDEFINED_VALUE) {
|
|
13816
|
-
throw error2;
|
|
13817
|
-
}
|
|
13818
|
-
let gzipStream;
|
|
13873
|
+
let gzipStream;
|
|
13874
|
+
const GzipDecompressionStream = getGzipCodecStream(useCompressionStream, DecompressionStream2, DecompressionStreamFallback);
|
|
13875
|
+
if (checkCrc32 && !deflate64 && crc32 !== UNDEFINED_VALUE && outputSize !== UNDEFINED_VALUE && GzipDecompressionStream) {
|
|
13819
13876
|
try {
|
|
13820
|
-
gzipStream = new
|
|
13877
|
+
gzipStream = new GzipDecompressionStream(FORMAT_GZIP, { chunkSize });
|
|
13821
13878
|
} catch {
|
|
13822
|
-
|
|
13879
|
+
gzipStream = UNDEFINED_VALUE;
|
|
13880
|
+
}
|
|
13881
|
+
}
|
|
13882
|
+
if (!gzipStream) {
|
|
13883
|
+
try {
|
|
13884
|
+
readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream2, DecompressionStreamFallback);
|
|
13885
|
+
} catch (error2) {
|
|
13886
|
+
if (deflate64 || outputSize === UNDEFINED_VALUE || !useCompressionStream && DecompressionStreamFallback) {
|
|
13887
|
+
throw error2;
|
|
13888
|
+
}
|
|
13889
|
+
try {
|
|
13890
|
+
gzipStream = new DecompressionStream2(FORMAT_GZIP);
|
|
13891
|
+
} catch {
|
|
13892
|
+
throw error2;
|
|
13893
|
+
}
|
|
13823
13894
|
}
|
|
13824
|
-
|
|
13825
|
-
|
|
13895
|
+
}
|
|
13896
|
+
if (gzipStream) {
|
|
13897
|
+
gzipCrc32 = true;
|
|
13898
|
+
readable = pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32);
|
|
13826
13899
|
}
|
|
13827
13900
|
}
|
|
13828
13901
|
readable = mapInflateStreamError(readable);
|
|
@@ -13832,8 +13905,8 @@ var init_zip_entry_stream = __esm({
|
|
|
13832
13905
|
readable = pipeThrough(readable, crc32Stream);
|
|
13833
13906
|
}
|
|
13834
13907
|
setReadable(this, readable, () => {
|
|
13835
|
-
if (
|
|
13836
|
-
const computedCrc32 =
|
|
13908
|
+
if (crc32Stream) {
|
|
13909
|
+
const computedCrc32 = new DataView(crc32Stream.value.buffer).getUint32(0, false);
|
|
13837
13910
|
if (crc32 != computedCrc32) {
|
|
13838
13911
|
throw new Error(ERR_INVALID_CRC32);
|
|
13839
13912
|
}
|
|
@@ -16487,6 +16560,15 @@ var ERROR_CATALOG = {
|
|
|
16487
16560
|
CARD_BINDING_CONTEXT_STALE: { retryable: false, exitCode: 1 },
|
|
16488
16561
|
CARD_BINDING_VALIDATION_FAILED: { retryable: false, exitCode: 1 },
|
|
16489
16562
|
CARD_RUNTIME_SCHEMA_UNSUPPORTED: { retryable: false, exitCode: 1 },
|
|
16563
|
+
CARD_TRANSFORM_BUSY: { retryable: true, exitCode: 1 },
|
|
16564
|
+
CARD_TRANSFORM_INPUT_TOO_LARGE: { retryable: false, exitCode: 1 },
|
|
16565
|
+
CARD_TRANSFORM_OUTPUT_INVALID: { retryable: false, exitCode: 1 },
|
|
16566
|
+
CARD_TRANSFORM_OUTPUT_SCHEMA_MISMATCH: { retryable: false, exitCode: 1 },
|
|
16567
|
+
CARD_TRANSFORM_OUTPUT_TOO_LARGE: { retryable: false, exitCode: 1 },
|
|
16568
|
+
CARD_TRANSFORM_RESOURCE_EXCEEDED: { retryable: false, exitCode: 1 },
|
|
16569
|
+
CARD_TRANSFORM_SOURCE_INVALID: { retryable: false, exitCode: 1 },
|
|
16570
|
+
CARD_TRANSFORM_TIMEOUT: { retryable: false, exitCode: 1 },
|
|
16571
|
+
CARD_TRANSFORM_FAILED: { retryable: false, exitCode: 1 },
|
|
16490
16572
|
CARD_FINALIZE_CONFLICT: { retryable: false, exitCode: 1 },
|
|
16491
16573
|
CARD_FINALIZE_CONFIG_TOO_LARGE: { retryable: false, exitCode: 1 },
|
|
16492
16574
|
CARD_FINALIZE_LOCK_TIMEOUT: { retryable: true, exitCode: 1 },
|
|
@@ -19812,6 +19894,7 @@ var withWorkspaceLock = async (options, operation) => {
|
|
|
19812
19894
|
var import_esbuild = require("esbuild");
|
|
19813
19895
|
var import_node_fs7 = require("node:fs");
|
|
19814
19896
|
var import_node_path10 = require("node:path");
|
|
19897
|
+
var import_node_module = require("node:module");
|
|
19815
19898
|
var import_node_zlib = require("node:zlib");
|
|
19816
19899
|
function distModulePath(pkgRoot, rel) {
|
|
19817
19900
|
return (0, import_node_path10.resolve)(pkgRoot, "dist", "esm", rel);
|
|
@@ -19860,6 +19943,7 @@ async function createBundler(input) {
|
|
|
19860
19943
|
if (!outputFile) throw new Error("esbuild \u672A\u4EA7\u51FA\u6587\u4EF6");
|
|
19861
19944
|
const outputPath = (0, import_node_path10.join)(outDir, "index.js");
|
|
19862
19945
|
(0, import_node_fs7.writeFileSync)(outputPath, outputFile.text, "utf8");
|
|
19946
|
+
await buildDataTransformWorker(pkgRoot, outDir, minify);
|
|
19863
19947
|
const bundleName = "@alipay/linkque-agent-appwrite-gateway-bundle";
|
|
19864
19948
|
(0, import_node_fs7.writeFileSync)(
|
|
19865
19949
|
(0, import_node_path10.join)(outDir, "package.json"),
|
|
@@ -19892,6 +19976,60 @@ async function createBundler(input) {
|
|
|
19892
19976
|
(0, import_node_fs7.rmSync)(bakeDir, { recursive: true, force: true });
|
|
19893
19977
|
}
|
|
19894
19978
|
}
|
|
19979
|
+
async function buildDataTransformWorker(pkgRoot, outDir, minify) {
|
|
19980
|
+
const portableRoot = (0, import_node_path10.join)(pkgRoot, "data-transform");
|
|
19981
|
+
const portableWorker = (0, import_node_path10.join)(portableRoot, "dataTransformWorker.js");
|
|
19982
|
+
const portableWasm = (0, import_node_path10.join)(portableRoot, "emscripten-module.wasm");
|
|
19983
|
+
if ((0, import_node_fs7.existsSync)(portableWorker) && (0, import_node_fs7.existsSync)(portableWasm)) {
|
|
19984
|
+
(0, import_node_fs7.copyFileSync)(portableWorker, (0, import_node_path10.join)(outDir, "dataTransformWorker.js"));
|
|
19985
|
+
(0, import_node_fs7.copyFileSync)(portableWasm, (0, import_node_path10.join)(outDir, "emscripten-module.wasm"));
|
|
19986
|
+
return;
|
|
19987
|
+
}
|
|
19988
|
+
const resolver = (0, import_node_module.createRequire)((0, import_node_path10.join)(pkgRoot, "package.json"));
|
|
19989
|
+
const runtimeRoot = (0, import_node_path10.dirname)(
|
|
19990
|
+
resolver.resolve("@alipay/linkque-agent-runtime/package.json")
|
|
19991
|
+
);
|
|
19992
|
+
const quickJsRoot = (0, import_node_path10.dirname)(
|
|
19993
|
+
resolver.resolve("@jitl/quickjs-wasmfile-release-sync/package.json")
|
|
19994
|
+
);
|
|
19995
|
+
const workerEntry = (0, import_node_path10.join)(runtimeRoot, "dist/esm/core/dataTransformWorker.js");
|
|
19996
|
+
const variantCjs = (0, import_node_path10.join)(quickJsRoot, "dist/index.js");
|
|
19997
|
+
const emscriptenCjs = (0, import_node_path10.join)(quickJsRoot, "dist/emscripten-module.cjs");
|
|
19998
|
+
await (0, import_esbuild.build)({
|
|
19999
|
+
entryPoints: [workerEntry],
|
|
20000
|
+
bundle: true,
|
|
20001
|
+
format: "cjs",
|
|
20002
|
+
platform: "node",
|
|
20003
|
+
target: "node22",
|
|
20004
|
+
outfile: (0, import_node_path10.join)(outDir, "dataTransformWorker.js"),
|
|
20005
|
+
minify,
|
|
20006
|
+
sourcemap: false,
|
|
20007
|
+
treeShaking: true,
|
|
20008
|
+
legalComments: "none",
|
|
20009
|
+
logLevel: "warning",
|
|
20010
|
+
plugins: [
|
|
20011
|
+
{
|
|
20012
|
+
name: "quickjs-node-cjs",
|
|
20013
|
+
setup(api) {
|
|
20014
|
+
api.onResolve(
|
|
20015
|
+
{ filter: /^@jitl\/quickjs-wasmfile-release-sync$/u },
|
|
20016
|
+
() => ({ path: variantCjs })
|
|
20017
|
+
);
|
|
20018
|
+
api.onResolve(
|
|
20019
|
+
{
|
|
20020
|
+
filter: /^@jitl\/quickjs-wasmfile-release-sync\/emscripten-module$/u
|
|
20021
|
+
},
|
|
20022
|
+
() => ({ path: emscriptenCjs })
|
|
20023
|
+
);
|
|
20024
|
+
}
|
|
20025
|
+
}
|
|
20026
|
+
]
|
|
20027
|
+
});
|
|
20028
|
+
(0, import_node_fs7.copyFileSync)(
|
|
20029
|
+
(0, import_node_path10.join)(quickJsRoot, "dist/emscripten-module.wasm"),
|
|
20030
|
+
(0, import_node_path10.join)(outDir, "emscripten-module.wasm")
|
|
20031
|
+
);
|
|
20032
|
+
}
|
|
19895
20033
|
function prepareBakeDir(bakeDir) {
|
|
19896
20034
|
(0, import_node_fs7.rmSync)(bakeDir, { recursive: true, force: true });
|
|
19897
20035
|
(0, import_node_fs7.mkdirSync)(bakeDir, { recursive: true });
|
|
@@ -19984,6 +20122,288 @@ var EModelRequestSource;
|
|
|
19984
20122
|
EModelRequestSource2["APPBASE_FUNCTION"] = "APPBASE_FUNCTION";
|
|
19985
20123
|
})(EModelRequestSource || (EModelRequestSource = {}));
|
|
19986
20124
|
|
|
20125
|
+
// ../linkque-agent-runtime/dist/esm/core/dataTransformExecutor.js
|
|
20126
|
+
var import_node_crypto2 = require("node:crypto");
|
|
20127
|
+
var import_node_path11 = require("node:path");
|
|
20128
|
+
var import_node_module2 = require("node:module");
|
|
20129
|
+
var import_node_url = require("node:url");
|
|
20130
|
+
var import_node_worker_threads = require("node:worker_threads");
|
|
20131
|
+
var DATA_TRANSFORM_LIMITS = Object.freeze({
|
|
20132
|
+
sourceBytes: 32 * 1024,
|
|
20133
|
+
inputBytes: 2 * 1024 * 1024,
|
|
20134
|
+
outputBytes: 1024 * 1024,
|
|
20135
|
+
maxDepth: 64,
|
|
20136
|
+
memoryBytes: 32 * 1024 * 1024,
|
|
20137
|
+
stackBytes: 512 * 1024,
|
|
20138
|
+
executionMs: 100,
|
|
20139
|
+
watchdogMs: 500,
|
|
20140
|
+
initializationMs: 5e3,
|
|
20141
|
+
maxConcurrent: 4,
|
|
20142
|
+
maxQueued: 32
|
|
20143
|
+
});
|
|
20144
|
+
var DataTransformError = class extends Error {
|
|
20145
|
+
code;
|
|
20146
|
+
sourceHash;
|
|
20147
|
+
constructor(code, message, sourceHash) {
|
|
20148
|
+
super(message);
|
|
20149
|
+
this.code = code;
|
|
20150
|
+
this.sourceHash = sourceHash;
|
|
20151
|
+
this.name = "DataTransformError";
|
|
20152
|
+
}
|
|
20153
|
+
};
|
|
20154
|
+
var DataTransformExecutor = class {
|
|
20155
|
+
workerUrl;
|
|
20156
|
+
queue = [];
|
|
20157
|
+
slots = [];
|
|
20158
|
+
nextRequestId = 1;
|
|
20159
|
+
disposed = false;
|
|
20160
|
+
constructor(workerUrl = defaultWorkerUrl()) {
|
|
20161
|
+
this.workerUrl = workerUrl;
|
|
20162
|
+
}
|
|
20163
|
+
execute(source, input, signal) {
|
|
20164
|
+
const sourceBytes = Buffer.byteLength(source, "utf8");
|
|
20165
|
+
const sourceHash = (0, import_node_crypto2.createHash)("sha256").update(source).digest("hex");
|
|
20166
|
+
if (!source.trim() || sourceBytes > DATA_TRANSFORM_LIMITS.sourceBytes) {
|
|
20167
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_SOURCE_INVALID", `\u6570\u636E\u8F6C\u6362\u6E90\u7801\u4E3A\u7A7A\u6216\u8D85\u8FC7 ${DATA_TRANSFORM_LIMITS.sourceBytes} \u5B57\u8282`, sourceHash));
|
|
20168
|
+
}
|
|
20169
|
+
if (signal?.aborted) {
|
|
20170
|
+
return Promise.reject(signal.reason ?? new Error("\u64CD\u4F5C\u5DF2\u53D6\u6D88"));
|
|
20171
|
+
}
|
|
20172
|
+
let inputJson;
|
|
20173
|
+
try {
|
|
20174
|
+
inputJson = JSON.stringify(input);
|
|
20175
|
+
} catch {
|
|
20176
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_INPUT_TOO_LARGE", "\u6570\u636E\u8F6C\u6362\u8F93\u5165\u65E0\u6CD5\u5E8F\u5217\u5316", sourceHash));
|
|
20177
|
+
}
|
|
20178
|
+
const inputBytes = Buffer.byteLength(inputJson, "utf8");
|
|
20179
|
+
if (inputBytes > DATA_TRANSFORM_LIMITS.inputBytes || jsonDepth(input) > DATA_TRANSFORM_LIMITS.maxDepth) {
|
|
20180
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_INPUT_TOO_LARGE", "\u6570\u636E\u8F6C\u6362\u8F93\u5165\u8D85\u8FC7\u5927\u5C0F\u6216\u6DF1\u5EA6\u9650\u5236", sourceHash));
|
|
20181
|
+
}
|
|
20182
|
+
const active = this.slots.filter((slot) => slot.busy).length;
|
|
20183
|
+
if (active >= DATA_TRANSFORM_LIMITS.maxConcurrent && this.queue.length >= DATA_TRANSFORM_LIMITS.maxQueued) {
|
|
20184
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_BUSY", "\u6570\u636E\u8F6C\u6362\u6267\u884C\u961F\u5217\u5DF2\u6EE1", sourceHash));
|
|
20185
|
+
}
|
|
20186
|
+
if (this.disposed) {
|
|
20187
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_FAILED", "\u6570\u636E\u8F6C\u6362\u6267\u884C\u5668\u5DF2\u5173\u95ED", sourceHash));
|
|
20188
|
+
}
|
|
20189
|
+
return new Promise((resolve2, reject) => {
|
|
20190
|
+
this.queue.push({
|
|
20191
|
+
mode: "execute",
|
|
20192
|
+
source,
|
|
20193
|
+
sourceHash,
|
|
20194
|
+
inputJson,
|
|
20195
|
+
inputBytes,
|
|
20196
|
+
signal,
|
|
20197
|
+
resolve: resolve2,
|
|
20198
|
+
reject
|
|
20199
|
+
});
|
|
20200
|
+
this.drain();
|
|
20201
|
+
});
|
|
20202
|
+
}
|
|
20203
|
+
validateSource(source) {
|
|
20204
|
+
const sourceBytes = Buffer.byteLength(source, "utf8");
|
|
20205
|
+
const sourceHash = (0, import_node_crypto2.createHash)("sha256").update(source).digest("hex");
|
|
20206
|
+
if (!source.trim() || sourceBytes > DATA_TRANSFORM_LIMITS.sourceBytes) {
|
|
20207
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_SOURCE_INVALID", `\u6570\u636E\u8F6C\u6362\u6E90\u7801\u4E3A\u7A7A\u6216\u8D85\u8FC7 ${DATA_TRANSFORM_LIMITS.sourceBytes} \u5B57\u8282`, sourceHash));
|
|
20208
|
+
}
|
|
20209
|
+
if (this.disposed) {
|
|
20210
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_FAILED", "\u6570\u636E\u8F6C\u6362\u6267\u884C\u5668\u5DF2\u5173\u95ED", sourceHash));
|
|
20211
|
+
}
|
|
20212
|
+
const active = this.slots.filter((slot) => slot.busy).length;
|
|
20213
|
+
if (active >= DATA_TRANSFORM_LIMITS.maxConcurrent && this.queue.length >= DATA_TRANSFORM_LIMITS.maxQueued) {
|
|
20214
|
+
return Promise.reject(new DataTransformError("CARD_TRANSFORM_BUSY", "\u6570\u636E\u8F6C\u6362\u6267\u884C\u961F\u5217\u5DF2\u6EE1", sourceHash));
|
|
20215
|
+
}
|
|
20216
|
+
return new Promise((resolve2, reject) => {
|
|
20217
|
+
this.queue.push({
|
|
20218
|
+
mode: "validate",
|
|
20219
|
+
source,
|
|
20220
|
+
sourceHash,
|
|
20221
|
+
inputJson: "[]",
|
|
20222
|
+
inputBytes: 2,
|
|
20223
|
+
resolve: () => resolve2(),
|
|
20224
|
+
reject
|
|
20225
|
+
});
|
|
20226
|
+
this.drain();
|
|
20227
|
+
});
|
|
20228
|
+
}
|
|
20229
|
+
async close() {
|
|
20230
|
+
this.disposed = true;
|
|
20231
|
+
for (const queued of this.queue.splice(0)) {
|
|
20232
|
+
queued.reject(new DataTransformError("CARD_TRANSFORM_FAILED", "\u6570\u636E\u8F6C\u6362\u6267\u884C\u5668\u5DF2\u5173\u95ED", queued.sourceHash));
|
|
20233
|
+
}
|
|
20234
|
+
await Promise.all(this.slots.splice(0).map(async (slot) => {
|
|
20235
|
+
slot.disposed = true;
|
|
20236
|
+
await slot.worker.terminate();
|
|
20237
|
+
}));
|
|
20238
|
+
}
|
|
20239
|
+
drain() {
|
|
20240
|
+
if (this.disposed)
|
|
20241
|
+
return;
|
|
20242
|
+
while (this.queue.length > 0) {
|
|
20243
|
+
let slot = this.slots.find((candidate) => !candidate.busy);
|
|
20244
|
+
if (!slot && this.slots.length < DATA_TRANSFORM_LIMITS.maxConcurrent) {
|
|
20245
|
+
slot = this.createSlot();
|
|
20246
|
+
this.slots.push(slot);
|
|
20247
|
+
}
|
|
20248
|
+
if (!slot)
|
|
20249
|
+
return;
|
|
20250
|
+
const queued = this.queue.shift();
|
|
20251
|
+
if (!queued)
|
|
20252
|
+
return;
|
|
20253
|
+
if (queued.signal?.aborted) {
|
|
20254
|
+
queued.reject(queued.signal.reason ?? new Error("\u64CD\u4F5C\u5DF2\u53D6\u6D88"));
|
|
20255
|
+
continue;
|
|
20256
|
+
}
|
|
20257
|
+
slot.busy = true;
|
|
20258
|
+
void this.run(slot, queued).finally(() => {
|
|
20259
|
+
if (!slot.disposed)
|
|
20260
|
+
slot.busy = false;
|
|
20261
|
+
this.drain();
|
|
20262
|
+
});
|
|
20263
|
+
}
|
|
20264
|
+
}
|
|
20265
|
+
createSlot() {
|
|
20266
|
+
const worker = new import_node_worker_threads.Worker(this.workerUrl);
|
|
20267
|
+
const slot = {
|
|
20268
|
+
worker,
|
|
20269
|
+
busy: false,
|
|
20270
|
+
disposed: false,
|
|
20271
|
+
ready: Promise.resolve()
|
|
20272
|
+
};
|
|
20273
|
+
slot.ready = new Promise((resolve2, reject) => {
|
|
20274
|
+
const timeout = setTimeout(() => {
|
|
20275
|
+
reject(new DataTransformError("CARD_TRANSFORM_TIMEOUT", "\u6570\u636E\u8F6C\u6362\u5F15\u64CE\u521D\u59CB\u5316\u8D85\u65F6"));
|
|
20276
|
+
this.discardSlot(slot);
|
|
20277
|
+
}, DATA_TRANSFORM_LIMITS.initializationMs);
|
|
20278
|
+
worker.once("message", (message) => {
|
|
20279
|
+
if (message?.type !== "ready")
|
|
20280
|
+
return;
|
|
20281
|
+
clearTimeout(timeout);
|
|
20282
|
+
resolve2();
|
|
20283
|
+
});
|
|
20284
|
+
worker.once("error", (error2) => {
|
|
20285
|
+
clearTimeout(timeout);
|
|
20286
|
+
reject(error2);
|
|
20287
|
+
});
|
|
20288
|
+
});
|
|
20289
|
+
return slot;
|
|
20290
|
+
}
|
|
20291
|
+
async run(slot, queued) {
|
|
20292
|
+
try {
|
|
20293
|
+
await slot.ready;
|
|
20294
|
+
} catch (error2) {
|
|
20295
|
+
queued.reject(error2 instanceof DataTransformError ? error2 : new DataTransformError("CARD_TRANSFORM_FAILED", error2 instanceof Error ? error2.message : "\u6570\u636E\u8F6C\u6362\u5F15\u64CE\u521D\u59CB\u5316\u5931\u8D25", queued.sourceHash));
|
|
20296
|
+
this.discardSlot(slot);
|
|
20297
|
+
return;
|
|
20298
|
+
}
|
|
20299
|
+
if (queued.signal?.aborted) {
|
|
20300
|
+
queued.reject(queued.signal.reason ?? new Error("\u64CD\u4F5C\u5DF2\u53D6\u6D88"));
|
|
20301
|
+
return;
|
|
20302
|
+
}
|
|
20303
|
+
const requestId = this.nextRequestId++;
|
|
20304
|
+
await new Promise((resolve2) => {
|
|
20305
|
+
let settled = false;
|
|
20306
|
+
let watchdog;
|
|
20307
|
+
const finish = (callback) => {
|
|
20308
|
+
if (settled)
|
|
20309
|
+
return;
|
|
20310
|
+
settled = true;
|
|
20311
|
+
clearTimeout(watchdog);
|
|
20312
|
+
queued.signal?.removeEventListener("abort", abort2);
|
|
20313
|
+
slot.worker.off("message", onMessage2);
|
|
20314
|
+
slot.worker.off("error", onError);
|
|
20315
|
+
callback();
|
|
20316
|
+
resolve2();
|
|
20317
|
+
};
|
|
20318
|
+
const abort2 = () => {
|
|
20319
|
+
finish(() => {
|
|
20320
|
+
queued.reject(queued.signal?.reason ?? new Error("\u64CD\u4F5C\u5DF2\u53D6\u6D88"));
|
|
20321
|
+
this.discardSlot(slot);
|
|
20322
|
+
});
|
|
20323
|
+
};
|
|
20324
|
+
const onError = (error2) => {
|
|
20325
|
+
finish(() => {
|
|
20326
|
+
queued.reject(new DataTransformError("CARD_TRANSFORM_FAILED", error2.message, queued.sourceHash));
|
|
20327
|
+
this.discardSlot(slot);
|
|
20328
|
+
});
|
|
20329
|
+
};
|
|
20330
|
+
const onMessage2 = (message) => {
|
|
20331
|
+
if (message?.type !== "result" || message.requestId !== requestId)
|
|
20332
|
+
return;
|
|
20333
|
+
finish(() => this.acceptWorkerResult(queued, message));
|
|
20334
|
+
};
|
|
20335
|
+
watchdog = setTimeout(() => {
|
|
20336
|
+
finish(() => {
|
|
20337
|
+
queued.reject(new DataTransformError("CARD_TRANSFORM_TIMEOUT", "\u6570\u636E\u8F6C\u6362\u8D85\u8FC7\u5BBF\u4E3B\u6267\u884C\u671F\u9650", queued.sourceHash));
|
|
20338
|
+
this.discardSlot(slot);
|
|
20339
|
+
});
|
|
20340
|
+
}, DATA_TRANSFORM_LIMITS.watchdogMs);
|
|
20341
|
+
queued.signal?.addEventListener("abort", abort2, { once: true });
|
|
20342
|
+
slot.worker.on("message", onMessage2);
|
|
20343
|
+
slot.worker.once("error", onError);
|
|
20344
|
+
slot.worker.postMessage({
|
|
20345
|
+
type: "execute",
|
|
20346
|
+
mode: queued.mode,
|
|
20347
|
+
requestId,
|
|
20348
|
+
source: queued.source,
|
|
20349
|
+
inputJson: queued.inputJson,
|
|
20350
|
+
limits: DATA_TRANSFORM_LIMITS
|
|
20351
|
+
});
|
|
20352
|
+
});
|
|
20353
|
+
}
|
|
20354
|
+
acceptWorkerResult(queued, message) {
|
|
20355
|
+
if (!message.ok || typeof message.resultJson !== "string") {
|
|
20356
|
+
queued.reject(new DataTransformError(message.code ?? "CARD_TRANSFORM_FAILED", message.message ?? "\u6570\u636E\u8F6C\u6362\u6267\u884C\u5931\u8D25", queued.sourceHash));
|
|
20357
|
+
return;
|
|
20358
|
+
}
|
|
20359
|
+
const outputBytes = Buffer.byteLength(message.resultJson, "utf8");
|
|
20360
|
+
if (outputBytes > DATA_TRANSFORM_LIMITS.outputBytes) {
|
|
20361
|
+
queued.reject(new DataTransformError("CARD_TRANSFORM_OUTPUT_TOO_LARGE", "\u6570\u636E\u8F6C\u6362\u7ED3\u679C\u8D85\u8FC7\u5927\u5C0F\u9650\u5236", queued.sourceHash));
|
|
20362
|
+
return;
|
|
20363
|
+
}
|
|
20364
|
+
try {
|
|
20365
|
+
const data = JSON.parse(message.resultJson);
|
|
20366
|
+
if (data !== null && (typeof data !== "object" || Array.isArray(data) || jsonDepth(data) > DATA_TRANSFORM_LIMITS.maxDepth)) {
|
|
20367
|
+
throw new DataTransformError("CARD_TRANSFORM_OUTPUT_INVALID", "\u6570\u636E\u8F6C\u6362\u7ED3\u679C\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u6216 null", queued.sourceHash);
|
|
20368
|
+
}
|
|
20369
|
+
queued.resolve({
|
|
20370
|
+
data,
|
|
20371
|
+
durationMs: message.durationMs ?? 0,
|
|
20372
|
+
inputBytes: queued.inputBytes,
|
|
20373
|
+
outputBytes,
|
|
20374
|
+
sourceHash: queued.sourceHash
|
|
20375
|
+
});
|
|
20376
|
+
} catch (error2) {
|
|
20377
|
+
queued.reject(error2 instanceof DataTransformError ? error2 : new DataTransformError("CARD_TRANSFORM_OUTPUT_INVALID", "\u6570\u636E\u8F6C\u6362\u7ED3\u679C\u4E0D\u662F\u6709\u6548 JSON", queued.sourceHash));
|
|
20378
|
+
}
|
|
20379
|
+
}
|
|
20380
|
+
discardSlot(slot) {
|
|
20381
|
+
if (slot.disposed)
|
|
20382
|
+
return;
|
|
20383
|
+
slot.disposed = true;
|
|
20384
|
+
const index = this.slots.indexOf(slot);
|
|
20385
|
+
if (index >= 0)
|
|
20386
|
+
this.slots.splice(index, 1);
|
|
20387
|
+
void slot.worker.terminate();
|
|
20388
|
+
}
|
|
20389
|
+
};
|
|
20390
|
+
function defaultWorkerUrl() {
|
|
20391
|
+
if (typeof __dirname === "string") {
|
|
20392
|
+
return (0, import_node_url.pathToFileURL)((0, import_node_path11.join)(__dirname, "dataTransformWorker.js"));
|
|
20393
|
+
}
|
|
20394
|
+
const resolver = (0, import_node_module2.createRequire)((0, import_node_url.pathToFileURL)((0, import_node_path11.join)(process.cwd(), "__linkque_worker_resolver__.js")).href);
|
|
20395
|
+
const packageJson = resolver.resolve("@alipay/linkque-agent-runtime/package.json");
|
|
20396
|
+
return (0, import_node_url.pathToFileURL)((0, import_node_path11.join)((0, import_node_path11.dirname)(packageJson), "dist/esm/core/dataTransformWorker.js"));
|
|
20397
|
+
}
|
|
20398
|
+
function jsonDepth(value, depth = 0) {
|
|
20399
|
+
if (value === null || typeof value !== "object")
|
|
20400
|
+
return depth;
|
|
20401
|
+
if (depth > DATA_TRANSFORM_LIMITS.maxDepth)
|
|
20402
|
+
return depth;
|
|
20403
|
+
const children = Array.isArray(value) ? value : Object.values(value);
|
|
20404
|
+
return children.reduce((maximum, child) => Math.max(maximum, jsonDepth(child, depth + 1)), depth);
|
|
20405
|
+
}
|
|
20406
|
+
|
|
19987
20407
|
// ../linkque-agent-runtime/dist/esm/core/types.js
|
|
19988
20408
|
var EDebugLogScope;
|
|
19989
20409
|
(function(EDebugLogScope2) {
|
|
@@ -20046,6 +20466,7 @@ var EHookExecutorName;
|
|
|
20046
20466
|
EHookExecutorName2["LinkquegwEventHookExecutor"] = "LinkquegwEventHookExecutor";
|
|
20047
20467
|
EHookExecutorName2["SecurityAnswerHookExecutor"] = "SecurityAnswerHookExecutor";
|
|
20048
20468
|
EHookExecutorName2["ImageUnderstandingHookExecutor"] = "ImageUnderstandingHookExecutor";
|
|
20469
|
+
EHookExecutorName2["McpDiscoveryHookExecutor"] = "McpDiscoveryHookExecutor";
|
|
20049
20470
|
})(EHookExecutorName || (EHookExecutorName = {}));
|
|
20050
20471
|
|
|
20051
20472
|
// ../agent-a2ui-card-contract/dist/esm/protocol.js
|
|
@@ -20057,6 +20478,9 @@ var A2UI_CARD_TRANSFORM_PROFILE = "linkque-structural-v1";
|
|
|
20057
20478
|
var A2UI_CARD_EXPRESSION_MAX_LENGTH = 4096;
|
|
20058
20479
|
var A2UI_CARD_EXPRESSION_MAX_AST_NODES = 512;
|
|
20059
20480
|
var A2UI_CARD_EXPRESSION_MAX_AST_DEPTH = 32;
|
|
20481
|
+
var A2UI_CARD_DATA_TRANSFORM_LANGUAGE = "javascript";
|
|
20482
|
+
var A2UI_CARD_DATA_TRANSFORM_PROFILE = "linkque-card-data-transform-v1";
|
|
20483
|
+
var A2UI_CARD_DATA_TRANSFORM_MAX_SOURCE_BYTES = 32 * 1024;
|
|
20060
20484
|
|
|
20061
20485
|
// ../linkque-agent-data-binding-contract/dist/esm/json.js
|
|
20062
20486
|
var BLOCKED_PATH_SEGMENTS = /* @__PURE__ */ new Set([
|
|
@@ -20223,8 +20647,8 @@ function analyzeA2UIBindings(protocol) {
|
|
|
20223
20647
|
visitValue(component, "", context);
|
|
20224
20648
|
const children = component.children;
|
|
20225
20649
|
if (isPlainRecord(children) && typeof children.path === "string") {
|
|
20226
|
-
const canonicalPath = canonicalizeBindingPath(children.path);
|
|
20227
|
-
if (!canonicalPath || !isSafeJsonPointer(canonicalPath)) {
|
|
20650
|
+
const canonicalPath = canonicalizeBindingPath(children.path, context.listRoot);
|
|
20651
|
+
if (!canonicalPath || !isSafeJsonPointer(canonicalPath, true)) {
|
|
20228
20652
|
issues.push(issue2(`card.surfaces.${surfaceId}.components.${component.id}.children.path`, "INVALID_BINDING_PATH", `Invalid list path ${children.path}`));
|
|
20229
20653
|
} else {
|
|
20230
20654
|
occurrences.push({
|
|
@@ -20234,6 +20658,7 @@ function analyzeA2UIBindings(protocol) {
|
|
|
20234
20658
|
propertyPath: "children.path",
|
|
20235
20659
|
rawPath: children.path,
|
|
20236
20660
|
canonicalPath,
|
|
20661
|
+
...context.listRoot ? { listRoot: context.listRoot } : {},
|
|
20237
20662
|
usage: "list"
|
|
20238
20663
|
});
|
|
20239
20664
|
}
|
|
@@ -20298,6 +20723,7 @@ function addOccurrence(rawPath, propertyPath, usage, context) {
|
|
|
20298
20723
|
propertyPath,
|
|
20299
20724
|
rawPath,
|
|
20300
20725
|
canonicalPath,
|
|
20726
|
+
...context.listRoot ? { listRoot: context.listRoot } : {},
|
|
20301
20727
|
usage
|
|
20302
20728
|
});
|
|
20303
20729
|
}
|
|
@@ -20408,6 +20834,33 @@ function validateJsonSchemaValue2(schema, value, path24 = "$") {
|
|
|
20408
20834
|
validateValue(schema, value, path24, issues);
|
|
20409
20835
|
return issues;
|
|
20410
20836
|
}
|
|
20837
|
+
function normalizeCardDataValue(schema, value, required2 = true) {
|
|
20838
|
+
if (value === void 0 || value === null)
|
|
20839
|
+
return required2 ? value : void 0;
|
|
20840
|
+
let normalized = value;
|
|
20841
|
+
if (schema.type === "string" && (typeof value === "boolean" || typeof value === "number" && Number.isFinite(value))) {
|
|
20842
|
+
normalized = String(value);
|
|
20843
|
+
} else if ((schema.type === "number" || schema.type === "integer") && typeof value === "string") {
|
|
20844
|
+
const text = value.trim();
|
|
20845
|
+
if (/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/u.test(text)) {
|
|
20846
|
+
const number4 = Number(text);
|
|
20847
|
+
if (Number.isFinite(number4) && (schema.type !== "integer" || Number.isSafeInteger(number4))) {
|
|
20848
|
+
normalized = number4;
|
|
20849
|
+
}
|
|
20850
|
+
}
|
|
20851
|
+
} else if (schema.type === "object" && isPlainRecord(value)) {
|
|
20852
|
+
const properties = isPlainRecord(schema.properties) ? schema.properties : {};
|
|
20853
|
+
const requiredKeys = new Set(Array.isArray(schema.required) ? schema.required : []);
|
|
20854
|
+
normalized = Object.fromEntries(Object.entries(value).flatMap(([key, child]) => {
|
|
20855
|
+
const childSchema = properties[key];
|
|
20856
|
+
const next = isPlainRecord(childSchema) ? normalizeCardDataValue(childSchema, child, requiredKeys.has(key)) : child;
|
|
20857
|
+
return next === void 0 ? [] : [[key, next]];
|
|
20858
|
+
}));
|
|
20859
|
+
} else if (schema.type === "array" && Array.isArray(value) && isPlainRecord(schema.items)) {
|
|
20860
|
+
normalized = value.map((child) => normalizeCardDataValue(schema.items, child));
|
|
20861
|
+
}
|
|
20862
|
+
return !required2 && validateJsonSchemaValue2(schema, normalized).length > 0 ? void 0 : normalized;
|
|
20863
|
+
}
|
|
20411
20864
|
function generateJsonSchemaSample(schema) {
|
|
20412
20865
|
const defaultValue = cloneJsonValue(schema.default);
|
|
20413
20866
|
if (defaultValue !== void 0)
|
|
@@ -21318,7 +21771,8 @@ var decoration = {
|
|
|
21318
21771
|
"primary",
|
|
21319
21772
|
"primary-muted",
|
|
21320
21773
|
"accent",
|
|
21321
|
-
"warning"
|
|
21774
|
+
"warning",
|
|
21775
|
+
"transparent"
|
|
21322
21776
|
]
|
|
21323
21777
|
},
|
|
21324
21778
|
border: {
|
|
@@ -21330,6 +21784,7 @@ var decoration = {
|
|
|
21330
21784
|
var typography = {
|
|
21331
21785
|
color: { kind: "string", values: colors },
|
|
21332
21786
|
fontSize: { kind: "string", values: ["xs", "sm", "md", "lg", "xl", "xxl"] },
|
|
21787
|
+
fontFamily: { kind: "string", values: ["digit", "digit-bold"] },
|
|
21333
21788
|
fontWeight: { kind: "string", values: ["normal", "semibold", "bold"] }
|
|
21334
21789
|
};
|
|
21335
21790
|
var container = {
|
|
@@ -21366,6 +21821,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
|
|
|
21366
21821
|
...layoutItem,
|
|
21367
21822
|
...containerSize,
|
|
21368
21823
|
...decoration,
|
|
21824
|
+
verticalAlign: { kind: "string", values: ["top", "center", "bottom"] },
|
|
21369
21825
|
child: { kind: "child", required: true },
|
|
21370
21826
|
action: { kind: "action" },
|
|
21371
21827
|
disabled: { kind: "boolean" }
|
|
@@ -21400,8 +21856,8 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
|
|
|
21400
21856
|
shrink: { kind: "boolean" },
|
|
21401
21857
|
text: { kind: "binding", required: true },
|
|
21402
21858
|
maxLines: { kind: "number", values: [0, 1, 2, 3, 4, 5, 6] },
|
|
21403
|
-
|
|
21404
|
-
|
|
21859
|
+
textAlign: { kind: "string", values: ["left", "center", "right"] },
|
|
21860
|
+
decoration: { kind: "string", values: ["line-through"] }
|
|
21405
21861
|
}
|
|
21406
21862
|
},
|
|
21407
21863
|
Tag: {
|
|
@@ -21410,6 +21866,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
|
|
|
21410
21866
|
...layoutItem,
|
|
21411
21867
|
text: { kind: "binding", required: true },
|
|
21412
21868
|
icon: { kind: "string", values: iconNames },
|
|
21869
|
+
image: { kind: "binding" },
|
|
21413
21870
|
tone: {
|
|
21414
21871
|
kind: "string",
|
|
21415
21872
|
values: [
|
|
@@ -21465,7 +21922,20 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
|
|
|
21465
21922
|
height: { kind: "string", values: ["auto", "fill"] },
|
|
21466
21923
|
size: {
|
|
21467
21924
|
kind: "string",
|
|
21468
|
-
values: [
|
|
21925
|
+
values: [
|
|
21926
|
+
"xs",
|
|
21927
|
+
"sm",
|
|
21928
|
+
"md",
|
|
21929
|
+
"lg",
|
|
21930
|
+
"xl",
|
|
21931
|
+
"full",
|
|
21932
|
+
"text-xs",
|
|
21933
|
+
"text-sm",
|
|
21934
|
+
"text-md",
|
|
21935
|
+
"text-lg",
|
|
21936
|
+
"text-xl",
|
|
21937
|
+
"text-xxl"
|
|
21938
|
+
]
|
|
21469
21939
|
}
|
|
21470
21940
|
}
|
|
21471
21941
|
},
|
|
@@ -21509,7 +21979,6 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
|
|
|
21509
21979
|
"x2-funds"
|
|
21510
21980
|
]
|
|
21511
21981
|
},
|
|
21512
|
-
format: { kind: "string", values: ["date"] },
|
|
21513
21982
|
validationRegexp: { kind: "string" },
|
|
21514
21983
|
"x2-limit": { kind: "number" }
|
|
21515
21984
|
}
|
|
@@ -21620,14 +22089,6 @@ function validateV4Component(component, componentPath, issues) {
|
|
|
21620
22089
|
issues.push(issue2(`${componentPath}.component`, "UNSUPPORTED_COMPONENT", `V4 does not support component ${component.component}`));
|
|
21621
22090
|
return;
|
|
21622
22091
|
}
|
|
21623
|
-
const allowed = /* @__PURE__ */ new Set([
|
|
21624
|
-
"id",
|
|
21625
|
-
"component",
|
|
21626
|
-
...Object.keys(schema.properties)
|
|
21627
|
-
]);
|
|
21628
|
-
for (const key of Object.keys(component))
|
|
21629
|
-
if (!allowed.has(key))
|
|
21630
|
-
issues.push(issue2(`${componentPath}.${key}`, "UNSUPPORTED_COMPONENT_PROP", `${component.component} does not support property ${key}`));
|
|
21631
22092
|
for (const [name, property] of Object.entries(schema.properties)) {
|
|
21632
22093
|
const value = component[name];
|
|
21633
22094
|
if (property.required && value === void 0)
|
|
@@ -21657,8 +22118,8 @@ function validateV4Component(component, componentPath, issues) {
|
|
|
21657
22118
|
}
|
|
21658
22119
|
if (component.checks !== void 0)
|
|
21659
22120
|
validateChecks(component.checks, `${componentPath}.checks`, issues);
|
|
21660
|
-
if (component.
|
|
21661
|
-
|
|
22121
|
+
if (component.component === "Tag" && component.icon !== void 0 && component.image !== void 0)
|
|
22122
|
+
issues.push(issue2(componentPath, "INVALID_COMPONENT_PROP_VALUE", "Tag icon and image cannot be used together"));
|
|
21662
22123
|
if (component.action !== void 0)
|
|
21663
22124
|
validateAction(component.action, `${componentPath}.action`, issues, 0);
|
|
21664
22125
|
}
|
|
@@ -21683,7 +22144,7 @@ function validateComponents(payload, path24, surfaces, issues) {
|
|
|
21683
22144
|
}
|
|
21684
22145
|
function validateProperty(value, schema, path24, issues, propertyName) {
|
|
21685
22146
|
if (schema.kind === "binding") {
|
|
21686
|
-
const stringOnly = propertyName === "label" || propertyName === "src" || propertyName === "alt";
|
|
22147
|
+
const stringOnly = propertyName === "label" || propertyName === "src" || propertyName === "alt" || propertyName === "image";
|
|
21687
22148
|
const literalValid = typeof value === "string" || !stringOnly && typeof value === "number" && Number.isFinite(value);
|
|
21688
22149
|
if (!literalValid && !isDisplayBinding(value, stringOnly))
|
|
21689
22150
|
issues.push(issue2(path24, "INVALID_DISPLAY_VALUE", `display value must be ${stringOnly ? "a string" : "a string or finite number"}, or a compatible display binding`));
|
|
@@ -21706,10 +22167,10 @@ function validateProperty(value, schema, path24, issues, propertyName) {
|
|
|
21706
22167
|
return;
|
|
21707
22168
|
if (schema.kind === "boolean" && typeof value !== "boolean")
|
|
21708
22169
|
issues.push(issue2(path24, "INVALID_COMPONENT_PROP_TYPE", "value must be boolean"));
|
|
21709
|
-
if (schema.kind === "number" &&
|
|
21710
|
-
issues.push(issue2(path24, "INVALID_COMPONENT_PROP_VALUE", "value
|
|
21711
|
-
if (schema.kind === "string" &&
|
|
21712
|
-
issues.push(issue2(path24, "INVALID_COMPONENT_PROP_VALUE", "value
|
|
22170
|
+
if (schema.kind === "number" && !Number.isFinite(value))
|
|
22171
|
+
issues.push(issue2(path24, "INVALID_COMPONENT_PROP_VALUE", "value must be a finite number"));
|
|
22172
|
+
if (schema.kind === "string" && typeof value !== "string")
|
|
22173
|
+
issues.push(issue2(path24, "INVALID_COMPONENT_PROP_VALUE", "value must be a string"));
|
|
21713
22174
|
}
|
|
21714
22175
|
function isDisplayBinding(value, stringOnly = false) {
|
|
21715
22176
|
if (!isPlainRecord(value) || typeof value.path !== "string" || !isSafePath(value.path))
|
|
@@ -21801,51 +22262,8 @@ function validateClientAction(body, path24, issues) {
|
|
|
21801
22262
|
issues.push(issue2(`${path24}.context.url`, "INVALID_PAGE_URL", "ui.page.open URL must use https or the approved Alipay scheme"));
|
|
21802
22263
|
return;
|
|
21803
22264
|
}
|
|
21804
|
-
if (body.name === "payment.trade-pay") {
|
|
21805
|
-
validatePaymentActionContext(body.context, `${path24}.context`, issues);
|
|
21806
|
-
return;
|
|
21807
|
-
}
|
|
21808
22265
|
issues.push(issue2(`${path24}.name`, "UNSUPPORTED_CLIENT_ACTION", `unsupported client action ${String(body.name)}`));
|
|
21809
22266
|
}
|
|
21810
|
-
function validatePaymentActionContext(value, path24, issues) {
|
|
21811
|
-
if (!isPlainRecord(value)) {
|
|
21812
|
-
issues.push(issue2(path24, "INVALID_CLIENT_ACTION_CONTEXT", "payment.trade-pay requires createTrade and onSuccess"));
|
|
21813
|
-
return;
|
|
21814
|
-
}
|
|
21815
|
-
rejectUnknownKeys(value, ["createTrade", "onSuccess"], path24, issues);
|
|
21816
|
-
const createTrade = isPlainRecord(value.createTrade) ? value.createTrade : void 0;
|
|
21817
|
-
if (!createTrade) {
|
|
21818
|
-
issues.push(issue2(`${path24}.createTrade`, "INVALID_PAYMENT_CREATE_TRADE", "createTrade must be an object"));
|
|
21819
|
-
} else {
|
|
21820
|
-
rejectUnknownKeys(createTrade, ["mcpResourceId", "toolName", "input", "tradeNoPath"], `${path24}.createTrade`, issues);
|
|
21821
|
-
if (!isSafeIdentifier(createTrade.mcpResourceId))
|
|
21822
|
-
issues.push(issue2(`${path24}.createTrade.mcpResourceId`, "INVALID_MCP_RESOURCE_ID", "mcpResourceId is invalid"));
|
|
21823
|
-
if (typeof createTrade.toolName !== "string" || !createTrade.toolName.trim())
|
|
21824
|
-
issues.push(issue2(`${path24}.createTrade.toolName`, "INVALID_TOOL_NAME", "toolName is required"));
|
|
21825
|
-
if (!isPlainRecord(createTrade.input))
|
|
21826
|
-
issues.push(issue2(`${path24}.createTrade.input`, "INVALID_PAYMENT_INPUT", "input must be an object"));
|
|
21827
|
-
else
|
|
21828
|
-
validateActionDynamicValue(createTrade.input, `${path24}.createTrade.input`, issues);
|
|
21829
|
-
if (!isSafeJsonPointer(createTrade.tradeNoPath))
|
|
21830
|
-
issues.push(issue2(`${path24}.createTrade.tradeNoPath`, "INVALID_TRADE_NO_PATH", "tradeNoPath must be an absolute JSON Pointer"));
|
|
21831
|
-
}
|
|
21832
|
-
const onSuccess = isPlainRecord(value.onSuccess) ? value.onSuccess : void 0;
|
|
21833
|
-
const event = onSuccess && isPlainRecord(onSuccess.event) ? onSuccess.event : void 0;
|
|
21834
|
-
if (!onSuccess || !event) {
|
|
21835
|
-
issues.push(issue2(`${path24}.onSuccess`, "INVALID_PAYMENT_SUCCESS_EVENT", "onSuccess.event is required"));
|
|
21836
|
-
return;
|
|
21837
|
-
}
|
|
21838
|
-
rejectUnknownKeys(onSuccess, ["event"], `${path24}.onSuccess`, issues);
|
|
21839
|
-
rejectUnknownKeys(event, ["name", "context", "x2-user-message"], `${path24}.onSuccess.event`, issues);
|
|
21840
|
-
if (typeof event.name !== "string" || !/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/.test(event.name) || event.name.length > 96)
|
|
21841
|
-
issues.push(issue2(`${path24}.onSuccess.event.name`, "INVALID_ACTION_NAME", "event name is invalid"));
|
|
21842
|
-
if (event.context !== void 0 && !isPlainRecord(event.context))
|
|
21843
|
-
issues.push(issue2(`${path24}.onSuccess.event.context`, "INVALID_ACTION_CONTEXT", "event context must be an object"));
|
|
21844
|
-
else if (event.context !== void 0)
|
|
21845
|
-
validateActionDynamicValue(event.context, `${path24}.onSuccess.event.context`, issues);
|
|
21846
|
-
if (typeof event["x2-user-message"] !== "string" || !event["x2-user-message"].trim())
|
|
21847
|
-
issues.push(issue2(`${path24}.onSuccess.event.x2-user-message`, "INVALID_ACTION_CONTEXT", "x2-user-message must be a non-empty string"));
|
|
21848
|
-
}
|
|
21849
22267
|
function validateActionDynamicValue(value, path24, issues) {
|
|
21850
22268
|
if (Array.isArray(value)) {
|
|
21851
22269
|
value.forEach((entry, index) => validateActionDynamicValue(entry, `${path24}[${index}]`, issues));
|
|
@@ -21890,7 +22308,7 @@ function validateTextField(component, path24, issues) {
|
|
|
21890
22308
|
issues.push(issue2(`${path24}.validationRegexp`, "INVALID_VALIDATION_REGEXP", "validationRegexp is too long"));
|
|
21891
22309
|
else
|
|
21892
22310
|
try {
|
|
21893
|
-
|
|
22311
|
+
RegExp(component.validationRegexp);
|
|
21894
22312
|
} catch {
|
|
21895
22313
|
issues.push(issue2(`${path24}.validationRegexp`, "INVALID_VALIDATION_REGEXP", "validationRegexp is invalid"));
|
|
21896
22314
|
}
|
|
@@ -21941,26 +22359,6 @@ function validateOverflow(component, path24, issues) {
|
|
|
21941
22359
|
}
|
|
21942
22360
|
}
|
|
21943
22361
|
}
|
|
21944
|
-
function validateNumberFormat(value, path24, issues) {
|
|
21945
|
-
if (!isPlainRecord(value))
|
|
21946
|
-
return void issues.push(issue2(path24, "INVALID_NUMBER_FORMAT", "format must be an object"));
|
|
21947
|
-
rejectUnknownKeys(value, [
|
|
21948
|
-
"type",
|
|
21949
|
-
"style",
|
|
21950
|
-
"currency",
|
|
21951
|
-
"locale",
|
|
21952
|
-
"minimumFractionDigits",
|
|
21953
|
-
"maximumFractionDigits",
|
|
21954
|
-
"useGrouping",
|
|
21955
|
-
"prefix",
|
|
21956
|
-
"suffix"
|
|
21957
|
-
], path24, issues);
|
|
21958
|
-
const style = value.style ?? "decimal";
|
|
21959
|
-
const digit = (entry) => entry === void 0 || Number.isInteger(entry) && Number(entry) >= 0 && Number(entry) <= 20;
|
|
21960
|
-
if (value.type !== "number" || !["decimal", "currency", "percent"].includes(String(style)) || style === "currency" && (typeof value.currency !== "string" || !/^[A-Z]{3}$/u.test(value.currency)) || value.locale !== void 0 && typeof value.locale !== "string" || !digit(value.minimumFractionDigits) || !digit(value.maximumFractionDigits) || Number.isInteger(value.minimumFractionDigits) && Number.isInteger(value.maximumFractionDigits) && Number(value.minimumFractionDigits) > Number(value.maximumFractionDigits) || value.useGrouping !== void 0 && typeof value.useGrouping !== "boolean" || value.prefix !== void 0 && (typeof value.prefix !== "string" || value.prefix.length > 32) || value.suffix !== void 0 && (typeof value.suffix !== "string" || value.suffix.length > 32)) {
|
|
21961
|
-
issues.push(issue2(path24, "INVALID_NUMBER_FORMAT", "number format options are invalid"));
|
|
21962
|
-
}
|
|
21963
|
-
}
|
|
21964
22362
|
function rejectUnknownKeys(value, allowed, path24, issues) {
|
|
21965
22363
|
const allowedKeys = new Set(allowed);
|
|
21966
22364
|
Object.keys(value).forEach((key) => {
|
|
@@ -22050,20 +22448,20 @@ function hasInteractiveDescendant(id, components, visited) {
|
|
|
22050
22448
|
}
|
|
22051
22449
|
|
|
22052
22450
|
// ../agent-a2ui-card-contract/dist/esm/validation.js
|
|
22053
|
-
var FIELD_TYPES = [
|
|
22451
|
+
var FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
22054
22452
|
"array",
|
|
22055
22453
|
"boolean",
|
|
22056
22454
|
"integer",
|
|
22057
22455
|
"number",
|
|
22058
22456
|
"object",
|
|
22059
22457
|
"string"
|
|
22060
|
-
];
|
|
22061
|
-
var FIELD_SOURCES = [
|
|
22458
|
+
]);
|
|
22459
|
+
var FIELD_SOURCES = /* @__PURE__ */ new Set([
|
|
22062
22460
|
"business",
|
|
22063
22461
|
"invocation",
|
|
22064
22462
|
"runtime-context",
|
|
22065
22463
|
"local"
|
|
22066
|
-
];
|
|
22464
|
+
]);
|
|
22067
22465
|
var RUNTIME_CONTEXT_KEYS2 = /* @__PURE__ */ new Set([
|
|
22068
22466
|
"agentId",
|
|
22069
22467
|
"tenantId",
|
|
@@ -22098,7 +22496,7 @@ function getA2UICardDraftBundleIssues(value) {
|
|
|
22098
22496
|
if (manifest?.schemaVersion === "4") {
|
|
22099
22497
|
issues.push(...getA2UIV4ProtocolIssues(card, "draft.card"));
|
|
22100
22498
|
issues.push(...getPersistedV4ProtocolIssues(card, "draft.card"));
|
|
22101
|
-
validateV4BindingContracts(card, analysis.occurrences, manifest.fields, "draft.card", issues);
|
|
22499
|
+
validateV4BindingContracts(card, analysis.occurrences, manifest.fields, "draft.card", issues, manifest.dataMode === "pipeline" ? manifest.dataModelSchema : void 0);
|
|
22102
22500
|
}
|
|
22103
22501
|
}
|
|
22104
22502
|
return issues;
|
|
@@ -22140,17 +22538,17 @@ function validateV4Fixture(value, fields, path24, issues) {
|
|
|
22140
22538
|
issues.push(...validateJsonSchemaValue2(field.valueSchema, resolved.value, `${path24}${field.path}`));
|
|
22141
22539
|
}
|
|
22142
22540
|
}
|
|
22143
|
-
function validateV4BindingContracts(card, occurrences, fields, path24, issues) {
|
|
22541
|
+
function validateV4BindingContracts(card, occurrences, fields, path24, issues, dataModelSchema) {
|
|
22144
22542
|
const ordered = fields.slice().sort((left, right) => right.path.length - left.path.length);
|
|
22145
22543
|
for (const occurrence of occurrences) {
|
|
22146
22544
|
const field = ordered.find((candidate) => occurrence.canonicalPath === candidate.path || occurrence.canonicalPath.startsWith(`${candidate.path}/*/`) || occurrence.canonicalPath.startsWith(`${candidate.path}/`));
|
|
22147
22545
|
const issuePath = `${path24}.surfaces.${occurrence.surfaceId ?? "unknown"}.components.${occurrence.componentId}.${occurrence.propertyPath}`;
|
|
22148
|
-
if (!field) {
|
|
22546
|
+
if (!field && !dataModelSchema) {
|
|
22149
22547
|
issues.push(issue2(issuePath, "UNDECLARED_BINDING_PATH", `binding path ${occurrence.rawPath} is not declared by a manifest field`));
|
|
22150
22548
|
continue;
|
|
22151
22549
|
}
|
|
22152
|
-
const suffix = occurrence.canonicalPath.slice(field
|
|
22153
|
-
const schema = suffix ? getJsonSchemaAtDataPointer(field.valueSchema, suffix) : field.valueSchema;
|
|
22550
|
+
const suffix = occurrence.canonicalPath.slice(field?.path.length ?? 0).replace(/^\/\*\//u, "/");
|
|
22551
|
+
const schema = dataModelSchema ? getJsonSchemaAtDataPointer(dataModelSchema, occurrence.canonicalPath) : field && (suffix ? getJsonSchemaAtDataPointer(field.valueSchema, suffix) : field.valueSchema);
|
|
22154
22552
|
const component = findV4Component(card, occurrence.surfaceId, occurrence.componentId);
|
|
22155
22553
|
const allowedTypes = expectedBindingTypes(occurrence, component);
|
|
22156
22554
|
if (allowedTypes && (!schema || typeof schema.type !== "string" || !allowedTypes.has(schema.type))) {
|
|
@@ -22221,6 +22619,9 @@ function getA2UICardResourceConfigIssues(value) {
|
|
|
22221
22619
|
];
|
|
22222
22620
|
}
|
|
22223
22621
|
const issues = [];
|
|
22622
|
+
if (value.schemaVersion === "4" && value.dataMode === "pipeline") {
|
|
22623
|
+
return getA2UICardResourceConfigV4PipelineIssues(value);
|
|
22624
|
+
}
|
|
22224
22625
|
if (value.schemaVersion === "3" || value.schemaVersion === "4") {
|
|
22225
22626
|
return getA2UICardResourceConfigV3Issues(value);
|
|
22226
22627
|
}
|
|
@@ -22255,6 +22656,50 @@ function getA2UICardResourceConfigIssues(value) {
|
|
|
22255
22656
|
validateResolverCoverage(fields, resolver, issues, card);
|
|
22256
22657
|
return issues;
|
|
22257
22658
|
}
|
|
22659
|
+
function getA2UICardResourceConfigV4PipelineIssues(value) {
|
|
22660
|
+
const issues = [];
|
|
22661
|
+
exactKeys(value, [
|
|
22662
|
+
"schemaVersion",
|
|
22663
|
+
"dataMode",
|
|
22664
|
+
"revision",
|
|
22665
|
+
"displayName",
|
|
22666
|
+
"description",
|
|
22667
|
+
"whenToUse",
|
|
22668
|
+
"whenNotToUse",
|
|
22669
|
+
"presentationInputSchema",
|
|
22670
|
+
"fields",
|
|
22671
|
+
"dataSources",
|
|
22672
|
+
"dataTransform",
|
|
22673
|
+
"dataModelSchema",
|
|
22674
|
+
"a2uiTemplate"
|
|
22675
|
+
], "config", issues);
|
|
22676
|
+
if (value.schemaVersion !== "4" || value.dataMode !== "pipeline") {
|
|
22677
|
+
issues.push(issue2("config.dataMode", "INVALID_DATA_MODE", "pipeline cards require schemaVersion 4 and dataMode pipeline"));
|
|
22678
|
+
}
|
|
22679
|
+
if (!isSafeIdentifier(value.revision)) {
|
|
22680
|
+
issues.push(issue2("config.revision", "INVALID_CARD_REVISION", "revision must be a stable safe identifier"));
|
|
22681
|
+
}
|
|
22682
|
+
requiredString(value.displayName, "config.displayName", issues);
|
|
22683
|
+
requiredString(value.description, "config.description", issues);
|
|
22684
|
+
requiredString(value.whenToUse, "config.whenToUse", issues);
|
|
22685
|
+
optionalString(value.whenNotToUse, "config.whenNotToUse", issues);
|
|
22686
|
+
validateLooseJsonSchema(value.presentationInputSchema, "config.presentationInputSchema", issues);
|
|
22687
|
+
const fields = validateFields(value.fields, "config.fields", issues);
|
|
22688
|
+
validatePipelineDataSources(value.dataSources, "config.dataSources", issues);
|
|
22689
|
+
validateDataTransform(value.dataTransform, "config.dataTransform", issues);
|
|
22690
|
+
const dataModelSchema = validateLooseJsonSchema(value.dataModelSchema, "config.dataModelSchema", issues);
|
|
22691
|
+
const card = validateTemplate(value.a2uiTemplate, fields, issues);
|
|
22692
|
+
if (card) {
|
|
22693
|
+
issues.push(...getA2UIV4ProtocolIssues(card, "config.a2uiTemplate.content"), ...getPersistedV4ProtocolIssues(card, "config.a2uiTemplate.content"));
|
|
22694
|
+
}
|
|
22695
|
+
if (fields && dataModelSchema) {
|
|
22696
|
+
validatePipelineFieldSchemas(fields, value.dataModelSchema, issues);
|
|
22697
|
+
}
|
|
22698
|
+
if (dataModelSchema && isPlainRecord(value.a2uiTemplate) && stableJsonStringify(value.a2uiTemplate.argsSchema) !== stableJsonStringify(value.dataModelSchema)) {
|
|
22699
|
+
issues.push(issue2("config.a2uiTemplate.argsSchema", "DATA_MODEL_SCHEMA_MISMATCH", "a2uiTemplate.argsSchema must equal dataModelSchema"));
|
|
22700
|
+
}
|
|
22701
|
+
return issues;
|
|
22702
|
+
}
|
|
22258
22703
|
function getA2UICardResourceConfigV3Issues(value) {
|
|
22259
22704
|
const issues = [];
|
|
22260
22705
|
if (value.actionBindings !== void 0) {
|
|
@@ -22366,6 +22811,87 @@ function validateDataSources(value, path24, issues, options = {}) {
|
|
|
22366
22811
|
}
|
|
22367
22812
|
return value;
|
|
22368
22813
|
}
|
|
22814
|
+
function validatePipelineDataSources(value, path24, issues) {
|
|
22815
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
22816
|
+
issues.push(issue2(path24, "INVALID_DATA_SOURCES", "pipeline dataSources must be a non-empty array"));
|
|
22817
|
+
return void 0;
|
|
22818
|
+
}
|
|
22819
|
+
const ids = /* @__PURE__ */ new Set();
|
|
22820
|
+
value.forEach((candidate, index) => {
|
|
22821
|
+
const itemPath = `${path24}[${index}]`;
|
|
22822
|
+
if (!isPlainRecord(candidate)) {
|
|
22823
|
+
issues.push(issue2(itemPath, "INVALID_DATA_SOURCE", "data source must be an object"));
|
|
22824
|
+
return;
|
|
22825
|
+
}
|
|
22826
|
+
exactKeys(candidate, [
|
|
22827
|
+
"sourceId",
|
|
22828
|
+
"mcpResourceId",
|
|
22829
|
+
"toolName",
|
|
22830
|
+
"purpose",
|
|
22831
|
+
"fixedInput",
|
|
22832
|
+
"inputBindings",
|
|
22833
|
+
"inputSchema",
|
|
22834
|
+
"outputSchema"
|
|
22835
|
+
], itemPath, issues);
|
|
22836
|
+
if (!isSafeIdentifier(candidate.sourceId)) {
|
|
22837
|
+
issues.push(issue2(`${itemPath}.sourceId`, "INVALID_SOURCE_ID", "sourceId is invalid"));
|
|
22838
|
+
} else if (ids.has(candidate.sourceId)) {
|
|
22839
|
+
issues.push(issue2(`${itemPath}.sourceId`, "DUPLICATE_SOURCE_ID", `sourceId ${candidate.sourceId} is duplicated`));
|
|
22840
|
+
} else {
|
|
22841
|
+
ids.add(candidate.sourceId);
|
|
22842
|
+
}
|
|
22843
|
+
if (!isSafeIdentifier(candidate.mcpResourceId)) {
|
|
22844
|
+
issues.push(issue2(`${itemPath}.mcpResourceId`, "INVALID_MCP_RESOURCE_ID", "mcpResourceId is invalid"));
|
|
22845
|
+
}
|
|
22846
|
+
requiredString(candidate.toolName, `${itemPath}.toolName`, issues);
|
|
22847
|
+
requiredString(candidate.purpose, `${itemPath}.purpose`, issues);
|
|
22848
|
+
if (!isPlainRecord(candidate.fixedInput) || !isJsonValue(candidate.fixedInput)) {
|
|
22849
|
+
issues.push(issue2(`${itemPath}.fixedInput`, "INVALID_FIXED_INPUT", "fixedInput must be a JSON object"));
|
|
22850
|
+
}
|
|
22851
|
+
const inputBindings = validateInputBindings2(candidate.inputBindings, `${itemPath}.inputBindings`, issues);
|
|
22852
|
+
if (isPlainRecord(candidate.fixedInput) && inputBindings) {
|
|
22853
|
+
for (let bindingIndex = 0; bindingIndex < inputBindings.length; bindingIndex += 1) {
|
|
22854
|
+
const binding = inputBindings[bindingIndex];
|
|
22855
|
+
if (hasOverlappingJsonPointer(candidate.fixedInput, binding.inputPath)) {
|
|
22856
|
+
issues.push(issue2(`${itemPath}.inputBindings[${bindingIndex}].inputPath`, "FIXED_INPUT_OVERRIDE", `dynamic input ${binding.inputPath} overlaps a fixed input and cannot override it`));
|
|
22857
|
+
}
|
|
22858
|
+
}
|
|
22859
|
+
}
|
|
22860
|
+
validateLooseJsonSchema(candidate.inputSchema, `${itemPath}.inputSchema`, issues);
|
|
22861
|
+
validateLooseJsonSchema(candidate.outputSchema, `${itemPath}.outputSchema`, issues);
|
|
22862
|
+
});
|
|
22863
|
+
return value;
|
|
22864
|
+
}
|
|
22865
|
+
function validateDataTransform(value, path24, issues) {
|
|
22866
|
+
if (!isPlainRecord(value)) {
|
|
22867
|
+
issues.push(issue2(path24, "INVALID_DATA_TRANSFORM", "dataTransform must be an object"));
|
|
22868
|
+
return;
|
|
22869
|
+
}
|
|
22870
|
+
exactKeys(value, ["language", "profile", "source"], path24, issues);
|
|
22871
|
+
if (value.language !== A2UI_CARD_DATA_TRANSFORM_LANGUAGE) {
|
|
22872
|
+
issues.push(issue2(`${path24}.language`, "INVALID_DATA_TRANSFORM_LANGUAGE", `language must be ${A2UI_CARD_DATA_TRANSFORM_LANGUAGE}`));
|
|
22873
|
+
}
|
|
22874
|
+
if (value.profile !== A2UI_CARD_DATA_TRANSFORM_PROFILE) {
|
|
22875
|
+
issues.push(issue2(`${path24}.profile`, "INVALID_DATA_TRANSFORM_PROFILE", `profile must be ${A2UI_CARD_DATA_TRANSFORM_PROFILE}`));
|
|
22876
|
+
}
|
|
22877
|
+
if (typeof value.source !== "string" || value.source.trim().length === 0) {
|
|
22878
|
+
issues.push(issue2(`${path24}.source`, "INVALID_DATA_TRANSFORM_SOURCE", "source must be a non-empty string"));
|
|
22879
|
+
} else if (new TextEncoder().encode(value.source).byteLength > A2UI_CARD_DATA_TRANSFORM_MAX_SOURCE_BYTES) {
|
|
22880
|
+
issues.push(issue2(`${path24}.source`, "DATA_TRANSFORM_SOURCE_TOO_LARGE", `source exceeds ${A2UI_CARD_DATA_TRANSFORM_MAX_SOURCE_BYTES} bytes`));
|
|
22881
|
+
} else if (!/^\s*function\s+transform\s*\(\s*input\s*\)\s*\{/u.test(value.source)) {
|
|
22882
|
+
issues.push(issue2(`${path24}.source`, "INVALID_DATA_TRANSFORM_SOURCE", "source must declare function transform(input) { ... }"));
|
|
22883
|
+
}
|
|
22884
|
+
}
|
|
22885
|
+
function validatePipelineFieldSchemas(fields, dataModelSchema, issues) {
|
|
22886
|
+
fields.forEach((field, index) => {
|
|
22887
|
+
if (field.source !== "business")
|
|
22888
|
+
return;
|
|
22889
|
+
const schema = getJsonSchemaAtDataPointer(dataModelSchema, field.path);
|
|
22890
|
+
if (!schema) {
|
|
22891
|
+
issues.push(issue2(`config.fields[${index}].path`, "DATA_MODEL_FIELD_MISSING", `dataModelSchema does not define ${field.path}`));
|
|
22892
|
+
}
|
|
22893
|
+
});
|
|
22894
|
+
}
|
|
22369
22895
|
function validateV3OutputBindings(value, path24, issues) {
|
|
22370
22896
|
if (!Array.isArray(value)) {
|
|
22371
22897
|
issues.push(issue2(path24, "INVALID_OUTPUT_BINDINGS", "bindings must be an array"));
|
|
@@ -22487,12 +23013,60 @@ function validateManifest(value, path24, issues) {
|
|
|
22487
23013
|
issues.push(issue2(path24, "INVALID_MANIFEST", `${path24} must be an object`));
|
|
22488
23014
|
return void 0;
|
|
22489
23015
|
}
|
|
23016
|
+
if (value.schemaVersion === "4" && value.dataMode === "pipeline") {
|
|
23017
|
+
exactKeys(value, [
|
|
23018
|
+
"schemaVersion",
|
|
23019
|
+
"dataMode",
|
|
23020
|
+
"draftId",
|
|
23021
|
+
"resourceId",
|
|
23022
|
+
"baseRevision",
|
|
23023
|
+
"displayName",
|
|
23024
|
+
"description",
|
|
23025
|
+
"whenToUse",
|
|
23026
|
+
"whenNotToUse",
|
|
23027
|
+
"presentationInputSchema",
|
|
23028
|
+
"fields",
|
|
23029
|
+
"dataSources",
|
|
23030
|
+
"dataTransform",
|
|
23031
|
+
"dataModelSchema"
|
|
23032
|
+
], path24, issues);
|
|
23033
|
+
if (!isSafeIdentifier(value.draftId)) {
|
|
23034
|
+
issues.push(issue2(`${path24}.draftId`, "INVALID_DRAFT_ID", "draftId is invalid"));
|
|
23035
|
+
}
|
|
23036
|
+
if (!isSafeIdentifier(value.resourceId)) {
|
|
23037
|
+
issues.push(issue2(`${path24}.resourceId`, "INVALID_RESOURCE_ID", "resourceId is invalid"));
|
|
23038
|
+
}
|
|
23039
|
+
optionalString(value.baseRevision, `${path24}.baseRevision`, issues);
|
|
23040
|
+
requiredString(value.displayName, `${path24}.displayName`, issues);
|
|
23041
|
+
requiredString(value.description, `${path24}.description`, issues);
|
|
23042
|
+
requiredString(value.whenToUse, `${path24}.whenToUse`, issues);
|
|
23043
|
+
optionalString(value.whenNotToUse, `${path24}.whenNotToUse`, issues);
|
|
23044
|
+
validateLooseJsonSchema(value.presentationInputSchema, `${path24}.presentationInputSchema`, issues);
|
|
23045
|
+
const fields2 = validateFields(value.fields, `${path24}.fields`, issues);
|
|
23046
|
+
validatePipelineDataSources(value.dataSources, `${path24}.dataSources`, issues);
|
|
23047
|
+
validateDataTransform(value.dataTransform, `${path24}.dataTransform`, issues);
|
|
23048
|
+
const dataModelSchema = validateLooseJsonSchema(value.dataModelSchema, `${path24}.dataModelSchema`, issues);
|
|
23049
|
+
if (fields2 && dataModelSchema) {
|
|
23050
|
+
fields2.forEach((field, index) => {
|
|
23051
|
+
if (field.source !== "business")
|
|
23052
|
+
return;
|
|
23053
|
+
if (!getJsonSchemaAtDataPointer(value.dataModelSchema, field.path)) {
|
|
23054
|
+
issues.push(issue2(`${path24}.fields[${index}].path`, "DATA_MODEL_FIELD_MISSING", `dataModelSchema does not define ${field.path}`));
|
|
23055
|
+
}
|
|
23056
|
+
});
|
|
23057
|
+
}
|
|
23058
|
+
return fields2 ? value : void 0;
|
|
23059
|
+
}
|
|
22490
23060
|
if (value.schemaVersion === "3" || value.schemaVersion === "4") {
|
|
23061
|
+
if (value.dataMode !== void 0 && (value.schemaVersion !== "4" || value.dataMode !== "bindings")) {
|
|
23062
|
+
issues.push(issue2(`${path24}.dataMode`, "INVALID_DATA_MODE", "bindings dataMode is only available for schemaVersion 4"));
|
|
23063
|
+
}
|
|
22491
23064
|
if (value.actionBindings !== void 0) {
|
|
22492
23065
|
issues.push(issue2(`${path24}.actionBindings`, "LEGACY_PAYMENT_ACTION_BINDINGS_UNSUPPORTED", "payment actions must be defined inline in card JSON"));
|
|
22493
23066
|
}
|
|
22494
23067
|
exactKeys(value, [
|
|
22495
23068
|
"schemaVersion",
|
|
23069
|
+
"dataMode",
|
|
22496
23070
|
"draftId",
|
|
22497
23071
|
"resourceId",
|
|
22498
23072
|
"baseRevision",
|
|
@@ -22557,6 +23131,23 @@ function validateManifest(value, path24, issues) {
|
|
|
22557
23131
|
}
|
|
22558
23132
|
return schema && fields ? value : void 0;
|
|
22559
23133
|
}
|
|
23134
|
+
function hasOverlappingJsonPointer(fixedInput, inputPath) {
|
|
23135
|
+
const fixedPaths = [];
|
|
23136
|
+
const visit = (value, path24) => {
|
|
23137
|
+
fixedPaths.push(path24);
|
|
23138
|
+
if (!isPlainRecord(value))
|
|
23139
|
+
return;
|
|
23140
|
+
for (const [key, child] of Object.entries(value)) {
|
|
23141
|
+
const escaped = key.replace(/~/gu, "~0").replace(/\//gu, "~1");
|
|
23142
|
+
visit(child, `${path24}/${escaped}`);
|
|
23143
|
+
}
|
|
23144
|
+
};
|
|
23145
|
+
for (const [key, value] of Object.entries(fixedInput)) {
|
|
23146
|
+
const escaped = key.replace(/~/gu, "~0").replace(/\//gu, "~1");
|
|
23147
|
+
visit(value, `/${escaped}`);
|
|
23148
|
+
}
|
|
23149
|
+
return fixedPaths.some((fixedPath) => fixedPath === inputPath || fixedPath.startsWith(`${inputPath}/`) || inputPath.startsWith(`${fixedPath}/`));
|
|
23150
|
+
}
|
|
22560
23151
|
function validateFields(value, path24, issues) {
|
|
22561
23152
|
if (!Array.isArray(value)) {
|
|
22562
23153
|
issues.push(issue2(path24, "INVALID_FIELDS", `${path24} must be an array`));
|
|
@@ -22601,13 +23192,13 @@ function validateFields(value, path24, issues) {
|
|
|
22601
23192
|
paths.add(canonicalPath);
|
|
22602
23193
|
}
|
|
22603
23194
|
requiredString(candidate.label, `${itemPath}.label`, issues);
|
|
22604
|
-
if (!FIELD_TYPES.
|
|
23195
|
+
if (!FIELD_TYPES.has(candidate.type)) {
|
|
22605
23196
|
issues.push(issue2(`${itemPath}.type`, "INVALID_FIELD_TYPE", "field type is invalid"));
|
|
22606
23197
|
}
|
|
22607
23198
|
if (typeof candidate.required !== "boolean") {
|
|
22608
23199
|
issues.push(issue2(`${itemPath}.required`, "INVALID_FIELD_REQUIRED", "required must be a boolean"));
|
|
22609
23200
|
}
|
|
22610
|
-
if (!FIELD_SOURCES.
|
|
23201
|
+
if (!FIELD_SOURCES.has(candidate.source)) {
|
|
22611
23202
|
issues.push(issue2(`${itemPath}.source`, "INVALID_FIELD_SOURCE", "field source is invalid"));
|
|
22612
23203
|
}
|
|
22613
23204
|
const schemaIssues = getJsonSchemaIssues(candidate.valueSchema, `${itemPath}.valueSchema`, { requireCompleteStructures: true });
|
|
@@ -22952,6 +23543,9 @@ function compileA2UICardResource(input) {
|
|
|
22952
23543
|
throw new A2UICardCompileError("CARD_REVISION_INVALID", "CARD revision must be a stable safe identifier");
|
|
22953
23544
|
}
|
|
22954
23545
|
const draft = draftResult.data;
|
|
23546
|
+
if (draft.manifest.schemaVersion === "4" && draft.manifest.dataMode === "pipeline") {
|
|
23547
|
+
return compilePipelineResource(draft, input.revision);
|
|
23548
|
+
}
|
|
22955
23549
|
if (draft.manifest.schemaVersion === "3" || draft.manifest.schemaVersion === "4") {
|
|
22956
23550
|
return compileModernResource(draft, input.revision, input.bindings, input.tools ?? []);
|
|
22957
23551
|
}
|
|
@@ -23002,6 +23596,31 @@ function compileA2UICardResource(input) {
|
|
|
23002
23596
|
}
|
|
23003
23597
|
return parsed.data;
|
|
23004
23598
|
}
|
|
23599
|
+
function compilePipelineResource(draft, revision) {
|
|
23600
|
+
const resource = {
|
|
23601
|
+
schemaVersion: "4",
|
|
23602
|
+
dataMode: "pipeline",
|
|
23603
|
+
revision,
|
|
23604
|
+
displayName: draft.manifest.displayName,
|
|
23605
|
+
description: draft.manifest.description,
|
|
23606
|
+
whenToUse: draft.manifest.whenToUse,
|
|
23607
|
+
...draft.manifest.whenNotToUse ? { whenNotToUse: draft.manifest.whenNotToUse } : {},
|
|
23608
|
+
presentationInputSchema: draft.manifest.presentationInputSchema,
|
|
23609
|
+
fields: draft.manifest.fields,
|
|
23610
|
+
dataSources: draft.manifest.dataSources,
|
|
23611
|
+
dataTransform: draft.manifest.dataTransform,
|
|
23612
|
+
dataModelSchema: draft.manifest.dataModelSchema,
|
|
23613
|
+
a2uiTemplate: {
|
|
23614
|
+
argsSchema: draft.manifest.dataModelSchema,
|
|
23615
|
+
content: stableJsonStringify(draft.card)
|
|
23616
|
+
}
|
|
23617
|
+
};
|
|
23618
|
+
const parsed = parseA2UICardResourceConfig(resource);
|
|
23619
|
+
if (!parsed.success) {
|
|
23620
|
+
throw new A2UICardCompileError("CARD_RESOURCE_INVALID", parsed.issues.map((entry) => `${entry.path}: ${entry.message}`).join("; "));
|
|
23621
|
+
}
|
|
23622
|
+
return parsed.data;
|
|
23623
|
+
}
|
|
23005
23624
|
function compileLegacyDraftAsV3(draft, revision, bindings, tools, targetSchemaVersion = "3") {
|
|
23006
23625
|
if (draft.manifest.schemaVersion !== "2") {
|
|
23007
23626
|
throw new A2UICardCompileError("DRAFT_INVALID", "Expected a schema v2 draft for migration");
|
|
@@ -23292,9 +23911,9 @@ function sha256Hex(value) {
|
|
|
23292
23911
|
b3 = a;
|
|
23293
23912
|
a = add(temporary1, temporary2);
|
|
23294
23913
|
}
|
|
23295
|
-
state = state.map((
|
|
23914
|
+
state = state.map((v2, index) => add(v2, [a, b3, c, d, e3, f3, g2, h][index]));
|
|
23296
23915
|
}
|
|
23297
|
-
return state.map((
|
|
23916
|
+
return state.map((v2) => (v2 >>> 0).toString(16).padStart(8, "0")).join("");
|
|
23298
23917
|
}
|
|
23299
23918
|
function createA2UICardDraftStructureChecksum(draft) {
|
|
23300
23919
|
const cloned = JSON.parse(JSON.stringify(draft));
|
|
@@ -23379,9 +23998,6 @@ var SHA256_CONSTANTS = [
|
|
|
23379
23998
|
3329325298
|
|
23380
23999
|
];
|
|
23381
24000
|
|
|
23382
|
-
// ../agent-a2ui-card-contract/dist/esm/payment-action.js
|
|
23383
|
-
var A2UI_PAYMENT_ACTION_NAME = "payment.trade-pay";
|
|
23384
|
-
|
|
23385
24001
|
// ../agent-a2ui-card-contract/dist/esm/authoring-model.js
|
|
23386
24002
|
var INTERNAL_KEYS = /* @__PURE__ */ new Set([
|
|
23387
24003
|
"__proto__",
|
|
@@ -23420,6 +24036,27 @@ function extractA2UICardAuthoringModel(bundle, options = {}) {
|
|
|
23420
24036
|
binding
|
|
23421
24037
|
]));
|
|
23422
24038
|
const fields = bundle.manifest.fields.filter((field) => field.source === "business");
|
|
24039
|
+
if (bundle.manifest.schemaVersion === "4" && bundle.manifest.dataMode === "pipeline") {
|
|
24040
|
+
for (const [key, schema] of Object.entries(bundle.manifest.dataModelSchema.properties ?? {})) {
|
|
24041
|
+
const path24 = `/${key.replace(/~/g, "~0").replace(/\//g, "~1")}`;
|
|
24042
|
+
if (!isPlainRecord(schema) || fields.some((field) => field.path === path24))
|
|
24043
|
+
continue;
|
|
24044
|
+
if (!["string", "number", "integer", "boolean", "object", "array"].includes(String(schema.type)))
|
|
24045
|
+
continue;
|
|
24046
|
+
let idIndex = fields.length;
|
|
24047
|
+
while (fields.some((field) => field.fieldId === `pipeline-field-${idIndex}`))
|
|
24048
|
+
idIndex += 1;
|
|
24049
|
+
fields.push({
|
|
24050
|
+
fieldId: `pipeline-field-${idIndex}`,
|
|
24051
|
+
path: path24,
|
|
24052
|
+
label: key,
|
|
24053
|
+
type: schema.type,
|
|
24054
|
+
source: "business",
|
|
24055
|
+
required: Array.isArray(bundle.manifest.dataModelSchema.required) && bundle.manifest.dataModelSchema.required.includes(key),
|
|
24056
|
+
valueSchema: schema
|
|
24057
|
+
});
|
|
24058
|
+
}
|
|
24059
|
+
}
|
|
23423
24060
|
const registered = options.registeredComponents ? new Set(options.registeredComponents) : void 0;
|
|
23424
24061
|
const occurrencesByComponent = groupBindingOccurrences(analysis.occurrences);
|
|
23425
24062
|
const allFieldOccurrenceTargets = [];
|
|
@@ -23459,12 +24096,13 @@ function extractA2UICardAuthoringModel(bundle, options = {}) {
|
|
|
23459
24096
|
const fieldStates = fields.map((field) => {
|
|
23460
24097
|
const occurrences = allFieldOccurrenceTargets.filter((target) => target.fieldId === field.fieldId);
|
|
23461
24098
|
const binding = bindingByField.get(field.fieldId);
|
|
24099
|
+
const pipelineBound = bundle.manifest.schemaVersion === "4" && bundle.manifest.dataMode === "pipeline" && getJsonSchemaAtDataPointer(bundle.manifest.dataModelSchema, field.path) !== void 0;
|
|
23462
24100
|
return {
|
|
23463
24101
|
field,
|
|
23464
24102
|
...binding ? { binding: cloneBinding(binding) } : {},
|
|
23465
24103
|
occurrences,
|
|
23466
24104
|
usageCount: new Set(occurrences.map((target) => `${target.occurrenceId}\0${target.propertyPath}`)).size,
|
|
23467
|
-
status: occurrences.length === 0 ? "unused" : binding ? "bound" : field.required ? "unbound-required" : "unbound-optional"
|
|
24105
|
+
status: occurrences.length === 0 ? "unused" : binding || pipelineBound ? "bound" : field.required ? "unbound-required" : "unbound-optional"
|
|
23468
24106
|
};
|
|
23469
24107
|
});
|
|
23470
24108
|
const diagnostics = getA2UICardAuthoringDiagnostics(bundle, {
|
|
@@ -23531,11 +24169,7 @@ function getA2UICardAuthoringDiagnostics(bundle, partial2) {
|
|
|
23531
24169
|
occurrenceId: group.occurrenceId
|
|
23532
24170
|
});
|
|
23533
24171
|
}
|
|
23534
|
-
} else if (client && typeof client.name === "string" && ![
|
|
23535
|
-
"ui.overlay.close",
|
|
23536
|
-
"ui.surface.open",
|
|
23537
|
-
A2UI_PAYMENT_ACTION_NAME
|
|
23538
|
-
].includes(client.name)) {
|
|
24172
|
+
} else if (client && typeof client.name === "string" && !["ui.overlay.close", "ui.surface.open"].includes(client.name)) {
|
|
23539
24173
|
diagnostics.push({
|
|
23540
24174
|
code: "UNREGISTERED_CLIENT_ACTION",
|
|
23541
24175
|
path: `${group.occurrenceId}.action.client.name`,
|
|
@@ -23679,21 +24313,6 @@ function actionTargets(component, occurrenceId) {
|
|
|
23679
24313
|
}
|
|
23680
24314
|
];
|
|
23681
24315
|
}
|
|
23682
|
-
if (client?.name === A2UI_PAYMENT_ACTION_NAME) {
|
|
23683
|
-
const context = isPlainRecord(client.context) ? client.context : void 0;
|
|
23684
|
-
const payment = context ? JSON.parse(JSON.stringify(context)) : void 0;
|
|
23685
|
-
return [
|
|
23686
|
-
{
|
|
23687
|
-
kind: "payment",
|
|
23688
|
-
targetId: createA2UICardAuthoringTargetId(occurrenceId, "action"),
|
|
23689
|
-
occurrenceId,
|
|
23690
|
-
propertyPath: "action",
|
|
23691
|
-
label: "\u652F\u4ED8",
|
|
23692
|
-
...payment ? { payment } : {},
|
|
23693
|
-
configured: Boolean(payment)
|
|
23694
|
-
}
|
|
23695
|
-
];
|
|
23696
|
-
}
|
|
23697
24316
|
return [agentOnlyAction(occurrenceId, "\u8BE5\u884C\u4E3A\u53EA\u80FD\u901A\u8FC7 Coding Agent \u4FEE\u6539")];
|
|
23698
24317
|
}
|
|
23699
24318
|
function fieldTargets(component, occurrenceId, fields, occurrences, projectedOnly) {
|
|
@@ -23716,6 +24335,9 @@ function fieldTargets(component, occurrenceId, fields, occurrences, projectedOnl
|
|
|
23716
24335
|
propertyPath: occurrence.propertyPath,
|
|
23717
24336
|
label: fieldOccurrenceLabel(targetPath, occurrence.propertyPath),
|
|
23718
24337
|
fieldId: field.fieldId,
|
|
24338
|
+
dataPath: occurrence.rawPath,
|
|
24339
|
+
...occurrence.listRoot ? { listRoot: occurrence.listRoot } : {},
|
|
24340
|
+
valueType: occurrence.usage === "list" ? "array" : getJsonSchemaAtDataPointer(field.valueSchema, occurrence.canonicalPath.slice(field.path.length) || "/")?.type,
|
|
23719
24341
|
...targetPath ? { targetPath } : {}
|
|
23720
24342
|
}
|
|
23721
24343
|
];
|
|
@@ -23805,6 +24427,22 @@ function cloneBinding(binding) {
|
|
|
23805
24427
|
var CONTENT_VALUE_MAX_LENGTH = 16 * 1024;
|
|
23806
24428
|
var ETelemetryAttribute;
|
|
23807
24429
|
(function(ETelemetryAttribute2) {
|
|
24430
|
+
ETelemetryAttribute2["LINKQUE_REMOTE_TRACE_ID"] = "linkque.remote.trace_id";
|
|
24431
|
+
ETelemetryAttribute2["LINKQUE_REMOTE_TRACE_ID_HEADER"] = "linkque.remote.trace_id_header";
|
|
24432
|
+
ETelemetryAttribute2["HTTP_REQUEST_METHOD"] = "http.request.method";
|
|
24433
|
+
ETelemetryAttribute2["SERVER_ADDRESS"] = "server.address";
|
|
24434
|
+
ETelemetryAttribute2["URL_PATH"] = "url.path";
|
|
24435
|
+
ETelemetryAttribute2["LINKQUE_MCP_PHASE"] = "linkque.mcp.phase";
|
|
24436
|
+
ETelemetryAttribute2["LINKQUE_MCP_SERVER_NAME"] = "linkque.mcp.server_name";
|
|
24437
|
+
ETelemetryAttribute2["LINKQUE_IO_ATTEMPT"] = "linkque.io.attempt";
|
|
24438
|
+
ETelemetryAttribute2["LINKQUE_SKILL_RESOURCE_ID"] = "linkque.skill.resource_id";
|
|
24439
|
+
ETelemetryAttribute2["LINKQUE_SKILL_REQUESTED_COUNT"] = "linkque.skill.requested_count";
|
|
24440
|
+
ETelemetryAttribute2["LINKQUE_SKILL_RESOLVED_COUNT"] = "linkque.skill.resolved_count";
|
|
24441
|
+
ETelemetryAttribute2["LINKQUE_SKILL_LOADED_COUNT"] = "linkque.skill.loaded_count";
|
|
24442
|
+
ETelemetryAttribute2["LINKQUE_SKILL_SKIPPED_COUNT"] = "linkque.skill.skipped_count";
|
|
24443
|
+
ETelemetryAttribute2["LINKQUE_CHUNK_INDEX"] = "linkque.chunk.index";
|
|
24444
|
+
ETelemetryAttribute2["LINKQUE_CHUNK_STATUS"] = "linkque.chunk.status";
|
|
24445
|
+
ETelemetryAttribute2["LINKQUE_CHUNK_LINE_COUNT"] = "linkque.chunk.line_count";
|
|
23808
24446
|
ETelemetryAttribute2["HARNESS_TELEMETRY_SCHEMA_VERSION"] = "harness.telemetry.schema.version";
|
|
23809
24447
|
ETelemetryAttribute2["LINKQUE_TELEMETRY_SCHEMA_VERSION"] = "linkque.telemetry.schema.version";
|
|
23810
24448
|
ETelemetryAttribute2["LINKQUE_TELEMETRY_ADAPTER_VERSION"] = "linkque.telemetry.adapter.version";
|
|
@@ -23837,6 +24475,8 @@ var ETelemetryAttribute;
|
|
|
23837
24475
|
ETelemetryAttribute2["HARNESS_RECORD_ID"] = "harness.record.id";
|
|
23838
24476
|
ETelemetryAttribute2["HARNESS_EVENT_SEQUENCE"] = "harness.event.sequence";
|
|
23839
24477
|
ETelemetryAttribute2["ERROR_TYPE"] = "error.type";
|
|
24478
|
+
ETelemetryAttribute2["LINKQUE_APPBASE_RUN_FAILURE_STAGE"] = "linkque.appbase.run.failure_stage";
|
|
24479
|
+
ETelemetryAttribute2["LINKQUE_APPBASE_RUN_ERROR_MESSAGE"] = "linkque.appbase.run.error_message";
|
|
23840
24480
|
ETelemetryAttribute2["LINKQUE_STREAM_TERMINATION"] = "linkque.stream.termination";
|
|
23841
24481
|
ETelemetryAttribute2["LINKQUE_STREAM_CANCEL_SOURCE"] = "linkque.stream.cancel_source";
|
|
23842
24482
|
ETelemetryAttribute2["LINKQUE_TERMINAL_EVIDENCE"] = "linkque.terminal.evidence";
|
|
@@ -23914,6 +24554,7 @@ var ETelemetryEventPrefix;
|
|
|
23914
24554
|
ETelemetryEventPrefix2["ADVANCE"] = "harness.advance";
|
|
23915
24555
|
ETelemetryEventPrefix2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
23916
24556
|
ETelemetryEventPrefix2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
24557
|
+
ETelemetryEventPrefix2["MODEL_REASONING"] = "harness.model.reasoning";
|
|
23917
24558
|
ETelemetryEventPrefix2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
23918
24559
|
ETelemetryEventPrefix2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
23919
24560
|
ETelemetryEventPrefix2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
@@ -23955,6 +24596,8 @@ var ETelemetryEventName;
|
|
|
23955
24596
|
ETelemetryEventName2["MODEL_INVOKE_FINISHED"] = "harness.model.invoke.finished";
|
|
23956
24597
|
ETelemetryEventName2["MODEL_ATTEMPT_STARTED"] = "harness.model.attempt.started";
|
|
23957
24598
|
ETelemetryEventName2["MODEL_ATTEMPT_FINISHED"] = "harness.model.attempt.finished";
|
|
24599
|
+
ETelemetryEventName2["MODEL_REASONING_STARTED"] = "harness.model.reasoning.started";
|
|
24600
|
+
ETelemetryEventName2["MODEL_REASONING_FINISHED"] = "harness.model.reasoning.finished";
|
|
23958
24601
|
ETelemetryEventName2["TOOL_INVOKE_STARTED"] = "harness.tool.invoke.started";
|
|
23959
24602
|
ETelemetryEventName2["TOOL_INVOKE_FINISHED"] = "harness.tool.invoke.finished";
|
|
23960
24603
|
ETelemetryEventName2["TOOL_ATTEMPT_STARTED"] = "harness.tool.attempt.started";
|
|
@@ -23977,7 +24620,12 @@ var ETelemetryEventName;
|
|
|
23977
24620
|
var ETelemetryContentSection;
|
|
23978
24621
|
(function(ETelemetryContentSection2) {
|
|
23979
24622
|
ETelemetryContentSection2["QUERY_INPUT"] = "query.input";
|
|
24623
|
+
ETelemetryContentSection2["MODEL_INPUT_DIGEST"] = "model.input.digest";
|
|
24624
|
+
ETelemetryContentSection2["MODEL_OUT_RAW"] = "model.out.raw";
|
|
23980
24625
|
ETelemetryContentSection2["MODEL_OUTPUT"] = "model.output";
|
|
24626
|
+
ETelemetryContentSection2["MODEL_REASONING"] = "model.reasoning";
|
|
24627
|
+
ETelemetryContentSection2["FOLLOW_UP_QUESTION_INPUT"] = "follow_up_question.input";
|
|
24628
|
+
ETelemetryContentSection2["FOLLOW_UP_QUESTION_OUTPUT"] = "follow_up_question.output";
|
|
23981
24629
|
ETelemetryContentSection2["MCP_ACTION_OUTPUT"] = "mcp_action.output";
|
|
23982
24630
|
ETelemetryContentSection2["TOOL_INPUT"] = "tool.input";
|
|
23983
24631
|
ETelemetryContentSection2["TOOL_OUTPUT"] = "tool.output";
|
|
@@ -23991,11 +24639,24 @@ var ETelemetryContentSection;
|
|
|
23991
24639
|
})(ETelemetryContentSection || (ETelemetryContentSection = {}));
|
|
23992
24640
|
var ETelemetryOperationName;
|
|
23993
24641
|
(function(ETelemetryOperationName2) {
|
|
24642
|
+
ETelemetryOperationName2["APPBASE_RUN"] = "linkque.appbase.run";
|
|
24643
|
+
ETelemetryOperationName2["RUNS_WRITE"] = "linkque.appbase.runs.write";
|
|
24644
|
+
ETelemetryOperationName2["MCP_DISCOVER"] = "linkque.mcp.discover";
|
|
24645
|
+
ETelemetryOperationName2["MCP_SIGN"] = "linkque.mcp.sign";
|
|
24646
|
+
ETelemetryOperationName2["MCP_OPENGW"] = "linkque.mcp.opengw";
|
|
24647
|
+
ETelemetryOperationName2["MCP_VERIFY"] = "linkque.mcp.verify";
|
|
24648
|
+
ETelemetryOperationName2["KNOWLEDGE_SEARCH"] = "linkque.knowledge.search";
|
|
24649
|
+
ETelemetryOperationName2["WEB_SEARCH"] = "linkque.web_search.search";
|
|
24650
|
+
ETelemetryOperationName2["SKILL_LOAD"] = "linkque.skill.load";
|
|
24651
|
+
ETelemetryOperationName2["SKILL_QUERY"] = "linkque.skill.query";
|
|
24652
|
+
ETelemetryOperationName2["SKILL_RESOURCE_LOAD"] = "linkque.skill.resource.load";
|
|
24653
|
+
ETelemetryOperationName2["SKILL_DOWNLOAD"] = "linkque.skill.download";
|
|
23994
24654
|
ETelemetryOperationName2["OPERATION"] = "linkque.operation";
|
|
23995
24655
|
ETelemetryOperationName2["TOOL_INVOKE"] = "harness.tool.invoke";
|
|
23996
24656
|
ETelemetryOperationName2["ADVANCE"] = "harness.advance";
|
|
23997
24657
|
ETelemetryOperationName2["MODEL_INVOKE"] = "harness.model.invoke";
|
|
23998
24658
|
ETelemetryOperationName2["MODEL_ATTEMPT"] = "harness.model.attempt";
|
|
24659
|
+
ETelemetryOperationName2["MODEL_REASONING"] = "harness.model.reasoning";
|
|
23999
24660
|
ETelemetryOperationName2["TOOL_ATTEMPT"] = "harness.tool.attempt";
|
|
24000
24661
|
ETelemetryOperationName2["HOOK_CHAIN"] = "harness.hook.chain";
|
|
24001
24662
|
ETelemetryOperationName2["MIDDLEWARE"] = "harness.middleware";
|
|
@@ -24131,9 +24792,13 @@ var ETelemetryTerminalSource;
|
|
|
24131
24792
|
var ETelemetryModelPurpose;
|
|
24132
24793
|
(function(ETelemetryModelPurpose2) {
|
|
24133
24794
|
ETelemetryModelPurpose2["AGENT_LOOP"] = "agent_loop";
|
|
24795
|
+
ETelemetryModelPurpose2["FOLLOW_UP_QUESTION"] = "follow_up_question";
|
|
24134
24796
|
})(ETelemetryModelPurpose || (ETelemetryModelPurpose = {}));
|
|
24135
24797
|
var ETelemetryErrorType;
|
|
24136
24798
|
(function(ETelemetryErrorType2) {
|
|
24799
|
+
ETelemetryErrorType2["IO_ERROR"] = "io_error";
|
|
24800
|
+
ETelemetryErrorType2["IO_CANCELLED"] = "io_cancelled";
|
|
24801
|
+
ETelemetryErrorType2["IO_TIMEOUT"] = "io_timeout";
|
|
24137
24802
|
ETelemetryErrorType2["PROVIDER_STREAM_ERROR"] = "ProviderStreamError";
|
|
24138
24803
|
ETelemetryErrorType2["TOOL_EXECUTION_ERROR"] = "ToolExecutionError";
|
|
24139
24804
|
ETelemetryErrorType2["HOOK_DISPATCH_ERROR"] = "HookDispatchError";
|
|
@@ -24144,6 +24809,16 @@ var ETelemetrySpanKind;
|
|
|
24144
24809
|
ETelemetrySpanKind2["INTERNAL"] = "internal";
|
|
24145
24810
|
ETelemetrySpanKind2["CLIENT"] = "client";
|
|
24146
24811
|
})(ETelemetrySpanKind || (ETelemetrySpanKind = {}));
|
|
24812
|
+
var ETelemetryMcpPhase;
|
|
24813
|
+
(function(ETelemetryMcpPhase2) {
|
|
24814
|
+
ETelemetryMcpPhase2["SSE_CONNECT"] = "sse_connect";
|
|
24815
|
+
ETelemetryMcpPhase2["INITIALIZE"] = "initialize";
|
|
24816
|
+
ETelemetryMcpPhase2["TOOLS_LIST"] = "tools/list";
|
|
24817
|
+
ETelemetryMcpPhase2["TOOLS_CALL"] = "tools/call";
|
|
24818
|
+
ETelemetryMcpPhase2["INITIALIZED"] = "notifications/initialized";
|
|
24819
|
+
ETelemetryMcpPhase2["CANCELLED"] = "notifications/cancelled";
|
|
24820
|
+
ETelemetryMcpPhase2["HTTP"] = "http";
|
|
24821
|
+
})(ETelemetryMcpPhase || (ETelemetryMcpPhase = {}));
|
|
24147
24822
|
var ETelemetryGenAiOperation;
|
|
24148
24823
|
(function(ETelemetryGenAiOperation2) {
|
|
24149
24824
|
ETelemetryGenAiOperation2["CHAT"] = "chat";
|
|
@@ -24210,6 +24885,7 @@ var LINKQUE_ENDPOINT_PROD = "https://linkquegw.alipay.com";
|
|
|
24210
24885
|
var RUNTIME_CONFIG_DEFAULTS = Object.freeze({
|
|
24211
24886
|
LINKQUE_BASE_URL: `${LINKQUE_ENDPOINT_PROD}/api/anthropic`,
|
|
24212
24887
|
LINKQUEGW_KNOWLEDGE_BASE_URL: LINKQUE_ENDPOINT_PROD,
|
|
24888
|
+
LINKQUEGW_SKILL_LOADER_BASE_URL: LINKQUE_ENDPOINT_PROD,
|
|
24213
24889
|
LINKQUEGW_WEB_SEARCH_BASE_URL: LINKQUE_ENDPOINT_PROD,
|
|
24214
24890
|
LINKQUEGW_EVENT_BASE_URL: LINKQUE_ENDPOINT_PROD,
|
|
24215
24891
|
LINKQUEGW_MCP_SIGN_ENDPOINT: `${LINKQUE_ENDPOINT_PROD}/api/mcp/signature`,
|
|
@@ -34474,6 +35150,22 @@ var CONVERSATION_CUSTOM_EVENT_NAMES = Object.freeze({
|
|
|
34474
35150
|
|
|
34475
35151
|
// ../linkque-agent-runtime/dist/esm/impl/telemetry/attributes.js
|
|
34476
35152
|
var allowedAttributeKeys = /* @__PURE__ */ new Set([
|
|
35153
|
+
ETelemetryAttribute.LINKQUE_REMOTE_TRACE_ID,
|
|
35154
|
+
ETelemetryAttribute.LINKQUE_REMOTE_TRACE_ID_HEADER,
|
|
35155
|
+
ETelemetryAttribute.HTTP_REQUEST_METHOD,
|
|
35156
|
+
ETelemetryAttribute.SERVER_ADDRESS,
|
|
35157
|
+
ETelemetryAttribute.URL_PATH,
|
|
35158
|
+
ETelemetryAttribute.LINKQUE_MCP_PHASE,
|
|
35159
|
+
ETelemetryAttribute.LINKQUE_MCP_SERVER_NAME,
|
|
35160
|
+
ETelemetryAttribute.LINKQUE_IO_ATTEMPT,
|
|
35161
|
+
ETelemetryAttribute.LINKQUE_SKILL_RESOURCE_ID,
|
|
35162
|
+
ETelemetryAttribute.LINKQUE_SKILL_REQUESTED_COUNT,
|
|
35163
|
+
ETelemetryAttribute.LINKQUE_SKILL_LOADED_COUNT,
|
|
35164
|
+
ETelemetryAttribute.LINKQUE_SKILL_RESOLVED_COUNT,
|
|
35165
|
+
ETelemetryAttribute.LINKQUE_SKILL_SKIPPED_COUNT,
|
|
35166
|
+
ETelemetryAttribute.LINKQUE_CHUNK_INDEX,
|
|
35167
|
+
ETelemetryAttribute.LINKQUE_CHUNK_STATUS,
|
|
35168
|
+
ETelemetryAttribute.LINKQUE_CHUNK_LINE_COUNT,
|
|
34477
35169
|
ETelemetryAttribute.HARNESS_TELEMETRY_SCHEMA_VERSION,
|
|
34478
35170
|
ETelemetryAttribute.LINKQUE_TELEMETRY_SCHEMA_VERSION,
|
|
34479
35171
|
ETelemetryAttribute.LINKQUE_TELEMETRY_ADAPTER_VERSION,
|
|
@@ -34495,6 +35187,8 @@ var allowedAttributeKeys = /* @__PURE__ */ new Set([
|
|
|
34495
35187
|
ETelemetryAttribute.HARNESS_INVOCATION_ID,
|
|
34496
35188
|
ETelemetryAttribute.HARNESS_ATTEMPT_ID,
|
|
34497
35189
|
ETelemetryAttribute.HARNESS_ATTEMPT_VISIBILITY,
|
|
35190
|
+
ETelemetryAttribute.LINKQUE_APPBASE_RUN_FAILURE_STAGE,
|
|
35191
|
+
ETelemetryAttribute.LINKQUE_APPBASE_RUN_ERROR_MESSAGE,
|
|
34498
35192
|
ETelemetryAttribute.HARNESS_ADVANCE_OUTCOME,
|
|
34499
35193
|
ETelemetryAttribute.HARNESS_OPERATION_OUTCOME,
|
|
34500
35194
|
ETelemetryAttribute.HARNESS_REMOTE_COMPLETION,
|
|
@@ -34572,6 +35266,7 @@ var allowedAttributeKeys = /* @__PURE__ */ new Set([
|
|
|
34572
35266
|
ETelemetryAttribute.HTTP_RESPONSE_STATUS_CODE
|
|
34573
35267
|
]);
|
|
34574
35268
|
var priorityAttributeKeys = /* @__PURE__ */ new Set([
|
|
35269
|
+
ETelemetryAttribute.ERROR_TYPE,
|
|
34575
35270
|
ETelemetryAttribute.HARNESS_RECORD_ID,
|
|
34576
35271
|
ETelemetryAttribute.HARNESS_EVENT_SEQUENCE,
|
|
34577
35272
|
ETelemetryAttribute.HARNESS_ADVANCE_ID,
|
|
@@ -34581,6 +35276,8 @@ var priorityAttributeKeys = /* @__PURE__ */ new Set([
|
|
|
34581
35276
|
ETelemetryAttribute.LINKQUE_OPERATION_NAME,
|
|
34582
35277
|
ETelemetryAttribute.LINKQUE_OPERATION_DURATION_MS,
|
|
34583
35278
|
ETelemetryAttribute.HARNESS_OPERATION_OUTCOME,
|
|
35279
|
+
ETelemetryAttribute.LINKQUE_APPBASE_RUN_FAILURE_STAGE,
|
|
35280
|
+
ETelemetryAttribute.LINKQUE_APPBASE_RUN_ERROR_MESSAGE,
|
|
34584
35281
|
ETelemetryAttribute.HARNESS_ADVANCE_OUTCOME,
|
|
34585
35282
|
ETelemetryAttribute.HARNESS_CALL_ID,
|
|
34586
35283
|
ETelemetryAttribute.HARNESS_INVOCATION_ID,
|
|
@@ -34603,6 +35300,7 @@ var APPBASE_RUNTIME_CONFIG_DEFAULTS = Object.freeze({
|
|
|
34603
35300
|
AGENT_CONFIG_URL_PRE: `${LINKQUE_ENDPOINT_PRE}/api/agent/config`,
|
|
34604
35301
|
LINKQUE_BASE_URL_PRE: `${LINKQUE_ENDPOINT_PRE}/api/anthropic`,
|
|
34605
35302
|
LINKQUEGW_KNOWLEDGE_BASE_URL_PRE: LINKQUE_ENDPOINT_PRE,
|
|
35303
|
+
LINKQUEGW_SKILL_LOADER_BASE_URL_PRE: LINKQUE_ENDPOINT_PRE,
|
|
34606
35304
|
LINKQUEGW_WEB_SEARCH_BASE_URL_PRE: LINKQUE_ENDPOINT_PRE,
|
|
34607
35305
|
LINKQUEGW_EVENT_BASE_URL_PRE: LINKQUE_ENDPOINT_PRE,
|
|
34608
35306
|
LINKQUEGW_TELEMETRY_LOGS_ENDPOINT: `${LINKQUE_ENDPOINT_PROD}/api/telemetry/v1/logs`,
|
|
@@ -35792,7 +36490,7 @@ var resolveDeployCredentials = (env = process.env) => {
|
|
|
35792
36490
|
// src/commands/agentdeploy/gwDeployer.ts
|
|
35793
36491
|
var import_node_fs8 = require("node:fs");
|
|
35794
36492
|
var import_node_os = require("node:os");
|
|
35795
|
-
var
|
|
36493
|
+
var import_node_path12 = require("node:path");
|
|
35796
36494
|
var UPLOAD_PATH = "/api/appbase/deployBundle/upload";
|
|
35797
36495
|
var BUNDLE_CONFIG_NAME2 = "appwrite.config.json";
|
|
35798
36496
|
var HDR_PROJECT_ID = "x-linkque-project-id";
|
|
@@ -35813,7 +36511,7 @@ async function deployViaGw(config3) {
|
|
|
35813
36511
|
log(
|
|
35814
36512
|
`\u90E8\u7F72\u5230 gw: ${gwBaseUrl}${UPLOAD_PATH} projectId=${projectId} functions=[${inScope.map((f3) => f3.$id).join(",")}]`
|
|
35815
36513
|
);
|
|
35816
|
-
const staging = (0, import_node_fs8.mkdtempSync)((0,
|
|
36514
|
+
const staging = (0, import_node_fs8.mkdtempSync)((0, import_node_path12.join)((0, import_node_os.tmpdir)(), "linkquejs-gw-deploy-"));
|
|
35817
36515
|
try {
|
|
35818
36516
|
const configPayload = {
|
|
35819
36517
|
...config3.config,
|
|
@@ -35824,14 +36522,14 @@ async function deployViaGw(config3) {
|
|
|
35824
36522
|
functions: inScope
|
|
35825
36523
|
};
|
|
35826
36524
|
(0, import_node_fs8.writeFileSync)(
|
|
35827
|
-
(0,
|
|
36525
|
+
(0, import_node_path12.join)(staging, BUNDLE_CONFIG_NAME2),
|
|
35828
36526
|
`${JSON.stringify(configPayload, null, 2)}
|
|
35829
36527
|
`,
|
|
35830
36528
|
"utf8"
|
|
35831
36529
|
);
|
|
35832
36530
|
const archiveEntries = [BUNDLE_CONFIG_NAME2];
|
|
35833
36531
|
for (const fn of inScope) {
|
|
35834
|
-
const subArchive = (0,
|
|
36532
|
+
const subArchive = (0, import_node_path12.join)(bundlePath, `${fn.$id}.tar.gz`);
|
|
35835
36533
|
if (!(0, import_node_fs8.existsSync)(subArchive)) {
|
|
35836
36534
|
throw new LinkqueCliError(
|
|
35837
36535
|
"AGENTDEPLOY_BUNDLE_NOT_FOUND",
|
|
@@ -35839,7 +36537,7 @@ async function deployViaGw(config3) {
|
|
|
35839
36537
|
);
|
|
35840
36538
|
}
|
|
35841
36539
|
const destName = `${fn.$id}.tar.gz`;
|
|
35842
|
-
(0, import_node_fs8.copyFileSync)(subArchive, (0,
|
|
36540
|
+
(0, import_node_fs8.copyFileSync)(subArchive, (0, import_node_path12.join)(staging, destName));
|
|
35843
36541
|
archiveEntries.push(destName);
|
|
35844
36542
|
}
|
|
35845
36543
|
const uploadUrl = `${gwBaseUrl.replace(/\/+$/, "")}${UPLOAD_PATH}`;
|
|
@@ -36100,7 +36798,6 @@ var AGENT_LOG = ".linkque/logs/agent.log";
|
|
|
36100
36798
|
var HEALTH_PATH = "/healthz";
|
|
36101
36799
|
var RUNS_PATH = "/runs";
|
|
36102
36800
|
var HOME_DATA_PATH = "/home-data";
|
|
36103
|
-
var A2UI_ACTION_PATH = "/a2ui-action";
|
|
36104
36801
|
var FUNCTION_ACTION_MCP_PATH = "/function-actions/mcp";
|
|
36105
36802
|
var AGENT_RUNTIME_PROTOCOL = "conversation-runs-v2";
|
|
36106
36803
|
var API_KEY_ENV = "LINKQUE_AGENT_API_KEY";
|
|
@@ -36369,7 +37066,6 @@ var spawnAgentOwner = (cwd, config3, port, apiKey, statePath) => {
|
|
|
36369
37066
|
cwd,
|
|
36370
37067
|
healthPath: HEALTH_PATH,
|
|
36371
37068
|
homeDataPath: HOME_DATA_PATH,
|
|
36372
|
-
a2uiActionPath: A2UI_ACTION_PATH,
|
|
36373
37069
|
functionActionMcpPath: FUNCTION_ACTION_MCP_PATH,
|
|
36374
37070
|
logPath: import_path15.default.join(cwd, AGENT_LOG),
|
|
36375
37071
|
port,
|
|
@@ -36933,29 +37629,29 @@ t.fill(8, 0, 144), t.fill(9, 144, 256), t.fill(7, 256, 280), t.fill(8, 280, 288)
|
|
|
36933
37629
|
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
36934
37630
|
var e = (t3) => t3({ workerURI: (t4) => {
|
|
36935
37631
|
const e3 = "text/javascript";
|
|
36936
|
-
let r2 = '!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";const{Array:t,Object:n,Number:e,Math:o,Error:r,Uint8Array:s,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:u,Promise:w,TextEncoder:l,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:S,DecompressionStream:g}=self,v=void 0,z="undefined",b="function",k=new s,C=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;C[0][t]=n}for(let t=0;t<256;t++)for(let n=1;n<8;n++){const e=C[n-1][t];C[n][t]=e>>>8^C[0][255&e]}const[I,A,x,M,P,D,F,E]=C;class R{constructor(t){this.o=t||-1}append(t){let n=0|this.o;const e=0|t.length;let o=0;if(e>=8&&t.buffer){const r=new u(t.buffer,t.byteOffset,e),s=e-8;for(;o<=s;o+=8){const t=n^r.getInt32(o,!0),e=r.getInt32(o+4,!0);n=E[255&t]^F[t>>>8&255]^D[t>>>16&255]^P[t>>>24&255]^M[255&e]^x[e>>>8&255]^A[e>>>16&255]^I[e>>>24&255]}}for(;o<e;o++)n=n>>>8^I[255&(n^t[o])];this.o=n}get(){return~this.o}}class U extends d{constructor(){let t;const n=new R;super({transform(t,e){n.append(t),e.enqueue(t)},flush(){const e=new s(4);new u(e.buffer).setUint32(0,n.get()),t.value=e}}),t=this}}function B(t,n){const e=new s(t.length+n.length);return e.set(t),e.set(n,t.length),e}function T(t){return new u(t.buffer,t.byteOffset,t.byteLength)}const V=64,W=20,j=new s([128]),K=new s(1),O=new a([1732584193,4023233417,2562383102,271733878,3285377520]),H=new s(256),L=new a(256),N=new a(256),q=new a(256),G=new a(256);let J=!1;function Q(t,n){!function(){if(!J){let t=1,n=1;do{t=255&(t^t<<1^(128&t?27:0)),n=255&(n^n<<1),n=255&(n^n<<2),n=255&(n^n<<4),128&n&&(n^=9),H[t]=255&(n^(n<<1|n>>7)^(n<<2|n>>6)^(n<<3|n>>5)^(n<<4|n>>4)^99)}while(1!=t);H[0]=99;for(let t=0;t<256;t++){const n=H[t],e=$(n),o=e<<24|n<<16|n<<8|e^n;L[t]=o,N[t]=o>>>8|o<<24,q[t]=o>>>16|o<<16,G[t]=o>>>24|o<<8}J=!0}}();const e=new a(60),o=function(t,n){const e=t.length>>2,o=e+6,r=4*(o+1);let s=1;for(let o=0;o<e;o++)n[o]=t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3];for(let t=e;t<r;t++){let o=n[t-1];t%e==0?(o=Y(o<<8|o>>>24)^s<<24,s=$(s)):e>6&&t%e==4&&(o=Y(o)),n[t]=n[t-e]^o}return o}(t,e),r=new a(4),s=X(n);let c=0,i=0,f=0,w=0;return{process(t,n){n&&s.update(t,0,t.length),function(t){const n=new u(t.buffer,t.byteOffset,t.byteLength),e=t.length;let o=0;for(;o+16<=e;o+=16)l(),n.setInt32(o,n.getInt32(o)^r[0]),n.setInt32(o+4,n.getInt32(o+4)^r[1]),n.setInt32(o+8,n.getInt32(o+8)^r[2]),n.setInt32(o+12,n.getInt32(o+12)^r[3]);if(o<e){l();for(let n=0;o<e;o++,n++)t[o]^=r[n>>2]>>>24-8*(3&n)}}(t),n||s.update(t,0,t.length)},digest:()=>s.digest()};function l(){c=c+1|0,c||(i=i+1|0,i||(f=f+1|0,f||(w=w+1|0)));let t=Z(c)^e[0],n=Z(i)^e[1],s=Z(f)^e[2],a=Z(w)^e[3],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[4],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[5],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[6],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[7];t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[8],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[9],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[10],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[11],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[12],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[13],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[14],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[15],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[16],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[17],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[18],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[19],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[20],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[21],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[22],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[23],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[24],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[25],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[26],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[27],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[28],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[29],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[30],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[31],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[32],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[33],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[34],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[35],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[36],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[37],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[38],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[39];let d=40;o>10&&(t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[40],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[41],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[42],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[43],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[44],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[45],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[46],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[47],d=48),o>12&&(t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[48],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[49],s=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[50],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[51],u=L[t>>>24]^N[n>>>16&255]^q[s>>>8&255]^G[255&a]^e[52],l=L[n>>>24]^N[s>>>16&255]^q[a>>>8&255]^G[255&t]^e[53],h=L[s>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[54],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&s]^e[55],d=56),r[0]=(H[u>>>24]<<24|H[l>>>16&255]<<16|H[h>>>8&255]<<8|H[255&p])^e[d],r[1]=(H[l>>>24]<<24|H[h>>>16&255]<<16|H[p>>>8&255]<<8|H[255&u])^e[d+1],r[2]=(H[h>>>24]<<24|H[p>>>16&255]<<16|H[u>>>8&255]<<8|H[255&l])^e[d+2],r[3]=(H[p>>>24]<<24|H[u>>>16&255]<<16|H[l>>>8&255]<<8|H[255&h])^e[d+3]}}function X(t){const n=function(){const t=new a(O),n=new a(16),e=new s(V),r=new u(e.buffer),c=new s(8);let i=0,f=0;return{update:w,digest:function(){const n=8*f,e=o.floor(n/4294967296),r=n>>>0;for(w(j,0,1);56!=i;)w(K,0,1);c[0]=e>>>24,c[1]=e>>>16,c[2]=e>>>8,c[3]=e,c[4]=r>>>24,c[5]=r>>>16,c[6]=r>>>8,c[7]=r,w(c,0,8);const a=new s(W),l=new u(a.buffer);for(let n=0;n<t.length;n++)l.setInt32(4*n,t[n]);return t.set(O),i=0,f=0,a}};function w(t,n,o){const s=n+o;if(f+=o,i){for(;n<s&&i<V;)e[i++]=t[n++];i==V&&(l(r,0),i=0)}if(n+V<=s){const e=new u(t.buffer,t.byteOffset,t.byteLength);for(;n+V<=s;n+=V)l(e,n)}for(;n<s;)e[i++]=t[n++]}function l(e,o){for(let t=0;t<16;t++)n[t]=e.getInt32(o+4*t);let r,s=t[0],c=t[1],i=t[2],a=t[3],f=t[4];for(let t=0;t<15;t+=5)f=(s<<5|s>>>27)+((i^a)&c^a)+f+1518500249+n[t]|0,c=c<<30|c>>>2,a=(f<<5|f>>>27)+((c^i)&s^i)+a+1518500249+n[t+1]|0,s=s<<30|s>>>2,i=(a<<5|a>>>27)+((s^c)&f^c)+i+1518500249+n[t+2]|0,f=f<<30|f>>>2,c=(i<<5|i>>>27)+((f^s)&a^s)+c+1518500249+n[t+3]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^f)&i^f)+s+1518500249+n[t+4]|0,i=i<<30|i>>>2;f=(s<<5|s>>>27)+((i^a)&c^a)+f+1518500249+n[15]|0,c=c<<30|c>>>2,r=n[13]^n[8]^n[2]^n[0],r=r<<1|r>>>31,n[0]=r,a=(f<<5|f>>>27)+((c^i)&s^i)+a+1518500249+r|0,s=s<<30|s>>>2,r=n[14]^n[9]^n[3]^n[1],r=r<<1|r>>>31,n[1]=r,i=(a<<5|a>>>27)+((s^c)&f^c)+i+1518500249+r|0,f=f<<30|f>>>2,r=n[15]^n[10]^n[4]^n[2],r=r<<1|r>>>31,n[2]=r,c=(i<<5|i>>>27)+((f^s)&a^s)+c+1518500249+r|0,a=a<<30|a>>>2,r=n[0]^n[11]^n[5]^n[3],r=r<<1|r>>>31,n[3]=r,s=(c<<5|c>>>27)+((a^f)&i^f)+s+1518500249+r|0,i=i<<30|i>>>2;for(let t=20;t<40;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(s<<5|s>>>27)+(c^i^a)+f+1859775393+r|0,c=c<<30|c>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,a=(f<<5|f>>>27)+(s^c^i)+a+1859775393+r|0,s=s<<30|s>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,i=(a<<5|a>>>27)+(f^s^c)+i+1859775393+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,c=(i<<5|i>>>27)+(a^f^s)+c+1859775393+r|0,a=a<<30|a>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,s=(c<<5|c>>>27)+(i^a^f)+s+1859775393+r|0,i=i<<30|i>>>2;for(let t=40;t<60;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(s<<5|s>>>27)+(c&i|(c|i)&a)+f+2400959708+r|0,c=c<<30|c>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,a=(f<<5|f>>>27)+(s&c|(s|c)&i)+a+2400959708+r|0,s=s<<30|s>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,i=(a<<5|a>>>27)+(f&s|(f|s)&c)+i+2400959708+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,c=(i<<5|i>>>27)+(a&f|(a|f)&s)+c+2400959708+r|0,a=a<<30|a>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,s=(c<<5|c>>>27)+(i&a|(i|a)&f)+s+2400959708+r|0,i=i<<30|i>>>2;for(let t=60;t<80;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(s<<5|s>>>27)+(c^i^a)+f+3395469782+r|0,c=c<<30|c>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,a=(f<<5|f>>>27)+(s^c^i)+a+3395469782+r|0,s=s<<30|s>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,i=(a<<5|a>>>27)+(f^s^c)+i+3395469782+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,c=(i<<5|i>>>27)+(a^f^s)+c+3395469782+r|0,a=a<<30|a>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,s=(c<<5|c>>>27)+(i^a^f)+s+3395469782+r|0,i=i<<30|i>>>2;t[0]=t[0]+s|0,t[1]=t[1]+c|0,t[2]=t[2]+i|0,t[3]=t[3]+a|0,t[4]=t[4]+f|0}}(),e=new s(V),r=new s(V);t.length>V&&(n.update(t,0,t.length),t=n.digest());for(let n=0;n<V;n++){const o=n<t.length?t[n]:0;e[n]=54^o,r[n]=92^o}return n.update(e,0,V),{update(t,e,o){n.update(t,e,o)},digest(){const t=n.digest();n.update(r,0,V),n.update(t,0,W);const o=n.digest();return n.update(e,0,V),o}}}function Y(t){return H[t>>>24]<<24|H[t>>>16&255]<<16|H[t>>>8&255]<<8|H[255&t]}function Z(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function $(t){return 255&(t<<1^27*(t>>7))}const _=typeof h!=z&&typeof h.getRandomValues==b,tt="Invalid password",nt="zipjs-abort-check-password";function et(t){if(_)return h.getRandomValues(t);throw new r("Crypto API not supported")}const ot={name:"PBKDF2"},rt=n.assign({hash:{name:"HMAC"}},ot),st=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ot),ct=["deriveBits"],it=[8,12,16],at=[16,24,32],ft=10,ut=typeof h!=z,wt=ut&&h.subtle;let lt=ut&&typeof wt!=z&&typeof wt.importKey==b&&typeof wt.deriveBits==b,ht=Q;class pt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e,checkPasswordOnly:o,checkAuthenticationCode:c=!0}){super({start(){yt(this,t,n,e)},async transform(t,n){const e=this,{password:c,strength:i,l:a,ready:f}=e;c?(await async function(t,n,e,o){const s=await gt(t,n,e,zt(o,0,it[n])),c=zt(o,it[n]);if(s[0]!=c[0]||s[1]!=c[1])throw St(t),new r(tt)}(e,i,c,zt(t,0,it[i]+2)),t=zt(t,it[i]+2),o?(St(e),n.error(new r(nt))):a()):await f;const u=new s(t.length-ft-(t.length-ft)%16);n.enqueue(mt(e,t,u,0,ft,!0))},async flush(t){const{h:n,m:e,ready:o}=this;if(n){await o;const i=zt(e,e.length-ft),a=new s(zt(e,0,e.length-ft));n.process(a,!0);const f=n.digest();let u=e.length<ft?1:0;for(let t=0;t<ft;t++)u|=f[t]^i[t];if(u&&c)throw new r("Invalid authentication code");t.enqueue(a)}},cancel(){St(this)}})}}class dt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e}){super({start(){yt(this,t,n,e)},async transform(t,n){const e=this,{password:o,strength:r,l:c,ready:i}=e;let a=k;o?(a=await async function(t,n,e){const o=et(new s(it[n]));return B(o,await gt(t,n,e,o))}(e,r,o),c()):await i;const f=new s(a.length+t.length-t.length%16);f.set(a,0),n.enqueue(mt(e,t,f,a.length,0,!1))},async flush(t){const{h:n,m:e,ready:o}=this;if(n){await o;const r=new s(e);n.process(r,!1);const c=zt(n.digest(),0,ft);t.enqueue(B(r,c))}},cancel(){St(this)}})}}function yt(t,e,o,r){n.assign(t,{ready:new w(n=>t.l=n),password:vt(e,o),strength:r-1,m:k})}function mt(t,n,e,o,r,c){const{h:i,m:a}=t;a.length&&(n=B(a,n));const f=n.length-r,u=f-f%16;if(e=function(t,n){if(n&&n>t.length){const e=t;(t=new s(n)).set(e,0)}return t}(e,o+u),u){const t=zt(e,o,o+u);t.set(zt(n,0,u)),i.process(t,c)}return t.m=zt(n,u),e}function St({h:t}){t&&t.dispose&&t.dispose()}async function gt(t,e,r,c){t.password=null;const i=at[e],a=await async function(t,e,r){if(lt)try{const o=await wt.importKey("raw",t,rt,!1,ct);return new s(await wt.deriveBits(n.assign({salt:e},st),o,8*r))}catch{lt=!1}return function(t,n,e,r){const c=X(t),i=new s(r),a=new s(n.length+4),f=new u(a.buffer);a.set(n);for(let t=1,e=0;e<r;t++,e+=W){f.setUint32(n.length,t),c.update(a,0,a.length);let s=c.digest();const u=s.slice();for(let t=1;t<1e3;t++){c.update(s,0,W),s=c.digest();for(let t=0;t<W;t++)u[t]^=s[t]}i.set(u.subarray(0,o.min(W,r-e)),e)}return i}(t,e,0,r)}(r,c,2*i+2);return t.h=ht(zt(a,0,i),zt(a,i,2*i)),zt(a,2*i)}function vt(t,n){return n===v?function(t){if(typeof l==z){t=unescape(encodeURIComponent(t));const n=new s(t.length);for(let e=0;e<n.length;e++)n[e]=t.charCodeAt(e);return n}return(new l).encode(t)}(t):n}function zt(t,n,e){return t.subarray(n,e)}class bt extends d{constructor({password:t,rawPassword:n,passwordVerification:e,checkPasswordOnly:o}){super({start(){Ct(this,t,n,e)},transform(t,n){const e=this;if(e.password||e.rawPassword){const n=It(e,t.subarray(0,12));if(e.password=e.rawPassword=null,0!=(n[11]^e.passwordVerification))throw new r(tt);t=t.subarray(12)}o?n.error(new r(nt)):n.enqueue(It(e,t))}})}}class kt extends d{constructor({password:t,rawPassword:n,passwordVerification:e}){super({start(){Ct(this,t,n,e)},transform(t,n){const e=this;let o,r;if(e.password||e.rawPassword){e.password=e.rawPassword=null;const n=et(new s(12));n[11]=e.passwordVerification,o=new s(t.length+n.length),o.set(At(e,n),0),r=12}else o=new s(t.length),r=0;o.set(At(e,t),r),n.enqueue(o)}})}}function Ct(t,e,o,r){n.assign(t,{password:e,rawPassword:o,passwordVerification:r}),function(t,e,o){const r=[305419896,591751049,878082192];if(n.assign(t,{keys:r,S:new R(r[0]),v:new R(r[2])}),o)for(let n=0;n<o.length;n++)xt(t,o[n]);else for(let n=0;n<e.length;n++)xt(t,e.charCodeAt(n))}(t,e,o)}function It(t,n){const e=new s(n.length);for(let o=0;o<n.length;o++)e[o]=Mt(t)^n[o],xt(t,e[o]);return e}function At(t,n){const e=new s(n.length);for(let o=0;o<n.length;o++)e[o]=Mt(t)^n[o],xt(t,n[o]);return e}function xt(t,n){let[,e]=t.keys;t.S.append([n]);const r=~t.S.get();e=Dt(o.imul(Dt(e+Pt(r)),134775813)+1),t.v.append([e>>>24]);const s=~t.v.get();t.keys=[r,e,s]}function Mt(t){const n=2|t.keys[2];return Pt(o.imul(n,1^n)>>>8)}function Pt(t){return 255&t}function Dt(t){return 4294967295&t}function Ft(t){if(t instanceof y)return t;const n=t.getReader();return new y({async pull(t){const{value:e,done:o}=await n.read();o?t.close():t.enqueue(e)},cancel:t=>n.cancel(t)})}const Et=new f;function Rt(t){return Et.get(t)}const Ut="Invalid uncompressed size",Bt="deflate-raw",Tt="gzip",Vt=[31,139,8];class Wt extends d{constructor(t,{chunkSize:n,CompressionStreamFallback:e,CompressionStream:o}){super({});const{compressed:r,encrypted:s,useCompressionStream:c,zipCrypto:i,computeCrc32:a,level:f,deflate64:w,format:l,compressionMethod:h,inputSize:p}=t,d=this;let y,m,S,g=super.readable;const v=l&&Rt(l),z=function(t,n,e){return t&&n?n:e&&e.C?e:void 0}(c,o,e),b=a&&r&&!w&&!v&&(!s||i)&&Boolean(z);if(s&&!i||!a||b||(y=new U,g=qt(g,y)),r)if(v)g=Gt(g,Lt(v.CompressionStream,l,{level:f,chunkSize:n,compressionMethod:h,uncompressedSize:p}));else if(b)S=new jt,g=Gt(g,new z(Tt,{level:f,chunkSize:n})),g=qt(g,S);else try{g=Nt(g,c,{level:f,chunkSize:n},o,e)}catch(t){let n;try{n=new o(Tt)}catch{throw t}g=Gt(g,n),g=qt(g,new jt)}s&&(i?g=qt(g,new kt(t)):(m=new dt(t),g=qt(g,m))),Ht(d,g,()=>{s&&!i||!a||(d.crc32=b?S.crc32:new u(y.value.buffer).getUint32(0))})}}class jt extends d{constructor(){let t,n=10,e=new s(0);super({transform(t,r){if(n){const e=o.min(n,t.length);if(n-=e,!(t=t.subarray(e)).length)return}const s=e.length+t.length;if(s<=8)return void(e=B(e,t));const c=s-8,i=o.min(c,e.length);r.enqueue(B(e.subarray(0,i),t.subarray(0,c-i))),e=B(e.subarray(i),t.subarray(c-i))},flush(){const n=T(e);t.crc32=n.getUint32(0,!0),t.uncompressedSize=n.getUint32(4,!0)}}),t=this}}class Kt extends d{constructor(t,{chunkSize:n,DecompressionStreamFallback:e,DecompressionStream:o}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:l,useCompressionStream:h,deflate64:p,format:m,compressionMethod:S,rawBitFlag:g,outputSize:z}=t;let b,k,C,I=super.readable;if(i&&(c?I=qt(I,new bt(t)):(k=new pt(t),I=qt(I,k))),l){const t=m&&Rt(m);if(t)I=Gt(I,Lt(t.DecompressionStream,m,{chunkSize:n,compressionMethod:S,rawBitFlag:g,uncompressedSize:z}));else try{I=Nt(I,h,{chunkSize:n,deflate64:p},o,e)}catch(t){if(p||z===v)throw t;let n;try{n=new o(Tt)}catch{throw t}C=new R,I=function(t,n,e,o){let c,i,a,f=0,u=!1;const l=new w((t,n)=>{i=t,a=n});l.catch(()=>{}),e||i();const h=new d({start(t){const n=new s(10);n.set(Vt),t.enqueue(n)},transform(t,n){n.enqueue(t)},async flush(t){u=!0,y();try{await l}finally{m()}const n=new s(8),r=T(n);r.setUint32(0,o.get(),!0),r.setUint32(4,e,!0),t.enqueue(n)},cancel(t){a(t)}}),p=new d({transform(t,n){o.append(t),f+=t.length,f>=e?i():u&&y(),n.enqueue(t)},cancel(t){a(t)}});return t=qt(t,h),qt(t=Gt(t,n),p);function y(){m(),c=setTimeout(()=>a(new r(Ut)),5e3)}function m(){clearTimeout(c)}}(I,n,z,C)}I=function(t){const n=t.getReader();return new y({async pull(t){let e;try{e=await n.read()}catch(t){if(t&&t.message)throw t;const n=new r("Invalid compressed data");throw n.cause=t,n}const{value:o,done:s}=e;s?t.close():t.enqueue(o)},cancel:t=>n.cancel(t)})}(I)}a&&!C&&(b=new U,I=qt(I,b)),Ht(this,I,()=>{if(a){const t=C?C.get()>>>0:new u(b.value.buffer).getUint32(0,!1);if(f!=t)throw new r("Invalid CRC32")}})}}const Ot=new f;function Ht(t,e,o){e=qt(e,new d({flush:o})),n.defineProperty(t,"readable",{get:()=>e})}function Lt(t,n,e){if(!t)throw new r("Compression method not supported");return new t(n,e)}function Nt(t,n,e,o,r){const s=n&&o?o:r||o,c=e.deflate64?"deflate64-raw":Bt;let i;try{i=new s(c,e)}catch(t){if(!n||!r||s==r)throw t;i=new r(c,e)}return Gt(t,i)}function qt(t,n){return Ft(t).pipeThrough(n)}function Gt(t,n){const e=n.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await e.ready;const t=await o.read();if(t.done){await e.close();break}await e.write(t.value)}}catch(t){await async function(t,n){try{await t.abort(n)}catch{}}(e,t),await async function(t,n){try{await t.cancel(n)}catch{}}(o,t)}}(),n.readable}const Jt="data",Qt="deflate";class Xt extends d{constructor(t,e){super({});const o=this,{codecType:s}=t;let c;s.startsWith(Qt)?c=Wt:s.startsWith("inflate")&&(c=Kt),o.outputSize=0;let i=0;const a=new c(t,e),f=super.readable,u=new d({transform(t,n){t&&t.length&&(i+=t.length,n.enqueue(t))},flush(){n.assign(o,{inputSize:i})}}),w=new d({transform(n,e){if(n&&n.length&&(e.enqueue(n),o.outputSize+=n.length,t.outputSize!==v&&o.outputSize>t.outputSize))throw new r(Ut)},flush(){const{crc32:t}=a;n.assign(o,{crc32:t,inputSize:i})}});n.defineProperty(o,"readable",{get:()=>f.pipeThrough(u).pipeThrough(a).pipeThrough(w)})}}class Yt extends d{constructor(t){const o=[];let r=0,c=0;function i(){const n=new s(t);let e=0;for(;e<t;){const r=o[0],s=t-e;r.length<=s?(n.set(r,e),e+=r.length,o.shift()):(n.set(r.subarray(0,s),e),o[0]=r.subarray(s),e+=s)}return r-=t,n}(!e.isFinite(t)||t<1)&&(t=65536),super({transform(n,e){for(o.push(n),r+=n.length;r>t;)c+=t,e.enqueue(i())},flush(t){r&&(c+=r,t.enqueue(function(t,n){const e=new s(n);let o=0;for(const n of t)e.set(n,o),o+=n.length;return e}(o,r)))}}),n.defineProperty(this,"outputSize",{get:()=>c})}}let Zt=2;try{typeof navigator!=z&&navigator.hardwareConcurrency&&(Zt=navigator.hardwareConcurrency)}catch{}function $t(t){return Boolean(t)&&"object"==typeof t}const _t=new f,tn=new f,nn=function(){try{return structuredClone(new r)instanceof r}catch{return!1}}();let en=0;async function on(t){let n,s,c;try{const{options:i,config:a}=t;if(i.format)try{await async function(t,n){!Et.has(t)&&n&&function(t,n){const{CompressionStream:e,DecompressionStream:o}=n;if(typeof e!=b&&typeof o!=b)throw new r("Invalid codec module");Et.set(t,{CompressionStream:e,DecompressionStream:o})}(t,await(import(n)))}(i.format,i.codecURI)}catch(t){if($t(t))try{t.codecImportFailed=!0}catch{}throw t}if(a.CompressionStream=self.CompressionStream,a.DecompressionStream=self.DecompressionStream,i.compressed&&!i.format)if(i.useCompressionStream){if(!function(t,n){if(!t)return!1;let e=Ot.get(t);e||(e=new f,Ot.set(t,e));let o=e.get(n);if(o===v){try{new t(n),o=!0}catch{o=!1}e.set(n,o)}return o}(i.codecType.startsWith(Qt)?a.CompressionStream:a.DecompressionStream,Bt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{i.useCompressionStream=!0}if(i.encrypted&&!i.zipCrypto)try{await self.initModule(t.config)}catch{}!a.CompressionStreamFallback&&a.CompressionStreamZlib&&(a.CompressionStreamFallback=a.CompressionStreamZlib),!a.DecompressionStreamFallback&&a.DecompressionStreamZlib&&(a.DecompressionStreamFallback=a.DecompressionStreamZlib);const u={highWaterMark:1},l=t.readable?Ft(t.readable):new y({async pull(t){const n=new w(t=>_t.set(en,t));rn({type:"pull",messageId:en}),en=(en+1)%e.MAX_SAFE_INTEGER;const{value:o,done:r}=await n;t.enqueue(o),r&&t.close()}},u);c=t.writable?function(t){if(t instanceof m)return t;const n=t.getWriter();return new m({write:t=>n.write(t),close:()=>n.close(),abort:t=>n.abort(t)})}(t.writable):new m({async write(t){let n;const o=new w(t=>n=t);tn.set(en,n),rn({type:Jt,value:t,messageId:en}),en=(en+1)%e.MAX_SAFE_INTEGER,await o}},u),n=new Xt(i,a),s=new Yt(function(t){return r="string"==typeof(n=r=t.chunkSize)&&n.trim()?e(n):n,e.isInteger(r)&&r>=1?o.max(r,64):65536;var n,r}(a)),await l.pipeThrough(n).pipeThrough(s).pipeTo(c,{preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{crc32:h,inputSize:p,outputSize:d}=n;rn({type:"close",result:{crc32:h,inputSize:p,outputSize:d}})}catch(t){const n=s?s.outputSize:0;if($t(t))try{t.outputSize=n}catch{}if(c&&!c.locked)try{await c.getWriter().close()}catch{}sn(t,n)}}function rn(t){const{value:n}=t;if(n)if(n.length)try{t.value=(e=n,e.byteOffset||e.byteLength!=e.buffer.byteLength?new s(e):e).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var e}function sn(t,n){const{message:e,stack:o,code:s,name:c,outputSize:i,cause:a,codecImportFailed:f}=function(t=new r("Unknown error")){return $t(t)?t:new r(String(t))}(t),u={message:e,stack:o,code:s,name:c,outputSize:i===v?n:i};if(a&&(u.cause={name:a.name,message:a.message}),f&&(u.codecImportFailed=!0),nn)try{return void p({error:u,errorValue:{value:t}})}catch{}p({error:u})}addEventListener("message",({data:t})=>{const{type:n,messageId:e,value:o,done:r}=t;try{if("start"==n&&on(t),n==Jt){const t=_t.get(e);_t.delete(e),t({value:o||new s,done:r})}if("ack"==n){const t=tn.get(e);tn.delete(e),t()}}catch(t){sn(t)}}),p({type:"ready"});const cn="deflate",an="deflate-raw",fn="deflate64-raw",un="gzip";let wn,ln,hn,pn,dn;function yn(t,n,e={}){if(!wn){const t=new r("WASM module not loaded");throw t.cause=dn,t}const c="number"==typeof e.level?e.level:-1,i="number"==typeof e.outBuffer?e.outBuffer:65536,a="number"==typeof e.inBufferSize?e.inBufferSize:65536;return new d({start(){try{let e;if(this.I=ln(i),this.in=ln(a),this.inBufferSize=a,!this.I||!this.in)throw new r("allocation failed");if(t?(this.A=wn.deflate_process,this.M=wn.deflate_last_consumed,this.P=wn.deflate_end,this.D=wn.deflate_new(),e=n===un?wn.deflate_init_gzip(this.D,c):n===an?wn.deflate_init_raw(this.D,c):wn.deflate_init(this.D,c)):n===fn?(this.A=wn.inflate9_process,this.M=wn.inflate9_last_consumed,this.P=wn.inflate9_end,this.D=wn.inflate9_new(),e=wn.inflate9_init_raw(this.D)):(this.A=wn.inflate_process,this.M=wn.inflate_last_consumed,this.P=wn.inflate_end,this.D=wn.inflate_new(),e=n===an?wn.inflate_init_raw(this.D):n===un?wn.inflate_init_gzip(this.D):wn.inflate_init(this.D)),0!==e)throw new r("init failed:"+e)}catch(t){throw f(this),t}},transform(t,n){try{const e=t,c=new s(pn.buffer),a=this.A,f=this.M,u=this.I;let w=0;for(;w<e.length;){const t=o.min(e.length-w,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&hn&&(hn(this.in),this.in=0),this.in=ln(t),this.inBufferSize=t,!this.in))throw new r("allocation failed");c.set(e.subarray(w,w+t),this.in);const s=a(this.D,this.in,t,u,i,0),l=s>>24&255,h=128&l?l-256:l;if(h<0)throw new r("process error:"+h);const p=16777215&s;p&&n.enqueue(c.slice(u,u+p));const d=f(this.D);if(0===d&&0===p)break;w+=d}}catch(t){f(this),n.error(t)}},flush(t){try{const n=new s(pn.buffer),e=this.A,o=this.I;for(;;){const s=e(this.D,0,0,o,i,4),c=s>>24&255,a=128&c?c-256:c;if(a<0)throw new r("process error:"+a);const f=16777215&s;if(f&&t.enqueue(n.slice(o,o+f)),1===c||0===f)break}}catch(n){t.error(n)}finally{const n=f(this);0!==n&&t.error(new r("end error:"+n))}},cancel(){f(this)}});function f(t){let n=0;return t.D&&t.P&&(n=t.P(t.D)),t.D=0,t.in&&hn&&hn(t.in),t.in=0,t.I&&hn&&hn(t.I),t.I=0,n}}class mn{constructor(t=cn,n){return yn(!0,t,n)}}class Sn{constructor(t=cn,n){return yn(!1,t,n)}}mn.C=!0,Sn.C=!0,mn.F=[cn,an,un],Sn.F=[cn,an,un,fn];const gn=65536;let vn,zn;function bn(t){return new s(t.memory.buffer)}let kn=!1;!function(t={}){const{init:n,R:e}=t,o=t.CompressionStreamFallback||t.CompressionStreamZlib,r=t.DecompressionStreamFallback||t.DecompressionStreamZlib;e&&(ht=e||Q),self.initModule=async t=>{n&&await n(t),o&&(t.CompressionStreamFallback=o),r&&(t.DecompressionStreamFallback=r)}}({CompressionStreamFallback:mn,DecompressionStreamFallback:Sn,R:function(t,n){const e=vn;let o=e?function(t,n,e){zn||(zn=t.malloc(gn));const o=zn?t.aes_hmac_new():0;if(o){const r=bn(t);if(r.set(n,zn),r.set(e,zn+n.length),t.aes_hmac_init(o,zn,n.length,zn+n.length,e.length))return t.aes_hmac_end(o,0),0}return o}(e,t,n):0;if(!o)return Q(t,n);const r=zn;return{process(t,n){for(let s=0;s<t.length;s+=gn){const c=t.subarray(s,s+gn),i=bn(e);i.set(c,r),e.aes_hmac_process(o,r,c.length,n?1:0),c.set(i.subarray(r,r+c.length))}},digest:()=>(e.aes_hmac_end(o,r),o=0,bn(e).slice(r,r+20)),dispose(){o&&(e.aes_hmac_end(o,0),o=0)}}},init:t=>async function(t,{baseURI:n}){if(!kn)try{await async function(t,n){let e,o;try{try{o=new URL(t,n)}catch{}const r=await fetch(o);e=await r.arrayBuffer()}catch(n){if(!t.startsWith("data:application/wasm;base64,"))throw n;e=function(t){const n=t.split(",")[1],e=atob(n),o=e.length,r=new s(o);for(let t=0;t<o;++t)r[t]=e.charCodeAt(t);return r.buffer}(t)}const c=await WebAssembly.instantiate(e);var i;(function(t){if(wn=t,({malloc:ln,free:hn,memory:pn}=wn),"function"!=typeof ln||"function"!=typeof hn||!pn)throw wn=ln=hn=pn=null,new r("Invalid WASM module")})(c.instance.exports),typeof(i=c.instance.exports).aes_hmac_new==b&&(vn=i,zn=0)}(t,n),kn=!0}catch(t){throw function(t){dn=t}(t),t}}(t.wasmURI,t)})});\n';
|
|
36937
|
-
if ("string" == typeof
|
|
36938
|
-
const t5 = new Blob([
|
|
37632
|
+
let s4 = '!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";const{Array:t,Object:n,Number:e,Math:o,Error:s,Uint8Array:r,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:u,Promise:w,TextEncoder:l,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:S,DecompressionStream:g}=self,v=void 0,k="undefined",z="function",b=new r,C=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;C[0][t]=n}for(let t=0;t<256;t++)for(let n=1;n<8;n++){const e=C[n-1][t];C[n][t]=e>>>8^C[0][255&e]}const[I,A,M,x,P,D,F,E]=C;class R{constructor(t){this.o=t||-1}append(t){let n=0|this.o;const e=0|t.length;let o=0;if(e>=8&&t.buffer){const s=new u(t.buffer,t.byteOffset,e),r=e-8;for(;o<=r;o+=8){const t=n^s.getInt32(o,!0),e=s.getInt32(o+4,!0);n=E[255&t]^F[t>>>8&255]^D[t>>>16&255]^P[t>>>24&255]^x[255&e]^M[e>>>8&255]^A[e>>>16&255]^I[e>>>24&255]}}for(;o<e;o++)n=n>>>8^I[255&(n^t[o])];this.o=n}get(){return~this.o}}class U extends d{constructor(){let t;const n=new R;super({transform(t,e){n.append(t),e.enqueue(t)},flush(){const e=new r(4);new u(e.buffer).setUint32(0,n.get()),t.value=e}}),t=this}}function B(t,n){const e=new r(t.length+n.length);return e.set(t),e.set(n,t.length),e}function V(t){return new u(t.buffer,t.byteOffset,t.byteLength)}const W=64,j=20,K=new r([128]),O=new r(1),T=new a([1732584193,4023233417,2562383102,271733878,3285377520]),H=new r(256),L=new a(256),N=new a(256),q=new a(256),G=new a(256);let J=!1;function Q(t,n){!function(){if(!J){let t=1,n=1;do{t=255&(t^t<<1^(128&t?27:0)),n=255&(n^n<<1),n=255&(n^n<<2),n=255&(n^n<<4),128&n&&(n^=9),H[t]=255&(n^(n<<1|n>>7)^(n<<2|n>>6)^(n<<3|n>>5)^(n<<4|n>>4)^99)}while(1!=t);H[0]=99;for(let t=0;t<256;t++){const n=H[t],e=$(n),o=e<<24|n<<16|n<<8|e^n;L[t]=o,N[t]=o>>>8|o<<24,q[t]=o>>>16|o<<16,G[t]=o>>>24|o<<8}J=!0}}();const e=new a(60),o=function(t,n){const e=t.length>>2,o=e+6,s=4*(o+1);let r=1;for(let o=0;o<e;o++)n[o]=t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3];for(let t=e;t<s;t++){let o=n[t-1];t%e==0?(o=Y(o<<8|o>>>24)^r<<24,r=$(r)):e>6&&t%e==4&&(o=Y(o)),n[t]=n[t-e]^o}return o}(t,e),s=new a(4),r=X(n);let c=0,i=0,f=0,w=0;return{process(t,n){n&&r.update(t,0,t.length),function(t){const n=new u(t.buffer,t.byteOffset,t.byteLength),e=t.length;let o=0;for(;o+16<=e;o+=16)l(),n.setInt32(o,n.getInt32(o)^s[0]),n.setInt32(o+4,n.getInt32(o+4)^s[1]),n.setInt32(o+8,n.getInt32(o+8)^s[2]),n.setInt32(o+12,n.getInt32(o+12)^s[3]);if(o<e){l();for(let n=0;o<e;o++,n++)t[o]^=s[n>>2]>>>24-8*(3&n)}}(t),n||r.update(t,0,t.length)},digest:()=>r.digest()};function l(){c=c+1|0,c||(i=i+1|0,i||(f=f+1|0,f||(w=w+1|0)));let t=Z(c)^e[0],n=Z(i)^e[1],r=Z(f)^e[2],a=Z(w)^e[3],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[4],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[5],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[6],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[7];t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[8],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[9],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[10],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[11],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[12],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[13],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[14],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[15],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[16],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[17],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[18],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[19],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[20],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[21],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[22],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[23],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[24],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[25],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[26],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[27],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[28],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[29],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[30],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[31],t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[32],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[33],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[34],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[35],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[36],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[37],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[38],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[39];let d=40;o>10&&(t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[40],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[41],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[42],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[43],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[44],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[45],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[46],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[47],d=48),o>12&&(t=L[u>>>24]^N[l>>>16&255]^q[h>>>8&255]^G[255&p]^e[48],n=L[l>>>24]^N[h>>>16&255]^q[p>>>8&255]^G[255&u]^e[49],r=L[h>>>24]^N[p>>>16&255]^q[u>>>8&255]^G[255&l]^e[50],a=L[p>>>24]^N[u>>>16&255]^q[l>>>8&255]^G[255&h]^e[51],u=L[t>>>24]^N[n>>>16&255]^q[r>>>8&255]^G[255&a]^e[52],l=L[n>>>24]^N[r>>>16&255]^q[a>>>8&255]^G[255&t]^e[53],h=L[r>>>24]^N[a>>>16&255]^q[t>>>8&255]^G[255&n]^e[54],p=L[a>>>24]^N[t>>>16&255]^q[n>>>8&255]^G[255&r]^e[55],d=56),s[0]=(H[u>>>24]<<24|H[l>>>16&255]<<16|H[h>>>8&255]<<8|H[255&p])^e[d],s[1]=(H[l>>>24]<<24|H[h>>>16&255]<<16|H[p>>>8&255]<<8|H[255&u])^e[d+1],s[2]=(H[h>>>24]<<24|H[p>>>16&255]<<16|H[u>>>8&255]<<8|H[255&l])^e[d+2],s[3]=(H[p>>>24]<<24|H[u>>>16&255]<<16|H[l>>>8&255]<<8|H[255&h])^e[d+3]}}function X(t){const n=function(){const t=new a(T),n=new a(16),e=new r(W),s=new u(e.buffer),c=new r(8);let i=0,f=0;return{update:w,digest:function(){const n=8*f,e=o.floor(n/4294967296),s=n>>>0;for(w(K,0,1);56!=i;)w(O,0,1);c[0]=e>>>24,c[1]=e>>>16,c[2]=e>>>8,c[3]=e,c[4]=s>>>24,c[5]=s>>>16,c[6]=s>>>8,c[7]=s,w(c,0,8);const a=new r(j),l=new u(a.buffer);for(let n=0;n<t.length;n++)l.setInt32(4*n,t[n]);return t.set(T),i=0,f=0,a}};function w(t,n,o){const r=n+o;if(f+=o,i){for(;n<r&&i<W;)e[i++]=t[n++];i==W&&(l(s,0),i=0)}if(n+W<=r){const e=new u(t.buffer,t.byteOffset,t.byteLength);for(;n+W<=r;n+=W)l(e,n)}for(;n<r;)e[i++]=t[n++]}function l(e,o){for(let t=0;t<16;t++)n[t]=e.getInt32(o+4*t);let s,r=t[0],c=t[1],i=t[2],a=t[3],f=t[4];for(let t=0;t<15;t+=5)f=(r<<5|r>>>27)+((i^a)&c^a)+f+1518500249+n[t]|0,c=c<<30|c>>>2,a=(f<<5|f>>>27)+((c^i)&r^i)+a+1518500249+n[t+1]|0,r=r<<30|r>>>2,i=(a<<5|a>>>27)+((r^c)&f^c)+i+1518500249+n[t+2]|0,f=f<<30|f>>>2,c=(i<<5|i>>>27)+((f^r)&a^r)+c+1518500249+n[t+3]|0,a=a<<30|a>>>2,r=(c<<5|c>>>27)+((a^f)&i^f)+r+1518500249+n[t+4]|0,i=i<<30|i>>>2;f=(r<<5|r>>>27)+((i^a)&c^a)+f+1518500249+n[15]|0,c=c<<30|c>>>2,s=n[13]^n[8]^n[2]^n[0],s=s<<1|s>>>31,n[0]=s,a=(f<<5|f>>>27)+((c^i)&r^i)+a+1518500249+s|0,r=r<<30|r>>>2,s=n[14]^n[9]^n[3]^n[1],s=s<<1|s>>>31,n[1]=s,i=(a<<5|a>>>27)+((r^c)&f^c)+i+1518500249+s|0,f=f<<30|f>>>2,s=n[15]^n[10]^n[4]^n[2],s=s<<1|s>>>31,n[2]=s,c=(i<<5|i>>>27)+((f^r)&a^r)+c+1518500249+s|0,a=a<<30|a>>>2,s=n[0]^n[11]^n[5]^n[3],s=s<<1|s>>>31,n[3]=s,r=(c<<5|c>>>27)+((a^f)&i^f)+r+1518500249+s|0,i=i<<30|i>>>2;for(let t=20;t<40;t+=5)s=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],s=s<<1|s>>>31,n[15&t]=s,f=(r<<5|r>>>27)+(c^i^a)+f+1859775393+s|0,c=c<<30|c>>>2,s=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],s=s<<1|s>>>31,n[t+1&15]=s,a=(f<<5|f>>>27)+(r^c^i)+a+1859775393+s|0,r=r<<30|r>>>2,s=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],s=s<<1|s>>>31,n[t+2&15]=s,i=(a<<5|a>>>27)+(f^r^c)+i+1859775393+s|0,f=f<<30|f>>>2,s=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],s=s<<1|s>>>31,n[t+3&15]=s,c=(i<<5|i>>>27)+(a^f^r)+c+1859775393+s|0,a=a<<30|a>>>2,s=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],s=s<<1|s>>>31,n[t+4&15]=s,r=(c<<5|c>>>27)+(i^a^f)+r+1859775393+s|0,i=i<<30|i>>>2;for(let t=40;t<60;t+=5)s=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],s=s<<1|s>>>31,n[15&t]=s,f=(r<<5|r>>>27)+(c&i|(c|i)&a)+f+2400959708+s|0,c=c<<30|c>>>2,s=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],s=s<<1|s>>>31,n[t+1&15]=s,a=(f<<5|f>>>27)+(r&c|(r|c)&i)+a+2400959708+s|0,r=r<<30|r>>>2,s=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],s=s<<1|s>>>31,n[t+2&15]=s,i=(a<<5|a>>>27)+(f&r|(f|r)&c)+i+2400959708+s|0,f=f<<30|f>>>2,s=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],s=s<<1|s>>>31,n[t+3&15]=s,c=(i<<5|i>>>27)+(a&f|(a|f)&r)+c+2400959708+s|0,a=a<<30|a>>>2,s=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],s=s<<1|s>>>31,n[t+4&15]=s,r=(c<<5|c>>>27)+(i&a|(i|a)&f)+r+2400959708+s|0,i=i<<30|i>>>2;for(let t=60;t<80;t+=5)s=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],s=s<<1|s>>>31,n[15&t]=s,f=(r<<5|r>>>27)+(c^i^a)+f+3395469782+s|0,c=c<<30|c>>>2,s=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],s=s<<1|s>>>31,n[t+1&15]=s,a=(f<<5|f>>>27)+(r^c^i)+a+3395469782+s|0,r=r<<30|r>>>2,s=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],s=s<<1|s>>>31,n[t+2&15]=s,i=(a<<5|a>>>27)+(f^r^c)+i+3395469782+s|0,f=f<<30|f>>>2,s=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],s=s<<1|s>>>31,n[t+3&15]=s,c=(i<<5|i>>>27)+(a^f^r)+c+3395469782+s|0,a=a<<30|a>>>2,s=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],s=s<<1|s>>>31,n[t+4&15]=s,r=(c<<5|c>>>27)+(i^a^f)+r+3395469782+s|0,i=i<<30|i>>>2;t[0]=t[0]+r|0,t[1]=t[1]+c|0,t[2]=t[2]+i|0,t[3]=t[3]+a|0,t[4]=t[4]+f|0}}(),e=new r(W),s=new r(W);t.length>W&&(n.update(t,0,t.length),t=n.digest());for(let n=0;n<W;n++){const o=n<t.length?t[n]:0;e[n]=54^o,s[n]=92^o}return n.update(e,0,W),{update(t,e,o){n.update(t,e,o)},digest(){const t=n.digest();n.update(s,0,W),n.update(t,0,j);const o=n.digest();return n.update(e,0,W),o}}}function Y(t){return H[t>>>24]<<24|H[t>>>16&255]<<16|H[t>>>8&255]<<8|H[255&t]}function Z(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function $(t){return 255&(t<<1^27*(t>>7))}const _=typeof h!=k&&typeof h.getRandomValues==z,tt="Invalid password",nt="zipjs-abort-check-password";function et(t){if(_)return h.getRandomValues(t);throw new s("Crypto API not supported")}const ot={name:"PBKDF2"},st=n.assign({hash:{name:"HMAC"}},ot),rt=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ot),ct=["deriveBits"],it=[8,12,16],at=[16,24,32],ft=10,ut=typeof h!=k,wt=ut&&h.subtle;let lt=ut&&typeof wt!=k&&typeof wt.importKey==z&&typeof wt.deriveBits==z,ht=Q;class pt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e,checkPasswordOnly:o,checkAuthenticationCode:c=!0}){super({start(){yt(this,t,n,e)},async transform(t,n){const e=this,{password:c,strength:i,l:a,ready:f}=e;c?(await async function(t,n,e,o){const r=await gt(t,n,e,kt(o,0,it[n])),c=kt(o,it[n]);if(r[0]!=c[0]||r[1]!=c[1])throw St(t),new s(tt)}(e,i,c,kt(t,0,it[i]+2)),t=kt(t,it[i]+2),o?(St(e),n.error(new s(nt))):a()):await f;const u=new r(t.length-ft-(t.length-ft)%16);n.enqueue(mt(e,t,u,0,ft,!0))},async flush(t){const{h:n,m:e,ready:o}=this;if(n){await o;const i=kt(e,e.length-ft),a=new r(kt(e,0,e.length-ft));n.process(a,!0);const f=n.digest();let u=e.length<ft?1:0;for(let t=0;t<ft;t++)u|=f[t]^i[t];if(u&&c)throw new s("Invalid authentication code");t.enqueue(a)}},cancel(){St(this)}})}}class dt extends d{constructor({password:t,rawPassword:n,encryptionStrength:e}){super({start(){yt(this,t,n,e)},async transform(t,n){const e=this,{password:o,strength:s,l:c,ready:i}=e;let a=b;o?(a=await async function(t,n,e){const o=et(new r(it[n]));return B(o,await gt(t,n,e,o))}(e,s,o),c()):await i;const f=new r(a.length+t.length-t.length%16);f.set(a,0),n.enqueue(mt(e,t,f,a.length,0,!1))},async flush(t){const{h:n,m:e,ready:o}=this;if(n){await o;const s=new r(e);n.process(s,!1);const c=kt(n.digest(),0,ft);t.enqueue(B(s,c))}},cancel(){St(this)}})}}function yt(t,e,o,s){n.assign(t,{ready:new w(n=>t.l=n),password:vt(e,o),strength:s-1,m:b})}function mt(t,n,e,o,s,c){const{h:i,m:a}=t;a.length&&(n=B(a,n));const f=n.length-s,u=f-f%16;if(e=function(t,n){if(n&&n>t.length){const e=t;(t=new r(n)).set(e,0)}return t}(e,o+u),u){const t=kt(e,o,o+u);t.set(kt(n,0,u)),i.process(t,c)}return t.m=kt(n,u),e}function St({h:t}){t&&t.dispose&&t.dispose()}async function gt(t,e,s,c){t.password=null;const i=at[e],a=await async function(t,e,s){if(lt)try{const o=await wt.importKey("raw",t,st,!1,ct);return new r(await wt.deriveBits(n.assign({salt:e},rt),o,8*s))}catch{lt=!1}return function(t,n,e,s){const c=X(t),i=new r(s),a=new r(n.length+4),f=new u(a.buffer);a.set(n);for(let t=1,e=0;e<s;t++,e+=j){f.setUint32(n.length,t),c.update(a,0,a.length);let r=c.digest();const u=r.slice();for(let t=1;t<1e3;t++){c.update(r,0,j),r=c.digest();for(let t=0;t<j;t++)u[t]^=r[t]}i.set(u.subarray(0,o.min(j,s-e)),e)}return i}(t,e,0,s)}(s,c,2*i+2);return t.h=ht(kt(a,0,i),kt(a,i,2*i)),kt(a,2*i)}function vt(t,n){return n===v?function(t){if(typeof l==k){t=unescape(encodeURIComponent(t));const n=new r(t.length);for(let e=0;e<n.length;e++)n[e]=t.charCodeAt(e);return n}return(new l).encode(t)}(t):n}function kt(t,n,e){return t.subarray(n,e)}class zt extends d{constructor({password:t,rawPassword:n,passwordVerification:e,checkPasswordOnly:o}){super({start(){Ct(this,t,n,e)},transform(t,n){const e=this;if(e.password||e.rawPassword){const n=It(e,t.subarray(0,12));if(e.password=e.rawPassword=null,0!=(n[11]^e.passwordVerification))throw new s(tt);t=t.subarray(12)}o?n.error(new s(nt)):n.enqueue(It(e,t))}})}}class bt extends d{constructor({password:t,rawPassword:n,passwordVerification:e}){super({start(){Ct(this,t,n,e)},transform(t,n){const e=this;let o,s;if(e.password||e.rawPassword){e.password=e.rawPassword=null;const n=et(new r(12));n[11]=e.passwordVerification,o=new r(t.length+n.length),o.set(At(e,n),0),s=12}else o=new r(t.length),s=0;o.set(At(e,t),s),n.enqueue(o)}})}}function Ct(t,e,o,s){n.assign(t,{password:e,rawPassword:o,passwordVerification:s}),function(t,e,o){const s=[305419896,591751049,878082192];if(n.assign(t,{keys:s,S:new R(s[0]),v:new R(s[2])}),o)for(let n=0;n<o.length;n++)Mt(t,o[n]);else for(let n=0;n<e.length;n++)Mt(t,e.charCodeAt(n))}(t,e,o)}function It(t,n){const e=new r(n.length);for(let o=0;o<n.length;o++)e[o]=xt(t)^n[o],Mt(t,e[o]);return e}function At(t,n){const e=new r(n.length);for(let o=0;o<n.length;o++)e[o]=xt(t)^n[o],Mt(t,n[o]);return e}function Mt(t,n){let[,e]=t.keys;t.S.append([n]);const s=~t.S.get();e=Dt(o.imul(Dt(e+Pt(s)),134775813)+1),t.v.append([e>>>24]);const r=~t.v.get();t.keys=[s,e,r]}function xt(t){const n=2|t.keys[2];return Pt(o.imul(n,1^n)>>>8)}function Pt(t){return 255&t}function Dt(t){return 4294967295&t}function Ft(t){if(t instanceof y)return t;const n=t.getReader();return new y({async pull(t){const{value:e,done:o}=await n.read();o?t.close():t.enqueue(e)},cancel:t=>n.cancel(t)})}const Et=new f;function Rt(t){return Et.get(t)}const Ut="Invalid uncompressed size",Bt="Invalid CRC32",Vt="deflate-raw",Wt="gzip",jt=[31,139,8];class Kt extends d{constructor(t,{chunkSize:n,CompressionStreamFallback:e,CompressionStream:o}){super({});const{compressed:s,encrypted:r,useCompressionStream:c,zipCrypto:i,computeCrc32:a,level:f,deflate64:w,format:l,compressionMethod:h,inputSize:p}=t,d=this;let y,m,S,g=super.readable;const v=l&&Rt(l),k=qt(c,o,e),z=a&&s&&!w&&!v&&(!r||i)&&Boolean(k);if(r&&!i||!a||z||(y=new U,g=Jt(g,y)),s)if(v)g=Qt(g,Nt(v.CompressionStream,l,{level:f,chunkSize:n,compressionMethod:h,uncompressedSize:p}));else if(z)S=new Ot,g=Qt(g,new k(Wt,{level:f,chunkSize:n})),g=Jt(g,S);else try{g=Gt(g,c,{level:f,chunkSize:n},o,e)}catch(t){if(!c&&e)throw t;let n;try{n=new o(Wt)}catch{throw t}g=Qt(g,n),g=Jt(g,new Ot)}r&&(i?g=Jt(g,new bt(t)):(m=new dt(t),g=Jt(g,m))),Lt(d,g,()=>{r&&!i||!a||(d.crc32=z?S.crc32:new u(y.value.buffer).getUint32(0))})}}class Ot extends d{constructor(){let t,n=10,e=new r(0);super({transform(t,s){if(n){const e=o.min(n,t.length);if(n-=e,!(t=t.subarray(e)).length)return}const r=e.length+t.length;if(r<=8)return void(e=B(e,t));const c=r-8,i=o.min(c,e.length);s.enqueue(B(e.subarray(0,i),t.subarray(0,c-i))),e=B(e.subarray(i),t.subarray(c-i))},flush(){const n=V(e);t.crc32=n.getUint32(0,!0),t.uncompressedSize=n.getUint32(4,!0)}}),t=this}}class Tt extends d{constructor(t,{chunkSize:n,DecompressionStreamFallback:e,DecompressionStream:o}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:l,useCompressionStream:h,deflate64:p,format:d,compressionMethod:m,rawBitFlag:S,outputSize:g}=t;let k,z,b,C=super.readable;if(i&&(c?C=Jt(C,new zt(t)):(z=new pt(t),C=Jt(C,z))),l){const t=d&&Rt(d);if(t)C=Qt(C,Nt(t.DecompressionStream,d,{chunkSize:n,compressionMethod:m,rawBitFlag:S,uncompressedSize:g}));else{let t;const c=qt(h,o,e);if(a&&!p&&f!==v&&g!==v&&c)try{t=new c(Wt,{chunkSize:n})}catch{t=v}if(!t)try{C=Gt(C,h,{chunkSize:n,deflate64:p},o,e)}catch(n){if(p||g===v||!h&&e)throw n;try{t=new o(Wt)}catch{throw n}}t&&(b=!0,C=function(t,n,e,o){const c=n.writable.getWriter(),i=n.readable.getReader(),a=o===v?new R:v;let f,u,l=0,h=!1,p=!1,d=!1,m=0,S=!1;const g=new w((t,n)=>{f=t,u=n});return g.catch(()=>{}),async function(){const n=t.getReader();try{const t=new r(10);for(t.set(jt),await c.write(t);;){await c.ready;const{value:t,done:e}=await n.read();if(e)break;await c.write(t)}h=!0,a&&(S&&z(),await g);const s=new r(8),i=V(s);i.setUint32(0,a?a.get():o,!0),i.setUint32(4,e,!0),p=!0,await c.write(s),await c.close()}catch(t){await Xt(c,t),await Yt(n,t)}}(),new y({async pull(t){let n;try{n=await function(){m++,S=!0;const t=i.read();return t.then(k,k),h&&a&&z(),t}()}catch(t){throw p?function(t){const n=new s(l==e?Bt:Ut);return n.cause=t,n}(t):t}const{value:o,done:r}=n;if(r)t.close();else{if(l+=o.length,l>e){const t=new s(Ut);throw u(t),await Yt(i,t),t}a&&a.append(o),t.enqueue(o)}},cancel:t=>(u(t),i.cancel(t))});function k(){S=!1}async function z(){if(!d){d=!0;const t=m;await new w(t=>{const{port1:n,port2:e}=new MessageChannel;e.onmessage=()=>{n.close(),e.close(),t()},n.postMessage(v)}),d=!1,S&&(m==t?f():z())}}}(C,t,g,f))}C=function(t){const n=t.getReader();return new y({async pull(t){let e;try{e=await n.read()}catch(t){if(t&&t.message)throw t;const n=new s("Invalid compressed data");throw n.cause=t,n}const{value:o,done:r}=e;r?t.close():t.enqueue(o)},cancel:t=>n.cancel(t)})}(C)}a&&!b&&(k=new U,C=Jt(C,k)),Lt(this,C,()=>{if(k){const t=new u(k.value.buffer).getUint32(0,!1);if(f!=t)throw new s(Bt)}})}}const Ht=new f;function Lt(t,e,o){e=Jt(e,new d({flush:o})),n.defineProperty(t,"readable",{get:()=>e})}function Nt(t,n,e){if(!t)throw new s("Compression method not supported");return new t(n,e)}function qt(t,n,e){return t&&n?n:e&&e.requiresModule?e:void 0}function Gt(t,n,e,o,s){const r=n&&o?o:s||o,c=e.deflate64?"deflate64-raw":Vt;let i;try{i=new r(c,e)}catch(t){if(!n||!s||r==s)throw t;i=new s(c,e)}return Qt(t,i)}function Jt(t,n){return Ft(t).pipeThrough(n)}function Qt(t,n){const e=n.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await e.ready;const t=await o.read();if(t.done){await e.close();break}await e.write(t.value)}}catch(t){await Xt(e,t),await Yt(o,t)}}(),n.readable}async function Xt(t,n){try{await t.abort(n)}catch{}}async function Yt(t,n){try{await t.cancel(n)}catch{}}const Zt="data",$t="deflate";class _t extends d{constructor(t,e){super({});const o=this,{codecType:r}=t;let c;r.startsWith($t)?c=Kt:r.startsWith("inflate")&&(c=Tt),o.outputSize=0;let i=0;const a=new c(t,e),f=super.readable,u=new d({transform(t,n){t&&t.length&&(i+=t.length,n.enqueue(t))},flush(){n.assign(o,{inputSize:i})}}),w=new d({transform(n,e){if(n&&n.length&&(e.enqueue(n),o.outputSize+=n.length,t.outputSize!==v&&o.outputSize>t.outputSize))throw new s(Ut)},flush(){const{crc32:t}=a;n.assign(o,{crc32:t,inputSize:i})}});n.defineProperty(o,"readable",{get:()=>f.pipeThrough(u).pipeThrough(a).pipeThrough(w)})}}class tn extends d{constructor(t){const o=[];let s=0,c=0;function i(){const n=new r(t);let e=0;for(;e<t;){const s=o[0],r=t-e;s.length<=r?(n.set(s,e),e+=s.length,o.shift()):(n.set(s.subarray(0,r),e),o[0]=s.subarray(r),e+=r)}return s-=t,n}(!e.isFinite(t)||t<1)&&(t=65536),super({transform(n,e){for(o.push(n),s+=n.length;s>t;)c+=t,e.enqueue(i())},flush(t){s&&(c+=s,t.enqueue(function(t,n){const e=new r(n);let o=0;for(const n of t)e.set(n,o),o+=n.length;return e}(o,s)))}}),n.defineProperty(this,"outputSize",{get:()=>c})}}let nn=2;try{typeof navigator!=k&&navigator.hardwareConcurrency&&(nn=navigator.hardwareConcurrency)}catch{}function en(t){return Boolean(t)&&"object"==typeof t}const on=new f,sn=new f,rn=function(){try{return structuredClone(new s)instanceof s}catch{return!1}}();let cn=0;async function an(t){let n,r,c;try{const{options:i,config:a}=t;if(i.format)try{await async function(t,n){!Et.has(t)&&n&&function(t,n){const{CompressionStream:e,DecompressionStream:o}=n;if(typeof e!=z&&typeof o!=z)throw new s("Invalid codec module");Et.set(t,{CompressionStream:e,DecompressionStream:o})}(t,await(import(n)))}(i.format,i.codecURI)}catch(t){if(en(t))try{t.codecImportFailed=!0}catch{}throw t}if(a.CompressionStream=self.CompressionStream,a.DecompressionStream=self.DecompressionStream,i.compressed&&!i.format)if(i.useCompressionStream){if(!function(t,n){if(!t)return!1;let e=Ht.get(t);e||(e=new f,Ht.set(t,e));let o=e.get(n);if(o===v){try{new t(n),o=!0}catch{o=!1}e.set(n,o)}return o}(i.codecType.startsWith($t)?a.CompressionStream:a.DecompressionStream,Vt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{i.useCompressionStream=!0}if(i.encrypted&&!i.zipCrypto)try{await self.initModule(t.config)}catch{}!a.CompressionStreamFallback&&a.CompressionStreamZlib&&(a.CompressionStreamFallback=a.CompressionStreamZlib),!a.DecompressionStreamFallback&&a.DecompressionStreamZlib&&(a.DecompressionStreamFallback=a.DecompressionStreamZlib);const u={highWaterMark:1},l=t.readable?Ft(t.readable):new y({async pull(t){const n=new w(t=>on.set(cn,t));fn({type:"pull",messageId:cn}),cn=(cn+1)%e.MAX_SAFE_INTEGER;const{value:o,done:s}=await n;t.enqueue(o),s&&t.close()}},u);c=t.writable?function(t){if(t instanceof m)return t;const n=t.getWriter();return new m({write:t=>n.write(t),close:()=>n.close(),abort:t=>n.abort(t)})}(t.writable):new m({async write(t){let n;const o=new w(t=>n=t);sn.set(cn,n),fn({type:Zt,value:t,messageId:cn}),cn=(cn+1)%e.MAX_SAFE_INTEGER,await o}},u),n=new _t(i,a),r=new tn(function(t){return s="string"==typeof(n=s=t.chunkSize)&&n.trim()?e(n):n,e.isInteger(s)&&s>=1?o.max(s,64):65536;var n,s}(a)),await l.pipeThrough(n).pipeThrough(r).pipeTo(c,{preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{crc32:h,inputSize:p,outputSize:d}=n;fn({type:"close",result:{crc32:h,inputSize:p,outputSize:d}})}catch(t){const n=r?r.outputSize:0;if(en(t))try{t.outputSize=n}catch{}if(c&&!c.locked)try{await c.getWriter().close()}catch{}un(t,n)}}function fn(t){const{value:n}=t;if(n)if(n.length)try{t.value=(e=n,e.byteOffset||e.byteLength!=e.buffer.byteLength?new r(e):e).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var e}function un(t,n){const{message:e,stack:o,code:r,name:c,outputSize:i,cause:a,codecImportFailed:f}=function(t=new s("Unknown error")){return en(t)?t:new s(String(t))}(t),u={message:e,stack:o,code:r,name:c,outputSize:i===v?n:i};if(a&&(u.cause={name:a.name,message:a.message}),f&&(u.codecImportFailed=!0),rn)try{return void p({error:u,errorValue:{value:t}})}catch{}p({error:u})}addEventListener("message",({data:t})=>{const{type:n,messageId:e,value:o,done:s}=t;try{if("start"==n&&an(t),n==Zt){const t=on.get(e);on.delete(e),t({value:o||new r,done:s})}if("ack"==n){const t=sn.get(e);sn.delete(e),t()}}catch(t){un(t)}}),p({type:"ready"});const wn="deflate",ln="deflate-raw",hn="deflate64-raw",pn="gzip";let dn,yn,mn,Sn,gn;function vn(t,n,e={}){if(!dn){const t=new s("WASM module not loaded");throw t.cause=gn,t}const c="number"==typeof e.level?e.level:-1,i="number"==typeof e.outBuffer?e.outBuffer:65536,a="number"==typeof e.inBufferSize?e.inBufferSize:65536;return new d({start(){try{let e;if(this.C=yn(i),this.in=yn(a),this.inBufferSize=a,!this.C||!this.in)throw new s("allocation failed");if(t?(this.I=dn.deflate_process,this.A=dn.deflate_last_consumed,this.M=dn.deflate_end,this.P=dn.deflate_new(),e=n===pn?dn.deflate_init_gzip(this.P,c):n===ln?dn.deflate_init_raw(this.P,c):dn.deflate_init(this.P,c)):n===hn?(this.I=dn.inflate9_process,this.A=dn.inflate9_last_consumed,this.M=dn.inflate9_end,this.P=dn.inflate9_new(),e=dn.inflate9_init_raw(this.P)):(this.I=dn.inflate_process,this.A=dn.inflate_last_consumed,this.M=dn.inflate_end,this.P=dn.inflate_new(),e=n===ln?dn.inflate_init_raw(this.P):n===pn?dn.inflate_init_gzip(this.P):dn.inflate_init(this.P)),0!==e)throw new s("init failed:"+e)}catch(t){throw f(this),t}},transform(t,n){try{const e=t,c=new r(Sn.buffer),a=this.I,f=this.A,u=this.C;let w=0;for(;w<e.length;){const t=o.min(e.length-w,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&mn&&(mn(this.in),this.in=0),this.in=yn(t),this.inBufferSize=t,!this.in))throw new s("allocation failed");c.set(e.subarray(w,w+t),this.in);const r=a(this.P,this.in,t,u,i,0),l=r>>24&255,h=128&l?l-256:l;if(h<0)throw new s("process error:"+h);const p=16777215&r;p&&n.enqueue(c.slice(u,u+p));const d=f(this.P);if(0===d&&0===p)break;w+=d}}catch(t){f(this),n.error(t)}},flush(t){try{const n=new r(Sn.buffer),e=this.I,o=this.C;for(;;){const r=e(this.P,0,0,o,i,4),c=r>>24&255,a=128&c?c-256:c;if(a<0)throw new s("process error:"+a);const f=16777215&r;if(f&&t.enqueue(n.slice(o,o+f)),1===c||0===f)break}}catch(n){t.error(n)}finally{const n=f(this);0!==n&&t.error(new s("end error:"+n))}},cancel(){f(this)}});function f(t){let n=0;return t.P&&t.M&&(n=t.M(t.P)),t.P=0,t.in&&mn&&mn(t.in),t.in=0,t.C&&mn&&mn(t.C),t.C=0,n}}class kn{constructor(t=wn,n){return vn(!0,t,n)}}class zn{constructor(t=wn,n){return vn(!1,t,n)}}kn.requiresModule=!0,zn.requiresModule=!0,kn.supportedFormats=[wn,ln,pn],zn.supportedFormats=[wn,ln,pn,hn];const bn=65536;let Cn,In;function An(t){return new r(t.memory.buffer)}let Mn=!1;!function(t={}){const{init:n,D:e}=t,o=t.CompressionStreamFallback||t.CompressionStreamZlib,s=t.DecompressionStreamFallback||t.DecompressionStreamZlib;e&&(ht=e||Q),self.initModule=async t=>{n&&await n(t),o&&(t.CompressionStreamFallback=o),s&&(t.DecompressionStreamFallback=s)}}({CompressionStreamFallback:kn,DecompressionStreamFallback:zn,D:function(t,n){const e=Cn;let o=e?function(t,n,e){In||(In=t.malloc(bn));const o=In?t.aes_hmac_new():0;if(o){const s=An(t);if(s.set(n,In),s.set(e,In+n.length),t.aes_hmac_init(o,In,n.length,In+n.length,e.length))return t.aes_hmac_end(o,0),0}return o}(e,t,n):0;if(!o)return Q(t,n);const s=In;return{process(t,n){for(let r=0;r<t.length;r+=bn){const c=t.subarray(r,r+bn),i=An(e);i.set(c,s),e.aes_hmac_process(o,s,c.length,n?1:0),c.set(i.subarray(s,s+c.length))}},digest:()=>(e.aes_hmac_end(o,s),o=0,An(e).slice(s,s+20)),dispose(){o&&(e.aes_hmac_end(o,0),o=0)}}},init:t=>async function(t,{baseURI:n}){if(!Mn)try{await async function(t,n){let e,o;try{try{o=new URL(t,n)}catch{}const s=await fetch(o);e=await s.arrayBuffer()}catch(n){if(!t.startsWith("data:application/wasm;base64,"))throw n;e=function(t){const n=t.split(",")[1],e=atob(n),o=e.length,s=new r(o);for(let t=0;t<o;++t)s[t]=e.charCodeAt(t);return s.buffer}(t)}const c=await WebAssembly.instantiate(e);var i;(function(t){if(dn=t,({malloc:yn,free:mn,memory:Sn}=dn),"function"!=typeof yn||"function"!=typeof mn||!Sn)throw dn=yn=mn=Sn=null,new s("Invalid WASM module")})(c.instance.exports),typeof(i=c.instance.exports).aes_hmac_new==z&&(Cn=i,In=0)}(t,n),Mn=!0}catch(t){throw function(t){gn=t}(t),t}}(t.wasmURI,t)})});\n';
|
|
37633
|
+
if ("string" == typeof s4 && (s4 = new TextEncoder().encode(s4)), t4) {
|
|
37634
|
+
const t5 = new Blob([s4], { type: e3 });
|
|
36939
37635
|
return URL.createObjectURL(t5);
|
|
36940
37636
|
}
|
|
36941
37637
|
return "data:" + e3 + ";base64," + function(t5) {
|
|
36942
37638
|
let e4 = "";
|
|
36943
|
-
const
|
|
36944
|
-
let
|
|
36945
|
-
for (;
|
|
36946
|
-
const
|
|
36947
|
-
e4 += n[
|
|
37639
|
+
const s5 = t5.length;
|
|
37640
|
+
let r2 = 0;
|
|
37641
|
+
for (; r2 + 2 < s5; r2 += 3) {
|
|
37642
|
+
const s6 = t5[r2] << 16 | t5[r2 + 1] << 8 | t5[r2 + 2];
|
|
37643
|
+
e4 += n[s6 >> 18 & 63] + n[s6 >> 12 & 63] + n[s6 >> 6 & 63] + n[63 & s6];
|
|
36948
37644
|
}
|
|
36949
|
-
const o2 =
|
|
37645
|
+
const o2 = s5 - r2;
|
|
36950
37646
|
if (1 === o2) {
|
|
36951
|
-
const
|
|
36952
|
-
e4 += n[
|
|
37647
|
+
const s6 = t5[r2] << 16;
|
|
37648
|
+
e4 += n[s6 >> 18 & 63] + n[s6 >> 12 & 63] + "==";
|
|
36953
37649
|
} else if (2 === o2) {
|
|
36954
|
-
const
|
|
36955
|
-
e4 += n[
|
|
37650
|
+
const s6 = t5[r2] << 16 | t5[r2 + 1] << 8;
|
|
37651
|
+
e4 += n[s6 >> 18 & 63] + n[s6 >> 12 & 63] + n[s6 >> 6 & 63] + "=";
|
|
36956
37652
|
}
|
|
36957
37653
|
return e4;
|
|
36958
|
-
}(
|
|
37654
|
+
}(s4);
|
|
36959
37655
|
} });
|
|
36960
37656
|
|
|
36961
37657
|
// ../../node_modules/@zip.js/zip.js/lib/zip-core-base.js
|
|
@@ -40528,6 +41224,7 @@ var THEME_PATH = "src/theme/tokens.json";
|
|
|
40528
41224
|
var RUNTIME_CAPABILITIES_PATH = ".platform-sdk/runtime-capabilities.json";
|
|
40529
41225
|
var LEGACY_RUNTIME_CARD_SCHEMA_VERSIONS = ["2", "3"];
|
|
40530
41226
|
var DRAFT_FILE_MAX_BYTES = 1024 * 1024;
|
|
41227
|
+
var TRANSFORM_PREVIEW_REQUEST_MAX_BYTES = 4 * 1024 * 1024;
|
|
40531
41228
|
var DRAFT_LIST_LIMIT = 1e3;
|
|
40532
41229
|
var AGENT_CONFIG_MAX_BYTES = 16777215;
|
|
40533
41230
|
var FINALIZE_LOCK_PATH = ".linkque/runtime/card-finalize.lock";
|
|
@@ -40617,6 +41314,48 @@ async function finalizeCardFromRequest(cwd, requestFile) {
|
|
|
40617
41314
|
request.contextChecksum
|
|
40618
41315
|
);
|
|
40619
41316
|
}
|
|
41317
|
+
async function previewCardTransformFromRequest(cwd, requestFile) {
|
|
41318
|
+
const value = await readRequiredJsonWithLimit(
|
|
41319
|
+
import_path22.default.resolve(cwd, requestFile),
|
|
41320
|
+
TRANSFORM_PREVIEW_REQUEST_MAX_BYTES
|
|
41321
|
+
);
|
|
41322
|
+
if (!isCardTransformPreviewRequest(value)) {
|
|
41323
|
+
throw new LinkqueCliError(
|
|
41324
|
+
"CARD_DRAFT_INVALID",
|
|
41325
|
+
"\u6570\u636E\u8F6C\u6362\u8BD5\u8FD0\u884C\u8BF7\u6C42\u683C\u5F0F\u65E0\u6548"
|
|
41326
|
+
);
|
|
41327
|
+
}
|
|
41328
|
+
const executor = new DataTransformExecutor();
|
|
41329
|
+
try {
|
|
41330
|
+
const result = await executor.execute(value.source, value.input);
|
|
41331
|
+
if (result.data !== null) {
|
|
41332
|
+
result.data = normalizeCardDataValue(
|
|
41333
|
+
value.dataModelSchema,
|
|
41334
|
+
result.data
|
|
41335
|
+
);
|
|
41336
|
+
}
|
|
41337
|
+
if (result.data !== null) {
|
|
41338
|
+
const issues = validateJsonSchemaValue2(
|
|
41339
|
+
value.dataModelSchema,
|
|
41340
|
+
result.data
|
|
41341
|
+
);
|
|
41342
|
+
if (issues.length > 0) {
|
|
41343
|
+
throw new LinkqueCliError(
|
|
41344
|
+
"CARD_TRANSFORM_OUTPUT_SCHEMA_MISMATCH",
|
|
41345
|
+
`\u6570\u636E\u8F6C\u6362\u7ED3\u679C\u4E0D\u7B26\u5408 Schema\uFF1A${issues[0].path} ${issues[0].message}`
|
|
41346
|
+
);
|
|
41347
|
+
}
|
|
41348
|
+
}
|
|
41349
|
+
return { ...result, status: result.data === null ? "skipped" : "rendered" };
|
|
41350
|
+
} catch (cause) {
|
|
41351
|
+
if (cause instanceof DataTransformError) {
|
|
41352
|
+
throw new LinkqueCliError(cause.code, cause.message, { cause });
|
|
41353
|
+
}
|
|
41354
|
+
throw cause;
|
|
41355
|
+
} finally {
|
|
41356
|
+
await executor.close();
|
|
41357
|
+
}
|
|
41358
|
+
}
|
|
40620
41359
|
async function rollbackCardFinalize(cwd, rollbackToken) {
|
|
40621
41360
|
const payload = parseRollbackToken(rollbackToken);
|
|
40622
41361
|
return withWorkspaceLock(
|
|
@@ -40667,6 +41406,29 @@ async function validateCardBindingsForBundle(cwd, draftId, bundle, fieldId) {
|
|
|
40667
41406
|
const mountedMcpResourceIds = new Set(
|
|
40668
41407
|
mcpResources.map((resource) => String(resource.resourceId))
|
|
40669
41408
|
);
|
|
41409
|
+
if (bundle.manifest.schemaVersion === "4" && bundle.manifest.dataMode === "pipeline") {
|
|
41410
|
+
const missing = bundle.manifest.dataSources.filter(
|
|
41411
|
+
(source) => !mountedMcpResourceIds.has(source.mcpResourceId)
|
|
41412
|
+
);
|
|
41413
|
+
if (missing.length > 0) {
|
|
41414
|
+
throw new LinkqueCliError(
|
|
41415
|
+
"CARD_BINDING_VALIDATION_FAILED",
|
|
41416
|
+
missing.map(
|
|
41417
|
+
(source, index) => `manifest.dataSources[${index}]: MCP resource ${source.mcpResourceId} is not mounted`
|
|
41418
|
+
).join("; ")
|
|
41419
|
+
);
|
|
41420
|
+
}
|
|
41421
|
+
const businessFieldIds2 = bundle.manifest.fields.filter((field) => field.source === "business").map((field) => field.fieldId);
|
|
41422
|
+
return {
|
|
41423
|
+
bindingCount: bundle.manifest.dataSources.length,
|
|
41424
|
+
complete: true,
|
|
41425
|
+
draftChecksum: draftChecksum(bundle),
|
|
41426
|
+
draftId,
|
|
41427
|
+
draftStructureChecksum,
|
|
41428
|
+
validatedFieldIds: fieldId ? [fieldId] : businessFieldIds2,
|
|
41429
|
+
valid: true
|
|
41430
|
+
};
|
|
41431
|
+
}
|
|
40670
41432
|
const issues = context ? validateA2UICardBindings(
|
|
40671
41433
|
{ draft: bundle, context, mountedMcpResourceIds },
|
|
40672
41434
|
fieldId ? { fieldIds: /* @__PURE__ */ new Set([fieldId]) } : void 0
|
|
@@ -40714,6 +41476,25 @@ async function finalizeCardWhileLocked(cwd, draftId, expectedDraftChecksum) {
|
|
|
40714
41476
|
"\u5F53\u524D Runtime \u4E0D\u652F\u6301\u524D\u7AEF\u51FD\u6570 Action\uFF0C\u8BF7\u5148\u5347\u7EA7 Runtime"
|
|
40715
41477
|
);
|
|
40716
41478
|
}
|
|
41479
|
+
if (bundle.manifest.schemaVersion === "4" && bundle.manifest.dataMode === "pipeline" && !await readRuntimeSupportsDataPipeline(cwd)) {
|
|
41480
|
+
throw new LinkqueCliError(
|
|
41481
|
+
"CARD_RUNTIME_SCHEMA_UNSUPPORTED",
|
|
41482
|
+
"\u5F53\u524D Agent Runtime \u4E0D\u652F\u6301\u670D\u52A1\u7AEF\u6570\u636E\u8F6C\u6362 pipeline\uFF0C\u8BF7\u5148\u5347\u7EA7 Runtime"
|
|
41483
|
+
);
|
|
41484
|
+
}
|
|
41485
|
+
if (bundle.manifest.schemaVersion === "4" && bundle.manifest.dataMode === "pipeline") {
|
|
41486
|
+
const executor = new DataTransformExecutor();
|
|
41487
|
+
try {
|
|
41488
|
+
await executor.validateSource(bundle.manifest.dataTransform.source);
|
|
41489
|
+
} catch (cause) {
|
|
41490
|
+
if (cause instanceof DataTransformError) {
|
|
41491
|
+
throw new LinkqueCliError(cause.code, cause.message, { cause });
|
|
41492
|
+
}
|
|
41493
|
+
throw cause;
|
|
41494
|
+
} finally {
|
|
41495
|
+
await executor.close();
|
|
41496
|
+
}
|
|
41497
|
+
}
|
|
40717
41498
|
const context = parseOptionalBindingContext(
|
|
40718
41499
|
await readOptionalJson(import_path22.default.join(directory, "binding-context.json"))
|
|
40719
41500
|
);
|
|
@@ -40978,6 +41759,44 @@ async function readRequiredJson(file, missingCode = "CARD_DRAFT_INVALID") {
|
|
|
40978
41759
|
);
|
|
40979
41760
|
}
|
|
40980
41761
|
}
|
|
41762
|
+
async function readRequiredJsonWithLimit(file, maxBytes) {
|
|
41763
|
+
try {
|
|
41764
|
+
const content = await (0, import_promises15.readFile)(file, "utf8");
|
|
41765
|
+
if (Buffer.byteLength(content, "utf8") > maxBytes) {
|
|
41766
|
+
throw new LinkqueCliError(
|
|
41767
|
+
"CARD_DRAFT_INVALID",
|
|
41768
|
+
`${import_path22.default.basename(file)} \u8D85\u8FC7\u5927\u5C0F\u9650\u5236`
|
|
41769
|
+
);
|
|
41770
|
+
}
|
|
41771
|
+
return JSON.parse(content);
|
|
41772
|
+
} catch (cause) {
|
|
41773
|
+
if (cause instanceof LinkqueCliError) throw cause;
|
|
41774
|
+
if (isNodeError(cause, "ENOENT")) {
|
|
41775
|
+
throw new LinkqueCliError(
|
|
41776
|
+
"CARD_DRAFT_NOT_FOUND",
|
|
41777
|
+
`\u8BF7\u6C42\u6587\u4EF6\u7F3A\u5931: ${import_path22.default.basename(file)}`,
|
|
41778
|
+
{ cause }
|
|
41779
|
+
);
|
|
41780
|
+
}
|
|
41781
|
+
if (cause instanceof SyntaxError) {
|
|
41782
|
+
throw new LinkqueCliError(
|
|
41783
|
+
"CARD_DRAFT_INVALID",
|
|
41784
|
+
`\u8BF7\u6C42\u6587\u4EF6\u4E0D\u662F\u6709\u6548 JSON: ${import_path22.default.basename(file)}`,
|
|
41785
|
+
{ cause }
|
|
41786
|
+
);
|
|
41787
|
+
}
|
|
41788
|
+
throw new LinkqueCliError(
|
|
41789
|
+
"CARD_DRAFT_READ_FAILED",
|
|
41790
|
+
`\u8BF7\u6C42\u6587\u4EF6\u8BFB\u53D6\u5931\u8D25: ${import_path22.default.basename(file)}`,
|
|
41791
|
+
{ cause: cause instanceof Error ? cause : void 0 }
|
|
41792
|
+
);
|
|
41793
|
+
}
|
|
41794
|
+
}
|
|
41795
|
+
function isCardTransformPreviewRequest(value) {
|
|
41796
|
+
return isJsonObject(value) && value.version === 1 && typeof value.source === "string" && Array.isArray(value.input) && isJsonObject(value.dataModelSchema) && Object.keys(value).every(
|
|
41797
|
+
(key) => ["version", "source", "input", "dataModelSchema"].includes(key)
|
|
41798
|
+
);
|
|
41799
|
+
}
|
|
40981
41800
|
async function readOptionalJson(file) {
|
|
40982
41801
|
try {
|
|
40983
41802
|
return await readRequiredJson(file, "CARD_DRAFT_NOT_FOUND");
|
|
@@ -41013,6 +41832,12 @@ async function readRuntimeSupportsFunctionActions(cwd) {
|
|
|
41013
41832
|
).catch(() => void 0);
|
|
41014
41833
|
return isJsonObject(value) && value.schemaVersion === 1 && isJsonObject(value.a2uiCard) && value.a2uiCard.frontendFunctionActions === true;
|
|
41015
41834
|
}
|
|
41835
|
+
async function readRuntimeSupportsDataPipeline(cwd) {
|
|
41836
|
+
const value = await readOptionalJson(
|
|
41837
|
+
import_path22.default.join(cwd, RUNTIME_CAPABILITIES_PATH)
|
|
41838
|
+
).catch(() => void 0);
|
|
41839
|
+
return isJsonObject(value) && value.schemaVersion === 1 && isJsonObject(value.a2uiCard) && value.a2uiCard.serverDataPipeline === true;
|
|
41840
|
+
}
|
|
41016
41841
|
function containsFunctionAction(value) {
|
|
41017
41842
|
if (Array.isArray(value)) return value.some(containsFunctionAction);
|
|
41018
41843
|
if (!isJsonObject(value)) return false;
|
|
@@ -42236,6 +43061,13 @@ var nanoToMs = (nano) => {
|
|
|
42236
43061
|
return void 0;
|
|
42237
43062
|
}
|
|
42238
43063
|
};
|
|
43064
|
+
function reverse(arr) {
|
|
43065
|
+
const ret = [];
|
|
43066
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
43067
|
+
ret.push(arr[i]);
|
|
43068
|
+
}
|
|
43069
|
+
return ret;
|
|
43070
|
+
}
|
|
42239
43071
|
|
|
42240
43072
|
// ../linkque-agent-runtime-trace/dist/esm/decode.js
|
|
42241
43073
|
function validateMetadata(attrs) {
|
|
@@ -42432,7 +43264,7 @@ function decodeOtlpLine(line, source, byteRange) {
|
|
|
42432
43264
|
}
|
|
42433
43265
|
|
|
42434
43266
|
// ../linkque-agent-runtime-trace/dist/esm/summarize.js
|
|
42435
|
-
var
|
|
43267
|
+
var import_node_crypto3 = require("node:crypto");
|
|
42436
43268
|
var dedupKey = (advanceId, suffix) => `${advanceId ?? ""}
|
|
42437
43269
|
${suffix ?? ""}`;
|
|
42438
43270
|
var extractQueryInput = (facts) => {
|
|
@@ -42470,7 +43302,7 @@ var buildOperations = (facts) => {
|
|
|
42470
43302
|
const ends = group.flatMap((f3) => f3.finishedAt !== void 0 ? [f3.finishedAt] : f3.name?.endsWith(".finished") && f3.startedAt !== void 0 ? [f3.startedAt] : []);
|
|
42471
43303
|
const startedAt = starts.length ? Math.min(...starts) : void 0;
|
|
42472
43304
|
const finishedAt = ends.length ? Math.max(...ends) : void 0;
|
|
42473
|
-
const terminal = group.filter((f3) => f3.kind === "span" || f3.name?.endsWith(".finished"))
|
|
43305
|
+
const terminal = reverse(group.filter((f3) => f3.kind === "span" || f3.name?.endsWith(".finished")));
|
|
42474
43306
|
const outcome = terminal.map((f3) => f3.outcome).find((v2) => v2 && v2 !== "0") ?? void 0;
|
|
42475
43307
|
const operationId = group[0].identity.operationId;
|
|
42476
43308
|
const parentOperationId = attrs[ETelemetryAttribute.LINKQUE_OPERATION_PARENT_ID];
|
|
@@ -42606,7 +43438,7 @@ ${body.section}`;
|
|
|
42606
43438
|
section: body.section,
|
|
42607
43439
|
contentRef,
|
|
42608
43440
|
...body.reason === "content_limit" ? { reason: "content_limit" } : {},
|
|
42609
|
-
valueDigest: (0,
|
|
43441
|
+
valueDigest: (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(body.value) ?? "").digest("hex"),
|
|
42610
43442
|
...body.value && typeof body.value === "object" && (body.section.endsWith(".output") || body.section === "knowledge.input") ? {
|
|
42611
43443
|
result: Object.fromEntries(Object.entries(body.value).filter(([key, value]) => [
|
|
42612
43444
|
"status",
|
|
@@ -42673,8 +43505,8 @@ function summarize(input) {
|
|
|
42673
43505
|
}
|
|
42674
43506
|
|
|
42675
43507
|
// src/utils/otlpScanner.ts
|
|
42676
|
-
var
|
|
42677
|
-
var
|
|
43508
|
+
var import_node_path13 = __toESM(require("node:path"));
|
|
43509
|
+
var import_node_crypto4 = require("node:crypto");
|
|
42678
43510
|
var import_promises20 = require("node:fs/promises");
|
|
42679
43511
|
|
|
42680
43512
|
// src/commands/runs/types.ts
|
|
@@ -42695,7 +43527,10 @@ var parseDetailRef = (ref) => {
|
|
|
42695
43527
|
return void 0;
|
|
42696
43528
|
if (decoded.runId !== void 0 && typeof decoded.runId !== "string")
|
|
42697
43529
|
return void 0;
|
|
42698
|
-
if (decoded.readWindow !== void 0 && (!Array.isArray(decoded.readWindow) || decoded.readWindow.length > 8 || decoded.readWindow.some(
|
|
43530
|
+
if (decoded.readWindow !== void 0 && (!Array.isArray(decoded.readWindow) || decoded.readWindow.length > 8 || decoded.readWindow.some(
|
|
43531
|
+
(entry) => !entry || !["logs", "traces"].includes(entry.source) || !Number.isSafeInteger(entry.bytes) || entry.bytes < 0 || !/^[a-f0-9]{64}$/.test(entry.digest)
|
|
43532
|
+
)))
|
|
43533
|
+
return void 0;
|
|
42699
43534
|
return {
|
|
42700
43535
|
readWindow: decoded.readWindow,
|
|
42701
43536
|
advanceId: decoded.advanceId,
|
|
@@ -42726,7 +43561,7 @@ var scanFile = (content, source) => {
|
|
|
42726
43561
|
return { facts, warnings };
|
|
42727
43562
|
};
|
|
42728
43563
|
async function scanRetainedLogs(cwd, pinned) {
|
|
42729
|
-
const dir =
|
|
43564
|
+
const dir = import_node_path13.default.join(cwd, LOGS_ROOT);
|
|
42730
43565
|
let files;
|
|
42731
43566
|
try {
|
|
42732
43567
|
files = await (0, import_promises20.readdir)(dir);
|
|
@@ -42749,7 +43584,7 @@ async function scanRetainedLogs(cwd, pinned) {
|
|
|
42749
43584
|
for (const file of selected) {
|
|
42750
43585
|
try {
|
|
42751
43586
|
const source = retainedFiles.get(file);
|
|
42752
|
-
const filePath =
|
|
43587
|
+
const filePath = import_node_path13.default.join(dir, file);
|
|
42753
43588
|
const before = await (0, import_promises20.stat)(filePath);
|
|
42754
43589
|
const content = await (0, import_promises20.readFile)(filePath);
|
|
42755
43590
|
const after = await (0, import_promises20.stat)(filePath);
|
|
@@ -42760,13 +43595,20 @@ async function scanRetainedLogs(cwd, pinned) {
|
|
|
42760
43595
|
let complete = content.subarray(0, content.lastIndexOf(10) + 1);
|
|
42761
43596
|
let window;
|
|
42762
43597
|
if (pinned) {
|
|
42763
|
-
window = [...remaining].find(
|
|
43598
|
+
window = [...remaining].find(
|
|
43599
|
+
(entry) => entry.source === source && content.length >= entry.bytes && (0, import_node_crypto4.createHash)("sha256").update(content.subarray(0, entry.bytes)).digest("hex") === entry.digest
|
|
43600
|
+
);
|
|
42764
43601
|
if (!window) continue;
|
|
42765
43602
|
remaining.delete(window);
|
|
42766
43603
|
complete = content.subarray(0, window.bytes);
|
|
42767
43604
|
} else {
|
|
42768
|
-
if (complete.length !== content.length)
|
|
42769
|
-
|
|
43605
|
+
if (complete.length !== content.length)
|
|
43606
|
+
warnings.push("incomplete_tail");
|
|
43607
|
+
window = {
|
|
43608
|
+
source,
|
|
43609
|
+
bytes: complete.length,
|
|
43610
|
+
digest: (0, import_node_crypto4.createHash)("sha256").update(complete).digest("hex")
|
|
43611
|
+
};
|
|
42770
43612
|
}
|
|
42771
43613
|
readWindow.push(window);
|
|
42772
43614
|
const decoded = scanFile(complete.toString("utf8"), source);
|
|
@@ -42910,7 +43752,10 @@ ${g2.identity.runId ?? ""}` === latestRun.runKey
|
|
|
42910
43752
|
var scanExecution = async (input) => {
|
|
42911
43753
|
const identity = input.detailRef === void 0 ? void 0 : parseDetailRef(input.detailRef);
|
|
42912
43754
|
if (input.detailRef !== void 0 && !identity) return null;
|
|
42913
|
-
const { facts, warnings, readWindow } = await scanRetainedLogs(
|
|
43755
|
+
const { facts, warnings, readWindow } = await scanRetainedLogs(
|
|
43756
|
+
input.cwd,
|
|
43757
|
+
identity?.readWindow
|
|
43758
|
+
);
|
|
42914
43759
|
if (warnings.includes("read_window_expired")) return null;
|
|
42915
43760
|
if (identity) {
|
|
42916
43761
|
const filtered = facts.filter(
|
|
@@ -42918,13 +43763,22 @@ var scanExecution = async (input) => {
|
|
|
42918
43763
|
);
|
|
42919
43764
|
if (!filtered.length) return null;
|
|
42920
43765
|
const { readWindow: _window, ...executionIdentity } = identity;
|
|
42921
|
-
const snapshot2 = summarize({
|
|
43766
|
+
const snapshot2 = summarize({
|
|
43767
|
+
identity: executionIdentity,
|
|
43768
|
+
facts: filtered,
|
|
43769
|
+
observation: { warnings }
|
|
43770
|
+
});
|
|
42922
43771
|
return { ...snapshot2, detailRef: input.detailRef };
|
|
42923
43772
|
}
|
|
42924
43773
|
const selected = selectLatestAdvance(facts, input.threadId, input.runId);
|
|
42925
43774
|
if (!selected) return null;
|
|
42926
43775
|
const snapshot = summarize({ ...selected, observation: { warnings } });
|
|
42927
|
-
return {
|
|
43776
|
+
return {
|
|
43777
|
+
...snapshot,
|
|
43778
|
+
detailRef: Buffer.from(
|
|
43779
|
+
JSON.stringify({ ...selected.identity, readWindow })
|
|
43780
|
+
).toString("base64")
|
|
43781
|
+
};
|
|
42928
43782
|
};
|
|
42929
43783
|
|
|
42930
43784
|
// src/commands/runs/contentScanner.ts
|
|
@@ -42957,22 +43811,36 @@ var scanContent = async (input) => {
|
|
|
42957
43811
|
if (value !== void 0 && (typeof value !== "string" || !value))
|
|
42958
43812
|
return null;
|
|
42959
43813
|
}
|
|
42960
|
-
if (contentRef.recordIds !== void 0 && (!Array.isArray(contentRef.recordIds) || !contentRef.recordIds.length || contentRef.recordIds.length > 128 || contentRef.recordIds.some((id) => typeof id !== "string" || !id)))
|
|
43814
|
+
if (contentRef.recordIds !== void 0 && (!Array.isArray(contentRef.recordIds) || !contentRef.recordIds.length || contentRef.recordIds.length > 128 || contentRef.recordIds.some((id) => typeof id !== "string" || !id)))
|
|
43815
|
+
return null;
|
|
42961
43816
|
if (input.cursor !== void 0 && !/^(0|[1-9][0-9]*)$/.test(input.cursor))
|
|
42962
43817
|
return null;
|
|
42963
43818
|
if (input.maxBytes !== void 0 && (!Number.isSafeInteger(input.maxBytes) || input.maxBytes < 1))
|
|
42964
43819
|
return null;
|
|
42965
|
-
const { facts, warnings } = await scanRetainedLogs(
|
|
42966
|
-
|
|
43820
|
+
const { facts, warnings } = await scanRetainedLogs(
|
|
43821
|
+
input.cwd,
|
|
43822
|
+
identity.readWindow
|
|
43823
|
+
);
|
|
43824
|
+
if (warnings.includes("read_window_expired"))
|
|
43825
|
+
return { availability: "unavailable" };
|
|
42967
43826
|
let matched = facts.find(
|
|
42968
43827
|
(f3) => f3.name === ETelemetryEventName.CONTENT_RECORDED && (!identity.threadId || f3.identity.threadId === identity.threadId) && (!identity.advanceId || f3.identity.advanceId === identity.advanceId) && (!identity.runId || f3.identity.runId === identity.runId) && matchContentRef(f3, contentRef)
|
|
42969
43828
|
);
|
|
42970
43829
|
if (contentRef.recordIds) {
|
|
42971
|
-
const byRecord = new Map(
|
|
43830
|
+
const byRecord = new Map(
|
|
43831
|
+
facts.filter(
|
|
43832
|
+
(f3) => f3.name === ETelemetryEventName.CONTENT_RECORDED && f3.identity.advanceId === identity.advanceId && (!identity.threadId || f3.identity.threadId === identity.threadId) && (!identity.runId || f3.identity.runId === identity.runId) && f3.identity.operationId === contentRef.operationId
|
|
43833
|
+
).map((f3) => [f3.identity.recordId, f3])
|
|
43834
|
+
);
|
|
42972
43835
|
const chunks = contentRef.recordIds.map((id) => byRecord.get(id));
|
|
42973
43836
|
if (chunks.some((chunk) => !chunk)) return { availability: "unavailable" };
|
|
42974
|
-
const values = chunks.map(
|
|
42975
|
-
|
|
43837
|
+
const values = chunks.map(
|
|
43838
|
+
(chunk) => chunk.body
|
|
43839
|
+
);
|
|
43840
|
+
if (values.some(
|
|
43841
|
+
(value) => value.section !== "model.output" || typeof value.value !== "string"
|
|
43842
|
+
))
|
|
43843
|
+
return null;
|
|
42976
43844
|
const prefix = [];
|
|
42977
43845
|
for (const value of values) {
|
|
42978
43846
|
if (value.chunkIndex !== prefix.length) break;
|
|
@@ -42980,13 +43848,24 @@ var scanContent = async (input) => {
|
|
|
42980
43848
|
}
|
|
42981
43849
|
if (!prefix.length) return { availability: "unavailable" };
|
|
42982
43850
|
const complete = prefix.length === values.length && prefix.at(-1)?.final && prefix.at(-1)?.availability === "available";
|
|
42983
|
-
matched = {
|
|
43851
|
+
matched = {
|
|
43852
|
+
...chunks[0],
|
|
43853
|
+
body: {
|
|
43854
|
+
value: prefix.map((value) => value.value).join(""),
|
|
43855
|
+
availability: complete ? "available" : "partial"
|
|
43856
|
+
}
|
|
43857
|
+
};
|
|
42984
43858
|
}
|
|
42985
43859
|
if (!matched) {
|
|
42986
43860
|
return { availability: "unavailable" };
|
|
42987
43861
|
}
|
|
42988
43862
|
const body = matched.body;
|
|
42989
|
-
|
|
43863
|
+
let availability = "available";
|
|
43864
|
+
if (body.availability === "partial") {
|
|
43865
|
+
availability = "partial";
|
|
43866
|
+
} else if (body.availability === "unavailable") {
|
|
43867
|
+
availability = "unavailable";
|
|
43868
|
+
}
|
|
42990
43869
|
const maxBytes = input.maxBytes ?? 1024 * 1024;
|
|
42991
43870
|
if (body.value === void 0) return { availability: "not_recorded" };
|
|
42992
43871
|
const serialized = JSON.stringify(body.value);
|
|
@@ -43418,6 +44297,28 @@ var cardValidateBindings = {
|
|
|
43418
44297
|
);
|
|
43419
44298
|
}
|
|
43420
44299
|
};
|
|
44300
|
+
var cardTransformPreview = {
|
|
44301
|
+
name: "card.transform-preview",
|
|
44302
|
+
description: "run a server-side card data transform against indexed sample input",
|
|
44303
|
+
options: [
|
|
44304
|
+
{
|
|
44305
|
+
flags: "--request-file <requestFile>",
|
|
44306
|
+
description: "manager-owned JSON request containing source, samples and schema",
|
|
44307
|
+
key: "requestFile",
|
|
44308
|
+
parse: parseRequestFile
|
|
44309
|
+
}
|
|
44310
|
+
],
|
|
44311
|
+
summarize: ({ status: status2 }) => `Card data transform preview ${status2}.
|
|
44312
|
+
`,
|
|
44313
|
+
run: (cwd, options) => {
|
|
44314
|
+
if (options.requestFile === void 0) {
|
|
44315
|
+
throw new InvalidArgumentError(
|
|
44316
|
+
"required option '--request-file <requestFile>' not specified"
|
|
44317
|
+
);
|
|
44318
|
+
}
|
|
44319
|
+
return previewCardTransformFromRequest(cwd, options.requestFile);
|
|
44320
|
+
}
|
|
44321
|
+
};
|
|
43421
44322
|
var cardFinalize = {
|
|
43422
44323
|
name: "card.finalize",
|
|
43423
44324
|
description: "[deprecated; manager compatibility only] validate and atomically upsert a CARD resource into agent config",
|
|
@@ -43796,6 +44697,7 @@ var COMMANDS = [
|
|
|
43796
44697
|
cardList,
|
|
43797
44698
|
cardRead,
|
|
43798
44699
|
cardValidateBindings,
|
|
44700
|
+
cardTransformPreview,
|
|
43799
44701
|
cardFinalize,
|
|
43800
44702
|
cardRollback,
|
|
43801
44703
|
agentdevStart,
|