deepline 0.3.392 → 0.3.394
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +156 -24
- package/dist/bundling-sources/sdk/src/compat.ts +9 -0
- package/dist/bundling-sources/sdk/src/http.ts +5 -1
- package/dist/bundling-sources/sdk/src/index.ts +5 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
- package/dist/bundling-sources/sdk/src/release.ts +4 -1
- package/dist/bundling-sources/sdk/src/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +895 -54
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +41 -4
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +30 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +168 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +252 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +32 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +103 -23
- package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
- package/dist/cli/auth-IHKISLJQ.js +39 -0
- package/dist/cli/{auth-6JSA2ZCW.mjs → auth-OSXDAVCF.mjs} +4 -4
- package/dist/cli/{billing-Q5BLQHIU.js → billing-EKLYOXUY.js} +101 -74
- package/dist/cli/{billing-MRRO643H.mjs → billing-ZNNKX3UR.mjs} +32 -5
- package/dist/cli/{chunk-4SFPVW7A.js → chunk-2MDDA7A4.js} +26 -26
- package/dist/cli/{chunk-JOFPQGXW.js → chunk-354JCXA2.js} +50 -50
- package/dist/cli/{chunk-7E66A24V.mjs → chunk-3HU47EGZ.mjs} +71 -9
- package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-3HWALOL2.mjs} +1 -1
- package/dist/cli/{chunk-T7OKJ2T6.js → chunk-4P27AXEA.js} +73 -63
- package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-5BB2RGAX.mjs} +190 -18
- package/dist/cli/{chunk-JSLPHFP7.js → chunk-6YAUMG27.js} +3 -2
- package/dist/cli/{chunk-MU6M3URX.mjs → chunk-BP33SIZF.mjs} +1 -1
- package/dist/cli/{chunk-WMS5U6YB.js → chunk-CS6RAIVY.js} +20 -19
- package/dist/cli/{chunk-CVLM3WMJ.js → chunk-E23BQ5SC.js} +242 -183
- package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-FJGW5GXU.mjs} +3 -2
- package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-JHIJIHFB.mjs} +79 -20
- package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
- package/dist/cli/{chunk-5O4B6AUN.js → chunk-KB4SDX5S.js} +71 -9
- package/dist/cli/{chunk-RV6ALZIX.js → chunk-KGNTKMRG.js} +32 -7
- package/dist/cli/{chunk-6DBOU7UH.js → chunk-KI635JN4.js} +176 -87
- package/dist/cli/{chunk-2FQG2HU4.js → chunk-KIUMEOM5.js} +8 -8
- package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
- package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-M57J2SK4.mjs} +2 -2
- package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-MFB2VKBO.mjs} +2 -2
- package/dist/cli/{chunk-QGKPTBRR.js → chunk-MH73HMPV.js} +3 -3
- package/dist/cli/{chunk-BB3FNYFY.js → chunk-MLPU5SMZ.js} +2 -2
- package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-NR3DFKNF.mjs} +27 -2
- package/dist/cli/{chunk-EY7RFC6A.js → chunk-QIQBYKLB.js} +15 -15
- package/dist/cli/{chunk-RIV2GS5E.js → chunk-RBJYWRCF.js} +638 -466
- package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
- package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-TJI2EN6K.mjs} +3 -2
- package/dist/cli/chunk-UBKA33KY.mjs +310 -0
- package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
- package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
- package/dist/cli/{chunk-2QLML6G4.mjs → chunk-UXFSWG3Q.mjs} +4 -4
- package/dist/cli/{chunk-UCKJQG25.js → chunk-VK6FYZLP.js} +8 -8
- package/dist/cli/{chunk-ZTACINO5.mjs → chunk-X63FDZJZ.mjs} +13 -3
- package/dist/cli/chunk-XDVT3GOM.js +310 -0
- package/dist/cli/{chunk-A3APGZFP.mjs → chunk-XRQ2AQL7.mjs} +2 -2
- package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-XXUDVEXK.mjs} +97 -8
- package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
- package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-ZYBGA4AR.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-E4QGUIGI.mjs → csv-5AXRB35H.mjs} +3 -3
- package/dist/cli/{csv-26U5T24Z.js → csv-LU7O75WE.js} +12 -12
- package/dist/cli/{db-JTRJIAQW.mjs → db-7XP5UWEW.mjs} +6 -5
- package/dist/cli/{db-QHBFLMVL.js → db-F7YTFKVM.js} +31 -30
- package/dist/cli/{describe-FDV2V74F.js → describe-FRH32RDV.js} +24 -23
- package/dist/cli/{describe-E3DE3ZK3.mjs → describe-K4ES5LIL.mjs} +17 -16
- package/dist/cli/{executions-B3GTNPRE.mjs → executions-IEHEHJUO.mjs} +6 -5
- package/dist/cli/{executions-VZYOGVQY.js → executions-RZV5XPT2.js} +8 -7
- package/dist/cli/{feedback-CR55FJA2.js → feedback-3P65QTX3.js} +7 -7
- package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-FPUVZBAN.mjs} +3 -3
- package/dist/cli/{git-NM2PHHZ4.mjs → git-GLVVP7TY.mjs} +4 -4
- package/dist/cli/git-MFFAWVVX.js +23 -0
- package/dist/cli/index.js +100 -96
- package/dist/cli/index.mjs +47 -43
- package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
- package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-XKSGZR7Q.js} +7 -7
- package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-FTBGNEFG.mjs} +6 -5
- package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-NZ2DYNST.js} +87 -86
- package/dist/cli/{org-U7A6DV5D.js → org-MCKDQXIV.js} +66 -65
- package/dist/cli/{org-KUBILNQV.mjs → org-V2J5RBCN.mjs} +6 -5
- package/dist/cli/{play-HRDXQ4QE.mjs → play-AJFGME3B.mjs} +11 -10
- package/dist/cli/play-WLSN2EO2.js +158 -0
- package/dist/cli/{providers-VD6YTVQZ.js → providers-2JEZ2264.js} +9 -8
- package/dist/cli/{providers-OHIWI453.mjs → providers-I6RQJZFZ.mjs} +6 -5
- package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-BIDQDMO4.mjs} +3 -3
- package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-GJ2RPDU3.js} +5 -5
- package/dist/cli/run-identity-G257GQED.js +25 -0
- package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
- package/dist/cli/search-5VN4YD4I.js +27 -0
- package/dist/cli/{search-F44IZRT7.mjs → search-ELRXFWG5.mjs} +7 -6
- package/dist/cli/{secrets-CAEMRORF.js → secrets-53IT6VXD.js} +15 -14
- package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-SQXGZXIC.mjs} +6 -5
- package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-2X5QF7SL.mjs} +4 -4
- package/dist/cli/{sessions-6GC7OFTT.js → sessions-CAV5M77Y.js} +5 -5
- package/dist/cli/{settings-DPNVUAV2.js → settings-532WNAZO.js} +76 -75
- package/dist/cli/{settings-KIPAMRPP.mjs → settings-7P67VGCJ.mjs} +9 -8
- package/dist/cli/{setup-DTL3L5SG.js → setup-6L2VSUWJ.js} +41 -41
- package/dist/cli/{setup-TU2F7PU5.mjs → setup-QGGBV2LE.mjs} +6 -6
- package/dist/cli/{skills-UV5MYJ46.mjs → skills-3FE62WBG.mjs} +4 -4
- package/dist/cli/skills-S6NPZAN7.js +28 -0
- package/dist/cli/tools-647RLXQS.js +41 -0
- package/dist/cli/{tools-QRRNDCQ7.mjs → tools-DMR25DEF.mjs} +10 -9
- package/dist/cli/{update-4426TF35.mjs → update-6RZMHJZP.mjs} +6 -6
- package/dist/cli/update-WVTSC3EM.js +28 -0
- package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-L2DQRE6R.mjs} +7 -6
- package/dist/cli/{workflow-HNLOVISB.js → workflow-TX4F2PIX.js} +17 -16
- package/dist/{client-e6Qh5ZIg.d.mts → client-BktIPdIj.d.mts} +153 -4
- package/dist/{client-Uxuy-xQ2.d.ts → client-C3O1Ipf3.d.ts} +153 -4
- package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DLxUY5kI.d.mts} +124 -10
- package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DLxUY5kI.d.ts} +124 -10
- package/dist/{index-BZ6uzZJl.d.ts → index-B_GM9E3q.d.ts} +1 -1
- package/dist/{index-B9fBZH1g.d.mts → index-SCb0NvDb.d.mts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +120 -29
- package/dist/index.mjs +111 -20
- package/dist/install-integrity.json +94 -88
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +5 -2
- package/dist/plays/run-request.mjs +4 -1
- package/dist/release.d.mts +4 -1
- package/dist/release.d.ts +4 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-67TAELQL.js +0 -39
- package/dist/cli/git-I5JTK6YU.js +0 -23
- package/dist/cli/play-A2V7YDU7.js +0 -157
- package/dist/cli/search-WWXMBVPH.js +0 -26
- package/dist/cli/skills-SWOSEZLB.js +0 -28
- package/dist/cli/tools-IL2YCDQ6.js +0 -40
- package/dist/cli/update-BERDPEYR.js +0 -28
|
@@ -477,187 +477,6 @@ function extractSummaryFields(payload) {
|
|
|
477
477
|
return {};
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
-
// ../plays/row-identity.ts
|
|
481
|
-
var POSTGRES_IDENTIFIER_MAX_LENGTH = 63;
|
|
482
|
-
var MAP_KEY_NAMESPACE_MAX_LENGTH = POSTGRES_IDENTIFIER_MAX_LENGTH;
|
|
483
|
-
var SHA256_INITIAL_HASH = [
|
|
484
|
-
1779033703,
|
|
485
|
-
3144134277,
|
|
486
|
-
1013904242,
|
|
487
|
-
2773480762,
|
|
488
|
-
1359893119,
|
|
489
|
-
2600822924,
|
|
490
|
-
528734635,
|
|
491
|
-
1541459225
|
|
492
|
-
];
|
|
493
|
-
var SHA256_ROUND_CONSTANTS = [
|
|
494
|
-
1116352408,
|
|
495
|
-
1899447441,
|
|
496
|
-
3049323471,
|
|
497
|
-
3921009573,
|
|
498
|
-
961987163,
|
|
499
|
-
1508970993,
|
|
500
|
-
2453635748,
|
|
501
|
-
2870763221,
|
|
502
|
-
3624381080,
|
|
503
|
-
310598401,
|
|
504
|
-
607225278,
|
|
505
|
-
1426881987,
|
|
506
|
-
1925078388,
|
|
507
|
-
2162078206,
|
|
508
|
-
2614888103,
|
|
509
|
-
3248222580,
|
|
510
|
-
3835390401,
|
|
511
|
-
4022224774,
|
|
512
|
-
264347078,
|
|
513
|
-
604807628,
|
|
514
|
-
770255983,
|
|
515
|
-
1249150122,
|
|
516
|
-
1555081692,
|
|
517
|
-
1996064986,
|
|
518
|
-
2554220882,
|
|
519
|
-
2821834349,
|
|
520
|
-
2952996808,
|
|
521
|
-
3210313671,
|
|
522
|
-
3336571891,
|
|
523
|
-
3584528711,
|
|
524
|
-
113926993,
|
|
525
|
-
338241895,
|
|
526
|
-
666307205,
|
|
527
|
-
773529912,
|
|
528
|
-
1294757372,
|
|
529
|
-
1396182291,
|
|
530
|
-
1695183700,
|
|
531
|
-
1986661051,
|
|
532
|
-
2177026350,
|
|
533
|
-
2456956037,
|
|
534
|
-
2730485921,
|
|
535
|
-
2820302411,
|
|
536
|
-
3259730800,
|
|
537
|
-
3345764771,
|
|
538
|
-
3516065817,
|
|
539
|
-
3600352804,
|
|
540
|
-
4094571909,
|
|
541
|
-
275423344,
|
|
542
|
-
430227734,
|
|
543
|
-
506948616,
|
|
544
|
-
659060556,
|
|
545
|
-
883997877,
|
|
546
|
-
958139571,
|
|
547
|
-
1322822218,
|
|
548
|
-
1537002063,
|
|
549
|
-
1747873779,
|
|
550
|
-
1955562222,
|
|
551
|
-
2024104815,
|
|
552
|
-
2227730452,
|
|
553
|
-
2361852424,
|
|
554
|
-
2428436474,
|
|
555
|
-
2756734187,
|
|
556
|
-
3204031479,
|
|
557
|
-
3329325298
|
|
558
|
-
];
|
|
559
|
-
function stableValue(value) {
|
|
560
|
-
if (Array.isArray(value)) {
|
|
561
|
-
return value.map((entry) => stableValue(entry));
|
|
562
|
-
}
|
|
563
|
-
if (value && typeof value === "object") {
|
|
564
|
-
return Object.fromEntries(
|
|
565
|
-
Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, stableValue(entry)])
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
return value;
|
|
569
|
-
}
|
|
570
|
-
function stableStringify(value) {
|
|
571
|
-
return JSON.stringify(stableValue(value));
|
|
572
|
-
}
|
|
573
|
-
function rightRotate32(value, bits) {
|
|
574
|
-
return value >>> bits | value << 32 - bits;
|
|
575
|
-
}
|
|
576
|
-
function sha256Hex(input) {
|
|
577
|
-
const bytes = Array.from(new TextEncoder().encode(input));
|
|
578
|
-
const bitLength = bytes.length * 8;
|
|
579
|
-
bytes.push(128);
|
|
580
|
-
while (bytes.length % 64 !== 56) {
|
|
581
|
-
bytes.push(0);
|
|
582
|
-
}
|
|
583
|
-
const highBits = Math.floor(bitLength / 4294967296);
|
|
584
|
-
const lowBits = bitLength >>> 0;
|
|
585
|
-
bytes.push(
|
|
586
|
-
highBits >>> 24 & 255,
|
|
587
|
-
highBits >>> 16 & 255,
|
|
588
|
-
highBits >>> 8 & 255,
|
|
589
|
-
highBits & 255,
|
|
590
|
-
lowBits >>> 24 & 255,
|
|
591
|
-
lowBits >>> 16 & 255,
|
|
592
|
-
lowBits >>> 8 & 255,
|
|
593
|
-
lowBits & 255
|
|
594
|
-
);
|
|
595
|
-
const hash = [...SHA256_INITIAL_HASH];
|
|
596
|
-
const words = new Array(64).fill(0);
|
|
597
|
-
for (let offset = 0; offset < bytes.length; offset += 64) {
|
|
598
|
-
for (let index = 0; index < 16; index += 1) {
|
|
599
|
-
const wordOffset = offset + index * 4;
|
|
600
|
-
words[index] = (_nullishCoalesce(bytes[wordOffset], () => ( 0))) << 24 | (_nullishCoalesce(bytes[wordOffset + 1], () => ( 0))) << 16 | (_nullishCoalesce(bytes[wordOffset + 2], () => ( 0))) << 8 | (_nullishCoalesce(bytes[wordOffset + 3], () => ( 0)));
|
|
601
|
-
}
|
|
602
|
-
for (let index = 16; index < 64; index += 1) {
|
|
603
|
-
const s0 = rightRotate32(words[index - 15], 7) ^ rightRotate32(words[index - 15], 18) ^ words[index - 15] >>> 3;
|
|
604
|
-
const s1 = rightRotate32(words[index - 2], 17) ^ rightRotate32(words[index - 2], 19) ^ words[index - 2] >>> 10;
|
|
605
|
-
words[index] = words[index - 16] + s0 + words[index - 7] + s1 >>> 0;
|
|
606
|
-
}
|
|
607
|
-
let [a, b, c, d, e, f, g, h] = hash;
|
|
608
|
-
for (let index = 0; index < 64; index += 1) {
|
|
609
|
-
const s1 = rightRotate32(e, 6) ^ rightRotate32(e, 11) ^ rightRotate32(e, 25);
|
|
610
|
-
const ch = e & f ^ ~e & g;
|
|
611
|
-
const temp1 = h + s1 + ch + SHA256_ROUND_CONSTANTS[index] + words[index] >>> 0;
|
|
612
|
-
const s0 = rightRotate32(a, 2) ^ rightRotate32(a, 13) ^ rightRotate32(a, 22);
|
|
613
|
-
const maj = a & b ^ a & c ^ b & c;
|
|
614
|
-
const temp2 = s0 + maj >>> 0;
|
|
615
|
-
h = g;
|
|
616
|
-
g = f;
|
|
617
|
-
f = e;
|
|
618
|
-
e = d + temp1 >>> 0;
|
|
619
|
-
d = c;
|
|
620
|
-
c = b;
|
|
621
|
-
b = a;
|
|
622
|
-
a = temp1 + temp2 >>> 0;
|
|
623
|
-
}
|
|
624
|
-
hash[0] = hash[0] + a >>> 0;
|
|
625
|
-
hash[1] = hash[1] + b >>> 0;
|
|
626
|
-
hash[2] = hash[2] + c >>> 0;
|
|
627
|
-
hash[3] = hash[3] + d >>> 0;
|
|
628
|
-
hash[4] = hash[4] + e >>> 0;
|
|
629
|
-
hash[5] = hash[5] + f >>> 0;
|
|
630
|
-
hash[6] = hash[6] + g >>> 0;
|
|
631
|
-
hash[7] = hash[7] + h >>> 0;
|
|
632
|
-
}
|
|
633
|
-
return hash.map((word) => word.toString(16).padStart(8, "0")).join("");
|
|
634
|
-
}
|
|
635
|
-
function sanitizeIdentifierPart(value) {
|
|
636
|
-
return value.trim().replace(/[^a-z0-9]+/gi, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
637
|
-
}
|
|
638
|
-
function validateIdentifierPart(rawValue, label, maxLength) {
|
|
639
|
-
const sanitized = sanitizeIdentifierPart(rawValue);
|
|
640
|
-
if (!sanitized) {
|
|
641
|
-
throw new Error(`${label} must contain a letter or number.`);
|
|
642
|
-
}
|
|
643
|
-
if (sanitized.length > maxLength) {
|
|
644
|
-
throw new Error(
|
|
645
|
-
`${label} is too long after normalization (${sanitized.length}/${maxLength}): "${sanitized}".`
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
return sanitized;
|
|
649
|
-
}
|
|
650
|
-
function normalizeTableNamespace(value) {
|
|
651
|
-
return validateIdentifierPart(
|
|
652
|
-
value,
|
|
653
|
-
"ctx.dataset() key",
|
|
654
|
-
MAP_KEY_NAMESPACE_MAX_LENGTH
|
|
655
|
-
);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
480
|
|
|
662
481
|
|
|
663
482
|
|
|
@@ -672,4 +491,4 @@ function normalizeTableNamespace(value) {
|
|
|
672
491
|
|
|
673
492
|
|
|
674
493
|
|
|
675
|
-
exports.EMAIL_STATUS_JSON_SCHEMA = EMAIL_STATUS_JSON_SCHEMA; exports.buildEmailStatus = buildEmailStatus; exports.JOB_CHANGE_STATUS_VALUES = JOB_CHANGE_STATUS_VALUES; exports.JOB_CHANGE_JSON_SCHEMA = JOB_CHANGE_JSON_SCHEMA; exports.PHONE_STATUS_VALUES = PHONE_STATUS_VALUES; exports.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS; exports.DEEPLINE_EXTRACTOR_TARGETS = DEEPLINE_EXTRACTOR_TARGETS; exports.isDeeplineExtractorTarget = isDeeplineExtractorTarget; exports.
|
|
494
|
+
exports.EMAIL_STATUS_JSON_SCHEMA = EMAIL_STATUS_JSON_SCHEMA; exports.buildEmailStatus = buildEmailStatus; exports.JOB_CHANGE_STATUS_VALUES = JOB_CHANGE_STATUS_VALUES; exports.JOB_CHANGE_JSON_SCHEMA = JOB_CHANGE_JSON_SCHEMA; exports.PHONE_STATUS_VALUES = PHONE_STATUS_VALUES; exports.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS; exports.DEEPLINE_EXTRACTOR_TARGETS = DEEPLINE_EXTRACTOR_TARGETS; exports.isDeeplineExtractorTarget = isDeeplineExtractorTarget; exports.tryConvertToList = tryConvertToList; exports.projectRowOutput = projectRowOutput; exports.writeJsonOutputFile = writeJsonOutputFile; exports.writeCsvOutputFile = writeCsvOutputFile; exports.extractSummaryFields = extractSummaryFields;
|
|
@@ -49,10 +49,11 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.394",
|
|
53
53
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
54
54
|
packageCapabilities: {
|
|
55
|
-
updatePreferences: 1
|
|
55
|
+
updatePreferences: 1,
|
|
56
|
+
skillsGuidance: 1
|
|
56
57
|
},
|
|
57
58
|
contracts: {
|
|
58
59
|
api: {
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// ../plays/row-identity.ts
|
|
2
|
+
var POSTGRES_IDENTIFIER_MAX_LENGTH = 63;
|
|
3
|
+
var MAP_KEY_NAMESPACE_MAX_LENGTH = POSTGRES_IDENTIFIER_MAX_LENGTH;
|
|
4
|
+
var SHA256_INITIAL_HASH = [
|
|
5
|
+
1779033703,
|
|
6
|
+
3144134277,
|
|
7
|
+
1013904242,
|
|
8
|
+
2773480762,
|
|
9
|
+
1359893119,
|
|
10
|
+
2600822924,
|
|
11
|
+
528734635,
|
|
12
|
+
1541459225
|
|
13
|
+
];
|
|
14
|
+
var SHA256_ROUND_CONSTANTS = [
|
|
15
|
+
1116352408,
|
|
16
|
+
1899447441,
|
|
17
|
+
3049323471,
|
|
18
|
+
3921009573,
|
|
19
|
+
961987163,
|
|
20
|
+
1508970993,
|
|
21
|
+
2453635748,
|
|
22
|
+
2870763221,
|
|
23
|
+
3624381080,
|
|
24
|
+
310598401,
|
|
25
|
+
607225278,
|
|
26
|
+
1426881987,
|
|
27
|
+
1925078388,
|
|
28
|
+
2162078206,
|
|
29
|
+
2614888103,
|
|
30
|
+
3248222580,
|
|
31
|
+
3835390401,
|
|
32
|
+
4022224774,
|
|
33
|
+
264347078,
|
|
34
|
+
604807628,
|
|
35
|
+
770255983,
|
|
36
|
+
1249150122,
|
|
37
|
+
1555081692,
|
|
38
|
+
1996064986,
|
|
39
|
+
2554220882,
|
|
40
|
+
2821834349,
|
|
41
|
+
2952996808,
|
|
42
|
+
3210313671,
|
|
43
|
+
3336571891,
|
|
44
|
+
3584528711,
|
|
45
|
+
113926993,
|
|
46
|
+
338241895,
|
|
47
|
+
666307205,
|
|
48
|
+
773529912,
|
|
49
|
+
1294757372,
|
|
50
|
+
1396182291,
|
|
51
|
+
1695183700,
|
|
52
|
+
1986661051,
|
|
53
|
+
2177026350,
|
|
54
|
+
2456956037,
|
|
55
|
+
2730485921,
|
|
56
|
+
2820302411,
|
|
57
|
+
3259730800,
|
|
58
|
+
3345764771,
|
|
59
|
+
3516065817,
|
|
60
|
+
3600352804,
|
|
61
|
+
4094571909,
|
|
62
|
+
275423344,
|
|
63
|
+
430227734,
|
|
64
|
+
506948616,
|
|
65
|
+
659060556,
|
|
66
|
+
883997877,
|
|
67
|
+
958139571,
|
|
68
|
+
1322822218,
|
|
69
|
+
1537002063,
|
|
70
|
+
1747873779,
|
|
71
|
+
1955562222,
|
|
72
|
+
2024104815,
|
|
73
|
+
2227730452,
|
|
74
|
+
2361852424,
|
|
75
|
+
2428436474,
|
|
76
|
+
2756734187,
|
|
77
|
+
3204031479,
|
|
78
|
+
3329325298
|
|
79
|
+
];
|
|
80
|
+
function stableValue(value) {
|
|
81
|
+
if (Array.isArray(value)) {
|
|
82
|
+
return value.map((entry) => stableValue(entry));
|
|
83
|
+
}
|
|
84
|
+
if (value && typeof value === "object") {
|
|
85
|
+
return Object.fromEntries(
|
|
86
|
+
Object.entries(value).filter(([, entry]) => entry !== void 0).sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, stableValue(entry)])
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
function stableStringify(value) {
|
|
92
|
+
return JSON.stringify(stableValue(value));
|
|
93
|
+
}
|
|
94
|
+
function rightRotate32(value, bits) {
|
|
95
|
+
return value >>> bits | value << 32 - bits;
|
|
96
|
+
}
|
|
97
|
+
function sha256Hex(input) {
|
|
98
|
+
const bytes = Array.from(new TextEncoder().encode(input));
|
|
99
|
+
const bitLength = bytes.length * 8;
|
|
100
|
+
bytes.push(128);
|
|
101
|
+
while (bytes.length % 64 !== 56) {
|
|
102
|
+
bytes.push(0);
|
|
103
|
+
}
|
|
104
|
+
const highBits = Math.floor(bitLength / 4294967296);
|
|
105
|
+
const lowBits = bitLength >>> 0;
|
|
106
|
+
bytes.push(
|
|
107
|
+
highBits >>> 24 & 255,
|
|
108
|
+
highBits >>> 16 & 255,
|
|
109
|
+
highBits >>> 8 & 255,
|
|
110
|
+
highBits & 255,
|
|
111
|
+
lowBits >>> 24 & 255,
|
|
112
|
+
lowBits >>> 16 & 255,
|
|
113
|
+
lowBits >>> 8 & 255,
|
|
114
|
+
lowBits & 255
|
|
115
|
+
);
|
|
116
|
+
const hash = [...SHA256_INITIAL_HASH];
|
|
117
|
+
const words = new Array(64).fill(0);
|
|
118
|
+
for (let offset = 0; offset < bytes.length; offset += 64) {
|
|
119
|
+
for (let index = 0; index < 16; index += 1) {
|
|
120
|
+
const wordOffset = offset + index * 4;
|
|
121
|
+
words[index] = (bytes[wordOffset] ?? 0) << 24 | (bytes[wordOffset + 1] ?? 0) << 16 | (bytes[wordOffset + 2] ?? 0) << 8 | (bytes[wordOffset + 3] ?? 0);
|
|
122
|
+
}
|
|
123
|
+
for (let index = 16; index < 64; index += 1) {
|
|
124
|
+
const s0 = rightRotate32(words[index - 15], 7) ^ rightRotate32(words[index - 15], 18) ^ words[index - 15] >>> 3;
|
|
125
|
+
const s1 = rightRotate32(words[index - 2], 17) ^ rightRotate32(words[index - 2], 19) ^ words[index - 2] >>> 10;
|
|
126
|
+
words[index] = words[index - 16] + s0 + words[index - 7] + s1 >>> 0;
|
|
127
|
+
}
|
|
128
|
+
let [a, b, c, d, e, f, g, h] = hash;
|
|
129
|
+
for (let index = 0; index < 64; index += 1) {
|
|
130
|
+
const s1 = rightRotate32(e, 6) ^ rightRotate32(e, 11) ^ rightRotate32(e, 25);
|
|
131
|
+
const ch = e & f ^ ~e & g;
|
|
132
|
+
const temp1 = h + s1 + ch + SHA256_ROUND_CONSTANTS[index] + words[index] >>> 0;
|
|
133
|
+
const s0 = rightRotate32(a, 2) ^ rightRotate32(a, 13) ^ rightRotate32(a, 22);
|
|
134
|
+
const maj = a & b ^ a & c ^ b & c;
|
|
135
|
+
const temp2 = s0 + maj >>> 0;
|
|
136
|
+
h = g;
|
|
137
|
+
g = f;
|
|
138
|
+
f = e;
|
|
139
|
+
e = d + temp1 >>> 0;
|
|
140
|
+
d = c;
|
|
141
|
+
c = b;
|
|
142
|
+
b = a;
|
|
143
|
+
a = temp1 + temp2 >>> 0;
|
|
144
|
+
}
|
|
145
|
+
hash[0] = hash[0] + a >>> 0;
|
|
146
|
+
hash[1] = hash[1] + b >>> 0;
|
|
147
|
+
hash[2] = hash[2] + c >>> 0;
|
|
148
|
+
hash[3] = hash[3] + d >>> 0;
|
|
149
|
+
hash[4] = hash[4] + e >>> 0;
|
|
150
|
+
hash[5] = hash[5] + f >>> 0;
|
|
151
|
+
hash[6] = hash[6] + g >>> 0;
|
|
152
|
+
hash[7] = hash[7] + h >>> 0;
|
|
153
|
+
}
|
|
154
|
+
return hash.map((word) => word.toString(16).padStart(8, "0")).join("");
|
|
155
|
+
}
|
|
156
|
+
function sanitizeIdentifierPart(value) {
|
|
157
|
+
return value.trim().replace(/[^a-z0-9]+/gi, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
158
|
+
}
|
|
159
|
+
function validateIdentifierPart(rawValue, label, maxLength) {
|
|
160
|
+
const sanitized = sanitizeIdentifierPart(rawValue);
|
|
161
|
+
if (!sanitized) {
|
|
162
|
+
throw new Error(`${label} must contain a letter or number.`);
|
|
163
|
+
}
|
|
164
|
+
if (sanitized.length > maxLength) {
|
|
165
|
+
throw new Error(
|
|
166
|
+
`${label} is too long after normalization (${sanitized.length}/${maxLength}): "${sanitized}".`
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
return sanitized;
|
|
170
|
+
}
|
|
171
|
+
function normalizeTableNamespace(value) {
|
|
172
|
+
return validateIdentifierPart(
|
|
173
|
+
value,
|
|
174
|
+
"ctx.dataset() key",
|
|
175
|
+
MAP_KEY_NAMESPACE_MAX_LENGTH
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// ../play-runtime/run-identity.ts
|
|
180
|
+
function sanitizePlayNameForWorkflowSegment(value) {
|
|
181
|
+
return value.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
|
|
182
|
+
}
|
|
183
|
+
function buildPlayWorkflowFamilyKey(playName) {
|
|
184
|
+
const normalized = playName.split("/").map(sanitizePlayNameForWorkflowSegment).filter(Boolean).join("/");
|
|
185
|
+
return normalized || "play";
|
|
186
|
+
}
|
|
187
|
+
function buildPlayWorkflowRunSuffix(now) {
|
|
188
|
+
const pad = (value, size = 2) => String(value).padStart(size, "0");
|
|
189
|
+
return [
|
|
190
|
+
now.getUTCFullYear(),
|
|
191
|
+
pad(now.getUTCMonth() + 1),
|
|
192
|
+
pad(now.getUTCDate()),
|
|
193
|
+
"t",
|
|
194
|
+
pad(now.getUTCHours()),
|
|
195
|
+
pad(now.getUTCMinutes()),
|
|
196
|
+
pad(now.getUTCSeconds()),
|
|
197
|
+
"-",
|
|
198
|
+
pad(now.getUTCMilliseconds(), 3)
|
|
199
|
+
].join("");
|
|
200
|
+
}
|
|
201
|
+
var CANONICAL_PLAY_RUN_TIMESTAMP_RE = /\/run\/(\d{4})(\d{2})(\d{2})t(\d{2})(\d{2})(\d{2})-(\d{3})(?:-|$)/;
|
|
202
|
+
function canonicalPlayRunStartedAtMs(runId) {
|
|
203
|
+
const match = CANONICAL_PLAY_RUN_TIMESTAMP_RE.exec(runId);
|
|
204
|
+
if (!match) return null;
|
|
205
|
+
const [, year, month, day, hour, minute, second, millisecond] = match;
|
|
206
|
+
const value = Date.UTC(
|
|
207
|
+
Number(year),
|
|
208
|
+
Number(month) - 1,
|
|
209
|
+
Number(day),
|
|
210
|
+
Number(hour),
|
|
211
|
+
Number(minute),
|
|
212
|
+
Number(second),
|
|
213
|
+
Number(millisecond)
|
|
214
|
+
);
|
|
215
|
+
if (!Number.isFinite(value)) return null;
|
|
216
|
+
const roundTrip = new Date(value);
|
|
217
|
+
return roundTrip.getUTCFullYear() === Number(year) && roundTrip.getUTCMonth() === Number(month) - 1 && roundTrip.getUTCDate() === Number(day) && roundTrip.getUTCHours() === Number(hour) && roundTrip.getUTCMinutes() === Number(minute) && roundTrip.getUTCSeconds() === Number(second) && roundTrip.getUTCMilliseconds() === Number(millisecond) ? value : null;
|
|
218
|
+
}
|
|
219
|
+
function buildRunEntropySuffix() {
|
|
220
|
+
const randomUuid = globalThis.crypto?.randomUUID?.();
|
|
221
|
+
if (randomUuid) {
|
|
222
|
+
return randomUuid.replace(/-/g, "").slice(0, 8);
|
|
223
|
+
}
|
|
224
|
+
return Math.random().toString(36).slice(2, 10).padEnd(8, "0");
|
|
225
|
+
}
|
|
226
|
+
function buildPlayWorkflowId(playName, now, options = {}) {
|
|
227
|
+
const familyKey = buildPlayWorkflowFamilyKey(playName);
|
|
228
|
+
const timestamp = now ?? /* @__PURE__ */ new Date();
|
|
229
|
+
const unique = options.unique ?? now === void 0;
|
|
230
|
+
const entropy = unique ? `-${buildRunEntropySuffix()}` : "";
|
|
231
|
+
return `play/${familyKey}/run/${buildPlayWorkflowRunSuffix(timestamp)}${entropy}`;
|
|
232
|
+
}
|
|
233
|
+
function buildCallerPlayWorkflowId(playName, request, now) {
|
|
234
|
+
const { workflowId: _ignored, ...intent } = request;
|
|
235
|
+
const wireIntent = JSON.parse(JSON.stringify(intent));
|
|
236
|
+
return `${buildPlayWorkflowId(playName, now, { unique: true })}-caller-${sha256Hex(stableStringify(wireIntent))}`;
|
|
237
|
+
}
|
|
238
|
+
function callerPlayWorkflowIdMatchesRequest(workflowId, request) {
|
|
239
|
+
const match = /^play\/[a-z0-9/-]+\/run\/\d{8}t\d{6}-\d{3}-[a-z0-9]{8}-caller-([a-f0-9]{64})$/.exec(
|
|
240
|
+
workflowId
|
|
241
|
+
);
|
|
242
|
+
if (!match || canonicalPlayRunStartedAtMs(workflowId) === null) return false;
|
|
243
|
+
const { workflowId: _ignored, ...intent } = request;
|
|
244
|
+
return match[1] === sha256Hex(stableStringify(JSON.parse(JSON.stringify(intent))));
|
|
245
|
+
}
|
|
246
|
+
function buildPlayRunIdentity(playName, now, options = {}) {
|
|
247
|
+
const workflowId = buildPlayWorkflowId(playName, now, {
|
|
248
|
+
unique: options.unique ?? now === void 0
|
|
249
|
+
});
|
|
250
|
+
return {
|
|
251
|
+
workflowId,
|
|
252
|
+
runId: workflowId,
|
|
253
|
+
workflowFamilyKey: buildPlayWorkflowFamilyKey(playName)
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function buildAsyncPlayRunIdentity(input) {
|
|
257
|
+
const digest = sha256Hex(
|
|
258
|
+
`${input.parentRunId}\0${input.invocationKey}`
|
|
259
|
+
).slice(0, 20);
|
|
260
|
+
const parentStartedAt = canonicalPlayRunStartedAtMs(input.parentRunId) ?? 0;
|
|
261
|
+
const base = buildPlayWorkflowId("async-child", new Date(parentStartedAt), {
|
|
262
|
+
unique: false
|
|
263
|
+
});
|
|
264
|
+
const workflowId = `${base}-async-${digest}`;
|
|
265
|
+
return {
|
|
266
|
+
workflowId,
|
|
267
|
+
runId: workflowId,
|
|
268
|
+
workflowFamilyKey: buildPlayWorkflowFamilyKey(input.playName)
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function buildRerunPlayRunIdentity(input) {
|
|
272
|
+
const digest = sha256Hex(
|
|
273
|
+
`rerun\0${input.sourceRunId}\0${input.idempotencyKey}`
|
|
274
|
+
).slice(0, 20);
|
|
275
|
+
const startedAt = canonicalPlayRunStartedAtMs(input.sourceRunId) ?? (typeof input.sourceStartedAtMs === "number" && Number.isFinite(input.sourceStartedAtMs) ? input.sourceStartedAtMs : 0);
|
|
276
|
+
const base = buildPlayWorkflowId(input.playName, new Date(startedAt), {
|
|
277
|
+
unique: false
|
|
278
|
+
});
|
|
279
|
+
const workflowId = `${base}-rerun-${digest}`;
|
|
280
|
+
return {
|
|
281
|
+
workflowId,
|
|
282
|
+
runId: workflowId,
|
|
283
|
+
workflowFamilyKey: buildPlayWorkflowFamilyKey(input.playName)
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function buildAsyncPlayRequestFingerprint(input) {
|
|
287
|
+
return sha256Hex(
|
|
288
|
+
stableStringify({
|
|
289
|
+
key: input.key,
|
|
290
|
+
playRef: input.playRef,
|
|
291
|
+
input: input.childInput
|
|
292
|
+
})
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export {
|
|
297
|
+
stableStringify,
|
|
298
|
+
sha256Hex,
|
|
299
|
+
normalizeTableNamespace,
|
|
300
|
+
buildPlayWorkflowFamilyKey,
|
|
301
|
+
buildPlayWorkflowRunSuffix,
|
|
302
|
+
canonicalPlayRunStartedAtMs,
|
|
303
|
+
buildPlayWorkflowId,
|
|
304
|
+
buildCallerPlayWorkflowId,
|
|
305
|
+
callerPlayWorkflowIdMatchesRequest,
|
|
306
|
+
buildPlayRunIdentity,
|
|
307
|
+
buildAsyncPlayRunIdentity,
|
|
308
|
+
buildRerunPlayRunIdentity,
|
|
309
|
+
buildAsyncPlayRequestFingerprint
|
|
310
|
+
};
|