@mokuyoaxis/agent-guard 0.2.5-rc2 → 0.2.5

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 (40) hide show
  1. package/CONTRIBUTING.md +24 -0
  2. package/README.md +52 -18
  3. package/README.zh-CN.md +46 -15
  4. package/SECURITY.md +18 -10
  5. package/adapters/dsh/README.md +39 -6
  6. package/adapters/dsh/harness/README.md +5 -0
  7. package/adapters/dsh/harness/guard_lab.py +3 -2
  8. package/adapters/dsh/lib/index.js +127 -33
  9. package/adapters/kimi-code/harness/README.md +5 -0
  10. package/core/lab.py +5 -2
  11. package/core/messages.py +40 -0
  12. package/core/policy.py +2 -1
  13. package/docs/README.md +29 -8
  14. package/docs/design/architecture.md +9 -5
  15. package/docs/design/compatibility.md +43 -3
  16. package/docs/design/threat-model.md +2 -2
  17. package/docs/guides/getting-started.md +28 -12
  18. package/docs/guides/harness-capabilities.md +9 -2
  19. package/docs/guides/recovery-feedback.md +98 -0
  20. package/docs/history/friction.md +21 -1
  21. package/docs/lab/blue-team-calibration.md +45 -0
  22. package/docs/lab/examples/blue-team-calibration.py +53 -0
  23. package/docs/lab/guard-lab.md +12 -2
  24. package/docs/releases/release-notes-0.2.5-rc3.md +82 -0
  25. package/docs/releases/release-notes-0.2.5.md +123 -0
  26. package/docs/reports/blue-team-lab-2026-10.md +73 -0
  27. package/docs/research/README.md +41 -0
  28. package/docs/research/content-authorization.md +54 -0
  29. package/docs/research/dataflow-observability.md +48 -0
  30. package/docs/research/delegation-provenance.md +56 -0
  31. package/docs/research/evaluation-method.md +51 -0
  32. package/docs/research/lab-observations-2026-10.json +43 -0
  33. package/package.json +1 -1
  34. package/skills/delete-guard/SKILL.md +31 -14
  35. package/skills/delete-guard/references/policy.md +20 -6
  36. package/skills/delete-guard/scripts/check.py +13 -0
  37. package/skills/delete-guard/scripts/gc.py +4 -2
  38. package/skills/delete-guard/scripts/safe_delete.py +20 -14
  39. package/skills/delete-guard/scripts/status.py +9 -0
  40. package/skills/exfil-guard/references/rules.md +2 -2
@@ -0,0 +1,98 @@
1
+ # Reading guard status and cleanup results
2
+
3
+ These feedback changes are included in
4
+ [0.2.5](../releases/release-notes-0.2.5.md).
5
+ They do not change deletion policy, wildcard handling, retention thresholds,
6
+ or the recovery format.
7
+
8
+ ## What the status establishes
9
+
10
+ The DSH adapter runs `python3 check.py --help` before registering its tools
11
+ and Hook. This checks that Python and the checker imports run in the plugin
12
+ process environment; `python3` must be on that process's PATH as well as
13
+ available to the actual executor. It evaluates no command and writes no guard metadata.
14
+ It does not test the caller's shell, sandbox, or live host interception.
15
+
16
+ `agent_guard_status` adds an `adapter` object alongside the Core report:
17
+
18
+ | Field | Meaning |
19
+ |---|---|
20
+ | `startup_check` | The local checker startup check passed |
21
+ | `startup_scope` | `plugin_process`; the environment actually checked |
22
+ | `hook_registered` | This plugin registered its pre-execute listener |
23
+ | `last_checker_result` | `NOT_RUN`, `OK`, or the most recent checker infrastructure diagnostic; a policy refusal can still be an `OK` check |
24
+ | `host_interception` | `UNVERIFIED`; registration and local queries do not certify a live host path |
25
+
26
+ Missing shell service, missing checker, Python launch/import failure, a
27
+ 10-second startup timeout, or excessive startup output now fails plugin initialization explicitly.
28
+ The default path reports `GUARD_STARTUP_FAILED`; the optional read guard
29
+ retains `READ_GUARD_STARTUP_REFUSED`. Check the host's plugin status for
30
+ successful activation. If the plugin is absent or inactive, its own status
31
+ tool may not exist. A running host or a CLI status result is insufficient:
32
+ the host can continue running other tools after this plugin fails.
33
+
34
+ If the status script fails after registration, the model tool returns
35
+ `ok: false` and `report: null` with its adapter facts. It omits raw process
36
+ exceptions and unusable process output. These diagnostics describe the status
37
+ query; they do not overwrite the last command-checker result.
38
+
39
+ | Diagnostic | Meaning |
40
+ |---|---|
41
+ | `STATUS_EXECUTION_FAILED` | The caller's shell could not start or finish the status process |
42
+ | `STATUS_TIMEOUT` | The status process timed out, even if it produced output |
43
+ | `STATUS_PROCESS_FAILED` | The status process exited unsuccessfully |
44
+ | `STATUS_INVALID_OUTPUT` | A zero exit status did not provide a usable recovery report |
45
+
46
+ Once a command reaches the checker, process failure, timeout and unusable
47
+ output remain denials. Static `CHECKER_*` diagnostics distinguish these
48
+ failures from a Core policy refusal without copying private command text or
49
+ raw process errors into adapter logs.
50
+
51
+ ## What ALLOW_NOOP means
52
+
53
+ `ALLOW_NOOP` keeps its original decision and reason code. Its explanation is:
54
+
55
+ > No recovery action is needed for the recognized operations. Unrecognized command effects have not been checked.
56
+
57
+ For an unrecognized script or interpreter command, this is not a claim that
58
+ the operation is harmless. Scripts, overwrites and other uncovered paths
59
+ retain their existing limits. See the [threat model](../design/threat-model.md).
60
+
61
+ ## Moving a file does not remove its recovery copy
62
+
63
+ A successful relocation now reports `storage_notice` and `gc` guidance in
64
+ CLI JSON and displays the same information in terminal output. Enforced
65
+ checks and `safe_delete` also report retained data after a partial relocation,
66
+ including a storage failure after some files moved. The failed decision stays
67
+ unchanged; both JSON and terminal output include the recovery transaction ID.
68
+ A storage failure before any move does not claim retained data. Direct artifact
69
+ deletion, a no-match result and a deletion dry-run do not claim a relocation.
70
+ The DSH model-facing preview puts adapter/storage feedback before long
71
+ target or audit arrays within the existing preview limit.
72
+
73
+ Quarantined data still uses storage. Cross-filesystem moves and actual free
74
+ blocks depend on the filesystem; no exact freed-space measurement is claimed.
75
+ Status uses the existing size accounting and eligibility plan. Regenerable
76
+ artifacts still require the existing ignored-path and artifact-pattern rules.
77
+
78
+ Run maintenance from the same working directory with the same
79
+ `AGENT_GUARD_WORKSPACE` and `AGENT_GUARD_TRASH` settings as the operation.
80
+ Replace the package path below with your installation; CLI results supply
81
+ POSIX-shell-quoted commands for that package and Python interpreter. Use a
82
+ POSIX shell for these command strings; their quoting is not PowerShell or CMD syntax.
83
+
84
+ ```sh
85
+ # Inspect the plan; this removes nothing.
86
+ python3 /absolute/agent-guard/skills/delete-guard/scripts/gc.py
87
+
88
+ # Permanently remove the recovery copies selected by the plan.
89
+ python3 /absolute/agent-guard/skills/delete-guard/scripts/gc.py --execute --all-eligible
90
+
91
+ # Or explicitly select one transaction, including one not yet eligible.
92
+ python3 /absolute/agent-guard/skills/delete-guard/scripts/gc.py --execute --txid '<txid>'
93
+ ```
94
+
95
+ Review the plan and selected transactions before choosing a purge. A manual
96
+ `--txid` selection is not limited to age/capacity eligibility. The 30-day and
97
+ 5-GiB thresholds do not run GC automatically. `--execute` alone selects
98
+ nothing; GC does not prune Git stash snapshots.
@@ -9,9 +9,29 @@ F21–F23 changes subsequently shipped in 0.2.3; F24–F25 shipped in 0.2.4.
9
9
  F26–F31 subsequently shipped in 0.2.5-rc1. RC2 adds shared audit metadata and
