openpond 0.0.67 → 0.0.69
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-DZ6D7JTO.js → actions-command-6N5XWMR6.js} +4 -3
- package/dist/chunks/{app-layer-MAATABDM.js → app-layer-EXXOWJ5H.js} +7 -6
- package/dist/chunks/app-server-runtime-7FBQBE3C.js +20 -0
- package/dist/chunks/{apps-L23POEUT.js → apps-RZSDOFAG.js} +7 -6
- package/dist/chunks/{chunk-EJURKADM.js → chunk-47EIAYI7.js} +3 -3
- package/dist/chunks/{chunk-K4JEWEJQ.js → chunk-4L3ZJS2T.js} +426 -1
- package/dist/chunks/{chunk-CWCMYSX2.js → chunk-5TKZBMQM.js} +19 -3
- package/dist/chunks/{chunk-Z3SXHGOC.js → chunk-7C4OIFOC.js} +1 -1
- package/dist/chunks/{chunk-RN7MVPC6.js → chunk-BLFIIAWZ.js} +2865 -410
- package/dist/chunks/{chunk-3KLQ52B2.js → chunk-BVY5JYM6.js} +4 -9
- package/dist/chunks/{chunk-DBHSOTYZ.js → chunk-D7BO5Y5J.js} +3 -24
- package/dist/chunks/chunk-DLQQIWN2.js +648 -0
- package/dist/chunks/{chunk-T55IL3GI.js → chunk-DNXBJZAU.js} +1 -1
- package/dist/chunks/{chunk-2N57HMVR.js → chunk-F36ZVO6U.js} +3 -3
- package/dist/chunks/{chunk-42WUHGKD.js → chunk-FEOLMLYU.js} +21 -14
- package/dist/chunks/{chunk-QETF6ILG.js → chunk-FQS2QL5F.js} +359 -841
- package/dist/chunks/{chunk-J2REM7LE.js → chunk-HFPUR4CQ.js} +5 -116
- package/dist/chunks/{chunk-JIEUB6OS.js → chunk-J3YDKJFD.js} +1 -1
- package/dist/chunks/{chunk-JGOP4GCK.js → chunk-JTHL5XJ2.js} +5 -25
- package/dist/chunks/{chunk-BPII37IS.js → chunk-MMRJNSWY.js} +578 -118
- package/dist/chunks/{chunk-DEEQG5MY.js → chunk-NPNIL6SQ.js} +1 -1
- package/dist/chunks/{chunk-7OQFWODA.js → chunk-OOM2PHBE.js} +10377 -8267
- package/dist/chunks/{chunk-J3PSR6F6.js → chunk-QTN6HXOR.js} +3 -3
- package/dist/chunks/{chunk-MHUN6LXO.js → chunk-SFMNGWNO.js} +1 -1
- package/dist/chunks/{chunk-PLDCQVNW.js → chunk-WBAZFKC7.js} +4 -4
- package/dist/chunks/chunk-X7ZG4TSW.js +3063 -0
- package/dist/chunks/{chunk-XIFRFL4T.js → chunk-Y57RTLVV.js} +33 -33
- package/dist/chunks/{chunk-BYAPLT37.js → chunk-YVCYVDNP.js} +4 -2
- package/dist/chunks/{cli-6N2QZCOF.js → cli-HIXVXM72.js} +9 -8
- package/dist/chunks/{core-commands-5TW5I3Z6.js → core-commands-34SVH6ZQ.js} +8 -7
- package/dist/chunks/{desktop-test-JG6XDUTT.js → desktop-test-66DPBNJX.js} +7 -6
- package/dist/chunks/{extension-UUM4ELAF.js → extension-ZMRHCDO3.js} +544 -111
- package/dist/chunks/{help-JFQVVETR.js → help-COHCZEP2.js} +1 -1
- package/dist/chunks/{opchat-3772JCGJ.js → opchat-2PGW2GNN.js} +10 -17
- package/dist/chunks/{organizations-USWBONDO.js → organizations-NZ4OY56V.js} +10 -9
- package/dist/chunks/{profile-2MYIXRUK.js → profile-GEMTRPUG.js} +12 -11
- package/dist/chunks/{project-agent-VDKGFG5V.js → project-agent-NX6YBGWC.js} +11 -10
- package/dist/chunks/{sandbox-command-M5W3VWVP.js → sandbox-command-UEY53OJO.js} +8 -7
- package/dist/chunks/{sandbox-template-25SKARVM.js → sandbox-template-YKYRB645.js} +11 -10
- package/dist/chunks/{src-7RDE5SYD.js → src-IXYDKOBI.js} +4409 -1474
- package/dist/chunks/{src-KYP4COYD.js → src-LKJBD5AM.js} +6 -5
- package/dist/chunks/{teams-bot-BJJISVOG.js → teams-bot-K6KZHZJV.js} +7 -6
- package/dist/chunks/{workspaces-EQTHCFVV.js → workspaces-WXM72UZF.js} +2 -2
- package/dist/cli.js +13 -13
- package/dist/client.d.ts +1 -1
- package/dist/hosted-chat.d.ts +5 -0
- package/dist/index.js +14554 -14173
- package/dist/skills/openpond-refiner-authoring/SKILL.md +29 -0
- package/dist/skills/openpond-refiner-authoring/references/core-boundary.md +5 -0
- package/dist/skills/openpond-refiner-authoring/references/review-profile.md +7 -0
- package/dist/skills/openpond-refiner-authoring/references/validation-and-activation.md +5 -0
- package/dist/web/assets/App-BF9L0JUv.js +171 -0
- package/dist/web/assets/{AppDialog-B8HYaM0m.js → AppDialog-DX-xs3KA.js} +1 -1
- package/dist/web/assets/AppTerminalPanel-CYVj_ITT.js +2 -0
- package/dist/web/assets/AppsView-ByjyGog7.js +1 -0
- package/dist/web/assets/AppsView-CzbB5pXp.css +1 -0
- package/dist/web/assets/BrowserSidebar-BDwtMAZl.js +1 -0
- package/dist/web/assets/CartesianChart-Dv6jJfPR.js +53 -0
- package/dist/web/assets/CollaborationTabs-BfVlyLmR.css +1 -0
- package/dist/web/assets/CollaborationTabs-CC5AIhMh.js +1 -0
- package/dist/web/assets/CommandMenu-Ct0Sx7yP.js +1 -0
- package/dist/web/assets/CommunityView-C_zVE0jg.js +1 -0
- package/dist/web/assets/ComposerCreateImproveStrip-CNn4OywM.js +1 -0
- package/dist/web/assets/GetStartedView-DRFpHDLd.js +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-BzF-IVXQ.js +1 -0
- package/dist/web/assets/LabSkillSidebar-B9jY4AgE.js +1 -0
- package/dist/web/assets/LabsRoute-CS_orT9s.css +1 -0
- package/dist/web/assets/LabsRoute-Di1Zs4gZ.js +2 -0
- package/dist/web/assets/MainChatThread-8VzlD8Hi.js +2 -0
- package/dist/web/assets/MainPane-StAOFINE.js +6 -0
- package/dist/web/assets/MarkdownText-B8D_ftSJ.js +9 -0
- package/dist/web/assets/{Messages-CWoU5OZ2.js → Messages-TY62tiDp.js} +6 -6
- package/dist/web/assets/NativeSkillSidebar-DjebFRoi.js +1 -0
- package/dist/web/assets/NewExperienceSwitcher-C-bJxHxY.js +1 -0
- package/dist/web/assets/NewProjectDialog-Cx8QcZm7.js +1 -0
- package/dist/web/assets/OutputsPage-Y9HM-SHX.js +1 -0
- package/dist/web/assets/ProjectsPage-BBr58yKT.js +1 -0
- package/dist/web/assets/ProjectsPage-DdG-U9ZW.css +1 -0
- package/dist/web/assets/RightChatPanelStack-DzUbDKwp.js +1 -0
- package/dist/web/assets/RightSidebarHomePanel-Dx-1elSI.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-BuXw_W8b.js +1 -0
- package/dist/web/assets/SettingsView-DB_zPHYY.js +6 -0
- package/dist/web/assets/{TeamChatView-Cst9bXqE.js → TeamChatView-Bkyhu40R.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-72oJPCbi.js → TerminalOverlay-CaCkZDzO.js} +3 -3
- package/dist/web/assets/TrainingCreationPanel-Vvi41WNT.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-C2C3hffI.js +1 -0
- package/dist/web/assets/UsageSettingsSection-Csg3diiE.css +1 -0
- package/dist/web/assets/UsageSettingsSection-DpPBd-ra.js +7 -0
- package/dist/web/assets/{MainPane-BfVDe9f7.css → WorkSidebarPanel-Bky_Rqcx.css} +1 -1
- package/dist/web/assets/WorkSidebarPanel-CeWGboTh.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-D_zKOW4K.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-BTz9FISP.js +32 -0
- package/dist/web/assets/WorkspaceGitDialogs-BnBRUYpS.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-CxD40rNT.js → WorkspaceMonacoEditor--GOVrHFp.js} +3 -3
- package/dist/web/assets/activity-DA5DNQwD.js +1 -0
- package/dist/web/assets/arrow-up-right-BRZWXpqJ.js +1 -0
- package/dist/web/assets/chat-file-links-CgFHK89C.js +1 -0
- package/dist/web/assets/chevron-up-DSv2auz_.js +1 -0
- package/dist/web/assets/clipboard-dPd_3lpG.js +1 -0
- package/dist/web/assets/cloud-upload-DOwvN4hp.js +1 -0
- package/dist/web/assets/{cssMode-CJPZShEy.js → cssMode-BM4j9M0D.js} +1 -1
- package/dist/web/assets/desktop-files-BQj1J-ob.js +1 -0
- package/dist/web/assets/figtree-latin-CEHu_veL.woff2 +0 -0
- package/dist/web/assets/folder-open-DavjPCw4.js +1 -0
- package/dist/web/assets/folder-plus-Dyqast6G.js +1 -0
- package/dist/web/assets/git-branch-zKnZdQiX.js +1 -0
- package/dist/web/assets/git-commit-horizontal-s3X0cQlz.js +1 -0
- package/dist/web/assets/{htmlMode-fp60PdLB.js → htmlMode-Nlx7ckXa.js} +1 -1
- package/dist/web/assets/index-5-B6FIuE.js +9 -0
- package/dist/web/assets/index-CQ3CPVHZ.css +1 -0
- package/dist/web/assets/index-CuoGlf-W.js +1 -0
- package/dist/web/assets/info-CVvrNOHr.js +1 -0
- package/dist/web/assets/{jsonMode-9tQDt87U.js → jsonMode-B7monA6g.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DhOXsUmI.js → lspLanguageFeatures-CcJ9GDtK.js} +1 -1
- package/dist/web/assets/minimize-2-O1DnznGK.js +1 -0
- package/dist/web/assets/{monaco.contribution-BPct5K1-.js → monaco.contribution-2PozfA9g.js} +2 -2
- package/dist/web/assets/{monaco.contribution-D3sQBkAF.js → monaco.contribution-BMAF2bmO.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DRNDpuUQ.js → monaco.contribution-BSJ2jQTi.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BCc7daQX.js → monaco.contribution-QOOCizYq.js} +2 -2
- package/dist/web/assets/play-BpCc5ZbR.js +1 -0
- package/dist/web/assets/{python-CO5ats2F.js → python-BK41iew-.js} +1 -1
- package/dist/web/assets/refresh-cw-Csoy1ev1.js +1 -0
- package/dist/web/assets/save-Dbztj0W7.js +1 -0
- package/dist/web/assets/square-ju7fWa0W.js +1 -0
- package/dist/web/assets/{toggleHighContrast-7mdj7cLQ.js → toggleHighContrast-DrmwDpyz.js} +1 -1
- package/dist/web/assets/{training-BQVNUTZA.css → training-daZlCtKV.css} +1 -1
- package/dist/web/assets/{training-model-data-V8276E5q.js → training-model-data-CKOkpBBL.js} +1 -1
- package/dist/web/assets/{tsMode-qx-y8781.js → tsMode-CFgCMr7d.js} +1 -1
- package/dist/web/assets/upload-C5nhiSMq.js +1 -0
- package/dist/web/assets/useLocalAgentSchedules-LAsobERb.js +1 -0
- package/dist/web/assets/wifi-off-BHxh2UbA.js +1 -0
- package/dist/web/assets/{workers-DC-vdMwa.js → workers-FKb-NyBI.js} +1 -1
- package/dist/web/assets/{yaml-Bu611qJb.js → yaml-C5DbF9S6.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/api/vercel-protection.d.ts +0 -1
- package/dist/chunks/app-server-runtime-CJFOO54B.js +0 -19
- package/dist/chunks/chunk-WYDVQOBL.js +0 -17581
- package/dist/web/assets/AppsView-DIhprTIC.css +0 -1
- package/dist/web/assets/AppsView-DzVZTM0y.js +0 -1
- package/dist/web/assets/BrowserSidebar-BobBdHTm.js +0 -1
- package/dist/web/assets/CommandMenu-pp69WTbf.js +0 -1
- package/dist/web/assets/CommunityView-D1V7y3l5.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-Dv5RKQaG.js +0 -1
- package/dist/web/assets/GetStartedView-DXmHN_BA.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-BDN4AQVt.js +0 -1
- package/dist/web/assets/LabSkillSidebar-DYR_pq0Q.js +0 -1
- package/dist/web/assets/LabsRoute-CFXaPC-i.js +0 -3
- package/dist/web/assets/LabsRoute-DDTgtCul.css +0 -1
- package/dist/web/assets/MainChatThread-C1XrdeAC.js +0 -2
- package/dist/web/assets/MainPane-D8Mu6Nf3.js +0 -6
- package/dist/web/assets/MarkdownText-D5-tAHVZ.js +0 -9
- package/dist/web/assets/NativeSkillSidebar-cKgCM5s9.js +0 -1
- package/dist/web/assets/NewProjectDialog-B4wrkUrZ.js +0 -1
- package/dist/web/assets/OutputsPage-DoJz_FcJ.js +0 -1
- package/dist/web/assets/RightChatPanelStack-goxULcZy.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-DLtJnU9O.js +0 -1
- package/dist/web/assets/SettingsView-M-_wJvH1.js +0 -6
- package/dist/web/assets/TrainingCreationPanel-BK8T_q3X.js +0 -1
- package/dist/web/assets/TrainingDraftPanel-DSZ8e9ve.js +0 -1
- package/dist/web/assets/UsageSettingsSection-Co0UH4EJ.js +0 -59
- package/dist/web/assets/UsageSettingsSection-O8VK0qBL.css +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-OcpOQdEE.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-Cg_VY5XS.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-ApPWIEpT.js +0 -1
- package/dist/web/assets/arrow-up-right-DtR75sMi.js +0 -1
- package/dist/web/assets/chevron-up-DH33C_vT.js +0 -1
- package/dist/web/assets/cloud-upload-Cp4pi0X7.js +0 -1
- package/dist/web/assets/folder-open-hEq-0bAV.js +0 -1
- package/dist/web/assets/folder-plus-ClgoqsjW.js +0 -1
- package/dist/web/assets/git-branch-CLBU2IM9.js +0 -1
- package/dist/web/assets/git-commit-horizontal-CpOgDvCh.js +0 -1
- package/dist/web/assets/index-2rbiOiLR.js +0 -179
- package/dist/web/assets/index-BWqDWo3b.js +0 -1
- package/dist/web/assets/index-CHqMtVfF.css +0 -1
- package/dist/web/assets/info-D3L7JgSo.js +0 -1
- package/dist/web/assets/play-DUBpqm-k.js +0 -1
- package/dist/web/assets/refresh-cw-D7OfmCic.js +0 -1
- package/dist/web/assets/save-CJN-WmnU.js +0 -1
- package/dist/web/assets/square-Bx9UTvNe.js +0 -1
- package/dist/web/assets/upload-Bp6EKIYv.js +0 -1
- package/dist/web/assets/useLocalAgentSchedules-CZ1tgG1x.js +0 -1
- package/dist/web/assets/wifi-off-DovWnIF6.js +0 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-SMNFI2FU.js";
|
|
7
7
|
import {
|
|
8
8
|
createOpenPondSandboxClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JTHL5XJ2.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_CACHE_TTL_MS,
|
|
12
12
|
SANDBOX_RUNTIME_PROFILE_IDS,
|
|
@@ -15,13 +15,12 @@ import {
|
|
|
15
15
|
getDeploymentLogs,
|
|
16
16
|
getDeploymentStatus,
|
|
17
17
|
listApps,
|
|
18
|
-
listConfiguredProfiles,
|
|
19
18
|
listUserTools,
|
|
20
19
|
loadConfig,
|
|
21
20
|
saveGlobalConfig,
|
|
22
21
|
setCachedApps,
|
|
23
22
|
setCachedTools
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D7BO5Y5J.js";
|
|
25
24
|
import {
|
|
26
25
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
27
26
|
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
@@ -291,71 +290,6 @@ async function promptForPath(defaultPath) {
|
|
|
291
290
|
}
|
|
292
291
|
}
|
|
293
292
|
|
|
294
|
-
// src/cli/common/vercel-protection.ts
|
|
295
|
-
import { spawnSync } from "node:child_process";
|
|
296
|
-
import path from "node:path";
|
|
297
|
-
function ensureStagingVercelProtectionBypass(requestUrl, options = {}) {
|
|
298
|
-
const env = options.env ?? process.env;
|
|
299
|
-
if (env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim()) return true;
|
|
300
|
-
if (!isOpenPondStagingUrl(requestUrl)) return false;
|
|
301
|
-
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
302
|
-
const projectDirectories = candidateProjectDirectories(cwd, env);
|
|
303
|
-
const run = options.run ?? runProtectionCommand;
|
|
304
|
-
const command = process.platform === "win32" ? "vercel.cmd" : "vercel";
|
|
305
|
-
for (const projectDirectory of projectDirectories) {
|
|
306
|
-
const result = run({
|
|
307
|
-
command,
|
|
308
|
-
args: ["project", "protection", "--format", "json"],
|
|
309
|
-
cwd: projectDirectory,
|
|
310
|
-
env
|
|
311
|
-
});
|
|
312
|
-
if (result.status !== 0 || !result.stdout.trim()) continue;
|
|
313
|
-
const secret = vercelProtectionBypassSecret(result.stdout);
|
|
314
|
-
if (!secret) continue;
|
|
315
|
-
env.VERCEL_AUTOMATION_BYPASS_SECRET = secret;
|
|
316
|
-
return true;
|
|
317
|
-
}
|
|
318
|
-
return false;
|
|
319
|
-
}
|
|
320
|
-
function vercelProtectionBypassSecret(rawProtectionJson) {
|
|
321
|
-
try {
|
|
322
|
-
const payload = JSON.parse(rawProtectionJson);
|
|
323
|
-
const entries = Object.entries(payload.protectionBypass ?? {});
|
|
324
|
-
const selected = entries.find(([, metadata]) => metadata?.isEnvVar === true) ?? entries[0];
|
|
325
|
-
return selected?.[0]?.trim() || null;
|
|
326
|
-
} catch {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
function isOpenPondStagingUrl(requestUrl) {
|
|
331
|
-
try {
|
|
332
|
-
const hostname = new URL(requestUrl).hostname.toLowerCase();
|
|
333
|
-
return hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai");
|
|
334
|
-
} catch {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function candidateProjectDirectories(cwd, env) {
|
|
339
|
-
const configured = env.OPENPOND_VERCEL_PROJECT_DIR?.trim();
|
|
340
|
-
return [.../* @__PURE__ */ new Set([
|
|
341
|
-
...configured ? [path.resolve(cwd, configured)] : [],
|
|
342
|
-
path.resolve(cwd, "../sandbox"),
|
|
343
|
-
cwd
|
|
344
|
-
])];
|
|
345
|
-
}
|
|
346
|
-
function runProtectionCommand(input3) {
|
|
347
|
-
const result = spawnSync(input3.command, input3.args, {
|
|
348
|
-
cwd: input3.cwd,
|
|
349
|
-
env: input3.env,
|
|
350
|
-
encoding: "utf8",
|
|
351
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
352
|
-
});
|
|
353
|
-
return {
|
|
354
|
-
status: result.status,
|
|
355
|
-
stdout: typeof result.stdout === "string" ? result.stdout : ""
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
|
|
359
293
|
// src/cli/common/sandbox-options.ts
|
|
360
294
|
var SANDBOX_WORKFLOW_MODES = [
|
|
361
295
|
"readonly",
|
|
@@ -374,13 +308,7 @@ var SANDBOX_RUNTIME_PROFILES = [
|
|
|
374
308
|
...SANDBOX_RUNTIME_PROFILE_IDS
|
|
375
309
|
];
|
|
376
310
|
function resolveSandboxBaseUrl(config, options) {
|
|
377
|
-
|
|
378
|
-
if (envName === "staging") {
|
|
379
|
-
return "https://api-new.staging-api.openpond.ai";
|
|
380
|
-
}
|
|
381
|
-
if (envName && envName !== "production") {
|
|
382
|
-
throw new Error("sandbox env must be staging or production");
|
|
383
|
-
}
|
|
311
|
+
void options;
|
|
384
312
|
const base = process.env.OPENPOND_SANDBOX_BASE_URL || process.env.OPENPOND_API_URL || config.apiBaseUrl || mapUiBaseToApiBase(process.env.OPENPOND_BASE_URL || config.baseUrl) || DEFAULT_OPENPOND_API_BASE_URL;
|
|
385
313
|
return base.replace(/\/$/, "");
|
|
386
314
|
}
|
|
@@ -390,52 +318,13 @@ async function resolveSandboxClient(options) {
|
|
|
390
318
|
const apiKey = await ensureApiKey(config, uiBase);
|
|
391
319
|
const sandboxApiUrl = resolveSandboxApiUrlOption(options) || process.env.OPENPOND_SANDBOX_API_URL?.trim() || null;
|
|
392
320
|
const baseUrl = resolveSandboxBaseUrl(config, options);
|
|
393
|
-
ensureStagingVercelProtectionBypass(sandboxApiUrl ?? baseUrl);
|
|
394
321
|
return createOpenPondSandboxClient(
|
|
395
322
|
sandboxApiUrl ? { apiKey, sandboxApiUrl } : { apiKey, baseUrl }
|
|
396
323
|
);
|
|
397
324
|
}
|
|
398
325
|
async function loadSandboxConfig(options) {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
const profiles = await listConfiguredProfiles();
|
|
402
|
-
const requestedAccount = typeof options.account === "string" ? options.account.trim().toLowerCase() : typeof options.profile === "string" ? options.profile.trim().toLowerCase() : "";
|
|
403
|
-
const matches = profiles.filter(
|
|
404
|
-
(profile) => profileMatchesEnvironment(profile, environment) && (!requestedAccount || profile.handle.toLowerCase() === requestedAccount)
|
|
405
|
-
);
|
|
406
|
-
const selected = matches.find((profile) => profile.isActive) ?? (matches.length === 1 ? matches[0] : null);
|
|
407
|
-
if (!selected) {
|
|
408
|
-
throw new Error(
|
|
409
|
-
matches.length === 0 ? `no saved ${environment} OpenPond account found; run openpond login for that environment first` : `multiple saved ${environment} OpenPond accounts found; pass --account and --base-url to select one`
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
return loadConfig({
|
|
413
|
-
account: selected.handle,
|
|
414
|
-
...selected.baseUrl ? { baseUrl: selected.baseUrl } : {}
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
function sandboxEnvironmentOption(options) {
|
|
418
|
-
const value = typeof options.env === "string" ? options.env.trim().toLowerCase() : typeof options.environment === "string" ? options.environment.trim().toLowerCase() : "";
|
|
419
|
-
if (!value) return null;
|
|
420
|
-
if (value !== "production" && value !== "staging") {
|
|
421
|
-
throw new Error("sandbox env must be staging or production");
|
|
422
|
-
}
|
|
423
|
-
return value;
|
|
424
|
-
}
|
|
425
|
-
function profileMatchesEnvironment(profile, environment) {
|
|
426
|
-
const hosts = [profile.baseUrl, profile.apiBaseUrl].flatMap((value) => {
|
|
427
|
-
if (!value) return [];
|
|
428
|
-
try {
|
|
429
|
-
return [new URL(value).hostname.toLowerCase()];
|
|
430
|
-
} catch {
|
|
431
|
-
return [];
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
const isStaging = hosts.some(
|
|
435
|
-
(hostname) => hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai")
|
|
436
|
-
);
|
|
437
|
-
if (environment === "staging") return isStaging;
|
|
438
|
-
return !isStaging && profile.environment?.toLowerCase() === "production";
|
|
326
|
+
void options;
|
|
327
|
+
return loadConfig();
|
|
439
328
|
}
|
|
440
329
|
function parseSandboxWorkflowModeOption(value) {
|
|
441
330
|
if (value === void 0) return void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
writePrivateJsonFile
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D7BO5Y5J.js";
|
|
5
5
|
|
|
6
6
|
// ../../packages/cloud/src/profile/source-upload-cache.ts
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// ../../packages/cloud/dist/api/vercel-protection.js
|
|
4
|
-
var VERCEL_PROTECTION_BYPASS_HEADER = "x-vercel-protection-bypass";
|
|
5
|
-
function withVercelProtectionBypass(requestUrl, inputHeaders, env = typeof process === "undefined" ? {} : process.env) {
|
|
6
|
-
const headers = new Headers(inputHeaders);
|
|
7
|
-
const secret = env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim();
|
|
8
|
-
if (!secret || !isOpenPondStagingUrl(requestUrl))
|
|
9
|
-
return headers;
|
|
10
|
-
headers.set(VERCEL_PROTECTION_BYPASS_HEADER, secret);
|
|
11
|
-
return headers;
|
|
12
|
-
}
|
|
13
|
-
function isOpenPondStagingUrl(requestUrl) {
|
|
14
|
-
try {
|
|
15
|
-
const hostname = new URL(requestUrl).hostname.toLowerCase();
|
|
16
|
-
return hostname === "staging.openpond.ai" || hostname === "staging-api.openpond.ai" || hostname.endsWith(".staging-api.openpond.ai");
|
|
17
|
-
} catch {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
3
|
// ../../packages/cloud/dist/api/core.js
|
|
23
4
|
var DEFAULT_API_TIMEOUT_MS = 3e4;
|
|
24
5
|
var DEFAULT_API_RESPONSE_BYTES = 8 * 1024 * 1024;
|
|
@@ -61,7 +42,7 @@ var OpenPondApiError = class extends Error {
|
|
|
61
42
|
async function apiFetch(baseUrl, token, requestPath, options = {}) {
|
|
62
43
|
const { timeoutMs = DEFAULT_API_TIMEOUT_MS, maxResponseBytes = DEFAULT_API_RESPONSE_BYTES, ...init } = options;
|
|
63
44
|
const requestUrl = `${baseUrl}${requestPath}`;
|
|
64
|
-
const headers =
|
|
45
|
+
const headers = new Headers(init.headers);
|
|
65
46
|
headers.set("Content-Type", "application/json");
|
|
66
47
|
const apiKey = process.env.OPENPOND_API_KEY;
|
|
67
48
|
const trimmedToken = token?.trim() || "";
|
|
@@ -203,7 +184,7 @@ function apiRootUrlFromSandboxApiUrl(sandboxApiUrl) {
|
|
|
203
184
|
return sandboxApiUrl.slice(0, -suffix.length);
|
|
204
185
|
}
|
|
205
186
|
function isOpenPondHostedApiHost(hostname) {
|
|
206
|
-
return hostname === "api.openpond.ai" || hostname
|
|
187
|
+
return hostname === "api.openpond.ai" || hostname.startsWith("api") && hostname.endsWith(".openpond.ai");
|
|
207
188
|
}
|
|
208
189
|
|
|
209
190
|
// ../../packages/cloud/dist/sandbox/client-handles.js
|
|
@@ -1781,14 +1762,14 @@ function requireToken(value) {
|
|
|
1781
1762
|
throw new Error("OpenPond API key is required");
|
|
1782
1763
|
return trimmed;
|
|
1783
1764
|
}
|
|
1784
|
-
function hostedHeaders(
|
|
1765
|
+
function hostedHeaders(token, accept, requestId) {
|
|
1785
1766
|
const headers = new Headers();
|
|
1786
1767
|
headers.set("Authorization", `Bearer ${requireToken(token)}`);
|
|
1787
1768
|
headers.set("Content-Type", "application/json");
|
|
1788
1769
|
headers.set("Accept", accept);
|
|
1789
1770
|
headers.set("x-openpond-client", "openpond-code");
|
|
1790
1771
|
headers.set("x-openpond-request-id", requestId || randomUUID());
|
|
1791
|
-
return
|
|
1772
|
+
return headers;
|
|
1792
1773
|
}
|
|
1793
1774
|
async function readError(response) {
|
|
1794
1775
|
const text = await response.text().catch(() => "");
|
|
@@ -1834,7 +1815,7 @@ async function sendHostedChatTurn(options) {
|
|
|
1834
1815
|
const requestUrl = `${apiBaseUrl}/chat/completions`;
|
|
1835
1816
|
const response = await fetch(requestUrl, {
|
|
1836
1817
|
method: "POST",
|
|
1837
|
-
headers: hostedHeaders(
|
|
1818
|
+
headers: hostedHeaders(options.token, "application/json", options.requestId),
|
|
1838
1819
|
body: JSON.stringify(buildHostedChatBody(options, false)),
|
|
1839
1820
|
signal: options.signal
|
|
1840
1821
|
});
|
|
@@ -1845,7 +1826,6 @@ async function sendHostedChatTurn(options) {
|
|
|
1845
1826
|
}
|
|
1846
1827
|
|
|
1847
1828
|
export {
|
|
1848
|
-
withVercelProtectionBypass,
|
|
1849
1829
|
OpenPondApiError,
|
|
1850
1830
|
apiFetch,
|
|
1851
1831
|
readApiJson,
|