@shield-agent/kya 0.1.16 → 0.1.17

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 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.16", "serve-mcp", "--stdio"],
5
+ "args": ["--no-install", "@shield-agent/kya@0.1.17", "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.16", "serve-mcp", "--stdio"],
82
+ "args": ["--no-install", "@shield-agent/kya@0.1.17", "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.16 serve-mcp --stdio
109
+ npx --no-install @shield-agent/kya@0.1.17 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.16 serve-mcp --stdio`. Hosted Codex uses `url = "https://shield-agent.com/mcp"` with `bearer_token_env_var = "KYA_API_KEY"`.
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.17 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`. The `shield-kya` block is stdio. The `shield-kya-hosted` block uses `httpUrl` `https://shield-agent.com/mcp` and a Bearer header.
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.16", "serve-mcp", "--stdio"],
5
+ "args": ["--no-install", "@shield-agent/kya@0.1.17", "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.16", "serve-mcp", "--stdio"],
5
+ "args": ["--no-install", "@shield-agent/kya@0.1.17", "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
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "shield-kya": {
4
+ "httpUrl": "https://shield-agent.com/mcp",
5
+ "headers": {
6
+ "Authorization": "Bearer ${KYA_API_KEY}"
7
+ },
8
+ "timeout": 30000,
9
+ "trust": false
10
+ }
11
+ }
12
+ }
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` / private IPs. A tunnel is fine for your own debugging. It is not something we ship or support as a product path.
12
+ Grok rejects `localhost` and private IPs. A tunnel is only for your own debugging and still requires the Bearer key. We do not ship or support unauthenticated public tunnels.
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
- # Pass Shield machine key however your SDK build accepts custom headers /
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
- Confirm the current `mcp(...)` kwargs in [xAI remote MCP docs](https://docs.x.ai/docs/developers/tools/remote-mcp). The URL is always `https://shield-agent.com/mcp`.
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.16 serve-mcp --stdio
43
+ npx --no-install @shield-agent/kya@0.1.17 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.16",
5
+ "version": "0.1.17",
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.16", "serve-mcp", "--stdio"],
6
+ "args": ["--no-install", "@shield-agent/kya@0.1.17", "serve-mcp", "--stdio"],
7
7
  "env": {
8
8
  "KYA_BASE_URL": "${KYA_BASE_URL}",
9
9
  "KYA_API_KEY": "${KYA_API_KEY}",
@@ -4,20 +4,22 @@
4
4
  #
5
5
  # ChatGPT Apps (chatgpt.com Developer Mode) are deferred: that path wants OAuth.
6
6
  # Use Codex here, or the hosted Responses API snippet in responses-mcp.example.json.
7
+ #
8
+ # Do not put API keys in this file. Inherit them from the environment.
7
9
 
8
10
  # --- Local stdio (OSS) ---
9
11
  [mcp_servers.shield-kya]
10
12
  command = "npx"
11
- args = ["--no-install", "@shield-agent/kya@0.1.16", "serve-mcp", "--stdio"]
13
+ args = ["--no-install", "@shield-agent/kya@0.1.17", "serve-mcp", "--stdio"]
12
14
  startup_timeout_sec = 20
15
+ env_vars = ["KYA_BASE_URL", "KYA_API_KEY", "KYA_HOST", "KYA_AGENT_ID"]
13
16
 
14
17
  [mcp_servers.shield-kya.env]
15
18
  KYA_BASE_URL = "https://shield-agent.com"
16
- KYA_API_KEY = "replace-me"
17
19
  KYA_HOST = "ide"
18
- # KYA_AGENT_ID = "optional-after-register"
19
20
 
20
21
  # --- Hosted Streamable HTTP (same three tools) ---
22
+ # Pick stdio OR hosted, not both.
21
23
  # [mcp_servers.shield-kya-hosted]
22
24
  # url = "https://shield-agent.com/mcp"
23
25
  # bearer_token_env_var = "KYA_API_KEY"
@@ -1,13 +1,12 @@
1
1
  {
2
- "comment": "OpenAI Responses API remote MCP — hosted Shield KYA. Replace YOUR_KYA_API_KEY. ChatGPT Apps (chatgpt.com) are deferred until OAuth DCR.",
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 YOUR_KYA_API_KEY",
10
- "require_approval": "never"
9
+ "authorization": "Bearer ${KYA_API_KEY}"
11
10
  }
12
11
  ],
13
12
  "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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shield-agent/kya",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Know Your Agent light CLI + local MCP gate (provider-agnostic, zero vertical packs required).",
5
5
  "license": "MIT",
6
6
  "type": "module",
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.16",
10
+ "version": "0.1.17",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@shield-agent/kya",
15
- "version": "0.1.16",
15
+ "version": "0.1.17",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },