feat: add concise todo note cli

This commit is contained in:
Codex
2026-07-10 06:19:26 +02:00
parent 1510e800fa
commit 4e4fb61003
8 changed files with 490 additions and 24 deletions
+21 -1
View File
@@ -43,6 +43,7 @@ import {
import { runApplyPatchV2, type ApplyPatchV2Executor } from "./apply-patch-v2";
import { codexJudgeQueryAsync, codexOutputQueryAsync, codexPrPreflightQueryAsync, codexQueuesQueryAsync, codexTaskQueryAsync, codexTasksQueryAsync, codexUnreadTriageAsync } from "./code-queue";
import { runDecisionCenterCommandAsync } from "./decision-center";
import { runTodoNoteCommandAsync } from "./todo-note";
import {
artifactRegistryReadonlyResultFromCommand,
buildArtifactRegistryReadonlyProbe,
@@ -1621,7 +1622,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", "artifact-registry status|health", "ci publish-user-service --dry-run", "ci publish-backend-core --dry-run", "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 unread", "codex queues", "codex judge <taskId> --attempt N", "codex pr-preflight [--remote]", "network perf"],
commands: ["debug health", "debug dispatch", "debug task", "ssh <providerId> <command>", "ssh <providerId> skills", "artifact-registry status|health", "ci publish-user-service --dry-run", "ci publish-backend-core --dry-run", "microservice list", "microservice status <id>", "microservice health <id>", "microservice diagnostics <id>", "microservice tunnel-self-test <id>", "microservice proxy <id> <path>", "todo-note list|show|add|update|complete|reopen|remind|delete|undo|redo", "decision upload <markdown-file>", "decision list", "decision show <id>", "codex task <taskId>", "codex tasks", "codex unread", "codex queues", "codex judge <taskId> --attempt N", "codex pr-preflight [--remote]", "network perf"],
});
return 0;
}
@@ -1643,6 +1644,25 @@ async function runRemoteCliOverFrontend(options: RemoteCliOptions, config: UniDe
emitRemoteJson(name, result, ok);
return ok ? 0 : 1;
}
if (top === "todo-note" || top === "todo") {
const fetcher = (path: string, init?: { method?: string; body?: unknown }): Promise<FetchJsonResult> => {
const requestInit = init === undefined
? undefined
: {
method: init.method,
body: init.body === undefined ? undefined : JSON.stringify(init.body),
};
return frontendJson(session, path, requestInit, 30_000, 5_000_000);
};
const result = await runTodoNoteCommandAsync(config, args.slice(1), fetcher);
const ok = typeof result !== "object" || result === null || !("ok" in result) || (result as { ok?: unknown }).ok !== false;
if (typeof result === "object" && result !== null && "renderedText" in result && typeof (result as { renderedText?: unknown }).renderedText === "string") {
process.stdout.write((result as { renderedText: string }).renderedText);
} else {
emitRemoteJson(name, result, ok);
}
return ok ? 0 : 1;
}
if (top === "artifact-registry") {
emitRemoteJson(name, await remoteArtifactRegistry(session, args));
return 0;