deepline 0.3.394 → 0.3.396

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 (110) 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/observability/scheduled-jobs.json +1 -1
  7. package/dist/cli/{auth-OSXDAVCF.mjs → auth-3LTD62VL.mjs} +4 -4
  8. package/dist/cli/auth-562JPKOM.js +39 -0
  9. package/dist/cli/{billing-ZNNKX3UR.mjs → billing-DP7ZAJBO.mjs} +5 -4
  10. package/dist/cli/{billing-EKLYOXUY.js → billing-PA5OXEM5.js} +76 -75
  11. package/dist/cli/{chunk-BP33SIZF.mjs → chunk-23GAA3YO.mjs} +1 -1
  12. package/dist/cli/{chunk-KI635JN4.js → chunk-2VOLOWYZ.js} +1087 -1056
  13. package/dist/cli/{chunk-XXUDVEXK.mjs → chunk-3T4MCB5R.mjs} +1026 -995
  14. package/dist/cli/{chunk-VB6KECLU.mjs → chunk-5WNJF2T3.mjs} +102 -36
  15. package/dist/cli/{chunk-KIUMEOM5.js → chunk-772W2SAU.js} +8 -8
  16. package/dist/cli/{chunk-2MDDA7A4.js → chunk-7Z66NHUC.js} +26 -26
  17. package/dist/cli/{chunk-M57J2SK4.mjs → chunk-AUYXWELC.mjs} +2 -2
  18. package/dist/cli/{chunk-354JCXA2.js → chunk-AVHLATII.js} +50 -50
  19. package/dist/cli/{chunk-MLPU5SMZ.js → chunk-DC6LTULT.js} +2 -2
  20. package/dist/cli/chunk-EIMG75BT.mjs +130 -0
  21. package/dist/cli/{chunk-6YAUMG27.js → chunk-GNN4MY5X.js} +1 -1
  22. package/dist/cli/{chunk-UXFSWG3Q.mjs → chunk-I4T4XAA2.mjs} +4 -4
  23. package/dist/cli/{chunk-MFB2VKBO.mjs → chunk-JCN4DHF7.mjs} +2 -2
  24. package/dist/cli/{chunk-VK6FYZLP.js → chunk-KAEZNPUM.js} +23 -8
  25. package/dist/cli/chunk-KXMNM4AQ.js +130 -0
  26. package/dist/cli/{chunk-XRQ2AQL7.mjs → chunk-LOGGNW4H.mjs} +2 -2
  27. package/dist/cli/{chunk-RDXFGPJU.js → chunk-LWERJUKN.js} +218 -218
  28. package/dist/cli/{chunk-QIQBYKLB.js → chunk-ME6XRFLY.js} +15 -15
  29. package/dist/cli/{chunk-JHIJIHFB.mjs → chunk-MR6XCBQJ.mjs} +23 -131
  30. package/dist/cli/{chunk-TJI2EN6K.mjs → chunk-NHB5YUCS.mjs} +1 -1
  31. package/dist/cli/{chunk-ZMVJSS6N.js → chunk-NSOTASOP.js} +101 -35
  32. package/dist/cli/{chunk-ZYBGA4AR.mjs → chunk-QHGPA362.mjs} +18 -3
  33. package/dist/cli/{chunk-4P27AXEA.js → chunk-RMTASUAK.js} +65 -65
  34. package/dist/cli/{chunk-KGNTKMRG.js → chunk-RTO5QZWT.js} +6 -6
  35. package/dist/cli/{chunk-X63FDZJZ.mjs → chunk-TLQ3FZOC.mjs} +3 -3
  36. package/dist/cli/{chunk-CS6RAIVY.js → chunk-V7UP2F4U.js} +4 -4
  37. package/dist/cli/{chunk-FJGW5GXU.mjs → chunk-VE3U3SQC.mjs} +1 -1
  38. package/dist/cli/{chunk-E23BQ5SC.js → chunk-WQJJNIMQ.js} +241 -349
  39. package/dist/cli/{chunk-NR3DFKNF.mjs → chunk-XKZXO7D3.mjs} +1 -1
  40. package/dist/cli/{csv-5AXRB35H.mjs → csv-RLRR74RQ.mjs} +3 -3
  41. package/dist/cli/{csv-LU7O75WE.js → csv-TF576S77.js} +12 -12
  42. package/dist/cli/{db-F7YTFKVM.js → db-FDBJUTFO.js} +30 -29
  43. package/dist/cli/{db-7XP5UWEW.mjs → db-XORGNBIC.mjs} +5 -4
  44. package/dist/cli/{describe-K4ES5LIL.mjs → describe-6O2ENKTP.mjs} +86 -67
  45. package/dist/cli/{describe-FRH32RDV.js → describe-EFWNECHI.js} +100 -81
  46. package/dist/cli/{executions-RZV5XPT2.js → executions-SFYAXPF4.js} +7 -6
  47. package/dist/cli/{executions-IEHEHJUO.mjs → executions-YPP7WR77.mjs} +5 -4
  48. package/dist/cli/{feedback-3P65QTX3.js → feedback-5UZFYMGB.js} +7 -7
  49. package/dist/cli/{feedback-FPUVZBAN.mjs → feedback-RBGA5ARU.mjs} +3 -3
  50. package/dist/cli/git-5LDY5ZID.js +23 -0
  51. package/dist/cli/{git-GLVVP7TY.mjs → git-IRSAJEK2.mjs} +4 -4
  52. package/dist/cli/index.js +93 -93
  53. package/dist/cli/index.mjs +42 -42
  54. package/dist/cli/{legacy-noops-XKSGZR7Q.js → legacy-noops-CVAOQY2F.js} +7 -7
  55. package/dist/cli/{legacy-noops-3MOI6NBM.mjs → legacy-noops-NA7N6ZOU.mjs} +4 -4
  56. package/dist/cli/{monitors-NZ2DYNST.js → monitors-4OMRXCXP.js} +86 -85
  57. package/dist/cli/{monitors-FTBGNEFG.mjs → monitors-ILZ2XHYG.mjs} +5 -4
  58. package/dist/cli/{org-V2J5RBCN.mjs → org-QDDXAE3J.mjs} +5 -4
  59. package/dist/cli/{org-MCKDQXIV.js → org-YGNJDD2X.js} +65 -64
  60. package/dist/cli/{chunk-RBJYWRCF.js → play-L535H26U.js} +270 -325
  61. package/dist/cli/{chunk-5BB2RGAX.mjs → play-VT6OHB2D.mjs} +77 -132
  62. package/dist/cli/{providers-2JEZ2264.js → providers-GPZ6PQAL.js} +8 -7
  63. package/dist/cli/{providers-I6RQJZFZ.mjs → providers-KG4W5MPK.mjs} +5 -4
  64. package/dist/cli/{quickstart-BIDQDMO4.mjs → quickstart-2JDGTXIG.mjs} +3 -3
  65. package/dist/cli/{quickstart-GJ2RPDU3.js → quickstart-UI27S5LO.js} +5 -5
  66. package/dist/cli/search-MGWROZ33.js +28 -0
  67. package/dist/cli/{search-ELRXFWG5.mjs → search-PW3RAUX7.mjs} +6 -5
  68. package/dist/cli/{secrets-SQXGZXIC.mjs → secrets-HNOMK5A2.mjs} +5 -4
  69. package/dist/cli/{secrets-53IT6VXD.js → secrets-WFAXOUZE.js} +14 -13
  70. package/dist/cli/{sessions-CAV5M77Y.js → sessions-366KROUA.js} +5 -5
  71. package/dist/cli/{sessions-2X5QF7SL.mjs → sessions-XLX3E5UO.mjs} +4 -4
  72. package/dist/cli/{settings-532WNAZO.js → settings-GADAG2UK.js} +75 -74
  73. package/dist/cli/{settings-7P67VGCJ.mjs → settings-YNZ4YKCH.mjs} +8 -7
  74. package/dist/cli/{setup-QGGBV2LE.mjs → setup-PSEHIUXO.mjs} +6 -6
  75. package/dist/cli/{setup-6L2VSUWJ.js → setup-R5YO7GT6.js} +41 -41
  76. package/dist/cli/skills-JF2LPEGM.js +28 -0
  77. package/dist/cli/{skills-3FE62WBG.mjs → skills-LTQBP6CZ.mjs} +4 -4
  78. package/dist/cli/tools-CP2PEFRN.js +34 -0
  79. package/dist/cli/{tools-DMR25DEF.mjs → tools-UAXDWU63.mjs} +11 -18
  80. package/dist/cli/update-HZHZOU6C.js +28 -0
  81. package/dist/cli/{update-6RZMHJZP.mjs → update-SMNIBIMS.mjs} +6 -6
  82. package/dist/cli/{workflow-TX4F2PIX.js → workflow-AOQVZHMD.js} +16 -15
  83. package/dist/cli/{workflow-L2DQRE6R.mjs → workflow-IKGMBGF6.mjs} +6 -5
  84. package/dist/{client-C3O1Ipf3.d.ts → client-Bgis7F6-.d.ts} +22 -12
  85. package/dist/{client-BktIPdIj.d.mts → client-DiGl8ska.d.mts} +22 -12
  86. package/dist/index.d.mts +2 -2
  87. package/dist/index.d.ts +2 -2
  88. package/dist/index.js +11 -10
  89. package/dist/index.mjs +9 -8
  90. package/dist/install-integrity.json +83 -78
  91. package/dist/plays/play-description.d.mts +6 -0
  92. package/dist/plays/play-description.d.ts +6 -0
  93. package/dist/plays/play-description.js +11 -0
  94. package/dist/plays/play-description.mjs +11 -0
  95. package/dist/plays/run-request.d.mts +1 -1
  96. package/dist/plays/run-request.d.ts +1 -1
  97. package/dist/release.d.mts +1 -1
  98. package/dist/release.d.ts +1 -1
  99. package/dist/release.js +2 -2
  100. package/dist/release.mjs +1 -1
  101. package/package.json +6 -1
  102. package/dist/cli/auth-IHKISLJQ.js +0 -39
  103. package/dist/cli/git-MFFAWVVX.js +0 -23
  104. package/dist/cli/play-AJFGME3B.mjs +0 -158
  105. package/dist/cli/play-WLSN2EO2.js +0 -158
  106. package/dist/cli/search-5VN4YD4I.js +0 -27
  107. package/dist/cli/skills-S6NPZAN7.js +0 -28
  108. package/dist/cli/tools-647RLXQS.js +0 -41
  109. package/dist/cli/update-WVTSC3EM.js +0 -28
  110. package/dist/cli/{chunk-KZZC33PY.mjs → chunk-H5KLUGY7.mjs} +214 -214
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkMLPU5SMZjs = require('./chunk-MLPU5SMZ.js');
4
+ var _chunkDC6LTULTjs = require('./chunk-DC6LTULT.js');
5
5
 
