feat: pivot to AI-native task management platform (#232)
Replace the agent framework codebase with a new monorepo structure for an AI-native Linear-like product where agents are first-class citizens. New architecture: - server/ — Go backend (Chi + gorilla/websocket + sqlc) - API server with REST routes for issues, agents, inbox, workspaces - WebSocket hub for real-time updates - Local daemon entry point for agent runtime connection - PostgreSQL migration with 13 tables (issue, agent, inbox, etc.) - WebSocket protocol types for server<->daemon communication - apps/web/ — Next.js 16 frontend - Dashboard layout with sidebar navigation - Route skeleton: inbox, issues, agents, board, settings - packages/ui/ — Preserved shadcn/ui design system (26+ components) - packages/types/ — Full API contract types (Issue, Agent, Workspace, Inbox, Events) - packages/sdk/ — REST ApiClient + WebSocket WSClient - packages/store/ — Zustand stores (issue, agent, inbox, auth) - packages/hooks/ — React hooks (useIssues, useAgents, useInbox, useRealtime) - packages/utils/ — Shared utilities Removed: apps/cli, apps/desktop, apps/mobile, apps/gateway, packages/core, skills/, and all agent-framework code. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3f589d8326
commit
d4f5c5b16f
677 changed files with 2779 additions and 122531 deletions
25
server/pkg/protocol/events.go
Normal file
25
server/pkg/protocol/events.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package protocol
|
||||
|
||||
// Event types for WebSocket communication between server, web clients, and daemon.
|
||||
const (
|
||||
// Issue events
|
||||
EventIssueCreated = "issue:created"
|
||||
EventIssueUpdated = "issue:updated"
|
||||
EventIssueDeleted = "issue:deleted"
|
||||
|
||||
// Agent events
|
||||
EventAgentStatus = "agent:status"
|
||||
|
||||
// Task events (server <-> daemon)
|
||||
EventTaskDispatch = "task:dispatch"
|
||||
EventTaskProgress = "task:progress"
|
||||
EventTaskCompleted = "task:completed"
|
||||
EventTaskFailed = "task:failed"
|
||||
|
||||
// Inbox events
|
||||
EventInboxNew = "inbox:new"
|
||||
|
||||
// Daemon events
|
||||
EventDaemonHeartbeat = "daemon:heartbeat"
|
||||
EventDaemonRegister = "daemon:register"
|
||||
)
|
||||
63
server/pkg/protocol/messages.go
Normal file
63
server/pkg/protocol/messages.go
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
package protocol
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// Message is the envelope for all WebSocket messages.
|
||||
type Message struct {
|
||||
Type string `json:"type"`
|
||||
Payload json.RawMessage `json:"payload"`
|
||||
}
|
||||
|
||||
// TaskDispatchPayload is sent from server to daemon when a task is assigned.
|
||||
type TaskDispatchPayload struct {
|
||||
TaskID string `json:"task_id"`
|
||||
IssueID string `json:"issue_id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
AcceptanceCriteria []string `json:"acceptance_criteria"`
|
||||
ContextRefs []string `json:"context_refs"`
|
||||
Repository *RepoRef `json:"repository,omitempty"`
|
||||
}
|
||||
|
||||
// RepoRef points to a code repository.
|
||||
type RepoRef struct {
|
||||
URL string `json:"url"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Path string `json:"path,omitempty"`
|
||||
}
|
||||
|
||||
// TaskProgressPayload is sent from daemon to server during task execution.
|
||||
type TaskProgressPayload struct {
|
||||
TaskID string `json:"task_id"`
|
||||
Summary string `json:"summary"`
|
||||
Step int `json:"step,omitempty"`
|
||||
Total int `json:"total,omitempty"`
|
||||
}
|
||||
|
||||
// TaskCompletedPayload is sent from daemon to server when a task finishes.
|
||||
type TaskCompletedPayload struct {
|
||||
TaskID string `json:"task_id"`
|
||||
PRURL string `json:"pr_url,omitempty"`
|
||||
Output string `json:"output,omitempty"`
|
||||
}
|
||||
|
||||
// DaemonRegisterPayload is sent from daemon to server on connection.
|
||||
type DaemonRegisterPayload struct {
|
||||
DaemonID string `json:"daemon_id"`
|
||||
AgentID string `json:"agent_id"`
|
||||
Runtimes []RuntimeInfo `json:"runtimes"`
|
||||
}
|
||||
|
||||
// RuntimeInfo describes an available agent runtime on the daemon's machine.
|
||||
type RuntimeInfo struct {
|
||||
Type string `json:"type"`
|
||||
Version string `json:"version"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// HeartbeatPayload is sent periodically from daemon to server.
|
||||
type HeartbeatPayload struct {
|
||||
DaemonID string `json:"daemon_id"`
|
||||
AgentID string `json:"agent_id"`
|
||||
CurrentTasks int `json:"current_tasks"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue