feat(agent-org): enable direct Member work - #991
Draft
ShiboSheng wants to merge 5 commits into
Draft
Conversation
Make canonical Member input a durable UserDirectedWork turn on the existing FIFO and runtime. Add exact intervention handoff, restart recovery, isolated finalization, idempotent Return, tool authority, quiescence rules, and rollback-safe Team deletion invariants. Verification: - cargo test -p agent_core --lib -- --test-threads=1: 3263 passed, 0 failed, 2 ignored - cargo check, fmt check, and clippy -p agent_core --lib -D warnings: passed - focused hierarchy and OrgTrack deletion persistence: 12/12 passed Pre-commit hook ran. Total eslint: 5, total circular: 0
Carry the exact EventStore source through the existing send path and render durable Member activity, queue, Stop, Return, Writer capability, and lifecycle outcomes without changing Team status. Keep ordinary SDE and Group behavior on their existing paths and localize the new copy across all supported locales. Verification: - pnpm typecheck: passed - pnpm lint: passed with 5 unchanged warnings outside PR8 - pnpm vitest run: 8793 passed, 2 skipped; isolated Canvas rerun 2/2 passed Pre-commit hook ran. Total eslint: 5, total circular: 0
Remove debug-owned send and Return semantics, keep helpers limited to isolated fixture setup and evidence reads, and add a rendered live-provider spec for direct work, Stop, Return, Pause, Resume, Archive, and Delete paths. Verification: - packaged Tauri Computer Use: direct, handoff, Stop, Return, Pause, Resume, Archive, restart, and Delete passed - live Provider checkout SDK scenario: 5/5 fixture tests passed - WDIO live execution: blocked by macOS Tauri WebDriver contenteditable focus; not counted as passed Pre-commit hook ran. Total eslint: 5, total circular: 0
Record the ten-layer architecture review, frontend consistency findings, lifecycle performance matrix, real-provider scenario, destructive Delete revalidation, and the one explicitly blocked WDIO infrastructure path. Verification: - audit evidence reconciled with final source and packaged-App results - git diff --check and secret/personal-path scans: clean Pre-commit hook ran. Total eslint: 5, total circular: 0
Pre-commit hook ran. Total eslint: 5, total circular: 0
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.
Problem
Fixes #763
Canonical Agent Org Member pages could not start independent, durable user-directed work. A direct message was either rejected or injected as steering into the current formal TaskExecution; Paused Members could not legally run it, and the old intervention overlay expired after 180 seconds. The transport carried only a boolean intervention hint, so the backend could not prove the exact EventStore user source or recover one stable Turn after a crash.
Return to Work also polled and blanket-drained Inbox state instead of applying an idempotent receipt transition. After the initial PR8 implementation, a cleared receipt was still projected as current
returnedactivity on every Run View refresh, and the frontend discarded the real applied outcome. This made a standalone Planner direct chain repeatedly claim that formal work had resumed even though no formal Task had ever been suspended.Solution
UserDirectedWorkwith a bounded per-Member FIFO, a persistent intervention receipt/chain, exact retry identity, and transactional queue-cap/source validation.already_appliedwhile also returning the original applied outcome, whether formal work existed, the cleared revision/time, and the optional unique continuation.side_quest; receipts with an exact formal Task/Turn binding areuser_intervention. Cleared history remains durable for idempotency and audit but never reappears as currentreturnedstate.sessions.jsonlocales.ORGII_AGENT_ORG_REDESIGNdisabled by default. PR9 can add source adapters to the same dispatcher; this PR does not add Group or peer fan-out.Potential risks
Verification
pnpm typecheck— passed.pnpm lint— exited 0 with five unchanged warnings in WorkItems files outside PR8.pnpm vitest run --silent --reporter=dot— 1,119 files and 8,800 tests passed.cargo fmt -p agent_coreandgit diff --check— passed.cargo check -p agent_core— passed.cargo clippy -p agent_core --all-targets -- -D warnings— passed; only Cargo's unrelated future-incompatibility notice forblock v0.1.6remains.cargo test -p agent_core --lib -- --test-threads=1— 3,264 passed, 0 failed, 2 ignored.agent_coreClippy.ORGII_AGENT_ORG_REDESIGN=1 pnpm tauri:build:fast— passed on the final production source in 325.8 seconds; checked-in rollout default remains off.user_interventionafter the direct queue reached zero; the rendered Return action immediately showed oneThe original Task resumedToast. SQLite readback recordedrestored_task, cleared revision 1, and exactly one continuation.Scope and rollout
722f6bce39c5a52efc14fcc59707f14eaa93a39a.ORGII_AGENT_ORG_REDESIGN, default off.Audit
docs/architecture-audit-2026-08-26/.docs/frontend-ui-audit-2026-08-26/.docs/org2-performance-guard-2026-08-26/.