github-agent 2.4.14__py3-none-any.whl → 2.5.0__py3-none-any.whl

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 (83) hide show
  1. github_agent/api/api_client_dependabot.py +2 -0
  2. github_agent/api/api_client_orgs.py +4 -4
  3. github_agent/api/api_client_pages.py +2 -2
  4. github_agent/api/api_client_pulls.py +2 -0
  5. github_agent/auth.py +0 -10
  6. github_agent/connector_contracts.py +1191 -0
  7. github_agent/mcp/__init__.py +1 -33
  8. github_agent/mcp_server.py +135 -3402
  9. github_agent/ontology/certification.json +4 -4
  10. github_agent/ontology/github.ttl +12 -10
  11. github_agent/ontology/mappings/source.yaml +1 -2
  12. github_agent/ontology/shapes/connector.shacl.ttl +2 -2
  13. github_agent/prompts/github-mcp-operator.json +347 -0
  14. github_agent/prompts/github-mcp-release-manager.json +203 -0
  15. github_agent/prompts/github-mcp-repository-administrator.json +171 -0
  16. github_agent/prompts/github-mcp-triage-lead.json +147 -0
  17. github_agent/skills/github-actions-ci-review/SKILL.md +24 -75
  18. github_agent/skills/github-agent-development/SKILL.md +1 -2
  19. github_agent/skills/github-agent-operations/SKILL.md +47 -19
  20. github_agent/skills/github-backlog-planner/SKILL.md +31 -97
  21. github_agent/skills/github-ci-failure-sweep/SKILL.md +24 -93
  22. github_agent/skills/github-ci-failure-sweep/scripts/summarize_runs.py +1 -1
  23. github_agent/skills/github-dependabot-review/SKILL.md +16 -88
  24. github_agent/skills/github-issue-tracking/SKILL.md +23 -80
  25. github_agent/skills/github-org-remediation-loop/SKILL.md +44 -262
  26. github_agent/skills/github-pr-review-sweep/SKILL.md +47 -106
  27. github_agent/skills/github-pr-review-sweep/scripts/summarize_prs.py +7 -5
  28. github_agent/skills/github-project-provisioner/SKILL.md +27 -44
  29. github_agent/skills/github-pull-request-create/SKILL.md +20 -66
  30. github_agent/skills/github-pull-request-review/SKILL.md +47 -126
  31. github_agent/skills/github-repository-management/SKILL.md +61 -94
  32. github_agent/skills/github-tools/SKILL.md +28 -128
  33. github_agent/skills/github-triage-resolver/SKILL.md +33 -104
  34. github_agent/skills/github-triage-resolver/scripts/classify_safe.py +2 -2
  35. github_agent/skills/github-triage-resolver/scripts/gh_write.py +3 -3
  36. {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/METADATA +6 -46
  37. github_agent-2.5.0.dist-info/RECORD +102 -0
  38. tests/test_cq_paths.py +1 -1
  39. tests/test_default_content_surfaces.py +2 -0
  40. tests/test_destructive_declaration.py +86 -0
  41. tests/test_ontology_parent_link.py +5 -0
  42. tests/test_pages.py +0 -265
  43. github_agent/mcp/mcp_action.py +0 -296
  44. github_agent/mcp/mcp_branch.py +0 -153
  45. github_agent/mcp/mcp_collaborator.py +0 -125
  46. github_agent/mcp/mcp_commit.py +0 -94
  47. github_agent/mcp/mcp_content.py +0 -168
  48. github_agent/mcp/mcp_dependabot.py +0 -207
  49. github_agent/mcp/mcp_issue.py +0 -188
  50. github_agent/mcp/mcp_org.py +0 -359
  51. github_agent/mcp/mcp_pull.py +0 -353
  52. github_agent/mcp/mcp_release.py +0 -171
  53. github_agent/mcp/mcp_repo.py +0 -528
  54. github_agent/mcp/mcp_search.py +0 -82
  55. github_agent/skills/github-actions-ci-review/WORKFLOW.md +0 -82
  56. github_agent/skills/github-agent-operations/agents/openai.yaml +0 -4
  57. github_agent/skills/github-agent-operations/references/catalog.md +0 -17
  58. github_agent/skills/github-backlog-planner/WORKFLOW.md +0 -98
  59. github_agent/skills/github-ci-failure-sweep/WORKFLOW.md +0 -96
  60. github_agent/skills/github-ci-failure-sweep/references/actions-tool-cheatsheet.md +0 -60
  61. github_agent/skills/github-dependabot-review/WORKFLOW.md +0 -91
  62. github_agent/skills/github-issue-tracking/WORKFLOW.md +0 -83
  63. github_agent/skills/github-org-remediation-loop/WORKFLOW.md +0 -267
  64. github_agent/skills/github-pr-review-sweep/WORKFLOW.md +0 -95
  65. github_agent/skills/github-pr-review-sweep/references/pulls-tool-cheatsheet.md +0 -42
  66. github_agent/skills/github-project-provisioner/WORKFLOW.md +0 -51
  67. github_agent/skills/github-pull-request-create/WORKFLOW.md +0 -70
  68. github_agent/skills/github-pull-request-review/WORKFLOW.md +0 -121
  69. github_agent/skills/github-repository-management/WORKFLOW.md +0 -90
  70. github_agent/skills/github-tools/WORKFLOW.md +0 -141
  71. github_agent/skills/github-triage-resolver/WORKFLOW.md +0 -99
  72. github_agent-2.4.14.dist-info/RECORD +0 -132
  73. tests/test_action_discovery.py +0 -177
  74. tests/test_comment_crud.py +0 -890
  75. tests/test_hardening.py +0 -114
  76. tests/test_mcp_coverage.py +0 -1343
  77. tests/test_mcp_package_dispatch.py +0 -785
  78. tests/test_org_crud.py +0 -626
  79. tests/test_repo_secrets_characterization.py +0 -198
  80. {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/WHEEL +0 -0
  81. {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/entry_points.txt +0 -0
  82. {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/licenses/LICENSE +0 -0
  83. {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/top_level.txt +0 -0
@@ -2,6 +2,7 @@
2
2
  from typing import Any
3
3
 
4
4
  from scion_sdk.exceptions import require_auth
5
+ from scion_sdk.mcp.destructive import destructive_operation
5
6
 
6
7
  from github_agent.api.api_client_base import BaseApiClient
7
8
  from github_agent.github_response_models import Response
@@ -59,6 +60,7 @@ class Api(BaseApiClient):
59
60
  response.raise_for_status()
60
61
  return Response(response=response, data=response.json())
61
62
 
63
+ @destructive_operation
62
64
  @require_auth
63
65
  def update_dependabot_alert(
64
66
  self,
@@ -111,8 +111,8 @@ class Api(BaseApiClient):
111
111
  """Schedule an organization for deletion. IRREVERSIBLE.
112
112
 
113
113
  GitHub responds 202 Accepted and deletes the organization, all of its
114
- repositories, and all of its data asynchronously. The MCP layer gates
115
- this action behind allow_destructive / GITHUB_ALLOW_DESTRUCTIVE.
114
+ repositories, and all of its data asynchronously. The SDK asks
115
+ the caller to confirm this action.
116
116
 
117
117
  DELETE /orgs/{org}
118
118
  https://docs.github.com/en/rest/orgs/orgs#delete-an-organization
@@ -240,8 +240,8 @@ class Api(BaseApiClient):
240
240
  def remove_organization_member(self, org: str, username: str) -> Response:
241
241
  """Remove a user from an organization (repositories access included).
242
242
 
243
- Destructive: the MCP layer gates this action behind
244
- allow_destructive / GITHUB_ALLOW_DESTRUCTIVE. GitHub responds 204.
243
+ Destructive: the SDK asks the caller to confirm this
244
+ action. GitHub responds 204.
245
245
 
246
246
  DELETE /orgs/{org}/members/{username}
247
247
  https://docs.github.com/en/rest/orgs/members#remove-an-organization-member
@@ -150,8 +150,8 @@ class Api(BaseApiClient):
150
150
  def delete_pages(self, owner: str, repo: str) -> Response:
151
151
  """Disable GitHub Pages for a repository and delete the site.
152
152
 
153
- Destructive: the MCP layer gates this action behind
154
- allow_destructive / GITHUB_ALLOW_DESTRUCTIVE. GitHub responds 204.
153
+ Destructive: the SDK asks the caller to confirm this
154
+ action. GitHub responds 204.
155
155
 
156
156
  DELETE /repos/{owner}/{repo}/pages
157
157
  https://docs.github.com/en/rest/pages/pages#delete-a-apiname-pages-site
@@ -5,6 +5,7 @@ from scion_sdk.exceptions import (
5
5
  ParameterError,
6
6
  require_auth,
7
7
  )
8
+ from scion_sdk.mcp.destructive import destructive_operation
8
9
 
9
10
  from github_agent.api.api_client_base import BaseApiClient
10
11
  from github_agent.github_input_models import (
@@ -107,6 +108,7 @@ class Api(BaseApiClient):
107
108
  response.raise_for_status()
108
109
  return Response(response=response, data=response.json())
109
110
 
111
+ @destructive_operation
110
112
  @require_auth
111
113
  def merge_pull_request(
112
114
  self,
github_agent/auth.py CHANGED
@@ -21,16 +21,6 @@ from github_agent.api_client import Api
21
21
  logger = get_logger(__name__)
22
22
 
23
23
 
24
- def allow_destructive_default() -> bool:
25
- """Fleet-wide default for the destructive-action gate.
26
-
27
- Destructive MCP actions (e.g. organization delete, member removal) are
28
- blocked unless the caller passes allow_destructive=true or the
29
- GITHUB_ALLOW_DESTRUCTIVE environment variable is set truthy.
30
- """
31
- return setting("GITHUB_ALLOW_DESTRUCTIVE", False)
32
-
33
-
34
24
  def _exchange_delegated_token(settings: DelegationSettings) -> str:
35
25
  """Exchange the caller's verified MCP token for a downstream GitHub token."""
36
26
  logger.info(