multica/server/internal
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
..
auth feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
cli feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
daemon fix(daemon): improve agent execution log readability 2026-03-30 03:40:02 +08:00
events feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
handler feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
logger feat(logging): add structured logging across server and SDK 2026-03-26 10:57:11 +08:00
middleware feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
realtime feat(realtime): route personal events to target user only 2026-03-29 17:42:50 +08:00
service fix(daemon): prevent stuck tasks from blocking queue and add concurrent execution 2026-03-30 03:08:52 +08:00
util feat(server): add task service layer and daemon REST protocol 2026-03-23 18:34:51 +08:00