Refactor 导读

ACP lifecycle refactor:先抓住它真正发力的那一下

这一页不是在堆术语,它像把“ACP lifecycle refactor”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:ACP lifecycle currently works, but too much of it is inferred after the fact. Process cleanup r…。

先听这页的人话版

ACP lifecycle refactor

这一页不是在堆术语,它像把“ACP lifecycle refactor”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:ACP lifecycle currently works, but too much of it is inferred after the fact. Process cleanup r…。

如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。

原始路径:/refactor/acp 章节数量:17 查看原文

第 1 站

Start Here

这一节主要在解释“Start Here”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Start Here”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:ACP lifecycle currently works, but too much of it is inferred after the fact. Process cleanup reconstructs ownership fr…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:ACP lifecycle currently works, but too much of it is inferred after the fact. Process cleanup reconstructs ownership fr…。

原文小纸条

ACP lifecycle currently works, but too much of it is inferred after the fact. Process cleanup reconstructs ownership from PIDs, command strings, wrapper paths, and the live process table. Session visibility reconstructs ownership from session-key strings plus secondary sessions.list({ spawnedBy }) lookups. That makes narrow fixes possible, but it also makes edge cases easy to miss: PID reuse, quoted commands, adapter grandchildren, multi-gateway state roots, cancel versus close, and tree versus all visibility all become separate places to rediscover the same ownership rules.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This refactor makes ownership first-class. The goal is not a new ACP product surface; it is a safer internal contract f…。

原文小纸条

This refactor makes ownership first-class. The goal is not a new ACP product surface; it is a safer internal contract for the existing ACP and ACPX behavior.

第 2 站

Goals

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

这段在解决什么

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

为什么值得看

很多文档看起来长,其实是在防你漏掉前置条件。

真要动手时

真正照做时,先找前置条件,再找必填项,最后看验证方法。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw-owned lease. the same requester-owned session 聪明脑袋模型.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw-owned lease.

原文小纸条

OpenClaw-owned lease.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:the same requester-owned session 聪明脑袋模型.

原文小纸条

the same requester-owned session model.

像准备清单

这一串条目别硬背,把它当成“Goals”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Cleanup never signals a process unless cu…、cancel, close, and startup re对话接口ng have…、sessions_list, sessions_history, sessions…、Multi-门口的小门卫 installs cannot reap each ot…。

原文小纸条
  • Cleanup never signals a process unless current live evidence matches an
  • cancel, close, and startup reaping have distinct lifecycle intents.
  • sessions_list, sessions_history, sessions_send, and status checks use
  • Multi-gateway installs cannot reap each other's ACPX wrappers.
  • Old ACPX session records keep working during migration.
  • The runtime remains plugin-owned; core does not learn ACPX package details.

第 3 站

Non-goals

这一节主要在解释“Non-goals”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Non-goals”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像准备清单

这一串条目别硬背,把它当成“Non-goals”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Replacing ACPX or changing the public /ac…、Moving vendor-specific ACP adapter behavi…、Requiring users to manually clean state b…、Making cancel close reusable ACP sessions.

原文小纸条
  • Replacing ACPX or changing the public /acp command surface.
  • Moving vendor-specific ACP adapter behavior into core.
  • Requiring users to manually clean state before upgrading.
  • Making cancel close reusable ACP sessions.

第 4 站

门口的小门卫 Instance Identity

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

这段在解决什么

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

为什么值得看

很多文档看起来长,其实是在防你漏掉前置条件。

真要动手时

真正照做时,先找前置条件,再找必填项,最后看验证方法。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Each 门口的小门卫 process should have a stable runtime instance id: It can be generated on 门口的小门卫 startup and persisted in st…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Each 门口的小门卫 process should have a stable runtime instance id:。

原文小纸条

Each Gateway process should have a stable runtime instance id:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“type GatewayInstanceId = string;”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
type GatewayInstanceId = string;
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:It can be generated on 门口的小门卫 startup and persisted in state for the life of that install. It is not a 安全守门员 secret; it…。

原文小纸条

