worktools / worktools/hoya

[P0] 定义独立引擎 v1 执行协议与双运行时 ABI

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority:P0 type:feature
Dominant language
Rust
Stars
0
Forks
0
Avg merge
25m
Merged PRs (30d)
3

Description

用户问题与代码依据

src/main.rs 提供 /execute/js 和 /execute/wasm;响应是 success/output,缺少 runId、artifact hash 和协议版本;WASM 将 main 返回值解释为 JSON 字符串指针。

评估基线:2026-09-06,Hosta 666eca9 / Hoya 2234baa。此项记录待实现目标,不表示已完成。

验收标准

  • 在 Hoya 仓库维护版本化 schema、错误码及请求/响应 fixtures;携带 runId、runtime、artifactSha256、input、limits、capabilities,并验证实际执行内容的 hash。
  • 明确 JS main(input, ctx) 的脚本/模块形式、Promise 支持边界;明确 WASM memory、输入获取、结果指针/长度或 NUL 结束协议及 UTF-8/JSON 校验;固定一个 ABI v1,避免 Hosta 猜测返回值。
  • 两种运行时以一致的 JSON result、结构化 logs、metrics、终态和错误语义返回;缺入口、不可序列化返回值不能伪装成功。
  • 规定兼容策略、能力发现和旧端点弃用路径;Hosta 消费发布的 schema/fixtures,不复制引擎实现。

归属与范围

归属:worktools/hoya。阶段:A0 · 双运行时执行基线。维护者已确认:CLI/API 优先,前期全命令行验收,UI 先只读展示,网页交互后续评估。沿用独立 Hoya 引擎与 Hosta 控制面边界;本项不扩展到多租户、计费、DAG 或全球调度。

依赖

无,可开始。

下游验收

实施进展(2026-09-06)

PR #13(基于 #12)提供 /v1/executions、能力发现、请求/响应 schema、hash/runId 校验、统一 JSON 结果和日志。WASM ABI 使用 memory + hoya_main() 返回 NUL 结束 JSON 指针,避免 Rust main(argc,argv) 转换。JS/Rust 示例和兼容说明已补齐。14 个 Rust 测试、HTTP 测试及 Hosta 实际双运行时 CLI smoke 通过;等待 CI/评审,尚不关闭父项。

PR 跟进(2026-09-06 02:37 CST)

Hoya #13 已合并,PR 的 Rust Test、Docker 构建及合并后的 main Test 均通过;#12 也已合并。Hosta #14 当前 CI 全通过、无合并冲突,已有审查讨论均已解决。此项剩余验收仍按上面的范围继续跟踪,不因首个切片合并而提前关闭。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main.rs and the existing /execute/js and /execute/wasm entry points, then review the versioned schemas, request/response fixtures, Rust and HTTP tests, and CLI smoke coverage mentioned in the issue. Done means a fixed ABI v1, consistent JSON results, logs, metrics, terminal errors, hash/runId validation, capability discovery, and documented compatibility and deprecation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust, wasm
Domain
api, backend-api-design, cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.