Skip to content

feat(runtime-host): establish Automation authority - #1798

Merged
M4n5ter merged 3 commits into
mainfrom
feat/runtime-host-automation-authority
Aug 1, 2026
Merged

M4n5ter merged 3 commits into
mainfrom
feat/runtime-host-automation-authority

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 1, 2026

Copy link
Copy Markdown
Member
English

Summary

This PR moves Automation from process-local JSON state into Runtime Host-owned canonical authority.

  • Add a lease-bound SQLite Automation Store with full-snapshot CAS, one-time legacy automations.json cutover, and durable pending-fire identity.
  • Add bounded v0 Host query and mutation operations plus a model-facing Automation tool backed by the same authority.
  • Add Host-owned scheduling, startup recovery, execution residency, and drain behavior. Heartbeats keep their creator Session; cron fires create a fresh Session from the frozen execution template.
  • Settle each accepted fire through its exact durable AgentRun identity. Busy or temporarily unavailable targets retain the same pending fire for retry; terminal outcomes are recorded consistently.
  • Integrate Automation roots with hosted admission and recovery without enabling a new Desktop, CLI, or TUI surface. The existing embedded path remains available.

This is part of #1167.

Validation

  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npm run build
  • npm run test:scripts — 25 passed
  • npm --workspace @maka/storage run test:dist
  • npm --workspace @maka/runtime-host run test:dist
  • npm --workspace @maka/runtime run test:dist — 2,766 passed, 9 skipped
中文

摘要

此 PR 将 Automation 从进程内 JSON 状态迁移为 Runtime Host 持有的规范 authority。

  • 新增绑定 lease 的 SQLite Automation Store,支持全量快照 CAS、一次性 automations.json 旧数据切换,以及持久化的 pending fire 标识。
  • 新增有界的 v0 Host 查询与变更操作,并让模型侧 Automation 工具使用同一份 authority。
  • 由 Host 统一负责调度、启动恢复、执行驻留与 drain。Heartbeat 沿用创建它的 Session;cron 每次触发时根据冻结的执行模板创建新 Session。
  • 每个已接受的 fire 都通过其精确、持久化的 AgentRun 标识结算。目标忙碌或暂时不可用时保留同一个 pending fire 重试;终态结果采用一致的记录语义。
  • 将 Automation root 接入 Host 的 admission 与 recovery,但不启用新的 Desktop、CLI 或 TUI 界面;现有 embedded 路径继续保留。

这是 #1167 的一部分。

验证

  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npm run build
  • npm run test:scripts — 25 项通过
  • npm --workspace @maka/storage run test:dist
  • npm --workspace @maka/runtime-host run test:dist
  • npm --workspace @maka/runtime run test:dist — 2,766 项通过,9 项跳过

@M4n5ter
M4n5ter marked this pull request as ready for review August 1, 2026 13:17
@M4n5ter
M4n5ter force-pushed the feat/runtime-host-automation-authority branch from 32c9075 to 4d402dd Compare August 1, 2026 13:59
@M4n5ter
M4n5ter merged commit f4ea01c into main Aug 1, 2026
4 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-automation-authority branch August 1, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant