Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/architecture/rfcs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ appendix may keep dated history, but no dated log heading may precede it.
| [RFC: Shared Goal Alignment and Governed Amendment Protocol (v0)](shared-goal-alignment-and-governed-amendment-v0.md) | Accepted | none | [2 entries](ledger/shared-goal-alignment-and-governed-amendment-v0/) |
| [RFC: LoopX Shared Control-Plane Authority and Pluggable State Providers (v0)](shared-goal-authority-state-provider-v0.md) | Accepted | none | [24 entries](ledger/shared-goal-authority-state-provider-v0/) |
| [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | Accepted | none | — |
| [RFC: TypeScript Control-Plane Migration Direction v0](typescript-control-plane-migration-v0.md) | Accepted | none | [14 entries](ledger/typescript-control-plane-migration-v0/) |
| [RFC: TypeScript Control-Plane Migration Direction v0](typescript-control-plane-migration-v0.md) | Accepted | none | [15 entries](ledger/typescript-control-plane-migration-v0/) |

## Superseded (1)

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/rfcs/STATUS.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
| [RFC:共享 Goal 对齐与受治理 Amendment 协议(v0)](shared-goal-alignment-and-governed-amendment-v0.zh-CN.md) | 已接受 | 无 | [2 条](ledger/shared-goal-alignment-and-governed-amendment-v0/) |
| [RFC:LoopX 共享控制面权威与可插拔状态 Provider(v0)](shared-goal-authority-state-provider-v0.zh-CN.md) | 已接受 | 无 | [24 条](ledger/shared-goal-authority-state-provider-v0/) |
| [RFC: Single-Owner Local Daemon (v0)](single-owner-local-daemon-v0.md) | 已接受 | none | — |
| [RFC:LoopX 控制面 TypeScript 渐进迁移方向 v0](typescript-control-plane-migration-v0.zh-CN.md) | 已接受 | 无 | [14 条](ledger/typescript-control-plane-migration-v0/) |
| [RFC:LoopX 控制面 TypeScript 渐进迁移方向 v0](typescript-control-plane-migration-v0.zh-CN.md) | 已接受 | 无 | [15 条](ledger/typescript-control-plane-migration-v0/) |

## 已被替代 (1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ envelope 投影,Codex CLI 保持关闭隔离;这不代表安装态 heartbeat
|---|---|---|
| Goal/Agent/Todo 身份 | quota 选择及回执;envelope actor、selected Todo 和签名结算身份 | 捕获身份与写入时校验仍必要;展示身份不授予执行权 |
| 完整要求 | Agent channel 权威 work context 与剩余必读;有效 Todo、验收及 scoped User 义务,完整 Goal 保留渐进式全文读取 | 注册 reader 在两种传输中满足当前任务读取;来源失败会阻止依赖它的交付,真实模型采用和打包宿主旅程仍待验收 |
| 能力拒绝 | 既有 capability_gate_v0;短包保留原样 required/missing 与源中历史字段 | 修复事实遗漏,不改变就绪策略或能力开启 |
| 能力拒绝 | 既有 quota `capability_gate_v0`;短包保留精确 `required`/`missing` 数组与源中历史字段 | 修复事实遗漏,不改变就绪策略或能力开启 |
| 选择/claim/lease | selected Todo、action portfolio 及当前所属事务 | 短包归属不是新鲜 lease;保留捕获源并在所属写入入口复核 |
| replan/Goal 收尾 | replan action packet、contract capsule 和 vision audit | 完整证据仍走有权限的详情;Todo 完成不证明 Goal 完成 |
| replan/Goal 收尾 | replan action packet 与既有 TS capsule 保留完整、有序 audit 步骤/指导、当前 judge 及证据与非证明条件 | 同一捕获的 File/SQLite 决策验证条款保留与签名突变;完整证据仍走有权限的详情。宿主/模型采用仍开放;Todo 完成不证明 Goal 完成 |
| 结算/scheduler | 完整 typed 结算计划及显式宿主调度投影;省略的调度 argv 引用同一捕获的完整决策 | 此投影退役未绑定的详情命令。实际宿主读回、过期写入拒绝与一次恢复仍待宿主采用验收 |
| 可选 memory | 核验后的 boundary 参与事实及新鲜宿主绑定 | 关闭/recall/ingest/失效/provider 失败隔离持续保留;传输等价不是模型收益 |

Expand All @@ -347,6 +347,12 @@ envelope 投影,Codex CLI 保持关闭隔离;这不代表安装态 heartbeat
结算另有覆盖,仍不证明安装态 App 收敛或模型成本。以下三项继续按各自验收保持
未完成;这份核对不授权批量删除剩余 Python IO adapter。

接续 audit 投影还保留每个有序 closeout 步骤和完整当前 judge。旧 capsule 在签名前就
遗漏这些字段,并把接续指导截成 48 字符。捕获的 File/SQLite 工作和 replan 路径现在
保留这些条款,修改步骤、顺序或 judge 后拒绝签名等价。既有 8 KiB 诊断阈值不变,
必需文本可以超出并警告。这只关闭传输遗漏,不代表三项收敛验收通过,也不授权退役仍
活跃的 Python/host adapter。

统一工作上下文现在由既有 TS interaction owner 选择并满足必读,注册的 Python
adapter 核验来源,在普通 heartbeat/quota 与签名 envelope 中返回完整当前任务来源,
无需启用 TurnEnvelope。混合 Goal 文件仍必须经渐进式路径全文读取,不能按历史标题
Expand All @@ -373,6 +379,14 @@ live 模型结果、App 采用或以下三项收敛验收完成。
| 在真实宿主 renderer 采用同一 typed 投影 | heartbeat full/thin 与 Turn host 消费同一执行事实及同 Turn 捕获/详情入口;显式保留通知和 scheduler 的宿主传输。真实 File/SQLite CLI 与打包 Codex App 覆盖重入、来源丢失、必读前拒绝、迟到结果、backoff 和一次结算;补读不触发第二次准入。最后调用方迁移后才退役旧投影。 |
| 核验上下文形态及迁移默认 | 将相同的正常、replan、等待/恢复与可选能力负载同时对照当前完整和短包路径,测量载荷/model token、详情 IO、延迟、资源增长、遗漏、决策与结果质量。数据丢失、重复效果、身份和结算错误保持硬约束;保留受支持的已保存 prompt/回执与可逆 rollout,根据证据再改预算或默认。 |

原生 Turn detail 采用现持久化真实 `run-once` producer 的完整 observation,由既有 TS
envelope owner 将 Host 请求绑定到它。真实 File/SQLite CLI 检查实际 subprocess 输入,
改变 canonical Todo 来源,验证原详情、重试和无效果 replay;模型 provider 是协议
fixture。只读规划与可选 quota capture 默认值不变,原生执行 Turn 现保留私有 capture
证据。证据缺失或不匹配拒绝再次调用 Host;legacy 缓存结果恢复与终态读回保留原 receipt。
这只关闭 producer 到 detail 的传输缺口。真实模型、打包 App/Lark、后续 authority 检查
及其余收敛矩阵仍独立验收,本切片不退役任何 Python 投影。

此前成本切片已复现回归预算缺口,不能归因于 fixture alias,也不授权删掉
必需上下文。`aa87cc019` 与 `fc411c878` 使用相同公共 CLI fixture、临时 alias
和命令参数,实际 JSON stdout 测量如下:
Expand Down
42 changes: 42 additions & 0 deletions docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ resume. Earlier source evidence records a Codex canary editing and reading back
synthetic note while preserving prior text and creating no Goal. This historical
host/filesystem evidence is separate from current synthetic-protocol regression
checks and does not qualify live Lark, material intake or a release.
Disconnecting a binding or replacing its identity, context or grant first
publishes typed revocation, then reuses Core's exact-Turn interruption. Cancel
that binding's queued work before stopping its active Turns, including topic
and resumed Sessions; unrelated authorized work continues. History remains
readable and unchanged-configuration retries do not interrupt execution. Never
hold the authorization-publication lock while waiting for the host to stop or
create another queue, scheduler or provider authority. An unconfirmed stop
retains revocation and reports failure. Retrying disconnect with the old binding
identity and current revision continues stop confirmation, including after a
failed replacement. Settings projects pending/running targets from Core's
persisted state, retains exact stop recovery across refresh and reload, and
removes recovery only after Core confirms termination. It does not restore the
grant or change the new binding and unrelated work. A claimed attached host
still lacks push-stop support: report that limit, cancel its unclaimed external
requests and preserve unrelated local Turns. Synthetic Codex/provider tests
qualify source semantics; installed/live-host stop, physical command cancellation
and community enablement remain separate acceptance.

Committed same-claim replay is separate from new admission: after a lost response
and target revocation, the original host can recover its committed receipt; new
claims and external result publication remain denied. Current validation uses real
Expand Down Expand Up @@ -1135,3 +1153,27 @@ host media and file delivery remain separate gaps. Regression covers model-wire
image input, unchanged Session, replay, durable restart and download-time
revocation; live provider/model acceptance is reported separately. No new
Session authority, queue, worker or feature toggle is introduced.

### Lark progress-edit budget and final-result recovery

Private conversations and steward commissions reuse persisted Turn events to
edit one progress message; the Core terminal answer still owns the full result.
Progress allows at most 12 edit attempts, persisted before the provider write.
Unknown receipts consume the budget and restart does not reset it. This is a
conservative transport limit, not Lark's maximum allowance. After exhaustion,
retain Turn events and the allowance for a final edit and necessary close notice.

Older long tasks may already have exhausted the provider quota. Only an explicit
`230072` response plus fresh readback proving the target body absent allows
retaining the rejected-edit proof and sending the complete result separately
through the existing source-session, audience and idempotent-send path. Never
mark an exhausted draft successfully closed, rerun the model or recreate the
Session. Unknown errors, lost receipts and unavailable readback retain recovery
without a blind resend. If the result is verified but reaction cleanup remains,
recover only its original result proof without sending again.

Regression covers budget persistence across restart, final-result retention,
explicit quota refusal, unknown failure, lost post-write receipt, unavailable
readback, recovery of older failed journals and two-App isolation. Live provider
delivery remains separate. Model completion, material intake and an intermediate
card cannot substitute for final-message readback.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,49 @@ Material Lifecycle,也不证明项目 adapter 的 intake/ranking 已接通。
降为只读后,入站受理及恢复重新核验授权。本机 Scope 只复用相同 typed 项目上下文;
宿主授权变化时创建新会话,保留旧历史,拒绝在旧会话上执行新工作。

`loopx chat --project-filesystem-scope workspace_only` 进一步将普通 Codex 项目 Session
限制为工作区文件工具:拒绝根目录访问,只保留最小系统可执行文件读取,既有读写 grant
只作用于选中工作区。关闭临时目录、shell 环境继承、login shell、web search 和工具
网络访问。typed context 持久化该选择,变化后旧上下文不能复用;默认仍是可写的
`host_default` scope。

shell 只保留 `PATH`,禁用 shell profile snapshot,POSIX 使用固定最小系统搜索路径,
同时过滤账户配置覆盖及继承变量。macOS 可信宿主可通过固定系统 `xcode-select` 选择
标准 Command Line Tools/Xcode toolchain,将其 Git 目录前置并授予只读。由二进制到
`/` 的每个路径都必须 canonical、root-owned、类型正确,且 group/other 和调用方均
不可写,包括 ACL。容器不安全(含可写 `/Applications`)、toolchain 缺失或选择不支持
时保留原 profile/搜索路径,不放开 toolchain 写入、根目录读取、账户环境或工具网络。
真实探针不证明 Windows 执行合格。

收窄 profile 关闭自动 skill catalog 注入和项目指令发现,Agent 可经有界文件工具读取
工作区自己的 `AGENTS.md` 与 skills;普通项目 Session 保留原生发现。workspace-only
原生 Session 使用私有 `HOME`/`CODEX_HOME`、最小进程环境及文件式原生凭据存储;
新建与恢复均禁用有效 MCP server(包括 managed/项目配置)及原生 Apps connector。
operator 的 `LOOPX_CHAT_PUBLIC_SOURCE_READ=on` 只准入匿名 `read_public_url`/
`read_public_image`,并须原生工具显式批准;其他 MCP 不可用,关闭开关移除 reader,
Apps 仍关闭。Core 按获授权工作区和 App/owner binding 派生 store identity;不同
话题保留独立线程,不要求每条消息重新登录。`host_default` 保留账户原配置和认证。

不把认证或对话历史复制到新 store,已有项目原生登录保留所选账户。否则,可信宿主有
文件式原生 ChatGPT 登录时,adapter 仅经私有 app-server stdio 的
[`chatgptAuthTokens`](https://learn.chatgpt.com/docs/app-server#3c-log-in-with-externally-managed-chatgpt-tokens-chatgptauthtokens)
传递 access token 与账户标识。该实验模式只在进程内存持有 token,不写项目 store、
模型 prompt、工具环境或命令行。未授权 token callback 要求宿主账户 store 刷新,并发
callback 复用已轮换 token;账户不可用、store 无效或账户变化失败关闭并脱敏报错,恢复
账户后可重试而无需重绑。此 adapter 不桥接 keyring-only 或 API-key 认证;可将
`CODEX_HOME` 指向 Session 已记录 home,走原生独立登录。旧共享 home 的 workspace-only
Session 不静默恢复/迁移,须显式选择隔离 home 的新 Session;普通 legacy Session 保留
原 home 和精确原线程恢复。

adapter 在新建和精确线程恢复时只发送 Core 所属 named permissions profile,不同时
发送 legacy sandbox override。核验返回 profile 与唯一工作区根,后续 Turn 固定该
profile;宿主不支持时拒绝,不 fallback 到更宽权限。此 scope 拒绝其他 executor,
native helper 使用 canonical Codex executable,home symlink 无需另加读取 grant。
这是文件系统工具边界,不是完整社区 Bot 隔离;不授权群受众、不清空历史、不隔离任意
host dynamic tools,也不让含私有文件的 checkout 自动具备公开安全性。公开启用前仍须
群准入、干净公开工作区、合格模型认证及真实隐私/交互验收;原生上下文隔离和文件探针
通过只是前置证据。

typed Core、HTTP 与原生宿主回归覆盖默认读写、明确只读、工作区身份、App 独立授权、
旧会话拒绝和原线程恢复。既有源码证据记录了 Codex canary 编辑并读回合成笔记、
保留原文且不创建 Goal;这项历史宿主/文件系统证据与本次合成协议回归分开,
Expand Down Expand Up @@ -424,6 +467,14 @@ App 找到合格的已有负责人,保留请求,展示对方真实判断,
- 一个获准驱动实际干活;纠偏和定向停止分别有接收方或运行时读回,传输 ACK 不够。
- 原对话可打开草稿,刷新或更换会话后仍在;源码、打包前端、真实原生执行分别记录通过、失败、阻塞或未运行。

既有对话 reader 还有一个有界 GQ02 companion:`view=agent_route` 通过共享 TS
selector 与只读宿主 adapter 观察精确发现的 Goal/Agent,可跨归档历史定位唯一可读
binding,无需用户复制 session 链接。未知或多个可读 binding 保持未解析,远端来源
不可观测时明确不可用,不偷读本机宿主。管家与普通 Goal reader 共用该路径,不增加
管家专属生命周期或执行驱动。验收使用真实隔离 host store,保持其不变;这只修复
read-tool 缺口,不关闭原生派发、纠偏采用、定向停止或原路结果验收。安装态行为仍须
维护者合并与 promotion 后验证。

随后验收已有 G1:**“组个小队,核对现金流,把分歧查清楚。”**
2–3 个真实 worker 消费版本化材料,独立指出期间或单位错误,采用修订后回传综合结论;
第二轮修改输入,必须改变实际消费依据。对应 GQ05/GQ11–13,不新增里程碑或任务队列。
Expand Down Expand Up @@ -500,6 +551,12 @@ Chat/Lark 发送须等待前一结果核验送达;Peer 消费只确认已读
在打包对话中验证重启、重复重试、前次发送不确定及精确 Goal 实例隔离。
这是 R3/T1–T2 的结果连续性,不新增工作请求、权限、任务完成声明或管家专用队列。

provider 暂时核验失败须与终态拒绝分开:共享 owner 先复核持久化发送事实与当前路由,
保留原不确定结果并按退避恢复,不再次发送。显式撤权、路由丢失或 provider 必需 ACK
缺失仍是终态 blocker。`source_session_v1` Goal 被重建后也一样:崩溃前持久化的
attempt 沿原 GoalRef 与对话恢复,暂时核验失败退避且不重发,typed 终态阻塞保持停止。
这只验证持久恢复边界,不证明真实 provider 可用性或完整 GQ09 旅程。

已提交委派的恢复复用现有 typed collaboration lifecycle。原请求 Turn 失败、超时或
被打断,不会取消已经进入接收方 Inbox 的工作。该 Turn 结束后,即使调用方没能保存
handoff 回答,接收方已保存的结果仍可沿同一可信路由返回。重新核验当前来源授权、
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ long-task cadence 是建议,不是用户约束。

## 5. 架构与状态

### 一个决策 owner,职责分别归属

| 边界 | 职责 | 不代表 |
| --- | --- | --- |
| Quota 配置 | 用户下限、修订版本、作用域继承 | 实际消费或权限 |
Expand Down Expand Up @@ -89,6 +91,16 @@ App 间隔编辑器中,选定目标并明确保存已展示的前后值,就
| 附着式交互 / 手动会话 | 显式手动意图;其余门禁保留 | 记录原因;自动续跑不能冒充手动 |

App 必须显示目标和实际 schedule、应用失败。不支持该间隔时,应挂起受影响自动化,不能缩短间隔。
Codex App 的 ACK 命令必须在宿主更新后重新读取匹配的 heartbeat;请求的 RRULE 和 hint
中的旧观察不能认证本次更新。类型化 scheduler commit 在迁移、身份重置或持久化前,拒绝
缺失或不匹配的当前观察。console 原生 follow-up 与 Python 兼容适配器遵守同一边界。
Unix 和 PowerShell launcher 的 Codex host-match ACK 也经该入口取得新鲜读回;其他生成的
follow-up 保留 Node 快路径。外层控制的写入在原生派发前仍受入口既有权限 guard 约束。
原生 decoder 把 host-match 标记与捕获的 ACK 事实绑定,不能通过删掉标记绕过当前读回。
其他 App adapter 提供自己的中立 current-RRULE 参数:显式不可用的观察清除旧事实,
省略观察则保留其已绑定的观察,不从 Codex 元数据补齐缺失值。失败命令保留原 target/observed
组合。真实 App API 更新和临时 File/SQLite Goal 上的读回,只验证该调度边界;经过的 timer
唤醒、已安装 runtime 采用及模型启动前准入仍须独立验收。
激活路径必须独立验收后才能宣传一键安全激活。模型内 guard 只能停止后续工作,不能撤销已消费的
唤醒 token;仅修改 prompt 不等于强制执行。原生 `UserPromptSubmit` 是候选方案;自动化覆盖未验收前,
调度建议模式不能宣称阻止所有过早模型启动。
Expand Down
Loading
Loading