openpond 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cache.d.ts +7 -10
- package/dist/chunks/actions-command-QP3NMDK4.js +2 -0
- package/dist/chunks/app-layer-N7VFRVJ2.js +3 -0
- package/dist/chunks/app-server-runtime-OCLPUI7F.js +2 -0
- package/dist/chunks/apps-AMG75TI4.js +2 -0
- package/dist/chunks/chunk-22UARBPW.js +3 -0
- package/dist/chunks/chunk-3A7HZJNE.js +1 -0
- package/dist/chunks/chunk-3M53YXEI.js +2 -0
- package/dist/chunks/chunk-3NDRIQTI.js +2 -0
- package/dist/chunks/chunk-5BBVEWG3.js +2 -0
- package/dist/chunks/chunk-5O7ZVCMV.js +6 -0
- package/dist/chunks/chunk-6FA3GG5B.js +33 -0
- package/dist/chunks/chunk-6MI4KKWF.js +2 -0
- package/dist/chunks/chunk-BBG546O6.js +6 -0
- package/dist/chunks/chunk-BX4J2VDU.js +2 -0
- package/dist/chunks/chunk-BZMVB3GS.js +2 -0
- package/dist/chunks/chunk-C5LOZSVS.js +2 -0
- package/dist/chunks/chunk-CWQWV2T3.js +2 -0
- package/dist/chunks/chunk-DUA3QP6Y.js +19 -0
- package/dist/chunks/chunk-EAPFMACH.js +10 -0
- package/dist/chunks/chunk-ES2ISFJC.js +66 -0
- package/dist/chunks/chunk-F65NIZLM.js +2199 -0
- package/dist/chunks/chunk-FGJ5LFPL.js +5 -0
- package/dist/chunks/chunk-FTQLQJQV.js +2 -0
- package/dist/chunks/chunk-FY7OQ5RK.js +24 -0
- package/dist/chunks/chunk-FYCJSUFV.js +53 -0
- package/dist/chunks/chunk-GLUWATL5.js +2 -0
- package/dist/chunks/chunk-H7IWJN7L.js +17 -0
- package/dist/chunks/chunk-HZP5U2AA.js +3 -0
- package/dist/chunks/chunk-I5K74TOH.js +3 -0
- package/dist/chunks/chunk-IR3YJWPW.js +7 -0
- package/dist/chunks/chunk-KU7QOHFT.js +2872 -0
- package/dist/chunks/chunk-KV553EWX.js +16 -0
- package/dist/chunks/chunk-MGN6GLNZ.js +2 -0
- package/dist/chunks/chunk-OG5Q6NXK.js +28 -0
- package/dist/chunks/chunk-OGPHXXCD.js +1 -0
- package/dist/chunks/chunk-PI36UHRA.js +18 -0
- package/dist/chunks/chunk-RWSAGQTP.js +2 -0
- package/dist/chunks/chunk-SAE4OIPC.js +2 -0
- package/dist/chunks/chunk-SDO4FC4Q.js +2 -0
- package/dist/chunks/chunk-UKUVMXOW.js +12 -0
- package/dist/chunks/chunk-VCLCFK3O.js +36 -0
- package/dist/chunks/chunk-VYUMTRB3.js +5 -0
- package/dist/chunks/chunk-X37KMV27.js +1 -0
- package/dist/chunks/chunk-XDHAGACI.js +3 -0
- package/dist/chunks/chunk-XEOEKFG6.js +71 -0
- package/dist/chunks/chunk-ZF7TEGY5.js +5 -0
- package/dist/chunks/chunk-ZVOO7FKM.js +2 -0
- package/dist/chunks/cli-M2FG7SSI.js +2 -0
- package/dist/chunks/configuration-command-XBKBIZBO.js +2 -0
- package/dist/chunks/continual-D75WA7E7.js +7 -0
- package/dist/chunks/core-commands-LUZVWXQR.js +2 -0
- package/dist/chunks/database-X2CUV732.js +2 -0
- package/dist/chunks/desktop-test-KGC4JVJ7.js +3 -0
- package/dist/chunks/dist-NKLXFA37.js +2 -0
- package/dist/chunks/extension-NQ7N5LEY.js +5 -0
- package/dist/chunks/help-MWK66XZK.js +8 -0
- package/dist/chunks/module-ES6BEMUI-ZVL3F6NW.js +2 -0
- package/dist/chunks/module-asyncify-2EFITU5U-R7TVXNAE.js +2 -0
- package/dist/chunks/opchat-XJZA3QKZ.js +3 -0
- package/dist/chunks/organizations-UECDFEYE.js +2 -0
- package/dist/chunks/profile-KUMIZURM.js +3 -0
- package/dist/chunks/project-agent-NILMJHLV.js +2 -0
- package/dist/chunks/sandbox-command-QHH65OSE.js +2 -0
- package/dist/chunks/sandbox-template-N7I63PNU.js +10 -0
- package/dist/chunks/src-724HF43W.js +82 -0
- package/dist/chunks/src-VTKTTKQO.js +319 -0
- package/dist/chunks/taskset-PISBOILQ.js +2 -0
- package/dist/chunks/teams-bot-UV4RU53M.js +3 -0
- package/dist/chunks/training-2NDOWH5S.js +2 -0
- package/dist/chunks/workspaces-XXT4KUD3.js +2 -0
- package/dist/cli.js +3 -101
- package/dist/client.d.ts +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/index.js +1 -26305
- package/dist/private-json-file.d.ts +1 -2
- package/dist/sandbox-template/manifest.js +1 -18380
- package/dist/web/assets/App-DxecRQUL.js +176 -0
- package/dist/web/assets/AppDialog-B65Eo3gp.js +1 -0
- package/dist/web/assets/AppTerminalPanel-B2EKQM7W.js +2 -0
- package/dist/web/assets/{AppsView-Ck_OzQWf.js → AppsView-BBoVe7s2.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-CqciX8aL.js → BrowserSidebar-CSM1atSJ.js} +1 -1
- package/dist/web/assets/{CartesianChart-Y0lsL4vC.js → CartesianChart-CJKfXiEG.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-BOb9PjvS.js → CollaborationTabs-BMZamWFC.js} +1 -1
- package/dist/web/assets/{CommandMenu-Co6JnmTu.js → CommandMenu-B3U1z2eo.js} +1 -1
- package/dist/web/assets/{CommunityView-BbTSeL7h.js → CommunityView-CTyRUcfy.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-BGzCWVFp.js → ComposerCreateImproveStrip-D7usvRtK.js} +1 -1
- package/dist/web/assets/GetStartedView-Ibu7oKWJ.js +1 -0
- package/dist/web/assets/HostedModelLearningReview-qnzIkT70.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings--PKjpYsy.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-s9uUN6fV.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-C5oS6UmH.js → LabSkillSidebar-BKYseMiJ.js} +1 -1
- package/dist/web/assets/LabsRoute-C1FWCoYb.css +1 -0
- package/dist/web/assets/LabsRoute-DoRs0K6v.js +32 -0
- package/dist/web/assets/MainChatThread-DvuyMcMB.js +2 -0
- package/dist/web/assets/MainPane-BWwcxgHD.js +8 -0
- package/dist/web/assets/{MarkdownText-DqJarmTh.js → MarkdownText-D8XC5UT_.js} +1 -1
- package/dist/web/assets/{Messages-BaT7HOzB.js → Messages-e4A8JUjD.js} +6 -6
- package/dist/web/assets/{NativeSkillSidebar-DXp8snN5.js → NativeSkillSidebar-D2Joh8XB.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-CLHuGUN5.js → NewExperienceSwitcher-CzGebt2E.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CzpHCAaC.js → NewProjectDialog-CdMTSxUE.js} +1 -1
- package/dist/web/assets/{OutputsPage-DIzx-Ge6.js → OutputsPage-m7cSb8dW.js} +1 -1
- package/dist/web/assets/{ProjectsPage-DojwrhOy.js → ProjectsPage-C9mz8W1g.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-B4LEqKEj.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-DTzfuEX3.js → RightSidebarHomePanel-DOeUsH7h.js} +1 -1
- package/dist/web/assets/ScheduledWorkPage-UXZSSWgA.js +1 -0
- package/dist/web/assets/SettingsView-CAH0vreE.css +1 -0
- package/dist/web/assets/SettingsView-CQm1ai73.js +9 -0
- package/dist/web/assets/TeamChatView-C4haojB7.js +3 -0
- package/dist/web/assets/{TerminalOverlay-DnNVrCtu.js → TerminalOverlay-p2GZsuyQ.js} +3 -3
- package/dist/web/assets/{TrainingCreationPanel-CDwwyucO.js → TrainingCreationPanel-BYJSlO8X.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-BijDnV_0.js → TrainingDraftPanel-DR5KlayH.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-Y5BFAu1p.js → UsageSettingsSection-BQToNXE4.js} +5 -5
- package/dist/web/assets/{WorkSidebarPanel-CkJlvZKm.js → WorkSidebarPanel--EeytWeg.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-BrovSYhn.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-D8knAy1q.js → WorkspaceEnvironmentMenu-l-keRgvj.js} +3 -3
- package/dist/web/assets/{WorkspaceGitDialogs-_LHTrvh6.js → WorkspaceGitDialogs-aicWzaZu.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-B2B7OM_L.js → WorkspaceMonacoEditor-CO_E74jM.js} +36 -36
- package/dist/web/assets/{arrow-up-right-4nAzMtjW.js → arrow-up-right-rwPXNfVn.js} +1 -1
- package/dist/web/assets/chat-file-links-B3jDstSC.js +1 -0
- package/dist/web/assets/chevron-up-D089nvYQ.js +1 -0
- package/dist/web/assets/{clipboard-BzjUoZFo.js → clipboard-DwEExyU4.js} +1 -1
- package/dist/web/assets/{cloud-upload-CsrrwS-b.js → cloud-upload-D2he0-vQ.js} +1 -1
- package/dist/web/assets/{cssMode-CIbSSHKJ.js → cssMode-DS4k0NcI.js} +1 -1
- package/dist/web/assets/{folder-open-vRTuLzpS.js → folder-open-CAOLduKD.js} +1 -1
- package/dist/web/assets/{folder-plus-hyqwgUnx.js → folder-plus-D56MrxVT.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CaxKfeYa.js → git-commit-horizontal-CeNM0oKJ.js} +1 -1
- package/dist/web/assets/{htmlMode-C3MGQGam.js → htmlMode-Xkni5erh.js} +1 -1
- package/dist/web/assets/{index-ByQIHpc9.css → index-BGMzUaup.css} +1 -1
- package/dist/web/assets/{index-Dvq7bpBG.js → index-KwyAyscP.js} +1 -1
- package/dist/web/assets/{info-aYWeE1Iw.js → info-CcrBaEE_.js} +1 -1
- package/dist/web/assets/{jsonMode-CpD6UkT7.js → jsonMode-C4YPbQB7.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DpcK8ZI6.js → lspLanguageFeatures-CF5oMTz6.js} +1 -1
- package/dist/web/assets/{minimize-2-DeYg7XqB.js → minimize-2-DzHQnInk.js} +1 -1
- package/dist/web/assets/{monaco.contribution-CrrdDQgP.js → monaco.contribution-0EN4mGCC.js} +2 -2
- package/dist/web/assets/{monaco.contribution-JWFq0HzV.js → monaco.contribution-B4qcTP0w.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BDTM0ZJq.js → monaco.contribution-CJK_NrBm.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C-_ekTxy.js → monaco.contribution-CkPGKNd-.js} +2 -2
- package/dist/web/assets/{play-BqgRTddV.js → play-p3-AMTPL.js} +1 -1
- package/dist/web/assets/{python-B67wope9.js → python-B0kpTxAZ.js} +1 -1
- package/dist/web/assets/{refresh-cw-DwMA_2On.js → refresh-cw-_jbTIzzr.js} +1 -1
- package/dist/web/assets/{save-B0BKh5oQ.js → save-Cy6hEotx.js} +1 -1
- package/dist/web/assets/{square-LY3oz82L.js → square-DKQkcrOH.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-B2jka5B1.js → toggleHighContrast-Bnk1VVVq.js} +1 -1
- package/dist/web/assets/{tsMode-1MUwluYD.js → tsMode-BDrSVy7V.js} +1 -1
- package/dist/web/assets/{upload-bSKSkFVa.js → upload-COn0my_O.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules--jnnM4Fz.js → useLocalAgentSchedules-iZNB4Oee.js} +1 -1
- package/dist/web/assets/{wifi-off-DA34iPmr.js → wifi-off-Cqt-ZLXY.js} +1 -1
- package/dist/web/assets/{workers-CczIcRcl.js → workers-hu0Ym93h.js} +1 -1
- package/dist/web/assets/{yaml-DwEGoHA9.js → yaml-D-JLDGL6.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +28 -2
- package/package.json +10 -7
- package/dist/chunks/actions-command-6N5XWMR6.js +0 -185
- package/dist/chunks/app-layer-XEYHFJHI.js +0 -214
- package/dist/chunks/app-server-runtime-FJM2EQPH.js +0 -21
- package/dist/chunks/apps-GSXUDK6V.js +0 -427
- package/dist/chunks/chunk-2JABRRNR.js +0 -183
- package/dist/chunks/chunk-47EIAYI7.js +0 -2162
- package/dist/chunks/chunk-4L3ZJS2T.js +0 -1207
- package/dist/chunks/chunk-5TKZBMQM.js +0 -731
- package/dist/chunks/chunk-6G6MDZLM.js +0 -14509
- package/dist/chunks/chunk-BVY5JYM6.js +0 -512
- package/dist/chunks/chunk-C5TKGE5Y.js +0 -1275
- package/dist/chunks/chunk-CNTM26OW.js +0 -602
- package/dist/chunks/chunk-D7BO5Y5J.js +0 -1531
- package/dist/chunks/chunk-DJL4TJYG.js +0 -70
- package/dist/chunks/chunk-DLQQIWN2.js +0 -648
- package/dist/chunks/chunk-DNXBJZAU.js +0 -630
- package/dist/chunks/chunk-EFET7LB7.js +0 -1331
- package/dist/chunks/chunk-FQS2QL5F.js +0 -14522
- package/dist/chunks/chunk-HFPUR4CQ.js +0 -669
- package/dist/chunks/chunk-J3YDKJFD.js +0 -88
- package/dist/chunks/chunk-J7PYGDRY.js +0 -634
- package/dist/chunks/chunk-JTHL5XJ2.js +0 -1838
- package/dist/chunks/chunk-KSRWKXRB.js +0 -12
- package/dist/chunks/chunk-KWDOAJJI.js +0 -238
- package/dist/chunks/chunk-MUMPWI4O.js +0 -92
- package/dist/chunks/chunk-N3TGCM7J.js +0 -1135
- package/dist/chunks/chunk-NTK22KJD.js +0 -10707
- package/dist/chunks/chunk-O6B6YCMI.js +0 -57688
- package/dist/chunks/chunk-R3C3MNSI.js +0 -140
- package/dist/chunks/chunk-SMNFI2FU.js +0 -113
- package/dist/chunks/chunk-UACZUFIA.js +0 -47
- package/dist/chunks/chunk-W5GKHH77.js +0 -168
- package/dist/chunks/chunk-WBAZFKC7.js +0 -1643
- package/dist/chunks/chunk-X7ZG4TSW.js +0 -3063
- package/dist/chunks/chunk-YVCYVDNP.js +0 -746
- package/dist/chunks/cli-6PFRZ2WV.js +0 -21
- package/dist/chunks/continual-FYDKLCO7.js +0 -803
- package/dist/chunks/core-commands-MAN3CSJQ.js +0 -48
- package/dist/chunks/desktop-test-OE5SST2W.js +0 -146
- package/dist/chunks/extension-J3CIEDP4.js +0 -10041
- package/dist/chunks/help-JNGJJFU5.js +0 -67
- package/dist/chunks/opchat-6HEQJFLL.js +0 -167
- package/dist/chunks/organizations-MWAPNOCK.js +0 -804
- package/dist/chunks/profile-P7HMONTZ.js +0 -1134
- package/dist/chunks/project-agent-2RAK7GAZ.js +0 -514
- package/dist/chunks/sandbox-command-G22CPFNK.js +0 -1659
- package/dist/chunks/sandbox-template-S4WRUWJ6.js +0 -1653
- package/dist/chunks/src-BKBZ7WLO.js +0 -3624
- package/dist/chunks/src-RTGN2O4H.js +0 -65745
- package/dist/chunks/taskset-BMI7KOWP.js +0 -66
- package/dist/chunks/teams-bot-5VBYEN7M.js +0 -144
- package/dist/chunks/training-UPVSGDTB.js +0 -17
- package/dist/chunks/workspaces-IJQPWX3H.js +0 -99
- package/dist/web/assets/App-BOkhmdHu.js +0 -173
- package/dist/web/assets/AppDialog-BCjKFUBn.js +0 -1
- package/dist/web/assets/AppTerminalPanel-DRU8GIfy.js +0 -2
- package/dist/web/assets/GetStartedView-jEogFjxP.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-CrudId_1.js +0 -1
- package/dist/web/assets/LabsRoute-9v8qwEBc.js +0 -2
- package/dist/web/assets/LabsRoute-CGFgymTX.css +0 -1
- package/dist/web/assets/MainChatThread-VtMpAxlP.js +0 -2
- package/dist/web/assets/MainPane-BbknUzp3.js +0 -8
- package/dist/web/assets/RightChatPanelStack-CIE5bgmO.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-DdbcQGSv.js +0 -1
- package/dist/web/assets/SettingsView-CC5GXaE1.css +0 -1
- package/dist/web/assets/SettingsView-QT_OLmDh.js +0 -6
- package/dist/web/assets/TeamChatView-C4-nG1tC.js +0 -3
- package/dist/web/assets/WorkspaceDiffPanel-CBgzmBk8.js +0 -14
- package/dist/web/assets/chat-file-links-Bned0MT7.js +0 -1
- package/dist/web/assets/chevron-up-DK7ejCfk.js +0 -1
- package/dist/web/assets/index-66-ohHD5.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{e as D,f as K,g as W}from"./chunk-ZVOO7FKM.js";import{h as $}from"./chunk-UKUVMXOW.js";import{Z as B,ca as L,da as x,ea as U,f as A,fa as C,g as I,ga as M,ha as N,ia as k,j as _,u as T}from"./chunk-CWQWV2T3.js";import{a as O,b as v}from"./chunk-GLUWATL5.js";import{f as y}from"./chunk-3M53YXEI.js";import{a as o}from"./chunk-FTQLQJQV.js";import{stdin as q,stdout as F}from"node:process";import{createInterface as oe}from"node:readline/promises";var ie=`${O}/settings/api-keys`;function se(e){let t=process.env.OPENPOND_API_KEY?.trim();if(t)return t;let n=e.apiKey?.trim();if(n)return n;let r=e.token?.trim();return r&&r.startsWith("opk_")?r:null}o(se,"resolveApiKey");async function ae(){if(!q.isTTY||!F.isTTY)throw new Error("OpenPond API key is required in non-interactive mode. Set OPENPOND_API_KEY or run `openpond login` in a terminal.");console.log("Open the OpenPond UI to create an API key:"),console.log(ie);let e=oe({input:q,output:F});try{let t=(await e.question("Paste your OpenPond API key: ")).trim();if(!t)throw new Error("API key is required");return t.startsWith("opk_")||console.log("warning: API keys usually start with opk_."),t}finally{e.close()}}o(ae,"promptForApiKey");async function H(e,t){let n=se(e);if(n)return n;let r=await ae();return await L({apiKey:r,baseUrl:t,activeProfile:e.activeProfile}),console.log("Saved account credentials to the encrypted OpenPond credential store."),r}o(H,"ensureApiKey");function ve(e){if(e.repoUrl)return e.repoUrl;if(e.gitHost&&e.gitOwner&&e.gitRepo)return`https://${e.gitHost}/${e.gitOwner}/${e.gitRepo}.git`;throw new Error("repoUrl missing from API response")}o(ve,"resolveRepoUrl");function Ae(e,t){let n=new URL(e),r=encodeURIComponent(t);return`${n.protocol}//x-access-token:${r}@${n.host}${n.pathname}`}o(Ae,"formatTokenizedRepoUrl");function Ie(e){let t=new URL(e);return`${t.protocol}//x-access-token:$OPENPOND_API_KEY@${t.host}${t.pathname}`}o(Ie,"formatTokenizedRepoUrlForPrint");function _e(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@")}o(_e,"redactToken");function Te(e){let t=process.env.OPENPOND_BASE_URL;if(t)try{let n=new URL(t).hostname,r=new URL(e).hostname;n&&r&&n!==r&&(console.warn(`warning: repo host (${r}) does not match OPENPOND_BASE_URL (${n})`),console.warn("warning: verify your git host configuration matches OPENPOND_BASE_URL."))}catch{}}o(Te,"warnOnRepoHostMismatch");function Y(e){let t=e.split("/").filter(Boolean);if(t.length!==2)throw new Error("expected <handle>/<repo>");return{handle:t[0],repo:t[1]}}o(Y,"parseHandleRepo");function P(e){return(e||"").trim().toLowerCase()}o(P,"normalizeRepoName");async function ue(e){if(!e.forceRefresh){let n=await U({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:x});if(n)return n}let t=await _(e.apiBase,e.apiKey);return await C({apiBase:e.apiBase,apiKey:e.apiKey,apps:t}),t}o(ue,"fetchAppsWithCache");async function ke(e){if(!e.forceRefresh){let r=await M({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:x});if(r)return r}let t=await T(e.apiBase,e.apiKey),n=Array.isArray(t.tools)?t.tools:[];return await N({apiBase:e.apiBase,apiKey:e.apiKey,tools:n}),n}o(ke,"fetchToolsWithCache");async function De(e,t,n){let{handle:r,repo:s}=Y(n),i=await ue({apiBase:e,apiKey:t}),a=P(s),d=i.find(u=>u.handle&&u.handle!==r?!1:[u.repo,u.gitRepo,u.id].map(P).includes(a));if(!d)throw new Error(`app not found for ${r}/${s}`);return{app:d,handle:r,repo:s}}o(De,"resolveAppTarget");async function Ke(e){let t=e.intervalMs??5e3,n=e.timeoutMs??240*1e3,r=new Set,s=Date.now();for(;Date.now()-s<n;){let a=(await A(e.baseUrl,e.apiKey,e.deploymentId)).filter(u=>!r.has(u.id));for(let u of a)r.add(u.id);for(let u of a)console.log(`${e.prefix}${u.message}`);let d=await I(e.baseUrl,e.apiKey,e.deploymentId);if(d.status==="failed"){console.log(`${e.prefix}deployment failed`);return}if(d.status==="running"||d.status==="deployed"){console.log(`${e.prefix}deployment complete`);return}await new Promise(u=>setTimeout(u,t))}console.log(`${e.prefix}deployment still in progress`)}o(Ke,"pollDeploymentLogs");import{stdin as z,stdout as V}from"node:process";import{createInterface as G}from"node:readline/promises";async function X(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(String(t)));return Buffer.concat(e).toString("utf8").replace(/\r?\n$/,"")}o(X,"readAllStdin");function j(e){return new Promise((t,n)=>{let r=process.stdin,s=process.stderr,i="",a=r.isRaw;function d(){r.off("data",u),r.setRawMode&&r.setRawMode(a),r.pause(),s.write(`
|
|
3
|
+
`)}o(d,"cleanup");function u(p){let f=Buffer.isBuffer(p)?p:Buffer.from(p);for(let c of f){if(c===3){d(),n(new Error("secret prompt cancelled"));return}if(c===13||c===10){d(),t(i);return}if(c===127||c===8){i.length>0&&(i=i.slice(0,-1),s.write("\b \b"));continue}i+=Buffer.from([c]).toString("utf8"),s.write("*")}}o(u,"onData"),s.write(e),r.resume(),r.setRawMode&&r.setRawMode(!0),r.on("data",u)})}o(j,"readMaskedLine");async function Ye(e,t=!1){let n=G({input:z,output:V});try{let r=t?"[Y/n]":"[y/N]",s=(await n.question(`${e} ${r} `)).trim().toLowerCase();return s?s==="y"||s==="yes":t}finally{n.close()}}o(Ye,"promptConfirm");async function ze(e){let t=G({input:z,output:V});try{return(await t.question(`Local path (default: ${e}): `)).trim()||e}finally{t.close()}}o(ze,"promptForPath");var J=["readonly","attempt","feature","rollout","replay","template_build","scheduled_run","patch_only","hotfix","multi_feature_batch"],Z=["none","manual","auto_after_checks"],Q=[...k];function de(e,t){return(process.env.OPENPOND_SANDBOX_BASE_URL||process.env.OPENPOND_API_URL||e.apiBaseUrl||W(process.env.OPENPOND_BASE_URL||e.baseUrl)||v).replace(/\/$/,"")}o(de,"resolveSandboxBaseUrl");async function rt(e){let t=await ce(e),n=K(t),r=await H(t,n),s=D(e)||process.env.OPENPOND_SANDBOX_API_URL?.trim()||null,i=de(t,e);return $(s?{apiKey:r,sandboxApiUrl:s}:{apiKey:r,baseUrl:i})}o(rt,"resolveSandboxClient");async function ce(e){return B()}o(ce,"loadSandboxConfig");function ot(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("workflow-mode must be a non-empty value");let t=e.trim();if(!J.includes(t))throw new Error(`workflow-mode must be one of ${J.join(", ")}`);return t}o(ot,"parseSandboxWorkflowModeOption");function it(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("runtime-promotion-policy must be a non-empty value");let t=e.trim();if(!Z.includes(t))throw new Error(`runtime-promotion-policy must be one of ${Z.join(", ")}`);return t}o(it,"parseSandboxRuntimePromotionPolicyOption");function st(e){if(typeof e!="string"||!e.trim())return;let t=e.trim();if(!Q.includes(t))throw new Error(`runtime-profile-id must be one of ${Q.join(", ")}`);return t}o(st,"parseSandboxRuntimeProfileIdOption");function le(e){let t=ee(e.envRef,"env-ref").map(({name:i,value:a})=>({name:i,secretRef:a})),n=ee(e.envLiteral,"env-literal").map(({name:i,value:a})=>{if(fe(i)&&!y(e.allowPlainSecretEnv))throw new Error(`refusing plaintext value for secret-like env ${i}; create a sandbox secret and pass --env-ref ${i}=openpond://secret/...`);return{name:i,value:a}}),r=[...t,...n],s=new Set;for(let i of r){if(s.has(i.name))throw new Error(`duplicate sandbox env var: ${i.name}`);s.add(i.name)}return r}o(le,"parseSandboxEnvOptions");function at(e,t){let n=le(t),r=new Set(n.map(a=>a.name)),s=new Map(n.map(a=>[a.name,a]));for(let a of e.inputs.env)if(s.get(a.name)?.value!==void 0&&a.secret!==!1)throw new Error(`sandbox template env ${a.name} requires a secret ref. Pass --env-ref ${a.name}=openpond://secret/...`);let i=e.inputs.env.filter(a=>a.required&&!r.has(a.name)).map(a=>a.name);if(i.length>0)throw new Error(`missing required sandbox template env refs: ${i.join(", ")}. Pass --env-ref NAME=openpond://secret/...`);return n}o(at,"parseSandboxTemplateEnvOptions");function ee(e,t){return typeof e!="string"?[]:e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>{let r=n.indexOf("=");if(r<=0)throw new Error(`${t} entries must use NAME=value`);let s=n.slice(0,r).trim(),i=n.slice(r+1).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(s))throw new Error(`${t} has invalid env name: ${s}`);if(!i)throw new Error(`${t} value is required for ${s}`);return{name:s,value:i}})}o(ee,"parseSandboxEnvAssignments");function fe(e){return/(?:SECRET|TOKEN|KEY|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|DATABASE_URL|DSN)/i.test(e)}o(fe,"isSecretLikeEnvName");async function ut(e,t){if(typeof e.value=="string"||typeof e.secretValue=="string")throw new Error("sandbox secret values must be provided with --stdin or the masked prompt");if(y(e.stdin)){let s=await X();if(!s)throw new Error(`${t} read no secret value from stdin`);return s}if(!process.stdin.isTTY)throw new Error(`${t} requires --stdin when not running in a TTY`);let r=await j(`${t}: `);if(!r)throw new Error(`${t} cannot be empty`);return r}o(ut,"readSandboxSecretValue");function dt(e){return{id:e.id,teamId:e.teamId,name:e.name,scope:e.scope,status:e.status,secretRef:e.secretRef,currentVersion:e.currentVersion,updatedAt:e.updatedAt,lastUsedAt:e.lastUsedAt,attachedDestinations:e.attachments?.length??0}}o(dt,"summarizeSandboxSecret");import{Buffer as S}from"node:buffer";import{spawn as re}from"node:child_process";var pe=600*1e3,me=2*1024*1024;function b(e,t=[],n={}){return n.inherit&&n.terminateWhenStdoutIncludes!==void 0?Promise.reject(new Error("terminateWhenStdoutIncludes requires captured stdout")):n.terminateWhenStdoutIncludes===""?Promise.reject(new Error("terminateWhenStdoutIncludes must not be empty")):new Promise((r,s)=>{let i=re(e,t,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:void 0,shell:n.shell,detached:n.detached??process.platform!=="win32",stdio:n.inherit?"inherit":[n.stdin===void 0?"ignore":"pipe","pipe","pipe"]}),a=new h(te(n)),d=new h(te(n)),u=!1,p=n.timeoutMs??pe,f,c,w=null,g=!1,R=o(()=>{f&&clearTimeout(f),c&&clearTimeout(c)},"clearTimers"),E=o(l=>{w!==null||g||(w=l,u=l==="timeout",f&&(clearTimeout(f),f=void 0),ne(i.pid,"SIGTERM"),c=setTimeout(()=>{i.exitCode===null&&i.signalCode===null&&ne(i.pid,"SIGKILL")},5e3))},"requestTermination");p>0&&(f=setTimeout(()=>{E("timeout")},p)),n.inherit||(i.stdout?.on("data",l=>{a.append(l);let m=n.terminateWhenStdoutIncludes;m!==void 0&&a.text().includes(m)&&E("output")}),i.stderr?.on("data",l=>{d.append(l)})),i.on("error",l=>{R(),g=!0,s(l)}),i.on("close",(l,m)=>{g||(g=!0,R(),r({code:l,signal:m,terminationReason:w??(m?"signal":"exit"),stdout:a.text(),stderr:d.text(),timedOut:u,stdoutTruncated:a.truncated,stderrTruncated:d.truncated}))}),n.stdin!==void 0&&i.stdin?.end(n.stdin)})}o(b,"runProcessCommand");var h=class{static{o(this,"BoundedOutput")}#t=[];#n;#e=0;truncated=!1;constructor(t){this.#n=t}append(t){let n=S.isBuffer(t)?t:S.from(t),r=this.#n-this.#e;if(r<=0){n.byteLength>0&&(this.truncated=!0);return}if(n.byteLength<=r){this.#t.push(n),this.#e+=n.byteLength;return}this.#t.push(n.subarray(0,r)),this.#e+=r,this.truncated=!0}text(){let t=S.concat(this.#t,this.#e).toString("utf8");return this.truncated?`${t}
|
|
4
|
+
[truncated after ${this.#n} bytes]
|
|
5
|
+
`:t}};function te(e){let t=e.maxOutputBytes??me;return Math.max(0,Math.floor(t))}o(te,"maxOutputBytes");function ne(e,t){if(e){if(process.platform==="win32"){let n=["/PID",String(e),"/T"];t==="SIGKILL"&&n.push("/F"),re("taskkill",n,{stdio:"ignore",windowsHide:!0}).unref();return}try{process.kill(-e,t)}catch(n){if(n.code!=="ESRCH")throw n}}}o(ne,"terminateProcessTree");async function ge(e,t,n={}){return b(e,t,{cwd:n.cwd,inherit:n.inherit,timeoutMs:n.timeoutMs,maxOutputBytes:n.maxOutputBytes,terminateWhenStdoutIncludes:n.terminateWhenStdoutIncludes})}o(ge,"runCommand");async function xt(e,t={}){let n=t.timeoutSeconds===void 0?void 0:t.timeoutSeconds*1e3;return b(e,[],{cwd:t.cwd,env:t.env,shell:!0,inherit:t.inherit,timeoutMs:n,maxOutputBytes:t.maxOutputBytes})}o(xt,"runShellCommand");async function Pt(e,t){let n=await ge("git",["remote","get-url",t],{cwd:e});if(n.code!==0)return null;let r=n.stdout.trim();return r.length>0?r:null}o(Pt,"getGitRemoteUrl");export{se as a,ae as b,H as c,ve as d,Ae as e,Ie as f,_e as g,Te as h,P as i,ue as j,ke as k,De as l,Ke as m,Ye as n,ze as o,rt as p,ot as q,it as r,st as s,le as t,at as u,ut as v,dt as w,b as x,ge as y,xt as z,Pt as A};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a,b)=>e(a,"name",{value:b,configurable:!0}),n=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var o=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}},p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var q=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d,q as e};
|