@moxt-ai/mobius 0.0.405 → 0.0.409
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/{chunk-2BOWMHCH.js → chunk-PAJOMX6L.js} +36 -31
- package/dist/{chunk-2BOWMHCH.js.map → chunk-PAJOMX6L.js.map} +3 -3
- package/dist/{chunk-CVS27UI7.js → chunk-SEIA72PR.js} +2 -2
- package/dist/{chunk-CVS27UI7.js.map → chunk-SEIA72PR.js.map} +1 -1
- package/dist/{cli-PLLSZH6C.js → cli-4IAWYEUO.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/engine/runtime/run.d.ts.map +1 -1
- package/dist/engine/runtime/run.js +0 -1
- package/dist/engine/runtime/run.js.map +1 -1
- package/dist/engine/session/api/session-layer.d.ts +0 -1
- package/dist/engine/session/api/session-layer.d.ts.map +1 -1
- package/dist/engine/session/api/session-layer.js +5 -8
- package/dist/engine/session/api/session-layer.js.map +1 -1
- package/dist/engine/session/live/session-restore.d.ts.map +1 -1
- package/dist/engine/session/live/session-restore.js +30 -18
- package/dist/engine/session/live/session-restore.js.map +1 -1
- package/dist/engine/session/turn/execution-receipts.d.ts +4 -1
- package/dist/engine/session/turn/execution-receipts.d.ts.map +1 -1
- package/dist/engine/session/turn/execution-receipts.js +10 -3
- package/dist/engine/session/turn/execution-receipts.js.map +1 -1
- package/dist/engine.js +2 -2
- package/package.json +1 -1
- /package/dist/{cli-PLLSZH6C.js.map → cli-4IAWYEUO.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__export,
|
|
4
4
|
__using,
|
|
5
5
|
package_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SEIA72PR.js";
|
|
7
7
|
|
|
8
8
|
// src/engine/runtime/relay/runtime-revocation.ts
|
|
9
9
|
var runtimeRevocationCloseCode = 1008;
|
|
@@ -86179,7 +86179,7 @@ async function restoreSession(session, signal, recovery, origin) {
|
|
|
86179
86179
|
if (origin !== void 0) {
|
|
86180
86180
|
session.setSessionTitle(origin.title);
|
|
86181
86181
|
}
|
|
86182
|
-
|
|
86182
|
+
const stored = session.metrics.measureSync(
|
|
86183
86183
|
"session-state-read",
|
|
86184
86184
|
() => origin?.kind === "import" ? new FoundStoredSession(
|
|
86185
86185
|
new StoredSession(
|
|
@@ -86193,9 +86193,11 @@ async function restoreSession(session, signal, recovery, origin) {
|
|
|
86193
86193
|
)
|
|
86194
86194
|
) : session.store.read(session.sessionId)
|
|
86195
86195
|
);
|
|
86196
|
-
|
|
86196
|
+
const sameConversation = (record2) => record2.agentId === session.agentId && record2.cwd === session.cwd && arraysEqual(record2.additionalDirectories, session.additionalDirectories);
|
|
86197
|
+
const conversation = stored instanceof FoundStoredSession && stored.session.prompted ? stored.session : void 0;
|
|
86198
|
+
const unprompted = origin?.kind !== "fork" && stored instanceof FoundStoredSession && !stored.session.prompted && sameConversation(stored.session) ? stored.session : void 0;
|
|
86199
|
+
if (stored instanceof FoundStoredSession && !stored.session.prompted && unprompted === void 0) {
|
|
86197
86200
|
session.store.remove(session.sessionId);
|
|
86198
|
-
stored = session.metrics.measureSync("session-state-read", () => session.store.read(session.sessionId));
|
|
86199
86201
|
}
|
|
86200
86202
|
const forkSource = origin?.kind === "fork" ? session.store.findNative(session.agentId, origin.nativeSessionId)[0] : void 0;
|
|
86201
86203
|
let opened;
|
|
@@ -86232,10 +86234,10 @@ async function restoreSession(session, signal, recovery, origin) {
|
|
|
86232
86234
|
session.startExecutionOnlyCapture();
|
|
86233
86235
|
}
|
|
86234
86236
|
opened = forked;
|
|
86235
|
-
} else if (
|
|
86236
|
-
session.selectNativeSession(
|
|
86237
|
-
session.setPrompted(
|
|
86238
|
-
session.setSessionTitle(
|
|
86237
|
+
} else if (conversation !== void 0 && sameConversation(conversation)) {
|
|
86238
|
+
session.selectNativeSession(conversation.nativeSessionId);
|
|
86239
|
+
session.setPrompted(conversation.prompted);
|
|
86240
|
+
session.setSessionTitle(conversation.title);
|
|
86239
86241
|
session.setRestored(true);
|
|
86240
86242
|
if (recovery.kind === "history-required") {
|
|
86241
86243
|
if (!session.capabilities.loadSession) {
|
|
@@ -86279,15 +86281,15 @@ async function restoreSession(session, signal, recovery, origin) {
|
|
|
86279
86281
|
);
|
|
86280
86282
|
}
|
|
86281
86283
|
} else {
|
|
86282
|
-
if (
|
|
86283
|
-
|
|
86284
|
-
|
|
86285
|
-
|
|
86286
|
-
|
|
86287
|
-
|
|
86288
|
-
|
|
86289
|
-
|
|
86290
|
-
session.
|
|
86284
|
+
if (conversation !== void 0) {
|
|
86285
|
+
throw new AcpExecutionError(
|
|
86286
|
+
"The agent or workspace cannot change after a conversation has started",
|
|
86287
|
+
{},
|
|
86288
|
+
"session_identity_mismatch"
|
|
86289
|
+
);
|
|
86290
|
+
}
|
|
86291
|
+
if (unprompted !== void 0) {
|
|
86292
|
+
session.setSessionTitle(unprompted.title);
|
|
86291
86293
|
}
|
|
86292
86294
|
const created = await session.metrics.measure("session-new", async () => await session.createSession(signal));
|
|
86293
86295
|
session.selectNativeSession(created.nativeSessionId);
|
|
@@ -86300,12 +86302,14 @@ async function restoreSession(session, signal, recovery, origin) {
|
|
|
86300
86302
|
session.applySessionOpened(opened);
|
|
86301
86303
|
if (forkSource !== void 0) {
|
|
86302
86304
|
await session.restoreStoredConfigurations(forkSource, signal, "fork");
|
|
86303
|
-
} else if (
|
|
86304
|
-
await session.restoreStoredConfigurations(
|
|
86305
|
+
} else if (conversation !== void 0 && session.restored) {
|
|
86306
|
+
await session.restoreStoredConfigurations(conversation, signal);
|
|
86307
|
+
} else if (unprompted !== void 0) {
|
|
86308
|
+
await session.restoreStoredConfigurations(unprompted, signal);
|
|
86305
86309
|
}
|
|
86306
86310
|
signal.throwIfAborted();
|
|
86307
86311
|
session.writeStoredSession(
|
|
86308
|
-
|
|
86312
|
+
conversation !== void 0 && session.restored ? conversation.updatedAt : (/* @__PURE__ */ new Date()).toISOString()
|
|
86309
86313
|
);
|
|
86310
86314
|
}
|
|
86311
86315
|
|
|
@@ -88899,7 +88903,10 @@ var ExecutionReceipts = class {
|
|
|
88899
88903
|
/**
|
|
88900
88904
|
* How the Session's most recently admitted turn ended. Admission order survives updates and
|
|
88901
88905
|
* restarts. Commands that never started (queued, or reserved for cancellation) are not turns,
|
|
88902
|
-
* unless they failed before starting.
|
|
88906
|
+
* unless they failed before starting. A steering command that completed as `steered` joined the
|
|
88907
|
+
* turn it steered, which reports for both; a steer not known to have joined (it failed, or a
|
|
88908
|
+
* restart interrupted it) keeps its own outcome. Undefined while the latest turn runs or none is
|
|
88909
|
+
* retained.
|
|
88903
88910
|
*/
|
|
88904
88911
|
lastTurn = (sessionId) => {
|
|
88905
88912
|
let last;
|
|
@@ -88909,8 +88916,10 @@ var ExecutionReceipts = class {
|
|
|
88909
88916
|
continue;
|
|
88910
88917
|
}
|
|
88911
88918
|
const outcome2 = this.outcome(commandId);
|
|
88912
|
-
const
|
|
88913
|
-
|
|
88919
|
+
const payload = outcome2?.type === "lifecycle-metadata" ? outcome2.payload : void 0;
|
|
88920
|
+
const failedBeforeStart = payload?.kind === "prompt.failed-before-start";
|
|
88921
|
+
const steered = payload?.kind === "prompt.completed" && promptCompletion(payload).kind === "steered";
|
|
88922
|
+
if ((executionStarted(receipt.state) || failedBeforeStart) && !steered && receipt.admissionOrder > latestOrder) {
|
|
88914
88923
|
last = commandId;
|
|
88915
88924
|
latestOrder = receipt.admissionOrder;
|
|
88916
88925
|
}
|
|
@@ -89804,13 +89813,10 @@ function buildSessionLayer(options) {
|
|
|
89804
89813
|
};
|
|
89805
89814
|
}
|
|
89806
89815
|
);
|
|
89807
|
-
const
|
|
89816
|
+
for (const { sessionId, event, recordedAt } of operations.recover()) {
|
|
89817
|
+
sink.publish(events.append(sessionId, event, recordedAt));
|
|
89818
|
+
}
|
|
89808
89819
|
return {
|
|
89809
|
-
publishRecoveredOutcomes: () => {
|
|
89810
|
-
for (const event of recoveredEvents) {
|
|
89811
|
-
sink.publish(event);
|
|
89812
|
-
}
|
|
89813
|
-
},
|
|
89814
89820
|
activeSessions,
|
|
89815
89821
|
directories,
|
|
89816
89822
|
eventProjection,
|
|
@@ -93646,7 +93652,6 @@ async function runRuntime(config2, parentSignal, timer = systemTimer, options =
|
|
|
93646
93652
|
reportUpgradeAvailability,
|
|
93647
93653
|
diagnostics,
|
|
93648
93654
|
onConnected: () => {
|
|
93649
|
-
layer.publishRecoveredOutcomes();
|
|
93650
93655
|
if (catalogPublished) {
|
|
93651
93656
|
options.onConnectionStatus?.("online");
|
|
93652
93657
|
}
|
|
@@ -93945,4 +93950,4 @@ export {
|
|
|
93945
93950
|
* MIT Licensed
|
|
93946
93951
|
*)
|
|
93947
93952
|
*/
|
|
93948
|
-
//# sourceMappingURL=chunk-
|
|
93953
|
+
//# sourceMappingURL=chunk-PAJOMX6L.js.map
|