nemo-relay-migrate-from-flow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMigrate From NeMo Flow To NeMo Relay
从NeMo Flow迁移至NeMo Relay
Use this skill when a user has existing NeMo Flow code or documentation and
wants it converted to NeMo Relay. Treat the migration as a mechanical rename
plus language-specific validation, not a behavior rewrite.
Keep compatibility exceptions explicit before applying broad renames.
当用户拥有现有NeMo Flow代码或文档并希望转换为NeMo Relay时,可使用本技能。迁移过程仅需执行机械重命名及特定语言的验证,无需改写行为逻辑。在进行大范围重命名前,需明确标注兼容性例外情况。
Default Workflow
默认工作流
- Inspect the working tree and identify touched surfaces: Rust, Python, Node.js, Go, C FFI, CLI/config, docs, or integrations.
- Resolve to the absolute directory containing this
SKILL_DIRandSKILL.mdto the source repository or target project. Run the bundled helper in dry-run mode before editing:TARGET_PATHpython3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" --rename-paths - Review the reported text edits, path renames, and legacy project
configuration warnings with the user. Do not migrate project-local
or
.nemo-flow/config.tomlinto.nemo-flow/plugins.toml. Move those settings manually to a supported user or explicit configuration path after review..nemo-relay - Obtain explicit confirmation for the resolved target root, then rerun with
,
--write, and--rename-paths.--confirm-root "$TARGET_PATH" - Apply language-specific cleanup for package manager lockfiles, generated artifacts, and public API examples.
- Search for remaining Flow names and verify the affected language surfaces.
- 检查工作目录并确定涉及的层面:Rust、Python、Node.js、Go、C FFI、CLI/配置、文档或集成。
- 将解析为包含此
SKILL_DIR的绝对目录,将SKILL.md解析为源仓库或目标项目。在编辑前以试运行模式运行内置辅助工具:TARGET_PATHpython3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" --rename-paths - 与用户一同审查报告的文本编辑、路径重命名以及遗留项目配置警告。请勿将项目本地的或
.nemo-flow/config.toml迁移至.nemo-flow/plugins.toml目录。审查完成后,手动将这些设置移至受支持的用户配置路径或显式配置路径。.nemo-relay - 获取用户对已解析目标根目录的明确确认,然后添加、
--write和--rename-paths参数重新运行工具。--confirm-root "$TARGET_PATH" - 针对包管理器锁定文件、生成的产物以及公开API示例,执行特定语言的清理操作。
- 搜索剩余的Flow相关命名,并验证受影响的语言层面。
Mechanical Rename Map
机械重命名映射
- Brand and repository: ->
NeMo Flow,NeMo Relay->NeMo-FlowNeMo-Relay - Python: ->
nemo-flow,nemo-relay->nemo_flow,nemo_relay->python/nemo_flowpython/nemo_relay - Rust: ->
nemo-flow,nemo-relay->nemo-flow-adaptive,nemo-relay-adaptive->nemo_flow::nemo_relay:: - Node.js: ->
nemo-flow-node, including related entry points such asnemo-relay-node,/typed,/plugin, and/adaptive/observability - Go: ->
github.com/NVIDIA/NeMo-Flow/go/nemo_flow, package aliasesgithub.com/NVIDIA/NeMo-Relay/go/nemo_relay->nemo_flow, and source directoriesnemo_relay->go/nemo_flowgo/nemo_relay - C FFI: ->
nemo_flow.h,nemo_relay.h->nemo_flow_*,nemo_relay_*->NemoFlow*, andNemoRelay*->NEMO_FLOW_*NEMO_RELAY_* - CLI/config: ->
nemo-flow,nemo-relay->~/.config/nemo-flow,~/.config/nemo-relay->NEMO_FLOW_*, andNEMO_RELAY_*->x-nemo-flow-*. Do not blindly rename project-localx-nemo-relay-*or.nemo-flow/config.tomlinto.nemo-flow/plugins.toml; those files require manual migration to a supported user or explicit configuration path..nemo-relay
Do not replace bare , , or . Those can be domain words
or intentional compatibility names.
flowFlowFlowError- 品牌与仓库:->
NeMo Flow,NeMo Relay->NeMo-FlowNeMo-Relay - Python:->
nemo-flow,nemo-relay->nemo_flow,nemo_relay->python/nemo_flowpython/nemo_relay - Rust:->
nemo-flow,nemo-relay->nemo-flow-adaptive,nemo-relay-adaptive->nemo_flow::nemo_relay:: - Node.js:->
nemo-flow-node,包括相关入口点如nemo-relay-node、/typed、/plugin和/adaptive/observability - Go:->
github.com/NVIDIA/NeMo-Flow/go/nemo_flow,包别名github.com/NVIDIA/NeMo-Relay/go/nemo_relay->nemo_flow,源目录nemo_relay->go/nemo_flowgo/nemo_relay - C FFI:->
nemo_flow.h,nemo_relay.h->nemo_flow_*,nemo_relay_*->NemoFlow*,NemoRelay*->NEMO_FLOW_*NEMO_RELAY_* - CLI/配置:->
nemo-flow,nemo-relay->~/.config/nemo-flow,~/.config/nemo-relay->NEMO_FLOW_*,NEMO_RELAY_*->x-nemo-flow-*。请勿盲目将项目本地的x-nemo-relay-*或.nemo-flow/config.toml重命名至.nemo-flow/plugins.toml;这些文件需要手动迁移至受支持的用户配置路径或显式配置路径。.nemo-relay
请勿替换单独的、或,这些可能是领域词汇或有意保留的兼容命名。
flowFlowFlowErrorLanguage Cleanup
语言清理
- Python: update , imports, type stubs, integration package paths, extras, and native module names. Regenerate or refresh lockfiles with the user's package workflow after source edits.
pyproject.toml - Rust: update crate names, workspace dependencies, package references, and
Cargo.tomlimports. Let Cargo regenerateuse nemo_relay::...when dependencies changed.Cargo.lock - Node.js: update , workspace names, package-lock entries, native addon artifact names, and imports from
package.json. Run the package manager to refresh locks.nemo-relay-node - Go: update , import paths, package declarations, aliases, and any local directory layout under
go.mod.go/nemo_relay - C FFI: update header includes, exported symbol names, status and callback type names, macro constants, loader paths, and downstream bindings.
- Docs and examples: update badges, package install commands, repository links, hosted docs URLs, CLI commands, config paths, and integration names.
- Python:更新、导入语句、类型存根、集成包路径、额外依赖项以及原生模块名称。源代码编辑完成后,使用用户的包管理流程重新生成或刷新锁定文件。
pyproject.toml - Rust:更新中的 crate 名称、工作区依赖项、包引用以及
Cargo.toml导入语句。当依赖项变更时,让Cargo重新生成use nemo_relay::...。Cargo.lock - Node.js:更新、工作区名称、package-lock条目、原生插件产物名称以及来自
package.json的导入。运行包管理器以刷新锁定文件。nemo-relay-node - Go:更新、导入路径、包声明、别名以及
go.mod下的任何本地目录布局。go/nemo_relay - C FFI:更新头文件引用、导出符号名称、状态与回调类型名称、宏常量、加载器路径以及下游绑定。
- 文档与示例:更新徽章、包安装命令、仓库链接、托管文档URL、CLI命令、配置路径以及集成名称。
Automation Helper
自动化辅助工具
Use for first-pass edits. The
helper:
$SKILL_DIR/scripts/migrate_from_nemo_flow.py- runs as a dry run unless is passed
--write - skips common vendor, build, cache, and generated directories
- skips lockfiles unless is passed
--include-lockfiles - skips symbolic links and credential-bearing dotenv files
- detects project-local and
.nemo-flow/config.toml, leaves them unchanged, and reports that they require manual migration to a supported user or explicit configuration path.nemo-flow/plugins.toml - requires the reviewed target root to be repeated with before writing, and refuses filesystem-root or home-directory writes
--confirm-root - anchors writes and renames to verified directory handles without following symbolic links, and refuses write mode on platforms that cannot provide those guarantees
- uses atomic no-replace path renames and exits nonzero when any requested mutation fails
- can report or perform path renames with
--rename-paths - rewrites only explicit NeMo Flow identifiers, package names, repository names, config paths, headers, environment variables, and FFI type prefixes
The helper does not classify arbitrary JSON, YAML, TOML, or INI files as secret.
Review every configuration file in the dry-run report. If any reported file is
unreviewed or credential-bearing, do not use on that root. Apply the
reviewed changes manually and leave secret-bearing files untouched without
reading or displaying their values.
--writeSet shell-safe absolute paths before invoking the helper. Replace the example
values with the resolved skill directory and either the source repository or the
user's target project:
bash
SKILL_DIR="/resolved/absolute/path/to/nemo-relay-migrate-from-flow"
TARGET_PATH="/resolved/absolute/path/to/target-project"
python3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" --rename-paths
python3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" \
--write --rename-paths --confirm-root "$TARGET_PATH"Use only when the user wants lockfiles edited directly;
otherwise regenerate them with Cargo, uv/pip, npm, or Go tooling.
--include-lockfiles使用进行首轮编辑。该辅助工具:
$SKILL_DIR/scripts/migrate_from_nemo_flow.py- 除非传入参数,否则以试运行模式运行
--write - 跳过常见的供应商目录、构建目录、缓存目录和生成目录
- 除非传入参数,否则跳过锁定文件
--include-lockfiles - 跳过符号链接和包含凭证的dotenv文件
- 检测项目本地的和
.nemo-flow/config.toml,保持其不变,并报告这些文件需要手动迁移至受支持的用户配置路径或显式配置路径.nemo-flow/plugins.toml - 在写入前,要求通过参数重复确认已审查的目标根目录,拒绝对文件系统根目录或主目录进行写入
--confirm-root - 将写入和重命名操作锚定至已验证的目录句柄,不跟随符号链接,在无法提供此类保证的平台上拒绝写入模式
- 使用原子非替换路径重命名,当任何请求的变更失败时返回非零退出码
- 可通过参数报告或执行路径重命名
--rename-paths - 仅重写明确的NeMo Flow标识符、包名称、仓库名称、配置路径、头文件、环境变量以及FFI类型前缀
该辅助工具不会将任意JSON、YAML、TOML或INI文件归类为机密文件。请审查试运行报告中的每一个配置文件。如果任何报告的文件未经过审查或包含凭证,请不要对该根目录使用参数。手动应用已审查的变更,且不读取或显示包含凭证的文件内容。
--write在调用辅助工具前设置安全的Shell绝对路径。将示例值替换为已解析的技能目录以及源仓库或用户的目标项目:
bash
SKILL_DIR="/resolved/absolute/path/to/nemo-relay-migrate-from-flow"
TARGET_PATH="/resolved/absolute/path/to/target-project"
python3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" --rename-paths
python3 "$SKILL_DIR/scripts/migrate_from_nemo_flow.py" "$TARGET_PATH" \
--write --rename-paths --confirm-root "$TARGET_PATH"仅当用户希望直接编辑锁定文件时才使用参数;否则使用Cargo、uv/pip、npm或Go工具重新生成锁定文件。
--include-lockfilesVerification
验证
- Search for remaining explicit Flow identifiers:
rg -n "NeMo Flow|NeMo-Flow|nemo_flow|nemo-flow|NEMO_FLOW|NemoFlow|nemo_flow\\.h|nemo_flow_" - Run targeted tests for every affected language surface.
- For Rust changes, run or the repository's Rust test recipe.
cargo test - For Python changes, run the relevant import check and tests in the target environment.
- For Node.js changes, run package install, type checks, and package tests.
- For Go changes, run from the updated module.
go test ./... - For docs-only migrations, build or link-check docs if the site navigation, install commands, or API references changed.
- 搜索剩余的明确Flow标识符:
rg -n "NeMo Flow|NeMo-Flow|nemo_flow|nemo-flow|NEMO_FLOW|NemoFlow|nemo_flow\\.h|nemo_flow_" - 针对每个受影响的语言层面运行针对性测试。
- 对于Rust变更,运行或仓库的Rust测试脚本。
cargo test - 对于Python变更,在目标环境中运行相关的导入检查和测试。
- 对于Node.js变更,运行包安装、类型检查和包测试。
- 对于Go变更,在更新后的模块中运行。
go test ./... - 对于仅涉及文档的迁移,如果站点导航、安装命令或API引用发生变更,请构建文档或进行链接检查。
Related Skills
相关技能
nemo-relay-get-startednemo-relay-instrument-callsnemo-relay-debug-runtime-integration
nemo-relay-get-startednemo-relay-instrument-callsnemo-relay-debug-runtime-integration