deepline 0.3.550 → 0.3.551

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 (178) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/types.ts +22 -0
  3. package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +42 -0
  4. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +31 -0
  5. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +1 -0
  6. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +19 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +2 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +2 -2
  9. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +187 -16
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +70 -19
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +854 -3
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +15 -1
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +6 -2
  14. package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +43 -0
  15. package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +1 -0
  16. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +38 -5
  17. package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +1 -1
  18. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +16 -0
  19. package/dist/cli/auth-B4PI7GVY.js +43 -0
  20. package/dist/cli/{auth-UJCAHGZG.mjs → auth-E7BH4GMJ.mjs} +5 -5
  21. package/dist/cli/{billing-VO2O5O5O.js → billing-DNQAZGX7.js} +99 -99
  22. package/dist/cli/{billing-RYWMI7JJ.mjs → billing-OXKU462W.mjs} +10 -10
  23. package/dist/cli/chunk-2RIKOPIM.mjs +9 -0
  24. package/dist/cli/{chunk-IZCPOX7X.mjs → chunk-2UXDHFSF.mjs} +1 -1
  25. package/dist/cli/{chunk-XYIECA7M.js → chunk-2WFPHBR4.js} +30 -8
  26. package/dist/cli/{chunk-JYUIIDZO.js → chunk-2ZYRBMQM.js} +23 -22
  27. package/dist/cli/{chunk-TB3WT76F.js → chunk-3G6QZACZ.js} +23 -20
  28. package/dist/cli/{chunk-LWHWMU4V.js → chunk-3KYBDAR3.js} +7 -7
  29. package/dist/cli/{chunk-CIBQVA6V.mjs → chunk-3T65J5RG.mjs} +2 -2
  30. package/dist/cli/{chunk-KSUTNW3X.js → chunk-44I675YK.js} +42 -41
  31. package/dist/cli/{chunk-4NQWUUOH.mjs → chunk-44KSACJW.mjs} +2 -2
  32. package/dist/cli/{chunk-GVW5V562.mjs → chunk-4D3WIZST.mjs} +1 -1
  33. package/dist/cli/{chunk-RS6ZSKX6.js → chunk-4OMAGJ6U.js} +2 -2
  34. package/dist/cli/{chunk-SZNX3XU3.js → chunk-54EEYLTF.js} +3 -3
  35. package/dist/cli/{chunk-QD2KT7II.mjs → chunk-5IL7SC45.mjs} +2 -2
  36. package/dist/cli/{chunk-COHCKZQK.mjs → chunk-5S6PHKRV.mjs} +2 -1
  37. package/dist/cli/{chunk-SBNNK73L.js → chunk-5VVSEU67.js} +6 -6
  38. package/dist/cli/{chunk-ZQZOYGDC.mjs → chunk-6PWJKMFQ.mjs} +5 -4
  39. package/dist/cli/{chunk-MAE3AKDR.mjs → chunk-7DOQ3OEX.mjs} +17 -8
  40. package/dist/cli/{chunk-3W44AJOE.js → chunk-7RSIFA72.js} +18 -16
  41. package/dist/cli/{chunk-F2RXBNT5.mjs → chunk-7WQNWJQW.mjs} +7 -5
  42. package/dist/cli/{chunk-6P7TGCHQ.mjs → chunk-BGBJV26E.mjs} +10 -3
  43. package/dist/cli/{chunk-UL7HWZO7.mjs → chunk-BIIJATTX.mjs} +2 -2
  44. package/dist/cli/{chunk-ADWMIZCB.js → chunk-C4CUZH57.js} +20 -11
  45. package/dist/cli/{chunk-S6XOKGBF.mjs → chunk-CLRAANWH.mjs} +1 -1
  46. package/dist/cli/{chunk-YSYOQYZE.js → chunk-COGREZAO.js} +48 -44
  47. package/dist/cli/{chunk-SMLWC7PM.js → chunk-CQ6JYQSW.js} +10 -10
  48. package/dist/cli/{chunk-7BWMCVYU.mjs → chunk-D6M5HFBB.mjs} +1 -1
  49. package/dist/cli/{chunk-FMXLQHM2.mjs → chunk-E64HFB4L.mjs} +13 -13
  50. package/dist/cli/{chunk-E2QVWDDW.mjs → chunk-FOTGUFVK.mjs} +3 -3
  51. package/dist/cli/{chunk-HCFH2V27.mjs → chunk-GGB3JYCW.mjs} +3 -2
  52. package/dist/cli/{chunk-7AOFSZJM.mjs → chunk-GGGAEVCX.mjs} +23 -1
  53. package/dist/cli/{chunk-N2Y2IGNB.mjs → chunk-GVYLCCKN.mjs} +1 -1
  54. package/dist/cli/{chunk-UV4RU2TE.js → chunk-H4ALLC2X.js} +2 -0
  55. package/dist/cli/{chunk-LUULRAQB.mjs → chunk-HEHVGEZV.mjs} +10 -7
  56. package/dist/cli/{chunk-HEVUFICQ.mjs → chunk-I4VKGNAQ.mjs} +9 -5
  57. package/dist/cli/{chunk-RKF263LR.js → chunk-KWSH5T7K.js} +25 -18
  58. package/dist/cli/{chunk-XKE2PGZ2.js → chunk-LPJPCGT3.js} +8 -8
  59. package/dist/cli/{chunk-E4S7OE7B.mjs → chunk-MNSTCJMX.mjs} +3 -3
  60. package/dist/cli/{chunk-QNWNR6DG.js → chunk-MR5LTVHD.js} +53 -53
  61. package/dist/cli/{chunk-K7JZV4QW.mjs → chunk-MXGA6JFI.mjs} +2 -2
  62. package/dist/cli/{chunk-EU23QOJ6.js → chunk-NMWGZD6Y.js} +26 -26
  63. package/dist/cli/{chunk-MJDQZYKO.js → chunk-PACD5DGC.js} +4 -4
  64. package/dist/cli/{chunk-EMPXPEIQ.mjs → chunk-PM7MO62Y.mjs} +3 -3
  65. package/dist/cli/{chunk-JKLDCFY5.js → chunk-POLUE7D5.js} +11 -11
  66. package/dist/cli/{chunk-DGUTBLXF.js → chunk-PPSDCN6C.js} +3 -2
  67. package/dist/cli/{chunk-NM3AYEDI.js → chunk-QM6Y6S4E.js} +5 -5
  68. package/dist/cli/{chunk-2AKS64KJ.mjs → chunk-RE5MJBEV.mjs} +2 -2
  69. package/dist/cli/{chunk-KLQILE2I.mjs → chunk-S7IZWGUA.mjs} +2 -2
  70. package/dist/cli/{chunk-2IW5GKB4.js → chunk-T2B5BVZE.js} +13 -13
  71. package/dist/cli/{chunk-OKNOQRQ3.js → chunk-UDXULACQ.js} +3 -3
  72. package/dist/cli/{chunk-ECWOIXAV.js → chunk-UPMRIVZB.js} +14 -12
  73. package/dist/cli/{chunk-72NXIFOT.mjs → chunk-V6SCP4B7.mjs} +1 -1
  74. package/dist/cli/{chunk-5J3TRWTB.js → chunk-VTGG2RT3.js} +1 -1
  75. package/dist/cli/{chunk-DJWM5OOY.mjs → chunk-VWLHRZFG.mjs} +4 -4
  76. package/dist/cli/{chunk-I62PCYU6.js → chunk-W2ZWQUHT.js} +2 -2
  77. package/dist/cli/{chunk-MXEYNRTZ.mjs → chunk-W425ERWN.mjs} +6 -5
  78. package/dist/cli/{chunk-GWNYLIF7.mjs → chunk-WEHCBH5R.mjs} +4 -2
  79. package/dist/cli/{chunk-JLFOQRWM.js → chunk-WKBHUB6R.js} +270 -270
  80. package/dist/cli/{chunk-3WG2GURT.js → chunk-XYE5XPGF.js} +9 -9
  81. package/dist/cli/{chunk-R5CYKRA2.js → chunk-Z2FIOG3V.js} +12 -12
  82. package/dist/cli/{chunk-BJO7ZXAK.js → chunk-ZCDKE4UH.js} +5 -5
  83. package/dist/cli/{chunk-RINUMR6C.js → chunk-ZDQFBJPO.js} +20 -19
  84. package/dist/cli/{chunk-TL3WIXDH.mjs → chunk-ZMNGZ6XS.mjs} +1 -1
  85. package/dist/cli/command-docs.js +3 -3
  86. package/dist/cli/command-docs.mjs +2 -2
  87. package/dist/cli/{concurrent-runs-help-766HVJR3.mjs → concurrent-runs-help-C6L6I5OR.mjs} +7 -7
  88. package/dist/cli/concurrent-runs-help-JEFQZTJI.js +21 -0
  89. package/dist/cli/{csv-4DZKGYCU.js → csv-QMF4FWE7.js} +19 -14
  90. package/dist/cli/{csv-VU52KZOX.mjs → csv-SYSDXFEM.mjs} +10 -5
  91. package/dist/cli/{db-UBGW373S.mjs → db-Q7HURWRZ.mjs} +6 -6
  92. package/dist/cli/{db-KPIH4HPW.js → db-YSHPPA4H.js} +27 -27
  93. package/dist/cli/describe-PXTSBJTL.js +50 -0
  94. package/dist/cli/{describe-NGITP6RA.mjs → describe-YGMQBV44.mjs} +21 -21
  95. package/dist/cli/describe-core.d.mts +4 -2
  96. package/dist/cli/describe-core.d.ts +4 -2
  97. package/dist/cli/describe-core.js +4 -4
  98. package/dist/cli/describe-core.mjs +3 -3
  99. package/dist/cli/{executions-CO5UF3CV.mjs → executions-G7U3VUXN.mjs} +6 -6
  100. package/dist/cli/{executions-G3X25U3V.js → executions-MWBC5TAW.js} +8 -8
  101. package/dist/cli/{feedback-M2L5DVN2.mjs → feedback-GMHIFLBJ.mjs} +6 -6
  102. package/dist/cli/{feedback-ZYF65WPH.js → feedback-SD55OY6H.js} +14 -14
  103. package/dist/cli/{git-AYJD5CLS.mjs → git-HPE45OPD.mjs} +5 -5
  104. package/dist/cli/git-I3JV7IGH.js +25 -0
  105. package/dist/cli/index.js +147 -147
  106. package/dist/cli/index.mjs +46 -46
  107. package/dist/cli/{integrations-LKEGGTZO.mjs → integrations-2W4MGIQR.mjs} +7 -7
  108. package/dist/cli/{integrations-GSXXJ4CF.js → integrations-HFKVBY6G.js} +15 -15
  109. package/dist/cli/{legacy-noops-UF4GKMD4.mjs → legacy-noops-GZYKNU2Z.mjs} +6 -6
  110. package/dist/cli/{legacy-noops-MZDLLEKN.js → legacy-noops-SXVNDEXN.js} +9 -9
  111. package/dist/cli/{mcp-NHQ6RMBP.mjs → mcp-BWA6KULG.mjs} +4 -4
  112. package/dist/cli/{mcp-RTNC6LP3.js → mcp-PJRHQHHU.js} +24 -24
  113. package/dist/cli/{monitors-WMWB6EKQ.js → monitors-K2WSI6CR.js} +100 -100
  114. package/dist/cli/{monitors-NC4ZR5DH.mjs → monitors-SYQKCATO.mjs} +7 -7
  115. package/dist/cli/{org-ZXUSYREQ.mjs → org-5KD7X7IA.mjs} +6 -6
  116. package/dist/cli/{org-33Q7CXJB.js → org-YQ2CR32B.js} +88 -88
  117. package/dist/cli/{play-N24XV6TI.js → play-SZXY2F2S.js} +330 -330
  118. package/dist/cli/{play-IPWFGNRE.mjs → play-TTMABJEI.mjs} +18 -18
  119. package/dist/cli/{providers-MSVE7UZS.mjs → providers-GQIOMRQO.mjs} +6 -6
  120. package/dist/cli/{providers-AUI7MMQS.js → providers-YDHCTZAF.js} +9 -9
  121. package/dist/cli/{quickstart-PSC6VTRI.js → quickstart-BNYOXQXG.js} +6 -6
  122. package/dist/cli/{quickstart-OME5XMW5.mjs → quickstart-PHSSMKCA.mjs} +4 -4
  123. package/dist/cli/{run-EYTT2DHO.mjs → run-74C3C75C.mjs} +26 -26
  124. package/dist/cli/{run-UTIX7CJY.js → run-GFIAZXVL.js} +47 -47
  125. package/dist/cli/search-2RRRF4LW.js +32 -0
  126. package/dist/cli/{search-FVE7PM72.mjs → search-3SWUB7KX.mjs} +7 -7
  127. package/dist/cli/{search-output-O463JNLR.js → search-output-6JF3S4TP.js} +43 -13
  128. package/dist/cli/{search-output-TQMY6BDG.mjs → search-output-K2SWHVHQ.mjs} +40 -10
  129. package/dist/cli/{secrets-KCJJAHQB.mjs → secrets-2M4XWEKE.mjs} +6 -6
  130. package/dist/cli/{secrets-TWZ2GO73.js → secrets-2SAKLH2H.js} +15 -15
  131. package/dist/cli/{sessions-ZCWAA7QL.mjs → sessions-A64BCXTO.mjs} +6 -6
  132. package/dist/cli/sessions-SBH27JNW.js +22 -0
  133. package/dist/cli/{settings-SCR654U7.js → settings-HV64WIJF.js} +85 -85
  134. package/dist/cli/{settings-4JFKCKII.mjs → settings-SVGEC3FI.mjs} +12 -12
  135. package/dist/cli/{setup-Q2YOPGOI.mjs → setup-EDC3NEJ3.mjs} +15 -10
  136. package/dist/cli/{setup-O6GH3UWT.js → setup-FHXOLQGQ.js} +55 -50
  137. package/dist/cli/{skills-QHPZ6H2G.mjs → skills-3HGHZMXB.mjs} +7 -7
  138. package/dist/cli/skills-Y3SRLOYD.js +36 -0
  139. package/dist/cli/tools-OFYPUPUV.js +57 -0
  140. package/dist/cli/{tools-YO22H46E.mjs → tools-P2QS6A6Q.mjs} +19 -19
  141. package/dist/cli/{update-WHBC5IHE.mjs → update-552BYQM4.mjs} +9 -9
  142. package/dist/cli/update-SOUSCLB7.js +34 -0
  143. package/dist/cli/{views-XNLXV2BT.mjs → views-LD5HXJYY.mjs} +6 -6
  144. package/dist/cli/{views-4CZJ5BLG.js → views-PA25NAE3.js} +21 -21
  145. package/dist/cli/{workflow-C4VBARIE.js → workflow-FIDBUQV6.js} +17 -17
  146. package/dist/cli/{workflow-QUWP2CG2.mjs → workflow-LDYFGBYP.mjs} +7 -7
  147. package/dist/{client-BEJqhQAj.d.mts → client-DuDFiJDU.d.mts} +1 -1
  148. package/dist/{client-core-BPYuWfBC.d.ts → client-core-CJRzLanv.d.ts} +93 -4
  149. package/dist/{client-core-BqetRxx-.d.mts → client-core-DydMQOft.d.mts} +93 -4
  150. package/dist/{client-Ceo295L2.d.ts → client-t9HZAkFD.d.ts} +1 -1
  151. package/dist/index.d.mts +3 -3
  152. package/dist/index.d.ts +3 -3
  153. package/dist/index.js +9 -9
  154. package/dist/index.mjs +6 -6
  155. package/dist/install-integrity.json +124 -124
  156. package/dist/plays/play-description.d.mts +1 -1
  157. package/dist/plays/play-description.d.ts +1 -1
  158. package/dist/plays/run-request.d.mts +1 -1
  159. package/dist/plays/run-request.d.ts +1 -1
  160. package/dist/release.d.mts +1 -1
  161. package/dist/release.d.ts +1 -1
  162. package/dist/release.js +2 -2
  163. package/dist/release.mjs +1 -1
  164. package/dist/server.d.mts +2 -2
  165. package/dist/server.d.ts +2 -2
  166. package/dist/server.js +5 -5
  167. package/dist/server.mjs +3 -3
  168. package/package.json +1 -1
  169. package/dist/cli/auth-J4OW5RNJ.js +0 -43
  170. package/dist/cli/chunk-NIPLY25A.mjs +0 -7
  171. package/dist/cli/concurrent-runs-help-3XZIHVRP.js +0 -21
  172. package/dist/cli/describe-4BI6E2CM.js +0 -50
  173. package/dist/cli/git-QRZP4DNA.js +0 -25
  174. package/dist/cli/search-CQ6JG2EN.js +0 -32
  175. package/dist/cli/sessions-LMPXUPUH.js +0 -22
  176. package/dist/cli/skills-M4CFE65Z.js +0 -36
  177. package/dist/cli/tools-CV7XA2V6.js +0 -57
  178. package/dist/cli/update-PUWBKPWJ.js +0 -34
