Tags: ourines/codes
Tags
docs: sync HTTP endpoint table with actual server routes
Remove non-existent /dispatch endpoints (MCP tools, not HTTP),
fix /workflows/{name} split into GET + POST /run, replace
/teams/{name}/status|tasks with /teams/{name}/spawn, correct
/tasks/{id} to /tasks/{team}/{id}, and add missing /runs/*,
/feishu/webhook, and /assistant endpoints.
feat: add dispatch MCP tool for one-step task dispatching Adds `dispatch` tool to the MCP server (internal/mcp/dispatch_tool.go) that wraps the existing dispatch package, letting Claude Code dispatch natural language tasks to an agent team in a single call instead of manually calling team_create + agent_add + task_create + start_all. - dispatch tool: takes text, project, channel, callback_url, model - registerDispatchTool() called in RunServer() alongside other tool groups - CLAUDE.md updated: 43 → 44 tools, added Dispatch tools section
docs: update README for HTTP REST API and 43 MCP tools - Add HTTP REST API Server section with full endpoint table - Update MCP tools count 39/40 → 43 (Config:10 Agent:25 Stats:4 Workflow:4) - Add codes serve command to commands reference - Add chatsession/ and httpserver/ to dev structure - Document httpTokens and httpBind config fields - Update both English and Chinese READMEs
refactor: split commands.go into per-command files (closes #18) (#40) Split the 2354-line monolithic commands.go into 11 focused files: - version.go: Version vars, RunVersion, RunClaudeUpdate, RunSelfUpdate, checkForUpdates - select.go: RunSelect, RunClaudeWithConfig, runClaudeInDirectory - install.go: InstallClaude, installBinary, installShellCompletion, appendCompletionLine - add.go: RunAdd - init_cmd.go: RunInit - start.go: RunStart - project_cmd.go: RunProject* functions - profile.go: RunTest, testSingleConfiguration, testAllConfigurations, RunProfileList/Remove - config_cmd.go: RunConfig*, RunDefaultBehavior*, RunSkipPermissions*, RunTerminal* - remote_cmd.go: parseSSHAddress, RunRemote* functions - serve.go: RunServe, RunHTTPServer No behavior changes. Build and all tests pass.
feat: track API profile per session for per-profile stats (#32) (#38) - Add Profile field to SessionRecord, populated with config.Default at scan time - Add ByProfile map to DailyStat for per-profile cost aggregation - Add ProfileCost struct and TopProfiles to Summary - Add ProfileBreakdown() aggregator function - Update Aggregate() to populate ByProfile data - Add 'profile' view to TUI Stats tab f-key cycle (all→project→model→profile→all) - Add aggregateByProfile() and rendering in stats_view.go
feat: async task cancellation, task_redirect MCP tool, and /dispatch … …callback URL - Refactor daemon to execute tasks in background goroutines, enabling external cancellation by polling task file status every 3s. Context cancellation sends SIGTERM to the Claude subprocess. - Add RedirectTask(): cancel a running task and create a replacement with updated instructions, inheriting owner/priority/project/workDir. - Add task_redirect MCP tool (tool count 41→42) for MCP callers to cancel and replace running tasks in a single atomic operation. - Add CallbackURL field to Task; /dispatch endpoint accepts optional callback_url and daemon POSTs task result on completion/failure/cancel. - Add test_progress MCP tool to verify MCP progress notification support. Confirmed Claude Code sends progressToken on every tool call. - Update webhook/hook handlers to support cancelled status (task_cancelled event, on_task_cancelled hook). - Add 9 new tests covering all new functionality.
feat: add team_subscribe MCP tool for blocking notification delivery Add a new team_subscribe tool that blocks until agent task notifications arrive for a specific team, replacing the need for shell-based polling via team_watch. Uses sync.Cond for efficient wake-up instead of time.Sleep polling. Changes: - monitor.go: add notifCond, drainTeamNotifications, subscribeTimeoutOverride - agent_tools.go: add teamSubscribeHandler with deadline/ctx support - monitor_e2e_test.go: 3 new tests (receive, timeout, team filtering) - Update tool count 39 → 40 in CLAUDE.md and README.md
PreviousNext