Implement CG-018: CLI commands and daemon IPC (status/scan/report/allow/block/detonate/audit)#11
Open
Implement CG-018: CLI commands and daemon IPC (status/scan/report/allow/block/detonate/audit)#11
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.
Motivation
clawguardCLI.Description
apps/cli/src/index.tssupportingstatus,scan,report,allow,block,detonate, andaudit, plus--jsonand--detailedoutput modes and actionable daemon-unavailable errors.apps/daemon/src/index.tsthat validates request/response envelopes using the contracts, handles per-command logic, runs snapshot/scan/report synthesis, persists results, and invokes the lifecycle manager to quarantine on block recommendations.packages/discovery/src/index.tsso the daemon consumes package APIs across boundaries.apps/cli/package.jsonto include@clawguard/storagefor socket path resolution and storage helpers.auditas a placeholder returning an empty scan list until broader persisted-scan listing is added, and detonation currently returns a helpfulruntime-unavailableresponse when Podman/Docker is not present.Testing
pnpm install,pnpm build,pnpm typecheck, andpnpm lint, all of which completed successfully.node apps/daemon/dist/index.jsand executed the sequencenode apps/cli/dist/index.js status,scan packages/fixtures/fixtures/benign-calendar-helper,report benign-calendar-helper --detailed,allow benign-calendar-helper "operator approved",block benign-calendar-helper "known bad", andaudit; all commands returned expected responses.detonatereturns a clearruntime-unavailableerror in environments without Podman/Docker.@clawguard/discovery,@clawguard/daemon,@clawguard/cli).Codex Task