UNPKG

@hasna/projects

Version:

High-level project management CLI, MCP server, SDK, and AI SDK agent loop for coding agents

48 lines • 2.51 kB
import type { Agent, CreateWorkspaceInput, Recipe, Root, UpdateWorkspaceInput, Workspace, WorkspaceAgentAssignment, WorkspaceEvent, WorkspaceKind, WorkspaceLocation, WorkspaceStatus } from "../../types/workspace.js"; export type { Agent, CreateWorkspaceInput, Recipe, Root, UpdateWorkspaceInput, Workspace, WorkspaceAgentAssignment, WorkspaceEvent, WorkspaceKind, WorkspaceLocation, WorkspaceStatus, } from "../../types/workspace.js"; export { WORKSPACE_KINDS, WORKSPACE_STATUSES } from "../../types/workspace.js"; /** Which registry transport is serving this session (from the store seam). */ export type ProjectTransport = "local" | "http"; /** Filters the projects list view can apply. */ export interface ProjectsListFilter { status?: WorkspaceStatus; kind?: WorkspaceKind; query?: string; tags?: string[]; limit?: number; } /** The enriched per-project management view shown in list/detail rows. */ export interface ProjectManagementView { stage?: string; priority?: string; owner?: string; health: "ok" | "missing" | "untracked" | "unknown"; lastOpenedAt: string | null; } /** The TUI data layer: routing is internal (local sqlite vs hosted /v1). */ export interface ProjectsDataApi { /** Resolve the active store; throws a friendly error when nothing is configured. */ transport(): ProjectTransport; /** The configured authority host for the http transport, or null for local. */ authority(): string | null; listProjects(filter?: ProjectsListFilter): Promise<Workspace[]>; getProject(idOrSlug: string): Promise<Workspace>; createProject(input: CreateWorkspaceInput): Promise<Workspace>; updateProject(id: string, patch: UpdateWorkspaceInput): Promise<Workspace>; archiveProject(id: string): Promise<Workspace>; unarchiveProject(id: string): Promise<Workspace>; deleteProject(id: string, hard?: boolean): Promise<{ deleted: boolean; hard: boolean; id: string; }>; listRoots(): Promise<Root[]>; listRecipes(): Promise<Recipe[]>; listAgents(): Promise<Agent[]>; listProjectEvents(idOrSlug: string, limit?: number): Promise<WorkspaceEvent[]>; listProjectLocations(idOrSlug: string): Promise<WorkspaceLocation[]>; listProjectAgents(idOrSlug: string): Promise<WorkspaceAgentAssignment[]>; /** Enriched management fields (stage/priority/owner/health) for one project. */ managementView(project: Workspace): ProjectManagementView; } //# sourceMappingURL=types.d.ts.map