negotium 0.5.8 → 0.5.9

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.
@@ -2439,7 +2439,7 @@ var init_claude_registry = __esm(() => {
2439
2439
  });
2440
2440
 
2441
2441
  // ../../packages/core/src/version.ts
2442
- var NEGOTIUM_VERSION = "0.5.8";
2442
+ var NEGOTIUM_VERSION = "0.5.9";
2443
2443
 
2444
2444
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
2445
2445
  import { spawn as spawn2 } from "child_process";
@@ -6827,7 +6827,7 @@ function buildRuntimeToolSection(opts, extensions) {
6827
6827
  const decisionNamespace = "mcp__decision";
6828
6828
  const visualToolLine = agentKind === "codex" ? `To display charts, tables, or interactive HTML results to the user, call the \`show_html\` function in the \`${runtimeNamespace}\` namespace with { html: "<complete HTML string>", title?: "optional title" }.` : `To display charts, tables, or interactive HTML results to the user, call the MCP tool "${runtimeNamespace}__show_html" with { html: "<complete HTML string>", title?: "optional title" }.`;
6829
6829
  const mermaidToolLine = agentKind === "codex" ? `For diagrams that Mermaid supports, prefer the \`show_mermaid\` function in the \`${runtimeNamespace}\` namespace with { code: "<Mermaid DSL without markdown fences>", title?: "...", theme?: "neutral" }.` : `For diagrams that Mermaid supports, prefer the MCP tool "${runtimeNamespace}__show_mermaid" with { code: "<Mermaid DSL without markdown fences>", title?: "...", theme?: "neutral" }.`;
6830
- const mediaToolLine = agentKind === "codex" ? `To display an existing image or video in the visual panel, use \`show_image\` or \`show_video\` in the \`${runtimeNamespace}\` namespace with either { file_path: "...", title?: "..." } for a topic-workspace file or { file_id: "...", title?: "..." } for an uploaded file already attached in this topic.` : `To display an existing image or video in the visual panel, use MCP tool "${runtimeNamespace}__show_image" or "${runtimeNamespace}__show_video" with either { file_path: "...", title?: "..." } for a topic-workspace file or { file_id: "...", title?: "..." } for an uploaded file already attached in this topic.`;
6830
+ const mediaToolLine = agentKind === "codex" ? `To display an existing image in the visual panel, use \`show_image\` in the \`${runtimeNamespace}\` namespace with either { file_path: "...", title?: "..." } for a topic-workspace file or { file_id: "...", title?: "..." } for an uploaded file already attached in this topic.` : `To display an existing image in the visual panel, use MCP tool "${runtimeNamespace}__show_image" with either { file_path: "...", title?: "..." } for a topic-workspace file or { file_id: "...", title?: "..." } for an uploaded file already attached in this topic.`;
6831
6831
  const sendFileTool = agentKind === "codex" ? `\`send_file\` function in the \`${runtimeNamespace}\` namespace` : `MCP tool "${runtimeNamespace}__send_file"`;
6832
6832
  const askUserToolLine = agentKind === "codex" ? `When you need a blocking user choice, call the \`ask_user_question\` function in the \`${runtimeNamespace}\` namespace with { question: "...", choices: [{ label: "...", description?: "..." }] }.` : `When you need a blocking user choice, call the MCP tool "${runtimeNamespace}__ask_user_question" with { question: "...", choices: [{ label: "...", description?: "..." }] }.`;
6833
6833
  const scheduleSelfToolLine = agentKind === "codex" ? `For a one-shot delayed continuation within 24 hours, call the \`schedule_self\` function in the \`${runtimeNamespace}\` namespace with { delay_seconds: number, message: "self-contained future instruction" }. Only one pending self-schedule is allowed per topic; use \`get_self_schedule\`, \`update_self_schedule\`, or \`cancel_self_schedule\` in that namespace to manage it. Use cron-manager for recurring schedules.` : `For a one-shot delayed continuation within 24 hours, call the MCP tool "${runtimeNamespace}__schedule_self" with { delay_seconds: number, message: "self-contained future instruction" }. Only one pending self-schedule is allowed per topic; manage it with "${runtimeNamespace}__get_self_schedule", "${runtimeNamespace}__update_self_schedule", or "${runtimeNamespace}__cancel_self_schedule". Use cron-manager for recurring schedules.`;
@@ -15182,9 +15182,6 @@ function isVisualsShowMermaidTool(name) {
15182
15182
  function isVisualsShowImageTool(name) {
15183
15183
  return isRuntimeTool(name, "show_image") || isRuntimeTool(name, "show_png");
15184
15184
  }
15185
- function isVisualsShowVideoTool(name) {
15186
- return isRuntimeTool(name, "show_video");
15187
- }
15188
15185
  function normalizeToolUseId(value) {
15189
15186
  const normalized = value?.trim();
15190
15187
  return normalized ? normalized : undefined;
@@ -15563,9 +15560,9 @@ ${JSON.stringify(event.input ?? {})}`);
15563
15560
  broadcastStoredVisual(event, vizId, title, "mermaid");
15564
15561
  }
15565
15562
  }
15566
- } else if (isVisualsShowImageTool(event.name) || isVisualsShowVideoTool(event.name)) {
15563
+ } else if (isVisualsShowImageTool(event.name)) {
15567
15564
  const input = event.input;
15568
- const kind = isVisualsShowImageTool(event.name) ? "image" : "video";
15565
+ const kind = "image";
15569
15566
  const toolUseId = bindToolUseId(event.toolUseId);
15570
15567
  const label = formatToolUse(event.name, event.input);
15571
15568
  const failMediaVisual = (reason) => {
@@ -15585,14 +15582,10 @@ ${JSON.stringify(event.input ?? {})}`);
15585
15582
  failMediaVisual(media.error);
15586
15583
  break;
15587
15584
  }
15588
- if (kind === "image" && !media.mimeType.startsWith("image/")) {
15585
+ if (!media.mimeType.startsWith("image/")) {
15589
15586
  failMediaVisual(`expected image media, got ${media.mimeType}`);
15590
15587
  break;
15591
15588
  }
15592
- if (kind === "video" && !media.mimeType.startsWith("video/")) {
15593
- failMediaVisual(`expected video media, got ${media.mimeType}`);
15594
- break;
15595
- }
15596
15589
  try {
15597
15590
  const title = normalizeVisualTitle(input.title);
15598
15591
  if (peerBridge) {
@@ -16002,7 +15995,6 @@ __export(exports_turn_runner, {
16002
15995
  mergeSupersedingUserTurn: () => mergeSupersedingUserTurn,
16003
15996
  mentionsAi: () => mentionsAi,
16004
15997
  materializePromptAttachments: () => materializePromptAttachments,
16005
- isVisualsShowVideoTool: () => isVisualsShowVideoTool,
16006
15998
  isVisualsShowMermaidTool: () => isVisualsShowMermaidTool,
16007
15999
  isVisualsShowImageTool: () => isVisualsShowImageTool,
16008
16000
  isVisualsShowHtmlTool: () => isVisualsShowHtmlTool,
@@ -19127,27 +19119,7 @@ var showImageTool = {
19127
19119
  return textResult("Image displayed to the user.");
19128
19120
  }
19129
19121
  };
19130
- var showVideoTool = {
19131
- name: "show_video",
19132
- description: "Display a playable video in the user's visual side panel. Provide either file_path for a video in the topic workspace, or file_id for an uploaded file already attached in this topic.",
19133
- schema: {
19134
- file_path: z5.string().optional().describe("Absolute or workspace-relative path to a video file."),
19135
- file_id: z5.string().optional().describe("Full Otium uploaded file UUID for a video attached in this topic."),
19136
- title: z5.string().optional().describe("Optional title shown above the rendered card.")
19137
- },
19138
- async handler(input) {
19139
- if (!input?.file_path && !input?.file_id) {
19140
- return errorResult("file_path or file_id is required.");
19141
- }
19142
- return textResult("Video displayed to the user.");
19143
- }
19144
- };
19145
- var visualToolDefinitions = [
19146
- showHtmlTool,
19147
- showMermaidTool,
19148
- showImageTool,
19149
- showVideoTool
19150
- ];
19122
+ var visualToolDefinitions = [showHtmlTool, showMermaidTool, showImageTool];
19151
19123
 
19152
19124
  // ../../packages/core/src/agents/mcp-tools/visual-compat.ts
19153
19125
  var showPngTool = {
@@ -19160,8 +19132,7 @@ var otiumVisualToolDefinitions = [
19160
19132
  showHtmlTool,
19161
19133
  showMermaidTool,
19162
19134
  showImageTool,
19163
- showPngTool,
19164
- showVideoTool
19135
+ showPngTool
19165
19136
  ];
19166
19137
 
19167
19138
  // ../../packages/core/src/agents/public-helpers.ts
@@ -19177,7 +19148,6 @@ export {
19177
19148
  summarizeShellCommand,
19178
19149
  summarizeDisplayText,
19179
19150
  snapshotCodexChildren,
19180
- showVideoTool,
19181
19151
  showPngTool,
19182
19152
  showMermaidTool,
19183
19153
  showImageTool,
@@ -19219,4 +19189,4 @@ export {
19219
19189
  DEFAULT_SELF_CONFIG_PRODUCT
19220
19190
  };
19221
19191
 
19222
- //# debugId=5BD4B5AE81E9801064756E2164756E21
19192
+ //# debugId=5C27F540959207AC64756E2164756E21