MCPcopy Create free account
hub / github.com/coleam00/remote-agentic-coding-system / createCodebase

Function createCodebase

src/db/codebases.ts:7–19  ·  view source on GitHub ↗
(data: {
  name: string;
  repository_url?: string;
  default_cwd: string;
  ai_assistant_type?: string;
})

Source from the content-addressed store, hash-verified

5import { Codebase } from '../types';
6
7export async function createCodebase(data: {
8 name: string;
9 repository_url?: string;
10 default_cwd: string;
11 ai_assistant_type?: string;
12}): Promise<Codebase> {
13 const assistantType = data.ai_assistant_type || 'claude';
14 const result = await pool.query<Codebase>(
15 'INSERT INTO remote_agent_codebases (name, repository_url, default_cwd, ai_assistant_type) VALUES ($1, $2, $3, $4) RETURNING *',
16 [data.name, data.repository_url || null, data.default_cwd, assistantType]
17 );
18 return result.rows[0];
19}
20
21export async function getCodebase(id: string): Promise<Codebase | null> {
22 const result = await pool.query<Codebase>('SELECT * FROM remote_agent_codebases WHERE id = $1', [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected