deepline 0.3.523 → 0.3.525

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 (177) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +68 -60
  2. package/dist/bundling-sources/sdk/src/http-core.ts +14 -0
  3. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +10 -0
  6. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +60 -14
  7. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +9 -3
  8. package/dist/bundling-sources/shared_libs/observability/dlq.ts +19 -0
  9. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  10. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  11. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  12. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +397 -22
  13. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +473 -13
  14. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +28 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/run-retry-summary.ts +202 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +60 -8
  17. package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +112 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +39 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +13 -5
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +10 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-retry-facts.ts +62 -0
  22. package/dist/cli/auth-K7PMRXNG.js +43 -0
  23. package/dist/cli/{auth-ENQUQS56.mjs → auth-TH3VGYBK.mjs} +5 -5
  24. package/dist/cli/{billing-6A27ULCX.mjs → billing-CMHFI2LN.mjs} +8 -8
  25. package/dist/cli/{billing-6HONTJOY.js → billing-TWKVUFU2.js} +83 -83
  26. package/dist/cli/{chunk-JMMNCJ7Z.js → chunk-2WFVLOB7.js} +1 -1
  27. package/dist/cli/{chunk-S4YKRH3W.js → chunk-4UWXFXQF.js} +3 -3
  28. package/dist/cli/{chunk-PCORO245.mjs → chunk-5BSGWIQD.mjs} +2 -2
  29. package/dist/cli/{chunk-SBGKKOCC.js → chunk-5JFAQUZS.js} +26 -26
  30. package/dist/cli/{chunk-RVHUW4TN.js → chunk-5YAJGRWB.js} +17 -17
  31. package/dist/cli/{chunk-ITJ7NB2D.mjs → chunk-7AOFSZJM.mjs} +3 -1
  32. package/dist/cli/{chunk-JVEFMOY2.mjs → chunk-7C4F4TLR.mjs} +1 -1
  33. package/dist/cli/{chunk-QMBL5ZIQ.mjs → chunk-7OF3A4KJ.mjs} +3 -3
  34. package/dist/cli/{chunk-326WVSWS.js → chunk-AVDEYOVP.js} +269 -269
  35. package/dist/cli/{chunk-GJYLC4JB.mjs → chunk-BNH4Y35W.mjs} +2 -2
  36. package/dist/cli/{chunk-ZWN4RXC2.js → chunk-CKTRQSRA.js} +22 -22
  37. package/dist/cli/{chunk-I62LJ7NU.mjs → chunk-CLTL7ZJI.mjs} +1 -1
  38. package/dist/cli/{chunk-IEVXYHGJ.js → chunk-CQSANB3V.js} +5 -5
  39. package/dist/cli/{chunk-QYXIODWH.js → chunk-CWRL6IQP.js} +44 -29
  40. package/dist/cli/{chunk-WVQOXYTQ.mjs → chunk-CZNEQMJR.mjs} +37 -34
  41. package/dist/cli/{chunk-4NWY7JBB.js → chunk-DYS3KWYF.js} +11 -11
  42. package/dist/cli/{chunk-HSVGP4CI.mjs → chunk-EP6YH6QJ.mjs} +2 -2
  43. package/dist/cli/{chunk-XYL26236.js → chunk-ESWM2JW4.js} +2 -2
  44. package/dist/cli/{chunk-6OZ2WSHD.mjs → chunk-ETHVJ2ZE.mjs} +1 -1
  45. package/dist/cli/{chunk-6DBRBWHC.mjs → chunk-GCLNX72G.mjs} +2 -2
  46. package/dist/cli/{chunk-R2VZVHJP.mjs → chunk-GESIFFQX.mjs} +1 -1
  47. package/dist/cli/{chunk-QSAC3IVI.mjs → chunk-IMO3HXWZ.mjs} +1 -1
  48. package/dist/cli/{chunk-JGZQBDYG.mjs → chunk-JVWSIA2V.mjs} +4 -4
  49. package/dist/cli/{chunk-7GNKAACY.js → chunk-KBOSALBI.js} +10 -10
  50. package/dist/cli/{chunk-K326BEVR.js → chunk-KEZ3KBWW.js} +10 -10
  51. package/dist/cli/{chunk-7M5FRSFP.mjs → chunk-KPINGHIF.mjs} +2 -2
  52. package/dist/cli/{chunk-UH3EAFFN.mjs → chunk-LAMGJQDY.mjs} +2 -2
  53. package/dist/cli/{chunk-UQN4VTZL.js → chunk-LE537GBC.js} +13 -6
  54. package/dist/cli/{chunk-PESMXAUG.js → chunk-LXKH4MKH.js} +6 -6
  55. package/dist/cli/{chunk-4V63IJCL.mjs → chunk-M43ZYNDA.mjs} +5 -5
  56. package/dist/cli/{chunk-XVXEARHC.js → chunk-MHBSRNI7.js} +41 -41
  57. package/dist/cli/{chunk-HUC5SGJQ.js → chunk-MRUFGOJR.js} +2 -2
  58. package/dist/cli/{chunk-RQN4PHRE.js → chunk-N4MMU3QF.js} +21 -21
  59. package/dist/cli/{chunk-2BRDHM4S.js → chunk-NB2ECLQE.js} +9 -9
  60. package/dist/cli/{chunk-DNXP3D5H.mjs → chunk-NO4URKKT.mjs} +5 -5
  61. package/dist/cli/{chunk-MZROKQV3.js → chunk-NRBCETWL.js} +44 -44
  62. package/dist/cli/{chunk-JCTTXLAZ.mjs → chunk-OWQF6WVH.mjs} +10 -3
  63. package/dist/cli/{chunk-NWTMQGPP.mjs → chunk-OXFIJYN3.mjs} +8 -8
  64. package/dist/cli/{chunk-FBMOBNJY.js → chunk-P62LON53.js} +2 -2
  65. package/dist/cli/{chunk-NMU3VR5U.js → chunk-PMH4GLMD.js} +1 -0
  66. package/dist/cli/{chunk-S3A4IXBQ.mjs → chunk-PSX3WHIH.mjs} +1 -0
  67. package/dist/cli/{chunk-N5MLEXZ7.js → chunk-QR7VYYNM.js} +176 -173
  68. package/dist/cli/{chunk-RKREB7MU.mjs → chunk-RMZ6CISE.mjs} +3 -3
  69. package/dist/cli/{chunk-V46J3UTM.js → chunk-S5LUY3KJ.js} +7 -7
  70. package/dist/cli/{chunk-MCXPJYBN.js → chunk-TFEGJEYO.js} +3 -3
  71. package/dist/cli/{chunk-MT3WG3KR.js → chunk-TO72GW5I.js} +16 -16
  72. package/dist/cli/{chunk-H7275EZU.mjs → chunk-TXSBPBHB.mjs} +5 -5
  73. package/dist/cli/{chunk-SXTVJIGB.mjs → chunk-U4M32NFS.mjs} +1 -1
  74. package/dist/cli/{chunk-5WFQXAD4.mjs → chunk-UQYKSOGO.mjs} +5 -5
  75. package/dist/cli/{chunk-KILRUAXF.mjs → chunk-UXF3ODJJ.mjs} +2 -2
  76. package/dist/cli/{chunk-36LQQL5C.js → chunk-V2GN4PLK.js} +5 -5
  77. package/dist/cli/{chunk-HUIFUE4L.js → chunk-V65J64FL.js} +53 -53
  78. package/dist/cli/{chunk-U6DLLV3S.mjs → chunk-VYIAWAKJ.mjs} +1 -1
  79. package/dist/cli/{chunk-WGVJA4I5.js → chunk-WA3FG7DH.js} +14 -14
  80. package/dist/cli/{chunk-MHTRYBXY.mjs → chunk-WEYFSBAD.mjs} +44 -29
  81. package/dist/cli/{chunk-LZL6V5M5.mjs → chunk-WGRDOPAK.mjs} +2 -2
  82. package/dist/cli/{chunk-NTLBZUHD.js → chunk-XYIECA7M.js} +4 -2
  83. package/dist/cli/{chunk-QOO5W5XS.mjs → chunk-YC7FKAJ4.mjs} +12 -12
  84. package/dist/cli/{chunk-BN5VKY4X.js → chunk-ZS2WHWWL.js} +7 -7
  85. package/dist/cli/{chunk-F3WRLFFM.mjs → chunk-ZWFTHEPT.mjs} +2 -2
  86. package/dist/cli/command-docs.js +2 -2
  87. package/dist/cli/command-docs.mjs +1 -1
  88. package/dist/cli/{csv-UBACJK75.js → csv-5JHWVJ5N.js} +13 -13
  89. package/dist/cli/{csv-YFJ2JLUP.mjs → csv-OO554TPX.mjs} +4 -4
  90. package/dist/cli/{db-2ZPA2LZ7.js → db-CYQJ4OXF.js} +28 -28
  91. package/dist/cli/{db-NKGYTAQO.mjs → db-SQKJ6RKU.mjs} +7 -7
  92. package/dist/cli/describe-N7AKTUQV.mjs +50 -0
  93. package/dist/cli/describe-PASXOL3R.js +50 -0
  94. package/dist/cli/describe-core.d.mts +4 -2
  95. package/dist/cli/describe-core.d.ts +4 -2
  96. package/dist/cli/describe-core.js +5 -5
  97. package/dist/cli/describe-core.mjs +4 -4
  98. package/dist/cli/{executions-HTHQ7KKD.mjs → executions-F34DORW6.mjs} +7 -7
  99. package/dist/cli/{executions-NXMRGPIL.js → executions-K7EGCRKX.js} +9 -9
  100. package/dist/cli/{feedback-USP4T34P.mjs → feedback-GQHKCS66.mjs} +5 -5
  101. package/dist/cli/{feedback-TGVQACRO.js → feedback-NOQVCA3Q.js} +10 -10
  102. package/dist/cli/{git-KUONEHCD.mjs → git-2EEITXDB.mjs} +5 -5
  103. package/dist/cli/git-UU4YFJ2Q.js +25 -0
  104. package/dist/cli/index.js +146 -146
  105. package/dist/cli/index.mjs +45 -45
  106. package/dist/cli/{legacy-noops-B2GMHU42.mjs → legacy-noops-JHMY5XRB.mjs} +6 -6
  107. package/dist/cli/{legacy-noops-2JY3CQ24.js → legacy-noops-RFNHQ7RG.js} +9 -9
  108. package/dist/cli/{monitors-2OVBZJ6Z.mjs → monitors-RDMP6SPZ.mjs} +8 -8
  109. package/dist/cli/{monitors-XI6I52AX.js → monitors-UKRZ4BDK.js} +101 -101
  110. package/dist/cli/{org-5TUQ2H6Y.js → org-OX7TYTHV.js} +87 -87
  111. package/dist/cli/{org-BNJW764Y.mjs → org-RF3G4KMB.mjs} +7 -7
  112. package/dist/cli/{pages-QC3TQIPW.mjs → pages-FBM3MGSP.mjs} +7 -7
  113. package/dist/cli/{pages-UXCLX53Y.js → pages-MKQT5LFV.js} +19 -19
  114. package/dist/cli/{play-KRWMZ7FG.js → play-OOVX2DMV.js} +802 -713
  115. package/dist/cli/{play-45PPG5SZ.mjs → play-YWC2UORM.mjs} +197 -108
  116. package/dist/cli/{providers-RBUJ72Y3.js → providers-2CGZYLER.js} +10 -10
  117. package/dist/cli/{providers-JDT35MRL.mjs → providers-3PEQESIU.mjs} +7 -7
  118. package/dist/cli/{quickstart-JZ4Q3HFT.js → quickstart-6AANHKQZ.js} +6 -6
  119. package/dist/cli/{quickstart-GD2SWGAC.mjs → quickstart-KVB36SOW.mjs} +4 -4
  120. package/dist/cli/{run-JEAHA367.js → run-NJ7WV5TK.js} +46 -46
  121. package/dist/cli/{run-KIZ3HBI2.mjs → run-QC23NRKO.mjs} +27 -27
  122. package/dist/cli/{search-5UFNXHFK.mjs → search-7BMFFZI2.mjs} +9 -9
  123. package/dist/cli/search-NH4DTXUK.js +33 -0
  124. package/dist/cli/{search-output-HAXPKQO6.mjs → search-output-CALZ4ZI2.mjs} +4 -4
  125. package/dist/cli/{search-output-W3RDSVLE.js → search-output-XC2AVBFX.js} +6 -6
  126. package/dist/cli/{secrets-JAWT66B2.mjs → secrets-7ZHA57DI.mjs} +7 -7
  127. package/dist/cli/{secrets-PC7C2Q32.js → secrets-VHU4B2D4.js} +16 -16
  128. package/dist/cli/sessions-2TE5JWVP.js +18 -0
  129. package/dist/cli/{sessions-325V7G35.mjs → sessions-YYULWFZE.mjs} +6 -6
  130. package/dist/cli/{settings-FKHTA65P.mjs → settings-AVY4NNHI.mjs} +14 -14
  131. package/dist/cli/{settings-RGU6Y2QR.js → settings-WV77QJGD.js} +87 -87
  132. package/dist/cli/{setup-43GOYTFC.mjs → setup-AOUJ3RMU.mjs} +10 -10
  133. package/dist/cli/{setup-ZMZ7HU2I.js → setup-GE5TLTC4.js} +50 -50
  134. package/dist/cli/{skills-Q2VAHSXM.mjs → skills-FVWO2G66.mjs} +8 -8
  135. package/dist/cli/skills-OL7LD6QX.js +37 -0
  136. package/dist/cli/{tools-BUH7ZWDS.mjs → tools-URE655B4.mjs} +20 -20
  137. package/dist/cli/tools-VQ5JO6DI.js +57 -0
  138. package/dist/cli/{update-JFALWOHD.mjs → update-5B4G4345.mjs} +10 -10
  139. package/dist/cli/update-7ZOIOTZN.js +35 -0
  140. package/dist/cli/{artifacts-RBHR2DG4.mjs → views-GSECJ5IK.mjs} +77 -77
  141. package/dist/cli/views-IC762HEQ.js +270 -0
  142. package/dist/cli/{workflow-ISJKLY6X.mjs → workflow-6UQM565I.mjs} +8 -8
  143. package/dist/cli/{workflow-YELST32A.js → workflow-EME7ZEOV.js} +18 -18
  144. package/dist/{client-C2N7MofG.d.mts → client-Bd2meveV.d.mts} +1 -1
  145. package/dist/{client-C7lTRJjw.d.ts → client-CBCVhL8U.d.ts} +1 -1
  146. package/dist/{client-core-BTkDSKGn.d.mts → client-core-CGj8V9mw.d.mts} +110 -43
  147. package/dist/{client-core-hmhBi7Ib.d.ts → client-core-CsRRWCFy.d.ts} +110 -43
  148. package/dist/index.d.mts +3 -3
  149. package/dist/index.d.ts +3 -3
  150. package/dist/index.js +10 -10
  151. package/dist/index.mjs +7 -7
  152. package/dist/install-integrity.json +120 -118
  153. package/dist/plays/play-description.d.mts +1 -1
  154. package/dist/plays/play-description.d.ts +1 -1
  155. package/dist/plays/play-description.js +2 -2
  156. package/dist/plays/play-description.mjs +1 -1
  157. package/dist/plays/run-request.d.mts +1 -1
  158. package/dist/plays/run-request.d.ts +1 -1
  159. package/dist/release.d.mts +1 -1
  160. package/dist/release.d.ts +1 -1
  161. package/dist/release.js +2 -2
  162. package/dist/release.mjs +1 -1
  163. package/dist/server.d.mts +2 -2
  164. package/dist/server.d.ts +2 -2
  165. package/dist/server.js +6 -6
  166. package/dist/server.mjs +4 -4
  167. package/package.json +1 -1
  168. package/dist/cli/artifacts-RZTS2JHZ.js +0 -270
  169. package/dist/cli/auth-DPWYFQR5.js +0 -43
  170. package/dist/cli/describe-GX7DRKWZ.mjs +0 -50
  171. package/dist/cli/describe-WQZF7MEG.js +0 -50
  172. package/dist/cli/git-X3SCQREB.js +0 -25
  173. package/dist/cli/search-6JULJMD7.js +0 -33
  174. package/dist/cli/sessions-WFUCOJHZ.js +0 -18
  175. package/dist/cli/skills-3XTQ6FFM.js +0 -37
  176. package/dist/cli/tools-UK2R4YXQ.js +0 -57
  177. package/dist/cli/update-LNKPHS54.js +0 -35
