@shield-agent/kya 0.32.9 → 0.33.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/.cursor-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/LIMITATIONS.md +2 -2
- package/README.md +178 -12
- package/amp/settings.example.json +1 -1
- package/claude/claude_desktop_config.example.json +1 -1
- package/cline/cline_mcp_settings.example.json +1 -1
- package/copilot/mcp-config.example.json +1 -1
- package/data/iocs.json +17 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +149 -16
- package/dist/cli.js.map +1 -1
- package/dist/commands/connect.d.ts +1 -1
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +11 -3
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/dash.d.ts.map +1 -1
- package/dist/commands/dash.js +25 -1
- package/dist/commands/dash.js.map +1 -1
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +26 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/eval-tool.d.ts +3 -0
- package/dist/commands/eval-tool.d.ts.map +1 -1
- package/dist/commands/eval-tool.js +2 -1
- package/dist/commands/eval-tool.js.map +1 -1
- package/dist/commands/export.d.ts +33 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +121 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/hook.d.ts.map +1 -1
- package/dist/commands/hook.js +120 -26
- package/dist/commands/hook.js.map +1 -1
- package/dist/commands/hosted-hook.d.ts +8 -1
- package/dist/commands/hosted-hook.d.ts.map +1 -1
- package/dist/commands/hosted-hook.js +15 -5
- package/dist/commands/hosted-hook.js.map +1 -1
- package/dist/commands/map.d.ts +21 -0
- package/dist/commands/map.d.ts.map +1 -0
- package/dist/commands/map.js +76 -0
- package/dist/commands/map.js.map +1 -0
- package/dist/commands/notify-flush.d.ts.map +1 -1
- package/dist/commands/notify-flush.js +7 -1
- package/dist/commands/notify-flush.js.map +1 -1
- package/dist/commands/posture.d.ts +21 -0
- package/dist/commands/posture.d.ts.map +1 -0
- package/dist/commands/posture.js +177 -0
- package/dist/commands/posture.js.map +1 -0
- package/dist/commands/receipt-serve.d.ts +7 -0
- package/dist/commands/receipt-serve.d.ts.map +1 -1
- package/dist/commands/receipt-serve.js +50 -0
- package/dist/commands/receipt-serve.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +5 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/team.d.ts.map +1 -1
- package/dist/commands/team.js +30 -11
- package/dist/commands/team.js.map +1 -1
- package/dist/commands/wire-hooks.d.ts +5 -1
- package/dist/commands/wire-hooks.d.ts.map +1 -1
- package/dist/commands/wire-hooks.js +23 -8
- package/dist/commands/wire-hooks.js.map +1 -1
- package/dist/commands/wrap.d.ts +38 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +82 -6
- package/dist/commands/wrap.js.map +1 -1
- package/dist/daily-slot.d.ts +2 -0
- package/dist/daily-slot.d.ts.map +1 -0
- package/dist/daily-slot.js +29 -0
- package/dist/daily-slot.js.map +1 -0
- package/dist/dash/dash.d.ts.map +1 -1
- package/dist/dash/dash.js +10 -0
- package/dist/dash/dash.js.map +1 -1
- package/dist/dash/entitlement.d.ts +1 -1
- package/dist/dash/entitlement.d.ts.map +1 -1
- package/dist/dash/entitlement.js +1 -0
- package/dist/dash/entitlement.js.map +1 -1
- package/dist/dash/input.d.ts +1 -1
- package/dist/dash/input.d.ts.map +1 -1
- package/dist/dash/input.js +3 -0
- package/dist/dash/input.js.map +1 -1
- package/dist/dash/render.js +1 -1
- package/dist/dash/render.js.map +1 -1
- package/dist/dash/screens/free.js +1 -1
- package/dist/dash/screens/free.js.map +1 -1
- package/dist/device-id.d.ts +5 -0
- package/dist/device-id.d.ts.map +1 -0
- package/dist/device-id.js +78 -0
- package/dist/device-id.js.map +1 -0
- package/dist/fs-atomic.d.ts +9 -3
- package/dist/fs-atomic.d.ts.map +1 -1
- package/dist/fs-atomic.js +17 -11
- package/dist/fs-atomic.js.map +1 -1
- package/dist/gate/config-gen.d.ts +26 -2
- package/dist/gate/config-gen.d.ts.map +1 -1
- package/dist/gate/config-gen.js +53 -4
- package/dist/gate/config-gen.js.map +1 -1
- package/dist/gate/otlp-receiver.d.ts.map +1 -1
- package/dist/gate/otlp-receiver.js +3 -1
- package/dist/gate/otlp-receiver.js.map +1 -1
- package/dist/guard-pack.d.ts +58 -0
- package/dist/guard-pack.d.ts.map +1 -0
- package/dist/guard-pack.js +753 -0
- package/dist/guard-pack.js.map +1 -0
- package/dist/ioc/exec.d.ts +19 -0
- package/dist/ioc/exec.d.ts.map +1 -0
- package/dist/ioc/exec.js +49 -0
- package/dist/ioc/exec.js.map +1 -0
- package/dist/ioc/format.d.ts +4 -0
- package/dist/ioc/format.d.ts.map +1 -0
- package/dist/ioc/format.js +23 -0
- package/dist/ioc/format.js.map +1 -0
- package/dist/ioc/list.d.ts +29 -0
- package/dist/ioc/list.d.ts.map +1 -0
- package/dist/ioc/list.js +25 -0
- package/dist/ioc/list.js.map +1 -0
- package/dist/ioc/result.d.ts +18 -0
- package/dist/ioc/result.d.ts.map +1 -0
- package/dist/ioc/result.js +26 -0
- package/dist/ioc/result.js.map +1 -0
- package/dist/ioc/scan.d.ts +21 -0
- package/dist/ioc/scan.d.ts.map +1 -0
- package/dist/ioc/scan.js +247 -0
- package/dist/ioc/scan.js.map +1 -0
- package/dist/ioc/spawn.d.ts +26 -0
- package/dist/ioc/spawn.d.ts.map +1 -0
- package/dist/ioc/spawn.js +52 -0
- package/dist/ioc/spawn.js.map +1 -0
- package/dist/map/build.d.ts +58 -0
- package/dist/map/build.d.ts.map +1 -0
- package/dist/map/build.js +439 -0
- package/dist/map/build.js.map +1 -0
- package/dist/map/heat.d.ts +44 -0
- package/dist/map/heat.d.ts.map +1 -0
- package/dist/map/heat.js +96 -0
- package/dist/map/heat.js.map +1 -0
- package/dist/map/load.d.ts +38 -0
- package/dist/map/load.d.ts.map +1 -0
- package/dist/map/load.js +38 -0
- package/dist/map/load.js.map +1 -0
- package/dist/map/page.d.ts +90 -0
- package/dist/map/page.d.ts.map +1 -0
- package/dist/map/page.js +374 -0
- package/dist/map/page.js.map +1 -0
- package/dist/map/target-class.d.ts +22 -0
- package/dist/map/target-class.d.ts.map +1 -0
- package/dist/map/target-class.js +151 -0
- package/dist/map/target-class.js.map +1 -0
- package/dist/map/types.d.ts +102 -0
- package/dist/map/types.d.ts.map +1 -0
- package/dist/map/types.js +3 -0
- package/dist/map/types.js.map +1 -0
- package/dist/mcp/protocol.d.ts.map +1 -1
- package/dist/mcp/protocol.js +16 -5
- package/dist/mcp/protocol.js.map +1 -1
- package/dist/never-code.d.ts +7 -0
- package/dist/never-code.d.ts.map +1 -0
- package/dist/never-code.js +9 -0
- package/dist/never-code.js.map +1 -0
- package/dist/never-list-input.d.ts +48 -12
- package/dist/never-list-input.d.ts.map +1 -1
- package/dist/never-list-input.js +696 -29
- package/dist/never-list-input.js.map +1 -1
- package/dist/notify/dispatch.d.ts +4 -0
- package/dist/notify/dispatch.d.ts.map +1 -1
- package/dist/notify/dispatch.js +3 -1
- package/dist/notify/dispatch.js.map +1 -1
- package/dist/offline-evaluate.d.ts +26 -1
- package/dist/offline-evaluate.d.ts.map +1 -1
- package/dist/offline-evaluate.js +33 -4
- package/dist/offline-evaluate.js.map +1 -1
- package/dist/otel/exporter.d.ts +15 -2
- package/dist/otel/exporter.d.ts.map +1 -1
- package/dist/otel/exporter.js +52 -6
- package/dist/otel/exporter.js.map +1 -1
- package/dist/otel/map-attrs-optin.d.ts +39 -0
- package/dist/otel/map-attrs-optin.d.ts.map +1 -0
- package/dist/otel/map-attrs-optin.js +109 -0
- package/dist/otel/map-attrs-optin.js.map +1 -0
- package/dist/parse-args.d.ts +2 -0
- package/dist/parse-args.d.ts.map +1 -1
- package/dist/parse-args.js +4 -2
- package/dist/parse-args.js.map +1 -1
- package/dist/posture/card.d.ts +26 -0
- package/dist/posture/card.d.ts.map +1 -0
- package/dist/posture/card.js +46 -0
- package/dist/posture/card.js.map +1 -0
- package/dist/posture/collect.d.ts +19 -0
- package/dist/posture/collect.d.ts.map +1 -0
- package/dist/posture/collect.js +182 -0
- package/dist/posture/collect.js.map +1 -0
- package/dist/posture/send.d.ts +24 -0
- package/dist/posture/send.d.ts.map +1 -0
- package/dist/posture/send.js +162 -0
- package/dist/posture/send.js.map +1 -0
- package/dist/posture/spawn.d.ts +20 -0
- package/dist/posture/spawn.d.ts.map +1 -0
- package/dist/posture/spawn.js +33 -0
- package/dist/posture/spawn.js.map +1 -0
- package/dist/posture/store.d.ts +34 -0
- package/dist/posture/store.d.ts.map +1 -0
- package/dist/posture/store.js +107 -0
- package/dist/posture/store.js.map +1 -0
- package/dist/posture/validate.d.ts +33 -0
- package/dist/posture/validate.d.ts.map +1 -0
- package/dist/posture/validate.js +232 -0
- package/dist/posture/validate.js.map +1 -0
- package/dist/project-policy.d.ts +23 -0
- package/dist/project-policy.d.ts.map +1 -0
- package/dist/project-policy.js +95 -0
- package/dist/project-policy.js.map +1 -0
- package/dist/receipt/daemon.d.ts +9 -9
- package/dist/receipt/daemon.d.ts.map +1 -1
- package/dist/receipt/daemon.js +26 -11
- package/dist/receipt/daemon.js.map +1 -1
- package/dist/receipt/embeddings.d.ts +28 -10
- package/dist/receipt/embeddings.d.ts.map +1 -1
- package/dist/receipt/embeddings.js +221 -35
- package/dist/receipt/embeddings.js.map +1 -1
- package/dist/receipt/gate-page.d.ts.map +1 -1
- package/dist/receipt/gate-page.js +5 -22
- package/dist/receipt/gate-page.js.map +1 -1
- package/dist/receipt/live-server.d.ts +8 -0
- package/dist/receipt/live-server.d.ts.map +1 -1
- package/dist/receipt/live-server.js +136 -4
- package/dist/receipt/live-server.js.map +1 -1
- package/dist/receipt/render-receipt.d.ts +7 -1
- package/dist/receipt/render-receipt.d.ts.map +1 -1
- package/dist/receipt/render-receipt.js +101 -13
- package/dist/receipt/render-receipt.js.map +1 -1
- package/dist/receipt/search.d.ts +5 -0
- package/dist/receipt/search.d.ts.map +1 -1
- package/dist/receipt/search.js +23 -2
- package/dist/receipt/search.js.map +1 -1
- package/dist/receipt/semantic-setup.d.ts +21 -0
- package/dist/receipt/semantic-setup.d.ts.map +1 -0
- package/dist/receipt/semantic-setup.js +111 -0
- package/dist/receipt/semantic-setup.js.map +1 -0
- package/dist/receipt/semantic-status.d.ts +7 -0
- package/dist/receipt/semantic-status.d.ts.map +1 -0
- package/dist/receipt/semantic-status.js +26 -0
- package/dist/receipt/semantic-status.js.map +1 -0
- package/dist/sdk/govern.d.ts.map +1 -1
- package/dist/sdk/govern.js +7 -3
- package/dist/sdk/govern.js.map +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +3 -23
- package/dist/telemetry.js.map +1 -1
- package/dist/trail-map-fields.d.ts +10 -0
- package/dist/trail-map-fields.d.ts.map +1 -0
- package/dist/trail-map-fields.js +53 -0
- package/dist/trail-map-fields.js.map +1 -0
- package/dist/trail-summary.d.ts.map +1 -1
- package/dist/trail-summary.js +11 -3
- package/dist/trail-summary.js.map +1 -1
- package/dist/trail.d.ts +9 -1
- package/dist/trail.d.ts.map +1 -1
- package/dist/trail.js +24 -1
- package/dist/trail.js.map +1 -1
- package/droid/README.md +1 -1
- package/droid/mcp.example.json +1 -1
- package/gemini/settings.example.json +1 -1
- package/grok/README.md +1 -1
- package/kilo/kilo.example.json +1 -1
- package/kimi/mcp.example.json +1 -1
- package/kiro/mcp.example.json +1 -1
- package/manifest.json +1 -1
- package/mastracode/mcp.example.json +1 -1
- package/mcp.json +1 -1
- package/openai/codex.config.example.toml +1 -1
- package/opencode/opencode.example.json +1 -1
- package/package.json +8 -4
- package/qwen/settings.example.json +1 -1
- package/server.json +2 -2
- package/vendor/cytoscape/LICENSE +19 -0
- package/vendor/cytoscape/README.md +7 -0
- package/vendor/cytoscape/cytoscape.min.js +31 -0
package/.mcp.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
package/LIMITATIONS.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
- Offline `eval-tool --offline` and `dash --once --offline` use a sample policy surface for demos. Production needs a real control plane (local free or hosted).
|
|
5
5
|
- Unsigned v1 passport JSON is observational. Signed v2 claims (`shield-kya-agent-passport-v2`, `shield-kya-session-claim-v1`) need the hosted control-plane key.
|
|
6
6
|
- If a host never wraps tools, session shrink cannot stop it. Spawn without a control plane cannot be gated.
|
|
7
|
-
- `wrap` evaluates and records a local trail. **Default is observe:** REQUIRE_APPROVE does **not** open a Hold ticket (no second approve). Use `--hold` / `KYA_HOLD=1` for the org Hold path. Never-events still DENY with no prompt.
|
|
7
|
+
- `wrap` evaluates and records a local trail. **Default is observe:** REQUIRE_APPROVE does **not** open a Hold ticket (no second approve). Use `--hold` / `KYA_HOLD=1` for the org Hold path. Never-events still DENY with no prompt. `wrap --tool-id` never executes the side effect; `wrap -- <cmd>` runs the command only after an allowing verdict.
|
|
8
8
|
- `kya start` is the OSS one-liner: init + write local MCP configs + open the live receipt. Hosts still must reload MCP once; KYA cannot inject into Cursor/Claude without that.
|
|
9
|
-
- PreToolUse hooks (claude/grok/kimi) are fail-open advisory plus a local never-list DENY. They do not replace the MCP `kya.policy_evaluate` plane path, and they apply to new sessions only - hosts load hooks at session start.
|
|
9
|
+
- PreToolUse hooks (claude/grok/kimi) are fail-open advisory plus a local never-list and guard pack DENY. They do not replace the MCP `kya.policy_evaluate` plane path, and they apply to new sessions only - hosts load hooks at session start.
|
|
10
10
|
- After wrap on an interactive TTY, KYA writes the receipt HTML and opens it in the browser once per project (always on DENY). Set `KYA_RECEIPT_AUTO=0` to disable, `KYA_RECEIPT_AUTO=1` to force. `receipt --open` is the live-updating loopback server.
|
|
11
11
|
- Write/edit wraps may store a **clipped redacted `diffPreview`** (≤8 lines / ≤480 chars body; PEM collapsed to `[redacted-pem]`) on the trail for the receipt. Never full patches. Shell/exec never get a preview. Disable with `KYA_DIFF_PREVIEW=0`.
|
|
12
12
|
- `receipt` builds a browser HTML/JSON/MD flight recorder from the global `~/.kya/trail.jsonl` (merged with any legacy per-project `<cwd>/.kya/trail.jsonl`; `--open`). That is the developer report - not `dash`.
|
package/README.md
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
[](https://x.com/coscosmico)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
**Audit trail and traceability for AI agents.** See what every coding agent did and check each tool call against policy.
|
|
11
|
+
**Audit trail and traceability for AI agents.** See what every coding agent did and check each tool call against policy. KYA records every tool call your coding agents make, on a local dashboard, and by default denies a short list of destructive commands, secret reads and exfiltration ([list below](#what-it-blocks-by-default)). Everything else is recorded, not blocked. Local hooks fail open. Real blocking and human approval run on the MCP policy path against a hosted workspace (the Shield Agent cloud service). One command. Free forever under MIT.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm i -g @shield-agent/kya@latest && kya start
|
|
15
|
+
# Permission denied (EACCES) on Linux? No sudo and no install needed:
|
|
16
|
+
npx @shield-agent/kya@latest start
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
Requires **Node.js 22+** (24 recommended). Restart Cursor / Claude Code / Codex once so MCP loads. Hosted desk: [shield-agent.com](https://shield-agent.com/install).
|
|
@@ -19,7 +21,7 @@ Requires **Node.js 22+** (24 recommended). Restart Cursor / Claude Code / Codex
|
|
|
19
21
|
|
|
20
22
|
CLI and local MCP gate for Shield’s Know Your Agent path.
|
|
21
23
|
|
|
22
|
-
An agent that asks Shield first gets Allow, Review, or Deny: you register the agent, wrap the tool (or route it through the MCP gate or the hosted plane), and Review waits for a person. Local hooks only record and block the never-list (see [Hook interception](#hook-interception)). Hosted is where enforcement lives. This package does not scan your network. Agents that never call evaluate stay invisible on purpose.
|
|
24
|
+
An agent that asks Shield first gets Allow, Review, or Deny: you register the agent, wrap the tool (or route it through the MCP gate or the hosted plane), and Review waits for a person. Local hooks only record and block the never-list and the guard pack (see [Hook interception](#hook-interception)). Hosted is where enforcement lives. This package does not scan your network. Agents that never call evaluate stay invisible on purpose.
|
|
23
25
|
|
|
24
26
|
Walkthrough: [how you use it](https://shield-agent.com/how-kya-works#using).
|
|
25
27
|
|
|
@@ -42,10 +44,14 @@ If `KYA_API_KEY` is empty against an authenticated plane, network commands exit
|
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
46
|
npm i -g @shield-agent/kya@latest && kya start
|
|
47
|
+
# Permission denied (EACCES) on Linux? No sudo and no install needed:
|
|
48
|
+
npx @shield-agent/kya@latest start
|
|
45
49
|
```
|
|
46
50
|
|
|
47
51
|
Run it in your project directory. (From a clone of this repo, `./scripts/install-local.sh` replaces the npm install.)
|
|
48
52
|
|
|
53
|
+
If the install fails with `EACCES` (the global npm folder belongs to root, common on Linux), do not use `sudo`. Run without a global install: `npx @shield-agent/kya@latest start`. Or give npm a folder you own: `npm config set prefix ~/.npm-global`, add `~/.npm-global/bin` to your `PATH`, then run the install again.
|
|
54
|
+
|
|
49
55
|
More ways to install (same package; npm stays the reference path):
|
|
50
56
|
|
|
51
57
|
```bash
|
|
@@ -58,6 +64,31 @@ scoop bucket add The-Pixel-Boys https://github.com/The-Pixel-Boys/scoop-bucket.g
|
|
|
58
64
|
scoop install shield-kya
|
|
59
65
|
```
|
|
60
66
|
|
|
67
|
+
Where each channel is counted. The table has no counts on purpose. Downloads are not installs and not people.
|
|
68
|
+
|
|
69
|
+
| Channel | Command or listing | Counted in |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| npm (reference) | `npm install -g @shield-agent/kya@latest` | npm downloads |
|
|
72
|
+
| Homebrew tap | `brew install The-Pixel-Boys/tap/shield-kya` | npm (the formula downloads the npm tarball) |
|
|
73
|
+
| Scoop | `scoop install shield-kya` | npm (the manifest downloads the npm tarball) |
|
|
74
|
+
| Python shim | `pip install shield-kya` (also needs the npm CLI on PATH) | PyPI downloads |
|
|
75
|
+
| VS Code extension | Marketplace: `shield-agent.shield-kya` (also needs the npm CLI) | VS Code Marketplace downloads |
|
|
76
|
+
| Plugins (Claude Code, Codex, Gemini CLI, Cursor) | see the sections below | npm (the plugin bootstrap runs `npm install`) |
|
|
77
|
+
| GitHub Action `kya-certify` | Marketplace listing | npm (each run installs the CLI from npm) |
|
|
78
|
+
| Dev Container Feature | not published yet | not counted |
|
|
79
|
+
|
|
80
|
+
Homebrew, Scoop, plugins and the GitHub Action fetch the npm package, so they are inside the npm count and are not added again.
|
|
81
|
+
|
|
82
|
+
<!-- adoption:start -->
|
|
83
|
+
Adoption, measured. The badge reads a public file that a daily job writes. A count under 50 is not shown. The badge reads "unavailable" when the last measurement failed. The website also hides any figure older than 48 hours.
|
|
84
|
+
|
|
85
|
+
[](https://raw.githubusercontent.com/The-Pixel-Boys/shield-kya/downloads-data/badge-action-repos.json)
|
|
86
|
+
|
|
87
|
+
Repos using kya-action: public repos outside The-Pixel-Boys, counted by GitHub code search. This count is approximate. Private repos are not counted, and the search covers default branches only.
|
|
88
|
+
|
|
89
|
+
Hosted channel counts (Slack, Teams, webhook, helpdesk) and the date of each count are on https://shield-agent.com.
|
|
90
|
+
<!-- adoption:end -->
|
|
91
|
+
|
|
61
92
|
Claude Code users can also install the [plugin](#claude-code-plugin); GitHub Copilot CLI users the [Copilot CLI plugin](#github-copilot-cli-plugin) (read its first paragraph before installing); Codex CLI users the [Codex plugin](#codex-plugin); Gemini CLI users the [Gemini CLI extension](#gemini-cli-extension). Cline users: `npm install -g @shield-agent/kya@latest`, then follow [`llms-install.md`](llms-install.md). It is written so Cline can follow it; a Cline run from that file alone has not been tested yet.
|
|
62
93
|
|
|
63
94
|
That **inits** `.kya/`, **wires** local MCP (`.mcp.json`, `mcp.json`, `.cursor/mcp.json` → `kya serve-mcp --stdio`), also **wires user-level configs for every installed host it detects** (`~/.claude.json`, `~/.kimi-code/`, `~/.grok/`, `~/.cursor/`, …), and **opens** the live activity report. The report runs in the background, so you get your terminal back. `kya stop` stops it. `kya receipt --open` reopens it. Cursor, Kiro, Qwen, Amp, Droid, Cline, and Grok pick the server up live with no restart (Kimi: just a new session). Claude Code, Codex, OpenCode, Gemini, Copilot CLI, and Kilo CLI load it on next launch. `claude --resume` keeps your conversation.
|
|
@@ -103,9 +134,11 @@ Hosts without a `connect` target still work: `kya wrap --offline -- <agent comma
|
|
|
103
134
|
|
|
104
135
|
`kya start` also wires a `PreToolUse` hook into every installed hook-capable host it detects: Claude Code (`~/.claude/settings.json`, merge-only), Grok (`~/.grok/hooks/shield-kya.json`, kya-managed file), and Kimi Code (`~/.kimi-code/config.toml`, `[[hooks]]` append). Every tool call the agent makes then passes through `kya hook` first: it is evaluated locally (offline, sub-second, no network) and written to the global record (trail). (If you opted in to anonymous usage stats, the hook also starts a detached helper at most once a day; see [Anonymous usage stats](#anonymous-usage-stats-opt-in-off-by-default).)
|
|
105
136
|
|
|
106
|
-
Decision mapping: a local never-list **DENY** blocks the tool call (exit `2` plus `hookSpecificOutput` deny JSON with `permissionDecision: "deny"`). **ALLOW** and **REQUIRE_APPROVE** are written to the record as advisory and the call proceeds. Manual wiring can pass `--strict` on the hook command to also block **REQUIRE_APPROVE**.
|
|
137
|
+
Decision mapping: a local never-list or guard pack **DENY** blocks the tool call (exit `2` plus `hookSpecificOutput` deny JSON with `permissionDecision: "deny"`). **ALLOW** and **REQUIRE_APPROVE** are written to the record as advisory and the call proceeds. Manual wiring can pass `--strict` on the hook command to also block **REQUIRE_APPROVE**.
|
|
138
|
+
|
|
139
|
+
The never-list also blocks three groups added on 2026-10-30, pending owner review: agent-driven persistence (writes to `~/.ssh/authorized_keys`, cron, LaunchAgents and LaunchDaemons, systemd user units, `at`, `schtasks /create`, shell start files that download, `ssh-copy-id`), reverse tunnels and reverse shells (`ssh -R`, `ssh -L -N` to a raw IP, `nc -e`, bash `/dev/tcp`, `autossh`), and sending environment names or values to a public raw IP address. Loopback and private addresses are allowed. The rows and the known limits are in [docs/never-list.md](docs/never-list.md).
|
|
107
140
|
|
|
108
|
-
Hooks are fail-open: any hook error or timeout allows the call. They are alerts plus local never-list enforcement, not the sole barrier. Plane enforcement stays on the MCP `kya.policy_evaluate` path. Hooks take effect in new sessions; all three hosts load hooks at session start.
|
|
141
|
+
Hooks are fail-open: any hook error or timeout allows the call. They are alerts plus local never-list and guard pack enforcement, not the sole barrier. Plane enforcement stays on the MCP `kya.policy_evaluate` path. Hooks take effect in new sessions; all three hosts load hooks at session start.
|
|
109
142
|
|
|
110
143
|
```bash
|
|
111
144
|
kya connect claude --hooks # wire the PreToolUse hook by hand
|
|
@@ -113,6 +146,24 @@ kya connect grok --hooks
|
|
|
113
146
|
kya connect kimi --hooks
|
|
114
147
|
```
|
|
115
148
|
|
|
149
|
+
## What it blocks by default
|
|
150
|
+
|
|
151
|
+
The deny list is the never-list ([docs/never-list.md](docs/never-list.md)) plus the guard pack ([docs/guard-pack.md](docs/guard-pack.md)). A deny exits `2` and names its rule id. In plain words:
|
|
152
|
+
|
|
153
|
+
- **Wiping files.** `rm` with recursive and force flags on `/`, your home directory, a parent of it or of the project folder (`rm-root-home`, and `rm-recursive-home-or-system`); `find ... -delete` on home or system folders.
|
|
154
|
+
- **Infrastructure and data.** `terraform destroy` and `terraform apply -destroy` (`terraform-destroy`); `DROP TABLE`, `DROP DATABASE`, `DROP SCHEMA` and `TRUNCATE` inside a database client (`sql-drop`); `docker volume rm`, `docker volume prune`, `docker system prune --volumes` and `docker compose down -v` (`docker-volumes`); `kubectl delete namespace` and `kubectl delete --all -A` (`k8s-delete-ns`); `aws ec2 terminate-instances`, `aws s3 rb --force`, `aws s3 rm --recursive`, `aws rds delete-db-instance`, `gcloud projects delete`, `gcloud sql instances delete`, `az group delete` (`cloud-delete`); `railway volume delete` and a `volumeDelete` call (`railway-volume-delete`).
|
|
155
|
+
- **Git.** A force push to any branch (`git-force-push`); `--force-with-lease` is allowed except on `main`, `master`, `release*` and `prod*`, where it is denied too (`git-force-push-protected-branch`); deleting `main` or `master` (`git-delete-default-branch`); `git reset --hard` with `git clean -fdx` (`git-hard-reset-clean`).
|
|
156
|
+
- **Secret reads.** SSH keys, `~/.aws/credentials`, gcloud, Azure, kubeconfig, Docker, Railway, GitHub CLI, npm, PyPI, netrc and git credentials, `.env` files (not `.env.example`), `*.pem`, `*.key` (`secret-read-*`).
|
|
157
|
+
- **Secret writes.** AWS key ids, private key headers, GitHub, Slack and Stripe live tokens written into a file (`secret-write-*`). The trail row never holds the text.
|
|
158
|
+
- **Exfiltration.** Environment variables or credential files sent to a non-loopback host with `curl`, `wget`, `nc`, `ncat`, `socat`, `scp` or `rsync` (`exfil-*`).
|
|
159
|
+
- **System destroyers.** `mkfs`, `dd` to a block device, a fork bomb, `chmod -R 777` or `chown -R` on home or system folders, a download piped into a shell.
|
|
160
|
+
|
|
161
|
+
Config keys (`shellNeverList`, `secretsGuard`, `exfilGuard`, `guardAllow`) are read from `~/.kya/config.json` only; a project file cannot lift a deny. Details, examples and limits: [docs/guard-pack.md](docs/guard-pack.md).
|
|
162
|
+
|
|
163
|
+
## What it does not block
|
|
164
|
+
|
|
165
|
+
Moves and renames, edits, and deletes inside the project folder: they are recorded in the audit trail, not blocked. Anything an agent does outside the hook's view: a script it writes then runs, commands built at run time, `ssh host "rm -rf ~"`. Built-in shells of tools that have no hook and do not route through KYA (Cursor, for example, is MCP only). Hosted mode (`--plane-config`) applies the never-list and the plane's policy, not the guard pack. It is a seatbelt, not a sandbox: the guard pack denies this class of command, and the audit trail records what happened either way.
|
|
166
|
+
|
|
116
167
|
## Claude Code plugin
|
|
117
168
|
|
|
118
169
|
This repo is also a Claude Code plugin marketplace named `shield-kya` with one plugin, `kya`:
|
|
@@ -122,7 +173,7 @@ This repo is also a Claude Code plugin marketplace named `shield-kya` with one p
|
|
|
122
173
|
/plugin install kya@shield-kya
|
|
123
174
|
```
|
|
124
175
|
|
|
125
|
-
The plugin is **advisory and fails open**: it records every tool call on the local record (`~/.kya/trail.jsonl`) and blocks
|
|
176
|
+
The plugin is **advisory and fails open**: it records every tool call on the local record (`~/.kya/trail.jsonl`) and blocks the never-list and the guard pack. If kya is missing, crashes or times out, the tool call proceeds and nothing is recorded. It evaluates offline, so it has no Hold and no approval. Hosted enforcement is the MCP policy path against a hosted workspace.
|
|
126
177
|
|
|
127
178
|
Team rollout: commit `extraKnownMarketplaces` (the `shield-kya` GitHub source) and `enabledPlugins` (`"kya@shield-kya": true`) to the repository's `.claude/settings.json`, or force it org-wide with managed settings. Details and limits: [docs/hosts/claude-plugin.md](docs/hosts/claude-plugin.md).
|
|
128
179
|
|
|
@@ -148,7 +199,7 @@ codex plugin marketplace add The-Pixel-Boys/shield-kya
|
|
|
148
199
|
codex plugin add kya@shield-kya
|
|
149
200
|
```
|
|
150
201
|
|
|
151
|
-
Then open `/hooks` in Codex CLI and trust the two Shield KYA hooks: Codex runs no plugin hook until you do. Codex trusts the hook command, not the scripts it runs; the SessionStart command carries the kya version, so each kya release asks again. Codex also auto-upgrades Git marketplaces at startup, so whoever can push to this repo can change what runs next; teams can pin a release ref (see the guide). Same behaviour as the Claude Code plugin: advisory, fails open, records every tool call Codex sends through its hooks (shell, `apply_patch`, MCP and other local tools; not hosted tools such as web search), blocks
|
|
202
|
+
Then open `/hooks` in Codex CLI and trust the two Shield KYA hooks: Codex runs no plugin hook until you do. Codex trusts the hook command, not the scripts it runs; the SessionStart command carries the kya version, so each kya release asks again. Codex also auto-upgrades Git marketplaces at startup, so whoever can push to this repo can change what runs next; teams can pin a release ref (see the guide). Same behaviour as the Claude Code plugin: advisory, fails open, records every tool call Codex sends through its hooks (shell, `apply_patch`, MCP and other local tools; not hosted tools such as web search), blocks the never-list and the guard pack. It bundles no MCP server; add one with `kya connect codex`. Details: [docs/hosts/codex.md](docs/hosts/codex.md#codex-plugin).
|
|
152
203
|
|
|
153
204
|
## Gemini CLI extension
|
|
154
205
|
|
|
@@ -158,7 +209,7 @@ The repo root is also a Gemini CLI extension (`gemini-extension.json` + `hooks/h
|
|
|
158
209
|
gemini extensions install https://github.com/The-Pixel-Boys/shield-kya
|
|
159
210
|
```
|
|
160
211
|
|
|
161
|
-
Same behaviour as the other plugins: advisory, fails open, records every tool call Gemini sends through its `BeforeTool` hook, blocks
|
|
212
|
+
Same behaviour as the other plugins: advisory, fails open, records every tool call Gemini sends through its `BeforeTool` hook, blocks the never-list and the guard pack. Gemini runs extension hooks without a separate trust step. The extension pins the kya version it was released with. It bundles no MCP server; see the MCP examples. Details: [docs/hosts/gemini.md](docs/hosts/gemini.md#gemini-cli-extension).
|
|
162
213
|
|
|
163
214
|
## Gate (local MCP gateway)
|
|
164
215
|
|
|
@@ -200,6 +251,12 @@ One record (trail) for all projects: `~/.kya/trail.jsonl` (`KYA_HOME` overrides
|
|
|
200
251
|
|
|
201
252
|
The report itself is a dashboard. A hero row on top shows the live **Certify** result, the decision mix, an activity sparkline, and showback (cost per agent). Tabbed sections sit below: **Overview** (analytics, sessions, reasons), **Certify** (the full live requirement table: every requirement grouped by domain with status, evidence, and attestation), **Activity** (the filterable event feed), **System** (wired hosts, sandboxes, ORR). Everything is one standalone offline HTML page. The live view adds a single external link: "Star on GitHub". The live daemon from `kya start` re-renders it on every event.
|
|
202
253
|
|
|
254
|
+
### Map of agent actions
|
|
255
|
+
|
|
256
|
+
`kya map` draws a graph of what KYA recorded: the device, the agent sessions, the tools and the target classes. Edges are coloured by verdict. Two heat views show when and where the activity happened. The page is local and offline. It shows what was recorded, not what was enforced. The live report has a Map tab. See [docs/map.md](docs/map.md).
|
|
257
|
+
|
|
258
|
+
`kya export --format agent-flow` writes the same trail as a JSONL event log for the agent-flow viewer (`--out FILE` writes a new 0600 file; `--force` replaces one). Each line holds the hashed session, the tool, the verdict, the reason code, the target class, the device id and the mode. It holds no arguments, paths or command text. See [docs/map.md](docs/map.md#export).
|
|
259
|
+
|
|
203
260
|
### Sharing a report
|
|
204
261
|
|
|
205
262
|
`kya receipt --share` publishes a **redacted summary** of the current window (aggregate decision counts, product and reason-code rollups, and the Certify status; no paths, no tool arguments, no session IDs) to shield-agent.com and prints a public URL (`/r/<id>`) with its expiry date (7 days) that anyone can open, plus one line suggesting you send it to your security lead. Every shared page carries the one-line install so readers can audit their own agents, and a button to start a hosted workspace for the team. The Certify status on the page is labelled as self-reported by the CLI, not verified by Shield Agent. With `--json` the command prints only `{"url", "expiresAt"}`. Point it at a different collector with `--share-url <base>` or `KYA_SHARE_URL`.
|
|
@@ -208,6 +265,8 @@ Sharing is a single attempt by design (storm-proof: no silent retries against th
|
|
|
208
265
|
|
|
209
266
|
### Natural-language search
|
|
210
267
|
|
|
268
|
+
`kya start` asks once, in a terminal, whether to turn this on (about 400 MB of disk, nothing leaves the machine). Answer yes and it installs the runtime for you before the report opens. A "no" is remembered. Without a terminal it asks nothing: set `KYA_SEMANTIC=on` to install without a question (scripts, images) or `KYA_SEMANTIC=off` to never ask. The manual command is below.
|
|
269
|
+
|
|
211
270
|
The **Activity** search box understands plain English. It runs a hybrid of BM25 over tool IDs, summaries, reason codes, decisions, projects, and MCP server labels, plus local MiniLM semantic reranking, which is opt-in. The runtime is not part of the default install. Without it, search stays lexical (BM25) and the live report server writes one line to its log (for `kya start`, the background report daemon log) that names the install command. Install it once:
|
|
212
271
|
|
|
213
272
|
```bash
|
|
@@ -228,7 +287,8 @@ npm install --prefix "$env:USERPROFILE\.kya\semantic" @shield-agent/fastembed@3.
|
|
|
228
287
|
If `KYA_HOME` is set, the prefix is `$KYA_HOME/.kya/semantic` (`%KYA_HOME%\.kya\semantic` on Windows). A built-in concept glossary maps everyday words to the vocabulary events actually use, so `dangerous` finds rm/kill/delete/sudo calls, `blocked` finds denials, and `held` finds approval requests. You can also type things like `failed stripe transfers`, `files written by grok`, or `approval required production`. Stopwords and stemming are handled automatically, and the same search works across the global record.
|
|
229
288
|
|
|
230
289
|
- Offline or `KYA_OFFLINE=1` keeps search purely lexical (no model download).
|
|
231
|
-
- After you opt in, the live server downloads `BAAI/bge-small-en-v1.5` once into `~/.kya/models` and caches event vectors in `~/.kya/search-index.
|
|
290
|
+
- After you opt in, the live server downloads `BAAI/bge-small-en-v1.5` once into `~/.kya/models` and caches event vectors in `~/.kya/search-index.bin` (1.5 KB for each event). New vectors are added to the end of the file. The file keeps at most 20,000 events (`KYA_SEARCH_INDEX_MAX`); it drops the oldest first and keeps the events of the current report window.
|
|
291
|
+
- An older `~/.kya/search-index.json` is converted once. KYA then renames it to `search-index.json.migrated` and does not read it again. KYA does not delete it. You can delete it yourself.
|
|
232
292
|
- `KYA_SEARCH_SEMANTIC=off` disables the model while still keeping BM25.
|
|
233
293
|
|
|
234
294
|
The hosted console uses the same hybrid search on the server side (Postgres full-text + optional OpenAI-compatible embeddings), so queries typed in either place behave the same way.
|
|
@@ -238,6 +298,13 @@ The hosted console uses the same hybrid search on the server side (Postgres full
|
|
|
238
298
|
- Semantic search is no longer installed by default (about 230 MB less on disk). After upgrading, activity search is lexical (BM25) only until you run the install command in [Natural-language search](#natural-language-search).
|
|
239
299
|
- The CLI loads the OpenTelemetry SDK only when an OTLP endpoint is set. A start error is logged once to stderr; metrics stay off and the command continues.
|
|
240
300
|
- Hook verdicts and fail-open rules are unchanged.
|
|
301
|
+
- `kya update` self-updates kya to the latest npm version.
|
|
302
|
+
|
|
303
|
+
## Team rollout
|
|
304
|
+
|
|
305
|
+
- `kya team init` adds a tag-pinned plugin marketplace and an enabled plugin to the project settings, so everyone who opens the repo gets the plugin. Run it with `--dry-run` first to see the change.
|
|
306
|
+
- `kya team managed-settings` prints the managed-settings JSON that an administrator deploys.
|
|
307
|
+
- Step by step: [Team rollout](docs/team-rollout.md).
|
|
241
308
|
|
|
242
309
|
## Dual plane
|
|
243
310
|
|
|
@@ -280,9 +347,13 @@ n8n and Zapier access is included in every paid plan. There is no add-on price.
|
|
|
280
347
|
| `KYA_OFFLINE` | No | `1`/`true` for sample evaluate |
|
|
281
348
|
| `KYA_HOLD` | No | `1`/`true` for the org Hold path (REQUIRE_APPROVE opens a human ticket) |
|
|
282
349
|
| `KYA_DASH_PLAN` | No | `enterprise` unlocks licensed TUI panes |
|
|
350
|
+
| `KYA_IOC` | No | `0` turns off the daily background IoC scan started by `kya hook` (`kya doctor --iocs` still runs) |
|
|
283
351
|
| `KYA_DIFF_PREVIEW` | No | `0` disables clipped change previews on the receipt |
|
|
284
352
|
| `KYA_RECEIPT_AUTO` | No | `0` disables auto-open receipt after wrap; `1` forces |
|
|
285
353
|
| `KYA_SEARCH_SEMANTIC` | No | `off` disables MiniLM semantic reranking (BM25 still works) |
|
|
354
|
+
| `KYA_SEARCH_INDEX_MAX` | No (default `20000`) | Most events kept in the search vector file |
|
|
355
|
+
| `KYA_RECEIPT_MAX_RSS_MB` | No (default `512`; `2048` when plain-language search is installed) | The live report process exits when its memory (RSS) is above this many MB; the next `kya start` or `kya receipt` starts a new one. `0` turns the check off |
|
|
356
|
+
| `KYA_SEMANTIC` | No | `on` lets `kya start` install the plain-language search runtime without asking; `off` never asks |
|
|
286
357
|
| `KYA_SHARE_URL` | No | `kya receipt --share` collector base (default `https://shield-agent.com`) |
|
|
287
358
|
| `KYA_TELEMETRY` | No | `0`/`off` forces anonymous usage stats off ([docs/telemetry.md](docs/telemetry.md)); they are off unless you opted in |
|
|
288
359
|
| `DO_NOT_TRACK` | No | `1` forces anonymous usage stats off, same as `KYA_TELEMETRY=0` |
|
|
@@ -312,7 +383,7 @@ MCP Registry entry: `server.json` plus package `mcpName` `io.github.The-Pixel-Bo
|
|
|
312
383
|
"mcpServers": {
|
|
313
384
|
"shield-kya": {
|
|
314
385
|
"command": "npx",
|
|
315
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
386
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
316
387
|
"env": {
|
|
317
388
|
"KYA_BASE_URL": "http://127.0.0.1:8090",
|
|
318
389
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -333,7 +404,7 @@ npx @shield-agent/kya reject --id <approval-id>
|
|
|
333
404
|
|
|
334
405
|
A hosted high-risk request (HIGH priority now or before, or created with the irreversible hint) cannot be approved from the CLI or the TUI: the hosted plane answers 403 `kya.approval_console_mfa_required`. Approve it in the hosted console with a two-factor code. `reject` always works.
|
|
335
406
|
|
|
336
|
-
`wrap
|
|
407
|
+
`wrap --tool-id …` evaluates and may open a pending ticket. It never executes the side effect. `wrap [--offline] -- <cmd…>` gates the command as a shell call and runs it only when the verdict allows (an observed Review counts as allowed). Its exit code is the command's own, or `1` Deny, `4` Hold pending, `126` not executable, `127` not found. The verdict lines go to stderr, so the command's stdout stays clean. `invoke` asks the live plane to authorize after Allow or APPROVED. It does not run the write on this machine. The TUI (`dash`) can `a`/`x` decide only after `y` confirm with a JWT (`sk_*` refused).
|
|
337
408
|
|
|
338
409
|
## In-process SDK shims
|
|
339
410
|
|
|
@@ -356,7 +427,7 @@ Framework recipes (each one tested with a scripted model and the published CLI):
|
|
|
356
427
|
|
|
357
428
|
```bash
|
|
358
429
|
# Prefer a preinstalled package (no registry auto-install):
|
|
359
|
-
npx --no-install @shield-agent/kya@0.
|
|
430
|
+
npx --no-install @shield-agent/kya@0.33.1 serve-mcp --stdio
|
|
360
431
|
# Or after npm i -g / local install:
|
|
361
432
|
kya serve-mcp --stdio
|
|
362
433
|
```
|
|
@@ -367,7 +438,7 @@ Copy `claude/claude_desktop_config.example.json` into Claude Desktop MCP setting
|
|
|
367
438
|
|
|
368
439
|
## OpenAI (Codex / Responses)
|
|
369
440
|
|
|
370
|
-
**Codex CLI plugin (hooks):** see [Codex plugin](#codex-plugin). **Codex CLI / IDE (MCP):** copy `openai/codex.config.example.toml` into `~/.codex/config.toml`. Local stdio uses `npx --no-install @shield-agent/kya@0.
|
|
441
|
+
**Codex CLI plugin (hooks):** see [Codex plugin](#codex-plugin). **Codex CLI / IDE (MCP):** copy `openai/codex.config.example.toml` into `~/.codex/config.toml`. Local stdio uses `npx --no-install @shield-agent/kya@0.33.1 serve-mcp --stdio`. Hosted Codex uses `url = "https://shield-agent.com/mcp"` with `bearer_token_env_var = "KYA_API_KEY"`.
|
|
371
442
|
|
|
372
443
|
**Responses API:** see `openai/responses-mcp.example.json` (`server_url` + `Authorization: Bearer <KYA_API_KEY>`).
|
|
373
444
|
|
|
@@ -482,6 +553,28 @@ kya discover --push
|
|
|
482
553
|
|
|
483
554
|
Home-directory prefixes are redacted from evidence paths (replaced with `~`). The snapshot includes a stable `endpointUid` derived from the OS, a hostname hash, and a user hash. No raw hostname or username leaves the machine. See [docs/discovery.md](docs/discovery.md) for the full scan list and privacy notes.
|
|
484
555
|
|
|
556
|
+
## IoC check (supply-chain indicators)
|
|
557
|
+
|
|
558
|
+
`kya doctor --iocs` checks this machine for known indicators of compromise, for example the trojanized `anthropic.claude-code` 2.1.313 extension. It reads local files only and makes no network call. The check is advisory: it reports findings and does not change anything. A clean result does not prove the machine is clean.
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
kya doctor --iocs # scan now and print findings
|
|
562
|
+
kya doctor # show the last result
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
`kya hook` also runs the check in the background, at most once a day. Turn that off with `KYA_IOC=0` or `{"ioc":{"enabled":false}}` in `~/.kya/config.json`. The last result shows in `kya receipt` and in `kya dash` (pane 9). See [docs/ioc-scan.md](docs/ioc-scan.md).
|
|
566
|
+
|
|
567
|
+
## Developer posture report (opt-in, off by default)
|
|
568
|
+
|
|
569
|
+
`kya posture` can send a short report about this machine to your hosted workspace: agent hosts, agent-related extensions, MCP server names, the IoC result and the never-list status. Nothing is sent until you run `kya posture on` (it prints the exact report first) and the workspace allows it. `kya posture off` stops at once, and with the toggle off the client makes no network call. The client refuses any report that holds an environment name or value, a path, a user or host name, or an IP address. The check is advisory. See [docs/posture.md](docs/posture.md).
|
|
570
|
+
|
|
571
|
+
```bash
|
|
572
|
+
kya posture status
|
|
573
|
+
kya posture on # shows the exact report, then asks (or --yes in scripts)
|
|
574
|
+
kya posture send --dry-run
|
|
575
|
+
kya posture off
|
|
576
|
+
```
|
|
577
|
+
|
|
485
578
|
## Alert webhooks (decision routing)
|
|
486
579
|
|
|
487
580
|
Route DENY / REQUIRE_APPROVE events to Slack, Microsoft Teams, Linear, Jira, or any webhook. Config lives in `.kya/config.json` (project) or `~/.kya/config.json` (global):
|
|
@@ -532,6 +625,77 @@ pnpm test
|
|
|
532
625
|
pnpm build
|
|
533
626
|
```
|
|
534
627
|
|
|
628
|
+
## All features
|
|
629
|
+
|
|
630
|
+
<!-- features:start -->
|
|
631
|
+
Generated from `sdks/kya/features.json` by `pnpm sync:features`. Do not edit by hand. Full list with docs links: [docs/features.md](docs/features.md).
|
|
632
|
+
|
|
633
|
+
| Feature | Command or flag | Status |
|
|
634
|
+
|---|---|---|
|
|
635
|
+
| Print version | `kya version`, `--version`, `-v`, `-V` | stable |
|
|
636
|
+
| One-line start | `kya start`, `--no-open`, `--force`, `--no-gate` | stable |
|
|
637
|
+
| Stop report server | `kya stop`, `--all` | stable |
|
|
638
|
+
| Scaffold config | `kya init`, `--force` | stable |
|
|
639
|
+
| Wire a coding host | `kya connect`, `--project`, `--force` | stable |
|
|
640
|
+
| Wire PreToolUse hook | `kya connect`, `--hooks` | stable |
|
|
641
|
+
| Point host at gateway | `kya connect`, `--gate` | beta |
|
|
642
|
+
| Self-update and version banner | `kya update`, `--no-update-check`, `KYA_UPDATE_CHECK` | stable |
|
|
643
|
+
| Node 22 check and handoff | none | stable |
|
|
644
|
+
| Homebrew install | `brew install The-Pixel-Boys/tap/shield-kya` | stable |
|
|
645
|
+
| Scoop install | `scoop install shield-kya` | beta |
|
|
646
|
+
| Team rollout: commit plugin pin | `kya team init`, `--dry-run` | beta |
|
|
647
|
+
| Managed-settings JSON for admins | `kya team managed-settings` | beta |
|
|
648
|
+
| Repository policy file | `.kya/policy.json` | beta |
|
|
649
|
+
| Opt-in usage stats | `kya telemetry`, `--purge` | stable |
|
|
650
|
+
| Global activity record | `KYA_HOME` | stable |
|
|
651
|
+
| Activity report | `kya receipt`, `--open`, `--days`, `--session`, `--q`, `--json`, `--out` | stable |
|
|
652
|
+
| Redacted share link | `kya receipt`, `--share`, `--share-url`, `--share-retries`, `KYA_SHARE_URL` | beta |
|
|
653
|
+
| Natural-language search in report | none | beta |
|
|
654
|
+
| Map of agent actions | `kya map`, `--days`, `--json`, `--html`, `--session` | beta |
|
|
655
|
+
| Agent-flow export | `kya export`, `--format`, `--days`, `--session`, `--out`, `--force` | beta |
|
|
656
|
+
| Redacted change previews | `KYA_DIFF_PREVIEW` | stable |
|
|
657
|
+
| Terminal desk | `kya dash`, `--once`, `--pane` | stable |
|
|
658
|
+
| IoC check | `kya doctor`, `kya doctor --iocs`, `--iocs`, `--json`, `KYA_IOC=0`, `ioc.enabled=false` | stable |
|
|
659
|
+
| Developer posture report (opt-in) | `kya posture`, `status`, `on`, `off`, `send`, `--dry-run`, `--json`, `label`, `--yes` | beta |
|
|
660
|
+
| Cost showback | none | stable |
|
|
661
|
+
| Never-list block | `kya hook` | stable |
|
|
662
|
+
| Guard pack | `kya hook` | stable |
|
|
663
|
+
| Advisory hook record | `kya hook` | stable |
|
|
664
|
+
| Strict hook mode | `kya hook`, `--strict` | stable |
|
|
665
|
+
| Local MCP gate server | `kya serve-mcp`, `--stdio`, `--port` | stable |
|
|
666
|
+
| Local MCP gateway | `kya gate`, `kya gate init`, `kya gate setup`, `kya gate run`, `kya gate stop`, `kya gate status`, `kya gate doctor` | beta |
|
|
667
|
+
| Destructive names and ADMIN tier denied | none | beta |
|
|
668
|
+
| Auto-import of host MCP servers | `kya start`, `--no-gate`, `KYA_GATE` | beta |
|
|
669
|
+
| Evaluate and record a command | `kya wrap`, `--offline`, `--hold`, `--json`, `--work-item`, `--tool-id`, `--irreversible` | stable |
|
|
670
|
+
| Policy evaluate, exit codes | `kya eval-tool`, `--offline`, `--tool-id`, `--irreversible`, `--args`, `--session-risk`, `--risk`, `--approval-status`, `--sandbox-id` | stable |
|
|
671
|
+
| Read-only ORR board | `kya orr run`, `--path`, `--producer`, `--out`, `--skip-optional-producers`, `--agentshield-json`, `--commit-sha`, `--name`, `--rubric`, `--disable-category`, `--usage`, `--scorecard`, `--quiet`, `--json-stdout`, `--fail-on`, `--format` | stable |
|
|
672
|
+
| Trust baseline gap report | `kya certify`, `--window`, `--fail-on`, `--open`, `--json-stdout`, `--catalog`, `--out`, `--format`, `--quiet` | stable |
|
|
673
|
+
| Local attestation | `kya certify`, `--attest`, `--text` | stable |
|
|
674
|
+
| Self-signed evidence bundle | `kya certify`, `--sign` | beta |
|
|
675
|
+
| EU AI Act mapping | none | beta |
|
|
676
|
+
| Import foreign traces | `kya import`, `--from`, `--file` | stable |
|
|
677
|
+
| Detections and fix briefs | `kya investigate`, `--json` | beta |
|
|
678
|
+
| Endpoint discovery | `kya discover`, `--json`, `--diff`, `--push`, `--file` | beta |
|
|
679
|
+
| Opt-in Firecracker wrap | `kya sandbox`, `--sandbox`, `--sandbox-id`, `--cmd`, `--path`, `--offline`, `KYA_SANDBOX` | beta |
|
|
680
|
+
| Alert webhooks | none | beta |
|
|
681
|
+
| OTLP export | `otlpPort` | beta |
|
|
682
|
+
| OTLP map attributes | `otlpExport.mapAttrs` | beta |
|
|
683
|
+
| In-process SDK shims | none | stable |
|
|
684
|
+
| Python framework shim | `pip install shield-kya` | beta |
|
|
685
|
+
| Claude Code plugin | `/plugin install kya@shield-kya` | stable |
|
|
686
|
+
| Codex plugin | `codex plugin add kya@shield-kya` | stable |
|
|
687
|
+
| Copilot CLI plugin | `copilot plugin install kya@shield-kya` | beta |
|
|
688
|
+
| Gemini CLI extension | `gemini extensions install` | stable |
|
|
689
|
+
| Cursor plugin | none | beta |
|
|
690
|
+
| VS Code extension | none | beta |
|
|
691
|
+
| GitHub Action kya-certify | `uses: The-Pixel-Boys/kya-action` | stable |
|
|
692
|
+
| Org Hold | `KYA_HOLD`, `--hold` | stable |
|
|
693
|
+
| Plane connection and keys | `KYA_API_KEY`, `KYA_BASE_URL`, `KYA_HOST`, `--base-url`, `--api-key`, `--host`, `--agent-id` | stable |
|
|
694
|
+
| Hosted login (device code) | `kya login`, `--base-url` | beta |
|
|
695
|
+
| Sign out on this machine | `kya logout` | beta |
|
|
696
|
+
| Hosted calls to action | `KYA_QUIET`, `KYA_CTA` | beta |
|
|
697
|
+
<!-- features:end -->
|
|
698
|
+
|
|
535
699
|
## Docs
|
|
536
700
|
|
|
537
701
|
- [Install hub](https://shield-agent.com/install)
|
|
@@ -577,6 +741,8 @@ Opt-in. Default off.
|
|
|
577
741
|
|
|
578
742
|
**Decision span export:** set `KYA_OTLP_EXPORT_ENDPOINT` (or `"otlpExport": { "endpoint": ... }` in `.kya/config.json`) to emit every decision as an OTLP/JSON GenAI span (`gen_ai.tool.name`, `kya.verdict`, `kya.reason_code`, token attributes when known) to any OTLP/HTTP backend. Long-lived processes (MCP gate, gateway) export every decision. Hook/wrap spawns export DENY / REQUIRE_APPROVE via the detached `notify-flush` helper. Plaintext http is accepted for loopback only unless `"insecure": true`. Flush results collect in `~/.kya/otel-stats.json` (endpoint host label, spans sent/failed, last export time), shown as the **OTel export** panel on the report's System tab.
|
|
579
743
|
|
|
744
|
+
**Map attributes on spans (opt-in, default off):** `"otlpExport": { "endpoint": ..., "mapAttrs": true }` in `.kya/config.json` in your account home folder (not `HOME` or `KYA_HOME`; owned by you, no group or other write (600 recommended), no hard link, not inside the project, symlink checks apply) adds `kya.target.class` (a class, never a path; a project class goes out as `project`) and `kya.device` (hashed device id), and sends `kya.session_id` as the session hash of `kya export`, so dashboards keyed on the raw id work only while it is off. `kya doctor` says on stderr when the file is ignored. Env, `HOME`, `KYA_HOME` and a project `.kya/config.json` cannot turn it on. See [`docs/otlp.md`](docs/otlp.md).
|
|
745
|
+
|
|
580
746
|
**Hosted plane:** richer Micrometer gauges and timers when `KYA_OTLP_ENABLED=true`.
|
|
581
747
|
|
|
582
748
|
Full env, Grafana/Datadog notes, forbid list, and a Collector sample: [`docs/otlp.md`](docs/otlp.md).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"amp.mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.33.1", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
package/data/iocs.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"version": "2026-10-30.1",
|
|
4
|
+
"iocs": [
|
|
5
|
+
{
|
|
6
|
+
"id": "ioc-2026-claude-vscode-trojan",
|
|
7
|
+
"title": "Trojanized anthropic.claude-code 2.1.313",
|
|
8
|
+
"severity": "critical",
|
|
9
|
+
"source": "https://thehackernews.com/2026/10/official-claude-code-vs-code-extension.html",
|
|
10
|
+
"checks": [
|
|
11
|
+
{ "kind": "extension", "id": "anthropic.claude-code", "versions": ["2.1.313"] },
|
|
12
|
+
{ "kind": "ssh_authorized_keys_comment", "value": "svc-telemetry" },
|
|
13
|
+
{ "kind": "net_indicator", "value": "134.209.82.225", "where": ["crontab", "launchagents", "systemd_user", "ssh_config", "shell_rc"] }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
package/dist/cli.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface CliIo {
|
|
|
17
17
|
/** Raw-answer prompt seam for the telemetry consent question (default: readline on stdin/stderr). */
|
|
18
18
|
readonly ask?: (question: string) => Promise<string>;
|
|
19
19
|
}
|
|
20
|
-
/** Whether the CLI entry will exit right after the hook answer
|
|
20
|
+
/** Whether the CLI entry will exit right after the hook answer. Exposed for tests. */
|
|
21
21
|
export declare function hostedExitPending(): boolean;
|
|
22
22
|
/** Testable entry - does not call process.exit when custom io.exit is provided that throws. */
|
|
23
23
|
export declare function runCli(argv: readonly string[], io?: CliIo, env?: NodeJS.ProcessEnv, cwd?: string): Promise<number>;
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAkLH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1D,qGAAqG;IACrG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACtD;AAcD,sFAAsF;AACtF,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED,+FAA+F;AAC/F,wBAAsB,MAAM,CAC1B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,KAAiB,EACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAs7BjB"}
|