Repository navigation
fix: 智能体面板跨窗口迁移与 pi 状态提示 - #271
Merged
Merged
Conversation
跨窗口迁移智能体面板时,租约与提交都用会话的 task.runId 对比实时 lifecycleId;智能体面板没有任务,会话侧恒为空,于是固定报 session lifecycle mismatch,面板无法移到其他窗口。 - 会话身份收敛到 state/terminal-session-identity.ts(任务 runId / 智能体 restore.spawnGeneration / shell 空串),提交 CAS 同源 - 租约只在存在原生 surface 时要求会话一致;存活 PTY 而身份为空 仍拒绝;shell 的 shell:<n> 统一归一化为空串 - 提交首个补偿子步骤前复核租约身份,租约后重生的代际直接失败, 避免补偿把新代际写回源窗口 - 物化会话条目的 CAS 恒执行(期望身份为空串) - 退出补丁接受未记录代际的历史行,仍丢弃已声明且不一致的代际 - 新增身份映射治理测试,并更新终端智能体生命周期金标准
设置 → 智能体 → Pi 展开详情新增一条诊断:当 pi 自己的 settings.json 用 `-extensions/pier-agent-status.ts` 排除托管扩展时,说明状态为什么缺失 以及如何恢复。只读全局配置,读取失败或文件损坏时 fail-open,不误报。 - 覆盖语序与 pi 对齐(!glob → +强制启用 → -强制排除),并归一化 file://、~、./ 与反斜杠 - 诊断在 local / derived / remote 三类 probe 中按当前配置重算,持久化 快照里的旧标记先剥掉,重新开启后不会复活 - pi 分派收在 integrations/registry,host-catalog provider 不认具体 agent - 四语文案改说用户可见结果,i18n key 为 statusHooksDisabledByConfig - 新增金标准文档与 provider / renderer 测试
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
1. 按智能体代际迁移终端面板(bbc67e83)
跨窗口移动智能体面板时,
stageLease与 session CAS 都只读session.task.runId,智能体面板两侧分别是""与原生代际(如2),必然抛session lifecycle mismatch,原标签保留。state/terminal-session-identity.ts单一身份来源:任务 runId → 智能体restore.spawnGeneration→ 空串panel-transfer/terminal.ts租约:有原生 surface 时必须匹配;未创建的原生恢复卡跳过比较;原生进程存在但 live 身份为空则拒绝""占位)transfer-identity-governance锁定 spawn 助手 ↔ registry ↔ 会话元数据2. pi 状态集成被设置关闭时给出提示(c5dca623)
pi 的
settings.json支持extensions覆盖(-path强制排除),会把 Pier 托管的pier-agent-status.ts挡掉,表现为智能体状态空白。Pi 现在的设置让 Pier 看不到它的运行状态。运行 pi config 重新开启即可恢复。!排除 →+启用 →-排除),支持~、file://、./归一化;只读全局设置,失败 fail-open验证
pnpm typecheck/pnpm lint/pnpm depcruise/check:file-size/check:dir-density通过pnpm test:unit:1671 files,14523 tests 通过pnpm exec vitest run --coverage --maxWorkers=2通过pnpm build通过check:plugin-index本地遇到 GitHub 资产下载 TLS 超时,插件索引未改动,交由 CI 校验直接发布流程:本 PR 合入后发正式版,不经过候选观察。