@@ -1,28 +1,28 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-7M5FRSFP.mjs";
4
- import "./chunk-WVQOXYTQ.mjs";
3
+ } from "./chunk-KPINGHIF.mjs";
4
+ import "./chunk-CZNEQMJR.mjs";
5
5
  import "./chunk-L2VKAASU.mjs";
6
6
  import "./chunk-FKD3KL5Q.mjs";
7
- import "./chunk-S3A4IXBQ.mjs";
7
+ import "./chunk-PSX3WHIH.mjs";
8
8
  import "./chunk-UBKA33KY.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-6DBRBWHC.mjs";
11
+ } from "./chunk-GCLNX72G.mjs";
12
12
  import {
13
13
  cliFeatureEnabled
14
- } from "./chunk-SXTVJIGB.mjs";
15
- import "./chunk-JCTTXLAZ.mjs";
14
+ } from "./chunk-U4M32NFS.mjs";
15
+ import "./chunk-OWQF6WVH.mjs";
16
16
  import "./chunk-QNHHZ63P.mjs";
17
17
  import "./chunk-DLIRSHV6.mjs";
18
18
  import "./chunk-ZPGGW27Q.mjs";
19
- import "./chunk-JVEFMOY2.mjs";
19
+ import "./chunk-7C4F4TLR.mjs";
20
20
  import "./chunk-WZYKRD7T.mjs";
