openpond 0.0.69 → 0.1.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 (191) hide show
  1. package/dist/chunks/{app-layer-EXXOWJ5H.js → app-layer-XEYHFJHI.js} +2 -2
  2. package/dist/chunks/{app-server-runtime-7FBQBE3C.js → app-server-runtime-FJM2EQPH.js} +7 -6
  3. package/dist/chunks/{apps-RZSDOFAG.js → apps-GSXUDK6V.js} +2 -2
  4. package/dist/chunks/{chunk-SFMNGWNO.js → chunk-2JABRRNR.js} +1 -1
  5. package/dist/chunks/{chunk-MMRJNSWY.js → chunk-6G6MDZLM.js} +1096 -120
  6. package/dist/chunks/{chunk-7C4OIFOC.js → chunk-C5TKGE5Y.js} +31 -3
  7. package/dist/chunks/{chunk-F36ZVO6U.js → chunk-CNTM26OW.js} +1 -1
  8. package/dist/chunks/{chunk-NPNIL6SQ.js → chunk-DJL4TJYG.js} +1 -1
  9. package/dist/chunks/{chunk-FEOLMLYU.js → chunk-EFET7LB7.js} +21 -2
  10. package/dist/chunks/{training-5CPTZRVC.js → chunk-J7PYGDRY.js} +251 -16
  11. package/dist/chunks/{chunk-QTN6HXOR.js → chunk-KWDOAJJI.js} +2 -2
  12. package/dist/chunks/{chunk-Y57RTLVV.js → chunk-N3TGCM7J.js} +93 -35
  13. package/dist/chunks/{chunk-BLFIIAWZ.js → chunk-NTK22KJD.js} +68 -21
  14. package/dist/chunks/{chunk-OOM2PHBE.js → chunk-O6B6YCMI.js} +1130 -226
  15. package/dist/chunks/chunk-R3C3MNSI.js +140 -0
  16. package/dist/chunks/{cli-HIXVXM72.js → cli-6PFRZ2WV.js} +6 -5
  17. package/dist/chunks/continual-FYDKLCO7.js +803 -0
  18. package/dist/chunks/{core-commands-34SVH6ZQ.js → core-commands-MAN3CSJQ.js} +3 -3
  19. package/dist/chunks/{desktop-test-66DPBNJX.js → desktop-test-OE5SST2W.js} +2 -2
  20. package/dist/chunks/{extension-ZMRHCDO3.js → extension-J3CIEDP4.js} +968 -19
  21. package/dist/chunks/{help-COHCZEP2.js → help-JNGJJFU5.js} +1 -1
  22. package/dist/chunks/{opchat-2PGW2GNN.js → opchat-6HEQJFLL.js} +2 -2
  23. package/dist/chunks/{organizations-NZ4OY56V.js → organizations-MWAPNOCK.js} +5 -4
  24. package/dist/chunks/{profile-GEMTRPUG.js → profile-P7HMONTZ.js} +2 -2
  25. package/dist/chunks/{project-agent-NX6YBGWC.js → project-agent-2RAK7GAZ.js} +2 -2
  26. package/dist/chunks/{sandbox-command-UEY53OJO.js → sandbox-command-G22CPFNK.js} +2 -2
  27. package/dist/chunks/{sandbox-template-YKYRB645.js → sandbox-template-S4WRUWJ6.js} +3 -3
  28. package/dist/chunks/{src-LKJBD5AM.js → src-BKBZ7WLO.js} +4 -3
  29. package/dist/chunks/{src-IXYDKOBI.js → src-RTGN2O4H.js} +15917 -8039
  30. package/dist/chunks/taskset-BMI7KOWP.js +66 -0
  31. package/dist/chunks/{teams-bot-K6KZHZJV.js → teams-bot-5VBYEN7M.js} +2 -2
  32. package/dist/chunks/training-UPVSGDTB.js +17 -0
  33. package/dist/chunks/{workspaces-WXM72UZF.js → workspaces-IJQPWX3H.js} +4 -2
  34. package/dist/cli.js +13 -13
  35. package/dist/skills/openpond-desktop-harness/SKILL.md +1 -1
  36. package/dist/web/assets/App-BOkhmdHu.js +173 -0
  37. package/dist/web/assets/{AppDialog-DX-xs3KA.js → AppDialog-BCjKFUBn.js} +1 -1
  38. package/dist/web/assets/{AppTerminalPanel-CYVj_ITT.js → AppTerminalPanel-DRU8GIfy.js} +2 -2
  39. package/dist/web/assets/{AppsView-ByjyGog7.js → AppsView-Ck_OzQWf.js} +1 -1
  40. package/dist/web/assets/{BrowserSidebar-BDwtMAZl.js → BrowserSidebar-CqciX8aL.js} +1 -1
  41. package/dist/web/assets/{CartesianChart-Dv6jJfPR.js → CartesianChart-Y0lsL4vC.js} +1 -1
  42. package/dist/web/assets/{CollaborationTabs-CC5AIhMh.js → CollaborationTabs-BOb9PjvS.js} +1 -1
  43. package/dist/web/assets/{CommandMenu-Ct0Sx7yP.js → CommandMenu-Co6JnmTu.js} +1 -1
  44. package/dist/web/assets/{CommunityView-C_zVE0jg.js → CommunityView-BbTSeL7h.js} +1 -1
  45. package/dist/web/assets/{ComposerCreateImproveStrip-CNn4OywM.js → ComposerCreateImproveStrip-BGzCWVFp.js} +1 -1
  46. package/dist/web/assets/{GetStartedView-DRFpHDLd.js → GetStartedView-jEogFjxP.js} +1 -1
  47. package/dist/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  48. package/dist/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  49. package/dist/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  50. package/dist/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  51. package/dist/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  52. package/dist/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  53. package/dist/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  54. package/dist/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  55. package/dist/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  56. package/dist/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  57. package/dist/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  58. package/dist/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  59. package/dist/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  60. package/dist/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  61. package/dist/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  62. package/dist/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  63. package/dist/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  64. package/dist/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  65. package/dist/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  66. package/dist/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  67. package/dist/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  68. package/dist/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  69. package/dist/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  70. package/dist/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  71. package/dist/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  72. package/dist/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  73. package/dist/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  74. package/dist/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  75. package/dist/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  76. package/dist/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  77. package/dist/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  78. package/dist/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  79. package/dist/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  80. package/dist/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  81. package/dist/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  82. package/dist/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  83. package/dist/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  84. package/dist/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  85. package/dist/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  86. package/dist/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  87. package/dist/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  88. package/dist/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  89. package/dist/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  90. package/dist/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  91. package/dist/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  92. package/dist/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  93. package/dist/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  94. package/dist/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  95. package/dist/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  96. package/dist/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  97. package/dist/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  98. package/dist/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  99. package/dist/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  100. package/dist/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  101. package/dist/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  102. package/dist/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  103. package/dist/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  104. package/dist/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  105. package/dist/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  106. package/dist/web/assets/LabModelVersionDetailPage-CrudId_1.js +1 -0
  107. package/dist/web/assets/{LabSkillSidebar-B9jY4AgE.js → LabSkillSidebar-C5oS6UmH.js} +1 -1
  108. package/dist/web/assets/LabsRoute-9v8qwEBc.js +2 -0
  109. package/dist/web/assets/LabsRoute-CGFgymTX.css +1 -0
  110. package/dist/web/assets/MainChatThread-VtMpAxlP.js +2 -0
  111. package/dist/web/assets/MainPane-BbknUzp3.js +8 -0
  112. package/dist/web/assets/MarkdownText-DqJarmTh.js +268 -0
  113. package/dist/web/assets/Messages-BaT7HOzB.js +10 -0
  114. package/dist/web/assets/{NativeSkillSidebar-DjebFRoi.js → NativeSkillSidebar-DXp8snN5.js} +1 -1
  115. package/dist/web/assets/{NewExperienceSwitcher-C-bJxHxY.js → NewExperienceSwitcher-CLHuGUN5.js} +1 -1
  116. package/dist/web/assets/{NewProjectDialog-Cx8QcZm7.js → NewProjectDialog-CzpHCAaC.js} +1 -1
  117. package/dist/web/assets/{OutputsPage-Y9HM-SHX.js → OutputsPage-DIzx-Ge6.js} +1 -1
  118. package/dist/web/assets/{ProjectsPage-BBr58yKT.js → ProjectsPage-DojwrhOy.js} +1 -1
  119. package/dist/web/assets/RightChatPanelStack-CIE5bgmO.js +1 -0
  120. package/dist/web/assets/{RightSidebarHomePanel-Dx-1elSI.js → RightSidebarHomePanel-DTzfuEX3.js} +1 -1
  121. package/dist/web/assets/ScheduledWorkPage-DdbcQGSv.js +1 -0
  122. package/dist/web/assets/SettingsView-CC5GXaE1.css +1 -0
  123. package/dist/web/assets/SettingsView-QT_OLmDh.js +6 -0
  124. package/dist/web/assets/{TeamChatView-Bkyhu40R.js → TeamChatView-C4-nG1tC.js} +2 -2
  125. package/dist/web/assets/{TerminalOverlay-CaCkZDzO.js → TerminalOverlay-DnNVrCtu.js} +1 -1
  126. package/dist/web/assets/{TrainingCreationPanel-Vvi41WNT.js → TrainingCreationPanel-CDwwyucO.js} +1 -1
  127. package/dist/web/assets/{TrainingDraftPanel-C2C3hffI.js → TrainingDraftPanel-BijDnV_0.js} +1 -1
  128. package/dist/web/assets/{UsageSettingsSection-DpPBd-ra.js → UsageSettingsSection-Y5BFAu1p.js} +2 -2
  129. package/dist/web/assets/WorkSidebarPanel-CkJlvZKm.js +1 -0
  130. package/dist/web/assets/{WorkspaceDiffPanel-D_zKOW4K.js → WorkspaceDiffPanel-CBgzmBk8.js} +6 -6
  131. package/dist/web/assets/WorkspaceEnvironmentMenu-D8knAy1q.js +32 -0
  132. package/dist/web/assets/WorkspaceGitDialogs-_LHTrvh6.js +1 -0
  133. package/dist/web/assets/{WorkspaceMonacoEditor--GOVrHFp.js → WorkspaceMonacoEditor-B2B7OM_L.js} +3 -3
  134. package/dist/web/assets/{arrow-up-right-BRZWXpqJ.js → arrow-up-right-4nAzMtjW.js} +1 -1
  135. package/dist/web/assets/{chat-file-links-CgFHK89C.js → chat-file-links-Bned0MT7.js} +1 -1
  136. package/dist/web/assets/chevron-up-DK7ejCfk.js +1 -0
  137. package/dist/web/assets/{clipboard-dPd_3lpG.js → clipboard-BzjUoZFo.js} +1 -1
  138. package/dist/web/assets/{cloud-upload-DOwvN4hp.js → cloud-upload-CsrrwS-b.js} +1 -1
  139. package/dist/web/assets/{cssMode-BM4j9M0D.js → cssMode-CIbSSHKJ.js} +1 -1
  140. package/dist/web/assets/{folder-open-DavjPCw4.js → folder-open-vRTuLzpS.js} +1 -1
  141. package/dist/web/assets/{folder-plus-Dyqast6G.js → folder-plus-hyqwgUnx.js} +1 -1
  142. package/dist/web/assets/{git-commit-horizontal-s3X0cQlz.js → git-commit-horizontal-CaxKfeYa.js} +1 -1
  143. package/dist/web/assets/{htmlMode-Nlx7ckXa.js → htmlMode-C3MGQGam.js} +1 -1
  144. package/dist/web/assets/index-66-ohHD5.js +1 -0
  145. package/dist/web/assets/index-ByQIHpc9.css +1 -0
  146. package/dist/web/assets/{index-5-B6FIuE.js → index-Dvq7bpBG.js} +1 -1
  147. package/dist/web/assets/{info-CVvrNOHr.js → info-aYWeE1Iw.js} +1 -1
  148. package/dist/web/assets/{jsonMode-B7monA6g.js → jsonMode-CpD6UkT7.js} +1 -1
  149. package/dist/web/assets/{lspLanguageFeatures-CcJ9GDtK.js → lspLanguageFeatures-DpcK8ZI6.js} +1 -1
  150. package/dist/web/assets/{minimize-2-O1DnznGK.js → minimize-2-DeYg7XqB.js} +1 -1
  151. package/dist/web/assets/{monaco.contribution-2PozfA9g.js → monaco.contribution-BDTM0ZJq.js} +2 -2
  152. package/dist/web/assets/{monaco.contribution-QOOCizYq.js → monaco.contribution-C-_ekTxy.js} +2 -2
  153. package/dist/web/assets/{monaco.contribution-BMAF2bmO.js → monaco.contribution-CrrdDQgP.js} +2 -2
  154. package/dist/web/assets/{monaco.contribution-BSJ2jQTi.js → monaco.contribution-JWFq0HzV.js} +2 -2
  155. package/dist/web/assets/{play-BpCc5ZbR.js → play-BqgRTddV.js} +1 -1
  156. package/dist/web/assets/{python-BK41iew-.js → python-B67wope9.js} +1 -1
  157. package/dist/web/assets/{refresh-cw-Csoy1ev1.js → refresh-cw-DwMA_2On.js} +1 -1
  158. package/dist/web/assets/{save-Dbztj0W7.js → save-B0BKh5oQ.js} +1 -1
  159. package/dist/web/assets/square-LY3oz82L.js +1 -0
  160. package/dist/web/assets/{toggleHighContrast-DrmwDpyz.js → toggleHighContrast-B2jka5B1.js} +1 -1
  161. package/dist/web/assets/{training-daZlCtKV.css → training-eg6uFi3M.css} +1 -1
  162. package/dist/web/assets/{tsMode-CFgCMr7d.js → tsMode-1MUwluYD.js} +1 -1
  163. package/dist/web/assets/{upload-C5nhiSMq.js → upload-bSKSkFVa.js} +1 -1
  164. package/dist/web/assets/{useLocalAgentSchedules-LAsobERb.js → useLocalAgentSchedules--jnnM4Fz.js} +1 -1
  165. package/dist/web/assets/{wifi-off-BHxh2UbA.js → wifi-off-DA34iPmr.js} +1 -1
  166. package/dist/web/assets/{workers-FKb-NyBI.js → workers-CczIcRcl.js} +1 -1
  167. package/dist/web/assets/{yaml-C5DbF9S6.js → yaml-DwEGoHA9.js} +1 -1
  168. package/dist/web/index.html +2 -2
  169. package/docs/command-reference.md +58 -2
  170. package/package.json +3 -1
  171. package/dist/web/assets/App-BF9L0JUv.js +0 -171
  172. package/dist/web/assets/LabModelVersionDetailPage-BzF-IVXQ.js +0 -1
  173. package/dist/web/assets/LabsRoute-CS_orT9s.css +0 -1
  174. package/dist/web/assets/LabsRoute-Di1Zs4gZ.js +0 -2
  175. package/dist/web/assets/MainChatThread-8VzlD8Hi.js +0 -2
  176. package/dist/web/assets/MainPane-StAOFINE.js +0 -6
  177. package/dist/web/assets/MarkdownText-B8D_ftSJ.js +0 -9
  178. package/dist/web/assets/Messages-TY62tiDp.js +0 -10
  179. package/dist/web/assets/RightChatPanelStack-DzUbDKwp.js +0 -1
  180. package/dist/web/assets/ScheduledWorkPage-BuXw_W8b.js +0 -1
  181. package/dist/web/assets/SettingsView-BRPrJuP5.css +0 -1
  182. package/dist/web/assets/SettingsView-DB_zPHYY.js +0 -6
  183. package/dist/web/assets/WorkSidebarPanel-CeWGboTh.js +0 -1
  184. package/dist/web/assets/WorkspaceEnvironmentMenu-BTz9FISP.js +0 -32
  185. package/dist/web/assets/WorkspaceGitDialogs-BnBRUYpS.js +0 -1
  186. package/dist/web/assets/activity-DA5DNQwD.js +0 -1
  187. package/dist/web/assets/chevron-up-DSv2auz_.js +0 -1
  188. package/dist/web/assets/git-branch-zKnZdQiX.js +0 -1
  189. package/dist/web/assets/index-CQ3CPVHZ.css +0 -1
  190. package/dist/web/assets/index-CuoGlf-W.js +0 -1
  191. package/dist/web/assets/square-ju7fWa0W.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
