openpond 0.1.0 → 0.2.0

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 (137) hide show
  1. package/README.md +4 -4
  2. package/dist/cache.d.ts +7 -10
  3. package/dist/chunks/{app-layer-XEYHFJHI.js → app-layer-F3CGXB33.js} +9 -7
  4. package/dist/chunks/{app-server-runtime-Y6MW4XCG.js → app-server-runtime-RHO5TFUC.js} +9 -7
  5. package/dist/chunks/{apps-GSXUDK6V.js → apps-L5XCL7QY.js} +12 -10
  6. package/dist/chunks/{chunk-J7PYGDRY.js → chunk-26AMV5ZI.js} +1 -1
  7. package/dist/chunks/{chunk-DNXBJZAU.js → chunk-3EB7I67T.js} +1 -1
  8. package/dist/chunks/{chunk-J3YDKJFD.js → chunk-3ELF4FXY.js} +19 -11
  9. package/dist/chunks/{chunk-HFPUR4CQ.js → chunk-3VEYNDHN.js} +10 -10
  10. package/dist/chunks/chunk-4KA25HUP.js +5648 -0
  11. package/dist/chunks/{chunk-EFET7LB7.js → chunk-6SMNG6YA.js} +62 -90
  12. package/dist/chunks/{chunk-N3TGCM7J.js → chunk-7RIGZB7N.js} +50 -37
  13. package/dist/chunks/{chunk-47EIAYI7.js → chunk-A6G3PFA5.js} +6 -4
  14. package/dist/chunks/{chunk-D7BO5Y5J.js → chunk-FJ2JGB2N.js} +31 -189
  15. package/dist/chunks/{chunk-WBAZFKC7.js → chunk-G65WAOJV.js} +2 -2
  16. package/dist/chunks/{chunk-CNTM26OW.js → chunk-K4TZEHAW.js} +16 -16
  17. package/dist/chunks/{chunk-AN2EYCN3.js → chunk-KCRCIQPD.js} +1 -5
  18. package/dist/chunks/chunk-OCBRPU2K.js +629 -0
  19. package/dist/chunks/{chunk-2JABRRNR.js → chunk-PS37DB5F.js} +1 -1
  20. package/dist/chunks/{chunk-TGM5IPYO.js → chunk-UZMVNKXM.js} +1 -1
  21. package/dist/chunks/{chunk-TZWAUV2L.js → chunk-VT6BLHMB.js} +10750 -1240
  22. package/dist/chunks/{chunk-5TKZBMQM.js → chunk-X6F4LBTQ.js} +102 -1
  23. package/dist/chunks/{chunk-6G6MDZLM.js → chunk-XA4KBDMY.js} +213 -999
  24. package/dist/chunks/chunk-ZNQEROWP.js +254 -0
  25. package/dist/chunks/{cli-L5VPOV6I.js → cli-D2MUUBEX.js} +7 -5
  26. package/dist/chunks/configuration-command-NR6JYIUD.js +187 -0
  27. package/dist/chunks/{continual-FYDKLCO7.js → continual-37CE4LLJ.js} +4 -4
  28. package/dist/chunks/{core-commands-MAN3CSJQ.js → core-commands-SWGIOZLW.js} +8 -6
  29. package/dist/chunks/database-DEYUZDIM.js +20 -0
  30. package/dist/chunks/{desktop-test-OE5SST2W.js → desktop-test-QOS7G5NE.js} +8 -6
  31. package/dist/chunks/dist-AKYCQNNF.js +187 -0
  32. package/dist/chunks/{extension-J3CIEDP4.js → extension-HJUJBQAD.js} +67 -730
  33. package/dist/chunks/{help-JNGJJFU5.js → help-J6PZ23IC.js} +1 -1
  34. package/dist/chunks/{opchat-6HEQJFLL.js → opchat-ABX5YBAT.js} +9 -7
  35. package/dist/chunks/{organizations-MWAPNOCK.js → organizations-CPNC47DO.js} +8 -6
  36. package/dist/chunks/{profile-P7HMONTZ.js → profile-Q3HB5MIO.js} +16 -14
  37. package/dist/chunks/{project-agent-2RAK7GAZ.js → project-agent-YHUBX4OR.js} +9 -7
  38. package/dist/chunks/{sandbox-command-G22CPFNK.js → sandbox-command-YFL5QTWX.js} +8 -6
  39. package/dist/chunks/{sandbox-template-S4WRUWJ6.js → sandbox-template-Z6P7NTNF.js} +12 -10
  40. package/dist/chunks/{src-BKBZ7WLO.js → src-7XEENEBI.js} +16 -12
  41. package/dist/chunks/{src-A6O6ZGIL.js → src-KBBIV4NT.js} +1338 -10969
  42. package/dist/chunks/{taskset-BMI7KOWP.js → taskset-2TRZBRRT.js} +1 -1
  43. package/dist/chunks/{teams-bot-5VBYEN7M.js → teams-bot-WD33NLH5.js} +7 -5
  44. package/dist/chunks/{training-UPVSGDTB.js → training-4XH37UZB.js} +1 -1
  45. package/dist/chunks/{workspaces-XM5BY3MO.js → workspaces-WG2MH2WE.js} +2 -2
  46. package/dist/cli.js +25 -17
  47. package/dist/client.d.ts +1 -1
  48. package/dist/config.d.ts +1 -0
  49. package/dist/index.js +20803 -15878
  50. package/dist/private-json-file.d.ts +1 -2
  51. package/dist/skills/openpond-desktop-harness/SKILL.md +1 -1
  52. package/dist/web/assets/App-C9aGkxVg.js +173 -0
  53. package/dist/web/assets/{AppDialog-CSXu5wRu.js → AppDialog-CK6_lg8c.js} +1 -1
  54. package/dist/web/assets/{AppTerminalPanel-y2bVL2RV.js → AppTerminalPanel-BKqgX4sd.js} +2 -2
  55. package/dist/web/assets/{AppsView-Bs9pwD2H.js → AppsView-B1NUuAIf.js} +1 -1
  56. package/dist/web/assets/{BrowserSidebar-CUgT5V1m.js → BrowserSidebar-DOvYxXeP.js} +1 -1
  57. package/dist/web/assets/{CartesianChart-DA85hfrP.js → CartesianChart-pOrYpzBr.js} +1 -1
  58. package/dist/web/assets/{CollaborationTabs-B8mlPhM3.js → CollaborationTabs-CgbR-MBJ.js} +1 -1
  59. package/dist/web/assets/{CommandMenu-EwUGCeC_.js → CommandMenu-CrIr4qUX.js} +1 -1
  60. package/dist/web/assets/{CommunityView-IHNq-YJz.js → CommunityView-CvAVQ_HZ.js} +1 -1
  61. package/dist/web/assets/{ComposerCreateImproveStrip-qOL2zA26.js → ComposerCreateImproveStrip-DybcKwwd.js} +1 -1
  62. package/dist/web/assets/GetStartedView-DVInkexN.js +1 -0
  63. package/dist/web/assets/{LabModelVersionDetailPage-BK0eoUlW.js → LabModelVersionDetailPage-NaaPElmM.js} +1 -1
  64. package/dist/web/assets/{LabSkillSidebar-CRPb4qBn.js → LabSkillSidebar-CuaYrtiu.js} +1 -1
  65. package/dist/web/assets/LabsRoute-BRR6x3SX.js +2 -0
  66. package/dist/web/assets/{MainChatThread-Cu6_UnNE.js → MainChatThread-BfkjCZB9.js} +2 -2
  67. package/dist/web/assets/MainPane-Gw-YK38n.js +8 -0
  68. package/dist/web/assets/{MarkdownText-N60tvLug.js → MarkdownText-DOlVQR8a.js} +1 -1
  69. package/dist/web/assets/{Messages-CYQFLElK.js → Messages-DMubppta.js} +6 -6
  70. package/dist/web/assets/{NativeSkillSidebar-zbx7WmOk.js → NativeSkillSidebar-DSFwZ-od.js} +1 -1
  71. package/dist/web/assets/{NewExperienceSwitcher-B0zev5Sx.js → NewExperienceSwitcher-Dj0ePIJ-.js} +1 -1
  72. package/dist/web/assets/{NewProjectDialog-lZlzrp-R.js → NewProjectDialog-B8NQV-Ji.js} +1 -1
  73. package/dist/web/assets/{OutputsPage-B4zYYUT5.js → OutputsPage-D_LDYTgV.js} +1 -1
  74. package/dist/web/assets/{ProjectsPage-97wgc84s.js → ProjectsPage-xjDYPc_W.js} +1 -1
  75. package/dist/web/assets/RightChatPanelStack-BktRQ9wg.js +1 -0
  76. package/dist/web/assets/{RightSidebarHomePanel-BUcWVJi-.js → RightSidebarHomePanel-j0VckZUu.js} +1 -1
  77. package/dist/web/assets/ScheduledWorkPage-1aT4bBY-.js +1 -0
  78. package/dist/web/assets/SettingsView-BSpuMDpv.js +9 -0
  79. package/dist/web/assets/SettingsView-CAH0vreE.css +1 -0
  80. package/dist/web/assets/{TeamChatView-Fj5_yjVE.js → TeamChatView-BPWJbDf1.js} +2 -2
  81. package/dist/web/assets/{TerminalOverlay-D2WBeJvp.js → TerminalOverlay-CrSwUk2d.js} +1 -1
  82. package/dist/web/assets/{TrainingCreationPanel-dYW_dh3M.js → TrainingCreationPanel-B4HMRwUg.js} +1 -1
  83. package/dist/web/assets/{TrainingDraftPanel-zeJWmmW6.js → TrainingDraftPanel-D4r1tN3I.js} +1 -1
  84. package/dist/web/assets/{UsageSettingsSection-B6SBqYuB.js → UsageSettingsSection-2aymqwIM.js} +1 -1
  85. package/dist/web/assets/{WorkSidebarPanel-BwbWKpOZ.js → WorkSidebarPanel-B0X0OiR6.js} +1 -1
  86. package/dist/web/assets/WorkspaceDiffPanel-Pg7GL0br.js +14 -0
  87. package/dist/web/assets/{WorkspaceEnvironmentMenu-D-3YGp06.js → WorkspaceEnvironmentMenu-OAfMEt7L.js} +3 -3
  88. package/dist/web/assets/{WorkspaceGitDialogs-BUbzUN4m.js → WorkspaceGitDialogs-YxcPH2Rq.js} +1 -1
  89. package/dist/web/assets/{WorkspaceMonacoEditor-CXPY7bBI.js → WorkspaceMonacoEditor-COKTiQZl.js} +3 -3
  90. package/dist/web/assets/{arrow-up-right-C7VWgGQP.js → arrow-up-right-_TX-awvK.js} +1 -1
  91. package/dist/web/assets/{chat-file-links-CqfMdhHQ.js → chat-file-links-CWLsRYvW.js} +1 -1
  92. package/dist/web/assets/chevron-up--mNnEqha.js +1 -0
  93. package/dist/web/assets/{clipboard-B-8k7mlT.js → clipboard-CyRSS8Sy.js} +1 -1
  94. package/dist/web/assets/{cloud-upload-CUVFzURz.js → cloud-upload-uBJBUYTy.js} +1 -1
  95. package/dist/web/assets/{cssMode-DYvfmqoL.js → cssMode-BrXSsZYs.js} +1 -1
  96. package/dist/web/assets/{folder-open-CnbcQIy8.js → folder-open-DktdZNW7.js} +1 -1
  97. package/dist/web/assets/{folder-plus-BOaLAKy4.js → folder-plus-DO06i9Vo.js} +1 -1
  98. package/dist/web/assets/{git-commit-horizontal-DQeHsooT.js → git-commit-horizontal-zFSIkPs7.js} +1 -1
  99. package/dist/web/assets/{htmlMode-BXEI-BVY.js → htmlMode-X9UMFkjt.js} +1 -1
  100. package/dist/web/assets/index-BEPmTPIA.js +1 -0
  101. package/dist/web/assets/{index-CGMb_VXm.css → index-ByQIHpc9.css} +1 -1
  102. package/dist/web/assets/{index-D-VK8mST.js → index-UOGdfLzi.js} +1 -1
  103. package/dist/web/assets/{info-DtzDuGLn.js → info-BEJXUqCD.js} +1 -1
  104. package/dist/web/assets/{jsonMode-Dosjh_hK.js → jsonMode-DIsB-j2E.js} +1 -1
  105. package/dist/web/assets/{lspLanguageFeatures-BNe-6FJA.js → lspLanguageFeatures-CmZ17KpA.js} +1 -1
  106. package/dist/web/assets/{minimize-2-DnxKN5oK.js → minimize-2-DumTpFtE.js} +1 -1
  107. package/dist/web/assets/{monaco.contribution-CfF-ajhi.js → monaco.contribution-D6w5PJji.js} +2 -2
  108. package/dist/web/assets/{monaco.contribution-ytyanGyj.js → monaco.contribution-DJ_NmcHu.js} +2 -2
  109. package/dist/web/assets/{monaco.contribution-CnkROzNv.js → monaco.contribution-LZEujgny.js} +2 -2
  110. package/dist/web/assets/{monaco.contribution-Dyns81H2.js → monaco.contribution-YVDfJcG4.js} +2 -2
  111. package/dist/web/assets/{play-B3o6IAQd.js → play-CLFeH7CU.js} +1 -1
  112. package/dist/web/assets/{python-B7zZ_9Z_.js → python-Djbda_qZ.js} +1 -1
  113. package/dist/web/assets/{refresh-cw-DSJZXa8S.js → refresh-cw-B4IpQ_7Q.js} +1 -1
  114. package/dist/web/assets/{save-iC-AXHN6.js → save-BbTHztnA.js} +1 -1
  115. package/dist/web/assets/{square-B2roZTxf.js → square-BJrVbmz6.js} +1 -1
  116. package/dist/web/assets/{toggleHighContrast-CjlV4YHK.js → toggleHighContrast-BopU5W9S.js} +1 -1
  117. package/dist/web/assets/{tsMode-XmKmSq0B.js → tsMode-CH_0_YDX.js} +1 -1
  118. package/dist/web/assets/{upload-BgHXNjfJ.js → upload-UumVeufu.js} +1 -1
  119. package/dist/web/assets/{useLocalAgentSchedules-CVJz0AMr.js → useLocalAgentSchedules-BRa23U7O.js} +1 -1
  120. package/dist/web/assets/{wifi-off-CneL8bDZ.js → wifi-off-BWJWivn6.js} +1 -1
  121. package/dist/web/assets/{workers-CT7VYBR5.js → workers-pTe8RvSI.js} +1 -1
  122. package/dist/web/assets/{yaml-CF8jchCz.js → yaml-DNLASORn.js} +1 -1
  123. package/dist/web/index.html +2 -2
  124. package/docs/command-reference.md +28 -2
  125. package/package.json +7 -5
  126. package/dist/chunks/chunk-P6JLLWMI.js +0 -238
  127. package/dist/web/assets/App-DfiCmBv6.js +0 -173
  128. package/dist/web/assets/GetStartedView-C2ypO0v7.js +0 -1
  129. package/dist/web/assets/LabsRoute-Bw-HD6QC.js +0 -2
  130. package/dist/web/assets/MainPane-k1iII9e9.js +0 -8
  131. package/dist/web/assets/RightChatPanelStack-I2znDCc7.js +0 -1
  132. package/dist/web/assets/ScheduledWorkPage-Bp-t0eVj.js +0 -1
  133. package/dist/web/assets/SettingsView-BRPrJuP5.css +0 -1
  134. package/dist/web/assets/SettingsView-C1xyn1Y4.js +0 -6
  135. package/dist/web/assets/WorkspaceDiffPanel-D9Kp0vFw.js +0 -14
  136. package/dist/web/assets/chevron-up-DD9Tei-Q.js +0 -1
  137. package/dist/web/assets/index-D-WCyNdJ.js +0 -1
