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.
| Location | Role 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.rs | agent-pants build --vault <dir> --out <path> [--skills-root <path>]; --vault is a global flag |
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vue | The desktop’s own build/check flow (useAgentSkillBuildPreview, agentSkillBuildMarketplace); no mention anywhere of the CLI equivalent |
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillBuild.ts#agentSkillBuildMarketplace | The transport call ApBuildPanel.vue drives — the same render the CLI’s native build verb performs |
solutions/determined/experiences/polish/app/services/types.ts | The 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_roster | The shape a new op in this file would match — a typed request handled in Rust, generated onto both transports |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”- Add a PATH-detection op in
agent_skills.rs(a typed request/response, generated onto both transports the wayget_rosteris) that reports whether a named binary resolves on the host’s PATH. Open decision: walkPATHdirectly (std::env::var("PATH")plus a per-entry existence check) rather than adding awhich-style crate dependency — confirm against determined-platform’s existing dependency list before choosing. - 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. - 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-scopedagent-pants build …command behind a copy-to-clipboard control. - Add a golden test that builds the fixture vault through both the CLI’s
buildverb and the desktop’sagentSkillBuildMarketplace, and diffs the two output trees byte for byte.
| Area | Note |
|---|---|
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs | Add the PATH-detection op |
solutions/determined/packages/vault-platform-client/src/generated/transport.ts | Regenerated client method for the new op |
solutions/determined/packages/vault-platform-client/src/generated/types.ts | Regenerated request/response types |
solutions/determined/experiences/agent-pants/app/components/ApBuildPanel.vue | Install offer and the vault-scoped build command |
solutions/agent-pants/packages/agent-pants/src/build-parity.test.ts | Golden test comparing the CLI build and the desktop build for the fixture vault |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
ApBuildPanel.vueshows an install command (npm i -g @sksizer/agent-pantsor thebunxequivalent) when the PATH-detection op reports the CLI absent, and hides it when present. - AC-2:
ApBuildPanel.vuealways showsagent-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 underexperiences/agent-pants/. - AC-4: The golden test builds
tests/fixtures/agent-pants-freeformthrough both paths and asserts identical output trees.
Out of scope
Section titled “Out of scope”- 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.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”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.