deepline 0.3.521 → 0.3.523

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 (170) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +118 -0
  2. package/dist/bundling-sources/sdk/src/index.ts +3 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +47 -18
  5. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/db-session-renewal.ts +209 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +24 -7
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +5 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +1 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +38 -5
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +92 -10
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +96 -25
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +29 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +139 -17
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +26 -3
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +145 -5
  17. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +190 -10
  18. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +85 -5
  19. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +21 -11
  20. package/dist/cli/{artifacts-TYPU37IU.mjs → artifacts-RBHR2DG4.mjs} +6 -6
  21. package/dist/cli/{artifacts-JGH464N2.js → artifacts-RZTS2JHZ.js} +18 -18
  22. package/dist/cli/auth-DPWYFQR5.js +43 -0
  23. package/dist/cli/{auth-XPQT6NUB.mjs → auth-ENQUQS56.mjs} +5 -5
  24. package/dist/cli/{billing-47AMHOMP.mjs → billing-6A27ULCX.mjs} +7 -7
  25. package/dist/cli/{billing-6D4KXBFJ.js → billing-6HONTJOY.js} +82 -82
  26. package/dist/cli/{chunk-DY6634MN.js → chunk-2BRDHM4S.js} +9 -9
  27. package/dist/cli/{chunk-LGU2NIOT.js → chunk-326WVSWS.js} +108 -96
  28. package/dist/cli/{chunk-UAZKOH3J.js → chunk-36LQQL5C.js} +5 -5
  29. package/dist/cli/{chunk-VYY5V4M5.js → chunk-4NWY7JBB.js} +11 -11
  30. package/dist/cli/{chunk-2DQPB5HT.mjs → chunk-4V63IJCL.mjs} +5 -5
  31. package/dist/cli/{chunk-4MONKWYE.mjs → chunk-5WFQXAD4.mjs} +5 -5
  32. package/dist/cli/{chunk-A6USUS4L.mjs → chunk-6DBRBWHC.mjs} +2 -2
  33. package/dist/cli/{chunk-4I7I5CGB.mjs → chunk-6OZ2WSHD.mjs} +1 -1
  34. package/dist/cli/{chunk-MD43YAL6.js → chunk-7GNKAACY.js} +6 -6
  35. package/dist/cli/{chunk-7IYDCHTG.mjs → chunk-7M5FRSFP.mjs} +2 -2
  36. package/dist/cli/{chunk-HHBJJYKL.mjs → chunk-DNXP3D5H.mjs} +5 -5
  37. package/dist/cli/{chunk-4DB6JV7X.mjs → chunk-F3WRLFFM.mjs} +2 -2
  38. package/dist/cli/{chunk-AMVKLEPH.js → chunk-FBMOBNJY.js} +2 -2
  39. package/dist/cli/{chunk-EZNZDOAG.mjs → chunk-H7275EZU.mjs} +5 -5
  40. package/dist/cli/{chunk-CBBCUYIN.mjs → chunk-HSVGP4CI.mjs} +2 -2
  41. package/dist/cli/{chunk-FTZX4QZN.js → chunk-HUC5SGJQ.js} +2 -2
  42. package/dist/cli/{chunk-4MN65FRF.js → chunk-HUIFUE4L.js} +53 -53
  43. package/dist/cli/{chunk-5T7QKHQL.mjs → chunk-I62LJ7NU.mjs} +1 -1
  44. package/dist/cli/{chunk-EW3EAEWZ.js → chunk-IEVXYHGJ.js} +5 -5
  45. package/dist/cli/{chunk-E4ZS2B2J.mjs → chunk-JCTTXLAZ.mjs} +1 -1
  46. package/dist/cli/{chunk-LNBMEFOI.mjs → chunk-JGZQBDYG.mjs} +4 -4
  47. package/dist/cli/{chunk-GNYSODBR.js → chunk-JMMNCJ7Z.js} +1 -1
  48. package/dist/cli/{chunk-7AUXX6M5.mjs → chunk-JVEFMOY2.mjs} +1 -1
  49. package/dist/cli/{chunk-3Q7HEEH2.js → chunk-K326BEVR.js} +10 -10
  50. package/dist/cli/{chunk-TBIWR7M2.mjs → chunk-KILRUAXF.mjs} +1 -1
  51. package/dist/cli/{chunk-6UHYXNCP.mjs → chunk-LZL6V5M5.mjs} +2 -2
  52. package/dist/cli/{chunk-EILHJRPW.js → chunk-MCXPJYBN.js} +3 -3
  53. package/dist/cli/{chunk-VE6FHVXZ.mjs → chunk-MHTRYBXY.mjs} +78 -1
  54. package/dist/cli/{chunk-VSH3AE5E.js → chunk-MT3WG3KR.js} +16 -16
  55. package/dist/cli/{chunk-PUKWFJXW.js → chunk-MZROKQV3.js} +44 -44
  56. package/dist/cli/{chunk-QGTWGHYD.js → chunk-N5MLEXZ7.js} +50 -8
  57. package/dist/cli/{chunk-ZO2XJVFH.mjs → chunk-NWTMQGPP.mjs} +6 -6
  58. package/dist/cli/{chunk-6V2RI3AL.mjs → chunk-PCORO245.mjs} +2 -2
  59. package/dist/cli/{chunk-MRU4N33M.js → chunk-PESMXAUG.js} +6 -6
  60. package/dist/cli/{chunk-4GGXAYKI.mjs → chunk-QMBL5ZIQ.mjs} +3 -3
  61. package/dist/cli/{chunk-A2B5AAU3.mjs → chunk-QOO5W5XS.mjs} +22 -10
  62. package/dist/cli/{chunk-HRWVEIAX.mjs → chunk-QSAC3IVI.mjs} +1 -1
  63. package/dist/cli/{chunk-HYR34KFA.js → chunk-QYXIODWH.js} +78 -1
  64. package/dist/cli/{chunk-Y7IR4LBU.mjs → chunk-RKREB7MU.mjs} +3 -3
  65. package/dist/cli/{chunk-JFQJNYTB.js → chunk-RQN4PHRE.js} +16 -16
  66. package/dist/cli/{chunk-6DCBTJZP.js → chunk-S4YKRH3W.js} +3 -3
  67. package/dist/cli/{chunk-ULW2KBKL.js → chunk-SBGKKOCC.js} +26 -26
  68. package/dist/cli/{chunk-DQURY3WH.mjs → chunk-SXTVJIGB.mjs} +1 -1
  69. package/dist/cli/{chunk-7LRALARF.mjs → chunk-U6DLLV3S.mjs} +1 -1
  70. package/dist/cli/{chunk-NNDAVVBG.mjs → chunk-UH3EAFFN.mjs} +2 -2
  71. package/dist/cli/{chunk-HSFLMTED.js → chunk-UQN4VTZL.js} +4 -4
  72. package/dist/cli/{chunk-HD3KYCDC.js → chunk-V46J3UTM.js} +7 -7
  73. package/dist/cli/{chunk-WL6WPW6X.js → chunk-WGVJA4I5.js} +14 -14
  74. package/dist/cli/{chunk-FQJFONFT.mjs → chunk-WVQOXYTQ.mjs} +44 -2
  75. package/dist/cli/{chunk-Y23TOHNV.js → chunk-XVXEARHC.js} +41 -41
  76. package/dist/cli/{chunk-6N72GHAV.js → chunk-XYL26236.js} +2 -2
  77. package/dist/cli/{chunk-YROP3H6T.js → chunk-ZWN4RXC2.js} +22 -22
  78. package/dist/cli/command-docs.js +2 -2
  79. package/dist/cli/command-docs.mjs +1 -1
  80. package/dist/cli/{csv-5TM2OSYP.js → csv-UBACJK75.js} +13 -13
  81. package/dist/cli/{csv-PM3WDXDF.mjs → csv-YFJ2JLUP.mjs} +4 -4
  82. package/dist/cli/{db-3LJ32FZM.js → db-2ZPA2LZ7.js} +27 -27
  83. package/dist/cli/{db-5P72NPRL.mjs → db-NKGYTAQO.mjs} +6 -6
  84. package/dist/cli/{describe-ZLCMBGHG.mjs → describe-GX7DRKWZ.mjs} +18 -18
  85. package/dist/cli/describe-WQZF7MEG.js +50 -0
  86. package/dist/cli/describe-core.d.mts +3 -3
  87. package/dist/cli/describe-core.d.ts +3 -3
  88. package/dist/cli/{executions-JMFL6AV7.mjs → executions-HTHQ7KKD.mjs} +6 -6
  89. package/dist/cli/{executions-4AJ5TQVY.js → executions-NXMRGPIL.js} +8 -8
  90. package/dist/cli/{feedback-I2BLXMGH.js → feedback-TGVQACRO.js} +10 -10
  91. package/dist/cli/{feedback-DKMG2QB7.mjs → feedback-USP4T34P.mjs} +5 -5
  92. package/dist/cli/{git-ARG223MY.mjs → git-KUONEHCD.mjs} +5 -5
  93. package/dist/cli/git-X3SCQREB.js +25 -0
  94. package/dist/cli/index.js +145 -145
  95. package/dist/cli/index.mjs +44 -44
  96. package/dist/cli/{legacy-noops-N7SVA7PL.js → legacy-noops-2JY3CQ24.js} +9 -9
  97. package/dist/cli/{legacy-noops-24LOAOZN.mjs → legacy-noops-B2GMHU42.mjs} +6 -6
  98. package/dist/cli/{monitors-RYQFWM2T.mjs → monitors-2OVBZJ6Z.mjs} +7 -7
  99. package/dist/cli/{monitors-XNCYLOJM.js → monitors-XI6I52AX.js} +100 -100
  100. package/dist/cli/{org-I33TKZXF.js → org-5TUQ2H6Y.js} +235 -72
  101. package/dist/cli/{org-ORIH56E5.mjs → org-BNJW764Y.mjs} +169 -6
  102. package/dist/cli/{pages-ME43HSBL.mjs → pages-QC3TQIPW.mjs} +6 -6
  103. package/dist/cli/{pages-2UXXGIMF.js → pages-UXCLX53Y.js} +18 -18
  104. package/dist/cli/{play-XEKNY46M.mjs → play-45PPG5SZ.mjs} +18 -18
  105. package/dist/cli/{play-F4QOFU37.js → play-KRWMZ7FG.js} +317 -317
  106. package/dist/cli/{providers-XKU44G74.mjs → providers-JDT35MRL.mjs} +6 -6
  107. package/dist/cli/{providers-E7DPCBNX.js → providers-RBUJ72Y3.js} +9 -9
  108. package/dist/cli/{quickstart-J7NVEXV5.mjs → quickstart-GD2SWGAC.mjs} +4 -4
  109. package/dist/cli/{quickstart-ICLF2F6A.js → quickstart-JZ4Q3HFT.js} +6 -6
  110. package/dist/cli/{run-HJMHUQBN.js → run-JEAHA367.js} +41 -41
  111. package/dist/cli/{run-MQ5ZONGL.mjs → run-KIZ3HBI2.mjs} +23 -23
  112. package/dist/cli/{search-GGRC77CV.mjs → search-5UFNXHFK.mjs} +8 -8
  113. package/dist/cli/search-6JULJMD7.js +33 -0
  114. package/dist/cli/{search-output-NY4GDBRU.mjs → search-output-HAXPKQO6.mjs} +4 -4
  115. package/dist/cli/{search-output-MXZTZI2P.js → search-output-W3RDSVLE.js} +6 -6
  116. package/dist/cli/{secrets-FA37G4Q2.mjs → secrets-JAWT66B2.mjs} +6 -6
  117. package/dist/cli/{secrets-PFESG72B.js → secrets-PC7C2Q32.js} +15 -15
  118. package/dist/cli/{sessions-BLLXPETU.mjs → sessions-325V7G35.mjs} +6 -6
  119. package/dist/cli/sessions-WFUCOJHZ.js +18 -0
  120. package/dist/cli/{settings-U26S7MPH.mjs → settings-FKHTA65P.mjs} +13 -13
  121. package/dist/cli/{settings-32VPG4Z2.js → settings-RGU6Y2QR.js} +86 -86
  122. package/dist/cli/{setup-4AXBCX7C.mjs → setup-43GOYTFC.mjs} +10 -10
  123. package/dist/cli/{setup-R6NSENH7.js → setup-ZMZ7HU2I.js} +50 -50
  124. package/dist/cli/skills-3XTQ6FFM.js +37 -0
  125. package/dist/cli/{skills-JUH7AVUL.mjs → skills-Q2VAHSXM.mjs} +8 -8
  126. package/dist/cli/{tools-FOYLU3FH.mjs → tools-BUH7ZWDS.mjs} +17 -17
  127. package/dist/cli/tools-UK2R4YXQ.js +57 -0
  128. package/dist/cli/{update-FUVX22VM.mjs → update-JFALWOHD.mjs} +10 -10
  129. package/dist/cli/update-LNKPHS54.js +35 -0
  130. package/dist/cli/{workflow-QLT22BLT.mjs → workflow-ISJKLY6X.mjs} +7 -7
  131. package/dist/cli/{workflow-JACZW4GJ.js → workflow-YELST32A.js} +17 -17
  132. package/dist/{client-DA71-2_u.d.mts → client-C2N7MofG.d.mts} +1 -1
  133. package/dist/{client-B-2Am2y6.d.ts → client-C7lTRJjw.d.ts} +1 -1
  134. package/dist/{client-core-BXbds1cb.d.mts → client-core-BTkDSKGn.d.mts} +79 -2
  135. package/dist/{client-core-C0IzDKMJ.d.ts → client-core-hmhBi7Ib.d.ts} +79 -2
  136. package/dist/{compiler-manifest-B4mIIbw7.d.ts → compiler-manifest-DsxsQP-T.d.mts} +14 -7
  137. package/dist/{compiler-manifest-B4mIIbw7.d.mts → compiler-manifest-DsxsQP-T.d.ts} +14 -7
  138. package/dist/{errors-Gj9i5Rkd.d.ts → errors-Bk5h1D-C.d.ts} +1 -1
  139. package/dist/{errors-C2F4qzAq.d.mts → errors-qdJUVQ3g.d.mts} +1 -1
  140. package/dist/{index-5JZBufdF.d.mts → index-PaupwX1B.d.mts} +1 -1
  141. package/dist/{index-BXtSj8bv.d.ts → index-bL66eHYz.d.ts} +1 -1
  142. package/dist/index.d.mts +7 -7
  143. package/dist/index.d.ts +7 -7
  144. package/dist/index.js +9 -9
  145. package/dist/index.mjs +6 -6
  146. package/dist/install-integrity.json +117 -116
  147. package/dist/plays/bundle-play-file.d.mts +3 -3
  148. package/dist/plays/bundle-play-file.d.ts +3 -3
  149. package/dist/plays/bundle-play-file.mjs +7 -5
  150. package/dist/plays/play-description.d.mts +2 -2
  151. package/dist/plays/play-description.d.ts +2 -2
  152. package/dist/plays/run-request.d.mts +2 -2
  153. package/dist/plays/run-request.d.ts +2 -2
  154. package/dist/release.d.mts +1 -1
  155. package/dist/release.d.ts +1 -1
  156. package/dist/release.js +2 -2
  157. package/dist/release.mjs +1 -1
  158. package/dist/server.d.mts +4 -4
  159. package/dist/server.d.ts +4 -4
  160. package/dist/server.js +5 -5
  161. package/dist/server.mjs +3 -3
  162. package/package.json +1 -1
  163. package/dist/cli/auth-JWR3VSNT.js +0 -43
  164. package/dist/cli/describe-GRS3IRSX.js +0 -50
  165. package/dist/cli/git-2LNT43A2.js +0 -25
  166. package/dist/cli/search-V6IBJ4TX.js +0 -33
  167. package/dist/cli/sessions-DNFTQOQH.js +0 -18
  168. package/dist/cli/skills-G4ZE3OS5.js +0 -37
  169. package/dist/cli/tools-27LHZFJD.js +0 -57
  170. package/dist/cli/update-KNZ7N242.js +0 -35
