feat(profile): add read-only profile inventory - #484
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
allagents profile listnow provides a deterministic, read-only inventory of every declared profile and every installed profile whose declaration is missing. Human and JSON output expose profile state, clients, launcher paths, and PATH diagnostics without opening a selector or changing user-owned files or native state;profile status [name]remains the detailed single-profile diagnostic.The command reuses the existing profile status reconciliation and reports incomplete inspections with a nonzero exit while preserving the full inventory payload. Empty or invalid profile directories are excluded, and the automatic update check is disabled through command metadata so a human inventory run stays read-only.
Validation
bun test tests/unit/cli/profile-command.test.ts tests/unit/core/profile/manager.test.ts tests/unit/cli/agent-help.test.ts tests/unit/cli/update-check.test.ts tests/e2e/profile-list-read-only.test.ts tests/e2e/cli-enriched-help.test.tsbun run typecheckbun run lintbun run builddist/index.js.git diff --check origin/mainBuilt-CLI smoke used a temporary workspace and HOME containing one declared
workprofile with a Pi launcher and one installed declaration-missingorphanprofile. The smoke captured the complete temporary tree before running:Both commands exited 0 with empty stderr. Human output reported
orphanasdeclaration-missing,workas declared but missing, and the absoluteworklauncher path as not on PATH. JSON returnedsuccess: true,command: "profile list", the same two profiles, structured launcher fields, andtotal: 2. The before/after filesystem snapshots were identical.Post-Deploy Monitoring & Validation
No additional operational monitoring required: this is a local read-only CLI surface with no service, persistence migration, or remote rollout. Release validation is the built-CLI smoke above; any created file, selector prompt, missing orphaned profile, or malformed JSON envelope is a regression and should trigger a revert.