@moxt-ai/mobius 0.0.102 → 0.0.103
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/cli.js +12 -3
- package/dist/cli.js.map +2 -2
- package/dist/daemon-session-commands.d.ts +4 -1
- package/dist/daemon-session-commands.d.ts.map +1 -1
- package/dist/daemon-session-commands.js +3 -1
- package/dist/daemon-session-commands.js.map +1 -1
- package/dist/daemon-turn-reconciliation.d.ts +4 -1
- package/dist/daemon-turn-reconciliation.d.ts.map +1 -1
- package/dist/daemon-turn-reconciliation.js +1 -0
- package/dist/daemon-turn-reconciliation.js.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +2 -2
- package/dist/runtime.js +11 -2
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -25415,12 +25415,18 @@ function decodeSessionStartedEvent(encoded) {
|
|
|
25415
25415
|
}
|
|
25416
25416
|
function decodeAgentMessageDeltaEvent(encoded) {
|
|
25417
25417
|
const value = parseJson2(encoded);
|
|
25418
|
-
assertExactKeys(value, ["commandId", "kind", "messageId", "sessionId", "text"]);
|
|
25418
|
+
assertExactKeys(value, ["commandId", "epoch", "kind", "messageId", "sequence", "sessionId", "text"]);
|
|
25419
25419
|
assertKind(value, AGENT_MESSAGE_DELTA_KIND);
|
|
25420
|
+
const sequence = readSequence(value, "sequence");
|
|
25421
|
+
if (sequence === 0) {
|
|
25422
|
+
throw new ProtocolMessageError("Invalid live sequence");
|
|
25423
|
+
}
|
|
25420
25424
|
return {
|
|
25421
25425
|
commandId: readIdentifier(value, "commandId"),
|
|
25426
|
+
epoch: readIdentifier(value, "epoch"),
|
|
25422
25427
|
kind: AGENT_MESSAGE_DELTA_KIND,
|
|
25423
25428
|
messageId: value["messageId"] === void 0 ? "" : readText(value, "messageId", 255),
|
|
25429
|
+
sequence,
|
|
25424
25430
|
sessionId: readIdentifier(value, "sessionId"),
|
|
25425
25431
|
text: readString(value, "text", MAX_EVENT_TEXT_LENGTH)
|
|
25426
25432
|
};
|
|
@@ -33043,12 +33049,15 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
33043
33049
|
const text = new CoalescingTextPublisher(
|
|
33044
33050
|
timer,
|
|
33045
33051
|
(messageId, delta) => {
|
|
33052
|
+
const stream = recordLiveText(delta);
|
|
33046
33053
|
publisher.recordAttempt(
|
|
33047
33054
|
command.sessionId,
|
|
33048
33055
|
{
|
|
33049
33056
|
commandId: command.commandId,
|
|
33057
|
+
epoch: stream.epoch,
|
|
33050
33058
|
kind: AGENT_MESSAGE_DELTA_KIND,
|
|
33051
33059
|
messageId,
|
|
33060
|
+
sequence: stream.sequence,
|
|
33052
33061
|
sessionId: command.sessionId,
|
|
33053
33062
|
text: delta
|
|
33054
33063
|
},
|
|
@@ -33149,7 +33158,6 @@ async function executePrompt(outbox, publisher, command, config2, directories, a
|
|
|
33149
33158
|
return Promise.resolve();
|
|
33150
33159
|
},
|
|
33151
33160
|
onText: (delta, messageId) => {
|
|
33152
|
-
recordLiveText(delta);
|
|
33153
33161
|
text.record(messageId, delta);
|
|
33154
33162
|
return Promise.resolve();
|
|
33155
33163
|
},
|
|
@@ -33370,6 +33378,7 @@ var ActiveDaemonTurn = class {
|
|
|
33370
33378
|
this.#text = this.#text.slice(-ACTIVE_TURN_TEXT_LIMIT);
|
|
33371
33379
|
this.#truncated = true;
|
|
33372
33380
|
}
|
|
33381
|
+
return { epoch: this.#epoch, sequence: this.#sequence };
|
|
33373
33382
|
};
|
|
33374
33383
|
snapshot = () => this.#accepted ? {
|
|
33375
33384
|
commandId: this.command.commandId,
|