Conversation
… old files, and add new chat protocol documentation plans.
…, including parsing, coercion, and validation.
…r `ChatProtocolError` to a standard class.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Non-content NodeChange types (dimensions, select) were calling triggerAutoSave() on every render, causing hasPendingChanges to be set true immediately after loading from the database. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace manually-maintained boolean flag with a getState patch that computes dirty state from currentHash vs lastSavedStateHash. Eliminates ~10 manual set() calls and the entire class of flag-out-of-sync bugs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SaveManager no longer maintains lastSavedHash or decides whether to skip saves. Removes syncLastSavedHash(), setLastSavedHash(), and the three manual sync points that kept two hash copies in sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace getState monkey-patch (which didn't work with useBuilderStore() hooks) with a store subscriber that recomputes hasPendingChanges whenever nodes/edges/hash inputs change. Also removes dead hasPendingChanges writes in AgentBuilder.tsx, syncLastSavedHash no-op stub, and unused force arg in saveManager.save call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- saveGraph was computing hash without stateFields/fallbackNodeId, causing hasPendingChanges to flip true after every manual save - Remove dead lastSavedStateHash from SaveManager getState callback - Add comment explaining subscriber setState recursion safety Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace canvas-based graph editing with a Python DSL code editor. Backend: DSLParser (AST-based), DSLExecutorBuilder, compiler integration, graph_service dispatch, /code/parse and /code/save API endpoints. Frontend: CodeMirror 6 editor, read-only canvas preview, error panel, zustand store, debounced parse hook, AgentBuilder DSL routing. Migration: code generator + migrate_to_dsl.py script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete files only used by standard canvas mode (not DeepAgents): - GraphStatePanel.tsx (replaced by StateSidebar, now unused) - StateVariablePanel.tsx (variable browser, unused) - VariableInputField.tsx (replaced by plain Input/Textarea) - dataMigration.ts (legacy field name migration) - nodeConfigTemplates.ts (template presets) - variableService.ts (variable analysis API client) Clean up broken imports in: - PropertiesPanel.tsx: remove VariableInputField, nodeConfigTemplates refs - BuilderToolbar.tsx: remove toggleGraphStatePanel ref - agentService.ts: remove dataMigration import and usage - builderStore.ts: remove dataMigration, showGraphStatePanel, toggleGraphStatePanel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the entire stateReads/stateWrites feature: - BuilderNode: delete stateUsage computation, highlight logic, Reads/Writes chips UI - nodeRegistry: remove all stateReads/stateWrites declarations from every node type - schemaService: remove reads/writes from NodeSchema and schema export - PropertiesPanel: remove State Dependencies section - builderStore: remove highlightedStateVariable and setHighlightedStateVariable This feature was a canvas-only concept that added complexity without clear user value. DSL mode handles state dependencies in code. DeepAgents does not use this feature. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- graph_schema.py: remove reads/writes fields from NodeSchema, simplify validate_state_dependencies - schema_service.py: stop injecting reads/writes into node config - code_generator.py: remove reads/writes from generated code comments - dsl_code_generator.py: remove writes kwarg from @fn decorator generation - test_graph_schema.py: update tests to not reference reads/writes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete graphTemplateService.ts (zero imports) - Delete ValidationSummaryPanel.tsx (validateGraph was already a no-op) - Remove validation state from builderStore (showValidationSummary, validationErrors, isValidating, validateGraph, setValidationErrors, toggleValidationSummary) - Remove validation button and pre-deploy validation from BuilderToolbar - Remove ValidationSummaryPanel from BuilderCanvas - Fix graphLookup.ts: remove graphTemplateService dependency, simplify to direct createGraph Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete LoopBackEdge.tsx (411 lines, loop nodes already removed) - Remove loop_back from reactFlowConfig edge types - Remove loop_back from edgeStyles EDGE_COLORS and getEdgeStyleByType Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite connectionUtils.ts: remove router/condition/loop edge logic, DeepAgents only uses normal edges - builderStore: remove autoWireConnection call and loop_back edge type check Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- types/graph.ts: rewrite to minimal DeepAgents types, remove RouteRule, RouterNodeConfig, loop_back edge type, waypoints/offset fields - builderStore: remove syncEdgesWithRouteRules, RouteRule import - BuilderCanvas: remove loop_back edge type processing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only Bot, BrainCircuit, Globe2 are used (agent, code_agent, a2a_agent). Removed: Split, GitBranch, MessageSquare, UserRound, Wrench, Route, Repeat2, Code, Layers, FileJson. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- nodeRegistry: remove unused FieldTypes (routeList, conditionExpr, stateSelect, stateMapper, code), keep kvList for a2a_agent - PropertiesPanel: remove case 'code' and case 'stateSelect' branches Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed ShieldCheck, Database, FileJson (validation and schema features deleted). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
showAdvancedSettings was gating deleted features (get_state_node, set_state_node, Input Mapping, State Output Mapping). Now a no-op. - Remove from builderStore (state, action, initial value) - Remove from BuilderToolbar (menu item) - Remove from PropertiesPanel (unused reference) - Remove from ComponentsSidebar (dead filter for deleted node types) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ComponentsSidebar: remove useBuilderStore import, dead category mappings (Flow Control, State Management, Aggregation, Actions) - EdgePropertiesPanel: rewrite from 475→140 lines, remove all router/condition/loop logic, keep only simple label editing and delete - PropertiesPanel: remove dead field keys from needsVariableSupport list - nodeRegistry: clean FieldType union (remove routeList, conditionExpr, stateSelect, stateMapper, code) - Remove showAdvancedSettings from builderStore, BuilderToolbar, PropertiesPanel, ComponentsSidebar Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- eventProcessor.ts: simplify GraphState (remove route/loop/parallel fields), simplify handleRouteDecisionEvent and handleLoopIterationEvent - execution/types.ts: remove loop/route/parallel fields from InterruptState, remove nodeType from RouteDecision - executionStore.ts: update addRouteDecision signature (drop nodeType) - commandService.ts: aligned via type propagation - builderStore.ts: remove dead comment Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete trace_utils.py (zero imports) - Delete graph_state.py (only imported by deleted trace_utils) - Delete state_variable_tracker.py (only used by variable analysis endpoints) - Delete app/api/graph/variables.py (old canvas variable analysis API) - Remove /variables, /available-variables, /validate-variables from graphs.py - Remove StateVariableTracker import and ValidateVariablesBody from graphs.py -1354 lines deleted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete trace_utils.py (zero imports), graph_state.py (only imported by trace_utils), state_variable_tracker.py, app/api/graph/variables.py - Remove /variables, /available-variables, /validate-variables endpoints from graphs.py - Remove ValidateVariablesBody, StateVariableTracker import from graphs.py - Remove dead _get_node_name method from base_graph_builder.py - Delete test_state_variable_tracker.py -1354 lines from deleted files, ~130 lines from endpoint removal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove from both en.ts and zh.ts: - flowControl, stateManagement, aggregation (deleted node categories) - validateGraph, validationSummary, validationFailed, validationFailedHint, checkValidationPanel (deleted validation system) - showAdvancedMode, hideAdvancedMode (deleted advanced toggle) - inputMapping, stateUpdates (deleted state mapping UI) - graphStateSchema (deleted schema panel) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- nodeRegistry: remove backend_type, workspace_dir, docker_config from agent node (backend ignores these fields) - Delete DockerConfigField.tsx (no longer referenced) - PropertiesPanel: remove dockerConfig switch case and import - nodeRegistry: remove dockerConfig from FieldType - BuilderNode: update displayProperties filter for current node types only Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lder Zero external callers after executor layer removal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backend — code_executor.py: - Remove dangerous builtins: open, eval, exec, compile, globals, locals, vars, dir, breakpoint, exit, quit, input - Add io, tempfile, glob to blocked modules list - Add 10s exec timeout via signal.alarm (prevents infinite loops) - TypedDict/Annotated still works (tested) Backend — graph_code.py: - Add permission checks: /code/save requires member role, /code/run requires viewer - Add 30s ainvoke timeout via asyncio.wait_for - Add error message sanitization (strip server file paths) - Import GraphService and WorkspaceMemberRole for access control Frontend — CodeEditorToolbar.tsx: - Add Loader2 spinner on Save and Run buttons - Add Play/Save icons - Show execution duration after run completes - Improve styling with CSS variables for theme consistency Security tests verified: - open(), eval(), exec(), compile(), globals() all blocked - import os, import io blocked - Normal LangGraph code still works end-to-end Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete 6 old files (1943 lines): - base_graph_builder.py (728) — monolithic base class with inheritance - deep_agents_builder.py (325) — tangled with base class - graph_builder_factory.py (68) — unnecessary factory layer - deep_agents/node_config.py (217) — config with side effects - deep_agents/node_factory.py (345) — mixed concerns - deep_agents/skills_manager.py (260) — 170-line method Create 7 new modules (1027 lines): - deep_agents/builder.py (272) — orchestration, no inheritance - deep_agents/agent_factory.py (219) — agent creation by type - deep_agents/config.py (164) — pure config extraction, no side effects - deep_agents/model_resolver.py (151) — unified LLM resolution with cache - deep_agents/skills_loader.py (142) — skills preload with dedup - deep_agents/middleware.py (47) — memory middleware - deep_agents/tool_resolver.py (32) — tool resolution Key improvements: - Config resolution is pure (no side effects, no skill preloading) - Each node config resolved exactly once (was 2x before) - Model resolution unified and cached (was duplicated for node vs memory) - No inheritance — composition only - No factory pattern — direct function call - Skills preloaded once with deduplication (was per-config-resolve) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing agent_factory imports to builder.py (F821 undefined names) - Apply ruff auto-fixes (import sorting, formatting) - All pre-commit hooks pass: ruff, ruff-format, backend strict, frontend eslint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- builder.py: add missing agent_factory imports, remove unused skills_paths variable and get_skills_source_path import, remove invalid is_root/skills kwargs from create_deep_agent calls - tool_resolver.py: fix resolve_tools_for_node call (expects GraphNode, not list), use NodeShim adapter - code_executor.py: fix module.__builtins__ assignment for mypy - skills_loader.py: add type: ignore for SkillSandboxLoader(None) call - graph_service.py: add type: ignore[no-any-return] for compiled_graph returns - graph_code.py: add type: ignore[arg-type] for ainvoke call Backend CI: ruff ✅ ruff-format ✅ mypy ✅ (328 files, 0 errors) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Default createAgentMode changed from 'dsl' to 'canvas' - Canvas card moved to first position (left), Code (DSL) to second (right) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Backend: - graph_mode: "dsl" → "code" (with backward compat for "dsl") - dsl_code → code_content (with fallback to dsl_code for old data) - Comments updated Frontend: - dslTemplate.ts → codeTemplate.ts, DSL_STARTER_TEMPLATE → CODE_STARTER_TEMPLATE - createAgentMode type: 'dsl' → 'code' - Sidebar card label: "Code (DSL)" → "Code" - Agent list badge: "DSL" → "Code" - AgentBuilder: graph_mode check accepts both "code" and "dsl" Backward compatible: old graphs with graph_mode="dsl" and dsl_code still work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove fallback to dsl_code in graph_code.py and graph_service.py - Remove || 'dsl' checks in AgentBuilder.tsx and agent-list.tsx - Only "code" and "code_content" are recognized going forward - Old graphs with graph_mode="dsl" will fall through to canvas mode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete 10 docs (6162 lines) that describe deleted systems: - GRAPH_BUILDER_ARCHITECTURE.md — references GraphCompiler, GraphSchema, all executors - runtime_state_context_contract.md — references deleted state contract - middleware-architecture-complete/review.md — references deleted middleware layer - command-mode-visualization-implementation-review.md — references deleted viz - tutorials/04a-langgraph-building.md — references deleted standard canvas builder - superpowers specs/plans for DSL code editor — superseded by Code mode - model-management-architecture-cleanup-design.md — completed and outdated - COPILOT_ARCHITECTURE.md — frontend doc, architecture changed ARCHITECTURE.md and ARCHITECTURE_CN.md have minor stale refs (BaseGraphBuilder) but are otherwise still useful — left for manual update. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…base Both docs fully rewritten to reflect the current architecture: - Two build paths: Code mode (sandboxed exec) + DeepAgents canvas - DeepAgents build pipeline with composition (no inheritance) - Code executor security model (7 layers) - Updated mermaid diagrams for all workflows - Updated file structure section - Removed all references to deleted systems (GraphCompiler, GraphSchema, BaseGraphBuilder, NodeExecutors, 11 node types, factory pattern, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove tutorial 04a (LangGraph standard workflow, deleted) - Update learning path to reference 04b (DeepAgents) instead - Fix Langfuse observability link Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete agent-file-preview-refactor plan (references graph_builder_factory) - Delete runtime-system-prompt-template spec (references BaseGraphBuilder) - Delete skill-creator-agent spec (references graph_builder_factory) All stale doc references to deleted architecture are now gone. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New: - tutorials/04c-code-mode.md: complete Code mode tutorial covering state definition, node functions, graph building, conditional routing, security limits, and full example Updated: - tutorials/04b-deepagents-building.md: remove references to deleted 04a, GraphBuilderFactory, update intro to match current architecture - tutorials/README.md: add 04c to tutorial list and learning paths Deleted: - deepresearch-complete-guide.md (references deleted router_node, loop_condition_node) - deepresearch-replication-guide.md (same) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d consistent message layout patterns
GLei16
approved these changes
Mar 30, 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.
No description provided.