deepline 0.3.452 → 0.3.454

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 (122) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +65 -0
  2. package/dist/bundling-sources/sdk/src/http.ts +2 -1
  3. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +2 -0
  6. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +63 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +13 -1
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +83 -4
  10. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +11 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +16 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +20 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +77 -12
  14. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +5 -2
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +254 -64
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +11 -0
  17. package/dist/cli/auth-GUZWKNXM.js +40 -0
  18. package/dist/cli/{auth-DKZLB6GN.mjs → auth-YNPT3IER.mjs} +4 -4
  19. package/dist/cli/{billing-DOFXWAZR.mjs → billing-TLRVAOXB.mjs} +18 -5
  20. package/dist/cli/{billing-CN3XSVER.js → billing-VXIIND6T.js} +87 -74
  21. package/dist/cli/{chunk-TXN27XQQ.mjs → chunk-27NNEBIS.mjs} +2 -2
  22. package/dist/cli/chunk-2I7GE7KB.mjs +155 -0
  23. package/dist/cli/{chunk-M4FFNUF4.js → chunk-33FEF4RH.js} +50 -50
  24. package/dist/cli/{chunk-FIQ2F5LA.mjs → chunk-5GJH2BYN.mjs} +2 -2
  25. package/dist/cli/{chunk-ELULDUX3.mjs → chunk-5OQMUDPM.mjs} +1 -1
  26. package/dist/cli/{chunk-5DRGDSJL.js → chunk-6JY2NGJN.js} +26 -26
  27. package/dist/cli/chunk-7ICOQRW5.js +155 -0
  28. package/dist/cli/{chunk-7JSZOUNU.js → chunk-7V3OKSB2.js} +1 -1
  29. package/dist/cli/{chunk-74BPYDDG.js → chunk-BUYQU7TB.js} +8 -8
  30. package/dist/cli/{chunk-RNM4HG3W.mjs → chunk-CPXT4KPC.mjs} +3 -3
  31. package/dist/cli/{chunk-KQUDU3ZE.mjs → chunk-DCZSJON4.mjs} +2 -2
  32. package/dist/cli/{chunk-2GMAPSJU.mjs → chunk-EXWKHMMP.mjs} +5 -5
  33. package/dist/cli/{chunk-ZH6HFV7Y.js → chunk-FKGXZXRP.js} +8 -8
  34. package/dist/cli/{chunk-UGPGB4C6.mjs → chunk-G6ZOZQXT.mjs} +4 -153
  35. package/dist/cli/{chunk-L2GATUZK.js → chunk-IJ5WCZ32.js} +20 -20
  36. package/dist/cli/{chunk-JT4ZSWBK.js → chunk-KPPL2WNH.js} +16 -16
  37. package/dist/cli/{chunk-X4IMX5AO.mjs → chunk-LVHRP7XM.mjs} +4 -4
  38. package/dist/cli/{chunk-RFDIXLRX.mjs → chunk-LWYOJG66.mjs} +1 -1
  39. package/dist/cli/{chunk-L6YCGSL4.js → chunk-P5IQ6LIK.js} +35 -35
  40. package/dist/cli/{chunk-2VERHTKO.js → chunk-QLMQ2NAQ.js} +2 -2
  41. package/dist/cli/{chunk-PBQSX6ES.mjs → chunk-RDAUQGPG.mjs} +1 -1
  42. package/dist/cli/{chunk-7OI33KE5.js → chunk-S2PO3X5R.js} +2 -2
  43. package/dist/cli/{chunk-ZKGK2JU3.js → chunk-SJH66N73.js} +6 -6
  44. package/dist/cli/{chunk-SM5RZ5JC.mjs → chunk-TECW24CR.mjs} +2 -2
  45. package/dist/cli/{chunk-R7YZKHN5.mjs → chunk-THJ7ORNM.mjs} +3 -3
  46. package/dist/cli/{chunk-POSAVPQZ.mjs → chunk-U72KDMYJ.mjs} +2 -2
  47. package/dist/cli/{chunk-JJOSUZMS.mjs → chunk-UT6W675P.mjs} +1 -1
  48. package/dist/cli/{chunk-G5BMPTZD.js → chunk-VHGGHRGY.js} +81 -81
  49. package/dist/cli/{chunk-ETFVH7PO.js → chunk-VXBEHDM6.js} +10 -10
  50. package/dist/cli/{chunk-WW63S4RC.js → chunk-WONLZMDF.js} +6 -6
  51. package/dist/cli/{chunk-QK65KBWN.mjs → chunk-YETNOEAZ.mjs} +8 -8
  52. package/dist/cli/{chunk-YWL4ULLT.js → chunk-YPYR4ACF.js} +73 -222
  53. package/dist/cli/{chunk-2SICEJBN.mjs → chunk-YXCLG3KB.mjs} +35 -1
  54. package/dist/cli/{chunk-J5O4AXSO.js → chunk-Z5PQSTYX.js} +84 -50
  55. package/dist/cli/{csv-N25FMDZQ.js → csv-BSKJR3CR.js} +12 -12
  56. package/dist/cli/{csv-QUNUQZYC.mjs → csv-I4CAAV6A.mjs} +3 -3
  57. package/dist/cli/{db-WYWDUYXS.mjs → db-EQP24K3B.mjs} +4 -4
  58. package/dist/cli/{db-2SGG56WR.js → db-RA3IL6MC.js} +25 -25
  59. package/dist/cli/{describe-QQ2XL6PV.js → describe-62KPTIFH.js} +17 -16
  60. package/dist/cli/{describe-4RBUIHR7.mjs → describe-EZDVJDPQ.mjs} +13 -12
  61. package/dist/cli/describe-core.d.mts +1 -1
  62. package/dist/cli/describe-core.d.ts +1 -1
  63. package/dist/cli/{executions-YLJHAHHX.js → executions-2HBBXRPM.js} +6 -6
  64. package/dist/cli/{executions-WOBIMQ7H.mjs → executions-W5KR56KP.mjs} +4 -4
  65. package/dist/cli/{feedback-VCGVROTY.mjs → feedback-6UTOLSFP.mjs} +3 -3
  66. package/dist/cli/{feedback-D653FAXY.js → feedback-CVYS7ZPV.js} +7 -7
  67. package/dist/cli/{git-SZ6RSLFN.mjs → git-JXH64LI4.mjs} +4 -4
  68. package/dist/cli/git-U6FMVAAM.js +24 -0
  69. package/dist/cli/index.js +133 -131
  70. package/dist/cli/index.mjs +39 -37
  71. package/dist/cli/{legacy-noops-TXZ75CWS.js → legacy-noops-5XTXIPU2.js} +7 -7
  72. package/dist/cli/{legacy-noops-UGLTI2ZY.mjs → legacy-noops-NYMLGQNX.mjs} +4 -4
  73. package/dist/cli/{monitors-HLIW4AIL.mjs → monitors-CEU6SP2B.mjs} +156 -4
  74. package/dist/cli/{monitors-VC6YSBYX.js → monitors-J6HAQLX2.js} +276 -124
  75. package/dist/cli/{org-I3VQDIGZ.js → org-CYE3DCIT.js} +66 -66
  76. package/dist/cli/{org-X4MVTSKM.mjs → org-RRKAJM5V.mjs} +4 -4
  77. package/dist/cli/{play-7TLGGN66.js → play-NJDW74YH.js} +284 -283
  78. package/dist/cli/{play-EAYGEAMI.mjs → play-PXISXZ2P.mjs} +11 -10
  79. package/dist/cli/{providers-MBTMUEGX.mjs → providers-6QGGDOWK.mjs} +4 -4
  80. package/dist/cli/{providers-IZ3YWZ4E.js → providers-JE3MUBYK.js} +7 -7
  81. package/dist/cli/{quickstart-MBDEV4RJ.js → quickstart-AQBBOFQL.js} +5 -5
  82. package/dist/cli/{quickstart-MDW2NMAS.mjs → quickstart-MKJ7TYQZ.mjs} +3 -3
  83. package/dist/cli/{search-4PQZYRQO.mjs → search-6PKFZ2JD.mjs} +5 -5
  84. package/dist/cli/search-EJGRNQQK.js +30 -0
  85. package/dist/cli/{secrets-3S7KUS2H.js → secrets-IKGJYESD.js} +13 -13
  86. package/dist/cli/{secrets-S55UCYYR.mjs → secrets-QBWRVZCT.mjs} +4 -4
  87. package/dist/cli/{sessions-UEHVIB6W.js → sessions-462I5YEQ.js} +5 -5
  88. package/dist/cli/{sessions-T6XVN737.mjs → sessions-SVYTBNRJ.mjs} +4 -4
  89. package/dist/cli/{settings-CGP7XMJZ.mjs → settings-FH4XZ7FE.mjs} +9 -8
  90. package/dist/cli/{settings-MYAUWNTF.js → settings-WHLTLPXZ.js} +76 -75
  91. package/dist/cli/{setup-5Z5HAWEG.js → setup-IKTCP3QB.js} +43 -42
  92. package/dist/cli/{setup-U66NZQXB.mjs → setup-ISCNCB4W.mjs} +8 -7
  93. package/dist/cli/{skills-2JS3SNFA.mjs → skills-HITZS5EJ.mjs} +6 -5
  94. package/dist/cli/skills-LC2YKUSO.js +30 -0
  95. package/dist/cli/{tools-G3VYZKTO.mjs → tools-SQUTVLPO.mjs} +13 -12
  96. package/dist/cli/tools-Y55OXE72.js +45 -0
  97. package/dist/cli/{update-C7CLWWIW.mjs → update-AFYEREBX.mjs} +8 -7
  98. package/dist/cli/update-Q3I6MSEQ.js +32 -0
  99. package/dist/cli/{workflow-TBKVIN4S.js → workflow-AAOOROIR.js} +15 -15
  100. package/dist/cli/{workflow-EUMRVXU7.mjs → workflow-VBCZPKVF.mjs} +5 -5
  101. package/dist/{client-CPRaigLC.d.ts → client-BV7tC6oq.d.ts} +28 -1
  102. package/dist/{client-DstDI5TV.d.mts → client-Ct6OBj9Y.d.mts} +28 -1
  103. package/dist/index.d.mts +2 -2
  104. package/dist/index.d.ts +2 -2
  105. package/dist/index.js +6 -6
  106. package/dist/index.mjs +3 -3
  107. package/dist/install-integrity.json +82 -80
  108. package/dist/plays/play-description.d.mts +1 -1
  109. package/dist/plays/play-description.d.ts +1 -1
  110. package/dist/plays/run-request.d.mts +1 -1
  111. package/dist/plays/run-request.d.ts +1 -1
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +1 -1
  117. package/dist/cli/auth-36DQP46D.js +0 -40
  118. package/dist/cli/git-T6LBJEY6.js +0 -24
  119. package/dist/cli/search-5B4ZM7VS.js +0 -30
  120. package/dist/cli/skills-JXPQFJAJ.js +0 -29
  121. package/dist/cli/tools-RHRJ4SLY.js +0 -44
  122. package/dist/cli/update-5YBPJ3EQ.js +0 -31
@@ -7,26 +7,25 @@ import {
7
7
  maybeAutoUpdateAndRelaunch,
8
8
  runDeferredAutoUpdate,
9
9
  runToolExecuteStage
10
- } from "./chunk-X4IMX5AO.mjs";
11
- import "./chunk-2GMAPSJU.mjs";
12
- import "./chunk-ELULDUX3.mjs";
13
- import "./chunk-R7YZKHN5.mjs";
10
+ } from "./chunk-LVHRP7XM.mjs";
11
+ import "./chunk-EXWKHMMP.mjs";
12
+ import "./chunk-5OQMUDPM.mjs";
13
+ import "./chunk-THJ7ORNM.mjs";
14
14
  import {
15
15
  usesInlinePlayAdmission
16
- } from "./chunk-TXN27XQQ.mjs";
16
+ } from "./chunk-27NNEBIS.mjs";
17
17
  import {
18
18
  isCliTraceEnabled,
19
19
  parseCliMaintenancePolicy,
20
20
  recordCliTrace,
21
21
  resolveCliMaintenancePolicy,
22
22
  traceCliSpan
23
- } from "./chunk-JJOSUZMS.mjs";
23
+ } from "./chunk-UT6W675P.mjs";
24
24
  import {
25
25
  SDK_COMPATIBILITY_FAST_DEADLINE_MS,
26
26
  SKILLS_AUTO_SYNC_COMMAND,
27
27
  checkSdkCompatibility,
28
28
  claimUpdateAdvisory,
29
- createCliProgress,
30
29
  enforceSdkCompatibilityResponse,
31
30
  failureReportHeaders,
32
31
  flushDeferredSkillsSyncNotices,
@@ -39,7 +38,10 @@ import {
39
38
  resolveSdkCliFailureExitCode,
40
39
  sanitizeCommand,
41
40
  syncSdkSkillsIfNeeded
42
- } from "./chunk-UGPGB4C6.mjs";
41
+ } from "./chunk-G6ZOZQXT.mjs";
42
+ import {
43
+ createCliProgress
44
+ } from "./chunk-2I7GE7KB.mjs";
43
45
  import {
44
46
  addJsonNotice,
45
47
  errorToJsonPayload,
@@ -52,7 +54,7 @@ import {
52
54
  printJson,
53
55
  shouldEmitJson,
54
56
  takeSilentJsonFailureMessage
55
- } from "./chunk-PBQSX6ES.mjs";
57
+ } from "./chunk-RDAUQGPG.mjs";
56
58
  import {
57
59
  HttpClient,
58
60
  SDK_VERSION,
@@ -62,13 +64,13 @@ import {
62
64
  resolveApiKeyForBaseUrl,
63
65
  resolveBaseUrlOnly,
64
66
  resolveConfig
65
- } from "./chunk-SM5RZ5JC.mjs";
67
+ } from "./chunk-TECW24CR.mjs";
66
68
  import {
67
69
  AuthError
68
70
  } from "./chunk-4QF2K7TM.mjs";
