import type { BudgetWindowKind, PauseReason, ProjectStatus } from "../constants.js"; import type { ProjectExecutionWorkspacePolicy, ProjectWorkspaceRuntimeConfig, WorkspaceRuntimeService } from "./workspace-runtime.js"; import type { AgentEnvConfig } from "./secrets.js"; export type ProjectWorkspaceSourceType = "local_path" | "git_repo" | "remote_managed" | "non_git_path"; export type ProjectWorkspaceVisibility = "default" | "advanced"; export type ProjectVisibility = "open" | "private"; export type ProjectAccessSubjectType = "user" | "agent"; export interface ProjectAccessMember { id: string; companyId: string; projectId: string; subjectType: ProjectAccessSubjectType; subjectId: string; subjectDisplayName: string | null; subjectAvatarUrl: string | null; createdAt: Date; } export interface ProjectGoalRef { id: string; title: string; } /** * Lightweight per-project budget summary surfaced on the projects list payload * (IA Phase 4 — PAP-60). Reflects the active `billed_cents` budget policy scoped * to the project, when one is set. */ export interface ProjectBudgetSummary { /** Budget limit in cents. */ amountCents: number; windowKind: BudgetWindowKind; } export interface ProjectWorkspace { id: string; companyId: string; projectId: string; name: string; sourceType: ProjectWorkspaceSourceType; cwd: string | null; repoUrl: string | null; repoRef: string | null; defaultRef: string | null; visibility: ProjectWorkspaceVisibility; setupCommand: string | null; cleanupCommand: string | null; remoteProvider: string | null; remoteWorkspaceRef: string | null; sharedWorkspaceKey: string | null; metadata: Record | null; runtimeConfig: ProjectWorkspaceRuntimeConfig | null; isPrimary: boolean; runtimeServices?: WorkspaceRuntimeService[]; createdAt: Date; updatedAt: Date; } export type ProjectCodebaseOrigin = "local_folder" | "managed_checkout"; export interface ProjectCodebase { workspaceId: string | null; repoUrl: string | null; repoRef: string | null; defaultRef: string | null; repoName: string | null; localFolder: string | null; managedFolder: string; effectiveLocalFolder: string; origin: ProjectCodebaseOrigin; } export interface ProjectManagedByPlugin { id: string; pluginId: string; pluginKey: string; pluginDisplayName: string; resourceKind: "project"; resourceKey: string; defaultsJson: Record; createdAt: Date; updatedAt: Date; } export interface ProjectDiscoverySummary { id: string; name: string; status: string; description: string | null; descriptionTruncated: boolean; } export interface ProjectDiscoveryPage { projects: ProjectDiscoverySummary[]; nextCursor: string | null; } export interface Project { id: string; companyId: string; urlKey: string; /** @deprecated Use goalIds / goals instead */ goalId: string | null; goalIds: string[]; goals: ProjectGoalRef[]; name: string; description: string | null; /** Omitted by older servers/fixtures; clients must treat omission as open. */ visibility?: ProjectVisibility; /** Present only for the lazily-created per-user "My private tasks" project. */ personalOwnerUserId?: string | null; /** Only this user and administrators may change the project audience. */ privacyOwnerUserId?: string | null; status: ProjectStatus; leadAgentId: string | null; targetDate: string | null; color: string | null; icon: string | null; env: AgentEnvConfig | null; pauseReason: PauseReason | null; pausedAt: Date | null; executionWorkspacePolicy: ProjectExecutionWorkspacePolicy | null; codebase: ProjectCodebase; workspaces: ProjectWorkspace[]; primaryWorkspace: ProjectWorkspace | null; managedByPlugin?: ProjectManagedByPlugin | null; /** * Number of tasks (issues) in the project. Populated by the projects list * endpoint (IA Phase 4 — PAP-60); omitted on single-project payloads. */ taskCount?: number; /** * Active budget for the project, when set. Populated by the projects list * endpoint (IA Phase 4 — PAP-60); omitted on single-project payloads. */ budget?: ProjectBudgetSummary | null; archivedAt: Date | null; createdAt: Date; updatedAt: Date; } /** GitHub identity is the provider's stable repository ID, never a credential. */ export interface ProjectRepository { id: string; fullName: string; /** Provider-confirmed ownership; absent on older repository observations. */ ownerType?: "personal" | "organization"; url: string; private?: boolean; connections: string[]; connectionIds?: string[]; } export interface ProjectRepositoryOptions { connections?: Array<{ id: string; name: string; }>; repositories: ProjectRepository[]; connectionCount: number; failedConnectionCount: number; } //# sourceMappingURL=project.d.ts.map