multica/server/cmd/multica
LinYushen d41b986cb0
feat(server): distinguish agent vs human CLI actions (#181)
* feat(server): distinguish agent vs human CLI actions via X-Agent-ID/X-Task-ID headers

Extract resolveActor helper in handler to centralize agent identity resolution
from X-Agent-ID header with X-Task-ID cross-validation. Fix DeleteComment,
DeleteIssue, and UpdateComment handlers that previously hardcoded "member" as
actor type. Forward MULTICA_TASK_ID as X-Task-ID header from CLI client.

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

* fix(server): add debug logging and test coverage for resolveActor

Add slog.Debug on agent/task validation failures for easier debugging.
Add TestResolveActor with 5 cases covering member fallback, valid agent,
non-existent agent, valid task, and mismatched task.

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:12:59 +08:00
..
cmd_agent.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
cmd_auth.go fix(cli): always update server_url on login 2026-03-30 01:49:07 +08:00
cmd_auth_test.go Improve local CLI auth and skills UX 2026-03-27 18:32:56 +08:00
cmd_compat_test.go feat(cli): restructure CLI commands for better UX 2026-03-29 01:43:45 +08:00
cmd_config.go feat(cli): restructure CLI commands for better UX 2026-03-29 01:43:45 +08:00
cmd_daemon.go fix(daemon): prevent stuck tasks from blocking queue and add concurrent execution 2026-03-30 03:08:52 +08:00
cmd_issue.go fix(cli): rune-safe truncateID, consistent client construction, add --output to status cmd 2026-03-27 14:12:16 +08:00
cmd_issue_test.go fix: address PR #149 review findings 2026-03-27 16:15:58 +08:00
cmd_login.go feat(cli): restructure CLI commands for better UX 2026-03-29 01:43:45 +08:00
cmd_repo.go feat(daemon): agent-driven repo checkout with bare clone cache 2026-03-29 19:37:48 +08:00
cmd_version.go refactor(release): rename multica-cli to multica 2026-03-25 17:34:29 +08:00
cmd_workspace.go feat(cli): restructure CLI commands for better UX 2026-03-29 01:43:45 +08:00
main.go feat(daemon): agent-driven repo checkout with bare clone cache 2026-03-29 19:37:48 +08:00