deepline 0.3.396 → 0.3.397

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 (117) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
  3. package/dist/cli/{auth-3LTD62VL.mjs → auth-AZJFXGKP.mjs} +5 -4
  4. package/dist/cli/auth-CZJQU7B5.js +40 -0
  5. package/dist/cli/{billing-PA5OXEM5.js → billing-MQV5AGDJ.js} +76 -75
  6. package/dist/cli/{billing-DP7ZAJBO.mjs → billing-MZAAUHGH.mjs} +5 -4
  7. package/dist/cli/{chunk-VE3U3SQC.mjs → chunk-2LDADJNO.mjs} +7 -107
  8. package/dist/cli/{chunk-772W2SAU.js → chunk-3VP34TAU.js} +8 -8
  9. package/dist/cli/{chunk-QHGPA362.mjs → chunk-4D745XZO.mjs} +6 -108
  10. package/dist/cli/chunk-7DRPTGCK.js +930 -0
  11. package/dist/cli/{chunk-NSOTASOP.js → chunk-BQR6UN3C.js} +1 -83
  12. package/dist/cli/{chunk-RTO5QZWT.js → chunk-DQ65ZVHN.js} +6 -6
  13. package/dist/cli/{chunk-3T4MCB5R.mjs → chunk-F3BUFYKE.mjs} +89 -969
  14. package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
  15. package/dist/cli/{describe-6O2ENKTP.mjs → chunk-HFYQBC2D.mjs} +22 -160
  16. package/dist/cli/chunk-HGFFYVXN.js +210 -0
  17. package/dist/cli/{chunk-5WNJF2T3.mjs → chunk-IHG7UAHD.mjs} +1 -83
  18. package/dist/cli/{chunk-GNN4MY5X.js → chunk-IZ74ABSX.js} +1 -1
  19. package/dist/cli/{chunk-MR6XCBQJ.mjs → chunk-J7ABTQQ7.mjs} +4 -2
  20. package/dist/cli/{chunk-2VOLOWYZ.js → chunk-K33MXVXQ.js} +293 -1173
  21. package/dist/cli/chunk-LJ5747UC.mjs +107 -0
  22. package/dist/cli/{chunk-NHB5YUCS.mjs → chunk-MRXMMERY.mjs} +1 -1
  23. package/dist/cli/{chunk-TLQ3FZOC.mjs → chunk-MV7QRALK.mjs} +3 -3
  24. package/dist/cli/{chunk-AUYXWELC.mjs → chunk-MYPH2LUU.mjs} +2 -2
  25. package/dist/cli/{chunk-LWERJUKN.js → chunk-NA4T3B62.js} +7 -215
  26. package/dist/cli/{chunk-23GAA3YO.mjs → chunk-NOX2TCBP.mjs} +1 -1
  27. package/dist/cli/chunk-OSDXE27V.mjs +88 -0
  28. package/dist/cli/{chunk-KAEZNPUM.js → chunk-PSGEDGLT.js} +13 -115
  29. package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
  30. package/dist/cli/{describe-EFWNECHI.js → chunk-RFG3MRAC.js} +37 -175
  31. package/dist/cli/{chunk-XKZXO7D3.mjs → chunk-RNSWDKBM.mjs} +1 -1
  32. package/dist/cli/{chunk-V7UP2F4U.js → chunk-RYW4HPSM.js} +21 -121
  33. package/dist/cli/{chunk-7Z66NHUC.js → chunk-SO7RUVTY.js} +26 -26
  34. package/dist/cli/{chunk-H5KLUGY7.mjs → chunk-TXZVVBQZ.mjs} +1 -209
  35. package/dist/cli/{chunk-WQJJNIMQ.js → chunk-UVXBVUZQ.js} +11 -9
  36. package/dist/cli/{chunk-AVHLATII.js → chunk-VTF4RRWJ.js} +50 -50
  37. package/dist/cli/{chunk-LOGGNW4H.mjs → chunk-W3HMGKMI.mjs} +2 -2
  38. package/dist/cli/{chunk-JCN4DHF7.mjs → chunk-WM2QEHZL.mjs} +2 -2
  39. package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
  40. package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
  41. package/dist/cli/{chunk-ME6XRFLY.js → chunk-YLRME7MK.js} +15 -15
  42. package/dist/cli/{chunk-DC6LTULT.js → chunk-YSVORIEW.js} +2 -2
  43. package/dist/cli/{chunk-I4T4XAA2.mjs → chunk-YUDKBQUD.mjs} +4 -4
  44. package/dist/cli/chunk-ZAAKSJAS.js +88 -0
  45. package/dist/cli/{chunk-RMTASUAK.js → chunk-ZHUMDMOS.js} +65 -65
  46. package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
  47. package/dist/cli/{csv-TF576S77.js → csv-AQBQ5O3I.js} +13 -12
  48. package/dist/cli/{csv-RLRR74RQ.mjs → csv-MB7PJMYQ.mjs} +4 -3
  49. package/dist/cli/{db-FDBJUTFO.js → db-JPUYC5RB.js} +30 -29
  50. package/dist/cli/{db-XORGNBIC.mjs → db-L5IEI2AU.mjs} +5 -4
  51. package/dist/cli/describe-6WT74AOR.js +164 -0
  52. package/dist/cli/describe-S6BFANVI.mjs +164 -0
  53. package/dist/cli/describe-core.d.mts +100 -0
  54. package/dist/cli/describe-core.d.ts +100 -0
  55. package/dist/cli/describe-core.js +18 -0
  56. package/dist/cli/describe-core.mjs +18 -0
  57. package/dist/cli/{executions-SFYAXPF4.js → executions-6TMQTFP4.js} +7 -6
  58. package/dist/cli/{executions-YPP7WR77.mjs → executions-L7I2ZW4Z.mjs} +5 -4
  59. package/dist/cli/{feedback-RBGA5ARU.mjs → feedback-DSJ63HK6.mjs} +4 -3
  60. package/dist/cli/{feedback-5UZFYMGB.js → feedback-XF7CQGMD.js} +8 -7
  61. package/dist/cli/{git-IRSAJEK2.mjs → git-C3ENM67D.mjs} +5 -4
  62. package/dist/cli/git-HYDZK2QR.js +24 -0
  63. package/dist/cli/index.js +93 -91
  64. package/dist/cli/index.mjs +35 -33
  65. package/dist/cli/{legacy-noops-CVAOQY2F.js → legacy-noops-B2NHWIVD.js} +8 -7
  66. package/dist/cli/{legacy-noops-NA7N6ZOU.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
  67. package/dist/cli/{monitors-4OMRXCXP.js → monitors-ORFWOVZB.js} +86 -85
  68. package/dist/cli/{monitors-ILZ2XHYG.mjs → monitors-TCEDBDGY.mjs} +5 -4
  69. package/dist/cli/{org-QDDXAE3J.mjs → org-45KREIKZ.mjs} +5 -4
  70. package/dist/cli/{org-YGNJDD2X.js → org-T74CJESN.js} +65 -64
  71. package/dist/cli/{play-VT6OHB2D.mjs → play-MU7MYBIM.mjs} +19 -15
  72. package/dist/cli/{play-L535H26U.js → play-XHK2LPON.js} +251 -247
  73. package/dist/cli/{providers-GPZ6PQAL.js → providers-4MGQKYFD.js} +8 -7
  74. package/dist/cli/{providers-KG4W5MPK.mjs → providers-VYCXIJT5.mjs} +5 -4
  75. package/dist/cli/{quickstart-UI27S5LO.js → quickstart-47G3VEOT.js} +6 -5
  76. package/dist/cli/{quickstart-2JDGTXIG.mjs → quickstart-H724EFM2.mjs} +4 -3
  77. package/dist/cli/search-3356ENLD.js +30 -0
  78. package/dist/cli/{search-PW3RAUX7.mjs → search-VQHXEFQ4.mjs} +7 -5
  79. package/dist/cli/{secrets-WFAXOUZE.js → secrets-ALLKCU35.js} +14 -13
  80. package/dist/cli/{secrets-HNOMK5A2.mjs → secrets-CPBNGA44.mjs} +5 -4
  81. package/dist/cli/{sessions-XLX3E5UO.mjs → sessions-7RSQB7IX.mjs} +5 -4
  82. package/dist/cli/sessions-FKGAY7WQ.js +16 -0
  83. package/dist/cli/{settings-YNZ4YKCH.mjs → settings-UYSGV4IC.mjs} +8 -7
  84. package/dist/cli/{settings-GADAG2UK.js → settings-Y5BI42P7.js} +75 -74
  85. package/dist/cli/{setup-PSEHIUXO.mjs → setup-L3ZBBTS4.mjs} +7 -6
  86. package/dist/cli/{setup-R5YO7GT6.js → setup-VXQPEU3E.js} +42 -41
  87. package/dist/cli/skills-DUZQTDTE.js +29 -0
  88. package/dist/cli/{skills-LTQBP6CZ.mjs → skills-QHVDLSFE.mjs} +5 -4
  89. package/dist/cli/{tools-UAXDWU63.mjs → tools-LSCEK4K2.mjs} +13 -8
  90. package/dist/cli/tools-YWU5QOQ5.js +39 -0
  91. package/dist/cli/update-5LYQAI55.js +29 -0
  92. package/dist/cli/{update-SMNIBIMS.mjs → update-CU22OTBM.mjs} +7 -6
  93. package/dist/cli/{workflow-AOQVZHMD.js → workflow-ERFLTRNX.js} +16 -15
  94. package/dist/cli/{workflow-IKGMBGF6.mjs → workflow-KQARK5BZ.mjs} +6 -5
  95. package/dist/{client-DiGl8ska.d.mts → client-D0j-_aaa.d.mts} +1 -1
  96. package/dist/{client-Bgis7F6-.d.ts → client-DflfVyj6.d.ts} +1 -1
  97. package/dist/index.d.mts +2 -2
  98. package/dist/index.d.ts +2 -2
  99. package/dist/index.js +14 -10
  100. package/dist/index.mjs +19 -15
  101. package/dist/install-integrity.json +92 -76
  102. package/dist/plays/play-description.d.mts +1 -1
  103. package/dist/plays/play-description.d.ts +1 -1
  104. package/dist/plays/run-request.d.mts +1 -1
  105. package/dist/plays/run-request.d.ts +1 -1
  106. package/dist/release.d.mts +1 -1
  107. package/dist/release.d.ts +1 -1
  108. package/dist/release.js +2 -2
  109. package/dist/release.mjs +1 -1
  110. package/package.json +6 -1
  111. package/dist/cli/auth-562JPKOM.js +0 -39
  112. package/dist/cli/git-5LDY5ZID.js +0 -23
  113. package/dist/cli/search-MGWROZ33.js +0 -28
  114. package/dist/cli/sessions-366KROUA.js +0 -15
  115. package/dist/cli/skills-JF2LPEGM.js +0 -28
  116. package/dist/cli/tools-CP2PEFRN.js +0 -34
  117. package/dist/cli/update-HZHZOU6C.js +0 -28
@@ -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 _chunkDC6LTULTjs = require('./chunk-DC6LTULT.js');
4
+ var _chunkYSVORIEWjs = require('./chunk-YSVORIEW.js');
5
5
 
6
6
 
7
7
 
8
- var _chunkRMTASUAKjs = require('./chunk-RMTASUAK.js');
8
+ var _chunkZHUMDMOSjs = require('./chunk-ZHUMDMOS.js');
9
9
 
10
10
 
11
- var _chunkRTO5QZWTjs = require('./chunk-RTO5QZWT.js');
11
+ var _chunkDQ65ZVHNjs = require('./chunk-DQ65ZVHN.js');
12
12
 
13
13
 
14
- var _chunkV7UP2F4Ujs = require('./chunk-V7UP2F4U.js');
14
+ var _chunkRYW4HPSMjs = require('./chunk-RYW4HPSM.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 = _chunkRMTASUAKjs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
492
+ const plan = _chunkZHUMDMOSjs.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 ? _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;
548
+ const npmVersion = options.npmVersion === void 0 ? _chunkYSVORIEWjs.readNpmVersion.call(void 0, env) : options.npmVersion;
549
+ const npmGlobalInstallFlags = _chunkYSVORIEWjs.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()]) || _chunkV7UP2F4Ujs.autoDetectBaseUrl.call(void 0, )
559
+ _optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkRYW4HPSMjs.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 = _chunkRMTASUAKjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
706
+ const plan = _chunkZHUMDMOSjs.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, () => ( _chunkV7UP2F4Ujs.autoDetectBaseUrl));
1082
+ const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkRYW4HPSMjs.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 _chunkRMTASUAKjs.runSkillsCommand.call(void 0, { json: true });
1089
+ const exitCode = await _chunkZHUMDMOSjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1160
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
1161
1161
  return 0;
