deepline 0.3.509 → 0.3.511

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 (152) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +159 -0
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +7 -2
  4. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +3 -3
  5. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +94 -43
  6. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +111 -27
  7. package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +79 -6
  8. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +80 -6
  9. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +571 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +218 -33
  11. package/dist/cli/artifacts-G6JHRHY5.mjs +268 -0
  12. package/dist/cli/artifacts-PLF5ZUS7.js +268 -0
  13. package/dist/cli/{auth-6IR2QH4N.mjs → auth-2XMJMDWG.mjs} +5 -5
  14. package/dist/cli/auth-PI2KS2CD.js +43 -0
  15. package/dist/cli/{billing-WEWHH6ST.mjs → billing-6C5AI42X.mjs} +7 -7
  16. package/dist/cli/{billing-SYBK3ZYU.js → billing-Z3XFXP3H.js} +82 -82
  17. package/dist/cli/{chunk-JZJNA57M.js → chunk-2Q4H2Y6N.js} +6 -6
  18. package/dist/cli/{chunk-VTVZ7EUA.js → chunk-2YVRIXVR.js} +9 -9
  19. package/dist/cli/{chunk-RSKAPLST.mjs → chunk-5WTLXL6O.mjs} +1 -1
  20. package/dist/cli/{chunk-YJM3NOME.mjs → chunk-77DPQI6W.mjs} +94 -10
  21. package/dist/cli/{chunk-FNLGMMJJ.mjs → chunk-ASXOFBF7.mjs} +2 -2
  22. package/dist/cli/{chunk-AO63MXT6.js → chunk-BHV7JKXQ.js} +1 -1
  23. package/dist/cli/{chunk-RA2NKHV5.js → chunk-D5VWSR4D.js} +5 -5
  24. package/dist/cli/{chunk-CMSPA5VX.js → chunk-FAGSSIOY.js} +6 -6
  25. package/dist/cli/{chunk-J5P4PDRT.js → chunk-FF25PDQ2.js} +94 -10
  26. package/dist/cli/{chunk-SEQIB5WJ.mjs → chunk-FTT2SBBH.mjs} +5 -5
  27. package/dist/cli/{chunk-5Y3I5LEQ.js → chunk-FV4PASXH.js} +16 -16
  28. package/dist/cli/{chunk-GTAU4C44.js → chunk-GD3ES3JU.js} +14 -14
  29. package/dist/cli/{chunk-HMAETS53.js → chunk-GGQHOLH6.js} +3 -3
  30. package/dist/cli/{chunk-T67NAGSD.mjs → chunk-GJWL4KTY.mjs} +4 -4
  31. package/dist/cli/{chunk-6KBVQ76G.mjs → chunk-HLEZQDEZ.mjs} +2 -2
  32. package/dist/cli/{chunk-WJ6H2W3O.mjs → chunk-ISY7PBIK.mjs} +5 -5
  33. package/dist/cli/{chunk-AD45WJHN.js → chunk-IYWN7M4I.js} +5 -5
  34. package/dist/cli/{chunk-3CZHC24N.mjs → chunk-JDDKJIZU.mjs} +1 -1
  35. package/dist/cli/{chunk-E3HWUGDT.mjs → chunk-JHBZBCU4.mjs} +1 -1
  36. package/dist/cli/{chunk-7KALZEDZ.js → chunk-JIY25SUX.js} +4 -4
  37. package/dist/cli/{chunk-726UDAV2.js → chunk-JYFLIQPE.js} +7 -7
  38. package/dist/cli/{chunk-DGOSW42X.js → chunk-K4JB2BZP.js} +96 -96
  39. package/dist/cli/{chunk-XEQH65DT.mjs → chunk-KK6NZHAJ.mjs} +1 -1
  40. package/dist/cli/chunk-KUDNPJ43.js +77 -0
  41. package/dist/cli/{chunk-IZW7IOD6.mjs → chunk-KXGH4YUQ.mjs} +1 -1
  42. package/dist/cli/{chunk-Q7G6WORO.js → chunk-KZBKQPSA.js} +2 -2
  43. package/dist/cli/{chunk-4DVANPBN.js → chunk-LDZYGM7W.js} +41 -41
  44. package/dist/cli/{chunk-XPKBYMJH.js → chunk-LKSJXTRP.js} +53 -53
  45. package/dist/cli/{chunk-Q5UO2ENN.js → chunk-NVMNMKZW.js} +3 -3
  46. package/dist/cli/{chunk-VZ773N7G.js → chunk-O37BQ2CG.js} +21 -10
  47. package/dist/cli/{chunk-OOD5LGUS.mjs → chunk-OQ4YBPOQ.mjs} +3 -3
  48. package/dist/cli/{chunk-UART6FGK.mjs → chunk-PCI4MMH7.mjs} +1 -1
  49. package/dist/cli/{chunk-2ZJRCAHG.js → chunk-PI45LZ5B.js} +11 -11
  50. package/dist/cli/{chunk-O527H5GY.js → chunk-PUFEARWT.js} +16 -16
  51. package/dist/cli/{chunk-25MAOMVS.mjs → chunk-QDWNVTTO.mjs} +2 -2
  52. package/dist/cli/{chunk-WUKNKFB3.mjs → chunk-RPPU3XB3.mjs} +2 -2
  53. package/dist/cli/{chunk-XIBNY6H6.mjs → chunk-S5C4CWSS.mjs} +5 -5
  54. package/dist/cli/{chunk-2U7Z4LFG.mjs → chunk-S6KEACD3.mjs} +6 -6
  55. package/dist/cli/{chunk-Y4M5HPQV.mjs → chunk-SI4QXATV.mjs} +5 -5
  56. package/dist/cli/{chunk-R2KNJMOY.mjs → chunk-VEOFISLZ.mjs} +1 -1
  57. package/dist/cli/{chunk-Z2LVZDO5.js → chunk-VHFTN6VY.js} +44 -44
  58. package/dist/cli/{chunk-54YPOG5W.mjs → chunk-VQ74WMKG.mjs} +15 -4
  59. package/dist/cli/{chunk-ZXGMWXZW.js → chunk-WDBEWOU6.js} +2 -2
  60. package/dist/cli/{chunk-6TBRWRJ2.js → chunk-XGXXNT4O.js} +270 -199
  61. package/dist/cli/chunk-XREZY4FA.mjs +77 -0
  62. package/dist/cli/{chunk-K2RCVD7S.mjs → chunk-XSBGWMI6.mjs} +72 -1
  63. package/dist/cli/{chunk-S7JEF2MR.mjs → chunk-XXQZYLLL.mjs} +2 -2
  64. package/dist/cli/{chunk-EEEWADSR.mjs → chunk-XZ6IZIQJ.mjs} +2 -2
  65. package/dist/cli/{chunk-WPBTWRKG.js → chunk-YX7E2VQM.js} +26 -26
  66. package/dist/cli/{chunk-FQCIYGQY.mjs → chunk-ZFJ2U76O.mjs} +2 -2
  67. package/dist/cli/{chunk-7NMPGX3W.js → chunk-ZWGBQKW7.js} +21 -21
  68. package/dist/cli/{chunk-VH522HUP.mjs → chunk-ZYVR4A4P.mjs} +10 -10
  69. package/dist/cli/command-docs.js +2 -2
  70. package/dist/cli/command-docs.mjs +1 -1
  71. package/dist/cli/{csv-4LAJ2ZKG.mjs → csv-CNK6ZF3T.mjs} +4 -4
  72. package/dist/cli/{csv-5KNONIAX.js → csv-S44OGG2O.js} +13 -13
  73. package/dist/cli/{db-BEVCJI66.mjs → db-AVO6QJU6.mjs} +6 -6
  74. package/dist/cli/{db-5PEXOSN3.js → db-WKZ6EXNG.js} +27 -27
  75. package/dist/cli/{describe-TDJIUSD6.mjs → describe-2HQRT5MI.mjs} +18 -18
  76. package/dist/cli/describe-CCK77NER.js +50 -0
  77. package/dist/cli/describe-core.d.mts +2 -2
  78. package/dist/cli/describe-core.d.ts +2 -2
  79. package/dist/cli/{executions-KXCPU6YC.mjs → executions-DKHOR7HD.mjs} +6 -6
  80. package/dist/cli/{executions-36GV3A27.js → executions-MTAHNARA.js} +8 -8
  81. package/dist/cli/{feedback-GEUUT4S7.mjs → feedback-K6SJS4LG.mjs} +11 -7
  82. package/dist/cli/{feedback-SPQABV33.js → feedback-R2UABU3E.js} +15 -11
  83. package/dist/cli/{git-AE36X2R6.mjs → git-3EPA7433.mjs} +5 -5
  84. package/dist/cli/git-7L3PY2A4.js +25 -0
  85. package/dist/cli/index.js +177 -156
  86. package/dist/cli/index.mjs +80 -59
  87. package/dist/cli/{legacy-noops-TKPHN7WT.js → legacy-noops-3Q2D2F24.js} +9 -8
  88. package/dist/cli/{legacy-noops-LUEDAK7J.mjs → legacy-noops-66OPCJJD.mjs} +6 -5
  89. package/dist/cli/{monitors-JHJZ5XG7.mjs → monitors-2PYPRWT4.mjs} +7 -7
  90. package/dist/cli/{monitors-B2EAIGZI.js → monitors-KHH4MZDF.js} +100 -100
  91. package/dist/cli/{org-GUICCEBZ.mjs → org-WAW3OL7B.mjs} +6 -6
  92. package/dist/cli/{org-PYCPXEAU.js → org-X5G36B2Q.js} +72 -72
  93. package/dist/cli/{pages-Y2XI36HY.mjs → pages-KABWXDGW.mjs} +6 -6
  94. package/dist/cli/{pages-CV4TQNFY.js → pages-XDPHCHHU.js} +18 -18
  95. package/dist/cli/{play-VWCQNGZZ.mjs → play-654B2HQU.mjs} +18 -18
  96. package/dist/cli/{play-MTVK66JK.js → play-UE5FKQCO.js} +317 -317
  97. package/dist/cli/{providers-N72BUCXZ.js → providers-QT2BZMJ7.js} +9 -9
  98. package/dist/cli/{providers-ZOZTST3A.mjs → providers-SKNGX6IT.mjs} +6 -6
  99. package/dist/cli/{quickstart-DXIC3NHS.mjs → quickstart-BX7XMJIQ.mjs} +4 -4
  100. package/dist/cli/{quickstart-FK53VZB3.js → quickstart-XWDVAQTT.js} +6 -6
  101. package/dist/cli/{run-NNAYDCEN.js → run-C6YYD4AK.js} +41 -41
  102. package/dist/cli/{run-IL2KI33N.mjs → run-JTU4K4MY.mjs} +23 -23
  103. package/dist/cli/{search-7IPVMQCO.mjs → search-NHV4Y4SX.mjs} +8 -8
  104. package/dist/cli/search-RIFW5JCK.js +33 -0
  105. package/dist/cli/{search-output-ZY2GE35S.mjs → search-output-AAOMFK7K.mjs} +4 -4
  106. package/dist/cli/{search-output-YHTWLSDE.js → search-output-WLFFEGCY.js} +6 -6
  107. package/dist/cli/{secrets-ZML76SH2.js → secrets-H4WTLQJJ.js} +15 -15
  108. package/dist/cli/{secrets-BGUMHDZ7.mjs → secrets-S66PZSRO.mjs} +6 -6
  109. package/dist/cli/sessions-EFWO62XJ.js +18 -0
  110. package/dist/cli/{sessions-F5XO6HZJ.mjs → sessions-PY6FJX3O.mjs} +6 -5
  111. package/dist/cli/{settings-73SMIICV.mjs → settings-V7BM42KQ.mjs} +39 -12
  112. package/dist/cli/{settings-TOX2P5M5.js → settings-YO4FFPN6.js} +109 -82
  113. package/dist/cli/{setup-DNFHFQ7N.js → setup-IFZYYQ2W.js} +50 -50
  114. package/dist/cli/{setup-FDJZYBMS.mjs → setup-VUBM2HMH.mjs} +10 -10
  115. package/dist/cli/{skills-6HJ2IAY6.mjs → skills-EYWRSQQJ.mjs} +8 -8
  116. package/dist/cli/skills-LFP53SWQ.js +37 -0
  117. package/dist/cli/tools-SR2Q7KC5.js +57 -0
  118. package/dist/cli/{tools-4FJIIE4R.mjs → tools-VZOW4MUD.mjs} +17 -17
  119. package/dist/cli/update-ADZBZZZS.js +35 -0
  120. package/dist/cli/{update-UMRPPILV.mjs → update-CQDJJYU2.mjs} +10 -10
  121. package/dist/cli/{workflow-LSFOG5VU.mjs → workflow-2VRDIPF3.mjs} +7 -7
  122. package/dist/cli/{workflow-SK3BUHB4.js → workflow-XS3JEU6X.js} +17 -17
  123. package/dist/{client-DMpsMNH9.d.mts → client-By7bUS8h.d.mts} +1 -1
  124. package/dist/{client-BlwD-G4v.d.ts → client-CmlKSBXd.d.ts} +1 -1
  125. package/dist/{client-core-DwBLuEkm.d.ts → client-core-BM0mKhgp.d.ts} +93 -1
  126. package/dist/{client-core-CITtRTbB.d.mts → client-core-BZ3tpY_J.d.mts} +93 -1
  127. package/dist/index.d.mts +3 -3
  128. package/dist/index.d.ts +3 -3
  129. package/dist/index.js +9 -9
  130. package/dist/index.mjs +6 -6
  131. package/dist/install-integrity.json +111 -106
  132. package/dist/plays/play-description.d.mts +1 -1
  133. package/dist/plays/play-description.d.ts +1 -1
  134. package/dist/plays/run-request.d.mts +1 -1
  135. package/dist/plays/run-request.d.ts +1 -1
  136. package/dist/release.d.mts +1 -1
  137. package/dist/release.d.ts +1 -1
  138. package/dist/release.js +2 -2
  139. package/dist/release.mjs +1 -1
  140. package/dist/server.d.mts +2 -2
  141. package/dist/server.d.ts +2 -2
  142. package/dist/server.js +5 -5
  143. package/dist/server.mjs +3 -3
  144. package/package.json +1 -1
  145. package/dist/cli/auth-SUTQ4SZQ.js +0 -43
  146. package/dist/cli/describe-ZB6G6DOV.js +0 -50
  147. package/dist/cli/git-UX7L6R32.js +0 -25
  148. package/dist/cli/search-OZHP5ZE2.js +0 -33
  149. package/dist/cli/sessions-WDINUUZ3.js +0 -17
  150. package/dist/cli/skills-NE7WN5PP.js +0 -37
  151. package/dist/cli/tools-ETX4MNNO.js +0 -57
  152. package/dist/cli/update-N2DMPSUH.js +0 -35
