skip to content
$worker

memory-consolidate

v0.1.3

Scheduled hygiene for the memory worker — deterministic dedup of near-duplicate memories, applied supersede-only through the public memory functions, pinned untouchable, with catch-up-on-boot scheduling. Install, stop, or remove it without touching stored memory.

Experimental

Published as experimental by its release pipeline. It installs and resolves like any other worker, but its interface may change without notice.

iiiverified
23 installs6 in 7d2 today
install
$iii worker add memory-consolidate@0.1.3
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64 · x86

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

4

memory-consolidate::on-config-change

function

Internal: hot-reload memory-consolidate from the authoritative configuration when it changes.

request
  • idstring
response
  • okbooleanrequired

memory-consolidate::on-tick

function

Internal: schedule heartbeat (cron trigger + boot catch-up backstop). Runs a pass only when interval_hours have elapsed since the last one.

request
  • actual_timestring
  • job_idstring
  • scheduled_timestring
  • triggerstring
response
  • ranbooleanrequired

    A pass actually ran (false = not due yet or disabled).

memory-consolidate::run

function

Run one consolidation pass now (all configured banks, or one bank). Deterministic near-duplicate dedup applied strictly through memory::supersede + memory::save; pinned memories are untouchable. dry_run plans without writing.

request
  • bankstring

    Consolidate only this bank (must be in the configured allowlist, when one is set).

  • dry_runboolean

    Override the configured dry_run for this call.

response
  • banksobject[]required
    • bankstringrequired
    • cappedinteger· uintmin 0

      Work left behind by the per-run cap; the next pass picks it up.

    • errorsstring[]
    • groupsobject[]required
      • loser_idsstring[]required
      • loser_textsstring[]required

        Texts of the losers, aligned with `loser_ids` (the judge tier and human review need the words, not just ids).

      • report_onlyboolean

        True = surfaced for review only (token-set match: same words, different order — potentially different meaning). Never written automatically.

      • skipped_pinnedstring[]

        Losers left alone because they are pinned (pinned is untouchable).

      • winner_idstringrequired
      • winner_textstringrequired
    • llm_mergedinteger· uintmin 0

      Reorder groups merged after the LLM judge confirmed equivalence.

    • promotedinteger· uintmin 0

      Standing-instruction lines the judge promoted into the bank's `learned` rule.

    • reinforcedinteger· uintrequiredmin 0

      Winner reinforcements applied (one per absorbed duplicate).

    • scannedinteger· uintrequiredmin 0

      Live memories scanned.

    • supersededinteger· uintrequiredmin 0

      Supersedes actually applied (0 on dry runs).

  • checkpointedbooleanrequired

    The pass completed cleanly AND its last-run checkpoint persisted. False = the schedule will retry the pass next check.

  • dry_runbooleanrequired
  • supersededinteger· uintrequiredmin 0

    Total supersedes applied across banks this pass.

memory-consolidate::status

function

Schedule and last-pass report: enabled, interval, last run, whether a pass is due, and the most recent per-bank results.

request
empty object
response
  • dry_runbooleanrequired
  • duebooleanrequired

    A scheduled pass is overdue right now.

  • enabledbooleanrequired
  • interval_hoursinteger· uint64requiredmin 0
  • last_reportunknown
  • last_runinteger· uint64requiredmin 0

    Milliseconds since epoch of the last completed pass; 0 = never.

triggers

0
no triggers registered