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.
- github_agent/api/api_client_dependabot.py +2 -0
- github_agent/api/api_client_orgs.py +4 -4
- github_agent/api/api_client_pages.py +2 -2
- github_agent/api/api_client_pulls.py +2 -0
- github_agent/auth.py +0 -10
- github_agent/connector_contracts.py +1191 -0
- github_agent/mcp/__init__.py +1 -33
- github_agent/mcp_server.py +135 -3402
- github_agent/ontology/certification.json +4 -4
- github_agent/ontology/github.ttl +12 -10
- github_agent/ontology/mappings/source.yaml +1 -2
- github_agent/ontology/shapes/connector.shacl.ttl +2 -2
- github_agent/prompts/github-mcp-operator.json +347 -0
- github_agent/prompts/github-mcp-release-manager.json +203 -0
- github_agent/prompts/github-mcp-repository-administrator.json +171 -0
- github_agent/prompts/github-mcp-triage-lead.json +147 -0
- github_agent/skills/github-actions-ci-review/SKILL.md +24 -75
- github_agent/skills/github-agent-development/SKILL.md +1 -2
- github_agent/skills/github-agent-operations/SKILL.md +47 -19
- github_agent/skills/github-backlog-planner/SKILL.md +31 -97
- github_agent/skills/github-ci-failure-sweep/SKILL.md +24 -93
- github_agent/skills/github-ci-failure-sweep/scripts/summarize_runs.py +1 -1
- github_agent/skills/github-dependabot-review/SKILL.md +16 -88
- github_agent/skills/github-issue-tracking/SKILL.md +23 -80
- github_agent/skills/github-org-remediation-loop/SKILL.md +44 -262
- github_agent/skills/github-pr-review-sweep/SKILL.md +47 -106
- github_agent/skills/github-pr-review-sweep/scripts/summarize_prs.py +7 -5
- github_agent/skills/github-project-provisioner/SKILL.md +27 -44
- github_agent/skills/github-pull-request-create/SKILL.md +20 -66
- github_agent/skills/github-pull-request-review/SKILL.md +47 -126
- github_agent/skills/github-repository-management/SKILL.md +61 -94
- github_agent/skills/github-tools/SKILL.md +28 -128
- github_agent/skills/github-triage-resolver/SKILL.md +33 -104
- github_agent/skills/github-triage-resolver/scripts/classify_safe.py +2 -2
- github_agent/skills/github-triage-resolver/scripts/gh_write.py +3 -3
- {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/METADATA +6 -46
- github_agent-2.5.0.dist-info/RECORD +102 -0
- tests/test_cq_paths.py +1 -1
- tests/test_default_content_surfaces.py +2 -0
- tests/test_destructive_declaration.py +86 -0
- tests/test_ontology_parent_link.py +5 -0
- tests/test_pages.py +0 -265
- github_agent/mcp/mcp_action.py +0 -296
- github_agent/mcp/mcp_branch.py +0 -153
- github_agent/mcp/mcp_collaborator.py +0 -125
- github_agent/mcp/mcp_commit.py +0 -94
- github_agent/mcp/mcp_content.py +0 -168
- github_agent/mcp/mcp_dependabot.py +0 -207
- github_agent/mcp/mcp_issue.py +0 -188
- github_agent/mcp/mcp_org.py +0 -359
- github_agent/mcp/mcp_pull.py +0 -353
- github_agent/mcp/mcp_release.py +0 -171
- github_agent/mcp/mcp_repo.py +0 -528
- github_agent/mcp/mcp_search.py +0 -82
- github_agent/skills/github-actions-ci-review/WORKFLOW.md +0 -82
- github_agent/skills/github-agent-operations/agents/openai.yaml +0 -4
- github_agent/skills/github-agent-operations/references/catalog.md +0 -17
- github_agent/skills/github-backlog-planner/WORKFLOW.md +0 -98
- github_agent/skills/github-ci-failure-sweep/WORKFLOW.md +0 -96
- github_agent/skills/github-ci-failure-sweep/references/actions-tool-cheatsheet.md +0 -60
- github_agent/skills/github-dependabot-review/WORKFLOW.md +0 -91
- github_agent/skills/github-issue-tracking/WORKFLOW.md +0 -83
- github_agent/skills/github-org-remediation-loop/WORKFLOW.md +0 -267
- github_agent/skills/github-pr-review-sweep/WORKFLOW.md +0 -95
- github_agent/skills/github-pr-review-sweep/references/pulls-tool-cheatsheet.md +0 -42
- github_agent/skills/github-project-provisioner/WORKFLOW.md +0 -51
- github_agent/skills/github-pull-request-create/WORKFLOW.md +0 -70
- github_agent/skills/github-pull-request-review/WORKFLOW.md +0 -121
- github_agent/skills/github-repository-management/WORKFLOW.md +0 -90
- github_agent/skills/github-tools/WORKFLOW.md +0 -141
- github_agent/skills/github-triage-resolver/WORKFLOW.md +0 -99
- github_agent-2.4.14.dist-info/RECORD +0 -132
- tests/test_action_discovery.py +0 -177
- tests/test_comment_crud.py +0 -890
- tests/test_hardening.py +0 -114
- tests/test_mcp_coverage.py +0 -1343
- tests/test_mcp_package_dispatch.py +0 -785
- tests/test_org_crud.py +0 -626
- tests/test_repo_secrets_characterization.py +0 -198
- {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/WHEEL +0 -0
- {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/entry_points.txt +0 -0
- {github_agent-2.4.14.dist-info → github_agent-2.5.0.dist-info}/licenses/LICENSE +0 -0
- {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
|
|
115
|
-
|
|
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
|
|
244
|
-
|
|
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
|
|
154
|
-
|
|
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(
|