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
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import "./chunk-T4QXKU5Y.js";
|
|
3
|
-
import {
|
|
4
|
-
runOpChatSmoke
|
|
5
|
-
} from "./chunk-43YI36NA.js";
|
|
6
2
|
import {
|
|
7
3
|
getOpChatModel,
|
|
8
4
|
listOpChatModels,
|
|
9
5
|
resolveOpChatApiBaseUrl,
|
|
6
|
+
runOpChatSmoke,
|
|
10
7
|
sendHostedChatTurn,
|
|
11
8
|
streamHostedChatTurn
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3KLQ52B2.js";
|
|
13
10
|
import {
|
|
14
11
|
ensureApiKey
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FCVVOMIP.js";
|
|
13
|
+
import "./chunk-KHNHUA2H.js";
|
|
14
|
+
import "./chunk-JRROTGQT.js";
|
|
16
15
|
import {
|
|
17
16
|
resolveApiBaseUrlOption,
|
|
18
17
|
resolveBaseUrl,
|
|
19
18
|
resolveChatApiBaseUrlOption
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-SMNFI2FU.js";
|
|
20
|
+
import "./chunk-3CDPPVLE.js";
|
|
22
21
|
import {
|
|
23
22
|
loadConfig
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DBHSOTYZ.js";
|
|
25
24
|
import "./chunk-KSRWKXRB.js";
|
|
26
25
|
import {
|
|
27
26
|
parseBooleanOption
|
|
@@ -30,7 +29,7 @@ import "./chunk-UACZUFIA.js";
|
|
|
30
29
|
|
|
31
30
|
// src/cli/opchat.ts
|
|
32
31
|
import { randomUUID } from "node:crypto";
|
|
33
|
-
var STAGING_OPCHAT_API_BASE_URL = "https://
|
|
32
|
+
var STAGING_OPCHAT_API_BASE_URL = "https://staging-api.openpond.ai/opchat/v1";
|
|
34
33
|
async function runOpChatCommand(options, rest) {
|
|
35
34
|
const subcommand = rest[0] || "smoke";
|
|
36
35
|
const config = await loadConfig();
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
5
|
-
} from "./chunk-MHBQWGCL.js";
|
|
6
|
-
import "./chunk-XEJ7XXUQ.js";
|
|
2
|
+
import "./chunk-2SF6HLT7.js";
|
|
3
|
+
import "./chunk-M2NXTLH2.js";
|
|
7
4
|
import "./chunk-WYDVQOBL.js";
|
|
8
5
|
import {
|
|
9
6
|
resolveSandboxClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
} from "./chunk-FCVVOMIP.js";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_OPENPOND_API_BASE_URL,
|
|
10
|
+
DEFAULT_OPENPOND_WEB_BASE_URL
|
|
11
|
+
} from "./chunk-KHNHUA2H.js";
|
|
12
|
+
import "./chunk-JRROTGQT.js";
|
|
13
|
+
import "./chunk-SMNFI2FU.js";
|
|
14
|
+
import "./chunk-3CDPPVLE.js";
|
|
15
|
+
import "./chunk-DBHSOTYZ.js";
|
|
14
16
|
import "./chunk-KSRWKXRB.js";
|
|
15
17
|
import {
|
|
16
18
|
parseBooleanOption,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
mergeProjectSourceUploadEntries,
|
|
6
6
|
parseAgentSourceCheckDispatch,
|
|
7
7
|
parseAgentSourceCheckKind
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MIZHCABO.js";
|
|
9
9
|
import {
|
|
10
10
|
buildHostedRunIdempotencyKey,
|
|
11
11
|
collectProfileSourceUploadEntries,
|
|
@@ -22,18 +22,18 @@ import {
|
|
|
22
22
|
runProfileCheck,
|
|
23
23
|
runProfileSdkCommand,
|
|
24
24
|
saveProfilePushStatus
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-ZJBJQCQZ.js";
|
|
26
|
+
import "./chunk-JIEUB6OS.js";
|
|
27
27
|
import "./chunk-BYAPLT37.js";
|
|
28
|
-
import "./chunk-ZPL4GZML.js";
|
|
29
|
-
import "./chunk-XEJ7XXUQ.js";
|
|
30
28
|
import "./chunk-WYDVQOBL.js";
|
|
31
29
|
import {
|
|
32
30
|
resolveSandboxClient
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-FCVVOMIP.js";
|
|
32
|
+
import "./chunk-KHNHUA2H.js";
|
|
33
|
+
import "./chunk-JRROTGQT.js";
|
|
34
|
+
import "./chunk-SMNFI2FU.js";
|
|
35
|
+
import "./chunk-3CDPPVLE.js";
|
|
36
|
+
import "./chunk-DBHSOTYZ.js";
|
|
37
37
|
import "./chunk-KSRWKXRB.js";
|
|
38
38
|
import {
|
|
39
39
|
optionString,
|
|
@@ -496,14 +496,6 @@ async function runProfilePushCommand(options) {
|
|
|
496
496
|
throw new Error(hostedSourceChecks.dispatchResult.error ?? "hosted_source_check_dispatch_failed");
|
|
497
497
|
}
|
|
498
498
|
if (hostedSourceChecks.dispatchResult?.status === "completed") {
|
|
499
|
-
const refreshed = await refreshHostedSourceCheckStatus({
|
|
500
|
-
client,
|
|
501
|
-
teamId,
|
|
502
|
-
checkResult: hostedSourceChecks
|
|
503
|
-
});
|
|
504
|
-
if (refreshed) {
|
|
505
|
-
hostedSourceChecks = refreshed;
|
|
506
|
-
}
|
|
507
499
|
const sourceCheckStatus = record2(hostedSourceChecks.sourceCheckStatus);
|
|
508
500
|
if (sourceCheckStatusPassed(sourceCheckStatus)) {
|
|
509
501
|
await bindValidatedHostedRuntimeSource({
|
|
@@ -559,8 +551,7 @@ async function runProfilePushCommand(options) {
|
|
|
559
551
|
hostedSourcePublish = await client.agents.publishSource(hostedRuntimeAgentId, {
|
|
560
552
|
teamId,
|
|
561
553
|
...expectedManifestHash ? { expectedManifestHash } : {},
|
|
562
|
-
...pushStatus.hostedSourceMaterialization?.sourceCommitSha ?? result.sourceUpload.sourceCommitSha ? { expectedSourceCommitSha: pushStatus.hostedSourceMaterialization?.sourceCommitSha ?? result.sourceUpload.sourceCommitSha } : {}
|
|
563
|
-
...optionString(options, "workItemId") ? { workItemId: optionString(options, "workItemId") } : {}
|
|
554
|
+
...pushStatus.hostedSourceMaterialization?.sourceCommitSha ?? result.sourceUpload.sourceCommitSha ? { expectedSourceCommitSha: pushStatus.hostedSourceMaterialization?.sourceCommitSha ?? result.sourceUpload.sourceCommitSha } : {}
|
|
564
555
|
});
|
|
565
556
|
pushStatus = {
|
|
566
557
|
...pushStatus,
|
|
@@ -705,9 +696,7 @@ async function runProfilePushCommand(options) {
|
|
|
705
696
|
);
|
|
706
697
|
}
|
|
707
698
|
if (pushStatus.hostedSourceCheck) {
|
|
708
|
-
console.log(
|
|
709
|
-
`Hosted source checks: ${pushStatus.hostedSourceCheck.status}` + (pushStatus.hostedSourceCheck.workItemId ? ` ${pushStatus.hostedSourceCheck.workItemId}` : "")
|
|
710
|
-
);
|
|
699
|
+
console.log(`Hosted source checks: ${pushStatus.hostedSourceCheck.status}`);
|
|
711
700
|
}
|
|
712
701
|
if (pushStatus.hostedPublish) {
|
|
713
702
|
console.log(
|
|
@@ -801,21 +790,6 @@ function resolveHostedRuntimeAgentIdForRun(state, hostedRunAgentId) {
|
|
|
801
790
|
}
|
|
802
791
|
return hostedRunAgentId;
|
|
803
792
|
}
|
|
804
|
-
async function refreshHostedSourceCheckStatus(input) {
|
|
805
|
-
const workItemId = text2(record2(input.checkResult.workItem)?.id);
|
|
806
|
-
if (!workItemId) return null;
|
|
807
|
-
const status = await input.client.workItems.status(workItemId, {
|
|
808
|
-
teamId: input.teamId,
|
|
809
|
-
includeArchived: true,
|
|
810
|
-
limit: 50
|
|
811
|
-
});
|
|
812
|
-
return {
|
|
813
|
-
...input.checkResult,
|
|
814
|
-
workItem: status.workItem,
|
|
815
|
-
activity: status.activity,
|
|
816
|
-
sourceCheckStatus: status.sourceCheckStatus
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
793
|
async function bindValidatedHostedRuntimeSource(input) {
|
|
820
794
|
if (!input.sourceRef || !input.sourceCommitSha) return;
|
|
821
795
|
await input.client.agents.update(input.runtimeAgentId, {
|
|
@@ -976,7 +950,7 @@ function printProfileState(state) {
|
|
|
976
950
|
}
|
|
977
951
|
if (state.hosted.hostedSourceCheck) {
|
|
978
952
|
console.log(
|
|
979
|
-
`Hosted checks: ${state.hosted.hostedSourceCheck.status}` + (state.hosted.hostedSourceCheck.
|
|
953
|
+
`Hosted checks: ${state.hosted.hostedSourceCheck.status}` + (state.hosted.hostedSourceCheck.sandboxId ? ` sandbox ${state.hosted.hostedSourceCheck.sandboxId}` : "")
|
|
980
954
|
);
|
|
981
955
|
}
|
|
982
956
|
if (state.hosted.hostedPublish) {
|
|
@@ -6,16 +6,12 @@ import {
|
|
|
6
6
|
PROJECT_SOURCE_UPLOAD_MAX_FILES,
|
|
7
7
|
PROJECT_SOURCE_UPLOAD_MAX_FILE_BYTES,
|
|
8
8
|
PROJECT_SOURCE_UPLOAD_TRANSPORT,
|
|
9
|
-
buildAgentEditOpenInput,
|
|
10
9
|
buildAgentSourceChecksInput,
|
|
11
10
|
buildAgentSourceConfig,
|
|
12
11
|
buildAgentSourcePolicy,
|
|
13
12
|
buildAgentSourcePublishInput,
|
|
14
13
|
buildAgentUpdateInput,
|
|
15
14
|
buildAgentUpsertInput,
|
|
16
|
-
buildCodingWorkItemBackgroundInput,
|
|
17
|
-
buildCodingWorkItemChatInput,
|
|
18
|
-
buildCodingWorkItemPromotionInput,
|
|
19
15
|
buildProjectUpdateInput,
|
|
20
16
|
buildProjectUpsertInput,
|
|
21
17
|
collectAgentSdkProjectSourceUploadEntries,
|
|
@@ -30,20 +26,20 @@ import {
|
|
|
30
26
|
parseProjectSourceType,
|
|
31
27
|
resolveLocalAgentSdkCommand,
|
|
32
28
|
resolveProjectSourceUploadBranch
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-MIZHCABO.js";
|
|
30
|
+
import "./chunk-JIEUB6OS.js";
|
|
35
31
|
import "./chunk-BYAPLT37.js";
|
|
36
|
-
import "./chunk-ZPL4GZML.js";
|
|
37
|
-
import "./chunk-XEJ7XXUQ.js";
|
|
38
32
|
import "./chunk-WYDVQOBL.js";
|
|
39
33
|
import {
|
|
40
34
|
parseSandboxWorkflowModeOption,
|
|
41
35
|
resolveSandboxClient,
|
|
42
36
|
runCommand
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-FCVVOMIP.js";
|
|
38
|
+
import "./chunk-KHNHUA2H.js";
|
|
39
|
+
import "./chunk-JRROTGQT.js";
|
|
40
|
+
import "./chunk-SMNFI2FU.js";
|
|
41
|
+
import "./chunk-3CDPPVLE.js";
|
|
42
|
+
import "./chunk-DBHSOTYZ.js";
|
|
47
43
|
import "./chunk-KSRWKXRB.js";
|
|
48
44
|
import {
|
|
49
45
|
optionString,
|
|
@@ -54,311 +50,6 @@ import {
|
|
|
54
50
|
import "./chunk-UACZUFIA.js";
|
|
55
51
|
|
|
56
52
|
// src/cli/project-agent-formatters.ts
|
|
57
|
-
function isJsonRecord(value) {
|
|
58
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
59
|
-
}
|
|
60
|
-
function optionalStringField(record, key) {
|
|
61
|
-
const value = record?.[key];
|
|
62
|
-
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
63
|
-
}
|
|
64
|
-
function optionalStringArrayField(record, key) {
|
|
65
|
-
const value = record?.[key];
|
|
66
|
-
if (!Array.isArray(value)) return [];
|
|
67
|
-
return value.filter((item) => typeof item === "string");
|
|
68
|
-
}
|
|
69
|
-
function optionalRecordField(record, key) {
|
|
70
|
-
const value = record?.[key];
|
|
71
|
-
return isJsonRecord(value) ? value : null;
|
|
72
|
-
}
|
|
73
|
-
function optionalRecordArrayField(record, key) {
|
|
74
|
-
const value = record?.[key];
|
|
75
|
-
if (!Array.isArray(value)) return [];
|
|
76
|
-
return value.filter(isJsonRecord);
|
|
77
|
-
}
|
|
78
|
-
function optionalBooleanField(record, key) {
|
|
79
|
-
const value = record?.[key];
|
|
80
|
-
return typeof value === "boolean" ? value : null;
|
|
81
|
-
}
|
|
82
|
-
function uniqueStrings(values) {
|
|
83
|
-
return [...new Set(values.filter((value) => Boolean(value)))];
|
|
84
|
-
}
|
|
85
|
-
function activityPayloads(activity) {
|
|
86
|
-
return activity.map((item) => item.payload).filter(isJsonRecord);
|
|
87
|
-
}
|
|
88
|
-
function compactDeployPlanFromPayloads(payloads) {
|
|
89
|
-
const payload = payloads.find(
|
|
90
|
-
(item) => optionalStringField(item, "deployPlanStatus") || optionalBooleanField(item, "canDeploy") !== null || optionalBooleanField(item, "canRun") !== null || optionalStringArrayField(item, "blockedReasons").length > 0 || optionalStringArrayField(item, "staleReasons").length > 0
|
|
91
|
-
);
|
|
92
|
-
if (!payload) return null;
|
|
93
|
-
const checks = isJsonRecord(payload.checks) ? payload.checks : null;
|
|
94
|
-
const deployPlan = {};
|
|
95
|
-
const status = optionalStringField(payload, "deployPlanStatus") ?? optionalStringField(payload, "status");
|
|
96
|
-
const canDeploy = optionalBooleanField(payload, "canDeploy");
|
|
97
|
-
const canRun = optionalBooleanField(payload, "canRun");
|
|
98
|
-
const blockedReasons = optionalStringArrayField(payload, "blockedReasons");
|
|
99
|
-
const staleReasons = optionalStringArrayField(payload, "staleReasons");
|
|
100
|
-
const artifactPaths = optionalStringArrayField(payload, "artifactPaths");
|
|
101
|
-
if (status) deployPlan.status = status;
|
|
102
|
-
if (canRun !== null) deployPlan.canRun = canRun;
|
|
103
|
-
if (canDeploy !== null) deployPlan.canDeploy = canDeploy;
|
|
104
|
-
for (const key of ["agentId", "projectId", "sourceRef", "baseSha"]) {
|
|
105
|
-
const value = optionalStringField(payload, key);
|
|
106
|
-
if (value) deployPlan[key] = value;
|
|
107
|
-
}
|
|
108
|
-
if (blockedReasons.length > 0) deployPlan.blockedReasons = blockedReasons;
|
|
109
|
-
if (staleReasons.length > 0) deployPlan.staleReasons = staleReasons;
|
|
110
|
-
if (artifactPaths.length > 0) deployPlan.artifactPaths = artifactPaths;
|
|
111
|
-
if (checks) deployPlan.checks = checks;
|
|
112
|
-
return Object.keys(deployPlan).length > 0 ? deployPlan : null;
|
|
113
|
-
}
|
|
114
|
-
function summarizeSourceCheckStatus(workItem, activity) {
|
|
115
|
-
const payloads = activityPayloads(activity);
|
|
116
|
-
const deployPlan = payloads.map((payload) => payload.deployPlan).find(isJsonRecord) ?? compactDeployPlanFromPayloads(payloads);
|
|
117
|
-
const requestedCheckKind = payloads.map(
|
|
118
|
-
(payload) => optionalStringField(payload, "checkKind") ?? optionalStringField(payload, "requestedCheckKind")
|
|
119
|
-
).find(Boolean) ?? null;
|
|
120
|
-
const traceArtifactRefs = uniqueStrings([
|
|
121
|
-
optionalStringField(workItem, "traceArtifactRef"),
|
|
122
|
-
...payloads.map((payload) => optionalStringField(payload, "traceArtifactRef")),
|
|
123
|
-
...payloads.flatMap(
|
|
124
|
-
(payload) => optionalStringArrayField(payload, "traceArtifactRefs")
|
|
125
|
-
)
|
|
126
|
-
]);
|
|
127
|
-
const evalResultArtifactRefs = uniqueStrings([
|
|
128
|
-
optionalStringField(workItem, "evalResultArtifactRef"),
|
|
129
|
-
...payloads.map(
|
|
130
|
-
(payload) => optionalStringField(payload, "evalResultArtifactRef")
|
|
131
|
-
),
|
|
132
|
-
...payloads.flatMap(
|
|
133
|
-
(payload) => optionalStringArrayField(payload, "evalResultArtifactRefs")
|
|
134
|
-
)
|
|
135
|
-
]);
|
|
136
|
-
const publishBlockers = uniqueStrings([
|
|
137
|
-
...optionalStringArrayField(
|
|
138
|
-
isJsonRecord(deployPlan) ? deployPlan : null,
|
|
139
|
-
"blockedReasons"
|
|
140
|
-
),
|
|
141
|
-
...payloads.flatMap(
|
|
142
|
-
(payload) => optionalStringArrayField(payload, "blockedReasons")
|
|
143
|
-
),
|
|
144
|
-
...payloads.flatMap(
|
|
145
|
-
(payload) => optionalStringArrayField(payload, "publishBlockers")
|
|
146
|
-
)
|
|
147
|
-
]);
|
|
148
|
-
const sourceMaterialization = payloads.map((payload) => optionalRecordField(payload, "sourceMaterialization")).find(Boolean) ?? null;
|
|
149
|
-
const setup = payloads.map((payload) => optionalRecordField(payload, "setup")).find(Boolean) ?? null;
|
|
150
|
-
const sourceUploadMetadata = payloads.map((payload) => optionalRecordField(payload, "sourceUploadMetadata")).find(Boolean) ?? null;
|
|
151
|
-
const policyDiscovery = payloads.map((payload) => optionalRecordField(payload, "policyDiscovery")).find(Boolean) ?? null;
|
|
152
|
-
const discoveredRequiredChecks = uniqueStrings([
|
|
153
|
-
...payloads.flatMap(
|
|
154
|
-
(payload) => optionalStringArrayField(payload, "discoveredRequiredChecks")
|
|
155
|
-
),
|
|
156
|
-
...optionalStringArrayField(policyDiscovery, "requiredChecks")
|
|
157
|
-
]);
|
|
158
|
-
const checkRuns = payloads.flatMap(
|
|
159
|
-
(payload) => optionalRecordArrayField(payload, "checkRuns")
|
|
160
|
-
);
|
|
161
|
-
const validation = payloads.map((payload) => optionalRecordField(payload, "validation")).find(Boolean) ?? null;
|
|
162
|
-
const evalSummary = payloads.map((payload) => optionalRecordField(payload, "eval")).find(Boolean) ?? payloads.map((payload) => optionalRecordField(payload, "evalSummary")).find(Boolean) ?? null;
|
|
163
|
-
const validatorArtifactRefs = uniqueStrings(
|
|
164
|
-
payloads.flatMap(
|
|
165
|
-
(payload) => optionalStringArrayField(payload, "validatorArtifactRefs")
|
|
166
|
-
)
|
|
167
|
-
);
|
|
168
|
-
const patchArtifactRef = payloads.map((payload) => optionalStringField(payload, "patchArtifactRef")).find(Boolean) ?? null;
|
|
169
|
-
const draftSourceRef = payloads.map((payload) => optionalStringField(payload, "draftSourceRef")).find(Boolean) ?? null;
|
|
170
|
-
const finalResultState = payloads.map((payload) => optionalStringField(payload, "finalResultState")).find(Boolean) ?? null;
|
|
171
|
-
return {
|
|
172
|
-
workItemId: workItem.id,
|
|
173
|
-
workItemStatus: optionalStringField(workItem, "status"),
|
|
174
|
-
latestTaskRunId: optionalStringField(workItem, "latestTaskRunId"),
|
|
175
|
-
latestRuntimeId: optionalStringField(workItem, "latestRuntimeId"),
|
|
176
|
-
latestSandboxId: optionalStringField(workItem, "latestSandboxId"),
|
|
177
|
-
sourceMaterialization,
|
|
178
|
-
sourceUploadMetadata,
|
|
179
|
-
setup,
|
|
180
|
-
policyDiscovery,
|
|
181
|
-
discoveredRequiredChecks,
|
|
182
|
-
checkRuns,
|
|
183
|
-
validation,
|
|
184
|
-
eval: evalSummary,
|
|
185
|
-
requestedCheckKind,
|
|
186
|
-
deployPlan,
|
|
187
|
-
traceArtifactRefs,
|
|
188
|
-
evalResultArtifactRefs,
|
|
189
|
-
validatorArtifactRefs,
|
|
190
|
-
patchArtifactRef,
|
|
191
|
-
draftSourceRef,
|
|
192
|
-
finalResultState,
|
|
193
|
-
publishBlockers
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function unsafePublicOutputKey(key) {
|
|
197
|
-
const normalized = key.toLowerCase();
|
|
198
|
-
return normalized.includes("raw") || normalized === "stdout" || normalized === "stderr" || normalized === "log" || normalized === "logs" || normalized === "events" || normalized === "eventstream" || normalized === "fulloutput" || normalized === "processoutput" || normalized === "tracejson" || normalized === "evaljson" || normalized === "evalresultsjson";
|
|
199
|
-
}
|
|
200
|
-
function compactPublicValue(value) {
|
|
201
|
-
if (typeof value === "string") {
|
|
202
|
-
return value.length > 512 ? `${value.slice(0, 512)}...[truncated:${value.length}]` : value;
|
|
203
|
-
}
|
|
204
|
-
if (Array.isArray(value)) {
|
|
205
|
-
return value.slice(0, 50).map((item) => compactPublicValue(item));
|
|
206
|
-
}
|
|
207
|
-
if (isJsonRecord(value)) {
|
|
208
|
-
const output = {};
|
|
209
|
-
for (const [key, item] of Object.entries(value)) {
|
|
210
|
-
if (unsafePublicOutputKey(key)) continue;
|
|
211
|
-
output[key] = compactPublicValue(item);
|
|
212
|
-
}
|
|
213
|
-
return output;
|
|
214
|
-
}
|
|
215
|
-
return value;
|
|
216
|
-
}
|
|
217
|
-
function compactRecordFields(record, fields) {
|
|
218
|
-
if (!record) return null;
|
|
219
|
-
const output = {};
|
|
220
|
-
for (const field of fields) {
|
|
221
|
-
if (!(field in record)) continue;
|
|
222
|
-
output[field] = compactPublicValue(record[field]);
|
|
223
|
-
}
|
|
224
|
-
return Object.keys(output).length > 0 ? output : null;
|
|
225
|
-
}
|
|
226
|
-
function compactWorkItem(workItem) {
|
|
227
|
-
return compactRecordFields(workItem, [
|
|
228
|
-
"id",
|
|
229
|
-
"projectId",
|
|
230
|
-
"assignedAgentId",
|
|
231
|
-
"status",
|
|
232
|
-
"sourceRef",
|
|
233
|
-
"baseSha",
|
|
234
|
-
"latestTaskRunId",
|
|
235
|
-
"latestRuntimeId",
|
|
236
|
-
"latestSandboxId",
|
|
237
|
-
"traceArtifactRef",
|
|
238
|
-
"evalResultArtifactRef",
|
|
239
|
-
"createdAt",
|
|
240
|
-
"updatedAt"
|
|
241
|
-
]) ?? { id: workItem.id };
|
|
242
|
-
}
|
|
243
|
-
function compactArtifact(artifact) {
|
|
244
|
-
return compactRecordFields(artifact, [
|
|
245
|
-
"id",
|
|
246
|
-
"kind",
|
|
247
|
-
"ref",
|
|
248
|
-
"taskRunId",
|
|
249
|
-
"runtimeId",
|
|
250
|
-
"sandboxId",
|
|
251
|
-
"createdAt"
|
|
252
|
-
]) ?? {};
|
|
253
|
-
}
|
|
254
|
-
function compactActivityPayload(payload) {
|
|
255
|
-
return compactRecordFields(payload, [
|
|
256
|
-
"checkKind",
|
|
257
|
-
"requestedCheckKind",
|
|
258
|
-
"deployPlanStatus",
|
|
259
|
-
"canDeploy",
|
|
260
|
-
"canRun",
|
|
261
|
-
"blockedReasons",
|
|
262
|
-
"staleReasons",
|
|
263
|
-
"artifactPaths",
|
|
264
|
-
"agentId",
|
|
265
|
-
"projectId",
|
|
266
|
-
"sourceRef",
|
|
267
|
-
"baseSha",
|
|
268
|
-
"sourceMaterialization",
|
|
269
|
-
"sourceUploadMetadata",
|
|
270
|
-
"setup",
|
|
271
|
-
"policyDiscovery",
|
|
272
|
-
"discoveredRequiredChecks",
|
|
273
|
-
"checkRuns",
|
|
274
|
-
"validation",
|
|
275
|
-
"eval",
|
|
276
|
-
"evalSummary",
|
|
277
|
-
"traceArtifactRef",
|
|
278
|
-
"traceArtifactRefs",
|
|
279
|
-
"evalResultArtifactRef",
|
|
280
|
-
"evalResultArtifactRefs",
|
|
281
|
-
"validatorArtifactRefs",
|
|
282
|
-
"patchArtifactRef",
|
|
283
|
-
"draftSourceRef",
|
|
284
|
-
"finalResultState",
|
|
285
|
-
"publishBlockers"
|
|
286
|
-
]);
|
|
287
|
-
}
|
|
288
|
-
function compactWorkItemActivity(activity) {
|
|
289
|
-
const output = compactRecordFields(activity, [
|
|
290
|
-
"id",
|
|
291
|
-
"type",
|
|
292
|
-
"kind",
|
|
293
|
-
"status",
|
|
294
|
-
"summary",
|
|
295
|
-
"message",
|
|
296
|
-
"createdAt",
|
|
297
|
-
"updatedAt"
|
|
298
|
-
]) ?? { id: activity.id };
|
|
299
|
-
const payload = compactActivityPayload(
|
|
300
|
-
optionalRecordField(activity, "payload")
|
|
301
|
-
);
|
|
302
|
-
if (payload) output.payload = payload;
|
|
303
|
-
return output;
|
|
304
|
-
}
|
|
305
|
-
function compactSourceCheckStatus(status) {
|
|
306
|
-
return compactRecordFields(status, [
|
|
307
|
-
"workItemId",
|
|
308
|
-
"workItemStatus",
|
|
309
|
-
"latestTaskRunId",
|
|
310
|
-
"latestRuntimeId",
|
|
311
|
-
"latestSandboxId",
|
|
312
|
-
"sourceMaterialization",
|
|
313
|
-
"sourceUploadMetadata",
|
|
314
|
-
"setup",
|
|
315
|
-
"policyDiscovery",
|
|
316
|
-
"discoveredRequiredChecks",
|
|
317
|
-
"checkRuns",
|
|
318
|
-
"validation",
|
|
319
|
-
"eval",
|
|
320
|
-
"requestedCheckKind",
|
|
321
|
-
"deployPlan",
|
|
322
|
-
"traceArtifactRefs",
|
|
323
|
-
"evalResultArtifactRefs",
|
|
324
|
-
"validatorArtifactRefs",
|
|
325
|
-
"patchArtifactRef",
|
|
326
|
-
"draftSourceRef",
|
|
327
|
-
"finalResultState",
|
|
328
|
-
"publishBlockers"
|
|
329
|
-
]) ?? { workItemId: optionalStringField(status, "workItemId") ?? "unknown" };
|
|
330
|
-
}
|
|
331
|
-
function compactWorkItemStatusResult(status) {
|
|
332
|
-
const sourceCheckStatus = isJsonRecord(status.sourceCheckStatus) ? status.sourceCheckStatus : summarizeSourceCheckStatus(status.workItem, status.activity);
|
|
333
|
-
return {
|
|
334
|
-
workItem: compactWorkItem(status.workItem),
|
|
335
|
-
activity: status.activity.map((item) => compactWorkItemActivity(item)),
|
|
336
|
-
sourceCheckStatus: compactSourceCheckStatus(sourceCheckStatus)
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
function compactBackgroundResult(result) {
|
|
340
|
-
const output = {};
|
|
341
|
-
const workItem = optionalRecordField(result, "workItem");
|
|
342
|
-
if (workItem) output.workItem = compactWorkItem(workItem);
|
|
343
|
-
const activity = optionalRecordField(result, "activity");
|
|
344
|
-
if (activity) {
|
|
345
|
-
output.activity = compactWorkItemActivity(
|
|
346
|
-
activity
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
for (const key of [
|
|
350
|
-
"taskRun",
|
|
351
|
-
"runtime",
|
|
352
|
-
"session",
|
|
353
|
-
"link",
|
|
354
|
-
"toolSummary",
|
|
355
|
-
"accepted",
|
|
356
|
-
"status"
|
|
357
|
-
]) {
|
|
358
|
-
if (key in result) output[key] = compactPublicValue(result[key]);
|
|
359
|
-
}
|
|
360
|
-
return output;
|
|
361
|
-
}
|
|
362
53
|
function formatProjectLine(project) {
|
|
363
54
|
const source = project.gitRepo ? `${project.gitOwner ?? "_"}/${project.gitRepo}` : project.internalRepoPath ?? project.templateRepoUrl ?? project.normalizedSourceIdentity;
|
|
364
55
|
return [
|
|
@@ -387,81 +78,10 @@ function formatAgentLine(agent) {
|
|
|
387
78
|
}
|
|
388
79
|
|
|
389
80
|
// src/cli/agent-source-workflows.ts
|
|
390
|
-
async function runAgentEditWorkflow(client, options, rest) {
|
|
391
|
-
const editCommand = rest[1]?.trim();
|
|
392
|
-
const targetId = rest[2]?.trim();
|
|
393
|
-
const usage = "usage: agent edit <open|chat|activity|background|request-checks|check-status|checkpoint-result|commit-result|pr-result> <id> --team-id <id>";
|
|
394
|
-
const teamId = requiredTeamId(options, usage);
|
|
395
|
-
if (!editCommand || !targetId) {
|
|
396
|
-
throw new Error(usage);
|
|
397
|
-
}
|
|
398
|
-
if (editCommand === "open") {
|
|
399
|
-
const result = await client.agents.openEditWorkItem(
|
|
400
|
-
targetId,
|
|
401
|
-
buildAgentEditOpenInput(targetId, teamId, options)
|
|
402
|
-
);
|
|
403
|
-
console.log(JSON.stringify(result, null, 2));
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (editCommand === "chat") {
|
|
407
|
-
const result = await client.workItems.chat(
|
|
408
|
-
targetId,
|
|
409
|
-
buildCodingWorkItemChatInput(teamId, options)
|
|
410
|
-
);
|
|
411
|
-
console.log(JSON.stringify(result, null, 2));
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
if (editCommand === "activity") {
|
|
415
|
-
const activity = await client.workItems.activity(targetId, {
|
|
416
|
-
teamId,
|
|
417
|
-
limit: parsePositiveLimit(options.limit)
|
|
418
|
-
});
|
|
419
|
-
console.log(
|
|
420
|
-
JSON.stringify(
|
|
421
|
-
{ activity: activity.map((item) => compactWorkItemActivity(item)) },
|
|
422
|
-
null,
|
|
423
|
-
2
|
|
424
|
-
)
|
|
425
|
-
);
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
if (editCommand === "background") {
|
|
429
|
-
const result = await client.workItems.handleBackground(
|
|
430
|
-
targetId,
|
|
431
|
-
buildCodingWorkItemBackgroundInput(teamId, options)
|
|
432
|
-
);
|
|
433
|
-
console.log(JSON.stringify(compactBackgroundResult(result), null, 2));
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
if (editCommand === "request-checks") {
|
|
437
|
-
const result = await client.agents.requestSourceChecks(
|
|
438
|
-
targetId,
|
|
439
|
-
buildAgentSourceChecksInput(teamId, options)
|
|
440
|
-
);
|
|
441
|
-
console.log(JSON.stringify(result, null, 2));
|
|
442
|
-
return;
|
|
443
|
-
}
|
|
444
|
-
if (editCommand === "check-status") {
|
|
445
|
-
const status = await client.workItems.status(targetId, {
|
|
446
|
-
teamId,
|
|
447
|
-
limit: parsePositiveLimit(options.limit),
|
|
448
|
-
includeArchived: true
|
|
449
|
-
});
|
|
450
|
-
console.log(JSON.stringify(compactWorkItemStatusResult(status), null, 2));
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
if (editCommand === "checkpoint-result" || editCommand === "commit-result" || editCommand === "pr-result") {
|
|
454
|
-
const input = buildCodingWorkItemPromotionInput(teamId, options);
|
|
455
|
-
const artifact = editCommand === "checkpoint-result" ? await client.workItems.promoteCheckpoint(targetId, input) : editCommand === "commit-result" ? await client.workItems.promoteCommit(targetId, input) : await client.workItems.promotePullRequest(targetId, input);
|
|
456
|
-
console.log(JSON.stringify({ artifact: compactArtifact(artifact) }, null, 2));
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
throw new Error(usage);
|
|
460
|
-
}
|
|
461
81
|
async function runAgentSourceWorkflow(client, options, rest) {
|
|
462
82
|
const sourceCommand = rest[1]?.trim();
|
|
463
83
|
const agentId = rest[2]?.trim();
|
|
464
|
-
const usage = "usage: agent source <deploy-plan|checks|
|
|
84
|
+
const usage = "usage: agent source <deploy-plan|checks|manifest-snapshots|publish> <agent-id> --team-id <id>";
|
|
465
85
|
const teamId = requiredTeamId(options, usage);
|
|
466
86
|
if (!sourceCommand || !agentId) {
|
|
467
87
|
throw new Error(usage);
|
|
@@ -489,15 +109,6 @@ async function runAgentSourceWorkflow(client, options, rest) {
|
|
|
489
109
|
console.log(JSON.stringify(result, null, 2));
|
|
490
110
|
return;
|
|
491
111
|
}
|
|
492
|
-
if (sourceCommand === "check-status") {
|
|
493
|
-
const status = await client.workItems.status(agentId, {
|
|
494
|
-
teamId,
|
|
495
|
-
limit: parsePositiveLimit(options.limit),
|
|
496
|
-
includeArchived: true
|
|
497
|
-
});
|
|
498
|
-
console.log(JSON.stringify(compactWorkItemStatusResult(status), null, 2));
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
112
|
if (sourceCommand === "publish") {
|
|
502
113
|
const result = await client.agents.publishSource(
|
|
503
114
|
agentId,
|
|
@@ -680,10 +291,6 @@ async function runAgentCommand(options, rest) {
|
|
|
680
291
|
);
|
|
681
292
|
return;
|
|
682
293
|
}
|
|
683
|
-
if (subcommand === "edit") {
|
|
684
|
-
await runAgentEditWorkflow(client, options, rest);
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
294
|
if (subcommand === "source") {
|
|
688
295
|
await runAgentSourceWorkflow(client, options, rest);
|
|
689
296
|
return;
|
|
@@ -860,23 +467,15 @@ export {
|
|
|
860
467
|
PROJECT_SOURCE_UPLOAD_MAX_FILES,
|
|
861
468
|
PROJECT_SOURCE_UPLOAD_MAX_FILE_BYTES,
|
|
862
469
|
PROJECT_SOURCE_UPLOAD_TRANSPORT,
|
|
863
|
-
buildAgentEditOpenInput,
|
|
864
470
|
buildAgentSourceChecksInput,
|
|
865
471
|
buildAgentSourceConfig,
|
|
866
472
|
buildAgentSourcePolicy,
|
|
867
473
|
buildAgentSourcePublishInput,
|
|
868
474
|
buildAgentUpdateInput,
|
|
869
475
|
buildAgentUpsertInput,
|
|
870
|
-
buildCodingWorkItemBackgroundInput,
|
|
871
|
-
buildCodingWorkItemChatInput,
|
|
872
|
-
buildCodingWorkItemPromotionInput,
|
|
873
476
|
buildProjectUpdateInput,
|
|
874
477
|
buildProjectUpsertInput,
|
|
875
478
|
collectProjectSourceUploadEntries,
|
|
876
|
-
compactArtifact,
|
|
877
|
-
compactBackgroundResult,
|
|
878
|
-
compactWorkItemActivity,
|
|
879
|
-
compactWorkItemStatusResult,
|
|
880
479
|
formatAgentLine,
|
|
881
480
|
formatProjectLine,
|
|
882
481
|
parseAgentEntrypointScope,
|
|
@@ -888,7 +487,6 @@ export {
|
|
|
888
487
|
parseProjectSourceType,
|
|
889
488
|
resolveLocalAgentSdkCommand,
|
|
890
489
|
runAgentCommand,
|
|
891
|
-
runAgentEditWorkflow,
|
|
892
490
|
runAgentSourceWorkflow,
|
|
893
491
|
runProjectCommand
|
|
894
492
|
};
|