feat(lanes): add ccam lanes integration CLI + route (F3a)

This commit is contained in:
2026-08-05 16:30:23 +07:00
parent 8fc7a32490
commit 32dc4e432a
2 changed files with 40 additions and 1 deletions
+27
View File
@@ -2192,6 +2192,25 @@ async function cmdLanesMcpSync(args) {
}
}
/** `ccam lanes integration <name> [<id>]` — check whether a named
* integration (tracker, dev_qc, ci_wait) is turned on for this lane, per
* its .ccam/profile/integrations.env. Exit 0 = on, 1 = off. */
async function cmdLanesIntegration(args) {
const name = args.find((arg) => !arg.startsWith("--"));
if (!name) {
console.error("usage: ccam lanes integration <name> [<id>]");
process.exitCode = 1;
return;
}
const resolved = await resolveLaneArg(args.filter((a) => a !== name));
if (!resolved) return;
const { enabled } = await get(
`/api/lanes/${resolved.laneId}/integrations/${encodeURIComponent(name)}`
);
console.log(enabled ? "on" : "off");
process.exitCode = enabled ? 0 : 1;
}
async function cmdFeatureShow(args) {
const slug = args.find((arg) => !arg.startsWith("--"));
if (!slug) {
@@ -2388,6 +2407,11 @@ const COMMAND_GROUPS = [
"[<id>]",
"Relocate the source repo's MCP servers into <lane>/.mcp.json and seed Chromium profiles",
],
[
"lanes integration",
"<name> [<id>]",
"Check whether a named integration (tracker, dev_qc, ci_wait) is on for this lane — exit 0/1",
],
[
"lock status|acquire|release",
"[<name>] [--holder X] [--timeout N]",
@@ -3212,6 +3236,9 @@ async function runCommand(argv) {
if (rest[0] === "mcp" && rest[1] === "sync") {
return cmdLanesMcpSync(rest.slice(2));
}
if (rest[0] === "integration") {
return cmdLanesIntegration(rest.slice(1));
}
return cmdLanes();
case "lock": {
const sub = rest[0];