It can be generated on Gateway startup and persisted in state for the life of that install. It is not a security secret; it is an ownership discriminator used to avoid confusing one Gateway's ACP processes with another Gateway's processes.

第 5 站

ACP Session Ownership

这一节主要在解释“ACP Session Ownership”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“ACP Session Ownership”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Every spawned ACP session should have normalized ownership metadata: The 门口的小门卫 should return these fields on session r…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Every spawned ACP session should have normalized ownership metadata:。

原文小纸条

Every spawned ACP session should have normalized ownership metadata:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“type AcpSessionOwner = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“sessionKey”挂牌子,告诉系统它该指向“string;”。
  • 这里在给“spawnedBy?”挂牌子,告诉系统它该指向“string;”。
原文代码块
type AcpSessionOwner = {
  sessionKey: string;
  spawnedBy?: string;
  parentSessionKey?: string;
  ownerSessionKey: string;
  agentId: string;
  backend: "acpx";
  gatewayInstanceId: GatewayInstanceId;
  createdAt: number;
};
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The 门口的小门卫 should return these fields on session rows where they are known. Visibility filtering should be a pure check…。

原文小纸条

The Gateway should return these fields on session rows where they are known. Visibility filtering should be a pure check over row metadata:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“canSeeSessionRow({”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“row,”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“requesterSessionKey,”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
canSeeSessionRow({
  row,
  requesterSessionKey,
  visibility,
  a2aPolicy,
});
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:That removes hidden secondary sessions.list({ spawnedBy }) calls from visibility checks. A spawned cross-机器人朋友 ACP chil…。

原文小纸条

That removes hidden secondary sessions.list({ spawnedBy }) calls from visibility checks. A spawned cross-agent ACP child is requester-owned because the row says so, not because a second query happens to find it.

第 6 站

ACPX Process Leases

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Every generated wrapper launch should create a lease record: The wrapper process should receive the lease id and 门口的小门卫…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Every generated wrapper launch should create a lease record:。

原文小纸条

Every generated wrapper launch should create a lease record:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“type AcpxProcessLease = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“leaseId”挂牌子,告诉系统它该指向“string;”。
  • 这里在给“gatewayInstanceId”挂牌子,告诉系统它该指向“GatewayInstanceId;”。
原文代码块
type AcpxProcessLease = {
  leaseId: string;
  gatewayInstanceId: GatewayInstanceId;
  sessionKey: string;
  wrapperRoot: string;
  wrapperPath: string;
  rootPid: number;
  processGroupId?: number;
  commandHash: string;
  startedAt: number;
  state: "open" | "closing" | "closed" | "lost";
};
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The wrapper process should receive the lease id and 门口的小门卫 instance id in its environment:。

原文小纸条

The wrapper process should receive the lease id and gateway instance id in its environment:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“OPENCLAW_ACPX_LEASE_ID=...”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这一行“OPENCLAW_GATEWAY_INSTANCE_ID=...”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
OPENCLAW_ACPX_LEASE_ID=...
OPENCLAW_GATEWAY_INSTANCE_ID=...
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:When the platform allows it, verification should prefer live process metadata that cannot be confused by 魔法口令 quoting:。

原文小纸条

When the platform allows it, verification should prefer live process metadata that cannot be confused by command quoting:

像准备清单

这一串条目别硬背,把它当成“ACPX Process Leases”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:root PID still exists、live wrapper path is under wrapperRoot、process 大家一起的房间 matches the lease when av…、environment contains the expected lease i…。

原文小纸条
  • root PID still exists
  • live wrapper path is under wrapperRoot
  • process group matches the lease when available
  • environment contains the expected lease id when readable
  • command hash or executable path matches the lease
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If the live process cannot be verified, cleanup fails closed.

原文小纸条

If the live process cannot be verified, cleanup fails closed.

第 7 站

Lifecycle Controller

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Introduce one ACPX lifecycle controller that owns process leases and cleanup policy: cancelTurn requests turn cancellat…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Introduce one ACPX lifecycle controller that owns process leases and cleanup policy:。

原文小纸条

Introduce one ACPX lifecycle controller that owns process leases and cleanup policy:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“interface AcpxLifecycleController {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“ensureSession(input”挂牌子,告诉系统它该指向“AcpRuntimeEnsureInput): Promise”。
  • 这一行“AcpRuntimeHandle”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
interface AcpxLifecycleController {
  ensureSession(input: AcpRuntimeEnsureInput): Promise
AcpRuntimeHandle
;
  cancelTurn(handle: AcpRuntimeHandle): Promise<void>;
  closeSession(input: {
    handle: AcpRuntimeHandle;
    discardPersistentState?: boolean;
    reason?: string;
  }): Promise<void>;
  reapStartupOrphans(): Promise<void>;
  verifyOwnedTree(lease: AcpxProcessLease): Promise
OwnedProcessTree
;
}
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:cancelTurn requests turn cancellation only. It must not reap reusable wrapper or adapter processes.

原文小纸条

cancelTurn requests turn cancellation only. It must not reap reusable wrapper or adapter processes.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:closeSession is allowed to reap, but only after loading the session record, loading the lease, and verifying the live p…。

原文小纸条

closeSession is allowed to reap, but only after loading the session record, loading the lease, and verifying the live process tree still belongs to that lease.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:reapStartupOrphans starts from open leases in state. It may use the process table to find descendants, but it should no…。

原文小纸条

reapStartupOrphans starts from open leases in state. It may use the process table to find descendants, but it should not scan arbitrary ACP-looking commands first and then decide they are probably ours.

第 8 站

Wrapper Contract

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Generated wrappers should stay small. They should: fallback runs that is available Wrappers should not decide session p…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Generated wrappers should stay small. They should:。

原文小纸条

Generated wrappers should stay small. They should:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:fallback runs。

原文小纸条

fallback runs

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:that is available。

原文小纸条

that is available

像准备清单

这一串条目别硬背,把它当成“Wrapper Contract”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:start the adapter in a process 大家一起的房间 wh…、forward normal termination signals to the…、detect parent death、on parent death, send SIGTERM, then keep…。

原文小纸条
  • start the adapter in a process group where supported
  • forward normal termination signals to the process group
  • detect parent death
  • on parent death, send SIGTERM, then keep the wrapper alive until the SIGKILL
  • report root PID and process group id back to the lifecycle controller when
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Wrappers should not decide session policy. They only enforce local process-tree cleanup for their own adapter 大家一起的房间.

原文小纸条

Wrappers should not decide session policy. They only enforce local process-tree cleanup for their own adapter group.

第 9 站

Session Visibility Contract

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Visibility should use normalized row ownership: Rules: spawned cross-机器人朋友 rows even when general a2a is disabled. belo…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Visibility should use normalized row ownership:。

原文小纸条

Visibility should use normalized row ownership:

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“type SessionVisibilityInput = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“requesterSessionKey”挂牌子,告诉系统它该指向“string;”。
  • 这里在给“row”挂牌子,告诉系统它该指向“{”。
原文代码块
type SessionVisibilityInput = {
  requesterSessionKey: string;
  row: {
    key: string;
    agentId: string;
    ownerSessionKey?: string;
    spawnedBy?: string;
    parentSessionKey?: string;
  };
  visibility: "self" | "tree" | "agent" | "all";
  a2aPolicy: AgentToAgentPolicy;
};
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Rules:。

原文小纸条

Rules:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:spawned cross-机器人朋友 rows even when general a2a is disabled.

原文小纸条

spawned cross-agent rows even when general a2a is disabled.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:belongs to the requester.

原文小纸条

belongs to the requester.

像准备清单

这一串条目别硬背,把它当成“Session Visibility Contract”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:self: only the requester session.、tree: requester session plus rows owned b…、all: all same-机器人朋友 rows, a2a-allowed cro…、机器人朋友: same 机器人朋友 only, unless an explici…。

原文小纸条
  • self: only the requester session.
  • tree: requester session plus rows owned by or spawned from the requester.
  • all: all same-agent rows, a2a-allowed cross-agent rows, and requester-owned
  • agent: same agent only, unless an explicit owner relationship says the row
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This makes tree and all monotonic: all must not hide an owned child that tree would show.

原文小纸条

This makes tree and all monotonic: all must not hide an owned child that tree would show.

第 10 站

Phase 1: Add Identity And Leases

这一节主要在解释“Phase 1: Add Identity And Leases”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Phase 1: Add Identity And Leases”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像准备清单

这一串条目别硬背,把它当成“Phase 1: Add Identity And Leases”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Add 门口的小门卫InstanceId to 门口的小门卫 state.、Add an ACPX lease store under the ACPX st…、Write a lease before spawning a generated…、Store leaseId on new ACPX session records.

原文小纸条
  • Add gatewayInstanceId to Gateway state.
  • Add an ACPX lease store under the ACPX state directory.
  • Write a lease before spawning a generated wrapper.
  • Store leaseId on new ACPX session records.
  • Keep existing PID and command fields for old records.

第 11 站

Phase 2: Lease-First Cleanup

这一节主要在解释“Phase 2: Lease-First Cleanup”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Phase 2: Lease-First Cleanup”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像准备清单

这一串条目别硬背,把它当成“Phase 2: Lease-First Cleanup”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Change close cleanup to load leaseId firs…、Verify live process ownership against the…、Keep the current root PID and wrapper-roo…、Mark leases closed after verified cleanup.

原文小纸条
  • Change close cleanup to load leaseId first.
  • Verify live process ownership against the lease before signaling.
  • Keep the current root PID and wrapper-root fallback only for legacy records.
  • Mark leases closed after verified cleanup.
  • Mark leases lost when the process is gone before cleanup.

第 12 站

Phase 3: Lease-First Startup Re对话接口ng

这一节主要在解释“Phase 3: Lease-First Startup Re对话接口ng”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Phase 3: Lease-First Startup Re对话接口ng”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:wrapper root and 门口的小门卫 instance where possible.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:wrapper root and 门口的小门卫 instance where possible.

原文小纸条

wrapper root and Gateway instance where possible.

像准备清单

这一串条目别硬背,把它当成“Phase 3: Lease-First Startup Reaping”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Startup re对话接口ng scans open leases.、For each lease, verify the root process a…、Reap verified trees children-first.、Expire old closed and lost leases with a…。

原文小纸条
  • Startup reaping scans open leases.
  • For each lease, verify the root process and collect descendants.
  • Reap verified trees children-first.
  • Expire old closed and lost leases with a bounded retention window.
  • Keep command-marker scanning only as a temporary legacy fallback, guarded by

第 13 站

Phase 4: Session Ownership Rows

这一节主要在解释“Phase 4: Session Ownership Rows”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Phase 4: Session Ownership Rows”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:ownerSessionKey or spawnedBy.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:ownerSessionKey or spawnedBy.

原文小纸条

ownerSessionKey or spawnedBy.

像准备清单

这一串条目别硬背,把它当成“Phase 4: Session Ownership Rows”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Add ownership metadata to 门口的小门卫 session…、Teach ACPX, sub机器人朋友, background-task, an…、Convert session visibility checks to use…、Remove visibility-time secondary sessions…。

原文小纸条
  • Add ownership metadata to Gateway session rows.
  • Teach ACPX, subagent, background-task, and session-store writers to populate
  • Convert session visibility checks to use row metadata.
  • Remove visibility-time secondary sessions.list({ spawnedBy }) lookups.

第 14 站

Phase 5: Remove Legacy Heuristics

这一节主要在解释“Phase 5: Remove Legacy Heuristics”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Phase 5: Remove Legacy Heuristics”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:After one release window:。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:After one release window:。

原文小纸条

After one release window:

像准备清单

这一串条目别硬背,把它当成“Phase 5: Remove Legacy Heuristics”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:stop relying on stored root 魔法口令 strings…、remove 魔法口令-marker startup scans、remove visibility fallback list lookups、keep defensive fail-closed behavior for m…。

原文小纸条
  • stop relying on stored root command strings for non-legacy ACPX cleanup
  • remove command-marker startup scans
  • remove visibility fallback list lookups
  • keep defensive fail-closed behavior for missing or unverifiable leases

第 15 站

Tests

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

这段在解决什么

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

为什么值得看

很多文档看起来长,其实是在防你漏掉前置条件。

真要动手时

真正照做时,先找前置条件,再找必填项,最后看验证方法。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add two table-driven suites. Process lifecycle simulator: Session visibility matrix: The important invariant: a request…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Add two table-driven suites.

原文小纸条

Add two table-driven suites.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Process lifecycle simulator:。

原文小纸条

Process lifecycle simulator:

像准备清单

这一串条目别硬背,把它当成“Tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:PID reused by unrelated process、PID reused by another 门口的小门卫's wrapper ro…、stored wrapper 魔法口令 is shell-quoted, live…、adapter child exits, grandchild remains i…。

原文小纸条
  • PID reused by unrelated process
  • PID reused by another Gateway's wrapper root
  • stored wrapper command is shell-quoted, live ps command is not
  • adapter child exits, grandchild remains in the process group
  • parent death SIGTERM fallback reaches SIGKILL
  • process listing unavailable
  • stale lease with missing process
  • startup orphan with wrapper, adapter child, and grandchild
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Session visibility matrix:。

原文小纸条

Session visibility matrix:

像准备清单

这一串条目别硬背,把它当成“Tests”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:self, tree, 机器人朋友, all、a2a enabled and disabled、same-机器人朋友 row、cross-机器人朋友 row。

原文小纸条
  • self, tree, agent, all
  • a2a enabled and disabled
  • same-agent row
  • cross-agent row
  • requester-owned spawned cross-agent ACP row
  • sandboxed requester clamped to tree
  • list, history, send, and status actions
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The important invariant: a requester-owned spawned child is visible wherever the 设置说明书ured visibility includes the requ…。

原文小纸条

The important invariant: a requester-owned spawned child is visible wherever the configured visibility includes the requester session tree, and all is not less capable than tree.

第 16 站

Compatibility Notes

这一节主要在解释“Compatibility Notes”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Compatibility Notes”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Old session records may not have leaseId. They should use the legacy fail-closed cleanup path: If a legacy record canno…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Old session records may not have leaseId. They should use the legacy fail-closed cleanup path:。

原文小纸条

Old session records may not have leaseId. They should use the legacy fail-closed cleanup path:

像准备清单

这一串条目别硬背,把它当成“Compatibility Notes”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:require a live root process、require wrapper-root ownership when a gen…、require 魔法口令 agreement for non-wrapper ro…、never signal based only on stale stored P…。

原文小纸条
  • require a live root process
  • require wrapper-root ownership when a generated wrapper is expected
  • require command agreement for non-wrapper roots
  • never signal based only on stale stored PID metadata
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If a legacy record cannot be verified, leave it alone. Startup lease cleanup and the next release window should eventua…。

原文小纸条

If a legacy record cannot be verified, leave it alone. Startup lease cleanup and the next release window should eventually retire the fallback.

第 17 站

Success Criteria

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:tree and all. previously required one-off review fixes. ---。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:tree and all.

原文小纸条

tree and all.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:previously required one-off review fixes.

原文小纸条

previously required one-off review fixes.

像准备清单

这一串条目别硬背,把它当成“Success Criteria”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Closing an old or stale ACPX session cann…、Parent death does not leave stubborn adap…、cancel aborts the active turn without clo…、sessions_list can show requester-owned cr…。

原文小纸条
  • Closing an old or stale ACPX session cannot kill another Gateway's process.
  • Parent death does not leave stubborn adapter grandchildren running.
  • cancel aborts the active turn without closing reusable sessions.
  • sessions_list can show requester-owned cross-agent ACP children under both
  • Startup cleanup is driven by leases, not broad command-string scans.
  • The focused process and visibility matrix tests cover every edge case that
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。

原文小纸条

---

AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。

google-adsense-account: ca-pub-3833673520933536