openpond 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/api/core.d.ts +6 -0
- package/dist/api/vercel-protection.d.ts +1 -0
- package/dist/chunks/{app-layer-DPUJRNO2.js → app-layer-LTBWNA2F.js} +32 -10
- package/dist/chunks/app-server-runtime-VYYJ2AWX.js +18 -0
- package/dist/chunks/{apps-AKBI6AS7.js → apps-CZAJBGE3.js} +6 -4
- package/dist/chunks/{chunk-LZZM3IHS.js → chunk-2SF6HLT7.js} +5899 -5939
- package/dist/chunks/{chunk-XCATKTK3.js → chunk-3CDPPVLE.js} +108 -66
- package/dist/chunks/{chunk-JWF37O5E.js → chunk-3HW6OSHP.js} +1 -3
- package/dist/chunks/{chunk-43YI36NA.js → chunk-3KLQ52B2.js} +228 -5
- package/dist/chunks/chunk-4HIWFIMN.js +37172 -0
- package/dist/chunks/{chunk-AHPQTEIJ.js → chunk-4N6E3OVF.js} +4 -4
- package/dist/chunks/{chunk-YTJL6XPU.js → chunk-6V7MJVRO.js} +56 -11
- package/dist/chunks/{chunk-QRM7XMAO.js → chunk-BQQZNGI6.js} +152 -161
- package/dist/chunks/chunk-DBHSOTYZ.js +1552 -0
- package/dist/chunks/{chunk-275WCETC.js → chunk-FCVVOMIP.js} +145 -5
- package/dist/chunks/{chunk-GB6VUZUA.js → chunk-JIEUB6OS.js} +1 -1
- package/dist/chunks/{chunk-HS2AGRDV.js → chunk-JJPAMKXZ.js} +1 -1
- package/dist/chunks/{chunk-GDZYDLEL.js → chunk-JRROTGQT.js} +1 -110
- package/dist/chunks/chunk-KHNHUA2H.js +1737 -0
- package/dist/chunks/{chunk-AHNFNWUN.js → chunk-L6XH4ZGZ.js} +1 -1
- package/dist/chunks/chunk-M2NXTLH2.js +4054 -0
- package/dist/chunks/{chunk-SLMP353Q.js → chunk-MIZHCABO.js} +2 -195
- package/dist/chunks/chunk-SMNFI2FU.js +113 -0
- package/dist/chunks/chunk-VCVQLECH.js +675 -0
- package/dist/chunks/{chunk-V35STJF4.js → chunk-ZJBJQCQZ.js} +179 -52
- package/dist/chunks/{cli-7BKDWFNU.js → cli-JS76LCW2.js} +9 -5
- package/dist/chunks/{core-commands-YN4RMWA3.js → core-commands-4MRJQZJV.js} +7 -5
- package/dist/chunks/{harness-BHQRMXJR.js → desktop-test-RNMWLOVU.js} +15 -14
- package/dist/chunks/{chunk-XERQHYBO.js → extension-GDRW22N3.js} +5868 -3580
- package/dist/chunks/{help-VREQNA4I.js → help-LWNREJ7U.js} +1 -1
- package/dist/chunks/{opchat-D63YTNSX.js → opchat-2K2JIGK3.js} +9 -10
- package/dist/chunks/{organizations-I46KG7TC.js → organizations-Z5HVD2E7.js} +11 -9
- package/dist/chunks/{profile-WKZJHEPG.js → profile-QNECVVGN.js} +12 -38
- package/dist/chunks/{project-agent-ZUC3YMCT.js → project-agent-W3V75WBR.js} +9 -411
- package/dist/chunks/{sandbox-command-AAOPFTI5.js → sandbox-command-X3FO74NX.js} +7 -5
- package/dist/chunks/{sandbox-template-GKNVR4C5.js → sandbox-template-5B4T4BGU.js} +8 -6
- package/dist/chunks/{src-RPW5TOPI.js → src-ESAILPUH.js} +32 -30
- package/dist/chunks/src-IC5RX4L6.js +63517 -0
- package/dist/chunks/{teams-bot-PSL3ZO6Z.js → teams-bot-NTQ6VFFL.js} +6 -4
- package/dist/chunks/training-BR5A7SPU.js +320 -0
- package/dist/chunks/{workspaces-BPXC2DHT.js → workspaces-XC3QBD2Y.js} +2 -2
- package/dist/cli.js +24 -12
- package/dist/config.d.ts +9 -3
- package/dist/index.js +1300 -1045
- package/dist/profile/local-profile-types.d.ts +16 -0
- package/dist/profile/local-profile.d.ts +50 -4
- package/dist/sandbox/client-handles.d.ts +33 -46
- package/dist/sandbox/client.d.ts +4 -26
- package/dist/sandbox/sandbox-instance-client.d.ts +5 -5
- package/dist/sandbox/types/client.d.ts +1 -2
- package/dist/sandbox/types/core.d.ts +0 -1
- package/dist/sandbox/types/org-project-agent.d.ts +3 -89
- package/dist/sandbox/types/record.d.ts +1 -2
- package/dist/sandbox/types/runtime-profiles.d.ts +2 -2
- package/dist/sandbox-template/manifest.d.ts +1 -1
- package/dist/skills/openpond-agent-authoring/SKILL.md +40 -0
- package/dist/skills/openpond-agent-authoring/references/action-and-chat-design.md +13 -0
- package/dist/skills/openpond-agent-authoring/references/integrations-and-setup.md +13 -0
- package/dist/skills/openpond-agent-authoring/references/profile-layout.md +29 -0
- package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +14 -0
- package/dist/skills/openpond-desktop-harness/SKILL.md +1 -1
- package/dist/skills/openpond-skill-authoring/SKILL.md +44 -0
- package/dist/skills/openpond-skill-authoring/references/copying-and-adaptation.md +16 -0
- package/dist/skills/openpond-skill-authoring/references/skill-package-layout.md +38 -0
- package/dist/skills/openpond-skill-authoring/references/validation-and-repair.md +24 -0
- package/dist/skills/openpond-skill-authoring/scripts/validate-skill.mjs +102 -0
- package/dist/skills/openpond-taskset-authoring/SKILL.md +64 -22
- package/dist/skills/openpond-taskset-authoring/artifact.json +39 -0
- package/dist/skills/openpond-taskset-authoring/references/graders-and-rewards.md +3 -0
- package/dist/skills/openpond-taskset-authoring/references/method-selection.md +1 -1
- package/dist/skills/openpond-taskset-authoring/references/privacy-and-provenance.md +2 -0
- package/dist/skills/openpond-taskset-authoring/references/task-design.md +32 -0
- package/dist/web/assets/{AppDialog-DrwJb_wG.js → AppDialog-Bua3f-6v.js} +1 -1
- package/dist/web/assets/{AppsView-DPagLMsc.js → AppsView-DrJkHeSO.js} +1 -1
- package/dist/web/assets/BrowserSidebar-Bf-4Vozm.js +1 -0
- package/dist/web/assets/CommandMenu-DDZlGQiB.js +1 -0
- package/dist/web/assets/CommunityView-BtcCrba7.js +1 -0
- package/dist/web/assets/ComposerCreateImproveStrip-DOe5Otg6.js +1 -0
- package/dist/web/assets/GetStartedView-CG4z0Dtw.js +1 -0
- package/dist/web/assets/GetStartedView-yVmnGZPw.css +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-BEkmSKuv.js +1 -0
- package/dist/web/assets/LabSkillSidebar-BIotN_RB.js +1 -0
- package/dist/web/assets/LabsRoute-CfOe0Zt5.js +3 -0
- package/dist/web/assets/LabsRoute-CoSPO4HR.css +1 -0
- package/dist/web/assets/MainChatThread-C0-l1mHt.js +2 -0
- package/dist/web/assets/MainPane-Bky_Rqcx.css +1 -0
- package/dist/web/assets/MainPane-aOVlVyRK.js +6 -0
- package/dist/web/assets/MarkdownText-D7DT1k1k.js +9 -0
- package/dist/web/assets/Messages-CBIXruA9.js +9 -0
- package/dist/web/assets/NativeSkillSidebar-C4t69Y7B.js +1 -0
- package/dist/web/assets/NewProjectDialog-Bat65tYD.js +1 -0
- package/dist/web/assets/OutputsPage-C58n39Db.js +1 -0
- package/dist/web/assets/RightChatPanelStack-Bp7nZxQ0.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-BXP0j_c_.js +1 -0
- package/dist/web/assets/SettingsView-CtWK_aQ0.css +1 -0
- package/dist/web/assets/SettingsView-DOOfhO9a.js +6 -0
- package/dist/web/assets/TeamChatView-Cgxm-pKA.css +1 -0
- package/dist/web/assets/TeamChatView-De2wdqyY.js +3 -0
- package/dist/web/assets/{TerminalOverlay-BKl0p8pa.js → TerminalOverlay-BsuCH3NX.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-D2OFWyQ-.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-DBpulXTz.js +1 -0
- package/dist/web/assets/{UsageSettingsSection-zDAwzTGl.js → UsageSettingsSection-DzMLUXAO.js} +37 -37
- package/dist/web/assets/WorkspaceDiffPanel-B7yIhjNF.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-B6jXM9xG.js +32 -0
- package/dist/web/assets/WorkspaceGitDialogs-CQ0fl9Qk.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-DPGcG8fy.js → WorkspaceMonacoEditor-C2ctzITz.js} +3 -3
- package/dist/web/assets/arrow-up-right-ecwcx3xt.js +1 -0
- package/dist/web/assets/chevron-up-DP8PPfWd.js +1 -0
- package/dist/web/assets/circle-alert-envg1D6O.js +1 -0
- package/dist/web/assets/cloud-upload-5MGPLnaA.js +1 -0
- package/dist/web/assets/{cssMode-CKN9CcfG.js → cssMode-CFifcEfw.js} +1 -1
- package/dist/web/assets/folder-open-Dq3ZjeEP.js +1 -0
- package/dist/web/assets/folder-plus-EiZ5wbv_.js +1 -0
- package/dist/web/assets/git-branch-w29jmQ-X.js +1 -0
- package/dist/web/assets/{git-commit-horizontal-Bxi8YPep.js → git-commit-horizontal-CGZM0PZo.js} +1 -1
- package/dist/web/assets/{htmlMode-CeUcNhBZ.js → htmlMode-Ct1P-_lf.js} +1 -1
- package/dist/web/assets/index-ByIQyiUl.js +178 -0
- package/dist/web/assets/index-D4uCeiep.js +1 -0
- package/dist/web/assets/index-D9jTe16Q.css +1 -0
- package/dist/web/assets/info-Cd2HkIeb.js +1 -0
- package/dist/web/assets/{jsonMode-97z0Yz9u.js → jsonMode-BAUNCNAX.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-D4Tp-JmI.js → lspLanguageFeatures-fucFYI1A.js} +1 -1
- package/dist/web/assets/monaco.contribution-Ce4v5kei.js +2 -0
- package/dist/web/assets/monaco.contribution-DLLMi4cB.js +2 -0
- package/dist/web/assets/monaco.contribution-g9QiIm1d.js +2 -0
- package/dist/web/assets/monaco.contribution-nG-5Cyjz.js +2 -0
- package/dist/web/assets/monitor-DgHCnCKl.js +1 -0
- package/dist/web/assets/{play-C-37dnR1.js → play-Be0XDHBu.js} +1 -1
- package/dist/web/assets/{python-CGpDXY7_.js → python-CEhEiPo7.js} +1 -1
- package/dist/web/assets/{refresh-cw-BAaaPCXl.js → refresh-cw-DH0KLbdD.js} +1 -1
- package/dist/web/assets/reply-D1TK2yV8.js +1 -0
- package/dist/web/assets/{save-Cvxs3XyC.js → save-C1MSeBnQ.js} +1 -1
- package/dist/web/assets/square-CemI-0g5.js +1 -0
- package/dist/web/assets/square-pen-CqfsvR_n.js +1 -0
- package/dist/web/assets/{toggleHighContrast-CD42jH4g.js → toggleHighContrast-DrdQN3Rl.js} +1 -1
- package/dist/web/assets/training-BQVNUTZA.css +1 -0
- package/dist/web/assets/training-model-data-B7-1Bxil.js +1 -0
- package/dist/web/assets/{tsMode-ZROIxEjv.js → tsMode-CKB5oOUU.js} +1 -1
- package/dist/web/assets/{upload-DvCSGERK.js → upload-t751LLqP.js} +1 -1
- package/dist/web/assets/useLocalAgentSchedules-CzC3wfIP.js +1 -0
- package/dist/web/assets/{wifi-off-BIb94PkS.js → wifi-off-CxTHH3JU.js} +1 -1
- package/dist/web/assets/{workers-oYqbrVYG.js → workers-CqYddzCd.js} +1 -1
- package/dist/web/assets/{yaml-WqBjNgOO.js → yaml-e5wBkc-C.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +75 -40
- package/package.json +3 -1
- package/dist/chunks/chunk-FWLOFUPU.js +0 -864
- package/dist/chunks/chunk-HLCTINEP.js +0 -224
- package/dist/chunks/chunk-MPGSHXGF.js +0 -3896
- package/dist/chunks/chunk-T4QXKU5Y.js +0 -1
- package/dist/chunks/chunk-XEJ7XXUQ.js +0 -1301
- package/dist/chunks/chunk-ZI4GDAUB.js +0 -3522
- package/dist/chunks/cli-2KBVNDRY.js +0 -23
- package/dist/chunks/extend-REGNTBK3.js +0 -89
- package/dist/chunks/extension-7K77DAVL.js +0 -121
- package/dist/chunks/fileFromPath-DHCRY3BD.js +0 -2151
- package/dist/chunks/src-MWDIK56B.js +0 -105881
- package/dist/web/assets/BrowserSidebar-DMn2V8RV.js +0 -1
- package/dist/web/assets/CloudWorkView-Cl_7mM3c.js +0 -1
- package/dist/web/assets/CloudWorkView-DNoPIlMj.css +0 -1
- package/dist/web/assets/CommandMenu-CHMQLez_.js +0 -1
- package/dist/web/assets/CommunityView-DcHVDUk0.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-BZ3Dgzmo.js +0 -1
- package/dist/web/assets/GetStartedView-DBLdduwr.css +0 -1
- package/dist/web/assets/GetStartedView-DTRotFqz.js +0 -1
- package/dist/web/assets/LabSkillSidebar-D-PqFe1T.js +0 -1
- package/dist/web/assets/LabsRoute-BrJkBNig.css +0 -1
- package/dist/web/assets/LabsRoute-Dew1BwK5.js +0 -3
- package/dist/web/assets/MainChatThread-BaPxxzrw.js +0 -2
- package/dist/web/assets/MakeAgentTutorialLearningPanel-CBsfnONQ.js +0 -2
- package/dist/web/assets/MarkdownText-DGLfAM_Z.js +0 -7
- package/dist/web/assets/Messages-CIX9uTjX.js +0 -10
- package/dist/web/assets/NativeSkillSidebar-AP_uHn6g.js +0 -1
- package/dist/web/assets/NewProjectDialog-C6lHkafU.js +0 -1
- package/dist/web/assets/PostTrainingLearningPanel-CZEgPc8O.js +0 -2
- package/dist/web/assets/PostTrainingStatusPill-CeEpwUDB.js +0 -1
- package/dist/web/assets/ProfileSettingsSection-Cg4tKO-C.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-EumMLlEp.js +0 -1
- package/dist/web/assets/RightChatPanelStack-MXBcx3zO.js +0 -1
- package/dist/web/assets/SettingsView-Caljbns2.css +0 -1
- package/dist/web/assets/SettingsView-DyURG_Uh.js +0 -6
- package/dist/web/assets/TeamChatView-Bx44q3WV.css +0 -1
- package/dist/web/assets/TeamChatView-D3v6aqJ3.js +0 -3
- package/dist/web/assets/TrainingCreationPanel-CfZQTuT5.js +0 -1
- package/dist/web/assets/TrainingDraftPanel-DslRPSDW.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-C_MZPPlL.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-BUAnn80j.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-Drbf4ujA.js +0 -1
- package/dist/web/assets/activity-Dnr3jqb3.js +0 -1
- package/dist/web/assets/boxes-BinC8UPn.js +0 -1
- package/dist/web/assets/chevron-up-Bjp_-_Cb.js +0 -1
- package/dist/web/assets/circle-x-ubnvEYuE.js +0 -1
- package/dist/web/assets/copy-B_ZCCUMz.js +0 -1
- package/dist/web/assets/create-pipeline-request-D6uLUxe9.js +0 -4
- package/dist/web/assets/file-8HAMlTmQ.js +0 -1
- package/dist/web/assets/git-branch-l2Zih3Bv.js +0 -1
- package/dist/web/assets/index-BMFyOFRU.css +0 -1
- package/dist/web/assets/index-BzwcDzbT.js +0 -1
- package/dist/web/assets/index-KoQSSt_f.js +0 -177
- package/dist/web/assets/info-JTbDQxHx.js +0 -1
- package/dist/web/assets/make-agent-tutorial-D6nBCgv-.js +0 -2
- package/dist/web/assets/monaco.contribution-B3j6oown.js +0 -2
- package/dist/web/assets/monaco.contribution-BXHxPPWL.js +0 -2
- package/dist/web/assets/monaco.contribution-C2P5zIzh.js +0 -2
- package/dist/web/assets/monaco.contribution-C8c6OtGi.js +0 -2
- package/dist/web/assets/monitor-kzHtxHnA.js +0 -1
- package/dist/web/assets/reply-9rehU13k.js +0 -1
- package/dist/web/assets/rotate-cw-C1Z_Xs23.js +0 -1
- package/dist/web/assets/training-BN8CALIc.css +0 -1
- package/dist/web/assets/training-model-data-BXUCzS0p.js +0 -1
- package/docs/agent-edit-check-status-json.md +0 -132
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
createOpenPondSandboxClient
|
|
4
|
+
} from "./chunk-KHNHUA2H.js";
|
|
2
5
|
import {
|
|
3
6
|
mapUiBaseToApiBase,
|
|
4
7
|
resolveBaseUrl,
|
|
5
8
|
resolveSandboxApiUrlOption
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SMNFI2FU.js";
|
|
7
10
|
import {
|
|
8
11
|
DEFAULT_CACHE_TTL_MS,
|
|
9
12
|
SANDBOX_RUNTIME_PROFILE_IDS,
|
|
10
|
-
createOpenPondSandboxClient,
|
|
11
13
|
getCachedApps,
|
|
12
14
|
getCachedTools,
|
|
13
15
|
getDeploymentLogs,
|
|
14
16
|
getDeploymentStatus,
|
|
15
17
|
listApps,
|
|
18
|
+
listConfiguredProfiles,
|
|
16
19
|
listUserTools,
|
|
17
20
|
loadConfig,
|
|
18
21
|
saveGlobalConfig,
|
|
19
22
|
setCachedApps,
|
|
20
23
|
setCachedTools
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-DBHSOTYZ.js";
|
|
22
25
|
import {
|
|
23
26
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
24
27
|
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
@@ -288,6 +291,99 @@ async function promptForPath(defaultPath) {
|
|
|
288
291
|
}
|
|
289
292
|
}
|
|
290
293
|
|
|
294
|
+
// ../../packages/sdk/src/work.ts
|
|
295
|
+
var MAX_WORK_INPUT_BYTES = 100 * 1024 * 1024;
|
|
296
|
+
var WORK_OUTPUT_MIME_TYPES = Object.freeze({
|
|
297
|
+
".avif": "image/avif",
|
|
298
|
+
".csv": "text/csv",
|
|
299
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
300
|
+
".gif": "image/gif",
|
|
301
|
+
".html": "text/html",
|
|
302
|
+
".jpeg": "image/jpeg",
|
|
303
|
+
".jpg": "image/jpeg",
|
|
304
|
+
".json": "application/json",
|
|
305
|
+
".m4a": "audio/mp4",
|
|
306
|
+
".md": "text/markdown",
|
|
307
|
+
".mov": "video/quicktime",
|
|
308
|
+
".mp3": "audio/mpeg",
|
|
309
|
+
".mp4": "video/mp4",
|
|
310
|
+
".pdf": "application/pdf",
|
|
311
|
+
".png": "image/png",
|
|
312
|
+
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
313
|
+
".svg": "image/svg+xml",
|
|
314
|
+
".tsv": "text/tab-separated-values",
|
|
315
|
+
".txt": "text/plain",
|
|
316
|
+
".wav": "audio/wav",
|
|
317
|
+
".webm": "video/webm",
|
|
318
|
+
".webp": "image/webp",
|
|
319
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
// src/cli/common/vercel-protection.ts
|
|
323
|
+
import { spawnSync } from "node:child_process";
|
|
324
|
+
import path from "node:path";
|
|
325
|
+
function ensureStagingVercelProtectionBypass(requestUrl, options = {}) {
|
|
326
|
+
const env = options.env ?? process.env;
|
|
327
|
+
if (env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim()) return true;
|
|
328
|
+
if (!isOpenPondStagingUrl(requestUrl)) return false;
|
|
329
|
+
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
330
|
+
const projectDirectories = candidateProjectDirectories(cwd, env);
|
|
331
|
+
const run = options.run ?? runProtectionCommand;
|
|
332
|
+
const command = process.platform === "win32" ? "vercel.cmd" : "vercel";
|
|
333
|
+
for (const projectDirectory of projectDirectories) {
|
|
334
|
+
const result = run({
|
|
335
|
+
command,
|
|
336
|
+
args: ["project", "protection", "--format", "json"],
|
|
337
|
+
cwd: projectDirectory,
|
|
338
|
+
env
|
|
339
|
+
});
|
|
340
|
+
if (result.status !== 0 || !result.stdout.trim()) continue;
|
|
341
|
+
const secret = vercelProtectionBypassSecret(result.stdout);
|
|
342
|
+
if (!secret) continue;
|
|
343
|
+
env.VERCEL_AUTOMATION_BYPASS_SECRET = secret;
|
|
344
|
+
return true;
|
|
345
|
+
}
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
function vercelProtectionBypassSecret(rawProtectionJson) {
|
|
349
|
+
try {
|
|
350
|
+
const payload = JSON.parse(rawProtectionJson);
|
|
351
|
+
const entries = Object.entries(payload.protectionBypass ?? {});
|
|
352
|
+
const selected = entries.find(([, metadata]) => metadata?.isEnvVar === true) ?? entries[0];
|
|
353
|
+
return selected?.[0]?.trim() || null;
|
|
354
|
+
} catch {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function isOpenPondStagingUrl(requestUrl) {
|
|
359
|
+
try {
|
|
360
|
+
const hostname = new URL(requestUrl).hostname.toLowerCase();
|
|
361
|
+
return hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai");
|
|
362
|
+
} catch {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function candidateProjectDirectories(cwd, env) {
|
|
367
|
+
const configured = env.OPENPOND_VERCEL_PROJECT_DIR?.trim();
|
|
368
|
+
return [.../* @__PURE__ */ new Set([
|
|
369
|
+
...configured ? [path.resolve(cwd, configured)] : [],
|
|
370
|
+
path.resolve(cwd, "../sandbox"),
|
|
371
|
+
cwd
|
|
372
|
+
])];
|
|
373
|
+
}
|
|
374
|
+
function runProtectionCommand(input3) {
|
|
375
|
+
const result = spawnSync(input3.command, input3.args, {
|
|
376
|
+
cwd: input3.cwd,
|
|
377
|
+
env: input3.env,
|
|
378
|
+
encoding: "utf8",
|
|
379
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
380
|
+
});
|
|
381
|
+
return {
|
|
382
|
+
status: result.status,
|
|
383
|
+
stdout: typeof result.stdout === "string" ? result.stdout : ""
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
291
387
|
// src/cli/common/sandbox-options.ts
|
|
292
388
|
var SANDBOX_WORKFLOW_MODES = [
|
|
293
389
|
"readonly",
|
|
@@ -317,13 +413,57 @@ function resolveSandboxBaseUrl(config, options) {
|
|
|
317
413
|
return base.replace(/\/$/, "");
|
|
318
414
|
}
|
|
319
415
|
async function resolveSandboxClient(options) {
|
|
320
|
-
const config = await
|
|
416
|
+
const config = await loadSandboxConfig(options);
|
|
321
417
|
const uiBase = resolveBaseUrl(config);
|
|
322
418
|
const apiKey = await ensureApiKey(config, uiBase);
|
|
323
419
|
const sandboxApiUrl = resolveSandboxApiUrlOption(options) || process.env.OPENPOND_SANDBOX_API_URL?.trim() || null;
|
|
420
|
+
const baseUrl = resolveSandboxBaseUrl(config, options);
|
|
421
|
+
ensureStagingVercelProtectionBypass(sandboxApiUrl ?? baseUrl);
|
|
324
422
|
return createOpenPondSandboxClient(
|
|
325
|
-
sandboxApiUrl ? { apiKey, sandboxApiUrl } : { apiKey, baseUrl
|
|
423
|
+
sandboxApiUrl ? { apiKey, sandboxApiUrl } : { apiKey, baseUrl }
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
async function loadSandboxConfig(options) {
|
|
427
|
+
const environment = sandboxEnvironmentOption(options);
|
|
428
|
+
if (!environment) return loadConfig();
|
|
429
|
+
const profiles = await listConfiguredProfiles();
|
|
430
|
+
const requestedAccount = typeof options.account === "string" ? options.account.trim().toLowerCase() : typeof options.profile === "string" ? options.profile.trim().toLowerCase() : "";
|
|
431
|
+
const matches = profiles.filter(
|
|
432
|
+
(profile) => profileMatchesEnvironment(profile, environment) && (!requestedAccount || profile.handle.toLowerCase() === requestedAccount)
|
|
433
|
+
);
|
|
434
|
+
const selected = matches.find((profile) => profile.isActive) ?? (matches.length === 1 ? matches[0] : null);
|
|
435
|
+
if (!selected) {
|
|
436
|
+
throw new Error(
|
|
437
|
+
matches.length === 0 ? `no saved ${environment} OpenPond account found; run openpond login for that environment first` : `multiple saved ${environment} OpenPond accounts found; pass --account and --base-url to select one`
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
return loadConfig({
|
|
441
|
+
account: selected.handle,
|
|
442
|
+
...selected.baseUrl ? { baseUrl: selected.baseUrl } : {}
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
function sandboxEnvironmentOption(options) {
|
|
446
|
+
const value = typeof options.env === "string" ? options.env.trim().toLowerCase() : typeof options.environment === "string" ? options.environment.trim().toLowerCase() : "";
|
|
447
|
+
if (!value) return null;
|
|
448
|
+
if (value !== "production" && value !== "staging") {
|
|
449
|
+
throw new Error("sandbox env must be staging or production");
|
|
450
|
+
}
|
|
451
|
+
return value;
|
|
452
|
+
}
|
|
453
|
+
function profileMatchesEnvironment(profile, environment) {
|
|
454
|
+
const hosts = [profile.baseUrl, profile.apiBaseUrl].flatMap((value) => {
|
|
455
|
+
if (!value) return [];
|
|
456
|
+
try {
|
|
457
|
+
return [new URL(value).hostname.toLowerCase()];
|
|
458
|
+
} catch {
|
|
459
|
+
return [];
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
const isStaging = hosts.some(
|
|
463
|
+
(hostname) => hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai")
|
|
326
464
|
);
|
|
465
|
+
if (environment === "staging") return isStaging;
|
|
466
|
+
return !isStaging && profile.environment?.toLowerCase() === "production";
|
|
327
467
|
}
|
|
328
468
|
function parseSandboxWorkflowModeOption(value) {
|
|
329
469
|
if (value === void 0) return void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
writePrivateJsonFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DBHSOTYZ.js";
|
|
5
5
|
|
|
6
6
|
// ../../packages/cloud/src/profile/source-upload-cache.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __openpondCreateRequire } from "node:module"; var requ
|
|
|
3
3
|
// ../server/src/constants.ts
|
|
4
4
|
var DEFAULT_HOST = "127.0.0.1";
|
|
5
5
|
var DEFAULT_PORT = 17874;
|
|
6
|
-
var VERSION = "0.0.
|
|
6
|
+
var VERSION = "0.0.39";
|
|
7
7
|
var HOSTED_CHAT_SYSTEM_PROMPT = "You are OpenPond Chat. Respond in the user's language. If the user's latest message is language-neutral, ambiguous, or only a short test, respond in English. Be concise and directly answer the latest request. Do not use emojis. Use Markdown when it improves scanability. If you emit reasoning or thinking content, keep it sparse and user-readable: at most one short sentence for major progress, decisions, or blockers. Omit reasoning for routine searches, reads, tool calls, and obvious next steps. Do not restate the user request, narrate every action, or include code blocks, code excerpts, diffs, raw tool payloads, or markdown examples in reasoning. Put necessary code or exact snippets only in the final assistant answer. When the user asks to show or preview an image that is available as a workspace path or signed image URL, use Markdown image syntax like  instead of a bare path or raw HTML. For workspace-backed answers, use a Codex-style shape: brief outcome first, then Changed Files if files changed, then Verification if checks ran. End with a concise final answer that summarizes the result and verification when relevant. Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for them or they are necessary to explain a git/deploy failure.";
|
|
8
8
|
var APP_PREFERENCES_CACHE_TYPE = "app_preferences";
|
|
9
9
|
var APP_PREFERENCES_CACHE_KEY = "global";
|
|
@@ -4,111 +4,11 @@ import {
|
|
|
4
4
|
getAnyCliOptionKind,
|
|
5
5
|
getCliCommandDefinition,
|
|
6
6
|
getCliOptionKind
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
DEFAULT_OPENPOND_API_BASE_URL,
|
|
10
|
-
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
11
|
-
} from "./chunk-KSRWKXRB.js";
|
|
7
|
+
} from "./chunk-3CDPPVLE.js";
|
|
12
8
|
import {
|
|
13
9
|
parseJsonOption
|
|
14
10
|
} from "./chunk-MUMPWI4O.js";
|
|
15
11
|
|
|
16
|
-
// src/cli/common/urls.ts
|
|
17
|
-
var DEFAULT_OPENPOND_API_HOST = new URL(DEFAULT_OPENPOND_API_BASE_URL).hostname;
|
|
18
|
-
var DEFAULT_OPENPOND_WEB_HOST = new URL(DEFAULT_OPENPOND_WEB_BASE_URL).hostname;
|
|
19
|
-
function resolveAccountOption(options) {
|
|
20
|
-
const raw = typeof options.account === "string" ? options.account : typeof options.profile === "string" ? options.profile : null;
|
|
21
|
-
if (!raw) return null;
|
|
22
|
-
const trimmed = raw.trim();
|
|
23
|
-
if (!trimmed || trimmed === "true") {
|
|
24
|
-
throw new Error("account must be a non-empty value");
|
|
25
|
-
}
|
|
26
|
-
return trimmed;
|
|
27
|
-
}
|
|
28
|
-
function resolveBaseUrlOption(options) {
|
|
29
|
-
const raw = typeof options.baseUrl === "string" ? options.baseUrl : typeof options.baseurl === "string" ? options.baseurl : null;
|
|
30
|
-
if (!raw) return null;
|
|
31
|
-
const trimmed = raw.trim();
|
|
32
|
-
if (!trimmed || trimmed === "true") {
|
|
33
|
-
throw new Error("baseurl must be a non-empty value");
|
|
34
|
-
}
|
|
35
|
-
return trimmed.replace(/\/$/, "");
|
|
36
|
-
}
|
|
37
|
-
function resolveApiBaseUrlOption(options) {
|
|
38
|
-
const raw = typeof options.apiBaseUrl === "string" ? options.apiBaseUrl : typeof options.apiBaseurl === "string" ? options.apiBaseurl : null;
|
|
39
|
-
if (!raw) return null;
|
|
40
|
-
const trimmed = raw.trim();
|
|
41
|
-
if (!trimmed || trimmed === "true") {
|
|
42
|
-
throw new Error("api-base-url must be a non-empty value");
|
|
43
|
-
}
|
|
44
|
-
return trimmed.replace(/\/$/, "");
|
|
45
|
-
}
|
|
46
|
-
function resolveChatApiBaseUrlOption(options) {
|
|
47
|
-
const raw = typeof options.chatApiBaseUrl === "string" ? options.chatApiBaseUrl : typeof options.chatApiBaseurl === "string" ? options.chatApiBaseurl : typeof options.chatApiUrl === "string" ? options.chatApiUrl : null;
|
|
48
|
-
if (!raw) return null;
|
|
49
|
-
const trimmed = raw.trim();
|
|
50
|
-
if (!trimmed || trimmed === "true") {
|
|
51
|
-
throw new Error("chat-api-base-url must be a non-empty value");
|
|
52
|
-
}
|
|
53
|
-
return trimmed.replace(/\/$/, "");
|
|
54
|
-
}
|
|
55
|
-
function resolveSandboxApiUrlOption(options) {
|
|
56
|
-
const raw = typeof options.sandboxApiUrl === "string" ? options.sandboxApiUrl : typeof options.sandboxApiurl === "string" ? options.sandboxApiurl : null;
|
|
57
|
-
if (!raw) return null;
|
|
58
|
-
const trimmed = raw.trim();
|
|
59
|
-
if (!trimmed || trimmed === "true") {
|
|
60
|
-
throw new Error("sandbox-api-url must be a non-empty value");
|
|
61
|
-
}
|
|
62
|
-
return trimmed.replace(/\/$/, "");
|
|
63
|
-
}
|
|
64
|
-
function resolveBaseUrl(config) {
|
|
65
|
-
const envBase = process.env.OPENPOND_BASE_URL;
|
|
66
|
-
const base = envBase || config.baseUrl || DEFAULT_OPENPOND_WEB_BASE_URL;
|
|
67
|
-
return base.replace(/\/$/, "");
|
|
68
|
-
}
|
|
69
|
-
function mapUiBaseToApiBase(baseUrl) {
|
|
70
|
-
if (!baseUrl) return null;
|
|
71
|
-
const trimmed = baseUrl.replace(/\/$/, "");
|
|
72
|
-
try {
|
|
73
|
-
const url = new URL(trimmed);
|
|
74
|
-
const host = url.hostname.toLowerCase();
|
|
75
|
-
if (host === DEFAULT_OPENPOND_WEB_HOST || host === "openpond.live" || host === "www.openpond.live") {
|
|
76
|
-
return DEFAULT_OPENPOND_API_BASE_URL;
|
|
77
|
-
}
|
|
78
|
-
if (host === DEFAULT_OPENPOND_API_HOST || host.startsWith("api.")) {
|
|
79
|
-
return trimmed;
|
|
80
|
-
}
|
|
81
|
-
} catch {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
function resolvePublicApiBaseUrl(config) {
|
|
87
|
-
const envBase = process.env.OPENPOND_API_URL;
|
|
88
|
-
const configuredApiBase = config?.apiBaseUrl?.trim();
|
|
89
|
-
const mapped = mapUiBaseToApiBase(
|
|
90
|
-
process.env.OPENPOND_BASE_URL || config?.baseUrl
|
|
91
|
-
);
|
|
92
|
-
const base = envBase || configuredApiBase || mapped || DEFAULT_OPENPOND_API_BASE_URL;
|
|
93
|
-
return base.replace(/\/$/, "");
|
|
94
|
-
}
|
|
95
|
-
function normalizeTemplateRepoUrl(input, baseUrl) {
|
|
96
|
-
const trimmed = input.trim();
|
|
97
|
-
if (!trimmed) {
|
|
98
|
-
throw new Error("template must be non-empty");
|
|
99
|
-
}
|
|
100
|
-
if (trimmed.startsWith("http://") || trimmed.startsWith("https://")) {
|
|
101
|
-
return trimmed.endsWith(".git") ? trimmed : `${trimmed}.git`;
|
|
102
|
-
}
|
|
103
|
-
const normalizedBase = baseUrl.replace(/\/$/, "");
|
|
104
|
-
const [owner, repoRaw] = trimmed.includes("/") ? trimmed.split("/", 2) : ["openpondai", trimmed];
|
|
105
|
-
const repo = repoRaw.endsWith(".git") ? repoRaw.slice(0, -4) : repoRaw;
|
|
106
|
-
if (!owner || !repo) {
|
|
107
|
-
throw new Error("template must be <owner>/<repo> or a full https URL");
|
|
108
|
-
}
|
|
109
|
-
return `${normalizedBase}/${owner}/${repo}.git`;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
12
|
// src/cli/common/args.ts
|
|
113
13
|
var CLI_OPTION_VALUES = /* @__PURE__ */ Symbol("openpondCliOptionValues");
|
|
114
14
|
var CliUsageError = class extends Error {
|
|
@@ -278,15 +178,6 @@ function validateCommandOptions(command, options) {
|
|
|
278
178
|
}
|
|
279
179
|
|
|
280
180
|
export {
|
|
281
|
-
resolveAccountOption,
|
|
282
|
-
resolveBaseUrlOption,
|
|
283
|
-
resolveApiBaseUrlOption,
|
|
284
|
-
resolveChatApiBaseUrlOption,
|
|
285
|
-
resolveSandboxApiUrlOption,
|
|
286
|
-
resolveBaseUrl,
|
|
287
|
-
mapUiBaseToApiBase,
|
|
288
|
-
resolvePublicApiBaseUrl,
|
|
289
|
-
normalizeTemplateRepoUrl,
|
|
290
181
|
CliUsageError,
|
|
291
182
|
parseArgs
|
|
292
183
|
};
|