mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 08:26:22 +02:00
add update-state cmd
This commit is contained in:
parent
7d4484e7c0
commit
f6019a4fde
2 changed files with 79 additions and 19 deletions
|
|
@ -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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue