deepline 0.3.341 → 0.3.343

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 (104) hide show
  1. package/dist/bundling-sources/sdk/src/http.ts +9 -1
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +14 -0
  4. package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +2 -0
  5. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +33 -0
  6. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +15 -0
  7. package/dist/cli/{auth-VIQ6WBU5.mjs → auth-IPOSX2NV.mjs} +4 -4
  8. package/dist/cli/auth-J2C5CQ7M.js +31 -0
  9. package/dist/cli/{billing-7MIYVDBJ.mjs → billing-CWTZDAOC.mjs} +4 -4
  10. package/dist/cli/{billing-FW5TG3CQ.js → billing-ZZKX4IFS.js} +71 -71
  11. package/dist/cli/{chunk-IWSPBSV7.mjs → chunk-2Y2QZJBT.mjs} +1 -1
  12. package/dist/cli/{chunk-WQ5LPOFC.js → chunk-63UBRDGC.js} +60 -60
  13. package/dist/cli/{chunk-PIVZA4GI.js → chunk-AUB3AW3P.js} +8 -4
  14. package/dist/cli/{chunk-7IT3B2BL.js → chunk-BCF43TLG.js} +27 -28
  15. package/dist/cli/{chunk-5RSBKWF6.mjs → chunk-CVIAYYLR.mjs} +2 -2
  16. package/dist/cli/{chunk-Y2BTWBO7.mjs → chunk-DEDNTNXS.mjs} +1 -1
  17. package/dist/cli/{chunk-2DFZELZG.js → chunk-ELZ4HEPQ.js} +227 -227
  18. package/dist/cli/{chunk-FH6IVCYY.js → chunk-ERFIHZXT.js} +57 -67
  19. package/dist/cli/{chunk-5GQQMICZ.js → chunk-FM36CTMM.js} +9 -9
  20. package/dist/cli/{chunk-XQD53NOJ.js → chunk-FSNKEEBA.js} +1 -1
  21. package/dist/cli/{chunk-BX6GJWBS.mjs → chunk-GISYO3JA.mjs} +22 -23
  22. package/dist/cli/{chunk-LT33BWLY.js → chunk-IPEE3DIV.js} +6 -6
  23. package/dist/cli/{chunk-ASW2NN7E.js → chunk-JGW7AR5N.js} +2 -2
  24. package/dist/cli/{chunk-AFCZAA2Y.js → chunk-JS7JVUZZ.js} +8 -8
  25. package/dist/cli/{chunk-TU3WZZG4.mjs → chunk-KLEZD6JX.mjs} +8 -8
  26. package/dist/cli/{chunk-KIGZU235.mjs → chunk-LY33N2W6.mjs} +2 -2
  27. package/dist/cli/{chunk-ZK7BK7OD.mjs → chunk-QV2WIEUP.mjs} +11 -21
  28. package/dist/cli/{chunk-7ZBSHTYB.mjs → chunk-RB2ELEQ5.mjs} +4 -4
  29. package/dist/cli/{chunk-MGYI6JH2.js → chunk-RDXH4KXG.js} +26 -26
  30. package/dist/cli/{chunk-TVNBP3CX.mjs → chunk-U5L6FIIL.mjs} +1 -1
  31. package/dist/cli/{chunk-U4VULGDJ.mjs → chunk-UJFBO6QV.mjs} +2 -2
  32. package/dist/cli/{chunk-VO4RF766.mjs → chunk-W6LB26RC.mjs} +5 -1
  33. package/dist/cli/{chunk-4LXK5CMK.mjs → chunk-WBXTRZAX.mjs} +1 -1
  34. package/dist/cli/{chunk-NUIPBZVP.js → chunk-XOX3Y5OP.js} +48 -48
  35. package/dist/cli/{chunk-ATLE7AKN.js → chunk-ZGIXGBKF.js} +15 -15
  36. package/dist/cli/{chunk-24RQUGMX.mjs → chunk-ZQFYR6NT.mjs} +8 -8
  37. package/dist/cli/{client-5FQFKJS3.mjs → client-7ZUYHDCL.mjs} +3 -3
  38. package/dist/cli/client-CCDQC7ZY.js +20 -0
  39. package/dist/cli/{csv-J7CGFUZO.mjs → csv-6CFRU4CQ.mjs} +3 -3
  40. package/dist/cli/{csv-X5GUUDBX.js → csv-7BL43EOB.js} +12 -12
  41. package/dist/cli/{db-SQXA3O74.js → db-EJETRBBT.js} +29 -29
  42. package/dist/cli/{db-DXPCEPTU.mjs → db-RUKRHPBV.mjs} +4 -4
  43. package/dist/cli/{describe-VHW7FVBJ.mjs → describe-AVBCGKX4.mjs} +8 -8
  44. package/dist/cli/{describe-EQTSIVVZ.js → describe-N46DGDQ4.js} +15 -15
  45. package/dist/cli/{executions-OSF7KBAM.mjs → executions-FCTCQYY3.mjs} +4 -4
  46. package/dist/cli/{executions-4XLP2D45.js → executions-OPBBBSDT.js} +6 -6
  47. package/dist/cli/{feedback-7EBKMWNP.js → feedback-RSPSGS2W.js} +7 -7
  48. package/dist/cli/{feedback-HM4OG6GJ.mjs → feedback-XY7F7FF6.mjs} +3 -3
  49. package/dist/cli/git-DZTOBIUF.js +23 -0
  50. package/dist/cli/{git-LXIXK5ZP.mjs → git-ZQ534TRG.mjs} +4 -4
  51. package/dist/cli/index.js +80 -80
  52. package/dist/cli/index.mjs +32 -32
  53. package/dist/cli/{legacy-noops-HEDDLUOF.mjs → legacy-noops-S4Q4TBKQ.mjs} +4 -4
  54. package/dist/cli/{legacy-noops-O5TQI3GH.js → legacy-noops-WCLAYQNO.js} +7 -7
  55. package/dist/cli/{monitors-6EX3T2US.mjs → monitors-7EONZILI.mjs} +4 -4
  56. package/dist/cli/{monitors-334IBGT6.js → monitors-UD6C7YUQ.js} +85 -85
  57. package/dist/cli/{org-VWLMFKI7.js → org-EGED4FVT.js} +60 -60
  58. package/dist/cli/{org-ZMKKQ5EY.mjs → org-SPZF2UBU.mjs} +4 -4
  59. package/dist/cli/play-5MDIQGCF.js +153 -0
  60. package/dist/cli/{play-CSMPSPXC.mjs → play-KXWJX7RB.mjs} +7 -7
  61. package/dist/cli/{providers-Z3F3M67Z.js → providers-HWGPSJZ7.js} +7 -7
  62. package/dist/cli/{providers-PE4K7ZNQ.mjs → providers-P2MRBKX2.mjs} +4 -4
  63. package/dist/cli/{quickstart-BBO4ZMFA.js → quickstart-CL4AB46M.js} +5 -5
  64. package/dist/cli/{quickstart-P6Q5NLOI.mjs → quickstart-VEEHUU7O.mjs} +3 -3
  65. package/dist/cli/search-6H77HQL3.js +26 -0
  66. package/dist/cli/{search-WLQSHUO5.mjs → search-D7CLJLVU.mjs} +5 -5
  67. package/dist/cli/{secrets-IITTIRV2.js → secrets-NGB5OD2W.js} +13 -13
  68. package/dist/cli/{secrets-JAYFSPQL.mjs → secrets-ZDW4MTJL.mjs} +4 -4
  69. package/dist/cli/{sessions-XIGZKWJG.mjs → sessions-HYUYIAHB.mjs} +4 -4
  70. package/dist/cli/{sessions-EAWCTMCB.js → sessions-MTN3SBTL.js} +5 -5
  71. package/dist/cli/{settings-XOZ3IVRT.mjs → settings-RMABGZ6N.mjs} +7 -7
  72. package/dist/cli/{settings-S6CF5T6U.js → settings-X43X7H54.js} +74 -74
  73. package/dist/cli/{setup-QGS4YTRD.mjs → setup-N7KUH3AM.mjs} +6 -6
  74. package/dist/cli/{setup-PO6TJJ5P.js → setup-QEM6U5TO.js} +41 -41
  75. package/dist/cli/skills-7H2OD626.js +28 -0
  76. package/dist/cli/{skills-I6ZYMTOV.mjs → skills-H3STANPK.mjs} +4 -4
  77. package/dist/cli/{tools-XLYFZCRO.mjs → tools-FSEOJNTY.mjs} +6 -6
  78. package/dist/cli/tools-UYW5T5PU.js +40 -0
  79. package/dist/cli/{update-JTTZPF4K.mjs → update-6BUK4OLS.mjs} +6 -6
  80. package/dist/cli/update-K743Q4EF.js +28 -0
  81. package/dist/cli/{workflow-D2YLWJDP.js → workflow-4GZCYDZS.js} +15 -15
  82. package/dist/cli/{workflow-2R4X2YR5.mjs → workflow-Q7RJGAKL.mjs} +5 -5
  83. package/dist/{client-B-hjM1NX.d.mts → client-BHReRdWK.d.mts} +41 -0
  84. package/dist/{client-txa3om01.d.ts → client-DW3zASj8.d.ts} +41 -0
  85. package/dist/index.d.mts +2 -2
  86. package/dist/index.d.ts +2 -2
  87. package/dist/index.js +10 -6
  88. package/dist/index.mjs +7 -3
  89. package/dist/install-integrity.json +76 -76
  90. package/dist/plays/run-request.d.mts +1 -1
  91. package/dist/plays/run-request.d.ts +1 -1
  92. package/dist/release.d.mts +1 -1
  93. package/dist/release.d.ts +1 -1
  94. package/dist/release.js +2 -2
  95. package/dist/release.mjs +1 -1
  96. package/package.json +1 -1
  97. package/dist/cli/auth-R7MYOAIT.js +0 -31
  98. package/dist/cli/client-HTXSC666.js +0 -20
  99. package/dist/cli/git-4VXVJGO6.js +0 -23
  100. package/dist/cli/play-4OUTDB4O.js +0 -153
  101. package/dist/cli/search-6MGGRBOO.js +0 -26
  102. package/dist/cli/skills-2LS3SJP6.js +0 -28
  103. package/dist/cli/tools-JEO4GEFK.js +0 -40
  104. package/dist/cli/update-NYIWSIRQ.js +0 -28
