negotium 0.5.6 → 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.
- package/dist/agent-helpers.js +25 -5
- package/dist/agent-helpers.js.map +5 -5
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +35 -7
- package/dist/main.js.map +8 -8
- package/dist/mcp-factories.js +25 -5
- package/dist/mcp-factories.js.map +5 -5
- package/dist/prompts.js +15 -1
- package/dist/prompts.js.map +3 -3
- package/dist/registry.js +2 -2
- package/dist/registry.js.map +2 -2
- package/dist/runtime/src/prompts/builders.ts +26 -0
- package/dist/runtime/src/prompts/sessions/_shared-tools.md +1 -3
- package/dist/runtime/src/runtime/turn-runner.ts +30 -13
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/runtime/turn-runner.d.ts +22 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/mcp-factories.js
CHANGED
|
@@ -1022,7 +1022,7 @@ var init_claude_registry = __esm(() => {
|
|
|
1022
1022
|
});
|
|
1023
1023
|
|
|
1024
1024
|
// ../../packages/core/src/version.ts
|
|
1025
|
-
var NEGOTIUM_VERSION = "0.5.
|
|
1025
|
+
var NEGOTIUM_VERSION = "0.5.8";
|
|
1026
1026
|
|
|
1027
1027
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
1028
1028
|
import { spawn } from "child_process";
|
|
@@ -10330,6 +10330,19 @@ function sharedToolsPartial() {
|
|
|
10330
10330
|
}
|
|
10331
10331
|
return _sharedToolsPartial;
|
|
10332
10332
|
}
|
|
10333
|
+
function capabilityToolNotes(opts) {
|
|
10334
|
+
const notes = [
|
|
10335
|
+
...opts.fileDeliveryTools ? [
|
|
10336
|
+
"- Sending files: use the file-delivery tool; never emit deprecated `[FILE:/absolute/path]` tags. Prefer ASCII names and richer formats (PDF over plain `.txt`)."
|
|
10337
|
+
] : [],
|
|
10338
|
+
...opts.visualTools ? [
|
|
10339
|
+
"- Visual output (HTML/CSS, dashboards, charts, tables): use the visual tool below instead of pasting large HTML into chat."
|
|
10340
|
+
] : []
|
|
10341
|
+
];
|
|
10342
|
+
return notes.length ? `
|
|
10343
|
+
${notes.join(`
|
|
10344
|
+
`)}` : "";
|
|
10345
|
+
}
|
|
10333
10346
|
function topicSystemPromptTemplate() {
|
|
10334
10347
|
if (_topicSystemPromptTemplate === null) {
|
|
10335
10348
|
_topicSystemPromptTemplate = loadSessionPrompt("topic-system.md", FALLBACK_TOPIC_SYSTEM_PROMPT_TEMPLATE);
|
|
@@ -10557,6 +10570,7 @@ function createPromptBuilders(host = {}) {
|
|
|
10557
10570
|
const uploadsDir = `${opts.workspaceCwd}/attachments`;
|
|
10558
10571
|
const templateVars = {
|
|
10559
10572
|
SHARED_TOOLS: sharedToolsPartial(),
|
|
10573
|
+
CAPABILITY_TOOL_NOTES: capabilityToolNotes(opts),
|
|
10560
10574
|
AI_LABEL: opts.aiLabel,
|
|
10561
10575
|
TOPIC_TITLE: opts.topicTitle,
|
|
10562
10576
|
WORKSPACE_CWD: opts.workspaceCwd,
|
|
@@ -15992,6 +16006,7 @@ __export(exports_turn_runner, {
|
|
|
15992
16006
|
resolveWikiMirrorPath: () => resolveWikiMirrorPath,
|
|
15993
16007
|
resolveWikiMemoryMirror: () => resolveWikiMemoryMirror,
|
|
15994
16008
|
resolveVisualMediaInput: () => resolveVisualMediaInput,
|
|
16009
|
+
resolveTurnToolCapabilities: () => resolveTurnToolCapabilities,
|
|
15995
16010
|
resolveTopicTurnSession: () => resolveTopicTurnSession,
|
|
15996
16011
|
resolveTopicTurnExecution: () => resolveTopicTurnExecution,
|
|
15997
16012
|
resolveSessionRetry: () => resolveSessionRetry,
|
|
@@ -16331,6 +16346,13 @@ function resolveSessionRetry(opts) {
|
|
|
16331
16346
|
logger.info({ topicId: opts.topicId, agent: opts.agent, hadSessionId: Boolean(opts.sessionId) }, "ai: session expired \u2014 retrying with fresh session");
|
|
16332
16347
|
return { kind: "retry", sessionId: null };
|
|
16333
16348
|
}
|
|
16349
|
+
function resolveTurnToolCapabilities(topicId, params) {
|
|
16350
|
+
const granted = params.visualTools === undefined || params.fileDeliveryTools === undefined ? getTopicToolCapabilities(topicId) : null;
|
|
16351
|
+
return {
|
|
16352
|
+
visualTools: params.visualTools ?? granted?.visualTools ?? false,
|
|
16353
|
+
fileDeliveryTools: params.fileDeliveryTools ?? granted?.fileDeliveryTools ?? false
|
|
16354
|
+
};
|
|
16355
|
+
}
|
|
16334
16356
|
function mergeSupersedingUserTurn(running, incoming) {
|
|
16335
16357
|
const userMessages = [
|
|
16336
16358
|
...running.userMessages ?? [legacyUserTurnEnvelope(running.prompt, running.attachments)],
|
|
@@ -16546,9 +16568,7 @@ function startAiTurn(params) {
|
|
|
16546
16568
|
const cwd = params.cwd;
|
|
16547
16569
|
const sessionName = params.sessionName ?? topic.title;
|
|
16548
16570
|
const sessionType = params.sessionType;
|
|
16549
|
-
const
|
|
16550
|
-
const visualTools = params.visualTools ?? grantedForTopic?.visualTools ?? false;
|
|
16551
|
-
const fileDeliveryTools = params.fileDeliveryTools ?? grantedForTopic?.fileDeliveryTools ?? false;
|
|
16571
|
+
const { visualTools, fileDeliveryTools } = resolveTurnToolCapabilities(topicId, params);
|
|
16552
16572
|
const onSessionId = params.onSessionId;
|
|
16553
16573
|
const onSessionReset = params.onSessionReset;
|
|
16554
16574
|
const bridgeSessionFromHistory = params.bridgeSessionFromHistory === true;
|
|
@@ -21430,4 +21450,4 @@ export {
|
|
|
21430
21450
|
createAgentHealthMcpServer
|
|
21431
21451
|
};
|
|
21432
21452
|
|
|
21433
|
-
//# debugId=
|
|
21453
|
+
//# debugId=D668A94E43FEC52B64756E2164756E21
|