openpond 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/chunks/{app-layer-GUF2CKYH.js → app-layer-LF2HK2B2.js} +6 -3
- package/dist/chunks/{apps-DIVHAUOV.js → apps-ZMCMQZKX.js} +16 -12
- package/dist/chunks/{chunk-YPK2W34Z.js → chunk-2WMGA5FE.js} +8 -10
- package/dist/chunks/{chunk-NTRTK6C6.js → chunk-35PPAOWD.js} +2 -2
- package/dist/chunks/chunk-3VURZQHA.js +864 -0
- package/dist/chunks/{chunk-FRPL5XPX.js → chunk-43YI36NA.js} +1 -1
- package/dist/chunks/{chunk-4Y25BACE.js → chunk-A3CJUBA7.js} +1 -1
- package/dist/chunks/{chunk-RLQGMSW7.js → chunk-BWA3COR4.js} +573 -1204
- package/dist/chunks/{chunk-TXJ4TIDO.js → chunk-HLCTINEP.js} +1 -1
- package/dist/chunks/{chunk-GUGFYXFS.js → chunk-IATK3CIP.js} +6 -6
- package/dist/chunks/{chunk-2GV3QBBZ.js → chunk-ICLLW5QD.js} +1 -1
- package/dist/chunks/chunk-KSRWKXRB.js +12 -0
- package/dist/chunks/{chunk-II2ERA2H.js → chunk-KT2BB4AR.js} +30 -11
- package/dist/chunks/{chunk-XIF53VR3.js → chunk-LNKYEHIJ.js} +28 -3
- package/dist/chunks/{chunk-SECNDLPQ.js → chunk-MHBQWGCL.js} +1070 -57
- package/dist/chunks/chunk-MUMPWI4O.js +92 -0
- package/dist/chunks/{chunk-ZZOTKXRD.js → chunk-N6E6YSTP.js} +2 -2
- package/dist/chunks/{chunk-S3VA47DG.js → chunk-PGET7EZF.js} +7 -5
- package/dist/chunks/chunk-T4QXKU5Y.js +1 -0
- package/dist/chunks/{chunk-LUA5QGQP.js → chunk-VFL2JVBZ.js} +48 -121
- package/dist/chunks/{chunk-EY52SLOQ.js → chunk-WL76II47.js} +1 -1
- package/dist/chunks/{chunk-CRFB72X2.js → chunk-WTA33KQQ.js} +23 -19
- package/dist/chunks/{chunk-LHYK6QO2.js → chunk-XEJ7XXUQ.js} +1 -0
- package/dist/chunks/{chunk-2I5TZW66.js → chunk-ZPL4GZML.js} +128 -4
- package/dist/chunks/chunk-ZZ4ECDTP.js +668 -0
- package/dist/chunks/{cli-HUVI6ELM.js → cli-5NFIDCRL.js} +5 -5
- package/dist/chunks/cli-AS3DZ7XB.js +23 -0
- package/dist/chunks/{core-commands-2HUTKFHQ.js → core-commands-7223BEQL.js} +7 -4
- package/dist/chunks/{extend-PAJMXYKV.js → extend-6N5S5KA5.js} +18 -13
- package/dist/chunks/extension-FJSVCG2Q.js +121 -0
- package/dist/chunks/{harness-UWAS2VAN.js → harness-OMJXIGEW.js} +6 -3
- package/dist/chunks/{help-M7D2XAOX.js → help-YPPROIS7.js} +2 -1
- package/dist/chunks/{opchat-FQ2CJVM6.js → opchat-K7IYFPX6.js} +12 -7
- package/dist/chunks/{organizations-L5N6LJ7O.js → organizations-W3FMAWQ4.js} +8 -5
- package/dist/chunks/{profile-KH5IKVNY.js → profile-N4B3F7M7.js} +11 -8
- package/dist/chunks/{project-agent-F4NHVRGY.js → project-agent-NA6SGU25.js} +10 -7
- package/dist/chunks/{sandbox-command-DDXRQNB6.js → sandbox-command-AKCFJKKN.js} +7 -4
- package/dist/chunks/{sandbox-template-5EEEQKR5.js → sandbox-template-5NKTAXCL.js} +11 -7
- package/dist/chunks/{src-34FV42HE.js → src-SCS4KKP4.js} +2387 -1262
- package/dist/chunks/{src-LHZWUSD7.js → src-XAVSQTVR.js} +3 -3
- package/dist/chunks/{teams-bot-HFWO5GOV.js → teams-bot-557NZC73.js} +6 -3
- package/dist/chunks/{workspaces-LO44JAC2.js → workspaces-S2H75XQB.js} +6 -2
- package/dist/cli.js +14 -11
- package/dist/index.js +27 -9
- package/dist/profile/local-profile-types.d.ts +1 -0
- package/dist/profile/profile-skills.d.ts +2 -0
- package/dist/web/assets/{AppDialog-T3j6O3yg.js → AppDialog-y6krB0MJ.js} +1 -1
- package/dist/web/assets/{AppsView-70Qqf9eJ.js → AppsView-4F6oLktr.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-CdBLHdNW.js → BrowserSidebar-C0MHQaaD.js} +1 -1
- package/dist/web/assets/{CloudWorkView-C5-jvlOo.js → CloudWorkView-DwFIZoXy.js} +1 -1
- package/dist/web/assets/CommandMenu-CYGFrMZi.js +1 -0
- package/dist/web/assets/{CommunityView-BHUJ9Hun.js → CommunityView-C6n89YXz.js} +1 -1
- package/dist/web/assets/ComposerCreateImproveStrip-C3RwXC3_.js +1 -0
- package/dist/web/assets/{GetStartedView-CIXScviw.js → GetStartedView-fwD0ZXo9.js} +1 -1
- package/dist/web/assets/LabSkillSidebar-BSuc-NJr.js +1 -0
- package/dist/web/assets/LabSkillSidebar-CVxtS9pd.css +1 -0
- package/dist/web/assets/LabsRoute-BrJkBNig.css +1 -0
- package/dist/web/assets/LabsRoute-D2y8dSsT.js +3 -0
- package/dist/web/assets/MainChatThread-Dj_Ry6WQ.js +2 -0
- package/dist/web/assets/{MakeAgentTutorialLearningPanel-r7jyZVc0.js → MakeAgentTutorialLearningPanel-Bz2VDaRe.js} +2 -2
- package/dist/web/assets/{MarkdownText-E35C404I.js → MarkdownText-B6Nu_0Fz.js} +4 -4
- package/dist/web/assets/Messages-CH2wfv2a.js +10 -0
- package/dist/web/assets/NativeSkillSidebar-4iUfgwqO.js +1 -0
- package/dist/web/assets/{NewProjectDialog-BowacUmA.js → NewProjectDialog-8M5-6-h-.js} +1 -1
- package/dist/web/assets/{PostTrainingLearningPanel-oJu5qaHK.js → PostTrainingLearningPanel-CdG5KHZs.js} +2 -2
- package/dist/web/assets/{PostTrainingStatusPill-B9Eoc4s0.js → PostTrainingStatusPill-COZ4qISQ.js} +1 -1
- package/dist/web/assets/{ProfileSettingsSection-Dnh92gDH.js → ProfileSettingsSection-Bo7dybgW.js} +1 -1
- package/dist/web/assets/RightChatPanelStack-Di8zoHJI.js +1 -0
- package/dist/web/assets/{SettingsView-uHhQnazW.css → SettingsView-BcYyY66X.css} +1 -1
- package/dist/web/assets/SettingsView-CAaKdDHt.js +6 -0
- package/dist/web/assets/{TeamChatView-Tn4X5cuY.js → TeamChatView-CzQYFBap.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-DoX5LYzK.js → TerminalOverlay-B56XmI-k.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-C_ntWAAP.js +1 -0
- package/dist/web/assets/{TrainingDraftPanel-Da6uGu9y.js → TrainingDraftPanel-3hJIxLNn.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-DKky0p47.js → UsageSettingsSection-r3CqRm6Q.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-By8PWUuE.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-Ba4M8z1N.js → WorkspaceEnvironmentMenu-7wmC-spz.js} +3 -3
- package/dist/web/assets/{WorkspaceGitDialogs-CSepNOb8.js → WorkspaceGitDialogs-Hn--lsRh.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-LhFdzCRs.js → WorkspaceMonacoEditor-CHd22UcG.js} +3 -3
- package/dist/web/assets/{activity-bW02ZsBD.js → activity-Dp5V58om.js} +1 -1
- package/dist/web/assets/{boxes-B1dRA1pi.js → boxes-DE7WJaEv.js} +1 -1
- package/dist/web/assets/{chevron-up-CySy6WNq.js → chevron-up-BWx8gGab.js} +1 -1
- package/dist/web/assets/{circle-x-DY8vKAKi.js → circle-x-DnmOfZIg.js} +1 -1
- package/dist/web/assets/{copy-DuHI1UZ_.js → copy-BjWvaXLC.js} +1 -1
- package/dist/web/assets/{create-pipeline-request-CGBcdK9r.js → create-pipeline-request-C4V6-lWN.js} +3 -3
- package/dist/web/assets/{credit-card-Bot0OuTl.js → credit-card-Bjg0Zaw5.js} +1 -1
- package/dist/web/assets/{cssMode-BIjAothW.js → cssMode-KFDYjM8T.js} +1 -1
- package/dist/web/assets/file-BrC1KjAS.js +1 -0
- package/dist/web/assets/{git-branch-Cm02aNWq.js → git-branch-DTeeARsp.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-FYILXW0v.js → git-commit-horizontal-C8UFKlXy.js} +1 -1
- package/dist/web/assets/{htmlMode-zO2xLLgL.js → htmlMode-NbLN3n6Q.js} +1 -1
- package/dist/web/assets/index-BcZetaeD.css +1 -0
- package/dist/web/assets/index-DQalqxbw.js +177 -0
- package/dist/web/assets/index-DYxF_d9i.js +1 -0
- package/dist/web/assets/{info-DeuEU_RO.js → info-BXBpMeVU.js} +1 -1
- package/dist/web/assets/{jsonMode-D2A3mj4n.js → jsonMode-Bl3r4LM_.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-aPSqvscU.js → lspLanguageFeatures-DH22w5XD.js} +1 -1
- package/dist/web/assets/make-agent-tutorial-CAnTPFCK.js +2 -0
- package/dist/web/assets/{monaco.contribution-Do3Jjslo.js → monaco.contribution-C0BsxYAz.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DAq6Jihl.js → monaco.contribution-CzpXjm9j.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CHVe9CQ9.js → monaco.contribution-DK-g-i00.js} +2 -2
- package/dist/web/assets/{monaco.contribution-KqCt1n9-.js → monaco.contribution-iAurj7TQ.js} +2 -2
- package/dist/web/assets/{monitor-DXvHWFeW.js → monitor-Ba2FFblh.js} +1 -1
- package/dist/web/assets/{play-BIHyH-Yu.js → play-2NDQ4-7K.js} +1 -1
- package/dist/web/assets/{python-g3mtmU2J.js → python-CQ0TmUW9.js} +1 -1
- package/dist/web/assets/{refresh-cw-Daz0oqwK.js → refresh-cw-CyermMsy.js} +1 -1
- package/dist/web/assets/{reply-wu9DIBuK.js → reply-BSExNLHM.js} +1 -1
- package/dist/web/assets/{rotate-cw-D7q9GgNc.js → rotate-cw-DJ-zYG9E.js} +1 -1
- package/dist/web/assets/{save-BVFY6VTI.js → save-Bij3cc3Q.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-D9C_WUDu.js → toggleHighContrast-CxALivAH.js} +1 -1
- package/dist/web/assets/{training-1du5QD-P.css → training-BN8CALIc.css} +1 -1
- package/dist/web/assets/{tsMode-B4lEUN5X.js → tsMode-vH4lMS7h.js} +1 -1
- package/dist/web/assets/{upload-DNbYB4Rl.js → upload-DbJfEI3G.js} +1 -1
- package/dist/web/assets/{wifi-off-C5QLifIJ.js → wifi-off-BnVFBG28.js} +1 -1
- package/dist/web/assets/{workers-CV4BZb_x.js → workers-CBihj7z6.js} +1 -1
- package/dist/web/assets/{yaml-3ah8oX43.js → yaml-Bhkoq1sy.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +15 -0
- package/package.json +1 -1
- package/dist/chunks/cli-3AEIYSMD.js +0 -19
- package/dist/web/assets/CommandMenu-B3Y4MvmT.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-DeRI5XEO.js +0 -1
- package/dist/web/assets/LabsRoute-CgKtVYTP.css +0 -1
- package/dist/web/assets/LabsRoute-Cs_R1fuu.js +0 -3
- package/dist/web/assets/MainChatThread-h7VSA_Rc.js +0 -2
- package/dist/web/assets/Messages-BANZuAnA.js +0 -10
- package/dist/web/assets/NativeSkillSidebar-Qgccncuc.js +0 -1
- package/dist/web/assets/RightChatPanelStack-pGwbt6Wy.js +0 -1
- package/dist/web/assets/SettingsView-Bjehxwt1.js +0 -6
- package/dist/web/assets/TrainingCreationPanel-BLSf1Bnp.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-DTRtW9n8.js +0 -14
- package/dist/web/assets/circle-alert-DMHz5tj_.js +0 -1
- package/dist/web/assets/index-B5AN29EO.js +0 -177
- package/dist/web/assets/index-BnwYyUgT.js +0 -1
- package/dist/web/assets/index-COGlKIJ4.css +0 -1
- package/dist/web/assets/make-agent-tutorial-A2W9Ajwv.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
DEFAULT_OPENPOND_OPCHAT_API_BASE_URL
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KSRWKXRB.js";
|
|
5
5
|
|
|
6
6
|
// ../../packages/cloud/src/hosted-chat.ts
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
materializeSourceUploadFile,
|
|
4
4
|
readSourceUploadCache,
|
|
5
5
|
writeSourceUploadCache
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
CreateImproveRunSchema
|
|
9
|
-
} from "./chunk-2I5TZW66.js";
|
|
6
|
+
} from "./chunk-A3CJUBA7.js";
|
|
10
7
|
import {
|
|
11
8
|
formatSandboxTemplateDiagnostics,
|
|
12
9
|
validateSandboxTemplateYaml
|
|
13
10
|
} from "./chunk-BYAPLT37.js";
|
|
11
|
+
import {
|
|
12
|
+
CreateImproveRunSchema
|
|
13
|
+
} from "./chunk-ZPL4GZML.js";
|
|
14
14
|
import {
|
|
15
15
|
yaml
|
|
16
16
|
} from "./chunk-WYDVQOBL.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseSandboxRuntimePromotionPolicyOption,
|
|
19
19
|
parseSandboxWorkflowModeOption,
|
|
20
20
|
runProcessCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZZ4ECDTP.js";
|
|
22
22
|
import {
|
|
23
23
|
optionString,
|
|
24
24
|
optionalJsonObject,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
parseCsvOption,
|
|
27
27
|
parseIntegerOption,
|
|
28
28
|
requiredTeamId
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MUMPWI4O.js";
|
|
30
30
|
|
|
31
31
|
// ../../packages/cloud/src/profile/agent-sdk-command.ts
|
|
32
32
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// ../../packages/cloud/src/urls.ts
|
|
4
|
+
var DEFAULT_OPENPOND_WEB_BASE_URL = "https://openpond.ai";
|
|
5
|
+
var DEFAULT_OPENPOND_API_BASE_URL = "https://api.openpond.ai";
|
|
6
|
+
var DEFAULT_OPENPOND_OPCHAT_API_BASE_URL = "https://api.openpond.ai/opchat/v1";
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
DEFAULT_OPENPOND_WEB_BASE_URL,
|
|
10
|
+
DEFAULT_OPENPOND_API_BASE_URL,
|
|
11
|
+
DEFAULT_OPENPOND_OPCHAT_API_BASE_URL
|
|
12
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
materializeSourceUploadFile,
|
|
5
5
|
readSourceUploadCache,
|
|
6
6
|
writeSourceUploadCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A3CJUBA7.js";
|
|
8
8
|
import {
|
|
9
9
|
yaml
|
|
10
10
|
} from "./chunk-WYDVQOBL.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
loadGlobalConfig,
|
|
13
13
|
openPondConfigDirectory,
|
|
14
14
|
saveGlobalConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BWA3COR4.js";
|
|
16
16
|
|
|
17
17
|
// ../../packages/cloud/src/profile/profile-setup-gate.ts
|
|
18
18
|
var OpenPondProfileSetupRequiredError = class extends Error {
|
|
@@ -988,11 +988,8 @@ async function loadProfileSkillDirectory(profileSourcePath2, directoryName) {
|
|
|
988
988
|
const relativePath = path4.join(PROFILE_SKILLS_DIR, directoryName, PROFILE_SKILL_FILE).replace(/\\/g, "/");
|
|
989
989
|
const absolutePath = path4.join(profileSourcePath2, relativePath);
|
|
990
990
|
const messages = [];
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
if (entry.name === PROFILE_SKILL_FILE && entry.isFile()) continue;
|
|
994
|
-
messages.push(`Profile skills only support ${PROFILE_SKILL_FILE}; unsupported entry: ${entry.name}`);
|
|
995
|
-
}
|
|
991
|
+
const packageRoot = path4.join(profileSourcePath2, PROFILE_SKILLS_DIR, directoryName);
|
|
992
|
+
const packageFiles = await listPackageFiles(packageRoot);
|
|
996
993
|
let contents = "";
|
|
997
994
|
if (!existsSync3(absolutePath)) {
|
|
998
995
|
messages.push(`Missing ${PROFILE_SKILL_FILE}.`);
|
|
@@ -1022,9 +1019,26 @@ async function loadProfileSkillDirectory(profileSourcePath2, directoryName) {
|
|
|
1022
1019
|
charCount: contents.length,
|
|
1023
1020
|
sourceHash: sha256Hex(contents),
|
|
1024
1021
|
validationStatus: messages.length > 0 ? "error" : "valid",
|
|
1025
|
-
validationMessages: messages
|
|
1022
|
+
validationMessages: messages,
|
|
1023
|
+
resourceFiles: packageFiles.filter((file) => file !== PROFILE_SKILL_FILE)
|
|
1026
1024
|
};
|
|
1027
1025
|
}
|
|
1026
|
+
async function listPackageFiles(root) {
|
|
1027
|
+
const files = [];
|
|
1028
|
+
async function visit(directory, prefix) {
|
|
1029
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
1030
|
+
await Promise.all(entries.map(async (entry) => {
|
|
1031
|
+
const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
1032
|
+
if (entry.isDirectory()) {
|
|
1033
|
+
await visit(path4.join(directory, entry.name), relativePath);
|
|
1034
|
+
} else if (entry.isFile()) {
|
|
1035
|
+
files.push(relativePath);
|
|
1036
|
+
}
|
|
1037
|
+
}));
|
|
1038
|
+
}
|
|
1039
|
+
await visit(root, "");
|
|
1040
|
+
return files.sort();
|
|
1041
|
+
}
|
|
1028
1042
|
function markDuplicateSkillNames(skills) {
|
|
1029
1043
|
const counts = /* @__PURE__ */ new Map();
|
|
1030
1044
|
for (const skill of skills) {
|
|
@@ -1043,9 +1057,13 @@ function markDuplicateSkillNames(skills) {
|
|
|
1043
1057
|
async function latestSkillMtime(profileSourcePath2, skills) {
|
|
1044
1058
|
let latest = 0;
|
|
1045
1059
|
for (const skill of skills) {
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
|
|
1060
|
+
const packageRoot = path4.dirname(path4.join(profileSourcePath2, skill.path));
|
|
1061
|
+
const packageFiles = [PROFILE_SKILL_FILE, ...skill.resourceFiles];
|
|
1062
|
+
for (const file of packageFiles) {
|
|
1063
|
+
const fileStat = await stat3(path4.join(packageRoot, file)).catch(() => null);
|
|
1064
|
+
if (!fileStat?.isFile()) continue;
|
|
1065
|
+
latest = Math.max(latest, fileStat.mtimeMs);
|
|
1066
|
+
}
|
|
1049
1067
|
}
|
|
1050
1068
|
return latest > 0 ? new Date(latest).toISOString() : null;
|
|
1051
1069
|
}
|
|
@@ -1996,6 +2014,7 @@ function stableJsonStringify(value) {
|
|
|
1996
2014
|
}
|
|
1997
2015
|
|
|
1998
2016
|
export {
|
|
2017
|
+
parseProfileSkillMarkdown,
|
|
1999
2018
|
formatOpenPondProfileSetupRequirement,
|
|
2000
2019
|
collectProfileSourceUploadEntries,
|
|
2001
2020
|
hostedSourceCheckStatusFromPayload,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
now
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WL76II47.js";
|
|
5
5
|
|
|
6
6
|
// ../server/src/workspace/workspace-command.ts
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
@@ -192,6 +192,12 @@ var WORKSPACE_IMAGE_CONTENT_TYPES = /* @__PURE__ */ new Map([
|
|
|
192
192
|
[".png", "image/png"],
|
|
193
193
|
[".webp", "image/webp"]
|
|
194
194
|
]);
|
|
195
|
+
var LOCAL_VIDEO_CONTENT_TYPES = /* @__PURE__ */ new Map([
|
|
196
|
+
[".m4v", "video/x-m4v"],
|
|
197
|
+
[".mov", "video/quicktime"],
|
|
198
|
+
[".mp4", "video/mp4"],
|
|
199
|
+
[".webm", "video/webm"]
|
|
200
|
+
]);
|
|
195
201
|
function safeAppSegment(appId) {
|
|
196
202
|
return appId.replace(/[^a-zA-Z0-9._-]/g, "-").slice(0, 120) || "app";
|
|
197
203
|
}
|
|
@@ -250,6 +256,9 @@ async function readWorkspaceFile(repoPath, filePath) {
|
|
|
250
256
|
function workspaceImageContentType(filePath) {
|
|
251
257
|
return WORKSPACE_IMAGE_CONTENT_TYPES.get(path2.extname(filePath).toLowerCase()) ?? null;
|
|
252
258
|
}
|
|
259
|
+
function localVideoContentType(filePath) {
|
|
260
|
+
return LOCAL_VIDEO_CONTENT_TYPES.get(path2.extname(filePath).toLowerCase()) ?? null;
|
|
261
|
+
}
|
|
253
262
|
async function readWorkspaceImageFile(repoPath, filePath) {
|
|
254
263
|
const normalizedPath = normalizeWorkspaceFilePath(filePath);
|
|
255
264
|
if (!normalizedPath) return null;
|
|
@@ -272,7 +281,7 @@ async function readWorkspaceImageFile(repoPath, filePath) {
|
|
|
272
281
|
}
|
|
273
282
|
}
|
|
274
283
|
async function readLocalImageFile(filePath) {
|
|
275
|
-
const cleanedPath =
|
|
284
|
+
const cleanedPath = cleanLocalAssetPath(filePath);
|
|
276
285
|
if (!cleanedPath) return null;
|
|
277
286
|
const contentType = workspaceImageContentType(cleanedPath);
|
|
278
287
|
if (!contentType) return null;
|
|
@@ -290,7 +299,21 @@ async function readLocalImageFile(filePath) {
|
|
|
290
299
|
return null;
|
|
291
300
|
}
|
|
292
301
|
}
|
|
293
|
-
function
|
|
302
|
+
async function readLocalVideoFile(filePath) {
|
|
303
|
+
const cleanedPath = cleanLocalAssetPath(filePath);
|
|
304
|
+
if (!cleanedPath) return null;
|
|
305
|
+
const contentType = localVideoContentType(cleanedPath);
|
|
306
|
+
if (!contentType) return null;
|
|
307
|
+
const target = path2.resolve(cleanedPath);
|
|
308
|
+
try {
|
|
309
|
+
const stat = await fs2.lstat(target);
|
|
310
|
+
if (!stat.isFile()) return null;
|
|
311
|
+
return { path: target, contentType, sizeBytes: stat.size };
|
|
312
|
+
} catch {
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
function cleanLocalAssetPath(value) {
|
|
294
317
|
let cleaned = value.trim();
|
|
295
318
|
if (!cleaned) return null;
|
|
296
319
|
cleaned = cleaned.replace(/^['"`]+|['"`]+$/g, "");
|
|
@@ -1188,8 +1211,10 @@ export {
|
|
|
1188
1211
|
truncatePatch,
|
|
1189
1212
|
readWorkspaceFile,
|
|
1190
1213
|
workspaceImageContentType,
|
|
1214
|
+
localVideoContentType,
|
|
1191
1215
|
readWorkspaceImageFile,
|
|
1192
1216
|
readLocalImageFile,
|
|
1217
|
+
readLocalVideoFile,
|
|
1193
1218
|
isWorkspaceDirectory,
|
|
1194
1219
|
normalizeWorkspaceFilePath,
|
|
1195
1220
|
isGeneratedWorkspacePath,
|