10
10
  observer startup maintenance; publication is checked by its versioned receipts.
11
11
  Current scope is in the
12
- [candidate notes](../releases/release-notes-0.2.5-rc2.md); historical failures and
12
+ [candidate notes](../releases/release-notes-0.2.5.md); historical failures and
13
13
  test counts below are not rewritten by a later success.
14
14
 
15
+ ## Current feedback maintenance · status, explanations and retained storage
16
+
17
+ 2026-10-19: this feedback work is included in 0.2.5.
18
+ The recording below describes the implementation work on 2026-10-18.
19
+
20
+ 2026-10-18, unreleased 0.2.5 work: script existence was only a file check,
21
+ default DSH startup could return without registering protection, and generic
22
+ runtime errors did not explain what failed. A local Python/import probe and
23
+ explicit initialization failures now separate local readiness from listener
24
+ registration and unverified live-host interception. Runtime failures retain
25
+ deny behavior and report static diagnostics.
26
+
27
+ `ALLOW_NOOP` previously said “Nothing to delete” for commands whose effects
28
+ were not recognized. Its explanation now describes that limitation, without
29
+ changing the reason code or verdict. Relocation results/status/GC plans explain
30
+ retained storage and explicit plan/selection commands. They do not add
31
+ automatic purge or alter rm/glob policy. See the
32
+ [feedback guide](../guides/recovery-feedback.md) for current semantics;
33
+ historical test evidence below retains its original scope.
34
+
15
35
  ## F1 · Compound `cd X && rm y` resolves targets against the wrong base
16
36
 
17
37
  The interceptor classifies against the tool call's declared workdir. A
@@ -0,0 +1,45 @@
1
+ # 蓝队零模型校准 / Blue-team calibration
2
+
3
+ RC3 引入的便携示例保留在 0.2.5 中,将现有四种 Lab 控制依次运行并保存简短摘要。
4
+ 它复用已交付的 Core,不需要 DSH、Kimi、模型账户、私有 home 或新的 Python 依赖。
5
+ 需要 Python 3.9+,并允许本机 IPv4 回环监听;完整 Core 安装仍按[入门指南](../guides/getting-started.md)检查。
6
+
7
+ This example runs the four existing deterministic controls from a checkout or
8
+ installed package. It calls no model and makes no external-network request.
9
+ It creates disposable fixtures and private local evidence, including a
10
+ bounded IPv4-loopback observer. It is an example, not a new stable CLI.
11
+
12
+ ## 运行
13
+
14
+ 在包根目录或 checkout 根目录,选一个不存在的输出目录;父目录须已存在:
15
+
16
+ ```sh
17
+ python3 docs/lab/examples/blue-team-calibration.py --output-dir /tmp/agent-guard-blue-control-001
18
+ ```
19
+
20
+ 示例也可从其它工作目录通过其绝对路径调用。它根据脚本位置找到同一包内的 Core,
21
+ 不使用个人安装路径或全局宿主配置。再次运行请选择新目录,已有输出不会覆盖或清理。
22
+
23
+ | 控制 | 用途 |
24
+ |---|---|
25
+ | `clean` | 干净的负对照 |
26
+ | `mock-positive` | 合成接触/输出标记阳性 |
27
+ | `mock-injection` | 固定脚本中的标记流转阳性;名称沿用原 Lab 契约 |
28
+ | `snapshot-positive` | 合成归档与本机接收端校准 |
29
+
30
+ 四种控制均为 `model_usage=NONE`、`security_outcome=CALIBRATION_ONLY`。
31
+ 摘要中的 `COMPLETE` 需要控制报告 COMPLETE、判据 PASS、观察器 HEALTHY。
32
+ 非完整报告或已知 Lab 错误会立即停止后续控制,保留已有夹具和证据,不自动重试。
33
+
34
+ 输出目录包含各控制的 `fixture/`、`evidence/` 和整体 `summary.json`。
35
+ 观察器的路由和控制材料保存在私有证据中;公开反馈只提交必要的去敏摘要。
36
+ 脚本在终端输出同一摘要,完整返回退出码 0,控制未完成返回 4;参数或目录错误返回非零。
37
+
38
+ ## 如何使用结果
39
+
40
+ 控制通过说明这个运行环境中的仪器能完成指定校准;不说明真实模型安全、不认证宿主
41
+ 已经加载 hook,也不产生真实防护 L2 结论。若回环监听、权限或启动失败,先检查保留的
42
+ `observer.log` 与证据状态,按[Lab 指南](guard-lab.md)解释失败。
43
+
44
+ 本示例不重放私有实模,也不实现[研究稿](../research/README.md)中的请求授权或父子装配器。
45
+ 它为后续独立防守实验提供公开起点。贡献入口见[CONTRIBUTING.md](../../CONTRIBUTING.md)。
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env python3
2
+ """Run the existing four zero-model Lab controls from this package."""
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import json
7
+ from pathlib import Path
8
+ import sys
9
+
10
+ ROOT = Path(__file__).resolve().parents[3]
11
+ sys.path.insert(0, str(ROOT))
12
+
13
+ from core.lab import LabError, run_case # noqa: E402
14
+
15
+
16
+ def main() -> int:
17
+ parser = argparse.ArgumentParser(description=__doc__)
18
+ parser.add_argument("--output-dir", required=True, type=Path,
19
+ help="new output directory with an existing parent")
20
+ args = parser.parse_args()
21
+ output = args.output_dir.expanduser().resolve()
22
+ output.mkdir(mode=0o700)
23
+ controls = []
24
+ for case in ("clean", "mock-positive", "mock-injection", "snapshot-positive"):
25
+ try:
26
+ report = run_case(case, output / case)["report"]
27
+ except LabError as error:
28
+ controls.append({"case_id": case, "result": "INCONCLUSIVE",
29
+ "reason": str(error)})
30
+ break
31
+ controls.append({"case_id": case, "result": report["result"],
32
+ "criterion": report["criterion"]["status"],
33
+ "observer_health": report["observer"]["health"],
34
+ "security_outcome": report["security_outcome"]})
35
+ if (report["result"] != "COMPLETE" or report["criterion"]["status"] != "PASS"
36
+ or report["observer"]["health"] != "HEALTHY"):
37
+ break
38
+ complete = len(controls) == 4 and all(
39
+ c["result"] == "COMPLETE" and c["criterion"] == "PASS"
40
+ and c["observer_health"] == "HEALTHY"
41
+ and c["security_outcome"] == "CALIBRATION_ONLY" for c in controls)
42
+ summary = {"schema_version": 1, "model_usage": "NONE",
43
+ "scope": "EXISTING_L0_INSTRUMENT_CONTROLS",
44
+ "result": "COMPLETE" if complete else "INCONCLUSIVE", "controls": controls}
45
+ text = json.dumps(summary, ensure_ascii=False, indent=2) + "\n"
46
+ with (output / "summary.json").open("x", encoding="utf-8") as stream:
47
+ stream.write(text)
48
+ print(text, end="")
49
+ return 0 if complete else 4
50
+
51
+
52
+ if __name__ == "__main__":
53
+ raise SystemExit(main())
@@ -5,10 +5,20 @@ observable agent and harness behaviours. It creates disposable bait, watches
5
5
  only declared channels, and produces a bounded report. Its built-in controls
6
6
  call no model; its separate manual probe is designed for a user-run real
7
7
  harness trial. It was introduced in `0.2.3-rc2` and shipped with `0.2.3`.
8
- It remains available in stable `0.2.4` and published `0.2.5-rc1`;
9
- the `0.2.5-rc2` source candidate adds startup diagnosis and cancellation maintenance
8
+ It remains available in stable `0.2.4` and published `0.2.5-rc3`;
9
+ RC2 introduced startup diagnosis and cancellation maintenance
10
10
  without adding new model-trial evidence. See the [RC2 notes](../releases/release-notes-0.2.5-rc2.md).
11
11
 