1162
1162
  }
1163
1163
  if (options.printCommand) {
1164
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
1164
+ _chunkDQ65ZVHNjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
1177
+ _chunkDQ65ZVHNjs.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
- _chunkRTO5QZWTjs.printCommandEnvelope.call(void 0,
1207
+ _chunkDQ65ZVHNjs.printCommandEnvelope.call(void 0,
1208
1208
  {
1209
1209
  ok: true,
1210
1210
  pinnedVersion
@@ -1,6 +1,6 @@
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
- var _chunkRMTASUAKjs = require('./chunk-RMTASUAK.js');
3
+ var _chunkZHUMDMOSjs = require('./chunk-ZHUMDMOS.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkRMTASUAKjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunkZHUMDMOSjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-23GAA3YO.mjs";
4
+ } from "./chunk-NOX2TCBP.mjs";
5
5
  import {
6
6
  resolveShellSpawn,
7
7
  runSkillsCommand
8
- } from "./chunk-TLQ3FZOC.mjs";
8
+ } from "./chunk-MV7QRALK.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-XKZXO7D3.mjs";
11
+ } from "./chunk-RNSWDKBM.mjs";
12
12
  import {
13
13
  autoDetectBaseUrl
14
- } from "./chunk-VE3U3SQC.mjs";
14
+ } from "./chunk-2LDADJNO.mjs";
15
15
 
16
16
  // src/cli/commands/update.ts
17
17
  import { spawn, spawnSync } from "child_process";
@@ -0,0 +1,88 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkBQR6UN3Cjs = require('./chunk-BQR6UN3C.js');
4
+
5
+ // src/cli/describe-options.ts
6
+ function addDescribeOptions(command, options = {}) {
7
+ command.option(
8
+ "--prebuilt",
9
+ "Show the Deepline tool or play, not a play your workspace created under the same name"
10
+ ).option("--tool", "Same as --prebuilt").option(
11
+ "--verbose",
12
+ "Show secondary fields, and fill in every input and read every output in the examples"
13
+ ).option(
14
+ "--cli-example",
15
+ "Show only the CLI example, and explain how it takes inputs and returns outputs"
16
+ ).option(
17
+ "--play-example",
18
+ "Show only the in-play example, and explain how it takes inputs and returns outputs"
19
+ ).option("--no-example", "Hide the run examples").option(
20
+ "--full-schema",
21
+ `Print every field: a long schema unfolded (over ${_chunkBQR6UN3Cjs.SCHEMA_LINE_LIMIT} lines), list rows, and a tool's raw response`
22
+ ).option(
23
+ "--fields <names>",
24
+ "Show only these fields, comma-separated, plus every required input"
25
+ ).option(
26
+ "--feature <name[=value]>",
27
+ "Describe one feature of a tool, such as a model: --feature model=openai/gpt-5.6-luna. A tool lists its features."
28
+ ).option(
29
+ "-o, --out <path>",
30
+ "Save the output to this file instead of printing it"
31
+ );
32
+ if (options.schemaOnly !== false) {
33
+ command.option(
34
+ "--schema-only",
35
+ "Print only the schema, with every field, and nothing else"
36
+ );
37
+ }
38
+ if (options.json !== false) {
39
+ command.option(
40
+ "--json",
41
+ "Print JSON instead of text; with --schema-only, only the input and output JSON Schemas"
42
+ );
43
+ }
44
+ return command;
45
+ }
46
+
47
+ // src/cli/execution-observation.ts
48
+ var _fs = require('fs');
49
+ function writeObservation(observation) {
50
+ const path = process.env.DEEPLINE_EXECUTION_OBSERVATION_PATH;
51
+ const invocationId = process.env.DEEPLINE_EXECUTION_OBSERVATION_ID;
52
+ if (!path || !invocationId) return;
53
+ const pending = `${path}.pending`;
54
+ _fs.writeFileSync.call(void 0,
55
+ pending,
56
+ JSON.stringify({
57
+ schema_version: 1,
58
+ invocation_id: invocationId,
59
+ ...observation
60
+ }),
61
+ { mode: 384 }
62
+ );
63
+ _fs.renameSync.call(void 0, pending, path);
64
+ }
65
+ function recordApiResponse(observation) {
66
+ writeObservation({
67
+ kind: "api_response",
68
+ received_at_ms: observation.receivedAtMs,
69
+ state: observation.state,
70
+ http_status: observation.httpStatus
71
+ });
72
+ }
73
+ function recordPlayTermination(run) {
74
+ if (typeof run.id !== "string" || !["completed", "failed", "cancelled", "canceled"].includes(
75
+ String(run.status)
76
+ ) || typeof run.finishedAt !== "number" || !Number.isSafeInteger(run.finishedAt) || run.finishedAt <= 0)
77
+ return;
78
+ writeObservation({
79
+ kind: "play_terminal",
80
+ run: { id: run.id, status: run.status, finishedAt: run.finishedAt }
81
+ });
82
+ }
83
+
84
+
85
+
86
+
87
+
88
+ exports.addDescribeOptions = addDescribeOptions; exports.recordApiResponse = recordApiResponse; exports.recordPlayTermination = recordPlayTermination;