@@ -1,3 +1,9 @@
1
+ import { isIntegrationEventWaitToolId } from './event-wait-tools';
2
+ import {
3
+ isCustomerDbDatasetTool,
4
+ isQueryResultDatasetReadRequest,
5
+ } from './query-result-dataset';
6
+
1
7
  const ALWAYS_FRESH_INTEGRATION_TOOL_IDS = new Set([
2
8
  'google_workspace_request',
3
9
  'google_workspace_export_dataset',
@@ -33,24 +39,198 @@ export function isAlwaysFreshIntegrationWriteTool(toolId: string): boolean {
33
39
  );
34
40
  }
35
41
 
36
- /**
37
- * Whether a completed result may serve a later call. The Play runner, `tools
38
- * get` and Play admission all ask this one function, so an author is never told
39
- * yes where the runner says no. Only the provider-owned `reusableResult` opt-in
40
- * admits reuse.
41
- */
42
- export function toolReusableResultSupport(input: {
42
+ // The legacy gate's Workspace reason. Older-edition metadata keeps this text.
43
+ const WORKSPACE_REUSE_UNAVAILABLE_REASON =
44
+ 'Workspace edits and conflict checks must be observed on every invocation.';
45
+
46
+ type ToolReuseCapabilityInput = {
43
47
  toolId?: string;
44
48
  reusableResult?: { supported?: boolean };
45
49
  retry?: { idempotencyScope?: 'invocation'; requiresExecutionFence?: boolean };
46
50
  authoredTags?: string[];
47
51
  tags?: string[];
48
- }): { supported: boolean; unavailableReason: string | null } {
52
+ };
53
+
54
+ /** A durable call whose edition-11 `staleAfterSeconds` is being judged. */
55
+ export type ReusableWindowCall =
56
+ | {
57
+ kind: 'tool';
58
+ toolId: string;
59
+ /**
60
+ * The request input when it is known. Omitted means unknown: only the
61
+ * verdicts that follow from the tool id alone apply (`tools get`, or a
62
+ * Play whose input `plays check` cannot read).
63
+ */
64
+ input?: Record<string, unknown>;
65
+ /** The runner found an event-wait handler for this tool. */
66
+ eventWait?: boolean;
67
+ }
68
+ | {
69
+ kind: 'fetch';
70
+ /** The HTTP method, or null when `plays check` cannot read it. */
71
+ method: string | null;
72
+ }
73
+ | { kind: 'customer_db_query' };
74
+
75
+ export type ReusableWindowRefusal =
76
+ | 'event_wait'
77
+ | 'workspace'
78
+ | 'customer_db_mutation'
79
+ | 'live_dataset'
80
+ | 'fetch_mutating_method'
81
+ | 'customer_db_query';
82
+
83
+ export type ReusableWindowEligibility =
84
+ | { allowed: true }
85
+ | {
86
+ allowed: false;
87
+ refusal: ReusableWindowRefusal;
88
+ /** Why this call cannot reuse an earlier result. */
89
+ reason: string;
90
+ /** What to write instead. */
91
+ fix: string;
92
+ /** The one message `plays check`, the runner and `tools get` show. */
93
+ message: string;
94
+ };
95
+
96
+ const ZERO_WINDOW_FIX = 'Remove staleAfterSeconds or set it to 0.';
97
+
98
+ function refuse(
99
+ refusal: ReusableWindowRefusal,
100
+ subject: string,
101
+ reason: string,
102
+ oldThing = 'an old result',
103
+ fix = ZERO_WINDOW_FIX,
104
+ ): ReusableWindowEligibility {
105
+ return {
106
+ allowed: false,
107
+ refusal,
108
+ reason,
109
+ fix,
110
+ message: `${subject} ${reason}, so it cannot reuse ${oldThing}. ${fix}`,
111
+ };
112
+ }
113
+
114
+ const REUSABLE_FETCH_METHODS = new Set(['GET', 'HEAD', 'OPTIONS']);
115
+
116
+ /**
117
+ * The one edition-11 rule for a positive or null `staleAfterSeconds`: may this
118
+ * call reuse a completed answer from another call or run, and if not, why and
119
+ * what to write instead. `plays check`, the runner's refusal and `tools get`
120
+ * all ask this function, so they cannot disagree. A window of 0 (or an omitted
121
+ * one) is always allowed; same-run recovery is separate and always applies.
122
+ *
123
+ * Every tool may carry a window, writes included: the window is the author's
124
+ * explicit acceptance of reuse. Refused are only calls whose result is not a
125
+ * reusable answer: event waits, Google Workspace operations, Customer DB SQL
126
+ * that changes data, live datasets, fetches with a method that can change
127
+ * remote state, and `customerDb.query`.
128
+ */
129
+ export function reusableWindowEligibility(
130
+ call: ReusableWindowCall,
131
+ ): ReusableWindowEligibility {
132
+ if (call.kind === 'customer_db_query') {
133
+ return refuse(
134
+ 'customer_db_query',
135
+ 'customerDb.query',
136
+ 'can change data even when its SQL looks like a read',
137
+ );
138
+ }
139
+ if (call.kind === 'fetch') {
140
+ const method = call.method?.trim().toUpperCase() ?? null;
141
+ if (method !== null && REUSABLE_FETCH_METHODS.has(method)) {
142
+ return { allowed: true };
143
+ }
144
+ return refuse(
145
+ 'fetch_mutating_method',
146
+ method === null
147
+ ? 'fetch with a method that is not a literal GET, HEAD or OPTIONS'
148
+ : `fetch with method ${method}`,
149
+ 'can change remote state',
150
+ 'an old response',
151
+ 'Remove staleAfterSeconds or set it to 0, and send a stable Idempotency-Key header.',
152
+ );
153
+ }
154
+ const toolId = call.toolId.trim();
155
+ if (call.eventWait === true || isIntegrationEventWaitToolId(toolId)) {
156
+ return refuse(
157
+ 'event_wait',
158
+ toolId,
159
+ 'waits for a new event each run',
160
+ 'an old one',
161
+ );
162
+ }
163
+ if (isAlwaysFreshIntegrationTool(toolId)) {
164
+ return refuse(
165
+ 'workspace',
166
+ toolId,
167
+ 'works on a live Google Workspace file whose edits and conflict checks must be seen each run',
168
+ );
169
+ }
170
+ if (!call.input) return { allowed: true };
171
+ if (
172
+ isCustomerDbDatasetTool(toolId) &&
173
+ !isQueryResultDatasetReadRequest(toolId, {
174
+ ...call.input,
175
+ result_mode: undefined,
176
+ })
177
+ ) {
178
+ return refuse(
179
+ 'customer_db_mutation',
180
+ toolId,
181
+ 'runs SQL that changes Customer DB data',
182
+ );
183
+ }
184
+ const scalarCustomerDbQuery =
185
+ isCustomerDbDatasetTool(toolId) && call.input.result_mode === 'rows';
186
+ if (
187
+ !scalarCustomerDbQuery &&
188
+ isQueryResultDatasetReadRequest(toolId, call.input)
189
+ ) {
190
+ return refuse(
191
+ 'live_dataset',
192
+ toolId,
193
+ 'returns a live dataset that is paged fresh each run',
194
+ );
195
+ }
196
+ return { allowed: true };
197
+ }
198
+
199
+ /**
200
+ * Whether an author may give this tool a positive or null `staleAfterSeconds`
201
+ * (edition 11 and later), as `tools get` reports it. It is
202
+ * `reusableWindowEligibility` without a request input, so verdicts that depend
203
+ * on the input (Customer DB mutations, live datasets) are left to `plays
204
+ * check` and the runner.
205
+ */
206
+ export function toolReusableResultSupport(input: ToolReuseCapabilityInput): {
207
+ supported: boolean;
208
+ unavailableReason: string | null;
209
+ } {
210
+ if (!input.toolId) return { supported: true, unavailableReason: null };
211
+ const verdict = reusableWindowEligibility({
212
+ kind: 'tool',
213
+ toolId: input.toolId,
214
+ });
215
+ return 'message' in verdict
216
+ ? { supported: false, unavailableReason: verdict.message }
217
+ : { supported: true, unavailableReason: null };
218
+ }
219
+
220
+ /**
221
+ * The pre-edition-11 shared-cache gate. Runtime tool metadata sends this to
222
+ * the Play runner, whose legacy latest-cache path reads and publishes a shared
223
+ * result for an older edition only when it says yes. Only the provider-owned
224
+ * `reusableResult` opt-in on a non-write action admits it, so older editions
225
+ * keep their omitted-value behavior. Do not use it for author guidance.
226
+ */
227
+ export function legacySharedCacheReuseSupport(
228
+ input: ToolReuseCapabilityInput,
229
+ ): { supported: boolean; unavailableReason: string | null } {
49
230
  if (input.toolId && isAlwaysFreshIntegrationTool(input.toolId))
50
231
  return {
51
232
  supported: false,
52
- unavailableReason:
53
- 'Workspace edits and conflict checks must be observed on every invocation.',
233
+ unavailableReason: WORKSPACE_REUSE_UNAVAILABLE_REASON,
54
234
  };
55
235
  const write =
56
236
  input.retry?.idempotencyScope === 'invocation' ||
@@ -287,8 +287,14 @@ export type ToolExecuteHttpFailureOutcome = ToolExecuteHttpRetryDecision & {
287
287
  chargeRetryBudget: boolean;
288
288
  /** The response proves the provider request was never dispatched. */
289
289
  knownNotDispatched: boolean;
290
- /** The response proves this attempt's billing reservation was released. */
290
+ /** The response shape implies this attempt's billing reservation was released. */
291
291
  billingReservationReleased: boolean;
292
+ /**
293
+ * The app's optional `billing_reservation_released: true`: it awaited this
294
+ * attempt's release and billing confirmed it. Absent from an older app, a
295
+ * retained async hold, an ambiguous launch, and a refused or failed release.
296
+ */
297
+ billingReservationReleaseConfirmed: boolean;
292
298
  };
293
299
 
294
300
  /**
@@ -304,8 +310,15 @@ export function toolExecuteBillingRetryIdentity(input: {
304
310
  | 'backpressureDelayMs'
305
311
  | 'knownNotDispatched'
306
312
  | 'billingReservationReleased'
313
+ | 'billingReservationReleaseConfirmed'
307
314
  >;
308
315
  executionFenced: boolean;
316
+ /**
317
+ * The call reconnects to an accepted async provider job, whose recovery
318
+ * invocation key and hold are fixed. It never takes the confirmed-release
319
+ * renewal; absent means an ordinary call.
320
+ */
321
+ asyncExecutionRecovery?: boolean;
309
322
  httpFailureAttempt: number;
310
323
  invocationAttempt: number;
311
324
  }): string | null {
@@ -319,6 +332,30 @@ export function toolExecuteBillingRetryIdentity(input: {
319
332
  ? `transient-retry:${input.httpFailureAttempt}`
320
333
  : null;
321
334
  }
335
+ // The app released this attempt's reservation and never reopens one, so a
336
+ // resend under the same identity is refused as a closed reservation (409)
337
+ // and halts the run. An unfenced call needs the renewal as much as a fenced
338
+ // one: a billed read that is not declared retry-safe is resent after a
339
+ // provider 5xx once `retryProviderServerErrors` is on.
340
+ if (
341
+ failure.billingReservationReleased &&
342
+ failure.reason === 'provider_server_error'
343
+ ) {
344
+ return `transient-retry:${input.httpFailureAttempt}`;
345
+ }
346
+ // A `retrySafeTransientHttp` action bills through the same request identity,
347
+ // but its 502 shape is also sent while a hold is retained (an async hold with
348
+ // an attached provider job, an ambiguous launch) or after a release failed.
349
+ // Renewing there would open a second reservation beside one that can still
350
+ // settle, so only the app's explicit confirmation renews; without it the
351
+ // retry keeps its identity and recovers the reservation it already has.
352
+ if (
353
+ failure.billingReservationReleaseConfirmed &&
354
+ failure.reason === 'retry_safe_transient_5xx' &&
355
+ input.asyncExecutionRecovery !== true
356
+ ) {
357
+ return `transient-retry:${input.httpFailureAttempt}`;
358
+ }
322
359
  return failure.backpressureDelayMs !== null ||
323
360
  (failure.reason === 'rate_limit' && failure.knownNotDispatched)
324
361
  ? `provider-rate-limit-retry:${input.invocationAttempt}`
@@ -332,6 +369,7 @@ export type ToolExecuteHttpFailureAttemptTracker = {
332
369
  bodyText?: string;
333
370
  transientHttpRetrySafe?: boolean;
334
371
  executionFenced?: boolean;
372
+ providerServerErrorReplay?: ProviderServerErrorReplay;
335
373
  }): number;
336
374
  };
337
375
 
@@ -509,7 +547,9 @@ const PROVIDER_SERVER_ERROR_RETRY_JITTER_RATIO = 0.2;
509
547
  /**
510
548
  * Exponential backoff for a provider 5xx (2 s, 4 s, ... capped at 30 s), with
511
549
  * ±20% jitter so rows that failed together do not retry together. A longer
512
- * provider Retry-After wins.
550
+ * provider Retry-After wins, up to the same 30 s ceiling a bare 429 uses: an
551
+ * unbounded header on a 5xx (an hour, a far-future date) would otherwise park
552
+ * the row, and its run's compute, for the whole wait inside one attempt.
513
553
  */
514
554
  export function providerServerErrorRetryDelayMs(input: {
515
555
  attempt: number;
@@ -524,7 +564,10 @@ export function providerServerErrorRetryDelayMs(input: {
524
564
  1 +
525
565
  ((input.random ?? Math.random)() * 2 - 1) *
526
566
  PROVIDER_SERVER_ERROR_RETRY_JITTER_RATIO;
527
- return Math.max(Math.round(base * spread), input.retryAfterMs);
567
+ return Math.max(
568
+ Math.round(base * spread),
569
+ Math.min(TOOL_EXECUTE_RATE_LIMIT_RETRY_DELAY_MAX_MS, input.retryAfterMs),
570
+ );
528
571
  }
529
572
 
530
573
  /** Exponential backoff for edge gateway failures: 1 s, 2 s, 4 s, capped. */
@@ -575,11 +618,28 @@ function isProviderServerErrorResponse(input: {
575
618
  );
576
619
  }
577
620
 
621
+ /**
622
+ * How an action classifies for a provider 5xx (see
623
+ * `retry.providerServerErrorReplay` in the provider registry). Anything but a
624
+ * declared `idempotent_key` or `read_safe` is `never`.
625
+ */
626
+ export type ProviderServerErrorReplay =
627
+ | 'idempotent_key'
628
+ | 'read_safe'
629
+ | 'never';
630
+
631
+ /** Only an explicit classification may replay; absent and unknown never do. */
632
+ export function providerServerErrorReplayAllowed(value: unknown): boolean {
633
+ return value === 'idempotent_key' || value === 'read_safe';
634
+ }
635
+
578
636
  function decideToolExecuteHttpRetry(input: {
579
637
  status: number;
580
638
  /** A 5xx the provider itself returned (failure_origin provider). */
581
639
  providerServerError?: boolean;
582
640
  retryProviderServerErrors?: boolean;
641
+ /** The action's classification; absent means `never`. */
642
+ providerServerErrorReplay?: ProviderServerErrorReplay;
583
643
  idempotencyInProgress?: boolean;
584
644
  gatewayInvocationInProgress?: boolean;
585
645
  customerDbStorageUnavailable?: boolean;
@@ -688,7 +748,8 @@ function decideToolExecuteHttpRetry(input: {
688
748
  if (
689
749
  !input.transientHttpRetrySafe &&
690
750
  input.retryProviderServerErrors === true &&
691
- input.providerServerError === true
751
+ input.providerServerError === true &&
752
+ providerServerErrorReplayAllowed(input.providerServerErrorReplay)
692
753
  ) {
693
754
  // Only successes are final: the same call is sent again with the same
694
755
  // provider idempotency key, after a backoff with jitter.
@@ -760,6 +821,7 @@ export function createToolExecuteHttpFailureAttemptTracker(): ToolExecuteHttpFai
760
821
  }),
761
822
  retryProviderServerErrors:
762
823
  DURABLE_RUNS_ROLLOUT.retryProviderServerErrors,
824
+ providerServerErrorReplay: input.providerServerErrorReplay,
763
825
  idempotencyInProgress: isIdempotencyInProgressResponse({
764
826
  status: input.status,
765
827
  bodyText: input.bodyText ?? '',
@@ -843,6 +905,14 @@ export function classifyToolExecuteHttpFailure(input: {
843
905
  executionFenced?: boolean;
844
906
  /** Defaults to `DURABLE_RUNS_ROLLOUT.retryProviderServerErrors`. */
845
907
  retryProviderServerErrors?: boolean;
908
+ /**
909
+ * The action's classification for a provider 5xx. Absent means `never`: a
910
+ * write, upsert, create or send, and a paid call whose 5xx is ambiguous
911
+ * after dispatch, is not replayed. The gateway previous-outcome check
912
+ * passes `idempotent_key` because it only validates the recorded outcome;
913
+ * the runner, which owns the resend, has already applied the classification.
914
+ */
915
+ providerServerErrorReplay?: ProviderServerErrorReplay;
846
916
  providerLatencyMs?: number;
847
917
  nowMs?: number;
848
918
  }): ToolExecuteHttpFailureOutcome {
@@ -870,6 +940,7 @@ export function classifyToolExecuteHttpFailure(input: {
870
940
  status: input.status,
871
941
  providerServerError,
872
942
  retryProviderServerErrors,
943
+ providerServerErrorReplay: input.providerServerErrorReplay,
873
944
  idempotencyInProgress,
874
945
  gatewayInvocationInProgress,
875
946
  customerDbStorageUnavailable,
@@ -942,6 +1013,7 @@ export function classifyToolExecuteHttpFailure(input: {
942
1013
  status: input.status,
943
1014
  providerServerError,
944
1015
  retryProviderServerErrors,
1016
+ providerServerErrorReplay: input.providerServerErrorReplay,
945
1017
  idempotencyInProgress,
946
1018
  gatewayInvocationInProgress,
947
1019
  customerDbStorageUnavailable,
@@ -1087,7 +1159,12 @@ export function classifyToolExecuteHttpFailure(input: {
1087
1159
  retryDecision.reason !== 'gateway_invocation_in_progress' &&
1088
1160
  retryDecision.reason !== 'concurrency_backpressure' &&
1089
1161
  retryDecision.reason !== 'runtime_scheduler_capacity' &&
1090
- retryDecision.reason !== 'provider_pacing_wait',
1162
+ retryDecision.reason !== 'provider_pacing_wait' &&
1163
+ // Bounded per call by its attempt cap, and each call already charges
1164
+ // the tool-call budget. The run-wide retry budget is a runaway guard
1165
+ // whose breach is run-fatal; a provider outage across a large map must
1166
+ // surface as row failures, not exhaust it and fail the whole run.
1167
+ retryDecision.reason !== 'provider_server_error',
1091
1168
  // The app reported a provider failure and asked for a retry, so it has
1092
1169
  // already released that attempt's reservation, and admission never reopens
1093
1170
  // one. BILLING_UNAVAILABLE may follow an authorization whose response was
@@ -1099,6 +1176,9 @@ export function classifyToolExecuteHttpFailure(input: {
1099
1176
  retryDecision.reason === 'provider_server_error') &&
1100
1177
  explicitRetryable === true &&
1101
1178
  providerOriginFailure,
1179
+ // Reader-first optional field: anything but a literal `true` is absence.
1180
+ billingReservationReleaseConfirmed:
1181
+ shouldRetry && failureBody?.billing_reservation_released === true,
1102
1182
  // Only explicit pre-dispatch refusals permit automatic replay of an
1103
1183
  // operation that does not declare ordinary transient retry safety.
1104
1184
  knownNotDispatched:
@@ -1467,12 +1467,7 @@ export type PlayAuthoringRunStepsOptions = {
1467
1467
  staleAfterSeconds?: DurableCallStaleAfterSeconds;
1468
1468
  };
1469
1469
 
1470
- /**
1471
- * Stable identity of the currently executing Play invocation.
1472
- *
1473
- * The id is unchanged while Deepline resumes or retries the same durable run.
1474
- * A separately submitted run intentionally receives a new id.
1475
- */
1470
+ /** Account that launched the run; see `PlayAuthoringRunScope.actor`. */
1476
1471
  export type PlayAuthoringRunActor = {
1477
1472
  readonly userId: string;
1478
1473
  readonly name: string | null;
@@ -1480,7 +1475,19 @@ export type PlayAuthoringRunActor = {
1480
1475
  };
1481
1476
 
1482
1477
  export type PlayAuthoringRunScope = {
1478
+ /**
1479
+ * This Play invocation. In a submitted run it is the run id. Inside an inline
1480
+ * `deepline.runPlay` child it is the child's composition id, which is the
1481
+ * same in every parent run that makes the same call with the same input.
1482
+ */
1483
1483
  readonly id: string;
1484
+ /**
1485
+ * The submitted run this code executes in: the run id shown on the dashboard.
1486
+ * Equal to `id` in a submitted run; inside an inline child it is the calling
1487
+ * run's id. Stable across retry and resume, new for every separately
1488
+ * submitted run. Build external idempotency keys from this value.
1489
+ */
1490
+ readonly rootId: string;
1484
1491
  /** Authenticated launching account, inherited by child Plays. Never read from inputs. */
1485
1492
  readonly actor: PlayAuthoringRunActor | null;
1486
1493
  };
@@ -1491,12 +1498,12 @@ export const PLAY_AUTHORING_DOCUMENTATION = {
1491
1498
  warning:
1492
1499
  'A static deepline.fetch key inside a loop is a warning because every iteration must still have distinct method, URL, body, or safe headers. One durable receipt must never stand in for every request.',
1493
1500
  guidance:
1494
- 'Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${deepline.run.id}:signals:${batchIndex}`.',
1501
+ 'Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${deepline.run.rootId}:signals:${batchIndex}`.',
1495
1502
  },
1496
1503
  runId: {
1497
1504
  semantics:
1498
- 'deepline.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.',
1499
- use: 'Use it when deriving an external idempotency key for a sequence of batches.',
1505
+ 'deepline.run.rootId is the submitted run: it is stable while Deepline retries or resumes that run, and a separately submitted run receives a new one. deepline.run.id names the Play invocation; it equals rootId in a submitted run, but inside an inline deepline.runPlay child it is the child\'s composition id, which repeats in every parent run that makes the same call with the same input.',
1506
+ use: 'Build external idempotency keys from deepline.run.rootId plus whatever names the operation, such as a batch index or record id. It is correct in a submitted run and inside an inline child.',
1500
1507
  },
1501
1508
  staticCallKeys: {
1502
1509
  constraint:
@@ -3063,7 +3070,10 @@ export const PLAY_AUTHORING_FIELD_REGISTRY = {
3063
3070
  resolution: 'runtime-dynamic',
3064
3071
  issueCode: 'play_authoring_durable_policy_invalid',
3065
3072
  description: 'Customer DB queries always execute with freshness 0.',
3066
- errorMessage: 'Customer DB queries must use staleAfterSeconds: 0.',
3073
+ // Must equal reusableWindowEligibility({ kind: 'customer_db_query' })
3074
+ // in ../play-runtime/tool-cache-policy (asserted by its test).
3075
+ errorMessage:
3076
+ 'customerDb.query can change data even when its SQL looks like a read, so it cannot reuse an old result. Remove staleAfterSeconds or set it to 0.',
3067
3077
  },
3068
3078
  'ctx.customerDb.query.options.maxRows': {
3069
3079
  schema: Type.Integer({ minimum: 1 }),
@@ -3519,7 +3529,7 @@ export const PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
3519
3529
  ' csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;',
3520
3530
  ' dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;',
3521
3531
  ' map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;',
3522
- ' readonly run: { readonly id: string; readonly actor: { readonly userId: string; readonly name: string | null; readonly email: string | null } | null };',
3532
+ ' readonly run: { readonly id: string; readonly rootId: string; readonly actor: { readonly userId: string; readonly name: string | null; readonly email: string | null } | null };',
3523
3533
  ` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType('ctx.runSteps.options.description')}; staleAfterSeconds?: ${cloudReferenceType('ctx.runSteps.options.staleAfterSeconds')} }): Promise<TOutput>;`,
3524
3534
  ' tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };',
3525
3535
  ` customerDb: { query<TRow extends Record<string, unknown> = Record<string, unknown>>(statement: SqlQuery, options?: { id?: ${cloudReferenceType('ctx.customerDb.query.options.id')}; staleAfterSeconds?: ${cloudReferenceType('ctx.customerDb.query.options.staleAfterSeconds')}; maxRows?: ${cloudReferenceType('ctx.customerDb.query.options.maxRows')}; timeoutMs?: ${cloudReferenceType('ctx.customerDb.query.options.timeoutMs')} }): Promise<TRow[]> };`,
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-7IYDCHTG.mjs";
4
- import "./chunk-FQJFONFT.mjs";
3
+ } from "./chunk-7M5FRSFP.mjs";
4
+ import "./chunk-WVQOXYTQ.mjs";
5
5
  import "./chunk-L2VKAASU.mjs";
6
6
  import "./chunk-FKD3KL5Q.mjs";
7
7
  import "./chunk-S3A4IXBQ.mjs";
8
8
  import "./chunk-UBKA33KY.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-A6USUS4L.mjs";
11
+ } from "./chunk-6DBRBWHC.mjs";
12
12
  import {
13
13
  cliFeatureEnabled
14
- } from "./chunk-DQURY3WH.mjs";
15
- import "./chunk-E4ZS2B2J.mjs";
14
+ } from "./chunk-SXTVJIGB.mjs";
15
+ import "./chunk-JCTTXLAZ.mjs";
16
16
  import "./chunk-QNHHZ63P.mjs";
17
17
  import "./chunk-DLIRSHV6.mjs";
18
18
  import "./chunk-ZPGGW27Q.mjs";
19
- import "./chunk-7AUXX6M5.mjs";
19
+ import "./chunk-JVEFMOY2.mjs";
20
20
  import "./chunk-WZYKRD7T.mjs";
21
21
  import "./chunk-KRD6H754.mjs";
22
22
 
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkUAZKOH3Jjs = require('./chunk-UAZKOH3J.js');
4
- require('./chunk-QGTWGHYD.js');
3
+ var _chunk36LQQL5Cjs = require('./chunk-36LQQL5C.js');
4
+ require('./chunk-N5MLEXZ7.js');
5
5
  require('./chunk-E4CABWXL.js');
6
6
  require('./chunk-2KHUFWTK.js');
7
7
  require('./chunk-NMU3VR5U.js');
8
8
  require('./chunk-XDVT3GOM.js');
9
9
 
10
10
 
11
- var _chunkHD3KYCDCjs = require('./chunk-HD3KYCDC.js');
11
+ var _chunkV46J3UTMjs = require('./chunk-V46J3UTM.js');
12
12
 
13
13
 
14
- var _chunkEILHJRPWjs = require('./chunk-EILHJRPW.js');
15
- require('./chunk-HSFLMTED.js');
14
+ var _chunkMCXPJYBNjs = require('./chunk-MCXPJYBN.js');
15
+ require('./chunk-UQN4VTZL.js');
16
16
  require('./chunk-T2N3B7IQ.js');
17
17
  require('./chunk-XNYIZMNQ.js');
18
18
  require('./chunk-SQWET4SL.js');
19
- require('./chunk-GNYSODBR.js');
19
+ require('./chunk-JMMNCJ7Z.js');
20
20
  require('./chunk-OG64RBAC.js');
21
21
  require('./chunk-COGTRVWW.js');
22
22
 
@@ -24,7 +24,7 @@ require('./chunk-COGTRVWW.js');
24
24
  var _promises = require('fs/promises');
25
25
  var ARTIFACTS_FEATURE = "artifacts";
26
26
  function print(command, json, data, lines) {
27
- _chunkHD3KYCDCjs.printCommandEnvelope.call(void 0,
27
+ _chunkV46J3UTMjs.printCommandEnvelope.call(void 0,
28
28
  { command, ...data, render: { sections: [{ title: command, lines }] } },
29
29
  { json: Boolean(json), text: `${lines.join("\n")}
30
30
  ` }
@@ -56,7 +56,7 @@ function artifactLines(artifact) {
56
56
  ];
57
57
  }
58
58
  function registerArtifactsCommands(program) {
59
- const artifacts = program.command("artifacts", { hidden: !_chunkEILHJRPWjs.cliFeatureEnabled.call(void 0, ARTIFACTS_FEATURE) }).description(
59
+ const artifacts = program.command("artifacts", { hidden: !_chunkMCXPJYBNjs.cliFeatureEnabled.call(void 0, ARTIFACTS_FEATURE) }).description(
60
60
  "Show what a Play returns at a fixed URL on artifacts.deepline.com."
61
61
  ).addHelpText(
62
62
  "after",
@@ -69,7 +69,7 @@ Examples:
69
69
  );
70
70
  artifacts.command("list").description("List this workspace's artifacts.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
71
71
  async (options) => run(async () => {
72
- const result = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().listArtifacts({
72
+ const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().listArtifacts({
73
73
  cursor: options.cursor,
74
74
  limit: options.limit
75
75
  });
@@ -84,7 +84,7 @@ Examples:
84
84
  );
85
85
  artifacts.command("get <id>").description("Show one artifact and what you may do with it.").option("--json", "Emit raw JSON response").action(
86
86
  async (id, options) => run(async () => {
87
- const artifact = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().getArtifact(id);
87
+ const artifact = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().getArtifact(id);
88
88
  print("artifacts get", options.json, artifact, [
89
89
  ...artifactLines(artifact),
90
90
  ` saved input ${JSON.stringify(artifact.input)}`
@@ -106,7 +106,7 @@ Examples:
106
106
  `
107
107
  ).action(
108
108
  async (options) => run(async () => {
109
- const artifact = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().createArtifact({
109
+ const artifact = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().createArtifact({
110
110
  name: options.name,
111
111
  play: options.play,
112
112
  ...options.input !== void 0 ? {
@@ -146,7 +146,7 @@ Examples:
146
146
  "Nothing to change. See: deepline artifacts edit --help"
147
147
  );
148
148
  }
149
- const artifact = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().updateArtifact(id, fields);
149
+ const artifact = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().updateArtifact(id, fields);
150
150
  print(
151
151
  "artifacts edit",
152
152
  options.json,
@@ -157,7 +157,7 @@ Examples:
157
157
  );
158
158
  artifacts.command("runs <id>").description("List runs of the artifact's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
159
159
  async (id, options) => run(async () => {
160
- const result = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().listArtifactRuns(id, {
160
+ const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().listArtifactRuns(id, {
161
161
  limit: options.limit
162
162
  });
163
163
  print("artifacts runs", options.json, result, [
@@ -176,7 +176,7 @@ Examples:
176
176
  ).option("--json", "Emit raw JSON response").action(
177
177
  async (id, options) => run(async () => {
178
178
  const input = options.input !== void 0 ? await readJsonOption(options.input, "--input") : void 0;
179
- const started = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().refreshArtifact(id, input);
179
+ const started = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().refreshArtifact(id, input);
180
180
  print("artifacts refresh", options.json, started, [
181
181
  `Started run ${started.workflowId}.`,
182
182
  `Watch it: deepline runs get ${started.workflowId}`
@@ -190,7 +190,7 @@ Examples:
190
190
  if (access !== "workspace" && access !== "public") {
191
191
  throw new Error("Access is workspace or public.");
192
192
  }
193
- const artifact = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().setArtifactAccess(
193
+ const artifact = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().setArtifactAccess(
194
194
  id,
195
195
  access
196
196
  );
@@ -204,7 +204,7 @@ Examples:
204
204
  );
205
205
  artifacts.command("delete <id>").description("Delete an artifact. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
206
206
  async (id, options) => run(async () => {
207
- const result = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().deleteArtifact(id);
207
+ const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().deleteArtifact(id);
208
208
  print("artifacts delete", options.json, result, [
209
209
  `Deleted artifact ${id}.`
210
210
  ]);
@@ -215,7 +215,7 @@ Examples:
215
215
  );
216
216
  permissions.command("get", { isDefault: true }).description("Show the workspace's artifact rules and what you may do.").option("--json", "Emit raw JSON response").action(
217
217
  async (options) => run(async () => {
218
- const result = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().getArtifactPermissions();
218
+ const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().getArtifactPermissions();
219
219
  print("artifacts permissions", options.json, result, [
220
220
  ...Object.entries(result.rules).map(
221
221
  ([verb, level]) => `${verb}: ${level}`
@@ -253,7 +253,7 @@ Examples:
253
253
  "Pass at least one rule. See: deepline artifacts permissions set --help"
254
254
  );
255
255
  }
256
- const result = await new (0, _chunkUAZKOH3Jjs.DeeplineClient)().setArtifactPermissions(rules);
256
+ const result = await new (0, _chunk36LQQL5Cjs.DeeplineClient)().setArtifactPermissions(rules);
257
257
  print(
258
258
  "artifacts permissions set",
259
259
  options.json,