openpond 0.2.0 → 0.2.2
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-F55CBR2K.js +2 -0
- package/dist/chunks/app-layer-GNYLOBCX.js +3 -0
- package/dist/chunks/app-server-runtime-VAGY4LQS.js +2 -0
- package/dist/chunks/apps-HZ5JGBDR.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-6FA3GG5B.js +33 -0
- package/dist/chunks/chunk-6MI4KKWF.js +2 -0
- package/dist/chunks/chunk-7D2LMRP7.js +2 -0
- package/dist/chunks/chunk-A42DFLOR.js +16 -0
- package/dist/chunks/chunk-AF57BF75.js +24 -0
- package/dist/chunks/chunk-BX4J2VDU.js +2 -0
- package/dist/chunks/chunk-BZMVB3GS.js +2 -0
- package/dist/chunks/chunk-CCJG7GLE.js +5 -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-EG3XB6M6.js +5 -0
- package/dist/chunks/chunk-ES2ISFJC.js +66 -0
- package/dist/chunks/chunk-FTQLQJQV.js +2 -0
- package/dist/chunks/chunk-FYCJSUFV.js +53 -0
- package/dist/chunks/chunk-GEANXBLX.js +2 -0
- package/dist/chunks/chunk-GLUWATL5.js +2 -0
- package/dist/chunks/chunk-GPZYIVFV.js +2199 -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-I7G35U7K.js +2 -0
- package/dist/chunks/chunk-IR3YJWPW.js +7 -0
- package/dist/chunks/chunk-J7WZSLHS.js +18 -0
- package/dist/chunks/chunk-K35OOAW2.js +6 -0
- package/dist/chunks/chunk-KDXLNQNF.js +12 -0
- package/dist/chunks/chunk-KJYNLFWD.js +2872 -0
- package/dist/chunks/chunk-KV2IXO2T.js +6 -0
- package/dist/chunks/chunk-NVGMZ2IN.js +2 -0
- package/dist/chunks/chunk-OGPHXXCD.js +1 -0
- package/dist/chunks/chunk-RAKJWIYO.js +36 -0
- package/dist/chunks/chunk-RWSAGQTP.js +2 -0
- package/dist/chunks/chunk-SDO4FC4Q.js +2 -0
- package/dist/chunks/chunk-T5XCPX4P.js +3 -0
- package/dist/chunks/chunk-VYUMTRB3.js +5 -0
- package/dist/chunks/chunk-X37KMV27.js +1 -0
- package/dist/chunks/chunk-XAYIETBO.js +28 -0
- package/dist/chunks/chunk-XEOEKFG6.js +71 -0
- package/dist/chunks/chunk-ZVOO7FKM.js +2 -0
- package/dist/chunks/cli-UYTSZB4Y.js +2 -0
- package/dist/chunks/configuration-command-HAPIYG25.js +2 -0
- package/dist/chunks/continual-D75WA7E7.js +7 -0
- package/dist/chunks/core-commands-N37UZEVE.js +2 -0
- package/dist/chunks/database-X2CUV732.js +2 -0
- package/dist/chunks/desktop-test-V7FBEG7U.js +3 -0
- package/dist/chunks/dist-NKLXFA37.js +2 -0
- package/dist/chunks/extension-NEPOQ44P.js +5 -0
- package/dist/chunks/help-HC4N5ZQC.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-C7XRN4ZW.js +3 -0
- package/dist/chunks/organizations-LQGRZJ2V.js +2 -0
- package/dist/chunks/profile-UWM24A7R.js +3 -0
- package/dist/chunks/project-agent-2ME52ZJW.js +2 -0
- package/dist/chunks/sandbox-command-53L3ZICT.js +2 -0
- package/dist/chunks/sandbox-template-55HUM5H7.js +10 -0
- package/dist/chunks/src-EYJF2LWV.js +319 -0
- package/dist/chunks/src-VGW2UEMV.js +82 -0
- package/dist/chunks/taskset-PISBOILQ.js +2 -0
- package/dist/chunks/teams-bot-FHD2HCHN.js +3 -0
- package/dist/chunks/training-2NDOWH5S.js +2 -0
- package/dist/chunks/workspaces-CQFVCR7T.js +2 -0
- package/dist/cli.js +3 -109
- package/dist/index.js +1 -31230
- package/dist/sandbox-template/manifest.js +1 -18380
- package/dist/web/assets/App-BoJQRfeu.js +176 -0
- package/dist/web/assets/AppDialog-rdfmJsGF.js +1 -0
- package/dist/web/assets/AppTerminalPanel-CLW0kxtg.js +2 -0
- package/dist/web/assets/{AppsView-B1NUuAIf.js → AppsView-DxMXadnp.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-DOvYxXeP.js → BrowserSidebar-BH_jl0JS.js} +1 -1
- package/dist/web/assets/{CartesianChart-pOrYpzBr.js → CartesianChart-oT_rMYpf.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-CgbR-MBJ.js → CollaborationTabs-CukgFGE0.js} +1 -1
- package/dist/web/assets/{CommandMenu-CrIr4qUX.js → CommandMenu-2btBTgOF.js} +1 -1
- package/dist/web/assets/{CommunityView-CvAVQ_HZ.js → CommunityView-DMTREmN5.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-DybcKwwd.js → ComposerCreateImproveStrip-3tN55cg9.js} +1 -1
- package/dist/web/assets/GetStartedView-CMHL24_w.js +1 -0
- package/dist/web/assets/HostedModelLearningReview-CqkSelkC.js +1 -0
- package/dist/web/assets/HostedModelLearningSettings-xqd2lSW3.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-Bpnya5DM.js +1 -0
- package/dist/web/assets/{LabSkillSidebar-CuaYrtiu.js → LabSkillSidebar-BKZjScr8.js} +1 -1
- package/dist/web/assets/LabsRoute-BhPFmA_Z.js +32 -0
- package/dist/web/assets/LabsRoute-C1FWCoYb.css +1 -0
- package/dist/web/assets/MainChatThread-Bosxokt-.js +2 -0
- package/dist/web/assets/MainPane-Di-Rwe7x.js +8 -0
- package/dist/web/assets/{MarkdownText-DOlVQR8a.js → MarkdownText-dK4SBPp_.js} +1 -1
- package/dist/web/assets/{Messages-DMubppta.js → Messages-ftYRMKYa.js} +6 -6
- package/dist/web/assets/{NativeSkillSidebar-DSFwZ-od.js → NativeSkillSidebar-Cwo7JdB2.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-Dj0ePIJ-.js → NewExperienceSwitcher-C1_JzTq2.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-B8NQV-Ji.js → NewProjectDialog-CxP6v6YW.js} +1 -1
- package/dist/web/assets/{OutputsPage-D_LDYTgV.js → OutputsPage-DL21_Alp.js} +1 -1
- package/dist/web/assets/{ProjectsPage-xjDYPc_W.js → ProjectsPage-BO9VyvMA.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-DaqAnzdR.js +1 -0
- package/dist/web/assets/{RightSidebarHomePanel-j0VckZUu.js → RightSidebarHomePanel-PbUG12AO.js} +1 -1
- package/dist/web/assets/{ScheduledWorkPage-1aT4bBY-.js → ScheduledWorkPage-BhL-cXML.js} +1 -1
- package/dist/web/assets/{SettingsView-BSpuMDpv.js → SettingsView-D6-s7G88.js} +7 -7
- package/dist/web/assets/TeamChatView-DbS1N-fo.js +3 -0
- package/dist/web/assets/{TerminalOverlay-CrSwUk2d.js → TerminalOverlay-CphyBXJR.js} +3 -3
- package/dist/web/assets/{TrainingCreationPanel-B4HMRwUg.js → TrainingCreationPanel-Czsdraix.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-D4r1tN3I.js → TrainingDraftPanel-Bq3B5pUk.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-2aymqwIM.js → UsageSettingsSection-B74FNwaP.js} +5 -5
- package/dist/web/assets/{WorkSidebarPanel-B0X0OiR6.js → WorkSidebarPanel-BgaK4XSg.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-C3seHnVY.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-OAfMEt7L.js → WorkspaceEnvironmentMenu-DPghQUdv.js} +3 -3
- package/dist/web/assets/{WorkspaceGitDialogs-YxcPH2Rq.js → WorkspaceGitDialogs-D8c6Okb_.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-COKTiQZl.js → WorkspaceMonacoEditor-2kjRFf4l.js} +36 -36
- package/dist/web/assets/{arrow-up-right-_TX-awvK.js → arrow-up-right-C5X-29oa.js} +1 -1
- package/dist/web/assets/chat-file-links-Bmz9kVct.js +1 -0
- package/dist/web/assets/chevron-up-NbP9vY4E.js +1 -0
- package/dist/web/assets/{clipboard-CyRSS8Sy.js → clipboard-fvHMXPWa.js} +1 -1
- package/dist/web/assets/{cloud-upload-uBJBUYTy.js → cloud-upload-BAycsdHL.js} +1 -1
- package/dist/web/assets/{cssMode-BrXSsZYs.js → cssMode-Yis679a5.js} +1 -1
- package/dist/web/assets/{folder-open-DktdZNW7.js → folder-open-bii4KUCv.js} +1 -1
- package/dist/web/assets/{folder-plus-DO06i9Vo.js → folder-plus-B0B7mUCx.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-zFSIkPs7.js → git-commit-horizontal-B6yTdtnB.js} +1 -1
- package/dist/web/assets/{htmlMode-X9UMFkjt.js → htmlMode-DHeBSKVF.js} +1 -1
- package/dist/web/assets/{index-UOGdfLzi.js → index-667pXXsu.js} +1 -1
- package/dist/web/assets/{index-ByQIHpc9.css → index-BGMzUaup.css} +1 -1
- package/dist/web/assets/{info-BEJXUqCD.js → info-NCOESX3I.js} +1 -1
- package/dist/web/assets/{jsonMode-DIsB-j2E.js → jsonMode-C4oxy1cU.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CmZ17KpA.js → lspLanguageFeatures-CLj3WGZW.js} +1 -1
- package/dist/web/assets/{minimize-2-DumTpFtE.js → minimize-2-DtI1vgd7.js} +1 -1
- package/dist/web/assets/{monaco.contribution-D6w5PJji.js → monaco.contribution-DZPgekIQ.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DJ_NmcHu.js → monaco.contribution-Ddw-TznO.js} +2 -2
- package/dist/web/assets/{monaco.contribution-YVDfJcG4.js → monaco.contribution-DhVPJ-oY.js} +2 -2
- package/dist/web/assets/{monaco.contribution-LZEujgny.js → monaco.contribution-DrW6DjWP.js} +2 -2
- package/dist/web/assets/{play-CLFeH7CU.js → play-DB3XFAnG.js} +1 -1
- package/dist/web/assets/{python-Djbda_qZ.js → python-DLyUeEeL.js} +1 -1
- package/dist/web/assets/{refresh-cw-B4IpQ_7Q.js → refresh-cw-0zSLZtfp.js} +1 -1
- package/dist/web/assets/{save-BbTHztnA.js → save-BCZlshOA.js} +1 -1
- package/dist/web/assets/{square-BJrVbmz6.js → square-CRytZWR_.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-BopU5W9S.js → toggleHighContrast-TXg0rI_R.js} +1 -1
- package/dist/web/assets/{tsMode-CH_0_YDX.js → tsMode-Bj1019AY.js} +1 -1
- package/dist/web/assets/{upload-UumVeufu.js → upload-CnE9u7GB.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-BRa23U7O.js → useLocalAgentSchedules-qI87RHVI.js} +1 -1
- package/dist/web/assets/{wifi-off-BWJWivn6.js → wifi-off-CfuwRBx7.js} +1 -1
- package/dist/web/assets/{workers-pTe8RvSI.js → workers-CXdUI7wU.js} +1 -1
- package/dist/web/assets/{yaml-DNLASORn.js → yaml-AP8aiwLm.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +4 -3
- package/dist/chunks/actions-command-6N5XWMR6.js +0 -185
- package/dist/chunks/app-layer-F3CGXB33.js +0 -216
- package/dist/chunks/app-server-runtime-RHO5TFUC.js +0 -23
- package/dist/chunks/apps-L5XCL7QY.js +0 -429
- package/dist/chunks/chunk-26AMV5ZI.js +0 -634
- package/dist/chunks/chunk-3EB7I67T.js +0 -630
- package/dist/chunks/chunk-3ELF4FXY.js +0 -96
- package/dist/chunks/chunk-3VEYNDHN.js +0 -669
- package/dist/chunks/chunk-4KA25HUP.js +0 -5648
- package/dist/chunks/chunk-4L3ZJS2T.js +0 -1207
- package/dist/chunks/chunk-6SMNG6YA.js +0 -1303
- package/dist/chunks/chunk-7RIGZB7N.js +0 -1148
- package/dist/chunks/chunk-A6G3PFA5.js +0 -2164
- package/dist/chunks/chunk-BVY5JYM6.js +0 -512
- package/dist/chunks/chunk-DLQQIWN2.js +0 -648
- package/dist/chunks/chunk-FJ2JGB2N.js +0 -1373
- package/dist/chunks/chunk-FQS2QL5F.js +0 -14522
- package/dist/chunks/chunk-G65WAOJV.js +0 -1643
- package/dist/chunks/chunk-JTHL5XJ2.js +0 -1838
- package/dist/chunks/chunk-K4TZEHAW.js +0 -602
- package/dist/chunks/chunk-KCRCIQPD.js +0 -66
- package/dist/chunks/chunk-KSRWKXRB.js +0 -12
- package/dist/chunks/chunk-MUMPWI4O.js +0 -92
- package/dist/chunks/chunk-NTK22KJD.js +0 -10707
- package/dist/chunks/chunk-OCBRPU2K.js +0 -629
- package/dist/chunks/chunk-PS37DB5F.js +0 -183
- 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-UZMVNKXM.js +0 -1275
- package/dist/chunks/chunk-VT6BLHMB.js +0 -67198
- package/dist/chunks/chunk-W5GKHH77.js +0 -168
- package/dist/chunks/chunk-X6F4LBTQ.js +0 -832
- package/dist/chunks/chunk-X7ZG4TSW.js +0 -3063
- package/dist/chunks/chunk-XA4KBDMY.js +0 -13723
- package/dist/chunks/chunk-YVCYVDNP.js +0 -746
- package/dist/chunks/chunk-ZNQEROWP.js +0 -254
- package/dist/chunks/cli-D2MUUBEX.js +0 -23
- package/dist/chunks/configuration-command-NR6JYIUD.js +0 -187
- package/dist/chunks/continual-37CE4LLJ.js +0 -803
- package/dist/chunks/core-commands-SWGIOZLW.js +0 -50
- package/dist/chunks/database-DEYUZDIM.js +0 -20
- package/dist/chunks/desktop-test-QOS7G5NE.js +0 -148
- package/dist/chunks/dist-AKYCQNNF.js +0 -187
- package/dist/chunks/extension-HJUJBQAD.js +0 -9378
- package/dist/chunks/help-J6PZ23IC.js +0 -67
- package/dist/chunks/opchat-ABX5YBAT.js +0 -169
- package/dist/chunks/organizations-CPNC47DO.js +0 -806
- package/dist/chunks/profile-Q3HB5MIO.js +0 -1136
- package/dist/chunks/project-agent-YHUBX4OR.js +0 -516
- package/dist/chunks/sandbox-command-YFL5QTWX.js +0 -1661
- package/dist/chunks/sandbox-template-Z6P7NTNF.js +0 -1655
- package/dist/chunks/src-7XEENEBI.js +0 -3628
- package/dist/chunks/src-KBBIV4NT.js +0 -56125
- package/dist/chunks/taskset-2TRZBRRT.js +0 -66
- package/dist/chunks/teams-bot-WD33NLH5.js +0 -146
- package/dist/chunks/training-4XH37UZB.js +0 -17
- package/dist/chunks/workspaces-WG2MH2WE.js +0 -99
- package/dist/web/assets/App-C9aGkxVg.js +0 -173
- package/dist/web/assets/AppDialog-CK6_lg8c.js +0 -1
- package/dist/web/assets/AppTerminalPanel-BKqgX4sd.js +0 -2
- package/dist/web/assets/GetStartedView-DVInkexN.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-NaaPElmM.js +0 -1
- package/dist/web/assets/LabsRoute-BRR6x3SX.js +0 -2
- package/dist/web/assets/LabsRoute-CGFgymTX.css +0 -1
- package/dist/web/assets/MainChatThread-BfkjCZB9.js +0 -2
- package/dist/web/assets/MainPane-Gw-YK38n.js +0 -8
- package/dist/web/assets/RightChatPanelStack-BktRQ9wg.js +0 -1
- package/dist/web/assets/TeamChatView-BPWJbDf1.js +0 -3
- package/dist/web/assets/WorkspaceDiffPanel-Pg7GL0br.js +0 -14
- package/dist/web/assets/chat-file-links-CWLsRYvW.js +0 -1
- package/dist/web/assets/chevron-up--mNnEqha.js +0 -1
- package/dist/web/assets/index-BEPmTPIA.js +0 -1
|
@@ -1,1303 +0,0 @@
|
|
|
1
|
-
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
SandboxAppActionRegistrySchema,
|
|
4
|
-
createRepo,
|
|
5
|
-
getAppEnvironment,
|
|
6
|
-
getOpenPondAccount,
|
|
7
|
-
listApps,
|
|
8
|
-
listConfiguredProfiles,
|
|
9
|
-
loadGlobalConfig,
|
|
10
|
-
saveProfileApiKey,
|
|
11
|
-
setActiveProfile,
|
|
12
|
-
updateGlobalConfig
|
|
13
|
-
} from "./chunk-XA4KBDMY.js";
|
|
14
|
-
import {
|
|
15
|
-
DEFAULT_OPENPOND_CHAT_MODEL,
|
|
16
|
-
ProviderCatalogSchema
|
|
17
|
-
} from "./chunk-4KA25HUP.js";
|
|
18
|
-
import {
|
|
19
|
-
DEFAULT_OPENPOND_API_BASE_URL,
|
|
20
|
-
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
21
|
-
} from "./chunk-JTHL5XJ2.js";
|
|
22
|
-
|
|
23
|
-
// ../../packages/runtime/dist/chat.js
|
|
24
|
-
import { randomUUID } from "node:crypto";
|
|
25
|
-
|
|
26
|
-
// ../../packages/runtime/dist/urls.js
|
|
27
|
-
var DEFAULT_OPENPOND_API_HOST = new URL(DEFAULT_OPENPOND_API_BASE_URL).hostname;
|
|
28
|
-
var DEFAULT_OPENPOND_WEB_HOST = new URL(DEFAULT_OPENPOND_WEB_BASE_URL).hostname;
|
|
29
|
-
var DEFAULT_OPENPOND_OPCHAT_API_BASE_URL = `${DEFAULT_OPENPOND_API_BASE_URL}/opchat/v1`;
|
|
30
|
-
function normalizeBaseUrl(value) {
|
|
31
|
-
if (!value)
|
|
32
|
-
return null;
|
|
33
|
-
const trimmed = value.trim();
|
|
34
|
-
return trimmed ? trimmed.replace(/\/+$/, "") : null;
|
|
35
|
-
}
|
|
36
|
-
function mapUiBaseToApiBase(baseUrl) {
|
|
37
|
-
const trimmed = normalizeBaseUrl(baseUrl);
|
|
38
|
-
if (!trimmed)
|
|
39
|
-
return null;
|
|
40
|
-
try {
|
|
41
|
-
const url = new URL(trimmed);
|
|
42
|
-
const host = url.hostname.toLowerCase();
|
|
43
|
-
if (host === DEFAULT_OPENPOND_API_HOST)
|
|
44
|
-
return DEFAULT_OPENPOND_API_BASE_URL;
|
|
45
|
-
if (host === DEFAULT_OPENPOND_WEB_HOST || host === "openpond.live" || host === "www.openpond.live") {
|
|
46
|
-
return DEFAULT_OPENPOND_API_BASE_URL;
|
|
47
|
-
}
|
|
48
|
-
if (host.startsWith("api."))
|
|
49
|
-
return trimmed;
|
|
50
|
-
} catch {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
function resolvePublicApiBaseUrl(account, config) {
|
|
56
|
-
const envBase = normalizeBaseUrl(process.env.OPENPOND_API_URL);
|
|
57
|
-
if (envBase)
|
|
58
|
-
return envBase;
|
|
59
|
-
const accountApiBase = normalizeBaseUrl(account?.apiBaseUrl);
|
|
60
|
-
if (accountApiBase)
|
|
61
|
-
return accountApiBase;
|
|
62
|
-
const configApiBase = normalizeBaseUrl(config.apiBaseUrl);
|
|
63
|
-
if (configApiBase)
|
|
64
|
-
return configApiBase;
|
|
65
|
-
const mappedEnvBase = mapUiBaseToApiBase(process.env.OPENPOND_BASE_URL);
|
|
66
|
-
if (mappedEnvBase)
|
|
67
|
-
return mappedEnvBase;
|
|
68
|
-
const mappedConfigBase = mapUiBaseToApiBase(account?.baseUrl || config.baseUrl);
|
|
69
|
-
return mappedConfigBase ?? DEFAULT_OPENPOND_API_BASE_URL;
|
|
70
|
-
}
|
|
71
|
-
function resolveHostedChatApiBaseUrl(account, config, publicApiBaseUrl) {
|
|
72
|
-
return resolveOpChatApiBaseUrl(account, config, publicApiBaseUrl);
|
|
73
|
-
}
|
|
74
|
-
function resolveOpChatApiBaseUrl(account, config, publicApiBaseUrl) {
|
|
75
|
-
const runtimeEnv = typeof process !== "undefined" ? process.env : {};
|
|
76
|
-
return normalizeOpChatApiBaseUrl(runtimeEnv.OPENPOND_OPCHAT_API_URL) ?? normalizeOpChatApiBaseUrl(account?.chatApiBaseUrl ?? config.chatApiBaseUrl) ?? normalizeOpChatApiBaseUrl(runtimeEnv.OPENPOND_CHAT_API_URL) ?? opChatBaseFromPublicApiBase(publicApiBaseUrl);
|
|
77
|
-
}
|
|
78
|
-
function normalizeOpChatApiBaseUrl(value) {
|
|
79
|
-
const normalized = normalizeBaseUrl(value);
|
|
80
|
-
if (!normalized)
|
|
81
|
-
return null;
|
|
82
|
-
try {
|
|
83
|
-
const url = new URL(normalized);
|
|
84
|
-
const segments = url.pathname.split("/").filter(Boolean);
|
|
85
|
-
const opChatIndex = segments.findIndex((segment) => segment.toLowerCase() === "opchat");
|
|
86
|
-
if (opChatIndex >= 0) {
|
|
87
|
-
url.pathname = `/${[...segments.slice(0, opChatIndex + 1), "v1"].join("/")}`;
|
|
88
|
-
url.search = "";
|
|
89
|
-
url.hash = "";
|
|
90
|
-
return normalizeBaseUrl(url.toString()) ?? null;
|
|
91
|
-
}
|
|
92
|
-
const v1Index = segments.findIndex((segment) => segment.toLowerCase() === "v1");
|
|
93
|
-
if (v1Index >= 0) {
|
|
94
|
-
url.pathname = "/opchat/v1";
|
|
95
|
-
url.search = "";
|
|
96
|
-
url.hash = "";
|
|
97
|
-
return normalizeBaseUrl(url.toString()) ?? null;
|
|
98
|
-
}
|
|
99
|
-
url.pathname = `${url.pathname.replace(/\/+$/, "")}/opchat/v1`.replace(/\/{2,}/g, "/");
|
|
100
|
-
url.search = "";
|
|
101
|
-
url.hash = "";
|
|
102
|
-
return normalizeBaseUrl(url.toString()) ?? null;
|
|
103
|
-
} catch {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function opChatBaseFromPublicApiBase(publicApiBaseUrl) {
|
|
108
|
-
return normalizeOpChatApiBaseUrl(publicApiBaseUrl) ?? DEFAULT_OPENPOND_OPCHAT_API_BASE_URL;
|
|
109
|
-
}
|
|
110
|
-
function deriveEnvironment(fallback) {
|
|
111
|
-
if (fallback?.trim())
|
|
112
|
-
return fallback.trim();
|
|
113
|
-
return "production";
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ../../packages/runtime/dist/selectors.js
|
|
117
|
-
function accountToken(account, env = process.env) {
|
|
118
|
-
const candidates = [
|
|
119
|
-
account?.apiKey,
|
|
120
|
-
account?.session?.token,
|
|
121
|
-
account?.token,
|
|
122
|
-
env.OPENPOND_API_KEY
|
|
123
|
-
];
|
|
124
|
-
for (const value of candidates) {
|
|
125
|
-
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
126
|
-
if (trimmed)
|
|
127
|
-
return trimmed;
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
function handleEquals(left, right) {
|
|
132
|
-
return Boolean(left && right && left.toLowerCase() === right.toLowerCase());
|
|
133
|
-
}
|
|
134
|
-
function baseUrlEquals(left, right) {
|
|
135
|
-
return normalizeBaseUrl(left) === normalizeBaseUrl(right);
|
|
136
|
-
}
|
|
137
|
-
function profileKey(handle, baseUrl) {
|
|
138
|
-
const normalizedHandle = handle?.trim().toLowerCase() || "";
|
|
139
|
-
return `${normalizedHandle}|${normalizeBaseUrl(baseUrl) ?? "default"}`;
|
|
140
|
-
}
|
|
141
|
-
function selectorBaseUrl(selector) {
|
|
142
|
-
return normalizeBaseUrl(selector?.baseUrl);
|
|
143
|
-
}
|
|
144
|
-
function selectorFromAccount(account) {
|
|
145
|
-
const baseUrl = normalizeBaseUrl(account.baseUrl);
|
|
146
|
-
return baseUrl ? { handle: account.handle, baseUrl } : { handle: account.handle };
|
|
147
|
-
}
|
|
148
|
-
function normalizeActiveProfile(value) {
|
|
149
|
-
const handle = typeof value?.handle === "string" ? value.handle.trim() : "";
|
|
150
|
-
if (!handle)
|
|
151
|
-
return null;
|
|
152
|
-
const baseUrl = normalizeBaseUrl(value?.baseUrl);
|
|
153
|
-
return baseUrl ? { handle, baseUrl } : { handle };
|
|
154
|
-
}
|
|
155
|
-
function accountMatchesSelector(account, selector) {
|
|
156
|
-
if (!handleEquals(account.handle, selector.handle))
|
|
157
|
-
return false;
|
|
158
|
-
const baseUrl = selectorBaseUrl(selector);
|
|
159
|
-
if (baseUrl)
|
|
160
|
-
return baseUrlEquals(account.baseUrl, baseUrl);
|
|
161
|
-
return !normalizeBaseUrl(account.baseUrl);
|
|
162
|
-
}
|
|
163
|
-
function profileMatchesSelector(profile, selector) {
|
|
164
|
-
if (!handleEquals(profile.handle, selector.handle))
|
|
165
|
-
return false;
|
|
166
|
-
const baseUrl = selectorBaseUrl(selector);
|
|
167
|
-
if (baseUrl)
|
|
168
|
-
return baseUrlEquals(profile.baseUrl, baseUrl);
|
|
169
|
-
return !normalizeBaseUrl(profile.baseUrl);
|
|
170
|
-
}
|
|
171
|
-
function findActiveAccount(config, requestedHandle, requestedBaseUrl) {
|
|
172
|
-
const accounts = Array.isArray(config.accounts) ? config.accounts : [];
|
|
173
|
-
const requestedProfile = requestedHandle || process.env.OPENPOND_ACCOUNT ? normalizeActiveProfile({
|
|
174
|
-
handle: requestedHandle || process.env.OPENPOND_ACCOUNT || "",
|
|
175
|
-
baseUrl: requestedBaseUrl ?? process.env.OPENPOND_BASE_URL ?? null
|
|
176
|
-
}) : normalizeActiveProfile(config.activeProfile);
|
|
177
|
-
if (requestedProfile) {
|
|
178
|
-
const exact = accounts.find((account) => accountMatchesSelector(account, requestedProfile));
|
|
179
|
-
if (exact)
|
|
180
|
-
return exact;
|
|
181
|
-
const sameHandle = accounts.filter((account) => handleEquals(account.handle, requestedProfile.handle));
|
|
182
|
-
if (sameHandle.length === 1)
|
|
183
|
-
return sameHandle[0] ?? null;
|
|
184
|
-
return null;
|
|
185
|
-
}
|
|
186
|
-
if (accounts[0])
|
|
187
|
-
return accounts[0];
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
function fallbackProfilesFromConfig(config) {
|
|
191
|
-
const accounts = Array.isArray(config.accounts) ? config.accounts : [];
|
|
192
|
-
const activeProfile = normalizeActiveProfile(config.activeProfile) ?? (accounts[0] ? selectorFromAccount(accounts[0]) : null);
|
|
193
|
-
return normalizeProfiles(accounts.map((account) => ({
|
|
194
|
-
handle: account.handle,
|
|
195
|
-
baseUrl: normalizeBaseUrl(account.baseUrl),
|
|
196
|
-
apiBaseUrl: normalizeBaseUrl(account.apiBaseUrl),
|
|
197
|
-
chatApiBaseUrl: normalizeBaseUrl(account.chatApiBaseUrl),
|
|
198
|
-
environment: deriveEnvironment(account.environment),
|
|
199
|
-
isActive: activeProfile ? accountMatchesSelector(account, activeProfile) : false,
|
|
200
|
-
hasApiKey: Boolean(account.apiKey?.trim()),
|
|
201
|
-
hasSessionToken: Boolean(account.session?.token?.trim() || account.token?.trim()),
|
|
202
|
-
sessionAppId: account.session?.appId ?? null,
|
|
203
|
-
sessionConversationId: account.session?.conversationId ?? null
|
|
204
|
-
})));
|
|
205
|
-
}
|
|
206
|
-
function normalizeProfiles(profiles) {
|
|
207
|
-
const result = /* @__PURE__ */ new Map();
|
|
208
|
-
for (const profile of profiles) {
|
|
209
|
-
const normalizedBaseUrl = normalizeBaseUrl(profile.baseUrl);
|
|
210
|
-
const key = `${profile.handle.toLowerCase()}|${normalizedBaseUrl ?? "default"}`;
|
|
211
|
-
const normalized = {
|
|
212
|
-
...profile,
|
|
213
|
-
baseUrl: normalizedBaseUrl,
|
|
214
|
-
apiBaseUrl: normalizeBaseUrl(profile.apiBaseUrl),
|
|
215
|
-
chatApiBaseUrl: normalizeBaseUrl(profile.chatApiBaseUrl),
|
|
216
|
-
environment: deriveEnvironment(profile.environment),
|
|
217
|
-
isActive: profile.isActive
|
|
218
|
-
};
|
|
219
|
-
const current = result.get(key);
|
|
220
|
-
if (!current || normalized.isActive && !current.isActive || normalized.hasApiKey && !current.hasApiKey) {
|
|
221
|
-
result.set(key, normalized);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return Array.from(result.values());
|
|
225
|
-
}
|
|
226
|
-
function profileAuthHealth(profile) {
|
|
227
|
-
return profile.hasApiKey || profile.hasSessionToken ? "signed_in" : "signed_out";
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// ../../packages/runtime/dist/account-state.js
|
|
231
|
-
function normalizeHealth(health, apiBaseUrl) {
|
|
232
|
-
if (!health)
|
|
233
|
-
return null;
|
|
234
|
-
return {
|
|
235
|
-
reachable: health.reachable,
|
|
236
|
-
authenticated: health.authenticated,
|
|
237
|
-
apiBase: health.apiBase || apiBaseUrl,
|
|
238
|
-
latencyMs: health.latencyMs,
|
|
239
|
-
status: health.status,
|
|
240
|
-
service: health.service,
|
|
241
|
-
checkedAt: health.checkedAt,
|
|
242
|
-
error: health.error ?? null
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function normalizeProfile(response) {
|
|
246
|
-
const account = response?.account;
|
|
247
|
-
if (!account)
|
|
248
|
-
return null;
|
|
249
|
-
return {
|
|
250
|
-
id: account.id ?? null,
|
|
251
|
-
email: account.email ?? null,
|
|
252
|
-
name: account.name ?? null,
|
|
253
|
-
handle: account.handle ?? null,
|
|
254
|
-
image: account.image ?? null,
|
|
255
|
-
timezone: account.timezone ?? null,
|
|
256
|
-
isAdmin: account.isAdmin ?? null,
|
|
257
|
-
isVerified: account.isVerified ?? null,
|
|
258
|
-
dailyAgentAppId: account.dailyAgentAppId ?? null,
|
|
259
|
-
dailyAgentDeploymentId: account.dailyAgentDeploymentId ?? null,
|
|
260
|
-
credits: account.credits ?? null
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
function normalizeProducts(products) {
|
|
264
|
-
return (products ?? []).map((product) => ({
|
|
265
|
-
...product,
|
|
266
|
-
id: product.id || product.userProductId || product.openPondProductId || product.name,
|
|
267
|
-
name: product.name,
|
|
268
|
-
type: product.type,
|
|
269
|
-
status: product.status,
|
|
270
|
-
isActive: product.isActive ?? null,
|
|
271
|
-
price: product.price ?? null,
|
|
272
|
-
currency: product.currency ?? null,
|
|
273
|
-
credits: product.credits ?? null
|
|
274
|
-
}));
|
|
275
|
-
}
|
|
276
|
-
function isEmptyDefaultProfile(profile) {
|
|
277
|
-
return profile.handle.trim().toLowerCase() === "default" && !normalizeBaseUrl(profile.baseUrl) && !profile.hasApiKey && !profile.hasSessionToken;
|
|
278
|
-
}
|
|
279
|
-
function toAccountState(input) {
|
|
280
|
-
const { config, profiles, account, token, apiBaseUrl, accountResponse, accountProfiles, health, authFailed, error } = input;
|
|
281
|
-
const chatApiBaseUrl = resolveHostedChatApiBaseUrl(account, config, apiBaseUrl);
|
|
282
|
-
const profile = normalizeProfile(accountResponse ?? null);
|
|
283
|
-
const configActiveProfile = normalizeActiveProfile(config.activeProfile);
|
|
284
|
-
const accountSelector = account ? selectorFromAccount(account) : null;
|
|
285
|
-
const activeSelector = accountSelector ?? configActiveProfile;
|
|
286
|
-
const displayHandle = profile?.handle || account?.handle || activeSelector?.handle || null;
|
|
287
|
-
const activeProfileRow = (activeSelector ? profiles.find((candidate) => profileMatchesSelector(candidate, activeSelector)) : null) ?? profiles.find((candidate) => candidate.isActive) ?? null;
|
|
288
|
-
const healthState = authFailed ? "auth_error" : token ? "signed_in" : "signed_out";
|
|
289
|
-
const label = profile?.name || profile?.handle || profile?.email || displayHandle || "Signed out";
|
|
290
|
-
const baseUrl = normalizeBaseUrl(activeProfileRow?.baseUrl || account?.baseUrl || DEFAULT_OPENPOND_WEB_BASE_URL);
|
|
291
|
-
const environment = deriveEnvironment(activeProfileRow?.environment || account?.environment);
|
|
292
|
-
const activeProfile = normalizeActiveProfile(activeSelector) ?? (displayHandle ? normalizeActiveProfile({ handle: displayHandle, baseUrl: activeProfileRow?.baseUrl ?? account?.baseUrl }) : null);
|
|
293
|
-
const profileRows = profiles.length > 0 ? profiles : displayHandle ? [
|
|
294
|
-
{
|
|
295
|
-
handle: displayHandle,
|
|
296
|
-
baseUrl: selectorBaseUrl(activeProfile) ?? normalizeBaseUrl(account?.baseUrl),
|
|
297
|
-
apiBaseUrl,
|
|
298
|
-
chatApiBaseUrl,
|
|
299
|
-
environment,
|
|
300
|
-
isActive: true,
|
|
301
|
-
hasApiKey: Boolean(token),
|
|
302
|
-
hasSessionToken: false,
|
|
303
|
-
sessionAppId: null,
|
|
304
|
-
sessionConversationId: null
|
|
305
|
-
}
|
|
306
|
-
] : [];
|
|
307
|
-
const visibleProfileRows = profileRows.filter((candidate) => !isEmptyDefaultProfile(candidate));
|
|
308
|
-
return {
|
|
309
|
-
state: healthState,
|
|
310
|
-
activeProfile,
|
|
311
|
-
label,
|
|
312
|
-
email: profile?.email ?? null,
|
|
313
|
-
avatarUrl: profile?.image ?? null,
|
|
314
|
-
environment,
|
|
315
|
-
baseUrl,
|
|
316
|
-
apiBaseUrl,
|
|
317
|
-
chatApiBaseUrl,
|
|
318
|
-
creditsLabel: profile?.credits ?? null,
|
|
319
|
-
profile,
|
|
320
|
-
products: normalizeProducts(accountResponse?.products),
|
|
321
|
-
apiHealth: normalizeHealth(health ?? null, apiBaseUrl),
|
|
322
|
-
accounts: visibleProfileRows.map((candidate) => {
|
|
323
|
-
const candidateBaseUrl = normalizeBaseUrl(candidate.baseUrl);
|
|
324
|
-
const profileLookup = accountProfiles?.[profileKey(candidate.handle, candidateBaseUrl)] ?? null;
|
|
325
|
-
const candidateProfile = normalizeProfile(profileLookup?.response ?? null);
|
|
326
|
-
return {
|
|
327
|
-
handle: candidate.handle,
|
|
328
|
-
baseUrl: candidateBaseUrl,
|
|
329
|
-
apiBaseUrl: normalizeBaseUrl(candidate.apiBaseUrl),
|
|
330
|
-
chatApiBaseUrl: normalizeBaseUrl(candidate.chatApiBaseUrl),
|
|
331
|
-
environment: deriveEnvironment(candidate.environment),
|
|
332
|
-
isActive: activeProfile ? profileMatchesSelector(candidate, activeProfile) : false,
|
|
333
|
-
authHealth: profileLookup?.authFailed ? "auth_error" : profileAuthHealth(candidate),
|
|
334
|
-
displayLabel: candidateProfile?.name || candidateProfile?.handle || candidateProfile?.email || candidate.handle,
|
|
335
|
-
email: candidateProfile?.email ?? null,
|
|
336
|
-
avatarUrl: candidateProfile?.image ?? null
|
|
337
|
-
};
|
|
338
|
-
}),
|
|
339
|
-
error: error ?? health?.error ?? null
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// ../../packages/runtime/dist/account-context.js
|
|
344
|
-
async function loadProfiles(config) {
|
|
345
|
-
try {
|
|
346
|
-
return normalizeProfiles(await listConfiguredProfiles());
|
|
347
|
-
} catch {
|
|
348
|
-
return fallbackProfilesFromConfig(config);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
async function loadOpenPondAccountContext(requestedHandle, requestedBaseUrl) {
|
|
352
|
-
const config = await loadGlobalConfig();
|
|
353
|
-
const profiles = await loadProfiles(config);
|
|
354
|
-
const account = findActiveAccount(config, requestedHandle, requestedBaseUrl);
|
|
355
|
-
const token = accountToken(account);
|
|
356
|
-
const apiBaseUrl = resolvePublicApiBaseUrl(account, config);
|
|
357
|
-
const chatApiBaseUrl = resolveHostedChatApiBaseUrl(account, config, apiBaseUrl);
|
|
358
|
-
return {
|
|
359
|
-
config,
|
|
360
|
-
profiles,
|
|
361
|
-
account,
|
|
362
|
-
token,
|
|
363
|
-
apiBaseUrl,
|
|
364
|
-
chatApiBaseUrl,
|
|
365
|
-
accountState: toAccountState({ config, profiles, account, token, apiBaseUrl })
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
async function switchOpenPondAccount(input) {
|
|
369
|
-
const baseUrl = normalizeBaseUrl(input.baseUrl);
|
|
370
|
-
await setActiveProfile(input.handle, {
|
|
371
|
-
baseUrl
|
|
372
|
-
});
|
|
373
|
-
return loadOpenPondAccountContext(input.handle, baseUrl);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// ../../packages/runtime/dist/errors.js
|
|
377
|
-
function errorMessage(error) {
|
|
378
|
-
return error instanceof Error ? error.message : String(error);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// ../../packages/runtime/dist/chat.js
|
|
382
|
-
var PROVIDER_CATALOG_FETCH_TIMEOUT_MS = 15e3;
|
|
383
|
-
function displayNameForHostedModel(id) {
|
|
384
|
-
if (id === DEFAULT_OPENPOND_CHAT_MODEL)
|
|
385
|
-
return "OpenPond Chat";
|
|
386
|
-
if (id === "deepseek-v4-flash")
|
|
387
|
-
return "DeepSeek V4 Flash";
|
|
388
|
-
return id.replace(/[-_/]+/g, " ");
|
|
389
|
-
}
|
|
390
|
-
function normalizeHostedModel(model) {
|
|
391
|
-
const id = typeof model.id === "string" ? model.id : null;
|
|
392
|
-
if (!id)
|
|
393
|
-
return null;
|
|
394
|
-
return {
|
|
395
|
-
id,
|
|
396
|
-
displayName: displayNameForHostedModel(id),
|
|
397
|
-
ownedBy: typeof model.owned_by === "string" ? model.owned_by : null,
|
|
398
|
-
streaming: true,
|
|
399
|
-
raw: model
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
async function loadOpenPondHostedModels() {
|
|
403
|
-
const context = await loadOpenPondAccountContext();
|
|
404
|
-
if (!context.token) {
|
|
405
|
-
return {
|
|
406
|
-
models: [],
|
|
407
|
-
error: "No OpenPond API key or session token is configured."
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
try {
|
|
411
|
-
const result = await listOpChatModels({
|
|
412
|
-
apiBaseUrl: context.chatApiBaseUrl,
|
|
413
|
-
token: context.token
|
|
414
|
-
});
|
|
415
|
-
const models = result.data.map((model) => normalizeHostedModel(model)).filter((value) => Boolean(value));
|
|
416
|
-
return {
|
|
417
|
-
models,
|
|
418
|
-
error: null
|
|
419
|
-
};
|
|
420
|
-
} catch (error) {
|
|
421
|
-
return {
|
|
422
|
-
models: [],
|
|
423
|
-
error: errorMessage(error)
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
async function loadOpenPondProviderCatalog() {
|
|
428
|
-
const context = await loadOpenPondAccountContext();
|
|
429
|
-
if (!context.token) {
|
|
430
|
-
return {
|
|
431
|
-
catalog: null,
|
|
432
|
-
error: "No OpenPond API key or session token is configured."
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
const controller = new AbortController();
|
|
436
|
-
const timeout = setTimeout(() => {
|
|
437
|
-
controller.abort(new Error("OpenPond provider catalog request timed out."));
|
|
438
|
-
}, PROVIDER_CATALOG_FETCH_TIMEOUT_MS);
|
|
439
|
-
try {
|
|
440
|
-
const catalog = await listOpChatProviderCatalog({
|
|
441
|
-
apiBaseUrl: context.chatApiBaseUrl,
|
|
442
|
-
token: context.token,
|
|
443
|
-
signal: controller.signal
|
|
444
|
-
});
|
|
445
|
-
return {
|
|
446
|
-
catalog,
|
|
447
|
-
error: null
|
|
448
|
-
};
|
|
449
|
-
} catch (error) {
|
|
450
|
-
return {
|
|
451
|
-
catalog: null,
|
|
452
|
-
error: errorMessage(error)
|
|
453
|
-
};
|
|
454
|
-
} finally {
|
|
455
|
-
clearTimeout(timeout);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
async function* streamOpenPondHostedChatTurn(input) {
|
|
459
|
-
const context = await loadOpenPondAccountContext();
|
|
460
|
-
if (!context.token) {
|
|
461
|
-
throw new Error("OpenPond is signed out. Add an account in Settings before using OpenPond Chat.");
|
|
462
|
-
}
|
|
463
|
-
yield* streamOpChatChatCompletion({
|
|
464
|
-
apiBaseUrl: context.chatApiBaseUrl,
|
|
465
|
-
token: context.token,
|
|
466
|
-
model: input.model || DEFAULT_OPENPOND_CHAT_MODEL,
|
|
467
|
-
messages: input.messages,
|
|
468
|
-
tools: input.tools,
|
|
469
|
-
toolChoice: input.toolChoice,
|
|
470
|
-
requestId: input.requestId,
|
|
471
|
-
reasoningEffort: input.reasoningEffort,
|
|
472
|
-
maxTokens: input.maxTokens,
|
|
473
|
-
temperature: input.temperature,
|
|
474
|
-
topP: input.topP,
|
|
475
|
-
signal: input.signal
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
async function listOpChatModels(options) {
|
|
479
|
-
const requestUrl = opChatEndpointUrl(options.apiBaseUrl, "models");
|
|
480
|
-
const response = await fetch(requestUrl, {
|
|
481
|
-
method: "GET",
|
|
482
|
-
headers: opChatHeaders(options.token, "application/json"),
|
|
483
|
-
signal: options.signal
|
|
484
|
-
});
|
|
485
|
-
if (!response.ok) {
|
|
486
|
-
throw new Error(`OpenPond OpChat model list failed: ${response.status} ${await readOpChatError(response)}`);
|
|
487
|
-
}
|
|
488
|
-
return await response.json();
|
|
489
|
-
}
|
|
490
|
-
async function listOpChatProviderCatalog(options) {
|
|
491
|
-
const requestUrl = opChatEndpointUrl(options.apiBaseUrl, "provider-catalog");
|
|
492
|
-
const response = await fetch(requestUrl, {
|
|
493
|
-
method: "GET",
|
|
494
|
-
headers: opChatHeaders(options.token, "application/json"),
|
|
495
|
-
signal: options.signal
|
|
496
|
-
});
|
|
497
|
-
if (!response.ok) {
|
|
498
|
-
throw new Error(`OpenPond OpChat provider catalog failed: ${response.status} ${await readOpChatError(response)}`);
|
|
499
|
-
}
|
|
500
|
-
return ProviderCatalogSchema.parse(await response.json());
|
|
501
|
-
}
|
|
502
|
-
async function* streamOpChatChatCompletion(options) {
|
|
503
|
-
const requestUrl = opChatEndpointUrl(options.apiBaseUrl, "chat/completions");
|
|
504
|
-
const response = await fetch(requestUrl, {
|
|
505
|
-
method: "POST",
|
|
506
|
-
headers: opChatHeaders(options.token, "text/event-stream", options.requestId),
|
|
507
|
-
body: JSON.stringify(buildOpChatBody(options, true)),
|
|
508
|
-
signal: options.signal
|
|
509
|
-
});
|
|
510
|
-
if (!response.ok) {
|
|
511
|
-
throw new Error(`OpenPond OpChat request failed: ${response.status} ${await readOpChatError(response)}`);
|
|
512
|
-
}
|
|
513
|
-
if (!response.body) {
|
|
514
|
-
throw new Error("OpenPond OpChat request failed: streaming response body is missing.");
|
|
515
|
-
}
|
|
516
|
-
const toolCalls = /* @__PURE__ */ new Map();
|
|
517
|
-
let sawDone = false;
|
|
518
|
-
let finishReason = null;
|
|
519
|
-
let lastPayload = {};
|
|
520
|
-
let accumulatedReasoning = "";
|
|
521
|
-
let usage = null;
|
|
522
|
-
const responseHeaderUsage = cacheUsageFromResponseHeaders(response.headers);
|
|
523
|
-
const reader = response.body.getReader();
|
|
524
|
-
const decoder = new TextDecoder();
|
|
525
|
-
let buffer = "";
|
|
526
|
-
let dataLines = [];
|
|
527
|
-
const consumeEvent = () => {
|
|
528
|
-
if (dataLines.length === 0)
|
|
529
|
-
return [];
|
|
530
|
-
const data = dataLines.join("\n");
|
|
531
|
-
dataLines = [];
|
|
532
|
-
if (data === "[DONE]") {
|
|
533
|
-
sawDone = true;
|
|
534
|
-
return [];
|
|
535
|
-
}
|
|
536
|
-
let payload;
|
|
537
|
-
try {
|
|
538
|
-
payload = JSON.parse(data);
|
|
539
|
-
} catch {
|
|
540
|
-
throw new Error("OpenPond OpChat request failed: malformed streaming event.");
|
|
541
|
-
}
|
|
542
|
-
if (payload && typeof payload === "object" && "error" in payload) {
|
|
543
|
-
throw new Error(`OpenPond OpChat request failed: ${errorMessageFromPayload(payload)}`);
|
|
544
|
-
}
|
|
545
|
-
lastPayload = payload;
|
|
546
|
-
const record = payload && typeof payload === "object" ? payload : {};
|
|
547
|
-
const choices = Array.isArray(record.choices) ? record.choices : [];
|
|
548
|
-
const choice = choices[0] && typeof choices[0] === "object" ? choices[0] : {};
|
|
549
|
-
const delta = choice.delta && typeof choice.delta === "object" ? choice.delta : {};
|
|
550
|
-
const deltas = [];
|
|
551
|
-
const reasoningChunk = streamTextValue(delta.reasoning_content);
|
|
552
|
-
if (reasoningChunk) {
|
|
553
|
-
accumulatedReasoning += reasoningChunk;
|
|
554
|
-
deltas.push({ type: "reasoning_delta", text: reasoningChunk, raw: payload });
|
|
555
|
-
}
|
|
556
|
-
const textChunk = streamTextValue(delta.content);
|
|
557
|
-
if (textChunk) {
|
|
558
|
-
deltas.push({ type: "text_delta", text: textChunk, raw: payload });
|
|
559
|
-
}
|
|
560
|
-
mergeOpChatToolCallDeltas(toolCalls, delta.tool_calls);
|
|
561
|
-
finishReason = stringValue(choice.finish_reason) ?? finishReason;
|
|
562
|
-
usage = parseUsage(payload) ?? usage;
|
|
563
|
-
return deltas;
|
|
564
|
-
};
|
|
565
|
-
const consumeLine = (line) => {
|
|
566
|
-
const normalized = line.endsWith("\r") ? line.slice(0, -1) : line;
|
|
567
|
-
if (!normalized) {
|
|
568
|
-
return consumeEvent();
|
|
569
|
-
}
|
|
570
|
-
if (normalized.startsWith(":"))
|
|
571
|
-
return [];
|
|
572
|
-
if (normalized.startsWith("data:")) {
|
|
573
|
-
dataLines.push(normalized.slice("data:".length).trimStart());
|
|
574
|
-
}
|
|
575
|
-
return [];
|
|
576
|
-
};
|
|
577
|
-
try {
|
|
578
|
-
while (true) {
|
|
579
|
-
const result = await reader.read();
|
|
580
|
-
if (result.done)
|
|
581
|
-
break;
|
|
582
|
-
buffer += decoder.decode(result.value, { stream: true });
|
|
583
|
-
const lines = buffer.split("\n");
|
|
584
|
-
buffer = lines.pop() ?? "";
|
|
585
|
-
for (const line of lines) {
|
|
586
|
-
for (const delta of consumeLine(line))
|
|
587
|
-
yield delta;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
buffer += decoder.decode();
|
|
591
|
-
if (buffer) {
|
|
592
|
-
for (const delta of consumeLine(buffer))
|
|
593
|
-
yield delta;
|
|
594
|
-
}
|
|
595
|
-
for (const delta of consumeEvent())
|
|
596
|
-
yield delta;
|
|
597
|
-
} finally {
|
|
598
|
-
reader.releaseLock();
|
|
599
|
-
}
|
|
600
|
-
if (!sawDone) {
|
|
601
|
-
throw new Error("OpenPond OpChat request failed: stream ended before [DONE].");
|
|
602
|
-
}
|
|
603
|
-
const completedToolCalls = completedOpChatToolCalls(toolCalls);
|
|
604
|
-
if (completedToolCalls.length > 0) {
|
|
605
|
-
yield { type: "tool_call_delta", toolCalls: completedToolCalls, raw: lastPayload };
|
|
606
|
-
}
|
|
607
|
-
if (completedToolCalls.length > 0 && accumulatedReasoning) {
|
|
608
|
-
yield {
|
|
609
|
-
type: "continuation",
|
|
610
|
-
continuation: {
|
|
611
|
-
kind: "chat_completions_reasoning",
|
|
612
|
-
reasoningContent: accumulatedReasoning
|
|
613
|
-
},
|
|
614
|
-
raw: lastPayload
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
const completedUsage = usageWithResponseHeaderCache(usage, responseHeaderUsage);
|
|
618
|
-
if (completedUsage)
|
|
619
|
-
yield { type: "usage", usage: completedUsage, raw: lastPayload };
|
|
620
|
-
yield { type: "finish", finishReason, raw: lastPayload };
|
|
621
|
-
}
|
|
622
|
-
function cacheUsageFromResponseHeaders(headers) {
|
|
623
|
-
const promptTokens = firstHeaderTokenCount(headers, [
|
|
624
|
-
"fireworks-prompt-tokens",
|
|
625
|
-
"prompt-tokens"
|
|
626
|
-
]);
|
|
627
|
-
const cachedPromptTokens = firstHeaderTokenCount(headers, [
|
|
628
|
-
"fireworks-cached-prompt-tokens",
|
|
629
|
-
"cached-prompt-tokens"
|
|
630
|
-
]);
|
|
631
|
-
if (cachedPromptTokens === null)
|
|
632
|
-
return null;
|
|
633
|
-
return {
|
|
634
|
-
...promptTokens === null ? {} : { prompt_tokens: promptTokens },
|
|
635
|
-
cached_input_tokens: cachedPromptTokens,
|
|
636
|
-
cache_telemetry_source: "provider_response_headers"
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
function firstHeaderTokenCount(headers, names) {
|
|
640
|
-
for (const name of names) {
|
|
641
|
-
const value = headers.get(name);
|
|
642
|
-
if (value === null || !/^\d+$/.test(value.trim()))
|
|
643
|
-
continue;
|
|
644
|
-
const parsed = Number(value);
|
|
645
|
-
if (Number.isSafeInteger(parsed) && parsed >= 0)
|
|
646
|
-
return parsed;
|
|
647
|
-
}
|
|
648
|
-
return null;
|
|
649
|
-
}
|
|
650
|
-
function usageWithResponseHeaderCache(usage, responseHeaderUsage) {
|
|
651
|
-
if (!responseHeaderUsage || usageHasCacheTelemetry(usage))
|
|
652
|
-
return usage;
|
|
653
|
-
const merged = {
|
|
654
|
-
...usage ?? {},
|
|
655
|
-
cached_input_tokens: responseHeaderUsage.cached_input_tokens,
|
|
656
|
-
cache_telemetry_source: "provider_response_headers"
|
|
657
|
-
};
|
|
658
|
-
if (usageTokenCount(usage?.prompt_tokens) === null && responseHeaderUsage.prompt_tokens !== void 0) {
|
|
659
|
-
merged.prompt_tokens = responseHeaderUsage.prompt_tokens;
|
|
660
|
-
}
|
|
661
|
-
return merged;
|
|
662
|
-
}
|
|
663
|
-
function usageHasCacheTelemetry(usage) {
|
|
664
|
-
if (!usage)
|
|
665
|
-
return false;
|
|
666
|
-
if (usageTokenCount(usage.cached_input_tokens) !== null || usageTokenCount(usage.cache_read_input_tokens) !== null || usageTokenCount(usage.cache_creation_input_tokens) !== null || usageTokenCount(usage.prompt_cache_hit_tokens) !== null || usageTokenCount(usage.prompt_cache_miss_tokens) !== null)
|
|
667
|
-
return true;
|
|
668
|
-
return usageTokenCount(usage.prompt_tokens_details?.cached_tokens) !== null || usageTokenCount(usage.input_tokens_details?.cached_tokens) !== null;
|
|
669
|
-
}
|
|
670
|
-
function usageTokenCount(value) {
|
|
671
|
-
if (typeof value === "number" && Number.isSafeInteger(value) && value >= 0)
|
|
672
|
-
return value;
|
|
673
|
-
if (typeof value !== "string" || !/^\d+$/.test(value.trim()))
|
|
674
|
-
return null;
|
|
675
|
-
const parsed = Number(value);
|
|
676
|
-
return Number.isSafeInteger(parsed) ? parsed : null;
|
|
677
|
-
}
|
|
678
|
-
function mergeOpChatToolCallDeltas(calls, value) {
|
|
679
|
-
if (!Array.isArray(value))
|
|
680
|
-
return;
|
|
681
|
-
value.forEach((item, position) => {
|
|
682
|
-
if (!item || typeof item !== "object")
|
|
683
|
-
return;
|
|
684
|
-
const record = item;
|
|
685
|
-
const index = typeof record.index === "number" && Number.isInteger(record.index) ? record.index : position;
|
|
686
|
-
const current = calls.get(index) ?? { arguments: "" };
|
|
687
|
-
if (typeof record.id === "string")
|
|
688
|
-
current.id = record.id;
|
|
689
|
-
const fn = record.function && typeof record.function === "object" ? record.function : {};
|
|
690
|
-
if (typeof fn.name === "string") {
|
|
691
|
-
current.name = `${current.name ?? ""}${fn.name}`;
|
|
692
|
-
}
|
|
693
|
-
if (typeof fn.arguments === "string") {
|
|
694
|
-
current.arguments += fn.arguments;
|
|
695
|
-
}
|
|
696
|
-
calls.set(index, current);
|
|
697
|
-
});
|
|
698
|
-
}
|
|
699
|
-
function completedOpChatToolCalls(calls) {
|
|
700
|
-
return [...calls.entries()].sort(([left], [right]) => left - right).flatMap(([, call]) => call.id && call.name ? [{
|
|
701
|
-
id: call.id,
|
|
702
|
-
type: "function",
|
|
703
|
-
function: {
|
|
704
|
-
name: call.name,
|
|
705
|
-
arguments: call.arguments
|
|
706
|
-
}
|
|
707
|
-
}] : []);
|
|
708
|
-
}
|
|
709
|
-
function buildOpChatBody(options, stream) {
|
|
710
|
-
const body = {
|
|
711
|
-
model: options.model,
|
|
712
|
-
messages: options.messages.map(opChatMessage),
|
|
713
|
-
stream
|
|
714
|
-
};
|
|
715
|
-
if (options.tools) {
|
|
716
|
-
body.tools = options.tools;
|
|
717
|
-
}
|
|
718
|
-
if (options.toolChoice !== void 0) {
|
|
719
|
-
body.tool_choice = options.toolChoice;
|
|
720
|
-
}
|
|
721
|
-
if (typeof options.maxTokens === "number") {
|
|
722
|
-
body.max_tokens = options.maxTokens;
|
|
723
|
-
}
|
|
724
|
-
if (typeof options.temperature === "number") {
|
|
725
|
-
body.temperature = options.temperature;
|
|
726
|
-
}
|
|
727
|
-
if (typeof options.topP === "number") {
|
|
728
|
-
body.top_p = options.topP;
|
|
729
|
-
}
|
|
730
|
-
Object.assign(body, opChatReasoningFields(options.reasoningEffort));
|
|
731
|
-
return body;
|
|
732
|
-
}
|
|
733
|
-
function opChatReasoningFields(effort) {
|
|
734
|
-
if (!effort)
|
|
735
|
-
return {};
|
|
736
|
-
if (effort === "low") {
|
|
737
|
-
return { thinking: { type: "disabled" } };
|
|
738
|
-
}
|
|
739
|
-
return {
|
|
740
|
-
thinking: { type: "enabled" },
|
|
741
|
-
reasoning_effort: effort === "xhigh" ? "max" : "high"
|
|
742
|
-
};
|
|
743
|
-
}
|
|
744
|
-
function opChatMessage(message) {
|
|
745
|
-
const { continuation, images, ...projected } = message;
|
|
746
|
-
const content = images?.length ? [
|
|
747
|
-
...typeof message.content === "string" && message.content.trim() ? [{ type: "text", text: message.content }] : [],
|
|
748
|
-
...images.map((image) => ({
|
|
749
|
-
type: "image_url",
|
|
750
|
-
image_url: {
|
|
751
|
-
url: image.url,
|
|
752
|
-
...image.detail ? { detail: image.detail } : {}
|
|
753
|
-
}
|
|
754
|
-
}))
|
|
755
|
-
] : message.content;
|
|
756
|
-
if (message.role === "assistant" && continuation?.kind === "chat_completions_reasoning") {
|
|
757
|
-
return {
|
|
758
|
-
...projected,
|
|
759
|
-
...content !== void 0 ? { content } : {},
|
|
760
|
-
reasoning_content: continuation.reasoningContent
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
return { ...projected, ...content !== void 0 ? { content } : {} };
|
|
764
|
-
}
|
|
765
|
-
function opChatEndpointUrl(apiBaseUrl, path) {
|
|
766
|
-
const normalized = apiBaseUrl.trim().replace(/\/+$/, "");
|
|
767
|
-
if (!normalized)
|
|
768
|
-
throw new Error("OpenPond OpChat API base URL is required.");
|
|
769
|
-
return `${normalized}/${path}`;
|
|
770
|
-
}
|
|
771
|
-
function opChatHeaders(token, accept, requestId) {
|
|
772
|
-
const trimmed = token.trim();
|
|
773
|
-
if (!trimmed)
|
|
774
|
-
throw new Error("OpenPond API key is required for OpChat.");
|
|
775
|
-
const headers = new Headers();
|
|
776
|
-
headers.set("Authorization", `Bearer ${trimmed}`);
|
|
777
|
-
headers.set("Content-Type", "application/json");
|
|
778
|
-
headers.set("Accept", accept);
|
|
779
|
-
headers.set("x-openpond-client", "openpond-app");
|
|
780
|
-
headers.set("x-openpond-request-id", requestId || randomUUID());
|
|
781
|
-
return headers;
|
|
782
|
-
}
|
|
783
|
-
async function readOpChatError(response) {
|
|
784
|
-
const text = await response.text().catch(() => "");
|
|
785
|
-
if (!text)
|
|
786
|
-
return response.statusText || `HTTP ${response.status}`;
|
|
787
|
-
try {
|
|
788
|
-
return errorMessageFromPayload(JSON.parse(text));
|
|
789
|
-
} catch {
|
|
790
|
-
return text;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
function errorMessageFromPayload(payload) {
|
|
794
|
-
if (!payload || typeof payload !== "object")
|
|
795
|
-
return String(payload || "unknown_error");
|
|
796
|
-
const record = payload;
|
|
797
|
-
const error = record.error;
|
|
798
|
-
if (error && typeof error === "object") {
|
|
799
|
-
const errorRecord = error;
|
|
800
|
-
return [
|
|
801
|
-
stringValue(errorRecord.code),
|
|
802
|
-
stringValue(errorRecord.type),
|
|
803
|
-
stringValue(errorRecord.message)
|
|
804
|
-
].filter(Boolean).join(": ");
|
|
805
|
-
}
|
|
806
|
-
return [stringValue(record.error), stringValue(record.message)].filter(Boolean).join(": ") || JSON.stringify(payload);
|
|
807
|
-
}
|
|
808
|
-
function parseUsage(raw) {
|
|
809
|
-
if (!raw || typeof raw !== "object")
|
|
810
|
-
return null;
|
|
811
|
-
const usage = raw.usage;
|
|
812
|
-
if (!usage || typeof usage !== "object")
|
|
813
|
-
return null;
|
|
814
|
-
return usage;
|
|
815
|
-
}
|
|
816
|
-
function stringValue(value) {
|
|
817
|
-
return typeof value === "string" && value.trim() ? value : null;
|
|
818
|
-
}
|
|
819
|
-
function streamTextValue(value) {
|
|
820
|
-
return typeof value === "string" && value.length > 0 ? value : null;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
// ../../packages/runtime/dist/version.js
|
|
824
|
-
import { readFileSync } from "node:fs";
|
|
825
|
-
var bundledRuntimeVersion;
|
|
826
|
-
function getBundledRuntimeVersion() {
|
|
827
|
-
if (bundledRuntimeVersion !== void 0)
|
|
828
|
-
return bundledRuntimeVersion ?? "openpond-code bundled";
|
|
829
|
-
try {
|
|
830
|
-
const packageJsonUrl = new URL("../package.json", import.meta.resolve("openpond"));
|
|
831
|
-
const packageJson = JSON.parse(readFileSync(packageJsonUrl, "utf8"));
|
|
832
|
-
bundledRuntimeVersion = typeof packageJson.version === "string" ? `openpond-code@${packageJson.version}` : null;
|
|
833
|
-
} catch {
|
|
834
|
-
bundledRuntimeVersion = null;
|
|
835
|
-
}
|
|
836
|
-
return bundledRuntimeVersion ?? "openpond-code bundled";
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
// ../../packages/runtime/dist/system-browser.js
|
|
840
|
-
import { spawn } from "node:child_process";
|
|
841
|
-
function resolveSystemBrowserCommand(url, platform = process.platform) {
|
|
842
|
-
if (platform === "darwin")
|
|
843
|
-
return { command: "open", args: [url] };
|
|
844
|
-
if (platform === "win32") {
|
|
845
|
-
return {
|
|
846
|
-
command: "rundll32.exe",
|
|
847
|
-
args: ["url.dll,FileProtocolHandler", url]
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
return { command: "xdg-open", args: [url] };
|
|
851
|
-
}
|
|
852
|
-
async function openUrlWithSystemBrowser(url, options = {}) {
|
|
853
|
-
const browser = options.command ?? resolveSystemBrowserCommand(url);
|
|
854
|
-
const handoffTimeoutMs = options.handoffTimeoutMs ?? 1500;
|
|
855
|
-
return new Promise((resolve) => {
|
|
856
|
-
let settled = false;
|
|
857
|
-
let timer = null;
|
|
858
|
-
const finish = (result) => {
|
|
859
|
-
if (settled)
|
|
860
|
-
return;
|
|
861
|
-
settled = true;
|
|
862
|
-
if (timer)
|
|
863
|
-
clearTimeout(timer);
|
|
864
|
-
resolve(result);
|
|
865
|
-
};
|
|
866
|
-
const child = spawn(browser.command, browser.args, {
|
|
867
|
-
detached: false,
|
|
868
|
-
shell: false,
|
|
869
|
-
stdio: "ignore",
|
|
870
|
-
windowsHide: true
|
|
871
|
-
});
|
|
872
|
-
child.once("error", (error) => {
|
|
873
|
-
const code = error.code;
|
|
874
|
-
finish({
|
|
875
|
-
opened: false,
|
|
876
|
-
error: code ? `browser launcher ${browser.command} failed (${code})` : `browser launcher ${browser.command} failed`
|
|
877
|
-
});
|
|
878
|
-
});
|
|
879
|
-
child.once("close", (code, signal) => {
|
|
880
|
-
if (code === 0) {
|
|
881
|
-
finish({ opened: true });
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
const detail = signal ? `signal ${signal}` : `code ${code ?? "unknown"}`;
|
|
885
|
-
finish({ opened: false, error: `browser launcher ${browser.command} exited with ${detail}` });
|
|
886
|
-
});
|
|
887
|
-
timer = setTimeout(() => {
|
|
888
|
-
child.unref();
|
|
889
|
-
finish({ opened: true });
|
|
890
|
-
}, handoffTimeoutMs);
|
|
891
|
-
timer.unref();
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
// ../../packages/runtime/dist/apps.js
|
|
896
|
-
function normalizeApp(input) {
|
|
897
|
-
if (!input || typeof input !== "object")
|
|
898
|
-
return null;
|
|
899
|
-
const item = input;
|
|
900
|
-
const id = typeof item.id === "string" ? item.id : null;
|
|
901
|
-
const name = typeof item.name === "string" ? item.name : id;
|
|
902
|
-
if (!id || !name)
|
|
903
|
-
return null;
|
|
904
|
-
const deployment = item.latestDeployment && typeof item.latestDeployment === "object" ? item.latestDeployment : null;
|
|
905
|
-
const registryResult = SandboxAppActionRegistrySchema.safeParse(item.sandboxActionRegistry);
|
|
906
|
-
return {
|
|
907
|
-
id,
|
|
908
|
-
name,
|
|
909
|
-
description: typeof item.description === "string" ? item.description : null,
|
|
910
|
-
visibility: typeof item.visibility === "string" ? item.visibility : null,
|
|
911
|
-
gitOwner: typeof item.gitOwner === "string" ? item.gitOwner : null,
|
|
912
|
-
gitRepo: typeof item.gitRepo === "string" ? item.gitRepo : null,
|
|
913
|
-
gitHost: typeof item.gitHost === "string" ? item.gitHost : null,
|
|
914
|
-
defaultBranch: typeof item.defaultBranch === "string" ? item.defaultBranch : null,
|
|
915
|
-
sandbox: item.sandbox === true,
|
|
916
|
-
sandboxActionRegistry: registryResult.success ? registryResult.data : null,
|
|
917
|
-
sandboxManifestHash: typeof item.sandboxManifestHash === "string" ? item.sandboxManifestHash : null,
|
|
918
|
-
sandboxManifestPath: typeof item.sandboxManifestPath === "string" ? item.sandboxManifestPath : null,
|
|
919
|
-
sandboxManifestSyncedAt: typeof item.sandboxManifestSyncedAt === "string" ? item.sandboxManifestSyncedAt : item.sandboxManifestSyncedAt instanceof Date ? item.sandboxManifestSyncedAt.toISOString() : null,
|
|
920
|
-
sandboxManifestError: typeof item.sandboxManifestError === "string" ? item.sandboxManifestError : null,
|
|
921
|
-
updatedAt: typeof item.updatedAt === "string" ? item.updatedAt : null,
|
|
922
|
-
latestDeployment: deployment ? {
|
|
923
|
-
id: typeof deployment.id === "string" ? deployment.id : void 0,
|
|
924
|
-
status: typeof deployment.status === "string" ? deployment.status : void 0,
|
|
925
|
-
deploymentDomain: typeof deployment.deploymentDomain === "string" ? deployment.deploymentDomain : null,
|
|
926
|
-
createdAt: typeof deployment.createdAt === "string" ? deployment.createdAt : void 0,
|
|
927
|
-
isProduction: typeof deployment.isProduction === "boolean" ? deployment.isProduction : null,
|
|
928
|
-
gitBranch: typeof deployment.gitBranch === "string" ? deployment.gitBranch : null
|
|
929
|
-
} : null,
|
|
930
|
-
scheduleSummary: normalizeScheduleSummary(item.scheduleSummary)
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
function normalizeDateString(value) {
|
|
934
|
-
if (typeof value === "string")
|
|
935
|
-
return value;
|
|
936
|
-
if (value instanceof Date)
|
|
937
|
-
return value.toISOString();
|
|
938
|
-
return null;
|
|
939
|
-
}
|
|
940
|
-
function normalizeSchedule(input) {
|
|
941
|
-
if (!input || typeof input !== "object")
|
|
942
|
-
return null;
|
|
943
|
-
const item = input;
|
|
944
|
-
const id = typeof item.id === "string" ? item.id : null;
|
|
945
|
-
const name = typeof item.name === "string" ? item.name : id;
|
|
946
|
-
const deploymentId = typeof item.deploymentId === "string" ? item.deploymentId : null;
|
|
947
|
-
if (!id || !name || !deploymentId)
|
|
948
|
-
return null;
|
|
949
|
-
return {
|
|
950
|
-
id,
|
|
951
|
-
name,
|
|
952
|
-
description: typeof item.description === "string" ? item.description : null,
|
|
953
|
-
scheduleType: typeof item.scheduleType === "string" ? item.scheduleType : "cron",
|
|
954
|
-
scheduleExpression: typeof item.scheduleExpression === "string" ? item.scheduleExpression : "",
|
|
955
|
-
enabled: Boolean(item.enabled),
|
|
956
|
-
rawEnabled: typeof item.rawEnabled === "boolean" ? item.rawEnabled : void 0,
|
|
957
|
-
syncStatus: typeof item.syncStatus === "string" ? item.syncStatus : null,
|
|
958
|
-
syncError: typeof item.syncError === "string" ? item.syncError : null,
|
|
959
|
-
startAt: normalizeDateString(item.startAt),
|
|
960
|
-
endAt: normalizeDateString(item.endAt),
|
|
961
|
-
maxRuns: typeof item.maxRuns === "number" ? item.maxRuns : null,
|
|
962
|
-
executionCount: typeof item.executionCount === "number" ? item.executionCount : null,
|
|
963
|
-
lifecycleStatus: typeof item.lifecycleStatus === "string" ? item.lifecycleStatus : null,
|
|
964
|
-
lifecycleReason: typeof item.lifecycleReason === "string" ? item.lifecycleReason : null,
|
|
965
|
-
lastExecutionAt: normalizeDateString(item.lastExecutionAt),
|
|
966
|
-
lastExecutionStatus: typeof item.lastExecutionStatus === "string" ? item.lastExecutionStatus : null,
|
|
967
|
-
lastRunNowAt: normalizeDateString(item.lastRunNowAt),
|
|
968
|
-
lastRunNowStatus: typeof item.lastRunNowStatus === "string" ? item.lastRunNowStatus : null,
|
|
969
|
-
updatedAt: normalizeDateString(item.updatedAt) ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
970
|
-
deploymentId,
|
|
971
|
-
isProduction: typeof item.isProduction === "boolean" ? item.isProduction : void 0,
|
|
972
|
-
payload: item.payload
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
function normalizeScheduleSummary(input) {
|
|
976
|
-
if (!input || typeof input !== "object")
|
|
977
|
-
return null;
|
|
978
|
-
const item = input;
|
|
979
|
-
const schedules = Array.isArray(item.schedules) ? item.schedules.map(normalizeSchedule).filter((value) => Boolean(value)) : [];
|
|
980
|
-
const total = typeof item.total === "number" ? item.total : schedules.length;
|
|
981
|
-
const active = typeof item.active === "number" ? item.active : schedules.filter((schedule) => schedule.enabled).length;
|
|
982
|
-
const paused = typeof item.paused === "number" ? item.paused : Math.max(0, total - active);
|
|
983
|
-
return {
|
|
984
|
-
total,
|
|
985
|
-
active,
|
|
986
|
-
paused,
|
|
987
|
-
enabled: typeof item.enabled === "number" ? item.enabled : active,
|
|
988
|
-
disabled: typeof item.disabled === "number" ? item.disabled : paused,
|
|
989
|
-
nextRunAt: normalizeDateString(item.nextRunAt),
|
|
990
|
-
lastRunAt: normalizeDateString(item.lastRunAt),
|
|
991
|
-
schedules,
|
|
992
|
-
truncated: typeof item.truncated === "boolean" ? item.truncated : void 0
|
|
993
|
-
};
|
|
994
|
-
}
|
|
995
|
-
async function loadAccountProfileLookups(context) {
|
|
996
|
-
const accounts = Array.isArray(context.config.accounts) ? context.config.accounts : [];
|
|
997
|
-
const entries = await Promise.all(accounts.map(async (account) => {
|
|
998
|
-
const key = profileKey(account.handle, account.baseUrl);
|
|
999
|
-
const token = accountToken(account);
|
|
1000
|
-
if (!token) {
|
|
1001
|
-
return [
|
|
1002
|
-
key,
|
|
1003
|
-
{ response: null, authFailed: false, error: null }
|
|
1004
|
-
];
|
|
1005
|
-
}
|
|
1006
|
-
try {
|
|
1007
|
-
return [
|
|
1008
|
-
key,
|
|
1009
|
-
{
|
|
1010
|
-
response: await getOpenPondAccount(resolvePublicApiBaseUrl(account, context.config), token),
|
|
1011
|
-
authFailed: false,
|
|
1012
|
-
error: null
|
|
1013
|
-
}
|
|
1014
|
-
];
|
|
1015
|
-
} catch (error) {
|
|
1016
|
-
return [
|
|
1017
|
-
key,
|
|
1018
|
-
{
|
|
1019
|
-
response: null,
|
|
1020
|
-
authFailed: true,
|
|
1021
|
-
error: errorMessage(error)
|
|
1022
|
-
}
|
|
1023
|
-
];
|
|
1024
|
-
}
|
|
1025
|
-
}));
|
|
1026
|
-
return Object.fromEntries(entries);
|
|
1027
|
-
}
|
|
1028
|
-
async function loadOpenPondAccountStateForContext(context) {
|
|
1029
|
-
const accountProfiles = await loadAccountProfileLookups(context);
|
|
1030
|
-
const activeLookup = context.account ? accountProfiles[profileKey(context.account.handle, context.account.baseUrl)] ?? null : null;
|
|
1031
|
-
const accountResponse = activeLookup?.response ?? null;
|
|
1032
|
-
const authError = context.token && activeLookup?.authFailed ? activeLookup.error || "OpenPond account authentication failed." : null;
|
|
1033
|
-
return {
|
|
1034
|
-
account: toAccountState({
|
|
1035
|
-
...context,
|
|
1036
|
-
accountResponse,
|
|
1037
|
-
accountProfiles,
|
|
1038
|
-
authFailed: Boolean(authError),
|
|
1039
|
-
error: authError
|
|
1040
|
-
})
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
async function loadOpenPondAccountState() {
|
|
1044
|
-
return loadOpenPondAccountStateForContext(await loadOpenPondAccountContext());
|
|
1045
|
-
}
|
|
1046
|
-
async function loadOpenPondApps(options = {}) {
|
|
1047
|
-
const context = await loadOpenPondAccountContext();
|
|
1048
|
-
const accountPromise = loadOpenPondAccountStateForContext(context);
|
|
1049
|
-
if (!context.token) {
|
|
1050
|
-
return {
|
|
1051
|
-
...await accountPromise,
|
|
1052
|
-
apps: [],
|
|
1053
|
-
error: "No OpenPond API key or session token is configured."
|
|
1054
|
-
};
|
|
1055
|
-
}
|
|
1056
|
-
const [accountResult, appsResult] = await Promise.allSettled([
|
|
1057
|
-
accountPromise,
|
|
1058
|
-
listApps(context.apiBaseUrl, context.token, {
|
|
1059
|
-
handle: context.account?.handle,
|
|
1060
|
-
limit: options.limit ?? 20,
|
|
1061
|
-
offset: options.offset ?? 0,
|
|
1062
|
-
includeScheduled: options.includeScheduled ?? true
|
|
1063
|
-
})
|
|
1064
|
-
]);
|
|
1065
|
-
if (accountResult.status === "rejected")
|
|
1066
|
-
throw accountResult.reason;
|
|
1067
|
-
return {
|
|
1068
|
-
account: accountResult.value.account,
|
|
1069
|
-
apps: appsResult.status === "fulfilled" ? appsResult.value.map(normalizeApp).filter((value) => Boolean(value)) : [],
|
|
1070
|
-
error: appsResult.status === "rejected" ? errorMessage(appsResult.reason) : null
|
|
1071
|
-
};
|
|
1072
|
-
}
|
|
1073
|
-
async function createOpenPondRepoApp(input) {
|
|
1074
|
-
const context = await loadOpenPondAccountContext();
|
|
1075
|
-
if (!context.token) {
|
|
1076
|
-
throw new Error("No OpenPond API key or session token is configured.");
|
|
1077
|
-
}
|
|
1078
|
-
return {
|
|
1079
|
-
account: context,
|
|
1080
|
-
response: await createRepo(context.apiBaseUrl, context.token, input)
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
// ../../packages/runtime/dist/save-account.js
|
|
1085
|
-
import { createHash } from "node:crypto";
|
|
1086
|
-
function fallbackHandleForApiKey(apiKey) {
|
|
1087
|
-
const digest = createHash("sha256").update(apiKey).digest("hex").slice(0, 8);
|
|
1088
|
-
return `account-${digest}`;
|
|
1089
|
-
}
|
|
1090
|
-
function normalizeDerivedHandle(value) {
|
|
1091
|
-
const trimmed = value?.trim();
|
|
1092
|
-
if (!trimmed)
|
|
1093
|
-
return null;
|
|
1094
|
-
return trimmed.replace(/^@/, "");
|
|
1095
|
-
}
|
|
1096
|
-
async function deriveHandleForApiKey(input, apiBaseUrl) {
|
|
1097
|
-
const explicit = normalizeDerivedHandle(input.handle);
|
|
1098
|
-
if (explicit)
|
|
1099
|
-
return explicit;
|
|
1100
|
-
try {
|
|
1101
|
-
const response = await getOpenPondAccount(apiBaseUrl, input.apiKey);
|
|
1102
|
-
const account = response.account;
|
|
1103
|
-
const fromProfile = normalizeDerivedHandle(account.handle) ?? normalizeDerivedHandle(account.email?.split("@")[0]) ?? normalizeDerivedHandle(account.id);
|
|
1104
|
-
if (fromProfile)
|
|
1105
|
-
return fromProfile;
|
|
1106
|
-
} catch {
|
|
1107
|
-
}
|
|
1108
|
-
return fallbackHandleForApiKey(input.apiKey);
|
|
1109
|
-
}
|
|
1110
|
-
async function saveOpenPondAccount(input) {
|
|
1111
|
-
const baseUrl = input.baseUrl ?? DEFAULT_OPENPOND_WEB_BASE_URL;
|
|
1112
|
-
const apiBaseUrl = normalizeBaseUrl(input.apiBaseUrl) ?? mapUiBaseToApiBase(baseUrl) ?? DEFAULT_OPENPOND_API_BASE_URL;
|
|
1113
|
-
const chatApiBaseUrl = normalizeBaseUrl(input.chatApiBaseUrl);
|
|
1114
|
-
const handle = await deriveHandleForApiKey(input, apiBaseUrl);
|
|
1115
|
-
await saveProfileApiKey({
|
|
1116
|
-
handle,
|
|
1117
|
-
apiKey: input.apiKey,
|
|
1118
|
-
baseUrl,
|
|
1119
|
-
apiBaseUrl,
|
|
1120
|
-
chatApiBaseUrl,
|
|
1121
|
-
environment: input.environment ?? "production",
|
|
1122
|
-
setActive: input.setActive
|
|
1123
|
-
});
|
|
1124
|
-
return loadOpenPondAccountContext(handle, baseUrl);
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
// ../../packages/runtime/dist/remove-account.js
|
|
1128
|
-
function findAccountIndex(accounts, handle, baseUrl) {
|
|
1129
|
-
const normalizedBaseUrl = normalizeBaseUrl(baseUrl);
|
|
1130
|
-
const exactIndex = accounts.findIndex((account) => handleEquals(account.handle, handle) && baseUrlEquals(account.baseUrl, normalizedBaseUrl));
|
|
1131
|
-
if (exactIndex !== -1)
|
|
1132
|
-
return exactIndex;
|
|
1133
|
-
const matchingIndexes = accounts.map((account, index) => ({ account, index })).filter(({ account }) => handleEquals(account.handle, handle));
|
|
1134
|
-
if (matchingIndexes.length === 1)
|
|
1135
|
-
return matchingIndexes[0].index;
|
|
1136
|
-
if (matchingIndexes.length > 1) {
|
|
1137
|
-
throw new Error(`Multiple OpenPond accounts match ${handle}; select one with its base URL.`);
|
|
1138
|
-
}
|
|
1139
|
-
return -1;
|
|
1140
|
-
}
|
|
1141
|
-
async function removeOpenPondAccount(input) {
|
|
1142
|
-
const handle = input.handle.trim();
|
|
1143
|
-
if (!handle)
|
|
1144
|
-
throw new Error("OpenPond account handle is required.");
|
|
1145
|
-
await updateGlobalConfig((config) => {
|
|
1146
|
-
const accounts = (config.accounts ?? []).map((account2) => ({ ...account2 }));
|
|
1147
|
-
const index = findAccountIndex(accounts, handle, input.baseUrl);
|
|
1148
|
-
if (index === -1)
|
|
1149
|
-
throw new Error(`OpenPond account not found: ${handle}`);
|
|
1150
|
-
const account = accounts[index];
|
|
1151
|
-
const activeProfile = normalizeActiveProfile(config.activeProfile);
|
|
1152
|
-
if (activeProfile && accountMatchesSelector(account, activeProfile)) {
|
|
1153
|
-
throw new Error("Switch to another OpenPond account before removing the active account.");
|
|
1154
|
-
}
|
|
1155
|
-
accounts.splice(index, 1);
|
|
1156
|
-
config.accounts = accounts;
|
|
1157
|
-
});
|
|
1158
|
-
return loadOpenPondAccountContext();
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// ../../packages/runtime/dist/sign-out-account.js
|
|
1162
|
-
async function signOutOpenPondAccount() {
|
|
1163
|
-
let signedOutAccount;
|
|
1164
|
-
await updateGlobalConfig((config) => {
|
|
1165
|
-
const activeProfile = normalizeActiveProfile(config.activeProfile);
|
|
1166
|
-
const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
|
|
1167
|
-
const activeIndex = activeProfile ? accounts.findIndex((account) => accountMatchesSelector(account, activeProfile)) : 0;
|
|
1168
|
-
if (activeIndex < 0 || !accounts[activeIndex]) {
|
|
1169
|
-
throw new Error("No active OpenPond account to log out.");
|
|
1170
|
-
}
|
|
1171
|
-
signedOutAccount = { ...accounts[activeIndex] };
|
|
1172
|
-
delete signedOutAccount.apiKey;
|
|
1173
|
-
delete signedOutAccount.session;
|
|
1174
|
-
accounts[activeIndex] = signedOutAccount;
|
|
1175
|
-
config.accounts = accounts;
|
|
1176
|
-
});
|
|
1177
|
-
return loadOpenPondAccountContext(signedOutAccount.handle, signedOutAccount.baseUrl);
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
// ../../packages/runtime/dist/update-account-config.js
|
|
1181
|
-
function findAccountIndex2(accounts, handle, currentBaseUrl) {
|
|
1182
|
-
const normalizedCurrentBaseUrl = normalizeBaseUrl(currentBaseUrl);
|
|
1183
|
-
const exactIndex = accounts.findIndex((account) => handleEquals(account.handle, handle) && baseUrlEquals(account.baseUrl, normalizedCurrentBaseUrl));
|
|
1184
|
-
if (exactIndex !== -1)
|
|
1185
|
-
return exactIndex;
|
|
1186
|
-
const sameHandle = accounts.map((account, index) => ({ account, index })).filter(({ account }) => handleEquals(account.handle, handle));
|
|
1187
|
-
if (sameHandle.length === 1)
|
|
1188
|
-
return sameHandle[0].index;
|
|
1189
|
-
if (sameHandle.length > 1) {
|
|
1190
|
-
throw new Error(`Multiple OpenPond accounts match ${handle}; select one with its current base URL.`);
|
|
1191
|
-
}
|
|
1192
|
-
return -1;
|
|
1193
|
-
}
|
|
1194
|
-
function applyOptionalUrl(account, key, value) {
|
|
1195
|
-
if (value === void 0)
|
|
1196
|
-
return;
|
|
1197
|
-
const normalized = normalizeBaseUrl(value);
|
|
1198
|
-
if (normalized) {
|
|
1199
|
-
account[key] = normalized;
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
|
-
if (value === null || value.trim() === "")
|
|
1203
|
-
delete account[key];
|
|
1204
|
-
}
|
|
1205
|
-
async function updateOpenPondAccountConfig(input) {
|
|
1206
|
-
const handle = input.handle.trim();
|
|
1207
|
-
if (!handle)
|
|
1208
|
-
throw new Error("OpenPond account handle is required.");
|
|
1209
|
-
let nextAccount;
|
|
1210
|
-
await updateGlobalConfig((config) => {
|
|
1211
|
-
const accounts = (config.accounts ?? []).map((account) => ({ ...account }));
|
|
1212
|
-
const index = findAccountIndex2(accounts, handle, input.currentBaseUrl);
|
|
1213
|
-
if (index === -1)
|
|
1214
|
-
throw new Error(`OpenPond account not found: ${handle}`);
|
|
1215
|
-
const previousAccount = accounts[index];
|
|
1216
|
-
nextAccount = { ...previousAccount };
|
|
1217
|
-
applyOptionalUrl(nextAccount, "baseUrl", input.baseUrl);
|
|
1218
|
-
applyOptionalUrl(nextAccount, "apiBaseUrl", input.apiBaseUrl);
|
|
1219
|
-
applyOptionalUrl(nextAccount, "chatApiBaseUrl", input.chatApiBaseUrl);
|
|
1220
|
-
if (input.environment === null) {
|
|
1221
|
-
delete nextAccount.environment;
|
|
1222
|
-
} else if (typeof input.environment === "string" && input.environment.trim()) {
|
|
1223
|
-
nextAccount.environment = input.environment.trim();
|
|
1224
|
-
}
|
|
1225
|
-
const duplicateIndex = accounts.findIndex((account, candidateIndex) => candidateIndex !== index && handleEquals(account.handle, nextAccount.handle) && baseUrlEquals(account.baseUrl, nextAccount.baseUrl));
|
|
1226
|
-
if (duplicateIndex !== -1) {
|
|
1227
|
-
throw new Error("Another OpenPond account already uses that handle and base URL.");
|
|
1228
|
-
}
|
|
1229
|
-
const activeProfile = normalizeActiveProfile(config.activeProfile);
|
|
1230
|
-
const wasActive = Boolean(activeProfile && accountMatchesSelector(previousAccount, activeProfile));
|
|
1231
|
-
accounts[index] = nextAccount;
|
|
1232
|
-
config.accounts = accounts;
|
|
1233
|
-
config.activeProfile = input.setActive || wasActive ? selectorFromAccount(nextAccount) : config.activeProfile;
|
|
1234
|
-
});
|
|
1235
|
-
return loadOpenPondAccountContext(nextAccount.handle, nextAccount.baseUrl);
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
// ../../packages/runtime/dist/actions.js
|
|
1239
|
-
async function getOpenPondAppEnvironment(input) {
|
|
1240
|
-
const context = await loadOpenPondAccountContext();
|
|
1241
|
-
if (!context.token) {
|
|
1242
|
-
throw new Error("OpenPond is signed out. Add an account before reading app config.");
|
|
1243
|
-
}
|
|
1244
|
-
return getAppEnvironment(context.apiBaseUrl, context.token, input.appId);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
// ../../packages/runtime/dist/ready-line-parser.js
|
|
1248
|
-
function createReadyLineParser(prefix, onReady) {
|
|
1249
|
-
let buffer = "";
|
|
1250
|
-
const processLine = (line) => {
|
|
1251
|
-
if (!line.startsWith(prefix))
|
|
1252
|
-
return;
|
|
1253
|
-
onReady(JSON.parse(line.slice(prefix.length)));
|
|
1254
|
-
};
|
|
1255
|
-
return {
|
|
1256
|
-
push(chunk) {
|
|
1257
|
-
buffer += chunk;
|
|
1258
|
-
while (true) {
|
|
1259
|
-
const lineEnd = nextLineEnd(buffer);
|
|
1260
|
-
if (lineEnd < 0)
|
|
1261
|
-
return;
|
|
1262
|
-
const line = buffer.slice(0, lineEnd).replace(/\r$/, "");
|
|
1263
|
-
const newlineLength = buffer[lineEnd] === "\r" && buffer[lineEnd + 1] === "\n" ? 2 : 1;
|
|
1264
|
-
buffer = buffer.slice(lineEnd + newlineLength);
|
|
1265
|
-
processLine(line);
|
|
1266
|
-
}
|
|
1267
|
-
},
|
|
1268
|
-
flush() {
|
|
1269
|
-
const line = buffer.trimEnd();
|
|
1270
|
-
buffer = "";
|
|
1271
|
-
if (line)
|
|
1272
|
-
processLine(line);
|
|
1273
|
-
}
|
|
1274
|
-
};
|
|
1275
|
-
}
|
|
1276
|
-
function nextLineEnd(value) {
|
|
1277
|
-
const lf = value.indexOf("\n");
|
|
1278
|
-
const cr = value.indexOf("\r");
|
|
1279
|
-
if (lf < 0)
|
|
1280
|
-
return cr;
|
|
1281
|
-
if (cr < 0)
|
|
1282
|
-
return lf;
|
|
1283
|
-
return Math.min(lf, cr);
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
export {
|
|
1287
|
-
loadOpenPondAccountContext,
|
|
1288
|
-
switchOpenPondAccount,
|
|
1289
|
-
loadOpenPondAccountState,
|
|
1290
|
-
loadOpenPondApps,
|
|
1291
|
-
createOpenPondRepoApp,
|
|
1292
|
-
loadOpenPondHostedModels,
|
|
1293
|
-
loadOpenPondProviderCatalog,
|
|
1294
|
-
streamOpenPondHostedChatTurn,
|
|
1295
|
-
saveOpenPondAccount,
|
|
1296
|
-
removeOpenPondAccount,
|
|
1297
|
-
signOutOpenPondAccount,
|
|
1298
|
-
updateOpenPondAccountConfig,
|
|
1299
|
-
getOpenPondAppEnvironment,
|
|
1300
|
-
getBundledRuntimeVersion,
|
|
1301
|
-
createReadyLineParser,
|
|
1302
|
-
openUrlWithSystemBrowser
|
|
1303
|
-
};
|