openpond 0.1.1 → 0.2.1

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 (225) hide show
  1. package/README.md +4 -4
  2. package/dist/cache.d.ts +7 -10
  3. package/dist/chunks/actions-command-QP3NMDK4.js +2 -0
  4. package/dist/chunks/app-layer-N7VFRVJ2.js +3 -0
  5. package/dist/chunks/app-server-runtime-OCLPUI7F.js +2 -0
  6. package/dist/chunks/apps-AMG75TI4.js +2 -0
  7. package/dist/chunks/chunk-22UARBPW.js +3 -0
  8. package/dist/chunks/chunk-3A7HZJNE.js +1 -0
  9. package/dist/chunks/chunk-3M53YXEI.js +2 -0
  10. package/dist/chunks/chunk-3NDRIQTI.js +2 -0
  11. package/dist/chunks/chunk-5BBVEWG3.js +2 -0
  12. package/dist/chunks/chunk-5O7ZVCMV.js +6 -0
  13. package/dist/chunks/chunk-6FA3GG5B.js +33 -0
  14. package/dist/chunks/chunk-6MI4KKWF.js +2 -0
  15. package/dist/chunks/chunk-BBG546O6.js +6 -0
  16. package/dist/chunks/chunk-BX4J2VDU.js +2 -0
  17. package/dist/chunks/chunk-BZMVB3GS.js +2 -0
  18. package/dist/chunks/chunk-C5LOZSVS.js +2 -0
  19. package/dist/chunks/chunk-CWQWV2T3.js +2 -0
  20. package/dist/chunks/chunk-DUA3QP6Y.js +19 -0
  21. package/dist/chunks/chunk-EAPFMACH.js +10 -0
  22. package/dist/chunks/chunk-ES2ISFJC.js +66 -0
  23. package/dist/chunks/chunk-F65NIZLM.js +2199 -0
  24. package/dist/chunks/chunk-FGJ5LFPL.js +5 -0
  25. package/dist/chunks/chunk-FTQLQJQV.js +2 -0
  26. package/dist/chunks/chunk-FY7OQ5RK.js +24 -0
  27. package/dist/chunks/chunk-FYCJSUFV.js +53 -0
  28. package/dist/chunks/chunk-GLUWATL5.js +2 -0
  29. package/dist/chunks/chunk-H7IWJN7L.js +17 -0
  30. package/dist/chunks/chunk-HZP5U2AA.js +3 -0
  31. package/dist/chunks/chunk-I5K74TOH.js +3 -0
  32. package/dist/chunks/chunk-IR3YJWPW.js +7 -0
  33. package/dist/chunks/chunk-KU7QOHFT.js +2872 -0
  34. package/dist/chunks/chunk-KV553EWX.js +16 -0
  35. package/dist/chunks/chunk-MGN6GLNZ.js +2 -0
  36. package/dist/chunks/chunk-OG5Q6NXK.js +28 -0
  37. package/dist/chunks/chunk-OGPHXXCD.js +1 -0
  38. package/dist/chunks/chunk-PI36UHRA.js +18 -0
  39. package/dist/chunks/chunk-RWSAGQTP.js +2 -0
  40. package/dist/chunks/chunk-SAE4OIPC.js +2 -0
  41. package/dist/chunks/chunk-SDO4FC4Q.js +2 -0
  42. package/dist/chunks/chunk-UKUVMXOW.js +12 -0
  43. package/dist/chunks/chunk-VCLCFK3O.js +36 -0
  44. package/dist/chunks/chunk-VYUMTRB3.js +5 -0
  45. package/dist/chunks/chunk-X37KMV27.js +1 -0
  46. package/dist/chunks/chunk-XDHAGACI.js +3 -0
  47. package/dist/chunks/chunk-XEOEKFG6.js +71 -0
  48. package/dist/chunks/chunk-ZF7TEGY5.js +5 -0
  49. package/dist/chunks/chunk-ZVOO7FKM.js +2 -0
  50. package/dist/chunks/cli-M2FG7SSI.js +2 -0
  51. package/dist/chunks/configuration-command-XBKBIZBO.js +2 -0
  52. package/dist/chunks/continual-D75WA7E7.js +7 -0
  53. package/dist/chunks/core-commands-LUZVWXQR.js +2 -0
  54. package/dist/chunks/database-X2CUV732.js +2 -0
  55. package/dist/chunks/desktop-test-KGC4JVJ7.js +3 -0
  56. package/dist/chunks/dist-NKLXFA37.js +2 -0
  57. package/dist/chunks/extension-NQ7N5LEY.js +5 -0
  58. package/dist/chunks/help-MWK66XZK.js +8 -0
  59. package/dist/chunks/module-ES6BEMUI-ZVL3F6NW.js +2 -0
  60. package/dist/chunks/module-asyncify-2EFITU5U-R7TVXNAE.js +2 -0
  61. package/dist/chunks/opchat-XJZA3QKZ.js +3 -0
  62. package/dist/chunks/organizations-UECDFEYE.js +2 -0
  63. package/dist/chunks/profile-KUMIZURM.js +3 -0
  64. package/dist/chunks/project-agent-NILMJHLV.js +2 -0
  65. package/dist/chunks/sandbox-command-QHH65OSE.js +2 -0
  66. package/dist/chunks/sandbox-template-N7I63PNU.js +10 -0
  67. package/dist/chunks/src-724HF43W.js +82 -0
  68. package/dist/chunks/src-VTKTTKQO.js +319 -0
  69. package/dist/chunks/taskset-PISBOILQ.js +2 -0
  70. package/dist/chunks/teams-bot-UV4RU53M.js +3 -0
  71. package/dist/chunks/training-2NDOWH5S.js +2 -0
  72. package/dist/chunks/workspaces-XXT4KUD3.js +2 -0
  73. package/dist/cli.js +3 -101
  74. package/dist/client.d.ts +1 -1
  75. package/dist/config.d.ts +1 -0
  76. package/dist/index.js +1 -26305
  77. package/dist/private-json-file.d.ts +1 -2
  78. package/dist/sandbox-template/manifest.js +1 -18380
  79. package/dist/web/assets/App-DxecRQUL.js +176 -0
  80. package/dist/web/assets/AppDialog-B65Eo3gp.js +1 -0
  81. package/dist/web/assets/AppTerminalPanel-B2EKQM7W.js +2 -0
  82. package/dist/web/assets/{AppsView-Ck_OzQWf.js → AppsView-BBoVe7s2.js} +1 -1
  83. package/dist/web/assets/{BrowserSidebar-CqciX8aL.js → BrowserSidebar-CSM1atSJ.js} +1 -1
  84. package/dist/web/assets/{CartesianChart-Y0lsL4vC.js → CartesianChart-CJKfXiEG.js} +1 -1
  85. package/dist/web/assets/{CollaborationTabs-BOb9PjvS.js → CollaborationTabs-BMZamWFC.js} +1 -1
  86. package/dist/web/assets/{CommandMenu-Co6JnmTu.js → CommandMenu-B3U1z2eo.js} +1 -1
  87. package/dist/web/assets/{CommunityView-BbTSeL7h.js → CommunityView-CTyRUcfy.js} +1 -1
  88. package/dist/web/assets/{ComposerCreateImproveStrip-BGzCWVFp.js → ComposerCreateImproveStrip-D7usvRtK.js} +1 -1
  89. package/dist/web/assets/GetStartedView-Ibu7oKWJ.js +1 -0
  90. package/dist/web/assets/HostedModelLearningReview-qnzIkT70.js +1 -0
  91. package/dist/web/assets/HostedModelLearningSettings--PKjpYsy.js +1 -0
  92. package/dist/web/assets/LabModelVersionDetailPage-s9uUN6fV.js +1 -0
  93. package/dist/web/assets/{LabSkillSidebar-C5oS6UmH.js → LabSkillSidebar-BKYseMiJ.js} +1 -1
  94. package/dist/web/assets/LabsRoute-C1FWCoYb.css +1 -0
  95. package/dist/web/assets/LabsRoute-DoRs0K6v.js +32 -0
  96. package/dist/web/assets/MainChatThread-DvuyMcMB.js +2 -0
  97. package/dist/web/assets/MainPane-BWwcxgHD.js +8 -0
  98. package/dist/web/assets/{MarkdownText-DqJarmTh.js → MarkdownText-D8XC5UT_.js} +1 -1
  99. package/dist/web/assets/{Messages-BaT7HOzB.js → Messages-e4A8JUjD.js} +6 -6
  100. package/dist/web/assets/{NativeSkillSidebar-DXp8snN5.js → NativeSkillSidebar-D2Joh8XB.js} +1 -1
  101. package/dist/web/assets/{NewExperienceSwitcher-CLHuGUN5.js → NewExperienceSwitcher-CzGebt2E.js} +1 -1
  102. package/dist/web/assets/{NewProjectDialog-CzpHCAaC.js → NewProjectDialog-CdMTSxUE.js} +1 -1
  103. package/dist/web/assets/{OutputsPage-DIzx-Ge6.js → OutputsPage-m7cSb8dW.js} +1 -1
  104. package/dist/web/assets/{ProjectsPage-DojwrhOy.js → ProjectsPage-C9mz8W1g.js} +1 -1
  105. package/dist/web/assets/RightChatPanelStack-B4LEqKEj.js +1 -0
  106. package/dist/web/assets/{RightSidebarHomePanel-DTzfuEX3.js → RightSidebarHomePanel-DOeUsH7h.js} +1 -1
  107. package/dist/web/assets/ScheduledWorkPage-UXZSSWgA.js +1 -0
  108. package/dist/web/assets/SettingsView-CAH0vreE.css +1 -0
  109. package/dist/web/assets/SettingsView-CQm1ai73.js +9 -0
  110. package/dist/web/assets/TeamChatView-C4haojB7.js +3 -0
  111. package/dist/web/assets/{TerminalOverlay-DnNVrCtu.js → TerminalOverlay-p2GZsuyQ.js} +3 -3
  112. package/dist/web/assets/{TrainingCreationPanel-CDwwyucO.js → TrainingCreationPanel-BYJSlO8X.js} +1 -1
  113. package/dist/web/assets/{TrainingDraftPanel-BijDnV_0.js → TrainingDraftPanel-DR5KlayH.js} +1 -1
  114. package/dist/web/assets/{UsageSettingsSection-Y5BFAu1p.js → UsageSettingsSection-BQToNXE4.js} +5 -5
  115. package/dist/web/assets/{WorkSidebarPanel-CkJlvZKm.js → WorkSidebarPanel--EeytWeg.js} +1 -1
  116. package/dist/web/assets/WorkspaceDiffPanel-BrovSYhn.js +14 -0
  117. package/dist/web/assets/{WorkspaceEnvironmentMenu-D8knAy1q.js → WorkspaceEnvironmentMenu-l-keRgvj.js} +3 -3
  118. package/dist/web/assets/{WorkspaceGitDialogs-_LHTrvh6.js → WorkspaceGitDialogs-aicWzaZu.js} +1 -1
  119. package/dist/web/assets/{WorkspaceMonacoEditor-B2B7OM_L.js → WorkspaceMonacoEditor-CO_E74jM.js} +36 -36
  120. package/dist/web/assets/{arrow-up-right-4nAzMtjW.js → arrow-up-right-rwPXNfVn.js} +1 -1
  121. package/dist/web/assets/chat-file-links-B3jDstSC.js +1 -0
  122. package/dist/web/assets/chevron-up-D089nvYQ.js +1 -0
  123. package/dist/web/assets/{clipboard-BzjUoZFo.js → clipboard-DwEExyU4.js} +1 -1
  124. package/dist/web/assets/{cloud-upload-CsrrwS-b.js → cloud-upload-D2he0-vQ.js} +1 -1
  125. package/dist/web/assets/{cssMode-CIbSSHKJ.js → cssMode-DS4k0NcI.js} +1 -1
  126. package/dist/web/assets/{folder-open-vRTuLzpS.js → folder-open-CAOLduKD.js} +1 -1
  127. package/dist/web/assets/{folder-plus-hyqwgUnx.js → folder-plus-D56MrxVT.js} +1 -1
  128. package/dist/web/assets/{git-commit-horizontal-CaxKfeYa.js → git-commit-horizontal-CeNM0oKJ.js} +1 -1
  129. package/dist/web/assets/{htmlMode-C3MGQGam.js → htmlMode-Xkni5erh.js} +1 -1
  130. package/dist/web/assets/{index-ByQIHpc9.css → index-BGMzUaup.css} +1 -1
  131. package/dist/web/assets/{index-Dvq7bpBG.js → index-KwyAyscP.js} +1 -1
  132. package/dist/web/assets/{info-aYWeE1Iw.js → info-CcrBaEE_.js} +1 -1
  133. package/dist/web/assets/{jsonMode-CpD6UkT7.js → jsonMode-C4YPbQB7.js} +1 -1
  134. package/dist/web/assets/{lspLanguageFeatures-DpcK8ZI6.js → lspLanguageFeatures-CF5oMTz6.js} +1 -1
  135. package/dist/web/assets/{minimize-2-DeYg7XqB.js → minimize-2-DzHQnInk.js} +1 -1
  136. package/dist/web/assets/{monaco.contribution-CrrdDQgP.js → monaco.contribution-0EN4mGCC.js} +2 -2
  137. package/dist/web/assets/{monaco.contribution-JWFq0HzV.js → monaco.contribution-B4qcTP0w.js} +2 -2
  138. package/dist/web/assets/{monaco.contribution-BDTM0ZJq.js → monaco.contribution-CJK_NrBm.js} +2 -2
  139. package/dist/web/assets/{monaco.contribution-C-_ekTxy.js → monaco.contribution-CkPGKNd-.js} +2 -2
  140. package/dist/web/assets/{play-BqgRTddV.js → play-p3-AMTPL.js} +1 -1
  141. package/dist/web/assets/{python-B67wope9.js → python-B0kpTxAZ.js} +1 -1
  142. package/dist/web/assets/{refresh-cw-DwMA_2On.js → refresh-cw-_jbTIzzr.js} +1 -1
  143. package/dist/web/assets/{save-B0BKh5oQ.js → save-Cy6hEotx.js} +1 -1
  144. package/dist/web/assets/{square-LY3oz82L.js → square-DKQkcrOH.js} +1 -1
  145. package/dist/web/assets/{toggleHighContrast-B2jka5B1.js → toggleHighContrast-Bnk1VVVq.js} +1 -1
  146. package/dist/web/assets/{tsMode-1MUwluYD.js → tsMode-BDrSVy7V.js} +1 -1
  147. package/dist/web/assets/{upload-bSKSkFVa.js → upload-COn0my_O.js} +1 -1
  148. package/dist/web/assets/{useLocalAgentSchedules--jnnM4Fz.js → useLocalAgentSchedules-iZNB4Oee.js} +1 -1
  149. package/dist/web/assets/{wifi-off-DA34iPmr.js → wifi-off-Cqt-ZLXY.js} +1 -1
  150. package/dist/web/assets/{workers-CczIcRcl.js → workers-hu0Ym93h.js} +1 -1
  151. package/dist/web/assets/{yaml-DwEGoHA9.js → yaml-D-JLDGL6.js} +1 -1
  152. package/dist/web/index.html +2 -2
  153. package/docs/command-reference.md +28 -2
  154. package/package.json +10 -7
  155. package/dist/chunks/actions-command-6N5XWMR6.js +0 -185
  156. package/dist/chunks/app-layer-XEYHFJHI.js +0 -214
  157. package/dist/chunks/app-server-runtime-FJM2EQPH.js +0 -21
  158. package/dist/chunks/apps-GSXUDK6V.js +0 -427
  159. package/dist/chunks/chunk-2JABRRNR.js +0 -183
  160. package/dist/chunks/chunk-47EIAYI7.js +0 -2162
  161. package/dist/chunks/chunk-4L3ZJS2T.js +0 -1207
  162. package/dist/chunks/chunk-5TKZBMQM.js +0 -731
  163. package/dist/chunks/chunk-6G6MDZLM.js +0 -14509
  164. package/dist/chunks/chunk-BVY5JYM6.js +0 -512
  165. package/dist/chunks/chunk-C5TKGE5Y.js +0 -1275
  166. package/dist/chunks/chunk-CNTM26OW.js +0 -602
  167. package/dist/chunks/chunk-D7BO5Y5J.js +0 -1531
  168. package/dist/chunks/chunk-DJL4TJYG.js +0 -70
  169. package/dist/chunks/chunk-DLQQIWN2.js +0 -648
  170. package/dist/chunks/chunk-DNXBJZAU.js +0 -630
  171. package/dist/chunks/chunk-EFET7LB7.js +0 -1331
  172. package/dist/chunks/chunk-FQS2QL5F.js +0 -14522
  173. package/dist/chunks/chunk-HFPUR4CQ.js +0 -669
  174. package/dist/chunks/chunk-J3YDKJFD.js +0 -88
  175. package/dist/chunks/chunk-J7PYGDRY.js +0 -634
  176. package/dist/chunks/chunk-JTHL5XJ2.js +0 -1838
  177. package/dist/chunks/chunk-KSRWKXRB.js +0 -12
  178. package/dist/chunks/chunk-KWDOAJJI.js +0 -238
  179. package/dist/chunks/chunk-MUMPWI4O.js +0 -92
  180. package/dist/chunks/chunk-N3TGCM7J.js +0 -1135
  181. package/dist/chunks/chunk-NTK22KJD.js +0 -10707
  182. package/dist/chunks/chunk-O6B6YCMI.js +0 -57688
  183. package/dist/chunks/chunk-R3C3MNSI.js +0 -140
  184. package/dist/chunks/chunk-SMNFI2FU.js +0 -113
  185. package/dist/chunks/chunk-UACZUFIA.js +0 -47
  186. package/dist/chunks/chunk-W5GKHH77.js +0 -168
  187. package/dist/chunks/chunk-WBAZFKC7.js +0 -1643
  188. package/dist/chunks/chunk-X7ZG4TSW.js +0 -3063
  189. package/dist/chunks/chunk-YVCYVDNP.js +0 -746
  190. package/dist/chunks/cli-6PFRZ2WV.js +0 -21
  191. package/dist/chunks/continual-FYDKLCO7.js +0 -803
  192. package/dist/chunks/core-commands-MAN3CSJQ.js +0 -48
  193. package/dist/chunks/desktop-test-OE5SST2W.js +0 -146
  194. package/dist/chunks/extension-J3CIEDP4.js +0 -10041
  195. package/dist/chunks/help-JNGJJFU5.js +0 -67
  196. package/dist/chunks/opchat-6HEQJFLL.js +0 -167
  197. package/dist/chunks/organizations-MWAPNOCK.js +0 -804
  198. package/dist/chunks/profile-P7HMONTZ.js +0 -1134
  199. package/dist/chunks/project-agent-2RAK7GAZ.js +0 -514
  200. package/dist/chunks/sandbox-command-G22CPFNK.js +0 -1659
  201. package/dist/chunks/sandbox-template-S4WRUWJ6.js +0 -1653
  202. package/dist/chunks/src-BKBZ7WLO.js +0 -3624
  203. package/dist/chunks/src-RTGN2O4H.js +0 -65745
  204. package/dist/chunks/taskset-BMI7KOWP.js +0 -66
  205. package/dist/chunks/teams-bot-5VBYEN7M.js +0 -144
  206. package/dist/chunks/training-UPVSGDTB.js +0 -17
  207. package/dist/chunks/workspaces-IJQPWX3H.js +0 -99
  208. package/dist/web/assets/App-BOkhmdHu.js +0 -173
  209. package/dist/web/assets/AppDialog-BCjKFUBn.js +0 -1
  210. package/dist/web/assets/AppTerminalPanel-DRU8GIfy.js +0 -2
  211. package/dist/web/assets/GetStartedView-jEogFjxP.js +0 -1
  212. package/dist/web/assets/LabModelVersionDetailPage-CrudId_1.js +0 -1
  213. package/dist/web/assets/LabsRoute-9v8qwEBc.js +0 -2
  214. package/dist/web/assets/LabsRoute-CGFgymTX.css +0 -1
  215. package/dist/web/assets/MainChatThread-VtMpAxlP.js +0 -2
  216. package/dist/web/assets/MainPane-BbknUzp3.js +0 -8
  217. package/dist/web/assets/RightChatPanelStack-CIE5bgmO.js +0 -1
  218. package/dist/web/assets/ScheduledWorkPage-DdbcQGSv.js +0 -1
  219. package/dist/web/assets/SettingsView-CC5GXaE1.css +0 -1
  220. package/dist/web/assets/SettingsView-QT_OLmDh.js +0 -6
  221. package/dist/web/assets/TeamChatView-C4-nG1tC.js +0 -3
  222. package/dist/web/assets/WorkspaceDiffPanel-CBgzmBk8.js +0 -14
  223. package/dist/web/assets/chat-file-links-Bned0MT7.js +0 -1
  224. package/dist/web/assets/chevron-up-DK7ejCfk.js +0 -1
  225. package/dist/web/assets/index-66-ohHD5.js +0 -1
@@ -1,630 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import {
3
- parseSandboxEnvOptions,
4
- parseSandboxRuntimeProfileIdOption,
5
- parseSandboxRuntimePromotionPolicyOption,
6
- parseSandboxWorkflowModeOption
7
- } from "./chunk-HFPUR4CQ.js";
8
- import {
9
- parseBooleanOption,
10
- parseCsvOption,
11
- parseIntegerOption,
12
- parseJsonOption,
13
- parseNumberOption
14
- } from "./chunk-MUMPWI4O.js";
15
-
16
- // src/cli/sandbox-helpers.ts
17
- import { Buffer } from "node:buffer";
18
- import { readdirSync, readFileSync, statSync } from "node:fs";
19
- import path from "node:path";
20
- var DOCKER_CONTEXT_MAX_FILES = 500;
21
- var DOCKER_CONTEXT_MAX_FILE_BYTES = 8 * 1024 * 1024;
22
- var DOCKER_CONTEXT_MAX_BYTES = 8 * 1024 * 1024;
23
- async function createSandboxFromPlan(client, plan) {
24
- if (!plan.sandboxRuntime && !plan.runtimeId) {
25
- return {
26
- sandbox: await waitForSandboxCreateReady(
27
- client,
28
- await client.create(plan.sandbox, { async: true })
29
- )
30
- };
31
- }
32
- const runtime = plan.runtimeId ? void 0 : await client.createSandboxRuntime(plan.sandboxRuntime);
33
- const runtimeId = plan.runtimeId ?? runtime.id;
34
- const result = await client.createSandboxRuntimeSandbox(
35
- runtimeId,
36
- plan.sandbox
37
- );
38
- return {
39
- sandbox: await waitForSandboxCreateReady(client, result.sandbox),
40
- runtime: result.runtime ?? runtime
41
- };
42
- }
43
- async function waitForSandboxCreateReady(client, sandbox) {
44
- if (sandbox.state === "running" || sandbox.state === "stopped") {
45
- return sandbox;
46
- }
47
- if (sandbox.state === "error") {
48
- throw new Error(
49
- `sandbox create failed: ${sandbox.id}
50
- ${sandbox.logs.join("\n")}`
51
- );
52
- }
53
- const timeoutMs = 12 * 6e4;
54
- const pollMs = 3e3;
55
- const deadline = Date.now() + timeoutMs;
56
- let latest = sandbox;
57
- while (Date.now() < deadline) {
58
- await new Promise((resolve) => setTimeout(resolve, pollMs));
59
- latest = await client.get(sandbox.id);
60
- if (latest.state === "running" || latest.state === "stopped") {
61
- return latest;
62
- }
63
- if (latest.state === "error") {
64
- throw new Error(
65
- `sandbox create failed: ${latest.id}
66
- ${latest.logs.join("\n")}`
67
- );
68
- }
69
- }
70
- throw new Error(
71
- `sandbox create did not reach running state before timeout: ${latest.id} (${latest.state})`
72
- );
73
- }
74
- function formatSandboxLine(sandbox) {
75
- const mppMode = sandbox.reservation.mpp?.mode ?? "no-mpp";
76
- const captured = sandbox.reservation.capturedUsd;
77
- const budget = sandbox.budget.maxUsd;
78
- const repo = sandbox.repo ?? "-";
79
- return [
80
- sandbox.id,
81
- sandbox.state,
82
- `spent=${captured}/${budget}`,
83
- mppMode,
84
- repo
85
- ].join(" ");
86
- }
87
- function formatSnapshotCatalogLine(snapshot) {
88
- const template = snapshot.template ? `${snapshot.template.name}@${snapshot.template.version}` : "-";
89
- const retention = snapshot.replay?.retention?.class ?? snapshot.storageCost?.retentionClass ?? "-";
90
- const replayState = snapshot.replay?.state ?? "-";
91
- const monthlyUsd = snapshot.storageCost?.estimatedMonthlyUsd ?? "-";
92
- return [
93
- snapshot.id,
94
- snapshot.kind,
95
- snapshot.name,
96
- snapshot.sandboxId,
97
- `storage=${snapshot.storage ?? "-"}`,
98
- `sizeGb=${snapshot.sizeGb ?? "-"}`,
99
- `publishedSnapshot=${template}`,
100
- `replay=${replayState}`,
101
- `retention=${retention}`,
102
- `monthlyUsd=${monthlyUsd}`,
103
- snapshot.createdAt
104
- ].join(" ");
105
- }
106
- function formatSandboxTemplateLine(template) {
107
- const tags = template.tags && template.tags.length > 0 ? template.tags.join(",") : "-";
108
- const retention = template.replay?.retention?.class ?? template.storageCost?.retentionClass ?? "-";
109
- const replayState = template.replay?.state ?? "-";
110
- const monthlyUsd = template.storageCost?.estimatedMonthlyUsd ?? "-";
111
- return [
112
- template.name,
113
- `version=${template.version}`,
114
- `snapshot=${template.snapshotId}`,
115
- `sandbox=${template.sandboxId}`,
116
- `visibility=${template.visibility}`,
117
- `useCase=${template.useCase ?? "-"}`,
118
- `tags=${tags}`,
119
- `replay=${replayState}`,
120
- `retention=${retention}`,
121
- `monthlyUsd=${monthlyUsd}`,
122
- template.createdAt
123
- ].join(" ");
124
- }
125
- function formatTemplateBuildLine(build) {
126
- return [
127
- build.id,
128
- `team=${build.teamId}`,
129
- `status=${build.status}`,
130
- `publish=${build.publishStatus ?? "-"}`,
131
- `source=${build.sourceRepoUrl}`,
132
- `branch=${build.sourceBranch}`,
133
- `snapshot=${build.snapshotId ?? "-"}`,
134
- `error=${build.error ?? "-"}`,
135
- build.createdAt ?? "-"
136
- ].join(" ");
137
- }
138
- function formatReplayLine(replay) {
139
- return [
140
- replay.id,
141
- `team=${replay.teamId}`,
142
- `state=${replay.state}`,
143
- `snapshot=${replay.snapshotId}`,
144
- `sandbox=${replay.sandboxId ?? "-"}`,
145
- `command=${replay.commandId ?? "-"}`,
146
- `exit=${replay.exitCode ?? "-"}`,
147
- `cleanup=${replay.cleanup.action}:${replay.cleanup.status}`,
148
- `error=${replay.error ?? "-"}`,
149
- replay.createdAt
150
- ].join(" ");
151
- }
152
- function summarizeReplayArtifact(artifact) {
153
- return {
154
- path: artifact.path,
155
- status: artifact.status,
156
- sizeBytes: artifact.sizeBytes,
157
- error: artifact.error,
158
- ...artifact.contentsBase64 ? {
159
- contentsBase64: artifact.contentsBase64
160
- } : {}
161
- };
162
- }
163
- function normalizeSnapshotValidationCleanup(value) {
164
- if (typeof value !== "string") return void 0;
165
- const cleanup = value.trim();
166
- if (cleanup === "delete" || cleanup === "stop" || cleanup === "archive") {
167
- return cleanup;
168
- }
169
- throw new Error(
170
- "snapshot-validate --cleanup must be delete, stop, or archive"
171
- );
172
- }
173
- function normalizeReplayCleanup(value) {
174
- if (typeof value !== "string") return void 0;
175
- const cleanup = value.trim();
176
- if (cleanup === "delete" || cleanup === "stop" || cleanup === "archive") {
177
- return cleanup;
178
- }
179
- throw new Error("replay cleanup must be delete, stop, or archive");
180
- }
181
- function buildSandboxReplayInput(options) {
182
- const snapshotId = typeof options.snapshotId === "string" && options.snapshotId.trim() ? options.snapshotId.trim() : typeof options.snapshot === "string" && options.snapshot.trim() ? options.snapshot.trim() : "";
183
- if (!snapshotId) {
184
- throw new Error("replay-start requires --snapshot-id <id>");
185
- }
186
- const teamId = typeof options.teamId === "string" ? options.teamId.trim() : "";
187
- const projectId = typeof options.projectId === "string" ? options.projectId.trim() : "";
188
- const sourceSandboxId = typeof options.sourceSandboxId === "string" && options.sourceSandboxId.trim() ? options.sourceSandboxId.trim() : "";
189
- const entrypoint = typeof options.entrypoint === "string" && options.entrypoint.trim() ? options.entrypoint.trim() : "";
190
- const params = typeof options.params === "string" && options.params.trim() ? parseJsonOption(options.params, "params") : {};
191
- if (!params || typeof params !== "object" || Array.isArray(params)) {
192
- throw new Error("params must be a JSON object");
193
- }
194
- const budgetUsd = typeof options.budgetUsd === "string" && options.budgetUsd.trim() ? options.budgetUsd.trim() : typeof options.budget === "string" && options.budget.trim() ? options.budget.trim() : "";
195
- const maxDurationSeconds = parseIntegerOption(
196
- options.maxDurationSeconds,
197
- "max-duration-seconds"
198
- );
199
- const idleTimeoutSeconds = parseIntegerOption(
200
- options.idleTimeoutSeconds,
201
- "idle-timeout-seconds"
202
- );
203
- const artifactPaths = parseCsvOption(options.artifactPaths);
204
- const idempotencyKey = typeof options.idempotencyKey === "string" && options.idempotencyKey.trim() ? options.idempotencyKey.trim() : "";
205
- const cleanup = normalizeReplayCleanup(options.cleanup);
206
- return {
207
- snapshotId,
208
- ...teamId ? { teamId } : {},
209
- ...projectId ? { projectId } : {},
210
- ...sourceSandboxId ? { sourceSandboxId } : {},
211
- ...entrypoint ? { entrypoint } : {},
212
- params,
213
- ...budgetUsd ? { budget: { maxUsd: budgetUsd } } : {},
214
- ...maxDurationSeconds !== void 0 ? { maxDurationSeconds } : {},
215
- ...idleTimeoutSeconds !== void 0 ? { idleTimeoutSeconds } : {},
216
- ...artifactPaths.length > 0 ? { artifactPaths } : {},
217
- ...idempotencyKey ? { idempotencyKey } : {},
218
- ...cleanup ? { cleanup } : {}
219
- };
220
- }
221
- function buildSandboxCreateInput(options) {
222
- const repo = typeof options.repo === "string" ? options.repo.trim() : "";
223
- const command = typeof options.command === "string" && options.command.trim() ? options.command.trim() : void 0;
224
- const budgetUsd = typeof options.budgetUsd === "string" && options.budgetUsd.trim() ? options.budgetUsd.trim() : typeof options.budget === "string" && options.budget.trim() ? options.budget.trim() : "0.05";
225
- const cpu = parseNumberOption(options.cpu, "cpu");
226
- const memoryGb = parseNumberOption(options.memoryGb, "memory-gb");
227
- const diskGb = parseNumberOption(options.diskGb, "disk-gb");
228
- const maxDurationSeconds = parseIntegerOption(
229
- options.maxDurationSeconds,
230
- "max-duration-seconds"
231
- );
232
- const idleTimeoutSeconds = parseIntegerOption(
233
- options.idleTimeoutSeconds,
234
- "idle-timeout-seconds"
235
- );
236
- const volumeName = typeof options.volumeName === "string" && options.volumeName.trim() ? options.volumeName.trim() : "";
237
- const volumeMountPath = typeof options.volumeMountPath === "string" && options.volumeMountPath.trim() ? options.volumeMountPath.trim() : "";
238
- const volumeStorageGb = parseIntegerOption(
239
- options.volumeStorageGb,
240
- "volume-storage-gb"
241
- );
242
- const volumeDeleteOnSandboxDelete = options.volumeDeleteOnSandboxDelete !== void 0 ? parseBooleanOption(options.volumeDeleteOnSandboxDelete) : void 0;
243
- const integrationConnection = typeof options.integrationConnection === "string" ? options.integrationConnection.trim() : "";
244
- const integrationCapabilities = parseCsvOption(
245
- options.integrationCapabilities
246
- );
247
- const integrationScopes = parseCsvOption(options.integrationScopes);
248
- const teamId = typeof options.teamId === "string" ? options.teamId.trim() : "";
249
- const requestedProjectId = typeof options.projectId === "string" ? options.projectId.trim() : "";
250
- const sandboxRuntimeProjectId = typeof options.runtimeProjectId === "string" ? options.runtimeProjectId.trim() : "";
251
- if (requestedProjectId && sandboxRuntimeProjectId && requestedProjectId !== sandboxRuntimeProjectId) {
252
- throw new Error(
253
- "project-id and runtime-project-id must match when both are set"
254
- );
255
- }
256
- const projectId = requestedProjectId || sandboxRuntimeProjectId;
257
- const requestedAgentId = typeof options.agentId === "string" ? options.agentId.trim() : "";
258
- const sandboxRuntimeAgentId = typeof options.runtimeAgentId === "string" ? options.runtimeAgentId.trim() : "";
259
- if (requestedAgentId && sandboxRuntimeAgentId && requestedAgentId !== sandboxRuntimeAgentId) {
260
- throw new Error(
261
- "agent-id and runtime-agent-id must match when both are set"
262
- );
263
- }
264
- const agentId = requestedAgentId || sandboxRuntimeAgentId;
265
- const sandboxWorkflowMode = parseSandboxWorkflowModeOption(options.workflowMode);
266
- const sandboxRuntimePromotionPolicy = parseSandboxRuntimePromotionPolicyOption(options.runtimePromotionPolicy);
267
- const workloadSource = buildSandboxWorkloadSourceInput(options);
268
- const sourceArchive = buildDockerfileSourceArchiveInput(options);
269
- const runtimeProfileId = parseSandboxRuntimeProfileIdOption(
270
- options.runtimeProfileId
271
- );
272
- const sandboxRuntimeBaseBranch = typeof options.runtimeBaseBranch === "string" && options.runtimeBaseBranch.trim() ? options.runtimeBaseBranch.trim() : "";
273
- const sandboxRuntimeBaseSha = typeof options.runtimeBaseSha === "string" && options.runtimeBaseSha.trim() ? options.runtimeBaseSha.trim() : "";
274
- const runtimeId = typeof options.runtimeId === "string" && options.runtimeId.trim() ? options.runtimeId.trim() : "";
275
- const sandboxRuntimeRequested = Boolean(
276
- sandboxWorkflowMode || sandboxRuntimePromotionPolicy || sandboxRuntimeBaseBranch || sandboxRuntimeBaseSha || runtimeProfileId || runtimeId || sandboxRuntimeProjectId || sandboxRuntimeAgentId
277
- );
278
- const env = parseSandboxEnvOptions(options);
279
- if (integrationConnection && integrationCapabilities.length === 0) {
280
- throw new Error(
281
- "integration-capabilities is required with integration-connection"
282
- );
283
- }
284
- const sandbox = {
285
- ...repo ? { repo } : {},
286
- ...teamId ? { teamId } : {},
287
- ...projectId ? { projectId } : {},
288
- ...agentId ? { agentId } : {},
289
- ...runtimeProfileId ? { runtimeProfileId } : {},
290
- ...command ? { command } : {},
291
- ...workloadSource ? { workloadSource } : {},
292
- ...sourceArchive ? { sourceArchive } : {},
293
- resources: {
294
- ...cpu !== void 0 ? { cpu } : {},
295
- ...memoryGb !== void 0 ? { memoryGb } : {},
296
- ...diskGb !== void 0 ? { diskGb } : {}
297
- },
298
- budget: { maxUsd: budgetUsd },
299
- quotas: {
300
- maxSpendUsd: budgetUsd,
301
- ...maxDurationSeconds !== void 0 ? { maxDurationSeconds } : {},
302
- ...idleTimeoutSeconds !== void 0 ? { idleTimeoutSeconds } : {}
303
- },
304
- ...env.length > 0 ? { env } : {},
305
- ...volumeName || volumeMountPath || volumeStorageGb !== void 0 ? {
306
- volumes: [
307
- {
308
- ...volumeName ? { name: volumeName } : {},
309
- ...volumeMountPath ? { mountPath: volumeMountPath } : {},
310
- ...volumeStorageGb !== void 0 ? { storageGb: volumeStorageGb } : {},
311
- ...volumeDeleteOnSandboxDelete !== void 0 ? { deleteOnSandboxDelete: volumeDeleteOnSandboxDelete } : {}
312
- }
313
- ]
314
- } : {},
315
- ...integrationConnection ? {
316
- integrationConnectionLeases: [
317
- {
318
- connectionId: integrationConnection,
319
- ...integrationScopes.length > 0 ? { scopes: integrationScopes } : {},
320
- capabilities: integrationCapabilities,
321
- ttlSeconds: 60 * 60
322
- }
323
- ]
324
- } : {},
325
- metadata: {
326
- source: "openpond-code"
327
- }
328
- };
329
- return {
330
- sandbox,
331
- ...sandboxRuntimeRequested && runtimeId ? { runtimeId } : {},
332
- ...sandboxRuntimeRequested && !runtimeId ? {
333
- sandboxRuntime: {
334
- ...teamId ? { teamId } : {},
335
- ...sandboxWorkflowMode ? { workflowMode: sandboxWorkflowMode } : {},
336
- ...projectId ? { projectId } : {},
337
- ...agentId ? { agentId } : {},
338
- baseBranch: sandboxRuntimeBaseBranch || "master",
339
- ...sandboxRuntimeBaseSha ? { baseSha: sandboxRuntimeBaseSha } : {},
340
- ...sandboxRuntimePromotionPolicy ? { promotionPolicy: sandboxRuntimePromotionPolicy } : {},
341
- ...runtimeProfileId ? { runtimeProfileId } : {}
342
- }
343
- } : {}
344
- };
345
- }
346
- function isSafeDockerContextPath(filePath) {
347
- return filePath.length > 0 && !filePath.includes("\0") && !path.isAbsolute(filePath) && !filePath.split(/[\\/]+/).some((part) => !part || part === "." || part === "..");
348
- }
349
- function shouldSkipDockerContextPath(filePath) {
350
- return filePath.split(/[\\/]+/).some((segment) => {
351
- const lower = segment.toLowerCase();
352
- return lower === ".git" || lower === "node_modules" || lower === ".next" || lower === ".turbo" || lower.startsWith(".env");
353
- });
354
- }
355
- function collectDockerContextFiles(params) {
356
- const baseDir = params.baseDir ?? params.contextRoot;
357
- const entries = readdirSync(baseDir, { withFileTypes: true });
358
- const files = [];
359
- for (const entry of entries) {
360
- const absolutePath = path.join(baseDir, entry.name);
361
- const relativePath = path.relative(params.contextRoot, absolutePath).replace(/\\/g, "/");
362
- if (!relativePath || !isSafeDockerContextPath(relativePath) || shouldSkipDockerContextPath(relativePath)) {
363
- continue;
364
- }
365
- if (entry.isDirectory()) {
366
- files.push(
367
- ...collectDockerContextFiles({
368
- contextRoot: params.contextRoot,
369
- baseDir: absolutePath
370
- })
371
- );
372
- continue;
373
- }
374
- if (entry.isFile()) {
375
- files.push(relativePath);
376
- }
377
- }
378
- return files;
379
- }
380
- function buildDockerfileSourceArchiveInput(options) {
381
- const dockerfilePath = stringOption(options.dockerfile);
382
- if (!dockerfilePath) {
383
- return void 0;
384
- }
385
- const contextPath = stringOption(options.dockerfileContext) || ".";
386
- const contextRoot = path.resolve(process.cwd(), contextPath);
387
- const contextStat = statSync(contextRoot);
388
- if (!contextStat.isDirectory()) {
389
- throw new Error(`dockerfile context must be a directory: ${contextPath}`);
390
- }
391
- const sourcePaths = collectDockerContextFiles({ contextRoot }).sort();
392
- if (sourcePaths.length === 0) {
393
- throw new Error(`dockerfile context has no files: ${contextPath}`);
394
- }
395
- if (sourcePaths.length > DOCKER_CONTEXT_MAX_FILES) {
396
- throw new Error(
397
- `dockerfile context has too many files: ${sourcePaths.length} > ${DOCKER_CONTEXT_MAX_FILES}`
398
- );
399
- }
400
- let totalBytes = 0;
401
- const entries = sourcePaths.map((sourcePath) => {
402
- const absolutePath = path.resolve(contextRoot, sourcePath);
403
- const relative = path.relative(contextRoot, absolutePath);
404
- if (relative.startsWith("..") || path.isAbsolute(relative)) {
405
- throw new Error(`dockerfile context path escapes context: ${sourcePath}`);
406
- }
407
- const stat = statSync(absolutePath);
408
- if (stat.size > DOCKER_CONTEXT_MAX_FILE_BYTES) {
409
- throw new Error(
410
- `dockerfile context file is too large: ${sourcePath} (${stat.size} bytes)`
411
- );
412
- }
413
- totalBytes += stat.size;
414
- if (totalBytes > DOCKER_CONTEXT_MAX_BYTES) {
415
- throw new Error(
416
- `dockerfile context is too large: ${totalBytes} > ${DOCKER_CONTEXT_MAX_BYTES}`
417
- );
418
- }
419
- return {
420
- path: sourcePath,
421
- type: "file",
422
- contentsBase64: Buffer.from(readFileSync(absolutePath)).toString("base64")
423
- };
424
- });
425
- return {
426
- source: "client_upload",
427
- ref: "client-upload",
428
- archive: {
429
- version: 1,
430
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
431
- entries
432
- }
433
- };
434
- }
435
- function buildSandboxWorkloadSourceInput(options) {
436
- const imageRef = stringOption(options.image);
437
- const dockerfilePath = stringOption(options.dockerfile);
438
- if (imageRef && dockerfilePath) {
439
- throw new Error("sandbox create accepts only one of --image or --dockerfile");
440
- }
441
- const workspaceRoot = stringOption(options.runtimeWorkspaceRoot);
442
- if (imageRef) {
443
- return {
444
- image: {
445
- ref: imageRef,
446
- ...stringOption(options.imageDigest) ? { digest: stringOption(options.imageDigest) } : {},
447
- ...stringOption(options.registrySecretRef) ? { registrySecretRef: stringOption(options.registrySecretRef) } : {},
448
- ...workspaceRoot ? { workspaceRoot } : {},
449
- platform: "linux/amd64"
450
- }
451
- };
452
- }
453
- if (dockerfilePath) {
454
- const buildArgs = parseDockerBuildArgs(options.dockerBuildArgs);
455
- const registrySecretRefs = parseCsvOption(options.dockerRegistrySecretRefs);
456
- return {
457
- dockerfile: {
458
- path: dockerfilePath,
459
- context: stringOption(options.dockerfileContext) || ".",
460
- ...stringOption(options.dockerfileTarget) ? { target: stringOption(options.dockerfileTarget) } : {},
461
- ...Object.keys(buildArgs).length > 0 ? { buildArgs } : {},
462
- ...registrySecretRefs.length > 0 ? { registrySecretRefs } : {},
463
- ...workspaceRoot ? { workspaceRoot } : {},
464
- platform: "linux/amd64"
465
- }
466
- };
467
- }
468
- return void 0;
469
- }
470
- function parseDockerBuildArgs(value) {
471
- if (typeof value !== "string" || !value.trim()) {
472
- return {};
473
- }
474
- const parsed = parseJsonOption(value, "docker-build-args");
475
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
476
- throw new Error("docker-build-args must be a JSON object");
477
- }
478
- const result = {};
479
- for (const [key, rawValue] of Object.entries(parsed)) {
480
- if (typeof rawValue !== "string") {
481
- throw new Error("docker-build-args values must be strings");
482
- }
483
- result[key] = rawValue;
484
- }
485
- return result;
486
- }
487
- function stringOption(value) {
488
- return typeof value === "string" ? value.trim() : "";
489
- }
490
- function buildSandboxIntegrationAttachInput(options) {
491
- const connectionId = typeof options.integrationConnection === "string" ? options.integrationConnection.trim() : "";
492
- const capabilities = parseCsvOption(options.integrationCapabilities);
493
- const scopes = parseCsvOption(options.integrationScopes);
494
- if (!connectionId || capabilities.length === 0) {
495
- throw new Error(
496
- "usage: sandbox integration-attach <sandboxId> --integration-connection <id> --integration-capabilities <csv>"
497
- );
498
- }
499
- return {
500
- connectionId,
501
- ...scopes.length > 0 ? { scopes } : {},
502
- capabilities,
503
- ttlSeconds: 60 * 60
504
- };
505
- }
506
- function buildTemplateBuildCreateInput(options) {
507
- const teamId = typeof options.teamId === "string" ? options.teamId.trim() : "";
508
- const sourceRepoUrl = typeof options.sourceRepoUrl === "string" ? options.sourceRepoUrl.trim() : "";
509
- const sourceProjectId = typeof options.sourceProjectId === "string" ? options.sourceProjectId.trim() : "";
510
- const branch = typeof options.branch === "string" ? options.branch.trim() : "";
511
- const manifestPath = typeof options.manifestPath === "string" ? options.manifestPath.trim() : "";
512
- if (!teamId) {
513
- throw new Error("published-snapshot-build-create requires --team-id <id>");
514
- }
515
- if (!sourceRepoUrl && !sourceProjectId) {
516
- throw new Error(
517
- "published-snapshot-build-create requires --source-repo-url <url> or --source-project-id <id>"
518
- );
519
- }
520
- return {
521
- teamId,
522
- ...sourceRepoUrl ? { sourceRepoUrl } : {},
523
- ...sourceProjectId ? { sourceProjectId } : {},
524
- ...branch ? { branch } : {},
525
- ...manifestPath ? { manifestPath } : {},
526
- publish: parseBooleanOption(options.publish)
527
- };
528
- }
529
- function buildSnapshotCreateInput(options) {
530
- const name = typeof options.name === "string" ? options.name.trim() : "";
531
- if (!name) {
532
- throw new Error("snapshot-create requires --name <name>");
533
- }
534
- const templateName = typeof options.templateName === "string" ? options.templateName.trim() : "";
535
- const templateVersion = typeof options.templateVersion === "string" && options.templateVersion.trim() ? options.templateVersion.trim() : "0.1.0";
536
- const templateVisibility = typeof options.templateVisibility === "string" && options.templateVisibility.trim() ? options.templateVisibility.trim() : "private";
537
- if (templateVisibility !== "private" && templateVisibility !== "team") {
538
- throw new Error("template-visibility must be private or team");
539
- }
540
- const validationCommand = typeof options.validationCommand === "string" && options.validationCommand.trim() ? options.validationCommand.trim() : "test -d .";
541
- const entrypointCommand = typeof options.entrypointCommand === "string" && options.entrypointCommand.trim() ? options.entrypointCommand.trim() : "true";
542
- const useCase = typeof options.useCase === "string" && options.useCase.trim() ? options.useCase.trim() : void 0;
543
- const description = typeof options.description === "string" && options.description.trim() ? options.description.trim() : void 0;
544
- const tags = parseCsvOption(options.tags);
545
- const input = {
546
- ...parseBooleanOption(options.async) ? { async: true } : {},
547
- name,
548
- replay: {
549
- entrypoints: [
550
- {
551
- command: entrypointCommand,
552
- name: "default"
553
- }
554
- ],
555
- retention: {
556
- class: "pinned"
557
- },
558
- safety: {
559
- cleanup: "delete",
560
- idleTimeoutSeconds: 600,
561
- internetEgress: "block",
562
- maxDurationSeconds: 600,
563
- maxSpendUsd: "0.05",
564
- publicPreview: false
565
- },
566
- validation: {
567
- commands: [
568
- {
569
- command: validationCommand
570
- }
571
- ]
572
- }
573
- }
574
- };
575
- if (templateName) {
576
- input.template = {
577
- name: templateName,
578
- version: templateVersion,
579
- ...description ? { description } : {},
580
- ...tags.length > 0 ? { tags } : {},
581
- visibility: templateVisibility,
582
- ...useCase ? { useCase } : {}
583
- };
584
- }
585
- return input;
586
- }
587
- function summarizeSandbox(sandbox) {
588
- return {
589
- id: sandbox.id,
590
- state: sandbox.state,
591
- repo: sandbox.repo,
592
- runtimeId: sandbox.runtimeId ?? null,
593
- repoRef: sandbox.repoRef ?? null,
594
- sourceCommitSha: sandbox.sourceCommitSha ?? null,
595
- budgetUsd: sandbox.budget.maxUsd,
596
- capturedUsd: sandbox.reservation.capturedUsd,
597
- reservationRef: sandbox.reservation.mpp?.reservationRef ?? null,
598
- mppMode: sandbox.reservation.mpp?.mode ?? null,
599
- integrationLeases: sandbox.integrationLeases?.map((lease) => ({
600
- leaseId: lease.leaseId,
601
- provider: lease.provider,
602
- capabilities: lease.capabilities
603
- })) ?? [],
604
- previewPorts: sandbox.previewPorts.map((preview) => ({
605
- port: preview.port,
606
- label: preview.label,
607
- url: preview.url,
608
- customDomain: preview.customDomain ?? null
609
- })),
610
- latestReceipt: sandbox.receipts.at(-1)?.mpp.receiptRef ?? null
611
- };
612
- }
613
-
614
- export {
615
- createSandboxFromPlan,
616
- waitForSandboxCreateReady,
617
- formatSandboxLine,
618
- formatSnapshotCatalogLine,
619
- formatSandboxTemplateLine,
620
- formatTemplateBuildLine,
621
- formatReplayLine,
622
- summarizeReplayArtifact,
623
- normalizeSnapshotValidationCleanup,
624
- buildSandboxReplayInput,
625
- buildSandboxCreateInput,
626
- buildSandboxIntegrationAttachInput,
627
- buildTemplateBuildCreateInput,
628
- buildSnapshotCreateInput,
629
- summarizeSandbox
630
- };