openpond 0.0.68 → 0.1.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.
- package/dist/chunks/{actions-command-DLOKFA34.js → actions-command-6N5XWMR6.js} +4 -4
- package/dist/chunks/{app-layer-K7NAOLDL.js → app-layer-XEYHFJHI.js} +7 -7
- package/dist/chunks/app-server-runtime-Y6MW4XCG.js +21 -0
- package/dist/chunks/{apps-5VSVJLM7.js → apps-GSXUDK6V.js} +7 -7
- package/dist/chunks/{chunk-HNY7OSDY.js → chunk-2JABRRNR.js} +1 -1
- package/dist/chunks/{chunk-N6FKRVAT.js → chunk-47EIAYI7.js} +2 -2
- package/dist/chunks/{chunk-7FW2CVYN.js → chunk-4L3ZJS2T.js} +426 -1
- package/dist/chunks/{chunk-OOJP442J.js → chunk-5TKZBMQM.js} +1 -1
- package/dist/chunks/{chunk-OQLYO7TA.js → chunk-6G6MDZLM.js} +1129 -200
- package/dist/chunks/{chunk-HFQHD35D.js → chunk-AN2EYCN3.js} +1 -1
- package/dist/chunks/{chunk-3KLQ52B2.js → chunk-BVY5JYM6.js} +4 -9
- package/dist/chunks/{chunk-KLD7NT5J.js → chunk-CNTM26OW.js} +3 -3
- package/dist/chunks/{chunk-DBHSOTYZ.js → chunk-D7BO5Y5J.js} +3 -24
- package/dist/chunks/chunk-DLQQIWN2.js +648 -0
- package/dist/chunks/{chunk-T55IL3GI.js → chunk-DNXBJZAU.js} +1 -1
- package/dist/chunks/{chunk-TSDVA7QP.js → chunk-EFET7LB7.js} +28 -13
- package/dist/chunks/{chunk-QETF6ILG.js → chunk-FQS2QL5F.js} +359 -841
- package/dist/chunks/{chunk-J2REM7LE.js → chunk-HFPUR4CQ.js} +5 -116
- package/dist/chunks/{chunk-JIEUB6OS.js → chunk-J3YDKJFD.js} +1 -1
- package/dist/chunks/{training-5CPTZRVC.js → chunk-J7PYGDRY.js} +251 -16
- package/dist/chunks/{chunk-JGOP4GCK.js → chunk-JTHL5XJ2.js} +5 -25
- package/dist/chunks/{chunk-NA4L2HQM.js → chunk-N3TGCM7J.js} +94 -36
- package/dist/chunks/{chunk-MUS7KPXK.js → chunk-NTK22KJD.js} +1979 -20
- package/dist/chunks/{chunk-PSGEH4FC.js → chunk-P6JLLWMI.js} +3 -3
- package/dist/chunks/chunk-R3C3MNSI.js +140 -0
- package/dist/chunks/{chunk-WEB37YVJ.js → chunk-TGM5IPYO.js} +31 -3
- package/dist/chunks/{chunk-IG72OKNB.js → chunk-TZWAUV2L.js} +3148 -16564
- package/dist/chunks/{chunk-TBEBLKCQ.js → chunk-WBAZFKC7.js} +3 -3
- package/dist/chunks/{chunk-Z2ZWHU7O.js → chunk-YVCYVDNP.js} +1 -1
- package/dist/chunks/{cli-6WFY2ULA.js → cli-L5VPOV6I.js} +9 -8
- package/dist/chunks/continual-FYDKLCO7.js +803 -0
- package/dist/chunks/{core-commands-HQ3HL34W.js → core-commands-MAN3CSJQ.js} +8 -8
- package/dist/chunks/{desktop-test-RU6SRARQ.js → desktop-test-OE5SST2W.js} +7 -7
- package/dist/chunks/{extension-4KFKWMC4.js → extension-J3CIEDP4.js} +1003 -105
- package/dist/chunks/{help-ZUCPOR22.js → help-JNGJJFU5.js} +1 -1
- package/dist/chunks/{opchat-AZX7SYM7.js → opchat-6HEQJFLL.js} +10 -18
- package/dist/chunks/{organizations-GV6Z7G4J.js → organizations-MWAPNOCK.js} +10 -9
- package/dist/chunks/{profile-TSLGZPUI.js → profile-P7HMONTZ.js} +11 -11
- package/dist/chunks/{project-agent-SHIQZWPY.js → project-agent-2RAK7GAZ.js} +10 -10
- package/dist/chunks/{sandbox-command-TRS66NUT.js → sandbox-command-G22CPFNK.js} +8 -8
- package/dist/chunks/{sandbox-template-RVWXD5O3.js → sandbox-template-S4WRUWJ6.js} +10 -10
- package/dist/chunks/{src-VUJ6EBOU.js → src-A6O6ZGIL.js} +18307 -10584
- package/dist/chunks/{src-Q3BOITLJ.js → src-BKBZ7WLO.js} +6 -5
- package/dist/chunks/taskset-BMI7KOWP.js +66 -0
- package/dist/chunks/{teams-bot-CLCMGBW5.js → teams-bot-5VBYEN7M.js} +7 -7
- package/dist/chunks/training-UPVSGDTB.js +17 -0
- package/dist/chunks/{workspaces-IIPITOCV.js → workspaces-XM5BY3MO.js} +4 -2
- package/dist/cli.js +13 -13
- package/dist/index.js +15 -56
- package/dist/web/assets/App-DfiCmBv6.js +173 -0
- package/dist/web/assets/{AppDialog-sLTPiFGX.js → AppDialog-CSXu5wRu.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-B0NCyY4L.js → AppTerminalPanel-y2bVL2RV.js} +2 -2
- package/dist/web/assets/{AppsView-DyDyktK2.js → AppsView-Bs9pwD2H.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-C-PQxmQa.js → BrowserSidebar-CUgT5V1m.js} +1 -1
- package/dist/web/assets/{CartesianChart-CnerMhTr.js → CartesianChart-DA85hfrP.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-DJEp6dux.js → CollaborationTabs-B8mlPhM3.js} +1 -1
- package/dist/web/assets/{CommandMenu-B5lGz8rG.js → CommandMenu-EwUGCeC_.js} +1 -1
- package/dist/web/assets/{CommunityView-DQJaHBa5.js → CommunityView-IHNq-YJz.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-7hBR2bdV.js → ComposerCreateImproveStrip-qOL2zA26.js} +1 -1
- package/dist/web/assets/{GetStartedView-l1Cz1e7g.js → GetStartedView-C2ypO0v7.js} +1 -1
- package/dist/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/web/assets/LabModelVersionDetailPage-BK0eoUlW.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-jlX5I_D5.js → LabSkillSidebar-CRPb4qBn.js} +1 -1
- package/dist/web/assets/LabsRoute-Bw-HD6QC.js +2 -0
- package/dist/web/assets/LabsRoute-CGFgymTX.css +1 -0
- package/dist/web/assets/MainChatThread-Cu6_UnNE.js +2 -0
- package/dist/web/assets/MainPane-k1iII9e9.js +8 -0
- package/dist/web/assets/MarkdownText-N60tvLug.js +268 -0
- package/dist/web/assets/Messages-CYQFLElK.js +10 -0
- package/dist/web/assets/{NativeSkillSidebar-DaD52aW1.js → NativeSkillSidebar-zbx7WmOk.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-C7X_K5Xl.js → NewExperienceSwitcher-B0zev5Sx.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-NuPVF2Y7.js → NewProjectDialog-lZlzrp-R.js} +1 -1
- package/dist/web/assets/{OutputsPage-Bmof4Tdv.js → OutputsPage-B4zYYUT5.js} +1 -1
- package/dist/web/assets/{ProjectsPage-D7opg6ff.js → ProjectsPage-97wgc84s.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-I2znDCc7.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-D8dAMHcp.js → RightSidebarHomePanel-BUcWVJi-.js} +1 -1
- package/dist/web/assets/ScheduledWorkPage-Bp-t0eVj.js +1 -0
- package/dist/web/assets/SettingsView-C1xyn1Y4.js +6 -0
- package/dist/web/assets/{TeamChatView-DIxvrgai.js → TeamChatView-Fj5_yjVE.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-Cd0Sp9LD.js → TerminalOverlay-D2WBeJvp.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-DACYaOny.js → TrainingCreationPanel-dYW_dh3M.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DBWJW8ZD.js → TrainingDraftPanel-zeJWmmW6.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-B3sbqaUV.js → UsageSettingsSection-B6SBqYuB.js} +2 -2
- package/dist/web/assets/WorkSidebarPanel-BwbWKpOZ.js +1 -0
- package/dist/web/assets/{WorkspaceDiffPanel-CBgPVF1P.js → WorkspaceDiffPanel-D9Kp0vFw.js} +6 -6
- package/dist/web/assets/WorkspaceEnvironmentMenu-D-3YGp06.js +32 -0
- package/dist/web/assets/WorkspaceGitDialogs-BUbzUN4m.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-Db_sWYFt.js → WorkspaceMonacoEditor-CXPY7bBI.js} +3 -3
- package/dist/web/assets/{arrow-up-right-DaIxkG4K.js → arrow-up-right-C7VWgGQP.js} +1 -1
- package/dist/web/assets/{chat-file-links-wORSEipQ.js → chat-file-links-CqfMdhHQ.js} +1 -1
- package/dist/web/assets/chevron-up-DD9Tei-Q.js +1 -0
- package/dist/web/assets/{clipboard-BTRsPPaK.js → clipboard-B-8k7mlT.js} +1 -1
- package/dist/web/assets/{cloud-upload-BYXHJoKd.js → cloud-upload-CUVFzURz.js} +1 -1
- package/dist/web/assets/{cssMode-Be446Wgi.js → cssMode-DYvfmqoL.js} +1 -1
- package/dist/web/assets/{folder-open-KtKTXn4w.js → folder-open-CnbcQIy8.js} +1 -1
- package/dist/web/assets/{folder-plus-9-Xcli22.js → folder-plus-BOaLAKy4.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CmVYsUnh.js → git-commit-horizontal-DQeHsooT.js} +1 -1
- package/dist/web/assets/{htmlMode-DTjTyBB_.js → htmlMode-BXEI-BVY.js} +1 -1
- package/dist/web/assets/index-CGMb_VXm.css +1 -0
- package/dist/web/assets/{index-DqWw2ymf.js → index-D-VK8mST.js} +1 -1
- package/dist/web/assets/index-D-WCyNdJ.js +1 -0
- package/dist/web/assets/{info-BLmP4K0e.js → info-DtzDuGLn.js} +1 -1
- package/dist/web/assets/{jsonMode-Z-2iim-u.js → jsonMode-Dosjh_hK.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-Cr2iCfG2.js → lspLanguageFeatures-BNe-6FJA.js} +1 -1
- package/dist/web/assets/{minimize-2-CWA6iO3r.js → minimize-2-DnxKN5oK.js} +1 -1
- package/dist/web/assets/{monaco.contribution-NtjNqMdv.js → monaco.contribution-CfF-ajhi.js} +2 -2
- package/dist/web/assets/{monaco.contribution-YhqlKmCp.js → monaco.contribution-CnkROzNv.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Cac9eBUk.js → monaco.contribution-Dyns81H2.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BtMcDmCM.js → monaco.contribution-ytyanGyj.js} +2 -2
- package/dist/web/assets/{play-DYSQH2rx.js → play-B3o6IAQd.js} +1 -1
- package/dist/web/assets/{python-CNqOWXNv.js → python-B7zZ_9Z_.js} +1 -1
- package/dist/web/assets/{refresh-cw-DMysDKOA.js → refresh-cw-DSJZXa8S.js} +1 -1
- package/dist/web/assets/{save-HPZ4ZiDi.js → save-iC-AXHN6.js} +1 -1
- package/dist/web/assets/square-B2roZTxf.js +1 -0
- package/dist/web/assets/{toggleHighContrast-Bccdn3Qi.js → toggleHighContrast-CjlV4YHK.js} +1 -1
- package/dist/web/assets/{training-daZlCtKV.css → training-eg6uFi3M.css} +1 -1
- package/dist/web/assets/{tsMode-BhcKJxhG.js → tsMode-XmKmSq0B.js} +1 -1
- package/dist/web/assets/{upload-DE7xaWVj.js → upload-BgHXNjfJ.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-C0J--_MD.js → useLocalAgentSchedules-CVJz0AMr.js} +1 -1
- package/dist/web/assets/{wifi-off-CrCfhll9.js → wifi-off-CneL8bDZ.js} +1 -1
- package/dist/web/assets/{workers-DCaGzukk.js → workers-CT7VYBR5.js} +1 -1
- package/dist/web/assets/{yaml-CCfH63KB.js → yaml-CF8jchCz.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +58 -2
- package/package.json +3 -1
- package/dist/api/vercel-protection.d.ts +0 -1
- package/dist/chunks/app-server-runtime-OFZZIWAB.js +0 -20
- package/dist/chunks/chunk-MLWNI3WG.js +0 -15395
- package/dist/web/assets/App-D7vhbyMO.js +0 -171
- package/dist/web/assets/LabModelVersionDetailPage-D2PfI3-r.js +0 -1
- package/dist/web/assets/LabsRoute-D3w6nPSa.css +0 -1
- package/dist/web/assets/LabsRoute-VOgPrf94.js +0 -2
- package/dist/web/assets/MainChatThread-B1nXTMAf.js +0 -2
- package/dist/web/assets/MainPane-DxVcMBFo.js +0 -6
- package/dist/web/assets/MarkdownText-B3njGyZS.js +0 -9
- package/dist/web/assets/Messages-yBS4UHWl.js +0 -10
- package/dist/web/assets/RightChatPanelStack-BzsNeSwx.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Dkjhof6t.js +0 -1
- package/dist/web/assets/SettingsView-CWTAUy2b.js +0 -6
- package/dist/web/assets/WorkSidebarPanel-D4yXQ64j.js +0 -1
- package/dist/web/assets/WorkspaceEnvironmentMenu-Bp-9V7Jq.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-BxU5Uhpz.js +0 -1
- package/dist/web/assets/activity-BzKyRXbd.js +0 -1
- package/dist/web/assets/chevron-up-C8-qSzck.js +0 -1
- package/dist/web/assets/git-branch-CLGxzDjJ.js +0 -1
- package/dist/web/assets/index-AzqEDIEY.css +0 -1
- package/dist/web/assets/index-C5uP_Gug.js +0 -1
- package/dist/web/assets/square-D-mpY1a-.js +0 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-SMNFI2FU.js";
|
|
7
7
|
import {
|
|
8
8
|
createOpenPondSandboxClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JTHL5XJ2.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_CACHE_TTL_MS,
|
|
12
12
|
SANDBOX_RUNTIME_PROFILE_IDS,
|
|
@@ -15,13 +15,12 @@ import {
|
|
|
15
15
|
getDeploymentLogs,
|
|
16
16
|
getDeploymentStatus,
|
|
17
17
|
listApps,
|
|
18
|
-
listConfiguredProfiles,
|
|
19
18
|
listUserTools,
|
|
20
19
|
loadConfig,
|
|
21
20
|
saveGlobalConfig,
|
|
22
21
|
setCachedApps,
|
|
23
22
|
setCachedTools
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D7BO5Y5J.js";
|
|
25
24
|
import {
|
|
26
25
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
27
26
|
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
@@ -291,71 +290,6 @@ async function promptForPath(defaultPath) {
|
|
|
291
290
|
}
|
|
292
291
|
}
|
|
293
292
|
|
|
294
|
-
// src/cli/common/vercel-protection.ts
|
|
295
|
-
import { spawnSync } from "node:child_process";
|
|
296
|
-
import path from "node:path";
|
|
297
|
-
function ensureStagingVercelProtectionBypass(requestUrl, options = {}) {
|
|
298
|
-
const env = options.env ?? process.env;
|
|
299
|
-
if (env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim()) return true;
|
|
300
|
-
if (!isOpenPondStagingUrl(requestUrl)) return false;
|
|
301
|
-
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
302
|
-
const projectDirectories = candidateProjectDirectories(cwd, env);
|
|
303
|
-
const run = options.run ?? runProtectionCommand;
|
|
304
|
-
const command = process.platform === "win32" ? "vercel.cmd" : "vercel";
|
|
305
|
-
for (const projectDirectory of projectDirectories) {
|
|
306
|
-
const result = run({
|
|
307
|
-
command,
|
|
308
|
-
args: ["project", "protection", "--format", "json"],
|
|
309
|
-
cwd: projectDirectory,
|
|
310
|
-
env
|
|
311
|
-
});
|
|
312
|
-
if (result.status !== 0 || !result.stdout.trim()) continue;
|
|
313
|
-
const secret = vercelProtectionBypassSecret(result.stdout);
|
|
314
|
-
if (!secret) continue;
|
|
315
|
-
env.VERCEL_AUTOMATION_BYPASS_SECRET = secret;
|
|
316
|
-
return true;
|
|
317
|
-
}
|
|
318
|
-
return false;
|
|
319
|
-
}
|
|
320
|
-
function vercelProtectionBypassSecret(rawProtectionJson) {
|
|
321
|
-
try {
|
|
322
|
-
const payload = JSON.parse(rawProtectionJson);
|
|
323
|
-
const entries = Object.entries(payload.protectionBypass ?? {});
|
|
324
|
-
const selected = entries.find(([, metadata]) => metadata?.isEnvVar === true) ?? entries[0];
|
|
325
|
-
return selected?.[0]?.trim() || null;
|
|
326
|
-
} catch {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function isOpenPondStagingUrl(requestUrl) {
|
|
331
|
-
try {
|
|
332
|
-
const hostname = new URL(requestUrl).hostname.toLowerCase();
|
|
333
|
-
return hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai");
|
|
334
|
-
} catch {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function candidateProjectDirectories(cwd, env) {
|
|
339
|
-
const configured = env.OPENPOND_VERCEL_PROJECT_DIR?.trim();
|
|
340
|
-
return [.../* @__PURE__ */ new Set([
|
|
341
|
-
...configured ? [path.resolve(cwd, configured)] : [],
|
|
342
|
-
path.resolve(cwd, "../sandbox"),
|
|
343
|
-
cwd
|
|
344
|
-
])];
|
|
345
|
-
}
|
|
346
|
-
function runProtectionCommand(input3) {
|
|
347
|
-
const result = spawnSync(input3.command, input3.args, {
|
|
348
|
-
cwd: input3.cwd,
|
|
349
|
-
env: input3.env,
|
|
350
|
-
encoding: "utf8",
|
|
351
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
352
|
-
});
|
|
353
|
-
return {
|
|
354
|
-
status: result.status,
|
|
355
|
-
stdout: typeof result.stdout === "string" ? result.stdout : ""
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
|
|
359
293
|
// src/cli/common/sandbox-options.ts
|
|
360
294
|
var SANDBOX_WORKFLOW_MODES = [
|
|
361
295
|
"readonly",
|
|
@@ -374,13 +308,7 @@ var SANDBOX_RUNTIME_PROFILES = [
|
|
|
374
308
|
...SANDBOX_RUNTIME_PROFILE_IDS
|
|
375
309
|
];
|
|
376
310
|
function resolveSandboxBaseUrl(config, options) {
|
|
377
|
-
|
|
378
|
-
if (envName === "staging") {
|
|
379
|
-
return "https://api-new.staging-api.openpond.ai";
|
|
380
|
-
}
|
|
381
|
-
if (envName && envName !== "production") {
|
|
382
|
-
throw new Error("sandbox env must be staging or production");
|
|
383
|
-
}
|
|
311
|
+
void options;
|
|
384
312
|
const base = process.env.OPENPOND_SANDBOX_BASE_URL || process.env.OPENPOND_API_URL || config.apiBaseUrl || mapUiBaseToApiBase(process.env.OPENPOND_BASE_URL || config.baseUrl) || DEFAULT_OPENPOND_API_BASE_URL;
|
|
385
313
|
return base.replace(/\/$/, "");
|
|
386
314
|
}
|
|
@@ -390,52 +318,13 @@ async function resolveSandboxClient(options) {
|
|
|
390
318
|
const apiKey = await ensureApiKey(config, uiBase);
|
|
391
319
|
const sandboxApiUrl = resolveSandboxApiUrlOption(options) || process.env.OPENPOND_SANDBOX_API_URL?.trim() || null;
|
|
392
320
|
const baseUrl = resolveSandboxBaseUrl(config, options);
|
|
393
|
-
ensureStagingVercelProtectionBypass(sandboxApiUrl ?? baseUrl);
|
|
394
321
|
return createOpenPondSandboxClient(
|
|
395
322
|
sandboxApiUrl ? { apiKey, sandboxApiUrl } : { apiKey, baseUrl }
|
|
396
323
|
);
|
|
397
324
|
}
|
|
398
325
|
async function loadSandboxConfig(options) {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
const profiles = await listConfiguredProfiles();
|
|
402
|
-
const requestedAccount = typeof options.account === "string" ? options.account.trim().toLowerCase() : typeof options.profile === "string" ? options.profile.trim().toLowerCase() : "";
|
|
403
|
-
const matches = profiles.filter(
|
|
404
|
-
(profile) => profileMatchesEnvironment(profile, environment) && (!requestedAccount || profile.handle.toLowerCase() === requestedAccount)
|
|
405
|
-
);
|
|
406
|
-
const selected = matches.find((profile) => profile.isActive) ?? (matches.length === 1 ? matches[0] : null);
|
|
407
|
-
if (!selected) {
|
|
408
|
-
throw new Error(
|
|
409
|
-
matches.length === 0 ? `no saved ${environment} OpenPond account found; run openpond login for that environment first` : `multiple saved ${environment} OpenPond accounts found; pass --account and --base-url to select one`
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
return loadConfig({
|
|
413
|
-
account: selected.handle,
|
|
414
|
-
...selected.baseUrl ? { baseUrl: selected.baseUrl } : {}
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
function sandboxEnvironmentOption(options) {
|
|
418
|
-
const value = typeof options.env === "string" ? options.env.trim().toLowerCase() : typeof options.environment === "string" ? options.environment.trim().toLowerCase() : "";
|
|
419
|
-
if (!value) return null;
|
|
420
|
-
if (value !== "production" && value !== "staging") {
|
|
421
|
-
throw new Error("sandbox env must be staging or production");
|
|
422
|
-
}
|
|
423
|
-
return value;
|
|
424
|
-
}
|
|
425
|
-
function profileMatchesEnvironment(profile, environment) {
|
|
426
|
-
const hosts = [profile.baseUrl, profile.apiBaseUrl].flatMap((value) => {
|
|
427
|
-
if (!value) return [];
|
|
428
|
-
try {
|
|
429
|
-
return [new URL(value).hostname.toLowerCase()];
|
|
430
|
-
} catch {
|
|
431
|
-
return [];
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
const isStaging = hosts.some(
|
|
435
|
-
(hostname) => hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai")
|
|
436
|
-
);
|
|
437
|
-
if (environment === "staging") return isStaging;
|
|
438
|
-
return !isStaging && profile.environment?.toLowerCase() === "production";
|
|
326
|
+
void options;
|
|
327
|
+
return loadConfig();
|
|
439
328
|
}
|
|
440
329
|
function parseSandboxWorkflowModeOption(value) {
|
|
441
330
|
if (value === void 0) return void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
writePrivateJsonFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D7BO5Y5J.js";
|
|
5
5
|
|
|
6
6
|
// ../../packages/cloud/src/profile/source-upload-cache.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -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")
|
|
235
|
-
const modelId = optionString(input.options, "model")
|
|
236
|
-
const effort = optionString(input.options, "reasoningEffort")
|
|
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.
|
|
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.
|
|
534
|
+
const result = await input.client.startModelProject(
|
|
306
535
|
input.modelRunId,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
|
|
398
|
-
runTrainingCommand
|
|
630
|
+
DEFAULT_LOCAL_TRAINING_API_URL,
|
|
631
|
+
runTrainingCommand,
|
|
632
|
+
createLocalAuthenticatedRequest,
|
|
633
|
+
TrainingApiClient
|
|
399
634
|
};
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// ../../packages/cloud/dist/api/vercel-protection.js
|
|
4
|
-
var VERCEL_PROTECTION_BYPASS_HEADER = "x-vercel-protection-bypass";
|
|
5
|
-
function withVercelProtectionBypass(requestUrl, inputHeaders, env = typeof process === "undefined" ? {} : process.env) {
|
|
6
|
-
const headers = new Headers(inputHeaders);
|
|
7
|
-
const secret = env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim();
|
|
8
|
-
if (!secret || !isOpenPondStagingUrl(requestUrl))
|
|
9
|
-
return headers;
|
|
10
|
-
headers.set(VERCEL_PROTECTION_BYPASS_HEADER, secret);
|
|
11
|
-
return headers;
|
|
12
|
-
}
|
|
13
|
-
function isOpenPondStagingUrl(requestUrl) {
|
|
14
|
-
try {
|
|
15
|
-
const hostname = new URL(requestUrl).hostname.toLowerCase();
|
|
16
|
-
return hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai");
|
|
17
|
-
} catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
3
|
// ../../packages/cloud/dist/api/core.js
|
|
23
4
|
var DEFAULT_API_TIMEOUT_MS = 3e4;
|
|
24
5
|
var DEFAULT_API_RESPONSE_BYTES = 8 * 1024 * 1024;
|
|
@@ -61,7 +42,7 @@ var OpenPondApiError = class extends Error {
|
|
|
61
42
|
async function apiFetch(baseUrl, token, requestPath, options = {}) {
|
|
62
43
|
const { timeoutMs = DEFAULT_API_TIMEOUT_MS, maxResponseBytes = DEFAULT_API_RESPONSE_BYTES, ...init } = options;
|
|
63
44
|
const requestUrl = `${baseUrl}${requestPath}`;
|
|
64
|
-
const headers =
|
|
45
|
+
const headers = new Headers(init.headers);
|
|
65
46
|
headers.set("Content-Type", "application/json");
|
|
66
47
|
const apiKey = process.env.OPENPOND_API_KEY;
|
|
67
48
|
const trimmedToken = token?.trim() || "";
|
|
@@ -203,7 +184,7 @@ function apiRootUrlFromSandboxApiUrl(sandboxApiUrl) {
|
|
|
203
184
|
return sandboxApiUrl.slice(0, -suffix.length);
|
|
204
185
|
}
|
|
205
186
|
function isOpenPondHostedApiHost(hostname) {
|
|
206
|
-
return hostname === "api.openpond.ai" || hostname
|
|
187
|
+
return hostname === "api.openpond.ai" || hostname.startsWith("api") && hostname.endsWith(".openpond.ai");
|
|
207
188
|
}
|
|
208
189
|
|
|
209
190
|
// ../../packages/cloud/dist/sandbox/client-handles.js
|
|
@@ -1781,14 +1762,14 @@ function requireToken(value) {
|
|
|
1781
1762
|
throw new Error("OpenPond API key is required");
|
|
1782
1763
|
return trimmed;
|
|
1783
1764
|
}
|
|
1784
|
-
function hostedHeaders(
|
|
1765
|
+
function hostedHeaders(token, accept, requestId) {
|
|
1785
1766
|
const headers = new Headers();
|
|
1786
1767
|
headers.set("Authorization", `Bearer ${requireToken(token)}`);
|
|
1787
1768
|
headers.set("Content-Type", "application/json");
|
|
1788
1769
|
headers.set("Accept", accept);
|
|
1789
1770
|
headers.set("x-openpond-client", "openpond-code");
|
|
1790
1771
|
headers.set("x-openpond-request-id", requestId || randomUUID());
|
|
1791
|
-
return
|
|
1772
|
+
return headers;
|
|
1792
1773
|
}
|
|
1793
1774
|
async function readError(response) {
|
|
1794
1775
|
const text = await response.text().catch(() => "");
|
|
@@ -1834,7 +1815,7 @@ async function sendHostedChatTurn(options) {
|
|
|
1834
1815
|
const requestUrl = `${apiBaseUrl}/chat/completions`;
|
|
1835
1816
|
const response = await fetch(requestUrl, {
|
|
1836
1817
|
method: "POST",
|
|
1837
|
-
headers: hostedHeaders(
|
|
1818
|
+
headers: hostedHeaders(options.token, "application/json", options.requestId),
|
|
1838
1819
|
body: JSON.stringify(buildHostedChatBody(options, false)),
|
|
1839
1820
|
signal: options.signal
|
|
1840
1821
|
});
|
|
@@ -1845,7 +1826,6 @@ async function sendHostedChatTurn(options) {
|
|
|
1845
1826
|
}
|
|
1846
1827
|
|
|
1847
1828
|
export {
|
|
1848
|
-
withVercelProtectionBypass,
|
|
1849
1829
|
OpenPondApiError,
|
|
1850
1830
|
apiFetch,
|
|
1851
1831
|
readApiJson,
|