MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / writeWorkflow

Function writeWorkflow

packages/mission-control/test/runtime_loop.test.ts:27–35  ·  view source on GitHub ↗
(cwd: string, frontMatter = '')

Source from the content-addressed store, hash-verified

25} from '../src/index.js';
26
27function writeWorkflow(cwd: string, frontMatter = ''): string {
28 const workflowPath = path.join(cwd, '.codexbridge', 'mission', 'WORKFLOW.md');
29 fs.mkdirSync(path.dirname(workflowPath), { recursive: true });
30 const text = frontMatter.trim().length > 0
31 ? `---\n${frontMatter.trim()}\n---\nExecute the mission carefully and verify the result.\n`
32 : 'Execute the mission carefully and verify the result.\n';
33 fs.writeFileSync(workflowPath, text, 'utf8');
34 return workflowPath;
35}
36
37function initGitRepo(cwd: string): void {
38 execFileSync('git', ['init', '-b', 'main'], { cwd, stdio: 'ignore' });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected