negotium 0.22.7 → 0.22.8
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/agent-helpers.js +31 -14
- package/dist/agent-helpers.js.map +4 -4
- package/dist/{chunk-1gznvrth.js → chunk-5czvhd0g.js} +2 -2
- package/dist/{chunk-1gznvrth.js.map → chunk-5czvhd0g.js.map} +2 -2
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +40 -15
- package/dist/main.js.map +6 -6
- package/dist/mcp-factories.js +31 -14
- package/dist/mcp-factories.js.map +4 -4
- package/dist/registry.js +1 -1
- package/dist/runtime/src/mcp-runtime-host.ts +1 -0
- package/dist/runtime/src/runtime/visuals.ts +47 -11
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/runtime/visuals.d.ts +9 -2
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/mcp-factories.js
CHANGED
|
@@ -5279,7 +5279,7 @@ var init_codex = __esm(async () => {
|
|
|
5279
5279
|
});
|
|
5280
5280
|
|
|
5281
5281
|
// ../../packages/core/src/version.ts
|
|
5282
|
-
var NEGOTIUM_VERSION = "0.22.
|
|
5282
|
+
var NEGOTIUM_VERSION = "0.22.8";
|
|
5283
5283
|
|
|
5284
5284
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
5285
5285
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -19208,7 +19208,7 @@ function buildVideoHtml(mimeType) {
|
|
|
19208
19208
|
<body><video controls playsinline preload="metadata" src="${VISUAL_MEDIA_URL_PLACEHOLDER}" data-mime="${escapeHtml2(mimeType)}"></video></body>
|
|
19209
19209
|
</html>`;
|
|
19210
19210
|
}
|
|
19211
|
-
function
|
|
19211
|
+
function locateVisualMediaInput(topicId, input) {
|
|
19212
19212
|
if (typeof input.file_id === "string" && input.file_id.trim()) {
|
|
19213
19213
|
const fileId = input.file_id.trim().toLowerCase();
|
|
19214
19214
|
if (!isUploadFileId(fileId))
|
|
@@ -19216,15 +19216,11 @@ function resolveVisualMediaInput(topicId, input) {
|
|
|
19216
19216
|
if (!topicAllowsVisualFileId(topicId, fileId)) {
|
|
19217
19217
|
return { error: "file_id is not attached to this topic" };
|
|
19218
19218
|
}
|
|
19219
|
-
const
|
|
19220
|
-
const
|
|
19221
|
-
if (!
|
|
19219
|
+
const attachment = resolveAttachmentByFileId(fileId);
|
|
19220
|
+
const filePath = resolveUploadedFilePathByFileId(fileId);
|
|
19221
|
+
if (!attachment || !filePath)
|
|
19222
19222
|
return { error: `uploaded file not found: ${fileId}` };
|
|
19223
|
-
return {
|
|
19224
|
-
fileId: attachment2.id,
|
|
19225
|
-
mimeType: attachment2.mimeType,
|
|
19226
|
-
source: `file_id:${attachment2.id}`
|
|
19227
|
-
};
|
|
19223
|
+
return { kind: "upload", fileId: attachment.id, mimeType: attachment.mimeType };
|
|
19228
19224
|
}
|
|
19229
19225
|
if (typeof input.file_path !== "string" || !input.file_path.trim()) {
|
|
19230
19226
|
return { error: "file_path or file_id is required" };
|
|
@@ -19232,18 +19228,38 @@ function resolveVisualMediaInput(topicId, input) {
|
|
|
19232
19228
|
const rawPath = input.file_path.trim();
|
|
19233
19229
|
const cwd = workspaceCwdFor(topicId);
|
|
19234
19230
|
const candidate = isAbsolute5(rawPath) ? rawPath : resolve17(cwd, rawPath);
|
|
19235
|
-
if (!isPathInside(cwd, candidate)) {
|
|
19236
|
-
return { error: "file_path must be inside the topic workspace" };
|
|
19237
|
-
}
|
|
19238
19231
|
let realCandidate;
|
|
19239
19232
|
try {
|
|
19240
19233
|
realCandidate = realpathSync6(candidate);
|
|
19241
19234
|
} catch {
|
|
19242
19235
|
return { error: `file not found: ${rawPath}` };
|
|
19243
19236
|
}
|
|
19237
|
+
if (!isPathInside(cwd, realCandidate)) {
|
|
19238
|
+
return {
|
|
19239
|
+
error: `file_path must be inside the topic workspace (${cwd}); copy the file into it and pass the copy`
|
|
19240
|
+
};
|
|
19241
|
+
}
|
|
19244
19242
|
if (isSensitivePath(realCandidate)) {
|
|
19245
19243
|
return { error: "file_path matches the sensitive-file blacklist" };
|
|
19246
19244
|
}
|
|
19245
|
+
return { kind: "file", path: realCandidate, rawPath };
|
|
19246
|
+
}
|
|
19247
|
+
function visualMediaInputError(topicId, input) {
|
|
19248
|
+
const located = locateVisualMediaInput(topicId, input);
|
|
19249
|
+
return "error" in located ? located.error : null;
|
|
19250
|
+
}
|
|
19251
|
+
function resolveVisualMediaInput(topicId, input) {
|
|
19252
|
+
const located = locateVisualMediaInput(topicId, input);
|
|
19253
|
+
if ("error" in located)
|
|
19254
|
+
return located;
|
|
19255
|
+
if (located.kind === "upload") {
|
|
19256
|
+
return {
|
|
19257
|
+
fileId: located.fileId,
|
|
19258
|
+
mimeType: located.mimeType,
|
|
19259
|
+
source: `file_id:${located.fileId}`
|
|
19260
|
+
};
|
|
19261
|
+
}
|
|
19262
|
+
const { path: realCandidate, rawPath } = located;
|
|
19247
19263
|
const attachment = storeLocalFileAsUpload(realCandidate, { topicId });
|
|
19248
19264
|
if (!attachment)
|
|
19249
19265
|
return { error: `failed to store media file: ${rawPath}` };
|
|
@@ -19983,6 +19999,7 @@ __export(exports_turn_runner, {
|
|
|
19983
19999
|
workspaceCwdFor: () => workspaceCwdFor,
|
|
19984
20000
|
withDefaultPlaywright: () => withDefaultPlaywright,
|
|
19985
20001
|
wasLocallyRequeuedAfterUserPreemption: () => wasLocallyRequeuedAfterUserPreemption,
|
|
20002
|
+
visualMediaInputError: () => visualMediaInputError,
|
|
19986
20003
|
userConversationPromptsToRecord: () => userConversationPromptsToRecord,
|
|
19987
20004
|
upsertTaskPanelMessage: () => upsertTaskPanelMessage,
|
|
19988
20005
|
tryReconstructTopicRollout: () => tryReconstructTopicRollout,
|
|
@@ -25775,4 +25792,4 @@ export {
|
|
|
25775
25792
|
createAgentHealthMcpServer
|
|
25776
25793
|
};
|
|
25777
25794
|
|
|
25778
|
-
//# debugId=
|
|
25795
|
+
//# debugId=46394DEF298C55EF64756E2164756E21
|