negotium 0.6.1 → 0.6.2
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 +2 -1
- package/dist/agent-helpers.js.map +4 -4
- package/dist/main.js +21 -5
- package/dist/main.js.map +7 -7
- package/dist/mcp-factories.js +2 -1
- package/dist/mcp-factories.js.map +4 -4
- package/dist/runtime/src/application/submit-runtime-gateway-turn.ts +27 -8
- package/dist/runtime/src/runtime/turn-runner.ts +1 -0
- package/dist/runtime/src/runtime-gateway.ts +51 -0
- package/dist/runtime/src/storage/runtime-turn-requests.ts +1 -0
- package/dist/runtime-gateway.js +18 -1
- package/dist/runtime-gateway.js.map +3 -3
- package/dist/types/packages/core/src/runtime-gateway.d.ts +18 -0
- package/dist/types/packages/core/src/storage/runtime-turn-requests.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -19105,6 +19105,7 @@ async function drainOneDurableUserTurn() {
|
|
|
19105
19105
|
sessionType: execution?.sessionType,
|
|
19106
19106
|
visualTools: execution?.visualTools,
|
|
19107
19107
|
fileDeliveryTools: execution?.fileDeliveryTools,
|
|
19108
|
+
silent: execution?.silent,
|
|
19108
19109
|
bridgeSessionFromHistory: execution?.bridgeSessionFromHistory,
|
|
19109
19110
|
peerBridge: execution?.peerBridge,
|
|
19110
19111
|
from: execution?.from,
|
|
@@ -20954,7 +20955,16 @@ var init_runtime_gateway_submissions = __esm(async () => {
|
|
|
20954
20955
|
// ../../packages/core/src/application/submit-runtime-gateway-turn.ts
|
|
20955
20956
|
import { createHash as createHash8, randomUUID as randomUUID18 } from "crypto";
|
|
20956
20957
|
function duplicateResult(submission, params, requestId, actorUserId, payloadHash) {
|
|
20957
|
-
const message = getApiMessage(submission.topicId, submission.messageId)
|
|
20958
|
+
const message = getApiMessage(submission.topicId, submission.messageId) ?? (params.silent ? {
|
|
20959
|
+
id: submission.messageId,
|
|
20960
|
+
topicId: params.topic.id,
|
|
20961
|
+
authorId: actorUserId,
|
|
20962
|
+
authorName: params.actorLabel,
|
|
20963
|
+
sourceAdapter: "runtime-gateway",
|
|
20964
|
+
sourceMessageId: params.clientMessageId,
|
|
20965
|
+
text: params.text,
|
|
20966
|
+
createdAt: submission.createdAt
|
|
20967
|
+
} : null);
|
|
20958
20968
|
if (!message)
|
|
20959
20969
|
throw new Error("gateway submission references a missing canonical message");
|
|
20960
20970
|
if (submission.payloadHash && submission.payloadHash !== payloadHash) {
|
|
@@ -20985,6 +20995,7 @@ function gatewayPayloadHash(params, requestId, actorUserId) {
|
|
|
20985
20995
|
requestId,
|
|
20986
20996
|
params.allowAutoContinue ?? true,
|
|
20987
20997
|
params.respond ?? true,
|
|
20998
|
+
params.silent ?? false,
|
|
20988
20999
|
params.threadRootId ?? null,
|
|
20989
21000
|
params.attachments ?? []
|
|
20990
21001
|
])).digest("hex");
|
|
@@ -21032,7 +21043,8 @@ function submitRuntimeGatewayTurn(params) {
|
|
|
21032
21043
|
};
|
|
21033
21044
|
try {
|
|
21034
21045
|
db.transaction(() => {
|
|
21035
|
-
|
|
21046
|
+
if (!params.silent)
|
|
21047
|
+
appendApiMessage(message, { notify: false });
|
|
21036
21048
|
if (respond) {
|
|
21037
21049
|
mergeRuntimeUserTurnRequest({
|
|
21038
21050
|
topicId: params.topic.id,
|
|
@@ -21055,6 +21067,7 @@ function submitRuntimeGatewayTurn(params) {
|
|
|
21055
21067
|
loggedUserMessageCount: 0,
|
|
21056
21068
|
vaultUserId: params.vaultUserId,
|
|
21057
21069
|
actorUserId,
|
|
21070
|
+
silent: params.silent === true,
|
|
21058
21071
|
visualTools: params.visualTools,
|
|
21059
21072
|
fileDeliveryTools: params.fileDeliveryTools,
|
|
21060
21073
|
...params.threadRootId ? { threadRootId: params.threadRootId } : {}
|
|
@@ -21071,13 +21084,13 @@ function submitRuntimeGatewayTurn(params) {
|
|
|
21071
21084
|
messageId: message.id
|
|
21072
21085
|
}
|
|
21073
21086
|
});
|
|
21074
|
-
const messageEvent = appendRuntimeEvent("runtime-gateway-ingress", {
|
|
21087
|
+
const messageEvent = params.silent ? null : appendRuntimeEvent("runtime-gateway-ingress", {
|
|
21075
21088
|
type: "message",
|
|
21076
21089
|
topicId: params.topic.id,
|
|
21077
21090
|
payload: message
|
|
21078
21091
|
});
|
|
21079
21092
|
submission.ackCursor = acceptedEvent.seq;
|
|
21080
|
-
submission.messageCursor = messageEvent
|
|
21093
|
+
submission.messageCursor = messageEvent?.seq ?? 0;
|
|
21081
21094
|
recordRuntimeGatewaySubmission(submission);
|
|
21082
21095
|
})();
|
|
21083
21096
|
} catch {
|
|
@@ -32509,11 +32522,13 @@ function createNodeControlHandler(options) {
|
|
|
32509
32522
|
"canonical-visual-read",
|
|
32510
32523
|
"canonical-topic-list",
|
|
32511
32524
|
"canonical-topic-create",
|
|
32525
|
+
"canonical-topic-derive",
|
|
32512
32526
|
"canonical-manager-topic",
|
|
32513
32527
|
...process.env.NEGOTIUM_CRON === "0" ? [] : ["scheduler.cron.gateway.v1"],
|
|
32514
32528
|
"canonical-topic-update",
|
|
32515
32529
|
"canonical-topic-delete",
|
|
32516
32530
|
"turn-submit-silent",
|
|
32531
|
+
"turn-submit-hidden",
|
|
32517
32532
|
"canonical-history-import",
|
|
32518
32533
|
"canonical-topic-abort",
|
|
32519
32534
|
"canonical-session-reset",
|
|
@@ -32748,6 +32763,7 @@ function createNodeControlHandler(options) {
|
|
|
32748
32763
|
requestId,
|
|
32749
32764
|
allowAutoContinue: body.allowAutoContinue !== false,
|
|
32750
32765
|
respond: body.respond !== false,
|
|
32766
|
+
silent: body.silent === true,
|
|
32751
32767
|
visualTools: body.visualTools === true,
|
|
32752
32768
|
fileDeliveryTools: body.fileDeliveryTools === true,
|
|
32753
32769
|
...attachments2.length ? { attachments: attachments2 } : {},
|
|
@@ -48543,4 +48559,4 @@ switch (command) {
|
|
|
48543
48559
|
}
|
|
48544
48560
|
}
|
|
48545
48561
|
|
|
48546
|
-
//# debugId=
|
|
48562
|
+
//# debugId=51C96532F0CBBD5E64756E2164756E21
|