Repository navigation
feat(goal): add durable autonomous goals with attached controls - #1999
new-Beginner wants to merge 23 commits into
Conversation
Keep the full user objective active across turns under ordinary permissions, with explicit owner authority, durable claims, safe settlement and a current-model completion audit rather than a Plan-style approval. Provide compact input-attached controls, quiet budget defaults and historical compatibility. Include isolated Desktop photographs and a fork-only proposal so maintainers can assess the feature and UI before a PR.
Combine the upstream retry, Stop, checkpoint, replay and Composer fixes with the published autonomous Goal candidate without rewriting its history. Retain both ADR entries and both sets of unreleased notes. Update old schema, Goal permission and prompt-entry test contracts, and allow a validated separate screenshot directory so integration evidence cannot overwrite earlier photographs.
Show the preserved Goal UI and tested executable candidate after merging 66 upstream commits. Distinguish passing relevant regressions and real process flows from the remaining Windows baseline failures. Keep the original screenshots and raw local diagnostics intact; publish only selected fresh photographs and a reproducible integration report. Refs vastsa#1995
Keep the published Goal evidence readable without treating standalone HTML and Mermaid sources as VitePress routes. Synchronize the Chinese Goal lifecycle and permission specifications with their English contracts. Integrate current main without rewriting the published branch, retaining both Goal and plugin project-enumeration documentation. No Goal execution behavior or historical evidence assets change. Refs vastsa#1995
Keep the existing Goal mode tooltip backed by a real catalog key in every shipped locale. This restores the renderer-to-catalog contract without bringing back budget helper or save-status text. Refs vastsa#1995
Keep the full regression suite aligned with independent Goal execution: Plan alone projects planning, Agent and Goal retain ordinary plugin tooling, and continuation uses the mode-aware prompt entry. Register the existing budget refusal code. Make the isolated browser fixture independent of Desktop session variables and run it explicitly under Xvfb in the Electron CI job, while headless unit jobs follow the existing display-dependent test policy. Refs vastsa#1995
Preserve Host file-batch admission and cleanup alongside durable Goal\nauthorization and settlement. Keep denied file calls releasable without\nwidening tool permissions.
Persist Goal execution authority per Host turn rather than deriving it from mutable Composer preferences. Preserve next-round edits, queued user guidance and explicit replacement without accidental pauses. Keep pause and Stop distinct, preserve accepted Goal startup messages, and retain deferred budgets, durable round grouping and read-only internal planning with regression tests and isolated UI evidence. Refs vastsa#1995
Exercise version-only storage migration separately from later schema upgrades and build legacy fixtures without future cross-table triggers. Keep data, transcript bytes and backup preservation assertions intact. Teach Main doubles the Host execution-mode lookup and cover Working for Agent/Goal separately from Planning, preserving runtime activity priority. Refs vastsa#1995
|
你好,解决最后的冲突后 我将合并这个PR |
还有最后一些问题需要确认,问题确认并完成修复以后我将会追加提交,预计今晚之前能完成 |
Persist owner pause before the current round finishes while retaining only progress and usage settlement authority for that claim. Steer a fixed internal handoff notice and cap subsequent model requests at three so paused work cannot silently continue or revive itself. Keep queued user input ahead of autonomous continuation, cancel pending questions and approvals during closeout, and preserve main startup-abort locking alongside replacement fences. Cover the paths with native, runtime and isolated Desktop regressions. Refs vastsa#1995
The main-branch wording distinguishes a finished session from task success. Keep the workspace user-path assertions in sync with the specific session-error label without changing product behavior or weakening task ownership, history and duration checks. Refs vastsa#1995
Observe screenshot failures while awaiting native events so a capture deadline cannot strand the fixture or appear as a clean watchdog exit. Keep real frame delivery controlled across window transitions and assert CSS viewport rounding separately from exact native DIP bounds. Refs vastsa#1995
Preserve the current main assertion descriptions when both branches fix the same Session error expectations. Keep the existing Goal and browser fixture work intact while incorporating the latest main changes. Refs vastsa#1995
Removing a Goal ends its autonomous lifecycle, not the conversation that already owns the runtime. Keep that bound turn under ordinary Agent permissions without reviving stopped, foreign, settled or recovered work. Reconcile the input preference without overwriting newer user choices. Count successful complete conversations at idempotent settlement instead of presenting claimed attempts as completed rounds. Preserve usage and started diagnostics, migrate proven history, and cover real compaction summary requests, removal, mode races and unchanged Plan restrictions. Refs vastsa#1995
Keep the request candidate on current main so Goal removal and completed-round accounting retain the latest parent abort cleanup. The merge preserves both fixes without rewriting the PR history. Refs vastsa#1995
The controls flow must release and observe the current response instead of waiting for deletion to abort it. Retain restart, late-report, transcript and todo checks while asserting a normal terminal event and no autonomous continuation. Refs vastsa#1995
|
Check resolve |
Preserve main's settings destinations, review APIs, Computer restrictions and packaged boot path alongside the existing autonomous Goal lifecycle. Wire the budget into its new owner and reject stale Computer references outside Agent mode. Keep both documentation branches and acceptance scenarios. Exercise the merged capabilities and boot paths, keeping Windows test contracts independent of path separators and hidden-window paint scheduling. Refs vastsa#1995
Include the latest main startup handshake recovery in the request candidate without rewriting existing PR commits or using local main for integration. Refs vastsa#1995
The Goal budget lives in Agent behavior session defaults after the settings split. Keep the existing acceptance scenario pointing at that owning destination rather than the retired AI page. Refs vastsa#1995
Include the latest review focus containment change without replacing the existing Goal integration or rewriting PR history. Refs vastsa#1995
|
The checks are green and the conflicts are resolved, and I have nothing against the feature itself. The problem is reviewability: one eighteen-thousand-line change mixes six database upgrades, a set of new interfaces, and a relaxation of the rule that currently blocks goals, so the permission change in particular would effectively go unreviewed. Splitting it two ways would fix that — the permission change with its design record first, then the storage and interface parts — and the process notes under the artifacts folder should stay out of the main tree. 检查全绿、冲突也解干净了,功能本身我并不反对。问题在可评审性:一个一万八千行的改动里同时有六处数据库升级、一组新接口,以及把目前禁止 goal 的权限规则放宽,那条权限变化实际上等于没被审过。 拆成两步就能解决——先提权限变化与它的设计记录,再提存储与接口部分;另外过程记录目录里的那些文件不要进主干。 |
Keep the repair candidate based on current main while preserving the\nexisting Goal branch history. The lifecycle fix is a separate commit\nso its small behavioral diff can be reviewed independently.
Scope pause steering to the current validated closeout through a replaceable system section, rather than append-only prompt content. Restore legacy controls as inert history without rewriting saved data. Cover warm resume, cold legacy replay and compaction while preserving real user constraints, tool access checks and bounded handoff behavior.
|
第一阶段暂停/恢复修复已提交为 new-Beginner#1 ,目标为本 PR 的 feat/autonomous-goal-9ba23a,尚未合并或直接改动本 PR head。 最小修复提交 c36aeb3:暂停通知改为当前已验证 closeout 管理的可失效系统分段,兼容旧系统历史和压缩检查点,保留原始记录与暂停权限。最新 main 的自动基线同步是单独提交,可直接审阅 c36aeb3。 必要回归 83/83、相关 TS/lint/架构/基线检查通过;真实 Host+sidecar 的 11 请求回环流程验证恢复后 Read 成功、无旧暂停命令,以及再次暂停、替换、FIFO 和三次收尾上限。新 PR 集成候选与已测 head 代码树一致;远程基线检查成功,其余 CI 仍在运行。未做第二阶段熔断、付费模型调用、日常实例操作或发布安装。 |
Preserve the validated pause lifecycle repair and current main baseline without rewriting the existing Goal branch history.
|
@Tioit-Wang 我重新核对了本 PR 的正文、全部现有讨论及实际 head,补上对你最初要求和后续审阅意见的直接答复。 针对你最早说的 「解决最后的冲突后,我将合并这个 PR」:此前的冲突修复和绿色 checks 都只对应当时的候选,不能沿用到不断推进的 main。本 PR 当前实际 head 是 针对你随后指出的 可评审性问题,已提供两个独立审阅入口:
已重新查看两个新 PR 的当前 checks,A、B 均为 6/6 通过且无合并冲突;这不等于权限设计已获批准。请以 A→B 作为本次交付的审阅入口,不再从这份混合大 PR 直接申请合并。#1999 保留讨论和历史上下文,本轮仅补充回复,不更改其代码、正文、打开状态或 head。 |
Refs #1995
本轮:解决与最新 main 的 12 文件冲突
当前 head:
6ae2428dd2f039bd30109a2a1817e4a33853d84b;基线 main:b4430db052e85c4535ad8c919f9e3f7933b015dc。追加e69733864(冲突合并)、b82748a6e(主干启动恢复)、3e9079e5b(设置入口说明)、6ae2428dd(保留最新主干审阅滚动修复,另有 24 项审阅回归通过)。保留原 headf3400601c为祖先,普通前进推送,未强推、合并 PR、发布或安装。逐文件定位及取舍
行号为 main
f56df5e27与 PRf3400601c合并时的原始冲突起始行,合计 12 文件、15 冲突块;冲突标记删除后行号可能变化。apps/desktop/src/features/settings/SettingsPage.tsxpages/AgentBehaviorSettings.tsx增加两行接入原GoalBudgetRow。apps/desktop/src/lib/api.tsdocs/adr/README.mddocs/spec/03-runtime/03-tools-and-permissions.mddocs/spec/03-runtime/04-data-storage.mddocs/spec/03-runtime/06-host-rpc-protocol.mddocs/spec/04-ux/06-settings-ia.mddocs/spec/06-delivery/04-e2e-test-plan.mddocs/zh-CN/spec/03-runtime/03-tools-and-permissions.mddocs/zh-CN/spec/06-delivery/04-e2e-test-plan.mdpackages/agent-runtime/src/runtime.tsscripts/e2e-electron-boot.mjs.、打包版不加.,两者都携带独立 user-data-dir。实际验证
额外改动保持在必要接缝:原组件接线、旧工具引用拒绝,以及仅测试的路径分隔符归一化/隐藏窗口状态同步。预算入口及旧 Computer 引用均观察到红绿结果。权限 UI 原先在隐藏窗口 rAF 的 60 次轮询中超时;改用 MessageChannel 同步状态后,全断言与原 45 秒截止保留。初次 Runtime 在依赖树内临时目录下有 2 项失败,移到已打开附加工作区的无依赖 Temp 后,完整 1802 项重跑通过,未改这两项断言。
全量 Runtime 及其他核心包验证使用与最终 head 相同的核心源码,已通过 Git 差异检查确认 runtime/host/Rust 目录未变。后续
b82748a6e仅合入主干 4 文件启动恢复,6ae2428dd仅合入主干 6 文件审阅滚动修复;分别补跑 2 项启动与 24 项审阅回归、typecheck、重建和真实烟测。最终 5 个 Goal 流程与 Electron 烟测均在6ae2428dd重跑。debug Host 的启动性能对照约 2.9 秒、未通过 1 秒门槛;同源码 release Host 保持原门槛通过,未通过的尝试不计作成功。未运行完整 Rust/Desktop 平台全套、Linux/macOS 本地验证、真实安装包安装或
verify:ui:*;本机未安装完整 VitePress 工具,未为此重装依赖。当前 head 的 6/6 GitHub Checks 已全部通过(JS、Rust Linux、Rust Windows、Electron E2E、Docs、最新基线)。主 CI · 文档 · 基线。原始日志、数据库及构建二进制均未提交。此前 PR 说明与历史证据(不代表本轮 head 的 CI)
Refs #1995
本轮修复:移除目标不中断、按完成对话计数
当前 head:
f3400601c05e55811fe0816e5db850ab7a2ae53a。追加提交:ed08ed153(修复)、74ce6fc3a(集成最新 main)、f3400601c(同步控制 E2E)。maine7a09fc858c6722c855d675022e3aa08f855b7f5已是祖先。普通前进推送,没有强推、合并 PR、发布、安装或操作日常实例。行为与根因
roundsCompleted,成功结算时恰好加一;界面和 maxTurns 预算使用它。roundsStarted保留为已启动尝试的诊断数据。进行中、错误、中止、恢复、内部模型/工具迭代和压缩摘要请求不增加完成轮次。错误仍阻塞、中止仍暂停,不产生免费的无限自动重试;Token 记账不变。本轮实际验证
数量有重叠,不相加。全量 Runtime/构建验证绑定
74ce6fc3a;最终f3400601c仅修改控制 E2E,生产源码完全相同。下列四个真实跨进程流程均在最终 head 重跑。修改前已观察到失败回归(Host 移除、运行时工具、Rust 移除/计数、界面计数/模式竞态)。夹具诊断和失败尝试不算通过。原始日志、数据库与候选二进制留在本机,只提交代码、规格和测试。测试使用隔离目录和合成回环模型,未访问付费服务或日常应用。
新 head 的远程 CI 尚未认定全绿,以本轮 GitHub Checks 为准。本次未运行完整 Rust/Desktop 平台套件、完整 VitePress 站点构建、Linux/macOS 本地验证、发布安装或
verify:ui:*。本地证据为相关 Rust 过滤套件、完整 Node runtime 套件、组件/浏览器交互测试、生产构建与四个真实 Host/sidecar 流程;远程集成检查仍是合入门禁。历史 PR 说明与旧 head 证据(不代表本轮 CI)
Refs #1995
本轮追加
最新 head:
391a1a661c3be6f31829074084a2507a22456d28。本轮合入最新 main071992e947bf,仅手工解决scheduled-workspace.test.mjs两条断言说明文字冲突;保留原 Goal 功能与浏览器截图夹具修复。相关文件 14 项测试通过,未重跑或等待完整 CI。7e6141715d2442856cea3f11bb3909506a848eb8,保留原 PR head5e87077b60c2c69b765463305426f03d3a1eac3b为祖先;普通前进推送,未强推或重写历史。feat;维护者审阅决定保持在本 PR,不以fix后续提交掩盖整体功能性质。新暂停机制
Header Pause 不再等待整个执行轮结束。
paused/user_paused并停止活跃计时。agent.pauseGoal校验 Host 暂停意图,向同一个 Agent steering 队列加入固定系统通知,请求停止目标工作、给出简短交接并结束对话;不伪造用户消息。已有 schema-32 字段足够,无新增迁移或权限放宽。暂停计时、重复/过期控制、停止撤权、迟到用量、预算结算、替换和重启不重放有回归覆盖。
排队消息与此前行为
activeScope冻结本 Host 轮执行范围,下一 claim 才采用修改;旧范围完成报告不能完成新范围。GOAL_MODE_REQUIRED。maxTurns: null为无限,Token 为轮间软上限。每 Goal 预算独立修改并在当前 claim 结算后生效,不修改默认值或授权恢复。turnId分隔助手轮次,无假用户行;Goal 使用 Working、自然d h m s,保留紧凑附着布局及 todo 数据。当前候选的实际本地验证
测试在新的独立提交 worktree 完成;候选 E2E 针对提交
daafa233752c和上述 main。检查数量有重叠,不相加。本地补充自主场景中 completion、turn-budget、token-budget、unlimited 通过;finite-both 在只记录阶段耗时、未修改断言的诊断运行中通过。部分启动运行及 audit-recovery 在原有 30 秒全流程截止处超时,尚无模型请求;诊断定位到 Host 握手约 15 秒、进入 Goal 后 RPC 毫秒级。没有放宽超时/断言,也没有把这些失败计作全绿;settings-default 等剩余补充场景未继续反复重试。跨进程串行批次另曾触发命令总时限,前三流程完成,独立输入拆开重跑通过。新 head 的完整 CI 仍以 GitHub Checks 为准。
源码等价的已验收输入另有 Runtime 全套 1764 通过/1 跳过(末尾窄收尾 guard 加入前),最终 guard/hard-cap 104 项定向通过;Rust 权限 23、Plan 19 通过。更早历史 CI 不冒充本轮结果。本地未跑完整 Rust/Desktop 平台套件、Linux/macOS、付费模型任务、发布安装或强制压缩 Goal E2E;未运行
verify:ui:*,未安装依赖或修改日常实例。本轮 checks 跟进
5e865806f已将结果标签改为 Session error,测试仍断言 Failed。原样本地复现后,仅同步两条英文预期,保留归属、历史、耗时和选择语义;完整文件 14 项通过。提交1947c7da8942的 JS、Rust Linux、Windows、文档和 base 均通过,Electron 因浏览器截图超时失败。6a16b07b5c5d仅修改三处浏览器测试夹具:截图拒绝与原生事件/首帧等待竞争,失败可及时观测;窗口切换时控制真实已完成帧的交付,避免将 Chromium 合成工作卡在 OS 切换中;精确原生 DIP 边界与分数缩放下 CSS 像素换算分别断言。原有 30/45 秒截止、12 次截图、4 种窗口切换、6 项生命周期检查保持,没有放宽阈值或重试掩盖失败。前一提交的历史 checks:6/6 通过
以下结果仅绑定前一 head
6a16b07b5c5daa506d8cabc0952ea7acd6a7ab85,不代表本轮冲突修复后的新提交;新 head 的检查以 GitHub Checks 为准:主 CI · 文档 · 基线
前一轮验收时拉取的 main 为
7e6141715d24,是 head 祖先;GitHub 实际集成候选2130e50b2dd478c9ed64aa39c65446c2acec3435与 head 的可执行树均为90626b99d00d830a875a31a58eb1373fc92767d7。任务工作区干净。实际构建 UI 证据
隔离数据与本机 loopback 模型,合成任务文本,不代表真实提供商或研究任务成功。选图来自源码等价的已验收构建;本提交另完整重跑了实际 Desktop 流程。
当前验收摘要、复现命令和完整 6 图
本轮合并冲突已修复并推送;由于确有冲突,仅重跑 scheduled-workspace 相关测试,14/14 通过。新 head 的 CI 由 GitHub 自动执行,本轮未等待完整 CI。PR 保持打开且未合并;未发布或安装到日常程序。