@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/agent-helpers.js
CHANGED
|
@@ -5302,7 +5302,7 @@ var init_codex = __esm(async () => {
|
|
|
5302
5302
|
});
|
|
5303
5303
|
|
|
5304
5304
|
// ../../packages/core/src/version.ts
|
|
5305
|
-
var NEGOTIUM_VERSION = "0.24.
|
|
5305
|
+
var NEGOTIUM_VERSION = "0.24.1";
|
|
5306
5306
|
|
|
5307
5307
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
5308
5308
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -12878,8 +12878,8 @@ function answerToolResult(answer) {
|
|
|
12878
12878
|
return textResult("The user skipped this question. Continue using your best judgment and finish the current turn.");
|
|
12879
12879
|
}
|
|
12880
12880
|
if (answer.kind === "custom") {
|
|
12881
|
-
return textResult(`
|
|
12882
|
-
Continue from this answer and finish the current turn.`);
|
|
12881
|
+
return textResult(`The user did not pick a listed option. They typed this reply in the chat instead: "${answer.label}"
|
|
12882
|
+
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.`);
|
|
12883
12883
|
}
|
|
12884
12884
|
const description = answer.description ? `
|
|
12885
12885
|
Description: ${answer.description}` : "";
|
|
@@ -12971,6 +12971,7 @@ function createAskUserRuntime(host) {
|
|
|
12971
12971
|
id: createId(),
|
|
12972
12972
|
topicId,
|
|
12973
12973
|
authorId: userId,
|
|
12974
|
+
...options.answerMessage,
|
|
12974
12975
|
text: label,
|
|
12975
12976
|
parentId: messageId,
|
|
12976
12977
|
...existing.threadRootId ? { threadRootId: existing.threadRootId } : {},
|
|
@@ -12989,6 +12990,20 @@ function createAskUserRuntime(host) {
|
|
|
12989
12990
|
pending.resolve({ ...choice, userId, ...kind ? { kind } : {} });
|
|
12990
12991
|
return { ok: true, queryId: pending.queryId, answerMessage };
|
|
12991
12992
|
}
|
|
12993
|
+
function answerOpenQuestionWithText(topicId, text, userId, options = {}) {
|
|
12994
|
+
for (const [messageId, pending] of pendingAsks) {
|
|
12995
|
+
if (pending.topicId !== topicId)
|
|
12996
|
+
continue;
|
|
12997
|
+
const card = host.messaging.persistence.getMessage(topicId, messageId);
|
|
12998
|
+
if ((card?.threadRootId ?? undefined) !== (options.threadRootId ?? undefined))
|
|
12999
|
+
continue;
|
|
13000
|
+
return answerPendingQuestion(topicId, messageId, text, userId, {
|
|
13001
|
+
kind: "custom",
|
|
13002
|
+
...options.answerMessage ? { answerMessage: options.answerMessage } : {}
|
|
13003
|
+
});
|
|
13004
|
+
}
|
|
13005
|
+
return null;
|
|
13006
|
+
}
|
|
12992
13007
|
function cancelPendingQuestions(topicId, queryId) {
|
|
12993
13008
|
for (const [messageId, pending] of pendingAsks) {
|
|
12994
13009
|
if (pending.topicId === topicId && pending.queryId === queryId) {
|
|
@@ -13144,6 +13159,7 @@ function createAskUserRuntime(host) {
|
|
|
13144
13159
|
reconcilePendingGates,
|
|
13145
13160
|
hasPendingQuestion,
|
|
13146
13161
|
answerPendingQuestion,
|
|
13162
|
+
answerOpenQuestionWithText,
|
|
13147
13163
|
cancelPendingQuestions,
|
|
13148
13164
|
createToolDefinition
|
|
13149
13165
|
};
|
|
@@ -23918,4 +23934,4 @@ export {
|
|
|
23918
23934
|
withTaskSnapshots
|
|
23919
23935
|
};
|
|
23920
23936
|
|
|
23921
|
-
//# debugId=
|
|
23937
|
+
//# debugId=1C65A31EFCF179BC64756E2164756E21
|