feat: integrate 5 feature branches#256
Closed
amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
Closed
feat: integrate 5 feature branches#256amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
Conversation
…y, KAIROS activation, openclaw autonomy Squashed merge of: 1. fix/mcp-tsc-errors — 修复上游 MCP 重构后的 tsc 错误和测试失败 2. feat/pipe-mute-disconnect — Pipe IPC 逻辑断开、/lang 命令、mute 状态机 3. feat/stub-recovery-all — 实现全部 stub 恢复 (task 001-012) 4. feat/kairos-activation — KAIROS 激活解除阻塞 + 工具实现 5. codex/openclaw-autonomy-pr — 自治权限系统、运行记录、managed flows Conflicts resolved: - src/commands/assistant/assistant.tsx (stub-recovery + kairos) - src/services/api/openai/__tests__/queryModelOpenAI.test.ts (mcp-fix + autonomy) Tested: bun test (2695 pass, 0 fail)
Contributor
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughImplements persistent KAIROS assistant mode with autonomy run tracking and managed flow orchestration, background session management commands (ps/logs/kill/attach), template-based job creation, language selection, pipe communication control, and comprehensive supporting infrastructure including state persistence, daemon management, and baseline testing. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User / CLI
participant REPL as REPL Screen
participant ProactiveHook as Proactive Hook
participant AutonomyAuth as Autonomy Authority
participant AutonomyRuns as Autonomy Runs
participant ManagedFlows as Managed Flows
participant TaskExecution as Task Execution
participant Teammate as In-Process Teammate
User->>REPL: Activate proactive mode
activate REPL
REPL->>ProactiveHook: onQueueTick(command)
activate ProactiveHook
ProactiveHook->>AutonomyAuth: createProactiveAutonomyCommands()
activate AutonomyAuth
AutonomyAuth->>AutonomyAuth: loadAutonomyAuthority()
AutonomyAuth->>AutonomyAuth: collectDueHeartbeatTasks()
AutonomyAuth-->>ProactiveHook: [QueuedCommand, ...]
deactivate AutonomyAuth
ProactiveHook->>AutonomyRuns: createAutonomyQueuedPrompt()
activate AutonomyRuns
AutonomyRuns->>AutonomyRuns: createAutonomyRun(trigger: 'proactive-tick')
Note over AutonomyRuns: Persist run with status: queued
AutonomyRuns-->>ProactiveHook: QueuedCommand
deactivate AutonomyRuns
ProactiveHook->>REPL: enqueue(command)
deactivate ProactiveHook
deactivate REPL
REPL->>REPL: handleIncomingPrompt(command)
activate REPL
REPL->>AutonomyRuns: markAutonomyRunRunning(runId)
Note over AutonomyRuns: Update run status: running
REPL->>TaskExecution: processUserInput(prompt)
activate TaskExecution
TaskExecution->>Teammate: injectUserMessageToTeammate()
activate Teammate
Note over Teammate: Enqueue with autonomyRunId
Teammate-->>TaskExecution: true
deactivate Teammate
TaskExecution-->>REPL: result
deactivate TaskExecution
REPL->>AutonomyRuns: finalizeAutonomyRunCompleted(runId)
activate AutonomyRuns
alt Has Managed Parent Flow
AutonomyRuns->>ManagedFlows: resumeManagedAutonomyFlow()
activate ManagedFlows
ManagedFlows-->>AutonomyRuns: nextStep
deactivate ManagedFlows
AutonomyRuns->>REPL: enqueue(nextCommand)
end
Note over AutonomyRuns: Update run status: completed
deactivate AutonomyRuns
deactivate REPL
sequenceDiagram
participant CLI as CLI (bg.ts)
participant SessionReg as Session Registry
participant Filesystem as Filesystem
participant Tmux as Tmux Session
participant LogFile as Log File
User->>CLI: claude bg ps
activate CLI
CLI->>SessionReg: Read sessions from config dir
activate SessionReg
SessionReg->>Filesystem: Read ~/.claude/sessions/
SessionReg-->>CLI: [SessionEntry, ...]
deactivate SessionReg
CLI->>CLI: Filter by PID liveness
CLI-->>User: Display session table
deactivate CLI
User->>CLI: claude bg logs [sessionId]
activate CLI
CLI->>SessionReg: resolveTargetSession(sessionId)
SessionReg-->>CLI: SessionEntry with logPath
CLI->>LogFile: Read log file
LogFile-->>CLI: Log contents
CLI-->>User: Print log
deactivate CLI
User->>CLI: claude bg attach [sessionId]
activate CLI
CLI->>SessionReg: resolveTargetSession(sessionId)
SessionReg-->>CLI: SessionEntry with tmuxSessionName
CLI->>Tmux: tmux attach-session -t <name>
activate Tmux
Note over Tmux: User interacts with session
Tmux-->>User: (attached)
deactivate Tmux
deactivate CLI
User->>CLI: claude --bg <command>
activate CLI
CLI->>Filesystem: Generate unique tmux session name
CLI->>Filesystem: Compute log path
CLI->>Tmux: tmux new-session -d -s <name> <command>
activate Tmux
Tmux-->>CLI: Session started
deactivate Tmux
CLI->>Filesystem: Write session metadata to config
CLI-->>User: Print connection info
deactivate CLI
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
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.
Summary
Test plan
bunx tsc --noEmit零错误bun test全部通过🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
ps,logs,kill,attach)/langcommand)Bug Fixes
Documentation