openpond 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{app-layer-FIGCNZJX.js → app-layer-CUQQUVJS.js} +20 -3
- package/dist/chunks/{apps-4RMNCKXS.js → apps-TAYMUCWX.js} +3 -3
- package/dist/chunks/{chunk-57P2GCW5.js → chunk-3UOLQG6N.js} +1 -1
- package/dist/chunks/{chunk-MFS3SYUH.js → chunk-3ZJIEA5F.js} +1 -1
- package/dist/chunks/{chunk-4S3XGFGL.js → chunk-4HQURM3N.js} +1 -1
- package/dist/chunks/{chunk-BNVHGSI7.js → chunk-4M4WAORL.js} +874 -798
- package/dist/chunks/{chunk-DANRS43D.js → chunk-5RHZKQRK.js} +14 -76
- package/dist/chunks/{chunk-BNPFMGZD.js → chunk-D264OHTR.js} +4 -5
- package/dist/chunks/{chunk-BBEVMP6O.js → chunk-DCNAXREU.js} +179 -160
- package/dist/chunks/chunk-E5RVRUJB.js +1222 -0
- package/dist/chunks/{chunk-RJXX6TJA.js → chunk-EONKWOLU.js} +2 -2
- package/dist/chunks/{chunk-VQX33YAG.js → chunk-FQW3AQVJ.js} +689 -121
- package/dist/chunks/{chunk-GGKA4HLQ.js → chunk-GYZYZGKS.js} +238 -69
- package/dist/chunks/{chunk-KMSMK7PI.js → chunk-OXQG773T.js} +33 -33
- package/dist/chunks/{chunk-BX4XSB2J.js → chunk-PJXJ2HRT.js} +1816 -1113
- package/dist/chunks/chunk-Q5MZCRJA.js +70 -0
- package/dist/chunks/{chunk-OV3KAFWB.js → chunk-W2DJR3FA.js} +1 -1
- package/dist/chunks/{chunk-KEDXE4BA.js → chunk-XADW35CL.js} +3 -3
- package/dist/chunks/{chunk-IUTUUNAX.js → chunk-Y4F4XD5V.js} +1 -1
- package/dist/chunks/{cli-2L4NB7HD.js → cli-WW5BVN5Z.js} +4 -3
- package/dist/chunks/{cli-5RL7B2Z3.js → cli-ZOCP7X5M.js} +6 -6
- package/dist/chunks/{core-commands-AZJZGTZS.js → core-commands-SYGK7K57.js} +4 -4
- package/dist/chunks/{extend-6IWYZI37.js → extend-Q5HZ7TMA.js} +11 -11
- package/dist/chunks/fileFromPath-DHCRY3BD.js +2151 -0
- package/dist/chunks/{harness-SSNXDSKM.js → harness-ZPBPQVAS.js} +3 -3
- package/dist/chunks/{help-MUJJMI3Q.js → help-3V3TRQNX.js} +1 -1
- package/dist/chunks/{opchat-RW4CFAQB.js → opchat-OUPMEFE5.js} +5 -5
- package/dist/chunks/{organizations-V7DTNLSI.js → organizations-5CSLBDAW.js} +4 -4
- package/dist/chunks/{profile-WDBKJ7YW.js → profile-OQYSXHOG.js} +206 -166
- package/dist/chunks/{project-agent-3TZ3BPYN.js → project-agent-TBTWOUJF.js} +6 -7
- package/dist/chunks/{sandbox-command-HOYHF4NC.js → sandbox-command-HCHPY7KW.js} +4 -4
- package/dist/chunks/{sandbox-template-IYGB4CZU.js → sandbox-template-PNTOZ6W3.js} +5 -6
- package/dist/chunks/{src-CBPRIWG5.js → src-C6MXLDYQ.js} +22 -6
- package/dist/chunks/{src-ZRQKSQTD.js → src-GZT4UX6I.js} +80887 -52945
- package/dist/chunks/{teams-bot-UWGCFL6C.js → teams-bot-CQ76XI6T.js} +3 -3
- package/dist/chunks/workspaces-DHVVOTVR.js +93 -0
- package/dist/cli.js +10 -10
- package/dist/config.d.ts +0 -2
- package/dist/index.js +273 -69
- package/dist/profile/local-profile-types.d.ts +8 -2
- package/dist/profile/local-profile.d.ts +3 -1
- package/dist/sandbox/types/org-project-agent.d.ts +1 -2
- package/dist/web/assets/{AppsView-Bu-Nc3Ew.js → AppsView-CF2g-7FH.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-CCguQ-DR.js → BrowserSidebar-lUsLUl20.js} +1 -1
- package/dist/web/assets/CloudWorkView-BnfGW4OV.js +1 -0
- package/dist/web/assets/{CommandMenu-CnodJFHD.js → CommandMenu-BsS4Bgb6.js} +1 -1
- package/dist/web/assets/{CommunityView-CIbjNUZr.js → CommunityView-C8qVOwlp.js} +1 -1
- package/dist/web/assets/ComposerCreateImproveStrip-C_LIpfSq.js +1 -0
- package/dist/web/assets/GetStartedView-Du533wOh.js +1 -0
- package/dist/web/assets/LabsRoute-CgKtVYTP.css +1 -0
- package/dist/web/assets/LabsRoute-yk8lNMQc.js +3 -0
- package/dist/web/assets/{NewProjectDialog-CaKiCoVS.js → NewProjectDialog-DH7wA1z9.js} +1 -1
- package/dist/web/assets/ProfileSettingsSection-CqnfjiCl.css +1 -0
- package/dist/web/assets/ProfileSettingsSection-D7JvMZdW.js +1 -0
- package/dist/web/assets/SettingsView-C9TgCaWG.js +63 -0
- package/dist/web/assets/TeamChatView-D_CE7br9.js +3 -0
- package/dist/web/assets/{TerminalOverlay-C1iP4OS1.js → TerminalOverlay-CC-VDSlp.js} +1 -1
- package/dist/web/assets/TrainingCreationPanel-NFCoaBUI.js +1 -0
- package/dist/web/assets/TrainingDraftPanel-BWEmVFjM.js +1 -0
- package/dist/web/assets/WorkspaceDiffPanel-SlLlGZM1.js +14 -0
- package/dist/web/assets/{WorkspaceEnvironmentMenu-B8JJbwIz.js → WorkspaceEnvironmentMenu-BAoMBTVD.js} +1 -1
- package/dist/web/assets/{WorkspaceGitDialogs-B4sp9BGn.js → WorkspaceGitDialogs-CVIFrzyl.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-BBqimG5X.js → WorkspaceMonacoEditor-0trp0-TI.js} +3 -3
- package/dist/web/assets/{boxes-DAaDUabq.js → boxes-CFihgX2z.js} +1 -1
- package/dist/web/assets/create-pipeline-request-AJWLMTyw.js +4 -0
- package/dist/web/assets/{cssMode-CBF1mieJ.js → cssMode-HvqfCFyP.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-CAickXpN.js → git-commit-horizontal-C5mUmACv.js} +1 -1
- package/dist/web/assets/{htmlMode-2u8OHtWO.js → htmlMode-C8btgUt-.js} +1 -1
- package/dist/web/assets/index-8H-GDlM5.css +1 -0
- package/dist/web/assets/index-D7Vr3zcV.js +192 -0
- package/dist/web/assets/index-DUqAiF57.js +1 -0
- package/dist/web/assets/{info-CQNTh78o.js → info-D0xuy5IB.js} +1 -1
- package/dist/web/assets/{jsonMode-C4CWXViX.js → jsonMode-5zVz9G0X.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CBs_BOlB.js → lspLanguageFeatures-DxlSSL7c.js} +1 -1
- package/dist/web/assets/{monaco.contribution-lOXpG2xQ.js → monaco.contribution-B1pWWwqT.js} +2 -2
- package/dist/web/assets/{monaco.contribution-sd3cFkcN.js → monaco.contribution-BKpVvKK9.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C1LUxAKf.js → monaco.contribution-BXdXsSWI.js} +2 -2
- package/dist/web/assets/{monaco.contribution-Cpf6dWsh.js → monaco.contribution-CIjjzpUR.js} +2 -2
- package/dist/web/assets/{monitor-DsIswrMV.js → monitor-B4-9Shtp.js} +1 -1
- package/dist/web/assets/{play-CeRw21NV.js → play-BJdhBqQE.js} +1 -1
- package/dist/web/assets/{python-CXYq3BUl.js → python-CEK8J4w_.js} +1 -1
- package/dist/web/assets/{refresh-cw-N5b_6AP5.js → refresh-cw-DE0u_nmZ.js} +1 -1
- package/dist/web/assets/{reply-BSKjZrJg.js → reply-2MfLJ93n.js} +1 -1
- package/dist/web/assets/{save-D0oHH1a3.js → save-CBIVKaf8.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-DRjlcwes.js → toggleHighContrast-CC73mtvA.js} +1 -1
- package/dist/web/assets/training-BY8siNUK.css +1 -0
- package/dist/web/assets/training-model-data-BXUCzS0p.js +1 -0
- package/dist/web/assets/{tsMode-x-1A7ZcB.js → tsMode-Bhn9wr_1.js} +1 -1
- package/dist/web/assets/{wifi-off-Dt52ofzh.js → wifi-off-BKTqnqj0.js} +1 -1
- package/dist/web/assets/{workers-Ciff6Dzi.js → workers-C_adgrEg.js} +1 -1
- package/dist/web/assets/{yaml-CB67Kxnz.js → yaml-DDRAcADU.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunks/chunk-OG75GMVO.js +0 -1
- package/dist/web/assets/CloudWorkView-Dr3xqLE5.js +0 -1
- package/dist/web/assets/GetStartedView-C8nyH_PT.js +0 -1
- package/dist/web/assets/LabsExtensions-GtJzxDnK.js +0 -1
- package/dist/web/assets/LabsProfile-DG7rWYur.js +0 -1
- package/dist/web/assets/LabsRoute-D6MDHBzq.js +0 -2
- package/dist/web/assets/LabsRoute-TEt9j1vB.css +0 -1
- package/dist/web/assets/LabsSignals-BfsDN86w.js +0 -1
- package/dist/web/assets/LabsSignals-D6iA6Ryl.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-DTQS2DVL.css +0 -1
- package/dist/web/assets/ProfileSettingsSection-DxEzoF3K.js +0 -1
- package/dist/web/assets/ProfileView-CEscW7Ru.js +0 -1
- package/dist/web/assets/SettingsView-JIRR_FO4.js +0 -63
- package/dist/web/assets/TeamChatView-B5M1ThhJ.js +0 -3
- package/dist/web/assets/TrainingSettingsSection-BDYvI2te.js +0 -1
- package/dist/web/assets/TrainingView-CoCFK6W3.js +0 -5
- package/dist/web/assets/WorkspaceDiffPanel-CMxKQeo7.js +0 -14
- package/dist/web/assets/index-BdY6A-YN.css +0 -1
- package/dist/web/assets/index-CU2qhUYV.js +0 -195
- package/dist/web/assets/index-Dz2B3-4C.js +0 -1
- package/dist/web/assets/settings-lists-BEg6LMcy.css +0 -1
- package/dist/web/assets/training-model-data-BPrc68VG.js +0 -1
|
@@ -4,14 +4,15 @@ import {
|
|
|
4
4
|
materializeSourceUploadFile,
|
|
5
5
|
readSourceUploadCache,
|
|
6
6
|
writeSourceUploadCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4HQURM3N.js";
|
|
8
8
|
import {
|
|
9
9
|
yaml
|
|
10
10
|
} from "./chunk-WYDVQOBL.js";
|
|
11
11
|
import {
|
|
12
12
|
loadGlobalConfig,
|
|
13
|
+
openPondConfigDirectory,
|
|
13
14
|
saveGlobalConfig
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-D264OHTR.js";
|
|
15
16
|
|
|
16
17
|
// ../../packages/cloud/src/profile/profile-setup-gate.ts
|
|
17
18
|
var OpenPondProfileSetupRequiredError = class extends Error {
|
|
@@ -595,8 +596,14 @@ function textArray(value) {
|
|
|
595
596
|
import { createRequire } from "node:module";
|
|
596
597
|
import { spawn as spawn2 } from "node:child_process";
|
|
597
598
|
import { existsSync as existsSync4 } from "node:fs";
|
|
598
|
-
import {
|
|
599
|
-
|
|
599
|
+
import {
|
|
600
|
+
cp,
|
|
601
|
+
mkdir,
|
|
602
|
+
readFile as readFile4,
|
|
603
|
+
readdir as readdir2,
|
|
604
|
+
symlink,
|
|
605
|
+
writeFile as writeFile2
|
|
606
|
+
} from "node:fs/promises";
|
|
600
607
|
import path5 from "node:path";
|
|
601
608
|
|
|
602
609
|
// ../../packages/cloud/src/profile/local-profile-types.ts
|
|
@@ -1089,7 +1096,7 @@ function mergeActiveLocalProfileConfig(existing, repoPath, profile) {
|
|
|
1089
1096
|
}
|
|
1090
1097
|
var require2 = createRequire(import.meta.url);
|
|
1091
1098
|
function defaultLocalProfileRepoPath() {
|
|
1092
|
-
return path5.join(
|
|
1099
|
+
return path5.join(openPondConfigDirectory(), "profiles", "default-repo");
|
|
1093
1100
|
}
|
|
1094
1101
|
function emptyProfileState(error = null) {
|
|
1095
1102
|
return {
|
|
@@ -1100,6 +1107,7 @@ function emptyProfileState(error = null) {
|
|
|
1100
1107
|
manifestPath: null,
|
|
1101
1108
|
agents: [],
|
|
1102
1109
|
skills: [],
|
|
1110
|
+
evals: [],
|
|
1103
1111
|
git: null,
|
|
1104
1112
|
catalog: emptyProfileCatalogState(error),
|
|
1105
1113
|
skillCatalog: emptyProfileSkillCatalogState(error),
|
|
@@ -1114,22 +1122,37 @@ function emptyProfileState(error = null) {
|
|
|
1114
1122
|
};
|
|
1115
1123
|
}
|
|
1116
1124
|
async function initLocalProfileRepo(input = {}) {
|
|
1117
|
-
const repoPath = path5.resolve(
|
|
1125
|
+
const repoPath = path5.resolve(
|
|
1126
|
+
input.repoPath ?? defaultLocalProfileRepoPath()
|
|
1127
|
+
);
|
|
1118
1128
|
const profile = normalizeProfileName(input.profile);
|
|
1119
1129
|
const profilePath = path5.join("profiles", profile);
|
|
1120
1130
|
const profileSourcePath2 = path5.join(repoPath, profilePath);
|
|
1121
1131
|
await mkdir(repoPath, { recursive: true });
|
|
1122
|
-
const manifest = await readProfileManifest(repoPath).catch(
|
|
1132
|
+
const manifest = await readProfileManifest(repoPath).catch(
|
|
1133
|
+
() => defaultProfileManifest(profile, profilePath)
|
|
1134
|
+
);
|
|
1123
1135
|
manifest.defaultProfile = manifest.defaultProfile || profile;
|
|
1124
|
-
manifest.profiles[profile] = mergeProfileRepoManifestEntry(
|
|
1125
|
-
|
|
1136
|
+
manifest.profiles[profile] = mergeProfileRepoManifestEntry(
|
|
1137
|
+
manifest.profiles[profile],
|
|
1138
|
+
profilePath
|
|
1139
|
+
);
|
|
1140
|
+
await ensureProfileSource(
|
|
1141
|
+
profileSourcePath2,
|
|
1142
|
+
input.template ?? "blank-agent",
|
|
1143
|
+
Boolean(input.force)
|
|
1144
|
+
);
|
|
1126
1145
|
await ensureProfileDependencies(profileSourcePath2);
|
|
1127
1146
|
await ensureProfileScaffoldFiles(repoPath, profileSourcePath2, profile);
|
|
1128
1147
|
await writeProfileManifest(repoPath, manifest);
|
|
1129
1148
|
await ensureProfileGitRepo(repoPath);
|
|
1130
1149
|
const currentConfig = (await loadGlobalConfig()).openpondProfile;
|
|
1131
1150
|
await saveGlobalConfig({
|
|
1132
|
-
openpondProfile: mergeActiveLocalProfileConfig(
|
|
1151
|
+
openpondProfile: mergeActiveLocalProfileConfig(
|
|
1152
|
+
currentConfig,
|
|
1153
|
+
repoPath,
|
|
1154
|
+
profile
|
|
1155
|
+
)
|
|
1133
1156
|
});
|
|
1134
1157
|
return loadOpenPondProfileState();
|
|
1135
1158
|
}
|
|
@@ -1140,7 +1163,11 @@ async function loadLocalProfileRepo(repoPathInput, profileInput) {
|
|
|
1140
1163
|
profileSourcePath(manifest, repoPath, profile);
|
|
1141
1164
|
const currentConfig = (await loadGlobalConfig()).openpondProfile;
|
|
1142
1165
|
await saveGlobalConfig({
|
|
1143
|
-
openpondProfile: mergeActiveLocalProfileConfig(
|
|
1166
|
+
openpondProfile: mergeActiveLocalProfileConfig(
|
|
1167
|
+
currentConfig,
|
|
1168
|
+
repoPath,
|
|
1169
|
+
profile
|
|
1170
|
+
)
|
|
1144
1171
|
});
|
|
1145
1172
|
return loadOpenPondProfileState();
|
|
1146
1173
|
}
|
|
@@ -1150,19 +1177,23 @@ async function loadOpenPondProfileState() {
|
|
|
1150
1177
|
if (!active) return emptyProfileState();
|
|
1151
1178
|
try {
|
|
1152
1179
|
const manifest = await readProfileManifest(active.repoPath);
|
|
1153
|
-
const sourcePath = profileSourcePath(
|
|
1180
|
+
const sourcePath = profileSourcePath(
|
|
1181
|
+
manifest,
|
|
1182
|
+
active.repoPath,
|
|
1183
|
+
active.profile
|
|
1184
|
+
);
|
|
1154
1185
|
const agents = await listProfileAgents(manifest, active.profile);
|
|
1155
|
-
const
|
|
1186
|
+
const catalogSources = profileCatalogSources({
|
|
1187
|
+
manifest,
|
|
1188
|
+
profile: active.profile,
|
|
1189
|
+
profileSourcePath: sourcePath,
|
|
1190
|
+
agents
|
|
1191
|
+
});
|
|
1192
|
+
const [git, catalogResult, skillResult, evals] = await Promise.all([
|
|
1156
1193
|
loadProfileGitState(active.repoPath),
|
|
1157
|
-
loadProfileActionCatalogForSources(
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
profile: active.profile,
|
|
1161
|
-
profileSourcePath: sourcePath,
|
|
1162
|
-
agents
|
|
1163
|
-
})
|
|
1164
|
-
),
|
|
1165
|
-
loadProfileSkills(sourcePath)
|
|
1194
|
+
loadProfileActionCatalogForSources(catalogSources),
|
|
1195
|
+
loadProfileSkills(sourcePath),
|
|
1196
|
+
loadProfileEvals(sourcePath, catalogSources)
|
|
1166
1197
|
]);
|
|
1167
1198
|
const hosted = hostedBindingFromConfig(active);
|
|
1168
1199
|
const diff = summarizeProfileDiff(git, active.profile);
|
|
@@ -1188,6 +1219,7 @@ async function loadOpenPondProfileState() {
|
|
|
1188
1219
|
manifestPath: path5.join(active.repoPath, PROFILE_REPO_MANIFEST),
|
|
1189
1220
|
agents,
|
|
1190
1221
|
skills: skillResult.skills,
|
|
1222
|
+
evals,
|
|
1191
1223
|
git,
|
|
1192
1224
|
catalog: catalogResult.catalog,
|
|
1193
1225
|
skillCatalog: skillResult.skillCatalog,
|
|
@@ -1211,6 +1243,7 @@ async function loadOpenPondProfileState() {
|
|
|
1211
1243
|
manifestPath: path5.join(active.repoPath, PROFILE_REPO_MANIFEST),
|
|
1212
1244
|
agents: [],
|
|
1213
1245
|
skills: [],
|
|
1246
|
+
evals: [],
|
|
1214
1247
|
git,
|
|
1215
1248
|
catalog: emptyProfileCatalogState(errorMessage),
|
|
1216
1249
|
skillCatalog: emptyProfileSkillCatalogState(errorMessage),
|
|
@@ -1228,21 +1261,30 @@ async function loadOpenPondProfileState() {
|
|
|
1228
1261
|
async function requireActiveLocalProfile() {
|
|
1229
1262
|
const config = (await loadGlobalConfig()).openpondProfile;
|
|
1230
1263
|
if (!config) {
|
|
1231
|
-
throw new Error(
|
|
1264
|
+
throw new Error(
|
|
1265
|
+
"No active OpenPond profile. Run `openpond init` or `openpond profile load --path <dir>`."
|
|
1266
|
+
);
|
|
1232
1267
|
}
|
|
1233
1268
|
const state = await loadOpenPondProfileState();
|
|
1234
1269
|
if (state.error) throw new Error(state.error);
|
|
1235
|
-
if (!state.sourcePath)
|
|
1270
|
+
if (!state.sourcePath)
|
|
1271
|
+
throw new Error("Active OpenPond profile has no source path.");
|
|
1236
1272
|
return { config, state };
|
|
1237
1273
|
}
|
|
1238
1274
|
async function runProfileSdkCommand(input) {
|
|
1239
1275
|
const active = await requireActiveLocalProfile();
|
|
1240
1276
|
const requestedRunArgs = input.command === "run" ? input.args ?? [] : [];
|
|
1241
|
-
const selectedAction = input.command === "run" ? active.state.actionCatalog.find(
|
|
1277
|
+
const selectedAction = input.command === "run" ? active.state.actionCatalog.find(
|
|
1278
|
+
(action) => action.id === requestedRunArgs[0]
|
|
1279
|
+
) : null;
|
|
1242
1280
|
const cwd = path5.resolve(
|
|
1243
1281
|
input.cwd ?? selectedAction?.sourcePath ?? active.state.sourcePath
|
|
1244
1282
|
);
|
|
1245
|
-
const runArgs = input.command === "run" ? runCommandArgs(
|
|
1283
|
+
const runArgs = input.command === "run" ? runCommandArgs(
|
|
1284
|
+
cwd,
|
|
1285
|
+
input.args ?? [],
|
|
1286
|
+
selectedAction?.sourceActionId ?? null
|
|
1287
|
+
) : null;
|
|
1246
1288
|
if (input.command === "run" && runArgs) {
|
|
1247
1289
|
const actionId = runArgs[0];
|
|
1248
1290
|
const catalog = path5.resolve(active.state.sourcePath) === cwd ? {
|
|
@@ -1268,7 +1310,9 @@ async function runProfileSdkCommand(input) {
|
|
|
1268
1310
|
await saveProfileCheckStatus(input.command, result.code);
|
|
1269
1311
|
if (result.code !== 0) {
|
|
1270
1312
|
const detail = result.stderr.trim() || result.stdout.trim();
|
|
1271
|
-
throw new Error(
|
|
1313
|
+
throw new Error(
|
|
1314
|
+
detail || `${input.command} failed with exit code ${result.code ?? "unknown"}`
|
|
1315
|
+
);
|
|
1272
1316
|
}
|
|
1273
1317
|
return result;
|
|
1274
1318
|
}
|
|
@@ -1284,7 +1328,9 @@ async function runAgentSdkProjectCommand(input) {
|
|
|
1284
1328
|
});
|
|
1285
1329
|
if (input.throwOnFailure !== false && result.code !== 0) {
|
|
1286
1330
|
const detail = commandFailureDetail(result, input.command);
|
|
1287
|
-
throw new Error(
|
|
1331
|
+
throw new Error(
|
|
1332
|
+
detail || `${input.command} failed with exit code ${result.code ?? "unknown"}`
|
|
1333
|
+
);
|
|
1288
1334
|
}
|
|
1289
1335
|
return result;
|
|
1290
1336
|
}
|
|
@@ -1307,7 +1353,9 @@ async function runProfileCheck(kind) {
|
|
|
1307
1353
|
});
|
|
1308
1354
|
for (const command of checks) {
|
|
1309
1355
|
if (command !== "inspect" && command !== "build" && command !== "validate" && command !== "eval") {
|
|
1310
|
-
throw new Error(
|
|
1356
|
+
throw new Error(
|
|
1357
|
+
"check kind must be one of inspect, build, validate, eval, all"
|
|
1358
|
+
);
|
|
1311
1359
|
}
|
|
1312
1360
|
for (const source of sources) {
|
|
1313
1361
|
await runProfileCheckForSource({
|
|
@@ -1323,8 +1371,10 @@ async function runProfileCheckForSource(input) {
|
|
|
1323
1371
|
const args = input.command === "inspect" || input.command === "validate" || input.command === "eval" ? ["--json"] : [];
|
|
1324
1372
|
if (input.sourceCount > 1) {
|
|
1325
1373
|
const label = path5.relative(input.profileSourcePath, input.source.sourcePath) || ".";
|
|
1326
|
-
console.log(
|
|
1327
|
-
|
|
1374
|
+
console.log(
|
|
1375
|
+
`
|
|
1376
|
+
[profile:${input.source.agentId}] ${input.command} ${label}`
|
|
1377
|
+
);
|
|
1328
1378
|
}
|
|
1329
1379
|
const result = await runAgentSdkProjectCommand({
|
|
1330
1380
|
command: input.command,
|
|
@@ -1407,7 +1457,17 @@ async function ensureProfileSource(profileSourcePath2, template, force) {
|
|
|
1407
1457
|
}
|
|
1408
1458
|
async function ensureProfileScaffoldFiles(repoPath, profileSourcePath2, profile) {
|
|
1409
1459
|
await mkdir(path5.join(repoPath, "profiles"), { recursive: true });
|
|
1410
|
-
for (const dir of [
|
|
1460
|
+
for (const dir of [
|
|
1461
|
+
"agents",
|
|
1462
|
+
"skills",
|
|
1463
|
+
"actions",
|
|
1464
|
+
"extensions",
|
|
1465
|
+
"prompts",
|
|
1466
|
+
"goals",
|
|
1467
|
+
"evals",
|
|
1468
|
+
"settings",
|
|
1469
|
+
"traces"
|
|
1470
|
+
]) {
|
|
1411
1471
|
await mkdir(path5.join(profileSourcePath2, dir), { recursive: true });
|
|
1412
1472
|
}
|
|
1413
1473
|
const profileManifestPath = path5.join(profileSourcePath2, PROFILE_MANIFEST);
|
|
@@ -1428,7 +1488,11 @@ async function ensureProfileScaffoldFiles(repoPath, profileSourcePath2, profile)
|
|
|
1428
1488
|
}
|
|
1429
1489
|
const lockPath = path5.join(profileSourcePath2, "openpond.lock");
|
|
1430
1490
|
if (!existsSync4(lockPath)) {
|
|
1431
|
-
await writeFile2(
|
|
1491
|
+
await writeFile2(
|
|
1492
|
+
lockPath,
|
|
1493
|
+
"# OpenPond profile lockfile placeholder\n",
|
|
1494
|
+
"utf8"
|
|
1495
|
+
);
|
|
1432
1496
|
}
|
|
1433
1497
|
}
|
|
1434
1498
|
async function rewriteTemplateSdkDependency(profileSourcePath2, sdkRoot) {
|
|
@@ -1439,8 +1503,12 @@ async function rewriteTemplateSdkDependency(profileSourcePath2, sdkRoot) {
|
|
|
1439
1503
|
...packageJson.dependencies ?? {},
|
|
1440
1504
|
"openpond-agent-sdk": `file:${sdkRoot}`
|
|
1441
1505
|
};
|
|
1442
|
-
await writeFile2(
|
|
1443
|
-
|
|
1506
|
+
await writeFile2(
|
|
1507
|
+
packageJsonPath,
|
|
1508
|
+
`${JSON.stringify(packageJson, null, 2)}
|
|
1509
|
+
`,
|
|
1510
|
+
"utf8"
|
|
1511
|
+
);
|
|
1444
1512
|
}
|
|
1445
1513
|
async function ensureProfileDependencies(profileSourcePath2) {
|
|
1446
1514
|
if (!existsSync4(path5.join(profileSourcePath2, "package.json"))) return;
|
|
@@ -1459,7 +1527,9 @@ async function ensureAgentSdkBuilt(sdkRoot) {
|
|
|
1459
1527
|
}
|
|
1460
1528
|
const buildScript = path5.join(sdkRoot, "scripts", "build.ts");
|
|
1461
1529
|
if (!existsSync4(buildScript)) {
|
|
1462
|
-
throw new Error(
|
|
1530
|
+
throw new Error(
|
|
1531
|
+
`Resolved openpond-agent-sdk at ${sdkRoot}, but built SDK files are missing.`
|
|
1532
|
+
);
|
|
1463
1533
|
}
|
|
1464
1534
|
const result = await spawnCommand(
|
|
1465
1535
|
process.execPath,
|
|
@@ -1468,7 +1538,9 @@ async function ensureAgentSdkBuilt(sdkRoot) {
|
|
|
1468
1538
|
);
|
|
1469
1539
|
if (result.code !== 0) {
|
|
1470
1540
|
const detail = result.stderr.trim() || result.stdout.trim();
|
|
1471
|
-
throw new Error(
|
|
1541
|
+
throw new Error(
|
|
1542
|
+
detail || `openpond-agent-sdk build failed with exit code ${result.code ?? "unknown"}`
|
|
1543
|
+
);
|
|
1472
1544
|
}
|
|
1473
1545
|
}
|
|
1474
1546
|
async function listProfileAgents(manifest, profile) {
|
|
@@ -1478,25 +1550,72 @@ async function listProfileAgents(manifest, profile) {
|
|
|
1478
1550
|
const enabled = new Set(profileConfig.enabledAgents ?? [defaultAgent]);
|
|
1479
1551
|
return Array.from(enabled).map((id) => ({
|
|
1480
1552
|
id,
|
|
1481
|
-
name: id,
|
|
1553
|
+
name: profileConfig.agentNames?.[id]?.trim() || id,
|
|
1482
1554
|
path: id === DEFAULT_PROFILE_AGENT ? "agent/agent.ts" : `agents/${id}`,
|
|
1483
1555
|
enabled: true
|
|
1484
1556
|
}));
|
|
1485
1557
|
}
|
|
1486
1558
|
function profileCatalogSources(input) {
|
|
1487
1559
|
const defaultAgent = input.manifest.profiles[input.profile]?.defaultAgent ?? DEFAULT_PROFILE_AGENT;
|
|
1488
|
-
const agents = input.agents.length > 0 ? input.agents : [
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1560
|
+
const agents = input.agents.length > 0 ? input.agents : [
|
|
1561
|
+
{
|
|
1562
|
+
id: DEFAULT_PROFILE_AGENT,
|
|
1563
|
+
name: DEFAULT_PROFILE_AGENT,
|
|
1564
|
+
path: "agent/agent.ts",
|
|
1565
|
+
enabled: true
|
|
1566
|
+
}
|
|
1567
|
+
];
|
|
1494
1568
|
return agents.map((agent) => ({
|
|
1495
1569
|
agentId: agent.id,
|
|
1496
1570
|
sourcePath: agent.id === DEFAULT_PROFILE_AGENT ? input.profileSourcePath : path5.join(input.profileSourcePath, "agents", agent.id),
|
|
1497
1571
|
preferred: agent.id === defaultAgent
|
|
1498
1572
|
}));
|
|
1499
1573
|
}
|
|
1574
|
+
async function loadProfileEvals(profileSourcePath2, sources) {
|
|
1575
|
+
const evals = /* @__PURE__ */ new Map();
|
|
1576
|
+
const roots = [
|
|
1577
|
+
{
|
|
1578
|
+
root: path5.join(profileSourcePath2, "evals"),
|
|
1579
|
+
agentId: null
|
|
1580
|
+
},
|
|
1581
|
+
...sources.flatMap((source) => [
|
|
1582
|
+
{
|
|
1583
|
+
root: path5.join(source.sourcePath, "agent", "evals"),
|
|
1584
|
+
agentId: source.agentId
|
|
1585
|
+
},
|
|
1586
|
+
{ root: path5.join(source.sourcePath, "evals"), agentId: source.agentId }
|
|
1587
|
+
])
|
|
1588
|
+
];
|
|
1589
|
+
for (const entry of roots) {
|
|
1590
|
+
for (const sourcePath of await listEvalSourceFiles(entry.root)) {
|
|
1591
|
+
const relativePath = path5.relative(profileSourcePath2, sourcePath).split(path5.sep).join("/");
|
|
1592
|
+
if (evals.has(relativePath)) continue;
|
|
1593
|
+
evals.set(relativePath, {
|
|
1594
|
+
id: relativePath,
|
|
1595
|
+
name: path5.basename(sourcePath).replace(/\.eval\.[^.]+$/i, "").replace(/\.[^.]+$/i, ""),
|
|
1596
|
+
path: relativePath,
|
|
1597
|
+
agentId: entry.agentId,
|
|
1598
|
+
sourcePath
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
return [...evals.values()].sort(
|
|
1603
|
+
(left, right) => left.name.localeCompare(right.name) || left.path.localeCompare(right.path)
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1606
|
+
async function listEvalSourceFiles(root) {
|
|
1607
|
+
if (!existsSync4(root)) return [];
|
|
1608
|
+
const files = [];
|
|
1609
|
+
for (const entry of await readdir2(root, { withFileTypes: true })) {
|
|
1610
|
+
const sourcePath = path5.join(root, entry.name);
|
|
1611
|
+
if (entry.isDirectory()) {
|
|
1612
|
+
files.push(...await listEvalSourceFiles(sourcePath));
|
|
1613
|
+
} else if (entry.isFile() && /\.eval\.(?:[cm]?[jt]sx?)$/i.test(entry.name)) {
|
|
1614
|
+
files.push(sourcePath);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
return files;
|
|
1618
|
+
}
|
|
1500
1619
|
function hostedBindingFromConfig(config) {
|
|
1501
1620
|
const push = config.lastPush;
|
|
1502
1621
|
if (!push) return null;
|
|
@@ -1510,8 +1629,6 @@ function hostedBindingFromConfig(config) {
|
|
|
1510
1629
|
lastPushedHostedHead: push.hostedHead ?? null,
|
|
1511
1630
|
promotionStatus: push.promotionStatus ?? null,
|
|
1512
1631
|
hostedRunStatus: push.hostedRunStatus ?? null,
|
|
1513
|
-
localGoalId: push.localGoalId ?? null,
|
|
1514
|
-
hostedGoalId: push.hostedGoalId ?? null,
|
|
1515
1632
|
hostedRunAgentId: push.hostedRunAgentId ?? null,
|
|
1516
1633
|
hostedRunId: push.hostedRunId ?? null,
|
|
1517
1634
|
hostedRunAt: push.hostedRunAt ?? null,
|
|
@@ -1597,10 +1714,13 @@ function summarizeProfileState(input) {
|
|
|
1597
1714
|
}
|
|
1598
1715
|
function profileCheckStaleReason(input) {
|
|
1599
1716
|
if (input.catalog.error) return `Catalog error: ${input.catalog.error}`;
|
|
1600
|
-
if (input.catalog.stale)
|
|
1717
|
+
if (input.catalog.stale)
|
|
1718
|
+
return "Action catalog artifacts are missing or stale.";
|
|
1601
1719
|
if (!input.lastCheck) return "Profile checks have not run.";
|
|
1602
|
-
if (input.lastCheck.status !== "passed")
|
|
1603
|
-
|
|
1720
|
+
if (input.lastCheck.status !== "passed")
|
|
1721
|
+
return `Last ${input.lastCheck.command} check failed.`;
|
|
1722
|
+
if (!input.lastCheck.sourceHead)
|
|
1723
|
+
return "Last check did not record a source head.";
|
|
1604
1724
|
if (input.git.head && input.lastCheck.sourceHead !== input.git.head) {
|
|
1605
1725
|
return "Profile source changed since the last check.";
|
|
1606
1726
|
}
|
|
@@ -1609,14 +1729,24 @@ function profileCheckStaleReason(input) {
|
|
|
1609
1729
|
}
|
|
1610
1730
|
function profileDirtyMessage(diff) {
|
|
1611
1731
|
const parts = [];
|
|
1612
|
-
if (diff.changedAgents.length > 0)
|
|
1613
|
-
|
|
1614
|
-
if (diff.
|
|
1615
|
-
|
|
1616
|
-
if (diff.
|
|
1617
|
-
|
|
1618
|
-
if (diff.
|
|
1619
|
-
|
|
1732
|
+
if (diff.changedAgents.length > 0)
|
|
1733
|
+
parts.push(`${diff.changedAgents.length} changed agent(s)`);
|
|
1734
|
+
if (diff.newAgents.length > 0)
|
|
1735
|
+
parts.push(`${diff.newAgents.length} new agent(s)`);
|
|
1736
|
+
if (diff.deletedAgents.length > 0)
|
|
1737
|
+
parts.push(`${diff.deletedAgents.length} deleted agent(s)`);
|
|
1738
|
+
if (diff.changedSkills.length > 0)
|
|
1739
|
+
parts.push(`${diff.changedSkills.length} changed skill(s)`);
|
|
1740
|
+
if (diff.changedActions.length > 0)
|
|
1741
|
+
parts.push(`${diff.changedActions.length} changed action(s)`);
|
|
1742
|
+
if (diff.changedExtensions.length > 0)
|
|
1743
|
+
parts.push(`${diff.changedExtensions.length} changed extension(s)`);
|
|
1744
|
+
if (diff.setupChanges.length > 0)
|
|
1745
|
+
parts.push(`${diff.setupChanges.length} setup change(s)`);
|
|
1746
|
+
if (diff.envRequirementChanges.length > 0)
|
|
1747
|
+
parts.push(
|
|
1748
|
+
`${diff.envRequirementChanges.length} env requirement change(s)`
|
|
1749
|
+
);
|
|
1620
1750
|
return parts.length > 0 ? `Profile has ${parts.join(", ")}.` : "Profile has uncommitted source changes.";
|
|
1621
1751
|
}
|
|
1622
1752
|
function summarizeProfileDiff(git, profile) {
|
|
@@ -1647,7 +1777,10 @@ function classifyProfileFileChange(diff, file, relativePath) {
|
|
|
1647
1777
|
} else if (firstSegment === "actions") {
|
|
1648
1778
|
addUnique(diff.changedActions, relativePath.split("/")[1] ?? relativePath);
|
|
1649
1779
|
} else if (firstSegment === "extensions") {
|
|
1650
|
-
addUnique(
|
|
1780
|
+
addUnique(
|
|
1781
|
+
diff.changedExtensions,
|
|
1782
|
+
relativePath.split("/")[1] ?? relativePath
|
|
1783
|
+
);
|
|
1651
1784
|
} else if (firstSegment === "settings" || relativePath === "package.json" || relativePath === "openpond.yaml" || relativePath === "openpond.lock") {
|
|
1652
1785
|
addUnique(diff.setupChanges, relativePath);
|
|
1653
1786
|
}
|
|
@@ -1677,7 +1810,9 @@ function normalizeProfileName(value) {
|
|
|
1677
1810
|
const trimmed = value?.trim();
|
|
1678
1811
|
if (!trimmed) return DEFAULT_LOCAL_PROFILE;
|
|
1679
1812
|
if (!/^[a-zA-Z0-9._-]+$/.test(trimmed)) {
|
|
1680
|
-
throw new Error(
|
|
1813
|
+
throw new Error(
|
|
1814
|
+
"profile name may only contain letters, numbers, dots, underscores, and hyphens"
|
|
1815
|
+
);
|
|
1681
1816
|
}
|
|
1682
1817
|
return trimmed;
|
|
1683
1818
|
}
|
|
@@ -1699,18 +1834,29 @@ async function readProfileManifest(repoPath) {
|
|
|
1699
1834
|
const raw = await readFile4(manifestPath, "utf8");
|
|
1700
1835
|
const parsed = JSON.parse(raw);
|
|
1701
1836
|
if (parsed.schema !== "openpond.profileRepo.v1" || !parsed.profiles || typeof parsed.profiles !== "object") {
|
|
1702
|
-
throw new Error(
|
|
1837
|
+
throw new Error(
|
|
1838
|
+
`${manifestPath} is not an OpenPond profile repo manifest.`
|
|
1839
|
+
);
|
|
1703
1840
|
}
|
|
1704
1841
|
return parsed;
|
|
1705
1842
|
}
|
|
1706
1843
|
async function writeProfileManifest(repoPath, manifest) {
|
|
1707
|
-
await writeFile2(
|
|
1708
|
-
|
|
1844
|
+
await writeFile2(
|
|
1845
|
+
path5.join(repoPath, PROFILE_REPO_MANIFEST),
|
|
1846
|
+
`${JSON.stringify(manifest, null, 2)}
|
|
1847
|
+
`,
|
|
1848
|
+
"utf8"
|
|
1849
|
+
);
|
|
1709
1850
|
}
|
|
1710
1851
|
function profileSourcePath(manifest, repoPath, profile) {
|
|
1711
1852
|
const profileConfig = manifest.profiles[profile];
|
|
1712
1853
|
if (!profileConfig) {
|
|
1713
|
-
throw new Error(
|
|
1854
|
+
throw new Error(
|
|
1855
|
+
`Profile "${profile}" was not found in ${path5.join(
|
|
1856
|
+
repoPath,
|
|
1857
|
+
PROFILE_REPO_MANIFEST
|
|
1858
|
+
)}.`
|
|
1859
|
+
);
|
|
1714
1860
|
}
|
|
1715
1861
|
const sourcePath = path5.resolve(repoPath, profileConfig.path);
|
|
1716
1862
|
if (!existsSync4(sourcePath)) {
|
|
@@ -1725,15 +1871,21 @@ function resolveAgentSdkRoot() {
|
|
|
1725
1871
|
function resolveAgentSdkCliLaunch() {
|
|
1726
1872
|
const sdkRoot = resolveAgentSdkRoot();
|
|
1727
1873
|
const distCli = path5.join(sdkRoot, "dist", "cli.js");
|
|
1728
|
-
if (existsSync4(distCli))
|
|
1874
|
+
if (existsSync4(distCli))
|
|
1875
|
+
return { command: process.execPath, args: [distCli] };
|
|
1729
1876
|
const sourceCli = path5.join(sdkRoot, "src", "cli.ts");
|
|
1730
1877
|
if (existsSync4(sourceCli)) {
|
|
1731
|
-
return {
|
|
1878
|
+
return {
|
|
1879
|
+
command: process.execPath,
|
|
1880
|
+
args: [resolveTsxCli(sdkRoot), sourceCli]
|
|
1881
|
+
};
|
|
1732
1882
|
}
|
|
1733
1883
|
throw new Error(`openpond-agent CLI was not found under ${sdkRoot}`);
|
|
1734
1884
|
}
|
|
1735
1885
|
function resolveTsxCli(packageRoot) {
|
|
1736
|
-
return createRequire(path5.join(packageRoot, "package.json")).resolve(
|
|
1886
|
+
return createRequire(path5.join(packageRoot, "package.json")).resolve(
|
|
1887
|
+
"tsx/cli"
|
|
1888
|
+
);
|
|
1737
1889
|
}
|
|
1738
1890
|
async function spawnCommand(command, args, options = {}) {
|
|
1739
1891
|
return new Promise((resolve, reject) => {
|
|
@@ -1757,12 +1909,22 @@ async function spawnCommand(command, args, options = {}) {
|
|
|
1757
1909
|
}, timeoutMs + 5e3) : null;
|
|
1758
1910
|
if (!options.inherit) {
|
|
1759
1911
|
proc.stdout?.on("data", (chunk) => {
|
|
1760
|
-
const next = appendBoundedOutput(
|
|
1912
|
+
const next = appendBoundedOutput(
|
|
1913
|
+
stdout,
|
|
1914
|
+
String(chunk),
|
|
1915
|
+
maxOutputBytes,
|
|
1916
|
+
stdoutTruncated
|
|
1917
|
+
);
|
|
1761
1918
|
stdout = next.text;
|
|
1762
1919
|
stdoutTruncated = next.truncated;
|
|
1763
1920
|
});
|
|
1764
1921
|
proc.stderr?.on("data", (chunk) => {
|
|
1765
|
-
const next = appendBoundedOutput(
|
|
1922
|
+
const next = appendBoundedOutput(
|
|
1923
|
+
stderr,
|
|
1924
|
+
String(chunk),
|
|
1925
|
+
maxOutputBytes,
|
|
1926
|
+
stderrTruncated
|
|
1927
|
+
);
|
|
1766
1928
|
stderr = next.text;
|
|
1767
1929
|
stderrTruncated = next.truncated;
|
|
1768
1930
|
});
|
|
@@ -1777,7 +1939,14 @@ async function spawnCommand(command, args, options = {}) {
|
|
|
1777
1939
|
});
|
|
1778
1940
|
proc.on("close", (code) => {
|
|
1779
1941
|
clearTimers();
|
|
1780
|
-
resolve({
|
|
1942
|
+
resolve({
|
|
1943
|
+
code,
|
|
1944
|
+
stdout,
|
|
1945
|
+
stderr,
|
|
1946
|
+
timedOut,
|
|
1947
|
+
stdoutTruncated,
|
|
1948
|
+
stderrTruncated
|
|
1949
|
+
});
|
|
1781
1950
|
});
|
|
1782
1951
|
});
|
|
1783
1952
|
}
|