[taskboard] document control plane status and roadmap
This commit is contained in:
@@ -5,6 +5,7 @@ import { execFile } from "node:child_process";
|
||||
|
||||
import {
|
||||
REPO_ACCESS_ROOTS,
|
||||
SWARM_HOST_WORKTREES_DIR,
|
||||
SWARM_REPO_MAP_FILE,
|
||||
SWARM_TASKS_FILE,
|
||||
SWARM_WORKTREES_DIR,
|
||||
@@ -78,6 +79,7 @@ async function dispatchOpenClawTask(taskId: number) {
|
||||
const taskKey = `taskboard-${task.id}`;
|
||||
const repoName = path.basename(repoPath);
|
||||
const worktree = path.join(SWARM_WORKTREES_DIR, repoName, taskKey);
|
||||
const hostWorktree = path.join(SWARM_HOST_WORKTREES_DIR, repoName, taskKey);
|
||||
const branch = `feat/taskboard-${task.id}`;
|
||||
const baseBranch = task.base_branch || "main";
|
||||
|
||||
@@ -102,7 +104,7 @@ async function dispatchOpenClawTask(taskId: number) {
|
||||
repo: repoName,
|
||||
repoPath,
|
||||
repoSlug: task.repo_slug,
|
||||
worktree,
|
||||
worktree: hostWorktree,
|
||||
branch,
|
||||
baseBranch,
|
||||
tmuxSession: `${agentName}-${taskKey}`,
|
||||
@@ -124,6 +126,14 @@ async function dispatchOpenClawTask(taskId: number) {
|
||||
reviewPassed: false,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
existing.repoPath = repoPath;
|
||||
existing.repoSlug = task.repo_slug;
|
||||
existing.worktree = hostWorktree;
|
||||
existing.branch = branch;
|
||||
existing.baseBranch = baseBranch;
|
||||
existing.agent = agentName;
|
||||
existing.tmuxSession = `${agentName}-${taskKey}`;
|
||||
}
|
||||
|
||||
fs.writeFileSync(SWARM_TASKS_FILE, JSON.stringify({ tasks }, null, 2));
|
||||
@@ -131,7 +141,7 @@ async function dispatchOpenClawTask(taskId: number) {
|
||||
return {
|
||||
state: "dispatched" as const,
|
||||
summary: `Queued in OpenClaw swarm for ${agentName}`,
|
||||
detail: `${task.repo_slug} -> ${worktree}`,
|
||||
detail: `${task.repo_slug} -> ${hostWorktree}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ export const OPENCLAW_CONFIG_PATH = process.env.OPENCLAW_CONFIG || "/home/bear/.
|
||||
export const SWARM_TASKS_FILE = process.env.SWARM_TASKS_FILE || "/app/swarm/active-tasks.json";
|
||||
export const SWARM_REPO_MAP_FILE = process.env.SWARM_REPO_MAP_FILE || "/app/swarm/repo-map.json";
|
||||
export const SWARM_WORKTREES_DIR = process.env.SWARM_WORKTREES_DIR || "/app/swarm/worktrees";
|
||||
export const SWARM_HOST_WORKTREES_DIR =
|
||||
process.env.SWARM_HOST_WORKTREES_DIR || SWARM_WORKTREES_DIR;
|
||||
export const REPO_ACCESS_ROOTS = (process.env.REPO_ACCESS_ROOTS || "/srv/apps,/home/bear")
|
||||
.split(",")
|
||||
.map((entry) => entry.trim())
|
||||
|
||||
Reference in New Issue
Block a user