openpond 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/api/core.d.ts +6 -0
- package/dist/api/vercel-protection.d.ts +1 -0
- package/dist/chunks/{app-layer-DPUJRNO2.js → app-layer-LTBWNA2F.js} +32 -10
- package/dist/chunks/app-server-runtime-VYYJ2AWX.js +18 -0
- package/dist/chunks/{apps-AKBI6AS7.js → apps-CZAJBGE3.js} +6 -4
- package/dist/chunks/{chunk-LZZM3IHS.js → chunk-2SF6HLT7.js} +5899 -5939
- package/dist/chunks/{chunk-XCATKTK3.js → chunk-3CDPPVLE.js} +108 -66
- package/dist/chunks/{chunk-JWF37O5E.js → chunk-3HW6OSHP.js} +1 -3
- package/dist/chunks/{chunk-43YI36NA.js → chunk-3KLQ52B2.js} +228 -5
- package/dist/chunks/chunk-4HIWFIMN.js +37172 -0
- package/dist/chunks/{chunk-AHPQTEIJ.js → chunk-4N6E3OVF.js} +4 -4
- package/dist/chunks/{chunk-YTJL6XPU.js → chunk-6V7MJVRO.js} +56 -11
- package/dist/chunks/{chunk-QRM7XMAO.js → chunk-BQQZNGI6.js} +152 -161
- package/dist/chunks/chunk-DBHSOTYZ.js +1552 -0
- package/dist/chunks/{chunk-275WCETC.js → chunk-FCVVOMIP.js} +145 -5
- package/dist/chunks/{chunk-GB6VUZUA.js → chunk-JIEUB6OS.js} +1 -1
- package/dist/chunks/{chunk-HS2AGRDV.js → chunk-JJPAMKXZ.js} +1 -1
- package/dist/chunks/{chunk-GDZYDLEL.js → chunk-JRROTGQT.js} +1 -110
- package/dist/chunks/chunk-KHNHUA2H.js +1737 -0
- package/dist/chunks/{chunk-AHNFNWUN.js → chunk-L6XH4ZGZ.js} +1 -1
- package/dist/chunks/chunk-M2NXTLH2.js +4054 -0
- package/dist/chunks/{chunk-SLMP353Q.js → chunk-MIZHCABO.js} +2 -195
- package/dist/chunks/chunk-SMNFI2FU.js +113 -0
- package/dist/chunks/chunk-VCVQLECH.js +675 -0
- package/dist/chunks/{chunk-V35STJF4.js → chunk-ZJBJQCQZ.js} +179 -52
- package/dist/chunks/{cli-7BKDWFNU.js → cli-JS76LCW2.js} +9 -5
- package/dist/chunks/{core-commands-YN4RMWA3.js → core-commands-4MRJQZJV.js} +7 -5
- package/dist/chunks/{harness-BHQRMXJR.js → desktop-test-RNMWLOVU.js} +15 -14
- package/dist/chunks/{chunk-XERQHYBO.js → extension-GDRW22N3.js} +5868 -3580
- package/dist/chunks/{help-VREQNA4I.js → help-LWNREJ7U.js} +1 -1
- package/dist/chunks/{opchat-D63YTNSX.js → opchat-2K2JIGK3.js} +9 -10
- package/dist/chunks/{organizations-I46KG7TC.js → organizations-Z5HVD2E7.js} +11 -9
- package/dist/chunks/{profile-WKZJHEPG.js → profile-QNECVVGN.js} +12 -38
- package/dist/chunks/{project-agent-ZUC3YMCT.js → project-agent-W3V75WBR.js} +9 -411
- package/dist/chunks/{sandbox-command-AAOPFTI5.js → sandbox-command-X3FO74NX.js} +7 -5
- package/dist/chunks/{sandbox-template-GKNVR4C5.js → sandbox-template-5B4T4BGU.js} +8 -6
- package/dist/chunks/{src-RPW5TOPI.js → src-ESAILPUH.js} +32 -30
- package/dist/chunks/src-IC5RX4L6.js +63517 -0
- package/dist/chunks/{teams-bot-PSL3ZO6Z.js → teams-bot-NTQ6VFFL.js} +6 -4
- package/dist/chunks/training-BR5A7SPU.js +320 -0
- package/dist/chunks/{workspaces-BPXC2DHT.js → workspaces-XC3QBD2Y.js} +2 -2
- package/dist/cli.js +24 -12
- package/dist/config.d.ts +9 -3
- package/dist/index.js +1300 -1045
- package/dist/profile/local-profile-types.d.ts +16 -0
- package/dist/profile/local-profile.d.ts +50 -4
- package/dist/sandbox/client-handles.d.ts +33 -46
- package/dist/sandbox/client.d.ts +4 -26
- package/dist/sandbox/sandbox-instance-client.d.ts +5 -5
- package/dist/sandbox/types/client.d.ts +1 -2
- package/dist/sandbox/types/core.d.ts +0 -1
- package/dist/sandbox/types/org-project-agent.d.ts +3 -89
- package/dist/sandbox/types/record.d.ts +1 -2
- package/dist/sandbox/types/runtime-profiles.d.ts +2 -2
- package/dist/sandbox-template/manifest.d.ts +1 -1
- package/dist/skills/openpond-agent-authoring/SKILL.md +40 -0
- package/dist/skills/openpond-agent-authoring/references/action-and-chat-design.md +13 -0
- package/dist/skills/openpond-agent-authoring/references/integrations-and-setup.md +13 -0
- package/dist/skills/openpond-agent-authoring/references/profile-layout.md +29 -0
- package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +14 -0
- package/dist/skills/openpond-desktop-harness/SKILL.md +1 -1
- package/dist/skills/openpond-skill-authoring/SKILL.md +44 -0
- package/dist/skills/openpond-skill-authoring/references/copying-and-adaptation.md +16 -0
- package/dist/skills/openpond-skill-authoring/references/skill-package-layout.md +38 -0
- package/dist/skills/openpond-skill-authoring/references/validation-and-repair.md +24 -0
- package/dist/skills/openpond-skill-authoring/scripts/validate-skill.mjs +102 -0
- package/dist/skills/openpond-taskset-authoring/SKILL.md +64 -22
- package/dist/skills/openpond-taskset-authoring/artifact.json +39 -0
- package/dist/skills/openpond-taskset-authoring/references/graders-and-rewards.md +3 -0
- package/dist/skills/openpond-taskset-authoring/references/method-selection.md +1 -1
- package/dist/skills/openpond-taskset-authoring/references/privacy-and-provenance.md +2 -0
- package/dist/skills/openpond-taskset-authoring/references/task-design.md +32 -0
- package/dist/web/assets/{AppDialog-DrwJb_wG.js → AppDialog-Bua3f-6v.js} +1 -1
- package/dist/web/assets/{AppsView-DPagLMsc.js → AppsView-DrJkHeSO.js} +1 -1
- package/dist/web/assets/BrowserSidebar-Bf-4Vozm.js +1 -0
- package/dist/web/assets/CommandMenu-DDZlGQiB.js +1 -0
- package/dist/web/assets/CommunityView-BtcCrba7.js +1 -0
- package/dist/web/assets/ComposerCreateImproveStrip-DOe5Otg6.js +1 -0
- package/dist/web/assets/GetStartedView-CG4z0Dtw.js +1 -0
- package/dist/web/assets/GetStartedView-yVmnGZPw.css +1 -0
- package/dist/web/assets/LabModelVersionDetailPage-BEkmSKuv.js +1 -0
- package/dist/web/assets/LabSkillSidebar-BIotN_RB.js +1 -0
- package/dist/web/assets/LabsRoute-CfOe0Zt5.js +3 -0
- package/dist/web/assets/LabsRoute-CoSPO4HR.css +1 -0
- package/dist/web/assets/MainChatThread-C0-l1mHt.js +2 -0
- package/dist/web/assets/MainPane-Bky_Rqcx.css +1 -0
- package/dist/web/assets/MainPane-aOVlVyRK.js +6 -0
- package/dist/web/assets/MarkdownText-D7DT1k1k.js +9 -0
- package/dist/web/assets/Messages-CBIXruA9.js +9 -0
- package/dist/web/assets/NativeSkillSidebar-C4t69Y7B.js +1 -0
- package/dist/web/assets/NewProjectDialog-Bat65tYD.js +1 -0
- package/dist/web/assets/OutputsPage-C58n39Db.js +1 -0
- package/dist/web/assets/RightChatPanelStack-Bp7nZxQ0.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-BXP0j_c_.js +1 -0
- package/dist/web/assets/SettingsView-CtWK_aQ0.css +1 -0
- package/dist/web/assets/SettingsView-DOOfhO9a.js +6 -0
- package/dist/web/assets/TeamChatView-Cgxm-pKA.css +1 -0
- package/dist/web/assets/TeamChatView-De2wdqyY.js +3 -0
- package/dist/web/assets/{TerminalOverlay-BKl0p8pa.js → TerminalOverlay-BsuCH3NX.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-D2OFWyQ-.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-DBpulXTz.js +1 -0
- package/dist/web/assets/{UsageSettingsSection-zDAwzTGl.js → UsageSettingsSection-DzMLUXAO.js} +37 -37
- package/dist/web/assets/WorkspaceDiffPanel-B7yIhjNF.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-B6jXM9xG.js +32 -0
- package/dist/web/assets/WorkspaceGitDialogs-CQ0fl9Qk.js +1 -0
- package/dist/web/assets/{WorkspaceMonacoEditor-DPGcG8fy.js → WorkspaceMonacoEditor-C2ctzITz.js} +3 -3
- package/dist/web/assets/arrow-up-right-ecwcx3xt.js +1 -0
- package/dist/web/assets/chevron-up-DP8PPfWd.js +1 -0
- package/dist/web/assets/circle-alert-envg1D6O.js +1 -0
- package/dist/web/assets/cloud-upload-5MGPLnaA.js +1 -0
- package/dist/web/assets/{cssMode-CKN9CcfG.js → cssMode-CFifcEfw.js} +1 -1
- package/dist/web/assets/folder-open-Dq3ZjeEP.js +1 -0
- package/dist/web/assets/folder-plus-EiZ5wbv_.js +1 -0
- package/dist/web/assets/git-branch-w29jmQ-X.js +1 -0
- package/dist/web/assets/{git-commit-horizontal-Bxi8YPep.js → git-commit-horizontal-CGZM0PZo.js} +1 -1
- package/dist/web/assets/{htmlMode-CeUcNhBZ.js → htmlMode-Ct1P-_lf.js} +1 -1
- package/dist/web/assets/index-ByIQyiUl.js +178 -0
- package/dist/web/assets/index-D4uCeiep.js +1 -0
- package/dist/web/assets/index-D9jTe16Q.css +1 -0
- package/dist/web/assets/info-Cd2HkIeb.js +1 -0
- package/dist/web/assets/{jsonMode-97z0Yz9u.js → jsonMode-BAUNCNAX.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-D4Tp-JmI.js → lspLanguageFeatures-fucFYI1A.js} +1 -1
- package/dist/web/assets/monaco.contribution-Ce4v5kei.js +2 -0
- package/dist/web/assets/monaco.contribution-DLLMi4cB.js +2 -0
- package/dist/web/assets/monaco.contribution-g9QiIm1d.js +2 -0
- package/dist/web/assets/monaco.contribution-nG-5Cyjz.js +2 -0
- package/dist/web/assets/monitor-DgHCnCKl.js +1 -0
- package/dist/web/assets/{play-C-37dnR1.js → play-Be0XDHBu.js} +1 -1
- package/dist/web/assets/{python-CGpDXY7_.js → python-CEhEiPo7.js} +1 -1
- package/dist/web/assets/{refresh-cw-BAaaPCXl.js → refresh-cw-DH0KLbdD.js} +1 -1
- package/dist/web/assets/reply-D1TK2yV8.js +1 -0
- package/dist/web/assets/{save-Cvxs3XyC.js → save-C1MSeBnQ.js} +1 -1
- package/dist/web/assets/square-CemI-0g5.js +1 -0
- package/dist/web/assets/square-pen-CqfsvR_n.js +1 -0
- package/dist/web/assets/{toggleHighContrast-CD42jH4g.js → toggleHighContrast-DrdQN3Rl.js} +1 -1
- package/dist/web/assets/training-BQVNUTZA.css +1 -0
- package/dist/web/assets/training-model-data-B7-1Bxil.js +1 -0
- package/dist/web/assets/{tsMode-ZROIxEjv.js → tsMode-CKB5oOUU.js} +1 -1
- package/dist/web/assets/{upload-DvCSGERK.js → upload-t751LLqP.js} +1 -1
- package/dist/web/assets/useLocalAgentSchedules-CzC3wfIP.js +1 -0
- package/dist/web/assets/{wifi-off-BIb94PkS.js → wifi-off-CxTHH3JU.js} +1 -1
- package/dist/web/assets/{workers-oYqbrVYG.js → workers-CqYddzCd.js} +1 -1
- package/dist/web/assets/{yaml-WqBjNgOO.js → yaml-e5wBkc-C.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +75 -40
- package/package.json +3 -1
- package/dist/chunks/chunk-FWLOFUPU.js +0 -864
- package/dist/chunks/chunk-HLCTINEP.js +0 -224
- package/dist/chunks/chunk-MPGSHXGF.js +0 -3896
- package/dist/chunks/chunk-T4QXKU5Y.js +0 -1
- package/dist/chunks/chunk-XEJ7XXUQ.js +0 -1301
- package/dist/chunks/chunk-ZI4GDAUB.js +0 -3522
- package/dist/chunks/cli-2KBVNDRY.js +0 -23
- package/dist/chunks/extend-REGNTBK3.js +0 -89
- package/dist/chunks/extension-7K77DAVL.js +0 -121
- package/dist/chunks/fileFromPath-DHCRY3BD.js +0 -2151
- package/dist/chunks/src-MWDIK56B.js +0 -105881
- package/dist/web/assets/BrowserSidebar-DMn2V8RV.js +0 -1
- package/dist/web/assets/CloudWorkView-Cl_7mM3c.js +0 -1
- package/dist/web/assets/CloudWorkView-DNoPIlMj.css +0 -1
- package/dist/web/assets/CommandMenu-CHMQLez_.js +0 -1
- package/dist/web/assets/CommunityView-DcHVDUk0.js +0 -1
- package/dist/web/assets/ComposerCreateImproveStrip-BZ3Dgzmo.js +0 -1
- package/dist/web/assets/GetStartedView-DBLdduwr.css +0 -1
- package/dist/web/assets/GetStartedView-DTRotFqz.js +0 -1
- package/dist/web/assets/LabSkillSidebar-D-PqFe1T.js +0 -1
- package/dist/web/assets/LabsRoute-BrJkBNig.css +0 -1
- package/dist/web/assets/LabsRoute-Dew1BwK5.js +0 -3
- package/dist/web/assets/MainChatThread-BaPxxzrw.js +0 -2
- package/dist/web/assets/MakeAgentTutorialLearningPanel-CBsfnONQ.js +0 -2
- package/dist/web/assets/MarkdownText-DGLfAM_Z.js +0 -7
- package/dist/web/assets/Messages-CIX9uTjX.js +0 -10
- package/dist/web/assets/NativeSkillSidebar-AP_uHn6g.js +0 -1
- package/dist/web/assets/NewProjectDialog-C6lHkafU.js +0 -1
- package/dist/web/assets/PostTrainingLearningPanel-CZEgPc8O.js +0 -2
- package/dist/web/assets/PostTrainingStatusPill-CeEpwUDB.js +0 -1
- package/dist/web/assets/ProfileSettingsSection-Cg4tKO-C.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-EumMLlEp.js +0 -1
- package/dist/web/assets/RightChatPanelStack-MXBcx3zO.js +0 -1
- package/dist/web/assets/SettingsView-Caljbns2.css +0 -1
- package/dist/web/assets/SettingsView-DyURG_Uh.js +0 -6
- package/dist/web/assets/TeamChatView-Bx44q3WV.css +0 -1
- package/dist/web/assets/TeamChatView-D3v6aqJ3.js +0 -3
- package/dist/web/assets/TrainingCreationPanel-CfZQTuT5.js +0 -1
- package/dist/web/assets/TrainingDraftPanel-DslRPSDW.js +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-C_MZPPlL.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-BUAnn80j.js +0 -32
- package/dist/web/assets/WorkspaceGitDialogs-Drbf4ujA.js +0 -1
- package/dist/web/assets/activity-Dnr3jqb3.js +0 -1
- package/dist/web/assets/boxes-BinC8UPn.js +0 -1
- package/dist/web/assets/chevron-up-Bjp_-_Cb.js +0 -1
- package/dist/web/assets/circle-x-ubnvEYuE.js +0 -1
- package/dist/web/assets/copy-B_ZCCUMz.js +0 -1
- package/dist/web/assets/create-pipeline-request-D6uLUxe9.js +0 -4
- package/dist/web/assets/file-8HAMlTmQ.js +0 -1
- package/dist/web/assets/git-branch-l2Zih3Bv.js +0 -1
- package/dist/web/assets/index-BMFyOFRU.css +0 -1
- package/dist/web/assets/index-BzwcDzbT.js +0 -1
- package/dist/web/assets/index-KoQSSt_f.js +0 -177
- package/dist/web/assets/info-JTbDQxHx.js +0 -1
- package/dist/web/assets/make-agent-tutorial-D6nBCgv-.js +0 -2
- package/dist/web/assets/monaco.contribution-B3j6oown.js +0 -2
- package/dist/web/assets/monaco.contribution-BXHxPPWL.js +0 -2
- package/dist/web/assets/monaco.contribution-C2P5zIzh.js +0 -2
- package/dist/web/assets/monaco.contribution-C8c6OtGi.js +0 -2
- package/dist/web/assets/monitor-kzHtxHnA.js +0 -1
- package/dist/web/assets/reply-9rehU13k.js +0 -1
- package/dist/web/assets/rotate-cw-C1Z_Xs23.js +0 -1
- package/dist/web/assets/training-BN8CALIc.css +0 -1
- package/dist/web/assets/training-model-data-BXUCzS0p.js +0 -1
- package/docs/agent-edit-check-status-json.md +0 -132
|
@@ -1,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-LZZM3IHS.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-XERQHYBO.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-XERQHYBO.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
|
};
|