{"_id":"@aiswarya797/agentguard","name":"@aiswarya797/agentguard","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aiswarya797/agentguard","version":"0.1.0","description":"macOS-first RAM-aware admission controller for local AI coding CLI processes","license":"MIT OR Apache-2.0","homepage":"https://github.com/aiswarya797/agentguard#readme","repository":{"type":"git","url":"git+https://github.com/aiswarya797/agentguard.git"},"bugs":{"url":"https://github.com/aiswarya797/agentguard/issues"},"keywords":["agentguard","codex","macos","cli","memory","scheduler"],"os":["darwin"],"cpu":["arm64"],"bin":{"agentguard":"npm/bin/agentguard","agentguardd":"npm/bin/agentguardd"},"publishConfig":{"access":"public"},"_id":"@aiswarya797/agentguard@0.1.0","gitHead":"1b98189fbe133102a0ac446bdda76873c137f659","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ZUqBThtduiYx6SyLAkgQE3xiQ4c6Ezsen4x2HrQ03kSNMsGJNTbJbGOqByotLIdbgKcNGfWe1mqJLBVIBHPjeg==","shasum":"cd7328c4d19006eeef2e8856fea01f3f80901f14","tarball":"https://registry.npmjs.org/@aiswarya797/agentguard/-/agentguard-0.1.0.tgz","fileCount":26,"unpackedSize":6826529,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICiSvCdQ8cKDnpmTHBRc/z8KnFZoy1tVSzAh/gtNBhqkAiATKspqZNSrCXmdM0rg6VS3f+h5cDQAxTi+u0GiR86p4Q=="}]},"_npmUser":{"name":"aiswarya797","email":"aiswarya797@gmail.com"},"directories":{},"maintainers":[{"name":"aiswarya797","email":"aiswarya797@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agentguard_0.1.0_1783107800685_0.5298121683914365"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-03T19:43:20.530Z","0.1.0":"2026-07-03T19:43:20.910Z","modified":"2026-07-03T19:43:21.113Z"},"maintainers":[{"name":"aiswarya797","email":"aiswarya797@gmail.com"}],"description":"macOS-first RAM-aware admission controller for local AI coding CLI processes","homepage":"https://github.com/aiswarya797/agentguard#readme","keywords":["agentguard","codex","macos","cli","memory","scheduler"],"repository":{"type":"git","url":"git+https://github.com/aiswarya797/agentguard.git"},"bugs":{"url":"https://github.com/aiswarya797/agentguard/issues"},"license":"MIT OR Apache-2.0","readme":"# AgentGuard\n\nAgentGuard is a macOS-first local admission controller for AI coding CLI processes. It starts guarded jobs only when local policy and memory pressure allow it, queues new guarded work when the machine is under stress, pauses guarded process groups on critical pressure, and explains those decisions through a small CLI.\n\nAgentGuard is not an agent orchestrator, worktree manager, sandbox, cloud IDE, RAM cleaner, or process killer for arbitrary apps. It only manages jobs launched through `agentguard run` or an installed AgentGuard shim.\n\n## What ships in this MVP\n\n- `agentguardd`: launchd-friendly user daemon with a user-only Unix domain socket.\n- `agentguard`: CLI for `status`, `run`, `policy`, `pause`, `resume`, `cancel`, `doctor`, and `install-shim`.\n- SQLite state for jobs, process samples, events, policy, and tool path mappings.\n- Pure scheduler and policy modules with deterministic tests.\n- Process-group spawning with `SIGSTOP` and `SIGCONT` for guarded jobs only.\n- Codex adapter that injects `-c agents.max_threads=N` unless the user already supplied an explicit `agents.max_threads` config.\n- Deterministic fake pressure support for tests through `AGENTGUARD_FAKE_PRESSURE_FILE`.\n\n## Install\n\nThe npm package currently ships prebuilt binaries for macOS on Apple Silicon:\n\n```sh\nnpm install -g @aiswarya797/agentguard\n```\n\nThen start the daemon:\n\n```sh\nagentguardd \\\n  --socket \"$HOME/.agentguard/agentguard.sock\" \\\n  --db \"$HOME/.agentguard/state.db\" \\\n  --foreground\n```\n\n## Build From Source\n\n```sh\ncargo build --workspace --all-features\n```\n\nIf Cargo is not on `PATH`, install Rust first. On macOS with Homebrew:\n\n```sh\nbrew install rust\n```\n\n## Run The Daemon\n\nForeground mode is easiest while testing from a source checkout:\n\n```sh\ntarget/debug/agentguardd \\\n  --socket \"$HOME/.agentguard/agentguard.sock\" \\\n  --db \"$HOME/.agentguard/state.db\" \\\n  --foreground\n```\n\nThe daemon listens only on a local Unix domain socket and stores state in SQLite. It does not open a TCP listener.\n\n## Use The CLI\n\nCheck status:\n\n```sh\ntarget/debug/agentguard status\ntarget/debug/agentguard status --json\n```\n\nRun a guarded command:\n\n```sh\ntarget/debug/agentguard run -- /bin/echo hello\ntarget/debug/agentguard run --priority low -- /bin/sleep 30\n```\n\nManage policy:\n\n```sh\ntarget/debug/agentguard policy get\ntarget/debug/agentguard policy set max_active_jobs 1\ntarget/debug/agentguard policy set pause_enabled true\n```\n\nPause, resume, or cancel a guarded job:\n\n```sh\ntarget/debug/agentguard pause <job-id>\ntarget/debug/agentguard resume <job-id>\ntarget/debug/agentguard cancel <job-id>\n```\n\nRun diagnostics:\n\n```sh\ntarget/debug/agentguard doctor\n```\n\n## Install A Temporary Shim\n\nInstall a shim for a real tool path into a directory you control:\n\n```sh\ntarget/debug/agentguard install-shim codex \\\n  --real-path /path/to/real/codex \\\n  --shim-dir \"$HOME/.agentguard/bin\"\n```\n\nThen put the shim directory before the real tool in `PATH`:\n\n```sh\nexport PATH=\"$HOME/.agentguard/bin:$PATH\"\n```\n\nThe shim dispatches through `agentguard run`, preserves cwd/env/stdin/stdout/stderr/args/exit code, and avoids PATH recursion by storing the real binary path.\n\n## Uninstall\n\nStop any foreground `agentguardd` process, remove the shim directory from `PATH`, and delete the local data directory if you no longer want state:\n\n```sh\nrm -rf \"$HOME/.agentguard\"\n```\n\nIf you later add a launchd plist, unload and remove it before deleting state.\n\n## Safety Model\n\n- AgentGuard never pauses, resumes, cancels, or kills unguarded user processes.\n- Automatic pause/resume uses process-group signals only for jobs that AgentGuard admitted and registered.\n- Cancel sends `SIGTERM` only to the guarded process group for the selected job.\n- Job commands and events are stored locally in SQLite. Prompts are not separately captured.\n- The v1 control plane is a user-only Unix socket with `0600` permissions.\n\n## Limitations\n\n- v1 does not queue individual Codex subagents after Codex is already running. It caps fan-out at launch.\n- The current system pressure sampler uses stable macOS command output as a documented fallback while preserving the sampler boundary for native API work.\n- There is no menu bar UI, cloud offload, container runtime, microVM dependency, or team dashboard.\n- Pause does not immediately free all memory; it stops execution so pressure can recover.\n","readmeFilename":"README.md","_rev":"1-0796d3286ff7482a7fe69a8f059c540d"}