@moxt-ai/mobius 0.0.157 → 0.0.159
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/acp/agent-session.d.ts.map +1 -1
- package/dist/acp/agent-session.js +9 -1
- package/dist/acp/agent-session.js.map +1 -1
- package/dist/acp/codex/agent.js +2 -2
- package/dist/acp/codex/agent.js.map +1 -1
- package/dist/acp/codex/app-server-protocol.d.ts +6 -6
- package/dist/acp/codex/app-server-protocol.d.ts.map +1 -1
- package/dist/acp/codex/app-server-protocol.js +5 -7
- package/dist/acp/codex/app-server-protocol.js.map +1 -1
- package/dist/cli.js +18 -23
- package/dist/cli.js.map +2 -2
- package/dist/index.js +17 -22
- package/dist/index.js.map +2 -2
- package/dist/runtime.js +17 -22
- package/dist/runtime.js.map +2 -2
- package/dist/session-event-log-v2.d.ts.map +1 -1
- package/dist/session-event-log-v2.js +1 -13
- package/dist/session-event-log-v2.js.map +1 -1
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -23676,16 +23676,15 @@ var threadStartResponseSchema = external_exports.object({
|
|
|
23676
23676
|
serviceTier: boundedText(256).nullish(),
|
|
23677
23677
|
thread: external_exports.object({ id: boundedText(256) })
|
|
23678
23678
|
});
|
|
23679
|
+
var threadTurnSchema = external_exports.object({
|
|
23680
|
+
items: external_exports.array(external_exports.unknown()).max(1e5)
|
|
23681
|
+
});
|
|
23682
|
+
var threadTurnsSchema = external_exports.array(threadTurnSchema).max(1e5);
|
|
23679
23683
|
var threadLifecycleResponseSchema = external_exports.object({
|
|
23680
23684
|
model: boundedText(256).nullish(),
|
|
23681
23685
|
reasoningEffort: boundedText(256).nullish(),
|
|
23682
23686
|
serviceTier: boundedText(256).nullish(),
|
|
23683
|
-
thread: external_exports.object({ id: boundedText(256) })
|
|
23684
|
-
turns: external_exports.array(
|
|
23685
|
-
external_exports.object({
|
|
23686
|
-
items: external_exports.array(external_exports.unknown()).max(1e5)
|
|
23687
|
-
})
|
|
23688
|
-
).max(1e5).nullish()
|
|
23687
|
+
thread: external_exports.object({ id: boundedText(256), turns: threadTurnsSchema })
|
|
23689
23688
|
});
|
|
23690
23689
|
var threadResumeResponseSchema = threadLifecycleResponseSchema;
|
|
23691
23690
|
var threadForkResponseSchema = threadLifecycleResponseSchema;
|
|
@@ -24700,7 +24699,7 @@ var CodexAcpAgent = class {
|
|
|
24700
24699
|
this.#nativeSessionId = resumed.thread.id;
|
|
24701
24700
|
this.#settings.selectRestoredThread(resumed);
|
|
24702
24701
|
await this.#settings.probeCollaborationMode(this.#nativeSessionId, context.signal);
|
|
24703
|
-
await this.#replayHistory(resumed.turns);
|
|
24702
|
+
await this.#replayHistory(resumed.thread.turns);
|
|
24704
24703
|
await this.#emitAvailableCommands();
|
|
24705
24704
|
return { configOptions: this.#settings.configOptions() };
|
|
24706
24705
|
}).onRequest(methods.agent.session.fork, async (context) => {
|
|
@@ -24718,7 +24717,7 @@ var CodexAcpAgent = class {
|
|
|
24718
24717
|
this.#nativeSessionId = forked.thread.id;
|
|
24719
24718
|
this.#settings.selectRestoredThread(forked);
|
|
24720
24719
|
await this.#settings.probeCollaborationMode(this.#nativeSessionId, context.signal);
|
|
24721
|
-
await this.#replayHistory(forked.turns);
|
|
24720
|
+
await this.#replayHistory(forked.thread.turns);
|
|
24722
24721
|
await this.#emitAvailableCommands();
|
|
24723
24722
|
return { configOptions: this.#settings.configOptions(), sessionId: forked.thread.id };
|
|
24724
24723
|
}).onRequest(methods.agent.session.resume, async (context) => {
|
|
@@ -35320,6 +35319,7 @@ var AgentSession = class _AgentSession {
|
|
|
35320
35319
|
#configRevision = 0;
|
|
35321
35320
|
#configOptions = [];
|
|
35322
35321
|
#lastTerminalCommandId = null;
|
|
35322
|
+
#nativeHistoryOwnership = { kind: "unbound" };
|
|
35323
35323
|
#prompted = false;
|
|
35324
35324
|
#nativePrompt = null;
|
|
35325
35325
|
#sessionLoad = { kind: "not-requested" };
|
|
@@ -35440,6 +35440,9 @@ var AgentSession = class _AgentSession {
|
|
|
35440
35440
|
return await embedLocalHistoryImages(await loaded.history.snapshot(), signal);
|
|
35441
35441
|
};
|
|
35442
35442
|
loadHistoryEventsV2 = async (eventLimit, cursor, signal) => {
|
|
35443
|
+
if (!this.#prompted && this.#nativeHistoryOwnership.kind === "fresh-session") {
|
|
35444
|
+
return new AcpHistoryReplay().eventPage(eventLimit, cursor);
|
|
35445
|
+
}
|
|
35443
35446
|
if (!this.#capabilities.loadSession) {
|
|
35444
35447
|
throw new AcpExecutionError(
|
|
35445
35448
|
"This Agent restores context but does not provide message history.",
|
|
@@ -35729,6 +35732,7 @@ var AgentSession = class _AgentSession {
|
|
|
35729
35732
|
)
|
|
35730
35733
|
);
|
|
35731
35734
|
this.selectNativeSession(created.sessionId);
|
|
35735
|
+
this.#nativeHistoryOwnership = { kind: "fresh-session" };
|
|
35732
35736
|
lifecycleResponse = created;
|
|
35733
35737
|
}
|
|
35734
35738
|
this.#configOptions = this.#sessionConfigProtocol.normalizeLifecycle(lifecycleResponse);
|
|
@@ -36105,7 +36109,10 @@ var AgentSession = class _AgentSession {
|
|
|
36105
36109
|
onElicitation = (request, signal) => this.#interactions.onElicitation(request, signal);
|
|
36106
36110
|
onElicitationComplete = (notification) => this.#interactions.onElicitationComplete(notification);
|
|
36107
36111
|
onUpdate = (notification) => this.#updates.receive(notification);
|
|
36108
|
-
selectNativeSession = (sessionId) =>
|
|
36112
|
+
selectNativeSession = (sessionId) => {
|
|
36113
|
+
this.#updates.select(sessionId);
|
|
36114
|
+
this.#nativeHistoryOwnership = { kind: "agent-owned" };
|
|
36115
|
+
};
|
|
36109
36116
|
#processUpdate = async (notification) => {
|
|
36110
36117
|
this.assertNativeSession(notification.sessionId);
|
|
36111
36118
|
const update = notification.update;
|
|
@@ -43543,21 +43550,9 @@ var DaemonSessionEventLogV2 = class {
|
|
|
43543
43550
|
payload: { commandId: command.commandId, content, kind: "prompt.requested" },
|
|
43544
43551
|
type: "lifecycle-metadata"
|
|
43545
43552
|
});
|
|
43546
|
-
let eventTail = { event, previous: null };
|
|
43547
|
-
for (const block of content) {
|
|
43548
|
-
const userMessageEvent = this.#append(command.sessionId, {
|
|
43549
|
-
payload: {
|
|
43550
|
-
content: block,
|
|
43551
|
-
messageId: command.commandId,
|
|
43552
|
-
sessionUpdate: "user_message_chunk"
|
|
43553
|
-
},
|
|
43554
|
-
type: "acp"
|
|
43555
|
-
});
|
|
43556
|
-
eventTail = { event: userMessageEvent, previous: eventTail };
|
|
43557
|
-
}
|
|
43558
43553
|
this.#requests.set(command.commandId, {
|
|
43559
43554
|
commandId: command.commandId,
|
|
43560
|
-
eventTail,
|
|
43555
|
+
eventTail: { event, previous: null },
|
|
43561
43556
|
kind: "requested",
|
|
43562
43557
|
sessionId: command.sessionId
|
|
43563
43558
|
});
|