veritas-kanban/cli/src/utils
Brad Groux 3f5c9a03af
feat: enforce CLI and MCP token permissions
## Summary

- adds a shared client-side API permission mapper and guarded API client for CLI and MCP calls
- exposes a non-secret /api/auth/context endpoint for scoped token preflight
- routes CLI and MCP task lookup helpers through the guarded client
- preflights direct summary text fetches that bypass the JSON API helper
- adds focused CLI and MCP token authorization coverage and documents the behavior

Refs #336.

## Verification

- pnpm --filter @veritas-kanban/shared build
- pnpm --filter @veritas-kanban/cli typecheck
- pnpm --filter @veritas-kanban/mcp build
- pnpm --filter @veritas-kanban/server typecheck
- focused CLI and MCP api-permissions tests
- pnpm lint:budget
- pnpm audit --prod --audit-level=high
- pnpm build
- GitHub Actions: Build, Lint & Type Check, Security Audit, Workspace Unit Tests
2026-05-31 04:35:10 -05:00
..
api.ts feat: enforce CLI and MCP token permissions 2026-05-31 04:35:10 -05:00
find.ts feat: enforce CLI and MCP token permissions 2026-05-31 04:35:10 -05:00
format.ts v1.2.0: Foundation Hardening (#2, #6, #32) 2026-01-31 23:03:10 -06:00
types.ts feat: add CLI usage reporting commands (closes #50) 2026-02-05 17:53:52 -06:00