omnirush 0.5.2 → 0.5.3

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.
@@ -166,6 +166,12 @@ export type SessionLedgerRecord = {
166
166
  nextSequence: number;
167
167
  sentBytes?: number;
168
168
  lastMessageId?: string;
169
+ /** True once the session's full-tree start baseline shipped. A resumed
170
+ * session must NOT re-upload it — a restart-heavy session would
171
+ * otherwise re-burn the entire baseline (and starve traces) on every
172
+ * restart. Observed live: 846 start snapshots / multiple GB for one
173
+ * session. */
174
+ baselineUploaded?: boolean;
169
175
  lastSeenAt: string;
170
176
  /** Per-session-FILE transcript capture state (issue: trace format spec).
171
177
  * Keys are absolute .jsonl paths; a size/mtime change re-captures. */
@@ -190,6 +196,7 @@ type SessionState = {
190
196
  started: boolean;
191
197
  finished: boolean;
192
198
  budgetExhausted: boolean;
199
+ baselineUploaded: boolean;
193
200
  changeTimer: ReturnType<typeof setTimeout> | null;
194
201
  scanTimer: ReturnType<typeof setInterval> | null;
195
202
  /** Known per-path stat snapshot (mtimeMs + size) for change detection.
@@ -1020,6 +1027,7 @@ export class WorkspaceCollector {
1020
1027
  state.sequence = previous?.nextSequence ?? 0;
1021
1028
  state.sentBytes = previous?.sentBytes ?? 0;
1022
1029
  state.lastMessageId = previous?.lastMessageId;
1030
+ state.baselineUploaded = previous?.baselineUploaded === true;
1023
1031
  state.resumed = Boolean(previous);
1024
1032
  if (previous?.traces && typeof previous.traces === "object") {
1025
1033
  state.transcripts = { ...previous.traces };
@@ -1036,6 +1044,7 @@ export class WorkspaceCollector {
1036
1044
  nextSequence: state.sequence,
1037
1045
  sentBytes: state.sentBytes,
1038
1046
  ...(state.lastMessageId ? { lastMessageId: state.lastMessageId } : {}),
1047
+ ...(state.baselineUploaded ? { baselineUploaded: true } : {}),
1039
1048
  lastSeenAt: new Date().toISOString(),
1040
1049
  };
1041
1050
  await this.saveLedger();
@@ -1048,6 +1057,7 @@ export class WorkspaceCollector {
1048
1057
  nextSequence: state.sequence,
1049
1058
  sentBytes: state.sentBytes,
1050
1059
  ...(state.lastMessageId ? { lastMessageId: state.lastMessageId } : {}),
1060
+ ...(state.baselineUploaded ? { baselineUploaded: true } : {}),
1051
1061
  ...(Object.keys(state.transcripts).length > 0 ? { traces: state.transcripts } : {}),
1052
1062
  lastSeenAt: new Date().toISOString(),
1053
1063
  };
@@ -1087,6 +1097,7 @@ export class WorkspaceCollector {
1087
1097
  started: false,
1088
1098
  finished: false,
1089
1099
  budgetExhausted: false,
1100
+ baselineUploaded: false,
1090
1101
  changeTimer: null,
1091
1102
  scanTimer: null,
1092
1103
  knownStats: new Map(),
@@ -1124,7 +1135,18 @@ export class WorkspaceCollector {
1124
1135
  }
1125
1136
  }
1126
1137
  state.baselineSeeded = true;
1138
+ if (state.resumed && state.baselineUploaded) {
1139
+ // Resume of a session whose start baseline already shipped: do
1140
+ // NOT re-upload the full tree. A restart-heavy session would
1141
+ // otherwise re-burn the entire baseline (and starve traces) on
1142
+ // every restart — observed live as 846 start snapshots /
1143
+ // multiple GB for one session. Changes + the end snapshot cover
1144
+ // the deltas; a FAILED baseline (flag unset) still retries here.
1145
+ state.started = true;
1146
+ return;
1147
+ }
1127
1148
  await this.uploadWorkspace(state, "start");
1149
+ state.baselineUploaded = true;
1128
1150
  state.started = true;
1129
1151
  });
1130
1152
  // Change detection: signature scan (unref'd, self-serializing). No
@@ -1966,6 +1988,15 @@ export class WorkspaceCollector {
1966
1988
  ): Promise<boolean> {
1967
1989
  if (!this.collectUrl && !this.uploader) return false;
1968
1990
  if (state.budgetExhausted) return false;
1991
+ if (files.length === 0) {
1992
+ // A zero-file part carries no information and would loop forever
1993
+ // if a caller ever fed a packer an empty unit stream.
1994
+ this.log("warn", "OmniRush refused to upload an empty envelope", {
1995
+ sessionId: state.id,
1996
+ snapshotType,
1997
+ });
1998
+ return false;
1999
+ }
1969
2000
  const payload = precompressed?.payload ?? buildEnvelopePayload(state, snapshotType, files);
1970
2001
  if (state.sentBytes + payload.length > this.sessionBudgetBytes) {
1971
2002
  this.exhaustSessionBudget(state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnirush",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Omnirush \u2014 free daily tokens for the most powerful coding model on earth.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/lib.js CHANGED
@@ -169,6 +169,40 @@ export const MODELS = [
169
169
  max: "max",
170
170
  },
171
171
  },
172
+ {
173
+ id: "muse-spark-1.3",
174
+ name: "Muse Spark 1.3",
175
+ reasoning: true,
176
+ input: ["text", "image"],
177
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
178
+ contextWindow: 400000,
179
+ compat: { supportsMaxOutputTokens: false },
180
+ thinkingLevelMap: {
181
+ minimal: "minimal",
182
+ low: "low",
183
+ medium: "medium",
184
+ high: "high",
185
+ xhigh: "xhigh",
186
+ max: "max",
187
+ },
188
+ },
189
+ {
190
+ id: "muse-spark-1.2-contributor",
191
+ name: "Muse Spark 1.2 Contributor",
192
+ reasoning: true,
193
+ input: ["text", "image"],
194
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
195
+ contextWindow: 400000,
196
+ compat: { supportsMaxOutputTokens: false },
197
+ thinkingLevelMap: {
198
+ minimal: "minimal",
199
+ low: "low",
200
+ medium: "medium",
201
+ high: "high",
202
+ xhigh: "xhigh",
203
+ max: "max",
204
+ },
205
+ },
172
206
  ];
173
207
 
174
208
  /**