feat: add codex tasks overview

This commit is contained in:
Codex
2026-05-19 17:31:18 +00:00
parent 22a0b709f2
commit 2a21f6cda3
4 changed files with 338 additions and 13 deletions
+15 -10
View File
@@ -4,7 +4,7 @@ import { type DebugDispatchCommand, isDebugDispatchCommand } from "./debug";
import { summarizeMicroserviceProxyResponse } from "./microservices";
import { parseNetworkPerfOptions, runNetworkPerf } from "./network-perf";
import { isSshSkillDiscoveryArgs, parseSshArgs } from "./ssh";
import { codexJudgeQueryAsync, codexOutputQueryAsync, codexTaskQueryAsync } from "./code-queue";
import { codexJudgeQueryAsync, codexOutputQueryAsync, codexTaskQueryAsync, codexTasksQueryAsync } from "./code-queue";
import { runDecisionCenterCommandAsync } from "./decision-center";
export interface RemoteCliOptions {
@@ -519,11 +519,14 @@ async function remoteMicroservice(session: FrontendSession, args: string[]): Pro
async function remoteCodeQueue(session: FrontendSession, args: string[]): Promise<unknown> {
const action = args[1] ?? "task";
if (action !== "task" && action !== "summary" && action !== "show" && action !== "output" && action !== "judge") {
throw new Error("remote codex command must be: codex task <taskId>, codex output <taskId>, or codex judge <taskId> --attempt N");
if (action !== "task" && action !== "summary" && action !== "show" && action !== "tasks" && action !== "overview" && action !== "output" && action !== "judge") {
throw new Error("remote codex command must be: codex task <taskId>, codex tasks, codex output <taskId>, or codex judge <taskId> --attempt N");
}
const taskId = args[2];
if (taskId === undefined || taskId.length === 0) throw new Error(`codex ${action} requires task id`);
if ((action === "task" || action === "summary" || action === "show" || action === "output" || action === "judge") && (taskId === undefined || taskId.length === 0)) {
throw new Error(`codex ${action} requires task id`);
}
const requiredTaskId = taskId ?? "";
const fetcher = (path: string, init?: { method?: string; body?: unknown }): Promise<FetchJsonResult> => {
const requestInit = init === undefined
? undefined
@@ -535,11 +538,13 @@ async function remoteCodeQueue(session: FrontendSession, args: string[]): Promis
};
return {
transport: "frontend",
result: action === "output"
? await codexOutputQueryAsync(taskId, args.slice(3), fetcher)
: action === "judge"
? await codexJudgeQueryAsync(taskId, args.slice(3), fetcher)
: await codexTaskQueryAsync(taskId, args.slice(3), fetcher),
result: action === "tasks" || action === "overview"
? await codexTasksQueryAsync(args.slice(1), fetcher)
: action === "output"
? await codexOutputQueryAsync(requiredTaskId, args.slice(3), fetcher)
: action === "judge"
? await codexJudgeQueryAsync(requiredTaskId, args.slice(3), fetcher)
: await codexTaskQueryAsync(requiredTaskId, args.slice(3), fetcher),
};
}
@@ -605,7 +610,7 @@ async function runRemoteCliOverFrontend(options: RemoteCliOptions, config: UniDe
emitRemoteJson(name, {
transport: "frontend",
baseUrl: session.baseUrl,
commands: ["debug health", "debug dispatch", "debug task", "ssh <providerId> <command>", "ssh <providerId> skills", "microservice list", "microservice status <id>", "microservice health <id>", "microservice diagnostics <id>", "microservice tunnel-self-test <id>", "microservice proxy <id> <path>", "decision upload <markdown-file>", "decision list", "decision show <id>", "codex task <taskId>", "codex judge <taskId> --attempt N", "network perf"],
commands: ["debug health", "debug dispatch", "debug task", "ssh <providerId> <command>", "ssh <providerId> skills", "microservice list", "microservice status <id>", "microservice health <id>", "microservice diagnostics <id>", "microservice tunnel-self-test <id>", "microservice proxy <id> <path>", "decision upload <markdown-file>", "decision list", "decision show <id>", "codex task <taskId>", "codex tasks", "codex judge <taskId> --attempt N", "network perf"],
});
return 0;
}