multica/server/internal
Naiyuan Qing 9ede795c5b feat(api): strict workspace isolation + agent parity fixes
Enforce workspace isolation at every layer:

- Router: move RequireWorkspaceMember middleware to group level so ALL
  workspace-scoped routes (issues, agents, skills, runtimes, inbox,
  comments) require workspace context
- SQL: add GetXxxInWorkspace queries that filter by workspace_id,
  eliminating cross-workspace data access at the query level
- Handlers: loadXForUser functions use workspace-scoped queries,
  no fallback to unscoped queries
- Migration 025: add workspace_id column to comment table with backfill
- ListComments: add workspace_id filter for defense-in-depth

Fix daemon workspace mapping:
- Server returns workspace_id in task claim response (from issue)
- Daemon uses task.WorkspaceID directly instead of unreliable
  workspaceIDForRuntime() local map lookup
- Remove workspaceIDForRuntime function

Fix agent/human parity:
- Comment update/delete: use resolveActor for isAuthor check so agents
  can edit/delete their own comments
- Event attribution: replace hardcoded "member" with resolveActor in
  agent, skill, and subscriber publish calls

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 16:49:13 +08:00
..
auth feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
cli feat(cli): support app_url in CLI config (#186) 2026-03-30 15:51:17 +08:00
daemon feat(api): strict workspace isolation + agent parity fixes 2026-03-30 16:49:13 +08:00
events feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
handler feat(api): strict workspace isolation + agent parity fixes 2026-03-30 16:49:13 +08:00
logger feat(logging): add structured logging across server and SDK 2026-03-26 10:57:11 +08:00
middleware refactor(server): consolidate workspace permission checks into middleware 2026-03-30 03:40:20 +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