@otium-team/negotium 0.24.0 → 0.24.1
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 +20 -4
- package/dist/agent-helpers.js.map +4 -4
- package/dist/{chunk-3r4xfhkx.js → chunk-kfckfff2.js} +2 -2
- package/dist/{chunk-3r4xfhkx.js.map → chunk-kfckfff2.js.map} +2 -2
- package/dist/hosted-agent.js +2 -2
- package/dist/hosted-agent.js.map +2 -2
- package/dist/main.js +80 -4
- package/dist/main.js.map +6 -6
- package/dist/mcp-factories.js +20 -4
- package/dist/mcp-factories.js.map +4 -4
- package/dist/registry.js +1 -1
- package/dist/runtime/src/agents/mcp-tools/ask-user.ts +56 -1
- package/dist/runtime/src/application/submit-runtime-gateway-turn.ts +71 -0
- package/dist/runtime/src/application/turn-follow-ups.ts +7 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/agents/mcp-tools/ask-user.d.ts +14 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/mcp-factories.js
CHANGED
|
@@ -5348,7 +5348,7 @@ var init_codex = __esm(async () => {
|
|
|
5348
5348
|
});
|
|
5349
5349
|
|
|
5350
5350
|
// ../../packages/core/src/version.ts
|
|
5351
|
-
var NEGOTIUM_VERSION = "0.24.
|
|
5351
|
+
var NEGOTIUM_VERSION = "0.24.1";
|
|
5352
5352
|
|
|
5353
5353
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
5354
5354
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -18299,8 +18299,8 @@ function answerToolResult(answer) {
|
|
|
18299
18299
|
return textResult("The user skipped this question. Continue using your best judgment and finish the current turn.");
|
|
18300
18300
|
}
|
|
18301
18301
|
if (answer.kind === "custom") {
|
|
18302
|
-
return textResult(`
|
|
18303
|
-
Continue from this answer and finish the current turn.`);
|
|
18302
|
+
return textResult(`The user did not pick a listed option. They typed this reply in the chat instead: "${answer.label}"
|
|
18303
|
+
Treat it as their free-text answer to your question and read it for what it says. If it hands the decision back to you (for example "decide yourself" or "you handle it"), choose the best option yourself and go on. Continue from this answer and finish the current turn.`);
|
|
18304
18304
|
}
|
|
18305
18305
|
const description = answer.description ? `
|
|
18306
18306
|
Description: ${answer.description}` : "";
|
|
@@ -18392,6 +18392,7 @@ function createAskUserRuntime(host) {
|
|
|
18392
18392
|
id: createId(),
|
|
18393
18393
|
topicId,
|
|
18394
18394
|
authorId: userId,
|
|
18395
|
+
...options.answerMessage,
|
|
18395
18396
|
text: label,
|
|
18396
18397
|
parentId: messageId,
|
|
18397
18398
|
...existing.threadRootId ? { threadRootId: existing.threadRootId } : {},
|
|
@@ -18410,6 +18411,20 @@ function createAskUserRuntime(host) {
|
|
|
18410
18411
|
pending.resolve({ ...choice, userId, ...kind ? { kind } : {} });
|
|
18411
18412
|
return { ok: true, queryId: pending.queryId, answerMessage };
|
|
18412
18413
|
}
|
|
18414
|
+
function answerOpenQuestionWithText(topicId, text, userId, options = {}) {
|
|
18415
|
+
for (const [messageId, pending] of pendingAsks) {
|
|
18416
|
+
if (pending.topicId !== topicId)
|
|
18417
|
+
continue;
|
|
18418
|
+
const card = host.messaging.persistence.getMessage(topicId, messageId);
|
|
18419
|
+
if ((card?.threadRootId ?? undefined) !== (options.threadRootId ?? undefined))
|
|
18420
|
+
continue;
|
|
18421
|
+
return answerPendingQuestion(topicId, messageId, text, userId, {
|
|
18422
|
+
kind: "custom",
|
|
18423
|
+
...options.answerMessage ? { answerMessage: options.answerMessage } : {}
|
|
18424
|
+
});
|
|
18425
|
+
}
|
|
18426
|
+
return null;
|
|
18427
|
+
}
|
|
18413
18428
|
function cancelPendingQuestions(topicId, queryId) {
|
|
18414
18429
|
for (const [messageId, pending] of pendingAsks) {
|
|
18415
18430
|
if (pending.topicId === topicId && pending.queryId === queryId) {
|
|
@@ -18565,6 +18580,7 @@ function createAskUserRuntime(host) {
|
|
|
18565
18580
|
reconcilePendingGates,
|
|
18566
18581
|
hasPendingQuestion,
|
|
18567
18582
|
answerPendingQuestion,
|
|
18583
|
+
answerOpenQuestionWithText,
|
|
18568
18584
|
cancelPendingQuestions,
|
|
18569
18585
|
createToolDefinition
|
|
18570
18586
|
};
|
|
@@ -26601,4 +26617,4 @@ export {
|
|
|
26601
26617
|
protectMcpStdio
|
|
26602
26618
|
};
|
|
26603
26619
|
|
|
26604
|
-
//# debugId=
|
|
26620
|
+
//# debugId=9AC2A26228EF3BBD64756E2164756E21
|