import type { JsonObject, Workspace, WorkspaceIntegrations } from "../types/workspace.js"; import type { WorkspaceTmuxWindowSpec } from "./workspace-runtime.js"; export declare const PROJECT_STAGES: readonly ["idea", "planned", "active", "paused", "shipped", "maintenance"]; export type ProjectStage = (typeof PROJECT_STAGES)[number]; export declare const PROJECT_PRIORITIES: readonly ["low", "medium", "high", "critical"]; export type ProjectPriority = (typeof PROJECT_PRIORITIES)[number]; export declare const PROJECT_START_AGENTS: readonly ["codewith", "claude", "opencode", "cursor", "none"]; export type ProjectStartAgent = (typeof PROJECT_START_AGENTS)[number]; export declare const PROJECT_START_SESSION_POLICIES: readonly ["reuse", "new", "error-if-running"]; export type ProjectStartSessionPolicy = (typeof PROJECT_START_SESSION_POLICIES)[number]; export type ProjectIntegrationUnlinkGroup = "github" | "todos" | "brief" | "canvases" | "mementos" | "conversations" | "files"; export declare const FINANCE_PROJECT_METADATA_SCHEMA: "hasna.projects.finance_project_metadata.v1"; export declare const FINANCE_PROJECT_METADATA_FIELDS: readonly ["business_area", "jurisdiction", "legal_entities", "fiscal_cycle", "data_classification", "retention_policy", "ledger_authority", "evidence_store", "approver", "external_recipient_policy"]; export type FinanceProjectMetadataField = (typeof FINANCE_PROJECT_METADATA_FIELDS)[number]; export declare const FINANCE_FISCAL_CYCLES: readonly ["monthly", "quarterly", "annual", "event-driven"]; export type FinanceFiscalCycle = (typeof FINANCE_FISCAL_CYCLES)[number]; export declare const FINANCE_DATA_CLASSIFICATIONS: readonly ["public", "internal", "confidential", "restricted"]; export type FinanceDataClassification = (typeof FINANCE_DATA_CLASSIFICATIONS)[number]; export interface FinanceProjectMetadata { schema: typeof FINANCE_PROJECT_METADATA_SCHEMA; business_area: "finance"; jurisdiction: string; legal_entities: string[]; fiscal_cycle: FinanceFiscalCycle; data_classification: FinanceDataClassification; retention_policy: string; ledger_authority: string; evidence_store: string; approver: string; external_recipient_policy: string; } export declare const PROJECT_MANAGEMENT_TAXONOMY: { readonly stages: readonly ["idea", "planned", "active", "paused", "shipped", "maintenance"]; readonly priorities: readonly ["low", "medium", "high", "critical"]; readonly start_agents: readonly ["codewith", "claude", "opencode", "cursor", "none"]; readonly start_session_policies: readonly ["reuse", "new", "error-if-running"]; readonly integration_keys: readonly ["todos_project_id", "todos_task_list_id", "brief_id", "brief_path", "canvases_project_id", "canvases_default_canvas_id"]; }; /** * Normalize the authoritative finance-project metadata contract. * * Finance authority is activated only by `business_area: finance`. Generic * projects may use similarly named metadata keys without opting into this * authoritative contract. Tags are intentionally ignored: they remain * free-form discovery labels and cannot establish authority. * * When `existingMetadata` is already finance-authoritative, replacement * metadata must preserve the complete contract rather than silently stripping * it during an update. */ export declare function normalizeProjectMetadata(metadata: JsonObject | undefined, existingMetadata?: JsonObject): JsonObject; export declare function financeProjectMetadata(project: { metadata: JsonObject; tags?: string[]; }): FinanceProjectMetadata | null; export interface ProjectManagementMetadataInput { stage?: string | null; priority?: string | null; owner?: string | null; launch_profile?: string | null; start_agent?: string | null; start_command?: string | null; start_session_policy?: string | null; start_windows?: WorkspaceTmuxWindowSpec[] | null; } export interface ProjectIntegrationInput { todos_project_id?: string | null; todos_task_list_id?: string | null; brief_id?: string | null; brief_path?: string | null; canvases_project_id?: string | null; canvases_default_canvas_id?: string | null; } export interface ProjectManagementSummary { stage: string | null; priority: string | null; owner: string | null; launch_profile: string | null; start_agent: string | null; start_command: string | null; start_session_policy: string | null; start_windows: WorkspaceTmuxWindowSpec[]; todos_project_id: string | null; todos_task_list_id: string | null; brief_id: string | null; brief_path: string | null; canvases_project_id: string | null; canvases_default_canvas_id: string | null; } export interface ProjectExternalLinksSummary { todos: { linked: boolean; status: "linked" | "unlinked"; project_id: string | null; task_list_id: string | null; }; brief: { linked: boolean; status: "linked" | "unlinked"; id: string | null; path: string | null; path_exists: boolean | null; }; canvases: { linked: boolean; status: "linked" | "unlinked"; project_id: string | null; default_canvas_id: string | null; }; } export declare function mergeProjectTags(existing: string[], tags: string[]): string[]; export declare function removeProjectTags(existing: string[], tags: string[]): string[]; export declare function expandProjectIntegrationUnlinkKey(key: string): string[]; export declare function expandProjectIntegrationUnlinkKeys(keys: string[]): string[]; export declare function unlinkProjectIntegrationFields(integrations: WorkspaceIntegrations, keys: string[]): WorkspaceIntegrations; /** * Merge incoming integration fields into an existing set: values are trimmed, * empty/whitespace values are dropped, and existing keys survive. Mirrors the * persistence-time merge in `linkWorkspaceIntegrations` so the Store-routed * link path (local + api) produces an identical record without touching sqlite * directly. Callers should alias-normalize the incoming map first. */ export declare function mergeProjectIntegrations(existing: WorkspaceIntegrations, incoming: WorkspaceIntegrations): WorkspaceIntegrations; export interface ProjectPathHealth { status: "ok" | "missing" | "remote-only" | "unknown"; path: string | null; exists: boolean | null; } export interface ProjectDashboardSummary { management: ProjectManagementSummary; external_links: ProjectExternalLinksSummary; path_health: ProjectPathHealth; launch: { default_agent: string | null; default_command: string | null; default_profile: string | null; default_session_policy: string | null; default_windows: WorkspaceTmuxWindowSpec[]; last_opened_at: string | null; }; } export declare function hasProjectManagementFields(input: ProjectManagementMetadataInput): boolean; export declare function hasProjectIntegrationFields(input: ProjectIntegrationInput): boolean; export declare function mergeProjectManagementMetadata(base: JsonObject | undefined, input: ProjectManagementMetadataInput): JsonObject | undefined; export declare function mergeProjectIntegrationFields(base: WorkspaceIntegrations | undefined, input: ProjectIntegrationInput): WorkspaceIntegrations | undefined; export declare function projectManagementSummary(project: Workspace): ProjectManagementSummary; export declare function projectExternalLinksSummary(project: Workspace): ProjectExternalLinksSummary; export declare function projectPathHealth(project: Workspace): ProjectPathHealth; export declare function projectDashboardSummary(project: Workspace): ProjectDashboardSummary; export declare function projectWithManagement(project: Workspace): Workspace & { management: ProjectManagementSummary; external_links: ProjectExternalLinksSummary; dashboard: ProjectDashboardSummary; }; //# sourceMappingURL=project-management.d.ts.map