Repository navigation
Service assistants run every turn on a harness; Native is no longer offered (#1257, part 1) - #1307
Conversation
…ness; Native is no longer offered The management assistant and the group assistant lose their Native loops: every turn, and every own task, goes through serviceHarnessTurn. Service roles and group bindings accept pi, codex and claude_code; a value still saved as native moves to Pi at start-up. MediaTurn drops the image fitting and recovery only the Native loops used, and the assistant computer warning no longer depends on the chosen backend.
检视结论:可以合入(无阻塞问题),1 条文档一致性建议检视版本:head 逐项核对
验证情况本机没有 发现
同一份文档的“对话后端”条目在本 PR 里已改成只剩 建议改为:控制面受控检出始终在控制面完成、不向容器暴露 GitHub 凭据(与后端无关); Reviewed commit: 1d99119 |
|
Reviewed head The code change is sound: the Native service-assistant loops and the media helpers only they used are removed, Pi/Codex/Claude Code remain, own tasks now require the host's
Minor, not blocking:
I did not enqueue this head: the checks are green, but the documentation must match the shipped behavior first. |
…a Native backend; drop the dead group backend knob
|
Fixed in
Minor points, also done:
Verification on |
|
复核 head 1.
2.
如果 part 2 会连同项目角色的 Native 一起删掉这一行,也可以留到那时处理,但 :37 与 :63 的矛盾在本 PR 内已经成立,顺手改的成本更低。 3. 4. bot 无法推送到他人的 |
|
Reviewed head The follow-up commit addresses both documentation findings and the two minor fixture notes: the Required checks ( |
Refs #1257
First of the two PRs planned on the Issue (comment 7119998844): the service assistants. The project-role half (Native registration, the
runToolsfallback, the Manager dispatch branch, frozen task snapshots androle_instances) follows in the second PR, which closes the Issue.What changes
The management assistant and the group assistant run every turn through
serviceHarnessTurn.src/management/agent.tsandsrc/channels/service-session.tslose their Native loops (ToolTranscript,incoming.take, the inlinestay_silenthandling and the image fitting around each request). The steered (Pi) path that 服务助手用 Pi 时补齐 Native 的四项能力:流式文字、回合中并入新消息、编辑后重启、保持安静 #1253 added is now the only path; Codex and Claude Code keep theirfinish-tool turn.recoverableToolStatus([治理] 清理 #521 同类过度防御的权限围栏、静默吞错与保守永久锁死(会话/记忆清空、预算 unknown 锁仓、配置死锁) #533) existed only for the Native management loop and goes with it. Refusals come back to the model as observations on every backend, as decided on 平台内部调用和测试不再依赖 Native 工具循环 #1256 (comment 7118039299).Own tasks always run on the host's driver (
src/service-roles/own-tasks.ts, review F2).OwnTaskHost.runis required; the inline loop and the host'srequest,resultsandcleanmembers, which only that loop used, are removed.Native-only media handling (
src/channels/media.ts):MediaTurn.addImages,fitRequestandrecoverModelError, and the private state only they used. Images still reach a harness throughtakeToolImages.Selectable backends: service roles and group bindings accept
pi,codexandclaude_code(serviceHarnessesinsrc/service-roles/roles.ts, shared by both). Submittingnativereturnsunknown_role_harnessfrom the existing check. The console selects drop the Native option.harnessAssistants(the start-up warning) counts every enabled assistant.Fallback migration (
retireNativeServiceAssistants,src/roles/native-to-pi.ts). It handles a management assistant, service role or group binding still saved on Native, for example one chosen by hand aftermigration:1255.[migration:1257]line with the counts.SELECTs on small tables. The marker-based one-time migration in the plan (F3) is for the project-role data in the second PR, which scans frozen task snapshots.Docs:
docs/design/agent-and-harness-runtime.md(default backends, service assistant turns, assistant computers),docs/design/assistants-and-channels.mdanddocs/features/assistants-and-channels.md.Tests
Removed with the Native loop, as listed in the plan:
channel-media: image recovery after a provider rejection, and preflight request fitting.channel-turn-messages: admission closing at the stream's finish marker.management,channel-service-bindings) and [治理] 清理 #521 同类过度防御的权限围栏、静默吞错与保守永久锁死(会话/记忆清空、预算 unknown 锁仓、配置死锁) #533 (management-tool-recovery), plus therecoverableToolStatusunit test.test/fixtures/native-roles.mjs.One deviation from the plan, adding coverage rather than removing it: the third
channel-mediacase (import a resource, convert it on the computer, view it withview_workspace_image, plus that tool's path, symlink and fence checks) is not Native-specific, so it now runs on the scripted driver instead of being deleted.New or changed:
native-to-pi.test.mjs: Native rows written after 服务助手、群绑定和项目角色默认改用 Pi,已有 Native 配置迁到 Pi #1255 move to Pi when a file-backed store is reopened, with the expected revisions and audit rows; the log line appears once; the API refusesnative.channel-service-bindingsupgrade case: a binding whose legacy role was Native readspiafter the restart.role-permissions(own-task host withrun),assistant-computer-turns(no warning only when nothing is enabled),console-assistant-computers(the warning without a choice).service-rolesandchannel-assistant-roles: the backend list is Pi, Codex and Claude Code, and choosing Codex keeps the computer warning.Verification
On head
1d99119f(basee52008a4):npm run check: passed.npm test: 2650 tests. Two sets failed in the full run at load average 11–17 (other jobs on the host):codex-harness(the grace-window timing asserts, which fail the same way in the base run) andrepository-skills-request(one 90 s timeout). Both pass when run alone on this head.e52008a4vs this head, same host: 517 s vs 570 s wall time, with host load from other jobs in both runs. The sets this PR touches took 294 s vs 243 s in total; the largest drops arechannel-service-bindings(71→55 s),channel-turn-messages(61→45 s) andmanagement(47→34 s).npm run test:e2e: 565 passed.Head
74290cd2(review fixes on top of1d99119f: two design-doc statements, themodel-role-impacte2e seed, and the deadgroupHarnessknob inchannel-fixture.mjs):npm run check: passed.boundGroup(17 sets, 222 tests): passed.test/e2e/models/model-role-impact.spec.mjs: passed (3 tests).1d99119f, so itsnpm testand e2e results above still apply.Screenshots
Full viewports at 1440×900 and 390×1000 from the e2e harness, which has no assistant computers (
scrollWidth <= innerWidthat both widths). Headless Chromium draws no popup for a<select>, so the "options" captures give the select a list size to show every option in place.全局设置 → 管理助手设置:
Pi(推荐)selected by default, the computer warning below it:Same page, options shown, Codex chosen: the options are
Pi(推荐),Codex,Claude Code; the warning stays for every backend:New group binding (project administrator), 高级设置:Agent 后端 unfolded, options shown, Codex chosen: the same three options; the warning outside the fold stays:
Group list after saving: the group set to Codex shows the
Codexbadge: