When the external Hindsight API is unreachable, retain requests are buffered as JSON lines in a local file and automatically flushed once connectivity is restored. Queue survives process restarts. - Only active in external API mode (local daemon handles its own persistence) - Zero dependencies — uses only Node built-ins (fs, crypto) - Bulk removal via removeMany() for O(1) file rewrites during flush - Cached item count so size() is O(1) - Configurable: retainQueuePath, retainQueueMaxAgeMs (-1 = forever), retainQueueFlushIntervalMs (default 60s) - Flushes on successful retain and on a periodic timer - All logging routed through structured logger (api.logger) Co-authored-by: billy <billy@oclaw.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Antoine Khater <ak@ptgroup.eu> |
||
|---|---|---|
| .. | ||
| client.test.ts | ||
| client.ts | ||
| derive-bank-id.test.ts | ||
| embed-manager.ts | ||
| index.test.ts | ||
| index.ts | ||
| logger.ts | ||
| manifest.test.ts | ||
| moltbot-types.ts | ||
| remote-no-llm.test.ts | ||
| retain-queue.ts | ||
| types.ts | ||