deepline 0.3.325 → 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.
Files changed (127) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +23 -25
  2. package/dist/bundling-sources/sdk/src/compat.ts +11 -6
  3. package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
  4. package/dist/bundling-sources/sdk/src/errors.ts +35 -0
  5. package/dist/bundling-sources/sdk/src/index.ts +13 -0
  6. package/dist/bundling-sources/sdk/src/play.ts +34 -31
  7. package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
  8. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
  9. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
  12. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +84 -10
  13. package/dist/cli/auth-6STWK6UK.js +31 -0
  14. package/dist/cli/{auth-PIZESRPC.mjs → auth-VON5FFUK.mjs} +4 -4
  15. package/dist/cli/{billing-HSL6VTCM.mjs → billing-X6JUEFRE.mjs} +4 -4
  16. package/dist/cli/{billing-DQKFCQV5.js → billing-YI4RZI2O.js} +70 -70
  17. package/dist/cli/{chunk-UYFWTIKF.js → chunk-3NGWGFVL.js} +26 -26
  18. package/dist/cli/{chunk-PWV2M4LW.mjs → chunk-4AB4Y6FF.mjs} +1 -1
  19. package/dist/cli/{chunk-DLW7X2UK.js → chunk-4LNBSQM4.js} +5928 -5730
  20. package/dist/cli/{chunk-OOPSX57I.js → chunk-5NXHSRRE.js} +6 -6
  21. package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
  22. package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
  23. package/dist/cli/chunk-AID3OYVJ.js +8 -0
  24. package/dist/cli/{chunk-NWBARG3F.mjs → chunk-BQJVMKWL.mjs} +1 -1
  25. package/dist/cli/{chunk-YE3O2UHM.mjs → chunk-BR7GGTAE.mjs} +24 -1
  26. package/dist/cli/{chunk-K7FC5IUU.js → chunk-BUYZEUY4.js} +1 -1
  27. package/dist/cli/{chunk-QQ2FG5W3.js → chunk-CUUHQ3AO.js} +6 -6
  28. package/dist/cli/{chunk-H5TJBRSC.mjs → chunk-DFDXKOLR.mjs} +98 -113
  29. package/dist/cli/{chunk-HPTQEWCF.js → chunk-EMZ7Y5SW.js} +70 -67
  30. package/dist/cli/chunk-GVESPYSY.mjs +234 -0
  31. package/dist/cli/{chunk-MNKDSR2J.js → chunk-GVYKY6T6.js} +344 -254
  32. package/dist/cli/{chunk-6RMKHN7S.mjs → chunk-IQCCGOQH.mjs} +4 -20
  33. package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
  34. package/dist/cli/{chunk-XIVUB36F.mjs → chunk-KLWBAQ5A.mjs} +104 -14
  35. package/dist/cli/{chunk-CV5GDCKN.js → chunk-KZ4PCK4O.js} +29 -45
  36. package/dist/cli/chunk-LVEDPCLJ.js +234 -0
  37. package/dist/cli/{chunk-AQUNQJ5Y.mjs → chunk-M7CPVMDB.mjs} +1 -1
  38. package/dist/cli/{chunk-HUKWYHBG.js → chunk-MDQZQ3NY.js} +2 -2
  39. package/dist/cli/{chunk-PBNZXZCW.js → chunk-MKHSZA2X.js} +48 -48
  40. package/dist/cli/{chunk-5TYU3UIS.mjs → chunk-MOBZS4F3.mjs} +1 -1
  41. package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
  42. package/dist/cli/{chunk-KZNFYOHX.js → chunk-T33W6JUJ.js} +6 -6
  43. package/dist/cli/{chunk-6VZDSBK6.mjs → chunk-TDSNAC3C.mjs} +2 -2
  44. package/dist/cli/{chunk-PVDQ55PS.js → chunk-TXVOB5J2.js} +29 -6
  45. package/dist/cli/{chunk-YXRPWMGN.js → chunk-TZQMFWLF.js} +147 -162
  46. package/dist/cli/{chunk-OPERWJR6.mjs → chunk-VGKVLADU.mjs} +3 -3
  47. package/dist/cli/{chunk-7MD453WV.mjs → chunk-VKXGOQG5.mjs} +5674 -5476
  48. package/dist/cli/{chunk-WW4XZIVM.mjs → chunk-W74E5ETE.mjs} +12 -9
  49. package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
  50. package/dist/cli/{chunk-5FHU7TV4.mjs → chunk-ZRN6YOF2.mjs} +2 -2
  51. package/dist/cli/client-TEBW2P24.js +20 -0
  52. package/dist/cli/{client-57SR4KVM.mjs → client-ZMOKUNL2.mjs} +3 -3
  53. package/dist/cli/{csv-5DJSC6BD.js → csv-HZRKEI7J.js} +12 -12
  54. package/dist/cli/{csv-G2FRMOXL.mjs → csv-IICJHJZ4.mjs} +3 -3
  55. package/dist/cli/{db-NVO7P4VO.js → db-TM5NZF73.js} +226 -149
  56. package/dist/cli/{db-WWZEXM3N.mjs → db-X4B7YFNY.mjs} +214 -137
  57. package/dist/cli/{describe-M26LHDBQ.js → describe-BDBARWZJ.js} +28 -27
  58. package/dist/cli/{describe-26OMF3A4.mjs → describe-GMVS3LFC.mjs} +12 -11
  59. package/dist/cli/{executions-2LLHY3IL.mjs → executions-447ZJMN4.mjs} +4 -4
  60. package/dist/cli/{executions-KI47LPKE.js → executions-QX25UOQM.js} +6 -6
  61. package/dist/cli/{feedback-2Y26C2BZ.js → feedback-4IXUTBX7.js} +6 -6
  62. package/dist/cli/{feedback-O26VL2OF.mjs → feedback-JB7HHIC6.mjs} +3 -3
  63. package/dist/cli/git-C7C7DTEH.js +23 -0
  64. package/dist/cli/{git-UVPGZN3K.mjs → git-VID6KGAA.mjs} +4 -4
  65. package/dist/cli/index.js +105 -87
  66. package/dist/cli/index.mjs +65 -47
  67. package/dist/cli/{legacy-noops-H6Y3SEVB.js → legacy-noops-3FYTCOZO.js} +7 -7
  68. package/dist/cli/{legacy-noops-IK5CH72U.mjs → legacy-noops-SGR3G5WS.mjs} +4 -4
  69. package/dist/cli/{monitors-SFVVMAJT.mjs → monitors-SH4FOMBM.mjs} +4 -4
  70. package/dist/cli/{monitors-JL6TTQCI.js → monitors-SP52UHS4.js} +85 -85
  71. package/dist/cli/{org-SSDONL57.mjs → org-B32MMIQT.mjs} +4 -4
  72. package/dist/cli/{org-OVMAZCQS.js → org-UQMX7JOR.js} +60 -60
  73. package/dist/cli/play-UCIWBN7U.js +153 -0
  74. package/dist/cli/{play-X6NPACUO.mjs → play-XTE4LUP7.mjs} +11 -10
  75. package/dist/cli/{providers-E24JDWSR.js → providers-JNMJJ2OH.js} +7 -7
  76. package/dist/cli/{providers-ONUBYYY4.mjs → providers-RWLN6FUR.mjs} +4 -4
  77. package/dist/cli/{quickstart-TB7C3DLG.js → quickstart-HK6WZ342.js} +5 -5
  78. package/dist/cli/{quickstart-B7NIXACV.mjs → quickstart-IDB3Y375.mjs} +3 -3
  79. package/dist/cli/{search-N3QUIATW.mjs → search-6D3IFNPT.mjs} +5 -5
  80. package/dist/cli/search-LUZ2S7DH.js +26 -0
  81. package/dist/cli/{secrets-CPCVFDYB.js → secrets-JOQB57IE.js} +13 -13
  82. package/dist/cli/{secrets-V7Z4M67T.mjs → secrets-TZ53CQ3D.mjs} +4 -4
  83. package/dist/cli/{sessions-PDOBKAKO.mjs → sessions-4MBDC4EK.mjs} +4 -4
  84. package/dist/cli/{sessions-E4FIZLQP.js → sessions-QSAICDXX.js} +5 -5
  85. package/dist/cli/{settings-UVM2WDE4.js → settings-OTOCW7L7.js} +74 -74
  86. package/dist/cli/{settings-QYHYHZDI.mjs → settings-RKQFMLDU.mjs} +7 -7
  87. package/dist/cli/{setup-4RLAETDW.mjs → setup-2S5TNTUB.mjs} +6 -6
  88. package/dist/cli/{setup-3JFAXQLJ.js → setup-AKZUDVYY.js} +41 -41
  89. package/dist/cli/skills-26LASHZF.js +28 -0
  90. package/dist/cli/{skills-ZX2JSWOZ.mjs → skills-AGZXDLSA.mjs} +4 -4
  91. package/dist/cli/{tools-EGXCVIPJ.mjs → tools-7Y6RD6FY.mjs} +8 -7
  92. package/dist/cli/tools-L5VIJQWX.js +39 -0
  93. package/dist/cli/{update-7FEKRQFE.mjs → update-M7YGF67I.mjs} +6 -6
  94. package/dist/cli/update-MNHF6M2F.js +28 -0
  95. package/dist/cli/{workflow-7V7TTTKK.mjs → workflow-CTVE7S7W.mjs} +5 -5
  96. package/dist/cli/{workflow-54VCKIG2.js → workflow-NGMY425T.js} +15 -15
  97. package/dist/{client-Bb4Jjzmj.d.ts → client-DHq8dJ56.d.ts} +39 -11
  98. package/dist/{client-COa-3GHK.d.mts → client-wiWPZhnI.d.mts} +39 -11
  99. package/dist/{compiler-manifest-CsnWj-AK.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +711 -711
  100. package/dist/{compiler-manifest-CsnWj-AK.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +711 -711
  101. package/dist/index-B-5_Xhud.d.mts +75 -0
  102. package/dist/index-ykksoEyR.d.ts +75 -0
  103. package/dist/index.d.mts +52 -13
  104. package/dist/index.d.ts +52 -13
  105. package/dist/index.js +92 -28
  106. package/dist/index.mjs +91 -27
  107. package/dist/install-integrity.json +91 -84
  108. package/dist/plays/bundle-play-file.d.mts +7 -75
  109. package/dist/plays/bundle-play-file.d.ts +7 -75
  110. package/dist/plays/bundle-play-file.mjs +1 -1
  111. package/dist/plays/run-request.d.mts +2 -2
  112. package/dist/plays/run-request.d.ts +2 -2
  113. package/dist/release.d.mts +1 -1
  114. package/dist/release.d.ts +1 -1
  115. package/dist/release.js +2 -2
  116. package/dist/release.mjs +1 -1
  117. package/package.json +1 -1
  118. package/dist/cli/auth-RXCD4GOV.js +0 -31
  119. package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
  120. package/dist/cli/chunk-SDK3ZA2C.js +0 -103
  121. package/dist/cli/client-562MULXK.js +0 -20
  122. package/dist/cli/git-KGPX5YPD.js +0 -23
  123. package/dist/cli/play-3DB4MSHN.js +0 -152
  124. package/dist/cli/search-NJ637YGQ.js +0 -26
  125. package/dist/cli/skills-BYRYG64R.js +0 -28
  126. package/dist/cli/tools-TAWOAY5X.js +0 -38
  127. package/dist/cli/update-H24GEBXM.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
- var _chunkMNKDSR2Jjs = require('./cli/chunk-MNKDSR2J.js');
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
- var _chunkPVDQ55PSjs = require('./cli/chunk-PVDQ55PS.js');
68
+
69
+ var _chunkTXVOB5J2js = require('./cli/chunk-TXVOB5J2.js');
66
70
  require('./cli/chunk-XNYIZMNQ.js');
67
- require('./cli/chunk-K7FC5IUU.js');
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
- function getFirstMeaningfulValueAtPath(root, path) {
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
- if (isMeaningfulValue(entry.value)) {
792
- return { value: entry.value, path: entry.path };
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)) && isMeaningfulValue(value)) {
903
- return { value, path: pathToString([...path, key]) };
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(result, descriptor.paths);
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(result, _optionalChain([targetGetters, 'optionalAccess', _60 => _60[target]]));
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, _chunkMNKDSR2Jjs.DeeplineClient)(options);
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
- /** Execute a tool and return the standard execution envelope. */
1629
- execute: async (toolId, input, options) => {
1630
- const response = await this.client.executeTool(toolId, input, {
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, _chunkMNKDSR2Jjs.DeeplineClient)(),
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
- exports.AuthError = _chunkPVDQ55PSjs.AuthError; exports.ConfigError = _chunkPVDQ55PSjs.ConfigError; exports.CtxFetchHttpError = _chunk2HKPAZVJjs.CtxFetchHttpError; exports.DEEPLINE_EXTRACTOR_TARGETS = DEEPLINE_EXTRACTOR_TARGETS; exports.DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS; exports.DEEPLINE_TOOL_CATEGORIES = _chunkSDK3ZA2Cjs.DEEPLINE_TOOL_CATEGORIES; exports.Deepline = Deepline; exports.DeeplineClient = _chunkMNKDSR2Jjs.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 = _chunkMNKDSR2Jjs.MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = _chunkMNKDSR2Jjs.MONITOR_JOB_RECONCILIATION_STATES; exports.MONITOR_JOB_STATES = _chunkMNKDSR2Jjs.MONITOR_JOB_STATES; exports.PHONE_STATUS_VALUES = PHONE_STATUS_VALUES; exports.PLAY_BOOTSTRAP_COMPANY_FIELDS = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_COMPANY_FIELDS; exports.PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_CONTACT_FIELDS = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_CONTACT_FIELDS; exports.PLAY_BOOTSTRAP_FINDER_KINDS = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_FINDER_KINDS; exports.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER; exports.PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER; exports.PLAY_BOOTSTRAP_SOURCE_KINDS = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_SOURCE_KINDS; exports.PLAY_BOOTSTRAP_STAGE_KINDS = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_STAGE_KINDS; exports.PLAY_BOOTSTRAP_TEMPLATES = _chunkSDK3ZA2Cjs.PLAY_BOOTSTRAP_TEMPLATES; exports.PROD_URL = _chunkPVDQ55PSjs.PROD_URL; exports.ProviderTransientError = _chunk7P5AA3SNjs.ProviderTransientError; exports.RateLimitError = _chunkPVDQ55PSjs.RateLimitError; exports.RunEventQueryInputError = _chunkMNKDSR2Jjs.RunEventQueryInputError; exports.RunObserveTransportUnavailableError = RunObserveTransportUnavailableError; exports.SDK_API_CONTRACT = _chunkPVDQ55PSjs.SDK_API_CONTRACT; exports.SDK_VERSION = _chunkPVDQ55PSjs.SDK_VERSION; exports.ToolExecutionError = _chunk7P5AA3SNjs.ToolExecutionError; exports.ToolRateLimitError = _chunkPVDQ55PSjs.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 = _chunkSDK3ZA2Cjs.formatPlayBootstrapFinderKinds; exports.formatPlayBootstrapFinderKindsForSentence = _chunkSDK3ZA2Cjs.formatPlayBootstrapFinderKindsForSentence; exports.formatPlayBootstrapTemplates = _chunkSDK3ZA2Cjs.formatPlayBootstrapTemplates; exports.getDefinedPlayMetadata = getDefinedPlayMetadata; exports.getProviderUnavailableReason = _chunk7P5AA3SNjs.getProviderUnavailableReason; exports.isDeeplineExtractorTarget = isDeeplineExtractorTarget; exports.isPlayBootstrapFinderKind = _chunkSDK3ZA2Cjs.isPlayBootstrapFinderKind; exports.isPlayBootstrapTemplate = _chunkSDK3ZA2Cjs.isPlayBootstrapTemplate; exports.isProviderUnavailable = _chunk7P5AA3SNjs.isProviderUnavailable; exports.isProviderWaterfallUnavailableError = _chunk7P5AA3SNjs.isProviderWaterfallUnavailableError; exports.isStopAllPlayRunsDryRunResult = _chunkMNKDSR2Jjs.isStopAllPlayRunsDryRunResult; exports.lintMonitorBatchInput = _chunkWOHBA5PVjs.lintMonitorBatchInput; exports.lintMonitorFleetInput = _chunkJ5NA2TTXjs.lintMonitorFleetInput; exports.lintMonitorSpecTemplate = _chunkWOHBA5PVjs.lintMonitorSpecTemplate; exports.renderMonitorSpecTemplate = _chunkWOHBA5PVjs.renderMonitorSpecTemplate; exports.resolveConfig = _chunkPVDQ55PSjs.resolveConfig; exports.runIf = runIf; exports.steps = steps; exports.tryConvertToList = _chunkNXDRDJ4Kjs.tryConvertToList; exports.validateMonitorFleetDefinition = _chunkJ5NA2TTXjs.validateMonitorFleetDefinition; exports.writeCsvOutputFile = _chunkNXDRDJ4Kjs.writeCsvOutputFile; exports.writeJsonOutputFile = _chunkNXDRDJ4Kjs.writeJsonOutputFile;
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
- } from "./cli/chunk-OWJZUE3Y.mjs";
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
- } from "./cli/chunk-XIVUB36F.mjs";
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-YE3O2UHM.mjs";
69
+ } from "./cli/chunk-BR7GGTAE.mjs";
66
70
  import "./cli/chunk-DLIRSHV6.mjs";
67
- import "./cli/chunk-NWBARG3F.mjs";
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
- function getFirstMeaningfulValueAtPath(root, path) {
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
- if (isMeaningfulValue(entry.value)) {
792
- return { value: entry.value, path: entry.path };
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)) && isMeaningfulValue(value)) {
903
- return { value, path: pathToString([...path, key]) };
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(result, descriptor.paths);
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(result, targetGetters?.[target]);
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
- /** Execute a tool and return the standard execution envelope. */
1629
- execute: async (toolId, input, options) => {
1630
- const response = await this.client.executeTool(toolId, input, {
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,