Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
451 commits
Select commit Hold shift + click to select a range
5e85e6f
refactor: complete event-driven architecture migration
yuzzjj Apr 24, 2026
7a2de31
feat: add AgentBuilder tab, integrate graph state queries, and implem…
yuzzjj Apr 24, 2026
621d5f1
refactor: simplify event-driven migration code
yuzzjj Apr 24, 2026
11b29b6
refactor: replace button elements with div elements in agent settings…
yuzzjj Apr 24, 2026
d382c9a
feat: rationalize settings layout and organization
yuzzjj Apr 24, 2026
1943551
refactor: remove all legacy /graphs/ API dependencies, switch Builder…
yuzzjj Apr 24, 2026
962a38e
fix: replace hardcoded strings with i18n keys in agent overview tab
yuzzjj Apr 24, 2026
8c8d4b0
refactor: remove unused 'pending' status from agent_release_status enum
yuzzjj Apr 24, 2026
d8b0c68
refactor: align Executions page with AgentRun→Execution two-tier arch…
yuzzjj Apr 24, 2026
64c4e12
feat: add CodeEngine and CopilotEngine for unified execution architec…
yuzzjj Apr 24, 2026
dfaabc3
feat: wire Code mode to Agent page with independent CodeEditorPage la…
yuzzjj Apr 24, 2026
236d94d
refactor: clean up CodeEditorPage — remove dead code and fix re-renders
yuzzjj Apr 24, 2026
2b14a41
fix: route code mode via definition_kind and auto-deduplicate slugs
yuzzjj Apr 24, 2026
ea44b4f
refactor: eliminate /v1/runs dual-protocol conflict, close Copilot on…
yuzzjj Apr 24, 2026
51b7529
docs: add event architecture cleanup design spec
yuzzjj Apr 24, 2026
06626c5
docs: add event architecture cleanup implementation plan
yuzzjj Apr 24, 2026
ad8ba7d
docs: apply 5 corrections to event architecture cleanup plan and spec
yuzzjj Apr 25, 2026
873a7de
fix: backend minor fixes — use event constant, remove dead code, fix …
yuzzjj Apr 25, 2026
2b375d3
refactor: remove dead backend code — schemas/runs.py, legacy copilot/…
yuzzjj Apr 25, 2026
5d6953e
fix: align WS frame protocol — handle execution_completed/replay_done…
yuzzjj Apr 25, 2026
73dbaf4
refactor: rewrite executionStore — authenticated WS, native event han…
yuzzjj Apr 25, 2026
c4615ea
refactor: delete dead frontend code — chatBackend, chat WS, eventAdap…
yuzzjj Apr 25, 2026
1615cb0
docs: add global chat debug system design spec
yuzzjj Apr 25, 2026
c1d0fe0
fix: sync trigger_source enum, fix current_execution_id comment, alig…
yuzzjj Apr 25, 2026
b6241ae
fix: replace stale /runs links with correct routes, fix agent-overvie…
yuzzjj Apr 25, 2026
0387ef1
refactor: delete duplicate execution components (dead code, no imports)
yuzzjj Apr 25, 2026
c6d3afc
docs: resolve 5 self-consistency issues in global chat spec
yuzzjj Apr 25, 2026
a220ccc
docs: rewrite global chat spec on execution event architecture
yuzzjj Apr 25, 2026
df4050f
docs: fix 4 spec review issues in global chat design
yuzzjj Apr 25, 2026
663b356
refactor: simplify — deduplicate import, remove redundant state write…
yuzzjj Apr 25, 2026
774a16d
docs: add global chat debug system implementation plan
yuzzjj Apr 25, 2026
89a023d
fix: resolve 10 pre-existing TypeScript errors
yuzzjj Apr 25, 2026
f738986
docs: fix plan review issues — dependency note, artifact endpoint, fi…
yuzzjj Apr 25, 2026
83d10d3
refactor: delete ThreadMessage projection layer, extend ChatRequest w…
yuzzjj Apr 25, 2026
ec65857
fix: ChatAttachment schema — use storage_ref not url, match spec
yuzzjj Apr 25, 2026
a213b6c
feat: add raw mode to file read endpoint for inline preview
yuzzjj Apr 25, 2026
e540368
feat: add GET /v1/threads/{thread_id}/events endpoint
yuzzjj Apr 25, 2026
de319e1
feat: add frontend types, service, and hooks for chat event system
yuzzjj Apr 25, 2026
645c1fc
feat: add ChatPanel component system
yuzzjj Apr 25, 2026
23623e5
enhance: full-featured ChatPanel components
yuzzjj Apr 25, 2026
f8a4371
refactor: replace AgentChatTab with ChatPanel, delete old chat code
yuzzjj Apr 25, 2026
c7079f0
fix: resolve TypeScript errors in chat components
yuzzjj Apr 25, 2026
85f5e3b
fix: auto-unfreeze frozen version in graph builder to prevent save 40…
yuzzjj Apr 25, 2026
6653607
feat: unified workspace permission system with role-based UI guards
yuzzjj Apr 25, 2026
e4b86ed
fix: pass workspace_id in copilot active-run check to prevent 422 error
yuzzjj Apr 25, 2026
9263b01
feat: add agent delete with cascade and 4-column grid layout
yuzzjj Apr 25, 2026
a4b38ad
docs: add agent studio workflow design
yuzzjj Apr 25, 2026
21d6ea6
docs: add agent studio workflow implementation plan
yuzzjj Apr 25, 2026
595e745
feat: add Agent Studio shell and stage model
yuzzjj Apr 25, 2026
3e40f08
fix: align Agent Studio stage model with plan
yuzzjj Apr 25, 2026
b52b1d0
fix: use defined theme tokens in Agent Studio shell
yuzzjj Apr 25, 2026
32c459d
feat: route Visual Agents into Agent Studio
yuzzjj Apr 25, 2026
b183a7a
fix: sync Agent Studio stage from route
yuzzjj Apr 25, 2026
43bfc76
fix: prevent deleting agents that are still referenced by tasks
yuzzjj Apr 25, 2026
0b8a911
feat: add Brief and Canvas stages to Agent Studio
yuzzjj Apr 25, 2026
5a2a613
fix: harden Agent Studio stage handoff
yuzzjj Apr 25, 2026
a0dc0a0
fix: preserve Agent Studio route params
yuzzjj Apr 25, 2026
cee3365
refactor: replace builder right tabs with Studio right panel
yuzzjj Apr 25, 2026
ec1ccf1
feat: add canvas-native node palette
yuzzjj Apr 25, 2026
d406836
fix: scope Studio canvas node menu
yuzzjj Apr 25, 2026
884932a
fix: respect edit permissions in node palette
yuzzjj Apr 25, 2026
6c75e38
feat: add Agent Studio Test Lab stage
yuzzjj Apr 25, 2026
852804b
fix: run Test Lab against draft versions
yuzzjj Apr 25, 2026
e5db9f7
refactor: split agent build shell from visual surface
yuzzjj Apr 25, 2026
20541fa
refactor: make agent build stages reusable
yuzzjj Apr 25, 2026
8a37ae3
Merge branch 'joysafeter-v2' of https://github.com/jd-opensource/JoyS…
yuzzjj Apr 25, 2026
c203044
docs: add agent build refactoring design spec
yuzzjj Apr 25, 2026
9a45cbb
docs: fix spec review issues in agent build refactoring design
yuzzjj Apr 25, 2026
e7444e0
docs: v3 agent build refactoring spec — clean break, no compat hacks
yuzzjj Apr 25, 2026
43b1c59
docs: add agent build refactoring implementation plan (13 tasks)
yuzzjj Apr 25, 2026
e9aaa9a
docs: fix 6 blocking issues in agent build refactoring plan
yuzzjj Apr 25, 2026
049df2b
feat: rewrite agent-build-types with BuildStageId, StageProps, Builde…
yuzzjj Apr 25, 2026
a47af8d
feat: add BuilderSurface context, registry, and placeholder surfaces
yuzzjj Apr 25, 2026
662788d
feat: add BuildStepper horizontal stage navigation component
yuzzjj Apr 25, 2026
83dd229
feat: rewrite AgentBuildShell with top stepper and StageRenderer
yuzzjj Apr 25, 2026
baa28c4
refactor: rewrite Release and Usage stage props to unified StageProps
yuzzjj Apr 25, 2026
2a8bbb1
feat: add VisualBriefStage with StageProps interface
yuzzjj Apr 25, 2026
56c58e9
feat: add VisualBuilderSurface wrapping AgentBuilder with StageProps
yuzzjj Apr 25, 2026
842e516
feat: add VisualTestLabStage with StageProps interface
yuzzjj Apr 25, 2026
a000d8a
feat: wire real Visual Surface components into visualSurface export
yuzzjj Apr 25, 2026
2ee10e6
refactor: unify agent page entry and simplify layout
yuzzjj Apr 25, 2026
d5a6f43
refactor: remove studio directory and dead types/agents.ts
yuzzjj Apr 26, 2026
3a409ca
chore: add i18n keys for build stages and verify full compilation
yuzzjj Apr 26, 2026
1697544
refactor: simplify create agent dialog, remove edit dialog, enhance card
yuzzjj Apr 26, 2026
1f3a5c3
fix: simplify review — reuse dateHelpers, add aria, 4-col grid layout
yuzzjj Apr 26, 2026
93ec768
fix: agent list layout — remove max-w centering, 4-col grid, compact …
yuzzjj Apr 26, 2026
9f0d8e3
fix: visual brief stage — remove scenario field, polish UI
yuzzjj Apr 26, 2026
1380a6b
docs: add graph builder full refactoring design spec
yuzzjj Apr 26, 2026
e6f2b64
docs: v2 graph builder refactoring spec — fix review issues
yuzzjj Apr 26, 2026
2882095
docs: add graph builder refactoring implementation plan (11 tasks)
yuzzjj Apr 26, 2026
9b3acbf
docs: fix plan review issues — correct file paths, reactflow imports,…
yuzzjj Apr 26, 2026
295c3e0
feat: create builderUIStore for UI state
yuzzjj Apr 26, 2026
e3fff3e
feat: create graphStore — split graph state from builderStore
yuzzjj Apr 26, 2026
02f8cca
feat: add GraphToolbar with AddNodeButton and ImportExportMenu
yuzzjj Apr 26, 2026
738d4c7
feat: create saveStore — split save state from builderStore
yuzzjj Apr 26, 2026
d570d80
feat: add InspectorPanel, ZoomControls, CopilotOverlay, GraphBuilderS…
yuzzjj Apr 26, 2026
d067119
refactor: rewrite AgentBuilder to use GraphBuilderShell, remove studi…
yuzzjj Apr 26, 2026
c9d639b
fix: pass agentId and workspaceId props to AgentBuilder in page.tsx
yuzzjj Apr 26, 2026
f58b3e9
refactor: consolidate graph builder UI — single-responsibility layout…
yuzzjj Apr 26, 2026
cf399c9
docs: add publish flow refactor design spec
yuzzjj Apr 26, 2026
4e37c15
docs: fix spec review issues — scope boundary, Pydantic model, AgentB…
yuzzjj Apr 26, 2026
353d767
docs: add implementation plan for publish flow refactor
yuzzjj Apr 26, 2026
408819e
refactor: remove self.commit() from orchestrated sub-service methods
yuzzjj Apr 26, 2026
455fd25
feat: add AgentPublishService — transactional publish/rollback/retire
yuzzjj Apr 26, 2026
462e143
feat: add /publish and /rollback endpoints, remove 4 old granular end…
yuzzjj Apr 26, 2026
d850a24
feat: add agentPublishService and agentPublish hooks
yuzzjj Apr 26, 2026
0db378f
feat: rewrite AgentReleaseStage — three-state UI, single publish entry
yuzzjj Apr 26, 2026
2624ac8
refactor: settings tab — remove version management, convert to releas…
yuzzjj Apr 26, 2026
80296b6
refactor: graph builder — remove deployment adapter, use publish hook…
yuzzjj Apr 26, 2026
9e71844
refactor: delete old adapter/dialog files, clean stale exports
yuzzjj Apr 26, 2026
d7e9210
test: update agent-build-stages tests for new publish hooks
yuzzjj Apr 26, 2026
7b82049
refactor: update i18n — user-facing publish terminology
yuzzjj Apr 26, 2026
c4d8bb4
fix: unify agent publish status — sync agent.status on retire, fix ca…
yuzzjj Apr 26, 2026
8a3b979
refactor: properties panel — restructure sections, fix conditional re…
yuzzjj Apr 26, 2026
6d2768d
refactor: move graph toolbar from header slot to floating canvas overlay
yuzzjj Apr 26, 2026
8ee52b6
feat: add per-agent credential support (encrypted custom_env)
yuzzjj Apr 26, 2026
5241619
refactor: converge event architecture — all state changes through Eve…
yuzzjj Apr 26, 2026
15295b2
refactor: update execution handling — replace mark_status with comple…
yuzzjj Apr 27, 2026
b698a63
style: optimize agent studio layout and compact test lab header
yuzzjj Apr 27, 2026
d9a5d07
refactor: replace ExecutionOrchestrator with DispatchService and intr…
yuzzjj Apr 27, 2026
3bb6608
refactor: Port-Adapter decoupling — eliminate core→services reverse d…
yuzzjj Apr 27, 2026
2a7afce
refactor: consolidate checkpointer pool config into Settings
yuzzjj Apr 27, 2026
b755f0a
refactor agent kinds and list filters
yuzzjj Apr 27, 2026
f7dcbe6
docs: add draft copilot boundary design
yuzzjj Apr 27, 2026
14e4b91
docs: add draft copilot implementation plan
yuzzjj Apr 27, 2026
bf385dd
feat: route copilot requests through draft contract
yuzzjj Apr 27, 2026
a9490ee
test: tighten copilot draft contract coverage
yuzzjj Apr 27, 2026
e66df62
feat: dispatch copilot runs against draft versions
yuzzjj Apr 27, 2026
19377a4
test: harden draft copilot orchestrator path
yuzzjj Apr 27, 2026
a9546b6
fix: align build copilot to draft semantics
yuzzjj Apr 27, 2026
5afcddb
docs: add zh draft terminology design
yuzzjj Apr 27, 2026
b0ad646
fix: rename zh draft UI copy to initial version
yuzzjj Apr 27, 2026
ee5182c
feat: add canonical backend error contract
yuzzjj Apr 27, 2026
f0f82b1
feat: convert http errors to canonical envelope
yuzzjj Apr 27, 2026
4be8918
fix: preserve canonical http error headers
yuzzjj Apr 27, 2026
f799a15
fix: remove legacy http error fallback
yuzzjj Apr 27, 2026
1292070
feat: structure execution completion errors
yuzzjj Apr 27, 2026
578f82d
feat: establish canonical app error model
yuzzjj Apr 27, 2026
c5620a6
refactor: implement unified error contract architecture and remove re…
yuzzjj Apr 27, 2026
cc4e89c
fix: enhance error handling by adding specific error codes and data t…
yuzzjj Apr 27, 2026
aa5ed93
Remove obsolete test files for platform token, skill collaborator, sk…
yuzzjj Apr 27, 2026
fa78a0b
Delete the agent model restructure design document to streamline proj…
yuzzjj Apr 27, 2026
d8ae3a5
Refactor Copilot and OAuth error handling
yuzzjj Apr 27, 2026
786d492
refactor: enhance WebSocket error handling with specific error codes …
yuzzjj Apr 27, 2026
3444e25
Refactor error handling and improve code readability across multiple …
yuzzjj Apr 27, 2026
4611a9c
refactor: standardize error handling across frontend and backend with…
yuzzjj Apr 27, 2026
abf572a
Enhance error handling and payload structure across various components
yuzzjj Apr 28, 2026
06baa95
refactor: replace generic runtime exceptions with structured applicat…
yuzzjj Apr 28, 2026
e0bbc38
docs: add observation tracing design spec
yuzzjj Apr 28, 2026
b77571a
docs: address spec review feedback for observation tracing design
yuzzjj Apr 28, 2026
11a8095
docs: add observation tracing implementation plan
yuzzjj Apr 28, 2026
c9cfcc0
feat(observation): add ObservationType, ObservationLevel, SpanHandle …
yuzzjj Apr 28, 2026
58e7f80
feat(observation): add Trace and Observation SQLAlchemy models
yuzzjj Apr 28, 2026
5025ca5
feat(observation): add ObservationWriter with batch flush strategy
yuzzjj Apr 28, 2026
5064f6b
feat(observation): add ObservationBroadcaster with monotonic seq
yuzzjj Apr 28, 2026
8b28602
feat(observation): add ObservationCollector with span lifecycle and c…
yuzzjj Apr 28, 2026
fc3378b
feat(observation): export complete observation module
yuzzjj Apr 28, 2026
571b315
feat(observation): add debug and collector fields to ExecutionContext
yuzzjj Apr 28, 2026
df753f9
migration: add traces and observations tables
yuzzjj Apr 28, 2026
9dfd4e5
feat(observation): add CopilotObservationExtractor and FileOperationT…
yuzzjj Apr 28, 2026
07777a9
feat(observation): add CLIObservationExtractor for CLI engine
yuzzjj Apr 28, 2026
5468758
feat(observation): add LangChain ObservationCallbackHandler
yuzzjj Apr 28, 2026
10c77f0
feat(observation): add dispatch_debug and collector injection in orch…
yuzzjj Apr 28, 2026
d1effc3
feat(observation): wire all four engines to ObservationCollector
yuzzjj Apr 28, 2026
fa4c23b
refactor(observation): remove langfuse_callback.py, deprecate trace_c…
yuzzjj Apr 28, 2026
56a40d8
feat(observation): add traces API routes (debug, list, detail, observ…
yuzzjj Apr 28, 2026
1118e5e
refactor(observation): simplify review fixes
yuzzjj Apr 28, 2026
31609fc
fix(observation): wire ObservationBroadcaster to real WebSocket trans…
yuzzjj Apr 28, 2026
221c8c5
docs: add frontend observation trace viewer design spec
yuzzjj Apr 28, 2026
00b8897
feat(observation): add core type definitions, helpers, and constants
yuzzjj Apr 28, 2026
fafe47f
feat(observation): add Langfuse-aligned trace viewer with full-chain …
yuzzjj Apr 28, 2026
52c3caa
fix(observation): remove duplicate /v1 prefix from apiGet/apiPost paths
yuzzjj Apr 28, 2026
81a417f
fix(observation): handle serialized=None in LangChain callback handler
yuzzjj Apr 28, 2026
53e0e40
docs: add observation callback handler refactor design spec
yuzzjj Apr 29, 2026
f995872
docs: address spec review issues (15 fixes)
yuzzjj Apr 29, 2026
53a74c3
docs: address spec review round 2 (12 fixes)
yuzzjj Apr 29, 2026
d24a2dd
refactor(agents): redesign release lifecycle with 5-state model
yuzzjj Apr 29, 2026
61463f9
docs: add observation callback handler refactor implementation plan
yuzzjj Apr 29, 2026
2c0db61
chore(observation): add OpenTelemetry api/sdk deps
yuzzjj Apr 29, 2026
a2da798
feat(observation): add ObservationSpan — typed OTel Span wrapper
yuzzjj Apr 29, 2026
61bb90a
feat(observation): add LiveSpanProcessor base for streaming events
yuzzjj Apr 29, 2026
c25e941
fix(observation): move processor_base test to correct test directory
yuzzjj Apr 29, 2026
2c13b86
feat(observation): add BroadcastProcessor — instant WS relay via Live…
yuzzjj Apr 29, 2026
6a0f50b
feat(observation): add PersistenceProcessor — deferred-INSERT OTel sp…
yuzzjj Apr 29, 2026
e596d2d
fix(observation): address code review findings for processors
yuzzjj Apr 29, 2026
267ffdb
feat(observation): add ObservationTracerProvider — per-execution OTel…
yuzzjj Apr 29, 2026
e7d3877
feat(observation): add langchain_utils — message serialization, usage…
yuzzjj Apr 29, 2026
322d440
feat(observation): rewrite ObservationCallbackHandler with all 18 Lan…
yuzzjj Apr 29, 2026
58b9a9a
fix(observation): address code review findings for callback handler
yuzzjj Apr 29, 2026
c48eae7
feat(observation): rewrite ObservationCollector as OTel-backed API
yuzzjj Apr 29, 2026
4f70f26
refactor(observation): remove SpanHandle, writer, broadcaster — repla…
yuzzjj Apr 29, 2026
048488c
refactor(observation): adapt extractors to OTel-backed collector API
yuzzjj Apr 29, 2026
995d86d
refactor(observation): update engine call sites to OTel-backed collector
yuzzjj Apr 29, 2026
830e738
fix(observation): remove stale await on sync collector.start_agent in…
yuzzjj Apr 29, 2026
145dc36
docs: add follow-up for frontend WS observation protocol migration
yuzzjj Apr 29, 2026
c4ec9a5
fix(agents): auto-fork draft version on publish and frozen-version save
yuzzjj Apr 29, 2026
0050bff
fix(observation): address final code review findings (IM1, IM2)
yuzzjj Apr 29, 2026
153b54f
chore: remove stale empty tests/core/ directory
yuzzjj Apr 29, 2026
e2baa66
refactor(observation): simplify processors and reuse existing utils
yuzzjj Apr 29, 2026
4adff66
fix(observation): remove context.attach/detach to fix async Task mism…
yuzzjj Apr 29, 2026
31cabd9
feat(observation): align WS streaming contract end-to-end and clean d…
yuzzjj Apr 29, 2026
686881d
feat(observation): add LLM streaming text pipeline with throttled WS …
yuzzjj Apr 29, 2026
f30f22a
feat(observation): reinforce detail panel with Langfuse-aligned struc…
yuzzjj Apr 29, 2026
1c2ebd7
fix(observation): align LLM input format with Langfuse and render mar…
yuzzjj Apr 30, 2026
89ae4a1
docs: add architecture hardening design
yuzzjj Apr 30, 2026
a881452
docs: add architecture hardening plan
yuzzjj Apr 30, 2026
c5d8693
refactor: centralize architecture contract values
yuzzjj Apr 30, 2026
421ed42
refactor: move execution orchestrator to service layer
yuzzjj Apr 30, 2026
78f8c1d
feat: expose execution engine capabilities
yuzzjj Apr 30, 2026
6126692
test: cover unsupported execution message injection
yuzzjj Apr 30, 2026
88fa041
test: use valid trigger source in orchestrator boundary test
yuzzjj Apr 30, 2026
93dc2a5
docs: document execution event sequencing constraint
yuzzjj Apr 30, 2026
b2ae3aa
docs: clarify event sequence cache writer constraint
yuzzjj Apr 30, 2026
546ec76
refactor: align frontend architecture contracts
yuzzjj Apr 30, 2026
d9d1f32
refactor: derive frontend architecture types from constants
yuzzjj Apr 30, 2026
efe13b5
refactor: introduce visual definition adapter
yuzzjj Apr 30, 2026
f01f9b0
fix: preserve visual definition payload fields
yuzzjj Apr 30, 2026
71a29eb
fix: preserve beacon visual definition payload
yuzzjj Apr 30, 2026
36fdb46
test: enforce builder surface mapping
yuzzjj Apr 30, 2026
c8d8388
docs: refresh architecture for agent execution model
yuzzjj Apr 30, 2026
19860c9
docs: align architecture docs execution events
yuzzjj Apr 30, 2026
53e29c2
docs: update architecture source references
yuzzjj Apr 30, 2026
34bfce3
docs: remove stale graph service reference
yuzzjj Apr 30, 2026
d0439c3
fix: preserve forked visual payload cache
yuzzjj Apr 30, 2026
7df1895
docs: remove frontend WebSocket protocol migration follow-up document
yuzzjj Apr 30, 2026
6337e93
refactor: unify error handling architecture and remove legacy documen…
yuzzjj Apr 30, 2026
160944b
docs: document architecture hardening, unified error contract, state …
yuzzjj Apr 30, 2026
2508828
refactor: update execution error schema and standardize WebSocket end…
yuzzjj Apr 30, 2026
c997e32
refactor: decouple internal copilot engine from user-facing runtimes …
yuzzjj Apr 30, 2026
06326ac
refactor: cleanup unused services and legacy utilities while updating…
yuzzjj Apr 30, 2026
7e8355a
docs: agent kind refactor design spec (EngineKind + RuntimeKind)
yuzzjj Apr 30, 2026
34d73d0
docs: agent kind refactor implementation plan
yuzzjj Apr 30, 2026
ab373ac
refactor: replace DefinitionKindLiteral/RuntimeKindLiteral with Engin…
yuzzjj Apr 30, 2026
c0f91c1
refactor: rename engine classes and update registry to use engine_kind
yuzzjj Apr 30, 2026
006bb3a
refactor: promote CLI providers to first-class engines, delete CLIEngine
yuzzjj Apr 30, 2026
ea3915f
refactor: rename definition_kind→engine_kind and executor_kind→engine…
yuzzjj Apr 30, 2026
1ee299b
refactor: update schemas to use EngineKind/RuntimeKind
yuzzjj Apr 30, 2026
9d0ebd8
refactor: update services to route by engine_kind directly
yuzzjj Apr 30, 2026
4152b07
feat: add migration to rename agent kind columns and remap values
yuzzjj Apr 30, 2026
3a20f73
refactor: update frontend types to EngineKind/RuntimeKind
yuzzjj Apr 30, 2026
6f8dbbc
refactor: update all frontend components to use EngineKind/RuntimeKind
yuzzjj Apr 30, 2026
d8d8ddc
refactor: fix remaining definition_kind/executor_kind references and …
yuzzjj Apr 30, 2026
4c57a1e
refactor: split trigger_source into trigger_medium and run_purpose
yuzzjj Apr 30, 2026
fd1ffc4
feat: add alembic migrations for trigger_medium/run_purpose and engin…
yuzzjj Apr 30, 2026
67901e8
chore: remove legacy task assignee fields and update lock files
yuzzjj Apr 30, 2026
a4d8882
refactor: fix remaining trigger_source references across backend and …
yuzzjj Apr 30, 2026
6743c49
refactor: consolidate CLI-based engines into generic CLIEngine and op…
yuzzjj Apr 30, 2026
c02cb9c
refactor: unify agent metadata schemas, update execution backends, an…
yuzzjj May 6, 2026
b11c318
refactor: improve type safety, fix execution logic, and optimize fron…
yuzzjj May 6, 2026
104e466
refactor: clean up execution dispatch typing, consolidate execution c…
yuzzjj May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 4 additions & 69 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ share/python-wheels/
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

Expand All @@ -62,23 +60,10 @@ cover/
*.mo
*.pot

# Crew stuff:
demo_stands/

# Django stuff:
# Logs
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
db/*sqlite3
*_stand/
backend/logs/*
# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy
backend/app/logs

# Sphinx documentation
docs/_build/
Expand All @@ -95,60 +80,28 @@ profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
# PEP 582
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
*.env
.env
.venv
# env.* 会误伤 backend/alembic/env.py,故只忽略根目录下的 env.*
/env.*
!frontend/lib/core/config/env.ts # 允许前端配置文件
src/ENV/
venv/
ENV/
env/
env.bak/
venv.bak/
.django_venv
.crew_venv
*venv
venvs/
run_program/manager.env
!src/.env
!src/debug.env

Expand Down Expand Up @@ -183,10 +136,6 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# VSCode
Expand All @@ -195,8 +144,6 @@ cython_debug/
# Logging files
log.txt
.telemetry_log/

backend/langgraph_app.*
backend/app/logs
*.jsonl

Expand All @@ -221,17 +168,11 @@ api_keys.json
.secrets.baseline.scan.json
.secrets.baseline.tmp

# Additional tool
additional_tools/
make_scripts/backups

# Savefiles
**/savefiles

# FRONTEND GIT ignore



# Compiled output
frontend/dist
frontend/tmp
Expand Down Expand Up @@ -281,13 +222,7 @@ frontend/typings
frontend/.DS_Store
Thumbs.db

executions
openai-realtime-console
src/django_app/staticfiles/*


#knowledge data
knowledge/graph_data/
/executions

# IDE/Editor folders
.claude/
Expand Down
43 changes: 24 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ repos:
- id: ruff-format
files: ^backend/

# Backend - Ruff check (强制检查,不允许错误)
# 注意:此 hook 会检查整个 backend 目录,确保没有 lint 错误
# Backend - Ruff strict check
- repo: local
hooks:
- id: backend-ruff-check
Expand All @@ -39,22 +38,10 @@ repos:
language: system
files: ^backend/.*\.py$
pass_filenames: false
always_run: false # 只在有 Python 文件更改时运行
stages: [commit]
always_run: false
stages: [pre-commit]

# Python - Type checking (mypy runs in Backend CI job only; skipped in pre-commit)
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.13.0
# hooks:
# - id: mypy
# files: ^backend/app/
# args: [--ignore-missing-imports]
# additional_dependencies:
# - types-requests
# - types-PyYAML

# Frontend - ESLint (强制检查,不允许错误)
# 注意:此 hook 会检查整个 frontend 目录,确保没有 lint 错误
# Frontend - ESLint + TypeScript type-check + Prettier format check
- repo: local
hooks:
- id: frontend-lint
Expand All @@ -63,8 +50,26 @@ repos:
language: system
files: ^frontend/.*\.(ts|tsx|js|jsx)$
pass_filenames: false
always_run: false # 只在有前端文件更改时运行
stages: [commit]
always_run: false
stages: [pre-commit]

- id: frontend-type-check
name: Frontend TypeScript Check
entry: bash -c 'cd frontend && bun run type-check || exit 1'
language: system
files: ^frontend/.*\.(ts|tsx)$
pass_filenames: false
always_run: false
stages: [pre-commit]

- id: frontend-format-check
name: Frontend Prettier Check
entry: bash -c 'cd frontend && bun run format:check || exit 1'
language: system
files: ^frontend/.*\.(ts|tsx|js|jsx|json|css|md)$
pass_filenames: false
always_run: false
stages: [pre-commit]

# CI configuration
ci:
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ This document provides detailed instructions for setting up and running the JoyS
Using Docker (recommended):

```bash
cd backend/docker
./start.sh
cd deploy
docker compose -f docker-compose-middleware.yml up -d
```

Or manually start PostgreSQL and Redis on your system.
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,15 @@ All modes support remote deployment scenarios:

**Key design principles:**

- **Single source of truth for value domains** — `core/contracts/` defines every canonical value (status, error code, trigger source) as Literal types + set constants; no magic strings
- **Engine protocol + registry** — all execution engines implement `ExecutionEngine` Protocol; `EngineRegistry` maps `runtime_kind` to engine instances; adding a new engine is a 3-file change
- **Two-phase event bus** — Phase 1 (persistence + state transition) shares a DB transaction and commits atomically; Phase 2 (WebSocket + task sync) fans out in parallel
- **Centralized state machines** — 6 entity state machines (`Agent`, `Version`, `Release`, `Run`, `Execution`, `Task`) with `transition_*()` as the only status-mutation functions
- **Normalized error system** — `AppError.to_payload()` produces a canonical `ErrorDescriptor` (`{code, message, data, source, retryable, user_action}`) consumed identically across HTTP, WebSocket, SSE, and DB
- **Port/Adapter boundaries** — `core/ports/` defines Protocol interfaces; `services/` provides implementations; `core/` never imports concrete services
- **OTel-backed observation** — `ObservationCollector` injected into `ExecutionContext`; spans exported to both DB and WebSocket for real-time trace display
- **Graph-based execution** — every agent workflow is a stateful LangGraph, enabling pause, resume, and branch
- **Unified Run Center** — Chat, Copilot, and Skill Creator share a single event-sourced run lifecycle (Run → Event → Snapshot)
- **Unified WebSocket layer** — BaseWsClient abstract class; Chat / Run / Notification clients share lifecycle, auth (ws-token), and reconnect logic
- **Full-chain trace_id propagation** — contextvars-based request tracing from HTTP/WS entry through LangGraph to persistence
- **Glass-box observability** — real-time Langfuse tracing of every agent decision and state transition
- **Unified WebSocket layer** — BaseWsClient abstract class; Execution / Notification clients share lifecycle, auth (ws-token), and reconnect logic
- **RAII sandbox isolation** — per-user Docker containers with automatic handle release, zero state leakage
- **Canonical model identifiers** — full-stack (provider_name, model_name) resolution via ModelService → ModelFactory
- **Layered skill system** — skills are versioned units that compose into workflows without coupling
Expand Down Expand Up @@ -262,6 +266,10 @@ All modes support remote deployment scenarios:

| Tag | Feature | What it means |
|-----|---------|---------------|
| **NEW** | **Architecture Hardening** | 5-layer execution architecture with Engine Protocol, EngineRegistry, two-phase EventBus, centralized state machines, and Port/Adapter boundaries |
| **NEW** | **Unified Error Contract** | `AppError.to_payload()` produces canonical `ErrorDescriptor` consumed identically across HTTP, WS, SSE, and DB; frontend `ApiError` mirrors the shape with typed `source`/`retryable`/`userAction` |
| **NEW** | **State Machine Centralization** | 6 entity state machines (`Agent`, `Version`, `Release`, `Run`, `Execution`, `Task`) with `transition_*()` as the only status-mutation functions |
| **NEW** | **Observation Tracing** | OTel-backed `ObservationCollector` injected into `ExecutionContext`; spans exported to DB and WebSocket for real-time trace display |
| **NEW** | **Run Center Architecture** | Chat & Copilot fully integrated into Run Center — run details, session recovery, and live event replay on page refresh |
| **NEW** | **Dark Mode & Preferences** | System / Light / Dark theme switching; redesigned profile page with language & theme preferences |
| **NEW** | **Unified WebSocket Layer** | BaseWsClient abstract class — Chat, Run, and Notification clients share lifecycle, auth (ws-token), and reconnect logic |
Expand Down
16 changes: 12 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,15 @@

**核心设计原则:**

- **值域唯一来源** —— `core/contracts/` 以 Literal 类型 + set 常量定义所有规范化值(状态、错误码、触发来源),杜绝魔术字符串
- **引擎协议 + 注册表** —— 所有执行引擎实现 `ExecutionEngine` Protocol;`EngineRegistry` 将 `runtime_kind` 映射到引擎实例;添加新引擎只需改 3 个文件
- **两阶段事件总线** —— 第 1 阶段(持久化 + 状态变迁)共享 DB 事务,原子提交;第 2 阶段(WebSocket + 任务同步)并行扇出
- **集中化状态机** —— 6 个实体状态机(`Agent`、`Version`、`Release`、`Run`、`Execution`、`Task`),`transition_*()` 是唯一的状态修改入口
- **规范化错误系统** —— `AppError.to_payload()` 输出规范的 `ErrorDescriptor`(`{code, message, data, source, retryable, user_action}`),HTTP/WS/SSE/DB 各传输路径一致消费
- **端口/适配器边界** —— `core/ports/` 定义 Protocol 接口;`services/` 提供实现;`core/` 不导入具体服务
- **OTel 观测追踪** —— `ObservationCollector` 注入 `ExecutionContext`;span 导出到 DB 和 WebSocket,支持实时追踪展示
- **图式执行** —— 每个 Agent 工作流都是有状态的 LangGraph,支持暂停、恢复与分支
- **统一 Run Center** —— Chat、Copilot、Skill Creator 共享同一套事件溯源运行生命周期(Run → Event → Snapshot)
- **统一 WebSocket 层** —— BaseWsClient 抽象基类;Chat / Run / Notification 三端客户端共享生命周期、认证(ws-token)与重连逻辑
- **trace_id 全链路追踪** —— 基于 contextvars 的请求追踪,从 HTTP/WS 入口贯穿 LangGraph 直至持久化
- **白盒可观测性** —— 基于 Langfuse 实时追踪每一步 Agent 决策与状态流转
- **统一 WebSocket 层** —— BaseWsClient 抽象基类;Execution / Notification 客户端共享生命周期、认证与重连逻辑
- **RAII 沙箱隔离** —— 用户级 Docker 容器,句柄自动释放,会话间零状态泄露
- **规范化模型标识** —— 全栈统一 (provider_name, model_name) 解析路径:ModelService → ModelFactory
- **分层技能体系** —— 技能是版本化单元,可自由组合成工作流,互不耦合
Expand Down Expand Up @@ -262,6 +266,10 @@

| 标签 | 功能 | 一句话说明 |
|------|------|-----------|
| **NEW** | **架构硬化** | 5 层执行架构:引擎协议 + EngineRegistry + 两阶段事件总线 + 集中化状态机 + 端口/适配器边界 |
| **NEW** | **统一错误契约** | `AppError.to_payload()` 输出规范 `ErrorDescriptor`,HTTP/WS/SSE/DB 一致消费;前端 `ApiError` 镜像类型化 `source`/`retryable`/`userAction` |
| **NEW** | **状态机集中化** | 6 个实体状态机(Agent、Version、Release、Run、Execution、Task),`transition_*()` 为唯一状态修改入口 |
| **NEW** | **观测追踪** | 基于 OTel 的 `ObservationCollector` 注入 ExecutionContext;span 导出到 DB 和 WebSocket,支持实时追踪 |
| **NEW** | **Run Center 架构** | Chat 与 Copilot 全面迁入 Run Center——支持运行详情查看、会话恢复、页面刷新后实时事件回放 |
| **NEW** | **深色模式与偏好设置** | 系统/浅色/深色三种主题切换;重新设计个人资料页面,新增语言与主题偏好 |
| **NEW** | **统一 WebSocket 层** | 引入 BaseWsClient 抽象基类——Chat、Run、Notification 三端客户端共享生命周期、认证(ws-token)与重连逻辑 |
Expand Down
32 changes: 32 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,38 @@ cd backend
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
```

## 项目结构

```
app/
├── api/v1/ # REST 路由模块
├── common/
│ └── app_errors.py # 统一异常层次 + ErrorDescriptor 序列化
├── core/
│ ├── contracts/ # 值域唯一来源(DefinitionKind、RuntimeKind、ErrorCode、ErrorSource 等)
│ ├── engine/ # 执行引擎协议、注册表、4 个内建引擎(CLI/Graph/Code/Copilot)
│ ├── events/ # 两阶段事件总线(ExecutionEventBus)+ 4 个内建订阅者
│ ├── state_machines/ # 集中化状态机(6 个实体的转换规则)
│ ├── observation/ # OTel-backed 观测追踪(注入 ExecutionContext)
│ ├── ports/ # Protocol 接口,解耦 core/ 与 services/
│ ├── agent/ # CLI agent 后端(claude_code、codex、openclaw)
│ ├── copilot/ # Copilot 服务
│ ├── graph/ # DeepAgents 图构建器 + 代码执行器
│ ├── skill/ # 技能系统(渐进式加载)
│ ├── model/ # 模型提供商 + 凭据管理
│ ├── tools/ # 工具解析器 + MCP 集成
│ └── a2a/ # Agent-to-Agent 协议
├── models/ # SQLAlchemy ORM 模型
├── repositories/ # 数据访问层
├── schemas/ # Pydantic 请求/响应 Schema
├── services/ # 服务层(DispatchService、ExecutionOrchestrator、40+ 模块)
├── websocket/ # WebSocket 处理器(/ws/executions、/ws/notifications、/ws/openclaw)
├── templates/ # 邮件模板(Jinja2)
└── utils/ # 共享工具
```

> 完整架构文档:[`docs/ARCHITECTURE.md`](../docs/ARCHITECTURE.md) | [中文版](../docs/ARCHITECTURE_CN.md)

## API 文档

- Swagger UI: http://localhost:8000/docs
Expand Down
Loading
Loading