6
6
 
7
7
 
8
- var _chunk4P27AXEAjs = require('./chunk-4P27AXEA.js');
8
+ var _chunkRMTASUAKjs = require('./chunk-RMTASUAK.js');
9
9
 
10
10
 
11
- var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
11
+ var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
12
12
 
13
13
 
14
- var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
14
+ var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  var _child_process = require('child_process');
@@ -489,7 +489,7 @@ function normalizedNpmPrefix(value) {
489
489
  }
490
490
  function resolveNpmGlobalPrefix(env) {
491
491
  try {
492
- const plan = _chunk4P27AXEAjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
492
+ const plan = _chunkRMTASUAKjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
493
493
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
494
494
  encoding: "utf8",
495
495
  env,
@@ -545,8 +545,8 @@ function resolveUpdatePlan(options = {}) {
545
545
  const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
546
546
  const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
547
547
  const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
548
- const npmVersion = options.npmVersion === void 0 ? _chunkMLPU5SMZjs.readNpmVersion.call(void 0, env) : options.npmVersion;
549
- const npmGlobalInstallFlags = _chunkMLPU5SMZjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
548
+ const npmVersion = options.npmVersion === void 0 ? _chunkDC6LTULTjs.readNpmVersion.call(void 0, env) : options.npmVersion;
549
+ const npmGlobalInstallFlags = _chunkDC6LTULTjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
550
550
  const args = installPrefix ? [
551
551
  "install",
552
552
  "-g",
@@ -556,7 +556,7 @@ function resolveUpdatePlan(options = {}) {
556
556
  packageSpec
557
557
  ] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
558
558
  const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
559
- _optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkCS6RAIVYjs.autoDetectBaseUrl.call(void 0, )
559
+ _optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkV7UP2F4Ujs.autoDetectBaseUrl.call(void 0, )
560
560
  );
561
561
  return {
562
562
  kind: "npm-global",
@@ -703,7 +703,7 @@ function sidecarInstallFailure(versionDir) {
703
703
  function runCommand(command, args, env = process.env) {
704
704
  return new Promise((resolveResult) => {
705
705
  let output = "";
706
- const plan = _chunk4P27AXEAjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
706
+ const plan = _chunkRMTASUAKjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
707
707
  const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
708
708
  stdio: ["inherit", "pipe", "pipe"],
709
709
  shell: plan.shell,
@@ -1079,14 +1079,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
1079
1079
  throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
1080
1080
  }
1081
1081
  async function runUpdateCommand(options, dependencies = {}) {
1082
- const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkCS6RAIVYjs.autoDetectBaseUrl));
1082
+ const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkV7UP2F4Ujs.autoDetectBaseUrl));
1083
1083
  const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
1084
1084
  const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
1085
1085
  const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
1086
1086
  const originalWrite = process.stdout.write.bind(process.stdout);
1087
1087
  process.stdout.write = (() => true);
1088
1088
  try {
1089
- const exitCode = await _chunk4P27AXEAjs.runSkillsCommand.call(void 0, { json: true });
1089
+ const exitCode = await _chunkRMTASUAKjs.runSkillsCommand.call(void 0, { json: true });
1090
1090
  if (exitCode !== 0) {
1091
1091
  throw new Error(
1092
1092
  `Deepline skills update failed with exit ${exitCode}.`
@@ -1157,11 +1157,11 @@ async function runUpdateCommand(options, dependencies = {}) {
1157
1157
  ]
1158
1158
  };
1159
1159
  if (options.json && !options.executeWithJson) {
1160
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1160
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1161
1161
  return 0;
1162
1162
  }
1163
1163
  if (options.printCommand) {
1164
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1164
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
1165
1165
  {
1166
1166
  ...plan,
1167
1167
  render: {
@@ -1174,7 +1174,7 @@ async function runUpdateCommand(options, dependencies = {}) {
1174
1174
  return 0;
1175
1175
  }
1176
1176
  if (plan.kind === "source" || plan.kind === "homebrew") {
1177
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1177
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1178
1178
  return 0;
1179
1179
  }
1180
1180
  stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
@@ -1204,7 +1204,7 @@ To retry with full installer output, run: deepline skills
1204
1204
  );
1205
1205
  }
1206
1206
  if (options.executeWithJson && options.json) {
1207
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1207
+ _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
1208
1208
  {
1209
1209
  ok: true,
1210
1210
  pinnedVersion
@@ -14,6 +14,10 @@ import {
14
14
  stagePlayFiles,
15
15
  startPlayRun
16
16
  } from "./chunk-JI2B4RZP.mjs";
17
+ import {
18
+ describePlayDetail,
19
+ describePlayListItem
20
+ } from "./chunk-EIMG75BT.mjs";
17
21
  import {
18
22
  COORDINATOR_INTERNAL_TOKEN_HEADER,
19
23
  CustomerDbQueryOutcomeUnknownError,
@@ -21,7 +25,7 @@ import {
21
25
  RETAINED_PIPELINE_RECEIVERS_HEADER,
22
26
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
23
27
  resolveConfig
24
- } from "./chunk-FJGW5GXU.mjs";
28
+ } from "./chunk-VE3U3SQC.mjs";
25
29
  import {
26
30
  DeeplineError,
27
31
  TOOL_EXECUTION_ERROR_SCHEMA_HEADER,
@@ -29,9 +33,6 @@ import {
29
33
  ToolExecutionError
30
34
  } from "./chunk-NXGCO4JB.mjs";
31
35
 
32
- // src/csv-header-matching.ts
33
- var CSV_HEADER_MATCHING_NOTE = 'A header matches a column when it equals the column name or its default header, ignoring case, spaces and punctuation: LINKEDIN_URL, linkedin-url and "Linkedin Url" all match linkedin_url. A capital inside a word starts a new word, so "LinkedIn URL" reads as linked_in_url and does not match. Map any other header in the input: {"csv":"<path>","columns":{"<column>":"<your header>"}}.';
34
-
35
36
  // src/pagination.ts
36
37
  async function* iterateCursorPages(fetchPage) {
37
38
  let cursor = null;
@@ -1835,31 +1836,6 @@ function playTriggerConfigPath(playName) {
1835
1836
  return `/api/v2/plays/${encodeURIComponent(playName)}/triggers`;
1836
1837
  }
1837
1838
 
1838
- // src/plays/input-example.ts
1839
- function playInputExampleArgs(schema) {
1840
- if (!schema) return " --input '@<input.json>'";
1841
- if (schema.$ref || schema.allOf) return " --input '@<input.json>'";
1842
- const csv = schema.csvInput;
1843
- const csvField = typeof csv?.inputField === "string" ? csv.inputField : null;
1844
- const required = Array.isArray(schema.required) ? schema.required : [];
1845
- const csvOnlyRequired = required.every((key) => key === csvField);
1846
- const alternatives = schema.oneOf ?? schema.anyOf;
1847
- const hasCsvAlternative = Array.isArray(alternatives) && alternatives.some((branch) => {
1848
- if (!branch || typeof branch !== "object") return false;
1849
- const keys = branch.required;
1850
- return Array.isArray(keys) && keys.includes(csvField) && keys.every((key) => key === csvField);
1851
- });
1852
- if (csvField && csvOnlyRequired && (!alternatives || hasCsvAlternative)) {
1853
- if (csvField === "csv") return " --csv '<contacts.csv>'";
1854
- const value = JSON.stringify({ [csvField]: "<contacts.csv>" });
1855
- return ` --input '${value.replace(/'/g, "'\\''")}'`;
1856
- }
1857
- if (Array.isArray(schema.required) && !required.length && !csv && !alternatives) {
1858
- return "";
1859
- }
1860
- return " --input '@<input.json>'";
1861
- }
1862
-
1863
1839
  // ../product-notifications/configuration.ts
1864
1840
  var PRODUCT_NOTIFICATION_EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1865
1841
  function normalizeProductNotificationEmail(value) {
@@ -3365,101 +3341,6 @@ var DeeplineClient = class _DeeplineClient {
3365
3341
  get baseUrl() {
3366
3342
  return this.config.baseUrl;
3367
3343
  }
3368
- compactSchema(schema) {
3369
- if (!schema) return null;
3370
- const fields = Array.isArray(schema.fields) ? schema.fields.map(
3371
- (field) => field && typeof field === "object" ? {
3372
- name: String(field.name ?? ""),
3373
- type: field.type ?? void 0,
3374
- required: field.required ?? void 0
3375
- } : null
3376
- ).filter((field) => Boolean(field?.name)) : [];
3377
- return fields.length > 0 ? { fields } : schema;
3378
- }
3379
- schemaMetadata(schema, key) {
3380
- if (!isRecord2(schema)) return null;
3381
- const value = schema[key];
3382
- return isRecord2(value) ? value : null;
3383
- }
3384
- playRunCommand(play) {
3385
- const target = play.reference || play.name;
3386
- return `deepline plays run ${target}${playInputExampleArgs(play.inputSchema)}`;
3387
- }
3388
- starterPlayPath(play) {
3389
- const target = play.reference || play.name;
3390
- const unqualifiedName = target.split("/").pop() || play.name;
3391
- const safeName = unqualifiedName.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
3392
- return `./${safeName || "play"}.play.ts`;
3393
- }
3394
- playCloneEditStarter(play) {
3395
- const readonlyPrebuilt = (play.origin === "prebuilt" || play.ownerType === "deepline") && !play.canEdit;
3396
- if (!play.canClone && !readonlyPrebuilt) return void 0;
3397
- const target = play.reference || play.name;
3398
- const path = this.starterPlayPath(play);
3399
- return {
3400
- path,
3401
- command: `deepline plays get ${target} --source --out ${path}`,
3402
- checkCommand: `deepline plays check ${path}`
3403
- };
3404
- }
3405
- summarizePlayListItem(play, options) {
3406
- const aliases = play.aliases?.length ? play.aliases : [play.name];
3407
- const csvInput = this.schemaMetadata(play.inputSchema, "csvInput");
3408
- const rowOutputSchema = this.schemaMetadata(
3409
- play.outputSchema,
3410
- "rowOutputSchema"
3411
- );
3412
- const description = play.description?.trim() || play.currentRevision?.description?.trim() || play.liveRevision?.description?.trim() || null;
3413
- const runCommand = this.playRunCommand(play);
3414
- const cloneEditStarter = this.playCloneEditStarter(play);
3415
- return {
3416
- name: play.name,
3417
- // playKey and triggerStatus were projected away here, so `describe`
3418
- // was strictly less informative than `plays list` for the same play — no
3419
- // stable key, and no way to see that a cron was armed.
3420
- ...play.playKey ? { playKey: play.playKey } : {},
3421
- ...play.reference ? { reference: play.reference } : {},
3422
- ...play.displayName ? { displayName: play.displayName } : {},
3423
- ...description ? { description } : {},
3424
- ...play.guidance ? { guidance: play.guidance } : {},
3425
- pinned: Boolean(play.pinned),
3426
- toolCategories: play.toolCategories ?? [],
3427
- origin: play.origin,
3428
- ownerType: play.ownerType,
3429
- canEdit: play.canEdit,
3430
- canClone: play.canClone,
3431
- aliases,
3432
- inputSchema: options?.compact ? this.compactSchema(play.inputSchema) : play.inputSchema ?? null,
3433
- outputSchema: options?.compact ? this.compactSchema(play.outputSchema) : play.outputSchema ?? null,
3434
- staticPipeline: isRecord2(play.staticPipeline) ? play.staticPipeline : isRecord2(play.currentRevision?.staticPipeline) ? play.currentRevision.staticPipeline : isRecord2(play.liveRevision?.staticPipeline) ? play.liveRevision.staticPipeline : null,
3435
- ...csvInput ? {
3436
- csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
3437
- } : {},
3438
- ...rowOutputSchema ? { rowOutputSchema } : {},
3439
- runCommand,
3440
- examples: [runCommand],
3441
- ...cloneEditStarter ? { cloneEditStarter } : {},
3442
- currentPublishedVersion: play.currentPublishedVersion ?? null,
3443
- // Read the live version off the live revision. It was previously only
3444
- // ever written by the publish/live routes, so every list and describe
3445
- // payload reported liveVersion: null even for an actively serving play.
3446
- liveVersion: play.liveRevision?.version ?? null,
3447
- ...play.triggerStatus ? { triggerStatus: play.triggerStatus } : {},
3448
- isDraftDirty: play.isDraftDirty
3449
- };
3450
- }
3451
- summarizePlayDetail(detail, options) {
3452
- const play = detail.play;
3453
- return {
3454
- ...this.summarizePlayListItem(play, options),
3455
- currentPublishedVersion: play.currentPublishedVersion ?? play.liveRevision?.version ?? null,
3456
- latestRunId: play.latestRunId ?? detail.latestRuns[0]?.workflowId ?? null,
3457
- ...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
3458
- ...play.runtimeLimit ? { runtimeLimit: play.runtimeLimit } : {},
3459
- ...play.activeScheduledPlays ? { activeScheduledPlays: play.activeScheduledPlays } : {},
3460
- ...play.observedCost ? { observedCost: play.observedCost } : {}
3461
- };
3462
- }
3463
3344
  // ——————————————————————————————————————————————————————————
3464
3345
  // Secrets
3465
3346
  // ——————————————————————————————————————————————————————————
@@ -5369,7 +5250,7 @@ var DeeplineClient = class _DeeplineClient {
5369
5250
  }
5370
5251
  );
5371
5252
  const plays = (response.plays ?? []).map(
5372
- (play) => this.summarizePlayListItem(play, options)
5253
+ (play) => describePlayListItem(play, { ...options, pipeline: true })
5373
5254
  );
5374
5255
  if (scope === "prebuilt") {
5375
5256
  return plays.filter(isPrebuiltPlayDescription);
@@ -5421,11 +5302,24 @@ var DeeplineClient = class _DeeplineClient {
5421
5302
  * Get a normalized play description suitable for agents and CLIs.
5422
5303
  *
5423
5304
  * The description includes runnable examples, input/output summaries, clone
5424
- * guidance, revision state, and latest run metadata when available.
5305
+ * guidance, revision state, and latest run metadata when available. Pass
5306
+ * `{ pipeline: true }` to include the compiled pipeline, which can be
5307
+ * hundreds of kilobytes and is otherwise left out.
5425
5308
  */
5426
- async describePlay(name, options) {
5427
- const detail = await this.getPlay(name, { guidance: true });
5428
- return this.summarizePlayDetail(detail, options);
5309
+ async describePlay(name, options = {}) {
5310
+ if (options.pipeline) {
5311
+ return describePlayDetail(
5312
+ await this.getPlay(name, { guidance: true }),
5313
+ options
5314
+ );
5315
+ }
5316
+ const params = new URLSearchParams({
5317
+ include: "guidance",
5318
+ view: "description",
5319
+ ...options.compact ? { compact: "1" } : {}
5320
+ });
5321
+ const body = await this.http.get(`/api/v2/plays/${encodeURIComponent(name)}?${params.toString()}`);
5322
+ return "description" in body ? body.description : describePlayDetail(body, options);
5429
5323
  }
5430
5324
  /**
5431
5325
  * Clear run history and durable sheet/result data for a play without deleting
@@ -6596,9 +6490,7 @@ var DeeplineClient = class _DeeplineClient {
6596
6490
  };
6597
6491
 
6598
6492
  export {
6599
- CSV_HEADER_MATCHING_NOTE,
6600
6493
  iterateCursorPages,
6601
- playInputExampleArgs,
6602
6494
  requireBillingIdempotencyKey,
6603
6495
  planCustomerDbQuery,
6604
6496
  validateExecutionIdempotencyKey,
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.394",
52
+ version: "0.3.396",
53
53
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
54
54
  packageCapabilities: {
55
55
  updatePreferences: 1,
@@ -2,6 +2,9 @@
2
2
 
3
3
  var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
4
4
 
5
+
6
+ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
7
+
5
8
  // src/cli/described.ts
6
9
  var SHAPE = "{}";
7
10
  var RECORD = "Record<string, ";
@@ -617,42 +620,66 @@ function describedJson(described, view) {
617
620
  ...hidden.length ? { hidden } : {}
618
621
  };
619
622
  }
620
-
621
- // src/cli/execution-observation.ts
622
- var _fs = require('fs');
623
- function writeObservation(observation) {
624
- const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
625
- const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
626
- if (!path || !invocationId) return;
627
- const pending = `${path}.pending`;
628
- _fs.writeFileSync.call(void 0,
629
- pending,
630
- JSON.stringify({
631
- schema_version: 1,
632
- invocation_id: invocationId,
633
- ...observation
634
- }),
635
- { mode: 384 }
636
- );
637
- _fs.renameSync.call(void 0, pending, path);
638
- }
639
- function recordApiResponse(observation) {
640
- writeObservation({
641
- kind: "api_response",
642
- received_at_ms: observation.receivedAtMs,
643
- state: observation.state,
644
- http_status: observation.httpStatus
645
- });
623
+ function buildPlayDashboardUrl(baseUrl, playName) {
624
+ const trimmedBase = baseUrl.replace(/\/$/, "");
625
+ const encodedPlayName = encodeURIComponent(playName);
626
+ return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
646
627
  }
647
- function recordPlayTermination(run) {
648
- if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
649
- String(run.status)
650
- ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
651
- return;
652
- writeObservation({
653
- kind: "play_terminal",
654
- run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
628
+ function describedPlay(play) {
629
+ const reference = play.reference || play.name;
630
+ const starter = _nullishCoalesce(play.cloneEditStarter, () => ( _chunkKXMNM4AQjs.cloneEditStarter.call(void 0, play)));
631
+ const csv = _nullishCoalesce(play.csvInput, () => ( {}));
632
+ const csvField = typeof csv.inputField === "string" ? csv.inputField : "csv";
633
+ const alongside = /* @__PURE__ */ new Set([
634
+ csvField,
635
+ "columns",
636
+ ...Array.isArray(csv.runLevelControlFields) ? csv.runLevelControlFields.map(String) : []
637
+ ]);
638
+ const declared = schemaFields(play.inputSchema).map((field) => field.name);
639
+ const rowNames = schemaFields(csv.rowInputSchema).map((field) => field.name);
640
+ const replaced = play.csvInput ? (rowNames.length > 0 ? rowNames : declared).filter(
641
+ (name) => declared.includes(name) && !alongside.has(name)
642
+ ) : [];
643
+ const exclusive = replaced.length ? { field: csvField, with: replaced } : void 0;
644
+ const headers = isRecord(csv.defaultColumns) ? csv.defaultColumns : {};
645
+ const rowInputs = schemaFields(csv.rowInputSchema).map((field) => {
646
+ const header = [headers[field.name]].flat().filter((name) => name && name !== field.name).join(" or ");
647
+ return header ? {
648
+ ...field,
649
+ description: [field.description, `CSV header: ${header}`].filter(Boolean).join(" - ")
650
+ } : field;
655
651
  });
652
+ const rowOutput = _nullishCoalesce(play.rowOutputSchema, () => ( {}));
653
+ const added = isRecord(rowOutput.addedColumns) ? rowOutput.addedColumns : {};
654
+ const rowOutputs = schemaFields(
655
+ Object.keys(added).length ? { properties: added } : rowOutput
656
+ ).map((field) => ({ ...field, required: true }));
657
+ return {
658
+ kind: play.ownerType === "deepline" ? "prebuilt_play" : "custom_play",
659
+ id: reference,
660
+ ...play.displayName && play.displayName !== play.name ? { displayName: play.displayName } : {},
661
+ ...play.description ? { description: play.description } : {},
662
+ ...play.observedCost ? { cost: play.observedCost.displayText } : {},
663
+ guidance: [],
664
+ inputs: schemaFields(play.inputSchema),
665
+ outputs: schemaFields(play.outputSchema),
666
+ ...rowInputs.length ? { rowInputs } : {},
667
+ ...typeof csv.inputField === "string" ? { csvInput: csv.inputField } : {},
668
+ ...rowOutputs.length ? {
669
+ rowOutputs,
670
+ rowOutputsAddToSource: Object.keys(added).length > 0 || rowOutput.preservesSourceColumns === true
671
+ } : {},
672
+ runner: {
673
+ via: "play",
674
+ reference,
675
+ // A CSV play's run command is built by the server around its columns.
676
+ ...play.csvInput ? { cli: play.runCommand } : {}
677
+ },
678
+ ...starter ? { source: starter.command } : {},
679
+ ...exclusive ? { exclusive } : {},
680
+ // A prebuilt's cost is what its recent runs were charged; there is no rate.
681
+ ..._optionalChain([play, 'access', _12 => _12.observedCost, 'optionalAccess', _13 => _13.displayText]) ? { cost: play.observedCost.displayText } : {}
682
+ };
656
683
  }
657
684
 
658
685
  // src/cli/describe-options.ts
@@ -697,6 +724,45 @@ function addDescribeOptions(command, options = {}) {
697
724
  return command;
698
725
  }
699
726
 
727
+ // src/cli/execution-observation.ts
728
+ var _fs = require('fs');
729
+ function writeObservation(observation) {
730
+ const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
731
+ const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
732
+ if (!path || !invocationId) return;
733
+ const pending = `${path}.pending`;
734
+ _fs.writeFileSync.call(void 0,
735
+ pending,
736
+ JSON.stringify({
737
+ schema_version: 1,
738
+ invocation_id: invocationId,
739
+ ...observation
740
+ }),
741
+ { mode: 384 }
742
+ );
743
+ _fs.renameSync.call(void 0, pending, path);
744
+ }
745
+ function recordApiResponse(observation) {
746
+ writeObservation({
747
+ kind: "api_response",
748
+ received_at_ms: observation.receivedAtMs,
749
+ state: observation.state,
750
+ http_status: observation.httpStatus
751
+ });
752
+ }
753
+ function recordPlayTermination(run) {
754
+ if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
755
+ String(run.status)
756
+ ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
757
+ return;
758
+ writeObservation({
759
+ kind: "play_terminal",
760
+ run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
761
+ });
762
+ }
763
+
764
+
765
+
700
766
 
701
767
 
702
768
 
@@ -711,4 +777,4 @@ function addDescribeOptions(command, options = {}) {
711
777
 
712
778
 
713
779
 
714
- exports.byokLines = byokLines; exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.describedJson = describedJson; exports.recordApiResponse = recordApiResponse; exports.recordPlayTermination = recordPlayTermination; exports.addDescribeOptions = addDescribeOptions;
780
+ exports.byokLines = byokLines; exports.SCHEMA_LINE_LIMIT = SCHEMA_LINE_LIMIT; exports.schemaField = schemaField; exports.schemaFields = schemaFields; exports.rateLimitSummary = rateLimitSummary; exports.schemaLines = schemaLines; exports.examples = examples; exports.describedLines = describedLines; exports.topLevelField = topLevelField; exports.describedJson = describedJson; exports.buildPlayDashboardUrl = buildPlayDashboardUrl; exports.describedPlay = describedPlay; exports.addDescribeOptions = addDescribeOptions; exports.recordApiResponse = recordApiResponse; exports.recordPlayTermination = recordPlayTermination;
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-JHIJIHFB.mjs";
3
+ } from "./chunk-MR6XCBQJ.mjs";
4
4
  import {
5
5
  printCommandEnvelope,
6
6
  renderCommandEnvelopeText
7
- } from "./chunk-NR3DFKNF.mjs";
7
+ } from "./chunk-XKZXO7D3.mjs";
8
8
  import {
9
9
  resolveConfig,
10
10
  sdkCliStateDirPath
11
- } from "./chunk-FJGW5GXU.mjs";
11
+ } from "./chunk-VE3U3SQC.mjs";
12
12
 
13
13
  // src/cli/commands/search.ts
14
14
  import { Option } from "commander";
@@ -238,6 +238,11 @@ function rateLimitDisplay(item) {
238
238
  );
239
239
  return tightest ? `${tightest.requestsPerWindow}/${RATE_WINDOW_UNITS[tightest.windowMs] ?? `${tightest.windowMs / 1e3}s`}` : "\u2014";
240
240
  }
241
+ function failureRateDisplay(rate) {
242
+ if (typeof rate !== "number") return "\u2014";
243
+ const percent = Math.round(rate * 100);
244
+ return percent === 0 && rate > 0 ? "<1%" : `${percent}%`;
245
+ }
241
246
  function searchRow(item) {
242
247
  const { cost, notes } = pricingDisplay(item);
243
248
  const observedMax = item.billingSource === "own_provider_credentials" ? "" : observedMaxText(item.pricing);
@@ -253,6 +258,9 @@ function searchRow(item) {
253
258
  kind: item.kind,
254
259
  cost,
255
260
  rateLimit: rateLimitDisplay(item),
261
+ // Production share of errored or rate-limited calls; absent when too few
262
+ // calls or orgs used the tool to say.
263
+ failureRate: failureRateDisplay(item.failureRate),
256
264
  summary: clipSummary(item.description ?? ""),
257
265
  notes
258
266
  };
@@ -274,6 +282,13 @@ function renderSearchResults(result) {
274
282
  alignment: "right"
275
283
  }
276
284
  ] : [],
285
+ ...rows.some((row) => row.failureRate !== "\u2014") ? [
286
+ {
287
+ header: "FAILURES",
288
+ value: (row) => row.failureRate,
289
+ alignment: "right"
290
+ }
291
+ ] : [],
277
292
  { header: "SUMMARY", value: (row) => row.summary }
278
293
  ];
279
294
  const render = result.render;