php-agentic/View/Modal
darbs-claude 6ebd527204
Some checks failed
CI / PHP 8.4 (pull_request) Failing after 1m35s
CI / PHP 8.3 (pull_request) Failing after 1m46s
refactor: unify ApiKeyManager to use AgentApiKey model (#19)
Switch View/Modal/Admin/ApiKeyManager.php from Core\Api\Models\ApiKey
to Core\Mod\Agentic\Models\AgentApiKey and AgentApiKeyService, bringing
the workspace-owner admin UI into consistency with all other services.

Changes:
- Replace Core\Api\Models\ApiKey import with AgentApiKey + AgentApiKeyService
- Use AgentApiKeyService::create() for key generation
- Use AgentApiKey::forWorkspace() scoping in revokeKey() and render()
- Rename newKeyScopes → newKeyPermissions, toggleScope → togglePermission
- Expose availablePermissions() from AgentApiKey for the create form
- Update blade template: permissions field, getMaskedKey(), togglePermission,
  dynamic permission checkboxes from AgentApiKey::availablePermissions()
- Add tests/Feature/ApiKeyManagerTest.php with integration coverage
- Mark CQ-002 resolved in TODO.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 06:09:05 +00:00
..
Admin refactor: unify ApiKeyManager to use AgentApiKey model (#19) 2026-02-23 06:09:05 +00:00