Skip to content

chore: Task 5: agentflare apps run (dir) CLI command - #612

Merged
getappz merged 1 commit into
masterfrom
task/533-task-5-agentflare-apps-run-dir-cli-comma
Aug 26, 2026
Merged

chore: Task 5: agentflare apps run (dir) CLI command#612
getappz merged 1 commit into
masterfrom
task/533-task-5-agentflare-apps-run-dir-cli-comma

Conversation

@getappz

@getappz getappz commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Everything is clean. Only the three intended files are changed. Summary for the user:

Status: Task 5 complete.

  • Created src/cli/apps.rs: AppsArgs/AppsCommand::Run(RunArgs) (dir/--input/--db-path), run_app() that loads the App's app.toml/tools.toml via agentflare_apps::{load_app_manifest, load_tools_manifest}, builds crate::workflow::app_send_hook, and starts the run via crate::workflow::run_workflow_json_with_sender — mirrors cli::workflow::WorkflowArgs's exact shape/error-handling (ui::error + process::exit(1)).
  • Registered Apps(apps::AppsArgs) in src/cli/mod.rs (module decl, Commands variant, run() dispatch) following the Gateway/Workflow pattern.
  • Removed the now-stale #[allow(dead_code)] on app_send_hook and run_workflow_json_with_sender in src/workflow.rs since they're now used by production code, not just tests.
  • Tasks 1 and 4 were already landed on this branch (commits e5292e7, 5e949be), so no changes were needed there.

Tests: added the plan's two cli::apps tests (end-to-end fixture-app run producing a run id, plus a missing-app.toml error-message check) — both pass. Also re-ran workflow:: (21 passed) and agent_launch:: (23 passed, 1 pre-existing ignored) to confirm no regressions. cargo build, cargo clippy -- -A unsafe_code -A clippy::pedantic -D warnings, and cargo fmt are all clean.

No concerns — git status shows only the three expected files touched (src/cli/apps.rs new, src/cli/mod.rs and src/workflow.rs modified). Not committed; let me know if you'd like it committed.


Opened by claude-code on flared:c997d745ae66 for item #533 via agentflare.

Summary by CodeRabbit

  • New Features

    • Added the apps run command for executing an App workflow from the command line.
    • Supports specifying the App directory, initial input, and an optional SQLite database path.
    • Displays the run ID after successful execution and provides clear error messages when execution fails.
  • Tests

    • Added coverage for successful App execution and missing configuration files.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 828b89ea-46d7-4622-b357-cab8cc1e85d4

📥 Commits

Reviewing files that changed from the base of the PR and between 5e949be and 87ae95f.

📒 Files selected for processing (3)
  • src/cli/apps.rs
  • src/cli/mod.rs
  • src/workflow.rs
💤 Files with no reviewable changes (1)
  • src/workflow.rs

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


📝 Walkthrough

Walkthrough

Adds agentflare apps run. The command loads an App and tools manifest, reads its workflow, executes it through app_send_hook, prints the run ID, and reports errors. CLI registration and execution tests are included.

Changes

Apps Run CLI

Layer / File(s) Summary
Register the Apps command
src/cli/mod.rs
Registers the apps module, exposes the Apps subcommand, and dispatches it through the CLI runner.
Execute App workflows
src/cli/apps.rs, src/workflow.rs
Defines apps run arguments, loads manifests and workflows, resolves the database path, executes through app_send_hook, reports errors, prints the run ID, and tests successful execution and missing app.toml errors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 87ae9

This adds the apps run CLI command with focused wiring and reported passing checks; no actionable merge-blocking risk remains beyond normal review.

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant AppManifest
  participant Workflow
  participant app_send_hook
  participant SQLite
  CLI->>AppManifest: Load App and tools manifests
  CLI->>Workflow: Read declared workflow
  CLI->>SQLite: Resolve configured or default database path
  CLI->>app_send_hook: Execute workflow with input
  app_send_hook-->>CLI: Return run ID
  CLI-->>CLI: Print run ID or report failure
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding the agentflare apps run (dir) CLI command. The chore and task number add minor noise but do not reduce clarity.
Description check ✅ Passed The description provides a detailed summary, test results, implementation notes, risk assessment, and compatibility statement. It does not use the exact template headings or checklist format, and it d…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides a detailed summary, test results, implementation notes, risk assessment, and compatibility statement. It does not use the exact template headings or checklist format, and it does not report the exact cargo test and full clippy commands, but the required information is mostly present.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/533-task-5-agentflare-apps-run-dir-cli-comma

Comment @coderabbitai help to get the list of available commands.

Add src/cli/apps.rs (AppsArgs/AppsCommand::Run/run_app) mirroring
cli::workflow's pattern: loads an App's app.toml/tools.toml, wires
app_send_hook as the dispatch sender, and starts the run via
run_workflow_json_with_sender. Register Apps(apps::AppsArgs) in
src/cli/mod.rs. Drop the now-stale #[allow(dead_code)] on
app_send_hook/run_workflow_json_with_sender in src/workflow.rs since
they're used by production code now, not just tests.

Adds two tests: an end-to-end fixture-app run producing a run id, and
a missing-app.toml error-message check.

Agentflare-Agent: claude-code
Agentflare-Branch: task/533-task-5-agentflare-apps-run-dir-cli-comma
Agentflare-Item: 533
@getappz
getappz force-pushed the task/533-task-5-agentflare-apps-run-dir-cli-comma branch from 87ae95f to 988661a Compare August 26, 2026 04:48
@getappz
getappz merged commit 7718611 into master Aug 26, 2026
16 checks passed
@getappz
getappz deleted the task/533-task-5-agentflare-apps-run-dir-cli-comma branch August 26, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant