Repository navigation
0.3.3 — Exfil-guard safe read & guarded config edit, Delete-guard on-demand storage measurement & selective restore
Zero-dependency deterministic Core release expanding the trusted-side Exfil-guard
and Delete-guard workflows: bounded whole-file redacted reads (safe_read CLI
and 15th default MCP tool), policy-allowlisted local scalar config editing
(agent-guard-config-edit), read-only on-demand quarantine storage measurement
(status --measure-storage), and transaction-reconciled selective restore
(restore --path / MCP paths), with cross-platform workspace doctor policy
checks and zero storage migration. This release also includes the Nov 28
Anniversary Special Edition M + iris emblem in the READMEs (strictly limited
to 2026-11-28 and Agent Guard 0.3.3).
本版在零新增生产依赖、不迁移既有存储格式的前提下,同步扩展 Exfil-guard 与 Delete-guard 的可信侧日常工作流:Exfil-guard 新增脱敏分页只读入口 safe_read(CLI agent-guard-safe-read 与第 15 项默认 MCP 工具)以及基于独立白名单策略的受控本地标量配置编辑 CLI(agent-guard-config-edit,覆盖 JSON 与 Node 22 对齐的单行 dotenv 子集,并接入跨平台 agent-guard-doctor workspace 只读核验);Delete-guard 新增按需只读隔离区空间计量(status --view overview --measure-storage 与 MCP status 同源参数,支持 Top-10 事务占用排行与部分结果保护)以及跨历史回执归并的事务状态与选择性按路径恢复(CLI --path 与 MCP paths)。本次同时在双语 README 收录 11.28 纪念日特别版 M 与鸢尾花徽标(仅限 2026-11-28 与 Agent Guard 0.3.3)。既有核心边界、恢复格式与手动 GC 契约保持不变。
Changes
Exfil-guard
- Bounded redacted read (
safe_read/agent-guard-safe-read): Adds a
workspace-relative POSIX descriptor-based text reader (core/safe_read.py,
CLIskills/exfil-guard/scripts/safe_read.py, MCP toolsafe_read, schema
safe_read/v1) that reads up to 256 KiB without following symlinks, checks
the first 8 KiB for NUL bytes, requires strict UTF-8, and verifies before and
afterfstatidentity. Known secret-store filenames, case-insensitive
control directories (.git,.agent-guard,.agent-trash), and both
default and custom quarantine roots are refused before opening. Text goes
through whole-filellm-requestscanning/redaction plus a dual re-scan
including an empty-exemption final check (RESIDUAL_SECRET_BLOCKED/
RESIDUAL_PATH_BLOCKED), returns whole-line pages (max 200 lines / 32 KiB
per page;LINE_TOO_LONGfor oversized lines), supports--strict-paths,
--fail-on-redaction, and opt-in page-scoped audit (tool: "exfil_safe_read";
MCP--audit-exfilsetsreadOnlyHint: false), and reports
UNSUPPORTED_PLATFORMon Windows.
See Exfil-guard Skill,
MCP Exfil tools, and
Opt-in Exfil audit. - Minimal allowlisted config editor (
agent-guard-config-edit): Adds an
operator-only local CLI (core/config_edit.py,
skills/exfil-guard/scripts/edit_config.py, schemaconfig_edit/v1; not
exposed as an MCP write tool) for updating existing non-sensitive scalar
values in workspace JSON (RFC 6901 JSON Pointer object navigation) and a
Node 22-aligned single-line dotenv subset. Edits are default-deny and require
an operator-maintained.agent-guard/config-edit-policy.json(single-link
regular file ≤1 MiB, strict literalversion: 1, explicit format and
editable_keys), enforce a 20-term sensitive-key ban and two-layer new-value
rejection (empty-exemptionfile-writescan plus placeholder/NUL ban), and
report onlybefore_typeandbefore_state(set/empty) with no raw
values,changedboolean, byte offsets, or fingerprints.--previewis
read-only by default;--applyrequires dual interactive TTY (stdinand
stderr) with exactAPPLY, acquires.agent-guard/config-edit.lock,
re-verifies policy, live quarantine boundary, parent chain, and target
identity before atomicos.replace(..., src_dir_fd, dst_dir_fd)with
surgical byte-span replacement and full pre-write re-parse verification,
preserves owner/group, normal mode bits, and matching inherited
security.selinuxlabels (refusing special mode bits, ACLs, custom xattrs,
or xattr-uninspectable filesystems asUNSUPPORTED_FILE_METADATA), reports
explicitreplaced/durability_confirmed(DIR_FSYNC_UNCONFIRMEDexits1),
and writes post-APPLYmetadata-only audit (tool: "exfil_config_edit").
Preview and apply require Linux with descriptor operations and
os.listxattr/os.getxattr(UNSUPPORTED_PLATFORMon macOS and Windows).
See Exfil-guard Skill
and Opt-in Exfil audit.
Delete-guard
- On-demand quarantine storage measurement (
status --measure-storage):
Extendsstatus.py --view overviewand MCPstatus(view="overview")with
opt-in--measure-storage/measure_storage: trueand
--max-measure-entries/max_measure_entries(default50,000, cap
200,000, depth limit64). Default overviews remain strictly zero-traversal
(measured: false,logical_bytes: null), and MCPview="full"rejects
explicitmeasure_storageparameters. Only a missing quarantine root
(lstatFileNotFoundError) returns complete zero occupancy; unreadable
roots, non-directories, or dangling links return partial results. Measurement
matches Coreadmission.pylogical byte and entry accounting using POSIX
O_NOFOLLOW/dir_fd/fstatopen-time verification and a Windows
junction-aware fallback, streaming every attempted entry (including depth
probes) against a single global budget with staged subtree rollback on
concurrent change or truncation. Partial scans reportobserved_logical_bytes,
observed_entries, andissueswhile keepinglogical_bytes: null.
admission_ratiorequires complete measurement plus valid limits, and Top-10
top_transactionsrequires complete measurement plus verified manifest
ownership evidence (unpurged direct entity directories sorted by bytes
descending, entries descending,txidascending; directories lacking manifest
evidence returnnullrather than[]). Entirely read-only.
See Unified read-only queries
and MCP tools. - Selective restore and transaction state reconciliation: Reconciles
per-item transaction state across all confirmed historical restore receipts
(includingrelocate-intentcopies and applied Git stashes), preventing a
partial restore from marking a transactionRESTOREDwhile
restorable_items > 0. Adds selective path restoration via
restore.py preview|restore <txid> --path PATH ...and MCP
restore_preview/restorepaths: [...](MCP continues to require exact
completetxids). Both CLI and MCP share a read-only selection preflight
that refuses the whole batch before mutating on missing, ambiguous,
already-restored, or manual-review selections; unfiltered restore preserves
PARTIALandmanual_review_itemshandling and resolves Git snapshots
against the bound workspace. Cleans empty parent directories under quarantine
left by successful moves and recordsselectiveandselected_countin
restore audit metadata.
See Selective restore
and Delete-guard Skill.
Workspace doctor, Skill installation and package alignment
- Cross-platform config-edit policy diagnostics:
agent-guard-doctor workspaceadds a read-onlychecks.config_edit_policycheck
(NOT_CONFIGURED/PASS/FAIL) validating
.agent-guard/config-edit-policy.jsonacross Linux, macOS, and Windows while
keepingexfil_allowchecks independent.
See Workspace doctor. - Skill installer, MCP doctor and npm CLI entrypoints:
install_skill.py
validates all 7exfil-guardentrypoints (check_span,check_export,
check_bash_exfil,safe_read,sanitize,view,edit_config).
doctor mcpchecks 15 default tools (16 with
--approval-channel codex), includingsafe_read.package.jsonexposes
17 npm CLI entrypoints (+agent-guard-safe-read,
+agent-guard-config-edit).
See Skill installation and
MCP doctor.
Upgrade
Check the exact GitHub Release
and npm version
before registry installation. If unavailable, use a reviewed checkout or a
checked local archive.
Keep doctor, CLI, MCP server and linked Skills on the same installation.
Version 0.3.3 expands the local MCP server from 14 to 15 default tools
(from 15 to 16 with --approval-channel codex) by adding safe_read,
extends status(view="overview") with opt-in storage measurement and
restore/restore_preview with selective paths, and adds
agent-guard-safe-read and agent-guard-config-edit for 17 npm CLI
entrypoints (exfil-guard Skill expands from 5 to 7 validated
entrypoints). Existing recovery manifests, deletion policy files, Exfil
exemptions, and session accounting require no migration. Complete outstanding
approved Cleanup tasks under their original package, workspace, quarantine and
session binding; older doctor baselines may report DRIFTED after upgrading
and should be reviewed before writing a new baseline.
Core/CLI requires Python 3.9+ and Git. Optional MCP retains Python 3.10+ and
mcp==2.3.0. TOML safe_view and Kimi TOML doctor helpers require Python
3.11+. Platform boundaries for file-descriptor / xattr features are explicit:
agent-guard-exfil-export and agent-guard-safe-read / MCP safe_read
require POSIX file-descriptor operations (UNSUPPORTED_PLATFORM on Windows);
agent-guard-config-edit preview and apply require Linux with descriptor
operations and os.listxattr/os.getxattr (UNSUPPORTED_PLATFORM on macOS
and Windows); status --measure-storage, selective restore, and
agent-guard-doctor workspace (checks.config_edit_policy) run cross-platform.
No new production dependency is introduced.
Validation and scope
This release builds on the 0.3.0 host acceptance baseline recorded in
maintenance acceptance. Local
and CI validation across the 0.3.3 milestones covers bounded safe_read
redaction, dual re-scan, pagination, and real MCP stdio contracts (including
Windows UNSUPPORTED_PLATFORM assertions); on-demand quarantine storage
measurement across POSIX dir_fd and Windows junction-aware fallback with
CLI/MCP parity and read-only checks; multi-receipt transaction state
reconciliation and selective restore across CLI, MCP stdio, and native Windows
Core tests; agent-guard-config-edit policy validation, Node 22 dotenv
parity, surgical replacement, SELinux/xattr metadata checks, atomic
re-verification, post-APPLY audit, macOS/Windows UNSUPPORTED_PLATFORM
gates, and cross-platform doctor workspace checks; plus package/Skill
entrypoint and release-note link checks. Follow
development CI
for exact commit-level Linux, macOS and Windows Core RC runs. The tag-triggered
release workflow runs the pinned MCP SDK gate and full suite before packing one
archive for GitHub Releases and npm (with provenance) and running independent
read-only publication checks.
agent-guard-lab run --case lifecycle-calibration remains at its 11-pair (22
check; 10 supported pairs on Windows) 0.3.2 L0 calibration baseline unless
expanded in a separate update. Claude Code model-backed maintenance remains
deferred, Kimi's standalone Lab capture helper remains pinned to 2.1.1, and
explicit MCP tools remain separate from native shell/editor interception and OS
sandboxing; see the capability matrix.
agent-guard-config-edit is an operator-confirmed local CLI rather than an
autonomous agent write path or MCP tool. Quarantine copies still occupy disk
space until manual GC runs, and GC remains an explicit manual action with no
automatic purge, GUI panel, or commercial retention/legal-hold features.