feat: v2 - ai assistent - repair subagent#2331
Open
maxy-shpfy wants to merge 1 commit into
Open
Conversation
This was referenced May 28, 2026
🎩 PreviewA preview build has been created at: |
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced May 28, 2026
37e415d to
80b5630
Compare
f151830 to
21732c0
Compare
21732c0 to
b490705
Compare
80b5630 to
3f8defc
Compare
This was referenced May 28, 2026
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.

Description
Introduces a
pipeline-repairsub-agent that can diagnose and fix validation issues, broken connections, missing inputs, and other structural problems in an existing pipeline. The agent operates through a new CSOM tool surface (csomTools.ts) that proxies calls to a main-threadToolBridgeApiimplementation (toolBridge.ts), which mutates the live MobXComponentSpecinside an undo group — making all agent edits immediately visible in the editor and undoable as a single user action.Key additions:
ToolBridgeApi— typed contract for the worker → main-thread bridge, covering tasks, inputs, outputs, bindings, subgraphs, arguments, and pipeline validation.toolBridge.ts— main-thread implementation that delegates to existing editor actions (addTask,connectNodes,deleteEdge,validatePipeline, etc.) and computes canvas positions for newly added entities.csomTools.ts— OpenAI Agentstool()wrappers for every bridge method, with Zod schemas compatible with OpenAI's strict structured-outputs mode (all optional fields are.nullable().optional()).serializeSpecForAi.ts— serializes the liveComponentSpecinto a compact JSON shape for the model, including anactiveSubgraphPathbreadcrumb so the agent knows which subgraph the user is viewing.pipelineRepair.tssub-agent and its system prompt, which defines a structured workflow: read state → validate → auto-fix what's unambiguous → ask the user for anything that isn't.AgentSessionnow carries abridgereference, and the worker'sinit()signature accepts the Comlink-proxied bridge as a separate top-level argument.pipeline-repairand conceptual questions togeneral-help.Screenshots (if applicable)
AI Assistant - Fix pipeline demo.mov (uploaded via Graphite)
Test Instructions
pipeline-repair(notgeneral-help).get_pipeline_stateandvalidate_pipeline, then applies auto-fixable issues directly.Additional Comments
The bridge is instantiated once per
AiChatContentmount and closes overnavigation.rootSpecand the active subgraph path lazily, so navigation changes are picked up without rebuilding the bridge. ThebridgeandonStatuscallbacks must be passed as separate top-levelComlink.proxy()arguments because Comlink does not recursively proxy properties inside an object argument.