@shield-agent/kya 0.32.6 → 0.32.9
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 +2 -2
- package/.mcp.json +1 -1
- package/README.md +67 -13
- 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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +101 -38
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/eval-tool.js +1 -1
- package/dist/commands/eval-tool.js.map +1 -1
- package/dist/commands/hook.d.ts.map +1 -1
- package/dist/commands/hook.js +21 -6
- package/dist/commands/hook.js.map +1 -1
- package/dist/commands/login.d.ts +34 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +74 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/cta.d.ts +23 -0
- package/dist/cta.d.ts.map +1 -0
- package/dist/cta.js +86 -0
- package/dist/cta.js.map +1 -0
- package/dist/fs-atomic.d.ts +6 -0
- package/dist/fs-atomic.d.ts.map +1 -1
- package/dist/fs-atomic.js +14 -3
- package/dist/fs-atomic.js.map +1 -1
- package/dist/login/credentials.d.ts +17 -0
- package/dist/login/credentials.d.ts.map +1 -0
- package/dist/login/credentials.js +64 -0
- package/dist/login/credentials.js.map +1 -0
- package/dist/login/device-flow.d.ts +44 -0
- package/dist/login/device-flow.d.ts.map +1 -0
- package/dist/login/device-flow.js +205 -0
- package/dist/login/device-flow.js.map +1 -0
- package/dist/mcp/protocol.js +1 -1
- package/dist/mcp/protocol.js.map +1 -1
- package/dist/never-list-input.d.ts +56 -0
- package/dist/never-list-input.d.ts.map +1 -0
- package/dist/never-list-input.js +1222 -0
- package/dist/never-list-input.js.map +1 -0
- package/dist/offline-evaluate.d.ts +17 -5
- package/dist/offline-evaluate.d.ts.map +1 -1
- package/dist/offline-evaluate.js +67 -9
- package/dist/offline-evaluate.js.map +1 -1
- package/dist/otel.d.ts +8 -2
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +32 -16
- package/dist/otel.js.map +1 -1
- package/dist/receipt/embeddings.d.ts +5 -1
- package/dist/receipt/embeddings.d.ts.map +1 -1
- package/dist/receipt/embeddings.js +71 -8
- package/dist/receipt/embeddings.js.map +1 -1
- package/dist/receipt/render-receipt.d.ts.map +1 -1
- package/dist/receipt/render-receipt.js +8 -2
- package/dist/receipt/render-receipt.js.map +1 -1
- package/dist/star-cta.d.ts +2 -2
- package/dist/star-cta.d.ts.map +1 -1
- package/dist/star-cta.js +1 -1
- package/dist/star-cta.js.map +1 -1
- package/dist/trail.d.ts +4 -0
- package/dist/trail.d.ts.map +1 -1
- package/dist/trail.js +14 -0
- 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 +2 -5
- package/qwen/settings.example.json +1 -1
- package/server.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shield-kya",
|
|
3
|
-
"version": "0.32.
|
|
4
|
-
"description": "Audit trail and traceability for AI agents. See what every coding agent did
|
|
3
|
+
"version": "0.32.9",
|
|
4
|
+
"description": "Audit trail and traceability for AI agents. See what every coding agent did and check each tool call against policy.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Shield Agent",
|
|
7
7
|
"email": "it@shield-agent.com"
|
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.32.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@shield-agent/kya)
|
|
4
4
|
[](https://www.npmjs.com/package/@shield-agent/kya)
|
|
5
|
-
[](https://www.npmjs.com/package/@shield-agent/kya)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
[](https://shield-agent.com/install)
|
|
8
8
|
[](https://x.com/coscosmico)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
**Audit trail and traceability for AI agents.** See what every coding agent did
|
|
11
|
+
**Audit trail and traceability for AI agents.** See what every coding agent did and check each tool call against policy. Every tool call is recorded on a live local dashboard and can be checked against the Agent Trust Baseline. The open source client is advisory and fails open (an error lets the call through), apart from a small never-list of dangerous calls that is always denied. 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
|
|
@@ -25,13 +25,16 @@ Walkthrough: [how you use it](https://shield-agent.com/how-kya-works#using).
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
npx @shield-agent/kya@latest --help
|
|
28
|
+
npx @shield-agent/kya@latest --version
|
|
28
29
|
```
|
|
29
30
|
|
|
31
|
+
`--version`, `-v`, `-V` and `kya version` print the installed package version on one line and exit `0`. They read the local package only: no network, no banner, no config.
|
|
32
|
+
|
|
30
33
|
Requires **Node.js 22+** (`engines.node: >=22`); 24 is the recommended line. Node 20 and 21 are unsupported but work: the CLI prints a one-line warning. Node 18 and older are unsupported and some features break there (HTTP `serve-mcp`, the gateway OTLP receiver). Below 22 the CLI offers to install Node 24 for you (via volta / fnm / nvm / brew), reinstall itself, and finish the command. If you decline, it just prints the warning and continues. `kya hook` never warns or prompts.
|
|
31
34
|
|
|
32
35
|
It works with any host that speaks MCP or OpenAPI. Vertical packs are optional. Shield is the only policy decision point (the one place that decides Allow or Deny). This gate never auto-approves an irreversible side effect (a change you cannot undo).
|
|
33
36
|
|
|
34
|
-
If `KYA_API_KEY` is empty against an authenticated plane, network commands exit non-zero. `eval-tool`, `wrap`, and `invoke` exit `0` on ALLOW, `4` on REQUIRE_APPROVE, and `1` on DENY or unknown, so a line like `eval-tool && write` cannot skip the gate.
|
|
37
|
+
If `KYA_API_KEY` is empty against an authenticated plane, network commands exit non-zero. `eval-tool`, `wrap`, and `invoke` exit `0` on ALLOW, `4` on REQUIRE_APPROVE, and `1` on DENY or unknown, so a line like `eval-tool && write` cannot skip the gate. `wrap` runs in observe mode by default, so it exits `0` on REQUIRE_APPROVE too. Set `KYA_HOLD=1` or pass `--hold` to get the `4`.
|
|
35
38
|
|
|
36
39
|
`--offline` runs sample evaluate without a paid cloud (useful for DENY and REQUIRE_APPROVE demos). Creating an agent is itself a tool: offline, `kya.agent.register` comes back REQUIRE_APPROVE. Allow, break-glass, and approve mint modes (the modes that create approvals) live on the control plane.
|
|
37
40
|
|
|
@@ -47,7 +50,7 @@ More ways to install (same package; npm stays the reference path):
|
|
|
47
50
|
|
|
48
51
|
```bash
|
|
49
52
|
# Homebrew. Homebrew 7 may ask you to trust a third-party tap: run `brew tap The-Pixel-Boys/tap` first.
|
|
50
|
-
# The formula
|
|
53
|
+
# The formula does not install the semantic-search runtime. Search stays lexical until you opt in (see Natural-language search).
|
|
51
54
|
brew install The-Pixel-Boys/tap/shield-kya
|
|
52
55
|
|
|
53
56
|
# Scoop (not yet verified on Windows)
|
|
@@ -92,7 +95,7 @@ kya connect qwen --project # project scope instead of global
|
|
|
92
95
|
kya connect kiro --force # overwrite an existing shield-kya entry
|
|
93
96
|
```
|
|
94
97
|
|
|
95
|
-
Connect merges. It never rewrites a host config it cannot parse, and it keeps your other servers and keys. Supported hosts: `claude`, `grok`, `opencode`, `kilo`, `kiro`, `qwen`, `kimi`, `mastracode`, `amp`, `copilot`, `cursor`. Each wires `serve-mcp --stdio` with `KYA_OFFLINE=1` so the gate starts keyless (no API key). Set `KYA_API_KEY` in the host env when you point at an authenticated plane.
|
|
98
|
+
Connect merges. It never rewrites a host config it cannot parse, and it keeps your other servers and keys. Supported hosts: `claude`, `codex`, `grok`, `opencode`, `kilo`, `kiro`, `qwen`, `kimi`, `mastracode`, `amp`, `copilot`, `cursor`. Each wires `serve-mcp --stdio` with `KYA_OFFLINE=1` so the gate starts keyless (no API key). Set `KYA_API_KEY` in the host env when you point at an authenticated plane.
|
|
96
99
|
|
|
97
100
|
Hosts without a `connect` target still work: `kya wrap --offline -- <agent command>` puts the same evaluate gate in front of any CLI. Per-host recipes with verify steps and troubleshooting live in [docs/hosts/](docs/hosts/).
|
|
98
101
|
|
|
@@ -119,7 +122,7 @@ This repo is also a Claude Code plugin marketplace named `shield-kya` with one p
|
|
|
119
122
|
/plugin install kya@shield-kya
|
|
120
123
|
```
|
|
121
124
|
|
|
122
|
-
The plugin is **advisory and fails open**: it records every tool call on the local record (`~/.kya/trail.jsonl`) and blocks only the small never-list. 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
|
|
125
|
+
The plugin is **advisory and fails open**: it records every tool call on the local record (`~/.kya/trail.jsonl`) and blocks only the small never-list. 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.
|
|
123
126
|
|
|
124
127
|
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).
|
|
125
128
|
|
|
@@ -172,6 +175,8 @@ kya connect claude --gate # point the host at the gateway (server key shield-k
|
|
|
172
175
|
kya gate doctor # binary, config, listener health, loopback-only posture
|
|
173
176
|
```
|
|
174
177
|
|
|
178
|
+
If another process already holds a default port (`port` 3930 or `otlpPort` 3931), `kya gate run` stops with `EADDRINUSE`. Set free ports in `.kya/gateways.json` (`port` and `otlpPort`), then run it again.
|
|
179
|
+
|
|
175
180
|
`kya gate stop` stops the supervisor and the binary with it. Honest notes: `kya gate setup` (and `kya start`'s auto-bootstrap, only when it found servers to govern) downloads the pinned gateway binary from our releases. Nothing else downloads anything. The only other network use is the opt-in anonymous usage stats in [docs/telemetry.md](docs/telemetry.md), off unless you say yes. `run` never downloads. Observe mode means allowed calls are recorded, not blocked. The deny set above is the only hard stop, and plane enforcement stays with `kya.policy_evaluate`. `kya connect <host> --gate` covers the same hosts as plain `connect`. Grok gets a `[mcp_servers.shield-kya-gate]` url table in its config.toml (Grok supports remote MCP servers over HTTP). Per-server tiers and recipes: [docs/mcp-servers.md](docs/mcp-servers.md).
|
|
176
181
|
|
|
177
182
|
## Longer path (optional)
|
|
@@ -191,7 +196,7 @@ Install hub: [https://shield-agent.com/install](https://shield-agent.com/install
|
|
|
191
196
|
|
|
192
197
|
## Activity record (global)
|
|
193
198
|
|
|
194
|
-
One record (trail) for all projects: `~/.kya/trail.jsonl` (`KYA_HOME` overrides `~`). `kya receipt --open` from any directory shows activity from every project. Each event carries its project folder name. The report adds a Projects rollup once two or more projects appear, and shows the project on each feed entry. Older per-project `<project>/.kya/trail.jsonl` files are still read and merged; no migration.
|
|
199
|
+
One record (trail) for all projects: `~/.kya/trail.jsonl` (`KYA_HOME` overrides `~`). `kya receipt --open` from any directory shows activity from every project. Each event carries its project folder name. The report adds a Projects rollup once two or more projects appear, and shows the project on each feed entry. Older per-project `<project>/.kya/trail.jsonl` files are still read and merged; no migration. Reports read only the last 1 MB of the record (oldest events drop out of the view); it is shared across all projects.
|
|
195
200
|
|
|
196
201
|
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.
|
|
197
202
|
|
|
@@ -203,14 +208,37 @@ Sharing is a single attempt by design (storm-proof: no silent retries against th
|
|
|
203
208
|
|
|
204
209
|
### Natural-language search
|
|
205
210
|
|
|
206
|
-
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
|
|
211
|
+
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
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# macOS and Linux (bash or zsh)
|
|
215
|
+
npm install --prefix "$HOME/.kya/semantic" @shield-agent/fastembed@3.0.0
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
```bat
|
|
219
|
+
:: Windows cmd
|
|
220
|
+
npm install --prefix "%USERPROFILE%\.kya\semantic" @shield-agent/fastembed@3.0.0
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```powershell
|
|
224
|
+
# Windows PowerShell
|
|
225
|
+
npm install --prefix "$env:USERPROFILE\.kya\semantic" @shield-agent/fastembed@3.0.0
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
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.
|
|
207
229
|
|
|
208
230
|
- Offline or `KYA_OFFLINE=1` keeps search purely lexical (no model download).
|
|
209
|
-
-
|
|
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.json`.
|
|
210
232
|
- `KYA_SEARCH_SEMANTIC=off` disables the model while still keeping BM25.
|
|
211
233
|
|
|
212
234
|
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.
|
|
213
235
|
|
|
236
|
+
## Upgrade notes
|
|
237
|
+
|
|
238
|
+
- 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
|
+
- 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
|
+
- Hook verdicts and fail-open rules are unchanged.
|
|
241
|
+
|
|
214
242
|
## Dual plane
|
|
215
243
|
|
|
216
244
|
```
|
|
@@ -224,6 +252,22 @@ The hosted console uses the same hybrid search on the server side (Postgres full
|
|
|
224
252
|
|
|
225
253
|
Tag sessions with `KYA_HOST=ide` or `KYA_HOST=runtime`. Same policy path either way.
|
|
226
254
|
|
|
255
|
+
## Plans (hosted, plan tiers v2)
|
|
256
|
+
|
|
257
|
+
The rows below apply only when the hosted service turns plan tiers v2 on. Until then the hosted plans are Free, Starter, Pro and Scale.
|
|
258
|
+
|
|
259
|
+
The hosted console has these plans. The CLI works on every plan. Solo and the no-card trial appear only when the hosted service turns plan tiers on.
|
|
260
|
+
|
|
261
|
+
| Plan | Price | Seats | Trail history | Notes |
|
|
262
|
+
|---|---|---|---|---|
|
|
263
|
+
| Free | $0 | 2 | 30 days | Start here |
|
|
264
|
+
| Solo | $90 a year | 1 | 90 days | CSV evidence export. Yearly only |
|
|
265
|
+
| Team | $29 a month | 5 | 90 days | Formerly "Starter" |
|
|
266
|
+
| Pro | $149 a month | 25 | 90 days | Compliance report PDF, signed evidence bundles |
|
|
267
|
+
| Scale | $499 a month | Unlimited | 365 days | SSO and SCIM |
|
|
268
|
+
|
|
269
|
+
n8n and Zapier access is included in every paid plan. There is no add-on price.
|
|
270
|
+
|
|
227
271
|
## Environment
|
|
228
272
|
|
|
229
273
|
| Variable | Required | Meaning |
|
|
@@ -242,6 +286,9 @@ Tag sessions with `KYA_HOST=ide` or `KYA_HOST=runtime`. Same policy path either
|
|
|
242
286
|
| `KYA_SHARE_URL` | No | `kya receipt --share` collector base (default `https://shield-agent.com`) |
|
|
243
287
|
| `KYA_TELEMETRY` | No | `0`/`off` forces anonymous usage stats off ([docs/telemetry.md](docs/telemetry.md)); they are off unless you opted in |
|
|
244
288
|
| `DO_NOT_TRACK` | No | `1` forces anonymous usage stats off, same as `KYA_TELEMETRY=0` |
|
|
289
|
+
| `KYA_BASE_URL` | No | Hosted console for `kya login` (default `https://shield-agent.com`; https or loopback only) |
|
|
290
|
+
| `KYA_QUIET` | No | Any true value hides the one-line hosted calls to action (`kya certify`, `kya receipt`) |
|
|
291
|
+
| `KYA_CTA` | No | `0`/`off` turns off the one-line hosted calls to action ([docs/login.md](docs/login.md#calls-to-action-one-line)) |
|
|
245
292
|
|
|
246
293
|
Gate mode can also be set in the project's `.kya/config.json`:
|
|
247
294
|
`{"gateMode": "hold"}` or `{"gateMode": "offline"}` (exact values only;
|
|
@@ -265,7 +312,7 @@ MCP Registry entry: `server.json` plus package `mcpName` `io.github.The-Pixel-Bo
|
|
|
265
312
|
"mcpServers": {
|
|
266
313
|
"shield-kya": {
|
|
267
314
|
"command": "npx",
|
|
268
|
-
"args": ["--no-install", "@shield-agent/kya@0.32.
|
|
315
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "serve-mcp", "--stdio"],
|
|
269
316
|
"env": {
|
|
270
317
|
"KYA_BASE_URL": "http://127.0.0.1:8090",
|
|
271
318
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -299,7 +346,9 @@ const run = governed({ toolId: "write_file", server: "filesystem", fn: myWrite }
|
|
|
299
346
|
await run({ path: "out.txt", content: "hi" }); // throws KyaDeniedError on DENY
|
|
300
347
|
```
|
|
301
348
|
|
|
302
|
-
Offline evaluate by default (no network, no hosted plane); an explicit config uses the live plane. `governA2aSend` gates in-process agent-to-agent sends.
|
|
349
|
+
Offline evaluate by default (no network, no hosted plane); an explicit config uses the live plane. `governA2aSend` gates in-process agent-to-agent sends. The `shield-kya` Python package on PyPI ships framework hooks (LangChain, CrewAI, OpenAI Agents SDK and others), fail-open like `kya hook`. Support matrix and recipes: `docs/sdk-integrations.md`; runnable scripts: `examples/sdk/`.
|
|
350
|
+
|
|
351
|
+
Framework recipes (each one tested with a scripted model and the published CLI): [LangChain](docs/sdk-integrations.md#langchain-python) · [OpenAI Agents SDK](docs/sdk-integrations.md#openai-agents-sdk-python) · [CrewAI](docs/sdk-integrations.md#crewai-python) · [LlamaIndex](docs/sdk-integrations.md#llamaindex-python) · [Mastra](docs/sdk-integrations.md#mastra-typescript) · [Vercel AI SDK](docs/sdk-integrations.md#vercel-ai-sdk-typescript)
|
|
303
352
|
|
|
304
353
|
## Claude connector
|
|
305
354
|
|
|
@@ -307,7 +356,7 @@ Offline evaluate by default (no network, no hosted plane); an explicit config us
|
|
|
307
356
|
|
|
308
357
|
```bash
|
|
309
358
|
# Prefer a preinstalled package (no registry auto-install):
|
|
310
|
-
npx --no-install @shield-agent/kya@0.32.
|
|
359
|
+
npx --no-install @shield-agent/kya@0.32.9 serve-mcp --stdio
|
|
311
360
|
# Or after npm i -g / local install:
|
|
312
361
|
kya serve-mcp --stdio
|
|
313
362
|
```
|
|
@@ -318,7 +367,7 @@ Copy `claude/claude_desktop_config.example.json` into Claude Desktop MCP setting
|
|
|
318
367
|
|
|
319
368
|
## OpenAI (Codex / Responses)
|
|
320
369
|
|
|
321
|
-
**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.32.
|
|
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.32.9 serve-mcp --stdio`. Hosted Codex uses `url = "https://shield-agent.com/mcp"` with `bearer_token_env_var = "KYA_API_KEY"`.
|
|
322
371
|
|
|
323
372
|
**Responses API:** see `openai/responses-mcp.example.json` (`server_url` + `Authorization: Bearer <KYA_API_KEY>`).
|
|
324
373
|
|
|
@@ -491,6 +540,7 @@ pnpm build
|
|
|
491
540
|
- [Top-20 MCP server support matrix (taxonomy + gate recipes)](docs/mcp-servers.md)
|
|
492
541
|
- [OTLP metrics (OSS + hosted)](docs/otlp.md)
|
|
493
542
|
- [Anonymous usage stats (opt-in): what is sent, controls, retention](docs/telemetry.md)
|
|
543
|
+
- [Link this machine to the hosted console (kya login)](docs/login.md)
|
|
494
544
|
- [OWASP MCP governance map](docs/owasp-mcp-governance.md)
|
|
495
545
|
- [Claude Code plugin](docs/hosts/claude-plugin.md) · [Copilot CLI plugin](docs/hosts/copilot.md#plugin) · [Codex plugin](docs/hosts/codex.md#codex-plugin) · [Gemini CLI extension](docs/hosts/gemini.md#gemini-cli-extension)
|
|
496
546
|
- [Import the AGT audit log (CLI)](docs/import-agt.md) · [hosted](docs/import-agt-hosted.md)
|
|
@@ -503,6 +553,10 @@ pnpm build
|
|
|
503
553
|
- [What is open source and what is hosted](docs/oss-vs-hosted.md)
|
|
504
554
|
- See also `LIMITATIONS.md` in this repo
|
|
505
555
|
|
|
556
|
+
## Hosted console (`kya login`, optional)
|
|
557
|
+
|
|
558
|
+
`kya login` links this machine to your hosted Shield KYA workspace. It uses the device code flow: the CLI shows a short code, you approve it in the hosted console, and the CLI saves a full-workspace API key with mode 0600 in `~/.kya/hosted-credentials.json`. `kya logout` deletes that file. It does not revoke the key on the server, so revoke it in the console too. The OSS CLI works without an account, and `kya certify` and the hook never read the saved key. Details, failure cases and the one-line calls to action: [docs/login.md](docs/login.md).
|
|
559
|
+
|
|
506
560
|
## Anonymous usage stats (opt-in, off by default)
|
|
507
561
|
|
|
508
562
|
The first time you run `kya start`, `kya init` or `kya connect` in a terminal, KYA asks once whether to share anonymous usage stats (`[y/N]`, the default is No). Only an explicit `y` or `yes` turns it on. Nothing is sent in CI, in non-interactive runs, with `--json`, or when `DO_NOT_TRACK=1` / `KYA_TELEMETRY=0` is set. `kya hook` itself never touches the network; when you opted in it starts a detached helper at most once a day that sends one `ping`, so hook-only installs still count as active.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"amp.mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.32.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "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.32.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "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.32.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "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.32.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.32.9", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
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;AA2JH,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;AAWD,oGAAoG;AACpG,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,CA20BjB"}
|