# Reproducing the second article

These scripts make the previously described local examples repeatable. They are not a new benchmark or a replay of production traffic. The Guard script is a cleaned-up version of the original article demonstration, with explicit assertions, version checks and cleanup. The Watch script reconstructs the reported four-entry scan against the same published package and fixed clock.

Save the two scripts in an empty directory. Node.js 24 or newer covers both packages; this reproduction used Node.js 26.12.0.

```sh
npm init -y
npm install --ignore-scripts --save-exact @shieldaai/security-watch@0.1.0-alpha.0 @shieldaai/agent-guard-executor@0.1.0-alpha.2
node inventory-freshness.mjs
node delegated-task.mjs
```

Both scripts print JSON and assert the reported outcomes. Security Watch runs with in-memory SQLite and an injected function that rejects any attempted network path. Guard opens a temporary loopback HTTP listener, gives synthetic task credentials to local requests and uses counters as tool effects. It creates a private temporary encrypted ledger and removes it afterwards. The keys and tokens are generated locally and never printed.

The output files are from the reproduction on 5 November 2026. Watch's fixed test clock is 4 November at noon UTC, preserving the inventory age from the original example. Guard uses the current host clock for short-lived synthetic grants and approvals. Its restart closes and reopens one ledger gracefully; it does not kill a process during execution.

No source API, model provider, notification destination or production service is contacted. No real deployment occurs. All three support-chain tasks share one executor. A fourth, independently authorized release task supplies the positive control.

Expected Watch applicability results are affected, not_affected, unknown and unknown, with a high-priority stale-inventory finding and no notification jobs. Expected Guard results are one ticket read charged to all three ancestors, GRANT_DENIED on the specialist's deployment preparation, DELEGATION_DENIED on an attempted child grant expansion, and one deployment counter increment for the separate authorized release. The root read usage and unapproved tool-registration state survive reopening.