2
  import {
3
3
  now
4
- } from "./chunk-NPNIL6SQ.js";
4
+ } from "./chunk-DJL4TJYG.js";
5
5
 
6
6
  // ../server/src/workspace/workspace-command.ts
7
7
  import { spawn, spawnSync } from "node:child_process";
@@ -131,6 +131,7 @@ var MAX_PATCH_CHARS = 24e3;
131
131
  var MAX_FILE_CHARS = 8e4;
132
132
  var MAX_READABLE_FILE_BYTES = 512 * 1024;
133
133
  var MAX_WORKSPACE_IMAGE_BYTES = 15 * 1024 * 1024;
134
+ var MAX_WORKSPACE_DOCUMENT_BYTES = 20 * 1024 * 1024;
134
135
  var GENERATED_WORKSPACE_DIRS = /* @__PURE__ */ new Set([
135
136
  ".cache",
136
137
  ".eggs",
@@ -167,6 +168,8 @@ var BINARY_WORKSPACE_EXTENSIONS = /* @__PURE__ */ new Set([
167
168
  ".7z",
168
169
  ".avif",
169
170
  ".db",
171
+ ".doc",
172
+ ".docx",
170
173
  ".gif",
171
174
  ".gz",
172
175
  ".ico",
@@ -198,6 +201,7 @@ var LOCAL_VIDEO_CONTENT_TYPES = /* @__PURE__ */ new Map([
198
201
  [".mp4", "video/mp4"],
199
202
  [".webm", "video/webm"]
200
203
  ]);
204
+ var WORKSPACE_DOCUMENT_EXTENSIONS = /* @__PURE__ */ new Set([".doc", ".docx", ".pdf"]);
201
205
  function safeAppSegment(appId) {
202
206
  return appId.replace(/[^a-zA-Z0-9._-]/g, "-").slice(0, 120) || "app";
203
207
  }
@@ -253,6 +257,22 @@ async function readWorkspaceFile(repoPath, filePath) {
253
257
  return null;
254
258
  }
255
259
  }
260
+ async function readWorkspaceDocumentPreview(repoPath, filePath) {
261
+ const normalizedPath = normalizeWorkspaceFilePath(filePath);
262
+ if (!normalizedPath || !WORKSPACE_DOCUMENT_EXTENSIONS.has(path2.extname(normalizedPath).toLowerCase())) {
263
+ return null;
264
+ }
265
+ const target = path2.resolve(repoPath, normalizedPath);
266
+ const root = path2.resolve(repoPath);
267
+ if (target !== root && !target.startsWith(`${root}${path2.sep}`)) return null;
268
+ try {
269
+ const stat = await fs2.lstat(target);
270
+ if (!stat.isFile() || stat.size > MAX_WORKSPACE_DOCUMENT_BYTES) return null;
271
+ return (await fs2.readFile(target)).toString("base64");
272
+ } catch {
273
+ return null;
274
+ }
275
+ }
256
276
  function workspaceImageContentType(filePath) {
257
277
  return WORKSPACE_IMAGE_CONTENT_TYPES.get(path2.extname(filePath).toLowerCase()) ?? null;
258
278
  }
@@ -1102,10 +1122,17 @@ async function loadWorkspaceFileAtPath(repoPath, filePath) {
1102
1122
  if (isGeneratedWorkspacePath(normalizedPath)) throw new Error("File not found");
1103
1123
  if (initialized) {
1104
1124
  const detail = await loadGitWorkspaceFileAtPath(repoPath, normalizedPath);
1105
- if (detail) return detail;
1125
+ if (detail) {
1126
+ if (detail.content !== null || detail.status === "deleted") return detail;
1127
+ const documentContent = await readWorkspaceDocumentPreview(
1128
+ repoPath,
1129
+ normalizedPath
1130
+ );
1131
+ return documentContent === null ? detail : { ...detail, content: documentContent };
1132
+ }
1106
1133
  }
1107
1134
  let resolvedPath = normalizedPath;
1108
- let content = await readWorkspaceFile(repoPath, resolvedPath);
1135
+ let content = await readWorkspaceFile(repoPath, resolvedPath) ?? await readWorkspaceDocumentPreview(repoPath, resolvedPath);
1109
1136
  if (content === null) {
1110
1137
  const basenameMatch = await resolveExplicitMarkdownBasenamePath(repoPath, normalizedPath);
1111
1138
  if (basenameMatch) {
@@ -1210,6 +1237,7 @@ export {
1210
1237
  isGitRepo,
1211
1238
  truncatePatch,
1212
1239
  readWorkspaceFile,
1240
+ readWorkspaceDocumentPreview,
1213
1241
  workspaceImageContentType,
1214
1242
  localVideoContentType,
1215
1243
  readWorkspaceImageFile,
@@ -28,7 +28,7 @@ import {
28
28
  compareSemver,
29
29
  fetchLatestNpmVersion,
30
30
  getInstalledCliVersion
31
- } from "./chunk-Y57RTLVV.js";
31
+ } from "./chunk-N3TGCM7J.js";
32
32
  import {
33
33
  checkOpenPondApiHealth,
34
34
  createHeadlessApps,
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
3
3
  // ../server/src/constants.ts
4
4
  var DEFAULT_HOST = "127.0.0.1";
5
5
  var DEFAULT_PORT = 17874;
6
- var VERSION = "0.0.69";
6
+ var VERSION = "0.1.1";
7
7
  var HOSTED_CHAT_SYSTEM_PROMPT = "You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like ![description](path-or-url) instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";
8
8
  var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
9
9
  var APP_PREFERENCES_CACHE_KEY = "global";
@@ -12,7 +12,7 @@ import {
12
12
  saveConfig,
13
13
  saveProfileApiKey,
14
14
  setActiveProfile
15
- } from "./chunk-MMRJNSWY.js";
15
+ } from "./chunk-6G6MDZLM.js";
16
16
  import {
17
17
  DEFAULT_OPENPOND_API_BASE_URL,
18
18
  DEFAULT_OPENPOND_WEB_BASE_URL
@@ -177,8 +177,9 @@ function findActiveAccount(config, requestedHandle, requestedBaseUrl) {
177
177
  if (exact)
178
178
  return exact;
179
179
  const sameHandle = accounts.filter((account) => handleEquals(account.handle, requestedProfile.handle));
180
- if (!selectorBaseUrl(requestedProfile) && sameHandle.length === 1)
180
+ if (sameHandle.length === 1)
181
181
  return sameHandle[0] ?? null;
182
+ return null;
182
183
  }
183
184
  if (accounts[0])
184
185
  return accounts[0];
@@ -1186,6 +1187,23 @@ async function removeOpenPondAccount(input) {
1186
1187
  return loadOpenPondAccountContext();
1187
1188
  }
1188
1189
 
1190
+ // ../../packages/runtime/dist/sign-out-account.js
1191
+ async function signOutOpenPondAccount() {
1192
+ const config = await loadGlobalConfig();
1193
+ const activeProfile = normalizeActiveProfile(config.activeProfile);
1194
+ const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
1195
+ const activeIndex = activeProfile ? accounts.findIndex((account) => accountMatchesSelector(account, activeProfile)) : 0;
1196
+ if (activeIndex < 0 || !accounts[activeIndex]) {
1197
+ throw new Error("No active OpenPond account to log out.");
1198
+ }
1199
+ const signedOutAccount = { ...accounts[activeIndex] };
1200
+ delete signedOutAccount.apiKey;
1201
+ delete signedOutAccount.session;
1202
+ accounts[activeIndex] = signedOutAccount;
1203
+ await saveConfig({ ...config, accounts });
1204
+ return loadOpenPondAccountContext(signedOutAccount.handle, signedOutAccount.baseUrl);
1205
+ }
1206
+
1189
1207
  // ../../packages/runtime/dist/update-account-config.js
1190
1208
  function findAccountIndex2(accounts, handle, currentBaseUrl) {
1191
1209
  const normalizedCurrentBaseUrl = normalizeBaseUrl(currentBaseUrl);
@@ -1304,6 +1322,7 @@ export {
1304
1322
  streamOpenPondHostedChatTurn,
1305
1323
  saveOpenPondAccount,
1306
1324
  removeOpenPondAccount,
1325
+ signOutOpenPondAccount,
1307
1326
  updateOpenPondAccountConfig,
1308
1327
  getOpenPondAppEnvironment,
1309
1328
  getBundledRuntimeVersion,
@@ -2,18 +2,17 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
2
2
  import {
3
3
  resolveApiBaseUrlOption
4
4
  } from "./chunk-SMNFI2FU.js";
5
- import "./chunk-KSRWKXRB.js";
6
5
  import {
7
6
  optionString,
8
7
  parseBooleanOption,
9
8
  parseIntegerOption,
10
9
  parseNumberOption
11
10
  } from "./chunk-MUMPWI4O.js";
12
- import "./chunk-UACZUFIA.js";
13
11
 
14
12
  // src/cli/training.ts
15
13
  import { readFile } from "node:fs/promises";
16
14
  import { request as requestHttp } from "node:http";
15
+ import { randomUUID } from "node:crypto";
17
16
  import os from "node:os";
18
17
  import path from "node:path";
19
18
  import { createInterface } from "node:readline/promises";
@@ -35,12 +34,13 @@ async function runTrainingCommand(options, rest, dependencies = {}) {
35
34
  "cancel",
36
35
  "resume",
37
36
  "artifacts",
38
- "benchmark"
37
+ "benchmark",
38
+ "create-project"
39
39
  ].includes(
40
40
  subcommand
41
41
  ) || !id) {
42
42
  throw new Error(
43
- "usage: training <start|status|watch|logs|cancel|resume|artifacts|benchmark> <model-run-id|run-id|model-id>"
43
+ "usage: training <create-project|start|status|watch|logs|cancel|resume|artifacts|benchmark> <taskset-id|model-run-id|run-id|model-id>"
44
44
  );
45
45
  }
46
46
  if (rest.length > 2) {
@@ -52,6 +52,15 @@ async function runTrainingCommand(options, rest, dependencies = {}) {
52
52
  request: dependencies.request ?? await createLocalAuthenticatedRequest(baseUrl)
53
53
  });
54
54
  const json = parseBooleanOption(options.json);
55
+ if (subcommand === "create-project") {
56
+ const project = await createManagedModelProject({
57
+ client,
58
+ options,
59
+ tasksetId: id
60
+ });
61
+ printResult(project, json);
62
+ return;
63
+ }
55
64
  if (subcommand === "benchmark") {
56
65
  await startHarnessRefinerBenchmark({
57
66
  client,
@@ -193,6 +202,20 @@ var TrainingApiClient = class {
193
202
  body
194
203
  );
195
204
  }
205
+ prepareModelProject(id, body) {
206
+ return this.json(
207
+ `/v1/training/model-projects/${encodeURIComponent(id)}/training/prepare`,
208
+ "POST",
209
+ body
210
+ );
211
+ }
212
+ startModelProject(id, body) {
213
+ return this.json(
214
+ `/v1/training/model-projects/${encodeURIComponent(id)}/training/start`,
215
+ "POST",
216
+ body
217
+ );
218
+ }
196
219
  trainingState() {
197
220
  return this.json("/v1/training", "GET");
198
221
  }
@@ -203,6 +226,28 @@ var TrainingApiClient = class {
203
226
  body
204
227
  );
205
228
  }
229
+ importTasksetDraftPackage(body) {
230
+ return this.json("/v1/training/taskset-drafts/import", "POST", body);
231
+ }
232
+ publishTasksetDraft(draftId, modelId) {
233
+ return this.json(
234
+ `/v1/training/taskset-drafts/${encodeURIComponent(draftId)}/publish`,
235
+ "POST",
236
+ modelId ? { modelId } : {}
237
+ );
238
+ }
239
+ tasksetReadiness(tasksetId) {
240
+ return this.json("/v1/training/readiness", "POST", { tasksetId });
241
+ }
242
+ deleteTasksetDraft(draftId) {
243
+ return this.json(
244
+ `/v1/training/taskset-drafts/${encodeURIComponent(draftId)}`,
245
+ "DELETE"
246
+ );
247
+ }
248
+ saveModelProject(project) {
249
+ return this.json("/v1/training/models", "PUT", project);
250
+ }
206
251
  async json(pathname, method, body) {
207
252
  const response = await this.request(`${this.baseUrl}${pathname}`, {
208
253
  method,
@@ -231,9 +276,9 @@ var TrainingApiClient = class {
231
276
  async function startHarnessRefinerBenchmark(input) {
232
277
  const state = await input.client.trainingState();
233
278
  const project = modelProject(state, input.modelId);
234
- const providerId = optionString(input.options, "provider") ?? "openpond";
235
- const modelId = optionString(input.options, "model") ?? "openpond-chat";
236
- const effort = optionString(input.options, "reasoningEffort") ?? "high";
279
+ const providerId = optionString(input.options, "provider") || "openpond";
280
+ const modelId = optionString(input.options, "model") || "openpond-chat";
281
+ const effort = optionString(input.options, "reasoningEffort") || "high";
237
282
  const maximumSpendUsd = parseNumberOption(input.options.maxSpend, "max-spend") ?? 10;
238
283
  if (maximumSpendUsd <= 0) throw new Error("max-spend must be greater than zero");
239
284
  if (parseBooleanOption(input.options.detach)) {
@@ -273,6 +318,188 @@ function objectString(value, key) {
273
318
  const candidate = value[key];
274
319
  return typeof candidate === "string" && candidate ? candidate : null;
275
320
  }
321
+ async function createManagedModelProject(input) {
322
+ const recipePath = optionString(input.options, "recipe");
323
+ if (!recipePath) {
324
+ throw new Error("training create-project requires --recipe <versioned-recipe.json>");
325
+ }
326
+ const recipe = await readJsonObject(recipePath, "Training recipe");
327
+ const state = await input.client.trainingState();
328
+ const taskset = trainingStateRecord(state, "tasksets", input.tasksetId, "Taskset");
329
+ const profileId = optionString(input.options, "profile") || objectString(taskset, "profileId");
330
+ if (!profileId) {
331
+ throw new Error(
332
+ `The Taskset has no Profile id (received ${typeof taskset.profileId}: ${String(taskset.profileId)}).`
333
+ );
334
+ }
335
+ const tasksetProfileId = objectString(taskset, "profileId");
336
+ if (tasksetProfileId !== profileId) {
337
+ throw new Error(
338
+ `Taskset ${input.tasksetId} belongs to Profile ${tasksetProfileId ?? "unknown"}, not ${profileId}.`
339
+ );
340
+ }
341
+ const projectId = optionString(input.options, "projectId") || `model_${randomUUID()}`;
342
+ const projects = trainingStateRecords(state, "modelProjects");
343
+ const existingProject = projects.find(
344
+ (project) => objectString(project, "id") === projectId
345
+ );
346
+ const rolloutPlacement = enumOption(
347
+ input.options,
348
+ "rolloutPlacement",
349
+ ["local", "remote"],
350
+ "local"
351
+ );
352
+ const gpuPlacementObjective = enumOption(
353
+ input.options,
354
+ "gpuPlacementObjective",
355
+ ["fast", "balanced", "economical"],
356
+ "balanced"
357
+ );
358
+ const runPreset = enumOption(
359
+ input.options,
360
+ "runPreset",
361
+ ["small", "standard", "custom", "small_experiment"],
362
+ "custom"
363
+ );
364
+ const maximumSpendUsd = parseNumberOption(input.options.maxSpend, "max-spend") ?? null;
365
+ if (maximumSpendUsd !== null && maximumSpendUsd < 0) {
366
+ throw new Error("max-spend must be non-negative");
367
+ }
368
+ const retentionDays = parseIntegerOption(
369
+ input.options.retentionDays,
370
+ "retention-days"
371
+ ) ?? null;
372
+ if (retentionDays !== null && retentionDays < 0) {
373
+ throw new Error("retention-days must be non-negative");
374
+ }
375
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
376
+ const contentHash = objectString(taskset, "contentHash");
377
+ const revision = objectNumber(taskset, "revision");
378
+ if (!contentHash || !revision || revision < 1) {
379
+ throw new Error("The Taskset does not have an immutable published revision.");
380
+ }
381
+ const method = objectString(recipe, "method");
382
+ if (!method) throw new Error("Training recipe must declare its method.");
383
+ const baseModel = managedBasePreferenceFromRecipe(recipe);
384
+ if (existingProject) {
385
+ const existingSetup = objectRecord(existingProject, "trainingSetup");
386
+ const existingTasksetRef = objectRecord(existingSetup, "tasksetRef");
387
+ if (objectString(existingTasksetRef, "id") !== input.tasksetId || objectString(existingProject, "profileId") !== profileId) {
388
+ throw new Error(
389
+ `Model Project ${projectId} already exists for a different Profile or Taskset.`
390
+ );
391
+ }
392
+ if (objectRecord(existingSetup, "baseModel")) {
393
+ throw new Error(`Model Project ${projectId} already exists.`);
394
+ }
395
+ return input.client.saveModelProject({
396
+ ...existingProject,
397
+ revision: objectNumber(existingProject, "revision") ?? 1,
398
+ defaultBaseModel: baseModel,
399
+ trainingSetup: {
400
+ ...existingSetup,
401
+ baseModel,
402
+ recipe
403
+ },
404
+ updatedAt: timestamp
405
+ });
406
+ }
407
+ return input.client.saveModelProject({
408
+ schemaVersion: "openpond.modelProject.v2",
409
+ id: projectId,
410
+ profileId,
411
+ revision: 1,
412
+ name: optionString(input.options, "name") || objectString(taskset, "name") || "Managed Model",
413
+ objective: optionString(input.options, "objective") || objectString(taskset, "objective"),
414
+ defaultBaseModel: baseModel,
415
+ defaultDestinationId: optionString(input.options, "destination") || "openpond_managed",
416
+ trainingSetup: {
417
+ tasksetRef: { id: input.tasksetId, revision, contentHash },
418
+ tasksetRelease: null,
419
+ harnessRelease: null,
420
+ baseModel,
421
+ method,
422
+ destinationId: optionString(input.options, "destination") || "openpond_managed",
423
+ managedRolloutPlacement: rolloutPlacement,
424
+ managedGpuPlacementObjective: gpuPlacementObjective,
425
+ managedGpuRequirement: "any",
426
+ runPreset,
427
+ recipe,
428
+ preferredMaximumSpendUsd: maximumSpendUsd,
429
+ preferredRetentionDays: retentionDays
430
+ },
431
+ hosted: null,
432
+ tasksetSyncs: [],
433
+ createdAt: timestamp,
434
+ updatedAt: timestamp
435
+ });
436
+ }
437
+ function managedBasePreferenceFromRecipe(recipe) {
438
+ const recipeBase = objectRecord(recipe, "baseModel");
439
+ const modelId = objectString(recipeBase, "id");
440
+ const revision = objectString(recipeBase, "revision");
441
+ const tokenizerRevision = objectString(recipeBase, "tokenizerRevision");
442
+ const chatTemplateHash = objectString(recipeBase, "chatTemplateHash");
443
+ if (!modelId || !revision || !tokenizerRevision || !chatTemplateHash) {
444
+ throw new Error(
445
+ "Managed GRPO recipe must pin baseModel id, revision, tokenizerRevision, and chatTemplateHash."
446
+ );
447
+ }
448
+ return {
449
+ schemaVersion: "openpond.baseModelPreference.v1",
450
+ modelId,
451
+ revision,
452
+ tokenizerRevision,
453
+ chatTemplateHash,
454
+ modelAssetId: null,
455
+ source: "managed"
456
+ };
457
+ }
458
+ function trainingStateRecord(state, key, id, label) {
459
+ const match = trainingStateRecords(state, key).find(
460
+ (candidate) => objectString(candidate, "id") === id
461
+ );
462
+ if (!match) throw new Error(`${label} ${id} was not found.`);
463
+ return match;
464
+ }
465
+ function trainingStateRecords(state, key) {
466
+ if (!state || typeof state !== "object" || !(key in state)) return [];
467
+ const value = state[key];
468
+ return Array.isArray(value) ? value.filter(
469
+ (candidate) => Boolean(candidate) && typeof candidate === "object" && !Array.isArray(candidate)
470
+ ) : [];
471
+ }
472
+ function objectNumber(value, key) {
473
+ if (!value || typeof value !== "object" || !(key in value)) return null;
474
+ const candidate = value[key];
475
+ return typeof candidate === "number" && Number.isFinite(candidate) ? candidate : null;
476
+ }
477
+ function objectRecord(value, key) {
478
+ if (!value || typeof value !== "object" || !(key in value)) return null;
479
+ const candidate = value[key];
480
+ return candidate && typeof candidate === "object" && !Array.isArray(candidate) ? candidate : null;
481
+ }
482
+ function enumOption(options, key, values, fallback) {
483
+ const value = optionString(options, key) || fallback;
484
+ if (!values.includes(value)) {
485
+ throw new Error(`${key} must be one of ${values.join(", ")}`);
486
+ }
487
+ return value;
488
+ }
489
+ async function readJsonObject(file, label) {
490
+ let parsed;
491
+ try {
492
+ parsed = JSON.parse(await readFile(file, "utf8"));
493
+ } catch (error) {
494
+ throw new Error(
495
+ `Could not read ${label} ${file}: ${error instanceof Error ? error.message : String(error)}`
496
+ );
497
+ }
498
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
499
+ throw new Error(`${label} must be a JSON object.`);
500
+ }
501
+ return parsed;
502
+ }
276
503
  async function startTraining(input) {
277
504
  const maximumSpendUsd = parseNumberOption(
278
505
  input.options.maxSpend,
@@ -287,11 +514,13 @@ async function startTraining(input) {
287
514
  }
288
515
  const manifestPath = optionString(input.options, "manifest");
289
516
  const manifest = manifestPath ? await readManifest(manifestPath) : void 0;
517
+ const comparisonSeriesEntryId = optionString(
518
+ input.options,
519
+ "comparisonSeriesEntry"
520
+ ) || null;
290
521
  const controls = { maximumSpendUsd, retentionDays };
291
- const preparation = await input.client.modelRun(
522
+ const preparation = await input.client.prepareModelProject(
292
523
  input.modelRunId,
293
- "prepare",
294
- "POST",
295
524
  controls
296
525
  );
297
526
  if (!input.json) {
@@ -302,11 +531,14 @@ async function startTraining(input) {
302
531
  if (!confirmed) {
303
532
  throw new Error("Training start cancelled.");
304
533
  }
305
- const result = await input.client.modelRun(
534
+ const result = await input.client.startModelProject(
306
535
  input.modelRunId,
307
- "start",
308
- "POST",
309
- { ...controls, manifest }
536
+ {
537
+ ...controls,
538
+ exportApproved: parseBooleanOption(input.options.exportApproved),
539
+ manifest,
540
+ comparisonSeriesEntryId
541
+ }
310
542
  );
311
543
  printResult(result, input.json);
312
544
  if (parseBooleanOption(input.options.detach)) return;
@@ -393,7 +625,10 @@ function printResult(value, json) {
393
625
  }
394
626
  console.log(JSON.stringify(value, null, 2));
395
627
  }
628
+
396
629
  export {
397
- TrainingApiClient,
398
- runTrainingCommand
630
+ DEFAULT_LOCAL_TRAINING_API_URL,
631
+ runTrainingCommand,
632
+ createLocalAuthenticatedRequest,
633
+ TrainingApiClient
399
634
  };
@@ -6,11 +6,11 @@ import {
6
6
  DEFAULT_HOST,
7
7
  DEFAULT_PORT,
8
8
  parseListen
9
- } from "./chunk-NPNIL6SQ.js";
9
+ } from "./chunk-DJL4TJYG.js";
10
10
  import {
11
11
  getBundledRuntimeVersion,
12
12
  openUrlWithSystemBrowser
13
- } from "./chunk-FEOLMLYU.js";
13
+ } from "./chunk-EFET7LB7.js";
14
14
 
15
15
  // ../server/src/cli.ts
16
16
  import { existsSync } from "node:fs";