@goplus/agentguard 1.1.5 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +9 -2
  2. package/dist/adapters/openclaw-plugin.d.ts +14 -7
  3. package/dist/adapters/openclaw-plugin.d.ts.map +1 -1
  4. package/dist/adapters/openclaw-plugin.js +43 -8
  5. package/dist/adapters/openclaw-plugin.js.map +1 -1
  6. package/dist/cli.js +62 -5
  7. package/dist/cli.js.map +1 -1
  8. package/dist/cloud/client.d.ts +11 -3
  9. package/dist/cloud/client.d.ts.map +1 -1
  10. package/dist/cloud/client.js +52 -14
  11. package/dist/cloud/client.js.map +1 -1
  12. package/dist/config.d.ts +1 -0
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +11 -0
  15. package/dist/config.js.map +1 -1
  16. package/dist/feed/types.d.ts +11 -1
  17. package/dist/feed/types.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/installers.d.ts.map +1 -1
  23. package/dist/installers.js +94 -7
  24. package/dist/installers.js.map +1 -1
  25. package/dist/openclaw.d.ts +3 -0
  26. package/dist/openclaw.d.ts.map +1 -0
  27. package/dist/openclaw.js +13 -0
  28. package/dist/openclaw.js.map +1 -0
  29. package/dist/runtime/protect.d.ts +2 -2
  30. package/dist/runtime/protect.d.ts.map +1 -1
  31. package/dist/runtime/protect.js +50 -8
  32. package/dist/runtime/protect.js.map +1 -1
  33. package/dist/tests/cli-policy.test.d.ts +2 -0
  34. package/dist/tests/cli-policy.test.d.ts.map +1 -0
  35. package/dist/tests/cli-policy.test.js +66 -0
  36. package/dist/tests/cli-policy.test.js.map +1 -0
  37. package/dist/tests/cloud-live.test.js +0 -17
  38. package/dist/tests/cloud-live.test.js.map +1 -1
  39. package/dist/tests/feed-cloud.test.js +57 -2
  40. package/dist/tests/feed-cloud.test.js.map +1 -1
  41. package/dist/tests/installer.test.js +25 -3
  42. package/dist/tests/installer.test.js.map +1 -1
  43. package/dist/tests/integration.test.js +57 -3
  44. package/dist/tests/integration.test.js.map +1 -1
  45. package/dist/tests/runtime-cloud.test.js +59 -14
  46. package/dist/tests/runtime-cloud.test.js.map +1 -1
  47. package/docs/openclaw.md +2 -2
  48. package/openclaw.d.ts +6 -0
  49. package/openclaw.js +1 -0
  50. package/openclaw.plugin.json +1 -0
  51. package/package.json +7 -2
  52. package/skills/agentguard/SKILL.md +51 -6
@@ -31,7 +31,7 @@ filesystem-access:
31
31
  reason: "Read/write audit log (audit.jsonl) and protection level config (config.json)"
32
32
  user-invocable: true
33
33
  allowed-tools: Read, Write, Grep, Glob, Bash(node *trust-cli.ts *) Bash(node *action-cli.ts *) Bash(*checkup-report.js) Bash(echo *checkup-report.js) Bash(cat *checkup-report.js) Bash(agentguard *) Bash(openclaw *) Bash(ss *) Bash(lsof *) Bash(ufw *) Bash(iptables *) Bash(crontab *) Bash(systemctl list-timers *) Bash(find *) Bash(stat *) Bash(env) Bash(sha256sum *) Bash(node *) Bash(cd *)
34
- argument-hint: "[scan|action|patrol|subscribe|trust|report|config|checkup] [args...]"
34
+ argument-hint: "[scan|action|patrol|subscribe|trust|report|config|checkup|cli] [args...]"
35
35
  ---
36
36
 
37
37
  # GoPlus AgentGuard — AI Agent Security Framework
@@ -64,9 +64,38 @@ Parse `$ARGUMENTS` to determine the subcommand:
64
64
  - **`config <strict|balanced|permissive>`** — Set protection level
65
65
  - **`checkup`** — Run a comprehensive agent health checkup and generate a visual HTML report
66
66
  - **`hermes-hooks`** — Show or install Hermes shell-hook configuration for runtime protection
67
+ - **`cli <args...>`** — Run the installed `agentguard` CLI directly for supported commands not otherwise routed by this skill
67
68
 
68
69
  If no subcommand is given, or the first argument is a path, default to **scan**.
69
70
 
71
+ ### CLI Passthrough
72
+
73
+ This skill is allowed to run `agentguard *`, so CLI commands and flags are available even when the skill has a higher-level workflow for the same area.
74
+
75
+ The skill's routed subcommands take priority over similarly named CLI commands. Do not route these through the packaged CLI unless the user explicitly prefixes the request with `/agentguard cli`: `scan`, `action`, `patrol`, `trust`, `report`, `config`, `checkup`, `hermes-hooks`.
76
+
77
+ Use CLI passthrough for the CLI-only commands below, for explicit `/agentguard cli <args...>` requests, or for the targeted `checkup --against-advisory <id>` mode described below.
78
+
79
+ Supported CLI commands and options:
80
+
81
+ | CLI command | Options | Notes |
82
+ |---|---|---|
83
+ | `agentguard init` | `--level <level>`, `--agent <agent>`, `--cloud <url>`, `--force` | Creates local config and optionally installs agent templates |
84
+ | `agentguard connect` | `--key <key>`, `--api-key <key>`, `--url <url>`, `--cloud <url>` | Prefer `AGENTGUARD_API_KEY` over passing secrets in flags |
85
+ | `agentguard disconnect` | none | Removes local Cloud API key, connection timestamp, pending event spool, and cached Cloud policy; keeps Cloud URL, audit log, and installed hooks/templates |
86
+ | `agentguard status` | none | Shows local config, Cloud URL/API key status, policy cache, audit path |
87
+ | `agentguard policy pull` | `--json` | Pulls Cloud effective runtime policy into the local cache |
88
+ | `agentguard doctor` | none | Checks local setup and Cloud reachability when connected |
89
+ | `agentguard protect` | `--agent <agent>`, `--action-type <type>`, `--tool-name <name>`, `--session-id <id>`, `--decision-mode <local-first|cloud>`, `--json` | Evaluates one runtime action from stdin or hook environment |
90
+ | `agentguard subscribe` | `--since <iso>`, `--json`, `--no-report`, `--install-cron`, `--cron-name <name>`, `--interval-minutes <minutes>`, `--force`, `--cron-run` | Pulls Cloud threat advisories and self-checks local skills |
91
+ | `agentguard checkup --against-advisory <id>` | `--json` | CLI threat-feed self-check for one advisory; this is a targeted mode, not the default health-check workflow |
92
+
93
+ If the user writes `/agentguard cli <args...>`, execute `agentguard <args...>` directly.
94
+
95
+ Do **not** route plain `/agentguard scan`, `/agentguard action`, `/agentguard patrol`, `/agentguard trust`, `/agentguard report`, `/agentguard config`, `/agentguard checkup`, `/agentguard checkup --json`, or natural-language requests like "run agentguard checkup" through the packaged CLI. Those are this skill's higher-level workflows. Only use the packaged CLI checkup path when the user includes `--against-advisory <id>` or explicitly writes `/agentguard cli checkup ...`.
96
+
97
+ If the user writes `/agentguard checkup --against-advisory <id>`, use the CLI command `agentguard checkup --against-advisory <id>` instead of the comprehensive HTML health-report workflow.
98
+
70
99
  ## Subcommand: hermes-hooks
71
100
 
72
101
  Help the user configure AgentGuard runtime protection for Hermes Agent.
@@ -152,15 +181,20 @@ Examples:
152
181
  ```bash
153
182
  agentguard subscribe
154
183
  agentguard subscribe --json
184
+ agentguard subscribe --since 2026-05-01T00:00:00.000Z
185
+ agentguard subscribe --no-report
155
186
  agentguard subscribe --install-cron
187
+ agentguard subscribe --install-cron --cron-name agentguard-threat-feed
156
188
  agentguard subscribe --install-cron --interval-minutes 5
157
189
  agentguard subscribe --install-cron --force
158
190
  ```
159
191
 
160
- When `--install-cron` is used, the CLI registers an OpenClaw isolated cron job through the local OpenClaw Gateway at `127.0.0.1:18789`. It runs every 15 minutes by default. Pass `--interval-minutes <n>` to override the cadence. If a job with the same name already exists, the CLI leaves it untouched unless `--force` is passed. The cron delivery is intentionally silent (`delivery.mode = "none"`); the isolated turn executes `agentguard subscribe --json --cron-run` and only sends the configured notification when `shouldNotify` is `true`.
192
+ When `--install-cron` is used, the CLI registers an OpenClaw isolated cron job through the local OpenClaw Gateway at `127.0.0.1:18789`. It runs every 15 minutes by default. Pass `--interval-minutes <n>` to override the cadence and `--cron-name <name>` to choose the job name. If a job with the same name already exists, the CLI leaves it untouched unless `--force` is passed. The cron delivery is intentionally silent (`delivery.mode = "none"`); the isolated turn executes `agentguard subscribe --json --cron-run` and only sends the configured notification when `shouldNotify` is `true`.
161
193
 
162
194
  `agentguard subscribe --json` always includes a stable `cron` object with `requested`, `installed`, and optional `result` fields. If cron installation fails, the command exits non-zero instead of printing a misleading success summary.
163
195
 
196
+ `--since <iso>` overrides the persisted feed cursor for one run. `--no-report` skips uploading local matches back to Cloud. `--cron-run` is internal and should only be used by the OpenClaw cron prompt unless the user explicitly asks to reproduce cron behavior.
197
+
164
198
  ---
165
199
 
166
200
  # Security Operations
@@ -611,16 +645,16 @@ web3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'
611
645
 
612
646
  ### Operations
613
647
 
614
- **lookup** — `agentguard trust lookup --source <source> --version <version>`
648
+ **lookup** — `node scripts/trust-cli.ts lookup --source <source> --version <version>`
615
649
  Query the registry for a skill's trust record.
616
650
 
617
- **attest** — `agentguard trust attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>`
651
+ **attest** — `node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>`
618
652
  Create or update a trust record. Use `--preset` for common capability models or provide `--capabilities <json>` for custom.
619
653
 
620
- **revoke** — `agentguard trust revoke --source <source> --reason <reason>`
654
+ **revoke** — `node scripts/trust-cli.ts revoke --source <source> --reason <reason>`
621
655
  Revoke trust for a skill. Supports `--source-pattern` for wildcards.
622
656
 
623
- **list** — `agentguard trust list [--trust-level <level>] [--status <status>]`
657
+ **list** — `node scripts/trust-cli.ts list [--trust-level <level>] [--status <status>]`
624
658
  List all trust records with optional filters.
625
659
 
626
660
  ### Script Execution
@@ -726,6 +760,17 @@ If the log file doesn't exist, inform the user that no security events have been
726
760
 
727
761
  Run a comprehensive agent health checkup across 6 security dimensions. Generates a visual HTML report with a lobster mascot and opens it in the browser. The lobster's appearance reflects the agent's health: muscular bodybuilder (score 90+), healthy with shield (70–89), tired with coffee (50–69), or sick with bandages (0–49).
728
762
 
763
+ Plain `checkup` must always run this comprehensive workflow, even if the user phrases it as `agentguard checkup`. Do not answer that an advisory ID is required. Advisory IDs are optional and only switch to the targeted threat-feed self-check mode described below.
764
+
765
+ If the arguments include `--against-advisory <id>`, do not run this comprehensive HTML workflow. Instead execute the CLI threat-feed self-check:
766
+
767
+ ```bash
768
+ agentguard checkup --against-advisory <id>
769
+ agentguard checkup --against-advisory <id> --json
770
+ ```
771
+
772
+ That CLI path fetches the current Cloud advisory feed and checks local skills against the single advisory. It is separate from the full health report below.
773
+
729
774
  ### Step 1: Data Collection
730
775
 
731
776
  **IMPORTANT: You MUST run ALL 7 checks below — not just the skill scan. The checkup covers 5 security dimensions, not just code scanning. Do NOT skip checks 2–7.**