add update-state cmd

This commit is contained in:
Ramnique Singh 2025-11-18 20:38:14 +05:30
parent 7d4484e7c0
commit f6019a4fde
2 changed files with 79 additions and 19 deletions

View file

@ -4,28 +4,29 @@ import { hideBin } from 'yargs/helpers';
import { app } from '../dist/app.js';
yargs(hideBin(process.argv))
.command(
"$0",
"Run rowboatx",
(y) => y
.option("agent", {
type: "string",
description: "The agent to run",
default: "copilot",
})
.option("run_id", {
type: "string",
description: "Continue an existing run",
})
.option("input", {
type: "string",
description: "The input to the agent",
})
.option("no-interactive", {
type: "boolean",
description: "Do not interact with the user",
default: false,
}),
.option("agent", {
type: "string",
description: "The agent to run",
default: "copilot",
})
.option("run_id", {
type: "string",
description: "Continue an existing run",
})
.option("input", {
type: "string",
description: "The input to the agent",
})
.option("no-interactive", {
type: "boolean",
description: "Do not interact with the user",
default: false,
}),
(argv) => {
app({
agent: argv.agent,
@ -35,4 +36,20 @@ yargs(hideBin(process.argv))
});
}
)
.command(
"update-state <agent> <run_id>",
"Update state for a run",
(y) => y
.positional("agent", {
type: "string",
description: "The agent to run",
})
.positional("run_id", {
type: "string",
description: "The run id to update",
}),
(argv) => {
updateState(argv.agent, argv.run_id);
}
)
.parse();