提交图

12 提交

作者 SHA1 备注 提交日期
424be44d5e feat(p5): attest protected prompt and bridge sinks 2026-07-30 01:12:38 +08:00
23c57cc84f feat: add P3 orchestration and P4 shadow settlement 2026-07-29 21:32:53 +08:00
2d4d6a7cb8 feat: complete unified person P0-P2 bridge 2026-07-28 01:40:17 +08:00
589a4ce39a fix: settle windows from a durable cursor, align idempotency keys and clocks
_agenda_closed_windows scanned a fixed -3..+1 day range. Past three days of
downtime the missed windows were never settled and left no trace -- "zero
snapshots" and "not due yet" look identical from the data, which is why this
sat in the backlog for four rounds. It now scans forward from a persisted
agenda_last_settled cursor, falling back to the old three days when the cursor
is absent. Catch-up is capped at 30 days and says so in the log rather than
truncating silently. The cursor advances only after both the snapshot and the
reconciliation are written, and never moves backwards.

Two long-deferred contract deviations went with it. reconciliation_id already
carries its own "reconciliation:" prefix and got another one on top; window
snapshots used the internal snapshot id as a business key. Both now go through
_bot_personal_window_key and match the formats the frozen contract recommends.
Records already stored keep their old keys -- settlements and snapshots are
terminal per-window writes, so there is nothing left to update.

The outbox called datetime.now() directly while window attribution used the
plugin's _environment_now. The now parameter had been there all along and no
caller passed it, which is more hidden than not having it at all. All eight
call sites now pass the plugin clock; the test asserts a 2031 timestamp so a
system-clock regression cannot pass.

Companion suite 231 passed, joint E2E 135/135. VM restarted clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:09:11 +08:00
2518f7b6bf fix: make the daily plan chain survive startup timing and same-day rewrites
Two defects that only showed up on the real machine, both of which left the
schedule frozen on a fallback plan with nothing in the logs to say so.

The plugin asked for a chat provider 0.8s before AstrBot finished loading
them, wrote a template fallback, and stamped it with today's date -- so the
next 24 hours never retried. Resolution now falls back through get_config()
(4.26.6's Context exposes nothing else) and validates the configured id with
get_provider_by_id, because a configured default is not a loaded instance.
When nothing is ready yet the round is skipped instead of downgraded, up to
DAILY_PLAN_PROVIDER_MAX_WAITS rounds.

Once the model recovered, the real plan still could not reach the archive:
the idempotency key is always daily_plan:<date> but the plan dict never
carried a version, so every rewrite re-sent v1 and the memory side rejected
it as version_conflict. The companion swallowed that -- outbox state is only
touched when enqueue accepts, and a same key/version enqueue does not. Plans
now carry a version watermark drawn from both daily_plan and its history, and
any ok=False archive response logs a warning regardless of outbox state.

Verified on the VM: provider wait counted once and no fallback written, plan
generated at v2 with 10 segments from the model, and the stored record
upserted from the 8-segment fallback to the same v2 content.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 04:16:06 +08:00
agent-bot
fa0241ff99 fix: decouple MemoryCompanion bridge from LivingMemory switch; drop LivingMemory
关键修复:_memory_companion_bridge() 此前以 enable_livingmemory_integration
为总闸,而运维版把该开关硬编码成 False(原意只是「VM 不用 LivingMemory」),
把唯一长期记忆源一起关掉——Bot 个人归档链路在 VM 上整条静默停摆,
记忆库零条记录,页面显示「记忆插件 暂不可用」。改用独立的
enable_memory_companion_bridge(默认开启)。

同时删除全部 LivingMemory 代码:integration_status 的 7 个函数、
page_api 的 9 个函数与路由、main 的提示词槽位/关系网触发/状态命令/
WAL 候选路径/命令别名、group_observation 的群聊指引。

测试 178 项通过(新增 4 项钉住开关拆分与代码零残留)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 02:11:18 +08:00
agent-bot
85d5069bbd feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract
M6.1.3-R2 非五类兼容(阻断修复):DTO date 缺失时从 occurred_at 派生,
刻意不做时区换算以与 _infer_window 同一时钟;calendar_event 取 start_at、
creative_progress 取 project.updated_at;未知 kind 不再默认 bot_observed_activity;
capture_hard_fact L4→L3;TYPE_CONTRACTS 覆盖全部 12 类,修复非五类 source_kind
兜底成 observed 污染本地记录;proactive_message 的 image_path 改为 has_image+
image_name(原样透传会被自身隐私校验整条静默丢弃);snapshot/daily_plan 透传 version。

M6.1.4 创作/媒体/主观分域:creative_progress 补 chunk 形参(生产调用点一直 TypeError
导致创作推进整步被阻断)并只留里程碑摘要;photo_generation 改为媒体索引
(原 payload 带 prompt 键与绝对路径,100% 静默丢弃);幂等键纳入隐私校验;
禁用键清单收窄,放行媒体标识键;两条 Bridge 路径统一送 body payload。

M6.1.5 Bot 专用检索 Profiles:按 Profile 分槽注入,固定槽位与条数、跨槽去重、
声明当前以本地运行态为准;旧版记忆插件回退通用检索。

M6.1.6 分层只读 API:新增 build_agenda_runtime_view 与 GET /agenda/runtime,
记忆插件停用时仍完整返回并标降级。

M6.1.7 隐私与残余收口:DTO 新增 contexts 禁用键;已删除娱乐功能(qzone/news/
web_exploration)的残余配置入口从展示面隐藏,旧值保留不删。

测试:174 项通过(pytest 与 unittest 双口径)。联合 E2E 135 项全部通过。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:37:40 +08:00
0e0db82519 feat: link bot personal memory bridge 2026-07-26 03:14:03 +08:00
7b68b0625c feat: isolate bot self storage from user memory 2026-07-25 23:22:41 +08:00
0e2848db14 feat: add temporal companion calendar 2026-07-25 01:35:56 +08:00
f496570b30 feat: initialize operations companion branch 2026-07-24 00:41:00 +08:00
6eaf1b7634 chore: import companion baseline 2026-07-24 00:25:43 +08:00