github-agent 0.11.0__tar.gz → 0.11.1__tar.gz

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.
Files changed (28) hide show
  1. {github_agent-0.11.0 → github_agent-0.11.1}/PKG-INFO +47 -47
  2. {github_agent-0.11.0 → github_agent-0.11.1}/README.md +46 -46
  3. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/agent_server.py +31 -24
  4. github_agent-0.11.1/github_agent/api_client.py +546 -0
  5. github_agent-0.11.1/github_agent/mcp_server.py +690 -0
  6. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/PKG-INFO +47 -47
  7. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/SOURCES.txt +1 -0
  8. {github_agent-0.11.0 → github_agent-0.11.1}/pyproject.toml +1 -1
  9. github_agent-0.11.1/scripts/verify_api_integration.py +279 -0
  10. {github_agent-0.11.0 → github_agent-0.11.1}/tests/test_concept_parity.py +27 -19
  11. {github_agent-0.11.0 → github_agent-0.11.1}/tests/test_github_agent_brute_force_coverage.py +2 -2
  12. {github_agent-0.11.0 → github_agent-0.11.1}/tests/test_startup.py +4 -5
  13. github_agent-0.11.0/github_agent/api_client.py +0 -278
  14. github_agent-0.11.0/github_agent/mcp_server.py +0 -292
  15. {github_agent-0.11.0 → github_agent-0.11.1}/LICENSE +0 -0
  16. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/__init__.py +0 -0
  17. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/__main__.py +0 -0
  18. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/auth.py +1 -1
  19. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/github_input_models.py +0 -0
  20. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/github_response_models.py +0 -0
  21. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent/mcp_config.json +0 -0
  22. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/dependency_links.txt +0 -0
  23. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/entry_points.txt +0 -0
  24. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/requires.txt +0 -0
  25. {github_agent-0.11.0 → github_agent-0.11.1}/github_agent.egg-info/top_level.txt +0 -0
  26. {github_agent-0.11.0 → github_agent-0.11.1}/scripts/validate_a2a_agent.py +0 -0
  27. {github_agent-0.11.0 → github_agent-0.11.1}/setup.cfg +0 -0
  28. {github_agent-0.11.0 → github_agent-0.11.1}/tests/test_github_agent_api_brute_force_coverage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
6
  License: MIT
@@ -41,7 +41,7 @@ Dynamic: license-file
41
41
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
42
42
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
43
43
 
44
- *Version: 0.11.0*
44
+ *Version: 0.11.1*
45
45
 
46
46
  ## Overview
47
47
 
@@ -178,6 +178,42 @@ The `github-agent` command starts the server.
178
178
  github-agent --provider openai --model-id gpt-4o --api-key sk-...
179
179
  ```
180
180
 
181
+ ## Security & Governance
182
+
183
+ This project is built on [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities), inheriting enterprise-grade security and governance features.
184
+
185
+ ### Authentication & Authorization
186
+ | Feature | Description |
187
+ |---------|-------------|
188
+ | **OIDC Token Delegation** | RFC 8693 token exchange for user-context propagation from A2A → MCP |
189
+ | **Eunomia Policies** | Fine-grained, policy-driven tool authorization (`none`, `embedded`, `remote`) |
190
+ | **Scoped Credentials** | Tools execute with the caller's scoped identity where possible |
191
+ | **3LO / OAuth / API Token** | Multiple auth strategies with graceful fallback |
192
+
193
+ ### Eunomia Policy Enforcement
194
+ Eunomia provides a policy enforcement point for all tool calls:
195
+ - **Embedded mode**: Load local `mcp_policies.json` for role-based access, sensitivity gating, and audit logging
196
+ - **Remote mode**: Forward authorization decisions to a central Eunomia policy server for multi-agent governance
197
+ - Enable via CLI: `--eunomia-type embedded --eunomia-policy-file mcp_policies.json`
198
+
199
+ ### Runtime Protections
200
+ | Protection | Description |
201
+ |------------|-------------|
202
+ | **Tool Guard** | Sensitivity detection with human-in-the-loop approval gating |
203
+ | **Prompt Injection Defense** | Input scanning and repetition/loop guards |
204
+ | **Content Filtering** | Output schema enforcement and cost budget controls |
205
+ | **Stuck Loop Detection** | Automatic detection and recovery from agent loops |
206
+ | **Context Limit Warnings** | Proactive alerts before context window exhaustion |
207
+
208
+ ### Graph Agent Architecture
209
+ The A2A agent uses `pydantic-graph` orchestration with:
210
+ - **RouterNode**: Lightweight classifier that routes queries to specialized domains
211
+ - **DomainNode**: Focused executor with only relevant tools loaded, preventing tool hallucination
212
+ - **Approval Gates**: Policy-driven approval workflows before sensitive operations
213
+ - **Usage Guards**: Budget and rate limiting enforcement
214
+
215
+ > **Production Recommendation**: Enable `--eunomia-type embedded` (or `remote`) + OIDC delegation + containerized deployment. See [`agent-utilities` documentation](https://github.com/Knuckles-Team/agent-utilities) for full policy configuration.
216
+
181
217
  ## Docker
182
218
 
183
219
  ### Build
@@ -229,63 +265,27 @@ docker-compose up -d
229
265
 
230
266
  ## MCP Configuration Examples
231
267
 
232
- ### 1. Standard IO (stdio) Deployment
233
-
268
+ ### stdio (recommended for local development)
234
269
  ```json
