[PR #397] [MERGED] CLI command architecture and DB-backed model update syncing #947

Closed
opened 2026-04-20 19:53:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/397
Author: @gschier
Created: 2/16/2026
Status: Merged
Merged: 2/17/2026
Merged by: @gschier

Base: mainHead: cli-command-architecture


📝 Commits (10+)

  • 8023603 Add CLI command architecture plan
  • 26e1459 refactor yaak-cli phase 1 command architecture
  • 91e0660 add request show/delete commands and cli integration tests
  • 6a23f0a merge origin/main into cli-command-architecture
  • 0bf24c0 add workspace/folder/environment commands and reorganize cli tests
  • 570676d chore: apply rustfmt formatting updates
  • 0d57f91 add json create/update workflows across cli resources
  • f6c2028 Add DB-backed model change polling and startup pruning
  • ea0b083 Limit CLI plugin runtime startup and harden shutdown watcher
  • e48a089 Handle CLI send errors without panicking

📊 Changes

48 files changed (+3815 additions, -1177 deletions)

View changed files

📝 .gitignore (+3 -0)
📝 Cargo.lock (+116 -0)
📝 Cargo.toml (+2 -0)
📝 crates-cli/yaak-cli/Cargo.toml (+7 -0)
crates-cli/yaak-cli/PLAN.md (+340 -0)
crates-cli/yaak-cli/README.md (+87 -0)
crates-cli/yaak-cli/src/cli.rs (+282 -0)
crates-cli/yaak-cli/src/commands/environment.rs (+159 -0)
crates-cli/yaak-cli/src/commands/folder.rs (+139 -0)
crates-cli/yaak-cli/src/commands/mod.rs (+5 -0)
crates-cli/yaak-cli/src/commands/request.rs (+233 -0)
crates-cli/yaak-cli/src/commands/send.rs (+18 -0)
crates-cli/yaak-cli/src/commands/workspace.rs (+121 -0)
crates-cli/yaak-cli/src/context.rs (+96 -0)
📝 crates-cli/yaak-cli/src/main.rs (+27 -387)
crates-cli/yaak-cli/src/utils/confirm.rs (+16 -0)
crates-cli/yaak-cli/src/utils/json.rs (+110 -0)
crates-cli/yaak-cli/src/utils/mod.rs (+2 -0)
crates-cli/yaak-cli/tests/common/http_server.rs (+42 -0)
crates-cli/yaak-cli/tests/common/mod.rs (+62 -0)

...and 28 more files

📄 Description

This PR adds a functional CLI to Yaak, primarily for agent use.

CleanShot 2026-02-17 at 08 18 48
  • implement phase-based yaak-cli command architecture for workspace, request, folder, and environment
  • add JSON create/update workflows (including merge-patch updates) and integration tests across CLI resources
  • add a DB-backed model_changes table and app-side polling bridge so CLI writes are reflected in the running app UI
  • prune old model_changes rows on app startup to keep the table bounded
  • harden CLI plugin-runtime lifecycle:
  • only start plugin runtime for send commands
  • avoid panics on plugin kill watcher shutdown
  • return clean non-zero exit codes for send failures instead of panicking
  • add shared HTTP send pipeline in crates/yaak and migrate app/CLI send paths to use it
  • centralize shared send responsibilities: environment/auth resolution, template rendering, runtime config, cookie jar load/persist, response/event persistence
  • simplify the shared send API:
  • remove persist_events parameter (response events are always persisted)
  • remove cookie_jar_update_source parameter (cookie jars are always persisted with UpdateSource::Background)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/397 **Author:** [@gschier](https://github.com/gschier) **Created:** 2/16/2026 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `cli-command-architecture` --- ### 📝 Commits (10+) - [`8023603`](https://github.com/mountain-loop/yaak/commit/8023603ebeea2e07f6c51849816a905f50b634c5) Add CLI command architecture plan - [`26e1459`](https://github.com/mountain-loop/yaak/commit/26e145942ab4245b70c00606a80eda3552f4d409) refactor yaak-cli phase 1 command architecture - [`91e0660`](https://github.com/mountain-loop/yaak/commit/91e0660a7a8b29da902bd132dd3ee6d91cfa3183) add request show/delete commands and cli integration tests - [`6a23f0a`](https://github.com/mountain-loop/yaak/commit/6a23f0a5ee7d9480ac76b9cbf65a643588b93564) merge origin/main into cli-command-architecture - [`0bf24c0`](https://github.com/mountain-loop/yaak/commit/0bf24c0dc1a8d40c0f2953df762f40841e48edb6) add workspace/folder/environment commands and reorganize cli tests - [`570676d`](https://github.com/mountain-loop/yaak/commit/570676dffbe9b2d53df7d41c8b9d8d6070ee5db8) chore: apply rustfmt formatting updates - [`0d57f91`](https://github.com/mountain-loop/yaak/commit/0d57f91ca4d4821f9da3459f6ad99bfc768f5984) add json create/update workflows across cli resources - [`f6c2028`](https://github.com/mountain-loop/yaak/commit/f6c20283f0d2459d2bfdc97ced6d6f7fed3952e6) Add DB-backed model change polling and startup pruning - [`ea0b083`](https://github.com/mountain-loop/yaak/commit/ea0b083d2558aba3f710e2f074fb610413571ecb) Limit CLI plugin runtime startup and harden shutdown watcher - [`e48a089`](https://github.com/mountain-loop/yaak/commit/e48a0894de167aa2d56020518bae51977f499ead) Handle CLI send errors without panicking ### 📊 Changes **48 files changed** (+3815 additions, -1177 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) 📝 `Cargo.lock` (+116 -0) 📝 `Cargo.toml` (+2 -0) 📝 `crates-cli/yaak-cli/Cargo.toml` (+7 -0) ➕ `crates-cli/yaak-cli/PLAN.md` (+340 -0) ➕ `crates-cli/yaak-cli/README.md` (+87 -0) ➕ `crates-cli/yaak-cli/src/cli.rs` (+282 -0) ➕ `crates-cli/yaak-cli/src/commands/environment.rs` (+159 -0) ➕ `crates-cli/yaak-cli/src/commands/folder.rs` (+139 -0) ➕ `crates-cli/yaak-cli/src/commands/mod.rs` (+5 -0) ➕ `crates-cli/yaak-cli/src/commands/request.rs` (+233 -0) ➕ `crates-cli/yaak-cli/src/commands/send.rs` (+18 -0) ➕ `crates-cli/yaak-cli/src/commands/workspace.rs` (+121 -0) ➕ `crates-cli/yaak-cli/src/context.rs` (+96 -0) 📝 `crates-cli/yaak-cli/src/main.rs` (+27 -387) ➕ `crates-cli/yaak-cli/src/utils/confirm.rs` (+16 -0) ➕ `crates-cli/yaak-cli/src/utils/json.rs` (+110 -0) ➕ `crates-cli/yaak-cli/src/utils/mod.rs` (+2 -0) ➕ `crates-cli/yaak-cli/tests/common/http_server.rs` (+42 -0) ➕ `crates-cli/yaak-cli/tests/common/mod.rs` (+62 -0) _...and 28 more files_ </details> ### 📄 Description This PR adds a functional CLI to Yaak, primarily for agent use. <img width="2114" height="1134" alt="CleanShot 2026-02-17 at 08 18 48" src="https://github.com/user-attachments/assets/df84243c-ce30-4821-b74f-8838c5d05ddf" /> - implement phase-based `yaak-cli` command architecture for `workspace`, `request`, `folder`, and `environment` - add JSON create/update workflows (including merge-patch updates) and integration tests across CLI resources - add a DB-backed `model_changes` table and app-side polling bridge so CLI writes are reflected in the running app UI - prune old `model_changes` rows on app startup to keep the table bounded - harden CLI plugin-runtime lifecycle: - only start plugin runtime for send commands - avoid panics on plugin kill watcher shutdown - return clean non-zero exit codes for send failures instead of panicking - add shared HTTP send pipeline in `crates/yaak` and migrate app/CLI send paths to use it - centralize shared send responsibilities: environment/auth resolution, template rendering, runtime config, cookie jar load/persist, response/event persistence - simplify the shared send API: - remove `persist_events` parameter (response events are always persisted) - remove `cookie_jar_update_source` parameter (cookie jars are always persisted with `UpdateSource::Background`) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 19:53:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#947