Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions src-tauri/crates/berdctl/api-surface-feedback.json
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,132 @@
}
}
},
"schedules": {
"description": "Manage scheduled recipe jobs in Berd's live embedded Goose scheduler: list, pause, unpause, kill an active run, or remove a schedule.",
"actions": {
"list": {
"description": "List scheduled recipe jobs from the live Goose scheduler embedded in Berd. Unlike a separate goose schedule process, this reads the scheduler instance that is actually running the jobs and does not change app state.",
"fields": [],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}
},
"pause": {
"description": "Pause an idle scheduled recipe job through the live Goose scheduler embedded in Berd. Future scheduled runs stop until the job is unpaused. If a run is active, stop it first with berdctl schedule kill.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to pause.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to pause."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"unpause": {
"description": "Unpause a scheduled recipe job through the live Goose scheduler embedded in Berd. Future runs resume on the job's existing cron schedule.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to unpause.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to unpause."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"kill": {
"description": "Stop the current run of a scheduled recipe job through Berd's live Goose scheduler. The schedule itself remains registered and can run again later; use remove or pause when future runs must also stop.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job whose active run should stop.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job whose active run should stop."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"remove": {
"description": "Remove a scheduled recipe job through the live Goose scheduler embedded in Berd. This updates the scheduler that is actually running jobs, so a stale in-memory copy cannot restore the deleted schedule. The saved recipe file is kept.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to remove.",
"min": 1
},
{
"name": "confirm",
"required": false,
"kind": "boolean",
"description": "Confirm removal of the schedule registration. The saved recipe file is kept."
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to remove."
},
"confirm": {
"default": false,
"description": "Confirm removal of the schedule registration. The saved recipe file is kept.",
"type": "boolean"
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
}
}
},
"agents": {
"description": "Manage the user's agents (personas): create, list.",
"actions": {
Expand Down
126 changes: 126 additions & 0 deletions src-tauri/crates/berdctl/api-surface.json
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,132 @@
}
}
},
"schedules": {
"description": "Manage scheduled recipe jobs in Berd's live embedded Goose scheduler: list, pause, unpause, kill an active run, or remove a schedule.",
"actions": {
"list": {
"description": "List scheduled recipe jobs from the live Goose scheduler embedded in Berd. Unlike a separate goose schedule process, this reads the scheduler instance that is actually running the jobs and does not change app state.",
"fields": [],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}
},
"pause": {
"description": "Pause an idle scheduled recipe job through the live Goose scheduler embedded in Berd. Future scheduled runs stop until the job is unpaused. If a run is active, stop it first with berdctl schedule kill.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to pause.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to pause."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"unpause": {
"description": "Unpause a scheduled recipe job through the live Goose scheduler embedded in Berd. Future runs resume on the job's existing cron schedule.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to unpause.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to unpause."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"kill": {
"description": "Stop the current run of a scheduled recipe job through Berd's live Goose scheduler. The schedule itself remains registered and can run again later; use remove or pause when future runs must also stop.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job whose active run should stop.",
"min": 1
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job whose active run should stop."
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
},
"remove": {
"description": "Remove a scheduled recipe job through the live Goose scheduler embedded in Berd. This updates the scheduler that is actually running jobs, so a stale in-memory copy cannot restore the deleted schedule. The saved recipe file is kept.",
"fields": [
{
"name": "schedule_id",
"required": true,
"kind": "string",
"description": "Id of the scheduled recipe job to remove.",
"min": 1
},
{
"name": "confirm",
"required": false,
"kind": "boolean",
"description": "Confirm removal of the schedule registration. The saved recipe file is kept."
}
],
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"schedule_id": {
"type": "string",
"minLength": 1,
"description": "Id of the scheduled recipe job to remove."
},
"confirm": {
"default": false,
"description": "Confirm removal of the schedule registration. The saved recipe file is kept.",
"type": "boolean"
}
},
"required": ["schedule_id"],
"additionalProperties": false
}
}
}
},
"agents": {
"description": "Manage the user's agents (personas): create, list.",
"actions": {
Expand Down
31 changes: 31 additions & 0 deletions src-tauri/crates/berdctl/cli-surface-feedback.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,37 @@
}
}
},
"schedule": {
"group": "schedules",
"about": "Manage jobs in Berd's live Goose scheduler: list, pause, unpause, kill, remove",
"verbs": {
"list": {
"action": "list",
"about": "List scheduled recipe jobs from Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule list --json\n\nResult:\n {\"schedules\": [{\"id\": \"daily-report\", \"cron\": \"0 9 * * *\",\n \"paused\": false, \"currently_running\": false,\n \"source\": \"...\", \"last_run\": null,\n \"current_session_id\": null, \"job_start_time\": null}]}"
},
"pause": {
"action": "pause",
"about": "Pause a job in Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule pause --schedule-id daily-report\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"paused\": true}"
},
"unpause": {
"action": "unpause",
"about": "Resume a paused job in Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule unpause --schedule-id daily-report\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"paused\": false}"
},
"kill": {
"action": "kill",
"about": "Stop the active run of a scheduled recipe job",
"afterHelp": "Examples:\n berdctl schedule kill --schedule-id daily-report\n berdctl schedule kill --schedule-id daily-report && \\\n berdctl schedule remove --schedule-id daily-report --confirm\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"message\": \"...\"}"
},
"remove": {
"action": "remove",
"about": "Remove a job from Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule remove --schedule-id daily-report --confirm\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\"}\n\nIf the job is currently running, use berdctl schedule kill first when you also need to stop that active run."
}
}
},
"agent": {
"group": "agents",
"about": "Manage agents (personas): create, list",
Expand Down
31 changes: 31 additions & 0 deletions src-tauri/crates/berdctl/cli-surface.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,37 @@
}
}
},
"schedule": {
"group": "schedules",
"about": "Manage jobs in Berd's live Goose scheduler: list, pause, unpause, kill, remove",
"verbs": {
"list": {
"action": "list",
"about": "List scheduled recipe jobs from Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule list --json\n\nResult:\n {\"schedules\": [{\"id\": \"daily-report\", \"cron\": \"0 9 * * *\",\n \"paused\": false, \"currently_running\": false,\n \"source\": \"...\", \"last_run\": null,\n \"current_session_id\": null, \"job_start_time\": null}]}"
},
"pause": {
"action": "pause",
"about": "Pause a job in Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule pause --schedule-id daily-report\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"paused\": true}"
},
"unpause": {
"action": "unpause",
"about": "Resume a paused job in Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule unpause --schedule-id daily-report\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"paused\": false}"
},
"kill": {
"action": "kill",
"about": "Stop the active run of a scheduled recipe job",
"afterHelp": "Examples:\n berdctl schedule kill --schedule-id daily-report\n berdctl schedule kill --schedule-id daily-report && \\\n berdctl schedule remove --schedule-id daily-report --confirm\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\", \"message\": \"...\"}"
},
"remove": {
"action": "remove",
"about": "Remove a job from Berd's live Goose scheduler",
"afterHelp": "Example:\n berdctl schedule remove --schedule-id daily-report --confirm\n\nResult:\n {\"ok\": true, \"schedule_id\": \"daily-report\"}\n\nIf the job is currently running, use berdctl schedule kill first when you also need to stop that active run."
}
}
},
"agent": {
"group": "agents",
"about": "Manage agents (personas): create, list",
Expand Down
5 changes: 5 additions & 0 deletions src-tauri/crates/berdctl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ mod tests {
vec!["--project-id", "p", "--mode", "worktree"]
}
("project", "archive") => vec!["--project-id", "p"],
("schedule", "list") => vec![],
("schedule", "pause") | ("schedule", "unpause") | ("schedule", "kill") => {
vec!["--schedule-id", "s"]
}
("schedule", "remove") => vec!["--schedule-id", "s", "--confirm"],
("agent", "create") => vec!["--name", "n", "--system-prompt", "sp"],
("agent", "list") => vec![],
("skill", "create") => {
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/crates/berdctl/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sees there:
move-to-group, send, clear-project,
fork, archive
project projects create, list, get, set-startup-mode, archive
schedule scheduled jobs list, pause, unpause, kill, remove
agent agents (personas) create, list
skill skills (SKILL.md) create, list, get
info read-only lookups harnesses, models, context
Expand Down Expand Up @@ -67,7 +68,7 @@ pub fn build_cli(contract: &Contract) -> Command {
let mut cmd = Command::new("berdctl")
.bin_name("berdctl")
.term_width(HELP_WIDTH)
.about("Control the Berd desktop app (sessions, projects, agents, skills) from the command line")
.about("Control the Berd desktop app (sessions, projects, schedules, agents, skills) from the command line")
.long_about(TOP_LEVEL_LONG_ABOUT)
.after_long_help(TOP_LEVEL_EXAMPLES)
.subcommand_required(true)
Expand Down
Loading