deepline 0.3.523 → 0.3.525

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 (177) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +68 -60
  2. package/dist/bundling-sources/sdk/src/http-core.ts +14 -0
  3. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +10 -0
  6. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +60 -14
  7. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +9 -3
  8. package/dist/bundling-sources/shared_libs/observability/dlq.ts +19 -0
  9. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  10. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  11. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  12. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +397 -22
  13. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +473 -13
  14. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +28 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/run-retry-summary.ts +202 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +60 -8
  17. package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +112 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +39 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +13 -5
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +10 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-retry-facts.ts +62 -0
  22. package/dist/cli/auth-K7PMRXNG.js +43 -0
  23. package/dist/cli/{auth-ENQUQS56.mjs → auth-TH3VGYBK.mjs} +5 -5
  24. package/dist/cli/{billing-6A27ULCX.mjs → billing-CMHFI2LN.mjs} +8 -8
  25. package/dist/cli/{billing-6HONTJOY.js → billing-TWKVUFU2.js} +83 -83
  26. package/dist/cli/{chunk-JMMNCJ7Z.js → chunk-2WFVLOB7.js} +1 -1
  27. package/dist/cli/{chunk-S4YKRH3W.js → chunk-4UWXFXQF.js} +3 -3
  28. package/dist/cli/{chunk-PCORO245.mjs → chunk-5BSGWIQD.mjs} +2 -2
  29. package/dist/cli/{chunk-SBGKKOCC.js → chunk-5JFAQUZS.js} +26 -26
  30. package/dist/cli/{chunk-RVHUW4TN.js → chunk-5YAJGRWB.js} +17 -17
  31. package/dist/cli/{chunk-ITJ7NB2D.mjs → chunk-7AOFSZJM.mjs} +3 -1
  32. package/dist/cli/{chunk-JVEFMOY2.mjs → chunk-7C4F4TLR.mjs} +1 -1
  33. package/dist/cli/{chunk-QMBL5ZIQ.mjs → chunk-7OF3A4KJ.mjs} +3 -3
  34. package/dist/cli/{chunk-326WVSWS.js → chunk-AVDEYOVP.js} +269 -269
  35. package/dist/cli/{chunk-GJYLC4JB.mjs → chunk-BNH4Y35W.mjs} +2 -2
  36. package/dist/cli/{chunk-ZWN4RXC2.js → chunk-CKTRQSRA.js} +22 -22
  37. package/dist/cli/{chunk-I62LJ7NU.mjs → chunk-CLTL7ZJI.mjs} +1 -1
  38. package/dist/cli/{chunk-IEVXYHGJ.js → chunk-CQSANB3V.js} +5 -5
  39. package/dist/cli/{chunk-QYXIODWH.js → chunk-CWRL6IQP.js} +44 -29
  40. package/dist/cli/{chunk-WVQOXYTQ.mjs → chunk-CZNEQMJR.mjs} +37 -34
  41. package/dist/cli/{chunk-4NWY7JBB.js → chunk-DYS3KWYF.js} +11 -11
  42. package/dist/cli/{chunk-HSVGP4CI.mjs → chunk-EP6YH6QJ.mjs} +2 -2
  43. package/dist/cli/{chunk-XYL26236.js → chunk-ESWM2JW4.js} +2 -2
  44. package/dist/cli/{chunk-6OZ2WSHD.mjs → chunk-ETHVJ2ZE.mjs} +1 -1
  45. package/dist/cli/{chunk-6DBRBWHC.mjs → chunk-GCLNX72G.mjs} +2 -2
  46. package/dist/cli/{chunk-R2VZVHJP.mjs → chunk-GESIFFQX.mjs} +1 -1
  47. package/dist/cli/{chunk-QSAC3IVI.mjs → chunk-IMO3HXWZ.mjs} +1 -1
  48. package/dist/cli/{chunk-JGZQBDYG.mjs → chunk-JVWSIA2V.mjs} +4 -4
  49. package/dist/cli/{chunk-7GNKAACY.js → chunk-KBOSALBI.js} +10 -10
  50. package/dist/cli/{chunk-K326BEVR.js → chunk-KEZ3KBWW.js} +10 -10
  51. package/dist/cli/{chunk-7M5FRSFP.mjs → chunk-KPINGHIF.mjs} +2 -2
  52. package/dist/cli/{chunk-UH3EAFFN.mjs → chunk-LAMGJQDY.mjs} +2 -2
  53. package/dist/cli/{chunk-UQN4VTZL.js → chunk-LE537GBC.js} +13 -6
  54. package/dist/cli/{chunk-PESMXAUG.js → chunk-LXKH4MKH.js} +6 -6
  55. package/dist/cli/{chunk-4V63IJCL.mjs → chunk-M43ZYNDA.mjs} +5 -5
  56. package/dist/cli/{chunk-XVXEARHC.js → chunk-MHBSRNI7.js} +41 -41
  57. package/dist/cli/{chunk-HUC5SGJQ.js → chunk-MRUFGOJR.js} +2 -2
  58. package/dist/cli/{chunk-RQN4PHRE.js → chunk-N4MMU3QF.js} +21 -21
  59. package/dist/cli/{chunk-2BRDHM4S.js → chunk-NB2ECLQE.js} +9 -9
  60. package/dist/cli/{chunk-DNXP3D5H.mjs → chunk-NO4URKKT.mjs} +5 -5
  61. package/dist/cli/{chunk-MZROKQV3.js → chunk-NRBCETWL.js} +44 -44
  62. package/dist/cli/{chunk-JCTTXLAZ.mjs → chunk-OWQF6WVH.mjs} +10 -3
  63. package/dist/cli/{chunk-NWTMQGPP.mjs → chunk-OXFIJYN3.mjs} +8 -8
  64. package/dist/cli/{chunk-FBMOBNJY.js → chunk-P62LON53.js} +2 -2
  65. package/dist/cli/{chunk-NMU3VR5U.js → chunk-PMH4GLMD.js} +1 -0
  66. package/dist/cli/{chunk-S3A4IXBQ.mjs → chunk-PSX3WHIH.mjs} +1 -0
  67. package/dist/cli/{chunk-N5MLEXZ7.js → chunk-QR7VYYNM.js} +176 -173
  68. package/dist/cli/{chunk-RKREB7MU.mjs → chunk-RMZ6CISE.mjs} +3 -3
  69. package/dist/cli/{chunk-V46J3UTM.js → chunk-S5LUY3KJ.js} +7 -7
  70. package/dist/cli/{chunk-MCXPJYBN.js → chunk-TFEGJEYO.js} +3 -3
  71. package/dist/cli/{chunk-MT3WG3KR.js → chunk-TO72GW5I.js} +16 -16
  72. package/dist/cli/{chunk-H7275EZU.mjs → chunk-TXSBPBHB.mjs} +5 -5
  73. package/dist/cli/{chunk-SXTVJIGB.mjs → chunk-U4M32NFS.mjs} +1 -1
  74. package/dist/cli/{chunk-5WFQXAD4.mjs → chunk-UQYKSOGO.mjs} +5 -5
  75. package/dist/cli/{chunk-KILRUAXF.mjs → chunk-UXF3ODJJ.mjs} +2 -2
  76. package/dist/cli/{chunk-36LQQL5C.js → chunk-V2GN4PLK.js} +5 -5
  77. package/dist/cli/{chunk-HUIFUE4L.js → chunk-V65J64FL.js} +53 -53
  78. package/dist/cli/{chunk-U6DLLV3S.mjs → chunk-VYIAWAKJ.mjs} +1 -1
  79. package/dist/cli/{chunk-WGVJA4I5.js → chunk-WA3FG7DH.js} +14 -14
  80. package/dist/cli/{chunk-MHTRYBXY.mjs → chunk-WEYFSBAD.mjs} +44 -29
  81. package/dist/cli/{chunk-LZL6V5M5.mjs → chunk-WGRDOPAK.mjs} +2 -2
  82. package/dist/cli/{chunk-NTLBZUHD.js → chunk-XYIECA7M.js} +4 -2
  83. package/dist/cli/{chunk-QOO5W5XS.mjs → chunk-YC7FKAJ4.mjs} +12 -12
  84. package/dist/cli/{chunk-BN5VKY4X.js → chunk-ZS2WHWWL.js} +7 -7
  85. package/dist/cli/{chunk-F3WRLFFM.mjs → chunk-ZWFTHEPT.mjs} +2 -2
  86. package/dist/cli/command-docs.js +2 -2
  87. package/dist/cli/command-docs.mjs +1 -1
  88. package/dist/cli/{csv-UBACJK75.js → csv-5JHWVJ5N.js} +13 -13
  89. package/dist/cli/{csv-YFJ2JLUP.mjs → csv-OO554TPX.mjs} +4 -4
  90. package/dist/cli/{db-2ZPA2LZ7.js → db-CYQJ4OXF.js} +28 -28
  91. package/dist/cli/{db-NKGYTAQO.mjs → db-SQKJ6RKU.mjs} +7 -7
  92. package/dist/cli/describe-N7AKTUQV.mjs +50 -0
  93. package/dist/cli/describe-PASXOL3R.js +50 -0
  94. package/dist/cli/describe-core.d.mts +4 -2
  95. package/dist/cli/describe-core.d.ts +4 -2
  96. package/dist/cli/describe-core.js +5 -5
  97. package/dist/cli/describe-core.mjs +4 -4
  98. package/dist/cli/{executions-HTHQ7KKD.mjs → executions-F34DORW6.mjs} +7 -7
  99. package/dist/cli/{executions-NXMRGPIL.js → executions-K7EGCRKX.js} +9 -9
  100. package/dist/cli/{feedback-USP4T34P.mjs → feedback-GQHKCS66.mjs} +5 -5
  101. package/dist/cli/{feedback-TGVQACRO.js → feedback-NOQVCA3Q.js} +10 -10
  102. package/dist/cli/{git-KUONEHCD.mjs → git-2EEITXDB.mjs} +5 -5
  103. package/dist/cli/git-UU4YFJ2Q.js +25 -0
  104. package/dist/cli/index.js +146 -146
  105. package/dist/cli/index.mjs +45 -45
  106. package/dist/cli/{legacy-noops-B2GMHU42.mjs → legacy-noops-JHMY5XRB.mjs} +6 -6
  107. package/dist/cli/{legacy-noops-2JY3CQ24.js → legacy-noops-RFNHQ7RG.js} +9 -9
  108. package/dist/cli/{monitors-2OVBZJ6Z.mjs → monitors-RDMP6SPZ.mjs} +8 -8
  109. package/dist/cli/{monitors-XI6I52AX.js → monitors-UKRZ4BDK.js} +101 -101
  110. package/dist/cli/{org-5TUQ2H6Y.js → org-OX7TYTHV.js} +87 -87
  111. package/dist/cli/{org-BNJW764Y.mjs → org-RF3G4KMB.mjs} +7 -7
  112. package/dist/cli/{pages-QC3TQIPW.mjs → pages-FBM3MGSP.mjs} +7 -7
  113. package/dist/cli/{pages-UXCLX53Y.js → pages-MKQT5LFV.js} +19 -19
  114. package/dist/cli/{play-KRWMZ7FG.js → play-OOVX2DMV.js} +802 -713
  115. package/dist/cli/{play-45PPG5SZ.mjs → play-YWC2UORM.mjs} +197 -108
  116. package/dist/cli/{providers-RBUJ72Y3.js → providers-2CGZYLER.js} +10 -10
  117. package/dist/cli/{providers-JDT35MRL.mjs → providers-3PEQESIU.mjs} +7 -7
  118. package/dist/cli/{quickstart-JZ4Q3HFT.js → quickstart-6AANHKQZ.js} +6 -6
  119. package/dist/cli/{quickstart-GD2SWGAC.mjs → quickstart-KVB36SOW.mjs} +4 -4
  120. package/dist/cli/{run-JEAHA367.js → run-NJ7WV5TK.js} +46 -46
  121. package/dist/cli/{run-KIZ3HBI2.mjs → run-QC23NRKO.mjs} +27 -27
  122. package/dist/cli/{search-5UFNXHFK.mjs → search-7BMFFZI2.mjs} +9 -9
  123. package/dist/cli/search-NH4DTXUK.js +33 -0
  124. package/dist/cli/{search-output-HAXPKQO6.mjs → search-output-CALZ4ZI2.mjs} +4 -4
  125. package/dist/cli/{search-output-W3RDSVLE.js → search-output-XC2AVBFX.js} +6 -6
  126. package/dist/cli/{secrets-JAWT66B2.mjs → secrets-7ZHA57DI.mjs} +7 -7
  127. package/dist/cli/{secrets-PC7C2Q32.js → secrets-VHU4B2D4.js} +16 -16
  128. package/dist/cli/sessions-2TE5JWVP.js +18 -0
  129. package/dist/cli/{sessions-325V7G35.mjs → sessions-YYULWFZE.mjs} +6 -6
  130. package/dist/cli/{settings-FKHTA65P.mjs → settings-AVY4NNHI.mjs} +14 -14
  131. package/dist/cli/{settings-RGU6Y2QR.js → settings-WV77QJGD.js} +87 -87
  132. package/dist/cli/{setup-43GOYTFC.mjs → setup-AOUJ3RMU.mjs} +10 -10
  133. package/dist/cli/{setup-ZMZ7HU2I.js → setup-GE5TLTC4.js} +50 -50
  134. package/dist/cli/{skills-Q2VAHSXM.mjs → skills-FVWO2G66.mjs} +8 -8
  135. package/dist/cli/skills-OL7LD6QX.js +37 -0
  136. package/dist/cli/{tools-BUH7ZWDS.mjs → tools-URE655B4.mjs} +20 -20
  137. package/dist/cli/tools-VQ5JO6DI.js +57 -0
  138. package/dist/cli/{update-JFALWOHD.mjs → update-5B4G4345.mjs} +10 -10
  139. package/dist/cli/update-7ZOIOTZN.js +35 -0
  140. package/dist/cli/{artifacts-RBHR2DG4.mjs → views-GSECJ5IK.mjs} +77 -77
  141. package/dist/cli/views-IC762HEQ.js +270 -0
  142. package/dist/cli/{workflow-ISJKLY6X.mjs → workflow-6UQM565I.mjs} +8 -8
  143. package/dist/cli/{workflow-YELST32A.js → workflow-EME7ZEOV.js} +18 -18
  144. package/dist/{client-C2N7MofG.d.mts → client-Bd2meveV.d.mts} +1 -1
  145. package/dist/{client-C7lTRJjw.d.ts → client-CBCVhL8U.d.ts} +1 -1
  146. package/dist/{client-core-BTkDSKGn.d.mts → client-core-CGj8V9mw.d.mts} +110 -43
  147. package/dist/{client-core-hmhBi7Ib.d.ts → client-core-CsRRWCFy.d.ts} +110 -43
  148. package/dist/index.d.mts +3 -3
  149. package/dist/index.d.ts +3 -3
  150. package/dist/index.js +10 -10
  151. package/dist/index.mjs +7 -7
  152. package/dist/install-integrity.json +120 -118
  153. package/dist/plays/play-description.d.mts +1 -1
  154. package/dist/plays/play-description.d.ts +1 -1
  155. package/dist/plays/play-description.js +2 -2
  156. package/dist/plays/play-description.mjs +1 -1
  157. package/dist/plays/run-request.d.mts +1 -1
  158. package/dist/plays/run-request.d.ts +1 -1
  159. package/dist/release.d.mts +1 -1
  160. package/dist/release.d.ts +1 -1
  161. package/dist/release.js +2 -2
  162. package/dist/release.mjs +1 -1
  163. package/dist/server.d.mts +2 -2
  164. package/dist/server.d.ts +2 -2
  165. package/dist/server.js +6 -6
  166. package/dist/server.mjs +4 -4
  167. package/package.json +1 -1
  168. package/dist/cli/artifacts-RZTS2JHZ.js +0 -270
  169. package/dist/cli/auth-DPWYFQR5.js +0 -43
  170. package/dist/cli/describe-GX7DRKWZ.mjs +0 -50
  171. package/dist/cli/describe-WQZF7MEG.js +0 -50
  172. package/dist/cli/git-X3SCQREB.js +0 -25
  173. package/dist/cli/search-6JULJMD7.js +0 -33
  174. package/dist/cli/sessions-WFUCOJHZ.js +0 -18
  175. package/dist/cli/skills-3XTQ6FFM.js +0 -37
  176. package/dist/cli/tools-UK2R4YXQ.js +0 -57
  177. package/dist/cli/update-LNKPHS54.js +0 -35
@@ -639,6 +639,11 @@ export type RunsGetOptions = {
639
639
  configuration?: boolean;
640
640
  /** Include terminal runtime diagnostics (`run.performance`) without full results. */
641
641
  performance?: boolean;
642
+ /**
643
+ * Include `run.retries`: fixed-size attempt, sandbox, platform-recovery and
644
+ * resume counts. Costs one extra scheduler read, so polls should omit it.
645
+ */
646
+ retries?: boolean;
642
647
  /** Attach a bounded end-of-stream window for a failed run. */
643
648
  failedLogs?: boolean;
644
649
  /** Requested failed-log lines to attach (default 20, hard-capped at 20). */
@@ -3019,21 +3024,21 @@ export type HostedPageLink = {
3019
3024
  created_at: number;
3020
3025
  };
3021
3026
 
3022
- export type ArtifactAccess = 'workspace' | 'public';
3027
+ export type ViewAccess = 'workspace' | 'public';
3023
3028
 
3024
- export type Artifact = {
3029
+ export type View = {
3025
3030
  id: string;
3026
3031
  name: string;
3027
3032
  description: string | null;
3028
3033
  url: string;
3029
3034
  play: string;
3030
3035
  input: Record<string, unknown>;
3031
- access: ArtifactAccess;
3036
+ access: ViewAccess;
3032
3037
  created_at: number;
3033
3038
  updated_at: number;
3034
3039
  };
3035
3040
 
3036
- export type ArtifactAbilities = {
3041
+ export type ViewAbilities = {
3037
3042
  create: boolean;
3038
3043
  edit: boolean;
3039
3044
  delete: boolean;
@@ -3042,24 +3047,24 @@ export type ArtifactAbilities = {
3042
3047
  admin: boolean;
3043
3048
  };
3044
3049
 
3045
- export type ArtifactDetail = Artifact & {
3046
- can: ArtifactAbilities | null;
3050
+ export type ViewDetail = View & {
3051
+ can: ViewAbilities | null;
3047
3052
  };
3048
3053
 
3049
- export type ArtifactRunSummary = {
3054
+ export type ViewRunSummary = {
3050
3055
  run_id: string;
3051
3056
  status: string;
3052
3057
  created_at: number;
3053
3058
  finished_at: number | null;
3054
3059
  };
3055
3060
 
3056
- export type ArtifactPermissionLevel = 'members' | 'admins';
3057
- export type ArtifactPermissionRules = {
3058
- create: ArtifactPermissionLevel;
3059
- edit: ArtifactPermissionLevel;
3060
- delete: ArtifactPermissionLevel;
3061
- setAccess: ArtifactPermissionLevel;
3062
- refresh: ArtifactPermissionLevel;
3061
+ export type ViewPermissionLevel = 'members' | 'admins';
3062
+ export type ViewPermissionRules = {
3063
+ create: ViewPermissionLevel;
3064
+ edit: ViewPermissionLevel;
3065
+ delete: ViewPermissionLevel;
3066
+ setAccess: ViewPermissionLevel;
3067
+ refresh: ViewPermissionLevel;
3063
3068
  };
3064
3069
 
3065
3070
  /**
@@ -3490,40 +3495,40 @@ export class DeeplineClient {
3490
3495
  }
3491
3496
 
3492
3497
  // ——————————————————————————————————————————————————————————
3493
- // Artifacts
3498
+ // Views
3494
3499
  // ——————————————————————————————————————————————————————————
3495
3500
 
3496
- /** List this workspace's artifacts, most recently changed first. */
3497
- async listArtifacts(input?: {
3501
+ /** List this workspace's views, most recently changed first. */
3502
+ async listViews(input?: {
3498
3503
  cursor?: string;
3499
3504
  limit?: number;
3500
- }): Promise<{ artifacts: Artifact[]; next_cursor: string | null }> {
3505
+ }): Promise<{ views: View[]; next_cursor: string | null }> {
3501
3506
  const params = new URLSearchParams();
3502
3507
  if (input?.cursor) params.set('cursor', input.cursor);
3503
3508
  if (input?.limit) params.set('limit', String(input.limit));
3504
3509
  const query = params.size > 0 ? `?${params}` : '';
3505
- return await this.http.get(`/api/v2/artifacts${query}`);
3510
+ return await this.http.get(`/api/v2/views${query}`);
3506
3511
  }
3507
3512
 
3508
- /** One artifact and what the caller may do with it. */
3509
- async getArtifact(id: string): Promise<ArtifactDetail> {
3510
- return await this.http.get<ArtifactDetail>(
3511
- `/api/v2/artifacts/${encodeURIComponent(id)}`,
3513
+ /** One view and what the caller may do with it. */
3514
+ async getView(id: string): Promise<ViewDetail> {
3515
+ return await this.http.get<ViewDetail>(
3516
+ `/api/v2/views/${encodeURIComponent(id)}`,
3512
3517
  );
3513
3518
  }
3514
3519
 
3515
- /** Create an artifact that shows a Play's runs at a fixed URL. */
3516
- async createArtifact(input: {
3520
+ /** Create a view that shows a Play's runs at a fixed URL. */
3521
+ async createView(input: {
3517
3522
  name: string;
3518
3523
  play: string;
3519
3524
  input?: Record<string, unknown>;
3520
3525
  description?: string;
3521
- }): Promise<Artifact> {
3522
- return await this.http.post<Artifact>('/api/v2/artifacts', input);
3526
+ }): Promise<View> {
3527
+ return await this.http.post<View>('/api/v2/views', input);
3523
3528
  }
3524
3529
 
3525
3530
  /** Change the name, description, Play, or saved input. */
3526
- async updateArtifact(
3531
+ async updateView(
3527
3532
  id: string,
3528
3533
  input: {
3529
3534
  name?: string;
@@ -3531,78 +3536,78 @@ export class DeeplineClient {
3531
3536
  play?: string;
3532
3537
  input?: Record<string, unknown>;
3533
3538
  },
3534
- ): Promise<Artifact> {
3535
- return await this.http.patch<Artifact>(
3536
- `/api/v2/artifacts/${encodeURIComponent(id)}`,
3539
+ ): Promise<View> {
3540
+ return await this.http.patch<View>(
3541
+ `/api/v2/views/${encodeURIComponent(id)}`,
3537
3542
  input,
3538
3543
  );
3539
3544
  }
3540
3545
 
3541
- /** Who can open an artifact: workspace members, or anyone with its URL. */
3542
- async setArtifactAccess(
3546
+ /** Who can open a view: workspace members, or anyone with its URL. */
3547
+ async setViewAccess(
3543
3548
  id: string,
3544
- access: ArtifactAccess,
3545
- ): Promise<Artifact> {
3546
- return await this.http.post<Artifact>(
3547
- `/api/v2/artifacts/${encodeURIComponent(id)}/access`,
3549
+ access: ViewAccess,
3550
+ ): Promise<View> {
3551
+ return await this.http.post<View>(
3552
+ `/api/v2/views/${encodeURIComponent(id)}/access`,
3548
3553
  { access },
3549
3554
  );
3550
3555
  }
3551
3556
 
3552
- /** Every run of the artifact's Play, newest first. */
3553
- async listArtifactRuns(
3557
+ /** Every run of the view's Play, newest first. */
3558
+ async listViewRuns(
3554
3559
  id: string,
3555
3560
  input?: { limit?: number; offset?: number },
3556
- ): Promise<{ runs: ArtifactRunSummary[]; total: number }> {
3561
+ ): Promise<{ runs: ViewRunSummary[]; total: number }> {
3557
3562
  const params = new URLSearchParams();
3558
3563
  if (input?.limit) params.set('limit', String(input.limit));
3559
3564
  if (input?.offset) params.set('offset', String(input.offset));
3560
3565
  const query = params.size > 0 ? `?${params}` : '';
3561
3566
  return await this.http.get(
3562
- `/api/v2/artifacts/${encodeURIComponent(id)}/runs${query}`,
3567
+ `/api/v2/views/${encodeURIComponent(id)}/runs${query}`,
3563
3568
  );
3564
3569
  }
3565
3570
 
3566
3571
  /**
3567
- * Refresh an artifact: run its Play with its saved input (or `input`). The run
3568
- * goes through the normal run API; the artifact shows it when it finishes.
3572
+ * Refresh a view: run its Play with its saved input (or `input`). The run
3573
+ * goes through the normal run API; the view shows it when it finishes.
3569
3574
  */
3570
- async refreshArtifact(
3575
+ async refreshView(
3571
3576
  id: string,
3572
3577
  input?: Record<string, unknown>,
3573
- ): Promise<PlayRunStart & { artifact: string }> {
3578
+ ): Promise<PlayRunStart & { view: string }> {
3574
3579
  const intent = await this.http.post<{
3575
3580
  id: string;
3576
3581
  play: string;
3577
3582
  input: Record<string, unknown>;
3578
- }>(`/api/v2/artifacts/${encodeURIComponent(id)}/refresh`, {});
3583
+ }>(`/api/v2/views/${encodeURIComponent(id)}/refresh`, {});
3579
3584
  const started = await this.startPlayRun({
3580
3585
  name: intent.play,
3581
3586
  input: input ?? intent.input,
3582
3587
  });
3583
- return { ...started, artifact: intent.id };
3588
+ return { ...started, view: intent.id };
3584
3589
  }
3585
3590
 
3586
- /** Delete an artifact. Its Play and runs are not touched. */
3587
- async deleteArtifact(id: string): Promise<{ id: string; deleted: boolean }> {
3591
+ /** Delete a view. Its Play and runs are not touched. */
3592
+ async deleteView(id: string): Promise<{ id: string; deleted: boolean }> {
3588
3593
  return await this.http.delete(
3589
- `/api/v2/artifacts/${encodeURIComponent(id)}`,
3594
+ `/api/v2/views/${encodeURIComponent(id)}`,
3590
3595
  );
3591
3596
  }
3592
3597
 
3593
- /** The workspace artifact rules and what the caller may do. */
3594
- async getArtifactPermissions(): Promise<{
3595
- rules: ArtifactPermissionRules;
3596
- can: ArtifactAbilities | null;
3598
+ /** The workspace view rules and what the caller may do. */
3599
+ async getViewPermissions(): Promise<{
3600
+ rules: ViewPermissionRules;
3601
+ can: ViewAbilities | null;
3597
3602
  }> {
3598
- return await this.http.get('/api/v2/artifacts/permissions');
3603
+ return await this.http.get('/api/v2/views/permissions');
3599
3604
  }
3600
3605
 
3601
- /** Change artifact rules. Admins only; omitted verbs keep their rule. */
3602
- async setArtifactPermissions(
3603
- rules: Partial<ArtifactPermissionRules>,
3604
- ): Promise<{ rules: ArtifactPermissionRules }> {
3605
- return await this.http.put('/api/v2/artifacts/permissions', { rules });
3606
+ /** Change view rules. Admins only; omitted verbs keep their rule. */
3607
+ async setViewPermissions(
3608
+ rules: Partial<ViewPermissionRules>,
3609
+ ): Promise<{ rules: ViewPermissionRules }> {
3610
+ return await this.http.put('/api/v2/views/permissions', { rules });
3606
3611
  }
3607
3612
 
3608
3613
  /** List secret metadata visible to the current workspace. */
@@ -5050,6 +5055,9 @@ export class DeeplineClient {
5050
5055
  if (options?.performance === true) {
5051
5056
  params.append('include', 'performance');
5052
5057
  }
5058
+ if (options?.retries === true) {
5059
+ params.append('include', 'retries');
5060
+ }
5053
5061
  const query = params.size > 0 ? `?${params.toString()}` : '';
5054
5062
  const response = await this.http.get<Record<string, unknown>>(
5055
5063
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
@@ -66,6 +66,18 @@ const REQUEST_TIMEOUT_MARKER = Symbol('deeplineRequestTimeout');
66
66
  const REQUEST_ABORT_MARKER = Symbol('deeplineRequestAbort');
67
67
  const MAX_AUTOMATIC_RETRY_WAIT_MS = 30_000;
68
68
 
69
+ function deploymentProtectionRedirect(
70
+ headers: Record<string, string>,
71
+ ): RequestRedirect | undefined {
72
+ // Fetch strips Authorization on cross-origin redirects, but keeps this
73
+ // custom credential. Stop at the first redirect when it is present.
74
+ return Object.keys(headers).some(
75
+ (name) => name.toLowerCase() === 'x-vercel-protection-bypass',
76
+ )
77
+ ? 'manual'
78
+ : undefined;
79
+ }
80
+
69
81
  interface RequestOptions {
70
82
  method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
71
83
  body?: unknown;
@@ -605,6 +617,7 @@ export class HttpClient {
605
617
  headers,
606
618
  body: requestBody,
607
619
  signal: controller.signal,
620
+ redirect: deploymentProtectionRedirect(headers),
608
621
  });
609
622
 
610
623
  networkPhase = 'reading_body';
@@ -946,6 +959,7 @@ export class HttpClient {
946
959
  ? JSON.stringify(options.body)
947
960
  : undefined,
948
961
  signal: options?.signal,
962
+ redirect: deploymentProtectionRedirect(headers),
949
963
  });
950
964
  options?.onResponse?.(response);
951
965
 
@@ -154,6 +154,7 @@ export function describePlayDetail(
154
154
  const play = detail.play;
155
155
  return {
156
156
  ...describePlayListItem(play, options),
157
+ ...(play.ownerType === 'org' && play._id ? { playId: play._id } : {}),
157
158
  currentPublishedVersion:
158
159
  play.currentPublishedVersion ?? play.liveRevision?.version ?? null,
159
160
  latestRunId: play.latestRunId ?? detail.latestRuns[0]?.workflowId ?? null,
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
205
205
  // getters keep their established compatibility behavior.
206
206
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
207
207
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
208
- version: '0.3.523',
208
+ version: '0.3.525',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -11,6 +11,7 @@ export type {
11
11
  import type { PlayCompilerManifest } from '../../shared_libs/plays/compiler-manifest';
12
12
  import type { RunGetStatus, RunLifecycleStatus } from './client';
13
13
  import type { PlayGrepMatch } from '../../shared_libs/plays/play-grep-search';
14
+ import type { RunRetrySummary } from '../../shared_libs/play-runtime/run-retry-summary';
14
15
  import type { PlayRunRuntimeSelection } from '../../shared_libs/play-runtime/runtime-environment';
15
16
  import type {
16
17
  PlayActivityObservation,
@@ -934,6 +935,13 @@ export interface PlayRunPackage {
934
935
  */
935
936
  performance?: TerminalRuntimePerformance;
936
937
  performanceUnavailableReason?: TerminalRuntimePerformanceUnavailableReason;
938
+ /**
939
+ * Fixed-size failure-driven retry counts for the current resume epoch, on
940
+ * `include=retries` (`runs get` asks for it). Durable waits are not
941
+ * counted. Absent on older servers.
942
+ */
943
+ retries?: RunRetrySummary;
944
+ retriesUnavailableReason?: 'not_recorded' | 'invalid_facts' | 'read_failed';
937
945
  /** Canonical explanation of what this run is doing or waiting on. */
938
946
  activity?: PlayRunActivityProjection | null;
939
947
  };
@@ -1818,6 +1826,8 @@ export interface ProductNotificationConfigurationResponse {
1818
1826
 
1819
1827
  export interface PlayDescription {
1820
1828
  name: string;
1829
+ /** Stable workspace-owned Play definition ID. */
1830
+ playId?: string;
1821
1831
  /** Stable registry key. Same value `plays list` reports for this play. */
1822
1832
  playKey?: string;
1823
1833
  reference?: string;
@@ -103,13 +103,16 @@ function errorMessage(error: unknown): string {
103
103
  // The transient side reuses the SAME classification the rest of the ingestion
104
104
  // stack already treats as repairable (permission-denied / role drift / conn
105
105
  // resets), so the worker never disagrees with the route on "transient".
106
+ function inboundFailureCode(error: unknown): string {
107
+ return error && typeof error === 'object'
108
+ ? String((error as { code?: unknown }).code ?? '')
109
+ : '';
110
+ }
111
+
106
112
  export function classifyInboundFailure(error: unknown): InboundFailureClass {
107
113
  if (isRepairableTenantDataPlaneError(error)) return 'transient';
108
114
 
109
- const code =
110
- error && typeof error === 'object'
111
- ? String((error as { code?: unknown }).code ?? '')
112
- : '';
115
+ const code = inboundFailureCode(error);
113
116
  const transientCodes = new Set([
114
117
  'tenant_data_plane_repair_required',
115
118
  // An admission-backed callback whose Convex binding has not landed yet.
@@ -284,9 +287,7 @@ export async function recordSignalRadarDeadLetter(input: {
284
287
  FOR UPDATE`,
285
288
  [message.deadLetterId],
286
289
  );
287
- const existing = (prior.rows ?? [])[0] as
288
- | { status?: unknown }
289
- | undefined;
290
+ const existing = (prior.rows ?? [])[0] as { status?: unknown } | undefined;
290
291
  if (existing) {
291
292
  const nextStatus = transitionSignalRadarInboundDeadLetterStatus(
292
293
  existing.status,
@@ -400,20 +401,65 @@ export function inboundBackoffSeconds(deliveryCount: number): number {
400
401
  return Math.min(300, 2 ** exponent * 5);
401
402
  }
402
403
 
404
+ /**
405
+ * How long a callback whose monitor binding cannot be proven keeps retrying
406
+ * (KAR-189). A binding that is only syncing lands within minutes: the 2026-11-10
407
+ * bulk burst resolved in at most three attempts. One that never lands used to
408
+ * retry until the queue dropped the message after seven days, payload and all.
409
+ * Past this age it dead-letters instead, payload kept and redrivable, well
410
+ * inside the queue's retention.
411
+ */
412
+ export const PROVIDER_MONITOR_CONTROL_STATE_PENDING_RETRY_WINDOW_MS =
413
+ 24 * 60 * 60 * 1000;
414
+
415
+ /**
416
+ * The one terminal rule for both inbound delivery paths, the queue handler and
417
+ * the receipt dispatcher. A permanent failure dead-letters once its delivery
418
+ * budget is spent. A transient one keeps retrying, except a pending monitor
419
+ * binding, which also dead-letters once it is older than its retry window.
420
+ */
421
+ export function inboundFailureNeedsDeadLetter(input: {
422
+ error: unknown;
423
+ deliveryCount: number;
424
+ maxDeliveries: number;
425
+ receivedAt: string;
426
+ now: number;
427
+ }): boolean {
428
+ if (input.deliveryCount <= input.maxDeliveries) return false;
429
+ if (classifyInboundFailure(input.error) === 'permanent') return true;
430
+ if (
431
+ inboundFailureCode(input.error) !==
432
+ PROVIDER_MONITOR_CONTROL_STATE_PENDING_CODE
433
+ ) {
434
+ return false;
435
+ }
436
+ const receivedAt = Date.parse(input.receivedAt);
437
+ // An unreadable receipt time cannot prove the callback is still young. The
438
+ // dead letter keeps its payload, so ending the retries loses nothing.
439
+ return (
440
+ !Number.isFinite(receivedAt) ||
441
+ input.now - receivedAt >=
442
+ PROVIDER_MONITOR_CONTROL_STATE_PENDING_RETRY_WINDOW_MS
443
+ );
444
+ }
445
+
403
446
  export async function resolveInboundRetryDecision(input: {
404
447
  client: InboundPgClient;
405
448
  message: DeadLetterMessageInput;
406
449
  error: unknown;
407
450
  deliveryCount: number;
408
451
  maxDeliveries: number;
452
+ now?: number;
409
453
  }): Promise<InboundRetryDecision> {
410
- const failureClass = classifyInboundFailure(input.error);
411
-
412
- if (failureClass === 'transient') {
413
- return { afterSeconds: inboundBackoffSeconds(input.deliveryCount) };
414
- }
415
-
416
- if (input.deliveryCount <= input.maxDeliveries) {
454
+ if (
455
+ !inboundFailureNeedsDeadLetter({
456
+ error: input.error,
457
+ deliveryCount: input.deliveryCount,
458
+ maxDeliveries: input.maxDeliveries,
459
+ receivedAt: input.message.receivedAt,
460
+ now: input.now ?? Date.now(),
461
+ })
462
+ ) {
417
463
  return { afterSeconds: inboundBackoffSeconds(input.deliveryCount) };
418
464
  }
419
465
 
@@ -1,6 +1,6 @@
1
1
  import {
2
- classifyInboundFailure,
3
2
  inboundBackoffSeconds,
3
+ inboundFailureNeedsDeadLetter,
4
4
  } from '@deepline/monitors/signal-radars/inbound-dead-letter';
5
5
  import type { SignalRadarInboundMessage } from '@deepline/monitors/signal-radars/inbound-message';
6
6
 
@@ -27,13 +27,19 @@ export async function handleSignalRadarInboundDelivery(input: {
27
27
  error: unknown;
28
28
  deliveryCount: number;
29
29
  }) => Promise<void>;
30
+ now?: () => number;
30
31
  }) {
31
32
  try {
32
33
  await input.runWorker(input.message, input.metadata);
33
34
  } catch (error) {
34
35
  if (
35
- classifyInboundFailure(error) === 'permanent' &&
36
- input.metadata.deliveryCount > input.maxDeliveries
36
+ inboundFailureNeedsDeadLetter({
37
+ error,
38
+ deliveryCount: input.metadata.deliveryCount,
39
+ maxDeliveries: input.maxDeliveries,
40
+ receivedAt: input.message.receivedAt,
41
+ now: (input.now ?? Date.now)(),
42
+ })
37
43
  ) {
38
44
  try {
39
45
  await input.recordDeadLetter({
@@ -1425,6 +1425,25 @@ const DLQ_PATH_METADATA: Readonly<Record<string, DlqPathMetadata>> = {
1425
1425
  },
1426
1426
  ],
1427
1427
  },
1428
+ 'mcp-event-deliveries': {
1429
+ lookupIndex: {
1430
+ table: 'mcpEventDeliveries',
1431
+ index: 'by_state_next_attempt',
1432
+ key: 'state + nextAttemptAt',
1433
+ bounded: true,
1434
+ },
1435
+ transitions: [
1436
+ {
1437
+ action: 'retry',
1438
+ fromStates: ['dead_lettered'],
1439
+ toState: 'pending',
1440
+ enabled: false,
1441
+ requiresApproval: true,
1442
+ reason:
1443
+ 'Manual replay is unavailable because it must revalidate the grant and preserve the webhook event ID.',
1444
+ },
1445
+ ],
1446
+ },
1428
1447
  'notification-deliveries': {
1429
1448
  lookupIndex: {
1430
1449
  table: 'productNotificationDeliveries',
@@ -298,6 +298,15 @@ export const OPERATIONS_QUEUE_CATALOG = [
298
298
  600_000,
299
299
  3_600_000,
300
300
  ),
301
+ queue(
302
+ 'mcp-event-deliveries',
303
+ 'MCP event deliveries',
304
+ 'leased_workset',
305
+ 'mcp',
306
+ 'Deliver authorized Play events to verified callbacks',
307
+ 120_000,
308
+ 300_000,
309
+ ),
301
310
  queue(
302
311
  'notification-deliveries',
303
312
  'Notification deliveries',
@@ -287,6 +287,7 @@ export const QUEUE_CONNECTOR_BACKENDS: Readonly<
287
287
  'stripe-financial-inbox': 'provider',
288
288
  'async-usage-recovery': 'postgres-outbox',
289
289
  'notification-deliveries': 'workpool',
290
+ 'mcp-event-deliveries': 'convex',
290
291
  'inbound-demo-form-submissions': 'convex',
291
292
  'inbound-demo-sales': 'convex',
292
293
  'usage-rollup-fold': 'postgres-outbox',
@@ -1245,7 +1245,7 @@
1245
1245
  "owner": "billing",
1246
1246
  "criticality": "operational",
1247
1247
  "purpose": "Request workspace drains for indexed pending usage from closed UTC days, including late arrivals.",
1248
- "successDefinition": "Discovery reaches the end of the indexed pending workspaces and issues closed-day wake requests. Each invocation inspects at most 1,000 workspaces.",
1248
+ "successDefinition": "Discovery reaches the end of the indexed pending workspaces and issues closed-day wake requests. Each invocation inspects at most 200 workspaces.",
1249
1249
  "failureDefinition": "Discovery or wake dispatch fails, or the bounded pass stops before reaching the end. The next invocation resumes from its saved workspace cursor.",
1250
1250
  "startGraceMs": 120000,
1251
1251
  "runTimeoutMs": 420000,