negotium 0.5.4 → 0.5.6
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 +35 -5
- package/dist/agent-helpers.js.map +9 -8
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +140 -7
- package/dist/main.js.map +17 -15
- package/dist/mcp-factories.js +35 -5
- package/dist/mcp-factories.js.map +9 -8
- package/dist/registry.js +2 -2
- package/dist/registry.js.map +2 -2
- package/dist/runtime/src/application/submit-runtime-gateway-turn.ts +27 -0
- package/dist/runtime/src/application/submit-user-message.ts +7 -0
- package/dist/runtime/src/mcp-runtime-host.ts +1 -0
- package/dist/runtime/src/node-host.ts +2 -0
- package/dist/runtime/src/runtime/turn-runner.ts +14 -2
- package/dist/runtime/src/runtime/visual-store.ts +42 -0
- package/dist/runtime/src/runtime/visuals.ts +4 -1
- package/dist/runtime/src/storage/topic-tool-capabilities.ts +89 -0
- package/dist/runtime/src/topics/lifecycle.ts +2 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/runtime/visual-store.d.ts +25 -0
- package/dist/types/packages/core/src/storage/topic-tool-capabilities.d.ts +37 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/agent-helpers.js
CHANGED
|
@@ -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.
|
|
2442
|
+
var NEGOTIUM_VERSION = "0.5.6";
|
|
2443
2443
|
|
|
2444
2444
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
2445
2445
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -14306,6 +14306,32 @@ var init_token_stats = __esm(async () => {
|
|
|
14306
14306
|
};
|
|
14307
14307
|
});
|
|
14308
14308
|
|
|
14309
|
+
// ../../packages/core/src/storage/topic-tool-capabilities.ts
|
|
14310
|
+
function getTopicToolCapabilities(topicId) {
|
|
14311
|
+
const row = db.query(`SELECT visual_tools, file_delivery_tools
|
|
14312
|
+
FROM api_topic_tool_capabilities WHERE topic_id = ?`).get(topicId);
|
|
14313
|
+
if (!row)
|
|
14314
|
+
return null;
|
|
14315
|
+
return {
|
|
14316
|
+
visualTools: row.visual_tools === 1,
|
|
14317
|
+
fileDeliveryTools: row.file_delivery_tools === 1
|
|
14318
|
+
};
|
|
14319
|
+
}
|
|
14320
|
+
function deleteTopicToolCapabilities(topicId) {
|
|
14321
|
+
db.query("DELETE FROM api_topic_tool_capabilities WHERE topic_id = ?").run(topicId);
|
|
14322
|
+
}
|
|
14323
|
+
var init_topic_tool_capabilities = __esm(async () => {
|
|
14324
|
+
await init_forum_db();
|
|
14325
|
+
db.exec(`
|
|
14326
|
+
CREATE TABLE IF NOT EXISTS api_topic_tool_capabilities (
|
|
14327
|
+
topic_id TEXT PRIMARY KEY,
|
|
14328
|
+
visual_tools INTEGER NOT NULL DEFAULT 0,
|
|
14329
|
+
file_delivery_tools INTEGER NOT NULL DEFAULT 0,
|
|
14330
|
+
updated_at TEXT NOT NULL
|
|
14331
|
+
)
|
|
14332
|
+
`);
|
|
14333
|
+
});
|
|
14334
|
+
|
|
14309
14335
|
// ../../packages/core/src/topics/lifecycle.ts
|
|
14310
14336
|
var exports_lifecycle = {};
|
|
14311
14337
|
__export(exports_lifecycle, {
|
|
@@ -14456,6 +14482,7 @@ async function deleteTopicCascadeImpl(topic, userId, options, deletingAncestorId
|
|
|
14456
14482
|
logger.warn({ err: err2, topicId, cwd }, "deleteTopicCascade: workspace cleanup failed");
|
|
14457
14483
|
}
|
|
14458
14484
|
deleteTopicVisuals(topicId);
|
|
14485
|
+
deleteTopicToolCapabilities(topicId);
|
|
14459
14486
|
deleteTopicArchiveState(topicId);
|
|
14460
14487
|
deleteMessagesForTopic(topicId);
|
|
14461
14488
|
deleteApiTopicConfig(topicId);
|
|
@@ -14513,6 +14540,7 @@ var init_lifecycle = __esm(async () => {
|
|
|
14513
14540
|
await init_token_stats();
|
|
14514
14541
|
await init_topic_archive();
|
|
14515
14542
|
await init_topic_archive_state();
|
|
14543
|
+
await init_topic_tool_capabilities();
|
|
14516
14544
|
TopicArchiveRequiredError = class TopicArchiveRequiredError extends Error {
|
|
14517
14545
|
code = "TOPIC_ARCHIVE_FAILED";
|
|
14518
14546
|
topicId;
|
|
@@ -15138,7 +15166,7 @@ function isVisualsShowMermaidTool(name) {
|
|
|
15138
15166
|
return isRuntimeTool(name, "show_mermaid");
|
|
15139
15167
|
}
|
|
15140
15168
|
function isVisualsShowImageTool(name) {
|
|
15141
|
-
return isRuntimeTool(name, "show_image");
|
|
15169
|
+
return isRuntimeTool(name, "show_image") || isRuntimeTool(name, "show_png");
|
|
15142
15170
|
}
|
|
15143
15171
|
function isVisualsShowVideoTool(name) {
|
|
15144
15172
|
return isRuntimeTool(name, "show_video");
|
|
@@ -16495,8 +16523,9 @@ function startAiTurn(params) {
|
|
|
16495
16523
|
const cwd = params.cwd;
|
|
16496
16524
|
const sessionName = params.sessionName ?? topic.title;
|
|
16497
16525
|
const sessionType = params.sessionType;
|
|
16498
|
-
const
|
|
16499
|
-
const
|
|
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;
|
|
16500
16529
|
const onSessionId = params.onSessionId;
|
|
16501
16530
|
const onSessionReset = params.onSessionReset;
|
|
16502
16531
|
const bridgeSessionFromHistory = params.bridgeSessionFromHistory === true;
|
|
@@ -17246,6 +17275,7 @@ var init_turn_runner = __esm(async () => {
|
|
|
17246
17275
|
await init_runtime_leases();
|
|
17247
17276
|
await init_runtime_topic_state();
|
|
17248
17277
|
await init_runtime_turn_requests();
|
|
17278
|
+
await init_topic_tool_capabilities();
|
|
17249
17279
|
await init_wiki();
|
|
17250
17280
|
init_wiki_summary_names();
|
|
17251
17281
|
await init_derive();
|
|
@@ -19169,4 +19199,4 @@ export {
|
|
|
19169
19199
|
DEFAULT_SELF_CONFIG_PRODUCT
|
|
19170
19200
|
};
|
|
19171
19201
|
|
|
19172
|
-
//# debugId=
|
|
19202
|
+
//# debugId=33C1028110701DAF64756E2164756E21
|