@@ -2970,7 +2970,21 @@ export async function attachRuntimeEventSearchTriggers(
2970
2970
  'provider', CASE WHEN item->'observation'->'target'->>'kind' = 'provider'
2971
2971
  THEN left(item->'observation'->'target'->>'provider', 64) END,
2972
2972
  'operation', CASE WHEN item->'observation'->'target'->>'kind' = 'provider'
2973
- THEN left(item->'observation'->'target'->>'operation', 256) END
2973
+ THEN left(item->'observation'->'target'->>'operation', 256) END,
2974
+ 'context', CASE WHEN kind = ${RUN_EVENT_KIND_SQL_LITERAL.activityObserved}
2975
+ AND item->'observation'->>'activityId' = 'run:sandbox-capacity'
2976
+ AND item->'observation'->'target'->>'kind' = 'capacity'
2977
+ AND item->'observation'->'target'->>'pool' = 'runner'
2978
+ THEN jsonb_strip_nulls(jsonb_build_object(
2979
+ 'activityId', 'run:sandbox-capacity',
2980
+ 'capacityLimit', CASE WHEN jsonb_typeof(item#>'{observation,target,limit}') = 'number'
2981
+ THEN item#>'{observation,target,limit}' END,
2982
+ 'capacityLimitSource', CASE WHEN item#>>'{observation,target,limitSource}' IN ('admission', 'workspace')
2983
+ THEN item#>'{observation,target,limitSource}' END,
2984
+ 'capacityWaitMs', CASE WHEN jsonb_typeof(item#>'{observation,target,waitedMs}') = 'number'
2985
+ THEN CASE WHEN (item#>>'{observation,target,waitedMs}')::numeric >= 0
2986
+ THEN item#>'{observation,target,waitedMs}' END END
2987
+ )) END
2974
2988
  ));
2975
2989
  IF kind = ${RUN_EVENT_KIND_SQL_LITERAL.logAppended} AND jsonb_typeof(item->'lines') IS DISTINCT FROM 'array' THEN
2976
2990
  RAISE EXCEPTION 'Search projection requires log.appended lines';
@@ -1589,6 +1589,7 @@ export type RuntimeSandboxCapacityTestEvidence = {
1589
1589
  run: null | {
1590
1590
  runId: string;
1591
1591
  status: string;
1592
+ /** In-attempt capacity refusals plus pre-claim capacity waits. */
1592
1593
  capacityDeferrals: number;
1593
1594
  acquired: number;
1594
1595
  unresolvedOperations: number;
@@ -1637,7 +1638,7 @@ export async function readRuntimeSandboxCapacityTestEvidence(
1637
1638
  evidence: RuntimeSandboxCapacityTestEvidence;
1638
1639
  }>(
1639
1640
  `WITH owned_run AS (
1640
- SELECT run_id, status FROM ${runs}
1641
+ SELECT run_id, status, recovery_json FROM ${runs}
1641
1642
  WHERE org_id = $1 AND run_id = $2
1642
1643
  AND launch_json->>'absurdReleaseId' = $3
1643
1644
  ), owned_operations AS (
@@ -1668,9 +1669,12 @@ export async function readRuntimeSandboxCapacityTestEvidence(
1668
1669
  ),
1669
1670
  'run', (SELECT jsonb_build_object(
1670
1671
  'runId', run_id, 'status', status,
1672
+ -- In-attempt refusals plus pre-claim waits: each wait event the run
1673
+ -- parked on (sandboxCapacityWait.seq) allocated no attempt.
1671
1674
  'capacityDeferrals', (SELECT count(*)::integer FROM ${schema}."attempts" AS attempt
1672
1675
  WHERE attempt.run_id = owned_run.run_id AND attempt.error_json->>'kind' = 'scheduler_capacity'
1673
- AND starts_with(attempt.error_json->>'message', 'Runtime scheduler sandbox capacity is full for organization ')),
1676
+ AND starts_with(attempt.error_json->>'message', 'Runtime scheduler sandbox capacity is full for organization '))
1677
+ + coalesce((owned_run.recovery_json #>> '{sandboxCapacityWait,seq}')::integer, 0),
1674
1678
  'acquired', (SELECT count(*)::integer FROM owned_operations WHERE sandbox_id IS NOT NULL AND provider_created_at IS NOT NULL),
1675
1679
  'unresolvedOperations', (SELECT count(*)::integer FROM owned_operations WHERE state NOT IN ('deleted', 'abandoned')),
1676
1680
  'confirmedDeleted', (SELECT count(*)::integer FROM owned_operations WHERE state = 'deleted' AND delete_confirmed_at IS NOT NULL),
@@ -10,6 +10,7 @@ import {
10
10
  inputFieldFromStaticCsvArg,
11
11
  type PlayStaticColumnProducer,
12
12
  type PlayStaticPipeline,
13
+ type PlayStaticSourceRange,
13
14
  type PlayStaticSubstep,
14
15
  } from '../static-pipeline';
15
16
  import type {
@@ -533,6 +534,46 @@ function projectPublicPipeline(
533
534
  };
534
535
  }
535
536
 
537
+ /**
538
+ * A child-Play call's line extent, for the authenticated app graph only.
539
+ *
540
+ * A `type:"play"` card is joined to its `ctx.runPlay` call by its `out:`
541
+ * symbol, else by the line its annotation sits on
542
+ * (`resolveDocflowBoundChildPlay`). A card whose `out:` names the result
543
+ * (`assignment`) rather than the step key (`route_lead`) joins by line, so a
544
+ * graph without the call's lines drew it as a plain card: no preview, nothing
545
+ * to open. Line numbers only: never the file path, which may name the
546
+ * author's machine.
547
+ */
548
+ function appGraphLineRange(
549
+ range: PlayStaticSourceRange | undefined,
550
+ ): PlayStaticSourceRange | undefined {
551
+ if (!range) return undefined;
552
+ return {
553
+ startLine: range.startLine,
554
+ endLine: range.endLine,
555
+ startColumn: range.startColumn,
556
+ endColumn: range.endColumn,
557
+ };
558
+ }
559
+
560
+ function appGraphCallExtent(
561
+ substep: PlayStaticSubstep,
562
+ includeBindingPaths: boolean,
563
+ ): { sourceRange?: PlayStaticSourceRange; callSiteRange?: PlayStaticSourceRange } {
564
+ if (!includeBindingPaths) return {};
565
+ const ranges = substep as {
566
+ sourceRange?: PlayStaticSourceRange;
567
+ callSiteRange?: PlayStaticSourceRange;
568
+ };
569
+ const sourceRange = appGraphLineRange(ranges.sourceRange);
570
+ const callSiteRange = appGraphLineRange(ranges.callSiteRange);
571
+ return {
572
+ ...(sourceRange ? { sourceRange } : {}),
573
+ ...(callSiteRange ? { callSiteRange } : {}),
574
+ };
575
+ }
576
+
536
577
  function projectPublicSubstep(
537
578
  substep: PlayStaticSubstep,
538
579
  depth: number,
@@ -615,6 +656,7 @@ function projectPublicSubstep(
615
656
  if (substep.type === 'play_call') {
616
657
  return {
617
658
  ...base,
659
+ ...appGraphCallExtent(substep, includeBindingPaths),
618
660
  type: 'play_call',
619
661
  playId: substep.playId,
620
662
  field: substep.field,
@@ -632,6 +674,7 @@ function projectPublicSubstep(
632
674
  if (substep.type === 'play_launch') {
633
675
  return {
634
676
  ...base,
677
+ ...appGraphCallExtent(substep, includeBindingPaths),
635
678
  type: 'play_launch',
636
679
  playId: substep.playId,
637
680
  field: substep.field,
@@ -70,6 +70,7 @@ export const BILLING_SALES_RULE_KEYS: readonly string[] = [
70
70
  'internal.billing.usage_charge',
71
71
  'internal.billing.credit_purchase',
72
72
  'internal.billing.paid_plan',
73
+ 'internal.billing.plan_cancelled',
73
74
  'internal.billing.allowance_exhausted',
74
75
  ...BILLING_DELIVERY_LATE_RULE_KEYS,
75
76
  ];
@@ -375,11 +375,14 @@ function lateCreditDeliveryRegistration<Id extends string>(
375
375
  }),
376
376
  present: ({ payload }) => ({
377
377
  title: `${label} not completed after ${payload.thresholdSeconds} seconds`,
378
- summary: [
379
- `<!channel> ${label} fulfillment in `,
380
- { workspace: true },
381
- ' needs investigation. Verify payment and fulfillment independently.',
382
- ],
378
+ summary:
379
+ label === 'Purchase' && payload.thresholdSeconds === 30
380
+ ? 'Purchase is still pending; will alert again at 120 seconds if unresolved.'
381
+ : [
382
+ `<!channel> ${label} fulfillment in `,
383
+ { workspace: true },
384
+ ' needs investigation. Verify payment and fulfillment independently.',
385
+ ],
383
386
  details: [
384
387
  `${label === 'Purchase' ? 'Operation' : 'Stripe invoice'}: ${payload[identityField]}`,
385
388
  ],
@@ -1098,6 +1101,36 @@ const PRODUCT_NOTIFICATION_TYPE_REGISTRY = [
1098
1101
  }),
1099
1102
  },
1100
1103
  },
1104
+ {
1105
+ id: 'internal.billing.plan_cancelled',
1106
+ eventName: ProductNotificationEvent.BillingPlanCancelled,
1107
+ requiredFilter: {},
1108
+ allowedTriggers: ['each_match'],
1109
+ catalog: undefined,
1110
+ shadow: true,
1111
+ rule: {
1112
+ default: {
1113
+ ruleKey: 'internal.billing.plan_cancelled',
1114
+ groupKey: BILLING_SALES_GROUP_KEY,
1115
+ },
1116
+ create: (_input, base) => ({
1117
+ ...base,
1118
+ repeatMode: 'every_match',
1119
+ trigger: { kind: 'each_match' },
1120
+ }),
1121
+ present: ({ payload }) => ({
1122
+ title: 'Plan cancellation scheduled',
1123
+ summary: [
1124
+ { workspace: true },
1125
+ ` cancelled the ${payload.planName} plan.`,
1126
+ ],
1127
+ details: [`Effective at: ${payload.effectiveAt}`],
1128
+ targetUrl: String(payload.targetUrl),
1129
+ subjectKind: 'workspace',
1130
+ subjectId: String(payload.accountId),
1131
+ }),
1132
+ },
1133
+ },
1101
1134
  {
1102
1135
  id: 'internal.billing.usage_charge',
1103
1136
  eventName: ProductNotificationEvent.BillingUsageChargeObserved,
@@ -25,7 +25,7 @@ import {
25
25
  * they create sparse copy-on-write overrides.
26
26
  */
27
27
  export const CURRENT_PRODUCT_NOTIFICATION_DEFAULT_POLICY = {
28
- version: 15,
28
+ version: 16,
29
29
  groups: [
30
30
  {
31
31
  groupKey: 'default',
@@ -30,6 +30,7 @@ export const ProductNotificationEvent = {
30
30
  CreditsUsageRecorded: 'credits.usage.recorded',
31
31
  AutoTopupLimitObserved: 'billing.auto_topup.limit_observed',
32
32
  BillingPlanPurchased: 'billing.plan.purchased',
33
+ BillingPlanCancelled: 'billing.plan.cancelled',
33
34
  BillingPurchaseLate: 'billing.purchase.late',
34
35
  BillingRenewalLate: 'billing.renewal.late',
35
36
  BillingUsageChargeObserved: 'billing.usage.charge_observed',
@@ -77,6 +78,7 @@ export const PRODUCT_NOTIFICATION_EVENT_NAMES = [
77
78
  ProductNotificationEvent.AutoTopupLimitObserved,
78
79
  ProductNotificationEvent.CreditsPurchaseCompleted,
79
80
  ProductNotificationEvent.BillingPlanPurchased,
81
+ ProductNotificationEvent.BillingPlanCancelled,
80
82
  ProductNotificationEvent.BillingPurchaseLate,
81
83
  ProductNotificationEvent.BillingRenewalLate,
82
84
  ProductNotificationEvent.BillingUsageChargeObserved,
@@ -259,6 +261,20 @@ export const PRODUCT_NOTIFICATION_EVENT_DEFINITIONS: readonly ProductNotificatio
259
261
  orderingSubjectFact: 'accountId',
260
262
  allowedTriggers: ['each_match'],
261
263
  },
264
+ {
265
+ // A paid plan's cancellation was confirmed for the billing boundary.
266
+ eventName: ProductNotificationEvent.BillingPlanCancelled,
267
+ producerKey: ProductNotificationProducerKey.BillingPlans,
268
+ requiredFacts: {
269
+ accountId: 'string',
270
+ offerKey: 'string',
271
+ planName: 'string',
272
+ effectiveAt: 'string',
273
+ targetUrl: 'string',
274
+ },
275
+ orderingSubjectFact: 'accountId',
276
+ allowedTriggers: ['each_match'],
277
+ },
262
278
  {
263
279
  eventName: ProductNotificationEvent.BillingPurchaseLate,
264
280
  producerKey: ProductNotificationProducerKey.BillingPurchases,
@@ -0,0 +1,43 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkMR5LTVHDjs = require('./chunk-MR5LTVHD.js');
18
+ require('./chunk-ZDQFBJPO.js');
19
+ require('./chunk-UDXULACQ.js');
20
+ require('./chunk-PACD5DGC.js');
21
+ require('./chunk-EITMD3A5.js');
22
+ require('./chunk-XNYIZMNQ.js');
23
+ require('./chunk-BBTKAASQ.js');
24
+ require('./chunk-VTGG2RT3.js');
25
+ require('./chunk-OG64RBAC.js');
26
+ require('./chunk-COGTRVWW.js');
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkMR5LTVHDjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkMR5LTVHDjs.authStatusLine; exports.clearPendingClaim = _chunkMR5LTVHDjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkMR5LTVHDjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkMR5LTVHDjs.handleRegister; exports.handleStatus = _chunkMR5LTVHDjs.handleStatus; exports.handleWait = _chunkMR5LTVHDjs.handleWait; exports.httpJson = _chunkMR5LTVHDjs.httpJson; exports.readPendingAuthClaim = _chunkMR5LTVHDjs.readPendingAuthClaim; exports.readStatusBanner = _chunkMR5LTVHDjs.readStatusBanner; exports.registerAuthCommands = _chunkMR5LTVHDjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkMR5LTVHDjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkMR5LTVHDjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkMR5LTVHDjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkMR5LTVHDjs.statusBannerLine;
@@ -14,14 +14,14 @@ import {
14
14
  reportSetupCompleted,
15
15
  resolvePendingAuthClaimForResume,
16
16
  statusBannerLine
17
- } from "./chunk-E4S7OE7B.mjs";
18
- import "./chunk-HCFH2V27.mjs";
19
- import "./chunk-72NXIFOT.mjs";
20
- import "./chunk-GVW5V562.mjs";
17
+ } from "./chunk-MNSTCJMX.mjs";
18
+ import "./chunk-GGB3JYCW.mjs";
19
+ import "./chunk-V6SCP4B7.mjs";
20
+ import "./chunk-4D3WIZST.mjs";
21
21
  import "./chunk-NURW5XH4.mjs";
22
22
  import "./chunk-DLIRSHV6.mjs";
23
23
  import "./chunk-JL2OTMSG.mjs";
24
- import "./chunk-IZCPOX7X.mjs";
24
+ import "./chunk-2UXDHFSF.mjs";
25
25
  import "./chunk-WZYKRD7T.mjs";
26
26
  import "./chunk-KRD6H754.mjs";
27
27
  export {