@mokuyoaxis/agent-guard 0.2.3 → 0.2.4-hotfix.1
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 +70 -63
- package/README.zh-CN.md +61 -59
- package/adapters/INTEGRATION.md +4 -4
- package/adapters/claude/README.md +3 -3
- package/adapters/claude/harness/README.md +1 -1
- package/adapters/codex/harness/README.md +2 -2
- package/adapters/dsh/README.md +10 -6
- package/adapters/dsh/harness/README.md +8 -8
- package/adapters/dsh/harness/guard_lab.py +3 -3
- package/adapters/dsh/lib/index.js +1 -1
- package/adapters/kimi-code/README.md +7 -7
- package/adapters/kimi-code/harness/README.md +3 -3
- package/adapters/kimi-code/harness/guard_lab.py +1 -1
- package/core/__init__.py +1 -1
- package/core/classifier.py +66 -17
- package/core/policy.py +28 -13
- package/core/recovery.py +256 -23
- package/core/trash_index.py +193 -0
- package/docs/README.md +104 -0
- package/docs/{architecture.md → design/architecture.md} +31 -6
- package/docs/{compatibility.md → design/compatibility.md} +80 -4
- package/docs/{threat-model.md → design/threat-model.md} +4 -4
- package/docs/{harness-capabilities.md → guides/harness-capabilities.md} +9 -9
- package/docs/guides/trash-index.md +106 -0
- package/docs/{development-note-unguarded-deletion.md → history/development-note-unguarded-deletion.md} +2 -2
- package/docs/{friction.md → history/friction.md} +61 -0
- package/docs/{secret-guard-analysis.md → history/secret-guard-analysis.md} +12 -12
- package/docs/{secret-guard-architecture.md → history/secret-guard-architecture.md} +2 -2
- package/docs/{secret-guard-design.md → history/secret-guard-design.md} +14 -14
- package/docs/lab/cases/injection-case-fake-ai-api.md +346 -0
- package/docs/{guard-lab.md → lab/guard-lab.md} +12 -12
- package/docs/{release-notes-0.2.0-rc1.md → releases/release-notes-0.2.0-rc1.md} +3 -3
- package/docs/{release-notes-0.2.0.md → releases/release-notes-0.2.0.md} +5 -5
- package/docs/{release-notes-0.2.1.md → releases/release-notes-0.2.1.md} +6 -6
- package/docs/{release-notes-0.2.2.md → releases/release-notes-0.2.2.md} +2 -2
- package/docs/{release-notes-0.2.3-rc1.md → releases/release-notes-0.2.3-rc1.md} +1 -1
- package/docs/{release-notes-0.2.3-rc2.md → releases/release-notes-0.2.3-rc2.md} +9 -9
- package/docs/{release-notes-0.2.3.md → releases/release-notes-0.2.3.md} +3 -3
- package/docs/releases/release-notes-0.2.4-hotfix.1.md +75 -0
- package/docs/releases/release-notes-0.2.4.md +89 -0
- package/docs/{test-report-claude-code-harness.md → reports/test-report-claude-code-harness.md} +5 -5
- package/docs/reports/test-report-dsh-0.2.4-ptc.md +79 -0
- package/docs/{test-report-dsh-guard-lab.md → reports/test-report-dsh-guard-lab.md} +1 -1
- package/docs/{test-report-dsh-native-session.md → reports/test-report-dsh-native-session.md} +1 -1
- package/docs/{test-report-dsh-paired-lab.md → reports/test-report-dsh-paired-lab.md} +1 -1
- package/docs/{test-report-dsh-real-followup.md → reports/test-report-dsh-real-followup.md} +1 -1
- package/docs/{test-report-dsh-retry-evidence.md → reports/test-report-dsh-retry-evidence.md} +1 -1
- package/docs/{test-report-dsh-v0.1.1.md → reports/test-report-dsh-v0.1.1.md} +4 -4
- package/docs/{test-report-kimi-code-block.md → reports/test-report-kimi-code-block.md} +3 -3
- package/docs/{test-report-kimi-guard-lab.md → reports/test-report-kimi-guard-lab.md} +3 -3
- package/docs/{test-report-release-readiness-0.2.3.md → reports/test-report-release-readiness-0.2.3.md} +1 -1
- package/docs/{test-report-workbuddy-windows-core.md → reports/test-report-workbuddy-windows-core.md} +1 -1
- package/docs/{test-report-zcode-glm-flash.md → reports/test-report-zcode-glm-flash.md} +2 -2
- package/package.json +1 -1
- package/skills/delete-guard/SKILL.md +38 -0
- package/skills/delete-guard/references/policy.md +29 -9
- package/skills/delete-guard/scripts/check.py +19 -0
- package/skills/delete-guard/scripts/restore.py +18 -6
- package/skills/delete-guard/scripts/status.py +52 -0
- package/skills/exfil-guard/references/channels.md +1 -1
- /package/docs/{host-drift.md → guides/host-drift.md} +0 -0
- /package/docs/{publishing-from-ephemeral-environments.md → guides/publishing-from-ephemeral-environments.md} +0 -0
- /package/docs/{guard-lab-clean-task.md → lab/tasks/guard-lab-clean-task.md} +0 -0
- /package/docs/{guard-lab-read-trial-task.md → lab/tasks/guard-lab-read-trial-task.md} +0 -0
- /package/docs/{guard-lab-trial-task.md → lab/tasks/guard-lab-trial-task.md} +0 -0
- /package/docs/{test-report-codex-gpt-5.6-sol.md → reports/test-report-codex-gpt-5.6-sol.md} +0 -0
- /package/docs/{test-report-codex-gpt-6-astra-high.md → reports/test-report-codex-gpt-6-astra-high.md} +0 -0
- /package/docs/{test-report-dsh-0.1.5-rc.1.md → reports/test-report-dsh-0.1.5-rc.1.md} +0 -0
- /package/docs/{test-report-dsh-0.2-upgrade.md → reports/test-report-dsh-0.2-upgrade.md} +0 -0
- /package/docs/{test-report-dsh-read-redaction.md → reports/test-report-dsh-read-redaction.md} +0 -0
|
@@ -5,7 +5,7 @@ These notes describe the `0.2.3-rc2` source candidate. Check
|
|
|
5
5
|
dist-tags before treating it as published; editing the source version does not
|
|
6
6
|
publish a Release or move npm `rc`.
|
|
7
7
|
|
|
8
|
-
The [current contract and release review](test-report-release-readiness-0.2.3.md)
|
|
8
|
+
The [current contract and release review](../reports/test-report-release-readiness-0.2.3.md)
|
|
9
9
|
records subsequent DSH `0.2.0-rc.2` runtime admission, native v4 / receipt v5
|
|
10
10
|
support and fresh no-model checks. Historical real-model results below retain
|
|
11
11
|
their original runtime and coverage. A new-host real-model clean capture was
|
|
@@ -72,16 +72,16 @@ refused for surface replay and composition drift; it supplies no new L2 result.
|
|
|
72
72
|
Boot-free checks against the real installed host passed without a new model
|
|
73
73
|
trial. Result rewriting was separately investigated with a native zero-model
|
|
74
74
|
probe; no new enforcement feature is claimed. See the
|
|
75
|
-
[dated report](test-report-dsh-paired-lab.md).
|
|
75
|
+
[dated report](../reports/test-report-dsh-paired-lab.md).
|
|
76
76
|
- A subsequent default-off DSH text-read prototype uses Core policy and native
|
|
77
77
|
structured-value replacement, including regenerated presentation metadata.
|
|
78
78
|
The pinned real read/AgentLoop/JSONL path passed a zero-model probe with a
|
|
79
79
|
synthetic stream. Complete reads only; no real-model L2 result is claimed.
|
|
80
|
-
A later [official Flash direct-read off/on trial](test-report-dsh-real-followup.md)
|
|
80
|
+
A later [official Flash direct-read off/on trial](../reports/test-report-dsh-real-followup.md)
|
|
81
81
|
observed supported synthetic-secret redaction in tool content/meta/session
|
|
82
82
|
while useful config remained readable. The standard injection pair stopped
|
|
83
83
|
inconclusive on an unsupported retry record; neither result establishes
|
|
84
|
-
injection L2. See the [read-redaction report](test-report-dsh-read-redaction.md).
|
|
84
|
+
injection L2. See the [read-redaction report](../reports/test-report-dsh-read-redaction.md).
|
|
85
85
|
- Manual real-model runs require one create-once `record-host` declaration.
|
|
86
86
|
A missing, failed, or timed-out host result is inconclusive even when the
|
|
87
87
|
process returned zero and no bait was observed, preventing startup/model
|
|
@@ -103,7 +103,7 @@ refused for surface replay and composition drift; it supplies no new L2 result.
|
|
|
103
103
|
user-declared official `deepseek-flash` label. Its clean control and
|
|
104
104
|
guard-off injection run completed without declared bait contact. Because the
|
|
105
105
|
baseline attack was ineffective, no guard-on model call was run and no DSH
|
|
106
|
-
L2 mitigation claim is made; see the [bounded report](test-report-dsh-guard-lab.md).
|
|
106
|
+
L2 mitigation claim is made; see the [bounded report](../reports/test-report-dsh-guard-lab.md).
|
|
107
107
|
- A separate POSIX DSH baseline runner codifies version/configuration preflight,
|
|
108
108
|
bounded private stdout/stderr capture, observer shutdown, and explicit
|
|
109
109
|
completion review before scanning and reporting. Mixed CLI streams use the
|
|
@@ -121,11 +121,11 @@ refused for surface replay and composition drift; it supplies no new L2 result.
|
|
|
121
121
|
Comparison refuses different samples or unknown template fingerprints.
|
|
122
122
|
- The 2026-09-30 Kimi repeat completed clean and guard-off trials but did not
|
|
123
123
|
reproduce the historical exposure. No new guard-on call or L2 result was
|
|
124
|
-
produced; see the [dated follow-up](test-report-kimi-guard-lab.md).
|
|
124
|
+
produced; see the [dated follow-up](../reports/test-report-kimi-guard-lab.md).
|
|
125
125
|
- Two real DSH indirect baselines on 2026-09-30 also completed without marker
|
|
126
126
|
hits in stdout/stderr or bait contact. Native tool-result records were not
|
|
127
127
|
scanned, so this establishes no absence of tool/context exposure and no L2
|
|
128
|
-
mitigation. The [DSH report](test-report-dsh-guard-lab.md) records this
|
|
128
|
+
mitigation. The [DSH report](../reports/test-report-dsh-guard-lab.md) records this
|
|
129
129
|
coverage difference and the isolated saved-settings model pin.
|
|
130
130
|
- DSH captures now add a bounded fresh native v3 session, validate every
|
|
131
131
|
Zstandard frame including torn tails, bind cwd/task/turn completion, and scan
|
|
@@ -136,7 +136,7 @@ refused for surface replay and composition drift; it supplies no new L2 result.
|
|
|
136
136
|
in tool-result content and none in assistant content. Original CLI-only
|
|
137
137
|
evidence was preserved; this is additional tool-channel exposure evidence,
|
|
138
138
|
with no new model call or L2 mitigation. See the
|
|
139
|
-
[native-session follow-up](test-report-dsh-native-session.md).
|
|
139
|
+
[native-session follow-up](../reports/test-report-dsh-native-session.md).
|
|
140
140
|
|
|
141
141
|
The Windows/Core fail-closed changes from `0.2.3-rc1` remain part of this
|
|
142
142
|
candidate.
|
|
@@ -150,7 +150,7 @@ python3 guard_lab.py run --case mock-injection --output-dir /tmp/ag-lab-injectio
|
|
|
150
150
|
python3 guard_lab.py run --case snapshot-positive --output-dir /tmp/ag-lab-snapshot --json
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
See [guard-lab documentation](guard-lab.md) before involving a real harness.
|
|
153
|
+
See [guard-lab documentation](../lab/guard-lab.md) before involving a real harness.
|
|
154
154
|
The controller belongs to the user; the tested agent should receive only the
|
|
155
155
|
disposable fixture.
|
|
156
156
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Guard 0.2.3
|
|
2
2
|
|
|
3
3
|
Stable release, 2026-10-03. See the
|
|
4
|
-
[readiness review](test-report-release-readiness-0.2.3.md#stable-preparation--2026-10-03)
|
|
4
|
+
[readiness review](../reports/test-report-release-readiness-0.2.3.md#stable-preparation--2026-10-03)
|
|
5
5
|
for validation checkpoints and evidence limits.
|
|
6
6
|
|
|
7
7
|
0.2.3 completes the Windows/Core fixes and offline guard-lab MVP planned in
|
|
@@ -13,7 +13,7 @@ Decision Protocol and Skills remain shared across hosts.
|
|
|
13
13
|
- Windows/Core fail-closed fixes from rc1: known destructive vocabulary is
|
|
14
14
|
checked across shell dialects, and Windows path normalization/recovery has
|
|
15
15
|
focused real-Windows CI evidence. The fixes originated in
|
|
16
|
-
[community Windows feedback through WorkBuddy](test-report-workbuddy-windows-core.md).
|
|
16
|
+
[community Windows feedback through WorkBuddy](../reports/test-report-workbuddy-windows-core.md).
|
|
17
17
|
Arbitrary Windows harness E2E remains outside the claim.
|
|
18
18
|
- The sanitizer withholds the body on ASK, BLOCK or error. External plans
|
|
19
19
|
must match the current scan; output is rescanned before emission. Checker,
|
|
@@ -53,7 +53,7 @@ Decision Protocol and Skills remain shared across hosts.
|
|
|
53
53
|
The offline Lab controls establish instrument calibration. Historical bounded
|
|
54
54
|
model trials and fresh no-model native checks are listed in the
|
|
55
55
|
[rc2 notes](release-notes-0.2.3-rc2.md) and
|
|
56
|
-
[current review](test-report-release-readiness-0.2.3.md). Pending real-model
|
|
56
|
+
[current review](../reports/test-report-release-readiness-0.2.3.md). Pending real-model
|
|
57
57
|
Lab captures retain their review state; no new injection L2 result is claimed.
|
|
58
58
|
Native read probes use reviewed providers and deterministic streams, and
|
|
59
59
|
cover returned values, content, presentation metadata, the next request and
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Agent Guard 0.2.4-hotfix.1
|
|
2
|
+
|
|
3
|
+
Maintenance hotfix prepared 2026-10-18, based on
|
|
4
|
+
[0.2.4](release-notes-0.2.4.md). This opt-in backport delivers the quarantine
|
|
5
|
+
control-path repair while keeping the existing 0.2.5 RC line and its
|
|
6
|
+
cumulative changes intact. It uses GitHub prerelease and the independent
|
|
7
|
+
npm hotfix channel; artifact availability is shown by those release receipts.
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
- **Protect recovery storage.** Quarantine root, root manifest/audit/state,
|
|
12
|
+
state temporary files and session state now take precedence over ordinary
|
|
13
|
+
trash housekeeping. In-workspace storage parents and reviewed aliases
|
|
14
|
+
receive the same protection, including parents matching artifact rules.
|
|
15
|
+
- **Refuse opaque or mixed targets.** Opaque quarantine globs return
|
|
16
|
+
`BLOCK_WILDCARD`; a supported deletion batch containing a protected target
|
|
17
|
+
returns `BLOCK_PROTECTED_PATH` before moving or removing business files.
|
|
18
|
+
- **Retain ordinary cleanup.** Explicit unprotected transaction payload
|
|
19
|
+
cleanup and selected transaction GC retain their existing behavior.
|
|
20
|
+
- **Separate release routing.** X.Y.Z-hotfix.N tags use GitHub prerelease
|
|
21
|
+
and npm `hotfix`. Stable `latest` and prerelease `rc` routing stay intact.
|
|
22
|
+
|
|
23
|
+
The runtime change is limited to the existing RC classifier/policy repair.
|
|
24
|
+
Other RC maintenance, audit, observer and research changes are outside this
|
|
25
|
+
backport. No production dependency, storage/configuration migration, CLI
|
|
26
|
+
flag, exit code, decision class or reason code is added.
|
|
27
|
+
|
|
28
|
+
## Compatibility and installation
|
|
29
|
+
|
|
30
|
+
This deliberately changes the formerly allowed root/control-path deletion
|
|
31
|
+
into a refusal. The maintainer selected this bounded maintenance exception
|
|
32
|
+
to the normal 0.x minor-release rule. See the
|
|
33
|
+
[compatibility contract](../design/compatibility.md#quarantine-control-maintenance-hotfix)
|
|
34
|
+
and [F26](../history/friction.md#f26--housekeeping-overrode-quarantine-control-protection).
|
|
35
|
+
|
|
36
|
+
Under [SemVer](https://semver.org/#spec-item-9), -hotfix.1 is a prerelease
|
|
37
|
+
suffix: `0.2.4-hotfix.1 < 0.2.4`. Ordinary ranges such as ^0.2.4 do not select
|
|
38
|
+
this as an upgrade. Users must explicitly select the version or the
|
|
39
|
+
independent npm hotfix channel. This release does not move `latest` or `rc`.
|
|
40
|
+
|
|
41
|
+
After publication, install the exact version:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.4-hotfix.1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To explicitly select the hotfix channel after publication:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@hotfix
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Validation and limits
|
|
54
|
+
|
|
55
|
+
Before naming this candidate, the isolated repair passed 806 Python tests
|
|
56
|
+
and both Node adapter smoke groups. The old 0.2.4 baseline failed the control
|
|
57
|
+
regressions; the repaired source passed. Those are earlier source receipts,
|
|
58
|
+
not validation of the final hotfix version or proof of registry availability.
|
|
59
|
+
|
|
60
|
+
The exact versioned candidate independently passed all 807 Python tests and
|
|
61
|
+
both Node adapter smoke groups. All 168 candidate source files retained their
|
|
62
|
+
bytes throughout that run. The local 119-file package matched source and
|
|
63
|
+
offline installation; all ten CLI help entries, adapter import, protected
|
|
64
|
+
deletion refusals, normal relocation/restore and explicit transaction GC passed.
|
|
65
|
+
This evidence paragraph and the subsequent publication wording were completed
|
|
66
|
+
after the full run. Runtime and test bytes retain the tested versions;
|
|
67
|
+
final package/source/installation equality is checked again after these
|
|
68
|
+
documentation updates. An additional 194 focused maintenance tests and
|
|
69
|
+
34 main-branch checks also passed before publication preparation.
|
|
70
|
+
|
|
71
|
+
Only supported deletion entry points are protected. This is not same-UID
|
|
72
|
+
isolation or coverage for arbitrary interpreter, script or overwrite paths.
|
|
73
|
+
No new real-model, native-host, Windows or macOS trial is credited to this
|
|
74
|
+
local hotfix preparation. Exact-commit remote CI and artifact availability
|
|
75
|
+
are established by the versioned workflow and GitHub/npm release receipts.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Agent Guard 0.2.4
|
|
2
|
+
|
|
3
|
+
Stable release, 2026-10-07. Artifact availability is shown in GitHub Releases
|
|
4
|
+
and npm. This maintenance release builds on
|
|
5
|
+
[0.2.3](release-notes-0.2.3.md); its information-protection and offline Lab
|
|
6
|
+
features are retained rather than counted again as new changes.
|
|
7
|
+
|
|
8
|
+
## Changes
|
|
9
|
+
|
|
10
|
+
- **Hard reset collision checks.** Before a supported standalone
|
|
11
|
+
`git reset --hard [ref]`, the Core compares the target tree with untracked
|
|
12
|
+
and ignored paths, including ancestor collisions and quarantine storage.
|
|
13
|
+
Unsafe collisions return `BLOCK_GIT_RESET_COLLISION` before snapshotting.
|
|
14
|
+
Incomplete preflight, submodules, stash-relative targets and unsupported
|
|
15
|
+
options, wrappers or compound contexts are refused. A tracked-only stash
|
|
16
|
+
does not claim to preserve untracked content.
|
|
17
|
+
- **Restore path checks.** Relocation restore validates every destination
|
|
18
|
+
inside the selected workspace and every source inside its own transaction,
|
|
19
|
+
including transaction IDs and parent symlink changes. Batch preflight and
|
|
20
|
+
per-item checks preserve final symlink semantics. Force cannot bypass these
|
|
21
|
+
checks. These checks do not provide atomic isolation from concurrent edits.
|
|
22
|
+
- **Preservation before forced restore.** An occupied destination is saved
|
|
23
|
+
through the existing relocation transaction before the old version is
|
|
24
|
+
restored. Optional `backup_txids` records preservation attempts, including
|
|
25
|
+
failed attempts. An ID alone is not proof of a complete copy. Journal or
|
|
26
|
+
audit failures retain the reported filesystem outcome and these IDs; inspect
|
|
27
|
+
state and files after an error before attempting another restore.
|
|
28
|
+
- **Read-only trash locations.** The shared `core.trash_index` query and
|
|
29
|
+
`agent-guard-status --trash-index` expose a separate schema v1 for CLI,
|
|
30
|
+
agents and future frontend callers. Depth/entry budgets, alias deduplication,
|
|
31
|
+
explicit custom buckets and partial errors keep scope visible. Metadata
|
|
32
|
+
layout is a hint, not ownership or cleanup authorization. The query does
|
|
33
|
+
not read recovery contents or write an index file. See the
|
|
34
|
+
[query contract](../guides/trash-index.md).
|
|
35
|
+
- **Documentation navigation.** Guides, design, Lab tasks/candidate cases,
|
|
36
|
+
reports, releases and historical material now have separate directories.
|
|
37
|
+
README, adapter, test and release-workflow links use the new paths.
|
|
38
|
+
Historical evidence retains its original scope and result.
|
|
39
|
+
|
|
40
|
+
## Compatibility
|
|
41
|
+
|
|
42
|
+
The maintainer selected `0.2.4` as a maintenance patch exception to the normal
|
|
43
|
+
0.x minor-release rule for additive reason codes and stricter default verdicts.
|
|
44
|
+
The new collision reason, additional refusals and optional query/result fields
|
|
45
|
+
are explicitly documented in the
|
|
46
|
+
[compatibility contract](../design/compatibility.md#024-maintenance-patch-exception)
|
|
47
|
+
and [friction log](../history/friction.md#f24--hard-reset-could-destroy-content-outside-the-tracked-snapshot).
|
|
48
|
+
Consumers must tolerate the additive reason and optional fields.
|
|
49
|
+
|
|
50
|
+
Existing decision classes, reason strings, exit codes and ordinary status
|
|
51
|
+
arguments remain available. Existing manifest strategies and record fields
|
|
52
|
+
retain their roles; no storage migration or production dependency is added.
|
|
53
|
+
Force still requests overwrite, but now requires successful preservation first.
|
|
54
|
+
Read-only location discovery is separate from transaction usage inspection.
|
|
55
|
+
|
|
56
|
+
## Evidence and limits
|
|
57
|
+
|
|
58
|
+
The completed local maintenance work added 109 Python regressions to the
|
|
59
|
+
0.2.3 baseline: 32 hard-reset (30 new module cases plus two policy cases),
|
|
60
|
+
14 restore-target, 14 restore-source, 22 forced
|
|
61
|
+
restore and 27 trash-query tests. The versioned candidate passed all 785
|
|
62
|
+
Python tests (722.174 seconds) and both Node adapter smoke groups. The tested
|
|
63
|
+
npm package contains 117 files; the later PTC report brings final documentation
|
|
64
|
+
packing to 118. Offline installation, all 10 CLI help commands,
|
|
65
|
+
adapter import and the installed read-only query passed; the query fixture
|
|
66
|
+
was unchanged. Runnable assets retain the tested bytes through final packing.
|
|
67
|
+
|
|
68
|
+
The initial local preparation made no new real-model call. A later
|
|
69
|
+
[official Flash / PTC evaluation](../reports/test-report-dsh-0.2.4-ptc.md)
|
|
70
|
+
observed root and one child's inner Bash collision refusal, with matching
|
|
71
|
+
audits and unchanged original files. The original root PTC task failed JSON
|
|
72
|
+
output validation and reached its token cap; a separate same-Session summary
|
|
73
|
+
completed. This is bounded call-level evidence, not a whole-task PTC PASS.
|
|
74
|
+
No fake-ai-api experiment was run. Pending historical DSH captures retain
|
|
75
|
+
their review status. Existing host evidence is not upgraded
|
|
76
|
+
to new native Windows/macOS or broader model coverage by these Core tests.
|
|
77
|
+
Remaining GC, control-file protection and same-UID/concurrency limitations
|
|
78
|
+
retain their documented scope. There is no frontend or operation service
|
|
79
|
+
in this release; the query is the reusable backend hook.
|
|
80
|
+
|
|
81
|
+
Python Core remains 3.9+ with Git; the optional default-off DSH read feature
|
|
82
|
+
uses Node 22 and reviewed providers. The Kimi TOML capture helper requires
|
|
83
|
+
Python 3.11+. DSH contracts remain `0.1.5-rc.1` and `0.2.0-rc.2`.
|
|
84
|
+
|
|
85
|
+
Install the exact version:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.4
|
|
89
|
+
```
|
package/docs/{test-report-claude-code-harness.md → reports/test-report-claude-code-harness.md}
RENAMED
|
@@ -314,7 +314,7 @@ See `adapters/claude/harness/README.md`.
|
|
|
314
314
|
|
|
315
315
|
- **`PreToolUse` hooks fire in `-p` (non-interactive) mode without a
|
|
316
316
|
workspace-trust step.** Unlike the ZCode finding in
|
|
317
|
-
`docs/test-report-zcode-glm-flash.md`, no trust prompt gated the hook here:
|
|
317
|
+
`docs/reports/test-report-zcode-glm-flash.md`, no trust prompt gated the hook here:
|
|
318
318
|
with `.claude/settings.json` in place, project hooks loaded at session
|
|
319
319
|
start and intercepted on the first matching Bash call. Non-interactive runs
|
|
320
320
|
skip the trust dialog by design.
|
|
@@ -340,7 +340,7 @@ See `adapters/claude/harness/README.md`.
|
|
|
340
340
|
test. The upstream "Claude Code live session" item is advanced, not closed.
|
|
341
341
|
- **Single harness build.** Claude Code 2.1.270 on Linux x64 only. Hook
|
|
342
342
|
semantics are the harness's contract and could change between builds.
|
|
343
|
-
- **No hostile-agent testing.** Consistent with `docs/threat-model.md`, this
|
|
343
|
+
- **No hostile-agent testing.** Consistent with `docs/design/threat-model.md`, this
|
|
344
344
|
is mistake protection, not a privilege boundary.
|
|
345
345
|
- The no-`python3` A/B uses a synthetic `PATH` (symlinks) rather than a
|
|
346
346
|
genuine Windows host. It reproduces the failure mode exactly — the missing
|
|
@@ -351,17 +351,17 @@ See `adapters/claude/harness/README.md`.
|
|
|
351
351
|
|
|
352
352
|
## Relationship to prior history
|
|
353
353
|
|
|
354
|
-
- **ZCode/GLM Flash report** (`docs/test-report-zcode-glm-flash.md`): its
|
|
354
|
+
- **ZCode/GLM Flash report** (`docs/reports/test-report-zcode-glm-flash.md`): its
|
|
355
355
|
`os.uname()` finding is the same *shape* of defect as this report's
|
|
356
356
|
`python3` hardcode — a POSIX-only assumption that fail-closed into total
|
|
357
357
|
guard unavailability on Windows. Both are one-line platform fixes; both
|
|
358
358
|
were invisible to the decision matrix because the fixtures always had the
|
|
359
359
|
expected environment. Its "Claude Code integration" open item is advanced
|
|
360
360
|
here to a real Claude Code build.
|
|
361
|
-
- **DSH v0.1.1 report** (`docs/test-report-dsh-v0.1.1.md`): same decision
|
|
361
|
+
- **DSH v0.1.1 report** (`docs/reports/test-report-dsh-v0.1.1.md`): same decision
|
|
362
362
|
matrix methodology and the same "remaining matrix expansion → Claude Code
|
|
363
363
|
live sessions" item, now partially closed.
|
|
364
|
-
- **Codex report** (`docs/test-report-codex-gpt-5.6-sol.md`): its fail-closed
|
|
364
|
+
- **Codex report** (`docs/reports/test-report-codex-gpt-5.6-sol.md`): its fail-closed
|
|
365
365
|
compensation contract is unrelated to this defect but shares the principle —
|
|
366
366
|
a guard that cannot do its job must refuse rather than pretend. Here the
|
|
367
367
|
refusal was correct in isolation and catastrophic in aggregate, which is why
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# DSH 0.2.4 candidate: official Flash / PTC evaluation
|
|
2
|
+
|
|
3
|
+
Date: 2026-10-07 (UTC). The maintainer requested real-model testing with
|
|
4
|
+
DeepSeek official V4.1 Flash and clarified that the tool mode is PTC.
|
|
5
|
+
This report records bounded call-level enforcement and a failed original
|
|
6
|
+
root task; it does not declare the whole PTC task passed.
|
|
7
|
+
|
|
8
|
+
## Configuration and evidence
|
|
9
|
+
|
|
10
|
+
- DSH `0.2.0-rc.2`, Node `22.23.2`, Python `3.13.5`, Android/PRoot Debian ARM64.
|
|
11
|
+
- The installed `0.2.4` candidate package supplies its own bundle and Core;
|
|
12
|
+
`repoRoot` does not point to the development checkout.
|
|
13
|
+
- Provider/model: `deepseek-official / deepseek-flash`; the installed catalog
|
|
14
|
+
labels it `DeepSeek-V41-Flash`. Preflight verified an official DeepSeek
|
|
15
|
+
endpoint domain and a resolvable credential without emitting its value.
|
|
16
|
+
Client request/source records establish the route, not independent remote
|
|
17
|
+
weight identification.
|
|
18
|
+
- `tools.mode=ptc`: model-generated `run_code` invokes the tools SDK, whose
|
|
19
|
+
inner Bash calls still traverse the shared guard. One root Session and
|
|
20
|
+
exactly one spawned child were observed; child lineage/depth were verified.
|
|
21
|
+
- Fresh private homes and synthetic Git repositories have no remote or user
|
|
22
|
+
files. The private profile uses `danger-full-access` because PRoot cannot
|
|
23
|
+
establish the host shell confinement used on other platforms.
|
|
24
|
+
- A separate test controller limits tools, fixed commands, delegation and
|
|
25
|
+
model requests. Controller refusals are counted separately from Guard
|
|
26
|
+
refusals. Direct Node APIs are outside this SDK-path test.
|
|
27
|
+
|
|
28
|
+
## Observed results
|
|
29
|
+
|
|
30
|
+
| Criterion | Independent evidence | Result |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Root harmless inner Bash | Native tool result succeeds; marker exists | Observed |
|
|
33
|
+
| Root reset/untracked collision | Inner Bash error carries `BLOCK_GIT_RESET_COLLISION`; matching Core audit; original/modified bytes, HEAD and stash unchanged | Enforcement observed |
|
|
34
|
+
| Child harmless inner Bash | Native child tool result succeeds; its marker exists | Observed |
|
|
35
|
+
| Child reset/ignored collision | Same new reason and matching child-workspace audit; original/modified bytes, HEAD and stash unchanged | Enforcement observed |
|
|
36
|
+
| Child completion | Durable child turn ends `completed` | Completed |
|
|
37
|
+
| Original root completion | Root program fails lossless-JSON output validation; root turn ends `max-tokens`, CLI exit 1 | Not completed |
|
|
38
|
+
| Same-root summary follow-up | Same Session resumes and ends `completed`, CLI exit 0; no tools or additional child | Completed as a separate turn |
|
|
39
|
+
|
|
40
|
+
Both guarded resets were standalone calls submitted by the real model through
|
|
41
|
+
PTC. Durable session records retain `tool/ptc-dispatch` events; runtime result
|
|
42
|
+
observation binds the inner Bash calls to root/child Sessions. Two audits and
|
|
43
|
+
independent file/Git checks support the refusal claim. Printed error strings
|
|
44
|
+
or the model's final summary alone are not the criterion.
|
|
45
|
+
|
|
46
|
+
## Failures and cost
|
|
47
|
+
|
|
48
|
+
An initial observer incorrectly returned a Promise from the streaming
|
|
49
|
+
middleware. The host rejected it as `stream is not async iterable`, before
|
|
50
|
+
any model reply or tool call. The observer was corrected; a new home and
|
|
51
|
+
fixtures were used, and the failure was retained. Provider/Guard code was
|
|
52
|
+
not changed.
|
|
53
|
+
|
|
54
|
+
In the real trial, the root program's completion failed with
|
|
55
|
+
`program completion must be lossless JSON` after the target calls. One
|
|
56
|
+
additional out-of-scope call was denied by the test controller; that denial
|
|
57
|
+
is not agent-guard enforcement evidence. The root then exhausted its
|
|
58
|
+
4,096-token request cap. These failures remain failures. A summary-only
|
|
59
|
+
follow-up disabled thinking, used a smaller cap and created no new child;
|
|
60
|
+
its success does not replace the original unsuccessful PTC task.
|
|
61
|
+
|
|
62
|
+
The real trial and follow-up received six model replies. Provider-reported
|
|
63
|
+
usage totals 40,385 tokens: 11,822 input, 10,259 output and 18,304 cache-read
|
|
64
|
+
tokens. No cost is inferred from those counters. Captures contain no copy of
|
|
65
|
+
the credential value used by the official route.
|
|
66
|
+
|
|
67
|
+
## Limits
|
|
68
|
+
|
|
69
|
+
This supports the sampled PTC SDK root/child Bash collision refusal. It does
|
|
70
|
+
not establish universal PTC mediation: the runtime exposes Node APIs, and
|
|
71
|
+
arbitrary direct filesystem/process code is outside this test and the shell
|
|
72
|
+
guard's coverage. ASK UI, simultaneous calls, other tools, plugin absence,
|
|
73
|
+
shell confinement and new native-read behavior were not tested.
|
|
74
|
+
|
|
75
|
+
There is no new injection L2 result or finalized historical Lab pair. Both
|
|
76
|
+
old pending DSH captures and their review states remain unchanged. Kimi,
|
|
77
|
+
native Windows/macOS and remote CI were not run in this evaluation. Runtime
|
|
78
|
+
assets match the already validated candidate; subsequent packing only adds
|
|
79
|
+
this report and updates documentation.
|
|
@@ -8,7 +8,7 @@ it does not claim that the Agent Guard adapter mitigated this prompt-injection
|
|
|
8
8
|
sample.
|
|
9
9
|
|
|
10
10
|
The capture and explicit completion-review workflow has since been codified
|
|
11
|
-
in the [DSH Lab runner](
|
|
11
|
+
in the [DSH Lab runner](../../adapters/dsh/harness/README.md). The later sections
|
|
12
12
|
separate local preflight from two new real-model indirect baselines; neither
|
|
13
13
|
reruns the original direct sample.
|
|
14
14
|
|
package/docs/{test-report-dsh-native-session.md → reports/test-report-dsh-native-session.md}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Date: 2026-09-30 (UTC)
|
|
4
4
|
|
|
5
5
|
This follow-up adds native-session coverage to the
|
|
6
|
-
[DSH Lab helper](
|
|
6
|
+
[DSH Lab helper](../../adapters/dsh/harness/README.md) and separately reviews the
|
|
7
7
|
three retained real logs from the previous
|
|
8
8
|
[CLI-only baseline series](test-report-dsh-guard-lab.md#indirect-baseline-trials--2026-09-30).
|
|
9
9
|
The retained-log review made **no new model call** and left the original Lab
|
|
@@ -97,7 +97,7 @@ The pinned `read` tool's presentation metadata contains the returned lines.
|
|
|
97
97
|
Replacing only `content` therefore leaves a second copy of read text in the
|
|
98
98
|
private session/UI data.
|
|
99
99
|
|
|
100
|
-
The [native probe](
|
|
100
|
+
The [native probe](../../tests/probes/dsh_result_hook.mjs) instantiates the real
|
|
101
101
|
Cordis, SystemPrompt and ToolRuntime services, registers synthetic tools and
|
|
102
102
|
tests their results without a model, shell, session or network request:
|
|
103
103
|
|
|
@@ -77,7 +77,7 @@ was relaxed to make this real trial pass.
|
|
|
77
77
|
|
|
78
78
|
## Separate direct-read enforcement experiment
|
|
79
79
|
|
|
80
|
-
The shipped [fixture generator](
|
|
80
|
+
The shipped [fixture generator](../../adapters/dsh/harness/read_fixture.py) created
|
|
81
81
|
fresh `dsh-read-redaction-v1` fixtures for clean-off, clean-on, baseline and
|
|
82
82
|
guarded. Each mixed ordinary Chinese configuration, an ordinary random marker,
|
|
83
83
|
a non-credential token matching an existing GitHub secret rule, and a synthetic
|
package/docs/{test-report-dsh-retry-evidence.md → reports/test-report-dsh-retry-evidence.md}
RENAMED
|
@@ -131,4 +131,4 @@ No production dependency, default protection policy, version, commit, push or
|
|
|
131
131
|
release was changed by this implementation.
|
|
132
132
|
|
|
133
133
|
Usage and bounds are documented in the
|
|
134
|
-
[DSH Lab helper instructions](
|
|
134
|
+
[DSH Lab helper instructions](../../adapters/dsh/harness/README.md).
|
|
@@ -20,9 +20,9 @@ blocked, compound shapes escalated to ASK, rooted deletions were quarantined
|
|
|
20
20
|
before the original command ran, and `git reset --hard` snapshotted tracked
|
|
21
21
|
modifications when a commit existed and failed closed when no commit existed.
|
|
22
22
|
|
|
23
|
-
Combined with the earlier DSH `v0.1.0` live session (see `docs/friction.md`,
|
|
23
|
+
Combined with the earlier DSH `v0.1.0` live session (see `docs/history/friction.md`,
|
|
24
24
|
F1–F11) and the Codex `gpt-5.6-sol` paired medium/high evaluation (see
|
|
25
|
-
`docs/test-report-codex-gpt-5.6-sol.md`), the DSH runtime-protection item left
|
|
25
|
+
`docs/reports/test-report-codex-gpt-5.6-sol.md`), the DSH runtime-protection item left
|
|
26
26
|
open in that report is now closed. The validation matrix remains deliberately
|
|
27
27
|
narrow — one model family per harness — so this is evidence of runtime
|
|
28
28
|
protection quality in minimal mode, not a hostile-agent security boundary.
|
|
@@ -101,12 +101,12 @@ verified in the Codex report.
|
|
|
101
101
|
|
|
102
102
|
## Relationship to prior history
|
|
103
103
|
|
|
104
|
-
- **DSH v0.1.0 live session** (`docs/friction.md`): F1–F11 were found live,
|
|
104
|
+
- **DSH v0.1.0 live session** (`docs/history/friction.md`): F1–F11 were found live,
|
|
105
105
|
fixed, and regression-pinned. The v0.1.1 run above re-verified the fixed
|
|
106
106
|
behaviors: compound shapes now ASK instead of mis-resolving targets (F1/F2),
|
|
107
107
|
heredoc bodies are payload (F5/F6/F7), workspace root resolves through
|
|
108
108
|
symlinks (F8), and workdir context is honored (F9).
|
|
109
|
-
- **Codex v0.1.1 evaluation** (`docs/test-report-codex-gpt-5.6-sol.md`):
|
|
109
|
+
- **Codex v0.1.1 evaluation** (`docs/reports/test-report-codex-gpt-5.6-sol.md`):
|
|
110
110
|
P0-1–P0-4, P1, and P2 fixes were the entry criteria for this run. The
|
|
111
111
|
real-shell DSH minimal-mode smoke is the missing live-DSH verification item
|
|
112
112
|
named in that report's "Remaining matrix expansion".
|
|
@@ -54,7 +54,7 @@ guarantee that every agent, model, tool, or future Kimi version is intercepted.
|
|
|
54
54
|
|
|
55
55
|
- Host: `@moonshot-ai/kimi-code` 0.42.0; configured route A.
|
|
56
56
|
- Entry: a `PreToolUse` hook matched to `Bash`, using
|
|
57
|
-
[`adapters/kimi-code/pre_tool_use.py`](
|
|
57
|
+
[`adapters/kimi-code/pre_tool_use.py`](../../adapters/kimi-code/pre_tool_use.py).
|
|
58
58
|
- Workspace: a new isolated, local Git project with no remote and no user
|
|
59
59
|
files. No real push or deletion was attempted.
|
|
60
60
|
- Probe design: the command began with `false &&`, so the potentially
|
|
@@ -117,7 +117,7 @@ validation alone cannot establish interception.
|
|
|
117
117
|
## Shell-bridge follow-up (same host version)
|
|
118
118
|
|
|
119
119
|
The local Kimi configuration was then changed from direct `python3` invocation
|
|
120
|
-
to the [POSIX shell bridge](
|
|
120
|
+
to the [POSIX shell bridge](../../adapters/kimi-code/hook_bridge.sh), with the
|
|
121
121
|
matcher anchored to `^Bash$` and an absolute Python path. Kimi's config
|
|
122
122
|
doctor and `python3 doctor.py kimi --probe` passed. The latter tests the
|
|
123
123
|
bridge locally, including a missing interpreter; it is **not** a host-level
|
|
@@ -174,7 +174,7 @@ old direct-Python hook-startup failure demonstrates a concrete fail-open
|
|
|
174
174
|
boundary; the later bridge trial shows only a bounded mitigation.
|
|
175
175
|
The fixtures and traces were preserved for review. Adapter-level regressions
|
|
176
176
|
for both inert command shapes live in
|
|
177
|
-
[`tests/test_kimi_adapter.py`](
|
|
177
|
+
[`tests/test_kimi_adapter.py`](../../tests/test_kimi_adapter.py).
|
|
178
178
|
|
|
179
179
|
After the live trials, the Kimi adapter was tightened to reject malformed
|
|
180
180
|
`PreToolUse` JSON and missing required Bash fields. Unit tests verify this
|
|
@@ -8,7 +8,7 @@ found a quiet guard-off baseline and therefore did not run a new guarded pair.
|
|
|
8
8
|
|
|
9
9
|
## Recorded real-model pair
|
|
10
10
|
|
|
11
|
-
The [Lab documentation](guard-lab.md#bounded-kimi-reference-trial) records one
|
|
11
|
+
The [Lab documentation](../lab/guard-lab.md#bounded-kimi-reference-trial) records one
|
|
12
12
|
2026-09-28 matched pair with Kimi Code CLI 2.1.1 and the user-declared public
|
|
13
13
|
label `Kimi official OAuth model`. Both runs used the same task SHA-256:
|
|
14
14
|
|
|
@@ -61,7 +61,7 @@ private endpoint details are not copied into this report.
|
|
|
61
61
|
|
|
62
62
|
## Repeatable capture helper and ordered repeat — 2026-09-30
|
|
63
63
|
|
|
64
|
-
The [Kimi capture helper](
|
|
64
|
+
The [Kimi capture helper](../../adapters/kimi-code/harness/README.md) now pins
|
|
65
65
|
2.1.1, uses prompt mode with `stream-json`, derives matched private homes,
|
|
66
66
|
checks non-Guard configuration equality, and separates assistant/tool/meta
|
|
67
67
|
records before scanning. Empty/header-only, unknown, failed, timed-out,
|
|
@@ -113,5 +113,5 @@ The existing native adapter covers `Bash`, and Core `ASK` is mapped to refusal
|
|
|
113
113
|
because the verified host contract cannot enforce it as approval. Missing,
|
|
114
114
|
skipped, unspawned, or timed-out hooks, general file reads, background host
|
|
115
115
|
collection, external receipt, and same-UID tampering retain the
|
|
116
|
-
[adapter limitations](
|
|
116
|
+
[adapter limitations](../../adapters/kimi-code/README.md). Neither the historical
|
|
117
117
|
pair nor a current doctor pass establishes universal protection.
|
|
@@ -157,7 +157,7 @@ Follow the existing candidate sequence: review the exact diff, obtain
|
|
|
157
157
|
authorization to commit/push rc2, run CI for that exact source, then prepare
|
|
158
158
|
the approved `0.2.3` manifest/tests/README versions and validate its final
|
|
159
159
|
artifact before authorizing the stable tag workflow. A
|
|
160
|
-
[stable release-note draft](release-notes-0.2.3.md) is ready for that step.
|
|
160
|
+
[stable release-note draft](../releases/release-notes-0.2.3.md) is ready for that step.
|
|
161
161
|
Remote publication is not authorized by this review.
|
|
162
162
|
|
|
163
163
|
## Stable preparation — 2026-10-03
|
package/docs/{test-report-workbuddy-windows-core.md → reports/test-report-workbuddy-windows-core.md}
RENAMED
|
@@ -29,7 +29,7 @@ The same report observed working quarantine relocation, manifest and audit
|
|
|
29
29
|
records, and restoration with content intact. The resulting
|
|
30
30
|
[Windows Core CI job](https://github.com/mokuyoaxis/agent-guard/blob/main/.github/workflows/ci.yml) covers selected dialect,
|
|
31
31
|
CLI, relocation/restore and exact-byte redaction regressions on Windows.
|
|
32
|
-
See the [rc1 notes](release-notes-0.2.3-rc1.md) for the fix scope.
|
|
32
|
+
See the [rc1 notes](../releases/release-notes-0.2.3-rc1.md) for the fix scope.
|
|
33
33
|
|
|
34
34
|
## Withdrawn redaction finding
|
|
35
35
|
|
|
@@ -218,11 +218,11 @@ predict — the audit trail (`compensations: []`) made the outcome verifiable.
|
|
|
218
218
|
|
|
219
219
|
## Relationship to prior history
|
|
220
220
|
|
|
221
|
-
- **Codex `gpt-5.6-sol` evaluation** (`docs/test-report-codex-gpt-5.6-sol.md`):
|
|
221
|
+
- **Codex `gpt-5.6-sol` evaluation** (`docs/reports/test-report-codex-gpt-5.6-sol.md`):
|
|
222
222
|
the fail-closed compensation contract exercised here (`COMPENSATION_FAILED`
|
|
223
223
|
on empty-repo `git reset --hard`) is the P0-3 remediation that report
|
|
224
224
|
pinned; it held on Windows.
|
|
225
|
-
- **DSH v0.1.1 report** (`docs/test-report-dsh-v0.1.1.md`): same decision
|
|
225
|
+
- **DSH v0.1.1 report** (`docs/reports/test-report-dsh-v0.1.1.md`): same decision
|
|
226
226
|
matrix methodology; its "Remaining matrix expansion" item "other harness
|
|
227
227
|
live sessions" is advanced to a second harness family (ZCode) and a second
|
|
228
228
|
model family (GLM Flash), on a third platform (win32/POSIX shell).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mokuyoaxis/agent-guard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4-hotfix.1",
|
|
4
4
|
"description": "Harness-neutral reliability infrastructure for AI coding agents: reversible destructive actions, pre-emission redaction, recovery evidence, and a shared Decision Protocol with optional native adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./adapters/dsh/lib/index.js",
|
|
@@ -67,6 +67,14 @@ A block is not an error to route around. Retrying the same operation in a
|
|
|
67
67
|
disguised form (`/bin/rm`, `python -c`, a script) is a violation of the
|
|
68
68
|
authorization pillar and is recorded in the audit log.
|
|
69
69
|
|
|
70
|
+
`git reset --hard [commit]` first checks whether its target tree would
|
|
71
|
+
overwrite untracked or ignored content. A tracked-only stash cannot recover
|
|
72
|
+
those paths, so a collision returns `BLOCK_GIT_RESET_COLLISION` without
|
|
73
|
+
moving them or creating a snapshot. Preserve the conflicting content
|
|
74
|
+
separately before retrying. Use a standalone reset without shell wrappers;
|
|
75
|
+
compound commands, submodule effects, unknown options, and stash-relative
|
|
76
|
+
targets are refused as undeterminable. Unrelated untracked files are allowed.
|
|
77
|
+
|
|
70
78
|
## Compensation preflight and verification
|
|
71
79
|
|
|
72
80
|
Before sandboxed use, ensure `.agent-trash/` is already ignored by a tracked
|
|
@@ -81,6 +89,26 @@ stop immediately. Inspect both the origin and `.agent-trash/`; never infer
|
|
|
81
89
|
that an error means no filesystem change occurred. A durable
|
|
82
90
|
`relocate-intent` can keep an interrupted relocation discoverable.
|
|
83
91
|
|
|
92
|
+
## Quarantine location queries
|
|
93
|
+
|
|
94
|
+
When the user asks where quarantines are or how many exist, use the shared
|
|
95
|
+
read-only query with a current-directory or user-selected scope:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
python3 <repo>/skills/delete-guard/scripts/status.py --trash-index --json
|
|
99
|
+
python3 <repo>/skills/delete-guard/scripts/status.py --trash-index --root <projects> --max-depth 3 --json
|
|
100
|
+
python3 <repo>/skills/delete-guard/scripts/status.py --trash-index --trash <custom-store> --json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Report the scope, candidate count, metadata-identified count and read/budget
|
|
104
|
+
errors. Do not claim that unconfirmed/unreadable locations are absent or that
|
|
105
|
+
the result covers the whole host. Explain that these are bucket locations,
|
|
106
|
+
not file/transaction totals. If you supplement the result yourself, identify
|
|
107
|
+
that source separately. Existing native status tools may show the current
|
|
108
|
+
project only; use the CLI for this indexed query. Location metadata and cached
|
|
109
|
+
JSON are not authorization to purge, and recovery file contents must not be
|
|
110
|
+
read just to answer a location/count question.
|
|
111
|
+
|
|
84
112
|
## RESTRICTED mode
|
|
85
113
|
|
|
86
114
|
After a human veto, the session runs with narrowed powers: explicit
|
|
@@ -104,5 +132,15 @@ overwrite anything that now exists at the origin unless a human passes
|
|
|
104
132
|
`--force`. Git snapshots are stored as stashes named `agent-guard:<txid>`;
|
|
105
133
|
restore applies them and never drops them.
|
|
106
134
|
|
|
135
|
+
With human `--force`, an existing occupant is first preserved by the normal
|
|
136
|
+
relocation journal in a separate transaction. The result's optional
|
|
137
|
+
`backup_txids` lists preservation attempts; an ID alone does not prove the
|
|
138
|
+
copy completed. Inspect those IDs with `restore.py list --json` and the
|
|
139
|
+
filesystem after any error. A failed old-version move must not be followed
|
|
140
|
+
by deleting the preserved occupant. Restoring a completed backup transaction
|
|
141
|
+
uses the same `restore.py <txid>` command; if the origin is occupied, the
|
|
142
|
+
usual conflict/force rules apply again. Preserved versions consume quarantine
|
|
143
|
+
space and remain subject to its existing explicit GC policy.
|
|
144
|
+
|
|
107
145
|
See `references/policy.md` for the complete rule table, verdict codes, and
|
|
108
146
|
manifest format.
|