deepline 0.3.393 → 0.3.395

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 (132) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +30 -162
  2. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/plays/play-description.ts +167 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +1 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +477 -10
  7. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +5 -1
  8. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +12 -1
  11. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +10 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +25 -16
  13. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -0
  14. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +69 -22
  15. package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
  16. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
  17. package/dist/cli/{auth-5PXHA232.mjs → auth-NMQXZRS7.mjs} +4 -4
  18. package/dist/cli/auth-UYCOBAL5.js +39 -0
  19. package/dist/cli/{billing-Z2N7ZAGM.mjs → billing-5MVXZRS6.mjs} +5 -4
  20. package/dist/cli/{billing-JFB2XLSO.js → billing-Z4JTGUU3.js} +76 -75
  21. package/dist/cli/{chunk-2HAD745V.js → chunk-36ML3YKA.js} +241 -349
  22. package/dist/cli/{chunk-RKMB3N7K.mjs → chunk-3HU47EGZ.mjs} +48 -9
  23. package/dist/cli/{chunk-6I73X254.mjs → chunk-3HWALOL2.mjs} +1 -1
  24. package/dist/cli/{chunk-4PT2VA3A.mjs → chunk-3TRY7KAC.mjs} +2 -2
  25. package/dist/cli/{chunk-5PRVMXKB.mjs → chunk-47M6HPGP.mjs} +1 -1
  26. package/dist/cli/{chunk-VIWE6WRK.js → chunk-4KLCLLTO.js} +267 -255
  27. package/dist/cli/{chunk-CDFH2DYL.js → chunk-56IFFVIB.js} +4 -4
  28. package/dist/cli/chunk-5VCZ3WRH.mjs +129 -0
  29. package/dist/cli/{chunk-LMMEAMA7.mjs → chunk-6D7A2FSL.mjs} +1 -1
  30. package/dist/cli/{chunk-7HR7BGZL.mjs → chunk-7MVWUXOD.mjs} +3 -3
  31. package/dist/cli/{chunk-2LGC4EFT.mjs → chunk-7XAM7KDW.mjs} +3 -3
  32. package/dist/cli/{chunk-HLEESTCH.mjs → chunk-BLYL3KOC.mjs} +1 -1
  33. package/dist/cli/{chunk-LZPCDB7U.mjs → chunk-BON3DRC6.mjs} +1 -1
  34. package/dist/cli/chunk-DRM3CMHL.js +129 -0
  35. package/dist/cli/{chunk-STNYIMIV.mjs → chunk-EFLQHJZ6.mjs} +6 -6
  36. package/dist/cli/{chunk-Q26LUSQ2.mjs → chunk-G4IWGRMK.mjs} +23 -131
  37. package/dist/cli/{chunk-M7Y7JYZX.js → chunk-HRWUQJ4K.js} +6 -6
  38. package/dist/cli/{chunk-OXNOAD6Y.js → chunk-K5T3EN6D.js} +26 -26
  39. package/dist/cli/{chunk-PWSWAN7Q.js → chunk-KB4SDX5S.js} +48 -9
  40. package/dist/cli/{chunk-4XX6443T.js → chunk-LZLBR2SF.js} +59 -59
  41. package/dist/cli/{chunk-MS6GUPBB.js → chunk-MH73HMPV.js} +3 -3
  42. package/dist/cli/{chunk-AARX5L4B.js → chunk-MYIBHORT.js} +2 -2
  43. package/dist/cli/{chunk-5KWKZIQR.mjs → chunk-OCSG6X67.mjs} +4 -4
  44. package/dist/cli/{chunk-PTDECJGP.js → chunk-PZ5BZ76S.js} +50 -50
  45. package/dist/cli/{chunk-L2SYLGRP.js → chunk-R4XZO6Z5.js} +8 -8
  46. package/dist/cli/{chunk-RWHWF5ZJ.js → chunk-TO2MWPGR.js} +1 -1
  47. package/dist/cli/{chunk-W4WOMXR3.js → chunk-UCXK2DS4.js} +15 -15
  48. package/dist/cli/{chunk-Z3OOZM5L.js → chunk-UKU6JM3S.js} +8 -8
  49. package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
  50. package/dist/cli/{chunk-VIQJIX2P.js → chunk-VYLJJQ7Y.js} +65 -65
  51. package/dist/cli/{chunk-KIYU2TGL.mjs → chunk-WCCKMLHL.mjs} +2 -2
  52. package/dist/cli/{chunk-UOGZUA24.mjs → chunk-XMAPE2KH.mjs} +27 -15
  53. package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
  54. package/dist/cli/{chunk-FQ6VHPW4.mjs → chunk-ZWH2TFA7.mjs} +2 -2
  55. package/dist/cli/command-docs.js +2 -2
  56. package/dist/cli/command-docs.mjs +1 -1
  57. package/dist/cli/{csv-P3Z3YE7H.js → csv-HTS5ZYQ4.js} +12 -12
  58. package/dist/cli/{csv-KJWZHKCH.mjs → csv-SVOD5UBH.mjs} +3 -3
  59. package/dist/cli/{db-NUZGJNQC.js → db-7AP4P52N.js} +30 -29
  60. package/dist/cli/{db-NCM4CQIS.mjs → db-7QLNI3Q4.mjs} +5 -4
  61. package/dist/cli/{describe-WT6MM2GO.mjs → describe-DBRY5BNK.mjs} +12 -11
  62. package/dist/cli/{describe-YGSEN5WC.js → describe-YKOE54ZO.js} +22 -21
  63. package/dist/cli/{executions-PCOLHN7Q.js → executions-GRQXTB2P.js} +7 -6
  64. package/dist/cli/{executions-XS2IPJ4W.mjs → executions-QNZTPNG4.mjs} +5 -4
  65. package/dist/cli/{feedback-CCLTS5SV.mjs → feedback-JMCSR624.mjs} +3 -3
  66. package/dist/cli/{feedback-4MSH7TFU.js → feedback-ZOLA2KY7.js} +7 -7
  67. package/dist/cli/git-EJQLRK27.js +23 -0
  68. package/dist/cli/{git-K2DHPMPC.mjs → git-LJGL2IHS.mjs} +4 -4
  69. package/dist/cli/index.js +98 -98
  70. package/dist/cli/index.mjs +43 -43
  71. package/dist/cli/{legacy-noops-B5S4AR3P.mjs → legacy-noops-F23PKVBN.mjs} +4 -4
  72. package/dist/cli/{legacy-noops-GPNOPFXV.js → legacy-noops-YSCIR2SD.js} +7 -7
  73. package/dist/cli/{monitors-JLMAIPRG.mjs → monitors-S4LOEL7W.mjs} +5 -4
  74. package/dist/cli/{monitors-ZAWD7NSN.js → monitors-WMZ6HJZX.js} +86 -85
  75. package/dist/cli/{org-P2KN4CES.js → org-PFHM5ZLY.js} +65 -64
  76. package/dist/cli/{org-T3JTHP4G.mjs → org-U3WA2NQM.mjs} +5 -4
  77. package/dist/cli/{play-NK6BLRGL.mjs → play-AGSECQFN.mjs} +10 -9
  78. package/dist/cli/play-BR2LWGXK.js +159 -0
  79. package/dist/cli/{providers-3NQRA7IT.mjs → providers-QBBRFBOH.mjs} +5 -4
  80. package/dist/cli/{providers-5QRZN3DT.js → providers-XYMHLKCA.js} +8 -7
  81. package/dist/cli/{quickstart-PIA2JGPV.mjs → quickstart-5JTDGISY.mjs} +3 -3
  82. package/dist/cli/{quickstart-R7NUZGNW.js → quickstart-IYGD6ZY3.js} +5 -5
  83. package/dist/cli/{search-AIDIIGLY.mjs → search-X6W6GRHS.mjs} +6 -5
  84. package/dist/cli/search-ZVSYH5GY.js +28 -0
  85. package/dist/cli/{secrets-OQNHL45O.mjs → secrets-N55B67H6.mjs} +5 -4
  86. package/dist/cli/{secrets-BT3PGMWN.js → secrets-UHG6OQFD.js} +14 -13
  87. package/dist/cli/{sessions-EYXWOSWK.js → sessions-57L5MGHN.js} +5 -5
  88. package/dist/cli/{sessions-SF7WJPJP.mjs → sessions-JTRSTDSS.mjs} +4 -4
  89. package/dist/cli/{settings-BA3GHBOD.js → settings-ATX4U5AS.js} +75 -74
  90. package/dist/cli/{settings-Y57JTFDD.mjs → settings-Q24HRAQI.mjs} +8 -7
  91. package/dist/cli/{setup-7GR5GBHA.mjs → setup-77ZWLVHT.mjs} +6 -6
  92. package/dist/cli/{setup-RERXYC66.js → setup-EJCNOUCE.js} +41 -41
  93. package/dist/cli/skills-SPXUBLII.js +28 -0
  94. package/dist/cli/{skills-SJWIQAV5.mjs → skills-XIS5AWQI.mjs} +4 -4
  95. package/dist/cli/tools-DBHUUZJX.js +42 -0
  96. package/dist/cli/{tools-ZF3JXPNL.mjs → tools-WCKLYEGQ.mjs} +8 -7
  97. package/dist/cli/{update-FFFYQAOJ.mjs → update-UT5WANMV.mjs} +6 -6
  98. package/dist/cli/update-VSNFXRHJ.js +28 -0
  99. package/dist/cli/{workflow-SZJVQH4T.js → workflow-226QYUN2.js} +16 -15
  100. package/dist/cli/{workflow-XVFEEGAS.mjs → workflow-ZMX3L4ML.mjs} +6 -5
  101. package/dist/{client-mCE88hC4.d.ts → client-CivP-PAI.d.ts} +22 -13
  102. package/dist/{client-DU5dtHDy.d.mts → client-hdFtwhTm.d.mts} +22 -13
  103. package/dist/{compiler-manifest-DE4RdAiY.d.ts → compiler-manifest-DLxUY5kI.d.mts} +65 -11
  104. package/dist/{compiler-manifest-DE4RdAiY.d.mts → compiler-manifest-DLxUY5kI.d.ts} +65 -11
  105. package/dist/{index-Bi-f7HFT.d.ts → index-B_GM9E3q.d.ts} +1 -1
  106. package/dist/{index-BI6nWgaV.d.mts → index-SCb0NvDb.d.mts} +1 -1
  107. package/dist/index.d.mts +5 -5
  108. package/dist/index.d.ts +5 -5
  109. package/dist/index.js +8 -7
  110. package/dist/index.mjs +5 -4
  111. package/dist/install-integrity.json +92 -84
  112. package/dist/plays/bundle-play-file.d.mts +3 -3
  113. package/dist/plays/bundle-play-file.d.ts +3 -3
  114. package/dist/plays/bundle-play-file.mjs +2 -2
  115. package/dist/plays/play-description.d.mts +6 -0
  116. package/dist/plays/play-description.d.ts +6 -0
  117. package/dist/plays/play-description.js +9 -0
  118. package/dist/plays/play-description.mjs +9 -0
  119. package/dist/plays/run-request.d.mts +2 -2
  120. package/dist/plays/run-request.d.ts +2 -2
  121. package/dist/release.d.mts +1 -1
  122. package/dist/release.d.ts +1 -1
  123. package/dist/release.js +2 -2
  124. package/dist/release.mjs +1 -1
  125. package/package.json +6 -1
  126. package/dist/cli/auth-P3MVDTXM.js +0 -39
  127. package/dist/cli/git-RNM45FX4.js +0 -23
  128. package/dist/cli/play-PDXR6JFB.js +0 -158
  129. package/dist/cli/search-QRWL7MFM.js +0 -27
  130. package/dist/cli/skills-V7EY75HB.js +0 -28
  131. package/dist/cli/tools-H5HLBCHH.js +0 -41
  132. package/dist/cli/update-472HA3LT.js +0 -28
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkM7Y7JYZXjs = require('./chunk-M7Y7JYZX.js');
5
+ var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
6
6
 
7
7
 
8
- var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
8
+ var _chunk56IFFVIBjs = require('./chunk-56IFFVIB.js');
9
9
 
10
10
  // src/cli/commands/git.ts
11
11
  function shellQuote(value) {
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
32
32
  return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
33
33
  }
34
34
  async function handleList(options) {
35
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
35
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
36
36
  const payload = await http.get(
37
37
  `/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
38
38
  );
39
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
39
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
40
40
  {
41
41
  projects: payload.projects,
42
42
  count: payload.projects.length,
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
73
73
  }
74
74
  }
75
75
  async function handleStatus(options) {
76
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
76
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
77
77
  const payload = await http.get("/api/v2/github/installation");
78
78
  const installation = payload.installation;
79
79
  const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
@@ -136,7 +136,7 @@ async function handleStatus(options) {
136
136
  )
137
137
  );
138
138
  }
139
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
139
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
140
140
  {
141
141
  installation,
142
142
  installations: _nullishCoalesce(payload.installations, () => ( [])),
@@ -147,10 +147,10 @@ async function handleStatus(options) {
147
147
  );
148
148
  }
149
149
  async function handleRepos(options) {
150
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
150
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
151
151
  const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
152
152
  const payload = await http.get(`/api/v2/github/repos${query}`);
153
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
153
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
154
154
  {
155
155
  installation: payload.installation,
156
156
  repositories: payload.repositories,
@@ -171,7 +171,7 @@ async function handleRepos(options) {
171
171
  }
172
172
  async function resolveRepoId(repo, installation) {
173
173
  if (/^\d+$/.test(repo)) return Number(repo);
174
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
174
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
175
175
  const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
176
176
  const payload = await http.get(
177
177
  `/api/v2/github/repos${query}`
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
188
188
  }
189
189
  async function handleLink(repo, options) {
190
190
  const repoId = await resolveRepoId(repo, options.installation);
191
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
191
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
192
192
  const payload = await http.post("/api/v2/play-projects", {
193
193
  repoId,
194
194
  ...options.installation !== void 0 ? { installationId: options.installation } : {},
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
197
197
  ...options.branch !== void 0 ? { productionBranch: options.branch } : {},
198
198
  ...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
199
199
  });
200
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
200
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
201
201
  {
202
202
  project: payload.project,
203
203
  render: {
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
220
220
  );
221
221
  }
222
222
  async function handleGet(id, options) {
223
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
223
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
224
224
  const payload = await http.get(
225
225
  `/api/v2/play-projects/${encodeURIComponent(id)}`
226
226
  );
227
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
227
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
228
228
  {
229
229
  project: payload.project,
230
230
  render: {
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
240
240
  );
241
241
  }
242
242
  async function handleSet(id, options) {
243
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
243
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
244
244
  const payload = await http.patch(
245
245
  `/api/v2/play-projects/${encodeURIComponent(id)}`,
246
246
  {
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
251
251
  ...options.disabled !== void 0 ? { disabled: options.disabled } : {}
252
252
  }
253
253
  );
254
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
254
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
255
255
  {
256
256
  project: payload.project,
257
257
  render: {
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
264
264
  );
265
265
  }
266
266
  async function handleUnlink(id, options) {
267
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
267
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
268
268
  await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
269
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
269
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
270
270
  {
271
271
  ok: true,
272
272
  id,
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
286
286
  );
287
287
  }
288
288
  async function handleConnect(options) {
289
- const baseUrl = _chunkCDFH2DYLjs.resolveBaseUrlOnly.call(void 0, );
289
+ const baseUrl = _chunk56IFFVIBjs.resolveBaseUrlOnly.call(void 0, );
290
290
  const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
291
- const opened = _chunkM7Y7JYZXjs.openInBrowser.call(void 0, connectUrl);
292
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
291
+ const opened = _chunkHRWUQJ4Kjs.openInBrowser.call(void 0, connectUrl);
292
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
293
293
  {
294
294
  connectUrl,
295
295
  browser: opened,
@@ -311,7 +311,7 @@ async function handleConnect(options) {
311
311
  );
312
312
  }
313
313
  async function handleDeploymentsList(options) {
314
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
314
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
315
315
  const query = new URLSearchParams();
316
316
  if (options.repo) query.set("projectId", options.repo);
317
317
  if (options.limit) query.set("limit", options.limit);
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
319
319
  const payload = await http.get(
320
320
  `/api/v2/deployments${suffix}`
321
321
  );
322
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
322
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
323
323
  {
324
324
  deployments: payload.deployments,
325
325
  count: payload.deployments.length,
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
363
363
  ]);
364
364
  }
365
365
  async function handleDeploymentGet(id, options) {
366
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
366
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
367
367
  const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
368
368
  const playLines = renderDeploymentPlayLines(payload.deployment.results);
369
369
  const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
370
370
  const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
371
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
371
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
372
372
  {
373
373
  deployment: payload.deployment,
374
374
  project: payload.project,
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
387
387
  );
388
388
  }
389
389
  async function handleDeploymentCancel(id, options) {
390
- const { http } = _chunkM7Y7JYZXjs.getAuthedHttpClient.call(void 0, );
390
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
391
391
  const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
392
- _chunkM7Y7JYZXjs.printCommandEnvelope.call(void 0,
392
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
393
393
  {
394
394
  cancelled: payload.cancelled,
395
395
  deployment: payload.deployment,
@@ -2,6 +2,13 @@
2
2
  var _typebox = require('@sinclair/typebox');
3
3
  var _value = require('@sinclair/typebox/value');
4
4
  var PLAY_AUTHORING_CONTRACT_EDITION = 10;
5
+ var EXPLICIT_FRESHNESS_STALE_AFTER_SECONDS_DESCRIPTION = [
6
+ "Edition 11 requires an explicit choice.",
7
+ "`0` starts a fresh logical call, though a matching operation receipt may recover that same operation after resume;",
8
+ "`null` allows indefinite result reuse;",
9
+ "a positive integer is the maximum result age in seconds.",
10
+ "Omitted values retain legacy behavior in older editions."
11
+ ].join(" ");
5
12
  var SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS = [
6
13
  1,
7
14
  2,
@@ -77,7 +84,7 @@ var PLAY_AUTHORING_CONTRACT_CHANGELOG_DETAILS = [
77
84
  readerRemoval: null
78
85
  },
79
86
  {
80
- changed: 'CSV datasets always use source row identity and process every input occurrence, even when key or rowIdentity: "key" is supplied. Editions 1\u201310 retain their admitted row identity and completed receipts; non-CSV datasets retain explicit key deduplication.',
87
+ changed: 'Requires explicit freshness and semantic identity for supported durable calls, and gives CSV datasets source-row identity so every input occurrence is processed even when key or rowIdentity: "key" is supplied. Edition 10 retains its list-getter behavior and editions 1\u201310 retain their admitted CSV identity and completed receipts; non-CSV datasets keep explicit key deduplication.',
81
88
  compatibilityOwner: "Plays Runtime",
82
89
  newWritesEnd: null,
83
90
  readerRemoval: null
@@ -742,7 +749,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
742
749
  required: false,
743
750
  resolution: "runtime-allowed",
744
751
  issueCode: "play_authoring_durable_policy_invalid",
745
- description: "`0` always executes; `null`/omitted never expires; a positive integer is a TTL in seconds.",
752
+ description: EXPLICIT_FRESHNESS_STALE_AFTER_SECONDS_DESCRIPTION,
746
753
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
747
754
  },
748
755
  "ctx.tools.execute.id": {
@@ -1005,7 +1012,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
1005
1012
  required: false,
1006
1013
  resolution: "static-when-present",
1007
1014
  issueCode: "play_authoring_dataset_option_invalid",
1008
- description: "Select source_row to process every input occurrence. CSV datasets default to source_row in edition 11; earlier editions retain key identity. Select key only to intentionally deduplicate business keys.",
1015
+ description: "Edition 11 CSV inputs always use source-row occurrence identity, even with rowIdentity: key; key-based deduplication remains available for non-CSV inputs and editions 1\u201310.",
1009
1016
  errorMessage: 'ctx.dataset run rowIdentity must be "source_row" or "key".'
1010
1017
  },
1011
1018
  "ctx.dataset.run.onRowError": {
@@ -1101,7 +1108,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
1101
1108
  required: false,
1102
1109
  resolution: "runtime-dynamic",
1103
1110
  issueCode: "play_authoring_durable_policy_invalid",
1104
- description: "Checkpoint freshness: null/omitted never expires, 0 always executes.",
1111
+ description: EXPLICIT_FRESHNESS_STALE_AFTER_SECONDS_DESCRIPTION,
1105
1112
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
1106
1113
  },
1107
1114
  "ctx.fetch.key": {
@@ -1134,7 +1141,7 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
1134
1141
  required: false,
1135
1142
  resolution: "runtime-dynamic",
1136
1143
  issueCode: "play_authoring_durable_policy_invalid",
1137
- description: "Fetch freshness: null/omitted never expires, 0 always executes.",
1144
+ description: EXPLICIT_FRESHNESS_STALE_AFTER_SECONDS_DESCRIPTION,
1138
1145
  errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
1139
1146
  },
1140
1147
  "ctx.runPlay.key": {
@@ -1379,6 +1386,38 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
1379
1386
  description: "One non-empty Customer DB SQL string; the deprecated SqlQuery object is accepted only without parameter values.",
1380
1387
  errorMessage: "ctx.customerDb.query statement must be a non-empty SQL string. Deprecated SqlQuery objects cannot contain parameter values."
1381
1388
  },
1389
+ "ctx.customerDb.query.options.id": {
1390
+ schema: _typebox.Type.String({ pattern: "\\S" }),
1391
+ fixtures: {
1392
+ valid: "customer-report-read",
1393
+ invalid: "",
1394
+ absent: void 0,
1395
+ unresolved: { expression: "operationId" },
1396
+ edition1: "query"
1397
+ },
1398
+ referenceType: "string",
1399
+ required: true,
1400
+ resolution: "runtime-dynamic",
1401
+ issueCode: "play_authoring_tool_request_invalid",
1402
+ description: "Stable operation identity for Customer DB query recovery.",
1403
+ errorMessage: "ctx.customerDb.query options.id must be a non-empty stable string."
1404
+ },
1405
+ "ctx.customerDb.query.options.staleAfterSeconds": {
1406
+ schema: _typebox.Type.Literal(0),
1407
+ fixtures: {
1408
+ valid: 0,
1409
+ invalid: 1,
1410
+ absent: void 0,
1411
+ unresolved: { expression: "ttl" },
1412
+ edition1: 0
1413
+ },
1414
+ referenceType: "number | null",
1415
+ required: false,
1416
+ resolution: "runtime-dynamic",
1417
+ issueCode: "play_authoring_durable_policy_invalid",
1418
+ description: "Customer DB queries always execute with freshness 0.",
1419
+ errorMessage: "Customer DB queries must use staleAfterSeconds: 0."
1420
+ },
1382
1421
  "ctx.customerDb.query.options.maxRows": {
1383
1422
  schema: _typebox.Type.Integer({ minimum: 1 }),
1384
1423
  fixtures: {
@@ -1621,13 +1660,13 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
1621
1660
  "export type DatasetColumnRunInput<Row, Value> = { readonly row: Row; readonly ctx: DeeplinePlayRuntimeContext; readonly index: number; readonly previousCell?: PreviousCell<Value> };",
1622
1661
  "export type DatasetColumnDefinition<Row, Value> = { readonly run: (input: DatasetColumnRunInput<Row, Value>) => Value | Promise<Value>; readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean> };",
1623
1662
  "export type ConditionalStepResolver<Row, Value, Else = null> = { readonly kind: 'conditional'; readonly when: (row: Row, index: number) => boolean | Promise<boolean>; readonly run: StepResolver<Row, Value>; readonly elseValue: Else; else<ValueElse>(value: ValueElse): ConditionalStepResolver<Row, Value, ValueElse>; };",
1624
- "export type StepOptions<Row, Value = unknown> = { readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: number };",
1663
+ "export type StepOptions<Row, Value = unknown> = { readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: DurableCallStaleAfterSeconds };",
1625
1664
  "export type StepProgramOptions = { readonly continueOnProviderUnavailable?: boolean };",
1626
1665
  "export type StepProgram<Input, Output, Return = Output> = { readonly kind: 'steps'; readonly steps: readonly PlayStepProgramStep[]; readonly returnResolver?: StepResolver<Output, Return>; readonly continueOnProviderUnavailable?: boolean; readonly __inputType?: (input: Input) => void; step<Name extends string, Value>(name: Name, resolver: StepResolver<Output, Value> | ConditionalStepResolver<Output, Value> | StepProgramResolver<Output, Value>): StepProgram<Input, Output & Record<Name, Value>, Return>; step<Name extends string, Value>(name: Name, resolver: StepResolver<Output, Value> | StepProgramResolver<Output, Value>, options: StepOptions<Output, Value>): StepProgram<Input, Output & Record<Name, Value | null>, Return>; return<Value>(resolver: StepResolver<Output, Value>): StepProgram<Input, Output, Value>; };",
1627
1666
  "export type StepProgramResolver<Input, Return> = { readonly kind: 'steps'; readonly steps: readonly PlayStepProgramStep[]; readonly returnResolver?: StepResolver<never, Return>; readonly __inputType?: (input: Input) => void };",
1628
1667
  "export type RunnableStepProgram<Input, Return> = Pick<StepProgram<Input, never, Return>, 'kind' | 'steps' | 'returnResolver' | '__inputType'>;",
1629
1668
  "export type RunnableColumnStepProgram<Return> = Pick<StepProgramResolver<unknown, Return>, 'kind' | 'steps' | 'returnResolver'>;",
1630
- "export type PlayStepProgramStep = { readonly name: string; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: number; readonly resolver: StepResolver<Record<string, unknown>, unknown> | ConditionalStepResolver<Record<string, unknown>, unknown> | StepProgramResolver<Record<string, unknown>, unknown> };",
1669
+ "export type PlayStepProgramStep = { readonly name: string; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: DurableCallStaleAfterSeconds; readonly resolver: StepResolver<Record<string, unknown>, unknown> | ConditionalStepResolver<Record<string, unknown>, unknown> | StepProgramResolver<Record<string, unknown>, unknown> };",
1631
1670
  "export type ColumnResolver<Row, Value> = StepResolver<Row, Value> | ConditionalStepResolver<Row, Value> | RunnableColumnStepProgram<Value>;",
1632
1671
  "export type StepProgramOutput<TProgram> = TProgram extends StepProgram<unknown, infer Output, unknown> ? Output : never;",
1633
1672
  "export type DatasetRowKey<InputRow extends object> = (keyof InputRow & string) | readonly (keyof InputRow & string)[] | ((row: InputRow, index: number) => string | number | readonly unknown[]);",
@@ -1652,8 +1691,8 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
1652
1691
  " readonly run: { readonly id: string };",
1653
1692
  ` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
1654
1693
  " tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
1655
- ` customerDb: { query<TRow extends Record<string, unknown> = Record<string, unknown>>(statement: SqlQuery, options?: { maxRows?: ${cloudReferenceType("ctx.customerDb.query.options.maxRows")}; timeoutMs?: ${cloudReferenceType("ctx.customerDb.query.options.timeoutMs")} }): Promise<TRow[]> };`,
1656
- ` tool<K extends string>(key: ${cloudReferenceType("ctx.tool.key")}, toolId: K, input: ${cloudReferenceType("ctx.tool.input")}, options?: { description?: ${cloudReferenceType("ctx.tool.options.description")} }): Promise<ToolExecutionOutput<K>>;`,
1694
+ ` 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[]> };`,
1695
+ ` tool<K extends string>(key: ${cloudReferenceType("ctx.tool.key")}, toolId: K, input: ${cloudReferenceType("ctx.tool.input")}, options?: { description?: ${cloudReferenceType("ctx.tool.options.description")}; staleAfterSeconds?: DurableCallStaleAfterSeconds }): Promise<ToolExecutionOutput<K>>;`,
1657
1696
  " step<T>(id: string, run: () => T | Promise<T>, options?: RuntimeStepOptions): Promise<T>;",
1658
1697
  " fetch(key: string, url: string | URL, init?: RequestInit & { headers?: HeadersInit & { 'Idempotency-Key'?: string; 'X-Idempotency-Key'?: string }; auth?: SecretAuthInput }, options?: FetchOptions): Promise<PlayFetchResponse>;",
1659
1698
  " secrets: { get(name: string): SecretPromise; bearer(secret: string | SecretPromise | SecretHandle): SecretAuth; header(header: string, secret: string | SecretPromise | SecretHandle): SecretAuth };",