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
package/README.md CHANGED
@@ -10,7 +10,7 @@ Launch the complete local web app without installing it globally:
10
10
  npx openpond@latest
11
11
  ```
12
12
 
13
- The command starts a local OpenPond server, passes its authenticated URL directly to your system browser, and stays attached until you press `Ctrl+C`. Application state persists under `~/.openpond/openpond-app`; the directory where you invoke the command is not modified. npm maintains its own package cache separately.
13
+ The command starts a local OpenPond server, passes its authenticated URL directly to your system browser, and stays attached until you press `Ctrl+C`. Application state persists under `~/.openpond`; the directory where you invoke the command is not modified. npm maintains its own package cache separately.
14
14
 
15
15
  Node.js 24.18 or newer in the Node 24 release line is required. Other installation and launch forms remain available:
16
16
 
@@ -28,7 +28,7 @@ openpond tui
28
28
  curl -fsSL https://openpond.ai/install.sh | bash
29
29
  ```
30
30
 
31
- Login (stores key in `~/.openpond/config.json`):
31
+ Login (stores authentication in the encrypted home vault):
32
32
 
33
33
  ```bash
34
34
  openpond login
@@ -83,9 +83,9 @@ Global account selection:
83
83
 
84
84
  Command reference:
85
85
 
86
- - `openpond login`: prompt for API key and save to `~/.openpond/config.json`.
86
+ - `openpond login`: prompt for an API key and save it in the encrypted home vault.
87
87
  - `openpond login --api-key <key>`: save the API key without prompting.
88
- - `openpond profiles list`: list redacted local profiles from `~/.openpond/config.json`.
88
+ - `openpond profiles list`: list redacted local accounts from the shared home configuration.
89
89
  - `openpond profiles use <name> [--base-url <url>]`: switch the active local profile.
90
90
  - `openpond profiles save <name> --api-key <key> [--base-url <url>] [--environment <name>]`: save or update a local profile API key.
91
91
  - `openpond account`: fetch current account/profile fields and active products for the selected API key.
package/dist/cache.d.ts CHANGED
@@ -1,22 +1,19 @@
1
1
  import type { AppListItem } from "./api.js";
2
2
  export declare const DEFAULT_CACHE_TTL_MS: number;
3
- export declare function getCachedApps(params: {
3
+ type CacheScope = {
4
4
  apiBase: string;
5
5
  apiKey: string;
6
+ };
7
+ export declare function getCachedApps(params: CacheScope & {
6
8
  ttlMs?: number;
7
9
  }): Promise<AppListItem[] | null>;
8
- export declare function setCachedApps(params: {
9
- apiBase: string;
10
- apiKey: string;
10
+ export declare function setCachedApps(params: CacheScope & {
11
11
  apps: AppListItem[];
12
12
  }): Promise<void>;
13
- export declare function getCachedTools(params: {
14
- apiBase: string;
15
- apiKey: string;
13
+ export declare function getCachedTools(params: CacheScope & {
16
14
  ttlMs?: number;
17
15
  }): Promise<unknown[] | null>;
18
- export declare function setCachedTools(params: {
19
- apiBase: string;
20
- apiKey: string;
16
+ export declare function setCachedTools(params: CacheScope & {
21
17
  tools: unknown[];
22
18
  }): Promise<void>;
19
+ export {};
@@ -1,16 +1,18 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
2
  import {
3
3
  runProcessCommand
4
- } from "./chunk-HFPUR4CQ.js";
4
+ } from "./chunk-3VEYNDHN.js";
5
+ import "./chunk-FJ2JGB2N.js";
6
+ import "./chunk-SMNFI2FU.js";
7
+ import "./chunk-KSRWKXRB.js";
5
8
  import {
6
9
  CliUsageError
7
- } from "./chunk-2JABRRNR.js";
8
- import "./chunk-SMNFI2FU.js";
9
- import "./chunk-N3TGCM7J.js";
10
+ } from "./chunk-PS37DB5F.js";
11
+ import "./chunk-4KA25HUP.js";
12
+ import "./chunk-ZNQEROWP.js";
13
+ import "./chunk-7RIGZB7N.js";
10
14
  import "./chunk-4L3ZJS2T.js";
11
15
  import "./chunk-JTHL5XJ2.js";
12
- import "./chunk-D7BO5Y5J.js";
13
- import "./chunk-KSRWKXRB.js";
14
16
  import "./chunk-FQS2QL5F.js";
15
17
  import "./chunk-MUMPWI4O.js";
16
18
  import "./chunk-UACZUFIA.js";
@@ -158,7 +160,7 @@ function isCompiledExecutable() {
158
160
  return Boolean(argvEntry && path.resolve(argvEntry) === path.resolve(process.execPath));
159
161
  }
160
162
  function forwardedOptions(options) {
161
- const ignored = /* @__PURE__ */ new Set(["account", "handle", "baseUrl", "noOpen", "tui"]);
163
+ const ignored = /* @__PURE__ */ new Set(["account", "handle", "baseUrl", "noOpen", "tui", "home"]);
162
164
  const args = [];
163
165
  for (const [key, value] of Object.entries(options)) {
164
166
  if (ignored.has(key)) continue;
@@ -2,16 +2,18 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
2
2
  import {
3
3
  APP_SERVER_COMPOSITION,
4
4
  createOpenPondAppServer
5
- } from "./chunk-TZWAUV2L.js";
6
- import "./chunk-TGM5IPYO.js";
7
- import "./chunk-5TKZBMQM.js";
8
- import "./chunk-AN2EYCN3.js";
9
- import "./chunk-EFET7LB7.js";
10
- import "./chunk-6G6MDZLM.js";
11
- import "./chunk-DLQQIWN2.js";
5
+ } from "./chunk-VT6BLHMB.js";
6
+ import "./chunk-UZMVNKXM.js";
7
+ import "./chunk-X6F4LBTQ.js";
8
+ import "./chunk-6SMNG6YA.js";
9
+ import "./chunk-KCRCIQPD.js";
10
+ import "./chunk-XA4KBDMY.js";
12
11
  import "./chunk-NTK22KJD.js";
13
12
  import "./chunk-R3C3MNSI.js";
14
13
  import "./chunk-X7ZG4TSW.js";
14
+ import "./chunk-4KA25HUP.js";
15
+ import "./chunk-ZNQEROWP.js";
16
+ import "./chunk-DLQQIWN2.js";
15
17
  import "./chunk-JTHL5XJ2.js";
16
18
  import "./chunk-FQS2QL5F.js";
17
19
  import "./chunk-UACZUFIA.js";
@@ -10,15 +10,7 @@ import {
10
10
  normalizeRepoName,
11
11
  pollDeploymentLogs,
12
12
  resolveAppTarget
13
- } from "./chunk-HFPUR4CQ.js";
14
- import "./chunk-2JABRRNR.js";
15
- import {
16
- resolveBaseUrl,
17
- resolvePublicApiBaseUrl
18
- } from "./chunk-SMNFI2FU.js";
19
- import "./chunk-N3TGCM7J.js";
20
- import "./chunk-4L3ZJS2T.js";
21
- import "./chunk-JTHL5XJ2.js";
13
+ } from "./chunk-3VEYNDHN.js";
22
14
  import {
23
15
  createAgentFromPrompt,
24
16
  deployApp,
@@ -32,8 +24,18 @@ import {
32
24
  submitBacktestTx,
33
25
  updateAppCodeVisibility,
34
26
  updateAppEnvironment
35
- } from "./chunk-D7BO5Y5J.js";
27
+ } from "./chunk-FJ2JGB2N.js";
28
+ import {
29
+ resolveBaseUrl,
30
+ resolvePublicApiBaseUrl
31
+ } from "./chunk-SMNFI2FU.js";
36
32
  import "./chunk-KSRWKXRB.js";
33
+ import "./chunk-PS37DB5F.js";
34
+ import "./chunk-4KA25HUP.js";
35
+ import "./chunk-ZNQEROWP.js";
36
+ import "./chunk-7RIGZB7N.js";
37
+ import "./chunk-4L3ZJS2T.js";
38
+ import "./chunk-JTHL5XJ2.js";
37
39
  import "./chunk-FQS2QL5F.js";
38
40
  import {
39
41
  parseBooleanOption,
@@ -116,7 +116,7 @@ async function createLocalAuthenticatedRequest(baseUrl) {
116
116
  if (url.protocol !== "http:" || !["127.0.0.1", "localhost", "::1"].includes(url.hostname)) {
117
117
  return fetch;
118
118
  }
119
- const appHome = process.env.OPENPOND_APP_HOME?.trim() || path.join(os.homedir(), ".openpond", "openpond-app");
119
+ const appHome = process.env.OPENPOND_HOME?.trim() || path.join(os.homedir(), ".openpond", "openpond-app");
120
120
  const token = (await readFile(path.join(appHome, "token"), "utf8")).trim();
121
121
  if (!token) {
122
122
  throw new Error("OpenPond local capability token is empty.");
@@ -4,7 +4,7 @@ import {
4
4
  parseSandboxRuntimeProfileIdOption,
5
5
  parseSandboxRuntimePromotionPolicyOption,
6
6
  parseSandboxWorkflowModeOption
7
- } from "./chunk-HFPUR4CQ.js";
7
+ } from "./chunk-3VEYNDHN.js";
8
8
  import {
9
9
  parseBooleanOption,
10
10
  parseCsvOption,
@@ -1,7 +1,11 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
2
  import {
3
- writePrivateJsonFile
4
- } from "./chunk-D7BO5Y5J.js";
3
+ readCache,
4
+ writeCache
5
+ } from "./chunk-4KA25HUP.js";
6
+ import {
7
+ resolveOpenPondHome
8
+ } from "./chunk-ZNQEROWP.js";
5
9
 
6
10
  // ../../packages/cloud/src/profile/source-upload-cache.ts
7
11
  import { createHash } from "node:crypto";
@@ -11,8 +15,9 @@ var SOURCE_UPLOAD_CACHE_PATH = ".openpond/source-upload-cache.json";
11
15
  var SOURCE_UPLOAD_CACHE_SCHEMA = "openpond.source-upload-cache.v1";
12
16
  async function readSourceUploadCache(rootPath) {
13
17
  try {
14
- const raw = await readFile(path.join(rootPath, SOURCE_UPLOAD_CACHE_PATH), "utf8");
15
- const parsed = JSON.parse(raw);
18
+ const stored = await readCache(resolveOpenPondHome(), "source-upload.v1", sourceScope(rootPath));
19
+ const parsed = stored?.payload;
20
+ if (!parsed) return /* @__PURE__ */ new Map();
16
21
  if (parsed.schema !== SOURCE_UPLOAD_CACHE_SCHEMA || !parsed.entries) {
17
22
  return /* @__PURE__ */ new Map();
18
23
  }
@@ -27,9 +32,11 @@ async function readSourceUploadCache(rootPath) {
27
32
  }
28
33
  }
29
34
  async function materializeSourceUploadFile(file, cache) {
30
- const cacheKey = cacheKeyForFile(file);
35
+ const contents = await readFile(file.absolutePath);
36
+ const sha256 = createHash("sha256").update(contents).digest("hex");
37
+ const cacheKey = cacheKeyForFile({ ...file, sha256 });
31
38
  const cached = cache.get(cacheKey);
32
- if (cached) {
39
+ if (cached && cached.sha256 === sha256 && createHash("sha256").update(Buffer.from(cached.contentsBase64, "base64")).digest("hex") === sha256) {
33
40
  return {
34
41
  file,
35
42
  entry: {
@@ -40,7 +47,6 @@ async function materializeSourceUploadFile(file, cache) {
40
47
  sha256: cached.sha256
41
48
  };
42
49
  }
43
- const contents = await readFile(file.absolutePath);
44
50
  return {
45
51
  file,
46
52
  entry: {
@@ -48,7 +54,7 @@ async function materializeSourceUploadFile(file, cache) {
48
54
  type: "file",
49
55
  contentsBase64: contents.toString("base64")
50
56
  },
51
- sha256: createHash("sha256").update(contents).digest("hex")
57
+ sha256
52
58
  };
53
59
  }
54
60
  async function writeSourceUploadCache(rootPath, files) {
@@ -64,21 +70,23 @@ async function writeSourceUploadCache(rootPath, files) {
64
70
  };
65
71
  entries[cacheKeyForFile(cacheEntry)] = cacheEntry;
66
72
  }
67
- const cachePath = path.join(rootPath, SOURCE_UPLOAD_CACHE_PATH);
68
- await writePrivateJsonFile(cachePath, {
73
+ await writeCache(resolveOpenPondHome(), "source-upload.v1", sourceScope(rootPath), {
69
74
  schema: SOURCE_UPLOAD_CACHE_SCHEMA,
70
75
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
71
76
  entries
72
77
  });
73
78
  }
74
79
  function cacheKeyForFile(input) {
75
- return `${input.path}\0${input.size}\0${input.mtimeMs}\0${input.ctimeMs}`;
80
+ return `${input.path}\0${input.sha256}`;
76
81
  }
77
82
  function isCacheEntry(value) {
78
83
  if (!value || typeof value !== "object" || Array.isArray(value)) return false;
79
84
  const record = value;
80
85
  return typeof record.path === "string" && typeof record.size === "number" && typeof record.mtimeMs === "number" && typeof record.ctimeMs === "number" && typeof record.sha256 === "string" && typeof record.contentsBase64 === "string";
81
86
  }
87
+ function sourceScope(rootPath) {
88
+ return createHash("sha256").update(path.resolve(rootPath)).digest("hex");
89
+ }
82
90
 
83
91
  export {
84
92
  SOURCE_UPLOAD_CACHE_PATH,
@@ -1,12 +1,4 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import {
3
- mapUiBaseToApiBase,
4
- resolveBaseUrl,
5
- resolveSandboxApiUrlOption
6
- } from "./chunk-SMNFI2FU.js";
7
- import {
8
- createOpenPondSandboxClient
9
- } from "./chunk-JTHL5XJ2.js";
10
2
  import {
11
3
  DEFAULT_CACHE_TTL_MS,
12
4
  SANDBOX_RUNTIME_PROFILE_IDS,
@@ -20,11 +12,19 @@ import {
20
12
  saveGlobalConfig,
21
13
  setCachedApps,
22
14
  setCachedTools
23
- } from "./chunk-D7BO5Y5J.js";
15
+ } from "./chunk-FJ2JGB2N.js";
16
+ import {
17
+ mapUiBaseToApiBase,
18
+ resolveBaseUrl,
19
+ resolveSandboxApiUrlOption
20
+ } from "./chunk-SMNFI2FU.js";
24
21
  import {
25
22
  DEFAULT_OPENPOND_API_BASE_URL,
26
23
  DEFAULT_OPENPOND_WEB_BASE_URL
27
24
  } from "./chunk-KSRWKXRB.js";
25
+ import {
26
+ createOpenPondSandboxClient
27
+ } from "./chunk-JTHL5XJ2.js";
28
28
  import {
29
29
  parseBooleanOption
30
30
  } from "./chunk-MUMPWI4O.js";
@@ -73,7 +73,7 @@ async function ensureApiKey(config, baseUrl) {
73
73
  baseUrl,
74
74
  activeProfile: config.activeProfile
75
75
  });
76
- console.log("saved api key to ~/.openpond/config.json");
76
+ console.log("Saved account credentials to the encrypted OpenPond credential store.");
77
77
  return apiKey;
78
78
  }
79
79