deepline 0.3.88 → 0.3.89

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 (121) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +534 -4
  2. package/dist/bundling-sources/sdk/src/config.ts +77 -0
  3. package/dist/bundling-sources/sdk/src/http.ts +76 -30
  4. package/dist/bundling-sources/sdk/src/index.ts +6 -0
  5. package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/play.ts +15 -1
  7. package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -2
  8. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  9. package/dist/bundling-sources/sdk/src/types.ts +83 -4
  10. package/dist/bundling-sources/shared_libs/integration-contracts/AGENTS.md +9 -0
  11. package/dist/bundling-sources/shared_libs/integration-contracts/README.md +3 -0
  12. package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +2 -0
  13. package/dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts +77 -0
  14. package/dist/bundling-sources/shared_libs/monitors/billing/charges.ts +125 -0
  15. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +686 -0
  16. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +54 -0
  17. package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +72 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/session.ts +45 -0
  19. package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +454 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +260 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +215 -0
  22. package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +333 -0
  23. package/dist/bundling-sources/shared_libs/monitors/cursor-page.ts +42 -0
  24. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +16 -0
  25. package/dist/bundling-sources/shared_libs/monitors/framework-managed-payload-fields.ts +71 -0
  26. package/dist/bundling-sources/shared_libs/monitors/generated/provider-monitor-callback-admission-targets.ts +16 -0
  27. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +267 -0
  28. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +39 -0
  29. package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +82 -0
  30. package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +473 -0
  31. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +1 -1
  32. package/dist/bundling-sources/shared_libs/monitors/package.json +29 -0
  33. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +1125 -0
  34. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +263 -0
  35. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +964 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +56 -0
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +131 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +535 -0
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts +16 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +56 -0
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +28 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-runtime-read-eligibility.ts +38 -0
  43. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +122 -0
  44. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-status.ts +10 -0
  45. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +112 -0
  46. package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +300 -0
  47. package/dist/bundling-sources/shared_libs/monitors/quickstart-prompts.ts +22 -0
  48. package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +93 -0
  49. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +332 -0
  50. package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +221 -0
  51. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +105 -0
  52. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +73 -0
  53. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +81 -0
  54. package/dist/bundling-sources/shared_libs/monitors/tsconfig.json +10 -0
  55. package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +6 -11
  56. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +90 -12
  57. package/dist/bundling-sources/shared_libs/play-runtime/async-play-invocation.ts +78 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/checkpoint-boundaries.ts +70 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +407 -53
  60. package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +1 -32
  61. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +57 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +20 -1
  63. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +6 -0
  64. package/dist/bundling-sources/shared_libs/play-runtime/execution-protocol.ts +7 -1
  65. package/dist/bundling-sources/shared_libs/play-runtime/lane-retirement-gate.ts +189 -0
  66. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +28 -0
  67. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +2 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +23 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +1 -1
  70. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +18 -4
  71. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-start-admission.ts +68 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +2 -0
  73. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +1 -0
  74. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +10 -8
  75. package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +20 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +6 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +6 -0
  78. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +24 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +30 -1
  80. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +1 -1
  81. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -1
  82. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +6 -3
  83. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +454 -17
  84. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +19 -4
  85. package/dist/bundling-sources/shared_libs/plays/contracts.ts +6 -14
  86. package/dist/bundling-sources/shared_libs/plays/core.ts +11 -6
  87. package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +16 -11
  88. package/dist/bundling-sources/shared_libs/plays/email-status.ts +1 -1
  89. package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +1 -1
  90. package/dist/bundling-sources/shared_libs/plays/slug.ts +115 -0
  91. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +44 -14
  92. package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +2 -2
  93. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +877 -0
  94. package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +456 -0
  95. package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +560 -0
  96. package/dist/bundling-sources/shared_libs/product-notifications/content.ts +28 -0
  97. package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +59 -0
  98. package/dist/bundling-sources/shared_libs/product-notifications/email.ts +246 -0
  99. package/dist/bundling-sources/shared_libs/product-notifications/evaluation.ts +280 -0
  100. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +433 -0
  101. package/dist/bundling-sources/shared_libs/product-notifications/legacy-slack.ts +80 -0
  102. package/dist/bundling-sources/shared_libs/product-notifications/workspace.ts +38 -0
  103. package/dist/bundling-sources/shared_libs/runtime-env.ts +6 -0
  104. package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +28 -0
  105. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +50 -0
  106. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +267 -0
  107. package/dist/cli/index.js +1070 -193
  108. package/dist/cli/index.mjs +1057 -180
  109. package/dist/{compiler-manifest-Dbov16F7.d.mts → compiler-manifest-DsLbQaew.d.mts} +132 -8
  110. package/dist/{compiler-manifest-Dbov16F7.d.ts → compiler-manifest-DsLbQaew.d.ts} +132 -8
  111. package/dist/index.d.mts +834 -12
  112. package/dist/index.d.ts +834 -12
  113. package/dist/index.js +469 -40
  114. package/dist/index.mjs +469 -40
  115. package/dist/install-integrity.json +65 -4
  116. package/dist/plays/bundle-play-file.d.mts +8 -3
  117. package/dist/plays/bundle-play-file.d.ts +8 -3
  118. package/dist/plays/bundle-play-file.mjs +100 -20
  119. package/package.json +3 -1
  120. /package/dist/bundling-sources/shared_libs/{integrations/bettercontact-execution-policy.ts → integration-contracts/bettercontact/execution-policy.ts} +0 -0
  121. /package/dist/bundling-sources/shared_libs/{integrations/theirstack-execution-policy.ts → integration-contracts/theirstack/execution-policy.ts} +0 -0