@@ -1,7 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
2
  import {
3
- DEFAULT_OPENPOND_CHAT_MODEL,
4
- ProviderCatalogSchema,
5
3
  SandboxAppActionRegistrySchema,
6
4
  createRepo,
7
5
  getAppEnvironment,
@@ -9,10 +7,14 @@ import {
9
7
  listApps,
10
8
  listConfiguredProfiles,
11
9
  loadGlobalConfig,
12
- saveConfig,
13
10
  saveProfileApiKey,
14
- setActiveProfile
15
- } from "./chunk-6G6MDZLM.js";
11
+ setActiveProfile,
12
+ updateGlobalConfig
13
+ } from "./chunk-XA4KBDMY.js";
14
+ import {
15
+ DEFAULT_OPENPOND_CHAT_MODEL,
16
+ ProviderCatalogSchema
17
+ } from "./chunk-4KA25HUP.js";
16
18
  import {
17
19
  DEFAULT_OPENPOND_API_BASE_URL,
18
20
  DEFAULT_OPENPOND_WEB_BASE_URL
@@ -338,38 +340,6 @@ function toAccountState(input) {
338
340
  };
339
341
  }
340
342
 
341
- // ../../packages/runtime/dist/config.js
342
- import { readFileSync } from "node:fs";
343
- import { homedir } from "node:os";
344
- import { join } from "node:path";
345
- function readRawOpenPondConfig() {
346
- try {
347
- const raw = JSON.parse(readFileSync(join(homedir(), ".openpond", "config.json"), "utf8"));
348
- return raw && typeof raw === "object" ? raw : {};
349
- } catch {
350
- return {};
351
- }
352
- }
353
- function mergeRawApiBaseConfig(config) {
354
- const raw = readRawOpenPondConfig();
355
- const rawAccounts = Array.isArray(raw.accounts) ? raw.accounts : [];
356
- const accounts = Array.isArray(config.accounts) ? config.accounts : [];
357
- return {
358
- ...config,
359
- activeProfile: config.activeProfile ?? raw.activeProfile,
360
- apiBaseUrl: config.apiBaseUrl ?? raw.apiBaseUrl,
361
- chatApiBaseUrl: config.chatApiBaseUrl ?? raw.chatApiBaseUrl,
362
- accounts: accounts.map((account) => {
363
- const rawAccount = rawAccounts.find((candidate) => handleEquals(candidate.handle, account.handle) && baseUrlEquals(candidate.baseUrl, account.baseUrl)) ?? rawAccounts.find((candidate) => handleEquals(candidate.handle, account.handle));
364
- return {
365
- ...account,
366
- ...typeof rawAccount?.apiBaseUrl === "string" && rawAccount.apiBaseUrl.trim() ? { apiBaseUrl: rawAccount.apiBaseUrl } : {},
367
- ...typeof rawAccount?.chatApiBaseUrl === "string" && rawAccount.chatApiBaseUrl.trim() ? { chatApiBaseUrl: rawAccount.chatApiBaseUrl } : {}
368
- };
369
- })
370
- };
371
- }
372
-
373
343
  // ../../packages/runtime/dist/account-context.js
