deepline 0.3.324 → 0.3.326
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 +23 -25
- package/dist/bundling-sources/sdk/src/compat.ts +11 -6
- package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
- package/dist/bundling-sources/sdk/src/errors.ts +35 -0
- package/dist/bundling-sources/sdk/src/index.ts +13 -0
- package/dist/bundling-sources/sdk/src/play.ts +34 -31
- package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +84 -10
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +9 -0
- package/dist/cli/auth-6STWK6UK.js +31 -0
- package/dist/cli/{auth-6KWNR6AI.mjs → auth-VON5FFUK.mjs} +4 -4
- package/dist/cli/{billing-VQ2NUJLB.mjs → billing-X6JUEFRE.mjs} +4 -4
- package/dist/cli/{billing-CLLWHIAT.js → billing-YI4RZI2O.js} +70 -70
- package/dist/cli/{chunk-NC2ZXG2Y.js → chunk-3NGWGFVL.js} +26 -26
- package/dist/cli/{chunk-5CQ554BM.mjs → chunk-4AB4Y6FF.mjs} +1 -1
- package/dist/cli/{chunk-EXKRHZRG.js → chunk-4LNBSQM4.js} +5928 -5730
- package/dist/cli/{chunk-G4F2AIQ5.js → chunk-5NXHSRRE.js} +6 -6
- package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
- package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
- package/dist/cli/chunk-AID3OYVJ.js +8 -0
- package/dist/cli/{chunk-HHZDWBSQ.mjs → chunk-BQJVMKWL.mjs} +1 -1
- package/dist/cli/{chunk-TJGJTB5T.mjs → chunk-BR7GGTAE.mjs} +24 -1
- package/dist/cli/{chunk-IXYR65PW.js → chunk-BUYZEUY4.js} +1 -1
- package/dist/cli/{chunk-GROXVGGW.js → chunk-CUUHQ3AO.js} +6 -6
- package/dist/cli/{chunk-NIOFMRYW.mjs → chunk-DFDXKOLR.mjs} +98 -113
- package/dist/cli/{chunk-GMO3NBE2.js → chunk-EMZ7Y5SW.js} +70 -67
- package/dist/cli/chunk-GVESPYSY.mjs +234 -0
- package/dist/cli/{chunk-N5E66DP3.js → chunk-GVYKY6T6.js} +344 -254
- package/dist/cli/{chunk-EHSI2DMO.mjs → chunk-IQCCGOQH.mjs} +4 -20
- package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
- package/dist/cli/{chunk-3ZKAKQYC.mjs → chunk-KLWBAQ5A.mjs} +104 -14
- package/dist/cli/{chunk-PAA4FYCF.js → chunk-KZ4PCK4O.js} +29 -45
- package/dist/cli/chunk-LVEDPCLJ.js +234 -0
- package/dist/cli/{chunk-I7RLL7LN.mjs → chunk-M7CPVMDB.mjs} +1 -1
- package/dist/cli/{chunk-2UQUOUAW.js → chunk-MDQZQ3NY.js} +2 -2
- package/dist/cli/{chunk-V5PA6TCT.js → chunk-MKHSZA2X.js} +48 -48
- package/dist/cli/{chunk-LHJKYMTS.mjs → chunk-MOBZS4F3.mjs} +1 -1
- package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
- package/dist/cli/{chunk-QM2Z4FQF.js → chunk-T33W6JUJ.js} +6 -6
- package/dist/cli/{chunk-DO2VA5UP.mjs → chunk-TDSNAC3C.mjs} +2 -2
- package/dist/cli/{chunk-D5YJHGST.js → chunk-TXVOB5J2.js} +29 -6
- package/dist/cli/{chunk-TZZNI2A4.js → chunk-TZQMFWLF.js} +147 -162
- package/dist/cli/{chunk-NQJQ3CLX.mjs → chunk-VGKVLADU.mjs} +3 -3
- package/dist/cli/{chunk-U2RPP53P.mjs → chunk-VKXGOQG5.mjs} +5674 -5476
- package/dist/cli/{chunk-AKM5JVPG.mjs → chunk-W74E5ETE.mjs} +12 -9
- package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
- package/dist/cli/{chunk-5QZFWY7C.mjs → chunk-ZRN6YOF2.mjs} +2 -2
- package/dist/cli/client-TEBW2P24.js +20 -0
- package/dist/cli/{client-VHUKTDAZ.mjs → client-ZMOKUNL2.mjs} +3 -3
- package/dist/cli/{csv-5MZY7HU5.js → csv-HZRKEI7J.js} +12 -12
- package/dist/cli/{csv-7DA4APB6.mjs → csv-IICJHJZ4.mjs} +3 -3
- package/dist/cli/{db-ICG3FUVE.js → db-TM5NZF73.js} +226 -149
- package/dist/cli/{db-7UPW3N5U.mjs → db-X4B7YFNY.mjs} +214 -137
- package/dist/cli/{describe-VDRY2JCE.js → describe-BDBARWZJ.js} +28 -27
- package/dist/cli/{describe-ZAPGM5ND.mjs → describe-GMVS3LFC.mjs} +12 -11
- package/dist/cli/{executions-TK3C2FAQ.mjs → executions-447ZJMN4.mjs} +4 -4
- package/dist/cli/{executions-D5GYCY3A.js → executions-QX25UOQM.js} +6 -6
- package/dist/cli/{feedback-PZAZZUXF.js → feedback-4IXUTBX7.js} +6 -6
- package/dist/cli/{feedback-T4EIP5QR.mjs → feedback-JB7HHIC6.mjs} +3 -3
- package/dist/cli/git-C7C7DTEH.js +23 -0
- package/dist/cli/{git-WBFWIVO5.mjs → git-VID6KGAA.mjs} +4 -4
- package/dist/cli/index.js +105 -87
- package/dist/cli/index.mjs +65 -47
- package/dist/cli/{legacy-noops-LRBJWXRK.js → legacy-noops-3FYTCOZO.js} +7 -7
- package/dist/cli/{legacy-noops-DUCK7OKN.mjs → legacy-noops-SGR3G5WS.mjs} +4 -4
- package/dist/cli/{monitors-WYH5AQIO.mjs → monitors-SH4FOMBM.mjs} +4 -4
- package/dist/cli/{monitors-7S2SL62G.js → monitors-SP52UHS4.js} +85 -85
- package/dist/cli/{org-XCSMLTUW.mjs → org-B32MMIQT.mjs} +4 -4
- package/dist/cli/{org-EQNGGHPV.js → org-UQMX7JOR.js} +60 -60
- package/dist/cli/play-UCIWBN7U.js +153 -0
- package/dist/cli/{play-A5ISFBJM.mjs → play-XTE4LUP7.mjs} +11 -10
- package/dist/cli/{providers-DR2CLD3N.js → providers-JNMJJ2OH.js} +7 -7
- package/dist/cli/{providers-KHTZFQ5I.mjs → providers-RWLN6FUR.mjs} +4 -4
- package/dist/cli/{quickstart-NIRWI6YU.js → quickstart-HK6WZ342.js} +5 -5
- package/dist/cli/{quickstart-KT4LKORA.mjs → quickstart-IDB3Y375.mjs} +3 -3
- package/dist/cli/{search-WCEXPBAT.mjs → search-6D3IFNPT.mjs} +5 -5
- package/dist/cli/search-LUZ2S7DH.js +26 -0
- package/dist/cli/{secrets-QSFEZGVE.js → secrets-JOQB57IE.js} +13 -13
- package/dist/cli/{secrets-TN7DW3QR.mjs → secrets-TZ53CQ3D.mjs} +4 -4
- package/dist/cli/{sessions-WSE5FN4H.mjs → sessions-4MBDC4EK.mjs} +4 -4
- package/dist/cli/{sessions-LJS6W67T.js → sessions-QSAICDXX.js} +5 -5
- package/dist/cli/{settings-FGS3VYJN.js → settings-OTOCW7L7.js} +74 -74
- package/dist/cli/{settings-Z3V53A6J.mjs → settings-RKQFMLDU.mjs} +7 -7
- package/dist/cli/{setup-GMH4VJS3.mjs → setup-2S5TNTUB.mjs} +6 -6
- package/dist/cli/{setup-ZA234HEY.js → setup-AKZUDVYY.js} +41 -41
- package/dist/cli/skills-26LASHZF.js +28 -0
- package/dist/cli/{skills-7G2RZMYH.mjs → skills-AGZXDLSA.mjs} +4 -4
- package/dist/cli/{tools-7EE4BGXO.mjs → tools-7Y6RD6FY.mjs} +8 -7
- package/dist/cli/tools-L5VIJQWX.js +39 -0
- package/dist/cli/{update-O5QEWS7K.mjs → update-M7YGF67I.mjs} +6 -6
- package/dist/cli/update-MNHF6M2F.js +28 -0
- package/dist/cli/{workflow-KE54RUTR.mjs → workflow-CTVE7S7W.mjs} +5 -5
- package/dist/cli/{workflow-M5PAAW3O.js → workflow-NGMY425T.js} +15 -15
- package/dist/{client-BV68GMPo.d.ts → client-DHq8dJ56.d.ts} +45 -11
- package/dist/{client-D9ACjiRC.d.mts → client-wiWPZhnI.d.mts} +45 -11
- package/dist/{compiler-manifest-BXcZ4P4W.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +717 -711
- package/dist/{compiler-manifest-BXcZ4P4W.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +717 -711
- package/dist/index-B-5_Xhud.d.mts +75 -0
- package/dist/index-ykksoEyR.d.ts +75 -0
- package/dist/index.d.mts +52 -13
- package/dist/index.d.ts +52 -13
- package/dist/index.js +92 -28
- package/dist/index.mjs +91 -27
- package/dist/install-integrity.json +91 -84
- package/dist/plays/bundle-play-file.d.mts +7 -75
- package/dist/plays/bundle-play-file.d.ts +7 -75
- package/dist/plays/bundle-play-file.mjs +1 -1
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-LKSTC3YV.js +0 -31
- package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
- package/dist/cli/chunk-SDK3ZA2C.js +0 -103
- package/dist/cli/client-WMSTRUGP.js +0 -20
- package/dist/cli/git-73N6EUZ3.js +0 -23
- package/dist/cli/play-CLC2Z5SO.js +0 -152
- package/dist/cli/search-DM7IQS5F.js +0 -26
- package/dist/cli/skills-6APAQV6W.js +0 -28
- package/dist/cli/tools-EPYUFWPB.js +0 -38
- package/dist/cli/update-FPVX3XJC.js +0 -28
package/dist/index.js
CHANGED
|
@@ -24,15 +24,18 @@ var _chunkNXDRDJ4Kjs = require('./cli/chunk-NXDRDJ4K.js');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var _chunkSDK3ZA2Cjs = require('./cli/chunk-SDK3ZA2C.js');
|
|
28
27
|
|
|
29
28
|
|
|
29
|
+
var _chunkLVEDPCLJjs = require('./cli/chunk-LVEDPCLJ.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var _chunkGVYKY6T6js = require('./cli/chunk-GVYKY6T6.js');
|
|
36
39
|
require('./cli/chunk-LA46MMTL.js');
|
|
37
40
|
|
|
38
41
|
|
|
@@ -62,9 +65,10 @@ var _chunkWOHBA5PVjs = require('./cli/chunk-WOHBA5PV.js');
|
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
|
|
69
|
+
var _chunkTXVOB5J2js = require('./cli/chunk-TXVOB5J2.js');
|
|
66
70
|
require('./cli/chunk-XNYIZMNQ.js');
|
|
67
|
-
require('./cli/chunk-
|
|
71
|
+
require('./cli/chunk-BUYZEUY4.js');
|
|
68
72
|
|
|
69
73
|
|
|
70
74
|
var _chunk2HKPAZVJjs = require('./cli/chunk-2HKPAZVJ.js');
|
|
@@ -786,10 +790,54 @@ function candidateResultPaths(path) {
|
|
|
786
790
|
function normalizeRelativePath(path) {
|
|
787
791
|
return String(path || "").trim().replace(/^result\./, "").replace(/^\./, "");
|
|
788
792
|
}
|
|
789
|
-
|
|
793
|
+
var PHONE_OBJECT_VALUE_KEYS = [
|
|
794
|
+
"sanitized_number",
|
|
795
|
+
"number",
|
|
796
|
+
"phone",
|
|
797
|
+
"phone_number",
|
|
798
|
+
"phoneNumber",
|
|
799
|
+
"display_international",
|
|
800
|
+
"displayInternational",
|
|
801
|
+
"international",
|
|
802
|
+
"value",
|
|
803
|
+
"raw_number",
|
|
804
|
+
"raw",
|
|
805
|
+
"sanitized"
|
|
806
|
+
];
|
|
807
|
+
var PHONE_TARGET_MIN_DIGITS = 7;
|
|
808
|
+
function phoneTargetValue(value) {
|
|
809
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
810
|
+
return phoneTargetValue(String(value));
|
|
811
|
+
}
|
|
812
|
+
if (typeof value === "string") {
|
|
813
|
+
const trimmed = value.trim();
|
|
814
|
+
const digits = trimmed.replace(/\D/g, "").length;
|
|
815
|
+
return digits >= PHONE_TARGET_MIN_DIGITS ? trimmed : null;
|
|
816
|
+
}
|
|
817
|
+
if (Array.isArray(value)) {
|
|
818
|
+
for (const entry of value) {
|
|
819
|
+
const phone = phoneTargetValue(entry);
|
|
820
|
+
if (phone) return phone;
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
if (isRecord(value)) {
|
|
825
|
+
for (const key of PHONE_OBJECT_VALUE_KEYS) {
|
|
826
|
+
const phone = phoneTargetValue(value[key]);
|
|
827
|
+
if (phone) return phone;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return null;
|
|
831
|
+
}
|
|
832
|
+
function acceptedTargetValue(target, value) {
|
|
833
|
+
if (target === "phone") return _nullishCoalesce(phoneTargetValue(value), () => ( void 0));
|
|
834
|
+
return isMeaningfulValue(value) ? value : void 0;
|
|
835
|
+
}
|
|
836
|
+
function getFirstMeaningfulValueAtPath(root, path, target) {
|
|
790
837
|
for (const entry of valuesAtSegments(root, parsePath(path))) {
|
|
791
|
-
|
|
792
|
-
|
|
838
|
+
const value = acceptedTargetValue(target, entry.value);
|
|
839
|
+
if (value !== void 0) {
|
|
840
|
+
return { value, path: entry.path };
|
|
793
841
|
}
|
|
794
842
|
}
|
|
795
843
|
return null;
|
|
@@ -825,10 +873,10 @@ function normalizeRows(value) {
|
|
|
825
873
|
if (!Array.isArray(value)) return null;
|
|
826
874
|
return value.map((entry) => isRecord(entry) ? entry : { value: entry });
|
|
827
875
|
}
|
|
828
|
-
function findFirstTargetByPath(result, paths) {
|
|
876
|
+
function findFirstTargetByPath(result, paths, target) {
|
|
829
877
|
for (const path of _nullishCoalesce(paths, () => ( []))) {
|
|
830
878
|
for (const candidate of candidateResultPaths(path)) {
|
|
831
|
-
const match = getFirstMeaningfulValueAtPath(result, candidate);
|
|
879
|
+
const match = getFirstMeaningfulValueAtPath(result, candidate, target);
|
|
832
880
|
if (match) return match;
|
|
833
881
|
}
|
|
834
882
|
}
|
|
@@ -899,8 +947,10 @@ function findFirstTargetByKey(result, target, depth = 0, path = []) {
|
|
|
899
947
|
}));
|
|
900
948
|
for (const [key, value] of Object.entries(result)) {
|
|
901
949
|
if (_optionalChain([rule, 'access', _33 => _33.reject, 'optionalAccess', _34 => _34.some, 'call', _35 => _35((pattern) => pattern.test(key))])) continue;
|
|
902
|
-
if (rule.match.some((pattern) => pattern.test(key))
|
|
903
|
-
|
|
950
|
+
if (!rule.match.some((pattern) => pattern.test(key))) continue;
|
|
951
|
+
const accepted = acceptedTargetValue(target, value);
|
|
952
|
+
if (accepted !== void 0) {
|
|
953
|
+
return { value: accepted, path: pathToString([...path, key]) };
|
|
904
954
|
}
|
|
905
955
|
}
|
|
906
956
|
for (const [key, value] of Object.entries(result)) {
|
|
@@ -1103,7 +1153,11 @@ function buildTargets(result, extractors, targetGetters) {
|
|
|
1103
1153
|
targets[target] = emailStatusTarget;
|
|
1104
1154
|
continue;
|
|
1105
1155
|
}
|
|
1106
|
-
const fromExtractor = findFirstTargetByPath(
|
|
1156
|
+
const fromExtractor = findFirstTargetByPath(
|
|
1157
|
+
result,
|
|
1158
|
+
descriptor.paths,
|
|
1159
|
+
target
|
|
1160
|
+
);
|
|
1107
1161
|
if (!fromExtractor) {
|
|
1108
1162
|
const explicitNull = isSemanticStatus ? null : findFirstExplicitNullTargetByPath(result, descriptor.paths);
|
|
1109
1163
|
if (explicitNull) targets[target] = explicitNull;
|
|
@@ -1126,7 +1180,11 @@ function buildTargets(result, extractors, targetGetters) {
|
|
|
1126
1180
|
target,
|
|
1127
1181
|
_nullishCoalesce(_nullishCoalesce(_optionalChain([targetGetters, 'optionalAccess', _59 => _59[target]]), () => ( declaredTargetPaths.get(target))), () => ( []))
|
|
1128
1182
|
);
|
|
1129
|
-
const fromMetadata = findFirstTargetByPath(
|
|
1183
|
+
const fromMetadata = findFirstTargetByPath(
|
|
1184
|
+
result,
|
|
1185
|
+
_optionalChain([targetGetters, 'optionalAccess', _60 => _60[target]]),
|
|
1186
|
+
target
|
|
1187
|
+
);
|
|
1130
1188
|
if (fromMetadata) {
|
|
1131
1189
|
targets[target] = fromMetadata;
|
|
1132
1190
|
continue;
|
|
@@ -1606,7 +1664,7 @@ var DeeplineContext = class {
|
|
|
1606
1664
|
* @param options - Optional SDK client configuration.
|
|
1607
1665
|
*/
|
|
1608
1666
|
constructor(options) {
|
|
1609
|
-
this.client = new (0,
|
|
1667
|
+
this.client = new (0, _chunkGVYKY6T6js.DeeplineClient)(options);
|
|
1610
1668
|
}
|
|
1611
1669
|
/**
|
|
1612
1670
|
* Tool operations namespace.
|
|
@@ -1620,23 +1678,25 @@ var DeeplineContext = class {
|
|
|
1620
1678
|
* ```
|
|
1621
1679
|
*/
|
|
1622
1680
|
get tools() {
|
|
1681
|
+
const call = async (toolId, input, options) => {
|
|
1682
|
+
const response = await this.client.executeTool(toolId, input, {
|
|
1683
|
+
includeToolMetadata: true,
|
|
1684
|
+
responseIntent: "dataset",
|
|
1685
|
+
...options
|
|
1686
|
+
});
|
|
1687
|
+
return toolExecutionEnvelopeToResult(toolId, response, {
|
|
1688
|
+
client: this.client,
|
|
1689
|
+
input
|
|
1690
|
+
});
|
|
1691
|
+
};
|
|
1623
1692
|
return {
|
|
1624
1693
|
/** List all available tools. */
|
|
1625
1694
|
list: () => this.client.listTools(),
|
|
1626
1695
|
/** Get detailed metadata for a tool. */
|
|
1627
1696
|
get: (toolId) => this.client.getTool(toolId),
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
includeToolMetadata: true,
|
|
1632
|
-
responseIntent: "dataset",
|
|
1633
|
-
...options
|
|
1634
|
-
});
|
|
1635
|
-
return toolExecutionEnvelopeToResult(toolId, response, {
|
|
1636
|
-
client: this.client,
|
|
1637
|
-
input
|
|
1638
|
-
});
|
|
1639
|
-
}
|
|
1697
|
+
call,
|
|
1698
|
+
/** Compatibility spelling for the same tool operation. */
|
|
1699
|
+
execute: call
|
|
1640
1700
|
};
|
|
1641
1701
|
}
|
|
1642
1702
|
/** Durable state for recoverable direct tool executions. */
|
|
@@ -2086,7 +2146,7 @@ function definePlay(nameOrConfig, maybeFn, maybeBindings) {
|
|
|
2086
2146
|
writable: false
|
|
2087
2147
|
});
|
|
2088
2148
|
const handle = createNamedPlayHandle(
|
|
2089
|
-
() => new (0,
|
|
2149
|
+
() => new (0, _chunkGVYKY6T6js.DeeplineClient)(),
|
|
2090
2150
|
name
|
|
2091
2151
|
);
|
|
2092
2152
|
for (const key of [
|
|
@@ -2239,4 +2299,8 @@ function defineMonitor(definition) {
|
|
|
2239
2299
|
|
|
2240
2300
|
|
|
2241
2301
|
|
|
2242
|
-
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
|
|
2306
|
+
exports.AuthError = _chunkTXVOB5J2js.AuthError; exports.ConfigError = _chunkTXVOB5J2js.ConfigError; exports.CtxFetchHttpError = _chunk2HKPAZVJjs.CtxFetchHttpError; exports.CustomerDbQueryOutcomeUnknownError = _chunkTXVOB5J2js.CustomerDbQueryOutcomeUnknownError; exports.DEEPLINE_EXTRACTOR_TARGETS = DEEPLINE_EXTRACTOR_TARGETS; exports.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS; exports.DEEPLINE_TOOL_CATEGORIES = _chunkLVEDPCLJjs.DEEPLINE_TOOL_CATEGORIES; exports.Deepline = Deepline; exports.DeeplineClient = _chunkGVYKY6T6js.DeeplineClient; exports.DeeplineContext = DeeplineContext; exports.DeeplineError = _chunk7P5AA3SNjs.DeeplineError; exports.JOB_CHANGE_STATUS_VALUES = JOB_CHANGE_STATUS_VALUES; exports.MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG = _chunkJ5NA2TTXjs.MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG; exports.MONITOR_FLEET_AUTHORING_CONTRACT_EDITION = _chunkJ5NA2TTXjs.MONITOR_FLEET_AUTHORING_CONTRACT_EDITION; exports.MONITOR_FLEET_DOCUMENTATION = _chunkJ5NA2TTXjs.MONITOR_FLEET_DOCUMENTATION; exports.MONITOR_FLEET_FRONTIER_MAX_ROWS = _chunkJ5NA2TTXjs.MONITOR_FLEET_FRONTIER_MAX_ROWS; exports.MONITOR_FLEET_MAX_MEMBERS = _chunkJ5NA2TTXjs.MONITOR_FLEET_MAX_MEMBERS; exports.MONITOR_JOB_PHASES = _chunkGVYKY6T6js.MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = _chunkGVYKY6T6js.MONITOR_JOB_RECONCILIATION_STATES; exports.MONITOR_JOB_STATES = _chunkGVYKY6T6js.MONITOR_JOB_STATES; exports.PHONE_STATUS_VALUES = PHONE_STATUS_VALUES; exports.PLAY_BOOTSTRAP_COMPANY_FIELDS = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_COMPANY_FIELDS; exports.PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_CONTACT_FIELDS = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_CONTACT_FIELDS; exports.PLAY_BOOTSTRAP_FINDER_KINDS = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_FINDER_KINDS; exports.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER; exports.PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER; exports.PLAY_BOOTSTRAP_SOURCE_KINDS = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_SOURCE_KINDS; exports.PLAY_BOOTSTRAP_STAGE_KINDS = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_STAGE_KINDS; exports.PLAY_BOOTSTRAP_TEMPLATES = _chunkLVEDPCLJjs.PLAY_BOOTSTRAP_TEMPLATES; exports.PROD_URL = _chunkTXVOB5J2js.PROD_URL; exports.ProviderTransientError = _chunk7P5AA3SNjs.ProviderTransientError; exports.RateLimitError = _chunkTXVOB5J2js.RateLimitError; exports.RunEventQueryInputError = _chunkGVYKY6T6js.RunEventQueryInputError; exports.RunObserveTransportUnavailableError = RunObserveTransportUnavailableError; exports.SDK_API_CONTRACT = _chunkTXVOB5J2js.SDK_API_CONTRACT; exports.SDK_VERSION = _chunkTXVOB5J2js.SDK_VERSION; exports.ToolExecutionError = _chunk7P5AA3SNjs.ToolExecutionError; exports.ToolRateLimitError = _chunkTXVOB5J2js.ToolRateLimitError; exports.admitMonitorFleetAuthoringContract = _chunkJ5NA2TTXjs.admitMonitorFleetAuthoringContract; exports.defineInput = defineInput; exports.defineMonitor = defineMonitor; exports.defineMonitorFleet = _chunkJ5NA2TTXjs.defineMonitorFleet; exports.definePlay = definePlay; exports.defineWorkflow = defineWorkflow; exports.extractSummaryFields = _chunkNXDRDJ4Kjs.extractSummaryFields; exports.fleetColumn = _chunkJ5NA2TTXjs.fleetColumn; exports.fleetKey = _chunkJ5NA2TTXjs.fleetKey; exports.formatPlayBootstrapFinderKinds = _chunkLVEDPCLJjs.formatPlayBootstrapFinderKinds; exports.formatPlayBootstrapFinderKindsForSentence = _chunkLVEDPCLJjs.formatPlayBootstrapFinderKindsForSentence; exports.formatPlayBootstrapTemplates = _chunkLVEDPCLJjs.formatPlayBootstrapTemplates; exports.getDefinedPlayMetadata = getDefinedPlayMetadata; exports.getProviderUnavailableReason = _chunk7P5AA3SNjs.getProviderUnavailableReason; exports.isDeeplineExtractorTarget = isDeeplineExtractorTarget; exports.isPlayBootstrapFinderKind = _chunkLVEDPCLJjs.isPlayBootstrapFinderKind; exports.isPlayBootstrapTemplate = _chunkLVEDPCLJjs.isPlayBootstrapTemplate; exports.isProviderUnavailable = _chunk7P5AA3SNjs.isProviderUnavailable; exports.isProviderWaterfallUnavailableError = _chunk7P5AA3SNjs.isProviderWaterfallUnavailableError; exports.isStopAllPlayRunsDryRunResult = _chunkGVYKY6T6js.isStopAllPlayRunsDryRunResult; exports.lintMonitorBatchInput = _chunkWOHBA5PVjs.lintMonitorBatchInput; exports.lintMonitorFleetInput = _chunkJ5NA2TTXjs.lintMonitorFleetInput; exports.lintMonitorSpecTemplate = _chunkWOHBA5PVjs.lintMonitorSpecTemplate; exports.pinLocalPlayImports = _chunkLVEDPCLJjs.pinLocalPlayImports; exports.planCustomerDbQuery = _chunkGVYKY6T6js.planCustomerDbQuery; exports.planLocalPlayExecution = _chunkLVEDPCLJjs.planLocalPlayExecution; exports.renderMonitorSpecTemplate = _chunkWOHBA5PVjs.renderMonitorSpecTemplate; exports.resolveConfig = _chunkTXVOB5J2js.resolveConfig; exports.runIf = runIf; exports.steps = steps; exports.tryConvertToList = _chunkNXDRDJ4Kjs.tryConvertToList; exports.validateMonitorFleetDefinition = _chunkJ5NA2TTXjs.validateMonitorFleetDefinition; exports.writeCsvOutputFile = _chunkNXDRDJ4Kjs.writeCsvOutputFile; exports.writeJsonOutputFile = _chunkNXDRDJ4Kjs.writeJsonOutputFile;
|
package/dist/index.mjs
CHANGED
|
@@ -23,16 +23,19 @@ import {
|
|
|
23
23
|
formatPlayBootstrapFinderKindsForSentence,
|
|
24
24
|
formatPlayBootstrapTemplates,
|
|
25
25
|
isPlayBootstrapFinderKind,
|
|
26
|
-
isPlayBootstrapTemplate
|
|
27
|
-
|
|
26
|
+
isPlayBootstrapTemplate,
|
|
27
|
+
pinLocalPlayImports,
|
|
28
|
+
planLocalPlayExecution
|
|
29
|
+
} from "./cli/chunk-GVESPYSY.mjs";
|
|
28
30
|
import {
|
|
29
31
|
DeeplineClient,
|
|
30
32
|
MONITOR_JOB_PHASES,
|
|
31
33
|
MONITOR_JOB_RECONCILIATION_STATES,
|
|
32
34
|
MONITOR_JOB_STATES,
|
|
33
35
|
RunEventQueryInputError,
|
|
34
|
-
isStopAllPlayRunsDryRunResult
|
|
35
|
-
|
|
36
|
+
isStopAllPlayRunsDryRunResult,
|
|
37
|
+
planCustomerDbQuery
|
|
38
|
+
} from "./cli/chunk-KLWBAQ5A.mjs";
|
|
36
39
|
import "./cli/chunk-CBVIJSHF.mjs";
|
|
37
40
|
import {
|
|
38
41
|
MONITOR_FLEET_AUTHORING_CONTRACT_CHANGELOG,
|
|
@@ -56,15 +59,16 @@ import {
|
|
|
56
59
|
import {
|
|
57
60
|
AuthError,
|
|
58
61
|
ConfigError,
|
|
62
|
+
CustomerDbQueryOutcomeUnknownError,
|
|
59
63
|
PROD_URL,
|
|
60
64
|
RateLimitError,
|
|
61
65
|
SDK_API_CONTRACT,
|
|
62
66
|
SDK_VERSION,
|
|
63
67
|
ToolRateLimitError,
|
|
64
68
|
resolveConfig
|
|
65
|
-
} from "./cli/chunk-
|
|
69
|
+
} from "./cli/chunk-BR7GGTAE.mjs";
|
|
66
70
|
import "./cli/chunk-DLIRSHV6.mjs";
|
|
67
|
-
import "./cli/chunk-
|
|
71
|
+
import "./cli/chunk-BQJVMKWL.mjs";
|
|
68
72
|
import {
|
|
69
73
|
CtxFetchHttpError
|
|
70
74
|
} from "./cli/chunk-KP7W5NO6.mjs";
|
|
@@ -786,10 +790,54 @@ function candidateResultPaths(path) {
|
|
|
786
790
|
function normalizeRelativePath(path) {
|
|
787
791
|
return String(path || "").trim().replace(/^result\./, "").replace(/^\./, "");
|
|
788
792
|
}
|
|
789
|
-
|
|
793
|
+
var PHONE_OBJECT_VALUE_KEYS = [
|
|
794
|
+
"sanitized_number",
|
|
795
|
+
"number",
|
|
796
|
+
"phone",
|
|
797
|
+
"phone_number",
|
|
798
|
+
"phoneNumber",
|
|
799
|
+
"display_international",
|
|
800
|
+
"displayInternational",
|
|
801
|
+
"international",
|
|
802
|
+
"value",
|
|
803
|
+
"raw_number",
|
|
804
|
+
"raw",
|
|
805
|
+
"sanitized"
|
|
806
|
+
];
|
|
807
|
+
var PHONE_TARGET_MIN_DIGITS = 7;
|
|
808
|
+
function phoneTargetValue(value) {
|
|
809
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
810
|
+
return phoneTargetValue(String(value));
|
|
811
|
+
}
|
|
812
|
+
if (typeof value === "string") {
|
|
813
|
+
const trimmed = value.trim();
|
|
814
|
+
const digits = trimmed.replace(/\D/g, "").length;
|
|
815
|
+
return digits >= PHONE_TARGET_MIN_DIGITS ? trimmed : null;
|
|
816
|
+
}
|
|
817
|
+
if (Array.isArray(value)) {
|
|
818
|
+
for (const entry of value) {
|
|
819
|
+
const phone = phoneTargetValue(entry);
|
|
820
|
+
if (phone) return phone;
|
|
821
|
+
}
|
|
822
|
+
return null;
|
|
823
|
+
}
|
|
824
|
+
if (isRecord(value)) {
|
|
825
|
+
for (const key of PHONE_OBJECT_VALUE_KEYS) {
|
|
826
|
+
const phone = phoneTargetValue(value[key]);
|
|
827
|
+
if (phone) return phone;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
return null;
|
|
831
|
+
}
|
|
832
|
+
function acceptedTargetValue(target, value) {
|
|
833
|
+
if (target === "phone") return phoneTargetValue(value) ?? void 0;
|
|
834
|
+
return isMeaningfulValue(value) ? value : void 0;
|
|
835
|
+
}
|
|
836
|
+
function getFirstMeaningfulValueAtPath(root, path, target) {
|
|
790
837
|
for (const entry of valuesAtSegments(root, parsePath(path))) {
|
|
791
|
-
|
|
792
|
-
|
|
838
|
+
const value = acceptedTargetValue(target, entry.value);
|
|
839
|
+
if (value !== void 0) {
|
|
840
|
+
return { value, path: entry.path };
|
|
793
841
|
}
|
|
794
842
|
}
|
|
795
843
|
return null;
|
|
@@ -825,10 +873,10 @@ function normalizeRows(value) {
|
|
|
825
873
|
if (!Array.isArray(value)) return null;
|
|
826
874
|
return value.map((entry) => isRecord(entry) ? entry : { value: entry });
|
|
827
875
|
}
|
|
828
|
-
function findFirstTargetByPath(result, paths) {
|
|
876
|
+
function findFirstTargetByPath(result, paths, target) {
|
|
829
877
|
for (const path of paths ?? []) {
|
|
830
878
|
for (const candidate of candidateResultPaths(path)) {
|
|
831
|
-
const match = getFirstMeaningfulValueAtPath(result, candidate);
|
|
879
|
+
const match = getFirstMeaningfulValueAtPath(result, candidate, target);
|
|
832
880
|
if (match) return match;
|
|
833
881
|
}
|
|
834
882
|
}
|
|
@@ -899,8 +947,10 @@ function findFirstTargetByKey(result, target, depth = 0, path = []) {
|
|
|
899
947
|
};
|
|
900
948
|
for (const [key, value] of Object.entries(result)) {
|
|
901
949
|
if (rule.reject?.some((pattern) => pattern.test(key))) continue;
|
|
902
|
-
if (rule.match.some((pattern) => pattern.test(key))
|
|
903
|
-
|
|
950
|
+
if (!rule.match.some((pattern) => pattern.test(key))) continue;
|
|
951
|
+
const accepted = acceptedTargetValue(target, value);
|
|
952
|
+
if (accepted !== void 0) {
|
|
953
|
+
return { value: accepted, path: pathToString([...path, key]) };
|
|
904
954
|
}
|
|
905
955
|
}
|
|
906
956
|
for (const [key, value] of Object.entries(result)) {
|
|
@@ -1103,7 +1153,11 @@ function buildTargets(result, extractors, targetGetters) {
|
|
|
1103
1153
|
targets[target] = emailStatusTarget;
|
|
1104
1154
|
continue;
|
|
1105
1155
|
}
|
|
1106
|
-
const fromExtractor = findFirstTargetByPath(
|
|
1156
|
+
const fromExtractor = findFirstTargetByPath(
|
|
1157
|
+
result,
|
|
1158
|
+
descriptor.paths,
|
|
1159
|
+
target
|
|
1160
|
+
);
|
|
1107
1161
|
if (!fromExtractor) {
|
|
1108
1162
|
const explicitNull = isSemanticStatus ? null : findFirstExplicitNullTargetByPath(result, descriptor.paths);
|
|
1109
1163
|
if (explicitNull) targets[target] = explicitNull;
|
|
@@ -1126,7 +1180,11 @@ function buildTargets(result, extractors, targetGetters) {
|
|
|
1126
1180
|
target,
|
|
1127
1181
|
targetGetters?.[target] ?? declaredTargetPaths.get(target) ?? []
|
|
1128
1182
|
);
|
|
1129
|
-
const fromMetadata = findFirstTargetByPath(
|
|
1183
|
+
const fromMetadata = findFirstTargetByPath(
|
|
1184
|
+
result,
|
|
1185
|
+
targetGetters?.[target],
|
|
1186
|
+
target
|
|
1187
|
+
);
|
|
1130
1188
|
if (fromMetadata) {
|
|
1131
1189
|
targets[target] = fromMetadata;
|
|
1132
1190
|
continue;
|
|
@@ -1620,23 +1678,25 @@ var DeeplineContext = class {
|
|
|
1620
1678
|
* ```
|
|
1621
1679
|
*/
|
|
1622
1680
|
get tools() {
|
|
1681
|
+
const call = async (toolId, input, options) => {
|
|
1682
|
+
const response = await this.client.executeTool(toolId, input, {
|
|
1683
|
+
includeToolMetadata: true,
|
|
1684
|
+
responseIntent: "dataset",
|
|
1685
|
+
...options
|
|
1686
|
+
});
|
|
1687
|
+
return toolExecutionEnvelopeToResult(toolId, response, {
|
|
1688
|
+
client: this.client,
|
|
1689
|
+
input
|
|
1690
|
+
});
|
|
1691
|
+
};
|
|
1623
1692
|
return {
|
|
1624
1693
|
/** List all available tools. */
|
|
1625
1694
|
list: () => this.client.listTools(),
|
|
1626
1695
|
/** Get detailed metadata for a tool. */
|
|
1627
1696
|
get: (toolId) => this.client.getTool(toolId),
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
includeToolMetadata: true,
|
|
1632
|
-
responseIntent: "dataset",
|
|
1633
|
-
...options
|
|
1634
|
-
});
|
|
1635
|
-
return toolExecutionEnvelopeToResult(toolId, response, {
|
|
1636
|
-
client: this.client,
|
|
1637
|
-
input
|
|
1638
|
-
});
|
|
1639
|
-
}
|
|
1697
|
+
call,
|
|
1698
|
+
/** Compatibility spelling for the same tool operation. */
|
|
1699
|
+
execute: call
|
|
1640
1700
|
};
|
|
1641
1701
|
}
|
|
1642
1702
|
/** Durable state for recoverable direct tool executions. */
|
|
@@ -2172,6 +2232,7 @@ export {
|
|
|
2172
2232
|
AuthError,
|
|
2173
2233
|
ConfigError,
|
|
2174
2234
|
CtxFetchHttpError,
|
|
2235
|
+
CustomerDbQueryOutcomeUnknownError,
|
|
2175
2236
|
DEEPLINE_EXTRACTOR_TARGETS,
|
|
2176
2237
|
DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
|
|
2177
2238
|
DEEPLINE_TOOL_CATEGORIES,
|
|
@@ -2231,6 +2292,9 @@ export {
|
|
|
2231
2292
|
lintMonitorBatchInput,
|
|
2232
2293
|
lintMonitorFleetInput,
|
|
2233
2294
|
lintMonitorSpecTemplate,
|
|
2295
|
+
pinLocalPlayImports,
|
|
2296
|
+
planCustomerDbQuery,
|
|
2297
|
+
planLocalPlayExecution,
|
|
2234
2298
|
renderMonitorSpecTemplate,
|
|
2235
2299
|
resolveConfig,
|
|
2236
2300
|
runIf,
|