From 87923cb07b782d91420504aae4ea4f745562ef89 Mon Sep 17 00:00:00 2001 From: indifferentketchup Date: Sun, 7 Jun 2026 18:05:49 +0000 Subject: [PATCH] feat(coder): add flow-artifacts write helper and boocontext MCP template --- apps/coder/src/services/flow-artifacts.ts | 23 +++++++++++++++++++++++ data/mcp.example.json | 11 +++++++++++ 2 files changed, 34 insertions(+) create mode 100644 apps/coder/src/services/flow-artifacts.ts diff --git a/apps/coder/src/services/flow-artifacts.ts b/apps/coder/src/services/flow-artifacts.ts new file mode 100644 index 0000000..baa9592 --- /dev/null +++ b/apps/coder/src/services/flow-artifacts.ts @@ -0,0 +1,23 @@ +import { mkdir, writeFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import { existsSync } from 'node:fs'; + +const ARTIFACTS_ROOT = 'data/flow-artifacts'; + +export function getArtifactPath(flowRunId: string, stepId: string): string { + return join(ARTIFACTS_ROOT, flowRunId, `${stepId}.md`); +} + +export async function writeFlowArtifact( + flowRunId: string, + stepId: string, + content: string, +): Promise { + const dir = join(ARTIFACTS_ROOT, flowRunId); + if (!existsSync(dir)) { + await mkdir(dir, { recursive: true }); + } + const path = getArtifactPath(flowRunId, stepId); + await writeFile(path, content, 'utf8'); + return path; +} diff --git a/data/mcp.example.json b/data/mcp.example.json index 26a240d..3c5d4a8 100644 --- a/data/mcp.example.json +++ b/data/mcp.example.json @@ -7,6 +7,17 @@ "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" }, "enabled": false + }, + "boocontext": { + "type": "stdio", + "command": "node", + "args": ["/opt/forks/boocontext/dist/index.js"], + "env": { + "TYPE_INJECT_MCP_PATH": "/opt/forks/type-inject/packages/mcp/dist/index.js", + "TREE_SITTER_MCP_CMD": "uvx", + "TREE_SITTER_MCP_ARGS": "--from tree-sitter-analyzer[mcp] tree-sitter-analyzer-mcp" + }, + "enabled": false } } }