You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): add local approval queue for actions (#47)
Adds a Nightward-owned approval queue for MCP action requests, local CLI/TUI/Raycast approval surfaces, and docs/site parity for the secure write flow. Also keeps legacy direct MCP apply blocked and expands tests/media around the approval UX.
Signed-off-by: JSONbored <49853598+JSONbored@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,15 @@ Nightward is read-only by default, but it can run explicit, confirmation-gated l
21
21
22
22
[](site/guide/tui.md)
23
23
24
-
The README uses a GIF so the preview renders directly on GitHub. The docs homepage uses the lighter [WebM loop](site/public/demo/tui/nightward-opentui.webm), and the [TUI guide](site/guide/tui.md) keeps the full seven-screen gallery.
24
+
The README uses a GIF so the preview renders directly on GitHub. The docs homepage uses the lighter [WebM loop](site/public/demo/tui/nightward-opentui.webm), and the [TUI guide](site/guide/tui.md) keeps the full section gallery.
25
25
26
26
## At A Glance
27
27
28
28
| Surface | What it does | Default write behavior |
29
29
| --- | --- | --- |
30
30
| TUI | Dashboard, inventory, findings, analysis, fix plan, backup preview, action queue | Read-only until a confirmed action is applied |
31
31
| CLI | Scriptable scan, doctor, policy, SARIF, snapshot, schedule, backup, and action commands | Read-only unless explicit output/export paths or `--confirm` actions are requested |
32
-
| MCP server | Stdio tools/resources/prompts for AI clients |Read-only; can list/preview actions, but writes must be applied in CLI/TUI/Raycast|
32
+
| MCP server | Stdio tools/resources/prompts for AI clients |Can request local action approvals; applies only the locally approved action once|
33
33
| Raycast | macOS companion commands plus confirmed Nightward Actions | Clipboard/report-folder actions plus confirmation-gated writes |
34
34
| GitHub Action | Workspace policy and SARIF checks | Writes only requested CI outputs |
35
35
| Trunk plugin | Local workspace policy/analyze linters | Emits SARIF to stdout |
@@ -296,7 +296,7 @@ Secret values are never emitted in scan JSON, findings output, fix-plan JSON, Ma
296
296
297
297
`nw analyze` turns scan findings and classifications into explainable signals. It does not claim a package, server, binary, or URL is safe. It reports what Nightward can prove from local structure, why it matters, and how confident the signal is.
298
298
299
-
Default analysis is offline and builtin. Optional providers are discovered by `providers doctor`; Nightward does not call online services unless a user explicitly selects providers and opts into network-capable behavior. The CLI/TUI/Raycast action layer can install known provider CLIs after confirmation. MCP can list and preview those actions, but cannot apply local writes. Explicit local providers are `gitleaks`, `trufflehog`, `semgrep`, and `syft`. Online-capable providers are `trivy`, `osv-scanner`, `grype`, `scorecard`, and `socket`, and they require explicit online-provider opt-in. Socket support creates a remote Socket scan artifact from dependency manifest metadata; Nightward does not fetch or normalize remote Socket reports in v1.
299
+
Default analysis is offline and built-in. Optional providers are discovered by `providers doctor`; Nightward does not call online services unless a user explicitly selects providers and opts into network-capable behavior. The CLI/TUI/Raycast action layer can install known provider CLIs after confirmation. MCP can list and preview those actions, request a local approval ticket, and apply only the exact ticket after it is approved outside the MCP request. Explicit local providers are `gitleaks`, `trufflehog`, `semgrep`, and `syft`. Online-capable providers are `trivy`, `osv-scanner`, `grype`, `scorecard`, and `socket`, and they require explicit online-provider opt-in. Socket support creates a remote Socket scan artifact from dependency manifest metadata; Nightward does not fetch or normalize remote Socket reports in v1.
300
300
301
301
Provider runs use explicit skip/block/ready states, timeouts, bounded output capture, and redacted metadata only. Oversized provider stdout fails closed as a provider warning instead of being partially parsed. Semgrep execution requires a repo-local config file so Nightward does not use automatic rule discovery by default.
302
302
@@ -326,14 +326,15 @@ The default `nightward` / `nw` command opens the TUI:
326
326
- Fix Plan: safe/review/blocked remediation groups
- MCP Approvals: approve or deny exact MCP-requested action tickets
329
330
330
331
The TUI is now part of the Rust CLI binary and uses `opentui_rust` directly for the colored dashboard, filled panels, severity ribbons, and fixture-driven screenshots. Release archives and npm-downloaded binaries only need `nightward` and `nw`.
331
332
332
333
Keyboard shortcuts:
333
334
334
335
-`1`-`8`: switch sections
335
336
- arrow keys or `h`/`j`/`k`/`l`: navigate
336
-
-`enter`: confirm selected action in the Actions view
337
+
-`enter`: confirm selected action in the Actions view or review a pending MCP approval
337
338
-`/`: search findings
338
339
-`s`: cycle severity
339
340
-`x`: clear filters
@@ -356,14 +357,14 @@ Nightward can expose local context and bounded Nightward action workflows to MCP
356
357
}
357
358
```
358
359
359
-
The server supports scan, doctor, findings, finding/signal explanation, analysis, fix-plan, policy-check, report history/diff, action list/preview, rules, providers, resources, and prompts. It uses stdio only, does not open a network listener, and cannot rewrite arbitrary MCP or agent config. MCP clients cannot apply local writes because tool-call arguments are not an out-of-band local confirmation channel; use the CLI, TUI, or Raycast extension to apply previewed actions.
360
+
The server supports scan, doctor, findings, finding/signal explanation, analysis, fix-plan, policy-check, report history/diff, action list/preview/request/status/apply-approved, rules, providers, resources, and prompts. It uses stdio only, does not open a network listener, and cannot rewrite arbitrary MCP or agent config. MCP clients cannot self-confirm writes because tool-call arguments are not an out-of-band local confirmation channel; they can request a bounded action approval, then apply only the exact one-time ticket after the user approves it in the CLI, TUI, or Raycast extension. Cached `nightward_action_apply` calls remain blocked.
360
361
361
362
## GitHub Action
362
363
363
364
Nightward can run as a local GitHub Action in scan, policy, or SARIF mode:
364
365
365
366
```yaml
366
-
- uses: JSONbored/nightward@v0.1.4
367
+
- uses: JSONbored/nightward@v0.1.11
367
368
with:
368
369
mode: sarif
369
370
output: nightward.sarif
@@ -388,7 +389,7 @@ See [docs/website.md](docs/website.md) for the page map, custom-domain notes, an
388
389
Nightward includes an in-repo `plugin.yaml` for Trunk Check. Import a pinned release tag and enable repo/workspace policy scans:
The extension shells out to `nw` or `nightward`, renders redacted output, copies explicitly requested exports, and opens the local reports folder. Provider Doctor can enable/disable provider selection for Raycast Analysis and can preview/apply known provider installs only through the shared action registry. `Nightward Actions` uses that same registry as the CLI/TUI for confirmed provider, policy, schedule, backup, cleanup, and disclosure actions.
423
+
The extension shells out to `nw` or `nightward`, renders redacted output, copies explicitly requested exports, and opens the local reports folder. Provider Doctor can enable/disable provider selection for Raycast Analysis and can preview/apply known provider installs only through the shared action registry. `Nightward Actions` uses that same registry as the CLI/TUI for confirmed provider, policy, schedule, backup, cleanup, and disclosure actions.`Nightward MCP Approvals` lets the user approve or deny exact MCP-requested action tickets.
423
424
424
425
See [docs/raycast-extension.md](docs/raycast-extension.md) for preferences, validation, and read-only boundaries.
0 commit comments