Skip to content

feat(desktop): add precise workflow tools and durable agent context - #1234

Merged
louisyoungx merged 30 commits into
bytedance:mainfrom
louisyoungx:feat/desktop-agent-workflow-tools
Nov 3, 2026
Merged

louisyoungx merged 30 commits into
bytedance:mainfrom
louisyoungx:feat/desktop-agent-workflow-tools

Conversation

@louisyoungx

@louisyoungx louisyoungx commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Agent edits now target individual workflow nodes and fields instead of rewriting an entire graph. Long conversations retain durable context and compact automatically, and the desktop shows the resulting changes without remounting the canvas.

Changes

  • Replace full-graph authoring tools with discoverable schemas, scoped reads/search, precise editing operations, atomic version-checked transactions, idempotent receipts and overlap-aware undo. Agent and authoring MCP clients share the same contracts; execution agents retain their read-only scope.
  • Add execution-only node contracts, actionable validation diagnostics, model/dependency checks, pinned run/step inspection and structured pagination for large results. Preserve immutable results, change journals and execution receipts in project exports.
  • Reconcile committed changes into the mounted editor while preserving viewport, selection and drafts. Resolve concurrent drafts field by field and load tool before/after details only when expanded.
  • Persist agent history, usage budgets and compaction checkpoints across turns, reconnects and project transfers. Handle context overflow without replaying completed mutations; recover eligible transient failures while preserving partial responses and user cancellation.
  • Simplify running-conversation input and mutually exclusive send/stop controls. Recover queued inputs and model catalog startup failures, expose model refresh/retry, and retain drafts when model loading fails.

Compatibility

Authoring MCP clients must rediscover the updated tools: save_workflow is replaced by precise edit_workflow operations. Project package format is now version 3; older prototype packages are rejected. Existing project directories remain usable. Provider credentials and local model configurations are not included in this PR.

Validation

  • Rust Clippy: cargo clippy --locked -p flowgram-desktop-backend --all-targets -- -D warnings passed.
  • Rust backend: cargo test --locked -p flowgram-desktop-backend -- --test-threads=1 — 181 tests passed.
  • Desktop frontend: rushx test — 180 tests passed; rushx lint and rushx build passed.
  • Long-turn regression: the 140-exchange checkpoint has a 10-second no-progress limit and a 60-second overall bound. A slow mock replay (80ms per inspection response) passed in 14.54 seconds with all 142-request, compaction, steering and terminal-state assertions retained.
  • Public-dispatcher regression coverage includes 20/200/1000-node edits, static ports and nested scopes, atomic rollback, idempotent execution, retained results, field-level undo, history transfers and model/context recovery.
  • Native UI checked with an ordinary initialized example: changing a review threshold shows one field changing from 100000 to 200000, with arguments collapsed and the saved revision visible.

The first local backend run encountered a SQLite pool timeout during example initialization while dependencies were being restored. The isolated recovery test and a subsequent complete backend run both passed.

UI

Before (previous desktop tool presentation):

Previous desktop tool presentation

After (precise edit, semantic tool summaries and on-demand field changes):

Single-node field edit with before and after values

@louisyoungx
louisyoungx added this pull request to the merge queue Nov 3, 2026
Merged via the queue into bytedance:main with commit 7f568bb Nov 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants