Skip to content

Mul cli#135

Open
yuzzjj wants to merge 69 commits intomainfrom
mul_cli
Open

Mul cli#135
yuzzjj wants to merge 69 commits intomainfrom
mul_cli

Conversation

@yuzzjj
Copy link
Copy Markdown
Collaborator

@yuzzjj yuzzjj commented Apr 17, 2026

No description provided.

yuzzjj and others added 30 commits April 15, 2026 14:38
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduces the cli_backends package with unified RuntimeProvider protocol,
ContainerProcessBridge for docker exec streaming, ClaudeCodeProvider for
parsing Claude Code NDJSON stream-json output, and a RuntimeProviderRegistry
singleton. Includes 13 unit tests covering data types, event parsing, registry
lookup, and async session operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Event-sourced execution lifecycle with row-lock seq increment, snapshot
projection via apply_execution_event reducer, and 20 unit tests covering
all event types plus immutability and full lifecycle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Repositories for Mission and AgentProfile with workspace-scoped queries,
MissionService with assign_to_agent and dispatch_mission lifecycle,
prompt builder for CLI agent execution, and 7 unit tests for prompt
generation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Docker container lifecycle management (create, stop, remove, exec),
CredentialInjector for API key injection, CLISkillInjector for writing
skill definitions, RuntimeConfigInjector for CLAUDE.md generation.
13 unit tests covering data classes, CLAUDE.md building, and async
injection calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ties together container lifecycle, credential/skill/config injection,
RuntimeProvider execution, message draining to ExecutionEvents, final
status marking, and container cleanup. 14 unit tests for message-to-event
type mapping and payload conversion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ExecutionSubscriptionManager for in-memory connection tracking,
ExecutionSubscriptionHandler for subscribe/unsubscribe/ping frames
with snapshot replay and event catch-up. 8 unit tests covering
subscription lifecycle, broadcast fan-out, and error disconnection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pydantic schemas for all three resources, API routers with CRUD + dispatch
+ cancel operations, registered in v1 router. WS /ws/executions endpoint
for execution streaming. Runtime provider init on startup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Node 22 slim base with Claude Code CLI, non-root agent user, git/curl/jq
utilities. Added to docker-compose build profile alongside openclaw-image.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 integration tests validating the full data flow: schema round-trips,
prompt building, registry lifecycle, container injection pipeline,
event sourcing with reducer, WebSocket subscription manager, message
mapping, Claude Code NDJSON parsing, container lifecycle, and end-to-end
data flow from mission to completed execution projection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…g, dispatch

C1: Remove CredentialInjector.inject() file-writing logic that wrote plaintext
API keys to /etc/environment. The class now only builds the env dict.

C2: Rename ExecutionStatus → MissionExecutionStatus in execution.py to avoid
collision with graph_execution.py's ExecutionStatus. Updated all imports,
the Alembic migration enum name, and removed the AgentExecutionStatus alias.

C3: Switch container_service.create_container from -e flags to --env-file
with a temp file (mode 0600) deleted after creation, so API keys no longer
appear in the process tree. Removed env parameter from container_bridge
exec_streaming since credentials are set at container creation time.

I2: dispatch_mission now launches an ExecutionRunner via asyncio.create_task
so executions actually start instead of staying QUEUED forever.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds sidebar entries for Missions and Agents, placeholder page routes,
TypeScript types, service layers, and React Query hooks for the
mission-driven multi-agent execution frontend foundation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements CodexProvider (JSON-RPC 2.0 over stdio) and OpenClawProvider
(stderr NDJSON), following the same pattern as ClaudeCodeProvider.
Updates registry to register all three providers and Dockerfile to
install Codex CLI. Adds 14 new unit tests covering event parsing for
both providers and registry integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add real-time WebSocket execution stream with polling fallback
- Fix dark mode: replace hardcoded colors with CSS variables across
  execution-event, execution-timeline, mission-column, mission-card,
  and mission-detail-panel
