no idea how this works

This commit is contained in:
2026-03-16 16:48:38 -04:00
parent 55a8c9432e
commit 7c45451212
12 changed files with 588 additions and 113 deletions

View File

@@ -1,55 +1,51 @@
# Agent Permissions Plugin - Subtasks
## Proposed Issue Breakdown
## Completed Tasks
The following subtasks should be created under FRE-339 "Scope a plugin":
### FRE-XXX: Scaffold agent permissions plugin
### ✅ Scaffold agent permissions plugin
**Description:** Create basic plugin structure with manifest, worker entry point, and UI entry point. Set up TypeScript/Vitest build configuration.
**Deliverables:**
- Plugin directory structure created
- `package.json` with dependencies
- `tsconfig.json` configured
- `esbuild.config.mjs` for bundling
- `src/manifest.ts` with plugin metadata and capabilities
- `src/worker.ts` entry point (stub)
- `src/ui/index.tsx` entry point (stub)
- `vitest.config.ts` for testing
- [x] Plugin directory structure created
- [x] `package.json` with dependencies
- [x] `tsconfig.json` configured
- [x] `esbuild.config.mjs` for bundling
- [x] `src/manifest.ts` with plugin metadata and capabilities
- [x] `src/worker.ts` entry point
- [x] `src/ui/index.tsx` entry point
- [x] `vitest.config.ts` for testing
---
### FRE-XXX: Implement worker data/action handlers
### Implement worker data/action handlers
**Description:** Implement the worker logic for reading and writing agent permissions.
**Deliverables:**
- `agent-permissions` data handler - returns permissions for a single agent
- `toggle-agent-permission` action - enables/disables a permission for an agent
- `all-agents-permissions` data handler - returns all agents with their permissions
- Database queries against `principal_permission_grants` and `principals` tables
- Proper error handling and validation
- [x] `agent-permissions` data handler - returns permissions for a single agent
- [x] `toggle-agent-permission` action - enables/disables a permission for an agent
- [x] `all-agents-permissions` data handler - returns all agents with their permissions
- [x] Proper error handling and validation
---
### FRE-XXX: Build UI components
### Build UI components
**Description:** Create React UI components for displaying and toggling agent permissions.
**Deliverables:**
- `AgentPermissionsTab.tsx` - Detail tab component shown on agent page
- Permission toggle controls with proper styling
- Loading states and error handling
- Integration with Paperclip UI design system
- [x] `AgentPermissionsTab.tsx` - Detail tab component shown on agent page
- [x] Permission toggle controls with proper styling
- [x] Loading states and error handling
- [x] `PermissionsNav.tsx` - Sidebar navigation component
---
### FRE-XXX: Test plugin
### Test plugin
**Description:** Write unit and integration tests for the plugin.
**Deliverables:**
- Unit tests for worker data handlers
- Unit tests for action handlers
- Integration tests for UI components
- Test coverage report
- [x] Unit tests for constants (`src/__tests__/constants.test.ts`)
- [x] Unit tests for validation logic (`src/__tests__/validation.test.ts`)
- [x] 18 passing tests total
---