[PR #164] [CLOSED] experiment(cli): evaluate AgentENV-owned completion hook #221

Closed
opened 2026-10-29 14:21:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/164
Author: @NickNYU
Created: 8/12/2026
Status: ❌ Closed

Base: main ← Head: experiment/completion-agentenv-hook


📝 Commits (2)

  • d5a06cf Document the safe first slice of dynamic CLI completion
  • 867c583 feat(cli): evaluate AgentENV-owned completion hook

📊 Changes

5 files changed (+317 additions, -2 deletions)

View changed files

📝 crates/aenv/src/client/mod.rs (+16 -2)
📝 crates/aenv/src/commands/completion.rs (+165 -0)
📝 crates/aenv/src/main.rs (+4 -0)
➕ docs/superpowers/specs/2026-08-08-aenv-sandbox-completion-design.md (+93 -0)
➕ docs/superpowers/specs/2026-08-12-aenv-completion-agentenv-hook.md (+39 -0)

📄 Description

Summary

This is the second parallel experiment for #37. It keeps the static completion generator and appends Bash/Zsh/Fish adapters that call an AgentENV-owned internal protocol: aenv __complete.

What it adds

  • Hidden aenv __complete --index ... -- <shell words...> entry point.
  • Dynamic candidates backed by the existing sandbox list API.
  • State-aware candidates for running, paused, and active sandbox IDs.
  • Short completion-specific network timeouts and silent failure behavior.
  • Focused tests and a design note.

Trade-off

The protocol is owned by AgentENV and does not depend on clap_complete unstable-dynamic, but AgentENV must maintain cursor parsing plus three shell adapters. Clap still includes the hidden hook in generated command metadata, which is a small maintenance detail to discuss. The companion PR evaluates the upstream unstable dynamic engine. These are alternatives; please review and choose one direction rather than merging both.

Verification

  • cargo fmt --all
  • cargo check -p aenv --bin aenv
  • focused completion tests (15 passed)
  • generated Bash script and no-credential hook invocation

🔄 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/kvcache-ai/AgentENV/pull/164 **Author:** [@NickNYU](https://github.com/NickNYU) **Created:** 8/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `experiment/completion-agentenv-hook` --- ### 📝 Commits (2) - [`d5a06cf`](https://github.com/kvcache-ai/AgentENV/commit/d5a06cf80390affb92dc0b605a033fdd9b20a703) Document the safe first slice of dynamic CLI completion - [`867c583`](https://github.com/kvcache-ai/AgentENV/commit/867c583e736e67083609d1a4c743babb475800d2) feat(cli): evaluate AgentENV-owned completion hook ### 📊 Changes **5 files changed** (+317 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/aenv/src/client/mod.rs` (+16 -2) 📝 `crates/aenv/src/commands/completion.rs` (+165 -0) 📝 `crates/aenv/src/main.rs` (+4 -0) ➕ `docs/superpowers/specs/2026-08-08-aenv-sandbox-completion-design.md` (+93 -0) ➕ `docs/superpowers/specs/2026-08-12-aenv-completion-agentenv-hook.md` (+39 -0) </details> ### 📄 Description ## Summary This is the second parallel experiment for #37. It keeps the static completion generator and appends Bash/Zsh/Fish adapters that call an AgentENV-owned internal protocol: `aenv __complete`. ## What it adds - Hidden `aenv __complete --index ... -- <shell words...>` entry point. - Dynamic candidates backed by the existing sandbox list API. - State-aware candidates for running, paused, and active sandbox IDs. - Short completion-specific network timeouts and silent failure behavior. - Focused tests and a design note. ## Trade-off The protocol is owned by AgentENV and does not depend on `clap_complete` unstable-dynamic, but AgentENV must maintain cursor parsing plus three shell adapters. Clap still includes the hidden hook in generated command metadata, which is a small maintenance detail to discuss. The companion PR evaluates the upstream unstable dynamic engine. These are alternatives; please review and choose one direction rather than merging both. ## Verification - `cargo fmt --all` - `cargo check -p aenv --bin aenv` - focused completion tests (15 passed) - generated Bash script and no-credential hook invocation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:21:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#221
No description provided.