@@ -36,7 +36,11 @@ import {
36
36
  import { SDK_API_CONTRACT, SDK_VERSION } from './version.js';
37
37
  import { apiErrorCodeFromResponse, apiErrorMessage } from './api-error';
38
38
  import type { LiveEventEnvelope } from './types.js';
39
- import { detectAgentRuntime, isCoworkLikeSandbox } from './agent-runtime.js';
39
+ import {
40
+ agentSessionIdFromEnvironment,
41
+ detectAgentRuntime,
42
+ isCoworkLikeSandbox,
43
+ } from './agent-runtime.js';
40
44
  import { readSdkSkillsLocalVersion } from './skills-version.js';
41
45
  import { deploymentProtectionHeaders } from './deployment-protection.js';
42
46
  import {
@@ -289,6 +293,10 @@ export class HttpClient {
289
293
  if (skillsVersion) {
290
294
  headers['X-Deepline-Skills-Version'] = skillsVersion;
291
295
  }
296
+ const agentSessionId = agentSessionIdFromEnvironment();
297
+ if (agentSessionId) {
298
+ headers['X-Deepline-Agent-Session-Id'] = agentSessionId;
299
+ }
292
300
  const playArtifactR2Prefix =
293
301
  typeof process !== 'undefined'
294
302
  ? process.env?.DEEPLINE_PLAY_ARTIFACT_R2_PREFIX
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.341',
203
+ version: '0.3.343',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -782,12 +782,26 @@ function phoneTargetValue(value: unknown): string | null {
782
782
  return null;
783
783
  }
784
784
 
785
+ /**
786
+ * Contact targets other than phone that are always strings. PDL answers
787
+ * `work_email: true` when it holds an email the plan does not expose; that
788
+ * availability flag is not the email.
789
+ */
790
+ const STRING_CONTACT_TARGETS = new Set(['email', 'personal_email', 'linkedin']);
791
+
785
792
  /** The value a target accepts from a candidate, or undefined to keep looking. */
786
793
  function acceptedTargetValue(
787
794
  target: string | undefined,
788
795
  value: unknown,
789
796
  ): unknown {
790
797
  if (target === 'phone') return phoneTargetValue(value) ?? undefined;
798
+ if (
799
+ target &&
800
+ STRING_CONTACT_TARGETS.has(target) &&
801
+ typeof value === 'boolean'
802
+ ) {
803
+ return undefined;
804
+ }
791
805
  return isMeaningfulValue(value) ? value : undefined;
792
806
  }
793
807
 
@@ -3,9 +3,11 @@ export const BILLING_SALES_DESTINATION_KEY = 'shadow.billing-sales.slack';
3
3
  export const BILLING_SALES_SLACK_CHANNEL_ID = 'C0AGWVD2TNK';
4
4
  export const BILLING_SALES_CONNECTION_ID = 'platform-reporting-bot';
5
5
  export const BILLING_SALES_CREDIT_PURCHASE_MINIMUM_CENTS = 15_000;
6
+ export const BILLING_PURCHASE_LATE_RULE_KEY = 'internal.billing.purchase_late';
6
7
  export const BILLING_SALES_RULE_KEYS: readonly string[] = [
7
8
  'internal.billing.credit_purchase',
8
9
  'internal.billing.paid_plan',
10
+ BILLING_PURCHASE_LATE_RULE_KEY,
9
11
  ];
10
12
 
11
13
  export function isPlatformNotificationGroup(groupKey: string): boolean {
@@ -14,6 +14,7 @@ import {
14
14
  import { legacySlackNotificationType } from './legacy-slack';
15
15
  import type { NotificationText } from './content';
16
16
  import {
17
+ BILLING_PURCHASE_LATE_RULE_KEY,
17
18
  BILLING_SALES_CREDIT_PURCHASE_MINIMUM_CENTS,
18
19
  BILLING_SALES_GROUP_KEY,
19
20
  } from './billing-sales';
@@ -814,6 +815,38 @@ const PRODUCT_NOTIFICATION_TYPE_REGISTRY = [
814
815
  }),
815
816
  },
816
817
  },
818
+ {
819
+ id: BILLING_PURCHASE_LATE_RULE_KEY,
820
+ eventName: ProductNotificationEvent.BillingPurchaseLate,
821
+ requiredFilter: {},
822
+ allowedTriggers: ['each_match'],
823
+ catalog: undefined,
824
+ shadow: true,
825
+ rule: {
826
+ default: {
827
+ ruleKey: BILLING_PURCHASE_LATE_RULE_KEY,
828
+ groupKey: BILLING_SALES_GROUP_KEY,
829
+ },
830
+ create: (_input, base) => ({
831
+ ...base,
832
+ repeatMode: 'every_match',
833
+ trigger: { kind: 'each_match' },
834
+ }),
835
+ present: ({ payload }) => ({
836
+ title: `Purchase not completed after ${payload.thresholdSeconds} seconds`,
837
+ summary: [
838
+ '<!channel> Purchase fulfillment in ',
839
+ { workspace: true },
840
+ ' needs investigation. Verify payment and fulfillment independently.',
841
+ ],
842
+ details: [`Operation: ${payload.operationId}`],
843
+ targetUrl: String(payload.targetUrl),
844
+ subjectKind: 'billing_operation',
845
+ subjectId: String(payload.operationId),
846
+ severity: 'error',
847
+ }),
848
+ },
849
+ },
817
850
  {
818
851
  id: 'play.failed',
819
852
  eventName: ProductNotificationEvent.PlayRunCompleted,
@@ -20,6 +20,7 @@ export const ProductNotificationEvent = {
20
20
  CreditsUsageRecorded: 'credits.usage.recorded',
21
21
  AutoTopupLimitObserved: 'billing.auto_topup.limit_observed',
22
22
  BillingPlanPurchased: 'billing.plan.purchased',
23
+ BillingPurchaseLate: 'billing.purchase.late',
23
24
  MonitorLifecycleChanged: 'monitor.lifecycle.changed',
24
25
  PlayLifecycleChanged: 'play.lifecycle.changed',
25
26
  PlayRunCompleted: 'play.run.completed',
@@ -36,6 +37,7 @@ export type ProductNotificationEvent =
36
37
  export const ProductNotificationProducerKey = {
37
38
  BillingCredits: 'billing.credits',
38
39
  BillingPlans: 'billing.plans',
40
+ BillingPurchases: 'billing.purchases',
39
41
  BillingUsage: 'billing.usage',
40
42
  MonitorsLifecycle: 'monitors.lifecycle',
41
43
  PlaysLifecycle: 'plays.lifecycle',
@@ -61,6 +63,7 @@ export const PRODUCT_NOTIFICATION_EVENT_NAMES = [
61
63
  ProductNotificationEvent.AutoTopupLimitObserved,
62
64
  ProductNotificationEvent.CreditsPurchaseCompleted,
63
65
  ProductNotificationEvent.BillingPlanPurchased,
66
+ ProductNotificationEvent.BillingPurchaseLate,
64
67
  ] as const;
65
68
 
66
69
  export const PRODUCT_NOTIFICATION_COMPATIBILITY_EVENT_NAMES = [
@@ -225,6 +228,18 @@ export const PRODUCT_NOTIFICATION_EVENT_DEFINITIONS: readonly ProductNotificatio
225
228
  orderingSubjectFact: 'accountId',
226
229
  allowedTriggers: ['each_match'],
227
230
  },
231
+ {
232
+ eventName: ProductNotificationEvent.BillingPurchaseLate,
233
+ producerKey: ProductNotificationProducerKey.BillingPurchases,
234
+ requiredFacts: {
235
+ accountId: 'string',
236
+ operationId: 'string',
237
+ thresholdSeconds: 'number',
238
+ targetUrl: 'string',
239
+ },
240
+ orderingSubjectFact: 'operationId',
241
+ allowedTriggers: ['each_match'],
242
+ },
228
243
  ...PRODUCT_NOTIFICATION_COMPATIBILITY_EVENT_NAMES.map((eventName) => ({
229
244
  eventName,
230
245
  producerKey: ProductNotificationProducerKey.LegacyProductNotifications,
@@ -9,11 +9,11 @@ import {
9
9
  registerAuthCommands,
10
10
  reportSetupCompleted,
11
11
  resolvePendingAuthClaimForResume
12
- } from "./chunk-ZK7BK7OD.mjs";
13
- import "./chunk-IWSPBSV7.mjs";
14
- import "./chunk-VO4RF766.mjs";
12
+ } from "./chunk-QV2WIEUP.mjs";
13
+ import "./chunk-2Y2QZJBT.mjs";
14
+ import "./chunk-W6LB26RC.mjs";
15
15
  import "./chunk-DLIRSHV6.mjs";
16
- import "./chunk-TVNBP3CX.mjs";
16
+ import "./chunk-U5L6FIIL.mjs";
17
17
  import "./chunk-NXGCO4JB.mjs";
18
18
  import "./chunk-WZYKRD7T.mjs";
19
19
  import "./chunk-KRD6H754.mjs";
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkERFIHZXTjs = require('./chunk-ERFIHZXT.js');
13
+ require('./chunk-IPEE3DIV.js');
14
+ require('./chunk-AUB3AW3P.js');
15
+ require('./chunk-XNYIZMNQ.js');
16
+ require('./chunk-FSNKEEBA.js');
17
+ require('./chunk-7P5AA3SN.js');
18
+ require('./chunk-OG64RBAC.js');
19
+ require('./chunk-COGTRVWW.js');
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkERFIHZXTjs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkERFIHZXTjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkERFIHZXTjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkERFIHZXTjs.handleRegister; exports.handleStatus = _chunkERFIHZXTjs.handleStatus; exports.handleWait = _chunkERFIHZXTjs.handleWait; exports.readPendingAuthClaim = _chunkERFIHZXTjs.readPendingAuthClaim; exports.registerAuthCommands = _chunkERFIHZXTjs.registerAuthCommands; exports.reportSetupCompleted = _chunkERFIHZXTjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkERFIHZXTjs.resolvePendingAuthClaimForResume;
@@ -2,7 +2,7 @@ import {
2
2
  DeeplineClient,
3
3
  iterateCursorPages,
4
4
  requireBillingIdempotencyKey
5
- } from "./chunk-Y2BTWBO7.mjs";
5
+ } from "./chunk-DEDNTNXS.mjs";
6
6
  import "./chunk-CBVIJSHF.mjs";
7
7
  import {
8
8
  createTimestampedName,
@@ -10,13 +10,13 @@ import {
10
10
  openInBrowser,
11
11
  printCommandEnvelope,
12
12
  shouldEmitJson
13
- } from "./chunk-IWSPBSV7.mjs";
13
+ } from "./chunk-2Y2QZJBT.mjs";
14
14
  import {
15
15
  AuthError,
16
16
  ConfigError
17
- } from "./chunk-VO4RF766.mjs";
17
+ } from "./chunk-W6LB26RC.mjs";
18
18
  import "./chunk-DLIRSHV6.mjs";
19
- import "./chunk-TVNBP3CX.mjs";
19
+ import "./chunk-U5L6FIIL.mjs";
20
20
  import "./chunk-6IKARAYD.mjs";
21
21
  import {
22
22
  DeeplineError