@ours.network/fleet 1.2.0-nightly.47 → 1.2.0-nightly.48

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.
@@ -1,9 +1,9 @@
1
1
  {
2
- "version": "1.2.0-nightly.47",
3
- "buildId": "bbc0b3f7e8a7",
4
- "commit": "5a8f562be01ca289722c0504f70281f2ce6d64e1",
2
+ "version": "1.2.0-nightly.48",
3
+ "buildId": "3f9ee2279814",
4
+ "commit": "c319f766cc541c22bd6327fe6cf7b9e3fdfc1945",
5
5
  "dirty": true,
6
- "builtAt": "2026-10-05T15:15:27.375Z",
6
+ "builtAt": "2026-10-06T07:13:59.670Z",
7
7
  "capabilities": [
8
8
  "managed-cli.setup-v1",
9
9
  "workspace.enroll.preserve-profile-v1",
@@ -29,6 +29,7 @@ type EventDraft = Omit<ConversationEventV1, 'schemaVersion' | 'roleId' | 'eventI
29
29
  export declare class ConversationEventStore {
30
30
  private readonly dir;
31
31
  private nextSeq;
32
+ private firstAvailableSeq?;
32
33
  private segments;
33
34
  private tail;
34
35
  private readonly listeners;
@@ -81,7 +82,6 @@ export declare class ConversationEventStore {
81
82
  private trackPromptState;
82
83
  private segmentFd;
83
84
  private writeManifest;
84
- private firstStoredSeq;
85
85
  private eventsAfter;
86
86
  private markDegraded;
87
87
  }
@@ -24,6 +24,7 @@ export class IdempotencyConflictError extends Error {
24
24
  export class ConversationEventStore {
25
25
  dir;
26
26
  nextSeq = 1;
27
+ firstAvailableSeq;
27
28
  segments = [];
28
29
  tail = [];
29
30
  listeners = new Set();
@@ -72,6 +73,7 @@ export class ConversationEventStore {
72
73
  const fd = this.segmentFd(Buffer.byteLength(line));
73
74
  writeSync(fd, line);
74
75
  fsyncSync(fd);
76
+ this.firstAvailableSeq ??= event.seq;
75
77
  this.nextSeq++;
76
78
  this.activeBytes += Buffer.byteLength(line);
77
79
  this.tail.push(event);
@@ -101,7 +103,10 @@ export class ConversationEventStore {
101
103
  const events = this.eventsAfter(after, limit + 1);
102
104
  const hasMore = events.length > limit;
103
105
  const pageEvents = hasMore ? events.slice(0, limit) : events;
104
- const firstStored = this.firstStoredSeq();
106
+ // This single-writer store never removes retained segments. Recovery and
107
+ // append already know the first readable sequence; paging the memory tail
108
+ // must not parse the first segment again, especially while skipping replay.
109
+ const firstStored = this.firstAvailableSeq;
105
110
  return {
106
111
  events: pageEvents,
107
112
  ...(firstStored !== undefined ? { firstAvailableCursor: String(firstStored) } : {}),
@@ -159,6 +164,7 @@ export class ConversationEventStore {
159
164
  let maxSeq = 0;
160
165
  for (const segment of this.segments) {
161
166
  for (const event of this.readSegment(segment)) {
167
+ this.firstAvailableSeq ??= event.seq;
162
168
  maxSeq = Math.max(maxSeq, event.seq);
163
169
  this.tail.push(event);
164
170
  if (this.tail.length > TAIL_EVENTS)
@@ -308,16 +314,6 @@ export class ConversationEventStore {
308
314
  }
309
315
  }
310
316
  // ── reads ──────────────────────────────────────────────────────────────────
311
- firstStoredSeq() {
312
- if (this.tail.length && this.tail[0].seq === 1)
313
- return 1;
314
- for (const segment of this.segments) {
315
- const events = this.readSegment(segment);
316
- if (events.length)
317
- return events[0].seq;
318
- }
319
- return this.tail[0]?.seq;
320
- }
321
317
  eventsAfter(after, limit) {
322
318
  // Serve from the in-memory tail whenever the range allows it.
323
319
  if (this.tail.length && after >= this.tail[0].seq - 1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ours.network/fleet",
3
- "version": "1.2.0-nightly.47",
3
+ "version": "1.2.0-nightly.48",
4
4
  "description": "Harness-agnostic fleet of persistent, identity-bound AI agents. Declarative fleet.yaml, managed native/ACP sessions, supervision, and ours.network messaging.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",