feat(projects): add interactive AI app scaffold skill
This commit is contained in:
@@ -2,7 +2,7 @@ import { mkdir, stat } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import {
|
||||
isProjectAgentAvatarDataUrl,
|
||||
isProjectType,
|
||||
normalizeProjectType,
|
||||
type ProjectAgentResponsibility,
|
||||
type ProjectType,
|
||||
} from '../../shared/project-config';
|
||||
@@ -199,7 +199,8 @@ export function normalizeCodingProjectConfigV2(value: unknown): CodingProjectCon
|
||||
}
|
||||
const record = value as Partial<CodingProjectConfigV2>;
|
||||
if (record.schemaVersion !== 2) throw new Error('Unsupported coding project config schema');
|
||||
if (!isProjectType(record.projectType)) throw new Error('Invalid project type');
|
||||
const projectType = normalizeProjectType(record.projectType);
|
||||
if (!projectType) throw new Error('Invalid project type');
|
||||
if (record.projectId !== undefined && !isCanonicalCodingProjectId(record.projectId)) {
|
||||
throw new Error('Project identity is invalid');
|
||||
}
|
||||
@@ -216,7 +217,7 @@ export function normalizeCodingProjectConfigV2(value: unknown): CodingProjectCon
|
||||
validateAgentNames(agents);
|
||||
return {
|
||||
schemaVersion: 2,
|
||||
projectType: record.projectType,
|
||||
projectType,
|
||||
...(record.projectId !== undefined ? { projectId: record.projectId } : {}),
|
||||
initialized: record.initialized === true,
|
||||
agents,
|
||||
|
||||
Reference in New Issue
Block a user