feat(gateway): project bootstrap — docs structure + default agent (#190)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #190.
This commit is contained in:
@@ -45,7 +45,7 @@ export class ProjectBootstrapService {
|
||||
ownerType,
|
||||
});
|
||||
|
||||
// 2. Create workspace directory
|
||||
// 2. Create workspace directory (includes docs structure)
|
||||
const workspacePath = await this.workspace.create(
|
||||
{
|
||||
id: project.id,
|
||||
@@ -56,6 +56,17 @@ export class ProjectBootstrapService {
|
||||
params.repoUrl,
|
||||
);
|
||||
|
||||
// 3. Create default agent config for the project
|
||||
await this.brain.agents.create({
|
||||
name: 'default',
|
||||
provider: '',
|
||||
model: '',
|
||||
projectId: project.id,
|
||||
ownerId: params.userId,
|
||||
isSystem: false,
|
||||
status: 'active',
|
||||
});
|
||||
|
||||
this.logger.log(`Project ${project.id} bootstrapped at ${workspacePath}`);
|
||||
|
||||
return { projectId: project.id, workspacePath };
|
||||
|
||||
@@ -64,6 +64,11 @@ export class WorkspaceService {
|
||||
this.logger.log(`Initialized git workspace at ${workspacePath}`);
|
||||
}
|
||||
|
||||
// Create standard docs structure
|
||||
await fs.mkdir(path.join(workspacePath, 'docs', 'plans'), { recursive: true });
|
||||
await fs.mkdir(path.join(workspacePath, 'docs', 'reports'), { recursive: true });
|
||||
this.logger.log(`Created docs structure at ${workspacePath}`);
|
||||
|
||||
return workspacePath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user