iii-worker-lifecycle
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWorker Lifecycle
Worker 生命周期
Use this skill when the task is about the command surface or managed worker lifecycle.
iii worker ...当任务涉及 命令集或托管 worker 生命周期时,使用本技能。
iii worker ...Command Groups
命令组
| Command | Use when |
|---|---|
| Add a registry-managed worker and update config/lockfile when the resolver returns a graph |
| Add an OCI/container worker such as |
| Register a local worker project for managed sandbox/local development |
| Remove a worker from config and managed lifecycle |
| Reinstall a managed worker artifact without changing intent |
| Intentionally re-resolve worker pins and rewrite |
| Clear local managed-worker artifacts/cache before reinstalling or re-adding |
| Start a managed worker that is configured but not running |
| Stop a running managed worker |
| Stop then start a managed worker |
| Show configured/managed workers |
| Inspect runtime status, PID/state, and whether a worker is running |
| Read managed worker logs |
| Tail logs while debugging startup/runtime issues |
| Run a command inside a running worker environment |
| Scaffold worker metadata such as |
| Replay registry-managed workers from |
| Verify reproducibility without changing local files |
| Check that config and |
| 命令 | 使用场景 |
|---|---|
| 添加注册表托管的 worker,当解析器返回依赖图时更新配置/锁文件 |
| 添加 OCI/容器 worker,例如 |
| 注册本地 worker 项目,用于托管沙箱/本地开发 |
| 从配置和托管生命周期中移除 worker |
| 在不改变配置意图的情况下重新安装托管 worker 制品 |
| 主动重新解析 worker 版本锁定并改写 |
| 在重新安装或添加前清除本地托管 worker 的制品/缓存 |
| 启动已配置但未运行的托管 worker |
| 停止正在运行的托管 worker |
| 先停止再启动托管 worker |
| 显示已配置/托管的 worker |
| 检查运行时状态、PID/状态以及 worker 是否正在运行 |
| 查看托管 worker 的日志 |
| 在调试启动/运行时问题时跟踪日志 |
| 在运行中的 worker 环境内执行命令 |
| 为本地 worker 搭建元数据,例如 |
| 针对当前平台,从 |
| 在不修改本地文件的情况下验证可复现性 |
| 检查配置与 |
Lifecycle Decisions
生命周期决策
- Add a built-in or registry worker by name: ,
iii worker add iii-state.iii worker add image-resize@1.0.0 - Add multiple dependency workers in one command when docs show that pattern: .
iii worker add iii-state iii-stream iii-queue - Add a container worker by OCI reference when the worker ships as an image: .
iii worker add ghcr.io/my-org/my-worker:latest - Add a local worker path for development: .
iii worker add ./workers/my-worker - Use only when intentionally accepting new resolved versions.
update - Use after clone/CI restore to install artifacts from
sync.iii.lock - Use in CI before running the engine.
verify - Use or
reinstallwhen the local managed artifact is corrupt or dependency setup changed.clear
- 通过名称添加内置或注册表 worker:、
iii worker add iii-state。iii worker add image-resize@1.0.0 - 当文档显示该模式时,可在一条命令中添加多个依赖 worker:。
iii worker add iii-state iii-stream iii-queue - 当 worker 以镜像形式发布时,通过 OCI 引用添加容器 worker:。
iii worker add ghcr.io/my-org/my-worker:latest - 添加本地 worker 路径用于开发:。
iii worker add ./workers/my-worker - 仅当主动接受新的解析版本时使用 命令。
update - 在克隆/CI 恢复后使用 命令从
sync安装制品。iii.lock - 在 CI 中运行引擎前使用 命令。
verify - 当本地托管制品损坏或依赖配置变更时,使用 或
reinstall命令。clear
Local vs Registry-Managed
本地托管 vs 注册表托管
- Registry-managed workers are reproducible through and
iii.lock.iii worker sync - Local path workers are for development and may have local setup/cache state.
- Built-in workers can be referenced directly in config and may be skipped by lockfile verification.
- Registry pages may label core capabilities as workers. Still use the shown
enginecommand when instructing users.iii worker add <name> - Direct OCI refs are pinned best by immutable tags or digests; lockfile replay focuses on registry-managed worker graphs.
- 注册表托管的 worker 可通过 和
iii.lock实现复现。iii worker sync - 本地路径 worker 用于开发,可能包含本地配置/缓存状态。
- 内置 worker 可直接在配置中引用,且可能被锁文件验证跳过。
- 注册表页面可能将核心功能标记为 worker。指导用户时仍需使用所示的
engine命令。iii worker add <name> - 直接 OCI 引用最好通过不可变标签或摘要锁定;锁文件恢复主要针对注册表托管的 worker 依赖图。
Binary vs OCI Workers
二进制 Worker vs OCI Worker
- Binary workers resolve to platform-specific artifacts. records artifacts by target triple.
iii.lock - OCI/container workers run from images and can expose default config through image environment declarations.
- Managed sandbox/local workers run in isolated local environments where supported and are controlled by the same lifecycle commands.
- 二进制 worker 会解析为特定平台的制品。按目标三元组记录制品。
iii.lock - OCI/容器 worker 从镜像运行,可通过镜像环境声明暴露默认配置。
- 托管沙箱/本地 worker 在支持的情况下运行于隔离的本地环境中,并由相同的生命周期命令控制。
iii worker exec
iii worker execiii worker exec
命令
iii worker execUse like for managed workers:
execdocker execbash
iii worker exec image-resize -- ls -la /workspace
iii worker exec image-resize -e LOG_LEVEL=debug -w /tmp -- ./probe
iii worker exec image-resize --timeout 30s -- ./long-task
iii worker exec image-resize -- shTTY is auto-detected for interactive terminals. Use to force TTY and for byte-exact pipe mode.
-t--no-tty对托管 worker 使用 命令,用法类似 :
execdocker execbash
iii worker exec image-resize -- ls -la /workspace
iii worker exec image-resize -e LOG_LEVEL=debug -w /tmp -- ./probe
iii worker exec image-resize --timeout 30s -- ./long-task
iii worker exec image-resize -- sh交互式终端会自动检测 TTY。使用 强制启用 TTY,使用 启用字节精确的管道模式。
-t--no-ttyPattern Boundaries
模式边界
- For lockfile reproducibility, prefer .
iii-worker-lockfile - For engine YAML fields, prefer .
iii-engine-config - For choosing which worker provides which capability, prefer .
iii-worker-catalog - For worker RBAC and public browser access, prefer .
iii-worker-rbac
- 若涉及锁文件可复现性,优先使用 。
iii-worker-lockfile - 若涉及引擎 YAML 字段,优先使用 。
iii-engine-config - 若需选择哪个 worker 提供哪种功能,优先使用 。
iii-worker-catalog - 若涉及 worker RBAC 和公共浏览器访问,优先使用 。
iii-worker-rbac
When to Use
使用场景
- Use this skill when the task mentions commands, worker installation, worker logs, worker status, worker exec, local worker development, OCI workers, or managed worker lifecycle.
iii worker
- 当任务提及 命令、worker 安装、worker 日志、worker 状态、worker 执行、本地 worker 开发、OCI worker 或托管 worker 生命周期时,使用本技能。
iii worker
Boundaries
使用限制
- Never use old aliases such as ,
iii install, oriii uninstall; the current surface isiii list.iii worker add/remove/list - Do not generate removed service APIs or adapter-extension APIs.
- Always keep generated examples aligned with plus
config.yamlwhen registry-managed workers are involved.iii.lock
- 切勿使用旧别名,如 、
iii install或iii uninstall;当前命令集为iii list。iii worker add/remove/list - 不要生成已移除的服务 API 或适配器扩展 API。
- 当涉及注册表托管的 worker 时,生成的示例需始终与 和
config.yaml保持一致。iii.lock