5.6 KiB
5.6 KiB
| title | state | created_at | updated_at | assignee | queued_by | queued_at |
|---|---|---|---|---|---|---|
| llm-worker crateをllm-engineへ改名する | inprogress | 2026-06-25T12:45:38Z | 2026-06-25T13:28:20Z | null | workspace-panel | 2026-06-25T13:24:26Z |
背景
今後は旧 Pod 相当の実行単位を Worker として扱い、Runtime が複数 Worker を保持・操作する構造へ移行したい。一方、現在の crates/llm-worker は実行単位としての Worker ではなく、LLM provider request / stream parsing / tool-call loop / reasoning / usage / retry / continuation / low-level history を進める turn engine である。
このまま llm-worker::Worker という名前を残すと、今後導入する worker-runtime::Worker / Runtime scoped Worker identity と衝突し、Pod から Worker への概念移行が分かりにくくなる。責務分離自体は現在の llm-worker のままで概ね良いが、名前は実体に合わせて llm-engine へ変更する。
この Ticket では crate rename、Rust module path rename、主要型 rename、関連 procedural macro crate rename を一括で行う。中途半端に crate 名だけ変えると check が通りにくく、移行中の混乱も残るため、llm-worker -> llm-engine、llm-worker-macros -> llm-engine-macros、Worker -> Engine を同じ実装単位で完了させる。
要件
Crate / package rename
crates/llm-workerをcrates/llm-engineに rename する。crates/llm-worker-macrosをcrates/llm-engine-macrosに rename する。- Cargo package name を
llm-workerからllm-engineに変更する。 - Cargo package name を
llm-worker-macrosからllm-engine-macrosに変更する。 - Workspace
Cargo.toml、crate dependencies、imports、tests、docs、Nix packaging references を新しい crate 名に更新する。 - Rust import path は
llm_workerからllm_engineに変更する。 - Macro crate import path は
llm_worker_macrosからllm_engine_macrosに変更する。 - 旧 crate 名 compatibility alias は作らない。
Type / API rename
llm_worker::Workerをllm_engine::Engineに rename する。WorkerConfigはEngineConfigに rename する。WorkerResultはEngineRunResultまたは同等に rename する。WorkerErrorはEngineErrorに rename する。RunOutputはEngineRunOutputまたはRunOutputのままでもよいが、public API 上でWorkerという語が turn engine の主体名として残らないよう整理する。ToolDefinition as WorkerToolDefinitionのような import alias は、意味が残るならEngineToolDefinition等に更新する。- 内部 doc comment / examples / tests の「Worker」は、実行単位としての Worker と混同しないよう
Engine/LLM engine/turn engineに更新する。
Responsibility boundary
llm-engineは Runtime / Worker identity / process lifecycle / socket protocol / session file authority を持たない。llm-engineは LLM turn engine として以下を担う。- provider request / stream handling
- normalized LLM events
- tool-call loop
- text / reasoning / tool / usage handling
- retry / continuation
- low-level history management
- callback hooks
podcrate や将来のworker-runtimecrate が、実行単位としての Worker lifecycle / Runtime scoped identity / transcript projection / API exposure を担う。- この Ticket では責務移動は最小限にし、主に naming / package boundary を整理する。
Migration scope
- Repository-wide references to
llm-worker,llm-worker-macros,llm_worker, andllm_worker::Workerare updated. - Repository-wide references to
llm_worker_macrosare updated tollm_engine_macros. podcrate usesllm_engine::Engineinternally.- Tests / fixtures / generated docs that mention the old crate/type names are updated.
- If generated lock/package files change, they are updated consistently.
- Obsolete paths are removed; no duplicate
crates/llm-workerorcrates/llm-worker-macrosdirectory remains.
Non-goals
- New
worker-runtimecrate implementation. - Pod -> Worker runtime migration.
- Backend internal Companion implementation.
- Runtime network API implementation.
- Moving session persistence / socket protocol / metadata authority into
llm-engine. - Changing provider request semantics, tool-call loop behavior, retry/continuation behavior, or history semantics beyond rename fallout.
- Backward compatibility alias for the unreleased
llm-workercrate name.
受け入れ条件
crates/llm-engineandcrates/llm-engine-macrosexist;crates/llm-workerandcrates/llm-worker-macrosare gone.- Cargo package names and crate import paths are
llm-engine/llm_engineandllm-engine-macros/llm_engine_macros. - Public turn-engine type is
llm_engine::Engine, notllm_engine::Worker. - Public config/result/error names no longer use
Workerfor the LLM turn engine concept. - Repository-wide references to
llm-worker/llm-worker-macros/llm_worker/llm_worker_macrosare gone except migration notes or changelog-like context where intentionally retained. podand dependent crates compile againstllm_engine::Engine.- Existing behavior of provider streaming, tool-call loop, history append callbacks, retry/continuation, and usage events is unchanged except for names.
- Docs / comments that define the new WorkerRuntime direction no longer conflict with the LLM engine naming.
cargo test -p llm-enginepasses.cargo test -p podpasses.cargo check -p yoipasses.git diff --checkpasses.nix build .#yoi --no-linkpasses.