deepline 0.3.421 → 0.3.423

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 (149) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +2 -2
  2. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  3. package/dist/bundling-sources/sdk/src/play.ts +227 -184
  4. package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +9 -2
  5. package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  7. package/dist/bundling-sources/sdk/src/tool-calls.ts +3 -1
  8. package/dist/bundling-sources/sdk/src/types.ts +5 -5
  9. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +6 -6
  10. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -36
  11. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +179 -38
  12. package/dist/bundling-sources/shared_libs/plays/dataset.ts +2 -2
  13. package/dist/bundling-sources/shared_libs/plays/docflow.ts +4 -0
  14. package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +1 -1
  15. package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +12 -4
  16. package/dist/bundling-sources/shared_libs/plays/play-exports.ts +27 -5
  17. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +992 -0
  18. package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +63 -0
  19. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +8 -4
  20. package/dist/bundling-sources/shared_libs/plays/ts-ast.ts +2 -0
  21. package/dist/cli/{auth-56JTC4Q7.mjs → auth-L7Q53QKK.mjs} +4 -4
  22. package/dist/cli/auth-SUNY477Y.js +40 -0
  23. package/dist/cli/{billing-ZXOOZEUW.mjs → billing-IH7AKDR2.mjs} +4 -4
  24. package/dist/cli/{billing-C5LR6FA7.js → billing-QNP6YGI2.js} +73 -73
  25. package/dist/cli/{chunk-AARWVK4C.mjs → chunk-2BQUML3X.mjs} +792 -69
  26. package/dist/cli/{chunk-7SRVIWGT.js → chunk-2F5ULM2F.js} +1 -1
  27. package/dist/cli/{chunk-HP5FD2LI.js → chunk-2U3AMRHF.js} +8 -8
  28. package/dist/cli/{chunk-ERFN2QY4.mjs → chunk-3DNKFH2G.mjs} +1 -1
  29. package/dist/cli/{chunk-5F6W5NWV.mjs → chunk-44US3EL2.mjs} +5 -5
  30. package/dist/cli/{chunk-6UKY4LBW.js → chunk-4WT5RISA.js} +20 -20
  31. package/dist/cli/{chunk-QJV2ALPN.js → chunk-5DGR3TB6.js} +2 -2
  32. package/dist/cli/{chunk-UCI4QROZ.mjs → chunk-6FFORGD2.mjs} +2 -2
  33. package/dist/cli/{chunk-ZSVWCV3G.mjs → chunk-ARTGL3FM.mjs} +1 -1
  34. package/dist/cli/{chunk-FB5H5OOH.js → chunk-AVOBDFQ5.js} +11 -11
  35. package/dist/cli/{chunk-2WOVAVJ3.js → chunk-DRK6FYJU.js} +26 -26
  36. package/dist/cli/{chunk-63ILLN5H.mjs → chunk-DS7Y7X26.mjs} +2 -2
  37. package/dist/cli/{chunk-CTNA5QY2.mjs → chunk-EER67G2B.mjs} +43 -28
  38. package/dist/cli/{chunk-GIJ47TAV.js → chunk-EWWWOKX2.js} +6 -6
  39. package/dist/cli/{chunk-5E55HHW3.mjs → chunk-FJRFSBWO.mjs} +4 -4
  40. package/dist/cli/{chunk-27GJKC5Q.js → chunk-GXOQRZXG.js} +2 -2
  41. package/dist/cli/{chunk-RURYN2BE.mjs → chunk-H662SHPT.mjs} +28 -27
  42. package/dist/cli/{chunk-PKBPSMOT.js → chunk-INFLI36H.js} +43 -28
  43. package/dist/cli/{chunk-RJLFCJ23.mjs → chunk-IW5QK3K6.mjs} +3 -3
  44. package/dist/cli/{chunk-SPLOMS4N.mjs → chunk-JDAXVQV7.mjs} +1 -1
  45. package/dist/cli/{chunk-4PG4ARL2.mjs → chunk-KPKU53YO.mjs} +1 -1
  46. package/dist/cli/{chunk-IMZ56EOH.mjs → chunk-LXTSVUZN.mjs} +2 -2
  47. package/dist/cli/{chunk-F4V4JJED.mjs → chunk-MHG3NND4.mjs} +3 -3
  48. package/dist/cli/{chunk-IHG7UAHD.mjs → chunk-MLJBCS3E.mjs} +32 -13
  49. package/dist/cli/{chunk-5KYK4DGY.js → chunk-MMI2DXCW.js} +8 -8
  50. package/dist/cli/{chunk-VEYAPBS4.js → chunk-NA6SGG7X.js} +260 -259
  51. package/dist/cli/{chunk-AZGJNNNE.mjs → chunk-NFIZ5YED.mjs} +2 -2
  52. package/dist/cli/{chunk-WR4M5VWK.js → chunk-OMWO2JLC.js} +52 -52
  53. package/dist/cli/{chunk-EKQH4IUU.mjs → chunk-OPI7UCQG.mjs} +1 -1
  54. package/dist/cli/{chunk-2XKDLS5P.js → chunk-OZLMMMZH.js} +6 -6
  55. package/dist/cli/{chunk-ZLPT2RZ5.mjs → chunk-PH4BP6KM.mjs} +2 -2
  56. package/dist/cli/{chunk-NSJRLP7R.js → chunk-PQ4G6MKI.js} +16 -16
  57. package/dist/cli/{chunk-4NS4EZHN.mjs → chunk-QN6DG4JO.mjs} +2 -2
  58. package/dist/cli/{chunk-VC3E5HFO.mjs → chunk-QWJJMQNE.mjs} +1 -1
  59. package/dist/cli/{chunk-GEJDBXXM.js → chunk-QWRHGGUH.js} +1 -1
  60. package/dist/cli/{chunk-AD47BXN2.js → chunk-R2QWSSAG.js} +8 -8
  61. package/dist/cli/{chunk-JJQLBZEW.js → chunk-RAL75ND3.js} +2 -2
  62. package/dist/cli/{chunk-QADCFSGH.js → chunk-RDIN3NKA.js} +17 -17
  63. package/dist/cli/{chunk-7TSF7E3B.mjs → chunk-S6KG7JCR.mjs} +2 -2
  64. package/dist/cli/{chunk-BQR6UN3C.js → chunk-VUYUI35Q.js} +32 -13
  65. package/dist/cli/{chunk-C25ZYL6U.js → chunk-W42SSVM7.js} +4 -4
  66. package/dist/cli/{chunk-ZZBXD5VX.js → chunk-WJO7KIFT.js} +50 -50
  67. package/dist/cli/{chunk-VYLZS7X4.mjs → chunk-XSERB7H2.mjs} +1 -1
  68. package/dist/cli/{chunk-4I26IVFC.js → chunk-YCHR57TD.js} +35 -35
  69. package/dist/cli/{chunk-OQQOXSYA.js → chunk-YHRS6XTB.js} +845 -122
  70. package/dist/cli/{chunk-ZOL3CIKN.mjs → chunk-YNT7PJND.mjs} +3 -3
  71. package/dist/cli/command-docs.js +2 -2
  72. package/dist/cli/command-docs.mjs +1 -1
  73. package/dist/cli/{csv-EJ4QRLA2.mjs → csv-5KW7M6ZS.mjs} +3 -3
  74. package/dist/cli/{csv-G6H3U4XV.js → csv-GF7VRES5.js} +12 -12
  75. package/dist/cli/{db-WKQFXUWI.js → db-AEDXKB4F.js} +26 -26
  76. package/dist/cli/{db-PBIIALJ5.mjs → db-NN4JQAC4.mjs} +5 -5
  77. package/dist/cli/{describe-ZCU36ES2.js → describe-5RLXW332.js} +24 -24
  78. package/dist/cli/{describe-DMRK4UNO.mjs → describe-RX6VROHQ.mjs} +16 -16
  79. package/dist/cli/describe-core.d.mts +2 -2
  80. package/dist/cli/describe-core.d.ts +2 -2
  81. package/dist/cli/describe-core.js +4 -4
  82. package/dist/cli/describe-core.mjs +3 -3
  83. package/dist/cli/{executions-JAHW6GMA.mjs → executions-EJZ34VUB.mjs} +4 -4
  84. package/dist/cli/{executions-SBA3UYMH.js → executions-PGIGFDDS.js} +6 -6
  85. package/dist/cli/{feedback-PKBUYHMD.mjs → feedback-6MWOKE7H.mjs} +3 -3
  86. package/dist/cli/{feedback-QAE4V2NY.js → feedback-L2ODMANV.js} +7 -7
  87. package/dist/cli/git-2ZDCRTBD.js +24 -0
  88. package/dist/cli/{git-GAO3SJAQ.mjs → git-456RF3AT.mjs} +4 -4
  89. package/dist/cli/index.js +135 -135
  90. package/dist/cli/index.mjs +37 -37
  91. package/dist/cli/{legacy-noops-JCMVW5BL.js → legacy-noops-MDPB3MIS.js} +7 -7
  92. package/dist/cli/{legacy-noops-5PY2ZZF3.mjs → legacy-noops-ZPRBXQDE.mjs} +4 -4
  93. package/dist/cli/{monitors-YPS4LPDG.js → monitors-TXKR5XYW.js} +86 -86
  94. package/dist/cli/{monitors-GVYAZRMB.mjs → monitors-ZLP6A7FT.mjs} +6 -6
  95. package/dist/cli/{org-OBVAU6K7.js → org-73SQ3AT2.js} +64 -64
  96. package/dist/cli/{org-R7AKPKUB.mjs → org-YZ62BIGM.mjs} +4 -4
  97. package/dist/cli/{play-MTHQQHR6.js → play-M75EBXEV.js} +606 -567
  98. package/dist/cli/{play-3LFM2SV2.mjs → play-VCYQKCKF.mjs} +113 -74
  99. package/dist/cli/{providers-CTIROUI3.js → providers-GIINJPWQ.js} +7 -7
  100. package/dist/cli/{providers-IRICPDKU.mjs → providers-JLA6LST3.mjs} +4 -4
  101. package/dist/cli/{quickstart-5FBQVZ5B.mjs → quickstart-AHCU75GG.mjs} +3 -3
  102. package/dist/cli/{quickstart-OZDVFNF2.js → quickstart-HHHLYCHT.js} +5 -5
  103. package/dist/cli/{search-FYM47QFU.mjs → search-5GACUIAX.mjs} +5 -5
  104. package/dist/cli/search-W2PGBXQO.js +30 -0
  105. package/dist/cli/{secrets-43GJUDAE.js → secrets-PI7IPCOE.js} +13 -13
  106. package/dist/cli/{secrets-ENBXU3O3.mjs → secrets-S2NBKAEN.mjs} +4 -4
  107. package/dist/cli/{sessions-RXX5IHG6.js → sessions-BK4CSRFS.js} +5 -5
  108. package/dist/cli/{sessions-7IQJOH5Z.mjs → sessions-IBKYGTBD.mjs} +4 -4
  109. package/dist/cli/{settings-Z2CWWV7P.js → settings-2G7TUDM7.js} +75 -75
  110. package/dist/cli/{settings-EZGDTS3K.mjs → settings-JY6UN4KO.mjs} +8 -8
  111. package/dist/cli/{setup-N5UMUBBV.mjs → setup-HS5X3OSN.mjs} +7 -7
  112. package/dist/cli/{setup-2ON3TUXP.js → setup-R424FIBF.js} +42 -42
  113. package/dist/cli/skills-M3RZAN4A.js +29 -0
  114. package/dist/cli/{skills-4MR2Z2M5.mjs → skills-UIBUDTGN.mjs} +5 -5
  115. package/dist/cli/tools-K2GII2PA.js +44 -0
  116. package/dist/cli/{tools-MCEIWE3I.mjs → tools-SB4FREB6.mjs} +15 -15
  117. package/dist/cli/update-C2ORJRXN.js +31 -0
  118. package/dist/cli/{update-2JDBGLTX.mjs → update-NJSUE2YU.mjs} +7 -7
  119. package/dist/cli/{workflow-7DNBY4WJ.js → workflow-3AZWZ4J3.js} +19 -19
  120. package/dist/cli/{workflow-7UDXYU5Y.mjs → workflow-HBG76XYX.mjs} +9 -9
  121. package/dist/{client-CCWIUnk7.d.mts → client-BTUOYGID.d.mts} +10 -9
  122. package/dist/{client-vHqBm-OL.d.ts → client-C668iUhZ.d.ts} +10 -9
  123. package/dist/{compiler-manifest-lzWpbV3w.d.ts → compiler-manifest-DaFuA1ki.d.mts} +35 -32
  124. package/dist/{compiler-manifest-lzWpbV3w.d.mts → compiler-manifest-DaFuA1ki.d.ts} +35 -32
  125. package/dist/{index-CtNK-0nI.d.mts → index-0yS9ihly.d.mts} +10 -3
  126. package/dist/{index-C8Cy-YTm.d.ts → index-CRAScKPg.d.ts} +10 -3
  127. package/dist/index.d.mts +120 -150
  128. package/dist/index.d.ts +120 -150
  129. package/dist/index.js +77 -12
  130. package/dist/index.mjs +74 -9
  131. package/dist/install-integrity.json +99 -98
  132. package/dist/plays/bundle-play-file.d.mts +3 -3
  133. package/dist/plays/bundle-play-file.d.ts +3 -3
  134. package/dist/plays/bundle-play-file.mjs +1 -1
  135. package/dist/plays/play-description.d.mts +2 -2
  136. package/dist/plays/play-description.d.ts +2 -2
  137. package/dist/plays/run-request.d.mts +2 -2
  138. package/dist/plays/run-request.d.ts +2 -2
  139. package/dist/release.d.mts +1 -1
  140. package/dist/release.d.ts +1 -1
  141. package/dist/release.js +2 -2
  142. package/dist/release.mjs +1 -1
  143. package/package.json +1 -1
  144. package/dist/cli/auth-ZQMAF7W5.js +0 -40
  145. package/dist/cli/git-54INNT33.js +0 -24
  146. package/dist/cli/search-XIKHDZJ3.js +0 -30
  147. package/dist/cli/skills-2WIHNEOS.js +0 -29
  148. package/dist/cli/tools-YUUSOKYX.js +0 -44
  149. package/dist/cli/update-PWX4MJ3R.js +0 -31
@@ -9,6 +9,10 @@ import {
9
9
  relative,
10
10
  resolve,
11
11
  } from 'node:path';
12
+ import {
13
+ isRuntimeReceiver,
14
+ playRuntimeNames,
15
+ } from '../../../shared_libs/plays/script-entry.js';
12
16
 
13
17
  export interface PlayLocalFileReference {
14
18
  sourceFragment: string;
@@ -346,6 +350,7 @@ async function resolveLocalImport(
346
350
 
347
351
  export async function discoverPackagedLocalFiles(
348
352
  entryFile: string,
353
+ analyzedSources: Readonly<Record<string, string>> = {},
349
354
  ): Promise<PlayLocalFileDiscoveryResult> {
350
355
  const absoluteEntryFile = resolve(entryFile);
351
356
  const packagingRoot = dirname(absoluteEntryFile);
@@ -360,7 +365,8 @@ export async function discoverPackagedLocalFiles(
360
365
  }
361
366
  visitedFiles.add(absolutePath);
362
367
 
363
- const sourceCode = await readFile(absolutePath, 'utf-8');
368
+ const sourceCode =
369
+ analyzedSources[absolutePath] ?? (await readFile(absolutePath, 'utf-8'));
364
370
  if (
365
371
  extname(absolutePath).toLowerCase() === '.json' ||
366
372
  isTextImportFile(absolutePath)
@@ -369,13 +375,14 @@ export async function discoverPackagedLocalFiles(
369
375
  }
370
376
  const scanSource = stripCommentsToSpaces(sourceCode);
371
377
  const constants = collectTopLevelStringConstants(sourceCode);
378
+ const runtimeNames = playRuntimeNames(sourceCode);
372
379
  const childVisits: Promise<void>[] = [];
373
380
 
374
381
  for (const match of scanSource.matchAll(
375
382
  /\b([A-Za-z_$][\w$]*)\s*\.\s*csv\b/g,
376
383
  )) {
377
384
  const target = match[1]!;
378
- if (target !== 'ctx' && !target.endsWith('Ctx')) {
385
+ if (!isRuntimeReceiver(target, runtimeNames)) {
379
386
  continue;
380
387
  }
381
388
  const openParen = findCallOpenParen(
@@ -29,7 +29,7 @@ function importedNodes(graph: LocalPlayGraph): BundledPlayFileSuccess[] {
29
29
  if (node === graph.root) return;
30
30
  if (!node.playName)
31
31
  throw new Error(
32
- `Imported Play ${node.filePath} must export definePlay(...).`,
32
+ `Imported Play ${node.filePath} has no play name; add export const config = { name }.`,
33
33
  );
34
34
  const existing = names.get(node.playName);
35
35
  if (existing !== undefined && existing !== node.filePath)
@@ -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.421',
208
+ version: '0.3.423',
209
209
  updateSummary: {
210
210
  introducedIn: '0.3.90',
211
211
  summary:
@@ -256,7 +256,9 @@ export type ToolExecution<TData = unknown, TMeta = Record<string, unknown>> = {
256
256
  toolResponse: {
257
257
  /** @deprecated Use declared getters or toolResponse.rawV2. */
258
258
  raw: TData;
259
- rawV2?: unknown;
259
+ /** Unschematized provider response, typed `any` for direct reads. */
260
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- provider payloads are unschematized; authors read nested fields directly.
261
+ rawV2?: any;
260
262
  view?: 'data' | 'rawV2';
261
263
  meta?: TMeta;
262
264
  responseMeta?: TMeta;
@@ -1066,7 +1066,7 @@ export interface PlayStatus {
1066
1066
  * Projected settled-charge billing for the run. Returned by `runs.get`.
1067
1067
  * `totalCredits`/`providerEvents` describe THIS run only; `rollup` (present
1068
1068
  * with `--full`) carries the true subtree cost including independently
1069
- * executing ctx.runPlayAsync descendants. Deepline credits only — provider
1069
+ * executing deepline.runPlayAsync descendants. Deepline credits only — provider
1070
1070
  * spend is never exposed.
1071
1071
  */
1072
1072
  billing?: RunBillingSummary;
@@ -1079,21 +1079,21 @@ export interface PlayStatus {
1079
1079
  billingChildCredits?: number;
1080
1080
  /** True when the child-run billing rollup could not be fully resolved. */
1081
1081
  billingRollupIncomplete?: boolean;
1082
- /** Durable summaries of ctx.runPlayAsync children, returned by `runs.get --full`. */
1082
+ /** Durable summaries of deepline.runPlayAsync children, returned by `runs.get --full`. */
1083
1083
  childRuns?: ChildRunSummary[];
1084
1084
  /**
1085
- * Child Runs grouped by the authored ctx.runPlayAsync launch key. `complete`
1085
+ * Child Runs grouped by the authored deepline.runPlayAsync launch key. `complete`
1086
1086
  * is false when the bounded response is a lower bound rather than the full
1087
1087
  * direct-child set; use each opaque `runId` to retrieve a child Run.
1088
1088
  */
1089
1089
  childRunProjection?: AsyncChildRunProjection;
1090
1090
  }
1091
1091
 
1092
- /** One ctx.runPlayAsync child Run exposed on the parent's `--full` payload. */
1092
+ /** One deepline.runPlayAsync child Run exposed on the parent's `--full` payload. */
1093
1093
  export interface ChildRunSummary {
1094
1094
  runId: string;
1095
1095
  playName?: string | null;
1096
- /** Authored ctx.runPlayAsync key; stable across row fanout. */
1096
+ /** Authored deepline.runPlayAsync key; stable across row fanout. */
1097
1097
  launchKey?: string | null;
1098
1098
  /** Opaque durable identity for one authored invocation. */
1099
1099
  invocationKey?: string | null;
@@ -132,13 +132,13 @@
132
132
  "workflowName": "Cloudflare Tunnel Reconciliation",
133
133
  "workflowEvents": ["pull_request_target", "workflow_dispatch"],
134
134
  "scheduler": "github_actions",
135
- "cadence": "runAfter trusted PR-close relay or explicit operator workflow dispatch",
135
+ "cadence": "runAfter explicit operator workflow dispatch",
136
136
  "timezone": "UTC",
137
137
  "source": ".github/workflows/cloudflare-tunnel-reconciliation.yml",
138
138
  "locator": "workflow_dispatch:",
139
139
  "owner": "platform",
140
140
  "criticality": "maintenance",
141
- "purpose": "Record default-branch PR-relayed and operator tunnel dispatches separately from the daily cleanup slot, retaining historical PR-target observations with the same exact ownership, rollout and retained-evidence controls.",
141
+ "purpose": "Record explicit operator tunnel dispatches separately from the daily cleanup slot, retaining historical PR-relayed and PR-target observations with the same exact ownership, rollout and retained-evidence controls.",
142
142
  "successDefinition": "The admitted event pass completes its exact selected UUIDs with durable outcomes; disabled rollout and no eligible resources are explicit no-ops.",
143
143
  "failureDefinition": "Event authority, provider truth, continuation or retained evidence is unavailable, or an exact selected UUID remains unresolved.",
144
144
  "startGraceMs": 600000,
@@ -151,15 +151,15 @@
151
151
  "name": "Cloudflare Tunnel PR Close Relay",
152
152
  "workflowEvents": ["pull_request_target"],
153
153
  "scheduler": "github_actions",
154
- "cadence": "runAfter trusted same-repository PR close",
154
+ "cadence": "runAfter PR-close event (dispatch disabled)",
155
155
  "timezone": "UTC",
156
156
  "source": ".github/workflows/cloudflare-tunnel-pr-closed.yml",
157
157
  "locator": "pull_request_target:",
158
158
  "owner": "platform",
159
159
  "criticality": "maintenance",
160
- "purpose": "Relay a trusted same-repository PR-close event to the literal default-branch tunnel reconciliation workflow without Cloudflare credentials or cleanup effects.",
161
- "successDefinition": "The relay dispatch is acknowledged by GitHub, or an ineligible event is an explicit no-op; relay success does not imply tunnel cleanup completed.",
162
- "failureDefinition": "GitHub refuses the default-branch dispatch or the admitted relay fails, times out or is cancelled before acknowledging it.",
160
+ "purpose": "Retain historical PR-close relay outcomes. Dispatch is source-disabled for the nightly and operator tunnel lifecycle.",
161
+ "successDefinition": "The disabled relay is a no-op; retained historical dispatch acknowledgements do not establish reconciliation completion.",
162
+ "failureDefinition": "A retained historical dispatch failed, or an invocation of the disabled relay unexpectedly fails, times out or is cancelled.",
163
163
  "startGraceMs": 600000,
164
164
  "runTimeoutMs": 300000,
165
165
  "failureAlert": "github_workflow_run",
@@ -131,26 +131,27 @@ export const PLAY_AUTHORING_CONTRACT_CHANGELOG =
131
131
 
132
132
  /**
133
133
  * Customer-visible runtime capabilities that are not expressible as one
134
- * `ctx.*` signature. The generated authoring reference renders this inventory
134
+ * `deepline.*` signature. The generated authoring reference renders this inventory
135
135
  * directly; add a row here alongside any new supported runtime global or
136
136
  * execution-boundary guarantee.
137
137
  */
138
138
  export const PLAY_AUTHORING_RUNTIME_CAPABILITIES = [
139
139
  {
140
140
  capability: 'Durable external I/O',
141
- surface: '`ctx.fetch`, `ctx.tools.execute`, `ctx.step`, `ctx.runPlay`',
141
+ surface:
142
+ '`deepline.fetch`, `deepline.tools.execute`, `deepline.step`, `deepline.runPlay`',
142
143
  contract:
143
- 'Use a `ctx.*` primitive for external work. Each primitive owns durable receipt identity and replay; raw I/O in an authored handler does not.',
144
+ 'Use a `deepline.*` primitive for external work. Each primitive owns durable receipt identity and replay; raw I/O in play code does not.',
144
145
  },
145
146
  {
146
147
  capability: 'Web Crypto',
147
148
  surface: '`crypto.subtle`',
148
149
  contract:
149
- 'WebCrypto is available for standards-based signing, verification, encryption, and key import. Keep private material in `ctx.secrets`. `docs-examples/sdk-v2/github-app-jwt.play.ts` is an edition-10 compatibility example; edition 11 allows transient fetches only for read-only methods, so do not copy its credential-returning POST into new source.',
150
+ 'WebCrypto is available for standards-based signing, verification, encryption, and key import. Keep private material in `deepline.secrets`. `docs-examples/sdk-v2/github-app-jwt.play.ts` is an edition-10 compatibility example; edition 11 allows transient fetches only for read-only methods, so do not copy its credential-returning POST into new source.',
150
151
  },
151
152
  {
152
153
  capability: 'Workspace secrets',
153
- surface: '`ctx.secrets.get`, `.bearer`, `.header`',
154
+ surface: '`deepline.secrets.get`, `.bearer`, `.header`',
154
155
  contract:
155
156
  'Declare the secret at the Play boundary, read it only at runtime, and never return or log it. Secret-bearing HTTP requests require HTTPS.',
156
157
  },
@@ -850,7 +851,7 @@ export type PlayAuthoringBindings<TInput = Record<string, unknown>> = {
850
851
  /**
851
852
  * Play-level sandbox settings. The default deadline is 30 minutes; set a
852
853
  * static `timeout` such as `"90m"` or `"2h"` for a bounded batch, up to 4h.
853
- * This is distinct from `ctx.tools.execute({ timeoutMs })`, which limits one
854
+ * This is distinct from `deepline.tools.execute({ timeoutMs })`, which limits one
854
855
  * provider-call transport rather than the whole Play.
855
856
  */
856
857
  runtime?: {
@@ -892,7 +893,7 @@ export type PlayToolCallOptions = Omit<
892
893
  'id' | 'tool' | 'input'
893
894
  >;
894
895
 
895
- /** @deprecated Pass a SQL string directly to ctx.customerDb.query. */
896
+ /** @deprecated Pass a SQL string directly to deepline.customerDb.query. */
896
897
  export type PlaySqlQuery = {
897
898
  readonly kind: 'sql.query';
898
899
  readonly text: string;
@@ -903,7 +904,7 @@ declare const PLAY_SECRET_HANDLE_BRAND: unique symbol;
903
904
  declare const PLAY_SECRET_PROMISE_BRAND: unique symbol;
904
905
  /**
905
906
  * An opaque reference to a workspace secret used by legacy authoring-contract
906
- * editions. New Plays receive plaintext strings from `ctx.secrets.get`.
907
+ * editions. New Plays receive plaintext strings from `deepline.secrets.get`.
907
908
  *
908
909
  * @sdkReference runtime 176 SecretHandle
909
910
  */
@@ -916,14 +917,14 @@ export type PlaySecretHandle = {
916
917
  /** Always throws. A secret handle is deliberately not serializable. */
917
918
  toJSON(): never;
918
919
  };
919
- /** A secret-reading promise returned only by `ctx.secrets.get`. */
920
+ /** A secret-reading promise returned only by `deepline.secrets.get`. */
920
921
  export type PlaySecretPromise = Promise<string> & {
921
922
  readonly [PLAY_SECRET_PROMISE_BRAND]: never;
922
923
  };
923
924
  /** An opaque legacy secret handle retained for earlier Play artifacts. */
924
925
  export type PlaySecretValue = PlaySecretHandle;
925
926
  /**
926
- * One resolved authentication scheme, built by `ctx.secrets.bearer` or `ctx.secrets.header` and attached to a request through `init.auth`.
927
+ * One resolved authentication scheme, built by `deepline.secrets.bearer` or `deepline.secrets.header` and attached to a request through `init.auth`.
927
928
  *
928
929
  * @sdkReference runtime 177 SecretAuth
929
930
  */
@@ -938,7 +939,7 @@ export type PlaySecretAuth = {
938
939
  /** One or more resolved authentication schemes for an outbound request. */
939
940
  export type PlaySecretAuthInput = PlaySecretAuth | readonly PlaySecretAuth[];
940
941
  /**
941
- * The `init` accepted by `ctx.fetch`. Same shape as `RequestInit` plus `auth`.
942
+ * The `init` accepted by `deepline.fetch`. Same shape as `RequestInit` plus `auth`.
942
943
  *
943
944
  * @sdkReference runtime 174 SecretAwareRequestInit
944
945
  */
@@ -946,7 +947,7 @@ export type PlaySecretAwareRequestInit = Omit<RequestInit, 'headers'> & {
946
947
  /** Ordinary request headers, recorded in the durable receipt with any resolved Play secret value redacted. Prefer `auth` for credentials: it enforces HTTPS and keeps the auth header out of the receipt. */
947
948
  headers?: HeadersInit;
948
949
  /**
949
- * One or more credentialed headers for this request. Pass a single `ctx.secrets` auth for the common case, or an array when an API requires multiple credentialed headers. Auth-helper requests require HTTPS and omit the credential from the durable receipt. Each auth entry must target a distinct header.
950
+ * One or more credentialed headers for this request. Pass a single `deepline.secrets` auth for the common case, or an array when an API requires multiple credentialed headers. Auth-helper requests require HTTPS and omit the credential from the durable receipt. Each auth entry must target a distinct header.
950
951
  */
951
952
  auth?: PlaySecretAuthInput;
952
953
  };
@@ -1007,7 +1008,7 @@ export type PlayAuthoringStepResolver<Row, Value, TContext> = (
1007
1008
  export type PlayAuthoringDatasetColumnRunInput<Row, Value, TContext> = {
1008
1009
  /** Current row, including previously computed columns. */
1009
1010
  readonly row: Row;
1010
- /** Runtime context for tool, Play, fetch, and log calls. */
1011
+ /** The play runtime, the same object as `deepline`. */
1011
1012
  readonly ctx: TContext;
1012
1013
  /** Zero-based row index for this dataset run. */
1013
1014
  readonly index: number;
@@ -1267,7 +1268,7 @@ export type PlayAuthoringReferenceLike<
1267
1268
  | { readonly playName: string; readonly name?: string }
1268
1269
  | { readonly name: string; readonly playName?: string }
1269
1270
  ) & {
1270
- /** Type-only input carrier used by ctx.runPlayAsync. */
1271
+ /** Type-only input carrier used by deepline.runPlayAsync. */
1271
1272
  readonly __inputType?: TInput;
1272
1273
  };
1273
1274
 
@@ -1368,7 +1369,7 @@ export type PlayAuthoringRuntimeStepOptions = {
1368
1369
  };
1369
1370
 
1370
1371
  /**
1371
- * Durable freshness for one `ctx.fetch` call. The key identifies the request;
1372
+ * Durable freshness for one `deepline.fetch` call. The key identifies the request;
1372
1373
  * `staleAfterSeconds` controls when that completed request may be reused across
1373
1374
  * Play runs. Edition 11 requires an explicit choice: `null` reuses indefinitely,
1374
1375
  * `0` executes on every new run, and a positive whole number sets the maximum
@@ -1444,27 +1445,27 @@ export type PlayAuthoringRunScope = {
1444
1445
  export const PLAY_AUTHORING_DOCUMENTATION = {
1445
1446
  fetchBatching: {
1446
1447
  warning:
1447
- 'A static ctx.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.',
1448
+ '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.',
1448
1449
  guidance:
1449
- 'Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${ctx.run.id}:signals:${batchIndex}`.',
1450
+ '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}`.',
1450
1451
  },
1451
1452
  runId: {
1452
1453
  semantics:
1453
- 'ctx.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.',
1454
+ 'deepline.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.',
1454
1455
  use: 'Use it when deriving an external idempotency key for a sequence of batches.',
1455
1456
  },
1456
1457
  staticCallKeys: {
1457
1458
  constraint:
1458
- 'Durable call keys — the ctx.fetch key, the ctx.dataset key, the ctx.step id — must be static string literals. The key names a durable receipt, so check, publish, and replay have to agree on it before the body runs. A key computed at runtime cannot be resolved at check time and is rejected.',
1459
+ 'Durable call keys — the deepline.fetch key, the deepline.dataset key, the deepline.step id — must be static string literals. The key names a durable receipt, so check, publish, and replay have to agree on it before the body runs. A key computed at runtime cannot be resolved at check time and is rejected.',
1459
1460
  consequence:
1460
1461
  'This is an architectural constraint, not a style rule. A play cannot loop over a computed key, so it cannot page a large table with a helper like page(pageNumber). Unrolling one literal key per page is not a design at any real page count.',
1461
1462
  workaround:
1462
- 'Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use ctx.dataset with a static key — the per-row receipt identity comes from the row, not from the key.',
1463
+ 'Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use deepline.dataset with a static key — the per-row receipt identity comes from the row, not from the key.',
1463
1464
  },
1464
1465
  } as const;
1465
1466
 
1466
1467
  /**
1467
- * Shown when a ctx.fetch key is present but not statically resolvable. Named
1468
+ * Shown when a deepline.fetch key is present but not statically resolvable. Named
1468
1469
  * separately so the field registry, the check hint, and the generated
1469
1470
  * reference cannot drift from one another.
1470
1471
  */
@@ -1479,14 +1480,14 @@ export interface PlayAuthoringRuntimeContext<
1479
1480
  /**
1480
1481
  * Read current workspace plan benefits. Execution rechecks admission;
1481
1482
  * this read is fresh and is not a durable receipt.
1482
- * @sdkReference runtime 179 ctx.billing.entitlements()
1483
+ * @sdkReference runtime 179 deepline.billing.entitlements()
1483
1484
  */
1484
1485
  entitlements(): Promise<BillingEntitlements>;
1485
1486
  };
1486
1487
 
1487
1488
  /**
1488
1489
  * Load a staged CSV file as a durable dataset handle.
1489
- * @sdkReference runtime 040 ctx.csv(path, options)
1490
+ * @sdkReference runtime 040 deepline.csv(path, options)
1490
1491
  */
1491
1492
  csv<T = Record<string, unknown>>(
1492
1493
  path: string | PlayAuthoringCsvInput<T & object>,
@@ -1495,7 +1496,7 @@ export interface PlayAuthoringRuntimeContext<
1495
1496
 
1496
1497
  /**
1497
1498
  * Create a persisted row dataset and define durable output columns.
1498
- * @sdkReference runtime 060 ctx.dataset(key, items)
1499
+ * @sdkReference runtime 060 deepline.dataset(key, items)
1499
1500
  */
1500
1501
  dataset<TSource extends PlayDatasetInput<object>>(
1501
1502
  key: string,
@@ -1506,7 +1507,7 @@ export interface PlayAuthoringRuntimeContext<
1506
1507
  PlayAuthoringRuntimeContext<TListGetter>
1507
1508
  >;
1508
1509
 
1509
- /** @deprecated `ctx.map(...)` was replaced by `ctx.dataset(...)`. */
1510
+ /** @deprecated `map(...)` was replaced by `dataset(...)`. */
1510
1511
  map<TSource extends PlayDatasetInput<object>>(
1511
1512
  key: string,
1512
1513
  items: TSource,
@@ -1524,7 +1525,7 @@ export interface PlayAuthoringRuntimeContext<
1524
1525
  tools: {
1525
1526
  /**
1526
1527
  * Execute a provider tool through the terminal-result cache contract.
1527
- * @sdkReference runtime 150 ctx.tools.execute(request)
1528
+ * @sdkReference runtime 150 deepline.tools.execute(request)
1528
1529
  */
1529
1530
  execute<TOutput = PlayLooseObject>(
1530
1531
  request: PlayToolExecutionRequest,
@@ -1559,7 +1560,7 @@ export interface PlayAuthoringRuntimeContext<
1559
1560
 
1560
1561
  /**
1561
1562
  * Execute one reusable step program against a scalar input.
1562
- * @sdkReference runtime 180 ctx.runSteps(program, input, options)
1563
+ * @sdkReference runtime 180 deepline.runSteps(program, input, options)
1563
1564
  */
1564
1565
  runSteps<TInput extends Record<string, unknown>, TOutput>(
1565
1566
  program: PlayAuthoringRunnableStepProgram<
@@ -1572,7 +1573,7 @@ export interface PlayAuthoringRuntimeContext<
1572
1573
 
1573
1574
  /**
1574
1575
  * Create one scalar durable checkpoint.
1575
- * @sdkReference runtime 130 ctx.step(id, fn)
1576
+ * @sdkReference runtime 130 deepline.step(id, fn)
1576
1577
  */
1577
1578
  step<T>(
1578
1579
  id: string,
@@ -1583,7 +1584,7 @@ export interface PlayAuthoringRuntimeContext<
1583
1584
  /**
1584
1585
  * Execute a guarded HTTP request. Edition 11 requires an explicit freshness choice; only GET, HEAD, and OPTIONS can retain completed responses. Mutating methods must use `staleAfterSeconds: 0`; the choice governs only the completed call receipt, never dataset/request identity. Failed requests do not publish completed cache entries. A headers timeout leaves an upstream write's outcome unknown and does not establish whether its body was sent. The transport does not automatically retry that timed-out write, but a later invocation can execute it again. Mutating requests require provider-supported idempotency with the same key retained across retries and replay. Deadlines are platform-controlled; callers may cancel through `init.signal`. Pass `{ transient: true }` only on GET, HEAD, and OPTIONS when the response must not be retained in a receipt or checkpoint; edition 11 rejects transient writes. Edition 5+ throws `CtxFetchHttpError` for non-2xx; catch it only when the Play intentionally recovers, otherwise let it fail the Play. Editions 1–4 retain their previous response projections.
1585
1586
  *
1586
- * @sdkReference runtime 170 ctx.fetch(key, url, init)
1587
+ * @sdkReference runtime 170 deepline.fetch(key, url, init)
1587
1588
  */
1588
1589
  fetch(
1589
1590
  key: string,
@@ -1596,7 +1597,7 @@ export interface PlayAuthoringRuntimeContext<
1596
1597
  /**
1597
1598
  * Read an allowed workspace secret inside the running Play; do not log or return it. Declare uppercase names in top-level `secrets`.
1598
1599
  *
1599
- * @sdkReference runtime 171 ctx.secrets.get(name)
1600
+ * @sdkReference runtime 171 deepline.secrets.get(name)
1600
1601
  */
1601
1602
  get(name: string): PlaySecretPromise;
1602
1603
  /**
@@ -1604,7 +1605,7 @@ export interface PlayAuthoringRuntimeContext<
1604
1605
  * its direct promise remains accepted for source compatibility, while other
1605
1606
  * promises are rejected.
1606
1607
  *
1607
- * @sdkReference runtime 172 ctx.secrets.bearer(secret)
1608
+ * @sdkReference runtime 172 deepline.secrets.bearer(secret)
1608
1609
  */
1609
1610
  bearer(
1610
1611
  secret: string | PlaySecretPromise | PlaySecretHandle,
@@ -1613,7 +1614,7 @@ export interface PlayAuthoringRuntimeContext<
1613
1614
  * Send a credential as a named header, for APIs that do not use bearer
1614
1615
  * tokens — `x-api-key`, `apikey`, `private-token`, and similar.
1615
1616
  *
1616
- * @sdkReference runtime 173 ctx.secrets.header(header, secret)
1617
+ * @sdkReference runtime 173 deepline.secrets.header(header, secret)
1617
1618
  */
1618
1619
  header(
1619
1620
  header: string,
@@ -1623,7 +1624,7 @@ export interface PlayAuthoringRuntimeContext<
1623
1624
 
1624
1625
  /**
1625
1626
  * Compose another Play inline under a stable call key.
1626
- * @sdkReference runtime 140 ctx.runPlay(key, playRef, input, options)
1627
+ * @sdkReference runtime 140 deepline.runPlay(key, playRef, input, options)
1627
1628
  */
1628
1629
  runPlay<TOutput = unknown>(
1629
1630
  key: string,
@@ -1634,14 +1635,14 @@ export interface PlayAuthoringRuntimeContext<
1634
1635
 
1635
1636
  /**
1636
1637
  * Admit an independent scalar Play Run and return its durable identity after scheduler admission, before child completion.
1637
- * @sdkReference runtime 141 ctx.runPlayAsync(key, playRef, input, options)
1638
+ * @sdkReference runtime 141 deepline.runPlayAsync(key, playRef, input, options)
1638
1639
  */
1639
1640
  runPlayAsync<TInput extends Record<string, unknown>>(
1640
1641
  /** Replay-stable identity for this launch site and row scope. */
1641
1642
  key: string,
1642
- /** Independently published Play name or definePlay handle carrying its input type. */
1643
+ /** Independently published Play name, or an imported play carrying its input type. */
1643
1644
  playRef: PlayAuthoringReferenceLike<TInput>,
1644
- /** Input checked against the referenced definePlay handle when available. */
1645
+ /** Input checked against the imported play when available. */
1645
1646
  input: NoInfer<TInput>,
1646
1647
  /** Human-readable launch purpose recorded in the parent's step history. */
1647
1648
  options: PlayAuthoringAsyncCallOptions,