multica/server/internal/handler
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
..
activity.go feat(activity): unified activity timeline with comment reply support 2026-03-28 21:53:08 +08:00
activity_test.go feat(activity): unified activity timeline with comment reply support 2026-03-28 21:53:08 +08:00
agent.go fix(daemon): prevent stuck tasks from blocking queue and add concurrent execution 2026-03-30 03:08:52 +08:00
auth.go fix(auth): reduce verification code rate limit from 60s to 10s 2026-03-26 15:44:05 +08:00
comment.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
daemon.go merge: resolve conflicts with main (workdir reuse) 2026-03-29 19:42:51 +08:00
daemon_pairing.go feat(runtime): add local codex daemon pairing 2026-03-24 12:03:14 +08:00
handler.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
handler_test.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
inbox.go feat(inbox): scope all inbox queries by workspace_id 2026-03-29 17:42:45 +08:00
issue.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
personal_access_token.go feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
runtime.go feat(runtimes): add usage charts, activity heatmap, and hourly distribution 2026-03-29 15:44:10 +08:00
runtime_ping.go feat(runtimes): add Runtimes tab with usage tracking and connection test 2026-03-26 18:28:36 +08:00
skill.go feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
subscriber.go fix(subscribers): pass user_type to subscribe/unsubscribe API for correct agent handling 2026-03-28 20:56:37 +08:00
subscriber_test.go feat(notifications): replace hardcoded inbox notifications with subscriber-driven model 2026-03-28 19:33:20 +08:00
workspace.go merge: resolve conflict in issue-detail breadcrumb 2026-03-29 17:45:53 +08:00