openpond 0.0.37 → 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 -7
- package/dist/api/core.d.ts +6 -0
- package/dist/api/types.d.ts +0 -50
- package/dist/api/vercel-protection.d.ts +1 -0
- package/dist/api.d.ts +2 -8
- package/dist/chunks/{app-layer-LF2HK2B2.js → app-layer-LTBWNA2F.js} +32 -10
- package/dist/chunks/app-server-runtime-VYYJ2AWX.js +18 -0
- package/dist/chunks/{apps-ZMCMQZKX.js → apps-CZAJBGE3.js} +6 -124
- package/dist/chunks/{chunk-MHBQWGCL.js → chunk-2SF6HLT7.js} +5463 -5535
- package/dist/chunks/{chunk-VFL2JVBZ.js → chunk-3CDPPVLE.js} +111 -84
- package/dist/chunks/{chunk-N6E6YSTP.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-WTA33KQQ.js → chunk-4N6E3OVF.js} +4 -4
- package/dist/chunks/{chunk-35PPAOWD.js → chunk-6V7MJVRO.js} +56 -11
- package/dist/chunks/{chunk-ICLLW5QD.js → chunk-BQQZNGI6.js} +154 -194
- package/dist/chunks/chunk-DBHSOTYZ.js +1552 -0
- package/dist/chunks/{chunk-ZZ4ECDTP.js → chunk-FCVVOMIP.js} +145 -5
- package/dist/chunks/{chunk-A3CJUBA7.js → chunk-JIEUB6OS.js} +1 -1
- package/dist/chunks/{chunk-WL76II47.js → chunk-JJPAMKXZ.js} +1 -1
- package/dist/chunks/{chunk-2WMGA5FE.js → chunk-JRROTGQT.js} +1 -110
- package/dist/chunks/chunk-KHNHUA2H.js +1737 -0
- package/dist/chunks/{chunk-LNKYEHIJ.js → chunk-L6XH4ZGZ.js} +1 -1
- package/dist/chunks/chunk-M2NXTLH2.js +4054 -0
- package/dist/chunks/{chunk-IATK3CIP.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-KT2BB4AR.js → chunk-ZJBJQCQZ.js} +179 -52
- package/dist/chunks/{cli-5NFIDCRL.js → cli-JS76LCW2.js} +9 -5
- package/dist/chunks/{core-commands-7223BEQL.js → core-commands-4MRJQZJV.js} +7 -5
- package/dist/chunks/{harness-OMJXIGEW.js → desktop-test-RNMWLOVU.js} +15 -14
- package/dist/chunks/{chunk-ZPL4GZML.js → extension-GDRW22N3.js} +5866 -3601
- package/dist/chunks/{help-YPPROIS7.js → help-LWNREJ7U.js} +1 -1
- package/dist/chunks/{opchat-K7IYFPX6.js → opchat-2K2JIGK3.js} +9 -10
- package/dist/chunks/{organizations-W3FMAWQ4.js → organizations-Z5HVD2E7.js} +11 -9
- package/dist/chunks/{profile-N4B3F7M7.js → profile-QNECVVGN.js} +12 -38
- package/dist/chunks/{project-agent-NA6SGU25.js → project-agent-W3V75WBR.js} +9 -411
- package/dist/chunks/{sandbox-command-AKCFJKKN.js → sandbox-command-X3FO74NX.js} +7 -5
- package/dist/chunks/{sandbox-template-5NKTAXCL.js → sandbox-template-5B4T4BGU.js} +8 -6
- package/dist/chunks/{src-XAVSQTVR.js → src-ESAILPUH.js} +32 -30
- package/dist/chunks/src-IC5RX4L6.js +63517 -0
- package/dist/chunks/{teams-bot-557NZC73.js → teams-bot-NTQ6VFFL.js} +6 -4
- package/dist/chunks/training-BR5A7SPU.js +320 -0
- package/dist/chunks/{workspaces-S2H75XQB.js → workspaces-XC3QBD2Y.js} +2 -2
- package/dist/cli.js +24 -12
- package/dist/client-types.d.ts +1 -9
- package/dist/client.d.ts +3 -3
- package/dist/config.d.ts +9 -3
- package/dist/index.js +1300 -1091
- 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-y6krB0MJ.js → AppDialog-Bua3f-6v.js} +1 -1
- package/dist/web/assets/{AppsView-4F6oLktr.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-B56XmI-k.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-r3CqRm6Q.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-CHd22UcG.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-KFDYjM8T.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-C8UFKlXy.js → git-commit-horizontal-CGZM0PZo.js} +1 -1
- package/dist/web/assets/{htmlMode-NbLN3n6Q.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-Bl3r4LM_.js → jsonMode-BAUNCNAX.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DH22w5XD.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-2NDQ4-7K.js → play-Be0XDHBu.js} +1 -1
- package/dist/web/assets/{python-CQ0TmUW9.js → python-CEhEiPo7.js} +1 -1
- package/dist/web/assets/{refresh-cw-CyermMsy.js → refresh-cw-DH0KLbdD.js} +1 -1
- package/dist/web/assets/reply-D1TK2yV8.js +1 -0
- package/dist/web/assets/{save-Bij3cc3Q.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-CxALivAH.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-vH4lMS7h.js → tsMode-CKB5oOUU.js} +1 -1
- package/dist/web/assets/{upload-DbJfEI3G.js → upload-t751LLqP.js} +1 -1
- package/dist/web/assets/useLocalAgentSchedules-CzC3wfIP.js +1 -0
- package/dist/web/assets/{wifi-off-BnVFBG28.js → wifi-off-CxTHH3JU.js} +1 -1
- package/dist/web/assets/{workers-CBihj7z6.js → workers-CqYddzCd.js} +1 -1
- package/dist/web/assets/{yaml-Bhkoq1sy.js → yaml-e5wBkc-C.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +76 -41
- package/package.json +3 -1
- package/dist/chunks/chunk-3VURZQHA.js +0 -864
- package/dist/chunks/chunk-BWA3COR4.js +0 -3535
- package/dist/chunks/chunk-HLCTINEP.js +0 -224
- package/dist/chunks/chunk-PGET7EZF.js +0 -3896
- package/dist/chunks/chunk-T4QXKU5Y.js +0 -1
- package/dist/chunks/chunk-XEJ7XXUQ.js +0 -1301
- package/dist/chunks/cli-AS3DZ7XB.js +0 -23
- package/dist/chunks/extend-6N5S5KA5.js +0 -89
- package/dist/chunks/extension-FJSVCG2Q.js +0 -121
- package/dist/chunks/fileFromPath-DHCRY3BD.js +0 -2151
- package/dist/chunks/src-SCS4KKP4.js +0 -105881
- package/dist/web/assets/BrowserSidebar-C0MHQaaD.js +0 -1
- package/dist/web/assets/CloudWorkView-DNoPIlMj.css +0 -1
- package/dist/web/assets/CloudWorkView-DwFIZoXy.js +0 -1
- package/dist/web/assets/CommandMenu-CYGFrMZi.js +0 -1
- package/dist/web/assets/CommunityView-C6n89YXz.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-C3RwXC3_.js +0 -1
- package/dist/web/assets/GetStartedView-DBLdduwr.css +0 -1
- package/dist/web/assets/GetStartedView-fwD0ZXo9.js +0 -1
- package/dist/web/assets/LabSkillSidebar-BSuc-NJr.js +0 -1
- package/dist/web/assets/LabsRoute-BrJkBNig.css +0 -1
- package/dist/web/assets/LabsRoute-D2y8dSsT.js +0 -3
- package/dist/web/assets/MainChatThread-Dj_Ry6WQ.js +0 -2
- package/dist/web/assets/MakeAgentTutorialLearningPanel-Bz2VDaRe.js +0 -2
- package/dist/web/assets/MarkdownText-B6Nu_0Fz.js +0 -7
- package/dist/web/assets/Messages-CH2wfv2a.js +0 -10
- package/dist/web/assets/NativeSkillSidebar-4iUfgwqO.js +0 -1
- package/dist/web/assets/NewProjectDialog-8M5-6-h-.js +0 -1
- package/dist/web/assets/PostTrainingLearningPanel-CdG5KHZs.js +0 -2
- package/dist/web/assets/PostTrainingStatusPill-COZ4qISQ.js +0 -1
- package/dist/web/assets/ProfileSettingsSection-Bo7dybgW.js +0 -1
- package/dist/web/assets/ProfileSettingsSection-Cg4tKO-C.css +0 -1
- package/dist/web/assets/RightChatPanelStack-Di8zoHJI.js +0 -1
- package/dist/web/assets/SettingsView-BcYyY66X.css +0 -1
- package/dist/web/assets/SettingsView-CAaKdDHt.js +0 -6
- package/dist/web/assets/TeamChatView-Bx44q3WV.css +0 -1
- package/dist/web/assets/TeamChatView-CzQYFBap.js +0 -3
- package/dist/web/assets/TrainingCreationPanel-C_ntWAAP.js +0 -1
- package/dist/web/assets/TrainingDraftPanel-3hJIxLNn.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-By8PWUuE.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-7wmC-spz.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-Hn--lsRh.js +0 -1
- package/dist/web/assets/activity-Dp5V58om.js +0 -1
- package/dist/web/assets/boxes-DE7WJaEv.js +0 -1
- package/dist/web/assets/chevron-up-BWx8gGab.js +0 -1
- package/dist/web/assets/circle-x-DnmOfZIg.js +0 -1
- package/dist/web/assets/copy-BjWvaXLC.js +0 -1
- package/dist/web/assets/create-pipeline-request-C4V6-lWN.js +0 -4
- package/dist/web/assets/credit-card-Bjg0Zaw5.js +0 -1
- package/dist/web/assets/file-BrC1KjAS.js +0 -1
- package/dist/web/assets/git-branch-DTeeARsp.js +0 -1
- package/dist/web/assets/index-BcZetaeD.css +0 -1
- package/dist/web/assets/index-DQalqxbw.js +0 -177
- package/dist/web/assets/index-DYxF_d9i.js +0 -1
- package/dist/web/assets/info-BXBpMeVU.js +0 -1
- package/dist/web/assets/make-agent-tutorial-CAnTPFCK.js +0 -2
- package/dist/web/assets/monaco.contribution-C0BsxYAz.js +0 -2
- package/dist/web/assets/monaco.contribution-CzpXjm9j.js +0 -2
- package/dist/web/assets/monaco.contribution-DK-g-i00.js +0 -2
- package/dist/web/assets/monaco.contribution-iAurj7TQ.js +0 -2
- package/dist/web/assets/monitor-Ba2FFblh.js +0 -1
- package/dist/web/assets/reply-BSExNLHM.js +0 -1
- package/dist/web/assets/rotate-cw-DJ-zYG9E.js +0 -1
- package/dist/web/assets/training-BN8CALIc.css +0 -1
- package/dist/web/assets/training-model-data-BXUCzS0p.js +0 -1
- package/dist/web/tokens/eth.svg +0 -1
- package/dist/web/tokens/usdc.svg +0 -1
- package/docs/agent-edit-check-status-json.md +0 -132
|
@@ -3,14 +3,11 @@ import {
|
|
|
3
3
|
materializeSourceUploadFile,
|
|
4
4
|
readSourceUploadCache,
|
|
5
5
|
writeSourceUploadCache
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JIEUB6OS.js";
|
|
7
7
|
import {
|
|
8
8
|
formatSandboxTemplateDiagnostics,
|
|
9
9
|
validateSandboxTemplateYaml
|
|
10
10
|
} from "./chunk-BYAPLT37.js";
|
|
11
|
-
import {
|
|
12
|
-
CreateImproveRunSchema
|
|
13
|
-
} from "./chunk-ZPL4GZML.js";
|
|
14
11
|
import {
|
|
15
12
|
yaml
|
|
16
13
|
} from "./chunk-WYDVQOBL.js";
|
|
@@ -18,7 +15,7 @@ import {
|
|
|
18
15
|
parseSandboxRuntimePromotionPolicyOption,
|
|
19
16
|
parseSandboxWorkflowModeOption,
|
|
20
17
|
runProcessCommand
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FCVVOMIP.js";
|
|
22
19
|
import {
|
|
23
20
|
optionString,
|
|
24
21
|
optionalJsonObject,
|
|
@@ -1092,7 +1089,6 @@ function mergeProjectSourceUploadEntries(collected, extraEntries) {
|
|
|
1092
1089
|
}
|
|
1093
1090
|
|
|
1094
1091
|
// src/cli/project-agent-inputs.ts
|
|
1095
|
-
import { randomUUID } from "node:crypto";
|
|
1096
1092
|
function parseProjectSourceType(value) {
|
|
1097
1093
|
const sourceType = typeof value === "string" && value.trim() ? value.trim() : "manual";
|
|
1098
1094
|
if (sourceType !== "github_repo" && sourceType !== "internal_repo" && sourceType !== "template" && sourceType !== "manual") {
|
|
@@ -1244,196 +1240,11 @@ function buildAgentSourcePublishInput(teamId, options) {
|
|
|
1244
1240
|
)
|
|
1245
1241
|
} : {},
|
|
1246
1242
|
...optionString(options, "evalStatus") ? { evalStatus: optionString(options, "evalStatus") } : {},
|
|
1247
|
-
...optionString(options, "workItemId") ? { workItemId: optionString(options, "workItemId") } : {},
|
|
1248
1243
|
...optionString(options, "taskRunId") ? { taskRunId: optionString(options, "taskRunId") } : {},
|
|
1249
1244
|
...optionString(options, "traceArtifactRef") ? { traceArtifactRef: optionString(options, "traceArtifactRef") } : {},
|
|
1250
1245
|
...optionString(options, "evalResultArtifactRef") ? { evalResultArtifactRef: optionString(options, "evalResultArtifactRef") } : {}
|
|
1251
1246
|
};
|
|
1252
1247
|
}
|
|
1253
|
-
function buildAgentEditOpenInput(agentId, teamId, options) {
|
|
1254
|
-
const projectId = optionString(options, "projectId");
|
|
1255
|
-
if (!projectId) {
|
|
1256
|
-
throw new Error(
|
|
1257
|
-
"agent edit open requires --project-id <id> so the edit work item is project scoped"
|
|
1258
|
-
);
|
|
1259
|
-
}
|
|
1260
|
-
const initialMessage = optionString(options, "initialMessage") || optionString(options, "message") || optionString(options, "prompt");
|
|
1261
|
-
const sourceRef = optionString(options, "sourceRef") ?? null;
|
|
1262
|
-
const baseSha = optionString(options, "baseSha") ?? null;
|
|
1263
|
-
return {
|
|
1264
|
-
teamId,
|
|
1265
|
-
projectId,
|
|
1266
|
-
...initialMessage ? { initialMessage } : {},
|
|
1267
|
-
...sourceRef ? { sourceRef } : {},
|
|
1268
|
-
...baseSha ? { baseSha } : {},
|
|
1269
|
-
createImproveRun: buildAgentEditCreateImproveRun({
|
|
1270
|
-
agentId,
|
|
1271
|
-
teamId,
|
|
1272
|
-
projectId,
|
|
1273
|
-
objective: initialMessage || `Edit hosted agent ${agentId}`,
|
|
1274
|
-
sourceRef,
|
|
1275
|
-
baseSha,
|
|
1276
|
-
activeProfile: optionString(options, "profile") || "default"
|
|
1277
|
-
})
|
|
1278
|
-
};
|
|
1279
|
-
}
|
|
1280
|
-
function buildAgentEditCreateImproveRun(input) {
|
|
1281
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1282
|
-
return CreateImproveRunSchema.parse({
|
|
1283
|
-
schemaVersion: "openpond.createImprove.run.v1",
|
|
1284
|
-
id: `create_improve_${randomUUID()}`,
|
|
1285
|
-
revision: 0,
|
|
1286
|
-
operation: "improve",
|
|
1287
|
-
surface: "hosted_improve",
|
|
1288
|
-
command: "/edit",
|
|
1289
|
-
objective: input.objective,
|
|
1290
|
-
state: "planning",
|
|
1291
|
-
adapter: {
|
|
1292
|
-
kind: "hosted",
|
|
1293
|
-
sourceAuthority: "hosted_profile",
|
|
1294
|
-
teamId: input.teamId,
|
|
1295
|
-
projectId: input.projectId,
|
|
1296
|
-
activeProfile: input.activeProfile,
|
|
1297
|
-
sourceRef: input.sourceRef,
|
|
1298
|
-
baseSha: input.baseSha,
|
|
1299
|
-
workItemId: null,
|
|
1300
|
-
confirmationPolicy: "always_require_plan_approval"
|
|
1301
|
-
},
|
|
1302
|
-
actor: {
|
|
1303
|
-
id: null,
|
|
1304
|
-
kind: "user",
|
|
1305
|
-
label: null
|
|
1306
|
-
},
|
|
1307
|
-
scope: {
|
|
1308
|
-
profileId: input.activeProfile,
|
|
1309
|
-
conversationId: null,
|
|
1310
|
-
originTurnId: null,
|
|
1311
|
-
workItemId: null,
|
|
1312
|
-
projectId: input.projectId,
|
|
1313
|
-
targetProject: {
|
|
1314
|
-
id: input.projectId,
|
|
1315
|
-
name: null,
|
|
1316
|
-
workspacePath: null,
|
|
1317
|
-
sourceRef: input.sourceRef,
|
|
1318
|
-
baseSha: input.baseSha
|
|
1319
|
-
}
|
|
1320
|
-
},
|
|
1321
|
-
context: {
|
|
1322
|
-
messageIds: [],
|
|
1323
|
-
conversationExcerpts: [],
|
|
1324
|
-
attachments: [],
|
|
1325
|
-
apps: [],
|
|
1326
|
-
tools: [],
|
|
1327
|
-
signalRefs: [],
|
|
1328
|
-
evalRefs: [],
|
|
1329
|
-
targetRepoAssumptions: [`cloud project: ${input.projectId}`]
|
|
1330
|
-
},
|
|
1331
|
-
target: {
|
|
1332
|
-
kind: "agent",
|
|
1333
|
-
id: input.agentId,
|
|
1334
|
-
displayName: null,
|
|
1335
|
-
defaultActionKey: `${input.agentId}.chat`
|
|
1336
|
-
},
|
|
1337
|
-
plan: null,
|
|
1338
|
-
workflowCapture: null,
|
|
1339
|
-
executionPolicy: {
|
|
1340
|
-
mode: "background",
|
|
1341
|
-
pauseAllowed: true,
|
|
1342
|
-
cancellationAllowed: true
|
|
1343
|
-
},
|
|
1344
|
-
iterationPolicy: {
|
|
1345
|
-
mode: "single",
|
|
1346
|
-
maximumAttempts: 1,
|
|
1347
|
-
currentAttempt: 0
|
|
1348
|
-
},
|
|
1349
|
-
approvalIds: [],
|
|
1350
|
-
questionIds: [],
|
|
1351
|
-
questions: [],
|
|
1352
|
-
candidates: [],
|
|
1353
|
-
evaluationReceipts: [],
|
|
1354
|
-
checkRefs: [],
|
|
1355
|
-
sourceRefs: [],
|
|
1356
|
-
externalExecutionRefs: [],
|
|
1357
|
-
localProfileCommit: null,
|
|
1358
|
-
hostedSourceCommit: input.baseSha,
|
|
1359
|
-
hostedSourceRef: input.sourceRef,
|
|
1360
|
-
releaseOutcome: {
|
|
1361
|
-
status: "not_requested",
|
|
1362
|
-
profileCommit: null,
|
|
1363
|
-
profileTag: null,
|
|
1364
|
-
releaseReceiptRef: null,
|
|
1365
|
-
updatedAt: null
|
|
1366
|
-
},
|
|
1367
|
-
blockedReason: null,
|
|
1368
|
-
appliedActionIds: [],
|
|
1369
|
-
metadata: {
|
|
1370
|
-
source: "cli_agent_edit_open",
|
|
1371
|
-
selectedCommand: "/edit"
|
|
1372
|
-
},
|
|
1373
|
-
createdAt: now,
|
|
1374
|
-
updatedAt: now
|
|
1375
|
-
});
|
|
1376
|
-
}
|
|
1377
|
-
function buildCodingWorkItemChatInput(teamId, options) {
|
|
1378
|
-
const message = optionString(options, "message") || optionString(options, "prompt");
|
|
1379
|
-
if (!message) {
|
|
1380
|
-
throw new Error("agent edit chat requires --message <text>");
|
|
1381
|
-
}
|
|
1382
|
-
const mode = optionString(options, "chatMode") || "queue_cloud";
|
|
1383
|
-
if (mode !== "sync_cloud" && mode !== "queue_cloud") {
|
|
1384
|
-
throw new Error(
|
|
1385
|
-
"agent edit chat --chat-mode must be sync_cloud or queue_cloud"
|
|
1386
|
-
);
|
|
1387
|
-
}
|
|
1388
|
-
const payload = optionalJsonObject(options, "payload", "payload");
|
|
1389
|
-
return {
|
|
1390
|
-
teamId,
|
|
1391
|
-
message,
|
|
1392
|
-
mode,
|
|
1393
|
-
...optionString(options, "sourceRef") ? { sourceRef: optionString(options, "sourceRef") } : {},
|
|
1394
|
-
...optionString(options, "baseSha") ? { baseSha: optionString(options, "baseSha") } : {},
|
|
1395
|
-
...payload ? { payload } : {}
|
|
1396
|
-
};
|
|
1397
|
-
}
|
|
1398
|
-
function buildCodingWorkItemBackgroundInput(teamId, options) {
|
|
1399
|
-
const payload = optionalJsonObject(options, "payload", "payload");
|
|
1400
|
-
const agentEdit = optionalJsonObject(options, "agentEdit", "agent-edit");
|
|
1401
|
-
const setup = optionalCommandList(options, "setup", "setup");
|
|
1402
|
-
const validation = optionalCommandList(options, "validation", "validation");
|
|
1403
|
-
const branchPolicy = optionalJsonObject(options, "branchPolicy", "branch-policy");
|
|
1404
|
-
return {
|
|
1405
|
-
teamId,
|
|
1406
|
-
...optionString(options, "prompt") ? { prompt: optionString(options, "prompt") } : {},
|
|
1407
|
-
...optionString(options, "sourceRef") ? { sourceRef: optionString(options, "sourceRef") } : {},
|
|
1408
|
-
...optionString(options, "baseSha") ? { baseSha: optionString(options, "baseSha") } : {},
|
|
1409
|
-
...optionString(options, "sourceRuntimeId") ? { sourceRuntimeId: optionString(options, "sourceRuntimeId") } : {},
|
|
1410
|
-
...optionString(options, "sourceSandboxId") ? { sourceSandboxId: optionString(options, "sourceSandboxId") } : {},
|
|
1411
|
-
...optionString(options, "agentId") ? { agentId: optionString(options, "agentId") } : {},
|
|
1412
|
-
...agentEdit ? { agentEdit } : {},
|
|
1413
|
-
...setup ? { setup } : {},
|
|
1414
|
-
...validation ? { validation } : {},
|
|
1415
|
-
...branchPolicy ? { branchPolicy } : {},
|
|
1416
|
-
...payload ? { payload } : {}
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1419
|
-
function optionalCommandList(options, key, displayName) {
|
|
1420
|
-
const value = optionalJsonObject(options, key, displayName);
|
|
1421
|
-
if (!value) return null;
|
|
1422
|
-
if (!Array.isArray(value.commands) || value.commands.some((command) => typeof command !== "string")) {
|
|
1423
|
-
throw new Error(`${displayName} must be a JSON object with a string commands array`);
|
|
1424
|
-
}
|
|
1425
|
-
return { commands: value.commands };
|
|
1426
|
-
}
|
|
1427
|
-
function buildCodingWorkItemPromotionInput(teamId, options) {
|
|
1428
|
-
const ref = optionString(options, "ref") || optionString(options, "artifactRef");
|
|
1429
|
-
if (!ref) throw new Error("result promotion requires --ref <artifact-ref>");
|
|
1430
|
-
const metadata = optionalJsonObject(options, "metadata", "metadata");
|
|
1431
|
-
return {
|
|
1432
|
-
teamId,
|
|
1433
|
-
ref,
|
|
1434
|
-
...metadata ? { metadata } : {}
|
|
1435
|
-
};
|
|
1436
|
-
}
|
|
1437
1248
|
function buildProjectUpsertInput(options) {
|
|
1438
1249
|
const usage = "usage: project create --team-id <id> --name <name>";
|
|
1439
1250
|
const teamId = requiredTeamId(options, usage);
|
|
@@ -1728,10 +1539,6 @@ export {
|
|
|
1728
1539
|
parsePositiveLimit,
|
|
1729
1540
|
buildAgentSourceChecksInput,
|
|
1730
1541
|
buildAgentSourcePublishInput,
|
|
1731
|
-
buildAgentEditOpenInput,
|
|
1732
|
-
buildCodingWorkItemChatInput,
|
|
1733
|
-
buildCodingWorkItemBackgroundInput,
|
|
1734
|
-
buildCodingWorkItemPromotionInput,
|
|
1735
1542
|
buildProjectUpsertInput,
|
|
1736
1543
|
buildProjectUpdateInput,
|
|
1737
1544
|
buildAgentUpsertInput,
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_OPENPOND_API_BASE_URL,
|
|
4
|
+
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
5
|
+
} from "./chunk-KSRWKXRB.js";
|
|
6
|
+
|
|
7
|
+
// src/cli/common/urls.ts
|
|
8
|
+
var DEFAULT_OPENPOND_API_HOST = new URL(DEFAULT_OPENPOND_API_BASE_URL).hostname;
|
|
9
|
+
var DEFAULT_OPENPOND_WEB_HOST = new URL(DEFAULT_OPENPOND_WEB_BASE_URL).hostname;
|
|
10
|
+
function resolveAccountOption(options) {
|
|
11
|
+
const raw = typeof options.account === "string" ? options.account : typeof options.profile === "string" ? options.profile : null;
|
|
12
|
+
if (!raw) return null;
|
|
13
|
+
const trimmed = raw.trim();
|
|
14
|
+
if (!trimmed || trimmed === "true") {
|
|
15
|
+
throw new Error("account must be a non-empty value");
|
|
16
|
+
}
|
|
17
|
+
return trimmed;
|
|
18
|
+
}
|
|
19
|
+
function resolveBaseUrlOption(options) {
|
|
20
|
+
const raw = typeof options.baseUrl === "string" ? options.baseUrl : typeof options.baseurl === "string" ? options.baseurl : null;
|
|
21
|
+
if (!raw) return null;
|
|
22
|
+
const trimmed = raw.trim();
|
|
23
|
+
if (!trimmed || trimmed === "true") {
|
|
24
|
+
throw new Error("baseurl must be a non-empty value");
|
|
25
|
+
}
|
|
26
|
+
return trimmed.replace(/\/$/, "");
|
|
27
|
+
}
|
|
28
|
+
function resolveApiBaseUrlOption(options) {
|
|
29
|
+
const raw = typeof options.apiBaseUrl === "string" ? options.apiBaseUrl : typeof options.apiBaseurl === "string" ? options.apiBaseurl : null;
|
|
30
|
+
if (!raw) return null;
|
|
31
|
+
const trimmed = raw.trim();
|
|
32
|
+
if (!trimmed || trimmed === "true") {
|
|
33
|
+
throw new Error("api-base-url must be a non-empty value");
|
|
34
|
+
}
|
|
35
|
+
return trimmed.replace(/\/$/, "");
|
|
36
|
+
}
|
|
37
|
+
function resolveChatApiBaseUrlOption(options) {
|
|
38
|
+
const raw = typeof options.chatApiBaseUrl === "string" ? options.chatApiBaseUrl : typeof options.chatApiBaseurl === "string" ? options.chatApiBaseurl : typeof options.chatApiUrl === "string" ? options.chatApiUrl : null;
|
|
39
|
+
if (!raw) return null;
|
|
40
|
+
const trimmed = raw.trim();
|
|
41
|
+
if (!trimmed || trimmed === "true") {
|
|
42
|
+
throw new Error("chat-api-base-url must be a non-empty value");
|
|
43
|
+
}
|
|
44
|
+
return trimmed.replace(/\/$/, "");
|
|
45
|
+
}
|
|
46
|
+
function resolveSandboxApiUrlOption(options) {
|
|
47
|
+
const raw = typeof options.sandboxApiUrl === "string" ? options.sandboxApiUrl : typeof options.sandboxApiurl === "string" ? options.sandboxApiurl : null;
|
|
48
|
+
if (!raw) return null;
|
|
49
|
+
const trimmed = raw.trim();
|
|
50
|
+
if (!trimmed || trimmed === "true") {
|
|
51
|
+
throw new Error("sandbox-api-url must be a non-empty value");
|
|
52
|
+
}
|
|
53
|
+
return trimmed.replace(/\/$/, "");
|
|
54
|
+
}
|
|
55
|
+
function resolveBaseUrl(config) {
|
|
56
|
+
const envBase = process.env.OPENPOND_BASE_URL;
|
|
57
|
+
const base = envBase || config.baseUrl || DEFAULT_OPENPOND_WEB_BASE_URL;
|
|
58
|
+
return base.replace(/\/$/, "");
|
|
59
|
+
}
|
|
60
|
+
function mapUiBaseToApiBase(baseUrl) {
|
|
61
|
+
if (!baseUrl) return null;
|
|
62
|
+
const trimmed = baseUrl.replace(/\/$/, "");
|
|
63
|
+
try {
|
|
64
|
+
const url = new URL(trimmed);
|
|
65
|
+
const host = url.hostname.toLowerCase();
|
|
66
|
+
if (host === DEFAULT_OPENPOND_WEB_HOST || host === "openpond.live" || host === "www.openpond.live") {
|
|
67
|
+
return DEFAULT_OPENPOND_API_BASE_URL;
|
|
68
|
+
}
|
|
69
|
+
if (host === DEFAULT_OPENPOND_API_HOST || host.startsWith("api.")) {
|
|
70
|
+
return trimmed;
|
|
71
|
+
}
|
|
72
|
+
} catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
function resolvePublicApiBaseUrl(config) {
|
|
78
|
+
const envBase = process.env.OPENPOND_API_URL;
|
|
79
|
+
const configuredApiBase = config?.apiBaseUrl?.trim();
|
|
80
|
+
const mapped = mapUiBaseToApiBase(
|
|
81
|
+
process.env.OPENPOND_BASE_URL || config?.baseUrl
|
|
82
|
+
);
|
|
83
|
+
const base = envBase || configuredApiBase || mapped || DEFAULT_OPENPOND_API_BASE_URL;
|
|
84
|
+
return base.replace(/\/$/, "");
|
|
85
|
+
}
|
|
86
|
+
function normalizeTemplateRepoUrl(input, baseUrl) {
|
|
87
|
+
const trimmed = input.trim();
|
|
88
|
+
if (!trimmed) {
|
|
89
|
+
throw new Error("template must be non-empty");
|
|
90
|
+
}
|
|
91
|
+
if (trimmed.startsWith("http://") || trimmed.startsWith("https://")) {
|
|
92
|
+
return trimmed.endsWith(".git") ? trimmed : `${trimmed}.git`;
|
|
93
|
+
}
|
|
94
|
+
const normalizedBase = baseUrl.replace(/\/$/, "");
|
|
95
|
+
const [owner, repoRaw] = trimmed.includes("/") ? trimmed.split("/", 2) : ["openpondai", trimmed];
|
|
96
|
+
const repo = repoRaw.endsWith(".git") ? repoRaw.slice(0, -4) : repoRaw;
|
|
97
|
+
if (!owner || !repo) {
|
|
98
|
+
throw new Error("template must be <owner>/<repo> or a full https URL");
|
|
99
|
+
}
|
|
100
|
+
return `${normalizedBase}/${owner}/${repo}.git`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
resolveAccountOption,
|
|
105
|
+
resolveBaseUrlOption,
|
|
106
|
+
resolveApiBaseUrlOption,
|
|
107
|
+
resolveChatApiBaseUrlOption,
|
|
108
|
+
resolveSandboxApiUrlOption,
|
|
109
|
+
resolveBaseUrl,
|
|
110
|
+
mapUiBaseToApiBase,
|
|
111
|
+
resolvePublicApiBaseUrl,
|
|
112
|
+
normalizeTemplateRepoUrl
|
|
113
|
+
};
|