Skip to content

T-W9S3-install-the-cli-affordance

State: planning/proposed · Impact: low · Complexity: small

The install offer’s premise is stale. The CLI is a native Rust binary now (crates/agent-pants, run as cargo run -p agent-pants or a built release binary), not an npm package with a bin entry — @sksizer/agent-pants’s bin.agent-pants and bin/agent-pants.js are gone; that package is a wasm binding only. npm i -g @sksizer/agent-pants below would not install a CLI. Whoever picks this up should design the install offer against however the Rust binary is actually distributed at that point (a cargo install, a downloaded release, or a harness-managed copy), not against the npm package. The build command itself (agent-pants build --vault <dir> --out <root>) is otherwise unchanged.

The app can build a marketplace itself, but nothing tells a reader that the same render is also a command they can run outside the app, or what that command is for the vault open right now. This task adds an install offer and a copyable, vault-scoped build command, without the experience shelling out to answer either question.

LocationRole today
solutions/agent-pants/packages/agent-pants/package.json#name@sksizer/agent-pants; a wasm binding only now, no bin entry
solutions/agent-pants/crates/agent-pants/src/cli.rsagent-pants build --vault <dir> --out <path> [--skills-root <path>]; --vault is a global flag
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vueThe desktop’s own build/check flow (useAgentSkillBuildPreview, agentSkillBuildMarketplace); no mention anywhere of the CLI equivalent
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillBuild.ts#agentSkillBuildMarketplaceThe transport call ApBuildPanel.vue drives — the same render the CLI’s native build verb performs
solutions/determined/experiences/polish/app/services/types.tsThe pattern every desktop capability already follows: a typed transport method, never a raw shell-out from Vue
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs#get_rosterThe shape a new op in this file would match — a typed request handled in Rust, generated onto both transports

A Build panel action offers to install the CLI (npm i -g @sksizer/agent-pants, or the bunx equivalent) and shows agent-pants build --vault <dir> --out <root> for the vault currently open, with the vault’s real path and the panel’s own out value substituted in, behind a copy control. Whether the CLI is already on PATH comes from a new determined-platform op — the experience never shells out or imports @tauri-apps/* directly, matching every other desktop capability’s typed-transport shape. A golden test asserts the CLI’s build verb and agentSkillBuildMarketplace produce byte-identical output trees for the fixture vault.

  1. Add a PATH-detection op in agent_skills.rs (a typed request/response, generated onto both transports the way get_roster is) that reports whether a named binary resolves on the host’s PATH. Open decision: walk PATH directly (std::env::var("PATH") plus a per-entry existence check) rather than adding a which-style crate dependency — confirm against determined-platform’s existing dependency list before choosing.
  2. Regenerate the transport client (packages/vault-platform-client/src/generated/{transport,types}.ts) so the new op reaches the experience the same way every other one does; the determined-rust-ci drift gate covers it.
  3. Add an “Install the CLI” section to ApBuildPanel.vue: reads the new op, shows the install command when the binary is absent, and always shows the vault-scoped agent-pants build … command behind a copy-to-clipboard control.
  4. Add a golden test that builds the fixture vault through both the CLI’s build verb and the desktop’s agentSkillBuildMarketplace, and diffs the two output trees byte for byte.
AreaNote
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rsAdd the PATH-detection op
solutions/determined/packages/vault-platform-client/src/generated/transport.tsRegenerated client method for the new op
solutions/determined/packages/vault-platform-client/src/generated/types.tsRegenerated request/response types
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vueInstall offer and the vault-scoped build command
solutions/agent-pants/packages/agent-pants/src/build-parity.test.tsGolden test comparing the CLI build and the desktop build for the fixture vault
  • AC-1: ApBuildPanel.vue shows an install command (npm i -g @sksizer/agent-pants or the bunx equivalent) when the PATH-detection op reports the CLI absent, and hides it when present.
  • AC-2: ApBuildPanel.vue always shows agent-pants build --vault <dir> --out <root> with the currently open vault’s real path substituted in, copyable.
  • AC-3: The PATH-detection op is a generated transport method, not a shelled-out command or a @tauri-apps/* import anywhere under experiences/agent-pants/.
  • AC-4: The golden test builds tests/fixtures/agent-pants-freeform through both paths and asserts identical output trees.
  • Running the install command for the reader (npm i -g … is copy-only, never executed by the app).
  • A CLI update-checker or version-pin UI; this task only detects presence.
  • none

From the user’s planning request of 2026-09-07: “the app offers to install the CLI and shows the equivalent build command.” The desktop-over-vault principle in solutions/agent-pants/docs/vault/design/application-over-vault.md and the comment-documented rule that experiences never shell out or import @tauri-apps/* directly (solutions/determined/experiences/polish/app/services/types.ts) both bear on the PATH-detection op’s shape.


← Back to Tasks