235
270
  {
236
271
  "mcpServers": {
237
- "github-agent": {
238
- "command": "uv",
239
- "args": [
240
- "run",
241
- "github-mcp"
242
- ],
272
+ "github": {
273
+ "command": ".venv/bin/github-mcp",
274
+ "args": [],
243
275
  "env": {
244
- "AGENT_DESCRIPTION": "<YOUR_AGENT_DESCRIPTION>",
245
- "AGENT_SYSTEM_PROMPT": "<YOUR_AGENT_SYSTEM_PROMPT>",
246
- "CONTENTSTOOL": "True",
247
- "DEFAULT_AGENT_NAME": "<YOUR_DEFAULT_AGENT_NAME>",
248
- "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>",
249
- "GITHUB_URL": "<YOUR_GITHUB_URL>",
250
- "GITHUB_VERIFY": "<YOUR_GITHUB_VERIFY>",
251
- "ISSUETOOL": "True",
252
- "PULLSTOOL": "True",
253
- "REPOSTOOL": "True"
254
- }
276
+ "GITHUB_TOKEN": ""
277
+ }
255
278
  }
256
279
  }
257
280
  }
258
281
  ```
259
282
 
260
- ### 2. Streamable HTTP (SSE) Deployment
261
-
283
+ ### Streamable HTTP (recommended for production)
262
284
  ```json
263
285
  {
264
286
  "mcpServers": {
265
- "github-agent": {
266
- "command": "uv",
267
- "args": [
268
- "run",
269
- "github-mcp",
270
- "--transport",
271
- "http",
272
- "--host",
273
- "0.0.0.0",
274
- "--port",
275
- "8000"
276
- ],
277
- "env": {
278
- "AGENT_DESCRIPTION": "<YOUR_AGENT_DESCRIPTION>",
279
- "AGENT_SYSTEM_PROMPT": "<YOUR_AGENT_SYSTEM_PROMPT>",
280
- "CONTENTSTOOL": "True",
281
- "DEFAULT_AGENT_NAME": "<YOUR_DEFAULT_AGENT_NAME>",
282
- "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>",
283
- "GITHUB_URL": "<YOUR_GITHUB_URL>",
284
- "GITHUB_VERIFY": "<YOUR_GITHUB_VERIFY>",
285
- "ISSUETOOL": "True",
286
- "PULLSTOOL": "True",
287
- "REPOSTOOL": "True"
288
- }
287
+ "github": {
288
+ "url": "http://localhost:8080/github-mcp/mcp"
289
289
  }
290
290
  }
291
291
  }
@@ -21,7 +21,7 @@
21
21
  ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
22
22
  ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
23
23
 
24
- *Version: 0.11.0*
24
+ *Version: 0.11.1*
25
25
 
26
26
  ## Overview
27
27
 
@@ -158,6 +158,42 @@ The `github-agent` command starts the server.
158
158
  github-agent --provider openai --model-id gpt-4o --api-key sk-...
159
159
  ```
160
160
 
161
+ ## Security & Governance
162
+
163
+ This project is built on [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities), inheriting enterprise-grade security and governance features.
164
+
165
+ ### Authentication & Authorization
166
+ | Feature | Description |
167
+ |---------|-------------|
168
+ | **OIDC Token Delegation** | RFC 8693 token exchange for user-context propagation from A2A → MCP |
169
+ | **Eunomia Policies** | Fine-grained, policy-driven tool authorization (`none`, `embedded`, `remote`) |
170
+ | **Scoped Credentials** | Tools execute with the caller's scoped identity where possible |
171
+ | **3LO / OAuth / API Token** | Multiple auth strategies with graceful fallback |
172
+
173
+ ### Eunomia Policy Enforcement
174
+ Eunomia provides a policy enforcement point for all tool calls:
175
+ - **Embedded mode**: Load local `mcp_policies.json` for role-based access, sensitivity gating, and audit logging
176
+ - **Remote mode**: Forward authorization decisions to a central Eunomia policy server for multi-agent governance
177
+ - Enable via CLI: `--eunomia-type embedded --eunomia-policy-file mcp_policies.json`
178
+
179
+ ### Runtime Protections
180
+ | Protection | Description |
181
+ |------------|-------------|
182
+ | **Tool Guard** | Sensitivity detection with human-in-the-loop approval gating |
183
+ | **Prompt Injection Defense** | Input scanning and repetition/loop guards |
184
+ | **Content Filtering** | Output schema enforcement and cost budget controls |
185
+ | **Stuck Loop Detection** | Automatic detection and recovery from agent loops |
186
+ | **Context Limit Warnings** | Proactive alerts before context window exhaustion |
187
+
188
+ ### Graph Agent Architecture
189
+ The A2A agent uses `pydantic-graph` orchestration with:
190
+ - **RouterNode**: Lightweight classifier that routes queries to specialized domains
191
+ - **DomainNode**: Focused executor with only relevant tools loaded, preventing tool hallucination
192
+ - **Approval Gates**: Policy-driven approval workflows before sensitive operations
193
+ - **Usage Guards**: Budget and rate limiting enforcement
194
+
195
+ > **Production Recommendation**: Enable `--eunomia-type embedded` (or `remote`) + OIDC delegation + containerized deployment. See [`agent-utilities` documentation](https://github.com/Knuckles-Team/agent-utilities) for full policy configuration.
196
+
161
197
  ## Docker
162
198
 
163
199
  ### Build
@@ -209,63 +245,27 @@ docker-compose up -d
209
245
 
210
246
  ## MCP Configuration Examples
211
247
 
212
- ### 1. Standard IO (stdio) Deployment
213
-
248
+ ### stdio (recommended for local development)
214
249
  ```json
215
250
  {
216
251
  "mcpServers": {
217
- "github-agent": {
218
- "command": "uv",
219
- "args": [
220
- "run",
221
- "github-mcp"
222
- ],
252
+ "github": {
253
+ "command": ".venv/bin/github-mcp",
254
+ "args": [],
223
255
  "env": {
224
- "AGENT_DESCRIPTION": "<YOUR_AGENT_DESCRIPTION>",
225
- "AGENT_SYSTEM_PROMPT": "<YOUR_AGENT_SYSTEM_PROMPT>",
226
- "CONTENTSTOOL": "True",
227
- "DEFAULT_AGENT_NAME": "<YOUR_DEFAULT_AGENT_NAME>",
228
- "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>",
229
- "GITHUB_URL": "<YOUR_GITHUB_URL>",
230
- "GITHUB_VERIFY": "<YOUR_GITHUB_VERIFY>",
231
- "ISSUETOOL": "True",
232
- "PULLSTOOL": "True",
233
- "REPOSTOOL": "True"
234
- }
256
+ "GITHUB_TOKEN": ""
257
+ }
235
258
  }
236
259
  }
237
260
  }
238
261
  ```
239
262
 
240
- ### 2. Streamable HTTP (SSE) Deployment
241
-
263
+ ### Streamable HTTP (recommended for production)
242
264
  ```json
243
265
  {
244
266
  "mcpServers": {
245
- "github-agent": {
246
- "command": "uv",
247
- "args": [
248
- "run",
249
- "github-mcp",
250
- "--transport",
251
- "http",
252
- "--host",
253
- "0.0.0.0",
254
- "--port",
255
- "8000"
256
- ],
257
- "env": {
258
- "AGENT_DESCRIPTION": "<YOUR_AGENT_DESCRIPTION>",
259
- "AGENT_SYSTEM_PROMPT": "<YOUR_AGENT_SYSTEM_PROMPT>",
260
- "CONTENTSTOOL": "True",
261
- "DEFAULT_AGENT_NAME": "<YOUR_DEFAULT_AGENT_NAME>",
262
- "GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>",
263
- "GITHUB_URL": "<YOUR_GITHUB_URL>",
264
- "GITHUB_VERIFY": "<YOUR_GITHUB_VERIFY>",
265
- "ISSUETOOL": "True",
266
- "PULLSTOOL": "True",
267
- "REPOSTOOL": "True"
268
- }
267
+ "github": {
268
+ "url": "http://localhost:8080/github-mcp/mcp"
269
269
  }
270
270
  }
271
271
  }
@@ -4,15 +4,7 @@ import os
4
4
  import sys
5
5
  import warnings
6
6
 
7
- from agent_utilities import (
8
- build_system_prompt_from_workspace,
9
- create_agent_parser,
10
- create_graph_agent_server,
11
- initialize_workspace,
12
- load_identity,
13
- )
14
-
15
- __version__ = "0.11.0"
7
+ __version__ = "0.11.1"
16
8
 
17
9
  logging.basicConfig(
18
10
  level=logging.INFO,
@@ -22,23 +14,38 @@ logging.basicConfig(
22
14
  logger = logging.getLogger(__name__)
23
15
 
24
16
 
25
- initialize_workspace()
26
- meta = load_identity()
27
- DEFAULT_AGENT_NAME = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "Github Agent"))
28
- DEFAULT_AGENT_DESCRIPTION = os.getenv(
29
- "AGENT_DESCRIPTION",
30
- meta.get(
31
- "description",
32
- "AI agent for GitHub Agent management.",
33
- ),
34
- )
35
- DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
36
- "AGENT_SYSTEM_PROMPT",
37
- meta.get("content") or build_system_prompt_from_workspace(),
38
- )
17
+ DEFAULT_AGENT_NAME = None
18
+ DEFAULT_AGENT_DESCRIPTION = None
19
+ DEFAULT_AGENT_SYSTEM_PROMPT = None
39
20
 
40
21
 
41
22
  def agent_server():
23
+ from agent_utilities import (
24
+ build_system_prompt_from_workspace,
25
+ create_agent_parser,
26
+ create_agent_server,
27
+ initialize_workspace,
28
+ load_identity,
29
+ )
30
+
31
+ global DEFAULT_AGENT_NAME, DEFAULT_AGENT_DESCRIPTION, DEFAULT_AGENT_SYSTEM_PROMPT
32
+ initialize_workspace()
33
+ meta = load_identity()
34
+ DEFAULT_AGENT_NAME = os.getenv(
35
+ "DEFAULT_AGENT_NAME", meta.get("name", "Github Agent")
36
+ )
37
+ DEFAULT_AGENT_DESCRIPTION = os.getenv(
38
+ "AGENT_DESCRIPTION",
39
+ meta.get(
40
+ "description",
41
+ "AI agent for GitHub Agent management.",
42
+ ),
43
+ )
44
+ DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
45
+ "AGENT_SYSTEM_PROMPT",
46
+ meta.get("content") or build_system_prompt_from_workspace(),
47
+ )
48
+
42
49
  warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
43
50
  warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
44
51
 
@@ -51,7 +58,7 @@ def agent_server():
51
58
  logger.debug("Debug mode enabled")
52
59
 
53
60
  # Start server using the auto-discovery pattern (from mcp_config.json)
54
- create_graph_agent_server(
61
+ create_agent_server(
55
62
  mcp_url=args.mcp_url,
56
63
  mcp_config=args.mcp_config or "mcp_config.json",
57
64
  host=args.host,