negotium 0.22.7 → 0.23.0
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-qmpbb92y.js} +2 -2
- package/dist/{chunk-1gznvrth.js.map → chunk-qmpbb92y.js.map} +2 -2
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +664 -107
- package/dist/main.js.map +10 -10
- 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/agent-helpers.js
CHANGED
|
@@ -5241,7 +5241,7 @@ var init_codex = __esm(async () => {
|
|
|
5241
5241
|
});
|
|
5242
5242
|
|
|
5243
5243
|
// ../../packages/core/src/version.ts
|
|
5244
|
-
var NEGOTIUM_VERSION = "0.
|
|
5244
|
+
var NEGOTIUM_VERSION = "0.23.0";
|
|
5245
5245
|
|
|
5246
5246
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
5247
5247
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -19218,7 +19218,7 @@ function buildVideoHtml(mimeType) {
|
|
|
19218
19218
|
<body><video controls playsinline preload="metadata" src="${VISUAL_MEDIA_URL_PLACEHOLDER}" data-mime="${escapeHtml2(mimeType)}"></video></body>
|
|
19219
19219
|
</html>`;
|
|
19220
19220
|
}
|
|
19221
|
-
function
|
|
19221
|
+
function locateVisualMediaInput(topicId, input) {
|
|
19222
19222
|
if (typeof input.file_id === "string" && input.file_id.trim()) {
|
|
19223
19223
|
const fileId = input.file_id.trim().toLowerCase();
|
|
19224
19224
|
if (!isUploadFileId(fileId))
|
|
@@ -19226,15 +19226,11 @@ function resolveVisualMediaInput(topicId, input) {
|
|
|
19226
19226
|
if (!topicAllowsVisualFileId(topicId, fileId)) {
|
|
19227
19227
|
return { error: "file_id is not attached to this topic" };
|
|
19228
19228
|
}
|
|
19229
|
-
const
|
|
19230
|
-
const
|
|
19231
|
-
if (!
|
|
19229
|
+
const attachment = resolveAttachmentByFileId(fileId);
|
|
19230
|
+
const filePath = resolveUploadedFilePathByFileId(fileId);
|
|
19231
|
+
if (!attachment || !filePath)
|
|
19232
19232
|
return { error: `uploaded file not found: ${fileId}` };
|
|
19233
|
-
return {
|
|
19234
|
-
fileId: attachment2.id,
|
|
19235
|
-
mimeType: attachment2.mimeType,
|
|
19236
|
-
source: `file_id:${attachment2.id}`
|
|
19237
|
-
};
|
|
19233
|
+
return { kind: "upload", fileId: attachment.id, mimeType: attachment.mimeType };
|
|
19238
19234
|
}
|
|
19239
19235
|
if (typeof input.file_path !== "string" || !input.file_path.trim()) {
|
|
19240
19236
|
return { error: "file_path or file_id is required" };
|
|
@@ -19242,18 +19238,38 @@ function resolveVisualMediaInput(topicId, input) {
|
|
|
19242
19238
|
const rawPath = input.file_path.trim();
|
|
19243
19239
|
const cwd = workspaceCwdFor(topicId);
|
|
19244
19240
|
const candidate = isAbsolute6(rawPath) ? rawPath : resolve17(cwd, rawPath);
|
|
19245
|
-
if (!isPathInside(cwd, candidate)) {
|
|
19246
|
-
return { error: "file_path must be inside the topic workspace" };
|
|
19247
|
-
}
|
|
19248
19241
|
let realCandidate;
|
|
19249
19242
|
try {
|
|
19250
19243
|
realCandidate = realpathSync5(candidate);
|
|
19251
19244
|
} catch {
|
|
19252
19245
|
return { error: `file not found: ${rawPath}` };
|
|
19253
19246
|
}
|
|
19247
|
+
if (!isPathInside(cwd, realCandidate)) {
|
|
19248
|
+
return {
|
|
19249
|
+
error: `file_path must be inside the topic workspace (${cwd}); copy the file into it and pass the copy`
|
|
19250
|
+
};
|
|
19251
|
+
}
|
|
19254
19252
|
if (isSensitivePath(realCandidate)) {
|
|
19255
19253
|
return { error: "file_path matches the sensitive-file blacklist" };
|
|
19256
19254
|
}
|
|
19255
|
+
return { kind: "file", path: realCandidate, rawPath };
|
|
19256
|
+
}
|
|
19257
|
+
function visualMediaInputError(topicId, input) {
|
|
19258
|
+
const located = locateVisualMediaInput(topicId, input);
|
|
19259
|
+
return "error" in located ? located.error : null;
|
|
19260
|
+
}
|
|
19261
|
+
function resolveVisualMediaInput(topicId, input) {
|
|
19262
|
+
const located = locateVisualMediaInput(topicId, input);
|
|
19263
|
+
if ("error" in located)
|
|
19264
|
+
return located;
|
|
19265
|
+
if (located.kind === "upload") {
|
|
19266
|
+
return {
|
|
19267
|
+
fileId: located.fileId,
|
|
19268
|
+
mimeType: located.mimeType,
|
|
19269
|
+
source: `file_id:${located.fileId}`
|
|
19270
|
+
};
|
|
19271
|
+
}
|
|
19272
|
+
const { path: realCandidate, rawPath } = located;
|
|
19257
19273
|
const attachment = storeLocalFileAsUpload(realCandidate, { topicId });
|
|
19258
19274
|
if (!attachment)
|
|
19259
19275
|
return { error: `failed to store media file: ${rawPath}` };
|
|
@@ -19993,6 +20009,7 @@ __export(exports_turn_runner, {
|
|
|
19993
20009
|
workspaceCwdFor: () => workspaceCwdFor,
|
|
19994
20010
|
withDefaultPlaywright: () => withDefaultPlaywright,
|
|
19995
20011
|
wasLocallyRequeuedAfterUserPreemption: () => wasLocallyRequeuedAfterUserPreemption,
|
|
20012
|
+
visualMediaInputError: () => visualMediaInputError,
|
|
19996
20013
|
userConversationPromptsToRecord: () => userConversationPromptsToRecord,
|
|
19997
20014
|
upsertTaskPanelMessage: () => upsertTaskPanelMessage,
|
|
19998
20015
|
tryReconstructTopicRollout: () => tryReconstructTopicRollout,
|
|
@@ -23460,4 +23477,4 @@ export {
|
|
|
23460
23477
|
DEFAULT_SELF_CONFIG_PRODUCT
|
|
23461
23478
|
};
|
|
23462
23479
|
|
|
23463
|
-
//# debugId=
|
|
23480
|
+
//# debugId=E1D78DF36D4DD93264756E2164756E21
|