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 -5
View File
@@ -10,6 +10,7 @@ import { checkHelp, parseCheckOptions, runChecks, runRecoveryGuardrailsCheck } f
import { runSsh } from "./src/ssh";
import { autoRemoteCiPublishUserServiceDryRunPlan, extractRemoteCliOptions, runRemoteCli } from "./src/remote";
import { runMicroserviceCommand } from "./src/microservices";
import { runTodoNoteCommand } from "./src/todo-note";
import { runCodeQueueCommand } from "./src/code-queue";
import { runDecisionCenterCommand } from "./src/decision-center";
import { deployHelp, runCodeQueueDeployCompatCommand, runDeployCommand } from "./src/deploy";
@@ -471,7 +472,7 @@ async function main(): Promise<void> {
}
const config = readConfig();
if (top === "microservice" && !args.includes("--check-path")) {
if ((top === "microservice" && !args.includes("--check-path")) || top === "todo-note" || top === "todo") {
const host = readHostK8sPublicHost();
if (host !== null) {
process.exitCode = await runRemoteCli({
@@ -600,6 +601,19 @@ async function main(): Promise<void> {
return;
}
if (top === "todo-note" || top === "todo") {
const result = await runTodoNoteCommand(config, args.slice(1));
const ok = resultOk(result);
if (isRenderedCliResult(result)) {
emitText(result.renderedText, result.command || commandName);
if (!ok) process.exitCode = 1;
return;
}
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}
if (top === "decision" || top === "decision-center") {
const result = await runDecisionCenterCommand(config, args.slice(1));
const ok = resultOk(result);
@@ -754,7 +768,9 @@ async function main(): Promise<void> {
throw new Error(`Unknown command: ${commandName}`);
}
main().catch((error) => {
emitError(commandName, error);
process.exitCode = 1;
});
if (import.meta.main && !process.execArgv.includes("--check")) {
main().catch((error) => {
emitError(commandName, error);
process.exitCode = 1;
});
}