Skip to content

feat(runtime): Phase 0 契约对齐(接口先行) #201

@Lwwww1

Description

@Lwwww1

Parent: #180

背景

#180 需要先把 runtime 的契约和状态迁移规则收敛为唯一真源,再继续推进执行闭环、日志流和子代理能力。

目标

  • 对齐 runtime 对外接口:TaskManager、Scheduler、LogReader、SubAgentCoordinator、QuotaManager。
  • 落地统一状态机规则(合法迁移、终态保护、invalid_transition)。
  • 明确并补齐 Wait 语义,同时保持上层调用兼容。

范围

  • 新增或重构状态机实现与错误码常量。
  • 提供兼容适配层,避免 app/agent/tools 一次性破坏式改动。
  • 补齐状态迁移相关单元测试。

验收标准

  1. go test ./internal/runtime -v 通过。
  2. 合法/非法迁移与终态不可再迁移测试覆盖完整。
  3. app/agent/tools 编译通过,无破坏式 API 变更。

非目标

  • 不实现完整执行调度、日志增量读取、子代理和配额控制。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions