SkillPedia Skills Encyclopedia
中文 EN
今日更新 2026-11-18 UTC

今天还没有新提交

查看更新动态

技能 2026-10-11 01:18 UTC

bitterbot-desktop

由提交人 VGIL77 提交,主要更新类型为:新增功能与能力扩展。提交说明:feat(memory): PLAN-55 Phase 0, owner tier and sticky forget/retire (#222)。带来了新的能力与可配置项,扩展了使用场景。

VGIL77 8f85e5f Bitterbot-AI/bitterbot-desktop

Commit提交信息原文

feat(memory): PLAN-55 Phase 0, owner tier and sticky forget/retire (#222)

* feat(memory): PLAN-55 Phase 0, owner tier and sticky forget/retire

The owner's decisions about memory now outrank the agent's and survive
re-processing of the same input.

- Ledger: new source `owner` at trust tier 3 (`user_directive` kept as an
  alias at the same tier); `agent_pin` stays at 2. `retire(key, { reason })`
  takes owner | agent | decay | hygiene: an owner retire sets the new
  `owner_retired` status and records a key/value suppression, so the same
  value is rejected from every lower tier by any path (extraction, dream
  promotion, directive answers, the agent's memory_pin) and in any case or
  whitespace variant; agent, decay and hygiene retires stay soft. New
  `unretire(key)` lifts it. Rejected re-pins are recorded as `owner_retired`
  conflicts that the directive sweep consumes without asking the owner.
- Migration v76: `memory_suppressions(id, kind, hash, created_at, reason,
  actor)`, unique on (kind, hash). Kinds: chunk_hash (sha256 of the
  normalised memory text), fact_key_value (sha256 of key NUL value,
  normalised), preference_key (category NUL key). Module
  `src/memory/memory-suppressions.ts`.
- Writers (all through owner-controls, so the RPCs get it for free): forget
  records the text hash, retireFact records the key/value, deletePreference
  records the key. Consumers: runSessionExtraction skips a forgotten fact
  chunk, pin() rejects a suppressed key/value below the owner tier,
  extractPreferences and upsertFromDirective skip a suppressed preference
  key, curiosity findings and promoted dream insights skip a forgotten text.
- RPC: memory.retireFact now goes through the owner path; new
  memory.unretireFact (admin). memory_pin retire passes reason "agent".
- Tests: owner tier and sticky retire (15), suppressions (7), migration v76
  (5), "forgotten stays forgotten after re-extraction" through the real
  runSessionExtraction (4), handler tests for retire/unretire (4).
- Docs: docs/memory/controls.md semantics tables; LIMITATIONS.md memory
  bullet rewritten to what is true now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(memory): PLAN-55 Phase 0 review round, key lock, loose hashes, owner writer

Review findings on #222, each with a test:

1. A retired row no longer locks its key: pin() treats a non-active current
   row as tier 0 for the supersede gate and records no tier_rejection, and
   sweepCanonicalConflicts consumes (without a question) any conflict whose
   key has no active belief. Live case: owner-retire an agent_pin
   identity.user.name, extraction proposes a new value -> SUPERSEDE, no
   "which is current?" offering the retired value back.
2. chunk_hash normalises loosely (lowercase, non-alphanumerics dropped,
   unicode-aware, whitespace collapsed) so a dropped full stop or a comma
   no longer lets a forgotten memory regrow; docs state the limit (a
   materially reworded memory can come back).
3. deletePreference also records a preference_value suppression (category
   + loose value, text kept in the new memory_suppressions.text column);
   extractPreferences and upsertFromDirective check key, value and
   directiveSimilarity against removed values, so "Reply in Spanish,
   always." no longer regrows always_reply_spanish.
4. pin() rejects an unknown source up front instead of reading its tier
   as undefined and bypassing every gate.
5. Owner writes are atomic: retire(owner) flips status and records the
   suppression in one savepoint; forgetMemory, retireFact, unretireFact,
   pinFact and deletePreference commit the write, its suppressions and
   the audit entry together (writeAudit throws inside the transaction).
6. editMemory records the hash (never the text) of the replaced text in
   its audit entry; forgetMemory suppresses those earlier hashes too.
7. The owner tier has a writer: memory.pinFact (admin) through
   owner-controls.pinFact, audit owner_pin_fact; a same-value owner
   confirmation raises the row to the owner tier. memory.facts takes
   status active|retired|all and returns each fact's status. MemoryView
   copy corrected; a Retired facts section with Bring back
   (memory.unretireFact) and audit words for the new events.
8. decayTick goes through retire(reason decay); RetireReason documents
   which reasons have callers; docs name the real surface per row.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>