- Fix undefined CSS vars (--bg-secondary, --bg-hover) with --surface-3
- Add proper loading, error, and empty states to execution timeline
- Add mobile touch scrolling to mission board

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y-badge and agent-status

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, reducer perf, task error handling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add human-agent comment system for missions with auto-posting on
execution completion/failure, and fix critical chain-closure bugs:
execution completion now writes back mission status, clears
current_execution_id, terminates containers on cancel, and broadcasts
real-time events via WebSocket. Frontend notification provider
invalidates queries on mission/comment updates; Kanban shows all 7
status columns.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…tch 400

- Guard against non-dict JSON lines and string content blocks in Claude
  Code stream-json parsing (claude_code.py)
- Add isinstance check on result event's result field before calling .get()
- Default event.payload to {} in execution-event.tsx to prevent undefined access
- Expand ExecutionEventType and switch cases to handle backend event aliases
  (assistant_text, tool_use_start, tool_use_end, execution_started, etc.)
- Allow re-dispatch of IN_PROGRESS missions when current execution is terminal
- Mission board UI and filtering improvements

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…sLive prop

- Share EVENT_CONFIG objects between alias pairs instead of duplicating
- Use config.label for status fallback instead of string replace
- Extract AgentPickerContent sub-component to eliminate duplicated
  Popover+Command blocks in mission-detail-panel
- Add isLive prop to ExecutionTimeline; past executions skip WebSocket
  and polling (N+1 connection fix)
- Limit past executions to 10 in detail panel
- Hoist inline imports in mission_service.py to module level
- Use Date.parse for isOverdue to avoid unnecessary Date allocations

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
yuzzjj and others added 30 commits April 18, 2026 13:19
… imports

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Switch dispatch/cancel/finalize callers in missions.py, executions.py,
mission_comments.py, and scheduler.py from MissionService to
ExecutionLifecycleService. The mission_comments.py 4-tuple unpacking
is intentionally ahead of the service return type change (Task 2.3).

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…ng executions

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…snapshot)

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…equestException/ConflictException)

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Backend: add /meta/transitions endpoint, remove source_id from execution
creation. Frontend: mission-scoped execution methods (message, approve,
events, snapshot), ExecutionTimeline routes writes through mission context,
API-driven transition validation replacing hardcoded constants, URL
deep-linking for selected mission, narrowed cache invalidation, collapsed
duplicate approve/reject handlers, fixed service abstraction leak.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…ndicators and priority borders, and implement execution row display with cancellation support.
…t name resolution

- Add interrupt_wait to ACTIVE_EXECUTION_STATUSES for paused execution support
- Type-safe doUpdate with Partial<UpdateMissionRequest> and error toasts on all mutations
- Optimistic update for mission detail query cache alongside list cache
- Hide approval buttons on resolved events (gate by currentStatus === approval_wait)
- Fix status badge truncation by overriding SelectTrigger line-clamp and removing duplicate chevron
- Add i18n keys for all section headers (objective, description, tags, settings, dueDate, agent, comments)
- Fix pastExecutionsCount with {{count}} interpolation
- Resolve agent names in comment thread via agentNameMap from useAgentProfiles
- Layout refactor: merge objective+description, consolidate metadata into bordered card
- Extract formatDate to module scope

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…lean up duplicates

- Extract useAgentNameMap hook to deduplicate 3 identical agent-name-map patterns
  (comment-thread.tsx, executions-tab.tsx, missions/page.tsx)
- Fix isPendingApproval bug: only the last approval_request event shows
  Approve/Reject buttons, not all historical approval events
- Extract shared onMutationError callback from 5 duplicate inline closures
- Fix variable shadowing: filter callback param renamed to avoid shadowing
  useTranslation's t function
- Add getErrorMessage utility to toast module

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
…d update architecture documentation for WebSocket transition.
… compat code

- Delete frontend/stores/custom-tools/store.ts (mock store with zero consumers)
- Simplify custom-tools/types.ts: remove CustomToolParameter, LegacyCustomToolSchema,
  CustomTool, CustomToolsState, CustomToolsActions (all unused legacy types)
- Remove convertToLegacyTool(), syncCustomToolsToStore(), and CustomTool alias
  from custom-tools.ts queries
- Remove dead CanvasNode interface and index signature from chat/types.ts
- Remove dead usage_metadata legacy fallback from token_usage.py

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
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.

1 participant