@@ -0,0 +1,268 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkD5VWSR4Djs = require('./chunk-D5VWSR4D.js');
4
+ require('./chunk-XGXXNT4O.js');
5
+ require('./chunk-E4CABWXL.js');
6
+ require('./chunk-RNSHCJME.js');
7
+ require('./chunk-NMU3VR5U.js');
8
+ require('./chunk-WSGXBROE.js');
9
+
10
+
11
+ var _chunkJYFLIQPEjs = require('./chunk-JYFLIQPE.js');
12
+
13
+
14
+ var _chunkGGQHOLH6js = require('./chunk-GGQHOLH6.js');
15
+ require('./chunk-JIY25SUX.js');
16
+ require('./chunk-ALJJRZNJ.js');
17
+ require('./chunk-XNYIZMNQ.js');
18
+ require('./chunk-DIAWYWT5.js');
19
+ require('./chunk-BHV7JKXQ.js');
20
+ require('./chunk-OG64RBAC.js');
21
+ require('./chunk-COGTRVWW.js');
22
+
23
+ // src/cli/commands/artifacts.ts
24
+ var _promises = require('fs/promises');
25
+ var ARTIFACTS_FEATURE = "artifacts";
26
+ function print(command, json, data, lines) {
27
+ _chunkJYFLIQPEjs.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 artifactLines(artifact) {
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}`] : []
56
+ ];
57
+ }
58
+ function registerArtifactsCommands(program) {
59
+ const artifacts = program.command("artifacts", { hidden: !_chunkGGQHOLH6js.cliFeatureEnabled.call(void 0, ARTIFACTS_FEATURE) }).description(
60
+ "Show what a Play returns at a fixed URL on artifacts.deepline.com."
61
+ ).addHelpText(
62
+ "after",
63
+ `
64
+ Examples:
65
+ deepline artifacts create --name "Pipeline" --play score-accounts
66
+ deepline artifacts refresh <id>
67
+ deepline artifacts set-access <id> public
68
+ `
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(
71
+ async (options) => run(async () => {
72
+ const result = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().listArtifacts({
73
+ cursor: options.cursor,
74
+ limit: options.limit
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>"
79
+ ] : [],
80
+ ...result.artifacts.flatMap(artifactLines),
81
+ ...result.next_cursor ? [`More: --cursor ${result.next_cursor}`] : []
82
+ ]);
83
+ })
84
+ );
85
+ artifacts.command("get <id>").description("Show one artifact and what you may do with it.").option("--json", "Emit raw JSON response").action(
86
+ async (id, options) => run(async () => {
87
+ const artifact = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().getArtifact(id);
88
+ print("artifacts get", options.json, artifact, [
89
+ ...artifactLines(artifact),
90
+ ` saved input ${JSON.stringify(artifact.input)}`
91
+ ]);
92
+ })
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(
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 artifact is").option("--json", "Emit raw JSON response").addHelpText(
101
+ "after",
102
+ `
103
+ Examples:
104
+ deepline artifacts create --name "Pipeline" --play score-accounts
105
+ deepline artifacts create --name "Brief" --play meeting-brief --input '{"team":"Growth"}'
106
+ `
107
+ ).action(
108
+ async (options) => run(async () => {
109
+ const artifact = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().createArtifact({
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("artifacts create", options.json, artifact, [
121
+ `Created ${artifact.name}`,
122
+ ...artifactLines(artifact)
123
+ ]);
124
+ })
125
+ );
126
+ artifacts.command("edit <id>").description(
127
+ "Change an artifact'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 artifact 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 artifacts edit --help"
147
+ );
148
+ }
149
+ const artifact = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().updateArtifact(id, fields);
150
+ print(
151
+ "artifacts edit",
152
+ options.json,
153
+ artifact,
154
+ artifactLines(artifact)
155
+ );
156
+ })
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(
159
+ async (id, options) => run(async () => {
160
+ const result = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().listArtifactRuns(id, {
161
+ limit: options.limit
162
+ });
163
+ print("artifacts runs", options.json, result, [
164
+ ...result.runs.length === 0 ? ["No runs yet. Run: deepline artifacts 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
+ artifacts.command("refresh <id>").description(
172
+ "Run the artifact's Play. The artifact shows the run when it finishes."
173
+ ).option(
174
+ "--input <json>",
175
+ "Input for this run instead of the artifact'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, _chunkD5VWSR4Djs.DeeplineClient)().refreshArtifact(id, input);
180
+ print("artifacts refresh", options.json, started, [
181
+ `Started run ${started.workflowId}.`,
182
+ `Watch it: deepline runs get ${started.workflowId}`
183
+ ]);
184
+ })
185
+ );
186
+ artifacts.command("set-access <id> <access>").description("Choose who can open an artifact: workspace or public.").option("--json", "Emit raw JSON response").action(
187
+ async (id, access, options) => run(async () => {
188
+ if (access !== "workspace" && access !== "public") {
189
+ throw new Error("Access is workspace or public.");
190
+ }
191
+ const artifact = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().setArtifactAccess(
192
+ id,
193
+ access
194
+ );
195
+ print(
196
+ "artifacts set-access",
197
+ options.json,
198
+ artifact,
199
+ artifactLines(artifact)
200
+ );
201
+ })
202
+ );
203
+ artifacts.command("delete <id>").description("Delete an artifact. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
204
+ async (id, options) => run(async () => {
205
+ const result = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().deleteArtifact(id);
206
+ print("artifacts delete", options.json, result, [
207
+ `Deleted artifact ${id}.`
208
+ ]);
209
+ })
210
+ );
211
+ const permissions = artifacts.command("permissions").description(
212
+ "Show or change who may create, edit, delete, publish, and refresh artifacts."
213
+ );
214
+ permissions.command("get", { isDefault: true }).description("Show the workspace's artifact rules and what you may do.").option("--json", "Emit raw JSON response").action(
215
+ async (options) => run(async () => {
216
+ const result = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().getArtifactPermissions();
217
+ print("artifacts permissions", options.json, result, [
218
+ ...Object.entries(result.rules).map(
219
+ ([verb, level]) => `${verb}: ${level}`
220
+ ),
221
+ ...result.can ? [
222
+ `you may: ${Object.entries(result.can).filter(([, ok]) => ok).map(([verb]) => verb).join(", ") || "view only"}`
223
+ ] : []
224
+ ]);
225
+ })
226
+ );
227
+ const verbs = [
228
+ "create",
229
+ "edit",
230
+ "delete",
231
+ "setAccess",
232
+ "refresh"
233
+ ];
234
+ permissions.command("set").description(
235
+ "Change artifact rules (admins only). Each is members or admins."
236
+ ).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
+ async (options) => run(async () => {
238
+ const rules = {};
239
+ for (const verb of verbs) {
240
+ const value = options[verb];
241
+ if (value === void 0) continue;
242
+ if (value !== "members" && value !== "admins") {
243
+ throw new Error(
244
+ `--${verb === "setAccess" ? "set-access" : verb} is members or admins.`
245
+ );
246
+ }
247
+ rules[verb] = value;
248
+ }
249
+ if (Object.keys(rules).length === 0) {
250
+ throw new Error(
251
+ "Pass at least one rule. See: deepline artifacts permissions set --help"
252
+ );
253
+ }
254
+ const result = await new (0, _chunkD5VWSR4Djs.DeeplineClient)().setArtifactPermissions(rules);
255
+ print(
256
+ "artifacts permissions set",
257
+ options.json,
258
+ result,
259
+ Object.entries(result.rules).map(
260
+ ([verb, level]) => `${verb}: ${level}`
261
+ )
262
+ );
263
+ })
264
+ );
265
+ }
266
+
267
+
268
+ exports.registerArtifactsCommands = registerArtifactsCommands;
@@ -14,14 +14,14 @@ import {
14
14
  reportSetupCompleted,
15
15
  resolvePendingAuthClaimForResume,
16
16
  statusBannerLine
17
- } from "./chunk-OOD5LGUS.mjs";
18
- import "./chunk-6KBVQ76G.mjs";
19
- import "./chunk-R2KNJMOY.mjs";
20
- import "./chunk-3CZHC24N.mjs";
17
+ } from "./chunk-OQ4YBPOQ.mjs";
18
+ import "./chunk-HLEZQDEZ.mjs";
19
+ import "./chunk-VEOFISLZ.mjs";
20
+ import "./chunk-JDDKJIZU.mjs";
21
21
  import "./chunk-4QF2K7TM.mjs";
22
22
  import "./chunk-DLIRSHV6.mjs";
23
23
  import "./chunk-HBL4PM5Q.mjs";
24
- import "./chunk-RSKAPLST.mjs";
24
+ import "./chunk-5WTLXL6O.mjs";
25
25
  import "./chunk-WZYKRD7T.mjs";
26
26
  import "./chunk-KRD6H754.mjs";
27
27
  export {
@@ -0,0 +1,43 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkLKSJXTRPjs = require('./chunk-LKSJXTRP.js');
18
+ require('./chunk-JYFLIQPE.js');
19
+ require('./chunk-GGQHOLH6.js');
20
+ require('./chunk-JIY25SUX.js');
21
+ require('./chunk-ALJJRZNJ.js');
22
+ require('./chunk-XNYIZMNQ.js');
23
+ require('./chunk-DIAWYWT5.js');
24
+ require('./chunk-BHV7JKXQ.js');
25
+ require('./chunk-OG64RBAC.js');
26
+ require('./chunk-COGTRVWW.js');
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkLKSJXTRPjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkLKSJXTRPjs.authStatusLine; exports.clearPendingClaim = _chunkLKSJXTRPjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkLKSJXTRPjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkLKSJXTRPjs.handleRegister; exports.handleStatus = _chunkLKSJXTRPjs.handleStatus; exports.handleWait = _chunkLKSJXTRPjs.handleWait; exports.httpJson = _chunkLKSJXTRPjs.httpJson; exports.readPendingAuthClaim = _chunkLKSJXTRPjs.readPendingAuthClaim; exports.readStatusBanner = _chunkLKSJXTRPjs.readStatusBanner; exports.registerAuthCommands = _chunkLKSJXTRPjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkLKSJXTRPjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkLKSJXTRPjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkLKSJXTRPjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkLKSJXTRPjs.statusBannerLine;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-FQCIYGQY.mjs";
3
+ } from "./chunk-ZFJ2U76O.mjs";
4
4
  import {
5
5
  iterateCursorPages,
6
6
  requireBillingIdempotencyKey
7
- } from "./chunk-K2RCVD7S.mjs";
7
+ } from "./chunk-XSBGWMI6.mjs";
8
8
  import "./chunk-L2VKAASU.mjs";
9
9
  import "./chunk-N4TR6QRI.mjs";
10
10
  import "./chunk-S3A4IXBQ.mjs";
11
11
  import "./chunk-BMCRTI6Z.mjs";
12
12
  import {
13
13
  PLAY_RUNTIME_PRICING_NOTE
14
- } from "./chunk-YJM3NOME.mjs";
14
+ } from "./chunk-77DPQI6W.mjs";
15
15
  import "./chunk-5LUF4LAR.mjs";
16
16
  import {
17
17
  PLAY_SANDBOX_SIZE_INPUTS
@@ -22,9 +22,9 @@ import {
22
22
  openInBrowser,
23
23
  printCommandEnvelope,
24
24
  shouldEmitJson
25
- } from "./chunk-6KBVQ76G.mjs";
26
- import "./chunk-R2KNJMOY.mjs";
27
- import "./chunk-3CZHC24N.mjs";
25
+ } from "./chunk-HLEZQDEZ.mjs";
26
+ import "./chunk-VEOFISLZ.mjs";
27
+ import "./chunk-JDDKJIZU.mjs";
28
28
  import {
29
29
  AuthError,
30
30
  ConfigError
@@ -33,7 +33,7 @@ import "./chunk-DLIRSHV6.mjs";
33
33
  import {
34
34
  DeeplineError
35
35
  } from "./chunk-HBL4PM5Q.mjs";
36
- import "./chunk-RSKAPLST.mjs";
36
+ import "./chunk-5WTLXL6O.mjs";
37
37
  import "./chunk-WZYKRD7T.mjs";
38
38
  import "./chunk-KRD6H754.mjs";
39
39