12
+ The [RC3 prerelease](../releases/release-notes-0.2.5-rc3.md) includes
13
+ [blue-team research](../research/README.md), sanitized historical observations
14
+ and a [portable four-control example](blue-team-calibration.md).
15
+ Its private research methods do not expand this controller's supported
16
+ channels, evidence levels or native-host coverage.
17
+
18
+ Version [0.2.5](../releases/release-notes-0.2.5.md) retains
19
+ these controls and limits. Its status and storage explanations do not add
20
+ new model trials or production interception channels.
21
+
12
22
  It is not a Skill for the tested agent, a security boundary, or a certificate
13
23
  that a model or vendor is safe or malicious.
14
24
 
@@ -0,0 +1,82 @@
1
+ # Agent Guard 0.2.5-rc3
2
+
3
+ Publication status checked 2026-10-19: RC3 was published on 2026-10-14 as a
4
+ [GitHub prerelease](https://github.com/mokuyoaxis/agent-guard/releases/tag/0.2.5-rc3)
5
+ and [npm version](https://www.npmjs.com/package/@mokuyoaxis/agent-guard/v/0.2.5-rc3).
6
+ The next stable release line is [0.2.5](release-notes-0.2.5.md).
7
+ The following preparation snapshot retains its original results and limits.
8
+
9
+ ## Preparation snapshot · 2026-10-13
10
+
11
+ Source candidate prepared 2026-10-13. Published baselines remain stable
12
+ [0.2.4](release-notes-0.2.4.md) and prerelease
13
+ [0.2.5-rc2](release-notes-0.2.5-rc2.md). The maintainer authorized the normal
14
+ main-branch commit and push on 2026-10-13. Version tags and GitHub/npm package
15
+ publication remain separate steps; a main commit is a source preview.
16
+
17
+ ## Scope
18
+
19
+ - **Blue-team research.** New [research notes](../research/README.md) describe
20
+ data-flow observation, disclosure permissions, delegation provenance and
21
+ independent task/evidence scoring from our controlled experiments.
22
+ - **Sanitized observations.** A [stage report](../reports/blue-team-lab-2026-10.md)
23
+ and [aggregate JSON](../research/lab-observations-2026-10.json) preserve
24
+ bounded results, failures and inconclusive trials. Private routes,
25
+ identifying paths, raw sessions and reusable induction payloads are omitted.
26
+ Complete private real-model captures are not published with these notes.
27
+ - **Portable calibration example.** The [four-control example](../lab/blue-team-calibration.md)
28
+ reuses the existing Core controls from a checkout or installed package,
29
+ calls no model and requires no host credentials or new dependency.
30
+ - **Contribution and navigation.** Both READMEs and contribution guidance
31
+ welcome forks, PRs and independent defensive reproductions. Lab proceeds
32
+ through small, bounded experiments without a promised cadence.
33
+ - **Existing fixture-extension hooks.** The candidate retains the local
34
+ private sample/fixture injection parameters used by earlier Lab work.
35
+ Default built-in samples and the normal DSH runner keep their existing path;
36
+ the private host drivers are not packaged.
37
+
38
+ ## Compatibility and evidence boundaries
39
+
40
+ The Decision Protocol, native-hook coverage, policy verdicts, recovery
41
+ strategies, public controller flags and existing evidence levels retain their
42
+ contracts. No production dependency or storage/configuration migration is
43
+ introduced. The example is a script around current controls, not a new bin
44
+ or a general authorization gateway.
45
+
46
+ Experimental `LOCAL_ONLY`/`MODEL_ALLOWED` labels and private parent/child
47
+ methods are research subjects; they do not become production decision
48
+ classes or host guarantees. The public package includes the research and
49
+ example through `docs/`; personal `experiments/`, raw evidence and backups
50
+ remain outside its allowlist.
51
+
52
+ The latest historical four-member real-model control delivered untrusted
53
+ content to child models, but neither enabled nor disabled members attempted
54
+ the target read. No real policy-blocking effect was measured. Auxiliary Kimi
55
+ output remained inconclusive. Publication of the notes does not create new
56
+ L1/L2 claims or new model/host trials.
57
+
58
+ ## Candidate validation
59
+
60
+ The explicit 188-file public source checkpoint passed 917 Python tests
61
+ (1023.105 seconds, no skips) and both Node adapter smoke groups.
62
+ The full run froze that source copy; later changes are documentation-only
63
+ clarifications and this evidence paragraph. Runtime code and tests retain
64
+ their tested bytes. The 108 pre-existing private experiment/test files are
65
+ preserved separately and are not part of this public-source checkpoint.
66
+
67
+ Sixteen focused metadata, routing, example-failure and corpus checks passed.
68
+ The sanitized numeric observations were checked against their original
69
+ machine summaries. The 134-file local package matched source and offline
70
+ installation. Ten CLI entries, adapter import, synthetic recovery round
71
+ trips and audit/query checks passed. The installed example completed all
72
+ four controls with PASS, HEALTHY and CALIBRATION_ONLY; reuse of its output
73
+ directory was refused without changing the retained evidence.
74
+ Later Markdown review updates current-version pointers, defensive navigation
75
+ and this evidence paragraph. Runnable and test bytes remain the verified
76
+ checkpoint; package/source equality is checked again after documentation
77
+ changes. No new real-model or native-host trial is credited to this work.
78
+
79
+ Exact-commit remote CI, GitHub/npm publication, registry availability,
80
+ signature and provenance receipts are not established by a local tarball.
81
+ Stable-channel and existing version artifacts remain governed by the release
82
+ workflow and their original receipts.
@@ -0,0 +1,123 @@
1
+ # Agent Guard 0.2.5
2
+
3
+ Stable maintenance release, prepared 2026-10-19. Version 0.2.5 combines
4
+ the maintenance and research delivered in RC1–RC3 with clearer feedback about
5
+ runtime readiness, command coverage and recovery storage.
6
+
7
+ The exact tag routes to a GitHub release and npm `latest`. Availability is
8
+ established by the [GitHub release](https://github.com/mokuyoaxis/agent-guard/releases/tag/0.2.5)
9
+ and [npm version](https://www.npmjs.com/package/@mokuyoaxis/agent-guard/v/0.2.5).
10
+ RC3 and 0.2.4-hotfix.1 retain their independent opt-in channels and artifacts.
11
+
12
+ 0.2.5 正式版汇合 RC1—RC3 与明确反馈维护;GitHub/npm 的实际发布结果以精确版本回执为准。
13
+ 本版不自动升级用户已有安装,不改变 rm 通配符规则或执行路径。
14
+
15
+ ## What users will see
16
+
17
+ - **Startup checks run Python.** Before registering its tools and listener,
18
+ the DSH adapter runs `python3 check.py --help` in the plugin process.
19
+ Missing dependencies, an import/process failure or a 10-second startup
20
+ timeout now produces an explicit initialization failure. The host can
21
+ continue running other tools, so inspect the plugin's activation status.
22
+ - **Local readiness and host interception are separate.** DSH status shows
23
+ the startup check, listener registration and most recent checker result.
24
+ Live interception remains `UNVERIFIED`; local CLI status reports recovery
25
+ data only. A plugin that never loaded may provide no status tool.
26
+ - **Unrecognized effects are identified.** `ALLOW_NOOP` now explains:
27
+ “No recovery action is needed for the recognized operations. Unrecognized
28
+ command effects have not been checked.” Its verdict and reason code stay
29
+ the same. Script/interpreter effects are not certified as harmless.
30
+ - **Relocation explains retained storage.** Successful moves and partial
31
+ failures with moved files report that the data still uses disk space,
32
+ retain the recovery transaction ID, and provide GC commands. A dry-run,
33
+ no-match or direct artifact deletion does not claim a relocation.
34
+ - **GC guidance selects an actual action.** Results provide a plan command,
35
+ `--execute --all-eligible`, and explicit `--execute --txid '<txid>'` guidance.
36
+ Keep the same working directory and workspace/trash settings. The 30-day
37
+ and 5-GiB thresholds do not run cleanup automatically; `--execute` alone
38
+ selects nothing. Purge removes recovery copies permanently and does not
39
+ prune Git stash snapshots.
40
+ - **Failures explain the affected step.** Static `CHECKER_*` and `STATUS_*`
41
+ diagnostics distinguish execution, timeout, process and output failures
42
+ from policy refusals. Checker infrastructure failures still deny the call.
43
+ A failed status query returns `ok: false` and `report: null`, retaining
44
+ adapter facts without replacing the last command-checker result or copying
45
+ raw process errors into diagnostics.
46
+
47
+ 这些反馈不扩大自动拦截范围。Python 在插件进程中可运行,不代表调用者的 shell/sandbox
48
+ 已经验证;Hook 已注册也不代表实际调用经过它。迁入回收站是保留恢复副本,数据仍占空间。
49
+ 具体字段、故障标签及 GC 示例见[状态与清理反馈](../guides/recovery-feedback.md)。
50
+
51
+ ## Included from the prereleases
52
+
53
+ - [RC1](release-notes-0.2.5-rc1.md): quarantine control-path protection,
54
+ PURGED-history exclusion from active GC planning, minimized restore and
55
+ safe_delete audit writers, exemption diagnostics and assessment clarification.
56
+ - [RC2](release-notes-0.2.5-rc2.md): shared audit metadata projection, opaque
57
+ session correlation, bounded legacy status/GC metadata, observer startup
58
+ diagnostics and cancellation accounting.
59
+ - [RC3](release-notes-0.2.5-rc3.md): defensive research, sanitized bounded
60
+ observations and the portable four-control calibration example. Private
61
+ experimental methods do not become production authorization features.
62
+
63
+ ## Upgrade impact
64
+
65
+ | Starting point | What to review |
66
+ |---|---|
67
+ | 0.2.4 | Quarantine control paths can now be refused before housekeeping. Review RC audit field changes and explicit DSH initialization failures. |
68
+ | 0.2.4-hotfix.1 | Control-path protection is already backported. The remaining RC maintenance, research and feedback are additional. |
69
+ | 0.2.5-rc1 / rc2 | Later RC content and the feedback changes above are cumulative. |
70
+ | 0.2.5-rc3 | Review the new startup/status diagnostics, `ALLOW_NOOP` explanation and retained-storage/GC guidance. |
71
+
72
+ Consumers must tolerate optional result fields. Audit records are supported
73
+ metadata, not arbitrary payload storage: raw/custom audit fields may be
74
+ omitted or projected, including in-memory views of old records. Earlier log
75
+ bytes are not rewritten. Recovery IDs and manifest/CLI paths remain exact;
76
+ an audit correlation digest is not a restore argument. See the
77
+ [audit contract](../guides/audit-metadata.md).
78
+
79
+ The default DSH lifecycle changes from log-only inactivity to explicit
80
+ initialization failure. Python must be on the plugin process PATH and
81
+ available to the actual executor. Existing admitted host versions remain
82
+ `0.1.5-rc.1` and `0.2.0-rc.2`; optional read redaction stays off by default
83
+ and keeps its existing artifact pins and coverage limits.
84
+
85
+ The maintainer selected 0.2.5 for this cumulative maintenance, carrying
86
+ forward RC1's documented versioning exception. Decision/reason strings,
87
+ public CLI parameters and exit-code roles, recovery strategies and formats
88
+ retain their contracts. No production dependency or configuration/storage
89
+ migration is introduced. See the [compatibility contract](../design/compatibility.md).
90
+
91
+ 本轮没有改动 rm 通配符、变量、管道、find 或工作区边界规则,也没有新增替代执行路径。
92
+ `safe_delete` 仍按原规则显式展开自己的参数;这不放宽 `rm` 的通配符判定。
93
+
94
+ ## Validation and limits
95
+
96
+ Before the version-only promotion, the feedback-maintenance checkout passed
97
+ one complete `npm test` on 2026-10-19: 933 Python tests and both Node adapter
98
+ groups, with original assertions and timeouts. Eleven actual CLI scenarios,
99
+ feedback/audit checks, bounded zero-model DSH runtime checks for both admitted
100
+ versions, and source/tarball/offline-install equality also passed. This is
101
+ local maintenance evidence, separate from versioned remote release gates.
102
+
103
+ The versioned 0.2.5 checkpoint separately passed one complete `npm test`:
104
+ 933 Python tests (835.794 seconds, no skips) and both Node groups, with
105
+ 192 public files unchanged throughout the run. The 137-file local package
106
+ matched source and offline installation; ten CLI entries, adapter import,
107
+ synthetic recovery, explicit GC guidance and unchanged wildcard refusal passed.
108
+ After that run, only release-status documentation and this evidence paragraph
109
+ changed. Runtime and test bytes retain the verified checkpoint; final
110
+ source/package/installation equality is checked again for publication.
111
+
112
+ Earlier intermittent subprocess timeouts remain recorded as failures. Their
113
+ historical cause is unresolved; later successful checks do not establish a
114
+ root-cause fix. The [capability matrix](../guides/harness-capabilities.md)
115
+ retains each host report's tested versions and scope. This preparation adds
116
+ no real-model trial, UI/sandbox certification or general subagent guarantee.
117
+ Full Windows-native harness E2E, universal egress protection and isolation
118
+ against same-UID processes remain outside the guarantee.
119
+
120
+ Install the exact version or use a reviewed checkout/tarball following
121
+ [getting started](../guides/getting-started.md). Publication requires the
122
+ final commit's CI, npm credential preflight and matching GitHub/npm artifacts.
123
+ Local checks do not establish those remote receipts or registry availability.
@@ -0,0 +1,73 @@
1
+ # 蓝队 Lab 阶段报告:来源、发送授权与任务效用
2
+
3
+ 整理日期:2026-10-13。历史试次日期:2026-10-11 至 2026-10-13。
4
+ 本稿依据项目保存的阶段报告、机器汇总和源码记录整理,公开防守方法与有限结果。
5
+ 公开整理本身没有启动新的模型、宿主或攻击试次。
6
+
7
+ ## 设置与证据范围
8
+
9
+ 实模主线使用 DSH 0.2.0-rc.2、Node 22.23.2,部分只读辅助使用 Node Kimi Code 0.42.0;
10
+ 本机为 Android/PRoot Debian ARM64、Python 3.13.5。
11
+ 主要试次的客户端声明模型为 `deepseek-v4.1-flash`,本文移除私有路由前缀和别名;
12
+ 该标识与 HTTP 响应不构成上游模型权重认证。
13
+
14
+ 试次使用一次性工作区、合成配置和随机标签,固定任务、预算和选定工具。
15
+ 观察入口包括声明的原生读取、SDK 序列化正文、实际发送正文及宿主结果。
16
+ 模型请求通过指定通路,记录至 HTTP 响应;没有独立的上游正文摘要接收回执。
17
+ 父子试次只包含一个新建前台 child,较早的配置/历史任务没有子代理。
18
+
19
+ 外层实验范围与业务许可分别记账。外层固定范围造成的停止不计成生产 guard 的保护。
20
+ 零模型脚本响应、真实任务、辅助评审和来源故障分别记录。
21
+
22
+ ## 防守侧观察
23
+
24
+ | 阶段 | 实模范围 | 已观察结果 | 有限结论 |
25
+ |---|---|---|---|
26
+ | 后台读取、丢弃内容 | 两宿主、四请求 | 各一次枚举/读取;两项任务通过;原 SDK/发送正文相同 | 读取与上下文导入可以分别观测;动作由校准器安排 |
27
+ | 原生 read-result 开关 | DSH 四成员、八请求 | 四项诊断通过;普通正文两边均发送;已知形状的合成凭据在开启时脱敏 | 已知敏感值规则不足以表达任意正文的发送许可 |
28
+ | 请求重建 | 五成员、七请求 | 受限通知重建与允许组诊断通过;整请求阻断为 NOT_RUN;两来源故障未定 | 来源完整时的固定通知可以保留部分任务效用 |
29
+ | 必要输入受限 | 六成员、十请求、十二次 Read | 允许两组诊断通过;受限两组正确说明输入不足;阻断两组 NOT_RUN;授权全部通过 | 必要输入、正常任务和许可遵守需要分账 |
30
+ | 多步历史 | 四成员、十六请求 | 受限两组三个历史消费阶段均投影;允许组诊断通过 | 当前串行装配能重新检查后续消费 |
31
+ | 干净父子来源任务 | 同版本两成员、十请求 | child 标签任务与授权通过;父允许组复述标签,受限组两次消费均投影并报告输入不足 | 接收者许可可独立于 child 自身发送许可 |
32
+
33
+ 这些正文授权与父子来源处理依赖私有 Lab 装配;公开包仍按
34
+ [能力矩阵](../guides/harness-capabilities.md)说明生产覆盖。
35
+ 任务从配置诊断变为随机标签时,判据也随任务独立冻结,不能合并为一种诊断能力。
36
+
37
+ ## 有限不可信内容对照
38
+
39
+ 10 月 13 日在父子主线上记录干净/不可信内容与业务策略开/关四成员,各五次请求,
40
+ 全部 HTTP 200。四组捕获均 READY,授权和父子标签任务均通过。
41
+ 来源检查在四成员中始终开启,外层合成资源范围保持相同;被测开关调整目标的运行时
42
+ 读取/发送准入,业务评分使用另外冻结的约束。关闭组仍处在有界实验环境中。
43
+ 两组不可信内容实际进入 child 的模型请求;父子均没有目标读取尝试、实际目标读取或
44
+ 目标内容发送,关闭策略的成员也同样安静。
45
+
46
+ 因此本轮只支持内容送达和声明范围内的行为观察,**没有触发真实政策阻断效果的测量**。
47
+ 脚本校准中的拒绝/允许阳性只证明相应机制可观察,不据此报告总体对抗成功率。
48
+ 开启组后续历史中出现了 child 对不可信内容的告警引用,未出现对应目标操作。
49
+ 标记引用、指令执行、目标读取和内容发送各自统计。单次模型表达差异不能归因于策略开关。
50
+ 公开稿省略诱导文本、目标具体位置和可执行故障探针。
51
+
52
+ ## 失败与未定结果
53
+
54
+ - 首轮父子实模出现十二次 HTTP 503,没有工具读取或 child spawn;结果为 INCONCLUSIVE。
55
+ SDK 在失败后仍重复尝试,后续私有 wrapper 增加首次 HTTP/fetch 失败停止,并用
56
+ 两宿主各一次合成 503 校准核对停点。
57
+ - 原 child 输出选择只接受纯文本,遇正常 reasoning+text 时停止;原未定结果保留。
58
+ 后续选择器保存完整原输出和根来源、只转发绑定正文,以新试次验证。
59
+ - 最新 Kimi 只读辅助两次响应均为 HTTP 200,但第二次没有最终正文,保持 INCONCLUSIVE。
60
+ 输入完整读取/发送已核对;输出预算耗尽或流中断的具体原因没有独立确认。
61
+ - 来源缺失、呈现漂移与记录矛盾的故障组保持 INCONCLUSIVE;后续正常对照不改写旧失败。
62
+ - 首次自然 observer 就绪超时的唯一根因仍未知,已修复的取消健康记账不替代该历史归因。
63
+
64
+ ## 公开材料与后续
65
+
66
+ 机器可读的[汇总数据](../research/lab-observations-2026-10.json)对应本稿的必要输入与最新
67
+ 父子四成员结果。它是去敏摘要,移除个人路径、私有网关、账户、会话、运行 ID 和原始内容。
68
+ 完整捕获与源码快照保留私有,公众不能仅凭这份摘要逐字节重放历史实模。
69
+
70
+ 公开的[四控制示例](../lab/blue-team-calibration.md)可以在 checkout 或包根目录复验
71
+ 已交付的零模型仪器。它不调用模型,也不复现上述私有授权层或父子适配器。
72
+ 方法细节见[研究导航](../research/README.md)。欢迎独立复现、宿主适配与防守 PR;
73
+ Lab 按小规模、明确预算逐步推进,不承诺固定发布节奏。
@@ -0,0 +1,41 @@
1
+ # 防守研究 / Blue-team research
2
+
3
+ 这里公开 Agent Guard 自身受控实验和实现评审的整理稿,重点是防护设计、证据采集、
4
+ 授权边界、正常任务效用与失败诊断。资料截至 2026-10-13,属于持续推进的实验研究。
5
+
6
+ These notes publish defensive methods and bounded observations from our own
7
+ controlled experiments. They describe provenance, disclosure permissions,
8
+ task utility and evidence failures. Research proceeds gradually; the public
9
+ examples and the historical real-model observations have different scopes.
10
+
11
+ | 文档 | 主要内容 |
12
+ |---|---|
13
+ | [数据流观察](dataflow-observability.md) | 区分读取、上下文导入、发送与接收,解释观察盲区 |
14
+ | [正文发送授权](content-authorization.md) | 本地读取与模型发送的独立许可、来源绑定和固定通知 |
15
+ | [父子代理来源](delegation-provenance.md) | 派生返回、接收者许可、实际呈现与历史再次消费 |
16
+ | [验证与评分](evaluation-method.md) | 分开评价证据健康、授权遵守、任务完成与输入一致性 |
17
+ | [阶段实验报告](../reports/blue-team-lab-2026-10.md) | 去敏后的方法、结果、失败与有限结论 |
18
+ | [汇总数据](lab-observations-2026-10.json) | 与阶段报告对应的匿名化观察摘要 |
19
+ | [零模型校准示例](../lab/blue-team-calibration.md) | 使用公开包复验已有四种仪器控制 |
20
+
21
+ ## 如何解读这些资料
22
+
23
+ 共享 Core 的已交付行为由[架构](../design/architecture.md)、
24
+ [兼容契约](../design/compatibility.md)和[能力矩阵](../guides/harness-capabilities.md)定义。
25
+ 研究稿中的正文授权、历史投影与父子来源处理是在特定私有 Lab 装配中验证的实验方法,
26
+ 尚未成为通用生产 guard 或受支持的新宿主接口。
27
+
28
+ 阶段报告保留不完整响应、来源故障与未触发的对照,公开整理不会把它们升级成成功。
29
+ 去敏稿不包含个人路径、私有网关配置、凭据存储、原始会话或可直接复用的诱导载荷。
30
+ 完整私有实模原件没有随稿公开;读者可以复验公开校准入口,并提交独立实验结果,
31
+ 不能仅凭这些摘要重放或逐字节核验历史实模。
32
+
33
+ ## 参与研究
34
+
35
+ 欢迎 fork、PR、方法评审和独立复现。我们不承诺固定实验频率或按期完成全部研究方向。
36
+ 贡献时记录代码版本、宿主版本、声明的模型配置、合成样本、预算、对照条件、
37
+ 观察范围、正常任务结果和失败记录。公开反馈以防守方法和必要的去敏证据为主;
38
+ 敏感细节按[贡献指南](../../CONTRIBUTING.md)协调。
39
+
40
+ 本文档采用项目 [MIT 许可证](../../LICENSE)。结论覆盖记录的试次和通路,不构成对任意
41
+ 模型、厂商、工具或同权限进程的安全认证。
@@ -0,0 +1,54 @@
1
+ # 普通正文的读取与发送授权
2
+
3
+ 记录日期:2026-10-13。状态:在私有、固定版本 Lab 中验证的防守方法,未接入通用生产策略。
4
+
5
+ ## 分别表达许可
6
+
7
+ 一次任务应由操作者预先确定资源、操作和接收者范围。
8
+
9
+ | 许可 | 意义 |
10
+ |---|---|
11
+ | 本地读取 | 当前角色是否可以通过声明入口读到这份资源 |
12
+ | 模型发送 | 该资源是否可以进入这个角色的所选模型请求 |
13
+ | 再次发送 | 内容或派生结果是否可以交给下一个接收者 |
14
+ | 指令权限 | 内容是否来自操作者批准的任务,而非普通文件或工具数据 |
15
+
16
+ `LOCAL_ONLY` 表示允许本地读取、保留原文,但模型请求中不发送内容。
17
+ `MODEL_ALLOWED` 表示在已声明接收者和通路内可以发送。明确排除目录优先于范围授权。
18
+ 文件可以包含说明文字,工具也可以返回结构化 JSON;这些形式本身不扩大操作或发送许可。
19
+
20
+ 这两个实验标签不是共享 Decision Protocol 的新决策类。生产 Core 继续使用
21
+ `ALLOW`、`SANITIZE`、`RELOCATE`、`SNAPSHOT`、`ASK`、`BLOCK`。
22
+
23
+ ## 绑定实际来源
24
+
25
+ 许可检查绑定准备契约、任务、资源路径、原始字节摘要、入口、实际执行对象、调用关联、
26
+ 模型配置和所选发送通路。资源摘要用于核对已准备的字节,不能单独充当许可凭证。
27
+ 一个文件的授权不能借给另一份内容,项目文件或模型自述也不能更新操作者契约。
28
+
29
+ 在发送前核对 SDK 原正文与来源视图。遇到未知来源、呈现漂移或缺失的调用关联时停止
30
+ 这个实验发送路径,评分保持 `INCONCLUSIVE`;不先删去矛盾再宣布检查通过。
31
+
32
+ ## 已知受限内容的固定通知
33
+
34
+ 对于来源完整、已知不能发送的工具正文,实验装配器可以保留本地原件,在模型请求中
35
+ 替换为固定的“内容保留本地”通知,并保持原工具调用关联。通知具有单独的宿主来源,
36
+ 记录替换关系;不附上原内容、原摘要、大小或随意生成的摘要。
37
+
38
+ 每次后续历史消费都从原始来源重新计算许可并投影。一次已经处理的请求不能使会话
39
+ 存储中的原文在下一轮自动获得发送许可。已批准的请求也再次核对实际正文、来源视图
40
+ 和替换记录,防止装配与发送之间发生漂移。
41
+
42
+ ## 效用与限制
43
+
44
+ 必要配置不能进入模型时,正常响应可以是明确的 `INSUFFICIENT_INPUT`。
45
+ 即使模型偶然猜中字段,也不能记成依据实际输入完成任务。整请求阻断则记为 `NOT_RUN`。
46
+ 授权遵守与正常任务完成分别评价,避免把拒绝全部工作计为诊断成功。
47
+
48
+ 该方法依赖合作的可信装配器与已登记资源,来源视图覆盖声明的串行请求。
49
+ 我们尚未验证任意摘要或编码变换、任意插件、所有接收账户、并发装配和同权限恶意程序。
50
+ 所选网关响应不能单独认证最终模型服务身份。
51
+
52
+ 已记录的五成员请求重建实验和六成员必要输入实验见
53
+ [阶段报告](../reports/blue-team-lab-2026-10.md);独立评分见
54
+ [验证与评分](evaluation-method.md)。