package/dist/index.mjs CHANGED
@@ -691,7 +691,10 @@ function resolveConfig(options) {
691
691
  apiKey,
692
692
  baseUrl,
693
693
  timeout: options?.timeout ?? DEFAULT_TIMEOUT,
694
- maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES
694
+ maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
695
+ // Pass through untouched: the transport owns case-insensitive merging so
696
+ // there is exactly one place that decides which header wins.
697
+ ...options?.headers ? { headers: { ...options.headers } } : {}
695
698
  };
696
699
  }
697
700
 
@@ -744,7 +747,7 @@ var SDK_RELEASE = {
744
747
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
745
748
  // getters keep their established compatibility behavior.
746
749
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
747
- version: "0.3.88",
750
+ version: "0.3.89",
748
751
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
749
752
  packageCapabilities: {
750
753
  updatePreferences: 1
@@ -1289,11 +1292,33 @@ function normalizeRequestAbortError(error, input) {
1289
1292
  }
1290
1293
  return normalized;
1291
1294
  }
1295
+ function applyExplicitHeaders(headers, explicit) {
1296
+ if (!explicit) return headers;
1297
+ for (const [rawName, value] of Object.entries(explicit)) {
1298
+ const name = rawName.trim().toLowerCase();
1299
+ if (!name) continue;
1300
+ for (const existing of Object.keys(headers)) {
1301
+ if (existing.toLowerCase() === name) delete headers[existing];
1302
+ }
1303
+ headers[name] = value;
1304
+ }
1305
+ return headers;
1306
+ }
1292
1307
  function isAbortLikeError(error) {
1293
1308
  const name = error.name.toLowerCase();
1294
1309
  const message = error.message.toLowerCase();
1295
1310
  return name === "aborterror" || message.includes("operation was aborted") || message === "aborted";
1296
1311
  }
1312
+ function withErrorCause(error, cause) {
1313
+ if (cause !== null && cause !== void 0) {
1314
+ Object.defineProperty(error, "cause", {
1315
+ value: cause,
1316
+ configurable: true,
1317
+ writable: true
1318
+ });
1319
+ }
1320
+ return error;
1321
+ }
1297
1322
  function mapNetworkError(baseUrl, error, targetLabel2) {
1298
1323
  const tagged = error;
1299
1324
  const timeoutMs = tagged?.[REQUEST_TIMEOUT_MARKER];
@@ -1410,7 +1435,7 @@ var HttpClient = class {
1410
1435
  if (coordinatorInternalToken?.trim() && (coordinatorUrl?.trim() || workerCallbackUrl?.trim() || runtimeTestFault?.trim() || absurdReleaseOverride?.trim() || preferredReceiptGatewayMachineId?.trim())) {
1411
1436
  headers[COORDINATOR_INTERNAL_TOKEN_HEADER] = coordinatorInternalToken.trim();
1412
1437
  }
1413
- return headers;
1438
+ return applyExplicitHeaders(headers, this.config.headers);
1414
1439
  }
1415
1440
  /**
1416
1441
  * Send an HTTP request with automatic retries and error handling.
@@ -1564,32 +1589,38 @@ var HttpClient = class {
1564
1589
  );
1565
1590
  if (options?.toolId) {
1566
1591
  const code = mappedNetworkError.code;
1567
- throw new ToolExecutionError(
1568
- withCoworkNetworkHint(mappedNetworkError.message),
1569
- {
1570
- toolId: options.toolId,
1571
- provider: providerLabelFromToolId(options.toolId),
1572
- operation: options.toolId,
1573
- code,
1574
- origin: "deepline",
1575
- category: "network",
1576
- // A direct client timeout has ambiguous delivery. Fail closed unless
1577
- // the server returns the authoritative action delivery contract.
1578
- retryable: false,
1579
- statusCode: null,
1580
- requestId: null,
1581
- retryAfterMs: null,
1582
- networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1583
- networkScope: "client_to_deepline",
1584
- details: mappedNetworkError.details
1585
- }
1592
+ throw withErrorCause(
1593
+ new ToolExecutionError(
1594
+ withCoworkNetworkHint(mappedNetworkError.message),
1595
+ {
1596
+ toolId: options.toolId,
1597
+ provider: providerLabelFromToolId(options.toolId),
1598
+ operation: options.toolId,
1599
+ code,
1600
+ origin: "deepline",
1601
+ category: "network",
1602
+ // A direct client timeout has ambiguous delivery. Fail closed unless
1603
+ // the server returns the authoritative action delivery contract.
1604
+ retryable: false,
1605
+ statusCode: null,
1606
+ requestId: null,
1607
+ retryAfterMs: null,
1608
+ networkKind: code === "NETWORK_TIMEOUT" ? "timeout" : code === "NETWORK_ABORTED" ? "unknown" : "unavailable",
1609
+ networkScope: "client_to_deepline",
1610
+ details: mappedNetworkError.details
1611
+ }
1612
+ ),
1613
+ lastError
1586
1614
  );
1587
1615
  }
1588
- throw new DeeplineError(
1589
- withCoworkNetworkHint(mappedNetworkError.message),
1590
- void 0,
1591
- mappedNetworkError.code,
1592
- mappedNetworkError.details
1616
+ throw withErrorCause(
1617
+ new DeeplineError(
1618
+ withCoworkNetworkHint(mappedNetworkError.message),
1619
+ void 0,
1620
+ mappedNetworkError.code,
1621
+ mappedNetworkError.details
1622
+ ),
1623
+ lastError
1593
1624
  );
1594
1625
  }
1595
1626
  /**
@@ -1938,6 +1969,13 @@ var PRODUCT_NOTIFICATION_DELIVERY_LEASE_MS = 2 * 6e4;
1938
1969
  var PRODUCT_NOTIFICATION_SUCCESS_TTL_MS = 15 * 6e4;
1939
1970
  var PRODUCT_NOTIFICATION_FAILURE_TTL_MS = 24 * 60 * 6e4;
1940
1971
 
1972
+ // ../product-notifications/configuration.ts
1973
+ var PRODUCT_NOTIFICATION_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1974
+ function normalizeProductNotificationEmail(value) {
1975
+ const email = typeof value === "string" ? value.trim().toLowerCase() : "";
1976
+ return email && email.length <= 320 && PRODUCT_NOTIFICATION_EMAIL_PATTERN.test(email) ? email : null;
1977
+ }
1978
+
1941
1979
  // src/stream-reconnect.ts
1942
1980
  var STREAM_RECONNECT_BASE_DELAY_MS = 500;
1943
1981
  var STREAM_RECONNECT_MAX_DELAY_MS = 15e3;
@@ -2466,7 +2504,7 @@ function isRecord4(value) {
2466
2504
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
2467
2505
  }
2468
2506
  function isPlayActivityObservation(value) {
2469
- if (!isRecord4(value) || value.schemaVersion !== 1 || typeof value.activityId !== "string" || !value.activityId.trim() || typeof value.observedAt !== "number" || !Number.isFinite(value.observedAt) || !isRecord4(value.target) || !isRecord4(value.state)) {
2507
+ if (!isRecord4(value) || value.schemaVersion !== void 0 && value.schemaVersion !== 1 || typeof value.activityId !== "string" || !value.activityId.trim() || typeof value.observedAt !== "number" || !Number.isFinite(value.observedAt) || !isRecord4(value.target) || !isRecord4(value.state)) {
2470
2508
  return false;
2471
2509
  }
2472
2510
  const targetKinds = /* @__PURE__ */ new Set([
@@ -2573,7 +2611,6 @@ function projectPlayRunActivity(input) {
2573
2611
  if (input.waitKind === "detached_runner") {
2574
2612
  return projection(
2575
2613
  {
2576
- schemaVersion: 1,
2577
2614
  activityId: "runner:managed",
2578
2615
  target: {
2579
2616
  kind: "runner",
@@ -2589,7 +2626,6 @@ function projectPlayRunActivity(input) {
2589
2626
  if (input.waitKind === "sleep") {
2590
2627
  return projection(
2591
2628
  {
2592
- schemaVersion: 1,
2593
2629
  activityId: "run:sleep",
2594
2630
  target: {
2595
2631
  kind: "step",
@@ -2609,7 +2645,6 @@ function projectPlayRunActivity(input) {
2609
2645
  if (input.waitKind === "integration_event" || input.waitKind === "integration_event_batch") {
2610
2646
  return projection(
2611
2647
  {
2612
- schemaVersion: 1,
2613
2648
  activityId: `event:${input.activeNodeId ?? "run"}`,
2614
2649
  stepId: input.activeNodeId ?? void 0,
2615
2650
  target: {
@@ -2633,7 +2668,6 @@ function projectPlayRunActivity(input) {
2633
2668
  if (normalizedStatus === "waiting") {
2634
2669
  return projection(
2635
2670
  {
2636
- schemaVersion: 1,
2637
2671
  activityId: "run:legacy-wait",
2638
2672
  target: {
2639
2673
  kind: "step",
@@ -2660,7 +2694,6 @@ function projectPlayRunActivity(input) {
2660
2694
  const datasetProgress = datasetStep?.progress ?? null;
2661
2695
  return projection(
2662
2696
  {
2663
- schemaVersion: 1,
2664
2697
  activityId: `dataset:${pendingDataset.datasetId ?? pendingDataset.tableNamespace}`,
2665
2698
  target: {
2666
2699
  kind: "dataset",
@@ -2688,7 +2721,6 @@ function projectPlayRunActivity(input) {
2688
2721
  const provider = toolId?.split(/[._]/)[0]?.trim() || null;
2689
2722
  return projection(
2690
2723
  {
2691
- schemaVersion: 1,
2692
2724
  activityId: `step:${activeStep.nodeId}`,
2693
2725
  stepId: activeStep.nodeId,
2694
2726
  target: toolId && provider ? {
@@ -2713,7 +2745,6 @@ function projectPlayRunActivity(input) {
2713
2745
  if (normalizedStatus === "queued") {
2714
2746
  return projection(
2715
2747
  {
2716
- schemaVersion: 1,
2717
2748
  activityId: "capacity:worker",
2718
2749
  target: { kind: "capacity", pool: "worker" },
2719
2750
  state: { kind: "queued", reason: "capacity" },
@@ -2723,7 +2754,6 @@ function projectPlayRunActivity(input) {
2723
2754
  );
2724
2755
  }
2725
2756
  const fallback = {
2726
- schemaVersion: 1,
2727
2757
  activityId: "run:legacy",
2728
2758
  target: {
2729
2759
  kind: "step",
@@ -3738,7 +3768,7 @@ async function* observeRunEvents(options) {
3738
3768
  }
3739
3769
  }
3740
3770
 
3741
- // ../../shared_libs/integrations/theirstack-execution-policy.ts
3771
+ // ../integration-contracts/theirstack/execution-policy.ts
3742
3772
  var THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS = 135e3;
3743
3773
  var THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS = 6e4 + THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS + 15e3;
3744
3774
  var THEIRSTACK_COMPANY_SEARCH_CLIENT_TIMEOUT_MS = 21e4;
@@ -3792,7 +3822,7 @@ function resolveTheirstackClientTimeoutMs(endpointId, payload) {
3792
3822
  return usesExtendedTheirstackJobSearchBudget(endpointId, payload) ? THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS : null;
3793
3823
  }
3794
3824
 
3795
- // ../../shared_libs/integrations/bettercontact-execution-policy.ts
3825
+ // ../integration-contracts/bettercontact/execution-policy.ts
3796
3826
  var BETTERCONTACT_LAUNCHER_CLIENT_TIMEOUT_MS = 12e4;
3797
3827
  var BETTERCONTACT_LAUNCHER_TOOL_IDS = /* @__PURE__ */ new Set([
3798
3828
  "bettercontact_enrich",
@@ -3883,6 +3913,42 @@ function providerMetaFromToolResponseRawV2(rawV2, view) {
3883
3913
  }
3884
3914
 
3885
3915
  // src/client.ts
3916
+ var MAX_NOTIFICATION_GROUP_CREATE_TARGETS = 50;
3917
+ function parseNotificationGroupTarget(value) {
3918
+ const normalized = value.trim();
3919
+ if (normalized.toLowerCase().startsWith("email:")) {
3920
+ const email = normalizeProductNotificationEmail(normalized.slice(6));
3921
+ if (!email) {
3922
+ throw new Error(
3923
+ `Invalid email notification target "${value}". Use --to email:name@example.com.`
3924
+ );
3925
+ }
3926
+ return { kind: "email", email };
3927
+ }
3928
+ const slack = /^slack:(.+)$/i.exec(normalized)?.[1]?.trim();
3929
+ if (!slack) {
3930
+ const provider = normalized.split(":", 1)[0] || normalized;
3931
+ throw new Error(
3932
+ `Unsupported notification destination "${provider}". Use email: or slack:.`
3933
+ );
3934
+ }
3935
+ const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
3936
+ if (member?.[1]) {
3937
+ return { kind: "slack", memberId: member[1].toUpperCase() };
3938
+ }
3939
+ if (slack.toLowerCase().startsWith("member:")) {
3940
+ throw new Error(
3941
+ "Slack member IDs must look like slack:member:U0123456789."
3942
+ );
3943
+ }
3944
+ if (!slack.replace(/^#/, "").trim()) {
3945
+ throw new Error("Use --to slack:#channel.");
3946
+ }
3947
+ return { kind: "slack", channel: slack };
3948
+ }
3949
+ function notificationObjectKey(kind) {
3950
+ return `${kind}.${globalThis.crypto.randomUUID()}`;
3951
+ }
3886
3952
  var TERMINAL_PLAY_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
3887
3953
  var INCLUDE_TOOL_METADATA_HEADER = "x-deepline-include-tool-metadata";
3888
3954
  var EXECUTE_RESPONSE_CONTRACT_HEADER = "x-deepline-execute-response-contract";
@@ -4452,6 +4518,10 @@ var DeeplineClient = class {
4452
4518
  audit: (options2) => this.auditMonitors(options2),
4453
4519
  repair: (options2) => this.repairMonitors(options2),
4454
4520
  health: (options2) => this.readMonitorsHealth(options2),
4521
+ batch: {
4522
+ submit: (options2) => this.submitMonitorBatch(options2),
4523
+ get: (operationId, options2) => this.getMonitorBatch(operationId, options2)
4524
+ },
4455
4525
  fleets: {
4456
4526
  sync: (definitionOrId, options2) => this.syncMonitorFleet(definitionOrId, options2),
4457
4527
  get: (fleetId, options2) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options2),
@@ -4584,6 +4654,16 @@ var DeeplineClient = class {
4584
4654
  (secret) => secret.name === normalized && secret.status === "active" && secret.hasValue
4585
4655
  ) ?? null;
4586
4656
  }
4657
+ /** Check effective scope and active-version health without reading the value.
4658
+ * Without playName, checks the organization-scoped secret only. With a Play
4659
+ * name, an active Play secret takes precedence; a deleted/disabled Play
4660
+ * secret falls back to the organization-scoped secret.
4661
+ */
4662
+ async inspectSecret(name, options = {}) {
4663
+ const params = new URLSearchParams({ name: name.trim().toUpperCase() });
4664
+ if (options.playName !== void 0) params.set("play", options.playName);
4665
+ return this.http.get(`/api/v2/secrets?${params.toString()}`);
4666
+ }
4587
4667
  // ——————————————————————————————————————————————————————————
4588
4668
  // Tools
4589
4669
  // ——————————————————————————————————————————————————————————
@@ -4675,6 +4755,10 @@ var DeeplineClient = class {
4675
4755
  `/api/v2/integrations/${encodeURIComponent(toolId)}/get`,
4676
4756
  {
4677
4757
  method: "GET",
4758
+ // Tool metadata is a read-only catalog lookup. Keep the metadata
4759
+ // header while opting into the same transient edge-response retries as
4760
+ // other GET catalog methods such as searchTools().
4761
+ retryApiErrors: true,
4678
4762
  headers: {
4679
4763
  "x-deepline-tool-meta-only": "1"
4680
4764
  }
@@ -6130,6 +6214,197 @@ var DeeplineClient = class {
6130
6214
  async getNotifications() {
6131
6215
  return this.http.get("/api/v2/notifications");
6132
6216
  }
6217
+ /** Read the group-based product-notification configuration and rule catalog. */
6218
+ async getNotificationConfiguration() {
6219
+ return this.http.get("/api/v2/notifications/configuration");
6220
+ }
6221
+ /** Atomically apply one retry-safe desired configuration change. */
6222
+ async changeNotificationConfiguration(expectedWorkspaceVersion, change) {
6223
+ return this.http.put("/api/v2/notifications/configuration", {
6224
+ expectedWorkspaceVersion,
6225
+ change
6226
+ });
6227
+ }
6228
+ /** Create one notification group and its destinations as a retry-safe unit. */
6229
+ async createNotificationGroup(input) {
6230
+ const name = input.name.trim().replace(/\s+/g, " ");
6231
+ if (!name) throw new Error("Notification group name is required.");
6232
+ if (input.targets.length < 1 || input.targets.length > MAX_NOTIFICATION_GROUP_CREATE_TARGETS) {
6233
+ throw new Error(
6234
+ `Choose between 1 and ${MAX_NOTIFICATION_GROUP_CREATE_TARGETS} notification targets.`
6235
+ );
6236
+ }
6237
+ const targets = input.targets.map(parseNotificationGroupTarget);
6238
+ const legacyEvents = input.legacyEvents ?? [];
6239
+ const legacyTarget = targets.length === 1 && targets[0]?.kind === "slack" && legacyEvents.length > 0 ? targets[0] : null;
6240
+ if (legacyEvents.length > 0 && !legacyTarget) {
6241
+ throw new Error(
6242
+ "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
6243
+ );
6244
+ }
6245
+ if (!legacyTarget && name.toLowerCase() === "default") {
6246
+ throw new Error(
6247
+ "Default is reserved for the workspace default notification group."
6248
+ );
6249
+ }
6250
+ const normalizedTargets = targets.map(
6251
+ (target) => target.kind === "email" ? `email:${target.email}` : "memberId" in target ? `slack:member:${target.memberId}` : `slack:${target.channel}`
6252
+ );
6253
+ if (input.dryRun) {
6254
+ return {
6255
+ mode: "dry_run",
6256
+ compatibilityMode: legacyTarget !== null,
6257
+ name: legacyTarget ? input.name : name,
6258
+ targets: normalizedTargets,
6259
+ legacyEvents
6260
+ };
6261
+ }
6262
+ if (legacyTarget) {
6263
+ const notification = await this.createNotification({
6264
+ name: input.name,
6265
+ provider: "slack",
6266
+ ..."channel" in legacyTarget ? { channel: legacyTarget.channel } : { memberId: legacyTarget.memberId },
6267
+ eventTypes: legacyEvents
6268
+ });
6269
+ return { mode: "legacy", notification };
6270
+ }
6271
+ const current = await this.getNotificationConfiguration();
6272
+ const existingGroup = current.configuration.groups.find(
6273
+ (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
6274
+ );
6275
+ const groupKey = existingGroup?.groupKey ?? notificationObjectKey("group");
6276
+ const group = existingGroup ?? {
6277
+ groupKey,
6278
+ name,
6279
+ enabled: true,
6280
+ deliveryTiming: { mode: "immediate" },
6281
+ source: "workspace",
6282
+ configMode: "custom",
6283
+ version: 0
6284
+ };
6285
+ const destinations = current.configuration.destinations.filter(
6286
+ (destination) => destination.groupKey === groupKey
6287
+ );
6288
+ const emails = [
6289
+ ...new Set(
6290
+ targets.flatMap(
6291
+ (target) => target.kind === "email" ? [target.email] : []
6292
+ )
6293
+ )
6294
+ ].sort();
6295
+ const existingEmails = new Set(
6296
+ destinations.flatMap(
6297
+ (destination) => destination.settings.kind === "email_addresses" ? destination.settings.to : []
6298
+ )
6299
+ );
6300
+ const newEmails = emails.filter((email) => !existingEmails.has(email));
6301
+ if (newEmails.length > 0) {
6302
+ destinations.push({
6303
+ destinationKey: notificationObjectKey("destination"),
6304
+ groupKey,
6305
+ name: "Email recipients",
6306
+ enabled: true,
6307
+ source: "workspace",
6308
+ configMode: "custom",
6309
+ version: 0,
6310
+ status: "active",
6311
+ settings: { kind: "email_addresses", to: newEmails }
6312
+ });
6313
+ }
6314
+ const slackTargets = /* @__PURE__ */ new Map();
6315
+ for (const target of targets) {
6316
+ if (target.kind !== "slack") continue;
6317
+ const targetKey = "memberId" in target ? `member:${target.memberId}` : `channel:${target.channel.replace(/^#/, "").toLowerCase()}`;
6318
+ slackTargets.set(targetKey, target);
6319
+ }
6320
+ const connectionId = current.slackConnection.connectionId;
6321
+ if (slackTargets.size > 0 && !connectionId) {
6322
+ throw new Error(
6323
+ "Slack is not connected to this workspace. Connect it in Dashboard \u2192 Integrations, then retry."
6324
+ );
6325
+ }
6326
+ const resolvedSlackTargets = await Promise.all(
6327
+ [...slackTargets.values()].map(async (target) => {
6328
+ if ("memberId" in target) {
6329
+ return {
6330
+ targetKind: "member",
6331
+ targetId: target.memberId,
6332
+ targetName: target.memberId
6333
+ };
6334
+ }
6335
+ const channel = target.channel;
6336
+ const requested = channel.replace(/^#/, "");
6337
+ const response = await this.listNotificationChannels(channel);
6338
+ const matches = response.channels.filter(
6339
+ (candidate) => candidate.id === requested || candidate.name.toLowerCase() === requested.toLowerCase()
6340
+ );
6341
+ if (matches.length !== 1) {
6342
+ throw new Error(
6343
+ matches.length === 0 ? `Slack channel ${channel} was not found or is not visible to the Deepline app.` : `Slack channel ${channel} is ambiguous. Use its channel ID.`
6344
+ );
6345
+ }
6346
+ return {
6347
+ targetKind: "channel",
6348
+ targetId: matches[0].id,
6349
+ targetName: matches[0].name
6350
+ };
6351
+ })
6352
+ );
6353
+ const uniqueSlackTargets = new Map(
6354
+ resolvedSlackTargets.map((target) => [
6355
+ `${target.targetKind}:${target.targetId}`,
6356
+ target
6357
+ ])
6358
+ );
6359
+ for (const target of uniqueSlackTargets.values()) {
6360
+ if (destinations.some(
6361
+ (destination) => destination.settings.kind === "slack" && destination.settings.targetKind === target.targetKind && destination.settings.targetId === target.targetId
6362
+ )) {
6363
+ continue;
6364
+ }
6365
+ destinations.push({
6366
+ destinationKey: notificationObjectKey("destination"),
6367
+ groupKey,
6368
+ name: `${target.targetKind === "channel" ? "#" : "@"}${target.targetName}`,
6369
+ enabled: true,
6370
+ source: "workspace",
6371
+ configMode: "custom",
6372
+ version: 0,
6373
+ status: "pending_verification",
6374
+ settings: {
6375
+ kind: "slack",
6376
+ ...target,
6377
+ oauthConnectionId: connectionId
6378
+ }
6379
+ });
6380
+ }
6381
+ const draft = {
6382
+ group,
6383
+ destinations,
6384
+ rules: current.configuration.rules.filter(
6385
+ (rule) => rule.groupKey === groupKey
6386
+ )
6387
+ };
6388
+ const result = await this.changeNotificationConfiguration(
6389
+ current.configuration.workspaceVersion,
6390
+ { kind: "save_group", draft }
6391
+ );
6392
+ const storedGroup = result.configuration.groups.find(
6393
+ (candidate) => candidate.groupKey === groupKey
6394
+ );
6395
+ if (!storedGroup) {
6396
+ throw new Error("Notification group creation returned no saved group.");
6397
+ }
6398
+ return {
6399
+ mode: "native",
6400
+ groupKey,
6401
+ targets: normalizedTargets,
6402
+ group: storedGroup,
6403
+ destinations: result.configuration.destinations.filter(
6404
+ (destination) => destination.groupKey === groupKey
6405
+ )
6406
+ };
6407
+ }
6133
6408
  /** List Slack channels available to an already-connected Slack integration. */
6134
6409
  async listNotificationChannels(query) {
6135
6410
  const suffix = query ? `?search=${encodeURIComponent(query)}` : "";
@@ -6674,6 +6949,78 @@ var DeeplineClient = class {
6674
6949
  { method: "GET" }
6675
6950
  );
6676
6951
  }
6952
+ /** Submit durable monitor work; transport retries use the same idempotency key. */
6953
+ async submitMonitorBatch(options) {
6954
+ const idempotencyKey = options.idempotencyKey.trim();
6955
+ if (!idempotencyKey) {
6956
+ throw new DeeplineError(
6957
+ "Monitor batch idempotencyKey is required.",
6958
+ void 0,
6959
+ "INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
6960
+ );
6961
+ }
6962
+ if (options.kind === "deploy") {
6963
+ if (!options.manifestNdjson.trim()) {
6964
+ throw new DeeplineError(
6965
+ "Monitor batch deploy requires a non-empty NDJSON manifest.",
6966
+ void 0,
6967
+ "INVALID_MONITOR_BATCH_MANIFEST"
6968
+ );
6969
+ }
6970
+ return this.http.request(
6971
+ "/api/v2/monitors/batch",
6972
+ {
6973
+ method: "POST",
6974
+ body: {
6975
+ kind: "deploy",
6976
+ manifest_ndjson: options.manifestNdjson,
6977
+ dry_run: options.dryRun === true,
6978
+ idempotency_key: idempotencyKey
6979
+ },
6980
+ headers: { "Idempotency-Key": idempotencyKey },
6981
+ maxRetries: 0,
6982
+ exactUrlOnly: true
6983
+ }
6984
+ );
6985
+ }
6986
+ const scope = options.scope.kind === "keys" ? { kind: "keys", monitor_keys: options.scope.monitorKeys } : options.scope.kind === "fleet" ? { kind: "fleet", fleet_id: options.scope.fleetId } : { kind: "target", target: options.scope.target };
6987
+ return this.http.request(
6988
+ "/api/v2/monitors/batch",
6989
+ {
6990
+ method: "POST",
6991
+ body: {
6992
+ kind: options.kind,
6993
+ scope,
6994
+ dry_run: options.dryRun === true,
6995
+ idempotency_key: idempotencyKey,
6996
+ ...options.deactivationReason === void 0 ? {} : { deactivation_reason: options.deactivationReason }
6997
+ },
6998
+ headers: { "Idempotency-Key": idempotencyKey },
6999
+ // Durable submission is itself idempotent, but an ambiguous local retry
7000
+ // must retain the exact key and never turn a CLI attempt into two runs.
7001
+ maxRetries: 0,
7002
+ exactUrlOnly: true
7003
+ }
7004
+ );
7005
+ }
7006
+ /** Get durable batch progress and a bounded retained evidence page. */
7007
+ async getMonitorBatch(operationId, options) {
7008
+ const runId = operationId.trim();
7009
+ if (!runId) {
7010
+ throw new DeeplineError(
7011
+ "Monitor batch operation id is required.",
7012
+ void 0,
7013
+ "INVALID_MONITOR_BATCH_OPERATION_ID"
7014
+ );
7015
+ }
7016
+ const params = new URLSearchParams();
7017
+ if (options?.cursor) params.set("cursor", options.cursor);
7018
+ const suffix = params.size > 0 ? `?${params}` : "";
7019
+ return this.http.request(
7020
+ `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
7021
+ { method: "GET" }
7022
+ );
7023
+ }
6677
7024
  /**
6678
7025
  * The deployable monitor tools catalog. Pass a tool id (positional or
6679
7026
  * `{ tool }`) to describe one tool's full payload/stream contract, or no tool
@@ -9554,6 +9901,82 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
9554
9901
  description: "Unsupported legacy child-workflow timeout.",
9555
9902
  errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."
9556
9903
  },
9904
+ "ctx.runPlayAsync.key": {
9905
+ schema: Type.String({ minLength: 1 }),
9906
+ fixtures: {
9907
+ valid: "request-approval",
9908
+ invalid: "",
9909
+ absent: void 0,
9910
+ unresolved: { expression: "callKey" },
9911
+ edition1: "request-approval"
9912
+ },
9913
+ referenceType: "string",
9914
+ required: true,
9915
+ resolution: "runtime-dynamic",
9916
+ issueCode: "play_authoring_run_play_option_invalid",
9917
+ description: "Stable identity for one independent child Play Run.",
9918
+ errorMessage: "ctx.runPlayAsync key must be a non-empty string."
9919
+ },
9920
+ "ctx.runPlayAsync.playRef": {
9921
+ schema: Type.Union([
9922
+ Type.String({ minLength: 1 }),
9923
+ Type.Union([
9924
+ Type.Object(
9925
+ { playName: Type.String({ minLength: 1 }) },
9926
+ { additionalProperties: true }
9927
+ ),
9928
+ Type.Object(
9929
+ { name: Type.String({ minLength: 1 }) },
9930
+ { additionalProperties: true }
9931
+ )
9932
+ ])
9933
+ ]),
9934
+ fixtures: {
9935
+ valid: "request-approval",
9936
+ invalid: {},
9937
+ absent: void 0,
9938
+ unresolved: { expression: "playRef" },
9939
+ edition1: "request-approval"
9940
+ },
9941
+ referenceType: "string | PlayReferenceLike",
9942
+ required: true,
9943
+ resolution: "runtime-dynamic",
9944
+ issueCode: "play_authoring_run_play_option_invalid",
9945
+ description: "Independently published scalar child Play name or strongly typed definition handle.",
9946
+ errorMessage: "ctx.runPlayAsync playRef must be a non-empty Play name or definition handle."
9947
+ },
9948
+ "ctx.runPlayAsync.input": {
9949
+ schema: Type.Record(Type.String(), Type.Unknown()),
9950
+ fixtures: {
9951
+ valid: { draftId: "draft-1" },
9952
+ invalid: "draft-1",
9953
+ absent: void 0,
9954
+ unresolved: "childInput",
9955
+ edition1: {}
9956
+ },
9957
+ referenceType: "Record<string, unknown>",
9958
+ required: true,
9959
+ resolution: "runtime-dynamic",
9960
+ issueCode: "play_authoring_run_play_option_invalid",
9961
+ description: "Scalar input object submitted to the independent child Run.",
9962
+ errorMessage: "ctx.runPlayAsync input must be an object."
9963
+ },
9964
+ "ctx.runPlayAsync.options.description": {
9965
+ schema: Type.String({ minLength: 1 }),
9966
+ fixtures: {
9967
+ valid: "Request approval.",
9968
+ invalid: "",
9969
+ absent: void 0,
9970
+ unresolved: { expression: "description" },
9971
+ edition1: "Request approval."
9972
+ },
9973
+ referenceType: "string",
9974
+ required: true,
9975
+ resolution: "runtime-dynamic",
9976
+ issueCode: "play_authoring_run_play_option_invalid",
9977
+ description: "Non-empty purpose for one independent child Play Run.",
9978
+ errorMessage: "ctx.runPlayAsync options.description must be non-empty."
9979
+ },
9557
9980
  "runtime.timeout": {
9558
9981
  schema: Type.String({ pattern: "^\\d+\\s*[mh]$" }),
9559
9982
  fixtures: {
@@ -9841,6 +10264,10 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9841
10264
  `export type CsvOptions = { description?: ${cloudReferenceType("ctx.csv.options.description")}; columns?: ${cloudReferenceType("ctx.csv.options.columns")}; rename?: ${cloudReferenceType("ctx.csv.options.rename")}; required?: ${cloudReferenceType("ctx.csv.options.required")} };`,
9842
10265
  "export type PlayCallExecution = 'inline';",
9843
10266
  `export type PlayCallOptions = { description: ${cloudReferenceType("ctx.runPlay.options.description")}; execution?: ${cloudReferenceType("ctx.runPlay.options.execution")}; timeoutMs?: ${cloudReferenceType("ctx.runPlay.options.timeoutMs")} };`,
10267
+ `export type PlayAsyncCallOptions = { description: ${cloudReferenceType("ctx.runPlayAsync.options.description")} };`,
10268
+ "declare const PLAY_RUN_ID_BRAND: unique symbol;",
10269
+ "export type PlayRunId = string & { readonly [PLAY_RUN_ID_BRAND]: 'PlayRunId' };",
10270
+ "export type AsyncPlayRunRef = Readonly<{ runId: PlayRunId }>;",
9844
10271
  `export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
9845
10272
  `export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
9846
10273
  "export type PlayFetchResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record<string, string>; bodyText: string; json: unknown | null };",
@@ -9866,11 +10293,11 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9866
10293
  " withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value> & { readonly runIf: (row: OutputRow, index: number) => boolean | Promise<boolean> }): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
9867
10294
  " withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value>>;",
9868
10295
  " withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | RunnableColumnStepProgram<Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
9869
- " withColumns<Program extends StepProgram<OutputRow, object, unknown>>(program: Program): DatasetBuilder<InputRow, StepProgramOutput<Program>>;",
10296
+ " withColumns<ProgramOutput extends OutputRow, Return>(program: StepProgram<OutputRow, ProgramOutput, Return>): DatasetBuilder<InputRow, ProgramOutput>;",
9870
10297
  " step<Name extends string, Value>(name: Name, resolver: ColumnResolver<OutputRow, Value>): never;",
9871
10298
  " run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
9872
10299
  "};",
9873
- "export type PlayReferenceLike = { readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string };",
10300
+ "export type PlayReferenceLike<TInput extends Record<string, unknown> = Record<string, unknown>> = ({ readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string }) & { readonly __inputType?: TInput };",
9874
10301
  "export interface DeeplinePlayRuntimeContext {",
9875
10302
  " csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
9876
10303
  " dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
@@ -9884,6 +10311,8 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9884
10311
  " fetch(key: string, url: string | URL, init?: RequestInit & { headers?: HeadersInit & { 'Idempotency-Key'?: string; 'X-Idempotency-Key'?: string }; auth?: SecretAuthInput }, options?: FetchOptions): Promise<PlayFetchResponse>;",
9885
10312
  " secrets: { get(name: string): SecretPromise; bearer(secret: string | SecretPromise | SecretHandle): SecretAuth; header(header: string, secret: string | SecretPromise | SecretHandle): SecretAuth };",
9886
10313
  ` runPlay<TOutput = unknown>(key: string, playRef: ${cloudReferenceType("ctx.runPlay.playRef")}, input: ${cloudReferenceType("ctx.runPlay.input")}, options: PlayCallOptions): Promise<TOutput>;`,
10314
+ " runPlayAsync<TInput extends Record<string, unknown>>(key: string, playRef: PlayReferenceLike<TInput>, input: NoInfer<TInput>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
10315
+ " runPlayAsync(key: string, playRef: string, input: Record<string, unknown>, options: PlayAsyncCallOptions): Promise<AsyncPlayRunRef>;",
9887
10316
  " log(message: string, options?: { level?: 'debug' | 'info' | 'warn' | 'error' }): void;",
9888
10317
  ` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
9889
10318
  "}",