summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-23 06:50:43 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-23 06:50:43 +0000
commitb0688c8819da1b7fcb4a97b6ec1fa58050e4841e (patch)
treec62b4ea3e5cdb56225c39ad930dd3e5584053827 /cmd
parentef7a45361996b7a49226a0b088e2599f2801d017 (diff)
feat: complete Agent Context API Phase 2 & 3 (Write/Create/Management)
- Implement write operations (complete, uncomplete, update due date, update task) - Implement create operations (create task, add shopping item) - Add Trusted Agents management UI in Settings with revocation support - Fix SQLite timestamp scanning bug for completed tasks - Add comprehensive unit tests for all new agent endpoints - Update worklog and feature documentation
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dashboard/main.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go
index 4112640..1d9e054 100644
--- a/cmd/dashboard/main.go
+++ b/cmd/dashboard/main.go
@@ -194,10 +194,20 @@ func main() {
r.Post("/auth/deny", h.HandleAgentAuthDeny)
})
- // Agent session required for context
+ // Agent session required for context and write operations
r.Group(func(r chi.Router) {
r.Use(h.AgentAuthMiddleware)
r.Get("/context", h.HandleAgentContext)
+
+ // Write Operations
+ r.Post("/tasks/{id}/complete", h.HandleAgentTaskComplete)
+ r.Post("/tasks/{id}/uncomplete", h.HandleAgentTaskUncomplete)
+ r.Patch("/tasks/{id}/due", h.HandleAgentTaskUpdateDue)
+ r.Patch("/tasks/{id}", h.HandleAgentTaskUpdate)
+
+ // Create Operations
+ r.Post("/tasks", h.HandleAgentTaskCreate)
+ r.Post("/shopping", h.HandleAgentShoppingAdd)
})
// HTML endpoints for browser-only agents (GET requests only)
@@ -273,6 +283,7 @@ func main() {
r.Post("/settings/features", h.HandleCreateFeature)
r.Post("/settings/features/toggle", h.HandleToggleFeature)
r.Delete("/settings/features/{name}", h.HandleDeleteFeature)
+ r.Delete("/settings/agents/{id}", h.HandleDeleteAgent)
// WebSocket for notifications
r.Get("/ws/notifications", h.HandleWebSocket)