374
344
  async function loadProfiles(config) {
375
345
  try {
@@ -379,7 +349,7 @@ async function loadProfiles(config) {
379
349
  }
380
350
  }
381
351
  async function loadOpenPondAccountContext(requestedHandle, requestedBaseUrl) {
382
- const config = mergeRawApiBaseConfig(await loadGlobalConfig().catch(() => ({})));
352
+ const config = await loadGlobalConfig();
383
353
  const profiles = await loadProfiles(config);
384
354
  const account = findActiveAccount(config, requestedHandle, requestedBaseUrl);
385
355
  const token = accountToken(account);
@@ -851,14 +821,14 @@ function streamTextValue(value) {
851
821
  }
852
822
 
853
823
  // ../../packages/runtime/dist/version.js
854
- import { readFileSync as readFileSync2 } from "node:fs";
824
+ import { readFileSync } from "node:fs";
855
825
  var bundledRuntimeVersion;
856
826
  function getBundledRuntimeVersion() {
857
827
  if (bundledRuntimeVersion !== void 0)
858
828
  return bundledRuntimeVersion ?? "openpond-code bundled";
859
829
  try {
860
830
  const packageJsonUrl = new URL("../package.json", import.meta.resolve("openpond"));
861
- const packageJson = JSON.parse(readFileSync2(packageJsonUrl, "utf8"));
831
+ const packageJson = JSON.parse(readFileSync(packageJsonUrl, "utf8"));
862
832
  bundledRuntimeVersion = typeof packageJson.version === "string" ? `openpond-code@${packageJson.version}` : null;
863
833
  } catch {
864
834
  bundledRuntimeVersion = null;
@@ -1172,35 +1142,38 @@ async function removeOpenPondAccount(input) {
1172
1142
  const handle = input.handle.trim();
1173
1143
  if (!handle)
1174
1144
  throw new Error("OpenPond account handle is required.");
1175
- const config = await loadGlobalConfig();
1176
- const accounts = (config.accounts ?? []).map((account2) => ({ ...account2 }));
1177
- const index = findAccountIndex(accounts, handle, input.baseUrl);
1178
- if (index === -1)
1179
- throw new Error(`OpenPond account not found: ${handle}`);
1180
- const account = accounts[index];
1181
- const activeProfile = normalizeActiveProfile(config.activeProfile);
1182
- if (activeProfile && accountMatchesSelector(account, activeProfile)) {
1183
- throw new Error("Switch to another OpenPond account before removing the active account.");
1184
- }
1185
- accounts.splice(index, 1);
1186
- await saveConfig({ ...config, accounts });
1145
+ await updateGlobalConfig((config) => {
1146
+ const accounts = (config.accounts ?? []).map((account2) => ({ ...account2 }));
1147
+ const index = findAccountIndex(accounts, handle, input.baseUrl);
1148
+ if (index === -1)
1149
+ throw new Error(`OpenPond account not found: ${handle}`);
1150
+ const account = accounts[index];
1151
+ const activeProfile = normalizeActiveProfile(config.activeProfile);
1152
+ if (activeProfile && accountMatchesSelector(account, activeProfile)) {
1153
+ throw new Error("Switch to another OpenPond account before removing the active account.");
1154
+ }
1155
+ accounts.splice(index, 1);
1156
+ config.accounts = accounts;
1157
+ });
1187
1158
  return loadOpenPondAccountContext();
1188
1159
  }
1189
1160
 
1190
1161
  // ../../packages/runtime/dist/sign-out-account.js
1191
1162
  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 });
1163
+ let signedOutAccount;
1164
+ await updateGlobalConfig((config) => {
1165
+ const activeProfile = normalizeActiveProfile(config.activeProfile);
1166
+ const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
1167
+ const activeIndex = activeProfile ? accounts.findIndex((account) => accountMatchesSelector(account, activeProfile)) : 0;
1168
+ if (activeIndex < 0 || !accounts[activeIndex]) {
1169
+ throw new Error("No active OpenPond account to log out.");
1170
+ }
1171
+ signedOutAccount = { ...accounts[activeIndex] };
1172
+ delete signedOutAccount.apiKey;
1173
+ delete signedOutAccount.session;
1174
+ accounts[activeIndex] = signedOutAccount;
1175
+ config.accounts = accounts;
1176
+ });
1204
1177
  return loadOpenPondAccountContext(signedOutAccount.handle, signedOutAccount.baseUrl);
1205
1178
  }
1206
1179
 
@@ -1233,32 +1206,31 @@ async function updateOpenPondAccountConfig(input) {
1233
1206
  const handle = input.handle.trim();
1234
1207
  if (!handle)
1235
1208
  throw new Error("OpenPond account handle is required.");
1236
- const config = await loadGlobalConfig();
1237
- const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
1238
- const index = findAccountIndex2(accounts, handle, input.currentBaseUrl);
1239
- if (index === -1)
1240
- throw new Error(`OpenPond account not found: ${handle}`);
1241
- const previousAccount = accounts[index];
1242
- const nextAccount = { ...previousAccount };
1243
- applyOptionalUrl(nextAccount, "baseUrl", input.baseUrl);
1244
- applyOptionalUrl(nextAccount, "apiBaseUrl", input.apiBaseUrl);
1245
- applyOptionalUrl(nextAccount, "chatApiBaseUrl", input.chatApiBaseUrl);
1246
- if (input.environment === null) {
1247
- delete nextAccount.environment;
1248
- } else if (typeof input.environment === "string" && input.environment.trim()) {
1249
- nextAccount.environment = input.environment.trim();
1250
- }
1251
- const duplicateIndex = accounts.findIndex((account, candidateIndex) => candidateIndex !== index && handleEquals(account.handle, nextAccount.handle) && baseUrlEquals(account.baseUrl, nextAccount.baseUrl));
1252
- if (duplicateIndex !== -1) {
1253
- throw new Error("Another OpenPond account already uses that handle and base URL.");
1254
- }
1255
- const activeProfile = normalizeActiveProfile(config.activeProfile);
1256
- const wasActive = Boolean(activeProfile && accountMatchesSelector(previousAccount, activeProfile));
1257
- accounts[index] = nextAccount;
1258
- await saveConfig({
1259
- ...config,
1260
- accounts,
1261
- activeProfile: input.setActive || wasActive ? selectorFromAccount(nextAccount) : config.activeProfile
1209
+ let nextAccount;
1210
+ await updateGlobalConfig((config) => {
1211
+ const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
1212
+ const index = findAccountIndex2(accounts, handle, input.currentBaseUrl);
1213
+ if (index === -1)
1214
+ throw new Error(`OpenPond account not found: ${handle}`);
1215
+ const previousAccount = accounts[index];
1216
+ nextAccount = { ...previousAccount };
1217
+ applyOptionalUrl(nextAccount, "baseUrl", input.baseUrl);
1218
+ applyOptionalUrl(nextAccount, "apiBaseUrl", input.apiBaseUrl);
1219
+ applyOptionalUrl(nextAccount, "chatApiBaseUrl", input.chatApiBaseUrl);
1220
+ if (input.environment === null) {
1221
+ delete nextAccount.environment;
1222
+ } else if (typeof input.environment === "string" && input.environment.trim()) {
1223
+ nextAccount.environment = input.environment.trim();
1224
+ }
1225
+ const duplicateIndex = accounts.findIndex((account, candidateIndex) => candidateIndex !== index && handleEquals(account.handle, nextAccount.handle) && baseUrlEquals(account.baseUrl, nextAccount.baseUrl));
1226
+ if (duplicateIndex !== -1) {
1227
+ throw new Error("Another OpenPond account already uses that handle and base URL.");
1228
+ }
1229
+ const activeProfile = normalizeActiveProfile(config.activeProfile);
1230
+ const wasActive = Boolean(activeProfile && accountMatchesSelector(previousAccount, activeProfile));
1231
+ accounts[index] = nextAccount;
1232
+ config.accounts = accounts;
1233
+ config.activeProfile = input.setActive || wasActive ? selectorFromAccount(nextAccount) : config.activeProfile;
1262
1234
  });
1263
1235
  return loadOpenPondAccountContext(nextAccount.handle, nextAccount.baseUrl);
1264
1236
  }
@@ -372,6 +372,7 @@ var CLI_GLOBAL_OPTION_SCHEMA = {
372
372
  checkUpdate: "boolean",
373
373
  cwd: "string",
374
374
  help: "boolean",
375
+ home: "string",
375
376
  json: "boolean",
376
377
  profile: "string",
377
378
  sandboxApiUrl: "string",
@@ -395,11 +396,23 @@ var PROFILE_SDK_OPTION_SCHEMA = {
395
396
  path: "string"
396
397
  };
397
398
  var CLI_COMMAND_REGISTRY = [
399
+ {
400
+ name: "home",
401
+ usage: "openpond home [--home <directory>]",
402
+ optionSchema: {},
403
+ handler: async () => console.log((await import("./dist-AKYCQNNF.js")).resolveOpenPondHome())
404
+ },
405
+ {
406
+ name: "config",
407
+ usage: "openpond config <get|set|unset|path|validate|schema|doctor|migrate|recover|restart-migration|revisions|replace|effective|trust|untrust|export|backup|restore|collect-orphans|clear-cache> [key] [value] [--home <directory>] [--json]",
408
+ optionSchema: { keyPath: "json", value: "string", file: "string", project: "boolean", revision: "string", expectedRevision: "string", sourceAppHome: "string", sourceConfig: "string", sourceBrowserState: "string", dryRun: "boolean" },
409
+ handler: async ({ options, rest }) => (await import("./configuration-command-NR6JYIUD.js")).runConfigurationCommand(options, rest)
410
+ },
398
411
  {
399
412
  name: "help",
400
413
  usage: "openpond help",
401
414
  optionSchema: {},
402
- handler: async () => (await import("./help-JNGJJFU5.js")).printHelp()
415
+ handler: async () => (await import("./help-J6PZ23IC.js")).printHelp()
403
416
  },
404
417
  {
405
418
  name: "version",
@@ -411,13 +424,13 @@ var CLI_COMMAND_REGISTRY = [
411
424
  name: "check-update",
412
425
  usage: "openpond check-update",
413
426
  optionSchema: {},
414
- handler: async () => (await import("./core-commands-MAN3CSJQ.js")).runCheckUpdate()
427
+ handler: async () => (await import("./core-commands-SWGIOZLW.js")).runCheckUpdate()
415
428
  },
416
429
  {
417
430
  name: "login",
418
431
  usage: "openpond login [--base-url <url>]",
419
432
  optionSchema: CLI_GLOBAL_OPTION_SCHEMA,
420
- handler: async ({ options }) => (await import("./core-commands-MAN3CSJQ.js")).runLogin(options)
433
+ handler: async ({ options }) => (await import("./core-commands-SWGIOZLW.js")).runLogin(options)
421
434
  },
422
435
  {
423
436
  name: "init",
@@ -428,7 +441,7 @@ var CLI_COMMAND_REGISTRY = [
428
441
  path: "string",
429
442
  template: "string"
430
443
  },
431
- handler: async ({ options }) => (await import("./profile-P7HMONTZ.js")).runOpenPondInitCommand(options)
444
+ handler: async ({ options }) => (await import("./profile-Q3HB5MIO.js")).runOpenPondInitCommand(options)
432
445
  },
433
446
  {
434
447
  name: "profile",
@@ -456,13 +469,13 @@ var CLI_COMMAND_REGISTRY = [
456
469
  publishHostedSource: "boolean",
457
470
  teamId: "string"
458
471
  },
459
- handler: async ({ options, rest }) => (await import("./profile-P7HMONTZ.js")).runOpenPondProfileCommand(options, rest)
472
+ handler: async ({ options, rest }) => (await import("./profile-Q3HB5MIO.js")).runOpenPondProfileCommand(options, rest)
460
473
  },
461
474
  {
462
475
  name: "agents",
463
476
  usage: "openpond agents [--json]",
464
477
  optionSchema: { json: "boolean" },
465
- handler: async ({ options, rest }) => (await import("./profile-P7HMONTZ.js")).runOpenPondAgentsCommand(options, rest)
478
+ handler: async ({ options, rest }) => (await import("./profile-Q3HB5MIO.js")).runOpenPondAgentsCommand(options, rest)
466
479
  },
467
480
  {
468
481
  name: "actions",
@@ -495,33 +508,33 @@ var CLI_COMMAND_REGISTRY = [
495
508
  "openpond extension remove <owner/repo> [--json]"
496
509
  ],
497
510
  optionSchema: { all: "boolean", json: "boolean", ref: "string" },
498
- handler: async ({ options, rest }) => (await import("./extension-J3CIEDP4.js")).runOpenPondExtensionCommand(options, rest)
511
+ handler: async ({ options, rest }) => (await import("./extension-HJUJBQAD.js")).runOpenPondExtensionCommand(options, rest)
499
512
  },
500
513
  {
501
514
  name: "profiles",
502
515
  usage: "openpond profiles [args]",
503
516
  optionSchema: { json: "boolean" },
504
- handler: async ({ options, rest }) => (await import("./core-commands-MAN3CSJQ.js")).runProfiles(options, rest)
517
+ handler: async ({ options, rest }) => (await import("./core-commands-SWGIOZLW.js")).runProfiles(options, rest)
505
518
  },
506
519
  {
507
520
  name: "account",
508
521
  usage: "openpond account",
509
522
  optionSchema: { json: "boolean" },
510
- handler: async () => (await import("./core-commands-MAN3CSJQ.js")).runAccount()
523
+ handler: async () => (await import("./core-commands-SWGIOZLW.js")).runAccount()
511
524
  },
512
525
  {
513
526
  name: "health",
514
527
  usage: "openpond health",
515
528
  optionSchema: { json: "boolean" },
516
- handler: async ({ options }) => (await import("./core-commands-MAN3CSJQ.js")).runHealth(options)
529
+ handler: async ({ options }) => (await import("./core-commands-SWGIOZLW.js")).runHealth(options)
517
530
  },
518
531
  {
519
532
  name: "app-server",
520
- usage: "openpond app-server [--store-dir DIR]",
533
+ usage: "openpond app-server [--home DIR]",
521
534
  optionSchema: {
522
- storeDir: "string"
535
+ home: "string"
523
536
  },
524
- handler: async ({ options, rest }) => (await import("./app-layer-XEYHFJHI.js")).runOpenPondServerCommand("app-server", options, rest)
537
+ handler: async ({ options, rest }) => (await import("./app-layer-F3CGXB33.js")).runOpenPondServerCommand("app-server", options, rest)
525
538
  },
526
539
  {
527
540
  name: "serve",
@@ -532,7 +545,7 @@ var CLI_COMMAND_REGISTRY = [
532
545
  listen: "string",
533
546
  port: "integer"
534
547
  },
535
- handler: async ({ options, rest }) => (await import("./app-layer-XEYHFJHI.js")).runOpenPondServerCommand("serve", options, rest)
548
+ handler: async ({ options, rest }) => (await import("./app-layer-F3CGXB33.js")).runOpenPondServerCommand("serve", options, rest)
536
549
  },
537
550
  {
538
551
  name: "ui",
@@ -545,7 +558,7 @@ var CLI_COMMAND_REGISTRY = [
545
558
  port: "integer",
546
559
  webRoot: "string"
547
560
  },
548
- handler: async ({ options, rest }) => (await import("./app-layer-XEYHFJHI.js")).runOpenPondServerCommand("web", options, rest)
561
+ handler: async ({ options, rest }) => (await import("./app-layer-F3CGXB33.js")).runOpenPondServerCommand("web", options, rest)
549
562
  },
550
563
  {
551
564
  name: "tui",
@@ -559,13 +572,13 @@ var CLI_COMMAND_REGISTRY = [
559
572
  provider: "string",
560
573
  server: "string"
561
574
  },
562
- handler: async ({ options, rest }) => (await import("./app-layer-XEYHFJHI.js")).runOpenPondTerminalCommand(options, rest)
575
+ handler: async ({ options, rest }) => (await import("./app-layer-F3CGXB33.js")).runOpenPondTerminalCommand(options, rest)
563
576
  },
564
577
  {
565
578
  name: "chat",
566
579
  usage: "openpond chat (--message-file <path>|--message <text>|--stdin) --non-interactive [--provider <id>] [--model <id>] [--agent <id>] [--project <id>] [--resume <session-id>] [--yes] [--approval-policy <policy>] [--json] [--timeout-sec <n>] [--max-output-bytes <n>] [--sandbox <mode>]",
567
580
  optionSchema: CHAT_OPTION_SCHEMA,
568
- handler: async ({ options, rest }) => (await import("./app-layer-XEYHFJHI.js")).runOpenPondTerminalCommand(options, rest)
581
+ handler: async ({ options, rest }) => (await import("./app-layer-F3CGXB33.js")).runOpenPondTerminalCommand(options, rest)
569
582
  },
570
583
  {
571
584
  name: "tool",
@@ -601,7 +614,7 @@ var CLI_COMMAND_REGISTRY = [
601
614
  name: "sandbox-template",
602
615
  usage: "openpond sandbox-template <command> [args]",
603
616
  optionSchema: SANDBOX_TEMPLATE_OPTION_SCHEMA,
604
- handler: async ({ options, rest }) => (await import("./sandbox-template-S4WRUWJ6.js")).runSandboxTemplateCommand(options, rest)
617
+ handler: async ({ options, rest }) => (await import("./sandbox-template-Z6P7NTNF.js")).runSandboxTemplateCommand(options, rest)
605
618
  },
606
619
  {
607
620
  name: "repo",
@@ -646,13 +659,13 @@ var CLI_COMMAND_REGISTRY = [
646
659
  toolset: "string",
647
660
  url: "string"
648
661
  },
649
- handler: async ({ options, rest }) => (await import("./organizations-MWAPNOCK.js")).runOrganizationsCommand(options, rest)
662
+ handler: async ({ options, rest }) => (await import("./organizations-CPNC47DO.js")).runOrganizationsCommand(options, rest)
650
663
  },
651
664
  {
652
665
  name: "project",
653
666
  usage: "openpond project <list|create|upsert|get|update|sync|source-upload|archive> [args]",
654
667
  optionSchema: PROJECT_OPTION_SCHEMA,
655
- handler: async ({ options, rest }) => (await import("./project-agent-2RAK7GAZ.js")).runProjectCommand(options, rest)
668
+ handler: async ({ options, rest }) => (await import("./project-agent-YHUBX4OR.js")).runProjectCommand(options, rest)
656
669
  },
657
670
  {
658
671
  name: "agent",
@@ -664,7 +677,7 @@ var CLI_COMMAND_REGISTRY = [
664
677
  "openpond agent source publish <agentId> --team-id <id> [--expected-manifest-hash <hash>]"
665
678
  ],
666
679
  optionSchema: AGENT_OPTION_SCHEMA,
667
- handler: async ({ options, rest }) => (await import("./project-agent-2RAK7GAZ.js")).runAgentCommand(options, rest)
680
+ handler: async ({ options, rest }) => (await import("./project-agent-YHUBX4OR.js")).runAgentCommand(options, rest)
668
681
  },
669
682
  {
670
683
  name: "desktop-test",
@@ -685,13 +698,13 @@ var CLI_COMMAND_REGISTRY = [
685
698
  token: "string",
686
699
  tokenFile: "string"
687
700
  },
688
- handler: async ({ options, rest }) => (await import("./desktop-test-OE5SST2W.js")).runDesktopTestCommand(options, rest)
701
+ handler: async ({ options, rest }) => (await import("./desktop-test-QOS7G5NE.js")).runDesktopTestCommand(options, rest)
689
702
  },
690
703
  {
691
704
  name: "sandbox",
692
705
  usage: "openpond sandbox <command> [args]",
693
706
  optionSchema: SANDBOX_OPTION_SCHEMA,
694
- handler: async ({ options, rest }) => (await import("./sandbox-command-G22CPFNK.js")).runSandboxCommand(options, rest)
707
+ handler: async ({ options, rest }) => (await import("./sandbox-command-YFL5QTWX.js")).runSandboxCommand(options, rest)
695
708
  },
696
709
  {
697
710
  name: "continual",
@@ -720,7 +733,7 @@ var CLI_COMMAND_REGISTRY = [
720
733
  seed: "string",
721
734
  semanticSimilarityThreshold: "number"
722
735
  },
723
- handler: async ({ options, rest }) => (await import("./continual-FYDKLCO7.js")).runContinualCommand(options, rest)
736
+ handler: async ({ options, rest }) => (await import("./continual-37CE4LLJ.js")).runContinualCommand(options, rest)
724
737
  },
725
738
  {
726
739
  name: "training",
@@ -760,7 +773,7 @@ var CLI_COMMAND_REGISTRY = [
760
773
  runPreset: "string",
761
774
  yes: "boolean"
762
775
  },
763
- handler: async ({ options, rest }) => (await import("./training-UPVSGDTB.js")).runTrainingCommand(options, rest)
776
+ handler: async ({ options, rest }) => (await import("./training-4XH37UZB.js")).runTrainingCommand(options, rest)
764
777
  },
765
778
  {
766
779
  name: "taskset",
@@ -777,7 +790,7 @@ var CLI_COMMAND_REGISTRY = [
777
790
  model: "string",
778
791
  profile: "string"
779
792
  },
780
- handler: async ({ options, rest }) => (await import("./taskset-BMI7KOWP.js")).runTasksetCommand(options, rest)
793
+ handler: async ({ options, rest }) => (await import("./taskset-2TRZBRRT.js")).runTasksetCommand(options, rest)
781
794
  },
782
795
  {
783
796
  name: "opchat",
@@ -797,7 +810,7 @@ var CLI_COMMAND_REGISTRY = [
797
810
  skipTool: "boolean",
798
811
  stream: "boolean"
799
812
  },
800
- handler: async ({ options, rest }) => (await import("./opchat-6HEQJFLL.js")).runOpChatCommand(options, rest)
813
+ handler: async ({ options, rest }) => (await import("./opchat-ABX5YBAT.js")).runOpChatCommand(options, rest)
801
814
  },
802
815
  {
803
816
  name: "teams-bot",
@@ -806,7 +819,7 @@ var CLI_COMMAND_REGISTRY = [
806
819
  json: "boolean",
807
820
  teamId: "string"
808
821
  },
809
- handler: async ({ options, rest }) => (await import("./teams-bot-5VBYEN7M.js")).runTeamsBotCommand(options, rest)
822
+ handler: async ({ options, rest }) => (await import("./teams-bot-WD33NLH5.js")).runTeamsBotCommand(options, rest)
810
823
  },
811
824
  {
812
825
  name: "apps",
@@ -827,7 +840,7 @@ var CLI_COMMAND_REGISTRY = [
827
840
  name: "opentool",
828
841
  usage: "openpond opentool <init|validate|build> [args]",
829
842
  optionSchema: {},
830
- handler: async ({ rest }) => (await import("./core-commands-MAN3CSJQ.js")).runOpentool(rest)
843
+ handler: async ({ rest }) => (await import("./core-commands-SWGIOZLW.js")).runOpentool(rest)
831
844
  }
832
845
  ];
833
846
  var CLI_COMMAND_BY_NAME = /* @__PURE__ */ new Map();
@@ -899,11 +912,11 @@ function profileSdkAliasDefinitions() {
899
912
  name,
900
913
  usage: `openpond ${name} [args]`,
901
914
  optionSchema: PROFILE_SDK_OPTION_SCHEMA,
902
- handler: async ({ options, rest }) => (await import("./profile-P7HMONTZ.js")).runOpenPondProfileSdkAlias(name, options, rest)
915
+ handler: async ({ options, rest }) => (await import("./profile-Q3HB5MIO.js")).runOpenPondProfileSdkAlias(name, options, rest)
903
916
  }));
904
917
  }
905
918
  async function runToolCommand({ options, rest }) {
906
- const { runToolList, runToolRun } = await import("./core-commands-MAN3CSJQ.js");
919
+ const { runToolList, runToolRun } = await import("./core-commands-SWGIOZLW.js");
907
920
  const subcommand = rest[0];
908
921
  if (subcommand === "list") {
909
922
  const target = rest[1];
@@ -927,8 +940,8 @@ async function runToolCommand({ options, rest }) {
927
940
  throw new Error("usage: tool <list|run> <handle>/<repo> [args]");
928
941
  }
929
942
  async function runBacktestCommand({ options, rest }) {
930
- const { runBacktestRun } = await import("./core-commands-MAN3CSJQ.js");
931
- const { runBacktestEvents, runBacktestGet } = await import("./apps-GSXUDK6V.js");
943
+ const { runBacktestRun } = await import("./core-commands-SWGIOZLW.js");
944
+ const { runBacktestEvents, runBacktestGet } = await import("./apps-L5XCL7QY.js");
932
945
  const subcommand = rest[0] || "run";
933
946
  if (subcommand === "run") {
934
947
  const target = rest[1];
@@ -962,7 +975,7 @@ async function runBacktestCommand({ options, rest }) {
962
975
  throw new Error("usage: backtest <run|events|get> <handle>/<repo> [args]");
963
976
  }
964
977
  async function runDeployCommand({ options, rest }) {
965
- const { runDeployWatch } = await import("./core-commands-MAN3CSJQ.js");
978
+ const { runDeployWatch } = await import("./core-commands-SWGIOZLW.js");
966
979
  const subcommand = rest[0] || "watch";
967
980
  if (subcommand !== "watch") {
968
981
  throw new Error(
@@ -978,7 +991,7 @@ async function runDeployCommand({ options, rest }) {
978
991
  await runDeployWatch(options, target);
979
992
  }
980
993
  async function runTemplateCommand({ options, rest }) {
981
- const { runTemplateBranches, runTemplateStatus, runTemplateUpdate } = await import("./core-commands-MAN3CSJQ.js");
994
+ const { runTemplateBranches, runTemplateStatus, runTemplateUpdate } = await import("./core-commands-SWGIOZLW.js");
982
995
  const subcommand = rest[0] || "status";
983
996
  const target = rest[1];
984
997
  if (!target) {
@@ -1003,7 +1016,7 @@ async function runTemplateCommand({ options, rest }) {
1003
1016
  );
1004
1017
  }
1005
1018
  async function runRepoCommand({ options, rest }) {
1006
- const { runRepoCreate, runRepoPush } = await import("./core-commands-MAN3CSJQ.js");
1019
+ const { runRepoCreate, runRepoPush } = await import("./core-commands-SWGIOZLW.js");
1007
1020
  const subcommand = rest[0] || "create";
1008
1021
  if (subcommand === "create") {
1009
1022
  await runRepoCreate(options, rest.slice(1));
@@ -1030,7 +1043,7 @@ async function runAppsCommand({ options, rest }) {
1030
1043
  runAppsSummary,
1031
1044
  runAppsTools,
1032
1045
  runAppsToolsExecute
1033
- } = await import("./apps-GSXUDK6V.js");
1046
+ } = await import("./apps-L5XCL7QY.js");
1034
1047
  const subcommand = rest[0];
1035
1048
  if (subcommand === "list") {
1036
1049
  await runAppsList(options);
@@ -4,15 +4,17 @@ import {
4
4
  materializeSourceUploadFile,
5
5
  readSourceUploadCache,
6
6
  writeSourceUploadCache
7
- } from "./chunk-J3YDKJFD.js";
7
+ } from "./chunk-3ELF4FXY.js";
8
8
  import {
9
9
  yaml
10
10
  } from "./chunk-X7ZG4TSW.js";
11
11
  import {
12
12
  loadGlobalConfig,
13
- openPondConfigDirectory,
14
13
  saveGlobalConfig
15
- } from "./chunk-D7BO5Y5J.js";
14
+ } from "./chunk-FJ2JGB2N.js";
15
+ import {
16
+ resolveOpenPondHome
17
+ } from "./chunk-ZNQEROWP.js";
16
18
 
17
19
  // ../../packages/cloud/src/profile/profile-setup-gate.ts
18
20
  var OpenPondProfileSetupRequiredError = class extends Error {
@@ -1206,7 +1208,7 @@ function profileConfigEntries(config) {
1206
1208
  }
1207
1209
  var require2 = createRequire(import.meta.url);
1208
1210
  function defaultLocalProfileRepoPath() {
1209
- return path5.join(openPondConfigDirectory(), "profiles", "default-repo");
1211
+ return path5.join(resolveOpenPondHome(), "library", "profiles", "default-repo");
1210
1212
  }
1211
1213
  function emptyProfileState(error = null) {
1212
1214
  return {