21
21
  import "./chunk-KRD6H754.mjs";
22
22
 
23
- // src/cli/commands/artifacts.ts
23
+ // src/cli/commands/views.ts
24
24
  import { readFile } from "fs/promises";
25
- var ARTIFACTS_FEATURE = "artifacts";
25
+ var VIEWS_FEATURE = "views";
26
26
  function print(command, json, data, lines) {
27
27
  printCommandEnvelope(
28
28
  { command, ...data, render: { sections: [{ title: command, lines }] } },
@@ -47,66 +47,66 @@ async function readJsonOption(value, flag) {
47
47
  throw new Error(`${flag} takes JSON, or @path to a JSON file.`);
48
48
  }
49
49
  }
50
- function artifactLines(artifact) {
50
+ function viewLines(view) {
51
51
  return [
52
- artifact.name,
53
- ` ${artifact.url}`,
54
- ` id ${artifact.id} \xB7 Play ${artifact.play} \xB7 ${artifact.access === "public" ? "public" : "workspace members"}`,
55
- ...artifact.description ? [` ${artifact.description}`] : []
52
+ view.name,
53
+ ` ${view.url}`,
54
+ ` id ${view.id} \xB7 Play ${view.play} \xB7 ${view.access === "public" ? "public" : "workspace members"}`,
55
+ ...view.description ? [` ${view.description}`] : []
56
56
  ];
57
57
  }
58
- function registerArtifactsCommands(program) {
59
- const artifacts = program.command("artifacts", { hidden: !cliFeatureEnabled(ARTIFACTS_FEATURE) }).description(
60
- "Show what a Play returns at a fixed URL on artifacts.deepline.com."
58
+ function registerViewsCommands(program) {
59
+ const views = program.command("views", { hidden: !cliFeatureEnabled(VIEWS_FEATURE) }).description(
60
+ "Show what a Play returns at a fixed URL on views.deepline.com."
61
61
  ).addHelpText(
62
62
  "after",
63
63
  `
64
64
  Examples:
65
- deepline artifacts create --name "Pipeline" --play score-accounts
66
- deepline artifacts refresh <id>
67
- deepline artifacts set-access <id> public
65
+ deepline views create --name "Pipeline" --play score-accounts
66
+ deepline views refresh <id>
67
+ deepline views set-access <id> public
68
68
  `
69
69
  );
70
- artifacts.command("list").description("List this workspace's artifacts.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
70
+ views.command("list").description("List this workspace's views.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
71
71
  async (options) => run(async () => {
72
- const result = await new DeeplineClient().listArtifacts({
72
+ const result = await new DeeplineClient().listViews({
73
73
  cursor: options.cursor,
74
74
  limit: options.limit
75
75
  });
76
- print("artifacts list", options.json, result, [
77
- ...result.artifacts.length === 0 ? [
78
- "No artifacts yet. Create one: deepline artifacts create --name <name> --play <play>"
76
+ print("views list", options.json, result, [
77
+ ...result.views.length === 0 ? [
78
+ "No views yet. Create one: deepline views create --name <name> --play <play>"
79
79
  ] : [],
80
- ...result.artifacts.flatMap(artifactLines),
80
+ ...result.views.flatMap(viewLines),
81
81
  ...result.next_cursor ? [`More: --cursor ${result.next_cursor}`] : []
82
82
  ]);
83
83
  })
84
84
  );
85
- artifacts.command("get <id>").description("Show one artifact and what you may do with it.").option("--json", "Emit raw JSON response").action(
85
+ views.command("get <id>").description("Show one view and what you may do with it.").option("--json", "Emit raw JSON response").action(
86
86
  async (id, options) => run(async () => {
87
- const artifact = await new DeeplineClient().getArtifact(id);
88
- print("artifacts get", options.json, artifact, [
89
- ...artifactLines(artifact),
90
- ` saved input ${JSON.stringify(artifact.input)}`
87
+ const view = await new DeeplineClient().getView(id);
88
+ print("views get", options.json, view, [
89
+ ...viewLines(view),
90
+ ` saved input ${JSON.stringify(view.input)}`
91
91
  ]);
92
92
  })
93
93
  );
94
- artifacts.command("create").description("Create an artifact that shows a Play's runs at a fixed URL.").requiredOption("--name <name>", "Artifact name").requiredOption(
94
+ views.command("create").description("Create a view that shows a Play's runs at a fixed URL.").requiredOption("--name <name>", "View name").requiredOption(
95
95
  "--play <play>",
96
96
  "Play in this workspace, or prebuilt/<name>"
97
97
  ).option(
98
98
  "--input <json>",
99
99
  "Saved input Refresh runs the Play with (JSON or @file)"
100
- ).option("--description <text>", "What the artifact is").option("--json", "Emit raw JSON response").addHelpText(
100
+ ).option("--description <text>", "What the view is").option("--json", "Emit raw JSON response").addHelpText(
101
101
  "after",
102
102
  `
103
103
  Examples:
104
- deepline artifacts create --name "Pipeline" --play score-accounts
105
- deepline artifacts create --name "Brief" --play meeting-brief --input '{"team":"Growth"}'
104
+ deepline views create --name "Pipeline" --play score-accounts
105
+ deepline views create --name "Brief" --play meeting-brief --input '{"team":"Growth"}'
106
106
  `
107
107
  ).action(
108
108
  async (options) => run(async () => {
109
- const artifact = await new DeeplineClient().createArtifact({
109
+ const view = await new DeeplineClient().createView({
110
110
  name: options.name,
111
111
  play: options.play,
112
112
  ...options.input !== void 0 ? {
@@ -117,18 +117,18 @@ Examples:
117
117
  } : {},
118
118
  ...options.description ? { description: options.description } : {}
119
119
  });
120
- print("artifacts create", options.json, artifact, [
121
- `Created ${artifact.name}`,
122
- ...artifactLines(artifact)
120
+ print("views create", options.json, view, [
121
+ `Created ${view.name}`,
122
+ ...viewLines(view)
123
123
  ]);
124
124
  })
125
125
  );
126
- artifacts.command("edit <id>").description(
127
- "Change an artifact's name, Play, saved input, or description."
126
+ views.command("edit <id>").description(
127
+ "Change a view's name, Play, saved input, or description."
128
128
  ).option("--name <name>", "New name").option("--play <play>", "Play in this workspace, or prebuilt/<name>").option(
129
129
  "--input <json>",
130
130
  "Saved input Refresh runs the Play with (JSON or @file)"
131
- ).option("--description <text>", "What the artifact is").option("--json", "Emit raw JSON response").action(
131
+ ).option("--description <text>", "What the view is").option("--json", "Emit raw JSON response").action(
132
132
  async (id, options) => run(async () => {
133
133
  const fields = {
134
134
  ...options.name !== void 0 ? { name: options.name } : {},
@@ -143,80 +143,80 @@ Examples:
143
143
  };
144
144
  if (Object.keys(fields).length === 0) {
145
145
  throw new Error(
146
- "Nothing to change. See: deepline artifacts edit --help"
146
+ "Nothing to change. See: deepline views edit --help"
147
147
  );
148
148
  }
149
- const artifact = await new DeeplineClient().updateArtifact(id, fields);
149
+ const view = await new DeeplineClient().updateView(id, fields);
150
150
  print(
151
- "artifacts edit",
151
+ "views edit",
152
152
  options.json,
153
- artifact,
154
- artifactLines(artifact)
153
+ view,
154
+ viewLines(view)
155
155
  );
156
156
  })
157
157
  );
158
- artifacts.command("runs <id>").description("List runs of the artifact's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
158
+ views.command("runs <id>").description("List runs of the view's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
159
159
  async (id, options) => run(async () => {
160
- const result = await new DeeplineClient().listArtifactRuns(id, {
160
+ const result = await new DeeplineClient().listViewRuns(id, {
161
161
  limit: options.limit
162
162
  });
163
- print("artifacts runs", options.json, result, [
164
- ...result.runs.length === 0 ? ["No runs yet. Run: deepline artifacts refresh " + id] : [],
163
+ print("views runs", options.json, result, [
164
+ ...result.runs.length === 0 ? ["No runs yet. Run: deepline views refresh " + id] : [],
165
165
  ...result.runs.map(
166
166
  (r) => `${r.run_id} ${r.status} ${new Date(r.finished_at ?? r.created_at).toISOString()}`
167
167
  )
168
168
  ]);
169
169
  })
170
170
  );
171
- artifacts.command("refresh <id>").description(
172
- "Run the artifact's Play. The artifact shows the run when it finishes."
171
+ views.command("refresh <id>").description(
172
+ "Run the view's Play. The view shows the run when it finishes."
173
173
  ).option(
174
174
  "--input <json>",
175
- "Input for this run instead of the artifact's saved input"
175
+ "Input for this run instead of the view's saved input"
176
176
  ).option("--json", "Emit raw JSON response").action(
177
177
  async (id, options) => run(async () => {
178
178
  const input = options.input !== void 0 ? await readJsonOption(options.input, "--input") : void 0;
179
- const started = await new DeeplineClient().refreshArtifact(id, input);
180
- print("artifacts refresh", options.json, started, [
179
+ const started = await new DeeplineClient().refreshView(id, input);
180
+ print("views refresh", options.json, started, [
181
181
  `Started run ${started.workflowId}.`,
182
182
  `Watch it: deepline runs get ${started.workflowId}`
183
183
  ]);
184
184
  })
185
185
  );
186
- artifacts.command("set-access <id> <access>").description(
187
- "Choose who can open an artifact: workspace or public. Public shows every run of its Play to anyone with the link."
186
+ views.command("set-access <id> <access>").description(
187
+ "Choose who can open a view: workspace or public. Public shows every run of its Play to anyone with the link."
188
188
  ).option("--json", "Emit raw JSON response").action(
189
189
  async (id, access, options) => run(async () => {
190
190
  if (access !== "workspace" && access !== "public") {
191
191
  throw new Error("Access is workspace or public.");
192
192
  }
193
- const artifact = await new DeeplineClient().setArtifactAccess(
193
+ const view = await new DeeplineClient().setViewAccess(
194
194
  id,
195
195
  access
196
196
  );
197
197
  print(
198
- "artifacts set-access",
198
+ "views set-access",
199
199
  options.json,
200
- artifact,
201
- artifactLines(artifact)
200
+ view,
201
+ viewLines(view)
202
202
  );
203
203
  })
204
204
  );
205
- artifacts.command("delete <id>").description("Delete an artifact. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
205
+ views.command("delete <id>").description("Delete a view. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
206
206
  async (id, options) => run(async () => {
207
- const result = await new DeeplineClient().deleteArtifact(id);
208
- print("artifacts delete", options.json, result, [
209
- `Deleted artifact ${id}.`
207
+ const result = await new DeeplineClient().deleteView(id);
208
+ print("views delete", options.json, result, [
209
+ `Deleted view ${id}.`
210
210
  ]);
211
211
  })
212
212
  );
213
- const permissions = artifacts.command("permissions").description(
214
- "Show or change who may create, edit, delete, publish, and refresh artifacts."
213
+ const permissions = views.command("permissions").description(
214
+ "Show or change who may create, edit, delete, publish, and refresh views."
215
215
  );
216
- permissions.command("get", { isDefault: true }).description("Show the workspace's artifact rules and what you may do.").option("--json", "Emit raw JSON response").action(
216
+ permissions.command("get", { isDefault: true }).description("Show the workspace's view rules and what you may do.").option("--json", "Emit raw JSON response").action(
217
217
  async (options) => run(async () => {
218
- const result = await new DeeplineClient().getArtifactPermissions();
219
- print("artifacts permissions", options.json, result, [
218
+ const result = await new DeeplineClient().getViewPermissions();
219
+ print("views permissions", options.json, result, [
220
220
  ...Object.entries(result.rules).map(
221
221
  ([verb, level]) => `${verb}: ${level}`
222
222
  ),
@@ -234,8 +234,8 @@ Examples:
234
234
  "refresh"
235
235
  ];
236
236
  permissions.command("set").description(
237
- "Change artifact rules (admins only). Each is members or admins."
238
- ).option("--create <level>", "Create artifacts").option("--edit <level>", "Edit artifacts").option("--delete <level>", "Delete artifacts").option("--set-access <level>", "Make artifacts public or workspace-only").option("--refresh <level>", "Refresh artifacts and start Plays from them").option("--json", "Emit raw JSON response").action(
237
+ "Change view rules (admins only). Each is members or admins."
238
+ ).option("--create <level>", "Create views").option("--edit <level>", "Edit views").option("--delete <level>", "Delete views").option("--set-access <level>", "Make views public or workspace-only").option("--refresh <level>", "Refresh views and start Plays from them").option("--json", "Emit raw JSON response").action(
239
239
  async (options) => run(async () => {
240
240
  const rules = {};
241
241
  for (const verb of verbs) {
@@ -250,12 +250,12 @@ Examples:
250
250
  }
251
251
  if (Object.keys(rules).length === 0) {
252
252
  throw new Error(
253
- "Pass at least one rule. See: deepline artifacts permissions set --help"
253
+ "Pass at least one rule. See: deepline views permissions set --help"
254
254
  );
255
255
  }
256
- const result = await new DeeplineClient().setArtifactPermissions(rules);
256
+ const result = await new DeeplineClient().setViewPermissions(rules);
257
257
  print(
258
- "artifacts permissions set",
258
+ "views permissions set",
259
259
  options.json,
260
260
  result,
261
261
  Object.entries(result.rules).map(
@@ -266,5 +266,5 @@ Examples:
266
266
  );
267
267
  }
268
268
  export {
269
- registerArtifactsCommands
269
+ registerViewsCommands
270
270
  };
@@ -0,0 +1,270 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkV2GN4PLKjs = require('./chunk-V2GN4PLK.js');
4
+ require('./chunk-QR7VYYNM.js');
5
+ require('./chunk-E4CABWXL.js');
6
+ require('./chunk-2KHUFWTK.js');
7
+ require('./chunk-PMH4GLMD.js');
8
+ require('./chunk-XDVT3GOM.js');
9
+
10
+
11
+ var _chunkS5LUY3KJjs = require('./chunk-S5LUY3KJ.js');
12
+
13
+
14
+ var _chunkTFEGJEYOjs = require('./chunk-TFEGJEYO.js');
15
+ require('./chunk-LE537GBC.js');
16
+ require('./chunk-T2N3B7IQ.js');
17
+ require('./chunk-XNYIZMNQ.js');
18
+ require('./chunk-SQWET4SL.js');
19
+ require('./chunk-2WFVLOB7.js');
20
+ require('./chunk-OG64RBAC.js');
21
+ require('./chunk-COGTRVWW.js');
22
+
23
+ // src/cli/commands/views.ts
24
+ var _promises = require('fs/promises');
25
+ var VIEWS_FEATURE = "views";
26
+ function print(command, json, data, lines) {
27
+ _chunkS5LUY3KJjs.printCommandEnvelope.call(void 0,
28
+ { command, ...data, render: { sections: [{ title: command, lines }] } },
29
+ { json: Boolean(json), text: `${lines.join("\n")}
30
+ ` }
31
+ );
32
+ }
33
+ async function run(action) {
34
+ try {
35
+ await action();
36
+ } catch (error) {
37
+ console.error(error instanceof Error ? error.message : String(error));
38
+ process.exitCode = 1;
39
+ }
40
+ }
41
+ async function readJsonOption(value, flag) {
42
+ if (value === void 0) return void 0;
43
+ const text = value.startsWith("@") ? await _promises.readFile.call(void 0, value.slice(1), "utf8") : value;
44
+ try {
45
+ return JSON.parse(text);
46
+ } catch (e) {
47
+ throw new Error(`${flag} takes JSON, or @path to a JSON file.`);
48
+ }
49
+ }
50
+ function viewLines(view) {
51
+ return [
52
+ view.name,
53
+ ` ${view.url}`,
54
+ ` id ${view.id} \xB7 Play ${view.play} \xB7 ${view.access === "public" ? "public" : "workspace members"}`,
55
+ ...view.description ? [` ${view.description}`] : []
56
+ ];
57
+ }
58
+ function registerViewsCommands(program) {
59
+ const views = program.command("views", { hidden: !_chunkTFEGJEYOjs.cliFeatureEnabled.call(void 0, VIEWS_FEATURE) }).description(
60
+ "Show what a Play returns at a fixed URL on views.deepline.com."
61
+ ).addHelpText(
62
+ "after",
63
+ `
64
+ Examples:
65
+ deepline views create --name "Pipeline" --play score-accounts
66
+ deepline views refresh <id>
67
+ deepline views set-access <id> public
68
+ `
69
+ );
70
+ views.command("list").description("List this workspace's views.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
71
+ async (options) => run(async () => {
72
+ const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().listViews({
73
+ cursor: options.cursor,
74
+ limit: options.limit
75
+ });
76
+ print("views list", options.json, result, [
77
+ ...result.views.length === 0 ? [
78
+ "No views yet. Create one: deepline views create --name <name> --play <play>"
79
+ ] : [],
80
+ ...result.views.flatMap(viewLines),
81
+ ...result.next_cursor ? [`More: --cursor ${result.next_cursor}`] : []
82
+ ]);
83
+ })
84
+ );
85
+ views.command("get <id>").description("Show one view and what you may do with it.").option("--json", "Emit raw JSON response").action(
86
+ async (id, options) => run(async () => {
87
+ const view = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().getView(id);
88
+ print("views get", options.json, view, [
89
+ ...viewLines(view),
90
+ ` saved input ${JSON.stringify(view.input)}`
91
+ ]);
92
+ })
93
+ );
94
+ views.command("create").description("Create a view that shows a Play's runs at a fixed URL.").requiredOption("--name <name>", "View name").requiredOption(
95
+ "--play <play>",
96
+ "Play in this workspace, or prebuilt/<name>"
97
+ ).option(
98
+ "--input <json>",
99
+ "Saved input Refresh runs the Play with (JSON or @file)"
100
+ ).option("--description <text>", "What the view is").option("--json", "Emit raw JSON response").addHelpText(
101
+ "after",
102
+ `
103
+ Examples:
104
+ deepline views create --name "Pipeline" --play score-accounts
105
+ deepline views create --name "Brief" --play meeting-brief --input '{"team":"Growth"}'
106
+ `
107
+ ).action(
108
+ async (options) => run(async () => {
109
+ const view = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().createView({
110
+ name: options.name,
111
+ play: options.play,
112
+ ...options.input !== void 0 ? {
113
+ input: await readJsonOption(
114
+ options.input,
115
+ "--input"
116
+ )
117
+ } : {},
118
+ ...options.description ? { description: options.description } : {}
119
+ });
120
+ print("views create", options.json, view, [
121
+ `Created ${view.name}`,
122
+ ...viewLines(view)
123
+ ]);
124
+ })
125
+ );
126
+ views.command("edit <id>").description(
127
+ "Change a view's name, Play, saved input, or description."
128
+ ).option("--name <name>", "New name").option("--play <play>", "Play in this workspace, or prebuilt/<name>").option(
129
+ "--input <json>",
130
+ "Saved input Refresh runs the Play with (JSON or @file)"
131
+ ).option("--description <text>", "What the view is").option("--json", "Emit raw JSON response").action(
132
+ async (id, options) => run(async () => {
133
+ const fields = {
134
+ ...options.name !== void 0 ? { name: options.name } : {},
135
+ ...options.play !== void 0 ? { play: options.play } : {},
136
+ ...options.description !== void 0 ? { description: options.description } : {},
137
+ ...options.input !== void 0 ? {
138
+ input: await readJsonOption(
139
+ options.input,
140
+ "--input"
141
+ )
142
+ } : {}
143
+ };
144
+ if (Object.keys(fields).length === 0) {
145
+ throw new Error(
146
+ "Nothing to change. See: deepline views edit --help"
147
+ );
148
+ }
149
+ const view = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().updateView(id, fields);
150
+ print(
151
+ "views edit",
152
+ options.json,
153
+ view,
154
+ viewLines(view)
155
+ );
156
+ })
157
+ );
158
+ views.command("runs <id>").description("List runs of the view's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
159
+ async (id, options) => run(async () => {
160
+ const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().listViewRuns(id, {
161
+ limit: options.limit
162
+ });
163
+ print("views runs", options.json, result, [
164
+ ...result.runs.length === 0 ? ["No runs yet. Run: deepline views refresh " + id] : [],
165
+ ...result.runs.map(
166
+ (r) => `${r.run_id} ${r.status} ${new Date(_nullishCoalesce(r.finished_at, () => ( r.created_at))).toISOString()}`
167
+ )
168
+ ]);
169
+ })
170
+ );
171
+ views.command("refresh <id>").description(
172
+ "Run the view's Play. The view shows the run when it finishes."
173
+ ).option(
174
+ "--input <json>",
175
+ "Input for this run instead of the view's saved input"
176
+ ).option("--json", "Emit raw JSON response").action(
177
+ async (id, options) => run(async () => {
178
+ const input = options.input !== void 0 ? await readJsonOption(options.input, "--input") : void 0;
179
+ const started = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().refreshView(id, input);
180
+ print("views refresh", options.json, started, [
181
+ `Started run ${started.workflowId}.`,
182
+ `Watch it: deepline runs get ${started.workflowId}`
183
+ ]);
184
+ })
185
+ );
186
+ views.command("set-access <id> <access>").description(
187
+ "Choose who can open a view: workspace or public. Public shows every run of its Play to anyone with the link."
188
+ ).option("--json", "Emit raw JSON response").action(
189
+ async (id, access, options) => run(async () => {
190
+ if (access !== "workspace" && access !== "public") {
191
+ throw new Error("Access is workspace or public.");
192
+ }
193
+ const view = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().setViewAccess(
194
+ id,
195
+ access
196
+ );
197
+ print(
198
+ "views set-access",
199
+ options.json,
200
+ view,
201
+ viewLines(view)
202
+ );
203
+ })
204
+ );
205
+ views.command("delete <id>").description("Delete a view. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
206
+ async (id, options) => run(async () => {
207
+ const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().deleteView(id);
208
+ print("views delete", options.json, result, [
209
+ `Deleted view ${id}.`
210
+ ]);
211
+ })
212
+ );
213
+ const permissions = views.command("permissions").description(
214
+ "Show or change who may create, edit, delete, publish, and refresh views."
215
+ );
216
+ permissions.command("get", { isDefault: true }).description("Show the workspace's view rules and what you may do.").option("--json", "Emit raw JSON response").action(
217
+ async (options) => run(async () => {
218
+ const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().getViewPermissions();
219
+ print("views permissions", options.json, result, [
220
+ ...Object.entries(result.rules).map(
221
+ ([verb, level]) => `${verb}: ${level}`
222
+ ),
223
+ ...result.can ? [
224
+ `you may: ${Object.entries(result.can).filter(([, ok]) => ok).map(([verb]) => verb).join(", ") || "view only"}`
225
+ ] : []
226
+ ]);
227
+ })
228
+ );
229
+ const verbs = [
230
+ "create",
231
+ "edit",
232
+ "delete",
233
+ "setAccess",
234
+ "refresh"
235
+ ];
236
+ permissions.command("set").description(
237
+ "Change view rules (admins only). Each is members or admins."
238
+ ).option("--create <level>", "Create views").option("--edit <level>", "Edit views").option("--delete <level>", "Delete views").option("--set-access <level>", "Make views public or workspace-only").option("--refresh <level>", "Refresh views and start Plays from them").option("--json", "Emit raw JSON response").action(
239
+ async (options) => run(async () => {
240
+ const rules = {};
241
+ for (const verb of verbs) {
242
+ const value = options[verb];
243
+ if (value === void 0) continue;
244
+ if (value !== "members" && value !== "admins") {
245
+ throw new Error(
246
+ `--${verb === "setAccess" ? "set-access" : verb} is members or admins.`
247
+ );
248
+ }
249
+ rules[verb] = value;
250
+ }
251
+ if (Object.keys(rules).length === 0) {
252
+ throw new Error(
253
+ "Pass at least one rule. See: deepline views permissions set --help"
254
+ );
255
+ }
256
+ const result = await new (0, _chunkV2GN4PLKjs.DeeplineClient)().setViewPermissions(rules);
257
+ print(
258
+ "views permissions set",
259
+ options.json,
260
+ result,
261
+ Object.entries(result.rules).map(
262
+ ([verb, level]) => `${verb}: ${level}`
263
+ )
264
+ );
265
+ })
266
+ );
267
+ }
268
+
269
+
270
+ exports.registerViewsCommands = registerViewsCommands;
@@ -6,24 +6,24 @@ import {
6
6
  } from "./chunk-H7HIDGZ7.mjs";
7
7
  import {
8
8
  DeeplineClient
9
- } from "./chunk-7M5FRSFP.mjs";
10
- import "./chunk-WVQOXYTQ.mjs";
9
+ } from "./chunk-KPINGHIF.mjs";
10
+ import "./chunk-CZNEQMJR.mjs";
11
11
  import "./chunk-L2VKAASU.mjs";
12
12
  import "./chunk-FKD3KL5Q.mjs";
13
- import "./chunk-S3A4IXBQ.mjs";
13
+ import "./chunk-PSX3WHIH.mjs";
14
14
  import "./chunk-UBKA33KY.mjs";
15
15
  import {
16
16
  printCommandEnvelope,
17
17
  printJson,
18
18
  shouldEmitJson,
19
19
  sleep
20
- } from "./chunk-6DBRBWHC.mjs";
21
- import "./chunk-SXTVJIGB.mjs";
22
- import "./chunk-JCTTXLAZ.mjs";
20
+ } from "./chunk-GCLNX72G.mjs";
21
+ import "./chunk-U4M32NFS.mjs";
22
+ import "./chunk-OWQF6WVH.mjs";
23
23
  import "./chunk-QNHHZ63P.mjs";
24
24
  import "./chunk-DLIRSHV6.mjs";
25
25
  import "./chunk-ZPGGW27Q.mjs";
26
- import "./chunk-JVEFMOY2.mjs";
26
+ import "./chunk-7C4F4TLR.mjs";
27
27
  import "./chunk-WZYKRD7T.mjs";
28
28
  import "./chunk-KRD6H754.mjs";
29
29
 
@@ -1702,7 +1702,7 @@ async function transformOne(api, workflowId, outDir, publish) {
1702
1702
  await writeFile(file, compiled.sourceCode, "utf8");
1703
1703
  let published = false;
1704
1704
  if (publish) {
1705
- const { handlePlayPublish } = await import("./play-45PPG5SZ.mjs");
1705
+ const { handlePlayPublish } = await import("./play-YWC2UORM.mjs");
1706
1706
  const code = await handlePlayPublish([file]);
1707
1707
  if (code !== 0) {
1708
1708
  return {