Skip to main content

how-to-change-name

Nested system-manual reference for renaming a live POSIX agent workdir/address. Use after system-manual for the deliberately narrow suspend, no-replace rename, and resume procedure; Windows, network filesystems, and bulk address rewrites are out of scope.

설치로 이동

소스 정보

저장소
Lingtai-AI/lingtai-kernel
최근 소스 활동
2026년 7월 20일 09:34
감지된 SKILL.md 언어
영어
스타
11
포크
14

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
how-to-change-name
description
Nested system-manual reference for renaming a live POSIX agent workdir/address. Use after system-manual for the deliberately narrow suspend, no-replace rename, and resume procedure; Windows, network filesystems, and bulk address rewrites are out of scope.
version
1.0.0
last_changed_at
2026-07-20T00:00:00Z
tags
["lingtai","system-manual","posix","rename"]
related_files
["src/lingtai/intrinsic_skills/system-manual/SKILL.md","src/lingtai/intrinsic_skills/system-manual/reference/how-to-change-name/scripts/change_name.py","src/lingtai/cli.py","src/lingtai/kernel/base_agent/lifecycle.py","src/lingtai/kernel/base_agent/identity.py","tests/test_how_to_change_name.py","tests/test_how_to_change_name_e2e.py"]
maintenance
Keep this small POSIX procedure aligned with the executable's preflight, suspend, no-replace rename, and resume behavior.
# Change an agent address (POSIX v1) This changes the workdir basename and derived address, **not** the true `agent_name` or `agent_id`. It does not rewrite contacts, history, ledgers, or other agents' old addresses. ## Run Use an absolute canonical workdir path and a new safe basename: ```sh python /path/to/change_name.py /absolute/old-address new-address ``` The default command first performs a read-only preflight, then starts a detached supervisor so suspending the agent cannot kill the rename operation. Its log starts at `old-address/logs/change-name.log` and moves with the directory. An external operator can wait for the final result with `--foreground`. ## V1 contract The helper is POSIX-only and requires a local, live agent with a fresh heartbeat, held lease, exactly one `python -m lingtai run <old>` process, strict-JSON `init.json`, matching `manifest.agent_name`, and an absolute `venv_path` that can import `lingtai`. Its import probe sets `PYTHONDONTWRITEBYTECODE=1`. It then: 1. touches `.suspend` and waits for the exact process to disappear, heartbeat to go stale, and lease to release; a failed `ps` scan is a failure, never proof that the process is absent; 2. renames once with Linux `renameat2(RENAME_NOREPLACE)` or macOS `renamex_np(RENAME_EXCL)`, so a destination that appears after preflight is never replaced; 3. rebases an in-workdir `venv_path`, changes only `.agent.json` `address`, and starts the rebased runtime; and 4. requires the new exact process, a post-launch heartbeat, and unchanged `agent_id`/`agent_name` before reporting success. There is no copy/delete fallback, automatic rollback, venv creation, or repair of unrelated config paths. A missing/invalid old path never writes to a pre-existing destination. ## Recover honestly Before rename failure leaves the old directory in place; it may be suspended, so restart that same old path before retrying. After rename failure leaves the new directory in place and the log there; inspect and repair that new path. Do not retry against a missing old path or delete either directory automatically.
GitHub에서 보기