feat(coding): add durable project identity core

This commit is contained in:
2026-08-26 17:59:44 +08:00
parent 7e54b8fbda
commit 43f58fc72b
12 changed files with 717 additions and 7 deletions

View File

@@ -117,7 +117,10 @@ describe('PI-100 coding core Host contract', () => {
},
});
try {
const created = await composition.projects.createProject({ projectPath });
const created = await composition.projects.createProject({
projectPath,
identity: { kind: 'create' },
});
await createCodingProjectAgent(projectPath, {
id: 'builder',
avatarId: 'avatar-01',
@@ -682,7 +685,10 @@ describe('PI-100 coding core Host contract', () => {
});
const opened = await projects.openProject(projectRoots[1]!);
const created = await projects.createProject({ projectPath: projectRoots[2]! });
const created = await projects.createProject({
projectPath: projectRoots[2]!,
identity: { kind: 'create' },
});
await projects.setActiveProject(first.project.id);
await projects.removeProject(first.project.id);
@@ -716,7 +722,7 @@ describe('PI-100 coding core Host contract', () => {
path: '/api/coding/projects/create',
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ projectPath: createRoot }),
body: JSON.stringify({ projectPath: createRoot, identity: { kind: 'create' } }),
}));
for (const response of responses) {