@moxt-ai/mobius 0.0.291 → 0.0.292
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/native-history/preview-contract.d.ts +1 -0
- package/dist/acp/native-history/preview-contract.d.ts.map +1 -1
- package/dist/cli.js +14 -2
- package/dist/cli.js.map +2 -2
- package/dist/runtime/command/registry/history.d.ts.map +1 -1
- package/dist/runtime/command/registry/history.js +5 -1
- package/dist/runtime/command/registry/history.js.map +1 -1
- package/dist/runtime.js +14 -2
- package/dist/runtime.js.map +2 -2
- package/dist/session/history/session-event-store.d.ts +1 -0
- package/dist/session/history/session-event-store.d.ts.map +1 -1
- package/dist/session/history/session-event-store.js +6 -0
- package/dist/session/history/session-event-store.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@ import type { AcpAgentDefinition } from "../agent/agent-definition.ts";
|
|
|
3
3
|
import type { ProjectedToolCall } from "../tool-call-projection.ts";
|
|
4
4
|
/** One page of a saved native session's events. */
|
|
5
5
|
export interface SessionEventPage {
|
|
6
|
+
readonly throughPosition: string;
|
|
6
7
|
readonly events: readonly SessionEvent[];
|
|
7
8
|
readonly nextCursor: string | null;
|
|
8
9
|
readonly sessionGenerationId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-contract.d.ts","sourceRoot":"","sources":["../../../src/acp/native-history/preview-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,M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kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACnG;AAED;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACpB,QAAQ,CAAC,oBAAoB,EAAE,CAC3B,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE,cAAc,KACtB,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAClC;AAED,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -5398,7 +5398,7 @@ var program = new Command();
|
|
|
5398
5398
|
// package.json
|
|
5399
5399
|
var package_default = {
|
|
5400
5400
|
name: "@moxt-ai/mobius",
|
|
5401
|
-
version: "0.0.
|
|
5401
|
+
version: "0.0.292",
|
|
5402
5402
|
description: "Mobius CLI for pairing and running local AI agent services.",
|
|
5403
5403
|
type: "module",
|
|
5404
5404
|
bin: {
|
|
@@ -73018,6 +73018,9 @@ var sessionEventLogPageSchema = external_exports.object({
|
|
|
73018
73018
|
nextCursor: external_exports.string().min(1).max(512).nullable(),
|
|
73019
73019
|
sessionGenerationId: identifierStringSchema,
|
|
73020
73020
|
tailCursor: external_exports.string().max(512),
|
|
73021
|
+
// The generation-scoped live position covered by this snapshot, including
|
|
73022
|
+
// coalesced and omitted events. Absent only on older Runtime versions.
|
|
73023
|
+
throughPosition: positionSchema.optional(),
|
|
73021
73024
|
truncated: external_exports.boolean(),
|
|
73022
73025
|
version: external_exports.literal(2)
|
|
73023
73026
|
}).readonly();
|
|
@@ -88351,6 +88354,7 @@ var ProjectedSessionEvent = class {
|
|
|
88351
88354
|
};
|
|
88352
88355
|
};
|
|
88353
88356
|
var SessionEvents = class {
|
|
88357
|
+
#throughPosition = "0";
|
|
88354
88358
|
#eventIds = [];
|
|
88355
88359
|
#eventIndexById = /* @__PURE__ */ new Map();
|
|
88356
88360
|
#cachedItemsByEventId = /* @__PURE__ */ new Map();
|
|
@@ -88362,6 +88366,7 @@ var SessionEvents = class {
|
|
|
88362
88366
|
}
|
|
88363
88367
|
apply = (event, resolve20) => {
|
|
88364
88368
|
const projected = this.#projection.apply(event, resolve20);
|
|
88369
|
+
this.#throughPosition = event.position;
|
|
88365
88370
|
if (projected.kind === "replace") {
|
|
88366
88371
|
const current = this.#cachedItemsByEventId.get(projected.replacedEventId);
|
|
88367
88372
|
if (current === void 0) {
|
|
@@ -88375,6 +88380,9 @@ var SessionEvents = class {
|
|
|
88375
88380
|
this.#cachedItemsByEventId.set(projected.event.eventId, item);
|
|
88376
88381
|
this.#eventIds.push(projected.event.eventId);
|
|
88377
88382
|
};
|
|
88383
|
+
get throughPosition() {
|
|
88384
|
+
return this.#throughPosition;
|
|
88385
|
+
}
|
|
88378
88386
|
get materializedCount() {
|
|
88379
88387
|
return this.#cachedItemsByEventId.size;
|
|
88380
88388
|
}
|
|
@@ -88462,6 +88470,7 @@ function eventPage(session, sessionGenerationId, endIndex, eventLimit, read) {
|
|
|
88462
88470
|
const startIndex = Math.max(0, endIndex - eventLimit);
|
|
88463
88471
|
return {
|
|
88464
88472
|
events: read(startIndex, endIndex),
|
|
88473
|
+
throughPosition: session.throughPosition,
|
|
88465
88474
|
nextCursor: startIndex === 0 ? null : session.cursorAt(startIndex),
|
|
88466
88475
|
sessionGenerationId,
|
|
88467
88476
|
truncated: startIndex > 0
|
|
@@ -94717,8 +94726,10 @@ async function loadHistoryPage(sessionId, eventLimit, initialCursor, omitReasoni
|
|
|
94717
94726
|
let loaded = [];
|
|
94718
94727
|
let sessionGenerationId = null;
|
|
94719
94728
|
let sourceNextCursor = null;
|
|
94729
|
+
let throughPosition = null;
|
|
94720
94730
|
do {
|
|
94721
94731
|
const replay = await load(eventLimit, cursor);
|
|
94732
|
+
throughPosition ??= replay.throughPosition;
|
|
94722
94733
|
if (sessionGenerationId !== null && replay.sessionGenerationId !== sessionGenerationId) {
|
|
94723
94734
|
throw new SessionError("session_reloaded", "The Session reloaded while history was loading");
|
|
94724
94735
|
}
|
|
@@ -94744,7 +94755,7 @@ async function loadHistoryPage(sessionId, eventLimit, initialCursor, omitReasoni
|
|
|
94744
94755
|
}
|
|
94745
94756
|
cursor = sourceNextCursor;
|
|
94746
94757
|
} while (cursor !== null);
|
|
94747
|
-
if (sessionGenerationId === null) {
|
|
94758
|
+
if (sessionGenerationId === null || throughPosition === null) {
|
|
94748
94759
|
throw new SessionError("session_history_unavailable", "The Session history is unavailable");
|
|
94749
94760
|
}
|
|
94750
94761
|
const visible = omitReasoning ? omitAgentReasoning(loaded) : loaded;
|
|
@@ -94756,6 +94767,7 @@ async function loadHistoryPage(sessionId, eventLimit, initialCursor, omitReasoni
|
|
|
94756
94767
|
nextCursor,
|
|
94757
94768
|
sessionGenerationId,
|
|
94758
94769
|
tailCursor: orderedEvents.at(-1)?.event.eventId ?? "",
|
|
94770
|
+
throughPosition,
|
|
94759
94771
|
truncated: nextCursor !== null,
|
|
94760
94772
|
version: 2
|
|
94761
94773
|
},
|