openpond 0.2.18 → 0.2.19
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/app-server.js +1 -1
- package/dist/chunks/{app-layer-CFIW5CWC.js → app-layer-LMB3B4TY.js} +1 -1
- package/dist/chunks/{app-server-runtime-HD5JPAPM.js → app-server-runtime-IILK75PB.js} +1 -1
- package/dist/chunks/{apps-67PSSK6Q.js → apps-2MNOKPO2.js} +1 -1
- package/dist/chunks/{chunk-VL3RGI55.js → chunk-CUB5BQIQ.js} +2 -2
- package/dist/chunks/{chunk-MACBJI6D.js → chunk-E764DRA6.js} +1 -1
- package/dist/chunks/{chunk-JKE45L33.js → chunk-GWDPEBFV.js} +1 -1
- package/dist/chunks/{chunk-AH2O6IVI.js → chunk-HKYGCUA6.js} +1 -1
- package/dist/chunks/{chunk-SKKAWYCQ.js → chunk-IGRYR3PT.js} +1 -1
- package/dist/chunks/{chunk-PGTNQ3XD.js → chunk-L32JRSK7.js} +4 -4
- package/dist/chunks/{chunk-PRA6LX2G.js → chunk-M3FDHTJ2.js} +1 -1
- package/dist/chunks/{chunk-N3KS3AJK.js → chunk-P7EHGAOW.js} +1 -1
- package/dist/chunks/{chunk-4S5RDPKU.js → chunk-U2AWYZZC.js} +1 -1
- package/dist/chunks/{cli-FKNLUIZM.js → cli-EQJBPK7F.js} +1 -1
- package/dist/chunks/{configuration-command-D66B4TXT.js → configuration-command-DSNTY5II.js} +1 -1
- package/dist/chunks/{core-commands-D6OHIVUG.js → core-commands-IDPOMDVM.js} +1 -1
- package/dist/chunks/{desktop-test-RBRWSLEM.js → desktop-test-VNGOXPKF.js} +1 -1
- package/dist/chunks/{extension-MP3XCX56.js → extension-A5RB7I6T.js} +1 -1
- package/dist/chunks/{help-XVBIPQHN.js → help-46NAZU6H.js} +1 -1
- package/dist/chunks/{opchat-NYSALH7B.js → opchat-2VPS674O.js} +1 -1
- package/dist/chunks/{organizations-ZCQX3SY3.js → organizations-H4HZDRYM.js} +1 -1
- package/dist/chunks/{profile-PFR6PWNE.js → profile-TATWHJYY.js} +1 -1
- package/dist/chunks/{project-agent-KSMTTZYC.js → project-agent-3YOZKDEE.js} +1 -1
- package/dist/chunks/{sandbox-command-MVBSIKB6.js → sandbox-command-RYX3KKMX.js} +1 -1
- package/dist/chunks/{sandbox-template-2OWCTKBP.js → sandbox-template-XYY5C3FD.js} +1 -1
- package/dist/chunks/{src-7TTHR4DL.js → src-4R2FGHSH.js} +1 -1
- package/dist/chunks/{src-W5JJF2NL.js → src-OQTW7BBY.js} +40 -40
- package/dist/chunks/{teams-bot-IUE3CWSW.js → teams-bot-FUALFQMX.js} +1 -1
- package/dist/chunks/{workspaces-O5VJG3TD.js → workspaces-EBBXI77I.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/web/assets/{App-CYWcs7S8.js → App-CmqvOgHr.js} +4 -4
- package/dist/web/assets/{AppDialog-Ba0_0yq9.js → AppDialog-DdKmw4d6.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-Dkmrs9vr.js → AppTerminalPanel-W2pjVUtg.js} +2 -2
- package/dist/web/assets/{AppsView-DTw4bGn4.js → AppsView-RKIWikGP.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-BCDyYFbR.js → BrowserSidebar-Dqo6nl7J.js} +1 -1
- package/dist/web/assets/{CartesianChart-RJq_kOU1.js → CartesianChart-DTZeIAQy.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-DYzFEvn3.js → CollaborationTabs-h4UCjUB4.js} +1 -1
- package/dist/web/assets/{CommandMenu-Gzomv0-I.js → CommandMenu-B2SH7g8V.js} +1 -1
- package/dist/web/assets/{CommunityView-Bbw9POsY.js → CommunityView-BtI1_qwS.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-CxCSccrw.js → ComposerCreateImproveStrip-BW8RhDkB.js} +1 -1
- package/dist/web/assets/{GetStartedView-D2H-GOva.js → GetStartedView-Fqk2AYt7.js} +1 -1
- package/dist/web/assets/HostedModelLearningReview-mBYA71Zs.js +1 -0
- package/dist/web/assets/{HostedModelLearningSettings-CrImZ5SD.js → HostedModelLearningSettings-CgS4Z4WT.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-VLeQbYWF.js → LabModelVersionDetailPage-Dpr2GpAR.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-xFIOwcAU.js → LabSkillSidebar-BDmNaZ8f.js} +1 -1
- package/dist/web/assets/{LabsRoute--K78Pb_V.js → LabsRoute-CVWKsnzj.js} +4 -4
- package/dist/web/assets/{MainChatThread-D3G6QbR9.js → MainChatThread-Bq6f3AUB.js} +2 -2
- package/dist/web/assets/{MainPane-BB8WIemH.js → MainPane-CGa9bSOr.js} +4 -4
- package/dist/web/assets/{MarkdownText-DQBTMcMm.js → MarkdownText-BORA69YO.js} +1 -1
- package/dist/web/assets/{Messages-B1G4vIqt.js → Messages-Bwyst8lC.js} +1 -1
- package/dist/web/assets/{NativeSkillSidebar-DmcODSGl.js → NativeSkillSidebar-Dt4xs-gi.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-Dt0KJMMW.js → NewExperienceSwitcher-C-T2my1F.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-BPGkYiMW.js → NewProjectDialog-Bd-8y1vE.js} +1 -1
- package/dist/web/assets/{OutputsPage-CtK7mzhz.js → OutputsPage-DYnvMsY-.js} +1 -1
- package/dist/web/assets/{ProjectsPage-0eahr0nB.js → ProjectsPage-BPytEvtz.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-AOmhhZJT.js → RightChatPanelStack-CJR0y6c5.js} +1 -1
- package/dist/web/assets/{RightSidebarHomePanel-CsGIwtRW.js → RightSidebarHomePanel-Cn0x7kgh.js} +1 -1
- package/dist/web/assets/{ScheduledWorkPage-CrPOFA5V.js → ScheduledWorkPage-DaHVYiok.js} +1 -1
- package/dist/web/assets/{SettingsView-Y9Vz9_lU.js → SettingsView-DwIdA2Qy.js} +4 -4
- package/dist/web/assets/{TeamChatView-eBh9hneg.js → TeamChatView-C1VmxtuK.js} +1 -1
- package/dist/web/assets/{TerminalOverlay-KwRmvkV1.js → TerminalOverlay-CPIWstqb.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-A1koEF_3.js → TrainingCreationPanel-CjFkopVx.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-D4NJSj08.js → TrainingDraftPanel-BbiN33_a.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-CLjJKcpc.js → UsageSettingsSection-BxT4ZptX.js} +1 -1
- package/dist/web/assets/{WorkSidebarPanel-CvJn9X1R.js → WorkSidebarPanel-nb-GyANT.js} +1 -1
- package/dist/web/assets/{WorkspaceDiffPanel-DSYhWDjl.js → WorkspaceDiffPanel-DFi28DQv.js} +3 -3
- package/dist/web/assets/{WorkspaceEnvironmentMenu-DrE4bKpT.js → WorkspaceEnvironmentMenu-DW6IImGA.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-CrzqcjWN.js → WorkspaceGitDialogs-DvV8_9aF.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BVyxy7WJ.js → WorkspaceMonacoEditor-BYqlTbx1.js} +3 -3
- package/dist/web/assets/{arrow-up-right-BjYBprzW.js → arrow-up-right-BQGeuv2m.js} +1 -1
- package/dist/web/assets/{chat-file-links-CY9VJ--b.js → chat-file-links-BjlG4ZTF.js} +1 -1
- package/dist/web/assets/chevron-up-BbI7fj2g.js +1 -0
- package/dist/web/assets/{clipboard-Da8F6Qgl.js → clipboard-CImDHdf4.js} +1 -1
- package/dist/web/assets/{cloud-upload-vaEzoz43.js → cloud-upload-DSrjiFxa.js} +1 -1
- package/dist/web/assets/{cssMode-Dv3-w8Kc.js → cssMode-CO6QKs7A.js} +1 -1
- package/dist/web/assets/{folder-open-C3Shiqpe.js → folder-open-DWt_CiJ4.js} +1 -1
- package/dist/web/assets/{folder-plus-L8wD4iw3.js → folder-plus-DZJsMZZS.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CDk6sZyt.js → git-commit-horizontal-BmhX8D3M.js} +1 -1
- package/dist/web/assets/{htmlMode-BZ5NH84R.js → htmlMode-BbhUfh60.js} +1 -1
- package/dist/web/assets/{index-6TZT9oax.js → index-VrrkDcgt.js} +2 -2
- package/dist/web/assets/{info-BzFeT6rZ.js → info-C0HVDnJn.js} +1 -1
- package/dist/web/assets/{jsonMode-DkpuUCXl.js → jsonMode-qUE2PjNm.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-BxsmW-WO.js → lspLanguageFeatures-CfX3VOob.js} +1 -1
- package/dist/web/assets/{minimize-2-DnM3eNEG.js → minimize-2-BPu3-DJH.js} +1 -1
- package/dist/web/assets/{monaco.contribution-iPQTj3JR.js → monaco.contribution-BtbXAYNA.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CVC59ttJ.js → monaco.contribution-CKQpqdUm.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CbMHUsGo.js → monaco.contribution-DBKGSgm8.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DZPLEe65.js → monaco.contribution-adURqSPk.js} +2 -2
- package/dist/web/assets/{play-DW0yNt2R.js → play-CUyIuBFF.js} +1 -1
- package/dist/web/assets/{python-DTpbj29X.js → python-q4l4w80D.js} +1 -1
- package/dist/web/assets/{refresh-cw-BAHopOmY.js → refresh-cw-IMz7arkM.js} +1 -1
- package/dist/web/assets/{save-CFWKqkyZ.js → save-Cj-5iVpt.js} +1 -1
- package/dist/web/assets/{square-AVaXWpWj.js → square-zOxRs5It.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-CZKHQ-c0.js → toggleHighContrast-Dj-u2UZ6.js} +1 -1
- package/dist/web/assets/{tsMode-BgOjIJPM.js → tsMode-B-r-e3os.js} +1 -1
- package/dist/web/assets/{upload-nqv0d2Sb.js → upload-BpElaH7O.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-xIEcLU8F.js → useLocalAgentSchedules-wyJ9JjmR.js} +1 -1
- package/dist/web/assets/{wifi-off-C6HLWTJm.js → wifi-off-DWRK-TPQ.js} +1 -1
- package/dist/web/assets/{workers-BNRLU1LU.js → workers-Pk9mKuOt.js} +1 -1
- package/dist/web/assets/{yaml-dAmUAqyv.js → yaml-hbr5HzqB.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/web/assets/HostedModelLearningReview-DAxcFdXC.js +0 -1
- package/dist/web/assets/chevron-up-TrVwfRay.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{Y as ge,a as ue,b as de,d as pe,e as K,f as N,g as fe,h as me,i as he,j as ye}from"./chunk-
|
|
2
|
+
import{Y as ge,a as ue,b as de,d as pe,e as K,f as N,g as fe,h as me,i as he,j as ye}from"./chunk-M3FDHTJ2.js";import{d as R,e as U}from"./chunk-J2S7BOZU.js";import{K as ne,q as ce}from"./chunk-NNLI4OWY.js";import{a}from"./chunk-FTQLQJQV.js";import{randomUUID as He}from"node:crypto";var _e=new URL(U).hostname,Se=new URL(R).hostname,Ce=`${U}/opchat/v1`;function l(e){if(!e)return null;let n=e.trim();return n?n.replace(/\/+$/,""):null}a(l,"normalizeBaseUrl");function V(e){let n=l(e);if(!n)return null;try{let o=new URL(n).hostname.toLowerCase();if(o===_e)return U;if(o===Se||o==="openpond.live"||o==="www.openpond.live")return U;if(o.startsWith("api."))return n}catch{return null}return null}a(V,"mapUiBaseToApiBase");function G(e,n){let t=l(process.env.OPENPOND_API_URL);if(t)return t;let o=l(e?.apiBaseUrl);if(o)return o;let r=l(n.apiBaseUrl);if(r)return r;let s=V(process.env.OPENPOND_BASE_URL);return s||(V(e?.baseUrl||n.baseUrl)??U)}a(G,"resolvePublicApiBaseUrl");function J(e,n,t){return Ie(e,n,t)}a(J,"resolveHostedChatApiBaseUrl");function Ie(e,n,t){let o=typeof process<"u"?process.env:{};return W(o.OPENPOND_OPCHAT_API_URL)??W(e?.chatApiBaseUrl??n.chatApiBaseUrl)??W(o.OPENPOND_CHAT_API_URL)??Re(t)}a(Ie,"resolveOpChatApiBaseUrl");function W(e){let n=l(e);if(!n)return null;try{let t=new URL(n),o=t.pathname.split("/").filter(Boolean),r=o.findIndex(i=>i.toLowerCase()==="opchat");return r>=0?(t.pathname=`/${[...o.slice(0,r+1),"v1"].join("/")}`,t.search="",t.hash="",l(t.toString())??null):o.findIndex(i=>i.toLowerCase()==="v1")>=0?(t.pathname="/opchat/v1",t.search="",t.hash="",l(t.toString())??null):(t.pathname=`${t.pathname.replace(/\/+$/,"")}/opchat/v1`.replace(/\/{2,}/g,"/"),t.search="",t.hash="",l(t.toString())??null)}catch{return null}}a(W,"normalizeOpChatApiBaseUrl");function Re(e){return W(e)??Ce}a(Re,"opChatBaseFromPublicApiBase");function T(e){return e?.trim()?e.trim():"production"}a(T,"deriveEnvironment");function Y(e,n=process.env){let t=[e?.apiKey,e?.session?.token,e?.token,n.OPENPOND_API_KEY];for(let o of t){let r=typeof o=="string"?o.trim():"";if(r)return r}return null}a(Y,"accountToken");function P(e,n){return!!(e&&n&&e.toLowerCase()===n.toLowerCase())}a(P,"handleEquals");function v(e,n){return l(e)===l(n)}a(v,"baseUrlEquals");function z(e,n){return`${e?.trim().toLowerCase()||""}|${l(n)??"default"}`}a(z,"profileKey");function Q(e){return l(e?.baseUrl)}a(Q,"selectorBaseUrl");function F(e){let n=l(e.baseUrl);return n?{handle:e.handle,baseUrl:n}:{handle:e.handle}}a(F,"selectorFromAccount");function g(e){let n=typeof e?.handle=="string"?e.handle.trim():"";if(!n)return null;let t=l(e?.baseUrl);return t?{handle:n,baseUrl:t}:{handle:n}}a(g,"normalizeActiveProfile");function k(e,n){if(!P(e.handle,n.handle))return!1;let t=Q(n);return t?v(e.baseUrl,t):!l(e.baseUrl)}a(k,"accountMatchesSelector");function te(e,n){if(!P(e.handle,n.handle))return!1;let t=Q(n);return t?v(e.baseUrl,t):!l(e.baseUrl)}a(te,"profileMatchesSelector");function Ae(e,n,t){let o=Array.isArray(e.accounts)?e.accounts:[],r=n||process.env.OPENPOND_ACCOUNT?g({handle:n||process.env.OPENPOND_ACCOUNT||"",baseUrl:t??process.env.OPENPOND_BASE_URL??null}):g(e.activeProfile);if(r){let s=o.find(c=>k(c,r));if(s)return s;let i=o.filter(c=>P(c.handle,r.handle));return i.length===1?i[0]??null:null}return o[0]?o[0]:null}a(Ae,"findActiveAccount");function Pe(e){let n=Array.isArray(e.accounts)?e.accounts:[],t=g(e.activeProfile)??(n[0]?F(n[0]):null);return oe(n.map(o=>({handle:o.handle,baseUrl:l(o.baseUrl),apiBaseUrl:l(o.apiBaseUrl),chatApiBaseUrl:l(o.chatApiBaseUrl),environment:T(o.environment),isActive:t?k(o,t):!1,hasApiKey:!!o.apiKey?.trim(),hasSessionToken:!!(o.session?.token?.trim()||o.token?.trim()),sessionAppId:o.session?.appId??null,sessionConversationId:o.session?.conversationId??null})))}a(Pe,"fallbackProfilesFromConfig");function oe(e){let n=new Map;for(let t of e){let o=l(t.baseUrl),r=`${t.handle.toLowerCase()}|${o??"default"}`,s={...t,baseUrl:o,apiBaseUrl:l(t.apiBaseUrl),chatApiBaseUrl:l(t.chatApiBaseUrl),environment:T(t.environment),isActive:t.isActive},i=n.get(r);(!i||s.isActive&&!i.isActive||s.hasApiKey&&!i.hasApiKey)&&n.set(r,s)}return Array.from(n.values())}a(oe,"normalizeProfiles");function we(e){return e.hasApiKey||e.hasSessionToken?"signed_in":"signed_out"}a(we,"profileAuthHealth");function Ne(e,n){return e?{reachable:e.reachable,authenticated:e.authenticated,apiBase:e.apiBase||n,latencyMs:e.latencyMs,status:e.status,service:e.service,checkedAt:e.checkedAt,error:e.error??null}:null}a(Ne,"normalizeHealth");function Oe(e){let n=e?.account;return n?{id:n.id??null,email:n.email??null,name:n.name??null,handle:n.handle??null,image:n.image??null,timezone:n.timezone??null,isAdmin:n.isAdmin??null,isVerified:n.isVerified??null,dailyAgentAppId:n.dailyAgentAppId??null,dailyAgentDeploymentId:n.dailyAgentDeploymentId??null,credits:n.credits??null}:null}a(Oe,"normalizeProfile");function Te(e){return(e??[]).map(n=>({...n,id:n.id||n.userProductId||n.openPondProductId||n.name,name:n.name,type:n.type,status:n.status,isActive:n.isActive??null,price:n.price??null,currency:n.currency??null,credits:n.credits??null}))}a(Te,"normalizeProducts");function Le(e){return e.handle.trim().toLowerCase()==="default"&&!l(e.baseUrl)&&!e.hasApiKey&&!e.hasSessionToken}a(Le,"isEmptyDefaultProfile");function X(e){let{config:n,profiles:t,account:o,token:r,apiBaseUrl:s,accountResponse:i,accountProfiles:c,health:y,authFailed:A,error:f}=e,w=J(o,n,s),m=Oe(i??null),S=g(n.activeProfile),E=(o?F(o):null)??S,O=m?.handle||o?.handle||E?.handle||null,C=(E?t.find(p=>te(p,E)):null)??t.find(p=>p.isActive)??null,h=A?"auth_error":r?"signed_in":"signed_out",u=m?.name||m?.handle||m?.email||O||"Signed out",I=l(C?.baseUrl||o?.baseUrl||R),b=T(C?.environment||o?.environment),x=g(E)??(O?g({handle:O,baseUrl:C?.baseUrl??o?.baseUrl}):null),$=(t.length>0?t:O?[{handle:O,baseUrl:Q(x)??l(o?.baseUrl),apiBaseUrl:s,chatApiBaseUrl:w,environment:b,isActive:!0,hasApiKey:!!r,hasSessionToken:!1,sessionAppId:null,sessionConversationId:null}]:[]).filter(p=>!Le(p));return{state:h,activeProfile:x,label:u,email:m?.email??null,avatarUrl:m?.image??null,environment:b,baseUrl:I,apiBaseUrl:s,chatApiBaseUrl:w,creditsLabel:m?.credits??null,profile:m,products:Te(i?.products),apiHealth:Ne(y??null,s),accounts:$.map(p=>{let H=l(p.baseUrl),le=c?.[z(p.handle,H)]??null,M=Oe(le?.response??null);return{handle:p.handle,baseUrl:H,apiBaseUrl:l(p.apiBaseUrl),chatApiBaseUrl:l(p.chatApiBaseUrl),environment:T(p.environment),isActive:x?te(p,x):!1,authHealth:le?.authFailed?"auth_error":we(p),displayLabel:M?.name||M?.handle||M?.email||p.handle,email:M?.email??null,avatarUrl:M?.image??null}}),error:f??y?.error??null}}a(X,"toAccountState");async function De(e){try{return oe(await me())}catch{return Pe(e)}}a(De,"loadProfiles");async function d(e,n){let t=await fe(),o=await De(t),r=Ae(t,e,n),s=Y(r),i=G(r,t),c=J(r,t,i);return{config:t,profiles:o,account:r,token:s,apiBaseUrl:i,chatApiBaseUrl:c,accountState:X({config:t,profiles:o,account:r,token:s,apiBaseUrl:i})}}a(d,"loadOpenPondAccountContext");async function $e(e){let n=l(e.baseUrl);return await he(e.handle,{baseUrl:n}),d(e.handle,n)}a($e,"switchOpenPondAccount");function L(e){return e instanceof Error?e.message:String(e)}a(L,"errorMessage");var Me=15e3;function ze(e){return e===ne?"OpenPond Chat":e==="deepseek-v4-flash"?"DeepSeek V4 Flash":e.replace(/[-_/]+/g," ")}a(ze,"displayNameForHostedModel");function Fe(e){let n=typeof e.id=="string"?e.id:null;return n?{id:n,displayName:ze(n),ownedBy:typeof e.owned_by=="string"?e.owned_by:null,streaming:!0,raw:e}:null}a(Fe,"normalizeHostedModel");async function je(){let e=await d();if(!e.token)return{models:[],error:"No OpenPond API key or session token is configured."};try{return{models:(await We({apiBaseUrl:e.chatApiBaseUrl,token:e.token})).data.map(o=>Fe(o)).filter(o=>!!o),error:null}}catch(n){return{models:[],error:L(n)}}}a(je,"loadOpenPondHostedModels");async function qe(){let e=await d();if(!e.token)return{catalog:null,error:"No OpenPond API key or session token is configured."};let n=new AbortController,t=setTimeout(()=>{n.abort(new Error("OpenPond provider catalog request timed out."))},Me);try{return{catalog:await Ue({apiBaseUrl:e.chatApiBaseUrl,token:e.token,signal:n.signal}),error:null}}catch(o){return{catalog:null,error:L(o)}}finally{clearTimeout(t)}}a(qe,"loadOpenPondProviderCatalog");async function*Ke(e){let n=await d();if(!n.token)throw new Error("OpenPond is signed out. Add an account in Settings before using OpenPond Chat.");yield*Ve({apiBaseUrl:n.chatApiBaseUrl,token:n.token,model:e.model||ne,messages:e.messages,tools:e.tools,toolChoice:e.toolChoice,requestId:e.requestId,reasoningEffort:e.reasoningEffort,maxTokens:e.maxTokens,temperature:e.temperature,topP:e.topP,signal:e.signal})}a(Ke,"streamOpenPondHostedChatTurn");async function We(e){let n=re(e.apiBaseUrl,"models"),t=await fetch(n,{method:"GET",headers:ae(e.token,"application/json"),signal:e.signal});if(!t.ok)throw new Error(`OpenPond OpChat model list failed: ${t.status} ${await se(t)}`);return await t.json()}a(We,"listOpChatModels");async function Ue(e){let n=re(e.apiBaseUrl,"provider-catalog"),t=await fetch(n,{method:"GET",headers:ae(e.token,"application/json"),signal:e.signal});if(!t.ok)throw new Error(`OpenPond OpChat provider catalog failed: ${t.status} ${await se(t)}`);return ce.parse(await t.json())}a(Ue,"listOpChatProviderCatalog");async function*Ve(e){let n=re(e.apiBaseUrl,"chat/completions"),t=await fetch(n,{method:"POST",headers:ae(e.token,"text/event-stream",e.requestId),body:JSON.stringify(Ze(e,!0)),signal:e.signal});if(!t.ok)throw new Error(`OpenPond OpChat request failed: ${t.status} ${await se(t)}`);if(!t.body)throw new Error("OpenPond OpChat request failed: streaming response body is missing.");let o=new Map,r=!1,s=null,i={},c="",y=null,A=Ge(t.headers),f=t.body.getReader(),w=new TextDecoder,m="",S=[],ee=a(()=>{if(S.length===0)return[];let h=S.join(`
|
|
3
3
|
`);if(S=[],h==="[DONE]")return r=!0,[];let u;try{u=JSON.parse(h)}catch{throw new Error("OpenPond OpChat request failed: malformed streaming event.")}if(u&&typeof u=="object"&&"error"in u)throw new Error(`OpenPond OpChat request failed: ${ke(u)}`);i=u;let I=u&&typeof u=="object"?u:{},b=Array.isArray(I.choices)?I.choices:[],x=b[0]&&typeof b[0]=="object"?b[0]:{},q=x.delta&&typeof x.delta=="object"?x.delta:{},$=[],p=be(q.reasoning_content);p&&(c+=p,$.push({type:"reasoning_delta",text:p,raw:u}));let H=be(q.content);return H&&$.push({type:"text_delta",text:H,raw:u}),Qe(o,q.tool_calls),s=D(x.finish_reason)??s,y=tn(u)??y,$},"consumeEvent"),E=a(h=>{let u=h.endsWith("\r")?h.slice(0,-1):h;return u?u.startsWith(":")?[]:(u.startsWith("data:")&&S.push(u.slice(5).trimStart()),[]):ee()},"consumeLine");try{for(;;){let h=await f.read();if(h.done)break;m+=w.decode(h.value,{stream:!0});let u=m.split(`
|
|
4
4
|
`);m=u.pop()??"";for(let I of u)for(let b of E(I))yield b}if(m+=w.decode(),m)for(let h of E(m))yield h;for(let h of ee())yield h}finally{f.releaseLock()}if(!r)throw new Error("OpenPond OpChat request failed: stream ended before [DONE].");let O=Xe(o);O.length>0&&(yield{type:"tool_call_delta",toolCalls:O,raw:i}),O.length>0&&c&&(yield{type:"continuation",continuation:{kind:"chat_completions_reasoning",reasoningContent:c},raw:i});let C=Je(y,A);C&&(yield{type:"usage",usage:C,raw:i}),yield{type:"finish",finishReason:s,raw:i}}a(Ve,"streamOpChatChatCompletion");function Ge(e){let n=xe(e,["fireworks-prompt-tokens","prompt-tokens"]),t=xe(e,["fireworks-cached-prompt-tokens","cached-prompt-tokens"]);return t===null?null:{...n===null?{}:{prompt_tokens:n},cached_input_tokens:t,cache_telemetry_source:"provider_response_headers"}}a(Ge,"cacheUsageFromResponseHeaders");function xe(e,n){for(let t of n){let o=e.get(t);if(o===null||!/^\d+$/.test(o.trim()))continue;let r=Number(o);if(Number.isSafeInteger(r)&&r>=0)return r}return null}a(xe,"firstHeaderTokenCount");function Je(e,n){if(!n||Ye(e))return e;let t={...e??{},cached_input_tokens:n.cached_input_tokens,cache_telemetry_source:"provider_response_headers"};return B(e?.prompt_tokens)===null&&n.prompt_tokens!==void 0&&(t.prompt_tokens=n.prompt_tokens),t}a(Je,"usageWithResponseHeaderCache");function Ye(e){return e?B(e.cached_input_tokens)!==null||B(e.cache_read_input_tokens)!==null||B(e.cache_creation_input_tokens)!==null||B(e.prompt_cache_hit_tokens)!==null||B(e.prompt_cache_miss_tokens)!==null?!0:B(e.prompt_tokens_details?.cached_tokens)!==null||B(e.input_tokens_details?.cached_tokens)!==null:!1}a(Ye,"usageHasCacheTelemetry");function B(e){if(typeof e=="number"&&Number.isSafeInteger(e)&&e>=0)return e;if(typeof e!="string"||!/^\d+$/.test(e.trim()))return null;let n=Number(e);return Number.isSafeInteger(n)?n:null}a(B,"usageTokenCount");function Qe(e,n){Array.isArray(n)&&n.forEach((t,o)=>{if(!t||typeof t!="object")return;let r=t,s=typeof r.index=="number"&&Number.isInteger(r.index)?r.index:o,i=e.get(s)??{arguments:""};typeof r.id=="string"&&(i.id=r.id);let c=r.function&&typeof r.function=="object"?r.function:{};typeof c.name=="string"&&(i.name=`${i.name??""}${c.name}`),typeof c.arguments=="string"&&(i.arguments+=c.arguments),e.set(s,i)})}a(Qe,"mergeOpChatToolCallDeltas");function Xe(e){return[...e.entries()].sort(([n],[t])=>n-t).flatMap(([,n])=>n.id&&n.name?[{id:n.id,type:"function",function:{name:n.name,arguments:n.arguments}}]:[])}a(Xe,"completedOpChatToolCalls");function Ze(e,n){let t={model:e.model,messages:e.messages.map(nn),stream:n};return e.tools&&(t.tools=e.tools),e.toolChoice!==void 0&&(t.tool_choice=e.toolChoice),typeof e.maxTokens=="number"&&(t.max_tokens=e.maxTokens),typeof e.temperature=="number"&&(t.temperature=e.temperature),typeof e.topP=="number"&&(t.top_p=e.topP),Object.assign(t,en(e.reasoningEffort)),t}a(Ze,"buildOpChatBody");function en(e){return e?e==="low"?{thinking:{type:"disabled"}}:{thinking:{type:"enabled"},reasoning_effort:e==="xhigh"?"max":"high"}:{}}a(en,"opChatReasoningFields");function nn(e){let{continuation:n,images:t,...o}=e,r=t?.length?[...typeof e.content=="string"&&e.content.trim()?[{type:"text",text:e.content}]:[],...t.map(s=>({type:"image_url",image_url:{url:s.url,...s.detail?{detail:s.detail}:{}}}))]:e.content;return e.role==="assistant"&&n?.kind==="chat_completions_reasoning"?{...o,...r!==void 0?{content:r}:{},reasoning_content:n.reasoningContent}:{...o,...r!==void 0?{content:r}:{}}}a(nn,"opChatMessage");function re(e,n){let t=e.trim().replace(/\/+$/,"");if(!t)throw new Error("OpenPond OpChat API base URL is required.");return`${t}/${n}`}a(re,"opChatEndpointUrl");function ae(e,n,t){let o=e.trim();if(!o)throw new Error("OpenPond API key is required for OpChat.");let r=new Headers;return r.set("Authorization",`Bearer ${o}`),r.set("Content-Type","application/json"),r.set("Accept",n),r.set("x-openpond-client","openpond-app"),r.set("x-openpond-request-id",t||He()),r}a(ae,"opChatHeaders");async function se(e){let n=await e.text().catch(()=>"");if(!n)return e.statusText||`HTTP ${e.status}`;try{return ke(JSON.parse(n))}catch{return n}}a(se,"readOpChatError");function ke(e){if(!e||typeof e!="object")return String(e||"unknown_error");let n=e,t=n.error;if(t&&typeof t=="object"){let o=t;return[D(o.code),D(o.type),D(o.message)].filter(Boolean).join(": ")}return[D(n.error),D(n.message)].filter(Boolean).join(": ")||JSON.stringify(e)}a(ke,"errorMessageFromPayload");function tn(e){if(!e||typeof e!="object")return null;let n=e.usage;return!n||typeof n!="object"?null:n}a(tn,"parseUsage");function D(e){return typeof e=="string"&&e.trim()?e:null}a(D,"stringValue");function be(e){return typeof e=="string"&&e.length>0?e:null}a(be,"streamTextValue");import{readFileSync as on}from"node:fs";var j;function rn(){if(j!==void 0)return j??"openpond-code bundled";try{let e=new URL("../package.json",import.meta.resolve("openpond")),n=JSON.parse(on(e,"utf8"));j=typeof n.version=="string"?`openpond-code@${n.version}`:null}catch{j=null}return j??"openpond-code bundled"}a(rn,"getBundledRuntimeVersion");import{spawn as an}from"node:child_process";function Be(e,n=process.platform){return n==="darwin"?{command:"open",args:[e]}:n==="win32"?{command:"rundll32.exe",args:["url.dll,FileProtocolHandler",e]}:{command:"xdg-open",args:[e]}}a(Be,"resolveSystemBrowserCommand");async function sn(e,n={}){let t=n.command??Be(e),o=n.handoffTimeoutMs??1500;return new Promise(r=>{let s=!1,i=null,c=a(A=>{s||(s=!0,i&&clearTimeout(i),r(A))},"finish"),y=an(t.command,t.args,{detached:!1,shell:!1,stdio:"ignore",windowsHide:!0});y.once("error",A=>{let f=A.code;c({opened:!1,error:f?`browser launcher ${t.command} failed (${f})`:`browser launcher ${t.command} failed`})}),y.once("close",(A,f)=>{if(A===0){c({opened:!0});return}let w=f?`signal ${f}`:`code ${A??"unknown"}`;c({opened:!1,error:`browser launcher ${t.command} exited with ${w}`})}),i=setTimeout(()=>{y.unref(),c({opened:!0})},o),i.unref()})}a(sn,"openUrlWithSystemBrowser");function ln(e){if(!e||typeof e!="object")return null;let n=e,t=typeof n.id=="string"?n.id:null,o=typeof n.name=="string"?n.name:t;if(!t||!o)return null;let r=n.latestDeployment&&typeof n.latestDeployment=="object"?n.latestDeployment:null,s=ge.safeParse(n.sandboxActionRegistry);return{id:t,name:o,description:typeof n.description=="string"?n.description:null,visibility:typeof n.visibility=="string"?n.visibility:null,gitOwner:typeof n.gitOwner=="string"?n.gitOwner:null,gitRepo:typeof n.gitRepo=="string"?n.gitRepo:null,gitHost:typeof n.gitHost=="string"?n.gitHost:null,defaultBranch:typeof n.defaultBranch=="string"?n.defaultBranch:null,sandbox:n.sandbox===!0,sandboxActionRegistry:s.success?s.data:null,sandboxManifestHash:typeof n.sandboxManifestHash=="string"?n.sandboxManifestHash:null,sandboxManifestPath:typeof n.sandboxManifestPath=="string"?n.sandboxManifestPath:null,sandboxManifestSyncedAt:typeof n.sandboxManifestSyncedAt=="string"?n.sandboxManifestSyncedAt:n.sandboxManifestSyncedAt instanceof Date?n.sandboxManifestSyncedAt.toISOString():null,sandboxManifestError:typeof n.sandboxManifestError=="string"?n.sandboxManifestError:null,updatedAt:typeof n.updatedAt=="string"?n.updatedAt:null,latestDeployment:r?{id:typeof r.id=="string"?r.id:void 0,status:typeof r.status=="string"?r.status:void 0,deploymentDomain:typeof r.deploymentDomain=="string"?r.deploymentDomain:null,createdAt:typeof r.createdAt=="string"?r.createdAt:void 0,isProduction:typeof r.isProduction=="boolean"?r.isProduction:null,gitBranch:typeof r.gitBranch=="string"?r.gitBranch:null}:null,scheduleSummary:un(n.scheduleSummary)}}a(ln,"normalizeApp");function _(e){return typeof e=="string"?e:e instanceof Date?e.toISOString():null}a(_,"normalizeDateString");function cn(e){if(!e||typeof e!="object")return null;let n=e,t=typeof n.id=="string"?n.id:null,o=typeof n.name=="string"?n.name:t,r=typeof n.deploymentId=="string"?n.deploymentId:null;return!t||!o||!r?null:{id:t,name:o,description:typeof n.description=="string"?n.description:null,scheduleType:typeof n.scheduleType=="string"?n.scheduleType:"cron",scheduleExpression:typeof n.scheduleExpression=="string"?n.scheduleExpression:"",enabled:!!n.enabled,rawEnabled:typeof n.rawEnabled=="boolean"?n.rawEnabled:void 0,syncStatus:typeof n.syncStatus=="string"?n.syncStatus:null,syncError:typeof n.syncError=="string"?n.syncError:null,startAt:_(n.startAt),endAt:_(n.endAt),maxRuns:typeof n.maxRuns=="number"?n.maxRuns:null,executionCount:typeof n.executionCount=="number"?n.executionCount:null,lifecycleStatus:typeof n.lifecycleStatus=="string"?n.lifecycleStatus:null,lifecycleReason:typeof n.lifecycleReason=="string"?n.lifecycleReason:null,lastExecutionAt:_(n.lastExecutionAt),lastExecutionStatus:typeof n.lastExecutionStatus=="string"?n.lastExecutionStatus:null,lastRunNowAt:_(n.lastRunNowAt),lastRunNowStatus:typeof n.lastRunNowStatus=="string"?n.lastRunNowStatus:null,updatedAt:_(n.updatedAt)??new Date().toISOString(),deploymentId:r,isProduction:typeof n.isProduction=="boolean"?n.isProduction:void 0,payload:n.payload}}a(cn,"normalizeSchedule");function un(e){if(!e||typeof e!="object")return null;let n=e,t=Array.isArray(n.schedules)?n.schedules.map(cn).filter(i=>!!i):[],o=typeof n.total=="number"?n.total:t.length,r=typeof n.active=="number"?n.active:t.filter(i=>i.enabled).length,s=typeof n.paused=="number"?n.paused:Math.max(0,o-r);return{total:o,active:r,paused:s,enabled:typeof n.enabled=="number"?n.enabled:r,disabled:typeof n.disabled=="number"?n.disabled:s,nextRunAt:_(n.nextRunAt),lastRunAt:_(n.lastRunAt),schedules:t,truncated:typeof n.truncated=="boolean"?n.truncated:void 0}}a(un,"normalizeScheduleSummary");async function dn(e){let n=Array.isArray(e.config.accounts)?e.config.accounts:[],t=await Promise.all(n.map(async o=>{let r=z(o.handle,o.baseUrl),s=Y(o);if(!s)return[r,{response:null,authFailed:!1,error:null}];try{return[r,{response:await K(G(o,e.config),s),authFailed:!1,error:null}]}catch(i){return[r,{response:null,authFailed:!0,error:L(i)}]}}));return Object.fromEntries(t)}a(dn,"loadAccountProfileLookups");async function Ee(e){let n=await dn(e),t=e.account?n[z(e.account.handle,e.account.baseUrl)]??null:null,o=t?.response??null,r=e.token&&t?.authFailed?t.error||"OpenPond account authentication failed.":null;return{account:X({...e,accountResponse:o,accountProfiles:n,authFailed:!!r,error:r})}}a(Ee,"loadOpenPondAccountStateForContext");async function pn(){return Ee(await d())}a(pn,"loadOpenPondAccountState");async function ve(e={}){let n=await d(),t=Ee(n);if(!n.token)return{...await t,apps:[],error:"No OpenPond API key or session token is configured."};let[o,r]=await Promise.allSettled([t,ue(n.apiBaseUrl,n.token,{handle:n.account?.handle,limit:e.limit??20,offset:e.offset??0,includeScheduled:e.includeScheduled??!0})]);if(o.status==="rejected")throw o.reason;return{account:o.value.account,apps:r.status==="fulfilled"?r.value.map(ln).filter(s=>!!s):[],error:r.status==="rejected"?L(r.reason):null}}a(ve,"loadOpenPondApps");async function fn(e){let n=await d();if(!n.token)throw new Error("No OpenPond API key or session token is configured.");return{account:n,response:await de(n.apiBaseUrl,n.token,e)}}a(fn,"createOpenPondRepoApp");import{createHash as mn}from"node:crypto";function hn(e){return`account-${mn("sha256").update(e).digest("hex").slice(0,8)}`}a(hn,"fallbackHandleForApiKey");function Z(e){let n=e?.trim();return n?n.replace(/^@/,""):null}a(Z,"normalizeDerivedHandle");async function yn(e,n){let t=Z(e.handle);if(t)return t;try{let r=(await K(n,e.apiKey)).account,s=Z(r.handle)??Z(r.email?.split("@")[0])??Z(r.id);if(s)return s}catch{}return hn(e.apiKey)}a(yn,"deriveHandleForApiKey");async function gn(e){let n=e.baseUrl??R,t=l(e.apiBaseUrl)??V(n)??U,o=l(e.chatApiBaseUrl),r=await yn(e,t);return await ye({handle:r,apiKey:e.apiKey,baseUrl:n,apiBaseUrl:t,chatApiBaseUrl:o,environment:e.environment??"production",setActive:e.setActive}),d(r,n)}a(gn,"saveOpenPondAccount");function An(e,n,t){let o=l(t),r=e.findIndex(i=>P(i.handle,n)&&v(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,n));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${n}; select one with its base URL.`);return-1}a(An,"findAccountIndex");async function Pn(e){let n=e.handle.trim();if(!n)throw new Error("OpenPond account handle is required.");return await N(t=>{let o=(t.accounts??[]).map(c=>({...c})),r=An(o,n,e.baseUrl);if(r===-1)throw new Error(`OpenPond account not found: ${n}`);let s=o[r],i=g(t.activeProfile);if(i&&k(s,i))throw new Error("Switch to another OpenPond account before removing the active account.");o.splice(r,1),t.accounts=o}),d()}a(Pn,"removeOpenPondAccount");async function wn(){let e;return await N(n=>{let t=g(n.activeProfile),o=(n.accounts??[]).map(s=>({...s})),r=t?o.findIndex(s=>k(s,t)):0;if(r<0||!o[r])throw new Error("No active OpenPond account to log out.");e={...o[r]},delete e.apiKey,delete e.session,o[r]=e,n.accounts=o}),d(e.handle,e.baseUrl)}a(wn,"signOutOpenPondAccount");function On(e,n,t){let o=l(t),r=e.findIndex(i=>P(i.handle,n)&&v(i.baseUrl,o));if(r!==-1)return r;let s=e.map((i,c)=>({account:i,index:c})).filter(({account:i})=>P(i.handle,n));if(s.length===1)return s[0].index;if(s.length>1)throw new Error(`Multiple OpenPond accounts match ${n}; select one with its current base URL.`);return-1}a(On,"findAccountIndex");function ie(e,n,t){if(t===void 0)return;let o=l(t);if(o){e[n]=o;return}(t===null||t.trim()==="")&&delete e[n]}a(ie,"applyOptionalUrl");async function xn(e){let n=e.handle.trim();if(!n)throw new Error("OpenPond account handle is required.");let t;return await N(o=>{let r=(o.accounts??[]).map(f=>({...f})),s=On(r,n,e.currentBaseUrl);if(s===-1)throw new Error(`OpenPond account not found: ${n}`);let i=r[s];if(t={...i},ie(t,"baseUrl",e.baseUrl),ie(t,"apiBaseUrl",e.apiBaseUrl),ie(t,"chatApiBaseUrl",e.chatApiBaseUrl),e.environment===null?delete t.environment:typeof e.environment=="string"&&e.environment.trim()&&(t.environment=e.environment.trim()),r.findIndex((f,w)=>w!==s&&P(f.handle,t.handle)&&v(f.baseUrl,t.baseUrl))!==-1)throw new Error("Another OpenPond account already uses that handle and base URL.");let y=g(o.activeProfile),A=!!(y&&k(i,y));r[s]=t,o.accounts=r,o.activeProfile=e.setActive||A?F(t):o.activeProfile}),d(t.handle,t.baseUrl)}a(xn,"updateOpenPondAccountConfig");async function bn(e){let n=await d();if(!n.token)throw new Error("OpenPond is signed out. Add an account before reading app config.");return pe(n.apiBaseUrl,n.token,e.appId)}a(bn,"getOpenPondAppEnvironment");function Un(e,n){let t="",o=a(r=>{r.startsWith(e)&&n(JSON.parse(r.slice(e.length)))},"processLine");return{push(r){for(t+=r;;){let s=kn(t);if(s<0)return;let i=t.slice(0,s).replace(/\r$/,""),c=t[s]==="\r"&&t[s+1]===`
|
|
5
5
|
`?2:1;t=t.slice(s+c),o(i)}},flush(){let r=t.trimEnd();t="",r&&o(r)}}}a(Un,"createReadyLineParser");function kn(e){let n=e.indexOf(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{d as F}from"./chunk-
|
|
2
|
+
import{d as F}from"./chunk-HKYGCUA6.js";import{a as o}from"./chunk-FTQLQJQV.js";import{spawn as nt,spawnSync as At}from"node:child_process";import{accessSync as vt,constants as Rt,existsSync as _t,promises as Bt}from"node:fs";import et from"node:path";var rt="Git is required for OpenPond app workspaces, but macOS reports Apple Command Line Tools are not installed. OpenPond skipped /usr/bin/git to avoid opening the Xcode installer prompt. Install Command Line Tools with `xcode-select --install`, install Git from Homebrew, or put a non-Apple git binary earlier on PATH.",T;function Lt(e){try{return _t(e)?(vt(e,Rt.X_OK),!0):!1}catch{return!1}}o(Lt,"isExecutable");function Ot(){let e=(process.env.PATH??"").split(et.delimiter).map(t=>t.trim()).filter(Boolean);for(let t of e){let n=et.join(t,"git");if(!(n==="/usr/bin/git"||n==="/bin/git")&&Lt(n))return n}return null}o(Ot,"firstNonAppleGitOnPath");function it(){let e=At("/usr/bin/xcode-select",["-p"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]});return e.status===0&&!!e.stdout.trim()}o(it,"appleDeveloperToolsAvailable");function Dt(e){if(e!=="git"||process.platform!=="darwin")return{command:e};if(T!==void 0)return{command:T};let t=Ot();return t?(T=t,{command:t}):it()?(T="git",{command:"git"}):{error:rt}}o(Dt,"resolveWorkspaceCommand");function u(e,t,n,r={},i){return new Promise(s=>{let a=Dt(e);if("error"in a){s({code:1,stdout:"",stderr:a.error});return}let c=nt(a.command,t,{cwd:n,env:{...process.env,...r,GIT_TERMINAL_PROMPT:"0"},stdio:[i===void 0?"ignore":"pipe","pipe","pipe"]}),d=[],p=[];i!==void 0&&c.stdin?.end(i),c.stdout?.on("data",h=>d.push(h)),c.stderr?.on("data",h=>p.push(h)),c.on("error",h=>{s({code:1,stdout:"",stderr:h.message})}),c.on("close",h=>{s({code:h??1,stdout:Buffer.concat(d).toString("utf8"),stderr:Buffer.concat(p).toString("utf8")})})})}o(u,"runCommand");function Gt(e){return!!(e&&e.includes(rt.slice(0,80)))}o(Gt,"isMacOSGitDeveloperToolsMissing");async function Se(e){await Bt.mkdir(e,{recursive:!0});let t=await u("git",["--version"],e);if(t.code===0)return{ok:!0,command:T??"git",version:(t.stdout||t.stderr).trim()};let n=t.stderr.trim()||t.stdout.trim()||"Git is required for OpenPond app workspaces.";return{ok:!1,error:n,installAction:process.platform==="darwin"&&Gt(n)?"macos_command_line_tools":"manual_git_install"}}o(Se,"checkWorkspaceGitAvailability");function ye(){if(process.platform!=="darwin")return{ok:!1,error:"Apple Command Line Tools installation is only available on macOS."};if(it())return{ok:!0,message:"Apple Command Line Tools already appear to be installed."};try{return nt("/usr/bin/xcode-select",["--install"],{detached:!0,stdio:"ignore"}).unref(),{ok:!0,message:"Opened the Apple Command Line Tools installer."}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}o(ye,"startMacOSCommandLineToolsInstall");import{promises as k}from"node:fs";import m from"node:path";var st=24e3,ot=8e4,It=512*1024,ct=15*1024*1024,Tt=20*1024*1024,Mt=new Set([".cache",".eggs",".git",".ipynb_checkpoints",".mypy_cache",".next",".nox",".nuxt",".openpond",".output",".parcel-cache",".pytest_cache",".pyre",".ruff_cache",".svelte-kit",".tox",".turbo",".venv","__pycache__","artifacts","build","coverage","dist","env","node_modules","out","site-packages","target","venv","volumes"]),zt=new Set([".7z",".avif",".db",".doc",".docx",".gif",".gz",".ico",".jpeg",".jpg",".mov",".mp4",".pdf",".png",".sqlite",".tar",".webp",".xls",".xlsm",".xlsx",".zip"]),$t=new Map([[".avif","image/avif"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".png","image/png"],[".webp","image/webp"]]),Nt=new Map([[".m4v","video/x-m4v"],[".mov","video/quicktime"],[".mp4","video/mp4"],[".webm","video/webm"]]),Ht=new Set([".doc",".docx",".pdf"]);function Ut(e){return e.replace(/[^a-zA-Z0-9._-]/g,"-").slice(0,120)||"app"}o(Ut,"safeAppSegment");function N(e){if(!e)return"unknown";try{let t=new URL(e).hostname.toLowerCase();if(t==="github.com"||t.endsWith(".github.com"))return"github";if(t==="openpond.ai"||t.endsWith(".openpond.ai"))return"openpond"}catch{return"unknown"}return"local_git"}o(N,"sourceFromRemote");function $(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@").replace(/Authorization:\s*Basic\s+[A-Za-z0-9+/=]+/gi,"Authorization: Basic ***")}o($,"redactRemoteUrl");async function G(e){try{return await k.access(e),!0}catch{return!1}}o(G,"pathExists");async function O(e){return await G(e)?(await u("git",["rev-parse","--git-dir"],e)).code===0:!1}o(O,"isGitRepo");function X(e){return e.length<=st?e:`${e.slice(0,st)}
|
|
3
3
|
|
|
4
4
|
[diff truncated]`}o(X,"truncatePatch");function jt(e){return e.length<=ot?e:`${e.slice(0,ot)}
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i as a,j as b,k as c}from"./chunk-
|
|
2
|
+
import{i as a,j as b,k as c}from"./chunk-GWDPEBFV.js";import"./chunk-FRWPAVCD.js";import"./chunk-HKYGCUA6.js";import"./chunk-P7EHGAOW.js";import"./chunk-M3FDHTJ2.js";import"./chunk-Q7QAKAGF.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import"./chunk-6FA3GG5B.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-FTQLQJQV.js";export{a as resolveWebLaunchMessages,c as runOpenPondAppServerCli,b as runOpenPondServerCli};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-
|
|
2
|
+
import{a as f}from"./chunk-IGRYR3PT.js";import{$a as I,Ba as J,Qa as N,Ra as q,Ua as k,Wa as A,Xa as B,_a as H,b as d,c as w,e as b,hb as E,ib as M,ja as C,jb as T,la as m,ma as j,na as x,oa as F,pa as v,qa as P}from"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import{d as O,f as S,h as g}from"./chunk-H7IWJN7L.js";import"./chunk-CUB5BQIQ.js";import"./chunk-3M53YXEI.js";import{a as l}from"./chunk-FTQLQJQV.js";import R from"node:path";import{readFile as p}from"node:fs/promises";var n=l((t,s)=>typeof t[s]=="string"?t[s]:void 0,"stringOption");function a(t){console.log(JSON.stringify(t,null,2))}l(a,"print");function U(t,s){let i=n(t,"keyPath");if(i){let r=JSON.parse(i);if(Array.isArray(r)&&r.length&&r.every(c=>typeof c=="string"&&c.length))return r;throw new f("--key-path must be a JSON array of key segments.")}if(!s)throw new f("Specify a setting key, or --key-path for keys containing dots.");return s.split(".")}l(U,"keyPath");async function G(t,s){let i=S({home:n(t,"home")}),r=s[0]??"get",c=g(i).config;if(r==="path"){console.log(c);return}if(r==="export"){let e=await T(i),o=n(t,"file");o?(await b(R.resolve(o),JSON.stringify(e,null,2),{privateParent:!1}),a({path:R.resolve(o),requiresRebinding:e.requiresRebinding})):a(e);return}if(r==="backup"||r==="restore"){let e=n(t,"file"),o=n(t,"keyFile");if(!e||!o)throw new f(`config ${r} requires --file <encrypted-backup> and --key-file <separate-32-byte-key-file>.`);let u=await p(o),y=u.length===32?u:Buffer.from(u.toString("utf8").trim(),"base64");try{a(r==="backup"?await E(i,e,y):await M(e,i,y))}finally{y.fill(0),u.fill(0)}return}if(r==="collect-orphans"){a(await N(i));return}if(r==="schema"){a(F());return}if(r==="migrate"){let e=n(t,"resolutionFile"),o=e?q.parse(JSON.parse(await p(e,"utf8"))):void 0;a(await k(i,{resolutions:o,sourceAppHome:n(t,"sourceAppHome"),sourceConfig:n(t,"sourceConfig"),sourceBrowserState:n(t,"sourceBrowserState"),dryRun:t.dryRun===!0||t.dryRun==="true"}));return}if(r==="recover"){let e=n(t,"revision");a(e?await x(i,e,n(t,"expectedRevision")??d(await w(c))):await A(i));return}if(r==="restart-migration"){a(await B(i));return}if(r==="effective"){a(await I(i,{projectRoot:n(t,"projectRoot"),accountId:n(t,"accountId")}));return}if(r==="trust"||r==="untrust"){let e=n(t,"projectRoot")??s[1];if(!e)throw new f("Specify the canonical project root with --project-root.");await H(i,e,n(t,"accountId")??"local",r==="trust"),a({root:e,trusted:r==="trust"});return}if(r==="revisions"){a(await m(i));return}if(r==="validate"){let e=n(t,"file")??c;C(await p(e,"utf8"),e,t.project===!0||t.project==="true"?"project":"user"),a({valid:!0,path:e});return}if(r==="replace"){let e=n(t,"file");if(!e)throw new f("config replace requires --file <validated-toml-file>.");a(await j(i,n(t,"expectedRevision")??d(await w(c)),await p(e,"utf8")));return}if(r==="doctor"){let e=await w(c),o=null;try{await v(i)}catch(u){o=O(u,c)}a({home:i,path:c,rawRevision:d(e),issue:o,recoverableRevisions:await m(i),migration:await w(R.join(g(i).runtime,"migration.json"))!==null}),o&&(process.exitCode=1);return}if(await k(i),r==="clear-cache"){await J(i),a({cleared:!0,path:g(i).cache});return}let h=await v(i);if(r==="get"){if(!s[1]&&!t.keyPath){a(h);return}let e=h.document;for(let o of U(t,s[1]))e=e&&typeof e=="object"?e[o]:void 0;a(e??null);return}if(r==="set"||r==="unset"){let e=U(t,s[1]),o;if(r==="set"){let u=n(t,"value")??s[2];if(u===void 0)throw new f("config set requires a value. Use JSON for arrays, tables, numbers and booleans.");try{o=JSON.parse(u)}catch{o=u}}a(await P(i,n(t,"expectedRevision")??h.rawRevision,[r==="set"?{op:"set",path:e,value:o}:{op:"unset",path:e}]));return}throw new f(`Unknown config command: ${r}`)}l(G,"runConfigurationCommand");export{G as runConfigurationCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-E764DRA6.js";import"./chunk-G2VYRU27.js";import"./chunk-ZVOO7FKM.js";import"./chunk-OGPHXXCD.js";import"./chunk-TWA56GFU.js";import"./chunk-SS3EG6S2.js";import"./chunk-GLUWATL5.js";import"./chunk-UN3A7GEU.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import"./chunk-IGRYR3PT.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-CUB5BQIQ.js";import"./chunk-3M53YXEI.js";import"./chunk-FTQLQJQV.js";export{m as resolveGitBranch,f as runAccount,j as runBacktestRun,p as runCheckUpdate,k as runDeployWatch,g as runHealth,d as runLogin,o as runOpentool,e as runProfiles,l as runRepoCreate,n as runRepoPush,b as runTemplateBranches,a as runTemplateStatus,c as runTemplateUpdate,h as runToolList,i as runToolRun};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{x as f}from"./chunk-G2VYRU27.js";import"./chunk-ZVOO7FKM.js";import"./chunk-OGPHXXCD.js";import"./chunk-TWA56GFU.js";import"./chunk-SS3EG6S2.js";import"./chunk-GLUWATL5.js";import"./chunk-UN3A7GEU.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import{a as c}from"./chunk-
|
|
2
|
+
import{x as f}from"./chunk-G2VYRU27.js";import"./chunk-ZVOO7FKM.js";import"./chunk-OGPHXXCD.js";import"./chunk-TWA56GFU.js";import"./chunk-SS3EG6S2.js";import"./chunk-GLUWATL5.js";import"./chunk-UN3A7GEU.js";import"./chunk-J2S7BOZU.js";import"./chunk-A2PIGBPD.js";import{a as c}from"./chunk-IGRYR3PT.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-CUB5BQIQ.js";import{c as p,f as u}from"./chunk-3M53YXEI.js";import{a as r}from"./chunk-FTQLQJQV.js";import d from"node:path";import{access as v}from"node:fs/promises";import{constants as C}from"node:fs";import{createRequire as P}from"node:module";var l=d.join("scripts","desktop-harness.ts");async function $(n,t){let o=await j({options:n,rest:t}),e=await f(o.command,o.args,{cwd:o.cwd,inherit:!0,timeoutMs:0});if(e.code!==0)throw new m(e.code)}r($,"runDesktopTestCommand");async function j(n){let t=n.options,o=n.rest,e=o[0];if(e!=="run"&&e!=="attach")throw new c(D());let a=o.slice(1);if(a.length===0)throw new c("usage: openpond desktop-test run <scenario...> [options]");let g=p(t,"cwd")||n.cwd||process.cwd(),w=await O(g),k=(n.env??process.env).OPENPOND_NODE_BINARY?.trim()||process.execPath,s=[P(import.meta.url).resolve("tsx/cli"),l,"run",...a],h=x(t,e);return h&&s.push(`--${h}`),i(s,"--app",t,"app"),i(s,"--server",t,"server"),i(s,"--token",t,"token"),i(s,"--token-file",t,"tokenFile"),i(s,"--devtools-port",t,"devtoolsPort"),i(s,"--artifacts-dir",t,"artifactsDir"),H(s,t),i(s,"--grep",t,"grep"),i(s,"--timeout-ms",t,"timeoutMs"),u(t.keepHome)&&s.push("--keep-home"),{command:k,args:s,cwd:w}}r(j,"buildDesktopHarnessInvocation");async function O(n){let t=d.resolve(n);for(;;){let o=d.join(t,l);if(await R(o))return t;let e=d.dirname(t);if(e===t)throw new c(`Could not find ${l}. Run this command from the OpenPond source checkout or pass --cwd <repo>.`);t=e}}r(O,"resolveDesktopHarnessRepoRoot");function x(n,t){let o=t==="attach"?"attach":null;for(let e of["isolated","attach","packaged","none"])if(u(n[e])){if(o&&o!==e)throw new c("Choose only one desktop harness launch mode: --isolated, --attach, --packaged, or --none.");o=e}return o}r(x,"resolveLaunchMode");function i(n,t,o,e){let a=p(o,e);a&&n.push(t,a)}r(i,"appendStringFlag");function H(n,t){let o=p(t,"json"),e=p(t,"jsonPath");if(o&&y(o))throw new c("harness --json requires a report path. Use --json <path> or --json-path <path>.");if(o&&e&&o!==e)throw new c("Use only one JSON report path: --json <path> or --json-path <path>.");let a=o||e;a&&n.push("--json",a)}r(H,"appendJsonFlag");function y(n){return/^(true|false|1|0|yes|no)$/i.test(n)}r(y,"isBooleanLiteral");async function R(n){try{return await v(n,C.R_OK),!0}catch{return!1}}r(R,"fileExists");function D(){return["usage: openpond desktop-test run <scenario...> [options]"," openpond desktop-test attach <scenario...> [options]","","Options include --isolated, --attach, --packaged, --none, --app <path>,","--server <url>, --token <token>, --token-file <path>, --devtools-port <port>, --artifacts-dir <path>,","--json <path>, --json-path <path>, --grep <pattern>, --timeout-ms <ms>,","--keep-home, and --cwd <repo>."].join(`
|
|
3
3
|
`)}r(D,"desktopHarnessCliUsage");var m=class extends Error{static{r(this,"HarnessCommandFailedError")}exitCode;constructor(t){let o=typeof t=="number"&&t>0?t:1;super(`desktop harness failed with exit code ${o}`),this.name="HarnessCommandFailedError",this.exitCode=o}};export{j as buildDesktopHarnessInvocation,O as resolveDesktopHarnessRepoRoot,$ as runDesktopTestCommand};
|