openpond 0.0.57 → 0.0.59
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/{actions-command-YY7UH37B.js → actions-command-BNVIILSL.js} +40 -1
- package/dist/chunks/{app-layer-EZQWXB3S.js → app-layer-RNQXXM6L.js} +5 -4
- package/dist/chunks/{app-server-runtime-JMEHVOFO.js → app-server-runtime-YCKU23ON.js} +6 -6
- package/dist/chunks/{apps-HHQF6TNR.js → apps-LV3CSMLT.js} +5 -4
- package/dist/chunks/{chunk-7JUIWABV.js → chunk-2E6OPEM5.js} +2 -2
- package/dist/chunks/{chunk-OJ34YA7E.js → chunk-2J3LG4U7.js} +2 -2
- package/dist/chunks/{chunk-XHTO6KF2.js → chunk-3PKCT4JC.js} +1 -1
- package/dist/chunks/{chunk-3HW6OSHP.js → chunk-63N6442Q.js} +1 -1
- package/dist/chunks/{chunk-42GGG3W4.js → chunk-7QLVLGDM.js} +1 -1
- package/dist/chunks/{chunk-KHNHUA2H.js → chunk-DXSHQ6TO.js} +111 -1
- package/dist/chunks/{chunk-XX6KALN2.js → chunk-EWS67RLV.js} +136 -65
- package/dist/chunks/{chunk-FCVVOMIP.js → chunk-FHP7OMEI.js} +3 -31
- package/dist/chunks/{chunk-MIZHCABO.js → chunk-I23UKEYS.js} +1 -1
- package/dist/chunks/{chunk-UBHCG2NE.js → chunk-LMQ4MPQI.js} +2 -2
- package/dist/chunks/{chunk-5ZLFZZLS.js → chunk-PVGJXCAK.js} +1 -1
- package/dist/chunks/{chunk-5Y7Q6ZSH.js → chunk-QNYFZ4I5.js} +1 -1
- package/dist/chunks/{chunk-5QJGC2QI.js → chunk-RC3N77IV.js} +39 -33
- package/dist/chunks/chunk-SKUS4NPW.js +633 -0
- package/dist/chunks/{cli-EUZHWEJR.js → cli-V4VB2VBY.js} +5 -5
- package/dist/chunks/{core-commands-RI4B7TYM.js → core-commands-H2UC3LHG.js} +6 -5
- package/dist/chunks/{desktop-test-DRTCQWDV.js → desktop-test-TV64EY5A.js} +5 -4
- package/dist/chunks/{help-UILXBPHG.js → help-NEYFMHWQ.js} +1 -1
- package/dist/chunks/{opchat-SSK54JSR.js → opchat-ZL5JJQ5L.js} +5 -4
- package/dist/chunks/{organizations-G5S2HJLT.js → organizations-4IEC35QB.js} +7 -6
- package/dist/chunks/{profile-YD7NYL3U.js → profile-EVASCDIN.js} +6 -5
- package/dist/chunks/{project-agent-75PAFL6B.js → project-agent-DMN64RZJ.js} +6 -5
- package/dist/chunks/{sandbox-command-FGUJDDXR.js → sandbox-command-WKGVO32R.js} +6 -5
- package/dist/chunks/{sandbox-template-PBSIPCVO.js → sandbox-template-BJUS4KJM.js} +7 -6
- package/dist/chunks/{src-P7YLMEEK.js → src-2AX2MUD4.js} +133 -59
- package/dist/chunks/{src-FTG6DVBK.js → src-KLQEJ6RO.js} +22 -4
- package/dist/chunks/{teams-bot-NSYWELB6.js → teams-bot-HUXYJ6XA.js} +5 -4
- package/dist/chunks/{workspaces-R3EVRSWA.js → workspaces-FPIBAG7G.js} +2 -2
- package/dist/cli.js +13 -13
- package/docs/command-reference.md +7 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
truncatePatch,
|
|
12
12
|
uniqueSortedPaths,
|
|
13
13
|
workspaceImageContentType
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QNYFZ4I5.js";
|
|
15
15
|
import {
|
|
16
16
|
AGENT_PROTOCOL_VERSION,
|
|
17
17
|
AGENT_RPC_METHODS,
|
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
event,
|
|
36
36
|
now,
|
|
37
37
|
textFromUnknown
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-3PKCT4JC.js";
|
|
39
39
|
import {
|
|
40
40
|
getBundledRuntimeVersion,
|
|
41
41
|
loadOpenPondAccountContext,
|
|
42
42
|
loadOpenPondHostedModels,
|
|
43
43
|
streamOpenPondHostedChatTurn
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-LMQ4MPQI.js";
|
|
45
45
|
import {
|
|
46
46
|
AppPreferencesSchema,
|
|
47
47
|
ApplyCreateImproveRunActionRequestSchema,
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
runAgentSdkProjectCommand,
|
|
159
159
|
runProfileSkillCommand,
|
|
160
160
|
sidebarFileBookmarkId
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-PVGJXCAK.js";
|
|
162
162
|
import {
|
|
163
163
|
AgentSnapshotSchema,
|
|
164
164
|
AttemptReceiptSchema,
|
|
@@ -246,7 +246,7 @@ import {
|
|
|
246
246
|
createOpenPondSandboxClient,
|
|
247
247
|
normalizeSandboxApiUrl,
|
|
248
248
|
withVercelProtectionBypass
|
|
249
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
250
250
|
import {
|
|
251
251
|
__commonJS,
|
|
252
252
|
__toESM
|
|
@@ -26784,6 +26784,66 @@ function collectJsonStrings(value, output, depth = 0) {
|
|
|
26784
26784
|
}
|
|
26785
26785
|
}
|
|
26786
26786
|
|
|
26787
|
+
// ../server/src/project-actions/hosted-project-action-model-tool.ts
|
|
26788
|
+
async function executeHostedProjectActionModelTool(input) {
|
|
26789
|
+
const { action, context, implementation, resultToolName } = input;
|
|
26790
|
+
if (!input.executeProjectAction) {
|
|
26791
|
+
return failedResult(context.callId, resultToolName, `Action ${action.id} is a hosted Project Action, but hosted action execution is not configured.`);
|
|
26792
|
+
}
|
|
26793
|
+
const projectId = stringValue7(implementation.projectId);
|
|
26794
|
+
const teamId = stringValue7(implementation.teamId);
|
|
26795
|
+
const releaseId = stringValue7(implementation.releaseId);
|
|
26796
|
+
const projectActionId = stringValue7(implementation.actionId) ?? action.id;
|
|
26797
|
+
if (!projectId || !teamId || !releaseId) {
|
|
26798
|
+
return failedResult(context.callId, resultToolName, `Action ${action.id} is missing its hosted Project Action release binding.`);
|
|
26799
|
+
}
|
|
26800
|
+
if (input.requestedProjectId && input.requestedProjectId !== projectId) {
|
|
26801
|
+
return failedResult(context.callId, resultToolName, `Project ${input.requestedProjectId} is not authorized for action ${action.id}.`);
|
|
26802
|
+
}
|
|
26803
|
+
const result = await input.executeProjectAction({
|
|
26804
|
+
action: projectActionId,
|
|
26805
|
+
input: input.actionInput,
|
|
26806
|
+
metadata: {
|
|
26807
|
+
source: "openpond_hosted_project_action",
|
|
26808
|
+
execution: "hosted",
|
|
26809
|
+
projectId,
|
|
26810
|
+
teamId,
|
|
26811
|
+
releaseId,
|
|
26812
|
+
selectedActionId: projectActionId,
|
|
26813
|
+
selectedActionLabel: action.label ?? action.name ?? projectActionId,
|
|
26814
|
+
selectedBy: "native_model_tool",
|
|
26815
|
+
displayPrompt: context.userPrompt,
|
|
26816
|
+
sessionId: context.session.id,
|
|
26817
|
+
turnId: context.turnId,
|
|
26818
|
+
toolCallId: context.callId
|
|
26819
|
+
}
|
|
26820
|
+
});
|
|
26821
|
+
return {
|
|
26822
|
+
toolCallId: context.callId,
|
|
26823
|
+
name: resultToolName,
|
|
26824
|
+
ok: true,
|
|
26825
|
+
contentText: JSON.stringify({
|
|
26826
|
+
ok: true,
|
|
26827
|
+
action: resultToolName,
|
|
26828
|
+
output: `Ran hosted Project Action ${projectActionId}.`,
|
|
26829
|
+
data: { result }
|
|
26830
|
+
}, null, 2),
|
|
26831
|
+
data: { result }
|
|
26832
|
+
};
|
|
26833
|
+
}
|
|
26834
|
+
function failedResult(callId, name, error) {
|
|
26835
|
+
return {
|
|
26836
|
+
toolCallId: callId,
|
|
26837
|
+
name,
|
|
26838
|
+
ok: false,
|
|
26839
|
+
contentText: JSON.stringify({ ok: false, action: name, error }, null, 2),
|
|
26840
|
+
data: { error }
|
|
26841
|
+
};
|
|
26842
|
+
}
|
|
26843
|
+
function stringValue7(value) {
|
|
26844
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
26845
|
+
}
|
|
26846
|
+
|
|
26787
26847
|
// ../server/src/openpond/model-tool-registry.ts
|
|
26788
26848
|
function enabledModelToolDefinitions(definitions, context) {
|
|
26789
26849
|
return definitions.filter((definition) => definition.enabled?.(context) ?? true);
|
|
@@ -27738,8 +27798,8 @@ function createOpenPondActionModelToolDefinitions(deps) {
|
|
|
27738
27798
|
resultToolName: "openpond_action_run",
|
|
27739
27799
|
compactProfileResultForModel: true,
|
|
27740
27800
|
input: asRecord7(context.args.input) ?? {},
|
|
27741
|
-
requestedProjectId:
|
|
27742
|
-
requestedAgentId:
|
|
27801
|
+
requestedProjectId: stringValue8(context.args.projectId) ?? void 0,
|
|
27802
|
+
requestedAgentId: stringValue8(context.args.agentId) ?? void 0
|
|
27743
27803
|
});
|
|
27744
27804
|
}
|
|
27745
27805
|
}
|
|
@@ -27752,7 +27812,7 @@ function directOpenPondActionToolName(action) {
|
|
|
27752
27812
|
return `agent_${slug}_${suffix}`;
|
|
27753
27813
|
}
|
|
27754
27814
|
function directOpenPondActionAliasName(action) {
|
|
27755
|
-
const name =
|
|
27815
|
+
const name = stringValue8(asRecord7(action.implementation)?.actionId) ?? action.sourceActionId ?? action.name ?? action.id;
|
|
27756
27816
|
return /^[A-Za-z0-9_-]{1,64}$/.test(name) ? name : null;
|
|
27757
27817
|
}
|
|
27758
27818
|
function actionInputSchema(action) {
|
|
@@ -27783,8 +27843,8 @@ async function executeScopedOpenPondAction(input) {
|
|
|
27783
27843
|
`Action ${action.id} is a profile action, but profile action execution is not configured.`
|
|
27784
27844
|
);
|
|
27785
27845
|
}
|
|
27786
|
-
const profileActionId =
|
|
27787
|
-
const prompt =
|
|
27846
|
+
const profileActionId = stringValue8(implementation.actionId) ?? action.id;
|
|
27847
|
+
const prompt = stringValue8(input.input.prompt) ?? stringValue8(input.input.message) ?? context.userPrompt;
|
|
27788
27848
|
const result2 = await deps.executeProfileAction({
|
|
27789
27849
|
action: profileActionId,
|
|
27790
27850
|
input: {
|
|
@@ -27836,9 +27896,9 @@ async function executeScopedOpenPondAction(input) {
|
|
|
27836
27896
|
`Action ${action.id} is a local Project Action, but local action execution is not configured.`
|
|
27837
27897
|
);
|
|
27838
27898
|
}
|
|
27839
|
-
const projectRoot =
|
|
27840
|
-
const projectId =
|
|
27841
|
-
const projectActionId =
|
|
27899
|
+
const projectRoot = stringValue8(implementation.projectRoot) ?? action.sourcePath;
|
|
27900
|
+
const projectId = stringValue8(implementation.projectId);
|
|
27901
|
+
const projectActionId = stringValue8(implementation.actionId) ?? action.id;
|
|
27842
27902
|
if (!projectRoot) {
|
|
27843
27903
|
return failedActionToolResult(
|
|
27844
27904
|
context.callId,
|
|
@@ -27886,11 +27946,22 @@ async function executeScopedOpenPondAction(input) {
|
|
|
27886
27946
|
data: { result: result2 }
|
|
27887
27947
|
};
|
|
27888
27948
|
}
|
|
27949
|
+
if (implementation?.type === "openpond-hosted-project-action") {
|
|
27950
|
+
return executeHostedProjectActionModelTool({
|
|
27951
|
+
action,
|
|
27952
|
+
context,
|
|
27953
|
+
implementation,
|
|
27954
|
+
actionInput: input.input,
|
|
27955
|
+
requestedProjectId: input.requestedProjectId,
|
|
27956
|
+
resultToolName,
|
|
27957
|
+
executeProjectAction: deps.executeProjectAction
|
|
27958
|
+
});
|
|
27959
|
+
}
|
|
27889
27960
|
const payloadArgs = {
|
|
27890
27961
|
actionName: action.sourceActionId ?? action.name ?? action.id,
|
|
27891
27962
|
input: input.input
|
|
27892
27963
|
};
|
|
27893
|
-
const allowedProjectId =
|
|
27964
|
+
const allowedProjectId = stringValue8(implementation?.projectId);
|
|
27894
27965
|
if (input.requestedProjectId) {
|
|
27895
27966
|
if (!allowedProjectId || input.requestedProjectId !== allowedProjectId) {
|
|
27896
27967
|
return failedActionToolResult(
|
|
@@ -27903,7 +27974,7 @@ async function executeScopedOpenPondAction(input) {
|
|
|
27903
27974
|
} else if (allowedProjectId) {
|
|
27904
27975
|
payloadArgs.projectId = allowedProjectId;
|
|
27905
27976
|
}
|
|
27906
|
-
const allowedAgentId = action.agentId ??
|
|
27977
|
+
const allowedAgentId = action.agentId ?? stringValue8(implementation?.agentId);
|
|
27907
27978
|
if (input.requestedAgentId) {
|
|
27908
27979
|
if (!allowedAgentId || input.requestedAgentId !== allowedAgentId) {
|
|
27909
27980
|
return failedActionToolResult(
|
|
@@ -27932,7 +28003,7 @@ async function executeScopedOpenPondAction(input) {
|
|
|
27932
28003
|
}
|
|
27933
28004
|
function compactProfileActionResult(value) {
|
|
27934
28005
|
const execution = asRecord7(value);
|
|
27935
|
-
const stdout =
|
|
28006
|
+
const stdout = stringValue8(execution?.stdout);
|
|
27936
28007
|
if (!stdout) return value;
|
|
27937
28008
|
let payload;
|
|
27938
28009
|
try {
|
|
@@ -27946,7 +28017,7 @@ function compactProfileActionResult(value) {
|
|
|
27946
28017
|
for (const key of ["snapshot", "decision", "submission", "receipt"]) {
|
|
27947
28018
|
if (metadata && Object.hasOwn(metadata, key)) return metadata[key];
|
|
27948
28019
|
}
|
|
27949
|
-
const text =
|
|
28020
|
+
const text = stringValue8(actionResultRecord?.text);
|
|
27950
28021
|
if (text) {
|
|
27951
28022
|
try {
|
|
27952
28023
|
return JSON.parse(text);
|
|
@@ -28208,23 +28279,23 @@ function gitChangedFileRefs(value, sandboxMode = false) {
|
|
|
28208
28279
|
const record9 = asRecord7(value);
|
|
28209
28280
|
const status = asRecord7(record9?.status);
|
|
28210
28281
|
const files = Array.isArray(record9?.files) ? record9.files : Array.isArray(status?.files) ? status.files : [];
|
|
28211
|
-
return files.filter((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item)).map((item) =>
|
|
28282
|
+
return files.filter((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item)).map((item) => stringValue8(item.path)).filter((item) => Boolean(item)).map((filePath) => `${sandboxMode ? "sandbox" : "workspace"}:file:${filePath}`);
|
|
28212
28283
|
}
|
|
28213
28284
|
function gitDiffText(value) {
|
|
28214
28285
|
const record9 = asRecord7(value);
|
|
28215
|
-
return
|
|
28286
|
+
return stringValue8(record9?.diff) ?? stringValue8(asRecord7(record9?.result)?.diff);
|
|
28216
28287
|
}
|
|
28217
28288
|
function sandboxPathItems(value) {
|
|
28218
28289
|
const records = nestedArraysForKeys(value, ["matches", "files", "entries"]);
|
|
28219
28290
|
const items = [];
|
|
28220
28291
|
for (const record9 of records) {
|
|
28221
|
-
const path48 =
|
|
28292
|
+
const path48 = stringValue8(record9.path) ?? stringValue8(record9.name);
|
|
28222
28293
|
if (!path48) continue;
|
|
28223
28294
|
items.push({
|
|
28224
28295
|
path: path48,
|
|
28225
|
-
snippet:
|
|
28296
|
+
snippet: stringValue8(record9.text) ?? stringValue8(record9.snippet) ?? stringValue8(record9.content) ?? void 0,
|
|
28226
28297
|
line: typeof record9.line === "number" ? record9.line : null,
|
|
28227
|
-
kind:
|
|
28298
|
+
kind: stringValue8(record9.kind) ?? stringValue8(record9.type)
|
|
28228
28299
|
});
|
|
28229
28300
|
}
|
|
28230
28301
|
return items;
|
|
@@ -28249,15 +28320,15 @@ function nestedArraysForKeys(value, keys) {
|
|
|
28249
28320
|
function sandboxFileContent(value) {
|
|
28250
28321
|
const record9 = asRecord7(value);
|
|
28251
28322
|
const file = sandboxFileRecord(value);
|
|
28252
|
-
const encoded =
|
|
28253
|
-
if (encoded && !sandboxFileMetadata(value,
|
|
28323
|
+
const encoded = stringValue8(file?.contentsBase64) ?? stringValue8(record9?.contentsBase64);
|
|
28324
|
+
if (encoded && !sandboxFileMetadata(value, stringValue8(file?.path) ?? "").binary) {
|
|
28254
28325
|
try {
|
|
28255
28326
|
return Buffer.from(encoded, "base64").toString("utf8");
|
|
28256
28327
|
} catch {
|
|
28257
28328
|
return null;
|
|
28258
28329
|
}
|
|
28259
28330
|
}
|
|
28260
|
-
return
|
|
28331
|
+
return stringValue8(record9?.content) ?? stringValue8(record9?.text) ?? stringValue8(record9?.contents) ?? stringValue8(file?.content) ?? stringValue8(file?.text);
|
|
28261
28332
|
}
|
|
28262
28333
|
function contentTypeForResourcePath(value) {
|
|
28263
28334
|
const lower = value.toLowerCase();
|
|
@@ -28272,7 +28343,7 @@ function sandboxFileRecord(value) {
|
|
|
28272
28343
|
}
|
|
28273
28344
|
function sandboxFileMetadata(value, resourcePath) {
|
|
28274
28345
|
const file = sandboxFileRecord(value);
|
|
28275
|
-
const contentType =
|
|
28346
|
+
const contentType = stringValue8(file?.contentType) ?? stringValue8(file?.mimeType) ?? contentTypeForResourcePath(resourcePath);
|
|
28276
28347
|
const sizeBytes = numberValue3(file?.sizeBytes) ?? numberValue3(file?.size);
|
|
28277
28348
|
const binary = file?.binary === true || file?.isBinary === true || (contentType ? isBinaryContentType(contentType) : isLikelyBinaryResourcePath(resourcePath));
|
|
28278
28349
|
return { binary, contentType, ...sizeBytes !== null ? { sizeBytes } : {} };
|
|
@@ -28358,8 +28429,8 @@ function actionCatalogItemForModel(action) {
|
|
|
28358
28429
|
directRunAllowed,
|
|
28359
28430
|
inputSchema: action.inputSchema ?? null,
|
|
28360
28431
|
outputSchema: action.outputSchema ?? null,
|
|
28361
|
-
agentId: action.agentId ??
|
|
28362
|
-
projectId:
|
|
28432
|
+
agentId: action.agentId ?? stringValue8(implementation?.agentId),
|
|
28433
|
+
projectId: stringValue8(implementation?.projectId),
|
|
28363
28434
|
sourceActionId: action.sourceActionId ?? null
|
|
28364
28435
|
};
|
|
28365
28436
|
}
|
|
@@ -28382,7 +28453,7 @@ function failedActionToolResult(callId, name, message) {
|
|
|
28382
28453
|
function asRecord7(value) {
|
|
28383
28454
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
28384
28455
|
}
|
|
28385
|
-
function
|
|
28456
|
+
function stringValue8(value) {
|
|
28386
28457
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
28387
28458
|
}
|
|
28388
28459
|
function numberValue3(value) {
|
|
@@ -33549,7 +33620,7 @@ function redactConnectedAppToolArguments(toolName, args) {
|
|
|
33549
33620
|
return redacted && typeof redacted === "object" && !Array.isArray(redacted) ? redacted : {};
|
|
33550
33621
|
}
|
|
33551
33622
|
async function executeConnectedAppToolDefinition(input) {
|
|
33552
|
-
const provider = normalizeConnectedAppProviderFamilyId(
|
|
33623
|
+
const provider = normalizeConnectedAppProviderFamilyId(stringValue9(input.context.args.provider));
|
|
33553
33624
|
if (!provider) {
|
|
33554
33625
|
return connectedAppToolFailure(input.context.callId, input.toolName, "Connected app provider is required.");
|
|
33555
33626
|
}
|
|
@@ -33589,7 +33660,7 @@ async function executeConnectedAppToolDefinition(input) {
|
|
|
33589
33660
|
}
|
|
33590
33661
|
);
|
|
33591
33662
|
}
|
|
33592
|
-
if (input.operation === "write" && !
|
|
33663
|
+
if (input.operation === "write" && !stringValue9(input.context.args.explicitUserIntent)) {
|
|
33593
33664
|
return connectedAppToolFailure(
|
|
33594
33665
|
input.context.callId,
|
|
33595
33666
|
input.toolName,
|
|
@@ -33681,7 +33752,7 @@ async function executeConnectedAppToolDefinition(input) {
|
|
|
33681
33752
|
function inferredProviderOperationCapabilityIds(input) {
|
|
33682
33753
|
const providerOperation = connectedAppProviderOperationById(
|
|
33683
33754
|
input.provider,
|
|
33684
|
-
|
|
33755
|
+
stringValue9(input.args.operation)
|
|
33685
33756
|
);
|
|
33686
33757
|
if (!providerOperation || providerOperation.operation !== input.operation) return null;
|
|
33687
33758
|
return providerOperation.capabilityIds;
|
|
@@ -33698,8 +33769,8 @@ function connectedAppProviderErrorSummary(data) {
|
|
|
33698
33769
|
const result = isRecord5(record9.result) ? record9.result : null;
|
|
33699
33770
|
const metadata = isRecord5(record9.metadata) ? record9.metadata : null;
|
|
33700
33771
|
const httpStatus = numberValue4(metadata?.httpStatus) ?? numberValue4(result?.status);
|
|
33701
|
-
const title =
|
|
33702
|
-
const detail =
|
|
33772
|
+
const title = stringValue9(result?.title);
|
|
33773
|
+
const detail = stringValue9(result?.detail);
|
|
33703
33774
|
if (!httpStatus && !title && !detail) return null;
|
|
33704
33775
|
const statusText = httpStatus ? `Provider returned HTTP ${httpStatus}` : "Provider returned an error";
|
|
33705
33776
|
const titleText = title ? ` ${title}` : "";
|
|
@@ -33777,7 +33848,7 @@ function dedupeContexts(contexts) {
|
|
|
33777
33848
|
}
|
|
33778
33849
|
return [...byProvider.values()];
|
|
33779
33850
|
}
|
|
33780
|
-
function
|
|
33851
|
+
function stringValue9(value) {
|
|
33781
33852
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
33782
33853
|
}
|
|
33783
33854
|
function numberValue4(value) {
|
|
@@ -39202,7 +39273,7 @@ async function assertGeneratedSdkArtifacts(target, requireEvalPass = true) {
|
|
|
39202
39273
|
);
|
|
39203
39274
|
}
|
|
39204
39275
|
const missingMetadata = actions.filter(
|
|
39205
|
-
(action) => typeof action.id === "string" && (!
|
|
39276
|
+
(action) => typeof action.id === "string" && (!stringValue10(action.label) || !stringValue10(action.description) || typeof action.timeoutSeconds !== "number")
|
|
39206
39277
|
);
|
|
39207
39278
|
if (missingMetadata.length > 0) {
|
|
39208
39279
|
throw new Error(
|
|
@@ -39212,7 +39283,7 @@ async function assertGeneratedSdkArtifacts(target, requireEvalPass = true) {
|
|
|
39212
39283
|
const setupGate = buildOpenPondProfileSetupGate({
|
|
39213
39284
|
actionCatalog: actions.filter((action) => typeof action.id === "string").map((action) => ({
|
|
39214
39285
|
id: action.id,
|
|
39215
|
-
name:
|
|
39286
|
+
name: stringValue10(action.name),
|
|
39216
39287
|
setupRequirements: recordArray(action.setupRequirements) ?? []
|
|
39217
39288
|
})),
|
|
39218
39289
|
actionId: target.defaultAction
|
|
@@ -39254,7 +39325,7 @@ function recordArray(value) {
|
|
|
39254
39325
|
}
|
|
39255
39326
|
function traceRefFromCommandResult(value) {
|
|
39256
39327
|
const record9 = asRecord13(value);
|
|
39257
|
-
const ref =
|
|
39328
|
+
const ref = stringValue10(record9?.traceArtifactRef);
|
|
39258
39329
|
return ref?.startsWith(".openpond/") ? ref : null;
|
|
39259
39330
|
}
|
|
39260
39331
|
function summaryFromCommandResult(commandName, value) {
|
|
@@ -39285,7 +39356,7 @@ function summaryFromCommandResult(commandName, value) {
|
|
|
39285
39356
|
}
|
|
39286
39357
|
return null;
|
|
39287
39358
|
}
|
|
39288
|
-
function
|
|
39359
|
+
function stringValue10(value) {
|
|
39289
39360
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
39290
39361
|
}
|
|
39291
39362
|
|
|
@@ -40077,7 +40148,7 @@ async function executeAgentTasksetEvaluation(input) {
|
|
|
40077
40148
|
task.id,
|
|
40078
40149
|
0
|
|
40079
40150
|
]).slice(0, 24)}`;
|
|
40080
|
-
const traceRef =
|
|
40151
|
+
const traceRef = stringValue11(parsed?.traceArtifactRef);
|
|
40081
40152
|
const attempt = TaskAttemptResultSchema.parse({
|
|
40082
40153
|
schemaVersion: "openpond.taskAttempt.v1",
|
|
40083
40154
|
id: attemptId,
|
|
@@ -40147,7 +40218,7 @@ function parseAgentRunPayload(stdout) {
|
|
|
40147
40218
|
function recordValue(value) {
|
|
40148
40219
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
40149
40220
|
}
|
|
40150
|
-
function
|
|
40221
|
+
function stringValue11(value) {
|
|
40151
40222
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
40152
40223
|
}
|
|
40153
40224
|
|
|
@@ -40165,12 +40236,12 @@ async function runNormalizedAgentEvaluation(input) {
|
|
|
40165
40236
|
const failed = numberValue6(payload.summary?.failed) ?? Math.max(0, total - passed);
|
|
40166
40237
|
const publishGate = payload.publishGate?.status === "passed" ? "passed" : "failed";
|
|
40167
40238
|
const results = Array.isArray(payload.results) ? payload.results : [];
|
|
40168
|
-
const sdkEvalRefs = results.map((evaluation) =>
|
|
40239
|
+
const sdkEvalRefs = results.map((evaluation) => stringValue12(evaluation.name)).filter((value) => Boolean(value));
|
|
40169
40240
|
const artifactRefs = /* @__PURE__ */ new Set([
|
|
40170
40241
|
path40.posix.join(input.sourceRef, ".openpond/eval-results.json")
|
|
40171
40242
|
]);
|
|
40172
40243
|
for (const evaluation of results) {
|
|
40173
|
-
const trace =
|
|
40244
|
+
const trace = stringValue12(evaluation.traceArtifactRef);
|
|
40174
40245
|
if (trace)
|
|
40175
40246
|
artifactRefs.add(path40.posix.join(input.sourceRef, normalizeRef(trace)));
|
|
40176
40247
|
for (const artifact of stringArray4(evaluation.artifacts)) {
|
|
@@ -40224,15 +40295,15 @@ async function runNormalizedAgentEvaluation(input) {
|
|
|
40224
40295
|
summary: `${input.subject === "active" ? "Active" : input.subject === "candidate" ? "Candidate" : "Post-release"} Agent SDK and Taskset Evals: ${combinedPassed}/${combinedTotal} passed${combinedPublishGate === "failed" ? "; publish gate failed" : ""}.`,
|
|
40225
40296
|
createdAt: timestamp,
|
|
40226
40297
|
metadata: {
|
|
40227
|
-
schemaVersion:
|
|
40228
|
-
schema:
|
|
40298
|
+
schemaVersion: stringValue12(payload.schemaVersion),
|
|
40299
|
+
schema: stringValue12(payload.schema),
|
|
40229
40300
|
project: {
|
|
40230
|
-
name:
|
|
40231
|
-
version:
|
|
40301
|
+
name: stringValue12(payload.project?.name),
|
|
40302
|
+
version: stringValue12(payload.project?.version)
|
|
40232
40303
|
},
|
|
40233
40304
|
source: {
|
|
40234
|
-
configPath:
|
|
40235
|
-
configHash:
|
|
40305
|
+
configPath: stringValue12(payload.source?.configPath),
|
|
40306
|
+
configHash: stringValue12(payload.source?.configHash)
|
|
40236
40307
|
},
|
|
40237
40308
|
publishGate: {
|
|
40238
40309
|
total: numberValue6(payload.publishGate?.total),
|
|
@@ -40250,10 +40321,10 @@ async function runNormalizedAgentEvaluation(input) {
|
|
|
40250
40321
|
executionContractHash: tasksetExecution?.executionContractHash ?? null,
|
|
40251
40322
|
gradeRefs: tasksetExecution?.gradeRefs ?? [],
|
|
40252
40323
|
results: results.map((evaluation) => ({
|
|
40253
|
-
name:
|
|
40254
|
-
status:
|
|
40255
|
-
error:
|
|
40256
|
-
traceArtifactRef:
|
|
40324
|
+
name: stringValue12(evaluation.name),
|
|
40325
|
+
status: stringValue12(evaluation.status),
|
|
40326
|
+
error: stringValue12(evaluation.error),
|
|
40327
|
+
traceArtifactRef: stringValue12(evaluation.traceArtifactRef)
|
|
40257
40328
|
}))
|
|
40258
40329
|
}
|
|
40259
40330
|
};
|
|
@@ -40292,14 +40363,14 @@ function parseAgentEvalPayload(stdout) {
|
|
|
40292
40363
|
function normalizeRef(value) {
|
|
40293
40364
|
return value.replace(/^\.\//, "").replaceAll("\\", "/");
|
|
40294
40365
|
}
|
|
40295
|
-
function
|
|
40366
|
+
function stringValue12(value) {
|
|
40296
40367
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
40297
40368
|
}
|
|
40298
40369
|
function numberValue6(value) {
|
|
40299
40370
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
40300
40371
|
}
|
|
40301
40372
|
function stringArray4(value) {
|
|
40302
|
-
return Array.isArray(value) ? value.map(
|
|
40373
|
+
return Array.isArray(value) ? value.map(stringValue12).filter((item) => Boolean(item)) : [];
|
|
40303
40374
|
}
|
|
40304
40375
|
|
|
40305
40376
|
// ../server/src/runtime/create-pipeline/agent-improvement-git.ts
|
|
@@ -40522,13 +40593,13 @@ async function listPullRequestsForBranch(command, cwd, branch) {
|
|
|
40522
40593
|
function normalizePullRequest(raw, openedAt = (/* @__PURE__ */ new Date()).toISOString(), updatedAt = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
40523
40594
|
const number = typeof raw.number === "number" ? raw.number : Number(raw.number);
|
|
40524
40595
|
const stateValue = typeof raw.state === "string" ? raw.state.toLowerCase() : "";
|
|
40525
|
-
const mergedAt =
|
|
40596
|
+
const mergedAt = stringValue13(raw.mergedAt);
|
|
40526
40597
|
const state = mergedAt || stateValue === "merged" ? "merged" : stateValue === "open" ? "open" : "closed";
|
|
40527
40598
|
const mergeCommitRecord = raw.mergeCommit && typeof raw.mergeCommit === "object" ? raw.mergeCommit : null;
|
|
40528
|
-
const mergeCommit =
|
|
40529
|
-
const url =
|
|
40530
|
-
const baseBranch =
|
|
40531
|
-
const headBranch =
|
|
40599
|
+
const mergeCommit = stringValue13(mergeCommitRecord?.oid) ?? stringValue13(raw.mergeCommit);
|
|
40600
|
+
const url = stringValue13(raw.url);
|
|
40601
|
+
const baseBranch = stringValue13(raw.baseRefName);
|
|
40602
|
+
const headBranch = stringValue13(raw.headRefName);
|
|
40532
40603
|
if (!Number.isInteger(number) || number <= 0 || !url || !baseBranch || !headBranch) {
|
|
40533
40604
|
throw new Error("GitHub returned an incomplete pull request payload.");
|
|
40534
40605
|
}
|
|
@@ -40580,7 +40651,7 @@ function assertCommand(result, message) {
|
|
|
40580
40651
|
if (result.code === 0) return;
|
|
40581
40652
|
throw new Error(result.stderr.trim() || result.stdout.trim() || message);
|
|
40582
40653
|
}
|
|
40583
|
-
function
|
|
40654
|
+
function stringValue13(value) {
|
|
40584
40655
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
40585
40656
|
}
|
|
40586
40657
|
function defaultCommandRunner(command, args, cwd, env = {}) {
|
|
@@ -41153,8 +41224,8 @@ async function readAgentPackageOrigin(agentRootPath, manifestHash) {
|
|
|
41153
41224
|
"agent-package-origin.json"
|
|
41154
41225
|
);
|
|
41155
41226
|
const origin = await fs20.readFile(originPath, "utf8").then((raw) => asRecord15(JSON.parse(raw))).catch(() => ({}));
|
|
41156
|
-
const versionId =
|
|
41157
|
-
const digest =
|
|
41227
|
+
const versionId = stringValue14(origin.versionId);
|
|
41228
|
+
const digest = stringValue14(origin.digest);
|
|
41158
41229
|
if (versionId && digest && /^[a-f0-9]{64}$/.test(digest) && versionId === `agent-${digest.slice(0, 20)}`) {
|
|
41159
41230
|
return {
|
|
41160
41231
|
versionId,
|
|
@@ -41173,7 +41244,7 @@ async function readAgentPackageOrigin(agentRootPath, manifestHash) {
|
|
|
41173
41244
|
function asRecord15(value) {
|
|
41174
41245
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
41175
41246
|
}
|
|
41176
|
-
function
|
|
41247
|
+
function stringValue14(value) {
|
|
41177
41248
|
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
41178
41249
|
}
|
|
41179
41250
|
function stringArray5(value) {
|
|
@@ -42247,7 +42318,7 @@ function uniqueEvidence(run, evidence) {
|
|
|
42247
42318
|
}
|
|
42248
42319
|
async function verifyAppliedProfileCommit(input) {
|
|
42249
42320
|
const command = input.command ?? (async (name, args, cwd, env) => {
|
|
42250
|
-
const { runWorkspaceCommand } = await import("./workspaces-
|
|
42321
|
+
const { runWorkspaceCommand } = await import("./workspaces-FPIBAG7G.js");
|
|
42251
42322
|
return runWorkspaceCommand(name, args, cwd, env);
|
|
42252
42323
|
});
|
|
42253
42324
|
const result = await command("git", ["rev-parse", "HEAD"], input.repoPath);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
createOpenPondSandboxClient
|
|
4
|
-
} from "./chunk-KHNHUA2H.js";
|
|
5
2
|
import {
|
|
6
3
|
mapUiBaseToApiBase,
|
|
7
4
|
resolveBaseUrl,
|
|
8
5
|
resolveSandboxApiUrlOption
|
|
9
6
|
} from "./chunk-SMNFI2FU.js";
|
|
7
|
+
import {
|
|
8
|
+
createOpenPondSandboxClient
|
|
9
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_CACHE_TTL_MS,
|
|
12
12
|
SANDBOX_RUNTIME_PROFILE_IDS,
|
|
@@ -291,34 +291,6 @@ async function promptForPath(defaultPath) {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
// ../../packages/sdk/src/work.ts
|
|
295
|
-
var MAX_WORK_INPUT_BYTES = 100 * 1024 * 1024;
|
|
296
|
-
var WORK_OUTPUT_MIME_TYPES = Object.freeze({
|
|
297
|
-
".avif": "image/avif",
|
|
298
|
-
".csv": "text/csv",
|
|
299
|
-
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
300
|
-
".gif": "image/gif",
|
|
301
|
-
".html": "text/html",
|
|
302
|
-
".jpeg": "image/jpeg",
|
|
303
|
-
".jpg": "image/jpeg",
|
|
304
|
-
".json": "application/json",
|
|
305
|
-
".m4a": "audio/mp4",
|
|
306
|
-
".md": "text/markdown",
|
|
307
|
-
".mov": "video/quicktime",
|
|
308
|
-
".mp3": "audio/mpeg",
|
|
309
|
-
".mp4": "video/mp4",
|
|
310
|
-
".pdf": "application/pdf",
|
|
311
|
-
".png": "image/png",
|
|
312
|
-
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
313
|
-
".svg": "image/svg+xml",
|
|
314
|
-
".tsv": "text/tab-separated-values",
|
|
315
|
-
".txt": "text/plain",
|
|
316
|
-
".wav": "audio/wav",
|
|
317
|
-
".webm": "video/webm",
|
|
318
|
-
".webp": "image/webp",
|
|
319
|
-
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
320
|
-
});
|
|
321
|
-
|
|
322
294
|
// src/cli/common/vercel-protection.ts
|
|
323
295
|
import { spawnSync } from "node:child_process";
|
|
324
296
|
import path from "node:path";
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
saveConfig,
|
|
13
13
|
saveProfileApiKey,
|
|
14
14
|
setActiveProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PVGJXCAK.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
18
18
|
DEFAULT_OPENPOND_WEB_BASE_URL,
|
|
19
19
|
withVercelProtectionBypass
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
21
21
|
|
|
22
22
|
// ../../packages/runtime/dist/chat.js
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
DEFAULT_OPENPOND_API_BASE_URL,
|
|
24
24
|
DEFAULT_OPENPOND_WEB_BASE_URL,
|
|
25
25
|
apiFetch
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DXSHQ6TO.js";
|
|
27
27
|
|
|
28
28
|
// ../../packages/cloud/dist/profile/profile-skills.js
|
|
29
29
|
import { createHash } from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
now
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3PKCT4JC.js";
|
|
5
5
|
|
|
6
6
|
// ../server/src/workspace/workspace-command.ts
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|