theclawbay 0.3.64 → 0.3.65

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.
@@ -39,6 +39,7 @@ const FALLBACK_BASE_INSTRUCTIONS = `You are Codex, a coding agent based on GPT-5
39
39
  - Prefer rg or rg --files for search when available.
40
40
  - Make safe, minimal code changes that preserve user work.
41
41
  - Explain what changed and any remaining risk clearly.`;
42
+ const SEEDED_CACHE_FRESHNESS_YEARS = 10;
42
43
  function objectRecordOr(value) {
43
44
  if (typeof value === "object" && value !== null && !Array.isArray(value)) {
44
45
  return value;
@@ -239,11 +240,25 @@ function buildSeedModel(models, modelId) {
239
240
  }
240
241
  return normalizeSeedModel(null, modelId);
241
242
  }
243
+ function hasSeededTheClawBayModel(models) {
244
+ return models.some((model) => hasSeedMarker(model));
245
+ }
246
+ function nextFetchedAtIsoForDocument(doc) {
247
+ if (!hasSeededTheClawBayModel(doc.models)) {
248
+ return new Date().toISOString();
249
+ }
250
+ // Current desktop Codex builds only consult models_cache.json for custom-provider
251
+ // catalogs in API-key mode, then silently fall back to compiled OpenAI models once
252
+ // the five-minute TTL expires. Keep the seeded cache durable until setup refreshes it.
253
+ const next = new Date();
254
+ next.setUTCFullYear(next.getUTCFullYear() + SEEDED_CACHE_FRESHNESS_YEARS);
255
+ return next.toISOString();
256
+ }
242
257
  function setCacheFreshnessMetadata(doc, clientVersion) {
243
258
  let changed = false;
244
- const now = new Date().toISOString();
245
- if (doc.fetched_at !== now) {
246
- doc.fetched_at = now;
259
+ const fetchedAt = nextFetchedAtIsoForDocument(doc);
260
+ if (doc.fetched_at !== fetchedAt) {
261
+ doc.fetched_at = fetchedAt;
247
262
  changed = true;
248
263
  }
249
264
  if (clientVersion && doc.client_version !== clientVersion) {
@@ -564,7 +579,7 @@ async function ensureCodexModelCacheHasGpt54(params) {
564
579
  nextState[modelId] = fingerprintModel(seed);
565
580
  }
566
581
  const doc = {
567
- fetched_at: new Date().toISOString(),
582
+ fetched_at: nextFetchedAtIsoForDocument({ models: docModels }),
568
583
  client_version: clientVersion,
569
584
  models: docModels,
570
585
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.64",
3
+ "version": "0.3.65",
4
4
  "description": "CLI for connecting Codex, Continue, Cline, GSD, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.",
5
5
  "license": "MIT",
6
6
  "repository": {