@goplus/agentguard 1.1.7 → 1.1.9

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 (63) hide show
  1. package/README.md +12 -8
  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 +469 -51
  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/cron.d.ts +6 -2
  17. package/dist/feed/cron.d.ts.map +1 -1
  18. package/dist/feed/cron.js +32 -15
  19. package/dist/feed/cron.js.map +1 -1
  20. package/dist/feed/selfcheck.d.ts +10 -1
  21. package/dist/feed/selfcheck.d.ts.map +1 -1
  22. package/dist/feed/selfcheck.js +220 -37
  23. package/dist/feed/selfcheck.js.map +1 -1
  24. package/dist/feed/types.d.ts +12 -2
  25. package/dist/feed/types.d.ts.map +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/installers.js +28 -5
  31. package/dist/installers.js.map +1 -1
  32. package/dist/runtime/protect.d.ts +2 -2
  33. package/dist/runtime/protect.d.ts.map +1 -1
  34. package/dist/runtime/protect.js +50 -8
  35. package/dist/runtime/protect.js.map +1 -1
  36. package/dist/tests/cli-checkup.test.d.ts +2 -0
  37. package/dist/tests/cli-checkup.test.d.ts.map +1 -0
  38. package/dist/tests/cli-checkup.test.js +63 -0
  39. package/dist/tests/cli-checkup.test.js.map +1 -0
  40. package/dist/tests/cli-subscribe.test.d.ts +2 -0
  41. package/dist/tests/cli-subscribe.test.d.ts.map +1 -0
  42. package/dist/tests/cli-subscribe.test.js +123 -0
  43. package/dist/tests/cli-subscribe.test.js.map +1 -0
  44. package/dist/tests/cloud-live.test.js +0 -17
  45. package/dist/tests/cloud-live.test.js.map +1 -1
  46. package/dist/tests/feed-cloud.test.js +57 -2
  47. package/dist/tests/feed-cloud.test.js.map +1 -1
  48. package/dist/tests/feed-cron.test.js +28 -13
  49. package/dist/tests/feed-cron.test.js.map +1 -1
  50. package/dist/tests/feed-selfcheck.test.js +65 -3
  51. package/dist/tests/feed-selfcheck.test.js.map +1 -1
  52. package/dist/tests/feed-state.test.d.ts +2 -0
  53. package/dist/tests/feed-state.test.d.ts.map +1 -0
  54. package/dist/tests/feed-state.test.js +40 -0
  55. package/dist/tests/feed-state.test.js.map +1 -0
  56. package/dist/tests/installer.test.js +7 -2
  57. package/dist/tests/installer.test.js.map +1 -1
  58. package/dist/tests/integration.test.js +57 -3
  59. package/dist/tests/integration.test.js.map +1 -1
  60. package/dist/tests/runtime-cloud.test.js +59 -14
  61. package/dist/tests/runtime-cloud.test.js.map +1 -1
  62. package/package.json +5 -1
  63. package/skills/agentguard/SKILL.md +26 -15
@@ -72,7 +72,9 @@ If no subcommand is given, or the first argument is a path, default to **scan**.
72
72
 
73
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
74
 
75
- Use CLI passthrough when the user explicitly asks for a concrete `agentguard ...` command, when the command is one of the CLI-only commands below, or when a CLI flag changes semantics that this skill's high-level workflow does not implement.
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.
76
78
 
77
79
  Supported CLI commands and options:
78
80
 
@@ -80,15 +82,19 @@ Supported CLI commands and options:
80
82
  |---|---|---|
81
83
  | `agentguard init` | `--level <level>`, `--agent <agent>`, `--cloud <url>`, `--force` | Creates local config and optionally installs agent templates |
82
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 |
83
86
  | `agentguard status` | none | Shows local config, Cloud URL/API key status, policy cache, audit path |
84
87
  | `agentguard policy pull` | `--json` | Pulls Cloud effective runtime policy into the local cache |
85
88
  | `agentguard doctor` | none | Checks local setup and Cloud reachability when connected |
86
- | `agentguard scan <path>` | `--json` | Runs the packaged scanner against a local path |
87
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 |
88
- | `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 |
89
- | `agentguard checkup` | `--against-advisory <id>`, `--json` | CLI threat-feed self-check; without `--against-advisory`, it only prints a tip in the current CLI build |
90
+ | `agentguard subscribe` | `--since <iso>`, `--json`, `--quiet`, `--no-report`, `--cron <expr>`, `--cron-name <name>`, `--force`, `--cron-run` | Pulls Cloud threat advisories and optionally 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 ...`.
90
96
 
91
- If the user writes `/agentguard cli <args...>`, execute `agentguard <args...>` directly. 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.
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.
92
98
 
93
99
  ## Subcommand: hermes-hooks
94
100
 
@@ -174,20 +180,23 @@ Examples:
174
180
 
175
181
  ```bash
176
182
  agentguard subscribe
183
+ agentguard subscribe --quiet
177
184
  agentguard subscribe --json
178
185
  agentguard subscribe --since 2026-05-01T00:00:00.000Z
179
186
  agentguard subscribe --no-report
180
- agentguard subscribe --install-cron
181
- agentguard subscribe --install-cron --cron-name agentguard-threat-feed
182
- agentguard subscribe --install-cron --interval-minutes 5
183
- agentguard subscribe --install-cron --force
187
+ agentguard subscribe --cron "0 * * * *"
188
+ agentguard subscribe --cron "0 * * * *" --quiet
189
+ agentguard subscribe --cron "0 * * * *" --cron-name agentguard-threat-feed
190
+ agentguard subscribe --cron "0 * * * *" --force
184
191
  ```
185
192
 
186
- 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`.
193
+ Without `--quiet`, `agentguard subscribe` pulls new threat-feed advisories and notifies the user to review them manually. With `--quiet`, it runs the full automated flow: pull new advisories, self-check local skills, report local matches back to Cloud, and notify only when local matches are found.
194
+
195
+ When `--cron <expr>` is used, the CLI registers an OpenClaw isolated cron job through the local OpenClaw Gateway at `127.0.0.1:18789` using a standard five-field crontab expression such as `"0 * * * *"`. Pass `--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` or `agentguard subscribe --quiet --json --cron-run` depending on whether `--quiet` was used during installation. Non-quiet cron sends the configured notification when new advisories are found; quiet cron sends it when local matches are found.
187
196
 
188
197
  `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.
189
198
 
190
- `--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.
199
+ `--since <iso>` overrides the persisted feed cursor for one run. `--no-report` skips uploading local matches back to Cloud in quiet mode. `--cron-run` is internal and should only be used by the OpenClaw cron prompt unless the user explicitly asks to reproduce cron behavior.
191
200
 
192
201
  ---
193
202
 
@@ -639,16 +648,16 @@ web3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'
639
648
 
640
649
  ### Operations
641
650
 
642
- **lookup** — `agentguard trust lookup --source <source> --version <version>`
651
+ **lookup** — `node scripts/trust-cli.ts lookup --source <source> --version <version>`
643
652
  Query the registry for a skill's trust record.
644
653
 
645
- **attest** — `agentguard trust attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>`
654
+ **attest** — `node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>`
646
655
  Create or update a trust record. Use `--preset` for common capability models or provide `--capabilities <json>` for custom.
647
656
 
648
- **revoke** — `agentguard trust revoke --source <source> --reason <reason>`
657
+ **revoke** — `node scripts/trust-cli.ts revoke --source <source> --reason <reason>`
649
658
  Revoke trust for a skill. Supports `--source-pattern` for wildcards.
650
659
 
651
- **list** — `agentguard trust list [--trust-level <level>] [--status <status>]`
660
+ **list** — `node scripts/trust-cli.ts list [--trust-level <level>] [--status <status>]`
652
661
  List all trust records with optional filters.
653
662
 
654
663
  ### Script Execution
@@ -754,6 +763,8 @@ If the log file doesn't exist, inform the user that no security events have been
754
763
 
755
764
  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).
756
765
 
766
+ 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.
767
+
757
768
  If the arguments include `--against-advisory <id>`, do not run this comprehensive HTML workflow. Instead execute the CLI threat-feed self-check:
758
769
 
759
770
  ```bash