/** * workspace-manager — 临时工作区管理 * * v8.3.0+: 管理独立内容处理的临时产出(不绑定迭代/任务) * 目录: .speccore/local/workspace/ */ export type WorkspaceType = 'clarify' | 'research'; export interface WorkspaceEntry { id: string; type: WorkspaceType; source: 'file' | 'direct'; sourcePath?: string; createdAt: string; wordCount: number; hash: string; status: 'pending' | 'done' | 'promoted'; promotedTo?: string; } export interface WorkspacePaths { base: string; inbox: string; clarify: string; research: string; index: string; } /** 获取工作区路径 */ export declare function getWorkspacePaths(cwd: string): WorkspacePaths; /** 初始化工作区目录 */ export declare function initWorkspace(cwd: string): Promise; /** 读取索引 */ export declare function loadIndex(cwd: string): Promise<{ entries: WorkspaceEntry[]; }>; /** * 将原始内容存入临时工作区(inbox) * @returns 生成的条目ID */ export declare function stageContent(cwd: string, content: string, options: { type: WorkspaceType; source?: 'file' | 'direct'; sourcePath?: string; }): Promise; /** * 将处理后的产出写入工作区 */ export declare function writeWorkspaceOutput(cwd: string, id: string, type: WorkspaceType, files: Record): Promise; /** * 将工作区内容提升到迭代层 * @param entryId 工作区条目ID * @param iteration 目标迭代名 * @param iterDir 目标迭代目录 * @returns 提升后的文件路径 */ export declare function promoteToIteration(cwd: string, entryId: string, iteration: string, iterDir: string): Promise; /** * 列出工作区中的所有条目 */ export declare function listWorkspaceEntries(cwd: string, filter?: { type?: WorkspaceType; status?: WorkspaceEntry['status']; }): Promise; //# sourceMappingURL=workspace-manager.d.ts.map