@shield-agent/kya 0.1.16 → 0.1.18
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/.mcp.json +1 -1
- package/README.md +4 -4
- package/claude/claude_desktop_config.example.json +1 -1
- package/gemini/settings.example.json +3 -9
- package/gemini/settings.hosted.example.json +12 -0
- package/grok/README.md +7 -5
- package/manifest.json +1 -1
- package/mcp.json +1 -1
- package/openai/codex.config.example.toml +7 -4
- package/openai/responses-mcp.example.json +3 -3
- package/package.json +1 -1
- package/server.json +2 -2
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.1.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.1.18", "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
|
@@ -79,7 +79,7 @@ MCP Registry entry: `server.json` plus package `mcpName` `io.github.The-Pixel-Bo
|
|
|
79
79
|
"mcpServers": {
|
|
80
80
|
"shield-kya": {
|
|
81
81
|
"command": "npx",
|
|
82
|
-
"args": ["--no-install", "@shield-agent/kya@0.1.
|
|
82
|
+
"args": ["--no-install", "@shield-agent/kya@0.1.18", "serve-mcp", "--stdio"],
|
|
83
83
|
"env": {
|
|
84
84
|
"KYA_BASE_URL": "http://127.0.0.1:8090",
|
|
85
85
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -106,7 +106,7 @@ npx @shield-agent/kya reject --id <approval-id>
|
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
108
|
# Prefer a preinstalled package (no registry auto-install):
|
|
109
|
-
npx --no-install @shield-agent/kya@0.1.
|
|
109
|
+
npx --no-install @shield-agent/kya@0.1.18 serve-mcp --stdio
|
|
110
110
|
# Or after npm i -g / local install:
|
|
111
111
|
kya serve-mcp --stdio
|
|
112
112
|
```
|
|
@@ -117,7 +117,7 @@ Copy `claude/claude_desktop_config.example.json` into Claude Desktop MCP setting
|
|
|
117
117
|
|
|
118
118
|
## OpenAI (Codex / Responses)
|
|
119
119
|
|
|
120
|
-
**Codex CLI / IDE:** copy `openai/codex.config.example.toml` into `~/.codex/config.toml`. Local stdio uses `npx --no-install @shield-agent/kya@0.1.
|
|
120
|
+
**Codex CLI / IDE:** copy `openai/codex.config.example.toml` into `~/.codex/config.toml`. Local stdio uses `npx --no-install @shield-agent/kya@0.1.18 serve-mcp --stdio`. Hosted Codex uses `url = "https://shield-agent.com/mcp"` with `bearer_token_env_var = "KYA_API_KEY"`.
|
|
121
121
|
|
|
122
122
|
**Responses API:** see `openai/responses-mcp.example.json` (`server_url` + `Authorization: Bearer <KYA_API_KEY>`).
|
|
123
123
|
|
|
@@ -125,7 +125,7 @@ Copy `claude/claude_desktop_config.example.json` into Claude Desktop MCP setting
|
|
|
125
125
|
|
|
126
126
|
## Gemini CLI
|
|
127
127
|
|
|
128
|
-
Merge `gemini/settings.example.json` into `~/.gemini/settings.json` or `.gemini/settings.json`.
|
|
128
|
+
Merge `gemini/settings.example.json` (stdio) or `gemini/settings.hosted.example.json` (`httpUrl` + Bearer) into `~/.gemini/settings.json` or `.gemini/settings.json`. Do not enable both at once.
|
|
129
129
|
|
|
130
130
|
## Grok
|
|
131
131
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.1.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.1.18", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -2,20 +2,14 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--no-install", "@shield-agent/kya@0.1.
|
|
5
|
+
"args": ["--no-install", "@shield-agent/kya@0.1.18", "serve-mcp", "--stdio"],
|
|
6
6
|
"env": {
|
|
7
7
|
"KYA_BASE_URL": "https://shield-agent.com",
|
|
8
8
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
9
9
|
"KYA_HOST": "ide"
|
|
10
10
|
},
|
|
11
|
-
"timeout": 30000
|
|
12
|
-
|
|
13
|
-
"shield-kya-hosted": {
|
|
14
|
-
"httpUrl": "https://shield-agent.com/mcp",
|
|
15
|
-
"headers": {
|
|
16
|
-
"Authorization": "Bearer ${KYA_API_KEY}"
|
|
17
|
-
},
|
|
18
|
-
"timeout": 30000
|
|
11
|
+
"timeout": 30000,
|
|
12
|
+
"trust": false
|
|
19
13
|
}
|
|
20
14
|
}
|
|
21
15
|
}
|
package/grok/README.md
CHANGED
|
@@ -9,36 +9,38 @@ Same three MCP tools as Claude and Codex: `kya.policy_evaluate`, `kya.session_in
|
|
|
9
9
|
3. Server URL: `https://shield-agent.com/mcp`.
|
|
10
10
|
4. Auth: machine API key as `Authorization: Bearer <KYA_API_KEY>` when the UI offers a request header / API key field. If the UI only offers OAuth or None, stop and use the xAI SDK or Codex/Gemini CLI instead. Do not turn auth off.
|
|
11
11
|
|
|
12
|
-
Grok rejects `localhost`
|
|
12
|
+
Grok rejects `localhost` and private IPs. Do not expose OSS HTTP MCP through a public URL. Use `https://shield-agent.com/mcp` with a Bearer machine key.
|
|
13
13
|
|
|
14
14
|
## Hosted (xAI SDK)
|
|
15
15
|
|
|
16
|
+
The Shield machine key must travel with the MCP request. Do not register `https://shield-agent.com/mcp` without it.
|
|
17
|
+
|
|
16
18
|
```python
|
|
17
19
|
import os
|
|
18
20
|
from xai_sdk import Client
|
|
19
21
|
from xai_sdk.tools import mcp
|
|
20
22
|
|
|
23
|
+
kya_key = os.environ["KYA_API_KEY"]
|
|
21
24
|
client = Client(api_key=os.environ["XAI_API_KEY"])
|
|
22
25
|
chat = client.chat.create(
|
|
23
26
|
model="grok-4.6",
|
|
24
27
|
tools=[
|
|
25
28
|
mcp(
|
|
26
29
|
server_url="https://shield-agent.com/mcp",
|
|
27
|
-
|
|
28
|
-
# authorization for remote MCP. Prefer Bearer <KYA_API_KEY>.
|
|
30
|
+
authorization=f"Bearer {kya_key}",
|
|
29
31
|
),
|
|
30
32
|
],
|
|
31
33
|
)
|
|
32
34
|
```
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
`authorization` is sent as the MCP `Authorization` header. Confirm kwargs in [xAI remote MCP docs](https://docs.x.ai/docs/developers/tools/remote-mcp). The URL is always `https://shield-agent.com/mcp`.
|
|
35
37
|
|
|
36
38
|
## Local / OSS
|
|
37
39
|
|
|
38
40
|
There is no grok.com stdio path. For a local agent host use the same stdio launch as Claude:
|
|
39
41
|
|
|
40
42
|
```bash
|
|
41
|
-
npx --no-install @shield-agent/kya@0.1.
|
|
43
|
+
npx --no-install @shield-agent/kya@0.1.18 serve-mcp --stdio
|
|
42
44
|
```
|
|
43
45
|
|
|
44
46
|
Env: `KYA_BASE_URL`, `KYA_API_KEY`, `KYA_HOST`. Codex and Gemini example configs in this package show the full snippets.
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "shield-kya",
|
|
4
4
|
"display_name": "Shield KYA",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.18",
|
|
6
6
|
"description": "Know Your Agent MCP gate: ALLOW / DENY / REQUIRE_APPROVE. Sole PEP is Shield.",
|
|
7
7
|
"long_description": "Local Claude Desktop extension that runs the packaged `dist/cli.js serve-mcp --stdio` against your Shield control plane (local or https://shield-agent.com). Tools evaluate policy, ingest session risk, and open Hold tickets. They never execute irreversible side effects.",
|
|
8
8
|
"author": {
|
package/mcp.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"shield-kya": {
|
|
4
4
|
"description": "Know Your Agent local MCP gate: wrap-before-write, named-agent registry, Hold/Clear.",
|
|
5
5
|
"command": "npx",
|
|
6
|
-
"args": ["--no-install", "@shield-agent/kya@0.1.
|
|
6
|
+
"args": ["--no-install", "@shield-agent/kya@0.1.18", "serve-mcp", "--stdio"],
|
|
7
7
|
"env": {
|
|
8
8
|
"KYA_BASE_URL": "${KYA_BASE_URL}",
|
|
9
9
|
"KYA_API_KEY": "${KYA_API_KEY}",
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
# Codex CLI / IDE — Shield KYA MCP
|
|
2
|
-
# Copy into ~/.codex/config.toml
|
|
2
|
+
# Copy into ~/.codex/config.toml. Do not drop a live key into a project's
|
|
3
|
+
# .codex/config.toml (that file is easy to commit).
|
|
3
4
|
# Docs: https://developers.openai.com/codex/mcp
|
|
4
5
|
#
|
|
5
6
|
# ChatGPT Apps (chatgpt.com Developer Mode) are deferred: that path wants OAuth.
|
|
6
7
|
# Use Codex here, or the hosted Responses API snippet in responses-mcp.example.json.
|
|
8
|
+
#
|
|
9
|
+
# Do not put API keys in this file. Inherit them from the environment.
|
|
7
10
|
|
|
8
11
|
# --- Local stdio (OSS) ---
|
|
9
12
|
[mcp_servers.shield-kya]
|
|
10
13
|
command = "npx"
|
|
11
|
-
args = ["--no-install", "@shield-agent/kya@0.1.
|
|
14
|
+
args = ["--no-install", "@shield-agent/kya@0.1.18", "serve-mcp", "--stdio"]
|
|
12
15
|
startup_timeout_sec = 20
|
|
16
|
+
env_vars = ["KYA_BASE_URL", "KYA_API_KEY", "KYA_HOST", "KYA_AGENT_ID"]
|
|
13
17
|
|
|
14
18
|
[mcp_servers.shield-kya.env]
|
|
15
19
|
KYA_BASE_URL = "https://shield-agent.com"
|
|
16
|
-
KYA_API_KEY = "replace-me"
|
|
17
20
|
KYA_HOST = "ide"
|
|
18
|
-
# KYA_AGENT_ID = "optional-after-register"
|
|
19
21
|
|
|
20
22
|
# --- Hosted Streamable HTTP (same three tools) ---
|
|
23
|
+
# Pick stdio OR hosted, not both.
|
|
21
24
|
# [mcp_servers.shield-kya-hosted]
|
|
22
25
|
# url = "https://shield-agent.com/mcp"
|
|
23
26
|
# bearer_token_env_var = "KYA_API_KEY"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"comment": "OpenAI Responses API remote MCP — hosted Shield KYA.
|
|
2
|
+
"comment": "OpenAI Responses API remote MCP — hosted Shield KYA. Put the machine key in env, not in git. ChatGPT Apps (chatgpt.com) are deferred until OAuth DCR. Leave OpenAI-side tool confirmation at the API default (do not auto-approve MCP calls).",
|
|
3
3
|
"model": "gpt-5.6",
|
|
4
4
|
"tools": [
|
|
5
5
|
{
|
|
6
6
|
"type": "mcp",
|
|
7
7
|
"server_label": "shield-kya",
|
|
8
8
|
"server_url": "https://shield-agent.com/mcp",
|
|
9
|
-
"authorization": "Bearer
|
|
10
|
-
"
|
|
9
|
+
"authorization": "Bearer ${KYA_API_KEY}",
|
|
10
|
+
"allowed_tools": ["kya.policy_evaluate"]
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"input": "Evaluate whether tool org.sample.data.write should proceed. Use the shield-kya policy tool. Do not invent an approval."
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/The-Pixel-Boys/shield-kya",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.1.
|
|
10
|
+
"version": "0.1.18",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@shield-agent/kya",
|
|
15
|
-
"version": "0.1.
|
|
15
|
+
"version": "0.1.18",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|