negotium 0.5.7 → 0.5.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.
@@ -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.7";
2442
+ var NEGOTIUM_VERSION = "0.5.8";
2443
2443
 
2444
2444
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
2445
2445
  import { spawn as spawn2 } from "child_process";
@@ -6740,6 +6740,19 @@ function sharedToolsPartial() {
6740
6740
  }
6741
6741
  return _sharedToolsPartial;
6742
6742
  }
6743
+ function capabilityToolNotes(opts) {
6744
+ const notes = [
6745
+ ...opts.fileDeliveryTools ? [
6746
+ "- Sending files: use the file-delivery tool; never emit deprecated `[FILE:/absolute/path]` tags. Prefer ASCII names and richer formats (PDF over plain `.txt`)."
6747
+ ] : [],
6748
+ ...opts.visualTools ? [
6749
+ "- Visual output (HTML/CSS, dashboards, charts, tables): use the visual tool below instead of pasting large HTML into chat."
6750
+ ] : []
6751
+ ];
6752
+ return notes.length ? `
6753
+ ${notes.join(`
6754
+ `)}` : "";
6755
+ }
6743
6756
  function topicSystemPromptTemplate() {
6744
6757
  if (_topicSystemPromptTemplate === null) {
6745
6758
  _topicSystemPromptTemplate = loadSessionPrompt("topic-system.md", FALLBACK_TOPIC_SYSTEM_PROMPT_TEMPLATE);
@@ -6967,6 +6980,7 @@ function createPromptBuilders(host = {}) {
6967
6980
  const uploadsDir = `${opts.workspaceCwd}/attachments`;
6968
6981
  const templateVars = {
6969
6982
  SHARED_TOOLS: sharedToolsPartial(),
6983
+ CAPABILITY_TOOL_NOTES: capabilityToolNotes(opts),
6970
6984
  AI_LABEL: opts.aiLabel,
6971
6985
  TOPIC_TITLE: opts.topicTitle,
6972
6986
  WORKSPACE_CWD: opts.workspaceCwd,
@@ -15969,6 +15983,7 @@ __export(exports_turn_runner, {
15969
15983
  resolveWikiMirrorPath: () => resolveWikiMirrorPath,
15970
15984
  resolveWikiMemoryMirror: () => resolveWikiMemoryMirror,
15971
15985
  resolveVisualMediaInput: () => resolveVisualMediaInput,
15986
+ resolveTurnToolCapabilities: () => resolveTurnToolCapabilities,
15972
15987
  resolveTopicTurnSession: () => resolveTopicTurnSession,
15973
15988
  resolveTopicTurnExecution: () => resolveTopicTurnExecution,
15974
15989
  resolveSessionRetry: () => resolveSessionRetry,
@@ -16308,6 +16323,13 @@ function resolveSessionRetry(opts) {
16308
16323
  logger.info({ topicId: opts.topicId, agent: opts.agent, hadSessionId: Boolean(opts.sessionId) }, "ai: session expired \u2014 retrying with fresh session");
16309
16324
  return { kind: "retry", sessionId: null };
16310
16325
  }
16326
+ function resolveTurnToolCapabilities(topicId, params) {
16327
+ const granted = params.visualTools === undefined || params.fileDeliveryTools === undefined ? getTopicToolCapabilities(topicId) : null;
16328
+ return {
16329
+ visualTools: params.visualTools ?? granted?.visualTools ?? false,
16330
+ fileDeliveryTools: params.fileDeliveryTools ?? granted?.fileDeliveryTools ?? false
16331
+ };
16332
+ }
16311
16333
  function mergeSupersedingUserTurn(running, incoming) {
16312
16334
  const userMessages = [
16313
16335
  ...running.userMessages ?? [legacyUserTurnEnvelope(running.prompt, running.attachments)],
@@ -16523,9 +16545,7 @@ function startAiTurn(params) {
16523
16545
  const cwd = params.cwd;
16524
16546
  const sessionName = params.sessionName ?? topic.title;
16525
16547
  const sessionType = params.sessionType;
16526
- const grantedForTopic = params.visualTools === undefined || params.fileDeliveryTools === undefined ? getTopicToolCapabilities(topicId) : null;
16527
- const visualTools = params.visualTools ?? grantedForTopic?.visualTools ?? false;
16528
- const fileDeliveryTools = params.fileDeliveryTools ?? grantedForTopic?.fileDeliveryTools ?? false;
16548
+ const { visualTools, fileDeliveryTools } = resolveTurnToolCapabilities(topicId, params);
16529
16549
  const onSessionId = params.onSessionId;
16530
16550
  const onSessionReset = params.onSessionReset;
16531
16551
  const bridgeSessionFromHistory = params.bridgeSessionFromHistory === true;
@@ -19199,4 +19219,4 @@ export {
19199
19219
  DEFAULT_SELF_CONFIG_PRODUCT
19200
19220
  };
19201
19221
 
19202
- //# debugId=0F25AE320982542264756E2164756E21
19222
+ //# debugId=5BD4B5AE81E9801064756E2164756E21