Skip to content

feat(cli): add task readiness preflight - #2524

Merged
Astro-Han merged 1 commit into
apache:mainfrom
liugddx:feat/cli-task-readiness-preflight
Aug 8, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
liugddx:feat/cli-task-readiness-preflight

Conversation

@liugddx

@liugddx liugddx commented Aug 8, 2026

Copy link
Copy Markdown
Member

English

What changed

  • Add a maka run preflight that consumes the shared task-submission readiness projection before creating a runtime context or Session.
  • Gather current authoritative inputs from the connected Runtime Host: connection catalog, credential status, and the selected workspace directory.
  • Stop only for confirmed repair_required / unavailable states and print stable blocker codes with actionable CLI repair guidance.
  • Keep unknown observations non-blocking so a temporary credential-status read failure does not invent a configuration failure.
  • Preserve the existing interactive TUI onboarding flow; successful non-interactive runs remain quiet.

First-success smoke journey

The public maka run adapter test now traverses a ready Host-owned catalog + credential preflight, creates the run context, completes one turn, prints only the final answer, and closes the shared Host connection.

Validation

  • npm --workspace maka-agent test — 344 passed
  • Core, Storage, Runtime, and Runtime Host dependency builds
  • Biome and diff checks for changed files

中文

改动内容

  • 在创建 runtime context 或 Session 之前,为 maka run 增加共享 task-submission readiness preflight。
  • 从已连接的 Runtime Host 读取当前权威输入:连接目录、凭据状态和选中的工作区目录。
  • 仅在明确为 repair_required / unavailable 时停止,并输出稳定 blocker code 与可执行的 CLI 修复指引。
  • unknown 状态保持不阻塞,credential status 暂时读取失败时不会虚构配置错误。
  • 保留现有交互式 TUI 首次配置流程;成功的非交互调用仍然保持安静。

首次成功 smoke journey

公开 maka run 适配器测试现在会经过 Host 权威连接目录与 credential preflight,创建运行上下文,完成一次 turn,仅打印最终答案,并关闭共享 Host 连接。

验证

  • npm --workspace maka-agent test — 344 个测试通过
  • Core、Storage、Runtime、Runtime Host 依赖构建通过
  • 变更文件 Biome 与 diff 检查通过

Completes the CLI delivery slice of #2497.
Related to #2469.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—this is a solid send-time preflight and the shared Host connection is handled cleanly.

Two non-blocking P3 suggestions:

  • Resolve the CLI model target once and reuse it for both readiness and context creation. Today a legacy Codex model can be normalized to ready by the preflight while the context still selects the raw model.
  • For an invalid explicit --model, tailor the repair hint from the blocker code; “repair connection” is misleading when the user only needs to choose another model.

Neither blocks this PR.

@Astro-Han
Astro-Han merged commit 6109b0e into apache:main Aug 8, 2026
11 checks passed
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.

2 participants