@goplus/agentguard 1.1.9 → 1.1.10
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.
- package/README.md +19 -4
- package/dist/cli.js +65 -10
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -0
- package/dist/config.js.map +1 -1
- package/dist/feed/cron.d.ts +26 -0
- package/dist/feed/cron.d.ts.map +1 -1
- package/dist/feed/cron.js +372 -21
- package/dist/feed/cron.js.map +1 -1
- package/dist/installers.d.ts +1 -1
- package/dist/installers.d.ts.map +1 -1
- package/dist/installers.js +57 -0
- package/dist/installers.js.map +1 -1
- package/dist/postinstall.js +9 -0
- package/dist/postinstall.js.map +1 -1
- package/dist/runtime/types.d.ts +1 -1
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/tests/cli-init.test.d.ts +2 -0
- package/dist/tests/cli-init.test.d.ts.map +1 -0
- package/dist/tests/cli-init.test.js +40 -0
- package/dist/tests/cli-init.test.js.map +1 -0
- package/dist/tests/cli-policy.test.js +47 -0
- package/dist/tests/cli-policy.test.js.map +1 -1
- package/dist/tests/feed-cron.test.js +238 -0
- package/dist/tests/feed-cron.test.js.map +1 -1
- package/dist/tests/installer.test.js +13 -0
- package/dist/tests/installer.test.js.map +1 -1
- package/dist/tests/postinstall.test.d.ts +2 -0
- package/dist/tests/postinstall.test.d.ts.map +1 -0
- package/dist/tests/postinstall.test.js +27 -0
- package/dist/tests/postinstall.test.js.map +1 -0
- package/package.json +1 -1
- package/skills/agentguard/SKILL.md +29 -4
|
@@ -53,8 +53,25 @@ cd ~/.openclaw/skills/agentguard && node scripts/checkup-report.js
|
|
|
53
53
|
|
|
54
54
|
## Command Routing
|
|
55
55
|
|
|
56
|
+
### Post-Install Guidance
|
|
57
|
+
|
|
58
|
+
When AgentGuard has just been installed, or the user asks what to do next after
|
|
59
|
+
installing AgentGuard, recommend these steps in this order instead of deriving a
|
|
60
|
+
longer list from every supported command:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
agentguard init --agent <agent>
|
|
64
|
+
agentguard connect
|
|
65
|
+
agentguard checkup
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Use the current agent host for `<agent>` when it is known; otherwise leave
|
|
69
|
+
`<agent>` as a placeholder.
|
|
70
|
+
|
|
56
71
|
Parse `$ARGUMENTS` to determine the subcommand:
|
|
57
72
|
|
|
73
|
+
- **`init [args...]`** — Run `agentguard init`, especially `agentguard init --agent <agent>` after installation
|
|
74
|
+
- **`connect [args...]`** — Run `agentguard connect` to connect optional Cloud policy, audit, and approvals
|
|
58
75
|
- **`scan <path>`** — Scan a skill or codebase for security risks
|
|
59
76
|
- **`action <description>`** — Evaluate whether a runtime action is safe
|
|
60
77
|
- **`patrol [run|setup|status]`** — Daily security patrol for OpenClaw environments
|
|
@@ -74,20 +91,22 @@ This skill is allowed to run `agentguard *`, so CLI commands and flags are avail
|
|
|
74
91
|
|
|
75
92
|
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
93
|
|
|
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.
|
|
94
|
+
Use CLI passthrough for the CLI-only commands below, for `init` and `connect`, for explicit `/agentguard cli <args...>` requests, or for the targeted `checkup --against-advisory <id>` mode described below.
|
|
78
95
|
|
|
79
96
|
Supported CLI commands and options:
|
|
80
97
|
|
|
81
98
|
| CLI command | Options | Notes |
|
|
82
99
|
|---|---|---|
|
|
83
|
-
| `agentguard init` | `--level <level>`, `--agent <agent>`, `--cloud <url>`, `--force` | Creates local config and optionally installs
|
|
100
|
+
| `agentguard init` | `--level <level>`, `--agent <agent>`, `--cloud <url>`, `--force` | Creates local config, persists the selected agent host, and optionally installs templates for `claude-code`, `codex`, `openclaw`, `hermes`, or `qclaw` |
|
|
84
101
|
| `agentguard connect` | `--key <key>`, `--api-key <key>`, `--url <url>`, `--cloud <url>` | Prefer `AGENTGUARD_API_KEY` over passing secrets in flags |
|
|
85
102
|
| `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
103
|
| `agentguard status` | none | Shows local config, Cloud URL/API key status, policy cache, audit path |
|
|
87
104
|
| `agentguard policy pull` | `--json` | Pulls Cloud effective runtime policy into the local cache |
|
|
105
|
+
| `agentguard policy show` | `--json` | Shows the cached effective runtime policy, or the bundled default policy when no cache exists |
|
|
88
106
|
| `agentguard doctor` | none | Checks local setup and Cloud reachability when connected |
|
|
89
107
|
| `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`, `--quiet`, `--no-report`, `--cron <expr>`, `--cron-name <name>`, `--force`, `--cron-run` | Pulls Cloud threat advisories and optionally self-checks local skills |
|
|
108
|
+
| `agentguard subscribe` | `--since <iso>`, `--json`, `--quiet`, `--no-report`, `--cron <expr>`, `--cron-target <auto|openclaw|qclaw|hermes|system>`, `--cron-name <name>`, `--force`, `--cron-run` | Pulls Cloud threat advisories and optionally self-checks local skills |
|
|
109
|
+
| `agentguard checkup` | `--json` | Runs the local agent health checkup |
|
|
91
110
|
| `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
111
|
|
|
93
112
|
If the user writes `/agentguard cli <args...>`, execute `agentguard <args...>` directly.
|
|
@@ -185,6 +204,10 @@ agentguard subscribe --json
|
|
|
185
204
|
agentguard subscribe --since 2026-05-01T00:00:00.000Z
|
|
186
205
|
agentguard subscribe --no-report
|
|
187
206
|
agentguard subscribe --cron "0 * * * *"
|
|
207
|
+
agentguard subscribe --cron "0 * * * *" --cron-target system
|
|
208
|
+
agentguard subscribe --cron "0 * * * *" --cron-target openclaw
|
|
209
|
+
agentguard subscribe --cron "0 * * * *" --cron-target qclaw
|
|
210
|
+
agentguard subscribe --cron "0 * * * *" --cron-target hermes
|
|
188
211
|
agentguard subscribe --cron "0 * * * *" --quiet
|
|
189
212
|
agentguard subscribe --cron "0 * * * *" --cron-name agentguard-threat-feed
|
|
190
213
|
agentguard subscribe --cron "0 * * * *" --force
|
|
@@ -192,7 +215,9 @@ agentguard subscribe --cron "0 * * * *" --force
|
|
|
192
215
|
|
|
193
216
|
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
217
|
|
|
195
|
-
When `--cron <expr>` is used, the CLI
|
|
218
|
+
When `--cron <expr>` is used, the CLI first runs the subscribe flow once, then installs a recurring job using a standard five-field crontab expression such as `"0 * * * *"`. `--cron-target auto` is the default and uses the agent host saved by `agentguard init --agent`: `openclaw` uses the native `openclaw cron add` command and falls back to the OpenClaw Gateway at `127.0.0.1:18789`, `qclaw` uses the QClaw Gateway at `127.0.0.1:28789`, `hermes` uses native `hermes cron create` with a no-agent script under `~/.hermes/scripts/`, while `claude-code` and `codex` install a user crontab entry. If no agent host is saved, auto asks the user to run `agentguard init --agent <claude-code|codex|openclaw|hermes|qclaw>` first or pass `--cron-target openclaw`, `--cron-target qclaw`, `--cron-target hermes`, or `--cron-target system` explicitly. 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.
|
|
219
|
+
|
|
220
|
+
System cron writes output to `~/.agentguard/feed-cron.log`; it does not send OpenClaw agent-channel notifications.
|
|
196
221
|
|
|
197
222
|
`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.
|
|
198
223
|
|