@mokuyoaxis/agent-guard 0.2.2
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/CONTRIBUTING.md +101 -0
- package/LICENSE +21 -0
- package/README.md +558 -0
- package/README.zh-CN.md +488 -0
- package/adapters/INTEGRATION.md +94 -0
- package/adapters/claude/README.md +141 -0
- package/adapters/claude/compatibility.json +17 -0
- package/adapters/claude/harness/README.md +59 -0
- package/adapters/claude/harness/mock_anthropic_api.mjs +47 -0
- package/adapters/claude/harness/run_scenario.sh +79 -0
- package/adapters/claude/harness/run_scenario_no_python3.sh +49 -0
- package/adapters/claude/hook_bridge.sh +33 -0
- package/adapters/claude/pre_tool_use.py +264 -0
- package/adapters/claude/settings.example.json +16 -0
- package/adapters/codex/harness/README.md +53 -0
- package/adapters/codex/harness/acceptance.py +226 -0
- package/adapters/dsh/README.md +62 -0
- package/adapters/dsh/cordis.patch.yml +30 -0
- package/adapters/dsh/lib/index.js +500 -0
- package/adapters/kimi-code/README.md +169 -0
- package/adapters/kimi-code/compatibility.json +17 -0
- package/adapters/kimi-code/config.example.toml +26 -0
- package/adapters/kimi-code/hook_bridge.sh +32 -0
- package/adapters/kimi-code/pre_tool_use.py +72 -0
- package/core/__init__.py +47 -0
- package/core/audit.py +86 -0
- package/core/classifier.py +1175 -0
- package/core/dialects.py +898 -0
- package/core/policy.py +817 -0
- package/core/recovery.py +700 -0
- package/core/redaction.py +1096 -0
- package/core/safe_view.py +212 -0
- package/docs/architecture.md +223 -0
- package/docs/compatibility.md +142 -0
- package/docs/development-note-unguarded-deletion.md +187 -0
- package/docs/friction.md +266 -0
- package/docs/harness-capabilities.md +72 -0
- package/docs/host-drift.md +142 -0
- package/docs/publishing-from-ephemeral-environments.md +104 -0
- package/docs/release-notes-0.2.0-rc1.md +46 -0
- package/docs/release-notes-0.2.0.md +72 -0
- package/docs/release-notes-0.2.1.md +78 -0
- package/docs/release-notes-0.2.2.md +120 -0
- package/docs/secret-guard-analysis.md +416 -0
- package/docs/secret-guard-architecture.md +93 -0
- package/docs/secret-guard-design.md +649 -0
- package/docs/test-report-claude-code-harness.md +462 -0
- package/docs/test-report-codex-gpt-5.6-sol.md +335 -0
- package/docs/test-report-codex-gpt-6-astra-high.md +129 -0
- package/docs/test-report-dsh-0.1.5-rc.1.md +84 -0
- package/docs/test-report-dsh-v0.1.1.md +126 -0
- package/docs/test-report-kimi-code-block.md +198 -0
- package/docs/test-report-zcode-glm-flash.md +241 -0
- package/docs/threat-model.md +44 -0
- package/doctor.py +756 -0
- package/live_sentinel.py +339 -0
- package/package.json +69 -0
- package/skills/delete-guard/SKILL.md +109 -0
- package/skills/delete-guard/agents/openai.yaml +4 -0
- package/skills/delete-guard/references/policy.md +161 -0
- package/skills/delete-guard/scripts/_bootstrap.py +8 -0
- package/skills/delete-guard/scripts/check.py +370 -0
- package/skills/delete-guard/scripts/gc.py +103 -0
- package/skills/delete-guard/scripts/restore.py +98 -0
- package/skills/delete-guard/scripts/safe_delete.py +256 -0
- package/skills/delete-guard/scripts/status.py +130 -0
- package/skills/exfil-guard/SKILL.md +143 -0
- package/skills/exfil-guard/agents/openai.yaml +4 -0
- package/skills/exfil-guard/references/channels.md +58 -0
- package/skills/exfil-guard/references/rules.md +194 -0
- package/skills/exfil-guard/scripts/_bootstrap.py +8 -0
- package/skills/exfil-guard/scripts/check_span.py +250 -0
- package/skills/exfil-guard/scripts/sanitize.py +155 -0
- package/skills/exfil-guard/scripts/view.py +44 -0
- package/skills/recovery-audit/SKILL.md +283 -0
- package/skills/recovery-audit/agents/openai.yaml +4 -0
- package/skills/recovery-audit/references/evidence-records.md +85 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Publishing to GitHub from ephemeral environments
|
|
2
|
+
|
|
3
|
+
A field guide for pushing a repository from a sandbox, container, or cloud
|
|
4
|
+
agent workspace - written from a live session where every step was exercised.
|
|
5
|
+
Your computer is broken; your project still ships.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
sandbox workspace ──▶ deploy key (repo-scoped, revocable)
|
|
11
|
+
│ +
|
|
12
|
+
├─ bundle backup fingerprint-pinned known_hosts
|
|
13
|
+
▼ +
|
|
14
|
+
GitHub ◀────────────── GIT_SSH_COMMAND (IPv4 forced)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 1. Use a deploy key, not an account key
|
|
18
|
+
|
|
19
|
+
A private key living in an ephemeral environment is a consumable, not an
|
|
20
|
+
asset. Scope the blast radius:
|
|
21
|
+
|
|
22
|
+
- **Deploy key** binds to ONE repository. Leaked = one repo exposed,
|
|
23
|
+
revocable independently in the repo's Settings → Deploy keys.
|
|
24
|
+
- An account-level SSH key exposes EVERY repository you own.
|
|
25
|
+
|
|
26
|
+
Generate inside the workspace boundary:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
mkdir -p .deploy-keys && chmod 700 .deploy-keys
|
|
30
|
+
ssh-keygen -t ed25519 -f .deploy-keys/id_ed25519 -N "" \
|
|
31
|
+
-C "user/repo deploy key (sandbox)"
|
|
32
|
+
chmod 600 .deploy-keys/id_ed25519
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
No passphrase keeps non-interactive pushes working; compensating controls
|
|
36
|
+
are the tiny scope and instant revocation. (A passphrase would require
|
|
37
|
+
interactive pushes or ssh-agent - pick deliberately.)
|
|
38
|
+
|
|
39
|
+
## 2. Pin the host fingerprint - never trust-on-first-use
|
|
40
|
+
|
|
41
|
+
Fetch GitHub's official fingerprints from their meta endpoint and compare
|
|
42
|
+
against the live handshake BEFORE writing known_hosts:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
curl -s https://api.github.com/meta | python3 -c \
|
|
46
|
+
"import json,sys;print(json.load(sys.stdin)['ssh_key_fingerprints']['ed25519'])"
|
|
47
|
+
ssh-keyscan -t ed25519 github.com 2>/dev/null | ssh-keygen -lf -
|
|
48
|
+
# both must print: SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
|
|
49
|
+
ssh-keyscan -t ed25519 github.com 2>/dev/null > .deploy-keys/known_hosts
|
|
50
|
+
chmod 600 .deploy-keys/known_hosts
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 3. Push through GIT_SSH_COMMAND (no ~/.ssh needed)
|
|
54
|
+
|
|
55
|
+
Everything stays inside the workspace boundary - no writes outside it:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
export GIT_SSH_COMMAND='ssh -4 -i .deploy-keys/id_ed25519 \
|
|
59
|
+
-o UserKnownHostsFile=.deploy-keys/known_hosts -o IdentitiesOnly=yes'
|
|
60
|
+
git remote add origin git@github.com:user/repo.git
|
|
61
|
+
git push -u origin main
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Field notes from a real session:
|
|
65
|
+
|
|
66
|
+
- **Force IPv4 (`-4`).** Dual-stack environments occasionally fail host-key
|
|
67
|
+
verification over IPv6 while IPv4 works; the flake costs minutes.
|
|
68
|
+
- If a push fails transiently ("repository exists" style errors), simply
|
|
69
|
+
retry - the second attempt carried what the first dropped.
|
|
70
|
+
- `ssh -T git@github.com` always exits 1 even on success; read the
|
|
71
|
+
greeting. Deploy keys greet as `Hi user/repo!`.
|
|
72
|
+
|
|
73
|
+
## 4. On the GitHub side (do these yourself - account operations)
|
|
74
|
+
|
|
75
|
+
1. Create the repository EMPTY: no README, no .gitignore, no license -
|
|
76
|
+
anything initialized will diverge from your local history.
|
|
77
|
+
2. Repo → Settings → Deploy keys → Add deploy key → paste the `.pub`
|
|
78
|
+
content → **check "Allow write access"** (default is read-only).
|
|
79
|
+
3. Settings → Emails → enable both privacy checkboxes so a misconfigured
|
|
80
|
+
future commit cannot leak your real address.
|
|
81
|
+
|
|
82
|
+
## 5. Back up before rewriting anything
|
|
83
|
+
|
|
84
|
+
Before identity rewrites or force operations, snapshot all refs:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git bundle create ../backup.bundle --all
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Restore later with `git clone backup.bundle restored/`. Keep the bundle
|
|
91
|
+
outside the repository directory.
|
|
92
|
+
|
|
93
|
+
## 6. Identity hygiene
|
|
94
|
+
|
|
95
|
+
Use GitHub's noreply address (`ID+username@users.noreply.github.com`) in
|
|
96
|
+
commits - it becomes permanently public in every commit. Rewriting identity
|
|
97
|
+
before first push is safe; after push it means force-push coordination.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
*This document exists because agent-guard itself blocked its own maintainer
|
|
102
|
+
twice while being published from a sandbox - once correctly (the boundary),
|
|
103
|
+
once due to a parser bug (F5/F6). Both are why the guide prefers adapting
|
|
104
|
+
operations to fit boundaries over weakening them.*
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 0.2.0-rc1 source-preview notes
|
|
2
|
+
|
|
3
|
+
The `0.2.0-rc1` Git tag is a **source preview**. It is not a GitHub Release,
|
|
4
|
+
an npm package, a security sandbox, or a claim of universal tool interception.
|
|
5
|
+
Those distribution steps remain separate maintainer decisions.
|
|
6
|
+
|
|
7
|
+
## What changed since 0.1.1
|
|
8
|
+
|
|
9
|
+
- A harness-neutral Python Core and Decision Protocol now support shell
|
|
10
|
+
dialect selection (`posix`, `cmd`, `powershell`) and fail closed on unknown
|
|
11
|
+
selectors. Windows logic is unit-tested; real Windows host E2E is open.
|
|
12
|
+
- Delete-guard's compensation, transaction, GC, command segmentation and
|
|
13
|
+
hard-refusal handling have additional incident regressions.
|
|
14
|
+
- Exfil-guard provides a cooperative CLI for text-span inspection and
|
|
15
|
+
channel-specific allow/sanitize/ask/block decisions. It does not hook every
|
|
16
|
+
file read, upload or model-context path.
|
|
17
|
+
- Recovery-audit provides a Skill and evidence schemas for rebuilding a
|
|
18
|
+
project from surviving Git, AI-session and cache material. It cannot
|
|
19
|
+
recover bytes for which no copy survives.
|
|
20
|
+
- Claude Code and DSH adapters, Codex/ZCode Skill/CLI evaluations, and the
|
|
21
|
+
bounded Kimi Code 0.42.0 hook observations are documented separately in
|
|
22
|
+
the [harness capability matrix](harness-capabilities.md).
|
|
23
|
+
|
|
24
|
+
## Known limits and release gates
|
|
25
|
+
|
|
26
|
+
- Kimi Code's `ASK` hook response is not an approval prompt in the tested
|
|
27
|
+
version; the adapter denies such calls. Its real-host execution-level
|
|
28
|
+
`BLOCK` remains unproved. Two `local/kimi-k3` sandboxes established only
|
|
29
|
+
the sampled root/subagent hook and compensation paths.
|
|
30
|
+
- DSH 0.1.5-rc.1 has adapter-level smoke tests but not a completed real-host
|
|
31
|
+
plugin-load and denied-command sentinel trial. The older DSH v0.1.1 report
|
|
32
|
+
does not substitute for current-version evidence.
|
|
33
|
+
- Codex has no native interception adapter in this repository. Its Skill/CLI
|
|
34
|
+
acceptance driver needs an explicit checkout path and does not prove
|
|
35
|
+
automatic interception.
|
|
36
|
+
- Native adapters cover their listed shell tools, not all filesystem,
|
|
37
|
+
network or subagent paths. No claim is made against a malicious same-UID
|
|
38
|
+
harness, deliberate bypass, or arbitrary prompt injection.
|
|
39
|
+
- Original Secret Guard safe config view/edit, general audit redaction,
|
|
40
|
+
trusted read interception and the proposed offline guard-lab are not in
|
|
41
|
+
this candidate.
|
|
42
|
+
- The npm root manifest remains private; its current package selection is
|
|
43
|
+
DSH-oriented and is **not** a complete harness-neutral distribution.
|
|
44
|
+
|
|
45
|
+
See the [compatibility contract](compatibility.md) and
|
|
46
|
+
[threat model](threat-model.md) before treating any host as protected.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Agent Guard 0.2.0 — GitHub Release notes
|
|
2
|
+
|
|
3
|
+
These notes describe the `0.2.0` source. See
|
|
4
|
+
[GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) for
|
|
5
|
+
publication status. The `0.2.0-rc1` and `0.2.0-rc2` tags were source
|
|
6
|
+
previews; npm publication is a separate decision.
|
|
7
|
+
|
|
8
|
+
## What 0.2.0 brings
|
|
9
|
+
|
|
10
|
+
- A harness-neutral Python Core and Decision Protocol for recoverable
|
|
11
|
+
destructive actions. Supported file deletion can relocate targets to
|
|
12
|
+
`.agent-trash/`; supported destructive Git operations can take a snapshot
|
|
13
|
+
before proceeding. Unrecoverable or indeterminate effects are refused.
|
|
14
|
+
- Stronger incident regressions for transaction IDs, GC, command boundaries,
|
|
15
|
+
protected paths, and hard refusals. Shell classification has opt-in `cmd`
|
|
16
|
+
and PowerShell dialects alongside POSIX; real Windows host end-to-end
|
|
17
|
+
coverage is still open.
|
|
18
|
+
- `exfil-guard` text CLI: a cooperative pre-emission check for known credential
|
|
19
|
+
shapes and host-identifying paths, with channel-specific decisions and a
|
|
20
|
+
redaction plan for the caller to apply. It does not own arbitrary output
|
|
21
|
+
channels or transparently intercept model traffic.
|
|
22
|
+
- An explicit, read-only safe view for selected JSON and strict single-line
|
|
23
|
+
dotenv configs. It returns structure, types, and `set`/`empty` state rather
|
|
24
|
+
than scalar values, and refuses unsafe paths/files and unsupported formats.
|
|
25
|
+
This is **new since `0.2.0-rc2`**. It does not stop a harness from reading
|
|
26
|
+
the original file by another route; unknown secret-bearing field names
|
|
27
|
+
may still be visible. Never write the view back over the configuration.
|
|
28
|
+
- A `recovery-audit` Skill for evidence-led reconstruction after accidental
|
|
29
|
+
deletion. It can organize surviving Git, sessions, and caches; it cannot
|
|
30
|
+
recreate bytes that have no surviving copy.
|
|
31
|
+
|
|
32
|
+
## Integration evidence and limits
|
|
33
|
+
|
|
34
|
+
The [harness capability matrix](harness-capabilities.md) separates CLI use,
|
|
35
|
+
adapter tests, observed hooks, and observed execution-level enforcement.
|
|
36
|
+
Claude Code has a bounded real CLI/hook test with a scripted model endpoint.
|
|
37
|
+
DSH 0.1.5-rc.1 has adapter smoke tests, not a confirmed current-version
|
|
38
|
+
plugin-load and rejected-execution trial. Kimi Code 0.42.0 has two isolated
|
|
39
|
+
`local/kimi-k3` sandboxes showing sampled hook and compensation paths,
|
|
40
|
+
including sampled subagents; execution-level `BLOCK` remains unproven. In
|
|
41
|
+
that Kimi version, `ASK` is mapped to a hard refusal, not an approval prompt.
|
|
42
|
+
Codex and ZCode evidence covers cooperative Skill/CLI use, not native
|
|
43
|
+
interception in this repository.
|
|
44
|
+
|
|
45
|
+
Agent Guard is not a sandbox against a malicious agent or harness with the
|
|
46
|
+
same OS privileges. A hook can govern only calls that reach it. No-hook
|
|
47
|
+
channels, untested tools or versions, arbitrary subagents, hidden harness
|
|
48
|
+
uploads, and general prompt-injection resistance are **not** release claims.
|
|
49
|
+
See the [threat model](threat-model.md) and
|
|
50
|
+
[compatibility contract](compatibility.md).
|
|
51
|
+
|
|
52
|
+
New `check.py` results, audit events, and compensation metadata replace the
|
|
53
|
+
raw command with `<redacted>` and carry a `check_id` for correlation. Its
|
|
54
|
+
agent-visible result omits raw policy notes and dynamic exception text;
|
|
55
|
+
`status --json` also masks free-form fields in legacy audit records. This
|
|
56
|
+
does **not** rewrite historical append-only records or recovery manifests:
|
|
57
|
+
older local files may still contain commands, and recovery metadata must
|
|
58
|
+
retain target paths to restore them. The original command can also appear
|
|
59
|
+
in the harness's own logs or process arguments outside Agent Guard's control.
|
|
60
|
+
Review local evidence before sharing it, and do not put credentials in
|
|
61
|
+
command arguments.
|
|
62
|
+
|
|
63
|
+
The offline `guard-lab` honeytoken experiment, comprehensive audit/output
|
|
64
|
+
redaction, trusted file-read interception, and universal harness adaptation
|
|
65
|
+
are future work. The root npm manifest remains private and DSH-oriented as
|
|
66
|
+
an entry point; this GitHub Release is **not** an npm package announcement.
|
|
67
|
+
|
|
68
|
+
## Start here
|
|
69
|
+
|
|
70
|
+
Use the [quick start](../README.md#quick-start-with-your-coding-agent) and
|
|
71
|
+
the [adapter matrix](harness-capabilities.md). Configure only the entry path
|
|
72
|
+
your host actually supports, then verify it with harmless, bounded probes.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Agent Guard 0.2.1 — source and release notes
|
|
2
|
+
|
|
3
|
+
These notes describe the `0.2.1` source. Check
|
|
4
|
+
[GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) for
|
|
5
|
+
publication status; a version in the repository does not by itself mean a
|
|
6
|
+
tag or Release has been published. The root npm manifest remains private.
|
|
7
|
+
|
|
8
|
+
## What changed since 0.2.0
|
|
9
|
+
|
|
10
|
+
- Claude Code and Kimi Code now have POSIX shell bridges in their documented
|
|
11
|
+
hook commands. When the bridge starts, it converts a sampled pre-adapter
|
|
12
|
+
Python startup failure into a refusal instead of silently allowing that
|
|
13
|
+
call. The host must still load and run the bridge for this to help.
|
|
14
|
+
- Kimi Code 0.42.0 keeps its host-specific `ASK` → hard-refusal mapping;
|
|
15
|
+
malformed Kimi and Claude `PreToolUse` payloads are refused once their
|
|
16
|
+
adapters run. The shared Core policy remains harness-neutral.
|
|
17
|
+
- `doctor.py kimi|claude [--config PATH] [--probe] [--json]` checks one selected
|
|
18
|
+
configuration file and can run harmless local bridge/adapter probes without
|
|
19
|
+
a model call. It reports `configuration`, `local_probe`, and
|
|
20
|
+
`host_interception` separately. The last is always `UNVERIFIED`:
|
|
21
|
+
a local PASS does not establish that a running host loaded the hook.
|
|
22
|
+
- The [README integration matrix](../README.md#integration-and-validation-matrix)
|
|
23
|
+
links each documented host path and its tested-version boundary. The
|
|
24
|
+
[unlisted-host guide](../adapters/INTEGRATION.md) gives an agent a safe
|
|
25
|
+
self-adaptation and evidence checklist, not automatic support.
|
|
26
|
+
- POSIX command classification no longer loses destructive operations behind
|
|
27
|
+
common wrappers and options such as `env`, `sudo`, `nice`, `xargs`, or Git
|
|
28
|
+
global options. Shell substitution and scripts piped to an interpreter fail
|
|
29
|
+
closed when their effects cannot be enumerated. Repository-changing Git
|
|
30
|
+
options such as `-C`, `-c`, `--git-dir`, and `--work-tree` are refused
|
|
31
|
+
instead of applying compensation to a possibly different repository.
|
|
32
|
+
- DSH's model-facing restore tool can only perform a non-overwriting restore.
|
|
33
|
+
The destructive `--force` path remains available only through the explicit
|
|
34
|
+
human CLI and is no longer exposed in the model tool schema.
|
|
35
|
+
- Enforced ASK and mutation-capable ALLOW paths now require a durable audit
|
|
36
|
+
intent before authorization. Audit failure blocks execution; partial
|
|
37
|
+
compensation reports a transaction id and bounded status/count fields so
|
|
38
|
+
the user can locate and restore already-moved content.
|
|
39
|
+
|
|
40
|
+
## Evidence and limits
|
|
41
|
+
|
|
42
|
+
The [Claude report](test-report-claude-code-harness.md) covers real CLI/hook
|
|
43
|
+
sessions on 2.1.270 and 2.1.273 with a scripted model endpoint, including
|
|
44
|
+
sampled allow/block/ask and interpreter-failure paths. It is not a real
|
|
45
|
+
Claude-model or Windows startup-failure test.
|
|
46
|
+
|
|
47
|
+
The [Kimi report](test-report-kimi-code-block.md) covers Kimi Code 0.42.0
|
|
48
|
+
and bounded root/single-child Bash refusals, recoverable deletion/restore,
|
|
49
|
+
ASK denial, and a pre-adapter Python-failure trial. Two request model IDs
|
|
50
|
+
were sampled; backend identity and future versions are not guaranteed.
|
|
51
|
+
Two same-turn child calls were observed but did not exercise simultaneous
|
|
52
|
+
hook execution.
|
|
53
|
+
|
|
54
|
+
`doctor` checks selected file shape, not effective merged settings or a live
|
|
55
|
+
session. Hook absence, matcher mismatch, bridge-spawn failure, host timeout,
|
|
56
|
+
other tools, and arbitrary subagents remain outside the demonstrated
|
|
57
|
+
fail-closed boundary. A malicious model or harness with the same OS
|
|
58
|
+
privileges can bypass this reliability layer. DSH 0.1.5-rc.1 still lacks a
|
|
59
|
+
confirmed current-version plugin-load and execution-level refusal trial;
|
|
60
|
+
real Windows host end-to-end coverage is also open. See the
|
|
61
|
+
[capability matrix](harness-capabilities.md) and [threat model](threat-model.md).
|
|
62
|
+
The optional Kimi doctor needs Python 3.11+ for TOML parsing; the Core and
|
|
63
|
+
hook adapter continue to support Python 3.9+.
|
|
64
|
+
|
|
65
|
+
The offline `guard-lab` honeytoken experiment, universal native-hook
|
|
66
|
+
adaptation, comprehensive output/audit redaction, and a public npm package
|
|
67
|
+
are **not** part of 0.2.1.
|
|
68
|
+
|
|
69
|
+
## Verification and start point
|
|
70
|
+
|
|
71
|
+
The local source passes `npm test`: 415 Python tests plus the DSH adapter
|
|
72
|
+
smoke test. This is regression evidence, not a substitute for the bounded
|
|
73
|
+
real-host observations above or CI on the published commit.
|
|
74
|
+
|
|
75
|
+
Use the [quick start](../README.md#quick-start-with-your-coding-agent),
|
|
76
|
+
then follow the adapter guide for your actual host and version. Do not use a
|
|
77
|
+
destructive command to test installation. Report both the protected path
|
|
78
|
+
and the unverified paths to the user.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Agent Guard 0.2.2 — source and release notes
|
|
2
|
+
|
|
3
|
+
These notes describe the `0.2.2` source candidate. Check
|
|
4
|
+
[GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) and the
|
|
5
|
+
npm registry independently: a version in this repository is not proof that a
|
|
6
|
+
GitHub Release or npm package has been published.
|
|
7
|
+
|
|
8
|
+
## Host drift and live evidence
|
|
9
|
+
|
|
10
|
+
- `doctor.py kimi|claude --check-drift` compares the installed host version
|
|
11
|
+
with a small adapter-owned compatibility profile and fingerprints only the
|
|
12
|
+
normalized Agent Guard hook fields and enforcement runtime. It makes no
|
|
13
|
+
model call and never upgrades `host_interception` from `UNVERIFIED`.
|
|
14
|
+
- Optional create-new baselines contain only the parsed version and SHA-256
|
|
15
|
+
fingerprints. They are written as `0600`, never overwrite an existing file,
|
|
16
|
+
and detect later configuration/runtime/profile drift without copying the
|
|
17
|
+
host configuration.
|
|
18
|
+
- Explicit `--live-sentinel` may spend one configured model call in a private
|
|
19
|
+
blank fixture. PASS requires an exact hashed hook receipt, matching Core
|
|
20
|
+
audit, host block feedback, and an absent marker. Missing evidence is
|
|
21
|
+
`INCONCLUSIVE`; an executed marker is a `CRITICAL` failure. Raw host/model
|
|
22
|
+
output is counted and hashed, then discarded.
|
|
23
|
+
- The sentinel is a narrow reliability canary for one root-agent `Bash` call.
|
|
24
|
+
It does not prove subagent, concurrency, other-tool or malicious-host
|
|
25
|
+
containment.
|
|
26
|
+
|
|
27
|
+
See the [host drift guide](host-drift.md) for the status and alarm contracts.
|
|
28
|
+
|
|
29
|
+
## DSH package acceptance
|
|
30
|
+
|
|
31
|
+
- DSH `0.1.5-rc.1` now has current, execution-level host evidence without a
|
|
32
|
+
model call. A benign `bash` invocation continued; a synthetic stdin-shell
|
|
33
|
+
shape was denied before execution; its bypass-only marker remained absent;
|
|
34
|
+
and Core wrote `BLOCK_UNDETERMINABLE_EFFECT` to the isolated audit.
|
|
35
|
+
- The same behavior passed after `npm pack` and installation through DSH's own
|
|
36
|
+
plugin manager, exercising the package bundle rather than a mocked service.
|
|
37
|
+
A separate fault injection confirmed fail-closed behavior when an already
|
|
38
|
+
registered adapter could not obtain parseable Core output.
|
|
39
|
+
- The DSH adapter no longer imports the host-internal `defineTool` helper at
|
|
40
|
+
runtime. It registers plain public Tool Definition objects and performs its
|
|
41
|
+
small argument validation locally, avoiding accidental reliance on DSH's
|
|
42
|
+
internal dependency layout.
|
|
43
|
+
|
|
44
|
+
The exact observations and limits are in the
|
|
45
|
+
[DSH 0.1.5-rc.1 report](test-report-dsh-0.1.5-rc.1.md). Model/Agent execution,
|
|
46
|
+
subagents, concurrency, ASK UI, non-`bash` tools, pre-registration failure and
|
|
47
|
+
future host versions remain unverified.
|
|
48
|
+
|
|
49
|
+
## Universal npm artifact candidate
|
|
50
|
+
|
|
51
|
+
- The package identity is now `@mokuyoaxis/agent-guard@0.2.2`, matching the
|
|
52
|
+
maintainer scope and avoiding the unrelated unscoped package.
|
|
53
|
+
- One package carries the harness-neutral Core, all Skills, Claude/Kimi/DSH
|
|
54
|
+
adapters, the unlisted-host integration guide, documentation, `doctor.py`
|
|
55
|
+
and `live_sentinel.py`. DSH remains the JavaScript default export; it does
|
|
56
|
+
not redefine the project as a DSH-only plugin.
|
|
57
|
+
- Nine Python-backed npm binaries expose the doctor, live sentinel, delete
|
|
58
|
+
guard and cooperative exfil/config-view entry points. Their package targets
|
|
59
|
+
are checked for presence, executable mode and Python shebang.
|
|
60
|
+
- `prepublishOnly` runs the full suite and `publishConfig.access` is public.
|
|
61
|
+
No production dependency was added.
|
|
62
|
+
- The release workflow follows the project's unprefixed `X.Y.Z` tag convention,
|
|
63
|
+
verifies the exact scoped name and version, runs the release tests, packs
|
|
64
|
+
once, attaches that tarball and its SHA-256 to the GitHub Release, and
|
|
65
|
+
publishes the same artifact to npm with public access and provenance. A
|
|
66
|
+
manual preflight can validate `NPM_TOKEN` without publishing.
|
|
67
|
+
- The README documents a pinned scoped-package setup route and links a bilingual
|
|
68
|
+
contribution guide that recommends scoped Issues and focused Pull Requests.
|
|
69
|
+
- The post-documentation candidate contains 77 files. Its extracted inventory
|
|
70
|
+
contains no `.internal`/bytecode files, repository-local absolute paths,
|
|
71
|
+
recognized credential shapes, or identifiers from the maintainer's private
|
|
72
|
+
Kimi providers. All checked relative links across the repository's Markdown
|
|
73
|
+
files resolve.
|
|
74
|
+
|
|
75
|
+
The artifact remains universal rather than host-specific. npm keeps its own
|
|
76
|
+
credential and version gates, while the exact `0.2.2` tag publishes one packed
|
|
77
|
+
artifact to both the GitHub Release and npm. A retry may fill a missing side,
|
|
78
|
+
but never replaces an npm version that already exists.
|
|
79
|
+
|
|
80
|
+
## Kimi and Claude status
|
|
81
|
+
|
|
82
|
+
Kimi Code's current official `2.1.1` CLI was installed from its checksum-
|
|
83
|
+
verified Linux ARM64 release during this candidate cycle. Its current
|
|
84
|
+
`[[hooks]]` / `PreToolUse` / `Bash` / exit-2 contract still matches the thin
|
|
85
|
+
adapter, and both Kimi's config doctor and Agent Guard's local bridge probe
|
|
86
|
+
passed. After OAuth login, an available official model completed the revised
|
|
87
|
+
root-Bash live sentinel. Official K3, accessed through a trusted relay that
|
|
88
|
+
the maintainer confirms is a pass-through, independently completed the same
|
|
89
|
+
probe. For both routes, exact receipt, Core audit and host block feedback all
|
|
90
|
+
matched, while the bypass-only marker remained absent. Both results are
|
|
91
|
+
`PASS / HOOK_ENFORCEMENT_OBSERVED`; `2.1.1` is now in the tested-version
|
|
92
|
+
profile. The client evidence proves the requested routes and hook behavior,
|
|
93
|
+
not opaque remote weights or relay internals.
|
|
94
|
+
|
|
95
|
+
That repeat also found and fixed a sentinel-side relative-path bug: an explicit
|
|
96
|
+
relative evidence directory is now resolved before the host changes cwd, so
|
|
97
|
+
the hook receives absolute create-only receipt and workspace paths. Kimi 2.x
|
|
98
|
+
prompt mode now requests `stream-json` directly; it does not append the
|
|
99
|
+
incompatible `--auto`/`--yolo` flags. A second result-integrity fix prevents
|
|
100
|
+
complete hook evidence from overriding a host timeout: timeout is always
|
|
101
|
+
`INCONCLUSIVE`. The K3 prompt now forbids retrying after a block. The evidence
|
|
102
|
+
remains limited to one root `Bash` call per route; 2.1.1 subagents, ASK,
|
|
103
|
+
concurrency and fault injection were not tested.
|
|
104
|
+
|
|
105
|
+
A real Claude-model canary was not run because no Claude model entitlement was
|
|
106
|
+
available. The previously documented scripted-model CLI evidence remains
|
|
107
|
+
version-bounded and is not silently promoted.
|
|
108
|
+
|
|
109
|
+
## Verification gate
|
|
110
|
+
|
|
111
|
+
The current candidate passes `npm test`: 434 Python tests plus the DSH adapter
|
|
112
|
+
smoke test. Package-manifest, doctor/live-sentinel and DSH adapter targeted
|
|
113
|
+
suites pass, as do the scoped-tarball DSH Core-block and failure probes. The
|
|
114
|
+
Markdown-link, package-inventory, credential/host-path and Git whitespace
|
|
115
|
+
checks also pass. The authenticated Kimi 2.1.1 root-Bash repeat now passes and
|
|
116
|
+
has been added to the bounded compatibility claim. These checks do not
|
|
117
|
+
authorize a commit, push, tag, GitHub Release or npm publication by themselves.
|
|
118
|
+
|
|
119
|
+
The offline `guard-lab` honeytoken experiment is planned for `0.2.3` and is
|
|
120
|
+
not part of `0.2.2`.
|