69
71
  import "./chunk-DLIRSHV6.mjs";
70
72
  import "./chunk-HBL4PM5Q.mjs";
71
- import "./chunk-RFDIXLRX.mjs";
73
+ import "./chunk-LWYOJG66.mjs";
72
74
  import "./chunk-WZYKRD7T.mjs";
73
75
  import {
74
76
  commandDocKey,
@@ -138,48 +140,48 @@ import { Command as Command2 } from "commander";
138
140
  var COMMAND_GROUPS = [
139
141
  {
140
142
  names: ["auth"],
141
- load: async () => (await import("./auth-DKZLB6GN.mjs")).registerAuthCommands
143
+ load: async () => (await import("./auth-YNPT3IER.mjs")).registerAuthCommands
142
144
  },
143
145
  {
144
146
  names: ["providers"],
145
- load: async () => (await import("./providers-MBTMUEGX.mjs")).registerProviderCommands
147
+ load: async () => (await import("./providers-6QGGDOWK.mjs")).registerProviderCommands
146
148
  },
147
149
  {
148
150
  names: ["search"],
149
- load: async () => (await import("./search-4PQZYRQO.mjs")).registerSearchCommand
151
+ load: async () => (await import("./search-6PKFZ2JD.mjs")).registerSearchCommand
150
152
  },
151
153
  {
152
154
  names: ["describe"],
153
- load: async () => (await import("./describe-4RBUIHR7.mjs")).registerDescribeCommand
155
+ load: async () => (await import("./describe-EZDVJDPQ.mjs")).registerDescribeCommand
154
156
  },
155
157
  {
156
158
  names: ["tools"],
157
- load: async () => (await import("./tools-G3VYZKTO.mjs")).registerToolsCommands
159
+ load: async () => (await import("./tools-SQUTVLPO.mjs")).registerToolsCommands
158
160
  },
159
161
  {
160
162
  names: ["executions"],
161
- load: async () => (await import("./executions-WOBIMQ7H.mjs")).registerExecutionsCommands
163
+ load: async () => (await import("./executions-W5KR56KP.mjs")).registerExecutionsCommands
162
164
  },
163
165
  {
164
166
  names: ["plays", "runs"],
165
- load: async () => (await import("./play-EAYGEAMI.mjs")).registerPlayCommands
167
+ load: async () => (await import("./play-PXISXZ2P.mjs")).registerPlayCommands
166
168
  },
167
169
  {
168
170
  names: ["sessions"],
169
- load: async () => (await import("./sessions-T6XVN737.mjs")).registerSessionsCommands
171
+ load: async () => (await import("./sessions-SVYTBNRJ.mjs")).registerSessionsCommands
170
172
  },
171
173
  {
172
174
  names: ["workflows"],
173
- load: async () => (await import("./workflow-EUMRVXU7.mjs")).registerWorkflowCommands
175
+ load: async () => (await import("./workflow-VBCZPKVF.mjs")).registerWorkflowCommands
174
176
  },
175
177
  {
176
178
  names: ["secrets"],
177
- load: async () => (await import("./secrets-S55UCYYR.mjs")).registerSecretsCommands
179
+ load: async () => (await import("./secrets-QBWRVZCT.mjs")).registerSecretsCommands
178
180
  },
179
181
  {
180
182
  names: ["settings", "notifications"],
181
183
  load: async () => {
182
- const commands = await import("./settings-CGP7XMJZ.mjs");
184
+ const commands = await import("./settings-FH4XZ7FE.mjs");
183
185
  return (p) => {
184
186
  commands.registerSettingsCommands(p);
185
187
  commands.registerNotificationCommands(p);
@@ -188,51 +190,51 @@ var COMMAND_GROUPS = [
188
190
  },
189
191
  {
190
192
  names: ["billing"],
191
- load: async () => (await import("./billing-DOFXWAZR.mjs")).registerBillingCommands
193
+ load: async () => (await import("./billing-TLRVAOXB.mjs")).registerBillingCommands
192
194
  },
193
195
  {
194
196
  names: ["monitors"],
195
- load: async () => (await import("./monitors-HLIW4AIL.mjs")).registerMonitorsCommands
197
+ load: async () => (await import("./monitors-CEU6SP2B.mjs")).registerMonitorsCommands
196
198
  },
197
199
  {
198
200
  names: ["org"],
199
- load: async () => (await import("./org-X4MVTSKM.mjs")).registerOrgCommands
201
+ load: async () => (await import("./org-RRKAJM5V.mjs")).registerOrgCommands
200
202
  },
201
203
  {
202
204
  names: ["git", "projects", "deployments"],
203
- load: async () => (await import("./git-SZ6RSLFN.mjs")).registerGitCommands
205
+ load: async () => (await import("./git-JXH64LI4.mjs")).registerGitCommands
204
206
  },
205
207
  {
206
208
  names: ["csv"],
207
- load: async () => (await import("./csv-QUNUQZYC.mjs")).registerCsvCommands
209
+ load: async () => (await import("./csv-I4CAAV6A.mjs")).registerCsvCommands
208
210
  },
209
211
  {
210
212
  names: ["db"],
211
- load: async () => (await import("./db-WYWDUYXS.mjs")).registerDbCommands
213
+ load: async () => (await import("./db-EQP24K3B.mjs")).registerDbCommands
212
214
  },
213
215
  {
214
216
  names: ["feedback"],
215
- load: async () => (await import("./feedback-VCGVROTY.mjs")).registerFeedbackCommands
217
+ load: async () => (await import("./feedback-6UTOLSFP.mjs")).registerFeedbackCommands
216
218
  },
217
219
  {
218
220
  names: ["enrich", "session", "backend"],
219
- load: async () => (await import("./legacy-noops-UGLTI2ZY.mjs")).registerDeprecatedCommands
221
+ load: async () => (await import("./legacy-noops-NYMLGQNX.mjs")).registerDeprecatedCommands
220
222
  },
221
223
  {
222
224
  names: ["update"],
223
- load: async () => (await import("./update-C7CLWWIW.mjs")).registerUpdateCommand
225
+ load: async () => (await import("./update-AFYEREBX.mjs")).registerUpdateCommand
224
226
  },
225
227
  {
226
228
  names: ["skills", "skills-auto-sync"],
227
- load: async () => (await import("./skills-2JS3SNFA.mjs")).registerSkillsCommand
229
+ load: async () => (await import("./skills-HITZS5EJ.mjs")).registerSkillsCommand
228
230
  },
229
231
  {
230
232
  names: ["setup", "doctor"],
231
- load: async () => (await import("./setup-U66NZQXB.mjs")).registerSetupCommands
233
+ load: async () => (await import("./setup-ISCNCB4W.mjs")).registerSetupCommands
232
234
  },
233
235
  {
234
236
  names: ["quickstart"],
235
- load: async () => (await import("./quickstart-MDW2NMAS.mjs")).registerQuickstartCommands
237
+ load: async () => (await import("./quickstart-MKJ7TYQZ.mjs")).registerQuickstartCommands
236
238
  }
237
239
  ];
238
240
  async function registerDeeplineCommandGroups(program, requestedCommand) {
@@ -596,7 +598,7 @@ async function runPlayRunnerHealthCheck() {
596
598
  });
597
599
  let exitCode = 1;
598
600
  try {
599
- const { handlePlayRun } = await import("./play-EAYGEAMI.mjs");
601
+ const { handlePlayRun } = await import("./play-PXISXZ2P.mjs");
600
602
  exitCode = await handlePlayRun([
601
603
  file,
602
604
  "--input",
@@ -1044,7 +1046,7 @@ Examples:
1044
1046
  return;
1045
1047
  }
1046
1048
  try {
1047
- const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-DKZLB6GN.mjs");
1049
+ const { httpJson, readStatusBanner, statusBannerLine } = await import("./auth-YNPT3IER.mjs");
1048
1050
  const baseUrl = resolveBaseUrlOnly();
1049
1051
  const [{ status, data }, banner] = await Promise.all([
1050
1052
  httpJson("GET", `${baseUrl}/api/v2/health`, null),
@@ -1132,7 +1134,7 @@ Examples:
1132
1134
  const helpArgs = process.argv.slice(2);
1133
1135
  const helpPositionals = helpArgs.filter((arg) => !arg.startsWith("-"));
1134
1136
  if (helpPositionals.length === 0 ? helpArgs.includes("--help") || helpArgs.includes("-h") : helpPositionals.length === 1 && helpPositionals[0] === "help") {
1135
- const { authStatusLine } = await import("./auth-DKZLB6GN.mjs");
1137
+ const { authStatusLine } = await import("./auth-YNPT3IER.mjs");
1136
1138
  rootHelpStatus = `Version: ${SDK_VERSION}
1137
1139
  ${await authStatusLine()}
1138
1140
  `;
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZH6HFV7Yjs = require('./chunk-ZH6HFV7Y.js');
3
+ var _chunkFKGXZXRPjs = require('./chunk-FKGXZXRP.js');
4
4
 
5
5
 
6
6
  var _chunk3XX5TEA4js = require('./chunk-3XX5TEA4.js');
7
7
 
8
8
 
9
- var _chunkZKGK2JU3js = require('./chunk-ZKGK2JU3.js');
10
- require('./chunk-ETFVH7PO.js');
9
+ var _chunkSJH66N73js = require('./chunk-SJH66N73.js');
10
+ require('./chunk-VXBEHDM6.js');
11
11
  require('./chunk-ALJJRZNJ.js');
12
12
  require('./chunk-XNYIZMNQ.js');
13
13
  require('./chunk-DIAWYWT5.js');
14
- require('./chunk-7JSZOUNU.js');
14
+ require('./chunk-7V3OKSB2.js');
15
15
  require('./chunk-OG64RBAC.js');
16
16
  require('./chunk-COGTRVWW.js');
17
17
 
@@ -52,7 +52,7 @@ function deprecatedCommandEnvelope(input) {
52
52
  };
53
53
  }
54
54
  function printDeprecatedCommand(input) {
55
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0, deprecatedCommandEnvelope(input), {
55
+ _chunkSJH66N73js.printCommandEnvelope.call(void 0, deprecatedCommandEnvelope(input), {
56
56
  json: input.options.json
57
57
  });
58
58
  process.exitCode = 2;
@@ -72,7 +72,7 @@ function registerDeprecatedCommands(program) {
72
72
  program.command("enrich", { hidden: true }).description("Deprecated CSV enrichment command.").allowUnknownOption(true).allowExcessArguments(true).option("--json", "Emit JSON output").argument("[args...]").addHelpText("after", `
73
73
  ${_chunk3XX5TEA4js.ENRICH_COMMAND_DEPRECATION_MESSAGE}
74
74
  `).action((_args, options) => {
75
- _chunkZKGK2JU3js.printCommandEnvelope.call(void 0,
75
+ _chunkSJH66N73js.printCommandEnvelope.call(void 0,
76
76
  {
77
77
  ok: false,
78
78
  command: "deepline enrich",
@@ -115,7 +115,7 @@ Examples:
115
115
  options
116
116
  });
117
117
  });
118
- _chunkZH6HFV7Yjs.registerSessionSendRenderCommands.call(void 0, session, "session");
118
+ _chunkFKGXZXRPjs.registerSessionSendRenderCommands.call(void 0, session, "session");
119
119
  for (const subcommand of SESSION_SUBCOMMANDS) {
120
120
  addDeprecatedSubcommand(
121
121
  session,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  registerSessionSendRenderCommands
3
- } from "./chunk-FIQ2F5LA.mjs";
3
+ } from "./chunk-5GJH2BYN.mjs";
4
4
  import {
5
5
  ENRICH_COMMAND_DEPRECATION_MESSAGE
6
6
  } from "./chunk-ITOFSXIU.mjs";
7
7
  import {
8
8
  printCommandEnvelope
9
- } from "./chunk-PBQSX6ES.mjs";
10
- import "./chunk-SM5RZ5JC.mjs";
9
+ } from "./chunk-RDAUQGPG.mjs";
10
+ import "./chunk-TECW24CR.mjs";
11
11
  import "./chunk-4QF2K7TM.mjs";
12
12
  import "./chunk-DLIRSHV6.mjs";
13
13
  import "./chunk-HBL4PM5Q.mjs";
14
- import "./chunk-RFDIXLRX.mjs";
14
+ import "./chunk-LWYOJG66.mjs";
15
15
  import "./chunk-WZYKRD7T.mjs";
16
16
  import "./chunk-KRD6H754.mjs";
17
17
 
@@ -1,7 +1,7 @@
1
1
  import "./chunk-EXMLR72R.mjs";
2
2
  import {
3
3
  DeeplineClient
4
- } from "./chunk-2SICEJBN.mjs";
4
+ } from "./chunk-YXCLG3KB.mjs";
5
5
  import "./chunk-L2VKAASU.mjs";
6
6
  import "./chunk-FAG4DFUC.mjs";
7
7
  import "./chunk-EIMG75BT.mjs";
@@ -14,13 +14,16 @@ import "./chunk-4MBOJQPL.mjs";
14
14
  import {
15
15
  lintMonitorBatchInput
16
16
  } from "./chunk-MI6ZP7XI.mjs";
17
+ import {
18
+ createCliProgress
19
+ } from "./chunk-2I7GE7KB.mjs";
17
20
  import {
18
21
  errorToJsonPayload,
19
22
  printCommandEnvelope,
20
23
  printJson,
21
24
  shouldEmitJson
22
- } from "./chunk-PBQSX6ES.mjs";
23
- import "./chunk-SM5RZ5JC.mjs";
25
+ } from "./chunk-RDAUQGPG.mjs";
26
+ import "./chunk-TECW24CR.mjs";
24
27
  import {
25
28
  AuthError
26
29
  } from "./chunk-4QF2K7TM.mjs";
@@ -28,7 +31,7 @@ import "./chunk-DLIRSHV6.mjs";
28
31
  import {
29
32
  DeeplineError
30
33
  } from "./chunk-HBL4PM5Q.mjs";
31
- import "./chunk-RFDIXLRX.mjs";
34
+ import "./chunk-LWYOJG66.mjs";
32
35
  import "./chunk-WZYKRD7T.mjs";
33
36
  import "./chunk-KRD6H754.mjs";
34
37
 
@@ -735,6 +738,115 @@ async function handleMonitorsCheck(definition, options) {
735
738
  );
736
739
  printCommandEnvelope(payload, { json: options.json });
737
740
  }
741
+ function previewText(value) {
742
+ return typeof value === "string" && value.trim() ? value.trim() : "-";
743
+ }
744
+ function renderMonitorPreviewText(payload) {
745
+ const updates = Array.isArray(payload.updates) ? payload.updates : [];
746
+ const charge = asRecord(payload.charge) ?? {};
747
+ const lines = [
748
+ `Preview of ${previewText(payload.tool)}: ${updates.length} of ${String(payload.limit ?? "?")} requested matches.`
749
+ ];
750
+ for (const item of updates) {
751
+ const content = asRecord(asRecord(item)?.content) ?? {};
752
+ lines.push(
753
+ ` ${previewText(content.full_name)} | ${previewText(content.title)} | started ${previewText(content.start_date)} | ${previewText(content.seniority)}`
754
+ );
755
+ }
756
+ const credits = typeof charge.credits === "number" ? charge.credits : 0;
757
+ const perUpdate = charge.credits_per_update;
758
+ switch (charge.status) {
759
+ case "queued":
760
+ case "settled":
761
+ lines.push(
762
+ payload.replayed === true ? `Saved result: this preview charged ${credits} credits when it first ran, and this rerun charged nothing.` : `Charged ${credits} credits (${String(perUpdate)} per returned update).`
763
+ );
764
+ break;
765
+ case "free":
766
+ lines.push("No matches came back, so nothing was charged.");
767
+ break;
768
+ case "unconfirmed":
769
+ lines.push(
770
+ `The charge could not be confirmed: up to ${credits} credits may still post. Check deepline billing usage.`
771
+ );
772
+ break;
773
+ default:
774
+ lines.push("This preview was not charged.");
775
+ }
776
+ if (Array.isArray(payload.ignored_fields) && payload.ignored_fields.length) {
777
+ lines.push(
778
+ `Ignored for the preview: ${payload.ignored_fields.join(", ")} (still used on deploy).`
779
+ );
780
+ }
781
+ if (typeof payload.note === "string") lines.push(payload.note);
782
+ lines.push(`Preview key: ${String(payload.idempotency_key)}`);
783
+ return `${lines.join("\n")}
784
+ `;
785
+ }
786
+ async function handleMonitorsPreview(definition, options) {
787
+ const body = resolveMonitorJsonBody({
788
+ positional: definition,
789
+ file: options.file,
790
+ argLabel: "<definition>",
791
+ command: "deepline monitors preview"
792
+ });
793
+ const limit = options.limit === void 0 ? void 0 : Number(options.limit);
794
+ if (limit !== void 0 && !Number.isInteger(limit)) {
795
+ throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
796
+ }
797
+ const wantsJson = shouldEmitJson(options.json);
798
+ if (options.idempotencyKey === void 0 && wantsJson) {
799
+ throw new MonitorsUsageError(
800
+ "--json requires --idempotency-key <key>. Choose a new key for each new preview and keep it: rerunning with the same key returns the result without paying again."
801
+ );
802
+ }
803
+ const idempotencyKey = options.idempotencyKey ?? `monitor-preview-${randomUUID()}`;
804
+ const progress = createCliProgress(!wantsJson);
805
+ progress.phase(`Preview key: ${idempotencyKey}`);
806
+ try {
807
+ const payload = await new DeeplineClient().monitors.preview(
808
+ body,
809
+ { idempotencyKey, ...limit === void 0 ? {} : { limit } }
810
+ );
811
+ progress.complete();
812
+ printCommandEnvelope(payload, {
813
+ json: options.json,
814
+ text: renderMonitorPreviewText(payload)
815
+ });
816
+ } catch (error) {
817
+ progress.fail();
818
+ if (previewRetryableWithSameKey(error)) {
819
+ process.stderr.write(
820
+ `To get this preview's result without paying again, rerun the same command with --idempotency-key ${idempotencyKey}. A new key runs a new, paid preview.
821
+ `
822
+ );
823
+ }
824
+ throw error;
825
+ }
826
+ }
827
+ var MONITOR_PREVIEW_SAME_KEY_RETRY_CODES = /* @__PURE__ */ new Set([
828
+ "EXECUTION_IN_PROGRESS",
829
+ "EXECUTION_RECOVERY_UNAVAILABLE",
830
+ "BILLING_UNAVAILABLE",
831
+ "monitor_preview_rate_limited",
832
+ "monitor_preview_provider_unavailable"
833
+ ]);
834
+ var MONITOR_PREVIEW_NEW_KEY_CODES = /* @__PURE__ */ new Set([
835
+ "EXECUTION_OUTCOME_UNKNOWN",
836
+ "monitor_preview_outcome_unknown"
837
+ ]);
838
+ function previewRetryableWithSameKey(error) {
839
+ if (!(error instanceof DeeplineError)) return true;
840
+ const code = error.code;
841
+ if (code !== void 0 && MONITOR_PREVIEW_NEW_KEY_CODES.has(code)) {
842
+ return false;
843
+ }
844
+ if (code !== void 0 && MONITOR_PREVIEW_SAME_KEY_RETRY_CODES.has(code)) {
845
+ return true;
846
+ }
847
+ const status = error.statusCode;
848
+ return status === void 0 || status === 0 || status >= 500;
849
+ }
738
850
  async function handleMonitorsDeploy(definition, options) {
739
851
  const body = resolveMonitorJsonBody({
740
852
  positional: definition,
@@ -2807,6 +2919,10 @@ Notes:
2807
2919
  \`deepline describe deepline_native.company_radar\`.
2808
2920
  Operational controls are Deepline-managed. Bind downstream automation in a
2809
2921
  Play with sqlListeners; monitor definitions never name Plays.
2922
+ When the definition can be previewed, the response includes a "preview"
2923
+ object with its price and the exact \`monitors preview\` command. A preview
2924
+ costs credits; check itself never does. "available": false means this
2925
+ definition has no preview. No "preview" field means the tool has none.
2810
2926
 
2811
2927
  Examples:
2812
2928
  deepline monitors check '{"key":"job-openings","tool":"deepline_native.company_radar","payload":{"domain":"stripe.com","radar_type":"company_job_openings"}}'
@@ -2818,6 +2934,42 @@ Examples:
2818
2934
  "Read the definition JSON from a file, or - for stdin"
2819
2935
  )
2820
2936
  ).action(monitorsAction(handleMonitorsCheck));
2937
+ withJsonOption(
2938
+ monitors.command("preview [definition]").description(
2939
+ "Sample a few recent matches for a monitor definition before deploying it. Costs credits."
2940
+ ).addHelpText(
2941
+ "after",
2942
+ `
2943
+ Notes:
2944
+ Takes the same definition as check and deploy. Nothing is created.
2945
+ Available today only for deepline_native.company_radar with radar_type
2946
+ company_new_hires. Any other tool or radar type answers
2947
+ monitor_preview_unavailable without spending anything: run check, then deploy.
2948
+ Each returned match costs the same as one match the deployed monitor would
2949
+ deliver. An empty preview is free. --limit is 1-3 (default 3).
2950
+ Run previews one at a time. A preview is a sample: it can miss matches, and
2951
+ an empty one does not mean the monitor will find nothing. Read "updates".
2952
+ payload.updates_since is ignored for the preview and still used on deploy.
2953
+ Deploy the same definition without --limit when the sample looks right.
2954
+ Every preview has a key, printed before it is sent. If the connection drops,
2955
+ rerun with --idempotency-key <key> to get the original result without paying
2956
+ again. A new key runs a new, paid preview. --json prints nothing before the
2957
+ result, so it requires --idempotency-key: choose the key yourself and keep it.
2958
+
2959
+ Examples:
2960
+ deepline monitors preview '{"key":"eng-hires","tool":"deepline_native.company_radar","payload":{"domain":"stripe.com","radar_type":"company_new_hires","departments":["Engineering"]}}'
2961
+ deepline monitors preview --file monitor.json --limit 2
2962
+ deepline monitors preview --file monitor.json --idempotency-key monitor-preview-<key>
2963
+ deepline monitors preview --file monitor.json --idempotency-key eng-hires-sample-1 --json
2964
+ `
2965
+ ).option(
2966
+ "-f, --file <path>",
2967
+ "Read the definition JSON from a file, or - for stdin"
2968
+ ).option("--limit <n>", "Matches to sample, 1-3 (default 3)").option(
2969
+ "--idempotency-key <key>",
2970
+ "Recover an earlier preview's result without paying again. Required with --json"
2971
+ )
2972
+ ).action(monitorsAction(handleMonitorsPreview));
2821
2973
  withJsonOption(
2822
2974
  monitors.command("deploy [definition]").description("Deploy a monitor from a definition.").addHelpText(
2823
2975
  "after",